Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1915 lines
1.1 MiB

// 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/views/2d/engine/Stage":function(){define("exports ../../../core/Error ../../../core/has ../../../core/maybe ../../../core/scheduling ../../../core/signal ../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../symbols/cim/cimAnalyzer ./Container ./ManagedCanvas ./webgl/definitions ./webgl/enums ./webgl/Painter ./webgl/PooledUint32Array ./webgl/Profiler ./webgl/TileReshuffleManager ./webgl/shaderGraph/techniques/TechniqueRegistry ./webgl/shaderGraph/techniques/mesh/MeshWriterRegistry ../support/Timeline ../../support/screenshotUtils ../../webgl/enums ../../webgl/FramebufferObject ../../webgl/RenderbufferDescriptor ../../webgl/RenderingContext ../../webgl/TextureDescriptor ../../../core/imageUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A,z,B,D,F){class E extends a.Container{constructor(C,G){super();this.meshWriterRegistry=new u.MeshWriterRegistry;this._trash=new Set;this._lastFrameRenderTime=this._renderRemainingTime=0;this._renderRequested=l.signal(!1);this.stage=this;this._stationary=!0;this._reshuffleManager=new t.TileReshuffleManager;this._canvas=new f.ManagedCanvas(C);this.context=new B.RenderingContext(this._canvas.gl,G.contextOptions??{});this.painter=new r(this.context,
this);this._cimAnalyzer=new b.CIMAnalyzer(this.painter.textureManager.resourceManager);q("esri-2d-profiler")&&(this._debugOutput=document.createElement("div"),this._debugOutput.setAttribute("style","margin: 24px 64px; position: absolute; color: red;"),C.appendChild(this._debugOutput));const H=()=>this._highlightGradient;this._renderParameters={drawPhase:0,state:this.state,pixelRatio:window.devicePixelRatio,stationary:!1,globalOpacity:1,blendMode:null,deltaTime:-1,time:0,inFadeTransition:!1,effects:null,
context:this.context,painter:this.painter,timeline:G.timeline||new y.Timeline,renderingOptions:G.renderingOptions,requestRender:()=>this.requestRender(),allowDelayedRender:!1,requireFBO:!1,profiler:new p.Profiler(this.context,this._debugOutput),dataUploadCounter:0,get highlightGradient(){return H()},reshuffleManager:this._reshuffleManager,backgroundColor:G.backgroundColor};this._taskHandle=m.addFrameTask({render:K=>this.renderFrame(K)});this._taskHandle.pause();this._lostWebGLContextHandle=this._canvas.events.on("webgl-context-lost",
K=>this.emit("webgl-error",{error:new g("webgl-context-lost",K.statusMessage)}));this._bufferPool=new k.ArrayBufferPool;w.startup()}destroy(){w.shutdown(this.context);this.removeAllChildren();this._emptyTrash();this._taskHandle=h.removeMaybe(this._taskHandle);this._lostWebGLContextHandle=h.removeMaybe(this._lostWebGLContextHandle);this._canvas.destroy();this._debugOutput?.parentNode?.removeChild(this._debugOutput);this._bufferPool.destroy();this.painter.dispose();this.context.dispose();this._canvas=
null}get textureManager(){return this.painter.textureManager}get backgroundColor(){return this._renderParameters.backgroundColor}set backgroundColor(C){this._renderParameters.backgroundColor=C;this.requestRender()}get bufferPool(){return this._bufferPool}get cimAnalyzer(){return this._cimAnalyzer}get renderingOptions(){return this._renderingOptions}set renderingOptions(C){this._renderingOptions=C;this.requestRender()}get renderRequested(){return this._renderRequested.value}get state(){return this._state}set state(C){this._state=
C;this.requestRender()}get stationary(){return this._stationary}set stationary(C){this._stationary!==C&&(this._stationary=C,this.requestRender())}trashDisplayObject(C){this._trash.add(C);this.requestRender()}untrashDisplayObject(C){return this._trash.delete(C)}requestRender(){this._renderRemainingTime=2E3;this.renderRequested||(this._renderRequested.value=!0,this._taskHandle.resume())}renderFrame(C){this._renderRemainingTime-=this._lastFrameRenderTime?C.time-this._lastFrameRenderTime:0;0>=this._renderRemainingTime&&
this._taskHandle.pause();this._lastFrameRenderTime=C.time;this._renderRequested.value=!1;this._renderParameters.state=this._state;this._renderParameters.stationary=this.stationary;this._renderParameters.pixelRatio=window.devicePixelRatio;this._renderParameters.globalOpacity=1;this._renderParameters.time=C.time;this._renderParameters.deltaTime=C.deltaTime;this._renderParameters.effects=null;this.processRender(this._renderParameters);this._emptyTrash()}_createTransforms(){return{displayViewScreenMat3:d.create()}}renderChildren(C){for(const G of this.children)G.beforeRender(C);
this._reshuffleManager.reshuffle(n.MAX_TILE_RESHUFFLES_PER_FRAME);this._canvas.render(C,()=>this._renderChildren(this.children,C));for(const G of this.children)G.afterRender(C)}_renderChildren(C,G){const H=this.context;this.painter.textureUploadManager.upload();H.resetInfo();G.profiler.recordStart("drawLayers");G.dataUploadCounter=0;this.painter.beforeRenderPhases(G,G.backgroundColor,this.state.padding);G.drawPhase=c.WGLDrawPhase.MAP;for(const K of C)K.processRender(G);if(this.children.some(K=>K.hasHighlight)){G.drawPhase=
c.WGLDrawPhase.HIGHLIGHT;for(const K of C)K.processRender(G)}if(this.children.some(K=>K.hasLabels)){G.drawPhase=c.WGLDrawPhase.LABEL;for(const K of C)K.processRender(G)}if(q("esri-tiles-debug")){G.drawPhase=c.WGLDrawPhase.DEBUG;for(const K of C)K.processRender(G)}this.painter.afterRenderPhases(G);G.profiler.recordEnd("drawLayers");H.logInfo()}doRender(C){const G=this.context,{state:H,pixelRatio:K}=C;this._canvas.resize(C);G.setViewport(0,0,K*H.size[0],K*H.size[1]);G.setDepthWriteEnabled(!0);G.setStencilWriteMask(255);
this.renderChildren(C)}async takeScreenshot(C,G,H,K){const J=Math.round(this.state.size[0]*C.resolutionScale),O=Math.round(this.state.size[1]*C.resolutionScale);var Q=C.resolutionScale,T=this.context,I=this._state.clone();if(null!=K){const L=I.viewpoint;I.viewpoint.rotation=K;I.viewpoint=L}K={...this._renderParameters,drawPhase:null,globalOpacity:1,stationary:!0,state:I,pixelRatio:Q,time:performance.now(),deltaTime:0,blendMode:null,effects:null,inFadeTransition:!1,backgroundColor:H};H=new D.TextureDescriptor(J,
O);H.wrapMode=v.TextureWrapMode.CLAMP_TO_EDGE;H.internalFormat=v.SizedPixelFormat.RGBA8;H.isImmutable=!0;H=new A.FramebufferObject(T,H,new z.RenderbufferDescriptor(v.RenderbufferFormat.DEPTH_STENCIL,J,O));Q=T.getBoundFramebufferObject();I=T.getViewport();T.bindFramebuffer(H);T.setViewport(0,0,J,O);this._renderChildren(G??this.children,K);G=this._readbackScreenshot(H,{...C.cropArea,y:O-(C.cropArea.y+C.cropArea.height)});T.bindFramebuffer(Q);T.setViewport(I.x,I.y,I.width,I.height);this.requestRender();
T=await G;1===C.outputScale?C=T:(C=new ImageData(Math.round(T.width*C.outputScale),Math.round(T.height*C.outputScale)),x.resampleHermite(T,C,!0));H.dispose();return C}async _readbackScreenshot(C,G){const H=F.createEmptyImageData(G.width,G.height,document.createElement("canvas"));await C.readPixelsAsync(G.x,G.y,G.width,G.height,v.PixelFormat.RGBA,v.PixelType.UNSIGNED_BYTE,new Uint8Array(H.data.buffer));return H}_emptyTrash(){for(;0<this._trash.size;){const C=Array.from(this._trash);this._trash.clear();
for(const G of C)G.processDetach()}}}e.Stage=E;e.extraRenderTime=2E3;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/cimAnalyzer":function(){define("exports ../../core/colorUtils ../../core/fontUtils ../../core/lang ../../core/Logger ../../core/screenUtils ../../core/string ./CIMSymbolHelper ./defaultCIMValues ./enums ./OverrideHelper ./SDFHelper ./utils ./effects/CIMEffectHelper ../../views/2d/engine/webgl/definitions".split(" "),function(e,g,q,h,m,l,d,b,a,f,n,c,
r,k,p){function t(x){return x&&0===x.indexOf("Level_")&&(x=parseInt(x.substr(6),10),!isNaN(x))?x:0}function w(x){var v=x.symbolLayers;if(!v||2!==v.length)return!1;x=v.find(A=>A.effects?.find(z=>"CIMGeometricEffectDashes"===z.type&&null!=z.dashTemplate));v=v.find(A=>A.effects?.find(z=>"CIMGeometricEffectAddControlPoints"===z.type));return!!x||!!v}function u(x){return h.clone(x).map(v=>({...v,propertyName:r.uncapitalize(v.propertyName)}))}class y{constructor(x){this._cimLayers=[];this._poMap={};this._primitiveOverrides=
[];x&&(this._resourceManager=x)}analyzeSymbolReference(x,v,A){this._cimLayers=A??[];if(!x)return this._cimLayers;this._reset();if(x.primitiveOverrides){this._primitiveOverrides=x.primitiveOverrides;for(const z of this._primitiveOverrides)(A=z.valueExpressionInfo)?this._setPoMap(z.primitiveName,z.propertyName,A):null!=z.value&&(A=z.value,z.propertyName.includes("Color")&&(g.isRGB(A)&&(A=r.colorToArray(A)),A=r.normalizeAlpha(A)),this._setPoMap(z.primitiveName,z.propertyName,A))}this._analyzeSymbol(x.symbol,
v);return this._cimLayers}_reset(){this._cimLayers=[];this._poMap={};this._primitiveOverrides=[]}_analyzeSymbol(x,v){switch(x?.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":this._analyzeMultiLayerSymbol(x,v)}}_analyzeMultiLayerSymbol(x,v){const A=x?.symbolLayers;if(A){var z=x.effects,B=f.Alignment.SCREEN,D=r.getSize(x)??0;"CIMPointSymbol"===x.type&&"Map"===x.angleAlignment&&(B=f.Alignment.MAP);for(var F="CIMPolygonSymbol"===x.type,E=A.length;E--;){const K=A[E];if(!K||!1===
K.enable)continue;let J;z?.length&&(J=[...z]);var C=K.effects;C?.length&&(z?J.push(...C):J=[...C]);C=null;if(J){C=[];for(const O of J){var G=n.OverrideHelper.findEffectOverrides(O,this._primitiveOverrides);G&&C.push(G)}}n.OverrideHelper.findApplicableOverrides(K,this._primitiveOverrides,[]);switch(K.type){case "CIMSolidFill":this._analyzeSolidFill(K,C);break;case "CIMPictureFill":this._analyzePictureFill(K,C);break;case "CIMHatchFill":this._analyzeHatchFill(K,C);break;case "CIMGradientFill":this._analyzeGradientFill(K,
C);break;case "CIMSolidStroke":this._analyzeSolidStroke(K,C,F,D);break;case "CIMPictureStroke":this._analyzePictureStroke(K,C,F,D);break;case "CIMGradientStroke":this._analyzeGradientStroke(K,C,F,D);break;case "CIMCharacterMarker":case "CIMPictureMarker":case "CIMVectorMarker":if("CIMLineSymbol"===x.type||"CIMPolygonSymbol"===x.type)B=(B=K.markerPlacement)&&B.angleToLine?f.Alignment.MAP:f.Alignment.SCREEN;G=[];var H=K.primitiveName;H&&G.push(H);H=F&&r.isCIMMarkerStrokePlacement(K.markerPlacement);
this._analyzeMarker(K,C,null,G,B,D,v,[],!1,H);break;default:m.getLogger("esri.symbols.cim.cimAnalyzer").error("Cannot analyze CIM layer",K.type)}}}}_analyzeSolidFill(x,v){const {primitiveName:A,type:z}=x,B=r.normalizeAlpha(x.color);this._cimLayers.push({type:"fill",spriteRasterizationParam:null,colorLocked:!!x.colorLocked,color:this._getValueOrOverrideExpression(z,A,"Color",B),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:v,applyRandomOffset:!1,sampleAlphaOnly:!0,hasUnresolvedReplacementColor:!1})}_analyzePictureFill(x,
v){const {primitiveName:A,type:z}=x,B=r.getTintColor(x),D=r.getNumericValue(x.height,a.defaultCIMValues.CIMPictureFill.height);let F=r.getNumericValue(x.scaleX,1);if("width"in x&&"number"===typeof x.width){var E=x.width;let C=1;const G=this._resourceManager.getResource(x.url);null!=G&&(C=G.width/G.height);F/=D/E*C}E={type:"sprite-rasterization-param",resource:x,overrides:this._getPrimitiveMaterialOverrides(A,z)};this._cimLayers.push({type:"fill",spriteRasterizationParam:E,colorLocked:!!x.colorLocked,
effects:v,color:this._getValueOrOverrideExpression(z,A,"TintColor",B),height:this._getValueOrOverrideExpression(z,A,"Height",D),scaleX:this._getValueOrOverrideExpression(z,A,"ScaleX",F),angle:this._getValueOrOverrideExpression(z,A,"Rotation",r.getNumericValue(x.rotation)),offsetX:this._getValueOrOverrideExpression(z,A,"OffsetX",r.getNumericValue(x.offsetX)),offsetY:this._getValueOrOverrideExpression(z,A,"OffsetY",r.getNumericValue(x.offsetY)),applyRandomOffset:!1,sampleAlphaOnly:!1,hasUnresolvedReplacementColor:!1})}_analyzeHatchFill(x,
v){const {primitiveName:A,type:z}=x;var B=this._analyzeMaterialOverrides(A,["Rotation","OffsetX","OffsetY"]);B=r.normalizePrimitiveOverrideProps(B);let D=[255,255,255,1],F=!1;if(x.lineSymbol?.symbolLayers)for(const C of x.lineSymbol.symbolLayers){if("CIMSolidStroke"!==C.type)continue;const G=C.primitiveName??A;F||!G||C.colorLocked||null==this._poMap[G]?.Color&&null==this._poMap[G]?.StrokeColor||(D=r.normalizeAlpha(C.color),D=this._maybeGetValueOrOverrideExpression(G,"StrokeColor")??this._getValueOrOverrideExpression(z,
G,"Color",D),F=!0);var E=this._maybeGetValueOrOverrideExpression(G,"StrokeWidth");if(E){let H=null,K=null;"number"===typeof E?H=E:K=E.valueExpressionInfo;(E=B.find(J=>"strokeWidth"===J.propertyName))?E.propertyName="width":(E={type:"CIMPrimitiveOverride",primitiveName:G,propertyName:"width",valueExpressionInfo:K,value:H,defaultValue:r.getDefaultCIMValue(z,"width")},B.push(E))}}this._cimLayers.push({type:"fill",spriteRasterizationParam:{type:"sprite-rasterization-param",resource:x,overrides:B},colorLocked:!!x.colorLocked,
effects:v,color:D,height:this._getValueOrOverrideExpression(z,A,"Separation",r.getNumericValue(x.separation,a.defaultCIMValues.CIMHatchFill.separation)),scaleX:1,angle:this._getValueOrOverrideExpression(z,A,"Rotation",r.getNumericValue(x.rotation)),offsetX:this._getValueOrOverrideExpression(z,A,"OffsetX",r.getNumericValue(x.offsetX)),offsetY:this._getValueOrOverrideExpression(z,A,"OffsetY",r.getNumericValue(x.offsetY)),applyRandomOffset:!1,sampleAlphaOnly:!0,hasUnresolvedReplacementColor:!F})}_analyzeGradientFill(x,
v){this._cimLayers.push({type:"fill",spriteRasterizationParam:null,colorLocked:!!x.colorLocked,effects:v,color:[128,128,128,1],height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,applyRandomOffset:!1,sampleAlphaOnly:!1,hasUnresolvedReplacementColor:!1})}_analyzeSolidStroke(x,v,A,z){const {primitiveName:B,type:D}=x,F=r.normalizeAlpha(x.color),E=r.getNumericValue(x.width,a.defaultCIMValues.CIMSolidStroke.width),C=r.getEnum(x.capStyle,a.defaultCIMValues.CIMSolidStroke.capstyle),G=r.getEnum(x.joinStyle,a.defaultCIMValues.CIMSolidStroke.joinstyle),
H=x.miterLimit;let K=[];this._analyzePrimitiveOverrides(B,v,null,null)&&(K=this._getPrimitiveMaterialOverrides(B,D));let J,O;if(v&&Array.isArray(v)&&0<v.length){const Q=v[v.length-1].effect;Q&&"CIMGeometricEffectDashes"===Q.type&&"NoConstraint"===Q.lineDashEnding&&null===Q.offsetAlongLine&&(J=Q.dashTemplate,O=Q.scaleDash,v=[...v],v.pop())}this._cimLayers.push({type:"line",spriteRasterizationParam:void 0!==J?{type:"sprite-rasterization-param",resource:{type:"dash",dashTemplate:J,capStyle:C},overrides:K}:
null,isOutline:A,colorLocked:!!x.colorLocked,effects:v,color:this._getValueOrOverrideExpression(D,B,"Color",F),width:this._getValueOrOverrideExpression(D,B,"Width",E),cap:this._getValueOrOverrideExpression(D,B,"CapStyle",C),join:this._getValueOrOverrideExpression(D,B,"JoinStyle",G),miterLimit:H&&this._getValueOrOverrideExpression(D,B,"MiterLimit",H),referenceWidth:z,zOrder:t(x.name),dashTemplate:J,scaleDash:O,sampleAlphaOnly:!0})}_analyzePictureStroke(x,v,A,z){const {primitiveName:B,type:D}=x,F=r.getTintColor(x),
E=r.getNumericValue(x.width,a.defaultCIMValues.CIMPictureStroke.width),C=r.getEnum(x.capStyle,a.defaultCIMValues.CIMPictureStroke.capstyle),G=r.getEnum(x.joinStyle,a.defaultCIMValues.CIMPictureStroke.joinstyle),H=x.miterLimit,K={type:"sprite-rasterization-param",resource:x,overrides:this._getPrimitiveMaterialOverrides(B,D)};this._cimLayers.push({type:"line",spriteRasterizationParam:K,isOutline:A,colorLocked:!!x.colorLocked,effects:v,color:this._getValueOrOverrideExpression(D,B,"TintColor",F),width:this._getValueOrOverrideExpression(D,
B,"Width",E),cap:this._getValueOrOverrideExpression(D,B,"CapStyle",C),join:this._getValueOrOverrideExpression(D,B,"JoinStyle",G),miterLimit:H&&this._getValueOrOverrideExpression(D,B,"MiterLimit",H),referenceWidth:z,zOrder:t(x.name),dashTemplate:null,scaleDash:!1,sampleAlphaOnly:!1})}_analyzeGradientStroke(x,v,A,z){const {primitiveName:B,type:D}=x,F=r.getNumericValue(x.width,a.defaultCIMValues.CIMSolidStroke.width),E=r.getEnum(x.capStyle,a.defaultCIMValues.CIMGradientStroke.capstyle),C=r.getEnum(x.joinStyle,
a.defaultCIMValues.CIMGradientStroke.joinstyle),G=x.miterLimit;this._cimLayers.push({type:"line",spriteRasterizationParam:null,isOutline:A,colorLocked:!!x.colorLocked,effects:v,color:[128,128,128,1],width:this._getValueOrOverrideExpression(D,B,"Width",F),cap:this._getValueOrOverrideExpression(D,B,"CapStyle",E),join:this._getValueOrOverrideExpression(D,B,"JoinStyle",C),miterLimit:G&&this._getValueOrOverrideExpression(D,B,"MiterLimit",G),referenceWidth:z,zOrder:t(x.name),dashTemplate:null,scaleDash:!1,
sampleAlphaOnly:!1})}_analyzeMarker(x,v,A,z,B,D,F,E,C=!1,G=!1){C||=!!x.colorLocked;if(!this._analyzeMarkerInsidePolygon(x,v,C)){var H=r.getNumericValue(x.size,a.defaultCIMValues.CIMVectorMarker.size),K=r.getNumericValue(x.rotation),J=r.getNumericValue(x.offsetX),O=r.getNumericValue(x.offsetY),{primitiveName:Q,type:T}=x;H=this._getValueOrOverrideExpression(T,Q,"Size",H);K=this._getValueOrOverrideExpression(T,Q,"Rotation",K);J=this._getValueOrOverrideExpression(T,Q,"OffsetX",J);O=this._getValueOrOverrideExpression(T,
Q,"OffsetY",O);switch(x.type){case "CIMPictureMarker":this._analyzePictureMarker(x,v,A,z,B,D,H,K,J,O,E,C,G);break;case "CIMVectorMarker":this._analyzeVectorMarker(x,v,A,z,B,D,H,K,J,O,E,F,C,G)}}}_analyzeMarkerInsidePolygon(x,v,A){const {markerPlacement:z,type:B}=x;if(!z||"CIMMarkerPlacementInsidePolygon"!==z.type)return!1;if("CIMVectorMarker"===B||"CIMPictureMarker"===B){var D=x.primitiveName;if(D&&this._analyzePrimitiveOverrides([D],v,null,null)||(D=z.primitiveName)&&this._analyzePrimitiveOverrides([D],
v,null,null))return!1;if("CIMVectorMarker"===B){if({markerGraphics:D}=x,D)for(var F of D)if({symbol:D}=F,"CIMPolygonSymbol"===D?.type&&D.symbolLayers){({symbolLayers:D}=D);for(var E of D)if("CIMSolidStroke"===E.type)return!1}}else if({animatedSymbolProperties:F}=x,F)return!1}E=Math.abs(z.stepX);D=Math.abs(z.stepY);if(0===E||0===D)return!0;if("Random"===z.gridType){F=l.px2pt(p.randomInsidePolygonTextureSize);const C=Math.max(Math.floor(F/E),1);F=D*Math.max(Math.floor(F/D),1);E=C*E/F}else z.shiftOddRows?
(F=2*D,E=E/D*.5):(F=D,E/=D);D=r.getTintColor(x);this._cimLayers.push({type:"fill",spriteRasterizationParam:"CIMCharacterMarker"===x.type?null:{type:"sprite-rasterization-param",resource:x,overrides:[]},colorLocked:A,effects:v,color:D,height:F,scaleX:E,angle:z.gridAngle,offsetX:r.getNumericValue(z.offsetX),offsetY:r.getNumericValue(z.offsetY),applyRandomOffset:"Random"===z.gridType,sampleAlphaOnly:"CIMPictureMarker"!==x.type,hasUnresolvedReplacementColor:!0});return!0}_analyzePictureMarker(x,v,A,z,
B,D,F,E,C,G,H,K,J){const {animatedSymbolProperties:O,primitiveName:Q,type:T}=x;let I=r.getNumericValue(x.scaleX,1);const L=r.getTintColor(x);A||=this._createMarkerPlacementOverrideExpression(x.markerPlacement);const R=this._createGIFAnimatedSymbolPropertiesOverrideExpression(O),V=x.anchorPoint??{x:0,y:0};if("width"in x&&"number"===typeof x.width){var S=x.width;let N=1;var X=this._resourceManager.getResource(x.url);null!=X&&(N=X.width/X.height);X=r.getNumericValue(x.size);I/=X/S*N}z=[...z];x.primitiveName&&
z.push(x.primitiveName);O||R?S={type:"animated",url:x.url,urlHash:"H"+d.numericHash(x.url),playAnimation:x.animatedSymbolProperties?.playAnimation,reverseAnimation:x.animatedSymbolProperties?.reverseAnimation,randomizeStartTime:x.animatedSymbolProperties?.randomizeStartTime,randomizeStartSeed:x.animatedSymbolProperties?.randomizeStartSeed,startTimeOffset:x.animatedSymbolProperties?.startTimeOffset,duration:x.animatedSymbolProperties?.duration,repeatType:x.animatedSymbolProperties?.repeatType,repeatDelay:x.animatedSymbolProperties?.repeatDelay}:
(S=h.clone(x),S.markerPlacement=null);z={type:"sprite-rasterization-param",resource:S,overrides:this._getMaterialOverrides(z,T)};R&&z.overrides.push(...R.overrides);this._cimLayers.push({type:"marker",spriteRasterizationParam:z,colorLocked:K,effects:v,scaleSymbolsProportionally:!1,alignment:B,size:F,scaleX:this._getValueOrOverrideExpression(T,Q,"ScaleX",I),rotation:E,offsetX:C,offsetY:G,transform:{type:"cim-marker-transform-param",params:H},color:this._getValueOrOverrideExpression(T,Q,"TintColor",
L),anchorPoint:{x:V.x,y:V.y},isAbsoluteAnchorPoint:"Relative"!==x.anchorPointUnits,outlineColor:[0,0,0,0],outlineWidth:0,frameHeight:0,widthRatio:1,rotateClockwise:!!x.rotateClockwise,referenceSize:D,sizeRatio:1,isOutline:J,markerPlacement:A})}_analyzeVectorMarker(x,v,A,z,B,D,F,E,C,G,H,K,J,O){var Q=x.markerGraphics;if(Q){var T=x.frame,I=0;if(I=T?T.ymax-T.ymin:D)F={offsetX:C,offsetY:G,rotation:E,size:F,frameHeight:I,rotateClockWise:!!x.rotateClockwise},H=[...H,F];A||=this._createMarkerPlacementOverrideExpression(x.markerPlacement);
for(const R of Q)if(R&&(Q=R.symbol)){(F=R.primitiveName)&&z.push(F);var L=void 0;if(("CIMPointSymbol"===Q.type||"CIMTextSymbol"===Q.type)&&T){E=L=0;C=R.geometry;"x"in C&&"y"in C&&(L+=C.x-.5*(T.xmin+T.xmax),E+=C.y-.5*(T.ymin+T.ymax));if(C=x.anchorPoint)"Absolute"===x.anchorPointUnits?(L-=C.x,E-=C.y):T&&(L-=(T.xmax-T.xmin)*C.x,E-=(T.ymax-T.ymin)*C.y);L={offsetX:L,offsetY:E,rotation:0,size:0,frameHeight:0,rotateClockWise:!1};L=[...H,L]}switch(Q.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":K||
w(Q)?this._analyzeMultiLayerGraphicNonSDF(x,v,A,R,z,B,D,L??H,I,J,O):this._analyzeMultiLayerGraphic(x,v,A,R,z,B,D,L??H,I,J,O);break;case "CIMTextSymbol":this._analyzeTextGraphic(v,A,R,z,B,D,L??H,J)}F&&z.pop()}}}_analyzeMultiLayerGraphic(x,v,A,z,B,D,F,E,C,G,H){var K=z.symbol;const J=K.symbolLayers;if(J){var O=J.length;if(J&&2===J.length&&J[0].enable&&J[1].enable&&"CIMSolidStroke"===J[0].type&&"CIMSolidFill"===J[1].type&&null==J[0].path&&null==J[1].path&&!J[0].effects&&!J[1].effects)this._analyzeCompositeMarkerGraphic(x,
v,A,z,J,D,F,E,C,G,H);else{var Q=this._resourceManager.geometryEngine;if(K=k.CIMEffectHelper.applyEffects(K.effects,z.geometry,Q))for(;O--;){const S=J[O];if(!S||!1===S.enable)continue;const X=S.primitiveName;X&&B.push(X);switch(S.type){case "CIMSolidFill":case "CIMSolidStroke":var T=k.CIMEffectHelper.applyEffects(S.effects,K,Q),I=c.getExtent(T);if(!I)continue;const N="Relative"!==x.anchorPointUnits,[P,U,Y,ba]=c.getSDFMetrics(I,x.frame,x.size,x.anchorPoint,N);I="CIMSolidFill"===S.type;T={type:"sdf",
geom:T,asFill:I};const {path:Z}=S;var L=I?r.normalizeAlpha(r.getFillColor(S)):null==Z?r.normalizeAlpha(r.getStrokeColor(S)):[0,0,0,0],R=I?[0,0,0,0]:r.normalizeAlpha(r.getStrokeColor(S)),V=r.getStrokeWidth(S)??0;if(!I&&!V)break;const aa=z.primitiveName;let ca=null;I&&!S.colorLocked&&(ca=this._maybeGetValueOrOverrideExpression(aa,"FillColor"));let ea=null;I||S.colorLocked||(ea=this._maybeGetValueOrOverrideExpression(aa,"StrokeColor"));L=ca??this._getValueOrOverrideExpression(S.type,X,"Color",L);R=ea??
this._getValueOrOverrideExpression(S.type,X,"Color",R);V=this._maybeGetValueOrOverrideExpression(aa,"StrokeWidth")??this._getValueOrOverrideExpression(S.type,X,"Width",V);this._cimLayers.push({type:"marker",spriteRasterizationParam:Z?{type:"sprite-rasterization-param",resource:{type:"path",path:Z,asFill:I},overrides:[]}:{type:"sprite-rasterization-param",resource:T,overrides:[]},colorLocked:!!S.colorLocked||!!G,effects:v,scaleSymbolsProportionally:!!x.scaleSymbolsProportionally,alignment:D,anchorPoint:{x:U,
y:Y},isAbsoluteAnchorPoint:N,size:C,rotation:0,offsetX:0,offsetY:0,scaleX:1,transform:{type:"cim-marker-transform-param",params:E},frameHeight:C,widthRatio:ba,rotateClockwise:!1,referenceSize:F,sizeRatio:P,color:L,outlineColor:R,outlineWidth:V,isOutline:H,markerPlacement:A});break;case "CIMPictureMarker":case "CIMVectorMarker":S.markerPlacement?this._analyzeMultiLayerGraphicNonSDF(x,v,A,z,B,D,F,E,C,!!S.colorLocked||!!G,H):this._analyzeMarker(S,v,A,B,D,F,!1,E,G,H);break;default:this._analyzeMultiLayerGraphicNonSDF(x,
v,A,z,B,D,F,E,C,!!S.colorLocked||!!G,H)}X&&B.pop()}}}}_analyzeTextGraphic(x,v,A,z,B,D,F,E){n.OverrideHelper.findApplicableOverrides(A,this._primitiveOverrides,[]);var C=A.geometry;if("x"in C&&"y"in C){C=A.symbol;var G=r.fromCIMFontDecoration(C),H=r.fromCIMFontStyle(C.fontStyleName),K=q.getFontFamily(C.fontFamilyName);C.font={family:K,decoration:G,...H};var J=r.getNumericValue(C.height,a.defaultCIMValues.CIMTextSymbol.height),O=r.getNumericValue(C.angle),Q=r.getNumericValue(C.offsetX),T=r.getNumericValue(C.offsetY),
I=r.normalizeAlpha(r.getFillColor(C)),L=r.normalizeAlpha(r.getStrokeColor(C)),R=r.getStrokeWidth(C)??0;R||(L=r.normalizeAlpha(r.getFillColor(C.haloSymbol)),R=r.getNumericValue(C.haloSize));var V=!1;if(C.symbol?.symbolLayers)for(var S of C.symbol.symbolLayers)null!=r.normalizeAlpha(r.getFillColor(S))&&(V=!!S.colorLocked);var X=A.primitiveName;S=null;V||(S=this._maybeGetValueOrOverrideExpression(X,"FillColor"));var N=this._maybeGetValueOrOverrideExpression(X,"TextSize"),P=this._maybeGetValueOrOverrideExpression(X,
"TextAngle"),U=this._maybeGetValueOrOverrideExpression(X,"TextOffsetX");X=this._maybeGetValueOrOverrideExpression(X,"TextOffsetY");var Y=null,ba=null,Z=0;if(C.callout&&"CIMBackgroundCallout"===C.callout.type){var aa=C.callout;if(aa.backgroundSymbol&&(aa=aa.backgroundSymbol.symbolLayers))for(var ca of aa)"CIMSolidFill"===ca.type?Y=r.normalizeAlpha(ca.color):"CIMSolidStroke"===ca.type&&(ba=r.normalizeAlpha(ca.color),Z=r.getNumericValue(ca.width,a.defaultCIMValues.CIMSolidStroke.width))}ca=this._getValueOrOverrideExpression(C.type,
A.primitiveName,"TextString",A.textString??"");null!=ca&&({fontStyleName:aa}=C,K+=aa?"-"+aa.toLowerCase():"-regular",z=this._getMaterialOverrides(z,C.type),z.push(...this._getPrimitiveMaterialOverrides(A.primitiveName,C.type)),this._cimLayers.push({type:"text",lineWidth:C.lineWidth,textRasterizationParam:{type:"text-rasterization-param",resource:{type:"text",textString:A.textString??"",font:C.font,symbol:C,primitiveName:A.primitiveName},overrides:z},colorLocked:!!E||!!V,effects:x,alignment:B,anchorPoint:{x:0,
y:0},isAbsoluteAnchorPoint:!1,fontName:K,decoration:G,weight:H.weight,style:H.style,size:N??J,angle:P??O,offsetX:U??Q,offsetY:X??T,transform:{type:"cim-marker-transform-param",params:F},horizontalAlignment:r.fromCIMHorizontalAlignment(C.horizontalAlignment),verticalAlignment:r.fromCIMVerticalAlignment(C.verticalAlignment),text:ca,color:S??this._getValueOrOverrideExpression(C.type,A.primitiveName,"Color",I),outlineColor:L,outlineSize:R,backgroundColor:Y,borderLineColor:ba,borderLineWidth:Z,referenceSize:D,
sizeRatio:1,markerPlacement:v}))}}_analyzeMultiLayerGraphicNonSDF(x,v,A,z,B,D,F,E,C,G,H){z={type:x.type,enable:!0,name:x.name,colorLocked:x.colorLocked,primitiveName:x.primitiveName,anchorPoint:x.anchorPoint,anchorPointUnits:x.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:x.rotateClockwise,rotation:0,size:x.size,billboardMode3D:x.billboardMode3D,depth3D:x.depth3D,frame:x.frame,markerGraphics:[z],scaleSymbolsProportionally:x.scaleSymbolsProportionally,respectFrame:x.respectFrame,clippingPath:x.clippingPath};
var K=this._analyzeMaterialOverrides(x.primitiveName,["Rotation","OffsetX","OffsetY"]);K=r.normalizePrimitiveOverrideProps(K);const [J,O,Q]=b.CIMSymbolHelper.getTextureAnchor(z,this._resourceManager);B=this._getMaterialOverrides(B,x.type);B.push(...K);this._cimLayers.push({type:"marker",spriteRasterizationParam:{type:"sprite-rasterization-param",resource:{...z,avoidSDFRasterization:!0},overrides:B},colorLocked:G,effects:v,scaleSymbolsProportionally:!!x.scaleSymbolsProportionally,alignment:D,anchorPoint:{x:J,
y:O},isAbsoluteAnchorPoint:!1,size:C,rotation:0,offsetX:0,offsetY:0,transform:{type:"cim-marker-transform-param",params:E},color:[255,255,255,1],outlineColor:[0,0,0,0],outlineWidth:0,scaleX:1,frameHeight:C,widthRatio:1,rotateClockwise:!!x.rotateClockwise,referenceSize:F,sizeRatio:Q/l.pt2px(x.size),isOutline:H,markerPlacement:A})}_createMarkerPlacementOverrideExpression(x){if(!x)return null;const v=[];n.OverrideHelper.findApplicableOverrides(x,this._primitiveOverrides,v);return{type:"cim-marker-placement-param",
placement:x,overrides:u(v)}}_createGIFAnimatedSymbolPropertiesOverrideExpression(x){if(!x)return null;const v=[];n.OverrideHelper.findApplicableOverrides(x,this._primitiveOverrides,v);return{type:"cim-gif-animation-params",animation:x,overrides:u(v)}}_analyzeCompositeMarkerGraphic(x,v,A,z,B,D,F,E,C,G,H){const K=z.geometry;var J=B[0],O=B[1],Q=c.getExtent(K);if(Q){B="Relative"!==x.anchorPointUnits;var [T,I,L,R]=c.getSDFMetrics(Q,x.frame,x.size,x.anchorPoint,B);({path:Q}=O);var V=O.primitiveName,S=J.primitiveName;
z=z.primitiveName;var X=null;O.colorLocked||G||(X=this._maybeGetValueOrOverrideExpression(z,"FillColor"));O=X??this._getValueOrOverrideExpression(O.type,V,"Color",r.normalizeAlpha(O.color));V=null;J.colorLocked||G||(V=this._maybeGetValueOrOverrideExpression(z,"StrokeColor"));V=V??this._getValueOrOverrideExpression(J.type,S,"Color",r.normalizeAlpha(J.color));J=this._maybeGetValueOrOverrideExpression(z,"StrokeWidth")??this._getValueOrOverrideExpression(J.type,S,"Width",r.getNumericValue(J.width,a.defaultCIMValues.CIMSolidStroke.width));
this._cimLayers.push({type:"marker",spriteRasterizationParam:{type:"sprite-rasterization-param",resource:Q?{type:"path",path:Q,asFill:!0}:{type:"sdf",geom:K,asFill:!0},overrides:[]},colorLocked:G,effects:v,scaleSymbolsProportionally:!!x.scaleSymbolsProportionally,alignment:D,anchorPoint:{x:I,y:L},isAbsoluteAnchorPoint:B,size:C,rotation:0,offsetX:0,offsetY:0,scaleX:1,transform:{type:"cim-marker-transform-param",params:E},frameHeight:C,widthRatio:R,rotateClockwise:!1,referenceSize:F,sizeRatio:T,color:O,
outlineColor:V,outlineWidth:J,isOutline:H,markerPlacement:A})}}_setPoMap(x,v,A){let z;this._poMap[x]?z=this._poMap[x]:(z={},this._poMap[x]=z);z[v]=A}_maybeGetValueOrOverrideExpression(x,v,A){return this._getValueOrOverrideExpression("",x,v,A,!1)}_getValueOrOverrideExpression(x,v,A,z,B=!0){B&&!r.isValidCIMValue(z)&&(z=r.getDefaultCIMValue(x,A.toLowerCase()));if(null==v)return z;x=this._poMap[v];if(null==x)return z;A=x[A];return"string"===typeof A||"number"===typeof A||Array.isArray(A)?A:A?{valueExpressionInfo:A,
defaultValue:z}:z}_analyzePrimitiveOverrides(x,v,A,z){if(null==x)return!1;"string"===typeof x&&(x=[x]);for(const B of this._primitiveOverrides)if(x.includes(B.primitiveName)&&B.valueExpressionInfo)return!0;if(null!=v)for(const B of v)if(0<B?.overrides.length)return!0;if(null!=A)for(const B of A)if(0<B?.overrides.length)return!0;if(null!=z)for(const B of z)if(0<B?.overrides.length)return!0;return!1}_getMaterialOverrides(x,v){if(!x)return[];const A=[];for(const z of x)A.push(...this._getPrimitiveMaterialOverrides(z,
v));return A}_getPrimitiveMaterialOverrides(x,v){if(!x)return[];const A=r.normalizePrimitiveOverrideProps(this._primitiveOverrides.filter(z=>z.primitiveName===x));A.forEach(z=>z.defaultValue=r.getDefaultCIMValue(v,z.propertyName.toLowerCase()));return A}_analyzeMaterialOverrides(x,v){return this._primitiveOverrides.filter(A=>A.primitiveName!==x||!v.includes(A.propertyName))}}e.CIMAnalyzer=y;e.analyzeCIMResource=function(x,v){if(!v||0===v.length)return x;x=h.clone(x);n.OverrideHelper.applyOverrides(x,
v);return x};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/fontUtils":function(){define(["exports","../config"],function(e,g){function q(n){if(!n)return"arial-unicode-ms";n=n.toLowerCase().split(" ").join("-");switch(n){case "serif":return"noto-serif";case "sans-serif":return"arial-unicode-ms";case "monospace":return"ubuntu-mono";case "fantasy":return"cabin-sketch";case "cursive":return"redressed";default:return n}}function h(n){const c=l(n)+d(n);return q(n.family)+(0<
c.length?c:"-regular")}function m(n){const c=l(n)+d(n);return(n.family||"arial-unicode-ms")+(0<c.length?c:"-regular")}function l(n){if(!n.weight)return"";switch(n.weight.toLowerCase()){case "bold":case "bolder":return"-bold"}return""}function d(n){if(!n.style)return"";switch(n.style.toLowerCase()){case "italic":case "oblique":return"-italic"}return""}const b=new Map,a=new Set;class f{constructor(n,c){this.fontFace=n;this.promise=c}}e.clearFonts=function(){const n=document.fonts;b.forEach(c=>{n.delete(c.fontFace)});
b.clear();a.clear()};e.defaultFontFamily="arial-unicode-ms";e.getFontFamily=q;e.getFullyQualifiedFontName=h;e.isCachedFontFace=function(n){return a.has(n)};e.loadFont=async function(n){const c=m(n),r=h(n),k=b.get(c);if(k)return k.promise;const p=new FontFace(n.family,`url('${g.fontsUrl}/woff2/${r}.${"woff2"}') format('${"woff2"}')`,{style:n.style,weight:n.weight}),t=document.fonts;if(t.has(p)&&"loading"===p.status)return p.loaded;n=p.load().then(()=>{t.add(p);return p});b.set(c,new f(p,n));a.add(p);
return n};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CIMSymbolHelper":function(){define("exports ../../core/BidiText ../../core/has ../../core/lang ../../core/Logger ../../core/RandomLCG ../../core/screenUtils ../../geometry/support/aaBoundingRect ../../geometry/support/boundsUtils ../Font ./CIMPlacements ./CIMSymbolDrawHelper ./defaultCIMValues ./enums ./utils ../support/defaults ../../views/2d/engine/vectorTiles/GeometryUtils ../../views/2d/engine/webgl/definitions ../../views/2d/engine/webgl/mesh/templates/shapingUtils ../../views/2d/layers/graphics/graphicsUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x){function v(N,P,U){switch(P.type){case "CIMSymbolReference":return v(N,P.symbol,U);case "CIMPointSymbol":null==U&&(U={x:0,y:0});N.drawSymbol(P,U);break;case "CIMLineSymbol":null==U&&(U={paths:[[[0,0],[10,0]]]});N.drawSymbol(P,U);break;case "CIMPolygonSymbol":null==U&&(U={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]});N.drawSymbol(P,U);break;case "CIMTextSymbol":N.drawSymbol(P,{x:0,y:0});break;case "CIMVectorMarker":U=new n.Placement,N.drawMarker(P,U)}return N.envelope()}
function A(N){if(!N)return 0;switch(N.type){case "CIMMarkerPlacementAlongLineSameSize":return Math.abs(N.offset);case "CIMMarkerPlacementAlongLineRandomSize":return Math.abs(N.offset);case "CIMMarkerPlacementAtExtremities":return Math.abs(N.offset);case "CIMMarkerPlacementAtMeasuredUnits":return Math.abs(N.offset);case "CIMMarkerPlacementAtRatioPositions":return Math.abs(N.offset);case "CIMMarkerPlacementInsidePolygon":return 0;case "CIMMarkerPlacementOnLine":return Math.abs(N.offset);case "CIMMarkerPlacementOnVertices":return Math.abs(N.offset);
case "CIMMarkerPlacementPolygonCenter":return 0;default:return 0}}function z(N){if(!N)return 0;switch(N.type){case "CIMGeometricEffectArrow":return Math.abs(.5*N.width);case "CIMGeometricEffectBuffer":return Math.abs(N.size);case "CIMGeometricEffectControlMeasureLine":return 500;case "CIMGeometricEffectExtension":return Math.abs(N.length);case "CIMGeometricEffectJog":return Math.abs(.5*N.length);case "CIMGeometricEffectMove":return Math.max(Math.abs(p.getNumericValue(N.offsetX)),Math.abs(p.getNumericValue(N.offsetY)));
case "CIMGeometricEffectOffset":return Math.abs(N.offset);case "CIMGeometricEffectOffsetTangent":return Math.abs(N.offset);case "CIMGeometricEffectRadial":return Math.abs(N.length);case "CIMGeometricEffectRegularPolygon":return Math.abs(N.radius);case "CIMGeometricEffectRotate":return 0;case "CIMGeometricEffectScale":return 0;case "CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(N.fromWidth),Math.abs(N.toWidth));case "CIMGeometricEffectWave":return Math.abs(N.amplitude);case "CIMGeometricEffectDonut":return Math.abs(N.width);
default:return 0}}function B(N){if(!N)return 0;let P=0;for(const U of N)P+=z(U);return P}function D(N,P){if(N)switch(N.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":if(N=N.symbolLayers)for(const U of N)switch(P(U),U.type){case "CIMVectorMarker":if(N=U.markerGraphics)for(const Y of N)Y&&(N=Y.symbol)&&D(N,P)}}}function F(N,P,U){N.effects&&null==P.geometryEngine&&(P.geometryEnginePromise?U.push(P.geometryEnginePromise):p.isGeometryEngineRequired(N.effects)&&(P.geometryEnginePromise=
p.importGeometryEngine(),U.push(P.geometryEnginePromise),P.geometryEnginePromise.then(Y=>P.geometryEngine=Y)))}function E(N){if(!N)return null;let P=null;const {cap:U,color:Y,join:ba,miterLimit:Z,style:aa,width:ca}=N;"solid"!==aa&&"none"!==aa&&"esriSLSSolid"!==aa&&"esriSLSNull"!==aa&&(P=[{type:"CIMGeometricEffectDashes",dashTemplate:S(aa,U),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);return{type:"CIMSolidStroke",color:"esriSLSNull"!==aa&&"none"!==aa?V(Y):[0,0,0,0],capStyle:T(U),
joinStyle:I(ba),miterLimit:Z,width:ca,effects:P}}const C=Math.PI,G=C/2,H=Math.PI/180,K=96/72,J=()=>m.getLogger("esri.symbols.cim.CIMSymbolHelper");class O{static getSymbolInflateSize(N,P,U,Y,ba){N||=[0,0,0,0];return P?this._getInflateSize(N,P,U,Y,ba):N}static safeSize(N){const P=Math.max(Math.abs(N[0]),Math.abs(N[2]));N=Math.max(Math.abs(N[1]),Math.abs(N[3]));return Math.sqrt(P*P+N*N)}static _vectorMarkerBounds(N,P,U,Y){let ba=!0;const Z=b.create();if(P?.markerGraphics)for(const aa of P.markerGraphics)P=
[0,0,0,0],aa.geometry&&(a.getBoundsXY(Z,aa.geometry),P[0]=0,P[1]=0,P[2]=0,P[3]=0,this.getSymbolInflateSize(P,aa.symbol,U,0,Y),Z[0]+=P[0],Z[1]+=P[1],Z[2]+=P[2],Z[3]+=P[3],ba?(N[0]=Z[0],N[1]=Z[1],N[2]=Z[2],N[3]=Z[3],ba=!1):(N[0]=Math.min(N[0],Z[0]),N[1]=Math.min(N[1],Z[1]),N[2]=Math.max(N[2],Z[2]),N[3]=Math.max(N[3],Z[3])));return N}static _getInflateSize(N,P,U,Y,ba){return void 0!==P.symbolLayers?(N=this._getLayersInflateSize(N,P.symbolLayers,U,Y,ba),P=B(P.effects),0<P&&(N[0]-=P,N[1]-=P,N[2]+=P,N[3]+=
P),N):this._getTextInflatedSize(N,P,ba)}static _getLayersInflateSize(N,P,U,Y,ba){let Z=!0;if(!P)return N;for(const ja of P)if(ja){P=[0,0,0,0];switch(ja.type){case "CIMSolidStroke":case "CIMPictureStroke":case "CIMGradientStroke":var aa=ja,ca=aa.width;null!=ca&&(ca=aa.capStyle===k.LineCapStyle.Square||aa.joinStyle===k.LineJoinStyle.Miter?ca/1.4142135623730951:ca/2,P[0]=-ca,P[1]=-ca,P[2]=ca,P[3]=ca);break;case "CIMCharacterMarker":case "CIMVectorMarker":case "CIMPictureMarker":aa=ja;if("CIMVectorMarker"===
ja.type){if(ca=ja,P=this._vectorMarkerBounds(P,ca,U,ba),ca.frame){var ea=(ca.frame.xmin+ca.frame.xmax)/2,ia=(ca.frame.ymin+ca.frame.ymax)/2;P[0]-=ea;P[1]-=ia;P[2]-=ea;P[3]-=ia;null!=ca.size&&(ca=ca.size/(ca.frame.ymax-ca.frame.ymin),P[0]*=ca,P[1]*=ca,P[2]*=ca,P[3]*=ca)}}else"CIMPictureMarker"===ja.type?(ca=ja,ia=U.getResource(ca.url),ea=1,null!=ia&&ia.height&&(ea=ia.width/ia.height),null!=aa.size&&(P=aa.size/2,ca=aa.size*ea*ca.scaleX/2,P=[-ca,-P,ca,P])):null!=aa.size&&(P=aa.size/2,P=[-P,-P,P,P]);
aa.anchorPoint&&("Absolute"===aa.anchorPointUnits?(ca=aa.anchorPoint.x,ea=aa.anchorPoint.y):(ca=aa.anchorPoint.x*(P[2]-P[0]),ea=aa.anchorPoint.y*(P[3]-P[1])),ca=1.25*Math.sqrt(ca*ca+ea*ea),P[0]-=ca,P[1]-=ca,P[2]+=ca,P[3]+=ca);ca=p.getNumericValue(aa.rotation);aa.rotateClockwise&&(ca=-ca);Y&&(ca-=Y);ca&&(ea=H*ca,ca=Math.cos(ea),ea=Math.sin(ea),ia=b.create([w.cInfinity,w.cInfinity,-w.cInfinity,-w.cInfinity]),b.expandPointInPlace(ia,[P[0]*ca-P[1]*ea,P[0]*ea+P[1]*ca]),b.expandPointInPlace(ia,[P[0]*ca-
P[3]*ea,P[0]*ea+P[3]*ca]),b.expandPointInPlace(ia,[P[2]*ca-P[1]*ea,P[2]*ea+P[1]*ca]),b.expandPointInPlace(ia,[P[2]*ca-P[3]*ea,P[2]*ea+P[3]*ca]),P=ia);ca=p.getNumericValue(aa.offsetX);ea=p.getNumericValue(aa.offsetY);if(Y){var ha=H*Y;ia=Math.cos(ha);ha=Math.sin(ha);const ka=ca*ha+ea*ia;ca=ca*ia-ea*ha;ea=ka}P[0]+=ca;P[1]+=ea;P[2]+=ca;P[3]+=ea;aa=A(aa.markerPlacement);0<aa&&(P[0]-=aa,P[1]-=aa,P[2]+=aa,P[3]+=aa)}aa=B(ja.effects);0<aa&&(P[0]-=aa,P[1]-=aa,P[2]+=aa,P[3]+=aa);Z?(N[0]=P[0],N[1]=P[1],N[2]=
P[2],N[3]=P[3],Z=!1):(N[0]=Math.min(N[0],P[0]),N[1]=Math.min(N[1],P[1]),N[2]=Math.max(N[2],P[2]),N[3]=Math.max(N[3],P[3]))}return N}static _getTextInflatedSize(N,P,U){var Y=x.roundPtToWholePixel(P.height??r.defaultCIMValues.CIMTextSymbol.height);N[0]=-Y/2;N[1]=-Y/2;N[2]=Y/2;N[3]=Y/2;if(!U)return N;U=U.get(P);if(!U||!U.glyphMosaicItems.glyphs.length)return N;const {lineGapType:ba,lineGap:Z}=P,aa=ba?c.lineGapType2LineHeight(ba,Z??0,Y):0,ca="CIMBackgroundCallout"===P.callout?.type;P=y.shapeGlyphs(U.glyphMosaicItems,
{scale:Y/u.glyphSize,angle:p.getNumericValue(P.angle),xOffset:p.getNumericValue(P.offsetX),yOffset:p.getNumericValue(P.offsetY),horizontalAlignment:P.horizontalAlignment,verticalAlignment:P.verticalAlignment,maxLineWidth:x.getLineWidth(P.lineWidth),lineHeight:u.magicLabelLineHeight*Math.max(.25,Math.min(aa||1,4)),decoration:P.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:ca}).boundsT;Y=Math.sqrt(P.width*P.width+P.height*P.height);N[0]-=P.x+Y;N[1]-=P.y-Y;N[2]+=P.x+Y;N[3]+=-P.y+Y;return N}}
class Q{static getEnvelope(N,P,U){if(!N)return null;U=new c.EnvDrawHelper(U);if(Array.isArray(N)){let Y;for(const ba of N)Y?Y.union(v(U,ba,P)):Y=v(U,ba,P);return Y}return v(U,N,P)}static getTextureAnchor(N,P){N=this.getEnvelope(N,null,P);if(!N)return[0,0,0];P=N.height*K+2;return[-((N.x+.5*N.width)*K)/(N.width*K+2),-((N.y+.5*N.height)*K)/P,P]}static rasterize(N,P,U,Y,ba=!0){var Z=U||this.getEnvelope(P,null,Y);if(!Z)return[null,0,0,0,0];const aa=(Z.x+.5*Z.width)*K,ca=(Z.y+.5*Z.height)*K;N.width=Z.width*
K;N.height=Z.height*K;U||(N.width+=2,N.height+=2);U=N.getContext("2d",{willReadFrequently:!0});Z=c.Transformation.createScale(K,-K);Z.translate(.5*N.width-aa,.5*N.height+ca);Y=new c.CanvasDrawHelper(U,Y,Z);switch(P.type){case "CIMPointSymbol":Y.drawSymbol(P,{type:"point",x:0,y:0});break;case "CIMVectorMarker":Z=new n.Placement,Y.drawMarker(P,Z)}P=U.getImageData(0,0,N.width,N.height);P=new Uint8Array(P.data);if(ba)for(Y=0;Y<P.length;Y+=4)ba=P[Y+3]/255,P[Y]*=ba,P[Y+1]*=ba,P[Y+2]*=ba;return[P,N.width,
N.height,-aa/N.width,-ca/N.height]}static fromTextSymbol(N){const {text:P}=N;return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:Q.createCIMTextSymbolfromTextSymbol(N),textString:P}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(N){const {height:P,
outline:U,width:Y,xoffset:ba,xscale:Z,yoffset:aa,yscale:ca}=N,ea=[],ia={type:"CIMPolygonSymbol",symbolLayers:ea};if(U){var ha=E(U);ha&&ea.push(ha)}ha=N.url;"esriPFS"===N.type&&N.imageData&&(ha=N.imageData);N="angle"in N?N.angle??0:0;ea.push({type:"CIMPictureFill",invertBackfaceTexture:!1,scaleX:1,textureFilter:k.TextureFilter.Picture,tintColor:null,url:ha,height:(P??0)*(ca||1),width:(Y??0)*(Z||1),offsetX:p.getNumericValue(ba),offsetY:p.getNumericValue(aa),rotation:p.getNumericValue(-N),colorSubstitutions:null});
return ia}static fromSimpleFillSymbol(N){const {color:P,style:U,outline:Y}=N;N=[];const ba={type:"CIMPolygonSymbol",symbolLayers:N};if(Y){var Z=E(Y);Z&&N.push(Z)}if(U&&"solid"!==U&&"none"!==U&&"esriSFSSolid"!==U&&"esriSFSNull"!==U){Z={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:V(P),capStyle:k.LineCapStyle.Butt,joinStyle:k.LineJoinStyle.Miter,width:.75}]};let aa=0;const ca=d.px2pt("vertical"===U||"horizontal"===U||"cross"===U||"esriSFSCross"===U||"esriSFSVertical"===U||"esriSFSHorizontal"===
U?8:10);switch(U){case "vertical":case "esriSFSVertical":aa=90;break;case "forward-diagonal":case "esriSFSForwardDiagonal":aa=-45;break;case "backward-diagonal":case "esriSFSBackwardDiagonal":aa=45;break;case "cross":case "esriSFSCross":aa=0;break;case "diagonal-cross":case "esriSFSDiagonalCross":aa=-45}N.push({type:"CIMHatchFill",lineSymbol:Z,offsetX:0,offsetY:0,rotation:aa,separation:ca});"cross"===U||"esriSFSCross"===U?N.push({type:"CIMHatchFill",lineSymbol:h.clone(Z),offsetX:0,offsetY:0,rotation:90,
separation:ca}):("diagonal-cross"===U||"esriSFSDiagonalCross"===U)&&N.push({type:"CIMHatchFill",lineSymbol:h.clone(Z),offsetX:0,offsetY:0,rotation:45,separation:ca})}else!U||"solid"!==U&&"esriSFSSolid"!==U||N.push({type:"CIMSolidFill",enable:!0,color:V(P)});return ba}static fromSimpleLineSymbol(N){const {cap:P,color:U,join:Y,marker:ba,miterLimit:Z,style:aa,width:ca}=N;N=null;"solid"!==aa&&"none"!==aa&&"esriSLSSolid"!==aa&&"esriSLSNull"!==aa&&(N=[{type:"CIMGeometricEffectDashes",dashTemplate:S(aa,
P),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const ea=[];if(ba){let ia;switch(ba.placement){case "begin-end":ia=k.ExtremityPlacement.Both;break;case "begin":ia=k.ExtremityPlacement.JustBegin;break;case "end":ia=k.ExtremityPlacement.JustEnd;break;default:ia=k.ExtremityPlacement.None}const ha=Q.fromSimpleMarker(ba,ca,U).symbolLayers[0];ha.markerPlacement={type:"CIMMarkerPlacementAtExtremities",placePerPart:!1,angleToLine:!0,offset:0,extremityPlacement:ia,offsetAlongLine:0};
ea.push(ha)}ea.push({type:"CIMSolidStroke",color:"none"!==aa&&"esriSLSNull"!==aa?V(U):[0,0,0,0],capStyle:T(P),joinStyle:I(Y),miterLimit:Z,width:ca,effects:N});return{type:"CIMLineSymbol",symbolLayers:ea}}static fromPictureMarker(N){const {angle:P,height:U,width:Y,xoffset:ba,yoffset:Z}=N;let aa=N.url;"esriPMS"===N.type&&N.imageData&&(aa=N.imageData);return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:k.TextureFilter.Picture,tintColor:null,
url:aa,size:U,width:Y,offsetX:p.getNumericValue(ba),offsetY:p.getNumericValue(Z),rotation:p.getNumericValue(-P)}]}}static createCIMTextSymbolfromTextSymbol(N){const {angle:P,color:U,font:Y,haloColor:ba,haloSize:Z,horizontalAlignment:aa,kerning:ca,lineWidth:ea,text:ia,verticalAlignment:ha,xoffset:ja,yoffset:ka,backgroundColor:na,borderLineColor:qa,borderLineSize:oa}=N;let ua,sa,M;if(Y){var W=Y.family;var da=Y.style;var fa=Y.weight;ua=Y.size;sa=Y.decoration}N=!1;ia&&(N=g.bidiText(ia)[1]);if(na||oa)M=
{type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",color:V(na)},{type:"CIMSolidStroke",color:V(qa),width:oa}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null};var ma=k.BlockProgression.BTT,ta=k.FontEffects.Normal,za=k.FontEncoding.Unicode;W=W||"Arial";b:{if(fa)switch(fa.toLowerCase()){case "bold":case "bolder":fa="bold";break b}fa=""}b:{if(da)switch(da.toLowerCase()){case "italic":case "oblique":da="italic";break b}da=
""}fa=fa&&da?`${fa}-${da}`:`${fa}${da}`;return{type:"CIMTextSymbol",angle:P,blockProgression:ma,depth3D:1,extrapolateBaselines:!0,fontEffects:ta,fontEncoding:za,fontFamilyName:W,fontStyleName:fa,fontType:k.FontType.Unspecified,haloSize:Z,height:ua,hinting:k.GlyphHinting.Default,horizontalAlignment:L(aa??"center"),kerning:ca,letterWidth:100,ligatures:!0,lineGapType:"Multiple",lineWidth:ea,offsetX:p.getNumericValue(ja),offsetY:p.getNumericValue(ka),strikethrough:"line-through"===sa,underline:"underline"===
sa,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:V(U)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:V(ba)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:N?k.TextReadingDirection.RTL:k.TextReadingDirection.LTR,verticalAlignment:R(ha??"baseline"),verticalGlyphOrientation:k.VerticalGlyphOrientation.Right,wordSpacing:100,billboardMode3D:k.BillBoardMode.FaceNearPlane,callout:M}}static createPictureMarkerRasterizationParam(N){const {angle:P,
height:U,width:Y,xoffset:ba,yoffset:Z}=N;return(N=N.url??N.source?.url??N.source?.imageData)?{type:"sprite-rasterization-param",overrides:[],resource:{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:k.TextureFilter.Picture,tintColor:null,url:N,size:U,width:Y,offsetX:p.getNumericValue(ba),offsetY:p.getNumericValue(Z),rotation:p.getNumericValue(-P)}}:null}static createPictureFillRasterizationParam(N){const {width:P,height:U,xoffset:Y,yoffset:ba,url:Z}=N;return Z?{type:"sprite-rasterization-param",
overrides:[],resource:{type:"CIMPictureFill",scaleX:1,textureFilter:k.TextureFilter.Picture,tintColor:null,url:Z,width:P,height:U,offsetX:p.getNumericValue(Y),offsetY:p.getNumericValue(ba),rotation:0}}:null}static fromSimpleMarker(N,P,U){var {style:Y}=N;U=N.color??U;if("path"===Y||"esriSMSPath"===Y){P=[];if("outline"in N&&N.outline){var ba=N.outline;P.push({type:"CIMSolidStroke",enable:!0,width:ba.width,color:V(ba.color),path:N.path})}P.push({type:"CIMSolidFill",enable:!0,color:V(U),path:N.path});
const [ia,ha]=X("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:-p.getNumericValue(N.angle),size:p.getNumericValue(N.size||6),offsetX:p.getNumericValue(N.xoffset),offsetY:p.getNumericValue(N.yoffset),scaleSymbolsProportionally:!1,frame:ia,markerGraphics:[{type:"CIMMarkerGraphic",geometry:ha,symbol:{type:"CIMPolygonSymbol",symbolLayers:P}}]}]}}const Z=[];ba=N.size;let aa;if("outline"in N&&N.outline&&"none"!==N.outline.style&&"esriSLSNull"!==N.outline.style){const ia=
N.outline,ha="solid"!==ia.style&&"esriSLSSolid"!==ia.style;[Y,aa]=ha?X(Y,N.size):X(Y);const ja=ia.width??t.defaultPolylineSymbol2D.width;if(ha){var ca=ja/N.size,ea=(Y.xmax-Y.xmin)*ca/2;ca=(Y.ymax-Y.ymin)*ca/2;Y.xmin-=ea;Y.xmax+=ea;Y.ymin-=ca;Y.ymax+=ca;ba&&(ba+=ja)}ea="cross"!==N.style&&"x"!==N.style||"dot"===N?.outline.style||"short-dot"===N?.outline.style?k.LineDashEnding.HalfGap:k.LineDashEnding.FullPattern;ea=ha?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:S(ia.style,
null).map(ka=>ia.width&&0<ia.width?ka*ia.width:ka),lineDashEnding:ea,controlPointEnding:k.LineDashEnding.FullPattern}]:void 0;Z.push({type:"CIMSolidStroke",capStyle:ha?k.LineCapStyle.Round:k.LineCapStyle.Butt,enable:!0,width:ja,color:V(ia.color),effects:ea})}else!P||"line-marker"!==N.type||"cross"!==N.style&&"x"!==N.style?[Y,aa]=X(Y):([Y,aa]=X(Y),Z.push({type:"CIMSolidStroke",enable:!0,width:P,color:V(U)}));Z.push({type:"CIMSolidFill",enable:!0,color:V(U)});U={type:"CIMPolygonSymbol",symbolLayers:Z};
return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:p.getNumericValue(-N.angle),size:p.getNumericValue(ba||6*P),offsetX:p.getNumericValue(N.xoffset),offsetY:p.getNumericValue(N.yoffset),scaleSymbolsProportionally:!1,frame:Y,markerGraphics:[{type:"CIMMarkerGraphic",geometry:aa,symbol:U}]}]}}static fromCIMHatchFill(N,P){const U=P*(N.separation??r.defaultCIMValues.CIMHatchFill.separation),Y=U/2;N=h.clone(N.lineSymbol);N.symbolLayers?.forEach(Z=>{switch(Z.type){case "CIMSolidStroke":null!=
Z.width&&(Z.width*=P);Z.effects?.forEach(aa=>{"CIMGeometricEffectDashes"===aa.type&&(aa.dashTemplate=aa.dashTemplate?.map(ca=>ca*P))});break;case "CIMVectorMarker":null!=Z.size&&(Z.size*=P),Z=Z.markerPlacement,null!=Z&&"placementTemplate"in Z&&(Z.placementTemplate=Z.placementTemplate.map(aa=>aa*P))}});for(var ba=this._getLineSymbolPeriod(N)||4;4>ba;)ba*=2;ba/=2;return{type:"CIMVectorMarker",frame:{xmin:-ba,xmax:ba,ymin:-Y,ymax:Y},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-ba,0],
[ba,0]]]},symbol:N}],size:U}}static fetchResources(N,P,U,Y=null){if(!N||!P)return U;D(N,ba=>{F(ba,P,U);"url"in ba&&ba.url&&U.push(P.fetchResource(ba.url,{signal:Y}))});return U}static fetchFonts(N,P,U){if(N&&P)if("symbolLayers"in N&&N.symbolLayers)for(const Z of N.symbolLayers){if("CIMVectorMarker"===Z.type&&Z.markerGraphics)for(const aa of Z.markerGraphics)aa?.symbol&&Q.fetchFonts(aa.symbol,P,U)}else if("CIMTextSymbol"===N.type){const {fontFamilyName:Z,fontStyleName:aa}=N;if(Z&&"calcitewebcoreicons"!==
Z.toLowerCase()){var {style:Y,weight:ba}=p.fromCIMFontStyle(aa);N=p.fromCIMFontDecoration(N);N=new f({family:Z,style:Y,weight:ba,decoration:N});U.push(P.loadFont(N).catch(()=>{J().error(`Unsupported font ${Z} in CIM symbol`)}))}}}static _getLineSymbolPeriod(N){if(N){const P=this._getEffectsRepeat(N.effects);if(P)return P;if(N.symbolLayers)for(const U of N.symbolLayers)if(U){if(N=this._getEffectsRepeat(U.effects))return N;switch(U.type){case "CIMCharacterMarker":case "CIMPictureMarker":case "CIMVectorMarker":case "CIMObjectMarker3D":case "CIMglTFMarker3D":if(N=
this._getPlacementRepeat(U.markerPlacement))return N}}}return 0}static _getEffectsRepeat(N){if(N)for(var P of N)if(P)switch(P.type){case "CIMGeometricEffectDashes":if((N=P.dashTemplate)&&N.length){P=0;for(const U of N)P+=U;N.length&1&&(P*=2);return P}break;case "CIMGeometricEffectWave":return P.period;default:J().error(`unsupported geometric effect type ${P.type}`)}return 0}static _getPlacementRepeat(N){if(N)switch(N.type){case "CIMMarkerPlacementAlongLineSameSize":case "CIMMarkerPlacementAlongLineRandomSize":case "CIMMarkerPlacementAlongLineVariableSize":if((N=
N.placementTemplate)&&N.length){let P=0;for(const U of N)P+=+U;N.length&1&&(P*=2);return P}}return 0}static fromCIMInsidePolygon(N){var P=N.markerPlacement;const U={...N,markerPlacement:null,anchorPoint:null};N=Math.abs(P.stepX);const Y=Math.abs(P.stepY);var ba=(P.randomness??100)/100;let Z,aa;if("Random"===P.gridType){var ca=d.px2pt(u.randomInsidePolygonTextureSize);const ea=Math.max(Math.floor(ca/N),1),ia=Math.max(Math.floor(ca/Y),1);ca=ea*N/2;Z=ia*Y/2;aa=2*Z;P=new l(P.seed);const ha=ba*N/1.5,ja=
ba*Y/1.5;ba=[];for(let ka=0;ka<ea;ka++)for(let na=0;na<ia;na++){const qa=ka*N-ca+ha*(.5-P.getFloat()),oa=na*Y-Z+ja*(.5-P.getFloat());ba.push({x:qa,y:oa});0===ka&&ba.push({x:qa+2*ca,y:oa});0===na&&ba.push({x:qa,y:oa+2*Z})}}else!0===P.shiftOddRows?(ca=N/2,Z=Y,aa=2*Y,ba=[{x:-ca,y:0},{x:ca,y:0},{x:0,y:Z},{x:0,y:-Z}]):(ca=N/2,Z=Y/2,aa=Y,ba=[{x:-N,y:0},{x:0,y:-Y},{x:-N,y:-Y},{x:0,y:0},{x:N,y:0},{x:0,y:Y},{x:N,y:Y},{x:-N,y:Y},{x:N,y:-Y}]);N=ba.map(ea=>({type:"CIMMarkerGraphic",geometry:ea,symbol:{type:"CIMPointSymbol",
symbolLayers:[U]}}));return{type:"CIMVectorMarker",frame:{xmin:-ca,xmax:ca,ymin:-Z,ymax:Z},markerGraphics:N,size:aa}}}const T=N=>{if(!N)return k.LineCapStyle.Butt;switch(N){case "butt":return k.LineCapStyle.Butt;case "square":return k.LineCapStyle.Square;case "round":return k.LineCapStyle.Round}},I=N=>{if(!N)return k.LineJoinStyle.Miter;switch(N){case "miter":return k.LineJoinStyle.Miter;case "round":return k.LineJoinStyle.Round;case "bevel":return k.LineJoinStyle.Bevel}},L=N=>{if(null==N)return"Center";
switch(N){case "left":return"Left";case "right":return"Right";case "center":return"Center"}},R=N=>{if(null==N)return"Center";switch(N){case "baseline":return"Baseline";case "top":return"Top";case "middle":return"Center";case "bottom":return"Bottom"}},V=N=>{if(!N)return[0,0,0,0];const {r:P,g:U,b:Y,a:ba}=N;return[P,U,Y,255*ba]},S=(N,P)=>{const U=q("safari")?.001:0;P="butt"===P;switch(N){case "dash":case "esriSLSDash":return P?[4,3]:[3,4];case "dash-dot":case "esriSLSDashDot":return P?[4,3,1,3]:[3,4,
U,4];case "dot":case "esriSLSDot":return P?[1,3]:[U,4];case "long-dash":case "esriSLSLongDash":return P?[8,3]:[7,4];case "long-dash-dot":case "esriSLSLongDashDot":return P?[8,3,1,3]:[7,4,U,4];case "long-dash-dot-dot":case "esriSLSDashDotDot":return P?[8,3,1,3,1,3]:[7,4,U,4,U,4];case "short-dash":case "esriSLSShortDash":return P?[4,1]:[3,2];case "short-dash-dot":case "esriSLSShortDashDot":return P?[4,1,1,1]:[3,2,U,2];case "short-dash-dot-dot":case "esriSLSShortDashDotDot":return P?[4,1,1,1,1,1]:[3,
2,U,2,U,2];case "short-dot":case "esriSLSShortDot":return P?[1,1]:[U,2];case "solid":case "esriSLSSolid":case "none":return J().error("Unexpected: style does not require rasterization"),[0,0];default:return J().error(`Tried to rasterize SLS, but found an unexpected style: ${N}!`),[0,0]}},X=(N,P=100)=>{var U=P/2,Y;if("circle"===N||"esriSMSCircle"===N){var ba=Math.acos(1-.25/U);P=Math.ceil(C/ba/4);0===P&&(P=1);ba=G/P;P*=4;N=[];N.push([U,0]);for(Y=1;Y<P;Y++)N.push([U*Math.cos(Y*ba),-U*Math.sin(Y*ba)]);
N.push([U,0]);ba={rings:[N]};Y={xmin:-U,ymin:-U,xmax:U,ymax:U}}else"cross"===N||"esriSMSCross"===N?(ba={paths:[[[0,U],[0,-U]],[[U,0],[-U,0]]]},Y={xmin:-U,ymin:-U,xmax:U,ymax:U}):"diamond"===N||"esriSMSDiamond"===N?(ba={rings:[[[-U,0],[0,U],[U,0],[0,-U],[-U,0]]]},Y={xmin:-U,ymin:-U,xmax:U,ymax:U}):"square"===N||"esriSMSSquare"===N?(ba={rings:[[[-U,-U],[-U,U],[U,U],[U,-U],[-U,-U]]]},Y={xmin:-U,ymin:-U,xmax:U,ymax:U}):"x"===N||"esriSMSX"===N?(ba={paths:[[[U,U],[-U,-U]],[[U,-U],[-U,U]]]},Y={xmin:-U,ymin:-U,
xmax:U,ymax:U}):"triangle"===N||"esriSMSTriangle"===N?(U=.5773502691896257*P,N=-U,Y=2/3*P,P=Y-P,ba={rings:[[[N,P],[0,Y],[U,P],[N,P]]]},Y={xmin:N,ymin:P,xmax:U,ymax:Y}):"arrow"===N&&(ba={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},Y={xmin:-U,ymin:-U,xmax:U,ymax:U});return[Y,ba]};e.CIMSymbolHelper=Q;e.CIMSymbolInflatedSizeHelper=O;e.capTypeToEnum=T;e.getEffectsInflateSize=B;e.slsDashToTemplateArray=S;e.symbolToCIM=function(N){let P;switch(N.type){case "cim":return N.data;case "web-style":return N;
case "simple-marker":N=Q.fromSimpleMarker(N);if(!N)throw Error("InternalError: Cannot convert symbol to CIM");P=N;break;case "picture-marker":P=Q.fromPictureMarker(N);break;case "simple-line":P=Q.fromSimpleLineSymbol(N);break;case "simple-fill":P=Q.fromSimpleFillSymbol(N);break;case "picture-fill":P=Q.fromPictureFillSymbol(N);break;case "text":P=Q.fromTextSymbol(N)}return{type:"CIMSymbolReference",symbol:P}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/BidiText":function(){define(["exports",
"./BidiEngine"],function(e,g){const q=new g;e.bidiText=function(h){if(null==h)return["",!1];if(!q.hasBidiChar(h))return[h,!1];let m;m="rtl"===q.checkContextual(h)?"IDNNN":"ICNNN";return[q.bidiTransform(h,m,"VLYSN"),!0]};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/BidiEngine":function(){define(["./bidiEngineTables"],function(e){function g(z,B,D,F,E){var C=z;void 0===B&&(B=E.defInFormat);void 0===D&&(D=E.defOutFormat);void 0===F&&(F=E.defSwap);if(B!==D){var G=B.substring(0,
1),H=D.substring(0,1);var K=B.substring(1,4);var J=D.substring(1,4);"C"===K.charAt(0)&&(K=q(C),K="ltr"===K||"rtl"===K?K.toUpperCase():"L"===B.charAt(2)?"LTR":"RTL",B=G+K);"C"===J.charAt(0)&&(K=q(C),"rtl"===K?J="RTL":"ltr"===K?(C=C.split(""),C.reverse(),K=q(C.join("")),J=K.toUpperCase()):J="L"===D.charAt(2)?"LTR":"RTL",D=H+J)}if(B===D)return z;H=B.substring(0,1);C=B.substring(1,4);G=D.substring(0,1);J=D.substring(1,4);E.inFormat=B;E.outFormat=D;E.swap=F;if("L"===H&&"VLTR"===D){if("LTR"===C)return E.dir=
0,h(z,E);if("RTL"===C)return E.dir=1,h(z,E)}if("V"===H&&"V"===G)return E.dir="RTL"===C?1:0,l(z,E);if("L"===H&&"VRTL"===D)return E.dir="LTR"===C?0:1,z=h(z,E),l(z);if("VLTR"===B&&"LLTR"===D)return E.dir=0,h(z,E);if("V"===H&&"L"===G&&C!==J)return z=l(z),"RTL"===C?g(z,"LLTR","VLTR",F,E):g(z,"LRTL","VRTL",F,E);if("VRTL"===B&&"LRTL"===D)return g(z,"LRTL","VRTL",F,E);"L"===H&&"L"===G&&(B=E.swap,E.swap=B.substr(0,1)+"N","RTL"===C?(E.dir=1,z=h(z,E),E.swap="N"+B.substr(1,2),E.dir=0,z=h(z,E)):(E.dir=0,z=h(z,
E),E.swap="N"+B.substr(1,2),z=g(z,"VLTR","LRTL",E.swap,E)));return z}function q(z){return(z=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(z))?"z">=z[0]?"ltr":"rtl":""}function h(z,B){z=z.split("");const D=[];m(z,D,B);if(0!==B.hiLevel&&B.swap.substr(0,1)!==B.swap.substr(1,2))for(let C=0;C<z.length;C++)if(1===D[C]){var F=C;b:{let G=void 0;var E=z[C];let H=0,K=e.swapTable.length-1;for(;H<=K;)if(G=Math.floor((H+K)/2),E<e.swapTable[G][0])K=G-1;else if(E>e.swapTable[G][0])H=
G+1;else{E=e.swapTable[G][1];break b}}z[F]=E}a(2,z,D,B);a(1,z,D,B);y=D;return z.join("")}function m(z,B,D){const F=z.length;var E=D.dir?e.impTabRtl:e.impTabLtr,C=0,G=-1;const H=[],K=[];D.hiLevel=D.dir;D.lastArabic=!1;D.hasUbatAl=!1;D.hasUbatB=!1;D.hasUbatS=!1;for(var J=0;J<F;J++){var O=J,Q=z[J].charCodeAt(0);const T=e.primaryTable[Q>>8];H[O]=T<e.tbbase?T:e.unicodeTable[T-e.tbbase][Q&255]}for(O=0;O<F;O++){J=f(z,H,K,O,D);K[O]=J;C=E[C][J];Q=C&240;C&=15;J=E[C][5];B[O]=J;if(0<Q){if(16===Q)for(;G<O;G++)B[G]=
1;G=-1}if(E[C][6])-1===G&&(G=O);else if(-1<G){for(;G<O;G++)B[G]=J;G=-1}H[O]===e.ubatB&&(B[O]=0);D.hiLevel|=J}if(D.hasUbatS)for(z=0;z<F;z++)if(H[z]===e.ubatS)for(B[z]=D.dir,E=z-1;0<=E;E--)if(H[E]===e.ubatWs)B[E]=D.dir;else break}function l(z,B){z=z.split("");if(B){const D=[];m(z,D,B);y=D}z.reverse();w.reverse();return z.join("")}function d(z){for(let B=0;B<e.arabicAlefBetIntervalsBegine.length;B++)if(z>=e.arabicAlefBetIntervalsBegine[B]&&z<=e.arabicAlefBetIntervalsEnd[B])return!0;return!1}function b(z,
B,D,F){for(;B*D<F&&c(z[B]);)B+=D;return B*D<F&&d(z[B])?!0:!1}function a(z,B,D,F){if(!(F.hiLevel<z))if(1!==z||1!==F.dir||F.hasUbatB){F=B.length;for(var E=0,C,G,H;E<F;){if(D[E]>=z){for(C=E+1;C<F&&D[C]>=z;)C++;for(G=C-1;E<G;E++,G--)H=B[E],B[E]=B[G],B[G]=H,H=w[E],w[E]=w[G],w[G]=H;E=C}E++}}else B.reverse(),w.reverse()}function f(z,B,D,F,E){return{UBAT_L:()=>{E.lastArabic=!1;return e.ubatL},UBAT_R:()=>{E.lastArabic=!1;return e.ubatR},UBAT_ON:()=>e.ubatOn,UBAT_AN:()=>e.ubatAn,UBAT_EN:()=>E.lastArabic?e.ubatAn:
e.ubatEn,UBAT_AL:()=>{E.lastArabic=!0;E.hasUbatAl=!0;return e.ubatR},UBAT_WS:()=>e.ubatOn,UBAT_CS:()=>{let C,G;if(1>F||F+1>=B.length||(C=D[F-1])!==e.ubatEn&&C!==e.ubatAn||(G=B[F+1])!==e.ubatEn&&G!==e.ubatAn)return e.ubatOn;E.lastArabic&&(G=e.ubatAn);return G===C?G:e.ubatOn},UBAT_ES:()=>(0<F?D[F-1]:e.ubatB)===e.ubatEn&&F+1<B.length&&B[F+1]===e.ubatEn?e.ubatEn:e.ubatOn,UBAT_ET:()=>{if(0<F&&D[F-1]===e.ubatEn)return e.ubatEn;if(E.lastArabic)return e.ubatOn;let C=F+1;const G=B.length;for(;C<G&&B[C]===
e.ubatEt;)C++;return C<G&&B[C]===e.ubatEn?e.ubatEn:e.ubatOn},UBAT_NSM:()=>{if("VLTR"===E.inFormat){for(var C=B.length,G=F+1;G<C&&B[G]===e.ubatNsm;)G++;if(G<C&&(C=z[F].charCodeAt(0),G=B[G],(1425<=C&&2303>=C||64286===C)&&(G===e.ubatR||G===e.ubatAl)))return e.ubatR}return 1>F||B[F-1]===e.ubatB?e.ubatOn:D[F-1]},UBAT_B:()=>{E.lastArabic=!0;E.hasUbatB=!0;return E.dir},UBAT_S:()=>{E.hasUbatS=!0;return e.ubatOn},UBAT_LRE:()=>{E.lastArabic=!1;return e.ubatOn},UBAT_RLE:()=>{E.lastArabic=!1;return e.ubatOn},
UBAT_LRO:()=>{E.lastArabic=!1;return e.ubatOn},UBAT_RLO:()=>{E.lastArabic=!1;return e.ubatOn},UBAT_PDF:()=>{E.lastArabic=!1;return e.ubatOn},UBAT_BN:()=>e.ubatOn}[e.typesNames[B[F]]]()}function n(z,B){for(let D=0;D<e.baseForm.length;D++)if(z===e.baseForm[D])return B[D];return z}function c(z){return"\u064b"<=z&&"\u0655">=z}function r(z){return"L"===z?"LTR":"R"===z?"RTL":"C"===z?"CLR":"D"===z?"CRL":""}function k(z,B){for(let D=0;D<e.aLefTable.length;D++)if(z===e.aLefTable[D])return B[D];return z}function p(z,
B,D,F){for(let E=0;E<z.length;E++)if(z[E]>B||!D&&z[E]===B)z[E]+=F}class t{constructor(){this.inputFormat="ILYNN";this.outputFormat="VLNNN";this.sourceToTarget=[];this.targetToSource=[];this.levels=[]}bidiTransform(z,B,D){this.sourceToTarget=[];this.targetToSource=[];if(!z)return"";var F=this.sourceToTarget,E=this.targetToSource,C=z.length;w=[];y=[];for(var G=0;G<C;G++)F[G]=G,E[G]=G,w[G]=G;if(!this.checkParameters(B,D))return z;B=this.inputFormat;D=this.outputFormat;F=z;F=x;G=r(B.charAt(1));E=r(D.charAt(1));
var H="I"===B.charAt(0)?"L":B.charAt(0);C="I"===D.charAt(0)?"L":D.charAt(0);G=H+G;E=C+E;C=B.charAt(2)+D.charAt(2);F.defInFormat=G;F.defOutFormat=E;F.defSwap=C;z=g(z,G,E,C,F);F=!1;if("R"===D.charAt(1))F=!0;else if("C"===D.charAt(1)||"D"===D.charAt(1))F="rtl"===this.checkContextual(z);E=this.sourceToTarget=w;C=Array(E.length);for(G=0;G<E.length;G++)C[E[G]]=G;u=this.targetToSource=C;if(B.charAt(3)===D.charAt(3))F=z;else if("S"===D.charAt(3))if(B=F,D=z,0===D.length)F="";else{void 0===B&&(B=!0);D=String(D);
D=D.split("");E=0;z=1;F=D.length;B||(E=D.length-1,z=-1,F=1);G=E;H=0;E=[];for(C=0;G*z<F;G+=z)if(d(D[G])||c(D[G])){var K;if(K="\u0644"===D[G])b:{for(var J=D,O=G+z,Q=z,T=F;O*Q<T&&c(J[O]);)O+=Q;K=" ";if(O*Q<T)for(K=J[O],J=0;J<e.aLefTable.length;J++)if(e.aLefTable[J]===K){K=!0;break b}K=!1}if(K){D[G]=0===H?k(D[G+z],e.lamAlefInialTableFE):k(D[G+z],e.lamAlefMedialTableFE);G+=z;H=D;K=G;J=z;for(O=F;K*J<O&&c(H[K]);)K+=J;K*J<O&&(H[K]=" ");E[C]=G;C++;H=0}else{K=D[G];if(1===H){J=G;if(b(D,G+z,z,F))b:for(O=D[G],
Q=0;Q<e.baseForm.length;Q++){if(O===e.baseForm[Q]){O=e.medialForm[Q];break b}}else O=n(D[G],e.finalForm);D[J]=O}else!0===b(D,G+z,z,F)?D[G]=n(D[G],e.initialForm):D[G]=n(D[G],e.isolatedForm);c(K)||(H=1);b:{for(J=0;J<e.standAlonForm.length;J++)if(e.standAlonForm[J]===K){K=!0;break b}K=!1}!0===K&&(H=0)}}else H=0;z=E;F="";for(E=0;E<D.length;E++){b:{for(C=0;C<z.length;C++)if(z[C]===E)break b;C=-1}-1<C?(p(u,E,!B,-1),w.splice(E,1)):F+=D[E]}}else if(B=z,D=F,0===B.length)F="";else{void 0===D&&(D=!0);B=String(B);
z="";F=B.split("");for(E=0;E<B.length;E++)C=!1,"\ufe70"<=F[E]&&"\ufeff">F[E]?(G=B.charCodeAt(E),"\ufef5"<=F[E]&&"\ufefc">=F[E]?(D?(0<E&&" "===F[E-1]?z=z.substring(0,z.length-1)+"\u0644":(z+="\u0644",C=!0),z+=e.aLefTable[(G-65269)/2]):(z+=e.aLefTable[(G-65269)/2],z+="\u0644",E+1<B.length&&" "===F[E+1]?E++:C=!0),C&&(p(u,E,!0,1),w.splice(E,0,w[E]))):z+=e.feTo06Table[G-65136]):z+=F[E];F=z}this.sourceToTarget=w;this.targetToSource=u;this.levels=y;return F}_inputFormatSetter(z){if(!v.test(z))throw Error("dojox/string/BidiEngine: the bidi layout string is wrong!");
this.inputFormat=z}_outputFormatSetter(z){if(!v.test(z))throw Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=z}checkParameters(z,B){z?this._inputFormatSetter(z):z=this.inputFormat;B?this._outputFormatSetter(B):B=this.outputFormat;return z===B?!1:!0}checkContextual(z){z=q(z);if("ltr"!==z&&"rtl"!==z){try{z=document.dir.toLowerCase()}catch(B){}"ltr"!==z&&"rtl"!==z&&(z="ltr")}return z}hasBidiChar(z){return A.test(z)}}let w=[],u=[],y=[];const x={dir:0,defInFormat:"LLTR",
defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},v=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,A=/[\u0591-\u06ff\ufb1d-\ufefc]/;return t})},"esri/core/bidiEngineTables":function(){define(["exports"],function(e){e.aLefTable=["\u0622","\u0623","\u0625","\u0627"];e.arabicAlefBetIntervalsBegine=["\u0621","\u0641"];e.arabicAlefBetIntervalsEnd=["\u063a","\u064a"];e.baseForm="\u0627\u0628\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u064a\u0625\u0623\u0622\u0629\u0649\u0644\u0645\u0646\u0647\u0648\u064a\u0625\u0623\u0622\u0629\u0649\u06cc\u0626\u0624".split("");
e.feTo06Table="\u064b\u064b\u064c\u061f\u064d\u061f\u064e\u064e\u064f\u064f\u0650\u0650\u0651\u0651\u0652\u0652\u0621\u0622\u0622\u0623\u0623\u0624\u0624\u0625\u0625\u0626\u0626\u0626\u0626\u0627\u0627\u0628\u0628\u0628\u0628\u0629\u0629\u062a\u062a\u062a\u062a\u062b\u062b\u062b\u062b\u062c\u062c\u062c\u062c\u062d\u062d\u062d\u062d\u062e\u062e\u062e\u062e\u062f\u062f\u0630\u0630\u0631\u0631\u0632\u0632\u0633\u0633\u0633\u0633\u0634\u0634\u0634\u0634\u0635\u0635\u0635\u0635\u0636\u0636\u0636\u0636\u0637\u0637\u0637\u0637\u0638\u0638\u0638\u0638\u0639\u0639\u0639\u0639\u063a\u063a\u063a\u063a\u0641\u0641\u0641\u0641\u0642\u0642\u0642\u0642\u0643\u0643\u0643\u0643\u0644\u0644\u0644\u0644\u0645\u0645\u0645\u0645\u0646\u0646\u0646\u0646\u0647\u0647\u0647\u0647\u0648\u0648\u0649\u0649\u064a\u064a\u064a\u064a\ufef5\ufef6\ufef7\ufef8\ufef9\ufefa\ufefb\ufefc\u061f\u061f\u061f".split("");
e.finalForm="\ufe8e\ufe90\ufe96\ufe9a\ufe9e\ufea2\ufea6\ufeaa\ufeac\ufeae\ufeb0\ufeb2\ufeb6\ufeba\ufebe\ufec2\ufec6\ufeca\ufece\ufed2\ufed6\ufeda\ufede\ufee2\ufee6\ufeea\ufeee\ufef2\ufe88\ufe84\ufe82\ufe94\ufef0\ufbfd\ufe8a\ufe86\ufe70\ufe72\ufe74\ufe76\ufe78\ufe7a\ufe7c\ufe7e\ufe80\ufe8a\ufe86".split("");e.impTabLtr=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]];e.impTabRtl=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]];e.initialForm=
"\ufe8d\ufe91\ufe97\ufe9b\ufe9f\ufea3\ufea7\ufea9\ufeab\ufead\ufeaf\ufeb3\ufeb7\ufebb\ufebf\ufec3\ufec7\ufecb\ufecf\ufed3\ufed7\ufedb\ufedf\ufee3\ufee7\ufeeb\ufeed\ufef3\ufe87\ufe83\ufe81\ufe93\ufeef\ufbfe\ufe8b\ufe85\ufe70\ufe72\ufe74\ufe76\ufe78\ufe7a\ufe7c\ufe7e\ufe80\ufe8b\ufe85".split("");e.isolatedForm="\ufe8d\ufe8f\ufe95\ufe99\ufe9d\ufea1\ufea5\ufea9\ufeab\ufead\ufeaf\ufeb1\ufeb5\ufeb9\ufebd\ufec1\ufec5\ufec9\ufecd\ufed1\ufed5\ufed9\ufedd\ufee1\ufee5\ufee9\ufeed\ufef1\ufe87\ufe83\ufe81\ufe93\ufeef\ufbfc\ufe89\ufe85\ufe70\ufe72\ufe74\ufe76\ufe78\ufe7a\ufe7c\ufe7e\ufe80\ufe89\ufe85".split("");
e.lamAlefInialTableFE=["\ufef5","\ufef7","\ufef9","\ufefb"];e.lamAlefMedialTableFE=["\ufef6","\ufef8","\ufefa","\ufefc"];e.medialForm="\ufe8e\ufe92\ufe98\ufe9c\ufea0\ufea4\ufea8\ufeaa\ufeac\ufeae\ufeb0\ufeb4\ufeb8\ufebc\ufec0\ufec4\ufec8\ufecc\ufed0\ufed4\ufed8\ufedc\ufee0\ufee4\ufee8\ufeec\ufeee\ufef4\ufe88\ufe84\ufe82\ufe94\ufef0\ufbff\ufe8c\ufe86\ufe71\ufe72\ufe74\ufe77\ufe79\ufe7b\ufe7d\ufe7f\ufe80\ufe8c\ufe86".split("");e.primaryTable=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107];e.standAlonForm="\u0621\u0622\u0623\u0624\u0625\u0627\u0629\u062f\u0630\u0631\u0632\u0648\u0649".split("");
e.swapTable=[["(",")"],[")","("],["\x3c","\x3e"],["\x3e","\x3c"],["[","]"],["]","["],["{","}"],["}","{"],["\u00ab","\u00bb"],["\u00bb","\u00ab"],["\u2039","\u203a"],["\u203a","\u2039"],["\u207d","\u207e"],["\u207e","\u207d"],["\u208d","\u208e"],["\u208e","\u208d"],["\u2264","\u2265"],["\u2265","\u2264"],["\u2329","\u232a"],["\u232a","\u2329"],["\ufe59","\ufe5a"],["\ufe5a","\ufe59"],["\ufe5b","\ufe5c"],["\ufe5c","\ufe5b"],["\ufe5d","\ufe5e"],["\ufe5e","\ufe5d"],["\ufe64","\ufe65"],["\ufe65","\ufe64"]];
e.tbbase=100;e.typesNames="UBAT_L UBAT_R UBAT_EN UBAT_AN UBAT_ON UBAT_B UBAT_S UBAT_AL UBAT_WS UBAT_CS UBAT_ES UBAT_ET UBAT_NSM UBAT_LRE UBAT_RLE UBAT_PDF UBAT_LRO UBAT_RLO UBAT_BN".split(" ");e.ubatAl=7;e.ubatAn=3;e.ubatB=5;e.ubatBn=18;e.ubatCs=9;e.ubatEn=2;e.ubatEs=10;e.ubatEt=11;e.ubatL=0;e.ubatLre=13;e.ubatLro=16;e.ubatNsm=12;e.ubatOn=4;e.ubatPdf=15;e.ubatR=1;e.ubatRle=14;e.ubatRlo=17;e.ubatS=6;e.ubatWs=8;e.unicodeTable=[[18,18,18,18,18,18,18,18,18,6,5,6,8,5,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,5,5,5,6,8,4,4,11,11,11,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,18,18,18,18,18,18,5,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,9,4,11,11,11,11,4,4,4,4,0,4,4,18,4,4,11,11,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,
0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,1,12,12,1,12,12,1,12,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,11,11,7,9,7,4,4,12,12,12,12,12,12,12,12,12,12,12,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,3,3,3,3,3,3,3,3,3,3,11,3,3,7,7,7,12,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12,12,12,3,4,12,12,12,12,12,12,7,7,12,12,4,12,12,12,12,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,12,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,12,12,
12,12,12,12,12,12,12,12,12,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,12,12,12,12,12,12,12,12,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,18,18,18,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,11,11,11,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,18,18,18,18,18,4,4,4,4,4,18,18,18,18,18,18,2,0,4,4,2,2,2,2,2,2,10,10,4,4,4,0,2,2,2,2,2,2,2,2,2,2,10,
10,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,12,1,1,1,1,1,1,1,1,1,1,10,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,
4,9,4,4,4,4,4,4,4,4,4,11,4,4,10,10,4,4,4,4,4,11,11,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,18],[4,4,4,11,11,11,4,4,4,4,4,10,9,10,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,11,11,4,4,4,11,11,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CIMPlacements":function(){define(["exports"],
function(e){class g{constructor(){this.setIdentity()}getAngle(){if(null==this.rz||0===this.rz&&1!==this.rzCos&&0!==this.rzSin)this.rz=Math.atan2(this.rzSin,this.rzCos);return this.rz}setIdentity(){this.tz=this.ty=this.tx=0;this.s=1;this.rz=this.ry=this.rx=0;this.rzCos=1;this.rzSin=0}setTranslate(h,m){this.tx=h;this.ty=m}setTranslateZ(h){this.tz=h}setRotateCS(h,m){this.rz=void 0;this.rzCos=h;this.rzSin=m}setRotate(h){this.rz=h;this.rzSin=this.rzCos=void 0}setRotateY(h){this.ry=h}setScale(h){this.s=
h}setMeasure(h){this.m=h}}class q{next(){return null}}e.EmptyPlacementCursor=q;e.Placement=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CIMSymbolDrawHelper":function(){define("exports ../../core/fontUtils ../../core/has ../../core/lang ../../core/Logger ../../core/ObjectPool ../../core/screenUtils ../../geometry/GeometryCursor ../../geometry/support/aaBoundingRect ../../geometry/support/boundsUtils ../../geometry/support/centroid ../../geometry/support/jsonUtils ./CIMEffects ./CIMImageColorSubstitutionHelper ./CIMOperators ./CIMPlacements ./defaultCIMValues ./enums ./imageUtils ./Rect ./TextRasterizer ./utils ../../views/2d/engine/webgl/definitions ../../views/2d/engine/webgl/mesh/templates/shapingUtils ../../views/2d/layers/graphics/graphicsUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A,z,B,D){function F(I,L,R){for(const S of L){L=S.length;for(let X=1;X<L;X++){var V=S[X-1];const N=S[X];let P=(N[0]-V[0])*(N[0]-V[0])+(N[1]-V[1])*(N[1]-V[1]);if(0!==P&&(P=Math.sqrt(P),Math.abs(((N[0]-V[0])*(I[1]-V[1])-(N[1]-V[1])*(I[0]-V[0]))/P)<R&&(V=((N[0]-V[0])*(I[0]-V[0])+(N[1]-V[1])*(I[1]-V[1]))/P,V>-R&&V<P+R)))return!0}}return!1}function E(I,L=1){const R=A.fromCIMFontDecoration(I);var V=A.fromCIMFontStyle(I.fontStyleName);const S=I.fontFamilyName??
g.defaultFontFamily,{weight:X,style:N}=V;V=L*(I.height||5);const P=A.fromCIMHorizontalAlignment(I.horizontalAlignment),U=A.fromCIMVerticalAlignment(I.verticalAlignment),Y=A.getFillColor(I),ba=A.getFillColor(I.haloSymbol);L=null!=ba?L*(I.haloSize??0):0;var Z="CIMBackgroundCallout"===I.callout?.type?I.callout.backgroundSymbol:null;I=A.getFillColor(Z);const aa=A.getStrokeWidth(Z);Z=A.getStrokeColor(Z);return{color:Y,size:V,horizontalAlignment:P,verticalAlignment:U,font:{family:S,style:A.getFontStyle(N),
weight:A.getFontWeight(X),decoration:R},halo:{size:L||0,color:ba,style:N},backgroundColor:I,borderLine:null!=aa&&null!=Z?{size:aa,color:Z}:null,pixelRatio:1,premultiplyColors:!0}}const C=Math.PI/180;class G{constructor(I){this._t=I}static createIdentity(){return new G([1,0,0,0,1,0])}clone(){return new G(this._t.slice())}transform(I){const L=this._t;return[L[0]*I[0]+L[1]*I[1]+L[2],L[3]*I[0]+L[4]*I[1]+L[5]]}static createScale(I,L){return new G([I,0,0,0,L,0])}scale(I,L){const R=this._t;R[0]*=I;R[1]*=
I;R[2]*=I;R[3]*=L;R[4]*=L;R[5]*=L;return this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(I,L){return new G([0,0,I,0,0,L])}translate(I,L){const R=this._t;R[2]+=I;R[5]+=L;return this}static createRotate(I){const L=Math.cos(I);I=Math.sin(I);return new G([L,-I,0,I,L,0])}rotate(I){return G.multiply(this,G.createRotate(I),this)}angle(){const I=this._t[0],L=this._t[3],R=Math.sqrt(I*I+L*L);return[I/R,L/R]}static multiply(I,L,R){I=I._t;L=L._t;const V=
I[1]*L[0]+I[4]*L[1],S=I[2]*L[0]+I[5]*L[1]+L[2],X=I[0]*L[3]+I[3]*L[4],N=I[1]*L[3]+I[4]*L[4],P=I[2]*L[3]+I[5]*L[4]+L[5],U=R._t;U[0]=I[0]*L[0]+I[3]*L[1];U[1]=V;U[2]=S;U[3]=X;U[4]=N;U[5]=P;return R}invert(){const I=this._t;let L=I[0]*I[4]-I[1]*I[3];if(0===L)return new G([0,0,0,0,0,0]);L=1/L;return new G([I[4]*L,-I[1]*L,(I[1]*I[5]-I[2]*I[4])*L,-I[3]*L,I[0]*L,(I[2]*I[3]-I[0]*I[5])*L])}}class H{constructor(I,L){this._resourceManager=I;this._transfos=[];this._sizeTransfos=[];this._geomUnitsPerPoint=1;this._placementPool=
new l(t.Placement,void 0,void 0,100);this._earlyReturn=!1;this._mapRotation=0;this._transfos.push(L||G.createIdentity());this._sizeTransfos.push(L?L.scaleRatio():1)}setTransform(I,L){this._transfos=[I||G.createIdentity()];this._sizeTransfos=[L||(I?I.scaleRatio():1)]}setGeomUnitsPerPoint(I){this._geomUnitsPerPoint=I}transformPt(I){return this._transfos[this._transfos.length-1].transform(I)}transformSize(I){return I*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(I){return this._transfos[this._transfos.length-
1].invert().transform(I)}reverseTransformSize(I){return I/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(I){return I/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return 2<this._transfos.length?1:this._geomUnitsPerPoint}isEmbedded(){return 1<this._transfos.length}back(){return this._transfos[this._transfos.length-
1]}push(I,L){L=L?I.scaleRatio():1;G.multiply(I,this.back(),I);this._transfos.push(I);this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*L)}pop(){this._transfos.splice(-1,1);this._sizeTransfos.splice(-1,1)}drawSymbol(I,L,R){if(I)switch(I.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":this.drawMultiLayerSymbol(I,L);break;case "CIMTextSymbol":this.drawTextSymbol(I,L,R)}}drawMultiLayerSymbol(I,L){if(I&&L){var R=I.symbolLayers;if(R)if((I=I.effects)&&0<I.length){if(L=
this.executeEffects(I,L))for(I=L.next();I;)this.drawSymbolLayers(R,I.asJSON()),I=L.next()}else this.drawSymbolLayers(R,L)}}executeEffects(I,L){const R=this._resourceManager.geometryEngine;L=new r.SimpleEffectCursor(b.GeometryCursor.fromJSONCIM(L));for(const V of I)(I=p.getEffectOperator(V))&&(L=I.execute(L,V,this.geomUnitsPerPoint(),null,R));return L}drawSymbolLayers(I,L){let R=I.length;for(;R--;){const S=I[R];if(S&&!1!==S.enable){var V=S.effects;if(V&&0<V.length){if(V=this.executeEffects(V,L)){let X=
null;for(;(X=V.next())&&(this.drawSymbolLayer(S,X.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(S,L);if(this._earlyReturn)break}}}drawSymbolLayer(I,L){switch(I.type){case "CIMSolidFill":this.drawSolidFill(L,I.color);break;case "CIMHatchFill":this.drawHatchFill(L,I);break;case "CIMPictureFill":this.drawPictureFill(L,I);break;case "CIMGradientFill":this.drawGradientFill(L,I);break;case "CIMSolidStroke":this.drawSolidStroke(L,I.color,I.width,I.capStyle,I.joinStyle,I.miterLimit);break;case "CIMPictureStroke":this.drawPictureStroke(L,
I);break;case "CIMGradientStroke":this.drawGradientStroke(L,I);break;case "CIMCharacterMarker":case "CIMPictureMarker":case "CIMVectorMarker":this.drawMarkerLayer(I,L)}}drawHatchFill(I,L){var R=this.geomUnitsPerPoint(),V=A.getNumericValue(L.separation,w.defaultCIMValues.CIMHatchFill.separation)*R;var S=A.getNumericValue(L.rotation);if(0===V)S=null;else{0>V&&(V=-V);for(var X=0,N=.5*V;X>N;)X-=V;for(;X<-N;)X+=V;var P=a.create();f.getBoundsXY(P,I);P[0]-=N;P[1]-=N;P[2]+=N;P[3]+=N;for(var U=[[P[0],P[1]],
[P[0],P[3]],[P[2],P[3]],[P[2],P[1]]];180<S;)S-=180;for(;0>S;)S+=180;P=Math.cos(S*C);var Y=Math.sin(S*C);S=-V*Y;N=V*P;X=A.getNumericValue(L.offsetX)*R;R*=A.getNumericValue(L.offsetY);X=X*Y-R*P;var ba;var Z=R=Number.MAX_VALUE;var aa=ba=-Number.MAX_VALUE;for(var ca of U){var ea=ca[0];const ia=ca[1];U=P*ea+Y*ia;ea=-Y*ea+P*ia;Z=Math.min(Z,U);R=Math.min(R,ea);aa=Math.max(aa,U);ba=Math.max(ba,ea)}R=Math.floor(R/V)*V;ca=P*Z-Y*R-S*X/V;Z=Y*Z+P*R-N*X/V;U=P*aa-Y*R-S*X/V;P=Y*aa+P*R-N*X/V;V=1+Math.round((ba-R)/
V);X=[];for(Y=0;Y<V;Y++)ca+=S,Z+=N,U+=S,P+=N,X.push([[ca,Z],[U,P]]);S={paths:X}}S&&(this.pushClipPath(I),this.drawMultiLayerSymbol(L.lineSymbol,S),this.popClipPath())}drawPictureFill(I,L){}drawGradientFill(I,L){}drawPictureStroke(I,L){}drawGradientStroke(I,L){}drawMarkerLayer(I,L){var R=I.markerPlacement;if(R){var V=p.getPlacementOperator(R);if(V){var S="CIMMarkerPlacementInsidePolygon"===R.type||"CIMMarkerPlacementPolygonCenter"===R.type&&R.clipAtBoundary;S&&this.pushClipPath(L);if(L=V.execute(b.GeometryCursor.fromJSONCIM(L),
R,this.geomUnitsPerPoint(),null,this._resourceManager.geometryEngine))for(R=null;(R=L.next())&&(this.drawMarker(I,R),!this._earlyReturn););S&&this.popClipPath()}}else{S=this._placementPool.acquire();if(c.isPoint(L))S.tx=L.x,S.ty=L.y,this.drawMarker(I,S);else if(c.isPolygon(L)){if(L=n.polygonCentroid(L))[S.tx,S.ty]=L,this.drawMarker(I,S)}else for(V of L.points)if(S.tx=V[0],S.ty=V[1],this.drawMarker(I,S),this._earlyReturn)break;this._placementPool.release(S)}}drawMarker(I,L){switch(I.type){case "CIMCharacterMarker":case "CIMPictureMarker":this.drawPictureMarker(I,
L);break;case "CIMVectorMarker":this.drawVectorMarker(I,L)}}drawPictureMarker(I,L){if(I){var R=this._resourceManager.getResource(I.url),V=A.getNumericValue(I.size,w.defaultCIMValues.CIMPictureMarker.size);if(!(null==R||0>=V)){var S=R.width;R=R.height;if(S&&R){R=S/R;var X=A.getNumericValue(I.scaleX,1);S=G.createIdentity();var N=I.anchorPoint;if(N){var P=N.x;N=N.y;"Absolute"!==I.anchorPointUnits&&(P*=V*R*X,N*=V);S.translate(-P,-N)}R=A.getNumericValue(I.rotation);I.rotateClockwise&&(R=-R);this._mapRotation&&
(R+=this._mapRotation);R&&S.rotate(R*C);R=A.getNumericValue(I.offsetX);X=A.getNumericValue(I.offsetY);if(R||X){if(this._mapRotation){N=C*this._mapRotation;P=Math.cos(N);N=Math.sin(N);const U=R*N+X*P;R=R*P-X*N;X=U}S.translate(R,X)}R=this.geomUnitsPerPoint();1!==R&&S.scale(R,R);(R=L.getAngle())&&S.rotate(R);S.translate(L.tx,L.ty);this.push(S,!1);this.drawImage(I,V);this.pop()}}}}drawVectorMarker(I,L){if(I){var R=I.markerGraphics;if(R){var V=A.getNumericValue(I.size,w.defaultCIMValues.CIMVectorMarker.size),
S=I.frame,X=S?S.ymax-S.ymin:0;X=V&&X?V/X:1;V=G.createIdentity();S&&V.translate(.5*-(S.xmax+S.xmin),.5*-(S.ymax+S.ymin));var N=I.anchorPoint;if(N){var P=N.x;N=N.y;"Absolute"!==I.anchorPointUnits?S&&(P*=S.xmax-S.xmin,N*=S.ymax-S.ymin):(P/=X,N/=X);V.translate(-P,-N)}1!==X&&V.scale(X,X);S=A.getNumericValue(I.rotation);I.rotateClockwise&&(S=-S);this._mapRotation&&(S+=this._mapRotation);S&&V.rotate(S*C);S=A.getNumericValue(I.offsetX);X=A.getNumericValue(I.offsetY);if(S||X){if(this._mapRotation){N=C*this._mapRotation;
P=Math.cos(N);N=Math.sin(N);const U=S*N+X*P;S=S*P-X*N;X=U}V.translate(S,X)}S=this.geomUnitsPerPoint();1!==S&&V.scale(S,S);(S=L.getAngle())&&V.rotate(S);V.translate(L.tx,L.ty);this.push(V,I.scaleSymbolsProportionally);for(const U of R)if(U?.symbol&&U.geometry||m.getLogger("esri.symbols.cim.CIMSymbolDrawHelper").error("Invalid marker graphic",U),I=U.textString,"number"===typeof I&&(I=I.toString()),this.drawSymbol(U.symbol,U.geometry,I),this._earlyReturn)break;this.pop()}}}drawTextSymbol(I,L,R){if(I&&
c.isPoint(L)&&!(0>=A.getNumericValue(I.height,w.defaultCIMValues.CIMTextSymbol.height))){var V=G.createIdentity(),S=A.getNumericValue(I.angle);(S=-S)&&V.rotate(S*C);S=A.getNumericValue(I.offsetX);var X=A.getNumericValue(I.offsetY);(S||X)&&V.translate(S,X);S=this.geomUnitsPerPoint();1!==S&&V.scale(S,S);V.translate(L.x,L.y);this.push(V,!1);this.drawText(I,R);this.pop()}}}class K extends H{constructor(I,L){super(I,L);this.reset()}reset(){this._xmin=this._ymin=Infinity;this._xmax=this._ymax=-Infinity;
this._clipCount=0}envelope(){return new x(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return a.fromValues(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(I){!I||0<this._clipCount||(c.isPolygon(I)?this._processPath(I.rings,0):c.isPolyline(I)?this._processPath(I.paths,0):c.isExtent(I)?(I=Q(I))&&this._processPath(I.rings,0):console.error("drawSolidFill Unexpected geometry type!"))}drawSolidStroke(I,L,R){!I||0<this._clipCount||null==R||0>=R||(L=Math.max(.5*this.transformSize(A.getNumericValue(R,
w.defaultCIMValues.CIMSolidStroke.width)),.25),c.isPolygon(I)?this._processPath(I.rings,L):c.isPolyline(I)?this._processPath(I.paths,L):c.isExtent(I)?(I=Q(I))&&this._processPath(I.rings,L):console.error("drawSolidStroke unexpected geometry type!"))}drawMarkerLayer(I,L){c.isPolygon(L)&&I.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===I.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===I.markerPlacement.type&&I.markerPlacement.clipAtBoundary)?this._processPath(L.rings,0):super.drawMarkerLayer(I,
L)}drawHatchFill(I,L){this.drawSolidFill(I)}drawPictureFill(I,L){this.drawSolidFill(I)}drawGradientFill(I,L){this.drawSolidFill(I)}drawPictureStroke(I,L){this.drawSolidStroke(I,null,L.width)}drawGradientStroke(I,L){this.drawSolidStroke(I,null,L.width)}pushClipPath(I){this.drawSolidFill(I);this._clipCount++}popClipPath(){this._clipCount--}drawImage(I,L){var {url:R}=I;I=A.getNumericValue(I.scaleX,1);let V=I*L;var S=L;R=this._resourceManager.getResource(R);null!=R&&(S=R.height/R.width,V=I*(L?1<S?L:L/
S:R.width),S=L?1<S?L*S:L:R.height);this._merge(this.transformPt([-V/2,-S/2]),0);this._merge(this.transformPt([-V/2,S/2]),0);this._merge(this.transformPt([V/2,-S/2]),0);this._merge(this.transformPt([V/2,S/2]),0)}drawText(I,L){if(L&&0!==L.length){this._textRasterizer||(this._textRasterizer=new v);var R=E(I),[V,S]=this._textRasterizer.computeTextSize(L,R);V=d.px2pt(V);S=d.px2pt(S);L=0;switch(I.horizontalAlignment){case "Left":L=V/2;break;case "Right":L=-V/2}R=0;switch(I.verticalAlignment){case "Bottom":R=
S/2;break;case "Top":R=-S/2;break;case "Baseline":R=S/6}this._merge(this.transformPt([-V/2+L,-S/2+R]),0);this._merge(this.transformPt([-V/2+L,S/2+R]),0);this._merge(this.transformPt([V/2+L,-S/2+R]),0);this._merge(this.transformPt([V/2+L,S/2+R]),0)}}_processPath(I,L){if(I)for(const R of I)if(I=R?R.length:0,1<I){this._merge(this.transformPt(R[0]),L);for(let V=1;V<I;V++)this._merge(this.transformPt(R[V]),L)}}_merge(I,L){I[0]-L<this._xmin&&(this._xmin=I[0]-L);I[0]+L>this._xmax&&(this._xmax=I[0]+L);I[1]-
L<this._ymin&&(this._ymin=I[1]-L);I[1]+L>this._ymax&&(this._ymax=I[1]+L)}}class J extends H{constructor(){super(...arguments);this._searchPoint=[0,0];this._searchDistPoint=0;this._textInfo=null}hitTest(I,L,R,V,S,X){X*=d.pt2px(1);this.setTransform();this.setGeomUnitsPerPoint(X);this._searchPoint=[(I[0]+I[2])/2,(I[1]+I[3])/2];this._searchDistPoint=(I[2]-I[0])/2/X;this._textInfo=V;this._mapRotation=L&&("CIMPointSymbol"===L.type&&"Map"!==L.angleAlignment||"CIMTextSymbol"===L.type)?S:0;q("esri-mobile")||
(I=d.px2pt(z.hittestToleranceSmallSymbol*window.devicePixelRatio),V=d.px2pt(z.hittestSmallSymbolThreshold),("CIMLineSymbol"!==L?.type&&"CIMPolygonSymbol"!==L?.type||!L.symbolLayers?.some(A.isCIMFill))&&"CIMMeshSymbol"!==L?.type&&(A.getSize(L)??0)<V&&(this._searchDistPoint=I));this._earlyReturn=!1;this.drawSymbol(L,R);return this._earlyReturn}drawSolidFill(I,L){this._hitTestFill(I)}drawHatchFill(I,L){this._hitTestFill(I)}drawPictureFill(I,L){this._hitTestFill(I)}drawGradientFill(I,L){this._hitTestFill(I)}drawSolidStroke(I,
L,R,V,S,X){this._hitTestStroke(I,R)}drawPictureStroke(I,L){this._hitTestStroke(I,L.width)}drawGradientStroke(I,L){this._hitTestStroke(I,L.width)}drawMarkerLayer(I,L){I.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===I.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===I.markerPlacement.type&&I.markerPlacement.clipAtBoundary)?this._hitTestFill(L):super.drawMarkerLayer(I,L)}pushClipPath(I){}popClipPath(){}drawImage(I,L){var {url:R}=I;I=A.getNumericValue(I.scaleX,1);R=this._resourceManager.getResource(R);
if(null!=R&&0!==R.height&&0!==L){L*=this.geomUnitsPerPoint();I=R.width/R.height*I*L;R=this.reverseTransformPt(this._searchPoint);var V=this._searchDistPoint;Math.abs(R[0])<I/2+V&&Math.abs(R[1])<L/2+V&&(this._earlyReturn=!0)}}drawText(I,L){if((L=this._textInfo)&&(L=L.get(I))&&L.glyphMosaicItems.glyphs.length){var R=D.roundPtToWholePixel(A.getNumericValue(I.height,w.defaultCIMValues.CIMTextSymbol.height)),{lineGapType:V,lineGap:S}=I,X=V?T(V,A.getNumericValue(S),R):0,N="CIMBackgroundCallout"===I.callout?.type;
I=B.shapeGlyphs(L.glyphMosaicItems,{scale:R/z.glyphSize,angle:0,xOffset:0,yOffset:0,horizontalAlignment:I.horizontalAlignment,verticalAlignment:I.verticalAlignment,maxLineWidth:D.getLineWidth(I.lineWidth),lineHeight:z.magicLabelLineHeight*Math.max(.25,Math.min(X||1,4)),decoration:I.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:N});R=this.reverseTransformPt(this._searchPoint);L=R[0];R=R[1];for(const P of I.glyphs)if(L>P.xTopLeft&&L<P.xBottomRight&&R>-P.yBottomRight&&R<-P.yTopLeft){this._earlyReturn=
!0;break}}}_hitTestFill(I){let L=null;if(c.isExtent(I))L=[[[I.xmin,I.ymin],[I.xmin,I.ymax],[I.xmax,I.ymax],[I.xmax,I.ymin],[I.xmin,I.ymin]]];else if(c.isPolygon(I))L=I.rings;else if(c.isPolyline(I))L=I.paths;else return;I=this.reverseTransformPt(this._searchPoint);let R=0;for(var V of L){const S=V.length;for(let X=1;X<S;X++){const N=V[X-1],P=V[X];N[1]>I[1]!==P[1]>I[1]&&(0<(P[0]-N[0])*(I[1]-N[1])-(P[1]-N[1])*(I[0]-N[0])?R++:R--)}}0!==R&&(this._earlyReturn=!0);this._earlyReturn||(V=this.reverseTransformScalar(this._searchDistPoint)*
this.prevGeomUnitsPerPoint(),F(I,L,V)&&(this._earlyReturn=!0))}_hitTestStroke(I,L){let R=null;if(c.isExtent(I))R=[[[I.xmin,I.ymin],[I.xmin,I.ymax],[I.xmax,I.ymax],[I.xmax,I.ymin],[I.xmin,I.ymin]]];else if(c.isPolygon(I))R=I.rings;else if(c.isPolyline(I))R=I.paths;else return;I=this.reverseTransformPt(this._searchPoint);L=A.getNumericValue(L,w.defaultCIMValues.CIMSolidStroke.width)*this.geomUnitsPerPoint();const V=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint();F(I,
R,L/2+V)&&(this._earlyReturn=!0)}}class O extends H{constructor(I,L,R,V){super(L,R);this._applyAdditionalRenderProps=V;this._colorSubstitutionHelper=new k;this._ctx=I}drawSolidFill(I,L){if(I){if(c.isPolygon(I))this._buildPath(I.rings,!0);else if(c.isPolyline(I))this._buildPath(I.paths,!0);else if(c.isExtent(I))this._buildPath(Q(I).rings,!0);else if(c.isMultipoint(I))console.log("CanvasDrawHelper.drawSolidFill - No implementation!");else return;I=this._ctx;I.fillStyle="string"===typeof L?L:"rgba("+
Math.round(L[0])+","+Math.round(L[1])+","+Math.round(L[2])+","+(L[3]??255)/255+")";I.fill("evenodd")}}drawSolidStroke(I,L,R,V,S,X){if(I&&L&&0!==R){if(c.isPolygon(I))this._buildPath(I.rings,!0);else if(c.isPolyline(I))this._buildPath(I.paths,!1);else if(c.isExtent(I))this._buildPath(Q(I).rings,!0);else{console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");return}I=this._ctx;I.strokeStyle="string"===typeof L?L:"rgba("+Math.round(L[0])+","+Math.round(L[1])+","+Math.round(L[2])+","+(L[3]??
255)/255+")";I.lineWidth=Math.max(this.transformSize(R),.5);this._setCapStyle(V);this._setJoinStyle(S);I.miterLimit=X;I.stroke()}}pushClipPath(I){this._ctx.save();if(c.isPolygon(I))this._buildPath(I.rings,!0);else if(c.isPolyline(I))this._buildPath(I.paths,!0);else if(c.isExtent(I))this._buildPath(Q(I).rings,!0);else return;this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(I,L){const {colorSubstitutions:R,url:V,tintColor:S}=I;I=A.getNumericValue(I.scaleX,1);var X=this._resourceManager.getResource(V);
if(null!=X){var N=X.width/X.height*L,P=L;L||(N=X.width,P=X.height);var U=A.isSVGImage(V)||"src"in X&&A.isSVGImage(X.src);L="getFrame"in X?y.getFirstFrame(X):X;R&&(L=this._colorSubstitutionHelper.applyColorSubstituition(L,R));this._applyAdditionalRenderProps&&!U&&S&&(L=this._colorSubstitutionHelper.tintImageData(L,S));X=this.transformPt([0,0]);var [Y,ba]=this.getTransformAngle();U=this.transformSize(1);var Z=this._ctx;Z.save();Z.setTransform({m11:I*U*Y,m12:I*U*ba,m21:-U*ba,m22:U*Y,m41:X[0],m42:X[1]});
Z.drawImage(L,-N/2,-P/2,N,P);Z.restore()}}drawText(I,L){if(L&&0!==L.length&&(this._textRasterizer||(this._textRasterizer=new v),I=E(I),I.size*=this.transformSize(d.px2pt(1)),L=this._textRasterizer.rasterizeText(L,I))){var {size:R,anchorX:V,anchorY:S,canvas:X}=L;L=R[0]*(V+.5);I=R[1]*(S-.5);var N=this._ctx,P=this.transformPt([0,0]),[U,Y]=this.getTransformAngle();N.save();N.setTransform({m11:1*U,m12:1*Y,m21:-1*Y,m22:1*U,m41:P[0]-1*L,m42:P[1]+1*I});N.drawImage(X,0,0);N.restore()}}drawPictureFill(I,L){if(I){var {colorSubstitutions:R,
height:V,offsetX:S,offsetY:X,rotation:N,scaleX:P,tintColor:U,url:Y}=L;L=this._resourceManager.getResource(Y);if(null!=L){if(c.isPolygon(I))this._buildPath(I.rings,!0);else if(c.isPolyline(I))this._buildPath(I.paths,!0);else if(c.isExtent(I))this._buildPath(Q(I).rings,!0);else if(c.isMultipoint(I))console.log("CanvasDrawHelper.drawPictureFill - No implementation!");else return;I=this._ctx;var ba=A.isSVGImage(Y)||"src"in L&&A.isSVGImage(L.src),Z="getFrame"in L?y.getFirstFrame(L):L;R&&(Z=this._colorSubstitutionHelper.applyColorSubstituition(Z,
R));if(this._applyAdditionalRenderProps){if(ba||U&&(Z=this._colorSubstitutionHelper.tintImageData(Z,U)),ba=I.createPattern(Z,"repeat"),Z=this.transformSize(1),N||=0,S=S?Z*S:0,X=X?Z*X:0,V&&=Z*V,Z=V?V/L.height:1,L=P&&V?P*V/L.width:1,0!==N||1!==Z||1!==L||0!==S||0!==X){const aa=new DOMMatrix;aa.rotateSelf(0,0,-N).translateSelf(S,X).scaleSelf(L,Z,1);ba.setTransform(aa)}}else ba=I.createPattern(Z,"repeat");I.save();I.fillStyle=ba;I.fill("evenodd");I.restore()}}}drawPictureStroke(I,L){if(I){var {colorSubstitutions:R,
capStyle:V,joinStyle:S,miterLimit:X,tintColor:N,url:P,width:U}=L;L=this._resourceManager.getResource(P);if(null!=L){if(c.isPolygon(I))var Y=I.rings;else if(c.isPolyline(I))Y=I.paths;else if(c.isExtent(I))Y=Q(I).rings;else{c.isMultipoint(I)&&console.log("CanvasDrawHelper.drawPictureStroke - No implementation!");return}U||(U=L.width);I=A.isSVGImage(P)||"src"in L&&A.isSVGImage(L.src);var ba="getFrame"in L?y.getFirstFrame(L):L;R&&(ba=this._colorSubstitutionHelper.applyColorSubstituition(ba,R));this._applyAdditionalRenderProps&&
(I||N&&(ba=this._colorSubstitutionHelper.tintImageData(ba,N)));L=Math.max(this.transformSize(d.pt2px(U)),.5);I=L/ba.width;var Z=this._ctx;ba=Z.createPattern(ba,"repeat-y");Z.save();this._setCapStyle(V);this._setJoinStyle(S);void 0!==X&&(Z.miterLimit=X);Z.lineWidth=L;var aa;for(let ja of Y){ja=h.clone(ja);var ca=aa=void 0,ea=void 0;let ka=ca=void 0;Y=ja;for(var ia=Y[0],ha=1;ha<Y.length;)ka=Y[ha][0]-ia[0],ca=Y[ha][1]-ia[1],ca=0!==ka?ca/ka:Math.PI/2,void 0!==ea&&1E-4>=ca-ea?(Y.splice(ha-1,1),ia=aa):
(aa=ia,ia=Y[ha],ha++),ea=ca;if(ja&&!(1>=ja.length))for(Y=this.transformPt(ja[0]),ea=1;ea<ja.length;ea++)aa=this.transformPt(ja[ea]),ia=180/Math.PI*Math.atan2(aa[1]-Y[1],aa[0]-Y[0]),ha=new DOMMatrix,ha.translateSelf(0,Y[1]-L/2).scaleSelf(I,I,1).rotateSelf(0,0,90-ia),ba.setTransform(ha),Z.strokeStyle=ba,Z.beginPath(),Z.moveTo(Y[0],Y[1]),Z.lineTo(aa[0],aa[1]),Z.stroke(),Y=aa}Z.restore()}}}_buildPath(I,L){const R=this._ctx;R.beginPath();if(I)for(const V of I)if(I=V?V.length:0,1<I){let S=this.transformPt(V[0]);
R.moveTo(S[0],S[1]);for(let X=1;X<I;X++)S=this.transformPt(V[X]),R.lineTo(S[0],S[1]);L&&R.closePath()}}_setCapStyle(I){switch(I){case u.LineCapStyle.Butt:this._ctx.lineCap="butt";break;case u.LineCapStyle.Round:this._ctx.lineCap="round";break;case u.LineCapStyle.Square:this._ctx.lineCap="square"}}_setJoinStyle(I){switch(I){case u.LineJoinStyle.Bevel:this._ctx.lineJoin="bevel";break;case u.LineJoinStyle.Round:this._ctx.lineJoin="round";break;case u.LineJoinStyle.Miter:this._ctx.lineJoin="miter"}}}
const Q=I=>I?{spatialReference:I.spatialReference,rings:[[[I.xmin,I.ymin],[I.xmin,I.ymax],[I.xmax,I.ymax],[I.xmax,I.ymin],[I.xmin,I.ymin]]]}:null,T=(I,L,R)=>{switch(I){case "ExtraLeading":return 1+L/R;case "Multiple":return L;case "Exact":return L/R}};e.CIMSymbolDrawHelper=H;e.CanvasDrawHelper=O;e.EnvDrawHelper=K;e.HittestDrawHelper=J;e.Transformation=G;e.cDegToRad=C;e.lineGapType2LineHeight=T;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/GeometryCursor":function(){define(["exports",
"../core/lang","./geometryCursorCollectUtils","./support/jsonUtils","../layers/graphics/OptimizedGeometry"],function(e,g,q,h,m){function l(c){if(h.isPolygon(c))c=[c.rings,"esriGeometryPolygon"];else if(h.isPolyline(c))c=[c.paths,"esriGeometryPolyline"];else if(h.isMultipoint(c))c=[[c.points],"esriGeometryMultipoint"];else if(h.isExtent(c))c=[[[[c.xmin,c.ymin],[c.xmin,c.ymax],[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin]]],"esriGeometryEnvelope"];else if(h.isPoint(c)){const r=[c.x,c.y];c.z&&r.push(c.z);
c.m&&r.push(c.m);c=[[[r]],"esriGeometryPoint"]}else c=[[],"esriGeometryPolyline"];return c}class d{static fromOptimized(c,r,k=!1,p=!1,t=1){return(new b).initialize(c,r,k,p,t)}static fromJSON(c,r=!1,k=!1){const [p,t]=l(c);return(new a).initialize(p,t,r,k,1)}static fromOptimizedCIM(c,r,k=!1,p=!1,t=1){return(new f).initialize(c,r,k,p,t)}static fromJSONCIM(c,r=!1,k=!1,p=1){const [t,w]=l(c);return(new n).initialize(t,w,r,k,p)}static fromFeatureSetReader(c){const r=c.readGeometryForDisplay();c=c.geometryType;
return r&&c?this.fromOptimized(r,c):null}static fromFeatureSetReaderCIM(c){const r=c.readGeometryForDisplay();c=c.geometryType;return r&&c?this.fromOptimizedCIM(r,c):null}static createEmptyOptimized(c,r=!1,k=!1,p=1){return(new b).initialize(new m,c,r,k,p)}static createEmptyJSON(c,r=!1,k=!1){return(new a).initialize([],c,r,k,1)}static createEmptyOptimizedCIM(c,r=!1,k=!1,p=1){return(new f).initialize(new m,c,r,k,p)}static createEmptyJSONCIM(c,r=!1,k=!1,p=1){return(new n).initialize([],c,r,k,p)}asJSON(){const c=
q.collectMultipath(this);return"esriGeometryEnvelope"===this.geometryType?{xmin:c[0][0][0],ymin:c[0][0][1],xmax:c[0][2][0],ymax:c[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:c.flat()}:"esriGeometryPoint"===this.geometryType?{x:c[0][0][0],y:c[0][0][1]}:"esriGeometryPolygon"===this.geometryType?{rings:c}:{paths:c}}getCurrentRingArea(){if(3>this.pathSize)return 0;let c=0,r,k;this.seekPathStart();if(!this.nextPoint())return 0;r=this.x;k=this.y;const p=r,t=k;for(;this.nextPoint();)c+=
(r-this.x)*(k+this.y),r=this.x,k=this.y;return-.5*(c+(r-p)*(k+t))}invertY(){this.yFactor*=-1}}class b extends d{constructor(){super(...arguments);this._end=-1}initialize(c,r,k,p,t){this.hasZ=k;this.hasM=p;this.geometryType=r;this._stride=2+Number(k)+Number(p);this._geometry=c;this._pathIndex=-1;this._pathOffset=0;this._pointOffset=-this._stride;this._end=-1;this.yFactor=t;return this}reset(){this.initialize(this._geometry,this.geometryType,this.hasZ,this.hasM,this.yFactor)}seekPath(c){if(0<=c&&c<
this.totalSize){if(this._pathIndex<c)for(;this._pathIndex<c&&this.nextPath(););else if(this._pathIndex>c)for(;this._pathIndex>c&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(c){c=this._pathOffset+c*this._stride;return 0<=c&&c<this._end?(this._pointOffset=c,!0):!1}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){if(this.pathIndex>=
this.totalSize-1)return!1;0<=this._pathIndex&&(this._pathOffset+=this._stride*this.pathSize);this._pathIndex++;this._pointOffset=this._pathOffset-this._stride;this._end=this._pointOffset+this._stride+this._stride*this.pathSize;return!0}prevPath(){if(0>=this.pathIndex)return!1;this._pathIndex--;this._end=this._pathOffset;this._pathOffset-=this._stride*this.pathSize;this._pointOffset=this._pathOffset-this._stride;return!0}pathLength(){const c=this._end,r=this._stride,k=this._geometry.coords;let p=0;
for(let t=this._pathOffset+r;t<c;t+=r){const w=k[t]-k[t-r],u=k[t+1]-k[t-r+1];p+=Math.sqrt(w*w+u*u)}return p}startPath(){this._geometry.lengths.push(0)}pushPath(c){this.startPath();this.pushPoints(c)}pushPoint(c){for(let r=0;r<this._stride;++r)this._geometry.coords.push(c[r]);this._geometry.lengths[this.totalSize-1]++}pushXY(c,r){this._geometry.coords.push(c,r);this._geometry.lengths[this.totalSize-1]++}pushPoints(c){for(const r of c)for(let k=0;k<this._stride;++k)this._geometry.coords.push(r[k]);
this._geometry.lengths[this.totalSize-1]+=c.length}pushCursor(c){c=c.asOptimized();this._geometry.coords.push(...c.coords);this._geometry.lengths.push(...c.lengths)}asOptimized(){const c=this._geometry.clone();if(1!==this.yFactor)for(let r=1;r<c.coords.length;r+=this._stride)c.coords[r]*=this.yFactor;"esriGeometryPoint"===this.geometryType&&(c.lengths.length=0);return c}isClosed(){const c=this._geometry.coords,r=this._pathOffset,k=this._end-this._stride;for(let p=0;p<this._stride;p++)if(c[r+p]!==
c[k+p])return!1;return!0}clone(){return(new b).initialize(this._geometry.clone(),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((c,r)=>c+r)}get pathSize(){const {lengths:c}=this._geometry;return this._geometry.isPoint?1:0>this._pathIndex||this._pathIndex>c.length-1?0:c[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(c){this._geometry.coords[this._pointOffset]=
c}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(c){this._geometry.coords[this._pointOffset+1]=this.yFactor*c}get z(){return this._geometry.coords[this._pointOffset+2]}set z(c){this._geometry.coords[this._pointOffset+2]=c}get m(){return this._geometry.coords[this._pointOffset+(this.hasZ?3:2)]}set m(c){this._geometry.coords[this._pointOffset+3]=c}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}class a extends d{initialize(c,
r,k,p,t){this._paths=c;this.geometryType=r;this.hasZ=k;this.hasM=p;this._pathIndex=this._pointIndex=-1;this.yFactor=t;this._mIndex=this.hasZ?3:2;return this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(c){this._pathIndex=c;this._pointIndex=-1;return 0<=c&&c<this.totalSize?(this._currentPath=this._paths[c],!0):!1}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(c){return 0<=c&&c<this._currentPath.length?(this._pointIndex=c,this._currentPoint=
this._currentPath[this._pointIndex],!0):!1}nextPoint(){this._currentPoint=this._currentPath[++this._pointIndex];return this._pointIndex<this._currentPath.length}prevPoint(){this._currentPoint=this._currentPath[--this._pointIndex];return 0<=this._pointIndex}nextPath(){this._pointIndex=-1;this._currentPath=this._paths[++this._pathIndex];return this._pathIndex<this.totalSize}prevPath(){return 0<this.pathIndex?(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0):!1}pathLength(){const c=
this._currentPath.length,r=this._currentPath;let k=0;for(let t=1;t<c;t++){var p=r[t-1];const w=r[t],u=w[0]-p[0];p=w[1]-p[1];k+=Math.sqrt(u*u+p*p)}return k}startPath(){this._paths.push([])}pushPath(c){this._paths.push(c)}pushPoint(c){this._paths[this.totalSize-1].push(c)}pushXY(c,r){this._paths[this.totalSize-1].push([c,r])}pushPoints(c){this._paths[this.totalSize-1].push(...c)}pushCursor(c){c=q.collectMultipath(c);for(const r of c)this.pushPath(r)}asOptimized(){const c=new m;if("esriGeometryPoint"===
this.geometryType)c.coords.push(...this._paths[0][0]),c.lengths.length=0;else for(const r of this._paths){for(const k of r)c.coords.push(k[0]),c.coords.push(k[1]*this.yFactor),this.hasZ&&c.coords.push(k[2]),this.hasM&&c.coords.push(k[this._mIndex]);c.lengths.push(r.length)}return c}isClosed(){const c=this._currentPath[0],r=this._currentPath[this._currentPath.length-1];for(let k=0;k<c.length;k++)if(c[k]!==r[k])return!1;return!0}clone(){return(new a).initialize(g.clone(this._paths),this.geometryType,
this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(c=>c.length).reduce((c,r)=>c+r)}get pathSize(){return 0>this._pathIndex||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(c){this._currentPoint[0]=c}get y(){return this.yFactor*this._currentPoint[1]}set y(c){this._currentPoint[1]=this.yFactor*c}get z(){return this._currentPoint[2]}set z(c){this._currentPoint[2]=c}get m(){return this._currentPoint[this._mIndex]}set m(c){this._currentPoint[this._mIndex]=
c}get pathIndex(){return this._pathIndex}}class f extends b{initialize(c,r,k,p,t){super.initialize(c,r,k,p,t);this._controlPoints||(this._controlPoints=this._controlPoints=Array(this.totalSize).fill(void 0).map(w=>new Set));return this}startPath(){super.startPath();this._controlPoints.push(new Set)}clone(){const c=(new f).initialize(this._geometry.clone(),this.geometryType,this.hasZ,this.hasM,this.yFactor);c._controlPoints=this._controlPoints;return c}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(c){this._controlPoints[this.pathIndex].add(c)}getControlPointAt(c){return this._controlPoints[this.pathIndex].has(c)}}
class n extends a{initialize(c,r,k,p,t){return super.initialize(c,r,k,p,t)}clone(){return(new n).initialize(g.clone(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(c){this._paths[this.pathIndex][c][4]=1}getControlPointAt(c){return 1===this._paths[this.pathIndex][c][4]}}e.GeometryCursor=d;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/symbols/cim/CIMEffects":function(){define(["exports","../../geometry/GeometryCursor","../../geometry/support/TileClipper"],function(e,g,q){let h;class m{constructor(l){this._geometry=l}next(){const l=this._geometry;this._geometry=null;return l}}e.SimpleEffectCursor=m;e.clipCursorToTileExtent=function(l,d){h||=new q.TileClipper(0,0,0,1);var b="esriGeometryPolygon"===l.geometryType;const a=b?3:2;h.reset(b?q.GeometryType.Polygon:q.GeometryType.LineString);h.setPixelMargin(d+
1);h.setExtent(512);let f;for(;l.nextPath();)if(!(l.pathSize<a)){l.nextPoint();d=l.x;f=-l.y;for(h.moveTo(d,f);l.nextPoint();)d=l.x,f=-l.y,h.lineTo(d,f);b&&h.close()}if(b=h.result(!1)){l=g.GeometryCursor.createEmptyOptimizedCIM(l.geometryType);for(const n of b){l.startPath();for(const c of n)l.pushXY(c.x,-c.y)}l.reset();return l}return null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/TileClipper":function(){define(["exports"],function(e){e.GeometryType=void 0;
(function(a){a[a.Unknown=0]="Unknown";a[a.Point=1]="Point";a[a.LineString=2]="LineString";a[a.Polygon=3]="Polygon"})(e.GeometryType||(e.GeometryType={}));class g{constructor(a,f){this.x=a;this.y=f}clone(){return new g(this.x,this.y)}equals(a,f){return a===this.x&&f===this.y}isEqual(a){return a.x===this.x&&a.y===this.y}setCoords(a,f){this.x=a;this.y=f;return this}normalize(){var a=this.x;const f=this.y;a=Math.sqrt(a*a+f*f);this.x/=a;this.y/=a;return this}rightPerpendicular(){const a=this.x;this.x=
this.y;this.y=-a;return this}leftPerpendicular(){const a=this.x;this.x=-this.y;this.y=a;return this}move(a,f){this.x+=a;this.y+=f;return this}assign(a){this.x=a.x;this.y=a.y;return this}assignAdd(a,f){this.x=a.x+f.x;this.y=a.y+f.y;return this}assignSub(a,f){this.x=a.x-f.x;this.y=a.y-f.y;return this}rotate(a,f){const n=this.x,c=this.y;this.x=n*a-c*f;this.y=n*f+c*a;return this}scale(a){this.x*=a;this.y*=a;return this}length(){const a=this.x,f=this.y;return Math.sqrt(a*a+f*f)}sub(a){this.x-=a.x;this.y-=
a.y;return this}add(a){this.x+=a.x;this.y+=a.y;return this}static distance(a,f){const n=f.x-a.x;a=f.y-a.y;return Math.sqrt(n*n+a*a)}static add(a,f){return new g(a.x+f.x,a.y+f.y)}static sub(a,f){return new g(a.x-f.x,a.y-f.y)}}class q{constructor(a,f,n){this.ratio=a;this.x=f;this.y=n}}class h{constructor(a,f,n,c=8,r=8){this._lines=[];this._starts=[];this.validateTessellation=!0;this._pixelRatio=c;this._pixelMargin=r;this._tileSize=512*c;this._dz=a;this._yPos=f;this._xPos=n}setPixelMargin(a){a!==this._pixelMargin&&
(this._pixelMargin=a,this.setExtent(this._extent))}setExtent(a){this._extent=a;this._finalRatio=this._tileSize/a*(1<<this._dz);let f=this._pixelRatio*this._pixelMargin;f/=this._finalRatio;a>>=this._dz;f>a&&(f=a);this._margin=f;this._xmin=a*this._xPos-f;this._ymin=a*this._yPos-f;this._xmax=this._xmin+a+2*f;this._ymax=this._ymin+a+2*f}reset(a){this._type=a;this._lines=[];this._starts=[];this._line=null;this._start=0}moveTo(a,f){this._pushLine();this._prevIsIn=this._isIn(a,f);this._moveTo(a,f,this._prevIsIn);
this._prevPt=new g(a,f);this._firstPt=new g(a,f);this._dist=0}lineTo(a,f){const n=this._isIn(a,f),c=new g(a,f),r=g.distance(this._prevPt,c);if(n)if(this._prevIsIn)this._lineTo(a,f,!0);else{var k=this._prevPt;var p=c;a=this._intersect(p,k);this._start=this._dist+r*(1-this._r);this._lineTo(a.x,a.y,!0);this._lineTo(p.x,p.y,!0)}else if(this._prevIsIn)p=this._prevPt,k=c,a=this._intersect(p,k),this._lineTo(a.x,a.y,!0),this._lineTo(k.x,k.y,!1);else{const w=this._prevPt;if(!(w.x<=this._xmin&&c.x<=this._xmin||
w.x>=this._xmax&&c.x>=this._xmax||w.y<=this._ymin&&c.y<=this._ymin||w.y>=this._ymax&&c.y>=this._ymax)){a=[];if(w.x<this._xmin&&c.x>this._xmin||w.x>this._xmin&&c.x<this._xmin){f=(this._xmin-w.x)/(c.x-w.x);var t=w.y+f*(c.y-w.y);t<=this._ymin?p=!1:t>=this._ymax?p=!0:a.push(new q(f,this._xmin,t))}if(w.x<this._xmax&&c.x>this._xmax||w.x>this._xmax&&c.x<this._xmax)f=(this._xmax-w.x)/(c.x-w.x),t=w.y+f*(c.y-w.y),t<=this._ymin?p=!1:t>=this._ymax?p=!0:a.push(new q(f,this._xmax,t));if(w.y<this._ymin&&c.y>this._ymin||
w.y>this._ymin&&c.y<this._ymin)f=(this._ymin-w.y)/(c.y-w.y),t=w.x+f*(c.x-w.x),t<=this._xmin?k=!1:t>=this._xmax?k=!0:a.push(new q(f,t,this._ymin));if(w.y<this._ymax&&c.y>this._ymax||w.y>this._ymax&&c.y<this._ymax)f=(this._ymax-w.y)/(c.y-w.y),t=w.x+f*(c.x-w.x),t<=this._xmin?k=!1:t>=this._xmax?k=!0:a.push(new q(f,t,this._ymax));if(0===a.length)k?p?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):p?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,
!0);else if(1<a.length&&a[0].ratio>a[1].ratio)this._start=this._dist+r*a[1].ratio,this._lineTo(a[1].x,a[1].y,!0),this._lineTo(a[0].x,a[0].y,!0);else for(this._start=this._dist+r*a[0].ratio,k=0;k<a.length;k++)this._lineTo(a[k].x,a[k].y,!0)}this._lineTo(c.x,c.y,!1)}this._dist+=r;this._prevIsIn=n;this._prevPt=c}close(){if(2<this._line.length){var a=this._firstPt,f=this._prevPt;a.x===f.x&&a.y===f.y||this.lineTo(a.x,a.y);a=this._line;for(f=a.length;4<=f;)if(a[0].x===a[1].x&&a[0].x===a[f-2].x||a[0].y===
a[1].y&&a[0].y===a[f-2].y)a.pop(),a[0].x=a[f-2].x,a[0].y=a[f-2].y,--f;else break}}result(a=!0){this._pushLine();if(0===this._lines.length)return null;this._type===e.GeometryType.Polygon&&a&&d.simplify(this._tileSize,this._margin*this._finalRatio,this._lines);return this._lines}resultWithStarts(){if(this._type!==e.GeometryType.LineString)throw Error("Only valid for lines");this._pushLine();const a=this._lines,f=a.length;if(0===f)return null;const n=[];for(let c=0;c<f;c++)n.push({line:a[c],start:this._starts[c]||
0});return n}_isIn(a,f){return a>=this._xmin&&a<=this._xmax&&f>=this._ymin&&f<=this._ymax}_intersect(a,f){let n,c,r;if(f.x>=this._xmin&&f.x<=this._xmax)c=f.y<=this._ymin?this._ymin:this._ymax,r=(c-a.y)/(f.y-a.y),n=a.x+r*(f.x-a.x);else if(f.y>=this._ymin&&f.y<=this._ymax)n=f.x<=this._xmin?this._xmin:this._xmax,r=(n-a.x)/(f.x-a.x),c=a.y+r*(f.y-a.y);else{c=f.y<=this._ymin?this._ymin:this._ymax;n=f.x<=this._xmin?this._xmin:this._xmax;const k=(n-a.x)/(f.x-a.x),p=(c-a.y)/(f.y-a.y);k<p?(r=k,c=a.y+k*(f.y-
a.y)):(r=p,n=a.x+p*(f.x-a.x))}this._r=r;return new g(n,c)}_pushLine(){this._line&&(this._type===e.GeometryType.Point?0<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===e.GeometryType.LineString?1<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===e.GeometryType.Polygon&&3<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)));this._line=[];this._start=0}_moveTo(a,f,n){this._type!==e.GeometryType.Polygon?
n&&(a=Math.round((a-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+this._margin))*this._finalRatio),this._line.push(new g(a,f))):(n||(a<this._xmin&&(a=this._xmin),a>this._xmax&&(a=this._xmax),f<this._ymin&&(f=this._ymin),f>this._ymax&&(f=this._ymax)),a=Math.round((a-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+this._margin))*this._finalRatio),this._line.push(new g(a,f)),this._isV=this._isH=!1)}_lineTo(a,f,n){if(this._type!==e.GeometryType.Polygon)if(n){a=
Math.round((a-(this._xmin+this._margin))*this._finalRatio);f=Math.round((f-(this._ymin+this._margin))*this._finalRatio);if(0<this._line.length&&(n=this._line[this._line.length-1],n.equals(a,f)))return;this._line.push(new g(a,f))}else this._line&&0<this._line.length&&this._pushLine();else if(n||(a<this._xmin&&(a=this._xmin),a>this._xmax&&(a=this._xmax),f<this._ymin&&(f=this._ymin),f>this._ymax&&(f=this._ymax)),a=Math.round((a-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+
this._margin))*this._finalRatio),this._line&&0<this._line.length){n=this._line[this._line.length-1];const c=n.x===a,r=n.y===f;c&&r||(this._isH&&c?(n.x=a,n.y=f,n=this._line[this._line.length-2],n.x===a&&n.y===f?(this._line.pop(),1>=this._line.length?this._isV=this._isH=!1:(n=this._line[this._line.length-2],this._isH=n.x===a,this._isV=n.y===f)):(this._isH=n.x===a,this._isV=n.y===f)):this._isV&&r?(n.x=a,n.y=f,n=this._line[this._line.length-2],n.x===a&&n.y===f?(this._line.pop(),1>=this._line.length?this._isV=
this._isH=!1:(n=this._line[this._line.length-2],this._isH=n.x===a,this._isV=n.y===f)):(this._isH=n.x===a,this._isV=n.y===f)):(this._line.push(new g(a,f)),this._isH=c,this._isV=r))}else this._line.push(new g(a,f))}}class m{setExtent(a){this._ratio=4096===a?1:4096/a}get validateTessellation(){return 1>this._ratio}reset(a){this._lines=[];this._line=null}moveTo(a,f){this._line&&this._lines.push(this._line);this._line=[];const n=this._ratio;this._line.push(new g(a*n,f*n))}lineTo(a,f){const n=this._ratio;
this._line.push(new g(a*n,f*n))}close(){const a=this._line;a&&!a[0].isEqual(a[a.length-1])&&a.push(a[0])}result(){this._line&&this._lines.push(this._line);return 0===this._lines.length?null:this._lines}}var l;(function(a){a[a.sideLeft=0]="sideLeft";a[a.sideRight=1]="sideRight";a[a.sideTop=2]="sideTop";a[a.sideBottom=3]="sideBottom"})(l||={});class d{static simplify(a,f,n){if(n){var c=-f,r=a+f,k=-f,p=a+f;a=[];f=[];var t=n.length;for(let w=0;w<t;++w){const u=n[w];if(!u||2>u.length)continue;let y=u[0],
x;const v=u.length;for(let A=1;A<v;++A)x=u[A],y.x===x.x&&(y.x<=c&&(y.y>x.y?(a.push(w),a.push(A),a.push(l.sideLeft),a.push(-1)):(f.push(w),f.push(A),f.push(l.sideLeft),f.push(-1))),y.x>=r&&(y.y<x.y?(a.push(w),a.push(A),a.push(l.sideRight),a.push(-1)):(f.push(w),f.push(A),f.push(l.sideRight),f.push(-1)))),y.y===x.y&&(y.y<=k&&(y.x<x.x?(a.push(w),a.push(A),a.push(l.sideTop),a.push(-1)):(f.push(w),f.push(A),f.push(l.sideTop),f.push(-1))),y.y>=p&&(y.x>x.x?(a.push(w),a.push(A),a.push(l.sideBottom),a.push(-1)):
(f.push(w),f.push(A),f.push(l.sideBottom),f.push(-1)))),y=x}0!==a.length&&0!==f.length&&(d.fillParent(n,f,a),d.fillParent(n,a,f),c=[],d.calcDeltas(c,f,a),d.calcDeltas(c,a,f),d.addDeltas(c,n))}}static fillParent(a,f,n){const c=n.length,r=f.length;for(let u=0;u<r;u+=4){var k=f[u],p=f[u+1];const y=f[u+2],x=a[k][p-1];k=a[k][p];p=8092;let v=-1;for(let A=0;A<c;A+=4){if(n[A+2]!==y)continue;var t=n[A];const z=n[A+1];var w=a[t][z-1];t=a[t][z];switch(y){case l.sideLeft:case l.sideRight:b(x.y,w.y,t.y)&&b(k.y,
w.y,t.y)&&(w=Math.abs(t.y-w.y),w<p&&(p=w,v=A));break;case l.sideTop:case l.sideBottom:b(x.x,w.x,t.x)&&b(k.x,w.x,t.x)&&(w=Math.abs(t.x-w.x),w<p&&(p=w,v=A))}}f[u+3]=v}}static calcDeltas(a,f,n){const c=f.length;for(let r=0;r<c;r+=4){const k=d.calcDelta(r,f,n,[]);a.push(f[r]);a.push(f[r+1]);a.push(f[r+2]);a.push(k)}}static calcDelta(a,f,n,c){a=f[a+3];if(-1===a)return 0;const r=c.length;if(1<r&&c[r-2]===a)return 0;c.push(a);return d.calcDelta(a,n,f,c)+1}static addDeltas(a,f){const n=a.length;let c=0;for(var r=
0;r<n;r+=4){var k=a[r+3];k>c&&(c=k)}for(r=0;r<n;r+=4){k=f[a[r]];const p=a[r+1],t=c-a[r+3];switch(a[r+2]){case l.sideLeft:k[p-1].x-=t;k[p].x-=t;1===p&&(k[k.length-1].x-=t);p===k.length-1&&(k[0].x-=t);break;case l.sideRight:k[p-1].x+=t;k[p].x+=t;1===p&&(k[k.length-1].x+=t);p===k.length-1&&(k[0].x+=t);break;case l.sideTop:k[p-1].y-=t;k[p].y-=t;1===p&&(k[k.length-1].y-=t);p===k.length-1&&(k[0].y-=t);break;case l.sideBottom:k[p-1].y+=t,k[p].y+=t,1===p&&(k[k.length-1].y+=t),p===k.length-1&&(k[0].y+=t)}}}}
const b=(a,f,n)=>a>=f&&a<=n||a>=n&&a<=f;e.Point=g;e.SimpleBuilder=m;e.TileClipper=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CIMImageColorSubstitutionHelper":function(){define(function(){class e{applyColorSubstituition(g,q){if(!q)return g;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const {width:h,height:m}=g,l=this._rasterizationCanvas,d=l.getContext("2d",{willReadFrequently:!0});g!==l&&(l.width=h,l.height=m,d.drawImage(g,
0,0,h,m));g=d.getImageData(0,0,h,m).data;if(q)for(var b of q)if(b&&b.oldColor&&4===b.oldColor.length&&b.newColor&&4===b.newColor.length){const [a,f,n,c]=b.oldColor,[r,k,p,t]=b.newColor;if(a!==r||f!==k||n!==p||c!==t)for(q=0;q<g.length;q+=4)a===g[q]&&f===g[q+1]&&n===g[q+2]&&c===g[q+3]&&(g[q]=r,g[q+1]=k,g[q+2]=p,g[q+3]=t)}b=new ImageData(g,h,m);d.putImageData(b,0,0);return l}tintImageData(g,q){if(!q||4>q.length)return g;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));
const {width:h,height:m}=g,l=this._rasterizationCanvas,d=l.getContext("2d",{willReadFrequently:!0});g!==l&&(l.width=h,l.height=m,d.drawImage(g,0,0,h,m));g=d.getImageData(0,0,h,m);g=new Uint8Array(g.data);q=[q[0]/255,q[1]/255,q[2]/255,q[3]/255];for(let b=0;b<g.length;b+=4)g[b]*=q[0],g[b+1]*=q[1],g[b+2]*=q[2],g[b+3]*=q[3];q=new ImageData(new Uint8ClampedArray(g.buffer),h,m);d.putImageData(q,0,0);return l}}return e})},"esri/symbols/cim/CIMOperators":function(){define("exports ./effects/EffectAddControlPoints ./effects/EffectArrow ./effects/EffectBuffer ./effects/EffectControlMeasureLine ./effects/EffectCut ./effects/EffectDashes ./effects/EffectDonut ./effects/EffectJog ./effects/EffectMove ./effects/EffectOffset ./effects/EffectReverse ./effects/EffectRotate ./effects/EffectScale ./effects/EffectWave ./placements/PlacementAlongLineSameSize ./placements/PlacementAtExtremities ./placements/PlacementAtRatioPositions ./placements/PlacementInsidePolygon ./placements/PlacementOnLine ./placements/PlacementOnVertices ./placements/PlacementPolygonCenter".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A){e.getEffectOperator=function(z){if(!z)return null;switch(z.type){case "CIMGeometricEffectAddControlPoints":return g.EffectAddControlPoints.local();case "CIMGeometricEffectArrow":return q.EffectArrow.local();case "CIMGeometricEffectBuffer":return h.EffectBuffer.local();case "CIMGeometricEffectControlMeasureLine":return m.EffectControlMeasureLine.local();case "CIMGeometricEffectCut":return l.EffectCut.local();case "CIMGeometricEffectDashes":return d.EffectDashes.local();
case "CIMGeometricEffectDonut":return b.EffectDonut.local();case "CIMGeometricEffectJog":return a.EffectJog.local();case "CIMGeometricEffectMove":return f.EffectMove.local();case "CIMGeometricEffectOffset":return n.EffectOffset.local();case "CIMGeometricEffectReverse":return c.EffectReverse.local();case "CIMGeometricEffectRotate":return r.EffectRotate.local();case "CIMGeometricEffectScale":return k.EffectScale.local();case "CIMGeometricEffectWave":return p.EffectWave.local()}return null};e.getPlacementOperator=
function(z){if(!z)return null;switch(z.type){case "CIMMarkerPlacementAlongLineSameSize":return t.PlacementAlongLineSameSize.local();case "CIMMarkerPlacementAtExtremities":return w.PlacementAtExtremities.local();case "CIMMarkerPlacementAtRatioPositions":return u.PlacementAtRatioPositions.local();case "CIMMarkerPlacementInsidePolygon":return y.PlacementInsidePolygon.local();case "CIMMarkerPlacementOnLine":return x.PlacementOnLine.local();case "CIMMarkerPlacementOnVertices":return v.PlacementOnVertices.local();
case "CIMMarkerPlacementPolygonCenter":return A.PlacementPolygonCenter.local()}return null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectAddControlPoints":function(){define(["exports"],function(e){class g{static local(){null===g.instance&&(g.instance=new g);return g.instance}execute(h,m,l,d,b){return new q(h,m,l)}}g.instance=null;class q{constructor(h,m,l){this._inputGeometries=h;this._angleTolerance=void 0!==m.angleTolerance?m.angleTolerance:120;
this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let h=this._inputGeometries.next();for(;h;){if("esriGeometryPolygon"===h.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===h.geometryType)this._isClosed=!1;else if("esriGeometryEnvelope"===h.geometryType){if(this._maxCosAngle)return h;this._isClosed=!0}else{h=this._inputGeometries.next();continue}for(;h.nextPath();)this._processPath(h);h.reset();return h}return null}_processPath(h){if(h.nextPoint()){const m=
h.x,l=h.y;let d=m,b=l,a=h.pathSize,f=0,n=0,c=0,r=0,k=0,p=0;this._isClosed&&++a;for(let t=1;h.nextPoint()||t<a;++t){let w,u;this._isClosed&&t===a-1?(w=m,u=l):(w=h.x,u=h.y);const y=w-d,x=u-b,v=Math.sqrt(y*y+x*x);1<t&&0<v&&0<c&&(f*y+n*x)/v/c<=this._maxCosAngle&&h.setControlPointAt(t-1);1===t&&(r=y,k=x,p=v);0<v&&(d=w,b=u,f=y,n=x,c=v)}this._isClosed&&0<c&&0<p&&(f*r+n*k)/p/c<=this._maxCosAngle&&h.setControlPointAt(0)}}}e.EffectAddControlPoints=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/symbols/cim/effects/EffectArrow":function(){define("exports ../../../geometry/GeometryCursor ../../../geometry/geometryCursorCollectUtils ../CIMCursor ../CurveHelper ../enums".split(" "),function(e,g,q,h,m,l){const d=l.GeometricEffectArrowType.OpenEnded;class b{static local(){null===b.instance&&(b.instance=new b);return b.instance}execute(f,n,c,r,k){return new a(f,n,c)}}b.instance=null;class a extends h.PathEffectCursor{constructor(f,n,c){super(f,!1,!0);this._curveHelper=new m.CurveHelper;this._width=
(void 0!==n.width?n.width:5)*c;this._arrowType=void 0!==n.geometricEffectArrowType?n.geometricEffectArrowType:void 0!==n.arrowType?n.arrowType:d;this._offsetFlattenError=m.pixelTolerance*c}processPath(f){const n=g.GeometryCursor.createEmptyOptimizedCIM(f.geometryType);switch(this._arrowType){default:this._constructSimpleArrow(n,f,!0);break;case l.GeometricEffectArrowType.Block:this._constructSimpleArrow(n,f,!1);break;case l.GeometricEffectArrowType.Crossed:this._constructCrossedArrow(n,f)}return n}_constructSimpleArrow(f,
n,c){var r=n.pathLength(),k=this._width;r<2*k&&(k=r/2);var p=this._curveHelper.getSubCurve(n,0,r-k);if(p&&p.nextPath()&&(p.seekPathStart(),r=k/2,!this._curveHelper.isEmpty(p)&&(p=q.collectPath(p),k=this._constructOffset(p,-r)))&&(p=this._constructOffset(p,r))){var t=this._constructArrowBasePoint(k,-r/2);t&&(r=this._constructArrowBasePoint(p,r/2))&&(n.seekInPath(n.pathSize-1),n=[n.x,n.y],f.pushPath(p),f.nextPath(),f.nextPoint(),f.setControlPoint(),f.pushPoint(r),f.nextPoint(),f.setControlPoint(),f.pushPoint(n),
f.nextPoint(),f.setControlPoint(),f.pushPoint(t),f.nextPoint(),f.setControlPoint(),f.pushPoints(k.reverse()),f.setControlPoint(),c||(f.setControlPointAt(0),f.setControlPointAt(f.pathSize-1),f.pushPoint(p[0])),f.reset())}}_constructCrossedArrow(f,n){var c=n.pathLength(),r=this._width;c<3.732050807568877*r&&(r=c/3.732050807568877);n.seekPathStart();var k=this._curveHelper.getSubCurve(n,0,c-2.732050807568877*r);if(k){k.nextPath();var p=r/2;if(!this._curveHelper.isEmpty(k)){var t=q.collectPath(k);if(k=
this._constructOffset(t,p))if(t=this._constructOffset(t,-p))if(c=this._curveHelper.getSubCurve(n,0,c-r))if(c.nextPath(),!this._curveHelper.isEmpty(c)&&(c=q.collectPath(c),r=this._constructOffset(c,p))){var w=this._constructOffset(c,-p);if(w&&(c=r[r.length-1],r=this._constructArrowBasePoint(r,p/2))){var u=w[w.length-1];if(p=this._constructArrowBasePoint(w,-p/2))n.seekInPath(n.pathSize-1),n=[n.x,n.y],f.pushPath(k),f.nextPath(),f.nextPoint(),f.setControlPoint(),f.pushPoint(u),f.nextPoint(),f.setControlPoint(),
f.pushPoint(p),f.nextPoint(),f.setControlPoint(),f.pushPoint(n),f.nextPoint(),f.setControlPoint(),f.pushPoint(r),f.nextPoint(),f.setControlPoint(),f.pushPoint(c),f.nextPoint(),f.setControlPoint(),f.pushPoints(t.reverse()),f.nextPoint(),f.setControlPoint(),f.reset()}}}}}_constructOffset(f,n){return this._curveHelper.offset(f,n,l.GeometricEffectOffsetMethod.Rounded,4,this._offsetFlattenError)}_constructArrowBasePoint(f,n){if(!f||2>f.length)return null;var c=f[f.length-2];f=f[f.length-1];c=[f[0]-c[0],
f[1]-c[1]];this._curveHelper.normalize(c);return[f[0]+c[1]*n,f[1]-c[0]*n]}}e.EffectArrow=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CIMCursor":function(){define(["exports","./CIMEffects","./CIMPlacements"],function(e,g,q){class h{constructor(l,d=!0,b=!0,a=0){this.isClosed=!1;this.geometryCursor=null;this.geometryCursor=!d&&"esriGeometryPolygon"===l.geometryType||!b&&"esriGeometryPolyline"===l.geometryType?null:l;this.geomUnitsPerPoint=a;this.iteratePath=this.iterateMultiPath=
!1;this.internalPlacement=new q.Placement}next(){if(!this.geometryCursor)return null;const l=this.processMultiPath(this.geometryCursor);this.iterateMultiPath&&l||(this.geometryCursor=null);return l}processMultiPath(l){for(;this.iteratePath||l.pathIndex<l.totalSize-1;){this.iteratePath||l.nextPath();this.iterateMultiPath=!0;const d=this.processPath(l);if(d)return d}this.iterateMultiPath=!1;return null}}class m{constructor(l,d,b,a=0){this.isClosed=!1;this._tileKey=null;this.inputGeometries=l;this.acceptPolygon=
d;this.acceptPolyline=b;this.geomUnitsPerPoint=a;this.iteratePath=!1;this.multiPathCursor=null}next(){for(;;){if(!this.multiPathCursor){for(var l=this.inputGeometries.next();l&&!(this.isClosed=this.acceptPolygon&&"esriGeometryPolygon"===l.geometryType||"esriGeometryEnvelope"===l.geometryType,this.multiPathCursor=l);)l=this.inputGeometries.next();if(!this.multiPathCursor)return null;this._tileKey&&this.isClippingRequired(this.multiPathCursor)&&(this.multiPathCursor.reset(),this.multiPathCursor=g.clipCursorToTileExtent(this.multiPathCursor,
256))}for(;this.iteratePath||this.multiPathCursor.nextPath();)if(this.multiPathCursor.seekPathStart(),l=this.processPath(this.multiPathCursor))return l;this.multiPathCursor=null}}isClippingRequired(l){return!1}}e.PathEffectCursor=m;e.PathTransformationCursor=h;e.getId=function(l){return l[4]};e.setId=function(l,d){l[4]=d};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/CurveHelper":function(){define(["exports","../../geometry/GeometryCursor","./enums"],function(e,
g,q){class h{constructor(m,l){}isEmpty(m){if(!m.nextPoint())return!0;let l,d,b,a;l=m.x;for(d=m.y;m.nextPoint();l=d,d=a)if(b=m.x,a=m.y,b!==l||a!==d)return m.seekPathStart(),!1;m.seekPathStart();return!0}normalize(m){const l=Math.sqrt(m[0]*m[0]+m[1]*m[1]);0!==l&&(m[0]/=l,m[1]/=l)}getLength(m,l,d,b){m=d-m;l=b-l;return Math.sqrt(m*m+l*l)}getSegLength(m){const [[l,d],[b,a]]=m;return this.getLength(l,d,b,a)}getCoord2D(m,l,d,b,a){return[m+(d-m)*a,l+(b-l)*a]}getSegCoord2D(m,l){const [[d,b],[a,f]]=m;return this.getCoord2D(d,
b,a,f,l)}getAngle(m,l,d,b,a){return Math.atan2(b-l,d-m)}getAngleCS(m,l,d,b,a){m=d-m;l=b-l;b=Math.sqrt(m*m+l*l);return 0<b?[m/b,l/b]:[1,0]}getSegAngleCS(m,l){const [[d,b],[a,f]]=m;return this.getAngleCS(d,b,a,f,l)}cut(m,l,d,b,a,f){a=0>=a?[m,l]:this.getCoord2D(m,l,d,b,a);m=1<=f?[d,b]:this.getCoord2D(m,l,d,b,f);return[a,m]}getSubCurve(m,l,d){const b=g.GeometryCursor.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(b,m,l,d)?b:null}appendSubCurve(m,l,d,b){m.startPath();l.seekPathStart();
let a=0;var f=!0;if(!l.nextPoint())return!1;var n=l.x;let c=l.y;for(;l.nextPoint();){const r=this.getLength(n,c,l.x,l.y);if(0!==r){if(f){if(a+r>d){const k=(d-a)/r;let p=1;f=!1;a+r>=b&&(p=(b-a)/r,f=!0);(n=this.cut(n,c,l.x,l.y,k,p))&&m.pushPoints(n);if(f)break;f=!1}}else{if(a+r>b){(l=this.cut(n,c,l.x,l.y,0,(b-a)/r))&&m.pushPoint(l[1]);break}m.pushXY(l.x,l.y)}a+=r}n=l.x;c=l.y}return!0}getCIMPointAlong(m,l){if(!m.nextPoint())return null;let d=0,b,a,f,n;b=m.x;for(a=m.y;m.nextPoint();b=f,a=n){f=m.x;n=m.y;
const c=this.getLength(b,a,f,n);if(0!==c){if(d+c>l)return this.getCoord2D(b,a,f,n,(l-d)/c);d+=c}}return null}offset(m,l,d,b,a){if(!m||2>m.length)return null;var f=0,n=m[f++];for(a=f;f<m.length;){var c=m[f];if(c[0]!==n[0]||c[1]!==n[1])f!==a&&(m[a]=m[f]),n=m[a++];f++}(f=m[0][0]===m[a-1][0]&&m[0][1]===m[a-1][1])&&--a;if(a<(f?3:2))return null;c=[];n=f?m[a-1]:null;let r=m[0];for(let u=0;u<a;u++){const y=u===a-1?f?m[0]:null:m[u+1];if(n)if(y){var k=[y[0]-r[0],y[1]-r[1]];this.normalize(k);var p=[r[0]-n[0],
r[1]-n[1]];this.normalize(p);var t=p[0]*k[1]-p[1]*k[0],w=p[0]*k[0]+p[1]*k[1];if(0===t&&1===w){r=y;continue}if(0<=t===0>=l)1>w&&(k=[k[0]-p[0],k[1]-p[1]],this.normalize(k),p=Math.sqrt((1+w)/2),p>1/b&&(p=-Math.abs(l)/p,c.push([r[0]-k[0]*p,r[1]-k[1]*p])));else switch(d){case q.GeometricEffectOffsetMethod.Mitered:if(n=Math.sqrt((1+w)/2),0<n&&1/n<b){k=[k[0]-p[0],k[1]-p[1]];this.normalize(k);p=Math.abs(l)/n;c.push([r[0]-k[0]*p,r[1]-k[1]*p]);break}case q.GeometricEffectOffsetMethod.Bevelled:c.push([r[0]+
p[1]*l,r[1]-p[0]*l]);c.push([r[0]+k[1]*l,r[1]-k[0]*l]);break;case q.GeometricEffectOffsetMethod.Rounded:if(1>w){c.push([r[0]+p[1]*l,r[1]-p[0]*l]);n=Math.floor(2.5*(1-w));if(0<n){t=w=1/n;for(let x=1;x<n;x++,t+=w){const v=[p[1]*(1-t)+k[1]*t,-p[0]*(1-t)-k[0]*t];this.normalize(v);c.push([r[0]+v[0]*l,r[1]+v[1]*l])}}c.push([r[0]+k[1]*l,r[1]-k[0]*l])}break;default:0>t?(c.push([r[0]+(p[1]+p[0])*l,r[1]+(p[1]-p[0])*l]),c.push([r[0]+(k[1]-k[0])*l,r[1]-(k[0]+k[1])*l])):(n=Math.sqrt((1+Math.abs(w))/2),k=[k[0]-
p[0],k[1]-p[1]],this.normalize(k),p=l/n,c.push([r[0]-k[0]*p,r[1]-k[1]*p]))}}else k=[r[0]-n[0],r[1]-n[1]],this.normalize(k),c.push([r[0]+k[1]*l,r[1]-k[0]*l]);else k=[y[0]-r[0],y[1]-r[1]],this.normalize(k),c.push([r[0]+k[1]*l,r[1]-k[0]*l]);n=r;r=y}if(c.length<(f?3:2))return null;f&&c.push([c[0][0],c[0][1]]);return c}}e.CurveHelper=h;e.pixelTolerance=.03;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/enums":function(){define(["exports"],function(e){e.CapType=void 0;
(function(g){g[g.BUTT=0]="BUTT";g[g.ROUND=1]="ROUND";g[g.SQUARE=2]="SQUARE";g[g.UNKNOWN=4]="UNKNOWN"})(e.CapType||(e.CapType={}));e.JoinType=void 0;(function(g){g[g.BEVEL=0]="BEVEL";g[g.ROUND=1]="ROUND";g[g.MITER=2]="MITER";g[g.UNKNOWN=4]="UNKNOWN"})(e.JoinType||(e.JoinType={}));e.Alignment=void 0;(function(g){g[g.SCREEN=0]="SCREEN";g[g.MAP=1]="MAP"})(e.Alignment||(e.Alignment={}));e.ExternalColorMixMode=void 0;(function(g){g[g.Tint=0]="Tint";g[g.Ignore=1]="Ignore";g[g.Multiply=99]="Multiply"})(e.ExternalColorMixMode||
(e.ExternalColorMixMode={}));e.ExtremityPlacement=void 0;(function(g){g.Both="Both";g.JustBegin="JustBegin";g.JustEnd="JustEnd";g.None="None"})(e.ExtremityPlacement||(e.ExtremityPlacement={}));e.FillMode=void 0;(function(g){g[g.Mosaic=0]="Mosaic";g[g.Centered=1]="Centered"})(e.FillMode||(e.FillMode={}));e.FontEffects=void 0;(function(g){g[g.Normal=0]="Normal";g[g.Superscript=1]="Superscript";g[g.Subscript=2]="Subscript"})(e.FontEffects||(e.FontEffects={}));e.FontEncoding=void 0;(function(g){g[g.MSSymbol=
0]="MSSymbol";g[g.Unicode=1]="Unicode"})(e.FontEncoding||(e.FontEncoding={}));e.FontType=void 0;(function(g){g[g.Unspecified=0]="Unspecified";g[g.TrueType=1]="TrueType";g[g.PSOpenType=2]="PSOpenType";g[g.TTOpenType=3]="TTOpenType";g[g.Type1=4]="Type1"})(e.FontType||(e.FontType={}));e.AngleAlignment=void 0;(function(g){g[g.Display=0]="Display";g[g.Map=1]="Map"})(e.AngleAlignment||(e.AngleAlignment={}));e.AnimatedSymbolRepeatType=void 0;(function(g){g.None="None";g.Loop="Loop";g.Oscillate="Oscillate"})(e.AnimatedSymbolRepeatType||
(e.AnimatedSymbolRepeatType={}));e.DominantSizeAxis=void 0;(function(g){g[g.Z=0]="Z";g[g.X=1]="X";g[g.Y=2]="Y"})(e.DominantSizeAxis||(e.DominantSizeAxis={}));e.RotationOrder=void 0;(function(g){g[g.XYZ=0]="XYZ";g[g.ZXY=1]="ZXY";g[g.YXZ=2]="YXZ"})(e.RotationOrder||(e.RotationOrder={}));e.BalloonCalloutStyle=void 0;(function(g){g[g.Rectangle=0]="Rectangle";g[g.RoundedRectangle=1]="RoundedRectangle";g[g.Oval=2]="Oval"})(e.BalloonCalloutStyle||(e.BalloonCalloutStyle={}));e.BlendingMode=void 0;(function(g){g[g.None=
0]="None";g[g.Alpha=1]="Alpha";g[g.Screen=2]="Screen";g[g.Multiply=3]="Multiply";g[g.Add=4]="Add"})(e.BlendingMode||(e.BlendingMode={}));e.BlockProgression=void 0;(function(g){g[g.TTB=0]="TTB";g[g.RTL=1]="RTL";g[g.BTT=2]="BTT"})(e.BlockProgression||(e.BlockProgression={}));e.BillBoardMode=void 0;(function(g){g[g.None=0]="None";g[g.SignPost=1]="SignPost";g[g.FaceNearPlane=2]="FaceNearPlane"})(e.BillBoardMode||(e.BillBoardMode={}));e.CGAAttributeType=void 0;(function(g){g[g.Float=0]="Float";g[g.String=
1]="String";g[g.Boolean=2]="Boolean"})(e.CGAAttributeType||(e.CGAAttributeType={}));e.ClippingType=void 0;(function(g){g[g.Intersect=0]="Intersect";g[g.Subtract=1]="Subtract"})(e.ClippingType||(e.ClippingType={}));e.GeometricEffectArrowType=void 0;(function(g){g.OpenEnded="OpenEnded";g.Block="Block";g.Crossed="Crossed"})(e.GeometricEffectArrowType||(e.GeometricEffectArrowType={}));e.GeometricEffectControlMeasureLineRule=void 0;(function(g){g.FullGeometry="FullGeometry";g.PerpendicularFromFirstSegment=
"PerpendicularFromFirstSegment";g.ReversedFirstSegment="ReversedFirstSegment";g.PerpendicularToSecondSegment="PerpendicularToSecondSegment";g.SecondSegmentWithTicks="SecondSegmentWithTicks";g.DoublePerpendicular="DoublePerpendicular";g.OppositeToFirstSegment="OppositeToFirstSegment";g.TriplePerpendicular="TriplePerpendicular";g.HalfCircleFirstSegment="HalfCircleFirstSegment";g.HalfCircleSecondSegment="HalfCircleSecondSegment";g.HalfCircleExtended="HalfCircleExtended";g.OpenCircle="OpenCircle";g.CoverageEdgesWithTicks=
"CoverageEdgesWithTicks";g.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks";g.GapExtentMidline="GapExtentMidline";g.Chevron="Chevron";g.PerpendicularWithArc="PerpendicularWithArc";g.ClosedHalfCircle="ClosedHalfCircle";g.TripleParallelExtended="TripleParallelExtended";g.ParallelWithTicks="ParallelWithTicks";g.Parallel="Parallel";g.PerpendicularToFirstSegment="PerpendicularToFirstSegment";g.ParallelOffset="ParallelOffset";g.OffsetOpposite="OffsetOpposite";g.OffsetSame="OffsetSame";g.CircleWithArc=
"CircleWithArc";g.DoubleJog="DoubleJog";g.PerpendicularOffset="PerpendicularOffset";g.LineExcludingLastSegment="LineExcludingLastSegment";g.MultivertexArrow="MultivertexArrow";g.CrossedArrow="CrossedArrow";g.ChevronArrow="ChevronArrow";g.ChevronArrowOffset="ChevronArrowOffset";g.PartialFirstSegment="PartialFirstSegment";g.Arch="Arch";g.CurvedParallelTicks="CurvedParallelTicks";g.Arc90Degrees="Arc90Degrees";g.TipWithPerpendicularAndTicks="TipWithPerpendicularAndTicks"})(e.GeometricEffectControlMeasureLineRule||
(e.GeometricEffectControlMeasureLineRule={}));e.GeometricEffectDonutMethod=void 0;(function(g){g.Mitered="Mitered";g.Bevelled="Bevelled";g.Rounded="Rounded";g.Square="Square";g.TrueBuffer="TrueBuffer"})(e.GeometricEffectDonutMethod||(e.GeometricEffectDonutMethod={}));e.GeometricEffectEnclosingPolygonMethod=void 0;(function(g){g.ClosePath="ClosePath";g.ConvexHull="ConvexHull";g.RectangularBox="RectangularBox"})(e.GeometricEffectEnclosingPolygonMethod||(e.GeometricEffectEnclosingPolygonMethod={}));
e.GeometricEffectExtensionOrigin=void 0;(function(g){g.BeginningOfLine="BeginningOfLine";g.EndOfLine="EndOfLine"})(e.GeometricEffectExtensionOrigin||(e.GeometricEffectExtensionOrigin={}));e.GeometricEffectOffsetMethod=void 0;(function(g){g.Mitered="Mitered";g.Bevelled="Bevelled";g.Rounded="Rounded";g.Square="Square"})(e.GeometricEffectOffsetMethod||(e.GeometricEffectOffsetMethod={}));e.GeometricEffectOffsetOption=void 0;(function(g){g.Fast="Fast";g.Accurate="Accurate"})(e.GeometricEffectOffsetOption||
(e.GeometricEffectOffsetOption={}));e.GeometricEffectOffsetTangentMethod=void 0;(function(g){g.BeginningOfLine="BeginningOfLine";g.EndOfLine="EndOfLine"})(e.GeometricEffectOffsetTangentMethod||(e.GeometricEffectOffsetTangentMethod={}));e.GeometricEffectWaveform=void 0;(function(g){g.Sinus="Sinus";g.Square="Square";g.Triangle="Triangle";g.Random="Random"})(e.GeometricEffectWaveform||(e.GeometricEffectWaveform={}));e.GlyphHinting=void 0;(function(g){g[g.None=0]="None";g[g.Default=1]="Default";g[g.Force=
2]="Force"})(e.GlyphHinting||(e.GlyphHinting={}));e.GradientAlignment=void 0;(function(g){g[g.Buffered=0]="Buffered";g[g.Left=1]="Left";g[g.Right=2]="Right";g[g.AlongLine=3]="AlongLine"})(e.GradientAlignment||(e.GradientAlignment={}));e.GradientFillMethod=void 0;(function(g){g[g.Linear=0]="Linear";g[g.Rectangular=1]="Rectangular";g[g.Circular=2]="Circular";g[g.Buffered=3]="Buffered"})(e.GradientFillMethod||(e.GradientFillMethod={}));e.GradientStrokeType=void 0;(function(g){g[g.Discrete=0]="Discrete";
g[g.Continuous=1]="Continuous"})(e.GradientStrokeType||(e.GradientStrokeType={}));e.GradientStrokeMethod=void 0;(function(g){g[g.AcrossLine=0]="AcrossLine";g[g.AloneLine=1]="AloneLine"})(e.GradientStrokeMethod||(e.GradientStrokeMethod={}));e.HorizontalAlignment=void 0;(function(g){g[g.Left=0]="Left";g[g.Right=1]="Right";g[g.Center=2]="Center";g[g.Justify=3]="Justify"})(e.HorizontalAlignment||(e.HorizontalAlignment={}));e.LeaderLineStyle=void 0;(function(g){g[g.Base=0]="Base";g[g.MidPoint=1]="MidPoint";
g[g.ThreePoint=2]="ThreePoint";g[g.FourPoint=3]="FourPoint";g[g.Underline=4]="Underline";g[g.CircularCW=5]="CircularCW";g[g.CircularCCW=6]="CircularCCW"})(e.LeaderLineStyle||(e.LeaderLineStyle={}));e.LineCapStyle=void 0;(function(g){g.Butt="Butt";g.Round="Round";g.Square="Square"})(e.LineCapStyle||(e.LineCapStyle={}));e.LineDashEnding=void 0;(function(g){g.NoConstraint="NoConstraint";g.HalfPattern="HalfPattern";g.HalfGap="HalfGap";g.FullPattern="FullPattern";g.FullGap="FullGap";g.Custom="Custom"})(e.LineDashEnding||
(e.LineDashEnding={}));e.LineDecorationStyle=void 0;(function(g){g[g.None=-1]="None";g[g.Custom=0]="Custom";g[g.Circle=1]="Circle";g[g.OpenArrow=2]="OpenArrow";g[g.ClosedArrow=3]="ClosedArrow";g[g.Diamond=4]="Diamond"})(e.LineDecorationStyle||(e.LineDecorationStyle={}));e.LineGapType=void 0;(function(g){g[g.ExtraLeading=0]="ExtraLeading";g[g.Multiple=1]="Multiple";g[g.Exact=2]="Exact"})(e.LineGapType||(e.LineGapType={}));e.LineJoinStyle=void 0;(function(g){g.Bevel="Bevel";g.Round="Round";g.Miter=
"Miter"})(e.LineJoinStyle||(e.LineJoinStyle={}));e.ExpressionReturnType=void 0;(function(g){g[g.Default=0]="Default";g[g.String=1]="String";g[g.Numeric=2]="Numeric"})(e.ExpressionReturnType||(e.ExpressionReturnType={}));e.MarkerPlacementType=void 0;(function(g){g[g.InsidePolygon=0]="InsidePolygon";g[g.PolygonCenter=1]="PolygonCenter";g[g.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"})(e.MarkerPlacementType||(e.MarkerPlacementType={}));e.MaterialMode=void 0;(function(g){g[g.Tint=0]="Tint";g[g.Replace=
1]="Replace";g[g.Multiply=2]="Multiply"})(e.MaterialMode||(e.MaterialMode={}));e.PlacementClip=void 0;(function(g){g[g.ClipAtBoundary=0]="ClipAtBoundary";g[g.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary";g[g.DoNotTouchBoundary=2]="DoNotTouchBoundary";g[g.DoNotClip=3]="DoNotClip"})(e.PlacementClip||(e.PlacementClip={}));e.PlacementEndings=void 0;(function(g){g.NoConstraint="NoConstraint";g.WithMarkers="WithMarkers";g.WithFullGap="WithFullGap";g.WithHalfGap="WithHalfGap";g.Custom=
"Custom"})(e.PlacementEndings||(e.PlacementEndings={}));e.PlacementGridType=void 0;(function(g){g.Fixed="Fixed";g.Random="Random";g.RandomFixedQuantity="RandomFixedQuantity"})(e.PlacementGridType||(e.PlacementGridType={}));e.PlacementOnLineRelativeTo=void 0;(function(g){g.LineMiddle="LineMiddle";g.LineBeginning="LineBeginning";g.LineEnd="LineEnd";g.SegmentMidpoint="SegmentMidpoint"})(e.PlacementOnLineRelativeTo||(e.PlacementOnLineRelativeTo={}));e.PlacementPolygonCenterMethod=void 0;(function(g){g.OnPolygon=
"OnPolygon";g.CenterOfMass="CenterOfMass";g.BoundingBoxCenter="BoundingBoxCenter"})(e.PlacementPolygonCenterMethod||(e.PlacementPolygonCenterMethod={}));e.PlacementRandomlyAlongLineRandomization=void 0;(function(g){g[g.Low=0]="Low";g[g.Medium=1]="Medium";g[g.High=2]="High"})(e.PlacementRandomlyAlongLineRandomization||(e.PlacementRandomlyAlongLineRandomization={}));e.PlacementStepPosition=void 0;(function(g){g[g.MarkerCenter=0]="MarkerCenter";g[g.MarkerBounds=1]="MarkerBounds"})(e.PlacementStepPosition||
(e.PlacementStepPosition={}));e.PointSymbolCalloutScale=void 0;(function(g){g[g.None=0]="None";g[g.PropUniform=1]="PropUniform";g[g.PropNonuniform=2]="PropNonuniform";g[g.DifUniform=3]="DifUniform";g[g.DifNonuniform=4]="DifNonuniform"})(e.PointSymbolCalloutScale||(e.PointSymbolCalloutScale={}));e.Simple3DLineStyle=void 0;(function(g){g.Tube="Tube";g.Strip="Strip";g.Wall="Wall"})(e.Simple3DLineStyle||(e.Simple3DLineStyle={}));e.SizeVariationMethod=void 0;(function(g){g[g.Random=0]="Random";g[g.Increasing=
1]="Increasing";g[g.Decreasing=2]="Decreasing";g[g.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"})(e.SizeVariationMethod||(e.SizeVariationMethod={}));e.SymbolUnits=void 0;(function(g){g[g.Relative=0]="Relative";g[g.Absolute=1]="Absolute"})(e.SymbolUnits||(e.SymbolUnits={}));e.TextCase=void 0;(function(g){g[g.Normal=0]="Normal";g[g.LowerCase=1]="LowerCase";g[g.Allcaps=2]="Allcaps"})(e.TextCase||(e.TextCase={}));e.TextReadingDirection=void 0;(function(g){g[g.LTR=0]="LTR";g[g.RTL=1]="RTL"})(e.TextReadingDirection||
(e.TextReadingDirection={}));e.TextureFilter=void 0;(function(g){g.Draft="Draft";g.Picture="Picture";g.Text="Text"})(e.TextureFilter||(e.TextureFilter={}));e.VerticalAlignment=void 0;(function(g){g[g.Top=0]="Top";g[g.Center=1]="Center";g[g.Baseline=2]="Baseline";g[g.Bottom=3]="Bottom"})(e.VerticalAlignment||(e.VerticalAlignment={}));e.VerticalGlyphOrientation=void 0;(function(g){g[g.Right=0]="Right";g[g.Upright=1]="Upright"})(e.VerticalGlyphOrientation||(e.VerticalGlyphOrientation={}));e.WaterbodySize=
void 0;(function(g){g[g.Small=0]="Small";g[g.Medium=1]="Medium";g[g.Large=2]="Large"})(e.WaterbodySize||(e.WaterbodySize={}));e.WaveStrength=void 0;(function(g){g[g.Calm=0]="Calm";g[g.Rippled=1]="Rippled";g[g.Slight=2]="Slight";g[g.Moderate=3]="Moderate"})(e.WaveStrength||(e.WaveStrength={}));Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectBuffer":function(){define("exports ../../../geometry ../../../geometry/GeometryCursor ../../../geometry/geometryCursorCollectUtils ../CIMEffects ../CurveHelper ../enums ../../../geometry/SpatialReference".split(" "),
function(e,g,q,h,m,l,d,b){class a{static local(){null===a.instance&&(a.instance=new a);return a.instance}execute(n,c,r,k,p,t){return new f(n,c,r,k,p,t)}}a.instance=null;class f{constructor(n,c,r,k,p,t){this._inputGeometries=n;this._tileKey=k;this._geometryEngine=p;this._curveHelper=new l.CurveHelper;this._size=(void 0!==c.size?c.size:1)*r;this._maxInflateSize=t*r;this._offsetFlattenError=l.pixelTolerance*r}next(){for(var n;n=this._inputGeometries.next();){if(0===this._size)return n;if("esriGeometryEnvelope"===
n.geometryType)if(0<this._size){var c=q.GeometryCursor.createEmptyOptimizedCIM(n.geometryType),r=h.collectMultipath(n)[0];if(r=this._curveHelper.offset(r,this._size,d.GeometricEffectOffsetMethod.Rounded,4,this._offsetFlattenError))return c.pushPath(r),c}else if(0>this._size&&(c=n.asJSON(),0<Math.min(c.xmax-c.xmin,c.ymax-c.ymin)+2*this._size))return q.GeometryCursor.fromJSONCIM({xmin:c.xmin-this._size,xmax:c.xmax+this._size,ymin:c.ymin-this._size,ymax:c.ymax+this._size});c=this._geometryEngine;if(null==
c)break;if(n=this._tileKey?m.clipCursorToTileExtent(n,this._maxInflateSize):n)return(n=c.buffer(b.WebMercator,n.asJSON(),this._size,1))?q.GeometryCursor.fromJSONCIM(n):null}return null}}e.EffectBuffer=a;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectControlMeasureLine":function(){define(["exports","../../../geometry/GeometryCursor","../../../geometry/geometryCursorCollectUtils","../CIMCursor","../enums"],function(e,g,q,h,m){class l{static local(){null===
l.instance&&(l.instance=new l);return l.instance}execute(b,a,f,n,c){return new d(b,a,f)}}l.instance=null;class d{constructor(b,a,f){this._defaultPointSize=20;this._inputGeometries=b;this._geomUnitsPerPoint=f;this._rule=a.rule??m.GeometricEffectControlMeasureLineRule.FullGeometry;this._defaultSize=this._defaultPointSize*f}next(){for(var b;b=this._inputGeometries.next();)if(b=this._processGeom(q.collectMultipath(b)),b?.length)return g.GeometryCursor.fromJSONCIM({paths:b});return null}_clone(b){return[b[0],
b[1]]}_mid(b,a){return[(b[0]+a[0])/2,(b[1]+a[1])/2]}_mix(b,a,f,n){return[b[0]*a+f[0]*n,b[1]*a+f[1]*n]}_add(b,a){return[b[0]+a[0],b[1]+a[1]]}_add2(b,a,f){return[b[0]+a,b[1]+f]}_sub(b,a){return[b[0]-a[0],b[1]-a[1]]}_dist(b,a){return Math.sqrt((b[0]-a[0])*(b[0]-a[0])+(b[1]-a[1])*(b[1]-a[1]))}_norm(b){return Math.sqrt(b[0]*b[0]+b[1]*b[1])}_normalize(b,a=1){a/=this._norm(b);b[0]*=a;b[1]*=a}_leftPerpendicular(b){const a=b[0];b[0]=-b[1];b[1]=a}_leftPerp(b){return[-b[1],b[0]]}_rightPerpendicular(b){const a=
-b[0];b[0]=b[1];b[1]=a}_rightPerp(b){return[b[1],-b[0]]}_dotProduct(b,a){return b[0]*a[0]+b[1]*a[1]}_crossProduct(b,a){return b[0]*a[1]-b[1]*a[0]}_rotateDirect(b,a,f){const n=b[0]*f+b[1]*a;b[0]=b[0]*a-b[1]*f;b[1]=n}_makeCtrlPt(b){b=[b[0],b[1]];h.setId(b,1);return b}_addAngledTicks(b,a,f,n){const c=this._sub(f,a);this._normalize(c);var r=this._crossProduct(c,this._sub(n,a));n=0<r?this._rightPerp(c):this._leftPerp(c);r=Math.abs(r)/2;const k=[];k.push([a[0]+(n[0]-c[0])*r,a[1]+(n[1]-c[1])*r]);k.push(a);
k.push(f);k.push([f[0]+(n[0]+c[0])*r,f[1]+(n[1]+c[1])*r]);b.push(k)}_addBezier2(b,a,f,n,c){if(0===c--)b.push(n);else{var r=this._mid(a,f);f=this._mid(f,n);var k=this._mid(r,f);this._addBezier2(b,a,r,k,c);this._addBezier2(b,k,f,n,c)}}_addBezier3(b,a,f,n,c,r){if(0===r--)b.push(c);else{var k=this._mid(a,f),p=this._mid(f,n);n=this._mid(n,c);f=this._mid(k,p);p=this._mid(p,n);var t=this._mid(f,p);this._addBezier3(b,a,k,f,t,r);this._addBezier3(b,t,p,n,c,r)}}_add90DegArc(b,a,f,n,c){n=c??0<this._crossProduct(this._sub(f,
a),this._sub(n,a));c=this._mid(a,f);const r=this._sub(c,a);n?this._leftPerpendicular(r):this._rightPerpendicular(r);c[0]+=r[0];c[1]+=r[1];this._addBezier3(b,a,this._mix(a,.33333,c,.66667),this._mix(f,.33333,c,.66667),f,4)}_addArrow(b,a,f){var n=a[0],c=a[1],r=a[a.length-1],k=this._sub(n,c),p=this._norm(k);this._normalize(k);const t=Math.abs(this._crossProduct(k,this._sub(r,c)));r=this._dotProduct(k,this._sub(r,c));r<.05*p?r=.05*p:r>.95*p&&(r=.95*p);p=.5*t;var w=this._leftPerp(k);r=[c[0]+k[0]*r,c[1]+
k[1]*r];var u=a.length-1;c=[];c.push(f?[-w[0],-w[1]]:w);var y=[-k[0],-k[1]];for(f=1;f<u-1;f++){k=this._sub(a[f+1],a[f]);this._normalize(k);var x=this._dotProduct(k,y);w=this._crossProduct(k,y);x=Math.sqrt((1+x)/2);y=this._sub(k,y);this._normalize(y);y[0]/=x;y[1]/=x;c.push(0>w?[-y[0],-y[1]]:y);y=k}c.push(this._rightPerp(y));for(u=c.length-1;0<u;u--)b.push([a[u][0]+c[u][0]*p,a[u][1]+c[u][1]*p]);b.push([r[0]+c[0][0]*p,r[1]+c[0][1]*p]);b.push([r[0]+c[0][0]*t,r[1]+c[0][1]*t]);b.push(n);b.push([r[0]-c[0][0]*
t,r[1]-c[0][1]*t]);b.push([r[0]-c[0][0]*p,r[1]-c[0][1]*p]);for(n=1;n<c.length;n++)b.push([a[n][0]-c[n][0]*p,a[n][1]-c[n][1]*p])}_cp2(b,a,f){return 2<=b.length?b[1]:this._add2(b[0],a*this._defaultSize,f*this._defaultSize)}_cp3(b,a,f,n){if(3<=b.length)return b[2];f=this._mix(b[0],1-f,a,f);b=this._sub(a,b[0]);this._normalize(b);this._rightPerpendicular(b);return[f[0]+b[0]*n*this._defaultSize,f[1]+b[1]*n*this._defaultSize]}_arrowPath(b){if(2<b.length)return b;const a=b[0];b=this._cp2(b,-4,0);const f=
this._sub(a,b);this._normalize(f);const n=this._rightPerp(f);return[a,b,[a[0]+(n[0]-f[0])*this._defaultSize,a[1]+(n[1]-f[1])*this._defaultSize]]}_arrowLastSeg(b){var a=b[0];const f=this._cp2(b,-4,0);if(3<=b.length)a=b[b.length-1];else{b=this._sub(a,f);this._normalize(b);const n=this._rightPerp(b);a=[a[0]+(n[0]-b[0])*this._defaultSize,a[1]+(n[1]-b[1])*this._defaultSize]}return[f,a]}_processGeom(b){if(!b)return null;const a=[];for(const f of b){if(!f||0===f.length)continue;const n=f.length;let c=f[0];
switch(this._rule){case m.GeometricEffectControlMeasureLineRule.PerpendicularFromFirstSegment:const r=this._cp2(f,0,-1),k=this._cp3(f,r,.5,4),p=[];p.push(k);p.push(this._mid(c,r));a.push(p);break;case m.GeometricEffectControlMeasureLineRule.ReversedFirstSegment:const t=this._cp2(f,0,-1);a.push([t,c]);break;case m.GeometricEffectControlMeasureLineRule.PerpendicularToSecondSegment:if(3>f.length)return[];const w=this._cp2(f,-4,1),u=this._cp3(f,w,.882353,-1.94),y=[];y.push(this._mid(w,u));y.push(c);a.push(y);
break;case m.GeometricEffectControlMeasureLineRule.SecondSegmentWithTicks:if(3>f.length)return[];const x=this._cp2(f,-4,1),v=this._cp3(f,x,.882353,-1.94),A=this._sub(v,x);let z;z=0<this._crossProduct(A,this._sub(c,x))?this._rightPerp(A):this._leftPerp(A);const B=[];B.push([x[0]+(z[0]-A[0])/3,x[1]+(z[1]-A[1])/3]);B.push(x);B.push(v);B.push([v[0]+(z[0]+A[0])/3,v[1]+(z[1]+A[1])/3]);a.push(B);break;case m.GeometricEffectControlMeasureLineRule.DoublePerpendicular:const D=this._cp2(f,0,-1),F=this._cp3(f,
D,.5,3),E=this._mid(c,D),C=this._sub(E,F);this._normalize(C);const G=this._crossProduct(C,this._sub(c,F));this._leftPerpendicular(C);const H=[];H.push(c);H.push([F[0]+C[0]*G,F[1]+C[1]*G]);a.push(H);const K=[];K.push([F[0]-C[0]*G,F[1]-C[1]*G]);K.push(D);a.push(K);break;case m.GeometricEffectControlMeasureLineRule.OppositeToFirstSegment:const J=this._cp2(f,0,-1),O=this._cp3(f,J,.5,3),Q=this._mid(c,J),T=this._sub(Q,O);this._normalize(T);const I=this._crossProduct(T,this._sub(c,O));this._leftPerpendicular(T);
const L=[];L.push([O[0]+T[0]*I,O[1]+T[1]*I]);L.push([O[0]-T[0]*I,O[1]-T[1]*I]);a.push(L);break;case m.GeometricEffectControlMeasureLineRule.TriplePerpendicular:const R=this._cp2(f,0,-1),V=this._cp3(f,R,.5,4),S=this._mid(c,R),X=this._sub(S,V);this._normalize(X);const N=this._crossProduct(X,this._sub(c,V));this._leftPerpendicular(X);const P=[];P.push([V[0]+X[0]*N*.8,V[1]+X[1]*N*.8]);P.push([S[0]+.8*(c[0]-S[0]),S[1]+.8*(c[1]-S[1])]);a.push(P);a.push([V,S]);const U=[];U.push([V[0]-X[0]*N*.8,V[1]-X[1]*
N*.8]);U.push([S[0]+.8*(R[0]-S[0]),S[1]+.8*(R[1]-S[1])]);a.push(U);break;case m.GeometricEffectControlMeasureLineRule.HalfCircleFirstSegment:const Y=this._cp2(f,0,-1),ba=this._cp3(f,Y,.5,4),Z=this._mid(c,Y);let aa=this._sub(Y,c);const ca=Math.cos(Math.PI/18),ea=Math.sin(Math.PI/18),ia=Math.sqrt((1+ca)/2),ha=Math.sqrt((1-ca)/2),ja=[];let ka;0<this._crossProduct(aa,this._sub(ba,c))?(ja.push(c),aa=this._sub(c,Z),ka=Y):(ja.push(Y),aa=this._sub(Y,Z),ka=c);this._rotateDirect(aa,ia,ha);aa[0]/=ia;aa[1]/=
ia;for(let la=1;18>=la;la++)ja.push(this._add(Z,aa)),this._rotateDirect(aa,ca,ea);ja.push(ka);a.push(ja);break;case m.GeometricEffectControlMeasureLineRule.HalfCircleSecondSegment:const na=this._cp2(f,0,-1),qa=this._cp3(f,na,1,-1);let oa=this._sub(c,na);this._normalize(oa);const ua=this._crossProduct(oa,this._sub(qa,na))/2;this._leftPerpendicular(oa);const sa=[na[0]+oa[0]*ua,na[1]+oa[1]*ua];oa=this._sub(na,sa);const M=Math.cos(Math.PI/18);let W=Math.sin(Math.PI/18);0<ua&&(W=-W);const da=[na];for(let la=
1;18>=la;la++)this._rotateDirect(oa,M,W),da.push(this._add(sa,oa));a.push(da);break;case m.GeometricEffectControlMeasureLineRule.HalfCircleExtended:const fa=this._cp2(f,0,-2),ma=this._cp3(f,fa,1,-1);let ta;if(4<=n)ta=f[3];else{const la=this._sub(c,fa);ta=this._add(ma,la)}const za=this._dist(fa,ma)/2/.75,cb=this._sub(fa,c);this._normalize(cb,za);const db=this._sub(ma,ta);this._normalize(db,za);a.push([ta,ma]);const rb=[this._clone(ma)];this._addBezier3(rb,ma,this._add(ma,db),this._add(fa,cb),fa,4);
rb.push(c);a.push(rb);break;case m.GeometricEffectControlMeasureLineRule.OpenCircle:const Hb=this._cp2(f,-2,0),Ib=this._sub(Hb,c),jc=Math.cos(Math.PI/18),kc=-Math.sin(Math.PI/18),Jb=[Hb];for(let la=1;33>=la;la++)this._rotateDirect(Ib,jc,kc),Jb.push(this._add(c,Ib));a.push(Jb);break;case m.GeometricEffectControlMeasureLineRule.CoverageEdgesWithTicks:const Fa=this._cp2(f,0,-1);let Ua;if(3<=n)Ua=f[2];else{const la=this._sub(Fa,c),pa=this._leftPerp(la);Ua=[c[0]+pa[0]-.25*la[0],c[1]+pa[1]-.25*la[1]]}let Kb;
if(4<=n)Kb=f[3];else{const la=this._mid(c,Fa),pa=this._sub(c,Fa);this._normalize(pa);this._leftPerpendicular(pa);const ra=this._crossProduct(pa,this._sub(Ua,la));this._rightPerpendicular(pa);Kb=[Ua[0]+pa[0]*ra*2,Ua[1]+pa[1]*ra*2]}const Ga=this._sub(Fa,c);let eb,Ha;eb=0<this._crossProduct(Ga,this._sub(Ua,c))?this._rightPerp(Ga):this._leftPerp(Ga);Ha=[];Ha.push(Ua);Ha.push(c);Ha.push([c[0]+(eb[0]-Ga[0])/3,c[1]+(eb[1]-Ga[1])/3]);a.push(Ha);eb=0<this._crossProduct(Ga,this._sub(Kb,Fa))?this._rightPerp(Ga):
this._leftPerp(Ga);Ha=[];Ha.push([Fa[0]+(eb[0]+Ga[0])/3,Fa[1]+(eb[1]+Ga[1])/3]);Ha.push(Fa);Ha.push(Kb);a.push(Ha);break;case m.GeometricEffectControlMeasureLineRule.GapExtentWithDoubleTicks:const Lb=this._cp2(f,0,2),lc=this._cp3(f,Lb,0,1);let Mb;if(4<=n)Mb=f[3];else{const la=this._sub(Lb,c);Mb=this._add(lc,la)}this._addAngledTicks(a,c,Lb,this._mid(lc,Mb));this._addAngledTicks(a,lc,Mb,this._mid(c,Lb));break;case m.GeometricEffectControlMeasureLineRule.GapExtentMidline:const mc=this._cp2(f,2,0),Ic=
this._cp3(f,mc,0,1);let nc;if(4<=n)nc=f[3];else{const la=this._sub(mc,c);nc=this._add(Ic,la)}const oc=[];oc.push(this._mid(c,Ic));oc.push(this._mid(mc,nc));a.push(oc);break;case m.GeometricEffectControlMeasureLineRule.Chevron:const Jc=this._cp2(f,-1,-1);let pc;if(3<=n)pc=f[2];else{const la=this._sub(Jc,c);this._leftPerpendicular(la);pc=this._add(c,la)}a.push([Jc,this._makeCtrlPt(c),pc]);break;case m.GeometricEffectControlMeasureLineRule.PerpendicularWithArc:const fb=this._cp2(f,0,-2),Kc=this._cp3(f,
fb,.5,-1),va=this._sub(fb,c),Ia=this._norm(va);va[0]/=Ia;va[1]/=Ia;const Va=this._crossProduct(va,this._sub(Kc,c));let gb=this._dotProduct(va,this._sub(Kc,c));gb<.05*Ia?gb=.05*Ia:gb>.95*Ia&&(gb=.95*Ia);const Nb=[c[0]+va[0]*gb,c[1]+va[1]*gb];let wa=this._leftPerp(va),hb=[];hb.push([Nb[0]-wa[0]*Va,Nb[1]-wa[1]*Va]);hb.push([Nb[0]+wa[0]*Va,Nb[1]+wa[1]*Va]);a.push(hb);if(4<=n){const la=f[3];let pa=this._dotProduct(va,this._sub(la,c));pa<.1*Ia?pa=.1*Ia:pa>.9*Ia&&(pa=.9*Ia);const ra=[c[0]+va[0]*pa,c[1]+
va[1]*pa],xa=this._crossProduct(va,this._sub(la,c)),qc=[];qc.push([ra[0]-wa[0]*xa,ra[1]-wa[1]*xa]);qc.push([ra[0]+wa[0]*xa,ra[1]+wa[1]*xa]);a.push(qc)}const Lc=[fb[0]+wa[0]*Va,fb[1]+wa[1]*Va];wa=this._sub(fb,Lc);const gd=Math.cos(Math.PI/18);let rc=Math.sin(Math.PI/18);0>Va&&(rc=-rc);hb=[c,fb];for(let la=1;9>=la;la++)this._rotateDirect(wa,gd,rc),hb.push(this._add(Lc,wa));a.push(hb);break;case m.GeometricEffectControlMeasureLineRule.ClosedHalfCircle:const sc=this._cp2(f,2,0),Mc=this._mid(c,sc),Nc=
this._sub(sc,Mc),hd=Math.cos(Math.PI/18),id=Math.sin(Math.PI/18),Oc=[c,sc];for(let la=1;18>=la;la++)this._rotateDirect(Nc,hd,id),Oc.push(this._add(Mc,Nc));a.push(Oc);break;case m.GeometricEffectControlMeasureLineRule.TripleParallelExtended:const Wa=this._cp2(f,0,-2),tc=this._cp3(f,Wa,1,-2),Xa=this._mid(c,Wa),Ja=this._sub(tc,Wa);this._normalize(Ja);const Pc=Math.abs(this._crossProduct(Ja,this._sub(Xa,Wa)))/2,ib=this._dist(Wa,tc),Qc=[Wa,c];Qc.push([c[0]+Ja[0]*ib*.5,c[1]+Ja[1]*ib*.5]);a.push(Qc);const jb=
[];jb.push([Xa[0]-Ja[0]*Pc,Xa[1]-Ja[1]*Pc]);jb.push([Xa[0]+Ja[0]*ib*.375,Xa[1]+Ja[1]*ib*.375]);h.setId(jb[jb.length-1],1);jb.push([Xa[0]+Ja[0]*ib*.75,Xa[1]+Ja[1]*ib*.75]);a.push(jb);a.push([Wa,tc]);break;case m.GeometricEffectControlMeasureLineRule.ParallelWithTicks:const sb=this._cp2(f,3,0),uc=this._cp3(f,sb,.5,-1),tb=this._sub(uc,sb);this._normalize(tb);const Rc=this._crossProduct(tb,this._sub(uc,c));this._leftPerpendicular(tb);this._addAngledTicks(a,c,sb,uc);this._addAngledTicks(a,this._mix(c,
1,tb,Rc),this._mix(sb,1,tb,Rc),this._mid(c,sb));break;case m.GeometricEffectControlMeasureLineRule.Parallel:const ub=this._cp2(f,3,0),jd=this._cp3(f,ub,.5,-1),vc=this._sub(ub,c);this._normalize(vc);const Ob=this._leftPerp(vc),Pb=this._crossProduct(vc,this._sub(jd,c));let vb=[c,ub];a.push(vb);vb=[];vb.push([c[0]+Ob[0]*Pb,c[1]+Ob[1]*Pb]);vb.push([ub[0]+Ob[0]*Pb,ub[1]+Ob[1]*Pb]);a.push(vb);break;case m.GeometricEffectControlMeasureLineRule.PerpendicularToFirstSegment:const wc=this._cp2(f,3,0),kd=this._cp3(f,
wc,.5,-1),Qb=this._mid(c,wc),Ya=this._sub(wc,c);this._normalize(Ya);const Rb=this._crossProduct(Ya,this._sub(kd,c));this._leftPerpendicular(Ya);const xc=[];xc.push([Qb[0]-Ya[0]*Rb*.25,Qb[1]-Ya[1]*Rb*.25]);xc.push([Qb[0]+Ya[0]*Rb*1.25,Qb[1]+Ya[1]*Rb*1.25]);a.push(xc);break;case m.GeometricEffectControlMeasureLineRule.ParallelOffset:const kb=this._cp2(f,3,0),ld=this._cp3(f,kb,.5,-1),Aa=this._sub(kb,c);this._normalize(Aa);const Na=this._crossProduct(Aa,this._sub(ld,c));this._leftPerpendicular(Aa);const yc=
[];yc.push([c[0]-Aa[0]*Na,c[1]-Aa[1]*Na]);yc.push([kb[0]-Aa[0]*Na,kb[1]-Aa[1]*Na]);a.push(yc);const zc=[];zc.push([c[0]+Aa[0]*Na,c[1]+Aa[1]*Na]);zc.push([kb[0]+Aa[0]*Na,kb[1]+Aa[1]*Na]);a.push(zc);break;case m.GeometricEffectControlMeasureLineRule.OffsetOpposite:const Sb=this._cp2(f,3,0),md=this._cp3(f,Sb,.5,-1),Za=this._sub(Sb,c);this._normalize(Za);const Tb=this._crossProduct(Za,this._sub(md,c));this._leftPerpendicular(Za);const Ac=[];Ac.push([c[0]-Za[0]*Tb,c[1]-Za[1]*Tb]);Ac.push([Sb[0]-Za[0]*
Tb,Sb[1]-Za[1]*Tb]);a.push(Ac);break;case m.GeometricEffectControlMeasureLineRule.OffsetSame:const Ub=this._cp2(f,3,0),nd=this._cp3(f,Ub,.5,-1),$a=this._sub(Ub,c);this._normalize($a);const Vb=this._crossProduct($a,this._sub(nd,c));this._leftPerpendicular($a);const Bc=[];Bc.push([c[0]+$a[0]*Vb,c[1]+$a[1]*Vb]);Bc.push([Ub[0]+$a[0]*Vb,Ub[1]+$a[1]*Vb]);a.push(Bc);break;case m.GeometricEffectControlMeasureLineRule.CircleWithArc:let Oa=this._cp2(f,3,0);const Cc=this._cp3(f,Oa,.5,-1);let lb,Wb;if(4<=n)lb=
f[3],Wb=0<this._crossProduct(this._sub(lb,Oa),this._sub(Cc,Oa));else{lb=Oa;Wb=0<this._crossProduct(this._sub(lb,c),this._sub(Cc,c));const la=24*this._geomUnitsPerPoint,pa=this._sub(lb,c);this._normalize(pa,la);const ra=Math.sqrt(2)/2;this._rotateDirect(pa,ra,Wb?ra:-ra);Oa=this._add(c,pa)}const Sc=this._sub(Oa,c),od=Math.cos(Math.PI/18),pd=Math.sin(Math.PI/18),wb=[Oa];for(let la=1;36>=la;la++)this._rotateDirect(Sc,od,pd),wb.push(this._add(c,Sc));this._add90DegArc(wb,Oa,lb,Cc,Wb);h.setId(wb[wb.length-
8],1);a.push(wb);break;case m.GeometricEffectControlMeasureLineRule.DoubleJog:let Pa=this._cp2(f,-3,1),ab=this._cp3(f,Pa,-1,-.5),La;if(4<=n)La=f[3];else{const la=c;c=Pa;La=ab;const pa=this._dist(c,la),ra=this._dist(La,la);let xa=30*this._geomUnitsPerPoint;.5*pa<xa&&(xa=.5*pa);.5*ra<xa&&(xa=.5*ra);Pa=this._mix(c,xa/pa,la,(pa-xa)/pa);ab=this._mix(La,xa/ra,la,(ra-xa)/ra)}const Tc=this._mid(c,Pa),Uc=this._mid(La,ab),qd=this._dist(c,Pa),rd=this._dist(ab,La);let Xb=Math.min(qd,rd)/8;Xb=Math.min(Xb,24*this._geomUnitsPerPoint);
const Qa=Math.cos(Math.PI/4);let ya=this._sub(c,Pa);this._normalize(ya,Xb);0<this._crossProduct(ya,this._sub(La,Pa))?this._rotateDirect(ya,Qa,-Qa):this._rotateDirect(ya,Qa,Qa);let Ba=[];Ba.push(Pa);Ba.push(this._add(Tc,ya));Ba.push(this._sub(Tc,ya));Ba.push(c);a.push(Ba);ya=this._sub(La,ab);this._normalize(ya,Xb);0>this._crossProduct(ya,this._sub(c,ab))?this._rotateDirect(ya,Qa,Qa):this._rotateDirect(ya,Qa,-Qa);Ba=[];Ba.push(ab);Ba.push(this._add(Uc,ya));Ba.push(this._sub(Uc,ya));Ba.push(La);a.push(Ba);
break;case m.GeometricEffectControlMeasureLineRule.PerpendicularOffset:const Yb=this._cp2(f,-4,1),Vc=this._cp3(f,Yb,.882353,-1.94),xb=this._sub(Vc,Yb);0<this._crossProduct(xb,this._sub(c,Yb))?this._rightPerpendicular(xb):this._leftPerpendicular(xb);const sd=[xb[0]/8,xb[1]/8],td=this._sub(this._mid(Yb,Vc),sd);a.push([td,c]);break;case m.GeometricEffectControlMeasureLineRule.LineExcludingLastSegment:const Wc=this._arrowPath(f),Xc=[];let Yc=Wc.length-2;for(;Yc--;)Xc.push(Wc[Yc]);a.push(Xc);break;case m.GeometricEffectControlMeasureLineRule.MultivertexArrow:const ud=
this._arrowPath(f),Zc=[];this._addArrow(Zc,ud,!1);a.push(Zc);break;case m.GeometricEffectControlMeasureLineRule.CrossedArrow:const vd=this._arrowPath(f),$c=[];this._addArrow($c,vd,!0);a.push($c);break;case m.GeometricEffectControlMeasureLineRule.ChevronArrow:const [yb,ad]=this._arrowLastSeg(f),mb=10*this._geomUnitsPerPoint,Ca=this._sub(c,yb),Zb=this._norm(Ca);this._normalize(Ca);const $b=this._crossProduct(Ca,this._sub(ad,yb));let nb=this._dotProduct(Ca,this._sub(ad,yb));nb<.05*Zb?nb=.05*Zb:nb>.95*
Zb-mb&&(nb=.95*Zb-mb);const ac=[yb[0]+Ca[0]*nb,yb[1]+Ca[1]*nb],bc=this._leftPerp(Ca),cc=[];cc.push([ac[0]+bc[0]*$b+Ca[0]*mb,ac[1]+bc[1]*$b+Ca[1]*mb]);cc.push(c);cc.push([ac[0]-bc[0]*$b+Ca[0]*mb,ac[1]-bc[1]*$b+Ca[1]*mb]);a.push(cc);break;case m.GeometricEffectControlMeasureLineRule.ChevronArrowOffset:const [zb,bd]=this._arrowLastSeg(f),Da=this._sub(c,zb),dc=this._norm(Da);this._normalize(Da);const ec=this._crossProduct(Da,this._sub(bd,zb));let ob=this._dotProduct(Da,this._sub(bd,zb));ob<.05*dc?ob=
.05*dc:ob>.95*dc&&(ob=.95*dc);const Ab=[zb[0]+Da[0]*ob,zb[1]+Da[1]*ob];this._leftPerpendicular(Da);const fc=[];fc.push([Ab[0]+Da[0]*ec*.5,Ab[1]+Da[1]*ec*.5]);fc.push(this._mid(Ab,c));fc.push([Ab[0]-Da[0]*ec*.5,Ab[1]-Da[1]*ec*.5]);a.push(fc);break;case m.GeometricEffectControlMeasureLineRule.PartialFirstSegment:const [Bb,wd]=this._arrowLastSeg(f),Cb=this._sub(c,Bb),gc=this._norm(Cb);this._normalize(Cb);let pb=this._dotProduct(Cb,this._sub(wd,Bb));pb<.05*gc?pb=.05*gc:pb>.95*gc&&(pb=.95*gc);a.push([Bb,
[Bb[0]+Cb[0]*pb,Bb[1]+Cb[1]*pb]]);break;case m.GeometricEffectControlMeasureLineRule.Arch:const Dc=this._cp2(f,0,-1),hc=this._cp3(f,Dc,.5,1),cd=this._sub(c,Dc),xd=this._mix(hc,1,cd,.55),yd=this._mix(hc,1,cd,-.55),Ec=[c];this._addBezier2(Ec,c,xd,hc,4);this._addBezier2(Ec,hc,yd,Dc,4);a.push(Ec);break;case m.GeometricEffectControlMeasureLineRule.CurvedParallelTicks:const Ra=this._cp2(f,-4,1),Db=this._cp3(f,Ra,.882353,-1.94),bb=this._sub(Db,Ra);0<this._crossProduct(bb,this._sub(c,Ra))?this._rightPerpendicular(bb):
this._leftPerpendicular(bb);const Fc=[bb[0]/8,bb[1]/8],dd=this._sub(this._mid(Ra,Db),Fc),zd=this._sub(this._mix(Ra,.75,Db,.25),Fc),Ad=this._sub(this._mix(Ra,.25,Db,.75),Fc),ic=[Ra];this._addBezier2(ic,Ra,zd,dd,3);this._addBezier2(ic,dd,Ad,Db,3);a.push(ic);for(let la=0;8>la;la++){const pa=ic[2*la+1],ra=[this._clone(pa)];ra.push(this._add(pa,[bb[0]/4,bb[1]/4]));a.push(ra)}break;case m.GeometricEffectControlMeasureLineRule.Arc90Degrees:const Gc=this._cp2(f,0,-1),Bd=this._cp3(f,Gc,.5,1),ed=[Gc];this._add90DegArc(ed,
Gc,c,Bd);a.push(ed);break;case m.GeometricEffectControlMeasureLineRule.TipWithPerpendicularAndTicks:const [Hc,fd]=this._arrowLastSeg(f),qb=10*this._geomUnitsPerPoint,Ea=this._sub(c,Hc),Eb=this._norm(Ea);this._normalize(Ea);let Ka=this._crossProduct(Ea,this._sub(fd,Hc)),Fb=this._dotProduct(Ea,this._sub(fd,Hc));Fb<.05*Eb?Fb=.05*Eb:Fb>.95*Eb-qb&&(Fb=.95*Eb-qb);const Sa=this._leftPerp(Ea),Ma=[c[0]-Ea[0]*qb,c[1]-Ea[1]*qb],Ta=.5*Math.max(Eb-Fb-qb,qb);Ka=Math.abs(Ka);const Gb=[];Gb.push([Ma[0]+Sa[0]*(Ka+
Ta)-Ea[0]*Ta,Ma[1]+Sa[1]*(Ka+Ta)-Ea[1]*Ta]);Gb.push([Ma[0]+Sa[0]*Ka,Ma[1]+Sa[1]*Ka]);Gb.push([Ma[0]-Sa[0]*Ka,Ma[1]-Sa[1]*Ka]);Gb.push([Ma[0]-Sa[0]*(Ka+Ta)-Ea[0]*Ta,Ma[1]-Sa[1]*(Ka+Ta)-Ea[1]*Ta]);a.push(Gb);a.push([Ma,c]);break;default:a.push(f)}}return a}}e.EffectControlMeasureLine=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectCut":function(){define(["exports","../../../geometry/GeometryCursor","../CIMCursor","../CurveHelper"],function(e,g,q,h){class m{static local(){null===
m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends q.PathEffectCursor{constructor(d,b,a){super(d,!0,!0);this._curveHelper=new h.CurveHelper;this._beginCut=(void 0!==b.beginCut?b.beginCut:1)*a;this._endCut=(void 0!==b.endCut?b.endCut:1)*a;this._middleCut=(void 0!==b.middleCut?b.middleCut:0)*a;this._invert=void 0!==b.invert?b.invert:!1;0>this._beginCut&&(this._beginCut=0);0>this._endCut&&(this._endCut=0);0>this._middleCut&&(this._middleCut=
0)}processPath(d){const {_beginCut:b,_endCut:a,_middleCut:f}=this,n=d.pathLength(),c=g.GeometryCursor.createEmptyOptimizedCIM("esriGeometryPolyline");if(!this._invert)if(0===b&&0===a&&0===f)for(c.startPath();d.nextPoint();)c.pushXY(d.x,d.y);else b+a+f<n&&(0===f?this._curveHelper.appendSubCurve(c,d,b,n-a):(this._curveHelper.appendSubCurve(c,d,b,.5*(n-f)),this._curveHelper.appendSubCurve(c,d,.5*(n+f),n-a)));else if(0!==b||0!==a||0!==f)if(b+a+f>=n)for(c.startPath();d.nextPoint();)c.pushXY(d.x,d.y);else this._curveHelper.appendSubCurve(c,
d,0,b),this._curveHelper.appendSubCurve(c,d,.5*(n-f),.5*(n+f)),this._curveHelper.appendSubCurve(c,d,n-a,a);return 0===c.totalSize?null:c}}e.EffectCut=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectDashes":function(){define("exports ../../../geometry/GeometryCursor ../../../geometry/geometryCursorCollectUtils ../../../geometry/support/coordsUtils ../CIMCursor ../enums ../GeometryWalker ../utils".split(" "),function(e,g,q,h,m,l,d,b){class a{static local(){null===
a.instance&&(a.instance=new a);return a.instance}execute(n,c,r,k,p){return new f(n,c,r,k)}}a.instance=null;class f extends m.PathEffectCursor{constructor(n,c,r,k){super(n,!0,!0);this._firstCurve=null;this._walker=new d.GeometryWalker;this._walker.updateTolerance(r);this._endings=c.lineDashEnding;this._customDashPos=-(c.offsetAlongLine??0)*r;this._offsetAtEnd=(c.customEndingOffset??0)*r;this._tileKey=k;n=b.normalizeDashTemplate(c).dashTemplate;null==n&&(n=[]);n.length%2&&(n=[...n,...n]);c=0;for(k=
0;k<n.length;k++){let p=Math.abs(n[k]);1E-7>p&&(p=1E-7);c+=p}this._patternLength=c;this._numOfDashesPerPattern=n.length/2;this._pattern=new d.DashPattern;this._pattern.init(n,!0);this._pattern.scale(r)}processPath(n){if(0===this._pattern.length())return this.iteratePath=!1,n=q.collectPath(n),g.GeometryCursor.fromJSONCIM({paths:[n]});if(!this.iteratePath){var c=!0;switch(this._endings){default:this._pattern.extPtGap=0;break;case l.LineDashEnding.FullPattern:this.isClosed||(this._pattern.extPtGap=.5*
this._pattern.firstValue());break;case l.LineDashEnding.FullGap:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case l.LineDashEnding.NoConstraint:this.isClosed||(c=!1);break;case l.LineDashEnding.Custom:this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}var r=n.pathLength();if(this._pattern.isEmpty()||r<.1*this._pattern.length()||!this._walker.init(n,this._pattern,c))return n=q.collectPath(n),g.GeometryCursor.fromJSONCIM({paths:[n]})}if(this.iteratePath)n=this._pattern.nextValue();
else{switch(this._endings){default:c=.5*this._pattern.firstValue();break;case l.LineDashEnding.HalfGap:c=.5*-this._pattern.lastValue();break;case l.LineDashEnding.FullGap:c=-this._pattern.lastValue();break;case l.LineDashEnding.FullPattern:c=0;break;case l.LineDashEnding.NoConstraint:case l.LineDashEnding.Custom:c=-this._customDashPos}n=c/this._pattern.length();n-=Math.floor(n);c=n*this._pattern.length();this._pattern.reset();n=this._pattern.nextValue();for(r=!1;c>=n;)c-=n,n=this._pattern.nextValue(),
r=!r;n-=c;r?(this._walker.nextPosition(n),n=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(n),n=this._pattern.nextValue(),this._walker.nextPosition(n),n=this._pattern.nextValue())}if(c=this._walker.nextCurve(n))if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)c.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else n=this._pattern.nextValue(),!this._walker.nextPosition(n)||
this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(c.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,c=this._firstCurve,this._firstCurve=null;c?.reset();return c}isClippingRequired(n){n=q.collectMultipath(n);let c=0;for(const r of n)c+=h.getPathLength(r);return 1E3<Math.round(c/this._patternLength*this._numOfDashesPerPattern)}}e.EffectDashes=a;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/GeometryWalker":function(){define(["exports",
"../../geometry/GeometryCursor","./CurveHelper"],function(e,g,q){class h{constructor(){this._values=[];this._currentValue=this._length=this.ctrlPtGap=this.extPtGap=0}isEmpty(){return 0===this._values.length}size(){return this._values.length}init(b,a,f=!0){this._setEmpty();if(!b||0===b.length)return!1;for(let n=0;n<b.length;n++){let c=Math.abs(b[n]);f&&1E-7>c&&(c=1E-7);this._values.push(c);this._length+=c}a&&b.length&1&&(this._length*=2);if(0===this._length)return!1;this.ctrlPtGap=this.extPtGap=0;
this._currentValue=-1;return!0}scale(b){const a=this._values?this._values.length:0;for(let f=0;f<a;++f)this._values[f]*=b;this._length*=b;this.extPtGap*=b;this.ctrlPtGap*=b}addValue(b){this._length+=b;this._values.push(b)}firstValue(){return this._values[0]}lastValue(){return this._values[this._values.length-1]}nextValue(){this._currentValue++;this._currentValue===this._values.length&&(this._currentValue=0);return this._values[this._currentValue]}reset(){this._currentValue=-1}length(){return this._length}_setEmpty(){this.extPtGap=
this.ctrlPtGap=this._length=0;this._currentValue=-1;this._values.length=0}}class m{constructor(){this.pt=null;this.sa=this.ca=0}}e.EndType=void 0;(function(b){b[b.FAIL=0]="FAIL";b[b.END=1]="END";b[b.CONTINUE=2]="CONTINUE"})(e.EndType||(e.EndType={}));class l{constructor(){this.reset()}reset(){this.segment=null;this.abscissa=this.segmentLength=0;this.isPartEnd=this.isPathEnd=!1}isValid(){return null!==this.segment}copyTo(b){b.segment=this.segment;b.segmentLength=this.segmentLength;b.abscissa=this.abscissa;
b.isPathEnd=this.isPathEnd;b.isPartEnd=this.isPartEnd}}class d extends q.CurveHelper{constructor(b=0,a=!1){super(b,a);this._tolerance=q.pixelTolerance;this._currentPosition=new l}updateTolerance(b){this._tolerance=q.pixelTolerance*b}init(b,a,f=!0){f?(this._patternLength=a.length(),this._partExtPtGap=a.extPtGap,this._partCtrlPtGap=a.ctrlPtGap):this._partCtrlPtGap=this._partExtPtGap=this._patternLength=0;this._currentPosition.reset();this._partSegCount=0;this._pathCursor=b;this._seg=-1;return this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(b,
a=e.EndType.FAIL){const f=new l;if(!this._nextPosition(b,f,null,a))return!1;f.copyTo(this._currentPosition);return!0}curPointAndAngle(b){b.pt=this._getPoint(this._currentPosition);const [a,f]=this._getAngleCS(this._currentPosition);b.ca=a;b.sa=f}nextPointAndAngle(b,a,f=e.EndType.FAIL){const n=new l;if(!this._nextPosition(b,n,null,f))return!1;n.copyTo(this._currentPosition);a.pt=this._getPoint(n);const [c,r]=this._getAngleCS(n);a.ca=c;a.sa=r;return!0}nextCurve(b){if(0===b)return null;const a=g.GeometryCursor.createEmptyOptimizedCIM("esriGeometryPolyline");
a.startPath();a.nextPath();const f=new l;if(!this._nextPosition(b,f,a,e.EndType.END))return null;f.copyTo(this._currentPosition);return a}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){return this._currentPosition.segment[1]}getPt(b){this._pathCursor.seekInPath(b);return[this._pathCursor.x,this._pathCursor.y]}getSeg(b){const a=this.getPt(b);b=this.getPt(b+1);return[a,b]}_nextPosition(b,a,f,n){if(this._currentPosition.isPathEnd)return!1;var c=this._currentPosition.abscissa;0<this._currentPosition.segmentLength&&
(c/=this._currentPosition.segmentLength);for(this._currentPosition.copyTo(a);a.abscissa+b*this._partLengthRatio>a.segmentLength+this._tolerance;)if(f&&(0===f.pathSize&&(0===c?(c=a.segment[0],f.pushXY(c[0],c[1])):f.pushPoint(this.getSegCoord2D(a.segment,c))),c=a.segment[1],f.pushXY(c[0],c[1])),c=0,b-=(a.segmentLength-a.abscissa)/this._partLengthRatio,this._partSegCount)a.segment=this._nextSegment(),a.segmentLength=this.getSegLength(a.segment),a.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart()){if(n===
e.EndType.FAIL)return!1;a.segmentLength=this.getSegLength(a.segment);a.isPartEnd=!0;n===e.EndType.END?(a.abscissa=a.segmentLength,a.isPathEnd=!0):a.abscissa=a.segmentLength+b;return!0}this._currentPosition.copyTo(a)}a.abscissa+=b*this._partLengthRatio;f&&(0===f.pathSize&&(0===c?f.pushPoint(a.segment[0]):f.pushPoint(this.getSegCoord2D(a.segment,c))),b=a.abscissa/a.segmentLength,1===b?f.pushPoint(a.segment[1]):f.pushPoint(this.getSegCoord2D(a.segment,b)));!this._partSegCount&&Math.abs(a.abscissa-a.segmentLength)<
this._tolerance&&(a.isPathEnd=this._partIsLast,a.isPartEnd=!0);return!0}_getPoint(b){return this.getSegCoord2D(this._currentPosition.segment,0>=b.segmentLength?0:b.abscissa/b.segmentLength)}_getAngleCS(b){return this.getSegAngleCS(this._currentPosition.segment,0>=b.segmentLength?0:b.abscissa/b.segmentLength)}_setPosAtNextPart(){for(;this._partSegCount;)this._hasNextSegment()&&this._nextSegment(),this._partSegCount--;if(!this._hasNextSegment())return!1;this._partLength=0;this._partIsLast=!0;for(this._partSegCount=
0;this._hasNextSegment();)if(this._partLength+=this.getSegLength(this._nextSegment()),this._partSegCount++,this._pathCursor.getControlPointAt(this._getEndPointIndex())){this._partIsLast=!this._hasNextSegment();break}for(var b=this._partSegCount;b;)this._previousSegment(),--b;this._currentPosition.segment=this._nextSegment();this._currentPosition.segmentLength=this.getSegLength(this._currentPosition.segment);this._currentPosition.abscissa=0;this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=
!1;--this._partSegCount;b=this._getStartPointIndex();this._ctrlPtBegin=this._pathCursor.getControlPointAt(b);b=b+this._partSegCount+1;b>=this._pathCursor.pathSize&&(b=0);this._ctrlPtEnd=this._pathCursor.getControlPointAt(b);if(0<this._patternLength){b=this._ctrlPtBegin?this._partCtrlPtGap:this._partExtPtGap;const a=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap;let f=Math.round((this._partLength-(b+a))/this._patternLength);0>=f&&(f=0<b+a?0:1);this._partLengthRatio=this._partLength/(b+a+f*
this._patternLength);.01>this._partLengthRatio&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0}_hasNextSegment(){return this._seg<this._pathCursor.pathSize-2}_previousSegment(){return this.getSeg(--this._seg)}_nextSegment(){return this.getSeg(++this._seg)}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}e.DashPattern=h;e.GeometryWalker=d;e.Pos=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectDonut":function(){define("exports ../../../geometry ../../../geometry/GeometryCursor ../CIMEffects ../enums ../../../geometry/SpatialReference".split(" "),
function(e,g,q,h,m,l){class d{static local(){null===d.instance&&(d.instance=new d);return d.instance}execute(a,f,n,c,r,k){return new b(a,f,n,c,r,k)}}d.instance=null;class b{constructor(a,f,n,c,r,k){this._inputGeometries=a;this._tileKey=c;this._geometryEngine=r;this._maxInflateSize=k*n;this._width=(void 0!==f.width?f.width:2)*n;this._option=f.option}next(){for(var a;a=this._inputGeometries.next();){if("esriGeometryEnvelope"===a.geometryType&&0<this._width){var f=a.asJSON();return 0>Math.min(f.xmax-
f.xmin,f.ymax-f.ymin)-2*this._width?a:q.GeometryCursor.fromJSONCIM({paths:[[[f.xmin+this._width,f.ymin+this._width],[f.xmax-this._width,f.ymin+this._width],[f.xmax-this._width,f.ymax-this._width],[f.xmin+this._width,f.ymax-this._width],[f.xmin+this._width,f.ymin+this._width]],[[f.xmin,f.ymin],[f.xmin,f.ymax],[f.xmax,f.ymax],[f.xmax,f.ymin],[f.xmin,f.ymin]]]})}if("esriGeometryPolygon"===a.geometryType){if(0===this._width)return a.clone();var n=this._geometryEngine;if(null==n)break;if(a=this._tileKey?
h.clipCursorToTileExtent(a,this._maxInflateSize):a.clone()){if(n=n.buffer(l.WebMercator,a.asJSON(),-this._width,1))for(f of n.rings)if(f){a.startPath();for(const c of f.reverse())a.pushXY(c[0],a.yFactor*c[1])}return a}}}return null}}e.EffectDonut=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectJog":function(){define(["exports","../../../geometry/GeometryCursor","../CIMCursor","../CurveHelper"],function(e,g,q,h){class m{static local(){null===m.instance&&
(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends q.PathEffectCursor{constructor(d,b,a){super(d,!1,!0);this._curveHelper=new h.CurveHelper;this._length=(void 0!==b.length?b.length:20)*a;this._angle=void 0!==b.angle?b.angle:225;this._position=void 0!==b.position?b.position:50;0>this._length&&(this._length=-this._length);20>this._position&&(this._position=20);80<this._position&&(this._position=80);this._mirror=!1}processPath(d){const b=g.GeometryCursor.createEmptyOptimizedCIM("esriGeometryPolyline");
if(this._curveHelper.isEmpty(d))return null;d.seekInPath(0);const a=d.x,f=d.y;d.seekInPath(d.pathSize-1);const n=d.x;d=d.y;this._curveHelper.normalize([n-a,d-f]);const c=a+(n-a)*this._position/100,r=f+(d-f)*this._position/100,k=Math.cos((90-this._angle)/180*Math.PI);let p=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(p=-p);this._mirror=!this._mirror;b.pushPath([[a,f],[c-this._length/2*k,r-this._length/2*p],[c+this._length/2*k,r+this._length/2*p],[n,d]]);return b}}e.EffectJog=m;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectMove":function(){define(["exports"],function(e){class g{static local(){null===g.instance&&(g.instance=new g);return g.instance}execute(h,m,l,d,b){return new q(h,m,l)}}g.instance=null;class q{constructor(h,m,l){this._inputGeometries=h;this._offsetX=void 0!==m.offsetX?m.offsetX*l:0;this._offsetY=void 0!==m.offsetY?m.offsetY*l:0}next(){let h=this._inputGeometries.next();for(;h;){if(0<h.totalSize)return this._move(h.clone(),this._offsetX,
this._offsetY);h=this._inputGeometries.next()}return null}_move(h,m,l){for(;h.nextPath();)for(;h.nextPoint();)h.x+=m,h.y+=l;h.reset();return h}}e.EffectMove=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectOffset":function(){define("exports ../../../geometry ../../../geometry/GeometryCursor ../../../geometry/geometryCursorCollectUtils ../../../geometry/support/jsonUtils ../CIMEffects ../CurveHelper ../enums ../../../geometry/SpatialReference".split(" "),
function(e,g,q,h,m,l,d,b,a){class f{static local(){null===f.instance&&(f.instance=new f);return f.instance}execute(c,r,k,p,t,w){return new n(c,r,k,p,t,w)}}f.instance=null;class n{constructor(c,r,k,p,t,w){this._inputGeometries=c;this._tileKey=p;this._geometryEngine=t;this._curveHelper=new d.CurveHelper;this._offset=(r.offset??1)*k;this._method=r.method;this._maxInflateSize=Math.max(Math.abs(w*k),10);this._option=r.option;this._offsetFlattenError=d.pixelTolerance*k}next(){for(var c;c=this._inputGeometries.next();){if(0===
this._offset)return c.clone();if("esriGeometryEnvelope"===c.geometryType){if(this._method===b.GeometricEffectOffsetMethod.Rounded&&0<this._offset){var r=h.collectPath(c);if(r=this._curveHelper.offset(r,-this._offset,this._method,4,this._offsetFlattenError))return c=q.GeometryCursor.createEmptyOptimizedCIM(c.geometryType),c.pushPath(r),c;break}r=c.asJSON();if(m.isExtent(r)&&0<Math.min(r.xmax-r.xmin,r.ymax-r.ymin)+2*this._offset)return q.GeometryCursor.fromJSONCIM({xmin:r.xmin-this._offset,xmax:r.xmax+
this._offset,ymin:r.ymin-this._offset,ymax:r.ymax+this._offset})}r=this._geometryEngine;if(null!=r&&(c=this._tileKey?l.clipCursorToTileExtent(c,this._maxInflateSize):c.clone()))return(c=r.offset(a.WebMercator,c.asJSON(),-this._offset,1,this._method,4,this._offsetFlattenError))?q.GeometryCursor.fromJSONCIM(c):null}return null}}e.EffectOffset=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectReverse":function(){define(["exports"],function(e){class g{static local(){null===
g.instance&&(g.instance=new g);return g.instance}execute(h,m,l,d,b){return new q(h,m,l)}}g.instance=null;class q{constructor(h,m,l){this._inputGeometries=h;this._reverse=void 0!==m.reverse?m.reverse:!0}next(){for(var h=this._inputGeometries.next();h;){if(!this._reverse)return h;if("esriGeometryPolyline"===h.geometryType){for(h=h.clone();h.nextPath();)for(let m=0;m<h.pathSize/2;m++){h.seekInPath(m);const l=h.x,d=h.y;h.seekInPath(h.pathSize-m-1);const b=h.x,a=h.y;h.x=l;h.y=d;h.seekInPath(m);h.x=b;h.y=
a}h.reset();return h}h=this._inputGeometries.next()}return null}}e.EffectReverse=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectRotate":function(){define(["exports","../../../geometry/support/boundsUtils"],function(e,g){class q{static local(){null===q.instance&&(q.instance=new q);return q.instance}execute(m,l,d,b,a){return new h(m,l,d)}}q.instance=null;class h{constructor(m,l,d){this._inputGeometries=m;this._rotateAngle=void 0!==l.angle?l.angle*Math.PI/
180:0}next(){let m=this._inputGeometries.next();for(;m;){if(0===this._rotateAngle||"esriGeometryPoint"===m.geometryType)return m;if(0<m.totalSize){var l=g.getCursorBoundsXY(m);const d=(l[2]+l[0])/2;l=(l[3]+l[1])/2;m.reset();return this._rotate(m.clone(),d,l)}m=this._inputGeometries.next()}return null}_rotate(m,l,d){const b=Math.cos(this._rotateAngle),a=Math.sin(this._rotateAngle);for(;m.nextPath();)for(;m.nextPoint();){const f=m.x-l,n=m.y-d;m.x=l+f*b-n*a;m.y=d+f*a+n*b}m.reset();return m}}e.EffectRotate=
q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectScale":function(){define(["exports","../../../geometry/support/boundsUtils"],function(e,g){class q{static local(){null===q.instance&&(q.instance=new q);return q.instance}execute(m,l,d,b,a){return new h(m,l,d)}}q.instance=null;class h{constructor(m,l,d){this._inputGeometries=m;this._xFactor=void 0!==l.xScaleFactor?l.xScaleFactor:1.15;this._yFactor=void 0!==l.yScaleFactor?l.yScaleFactor:1.15}next(){const m=
this._inputGeometries.next();if(m){if(1===this._xFactor&&1===this._yFactor||"esriGeometryPoint"===m.geometryType)return m;if(0<m.totalSize){var l=g.getCursorBoundsXY(m);const d=(l[2]+l[0])/2;l=(l[3]+l[1])/2;m.reset();return this._scaleCursor(m.clone(),d,l)}}return null}_scaleCursor(m,l,d){for(;m.nextPath();)for(;m.nextPoint();)m.x=l+(m.x-l)*this._xFactor,m.y=d+(m.y-d)*this._yFactor;m.reset();return m}}e.EffectScale=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/EffectWave":function(){define(["exports",
"../../../geometry/GeometryCursor","../enums","../GeometryWalker"],function(e,g,q,h){class m{static local(){null===m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l{constructor(d,b,a){this._inputGeometries=d;this._height=(void 0!==b.amplitude?b.amplitude:2)*a;this._period=(void 0!==b.period?b.period:3)*a;this._style=b.waveform;0>=this._height&&(this._height=Math.abs(this._height));0>=this._period&&(this._period=Math.abs(this._period));
this._pattern=new h.DashPattern;this._pattern.addValue(this._period);this._pattern.addValue(this._period);this._walker=new h.GeometryWalker;this._walker.updateTolerance(a)}next(){for(var d=this._inputGeometries.next();d;){if(0===this._height||0===this._period||(d=this._processGeom(d)))return d;d=this._inputGeometries.next()}return null}_processGeom(d){const b=g.GeometryCursor.createEmptyOptimizedCIM(d.geometryType);for(;d.nextPath();){b.startPath();const a=d.pathLength();if(this._walker.init(d,this._pattern))switch(this._style){default:this._constructCurve(b,
a,!1);break;case q.GeometricEffectWaveform.Square:this._constructSquare(b,a);break;case q.GeometricEffectWaveform.Triangle:this._constructTriangle(b,a);break;case q.GeometricEffectWaveform.Random:this._constructCurve(b,a,!0)}else for(;d.nextPoint();)b.pushXY(d.x,d.y)}return b}_constructCurve(d,b,a){var f=Math.round(b/this._period);0===f&&(f=1);const n=this._period/16,c=1/(16*f+1);b=2*Math.PI*b/(b/f);f=2*Math.PI*Math.random();const r=2*Math.PI*Math.random(),k=2*Math.PI*Math.random(),p=.75-Math.random()/
2,t=.75-Math.random()/2,w=new h.Pos;this._walker.curPointAndAngle(w);d.pushPoint(w.pt);let u=0;for(;;)if(this._walker.nextPointAndAngle(n,w)){const y=u;u+=c;let x;if(a){const v=this._height/2*(1+.3*Math.sin(p*b*y+f));x=v*Math.sin(b*y+r);x+=v*Math.sin(t*b*y+k);x/=2}else x=.5*this._height*Math.sin(.5*b*y);d.pushXY(w.pt[0]-x*w.sa,w.pt[1]+x*w.ca)}else{d.pushPoint(this._walker.getPathEnd());break}}_constructSquare(d,b){Math.round(b/this._period);for(b=!0;;){let a=!1;if(this._walker.curPositionIsValid()){const f=
new h.Pos;this._walker.curPointAndAngle(f);const n=new h.Pos;if(this._walker.nextPointAndAngle(this._period,n)){const c=new h.Pos;this._walker.nextPointAndAngle(this._period,c)&&(b?(d.pushPoint(f.pt),b=!1):d.pushPoint(f.pt),d.pushXY(f.pt[0]-this._height/2*f.sa,f.pt[1]+this._height/2*f.ca),d.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),d.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),d.pushXY(c.pt[0]+this._height/2*c.sa,c.pt[1]-this._height/2*c.ca),a=!0)}}if(!a){d.pushPoint(this._walker.getPathEnd());
break}}}_constructTriangle(d,b){Math.round(b/this._period);for(b=!0;;){let a=!1;if(this._walker.curPositionIsValid()){const f=new h.Pos;this._walker.curPointAndAngle(f);const n=new h.Pos;if(this._walker.nextPointAndAngle(this._period/2,n)){const c=new h.Pos;this._walker.nextPointAndAngle(this._period,c)&&(this._walker.nextPosition(this._period/2)&&(b?(d.pushPoint(f.pt),b=!1):d.pushPoint(f.pt),d.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),d.pushXY(c.pt[0]+this._height/2*c.sa,c.pt[1]-
this._height/2*c.ca)),a=!0)}}if(!a){d.pushPoint(this._walker.getPathEnd());break}}}}e.EffectWave=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementAlongLineSameSize":function(){define(["exports","../CIMCursor","../enums","../GeometryWalker"],function(e,g,q,h){class m{static local(){null===m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends g.PathTransformationCursor{constructor(d,
b,a){super(d);this._geometryWalker=new h.GeometryWalker;this._geometryWalker.updateTolerance(a);this._angleToLine=b.angleToLine??!0;this._offset=(b.offset?b.offset:0)*a;this._originalEndings=b.endings;this._offsetAtEnd=(b.customEndingOffset?b.customEndingOffset:0)*a;this._position=-(b.offsetAlongLine?b.offsetAlongLine:0)*a;this._pattern=new h.DashPattern;this._pattern.init(b.placementTemplate,!1);this._pattern.scale(a);this._endings=this._originalEndings}processPath(d){if(this._pattern.isEmpty())return null;
if(this.iteratePath)var b=this._pattern.nextValue();else{this._endings=this._originalEndings===q.PlacementEndings.WithFullGap&&this.isClosed?q.PlacementEndings.WithMarkers:this._originalEndings;this._pattern.extPtGap=0;let a=!0;switch(this._endings){case q.PlacementEndings.NoConstraint:b=-this._position;b=this._adjustPosition(b);a=!1;break;default:b=-this._pattern.lastValue()/2;break;case q.PlacementEndings.WithFullGap:b=-this._pattern.lastValue();this._pattern.extPtGap=this._pattern.lastValue();
break;case q.PlacementEndings.WithMarkers:b=0;break;case q.PlacementEndings.Custom:b=-this._position,b=this._adjustPosition(b),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(d,this._pattern,a))return null;this._pattern.reset();for(d=0;b>d;)b-=d,d=this._pattern.nextValue();b=d-b;this.iteratePath=!0}d=new h.Pos;if(!this._geometryWalker.nextPointAndAngle(b,d)||this._endings===q.PlacementEndings.WithFullGap&&this._geometryWalker.isPathEnd())return this.iteratePath=!1,null;if(this._endings===
q.PlacementEndings.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed))return null;this.internalPlacement.setTranslate(d.pt[0]-this._offset*d.sa,d.pt[1]+this._offset*d.ca);this._angleToLine&&this.internalPlacement.setRotateCS(d.ca,d.sa);return this.internalPlacement}_adjustPosition(d){d/=this._pattern.length();d-=Math.floor(d);return d*this._pattern.length()}}e.PlacementAlongLineSameSize=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementAtExtremities":function(){define(["exports",
"../CIMCursor","../CurveHelper","../enums"],function(e,g,q,h){class m{static local(){null===m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends g.PathTransformationCursor{constructor(d,b,a){super(d,!1,!0);this._curveHelper=new q.CurveHelper;this._placePerPart=b.placePerPart??!1;this._angleToLine=void 0!==b.angleToLine?b.angleToLine:!0;this._offset=void 0!==b.offset?b.offset*a:0;this._type=b.extremityPlacement;this._position=void 0!==
b.offsetAlongLine?b.offsetAlongLine*a:0;this._beginProcessed=!1}processMultiPath(d){return this._placePerPart?super.processMultiPath(d):this.processPath(d)}processPath(d){let b;switch(this._type){default:this._beginProcessed?(b=this._atExtremities(d,this._position,!1),this.iteratePath=this.iterateMultiPath=this._beginProcessed=!1):(b=this._atExtremities(d,this._position,!0),this.iteratePath=this.iterateMultiPath=this._beginProcessed=!0);break;case h.ExtremityPlacement.JustBegin:b=this._atExtremities(d,
this._position,!0);break;case h.ExtremityPlacement.JustEnd:b=this._atExtremities(d,this._position,!1);case h.ExtremityPlacement.None:}return b}_atExtremities(d,b,a){this._placePerPart||(a?d.seekPath(0):d.seekPath(d.totalSize-1));a||d.seekPathEnd();if(a?d.nextPoint():d.prevPoint()){let f=0,[n,c]=[0,0],[r,k]=[d.x,d.y];for(;a?d.nextPoint():d.prevPoint();){n=r;c=k;r=d.x;k=d.y;const p=this._curveHelper.getLength(n,c,r,k);if(f+p>b){d=(b-f)/p;const [t,w]=this._curveHelper.getAngleCS(n,c,r,k,d);d=this._curveHelper.getCoord2D(n,
c,r,k,d);this.internalPlacement.setTranslate(d[0]-this._offset*w,d[1]+this._offset*t);this._angleToLine&&this.internalPlacement.setRotateCS(-t,-w);return this.internalPlacement}f+=p}}return null}}e.PlacementAtExtremities=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementAtRatioPositions":function(){define(["exports","../CIMCursor","../GeometryWalker"],function(e,g,q){class h{static local(){null===h.instance&&(h.instance=new h);return h.instance}execute(l,
d,b,a,f){return new m(l,d,b)}}h.instance=null;class m extends g.PathTransformationCursor{constructor(l,d,b){super(l);this._walker=new q.GeometryWalker;this._walker.updateTolerance(b);this._angleToLine=void 0!==d.angleToLine?d.angleToLine:!0;this._offset=void 0!==d.offset?d.offset*b:0;this._beginGap=void 0!==d.beginPosition?d.beginPosition*b:0;this._endGap=void 0!==d.endPosition?d.endPosition*b:0;this._flipFirst=void 0!==d.flipFirst?d.flipFirst:!0;this._pattern=new q.DashPattern;this._pattern.init(d.positionArray,
!1,!1);this._subPathLen=0;this._posCount=this._pattern.size();this._isFirst=!0;this._prevPos=0}processPath(l){if(this._pattern.isEmpty())return null;if(this.iteratePath){l=this._pattern.nextValue()*this._subPathLen;var d=this._beginGap+l;l=d-this._prevPos;this._prevPos=d}else{this._posCount=this._pattern.size();this._isFirst=!0;this._prevPos=0;this._subPathLen=l.pathLength()-this._beginGap-this._endGap;if(0>this._subPathLen)return this.iteratePath=!1,null;if(!this._walker.init(l,this._pattern,!1))return null;
this._pattern.reset();l=this._pattern.nextValue()*this._subPathLen;d=this._beginGap+l;l=d-this._prevPos;this._prevPos=d;this.iteratePath=!0}d=new q.Pos;if(!this._walker.nextPointAndAngle(l,d,q.EndType.END))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(d.pt[0]-this._offset*d.sa,d.pt[1]+this._offset*d.ca);l=this._isFirst&&this._flipFirst;let b;this._angleToLine?(b=d.ca,d=d.sa):(b=1,d=0);l&&(b=-b,d=-d);this.internalPlacement.setRotateCS(b,d);this._isFirst=!1;this._posCount--;0===
this._posCount&&(this.iteratePath=!1);return this.internalPlacement}}e.PlacementAtRatioPositions=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementInsidePolygon":function(){define(["exports","../../../core/RandomLCG","../CIMPlacements","../enums"],function(e,g,q,h){class m{static local(){null===m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a,f,n)}}m.instance=null;class l{constructor(d,b,a,f,n){this._currentY=
this._currentX=this._yMax=this._yMin=this._xMax=this._xMin=0;this._accelerationMap=null;this._testInsidePolygon=!1;this._verticalSubdivision=!0;this._stepX=Math.abs(b.stepX??16)*a;this._stepY=Math.abs(b.stepY??16)*a;this._stepX=Math.round(128*this._stepX)/128;this._stepY=Math.round(128*this._stepY)/128;if(0!==this._stepX&&0!==this._stepY){this._gridType=b.gridType??h.PlacementGridType.Fixed;if(this._gridType===h.PlacementGridType.Random)this._randomLCG=new g(1*(b.seed??13)),this._randomness=(b.randomness??
100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._offsetY=this._offsetX=this._sinAngle=0,this._buildRandomValues();else{this._randomness=0;this._gridAngle=b.gridAngle??0;this._shiftOddRows=b.shiftOddRows??!1;this._offsetX=(b.offsetX??0)*a;this._offsetY=(b.offsetY??0)*a;this._cosAngle=Math.cos(this._gridAngle/180*Math.PI);this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI);if(this._stepX)if(0>this._offsetX)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=
.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(0>this._offsetY)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}this._graphicOriginY=this._graphicOriginX=0;if(null!=f){const [c,r,k,p]=f.split("/");b=parseFloat(c);a=parseFloat(r);f=parseFloat(k);this._graphicOriginX=512*-(parseFloat(p)*2**b+f);this._graphicOriginY=512*a;this._testInsidePolygon=!0}this._internalPlacement=new q.Placement;this._calculateMinMax(d);
this._geometryCursor=d}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!l._randValues){l._randValues=[];for(let d=0;24>d;d++)for(let b=0;24>b;b++)l._randValues.push(this._randomLCG.getFloat()),l._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(d){this._yMax=this._yMin=this._xMax=this._xMin=0;let b,a,f,n,c,r,k,p;b=a=k=c=Number.MAX_VALUE;f=n=p=r=-Number.MAX_VALUE;var t=1!==this._cosAngle;for(d.reset();d.nextPath();)for(;d.nextPoint();){var w=d.x;var u=
d.y;var y=w-this._graphicOriginX-this._offsetX;var x=u-this._graphicOriginY-this._offsetY;if(t){var v=this._cosAngle*y-this._sinAngle*x;y=this._sinAngle*y+this._cosAngle*x}else v=y,y=x;b=Math.min(b,v);f=Math.max(f,v);a=Math.min(a,y);n=Math.max(n,y);c=Math.min(c,u);r=Math.max(r,u);k=Math.min(k,w);p=Math.max(p,w)}c=c!==Number.MAX_VALUE?c:-512-this._stepY;r=r!==-Number.MAX_VALUE?r:this._stepY;k=k!==Number.MAX_VALUE?k:-this._stepX;p=p!==-Number.MAX_VALUE?p:512+this._stepX;this._polygonMin=(this._verticalSubdivision=
r-c>=p-k)?c:k;if(this._testInsidePolygon){v=0-this._graphicOriginX-this._offsetX-this._stepX;u=512-this._graphicOriginX-this._offsetX+this._stepX;w=-512-this._graphicOriginY-this._offsetY-this._stepY;y=0-this._graphicOriginY-this._offsetY+this._stepY;if(t){t=[[v,w],[v,y],[u,w],[u,y]];v=w=Number.MAX_VALUE;u=y=-Number.MAX_VALUE;for(const A of t)t=this._cosAngle*A[0]-this._sinAngle*A[1],x=this._sinAngle*A[0]+this._cosAngle*A[1],v=Math.min(v,t),u=Math.max(u,t),w=Math.min(w,x),y=Math.max(y,x)}b=b!==Number.MAX_VALUE?
Math.max(b,v):v;a=a!==Number.MAX_VALUE?Math.max(a,w):w;f=f!==-Number.MAX_VALUE?Math.min(f,u):u;n=n!==-Number.MAX_VALUE?Math.min(n,y):y}this._xMin=Math.round(b/this._stepX);this._xMax=Math.round(f/this._stepX);this._yMin=Math.round(a/this._stepY);this._yMax=Math.round(n/this._stepY);this._currentX=this._xMax+1;this._currentY=this._yMin-1;this._buildAccelerationMap(d,k,p,c,r)}_buildAccelerationMap(d,b,a,f,n){d.reset();const c=new Map,r=this._verticalSubdivision;a=r?n-f:a-b;n=Math.ceil(a/10);if(!(1>=
n)){a=Math.floor(a/n);n++;this._delta=a;var k,p;if(r){n=-512-2*this._stepY;var t=2*this._stepY;var w=f}else n=-2*this._stepX,t=512+2*this._stepX,w=b;for(;d.nextPath();)if(!(2>d.pathSize)&&d.nextPoint()){var u=d.x;for(k=d.y;d.nextPoint();u=b,k=f){b=d.x;f=d.y;if(r){if(k===f||k<n&&f<n||k>t&&f>t)continue;var y=Math.min(k,f);var x=Math.max(k,f)}else{if(u===b||u<n&&b<n||u>t&&b>t)continue;y=Math.min(u,b);x=Math.max(u,b)}for(;y<x;){var v=p=Math.floor((y-w)/a),A=u,z=k,B=b,D=f,F=c;let E=F.get(v);E||(E=[],F.set(v,
E));E.push([[A,z],[B,D]]);y+=a}y=Math.floor((x-w)/a);y>p&&(x=b,v=f,A=c,z=A.get(y),z||(z=[],A.set(y,z)),z.push([[u,k],[x,v]]))}}this._accelerationMap=c}}_nextInside(){for(;;){if(this._currentX>this._xMax){this._currentY++;if(this._currentY>this._yMax)return null;this._currentX=this._xMin;this._shiftOddRows&&this._currentY%2&&this._currentX--}var d=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(d+=.5*this._stepX);const b=this._currentY*this._stepY+this._offsetY;this._currentX++;
let a;if(this._gridType===h.PlacementGridType.Random){const f=(this._currentX%24+24)%24,n=(this._currentY%24+24)%24;a=this._graphicOriginX+d+this._stepX*this._randomness*(.5-l._randValues[24*n+f])*2/3;d=this._graphicOriginY+b+this._stepY*this._randomness*(.5-l._randValues[24*n+f+1])*2/3}else a=this._graphicOriginX+this._cosAngle*d+this._sinAngle*b,d=this._graphicOriginY-this._sinAngle*d+this._cosAngle*b;if(!this._testInsidePolygon||this._isInsidePolygon(a,d,this._geometryCursor))return this._internalPlacement.setTranslate(a,
d),this._internalPlacement}}_isInsidePolygon(d,b,a){if(null==this._accelerationMap){var f=0,n;let k;d+=1E-6;b+=1E-6;for(a.reset();a.nextPath();)if(a.nextPoint()){var c=a.x;for(n=a.y;a.nextPoint();c=r,n=k){var r=a.x;k=a.y;n>b!==k>b&&(0<(r-c)*(b-n)-(k-n)*(d-c)?f++:f--)}}return 0!==f}d+=1E-6;b+=1E-6;a=this._verticalSubdivision;n=this._accelerationMap.get(Math.floor(((a?b:d)-this._polygonMin)/this._delta));if(!n)return!1;c=0;for(f of n){n=f[0];r=f[1];if(a){if(n[1]>b===r[1]>b)continue;n=(r[0]-n[0])*(b-
n[1])-(r[1]-n[1])*(d-n[0])}else{if(n[0]>d===r[0]>d)continue;n=(r[1]-n[1])*(d-n[0])-(r[0]-n[0])*(b-n[1])}0<n?c++:c--}return 0!==c}}e.PlacementInsidePolygon=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementOnLine":function(){define(["exports","../CIMCursor","../CurveHelper","../enums"],function(e,g,q,h){class m{static local(){null===m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends g.PathTransformationCursor{constructor(d,
b,a){super(d);this._curveHelper=new q.CurveHelper;this._angleToLine=void 0!==b.angleToLine?b.angleToLine:!0;this._offset=void 0!==b.offset?b.offset*a:0;this._relativeTo=b.relativeTo;this._position=void 0!==b.startPointOffset?b.startPointOffset*a:0;this._epsilon=.001*a}processPath(d){var b=this._position;if(this._relativeTo===h.PlacementOnLineRelativeTo.SegmentMidpoint){this.iteratePath||(this.iteratePath=!0);if(d.nextPoint()){let [a,f]=[d.x,d.y],[n,c]=[0,0];for(;d.nextPoint();){n=d.x;c=d.y;b=this._curveHelper.getLength(a,
f,n,c);if(b<this._epsilon){a=n;f=c;continue}d=.5+this._position/b;const [r,k]=this._curveHelper.getAngleCS(a,f,n,c,d);d=this._curveHelper.getCoord2D(a,f,n,c,d);this.internalPlacement.setTranslate(d[0]-this._offset*k,d[1]+this._offset*r);this._angleToLine&&this.internalPlacement.setRotateCS(r,k);return this.internalPlacement}}this.iteratePath=!1;return null}return this.onLine(d,b,this._relativeTo===h.PlacementOnLineRelativeTo.LineEnd)}onLine(d,b,a){let f=!1;switch(this._relativeTo){default:d.seekPathStart();
b=d.pathLength()/2+b;break;case h.PlacementOnLineRelativeTo.LineBeginning:break;case h.PlacementOnLineRelativeTo.LineEnd:f=!0}a?d.seekPathEnd():d.seekPathStart();let n=0;if(a?d.prevPoint():d.nextPoint()){let [c,r]=[d.x,d.y],[k,p]=[0,0];for(;a?d.prevPoint():d.nextPoint();){k=d.x;p=d.y;const t=this._curveHelper.getLength(c,r,k,p);if(n+t>b){d=(b-n)/t;const [w,u]=this._curveHelper.getAngleCS(c,r,k,p,d);d=this._curveHelper.getCoord2D(c,r,k,p,d);a=f?-this._offset:this._offset;this.internalPlacement.setTranslate(d[0]-
a*u,d[1]+a*w);this._angleToLine&&(f?this.internalPlacement.setRotateCS(-w,-u):this.internalPlacement.setRotateCS(w,u));return this.internalPlacement}c=k;r=p;n+=t}}return null}}e.PlacementOnLine=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementOnVertices":function(){define(["exports","../CIMCursor","../CurveHelper"],function(e,g,q){function h(d,b){const a=Math.PI;for(;Math.abs(b-d)>a+2E-15;)b=b-d>a?b-2*a:b+2*a;return(d+b)/2}class m{static local(){null===
m.instance&&(m.instance=new m);return m.instance}execute(d,b,a,f,n){return new l(d,b,a)}}m.instance=null;class l extends g.PathTransformationCursor{constructor(d,b,a){super(d);this._curveHelper=new q.CurveHelper;this._angleToLine=void 0!==b.angleToLine?b.angleToLine:!0;this._offset=void 0!==b.offset?b.offset*a:0;this._endPoints=void 0!==b.placeOnEndPoints?b.placeOnEndPoints:!0;this._controlPoints=void 0!==b.placeOnControlPoints?b.placeOnControlPoints:!0;this._regularVertices=void 0!==b.placeOnRegularVertices?
b.placeOnRegularVertices:!0;this._tags=[];this._tagIterator=0}processPath(d){this.iteratePath||(this._preparePath(d),this.iteratePath=!0);if(this._tagIterator>=this._tags.length)return this._tagIterator=this._tags.length=0,this.iteratePath=!1,null;d=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(d[2]);let b=d[0],a=d[1];if(0!==this._offset){const f=Math.cos(d[2]);b-=this._offset*Math.sin(d[2]);a+=this._offset*f}this.internalPlacement.setTranslate(b,a);this._tagIterator++;
return this.internalPlacement}_preparePath(d){this._tagIterator=this._tags.length=0;d.seekPathStart();const b=d.isClosed();let a=0,f=!1,n=0,c=0;d.seekPathStart();if(d.nextPoint()){let r=d.x,k=d.y,p=d.getControlPoint(),t=!0,w=d.nextPoint();for(;w;){const u=d.x,y=d.y,x=d.getControlPoint();if(this._angleToLine||0!==this._offset)n=this._curveHelper.getAngle(r,k,u,y,0);t?(t=!1,b?(a=n,f=p):(this._endPoints||this._controlPoints&&p)&&this._tags.push([r,k,n])):p?this._controlPoints&&this._tags.push([r,k,h(c,
n)]):this._regularVertices&&this._tags.push([r,k,h(c,n)]);if(this._angleToLine||0!==this._offset)c=this._curveHelper.getAngle(r,k,u,y,1);(w=d.nextPoint())||(b?x||f?this._controlPoints&&this._tags.push([u,y,h(c,a)]):this._regularVertices&&this._tags.push([u,y,h(c,a)]):(this._endPoints||this._controlPoints&&x)&&this._tags.push([u,y,c]));r=u;k=y;p=x}}this._tagIterator=0}}e.PlacementOnVertices=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/PlacementPolygonCenter":function(){define("exports ../../../geometry/support/boundsUtils ../../../geometry/support/centroid ../../../geometry/support/labelPoint ../CIMPlacements ../enums".split(" "),
function(e,g,q,h,m,l){class d{static local(){null===d.instance&&(d.instance=new d);return d.instance}execute(a,f,n,c,r){return new b(a,f,n)}}d.instance=null;class b{constructor(a,f,n){this._geometryCursor=a;this._offsetX=void 0!==f.offsetX?f.offsetX*n:0;this._offsetY=void 0!==f.offsetY?f.offsetY*n:0;this._method=void 0!==f.method?f.method:l.PlacementPolygonCenterMethod.OnPolygon;this._internalPlacement=new m.Placement}next(){const a=this._geometryCursor;this._geometryCursor=null;return a?this._polygonCenter(a):
null}_polygonCenter(a){let f=!1;switch(this._method){case l.PlacementPolygonCenterMethod.CenterOfMass:if(a=q.weightedAreaCentroid(a))this._internalPlacement.setTranslate(a[0]+this._offsetX,a[1]+this._offsetY),f=!0;break;case l.PlacementPolygonCenterMethod.BoundingBoxCenter:if(a=g.getCursorBoundsXY(a))this._internalPlacement.setTranslate((a[2]+a[0])/2+this._offsetX,(a[3]+a[1])/2+this._offsetY),f=!0;break;default:a=h.getLabelPoint(a),null!==a&&(this._internalPlacement.setTranslate(a[0]+this._offsetX,
a[1]+this._offsetY),f=!0)}return f?this._internalPlacement:null}}e.PlacementPolygonCenter=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/labelPoint":function(){define("exports ../../core/PriorityQueue ./aaBoundingRect ./boundsUtils ./centroid ./coordsUtils ./intersectsBase".split(" "),function(e,g,q,h,m,l,d){function b(p,t){let w=0,u,y,x,v;for(t.reset();t.nextPath()&&t.nextPoint();)for(u=t.x,y=t.y;t.nextPoint();u=x,y=v)x=t.x,v=t.y,y>p[1]!==v>p[1]&&(0<(x-u)*
(p[1]-y)-(v-y)*(p[0]-u)?w++:w--);return 0!==w}function a(p,t,w){if(w&&b(p,t))return{coord:p,distance:0};w=Infinity;let u=0,y=0;var x=[0,0];let v=[0,0];const A=[0,0];for(t.reset();t.nextPath()&&t.nextPoint();)if(!(2>t.pathSize))for(x[0]=t.x,x[1]=t.y;t.nextPoint();x=v)v=[t.x,t.y],l.projectPointOnLineSeg(A,p,x,v),x=c(p,A),x<w&&(w=x,u=A[0],y=A[1]);return{coord:[u,y],distance:Math.sqrt(w)}}function f(p,t,w,u){w=[t,0];let y=Infinity,x=Infinity,v=!1,A=!1;t=[[t,u[1]-1],[t,u[3]+1]];u=[0,0];const z=[0,0],B=
[0,0],D=[[0,0],[0,0]],F=q.create();for(p.reset();p.nextPath()&&p.nextPoint();)if(!(2>p.pathSize))for(D[0][0]=p.x,D[0][1]=p.y;p.nextPoint();D[0][0]=D[1][0],D[0][1]=D[1][1]){D[1][0]=p.x;D[1][1]=p.y;a:{var E=F;var C=D;if(2>C.length){E=null;break a}E||=q.create();const [H,K]=C[0],[J,O]=C[1];E[0]=Math.min(H,J);E[1]=Math.min(K,O);E[2]=Math.max(H,J);E[3]=Math.max(K,O)}if(null!==E){z[0]=t[0][0];z[1]=t[0][1];B[0]=t[1][0];B[1]=t[1][1];a:{E=F;C=z;var G=B;let H=n(C,E),K=n(G,E);const J=E[0],O=E[1],Q=E[2],T=E[3];
if(H&K){E=0;break a}if(!(H|K)){E=4;break a}const I=(H?1:0)|(K?2:0);do{const L=G[0]-C[0],R=G[1]-C[1];if(L>R)H&3?(H&1?(C[1]+=R*(J-C[0])/L,C[0]=J):(C[1]+=R*(Q-C[0])/L,C[0]=Q),H=n(C,E)):K&3?(K&1?(G[1]+=R*(J-G[0])/L,G[0]=J):(G[1]+=R*(Q-G[0])/L,G[0]=Q),K=n(G,E)):H?(H&4?(C[0]+=L*(O-C[1])/R,C[1]=O):(C[0]+=L*(T-C[1])/R,C[1]=T),H=n(C,E)):(K&4?(G[0]+=L*(O-G[1])/R,G[1]=O):(G[0]+=L*(T-G[1])/R,G[1]=T),K=n(G,E));else if(H&12?(H&4?(C[0]+=L*(O-C[1])/R,C[1]=O):(C[0]+=L*(T-C[1])/R,C[1]=T),H=n(C,E)):K&12?(K&4?(G[0]+=
L*(O-G[1])/R,G[1]=O):(G[0]+=L*(T-G[1])/R,G[1]=T),K=n(G,E)):H?(H&1?(C[1]+=R*(J-C[0])/L,C[0]=J):(C[1]+=R*(Q-C[0])/L,C[0]=Q),H=n(C,E)):(K&1?(G[1]+=R*(J-G[0])/L,G[0]=J):(G[1]+=R*(Q-G[0])/L,G[0]=Q),K=n(G,E)),H&K){E=0;break a}}while(H|K);E=I}0!==E&&d.segmentIntersects(t[0],t[1],D[0],D[1],u)&&(E=u[1],y>x?E<y&&(y=E,v=!0):E<x&&(x=E,A=!0))}}v&&A?w[1]=(y+x)/2:w[0]=w[1]=NaN;return w}function n(p,t){return(p[0]<t[0]?1:0)|(p[0]>t[2]?1:0)<<1|(p[1]<t[1]?1:0)<<2|(p[1]>t[3]?1:0)<<3}function c(p,t){return(p[0]-t[0])*
(p[0]-t[0])+(p[1]-t[1])*(p[1]-t[1])}function r(p,t){if(p<t)return-1;if(p>t)return 1;if(p===t)return 0;p=isNaN(p);t=isNaN(t);return p<t?-1:p>t?1:0}class k{constructor(p,t,w,u){this.x=p;this.y=t;this.cellSize=w;this.distancefromCellCenter=l.distanceFromPointToPolygon(p,t,u);this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}e.getLabelPoint=function(p){if(0===p.totalSize)return null;var t=h.getCursorBoundsXY(p);if(!t)return null;var w=8.8818E-14*(Math.abs(t[0])+Math.abs(t[2])+
Math.abs(t[1])+Math.abs(t[3])+1),u=0,y=0;p.reset();for(var x=0;p.nextPath();x++){var v=p.getCurrentRingArea();v>y&&(y=v,u=x)}p.seekPath(u);if(0===p.pathSize)return null;p.seekPathStart();v=h.getCursorPathBounds(p);if(Math.abs(y)<=2*w*w)return[(v[0]+v[2])/2,(v[1]+v[3])/2];p.seekPathStart();var A=m.ringCentroidCursorXY(p,q.create());if(null===A)return null;if(4>p.totalPoints)return A;y=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]];u=[NaN,NaN,NaN,NaN];x=[NaN,NaN,NaN,NaN];var z=!1,B=a(A,p,!0);0===B.distance&&
(z=!0,y[0][0]=A[0],y[0][1]=A[1],B=a(A,p,!1));u[0]=B.distance;x[0]=0;var D=[NaN,NaN];let F=!1,E=.25,C=-1;B=NaN;do{B=NaN;var G=v[0];y[1]=f(p,G+(v[2]-G)*E,w,t);isNaN(y[1][0])||isNaN(y[1][1])||(B=a(y[1],p,!1),B=B.distance);if(!isNaN(B)&&B>w&&b(y[1],p))F=!0,u[1]=B,x[1]=c(y[1],A);else if(!isNaN(B)&&B>C&&(C=B,D[0]=y[1][0],D[1]=y[1][1]),E-=.01,.1>E)if(0<=C)F=!0,u[1]=C,y[1][0]=D[0],y[1][1]=D[1],x[1]=c(y[1],A);else break}while(!F);F=!1;E=.5;C=-1;G=.01;let H=1;do{B=NaN;var K=v[0];y[2]=f(p,K+(v[2]-K)*E,w,t);
isNaN(y[2][0])||isNaN(y[2][1])||(B=a(y[2],p,!1),B=B.distance);if(!isNaN(B)&&B>w&&b(y[2],p))F=!0,u[2]=B,x[2]=c(y[2],A);else if(!isNaN(B)&&B>C)C=B,D[0]=y[2][0],D[1]=y[2][1];else if(B>C&&(C=B,D[0]=y[2][0],D[1]=y[2][1]),E=.5+G*H,G+=.01,H*=-1,.3>E||.7<E)if(0<=C)F=!0,u[2]=C,y[2][0]=D[0],y[2][1]=D[1],x[2]=c(y[2],A);else break}while(!F);F=!1;E=.75;C=-1;do if(B=NaN,G=v[0],y[3]=f(p,G+(v[2]-G)*E,w,t),isNaN(y[3][0])||isNaN(y[3][1])||(B=a(y[3],p,!1),B=B.distance),!isNaN(B)&&B>w&&b(y[3],p))F=!0,u[3]=B,x[3]=c(y[3],
A);else if(B>C&&(C=B,D[0]=y[3][0],D[1]=y[3][1]),E+=.01,.9<E)if(0<=C)F=!0,u[3]=C,y[3][0]=D[0],y[3][1]=D[1],x[3]=c(y[3],A);else break;while(!F);p=[0,1,2,3];t=z?0:1;for(v=t;4>v;v++)for(z=t;3>z;z++)A=x[z],D=x[z+1],0<r(A,D)&&(w=p[z],p[z]=p[z+1],p[z+1]=w,x[z]=D,x[z+1]=A);x=t;for(v=w=0;4>t;t++){switch(t){case 0:v=2*u[p[t]];break;case 1:v=1.66666666*u[p[t]];break;case 2:v=1.33333333*u[p[t]];break;case 3:v=u[p[t]]}v>w&&(w=v,x=p[t])}return y[x]};e.getPolylabelPoint=function(p){if(!p.nextPath()||!p.pathSize)return null;
var t=h.getCursorPathBounds(p),w=t[2]-t[0],u=t[3]-t[1];if(0===w||0===u)return[t[0]+w/2,t[1]+u/2];const y=Math.max(Math.min(w,u)/100,1),x=new g((z,B)=>B.maxDistanceToPolygon-z.maxDistanceToPolygon);u=Math.min(w,u);w=u/2;let v=0,A=0;for(v=t[0];v<t[2];v+=u)for(A=t[1];A<t[3];A+=u)x.enqueue(new k(v+w,A+w,w,p));p.reset();p.nextPath();t=m.ringsCentroidCursor(p);if(null===t)return null;for(t=new k(t[0],t[1],0,p);0<x.size;)u=x.dequeue(),u.distancefromCellCenter>t.distancefromCellCenter&&(t=u),u.maxDistanceToPolygon-
t.distancefromCellCenter<=y||(w=u.cellSize/2,x.enqueue(new k(u.x-w,u.y-w,w,p)),x.enqueue(new k(u.x+w,u.y-w,w,p)),x.enqueue(new k(u.x-w,u.y+w,w,p)),x.enqueue(new k(u.x+w,u.y+w,w,p)));return[t.x,t.y]};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/PriorityQueue":function(){define(function(){class e{constructor(q=g){this._data=[];this._compare=q}get size(){return this._data.length}enqueue(q){if(null!=q){var {_data:h,_compare:m}=this;h.push(q);q=h.length-1>>>0;for(var l=h[q];0<
q;){const d=q-1>>1,b=h[d];if(0>=m(b,l))h[d]=l,h[q]=b,q=d;else break}}}dequeue(){const {_data:q,_compare:h}=this,m=q[0];var l=q.pop();if(0===q.length)return m;q[0]=l;l=0;const d=q.length,b=q[0];let a;let f=null;for(;;){var n=2*l+1;const c=2*l+2;f=null;n<d&&(a=q[n],0<h(a,b)&&(f=n));c<d&&(n=q[c],null===f&&0>=h(n,b)||null!==f&&0>=h(n,a))&&(f=c);if(null===f)break;q[l]=q[f];q[f]=b;l=f}return m}}const g=(q,h)=>q<h?-1:q>h?1:0;return e})},"esri/symbols/cim/imageUtils":function(){define(["exports"],function(e){e.getFirstFrame=
function(g){const q=g.getFrame(0);if(q instanceof HTMLImageElement||q instanceof HTMLCanvasElement)return q;const h=document.createElement("canvas");h.width=g.width;h.height=g.height;g=h.getContext("2d");q instanceof ImageData?g.putImageData(q,0,0):g.drawImage(q,0,0);return h};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/Rect":function(){define(function(){class e{constructor(g=0,q=0,h=0,m=0){this.x=g;this.y=q;this.width=h;this.height=m}static fromExtent(g){return new e(g.xmin,
-g.ymax,g.xmax-g.xmin,g.ymax-g.ymin)}get isEmpty(){return 0>=this.width||0>=this.height}union(g){this.x=Math.min(this.x,g.x);this.y=Math.min(this.y,g.y);this.width=Math.max(this.width,g.width);this.height=Math.max(this.height,g.height)}}return e})},"esri/symbols/cim/TextRasterizer":function(){define(["../../core/screenUtils","../support/textUtils"],function(e,g){function q(l){return`rgba(${l.slice(0,3).toString()},${l[3]})`}function h(l,d){var b=d.font;b=`${b.style} ${b.weight} ${e.pt2px(Math.max(d.size,
.5)*d.pixelRatio).toFixed(1)}px ${b.family}, sans-serif`;l.font=b;l.textBaseline="top";switch(d.horizontalAlignment){case "left":d="left";break;case "right":d="right";break;case "center":d="center";break;default:d="left"}l.textAlign=d}class m{constructor(l){l&&(this._textRasterizationCanvas=l)}rasterizeText(l,d){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const b=this._textRasterizationCanvas;var a=b.getContext("2d",{willReadFrequently:!0});h(a,
d);this._parameters=d;this._textLines=l.split(/\r?\n/);this._lineHeight=this._computeLineHeight();const {decoration:f,weight:n}=d.font;this._lineThroughWidthOffset=f&&"line-through"===f?.1*this._lineHeight:0;var c=(l=null!=d.backgroundColor||null!=d.borderLine)?g.backgroundPadding:0,r=this._computeTextWidth(a,d)+2*c,k=this._lineHeight*this._textLines.length+2*c;b.width=r+2*this._lineThroughWidthOffset;b.height=k;if(0===b.width||0===b.height)return b.width=b.height=1,{size:[0,0],image:new Uint32Array(0),
sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:b};this._renderedLineHeight=Math.round(this._lineHeight*d.pixelRatio);this._renderedHaloSize=e.pt2px(d.halo.size)*d.pixelRatio;this._renderedWidth=r*d.pixelRatio;this._renderedHeight=k*d.pixelRatio;this._lineThroughWidthOffset*=d.pixelRatio;r=d.halo&&d.halo.color?d.halo.color:[0,0,0,0];this._fillStyle=q(d.color??[0,0,0,0]);this._haloStyle=`rgb(${r.slice(0,3).toString()})`;r=this._renderedLineHeight;var p=this._renderedHaloSize;a.save();a.clearRect(0,
0,b.width,b.height);h(a,d);k=c*d.pixelRatio;c=a.textAlign;var t=this._renderedWidth-2*k;c=("center"===c?.5*t:"right"===c?t:0)+p+k;k=p+k;p=0<p;t=this._lineThroughWidthOffset;let w=0;if(l){a.save();l=d.backgroundColor??[0,0,0,0];const y=d.borderLine?.color??[0,0,0,0],x=2*e.pt2px(d.borderLine?.size??0);a.fillStyle=q(l);a.strokeStyle=q(y);a.lineWidth=x;a.fillRect(0,0,b.width,b.height);a.strokeRect(0,0,b.width,b.height);a.restore()}p&&this._renderHalo(a,c,k,t,w,d);w+=k;t+=c;for(var u of this._textLines)p&&
(a.globalCompositeOperation="destination-out",a.fillStyle="rgb(0, 0, 0)",a.fillText(u,t,w),a.globalCompositeOperation="source-over"),a.fillStyle=this._fillStyle,a.fillText(u,t,w),f&&"none"!==f&&this._renderDecoration(a,t,w,f,n),w+=r;a.restore();u=this._renderedWidth+2*this._lineThroughWidthOffset;l=this._renderedHeight;a=a.getImageData(0,0,u,l);a=new Uint8Array(a.data);if(d.premultiplyColors)for(c=0;c<a.length;c+=4)r=a[c+3]/255,a[c]*=r,a[c+1]*=r,a[c+2]*=r;switch(d.horizontalAlignment){case "left":r=
-.5;break;case "right":r=.5;break;default:r=0}switch(d.verticalAlignment){case "bottom":d=-.5;break;case "top":d=.5;break;case "baseline":d=-1/6;break;default:d=0}return{size:[u,l],image:new Uint32Array(a.buffer),sdf:!1,simplePattern:!1,anchorX:r,anchorY:d,canvas:b}}_renderHalo(l,d,b,a,f,n){const c=this._renderedWidth,r=this._renderedHeight;this._haloRasterizationCanvas||(this._haloRasterizationCanvas=document.createElement("canvas"));this._haloRasterizationCanvas.width=c;this._haloRasterizationCanvas.height=
r;const k=this._haloRasterizationCanvas,p=k.getContext("2d");p.clearRect(0,0,c,r);h(p,n);const {decoration:t,weight:w}=n.font;p.fillStyle=this._haloStyle;p.strokeStyle=this._haloStyle;p.lineJoin="round";this._renderHaloNative(p,d,b,t,w);l.globalAlpha=this._parameters.halo.color[3];l.drawImage(k,0,0,c,r,a,f,c,r);l.globalAlpha=1}_renderHaloNative(l,d,b,a,f){const n=this._renderedLineHeight,c=this._renderedHaloSize;for(const r of this._textLines){const k=2*c;for(let p=0;5>p;p++){const t=(.6+.1*p)*k;
l.lineWidth=t;l.strokeText(r,d,b);a&&"none"!==a&&this._renderDecoration(l,d,b,a,f,t)}b+=n}}computeTextSize(l,d){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const b=this._textRasterizationCanvas;var a=b.getContext("2d");h(a,d);this._parameters=d;this._textLines=l.split(/\r?\n/);this._lineHeight=this._computeLineHeight();l=this._computeTextWidth(a,d);a=this._lineHeight*this._textLines.length;b.width=l;b.height=a;return[l*d.pixelRatio,a*d.pixelRatio]}_computeTextWidth(l,
d){let b=0;for(const a of this._textLines)b=Math.max(b,l.measureText(a).width);d=d.font;if("italic"===d.style||"oblique"===d.style||"string"===typeof d.weight&&("bold"===d.weight||"bolder"===d.weight)||"number"===typeof d.weight&&600<d.weight)b+=.3*l.measureText("w").width;b+=2*e.pt2px(this._parameters.halo.size);return Math.round(b)}_computeLineHeight(){let l=1.275*this._parameters.size;const d=this._parameters.font.decoration;d&&"underline"===d&&(l*=1.3);return Math.round(l+2*e.pt2px(this._parameters.halo.size))}_renderDecoration(l,
d,b,a,f,n){const c=.9*this._lineHeight;switch(l.textAlign){case "center":d-=this._renderedWidth/2;break;case "right":d-=this._renderedWidth}const r=l.textBaseline;if("underline"===a)switch(r){case "top":b+=c;break;case "middle":b+=c/2}else if("line-through"===a)switch(r){case "top":b+=c/1.5;break;case "middle":b+=c/3}a=n?1.5*n:Math.ceil(c*("bold"===f?.06:"bolder"===f?.09:.04));l.save();l.beginPath();l.strokeStyle=l.fillStyle;l.lineWidth=a;l.moveTo(d-this._lineThroughWidthOffset,b);l.lineTo(d+this._renderedWidth+
2*this._lineThroughWidthOffset,b);l.stroke();l.restore()}}return m})},"esri/views/2d/engine/webgl/definitions":function(){define(["exports"],function(e){e.AttributeDataType=void 0;var g=e.AttributeDataType||(e.AttributeDataType={});g[g.FilterFlags=0]="FilterFlags";g[g.Animation=1]="Animation";g[g.GPGPU=2]="GPGPU";g[g.VV=3]="VV";g[g.DD0=4]="DD0";g[g.DD1=5]="DD1";g[g.DD2=6]="DD2";e.MAX_TILE_RESHUFFLES_PER_FRAME=1;e.RESHUFFLING_EXEMPT_DRAW_CALLS=10;e.RESHUFFLING_EXEMPT_MEMORY_BYTES=1048576;e.RESHUFFLING_TARGET_DRAW_EFFICIENCY=
.75;e.RESHUFFLING_TARGET_MEMORY_EFFICIENCY=.75;e.angleFactor256=256/360;e.animationUnit=2;e.attributeStoreInitialSize=256;e.attributeStoreTextureSize=1024;e.averageGlyphMosaicItem={metrics:{width:15,height:17,left:0,top:-7,advance:14}};e.bitsetFillHasPatternHeightPrecisionFactor=32;e.bitsetFillHasPatternWidthPrecisionFactor=64;e.bitsetFillHasUnresolvedReplacementColor=8;e.bitsetFillRandomPatternOffset=4;e.bitsetGenericConsiderAlphaOnly=16;e.bitsetGenericLockColor=2;e.bitsetLineScaleDash=4;e.bitsetMarkerAlignmentMap=
1;e.bitsetMarkerAlignmentScreen=0;e.bitsetMarkerOutlineAllowColorOverride=4;e.bitsetMarkerScaleSymbolsProportionally=8;e.bitsetTypeFillOutline=1;e.bufferDataMinimumSize=128;e.bufferDataPoolSize=4;e.chartMaxFields=10;e.collisionBoxPadding=16;e.collisionBucketSize=128;e.collisionEarlyRejectBucketSize=16;e.collisionMaxZoomDelta=1;e.collisionPlacementPadding=8;e.collisionTileBoxSize=4;e.compressionFactorForU16=128;e.dataDrivenUnit0=4;e.dataDrivenUnit1=5;e.dataDrivenUnit2=6;e.debugLabels=!1;e.defaultSdfTextureSize=
128;e.displayRecordIntPerElement=8;e.dotDensityMaxFields=8;e.effectFlag0=16;e.enableEarlyLabelDiscard=!1;e.extrudeScale=64;e.filterFlag0=8;e.filterFlagsUnit=1;e.glyphSize=24;e.gpgpuUnit=12;e.heuristicGlyphsPerFeature=10;e.heuristicGlyphsPerLine=50;e.highlightReasonsCount=3;e.hittestSmallSymbolThreshold=3;e.hittestToleranceDesktop=1;e.hittestToleranceMobile=3;e.hittestToleranceSmallSymbol=3;e.labelPlacementOffsetPadding=4;e.magicLabelLineHeight=29;e.maxGeohashLevel=12;e.maxGpuUploadsPerFrame=2;e.maxRepresentableInt=
16777216;e.maxTextLineWidth=512;e.minMaxZoomPrecisionFactor=10;e.minTextLineWidth=32;e.nanMagicNumber=1E-30;e.patchPixelBufferAllocSize=500;e.patternFillRasterizationScale=2;e.pictureFillColor=4294967295;e.randomInsidePolygonTextureSize=1024;e.rasterTileSize=256;e.spritePadding=2;e.svgSdfTextureInnerSize=252;e.svgSdfTextureSize=256;e.textureBindingBitmap=0;e.textureBindingGlyphAtlas=0;e.textureBindingHighlight0=5;e.textureBindingHighlight1=6;e.textureBindingRenderer0=5;e.textureBindingRenderer1=6;
e.textureBindingSpriteAtlas=0;e.textureUploadManagerBudget=4;e.textureUploadManagerChunkSize=128;e.thinLineHalfWidthThreshold=1.05;e.tileSize=512;e.visualVariableUnit=3;e.vtlHighResCutoff=1.15;e.vtlTextureBindingUnitGlyphs=6;e.vtlTextureBindingUnitSprites=5;e.webglMaxInnerStops=6;e.webglMaxStops=8;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/mesh/templates/shapingUtils":function(){define("exports ../../../../../../core/libs/gl-matrix-2/math/mat2d ../../../../../../core/libs/gl-matrix-2/factories/mat2df32 ../../../../../../core/libs/gl-matrix-2/math/vec2 ../../../../../../core/libs/gl-matrix-2/factories/vec2f32 ../../alignmentUtils ../../Rect ../../collisions/BoundingBox".split(" "),
function(e,g,q,h,m,l,d,b){function a(k,p){k.forEach(t=>h.transformMat2d(t,t,p));return{topLeft:k[0],topRight:k[1],bottomLeft:k[2],bottomRight:k[3]}}const f=Math.PI/180;class n{constructor(k,p,t,w){this._rotationT=q.create();this.minZoom=this._yBounds=this._xBounds=0;this.maxZoom=255;this._bounds=null;const u=t.rect,y=new Float32Array(8);k*=w;p*=w;const x=t.code?u.width*w:t.metrics.width,v=t.code?u.height*w:t.metrics.height;this.width=x;this.height=v;y[0]=k;y[1]=p;y[2]=k+x;y[3]=p;y[4]=k;y[5]=p+v;y[6]=
k+x;y[7]=p+v;this._data=y;this._setTextureCoords(u);this._scale=w;this._mosaic=t;this.x=k;this.y=p;this.maxOffset=Math.max(k+x,p+v)}get mosaic(){return this._mosaic}set angle(k){this._angle=k;g.fromRotation(this._rotationT,-k);this._setOffsets()}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){this._offsets||
this._setOffsets();return this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const {height:u,width:y}=this._mosaic.metrics;var k=y*this._scale,p=Math.abs(u)*this._scale,t=new Float32Array(8);t[0]=this.x;t[1]=this.y;t[2]=this.x+k;t[3]=this.y;t[4]=this.x;t[5]=this.y+p;t[6]=this.x+k;t[7]=this.y+p;k=g.multiply(q.create(),this._rotationT,this._transform);q.transformMany(t,t,k);p=k=Infinity;let x=0;var w=0;for(let v=
0;4>v;v++){const A=t[2*v],z=t[2*v+1];k=Math.min(k,A);p=Math.min(p,z);x=Math.max(x,A);w=Math.max(w,z)}t=x-k;w-=p;this._bounds=new b(k+t/2,p+w/2,t,w)}return this._bounds}setTransform(k){this._transform=k;this._offsets=null}_setOffsets(){this._offsets||(this._offsets={topLeft:[0,0],topRight:[0,0],bottomLeft:[0,0],bottomRight:[0,0]});const k=g.multiply(q.create(),this._rotationT,this._transform);this._offsets.topLeft[0]=this._data[0];this._offsets.topLeft[1]=this._data[1];this._offsets.topRight[0]=this._data[2];
this._offsets.topRight[1]=this._data[3];this._offsets.bottomLeft[0]=this._data[4];this._offsets.bottomLeft[1]=this._data[5];this._offsets.bottomRight[0]=this._data[6];this._offsets.bottomRight[1]=this._data[7];h.transformMat2d(this._offsets.topLeft,this._offsets.topLeft,k);h.transformMat2d(this._offsets.topRight,this._offsets.topRight,k);h.transformMat2d(this._offsets.bottomLeft,this._offsets.bottomLeft,k);h.transformMat2d(this._offsets.bottomRight,this._offsets.bottomRight,k)}_setTextureCoords({x:k,
y:p,width:t,height:w}){this._texcoords={topLeft:[k,p],topRight:[k+t,p],bottomLeft:[k,p+w],bottomRight:[k+t,p+w]}}}class c{constructor(k,p,t){this._rotation=0;this._decorate(k,p,t);this.glyphs=k;this.bounds=this._createBounds(k);this.isMultiline=1<p.length;this._hasRotation=0!==t.angle;this._transform=this._createGlyphTransform(this.bounds,t);if((this._borderLineSizePx=t.borderLineSizePx)||t.hasBackground)[this.bounds,this.textBox]=this.shapeBackground(this._transform);for(const w of k)w.setTransform(this._transform)}setRotation(k){if(0!==
k||0!==this._rotation){this._rotation=k;var p=this._transform;k=g.fromRotation(q.create(),k);g.multiply(p,k,p);for(const t of this.glyphs)t.setTransform(this._transform)}}_decorate(k,p,t){if(t.decoration&&"none"!==t.decoration&&k.length){var w=t.scale;t="underline"===t.decoration?26:16;var u=k[0].textureBinding;for(const A of p){const z=A.startX*w,B=A.startY*w;p=k;var y=p.push;var x=(A.width+A.glyphWidthEnd)*w;var v=u;x={code:0,page:0,sdf:!0,rect:new d(0,0,11,8),textureBinding:v,metrics:{advance:0,
height:4,width:x,left:0,top:0}};y.call(p,new n(z,B+t*w,x,1))}}}shapeBackground(k){const p=(1.5+(this._borderLineSizePx||0))/2;var t=this._borderLineSizePx?p:0;const {xmin:w,ymin:u,xmax:y,ymax:x,x:v,y:A,width:z,height:B}=this.bounds,D=[w-8,u-8],F=[y+8,u-8],E=[w-8,x+8],C=[y+8,x+8],G=a([[D[0]-p,D[1]-p],[F[0]+p,F[1]-p],[D[0]+t,D[1]+t],[F[0]-t,F[1]+t]],k),H=a([[E[0]+t,E[1]-t],[C[0]-t,C[1]-t],[E[0]-p,E[1]+p],[C[0]+p,C[1]+p]],k),K=a([[D[0]-p,D[1]-p],[D[0]+t,D[1]+t],[E[0]-p,E[1]+p],[E[0]+t,E[1]-t]],k);t=
a([[F[0]-t,F[1]+t],[F[0]+p,F[1]-p],[C[0]-t,C[1]-t],[C[0]+p,C[1]+p]],k);k={main:a([D,F,E,C],k),top:G,bot:H,left:K,right:t};return[new b(v,A,z+2*p,B+2*p),k]}get boundsT(){var k=this.bounds;const p=h.set(m.create(),k.x,k.y);h.transformMat2d(p,p,this._transform);return this._hasRotation?(k=Math.max(k.width,k.height),new b(p[0],p[1],k,k)):new b(p[0],p[1],k.width,k.height)}_createBounds(k){let p=Infinity,t=Infinity,w=0;var u=0;for(const y of k)p=Math.min(p,y.xTopLeft),t=Math.min(t,y.yTopLeft),w=Math.max(w,
y.xBottomRight),u=Math.max(u,y.yBottomRight);k=w-p;u-=t;return new b(p+k/2,t+u/2,k,u)}_createGlyphTransform(k,p){const t=f*p.angle,w=q.create(),u=m.create();g.translate(w,w,h.set(u,p.xOffset,-p.yOffset));p.useCIMAngleBehavior?g.rotate(w,w,t):(g.translate(w,w,h.set(u,k.x,k.y)),g.rotate(w,w,t),g.translate(w,w,h.set(u,-k.x,-k.y)));return w}}class r{constructor(k,p,t,w,u,y){this.startY=this.startX=this.glyphWidthEnd=0;this.start=Math.max(0,Math.min(p,t));this.end=Math.max(0,Math.max(p,t));this.end<k.length&&
(this.glyphWidthEnd=k[this.end].metrics.width);this.width=w;this.yMin=u;this.yMax=y}}e.ShapedGlyph=n;e.ShapingInfo=c;e.shapeGlyphs=function(k,p){const t=p.scale,w=[],{glyphs:u,isRightToLeft:y}=k;k=[];var x=1/p.scale*p.maxLineWidth,v=y?u.length-1:0,A=y?-1:u.length,z=y?-1:1,B=v,D=0,F=0,E=B;let C=E,G=0,H=Infinity,K=0;for(;B!==A;){const {code:O,metrics:Q}=u[B];var J=Math.abs(Q.top);10!==O&&32!==O&&(H=Math.min(H,J),K=Math.max(K,J+Q.height));10===O?(B!==v&&(k.push(new r(u,E,B-z,D,Infinity===H?0:H,K)),H=
Infinity,K=0),D=0,E=B+z,C=B+z,F=0):32===O?(C=B+z,F=0,G=Q.advance,D+=Q.advance):(D>x&&(C!==E?(J=C-2*z,D-=G,k.push(new r(u,E,J,D-F,H,K)),H=Infinity,K=0,E=C,D=F):(k.push(new r(u,E,B-z,D,H,K)),H=Infinity,K=0,C=E=B,D=0)),D+=Q.advance,F+=Q.advance);B+=z}x=new r(u,E,B-z,D,H,K);0<=x.start&&x.end<u.length&&k.push(x);if(k.length){x=0;for(v=0;v<k.length;v++)({width:A}=k[v]),x=Math.max(A,x);v=k[0].yMin;x={x:0,y:v,height:k[k.length-1].yMax+p.lineHeight*(k.length-1)+("underline"===p.decoration?4:0)-v,width:x}}else x=
{x:0,y:0,height:0,width:0};v=x;x=l.getXAnchorDirection(p.horizontalAlignment);A=l.getYAnchorDirection(p.verticalAlignment);z=A===l.VAlign.Baseline?1:0;v=(1-z)*-v.y+v.height/2*(z?0:A-1)+-22*(z?1:0);for(A=0;A<k.length;A++){const {start:O,end:Q,width:T}=k[A];z=T/2*(x+1)*-1-3;B=A*p.lineHeight+v-3;k[A].startX=z;k[A].startY=B;for(D=O;D<=Q;D++)F=u[D],10!==F.code&&(E=new n(z+F.metrics.left,B-F.metrics.top,F,t),z+=F.metrics.advance,w.push(E))}return new c(w,k,p)};Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/alignmentUtils":function(){define(["exports","../../../../core/Logger"],function(e,g){e.HAlign=void 0;(function(q){q[q.Left=-1]="Left";q[q.Center=0]="Center";q[q.Right=1]="Right"})(e.HAlign||(e.HAlign={}));e.VAlign=void 0;(function(q){q[q.Top=1]="Top";q[q.Center=0]="Center";q[q.Bottom=-1]="Bottom";q[q.Baseline=2]="Baseline"})(e.VAlign||(e.VAlign={}));e.getAlignmentFromPlacement=function(q){switch(q){case "above-left":case "esriServerPointLabelPlacementAboveLeft":return["right",
"bottom"];case "above-center":case "above-along":case "esriServerPointLabelPlacementAboveCenter":case "esriServerLinePlacementAboveAlong":return["center","bottom"];case "above-right":case "esriServerPointLabelPlacementAboveRight":return["left","bottom"];case "center-left":case "esriServerPointLabelPlacementCenterLeft":return["right","middle"];case "center-center":case "center-along":case "esriServerPointLabelPlacementCenterCenter":case "esriServerLinePlacementCenterAlong":return["center","middle"];
case "center-right":case "esriServerPointLabelPlacementCenterRight":return["left","middle"];case "below-left":case "esriServerPointLabelPlacementBelowLeft":return["right","top"];case "below-center":case "below-along":case "esriServerPointLabelPlacementBelowCenter":case "esriServerLinePlacementBelowAlong":return["center","top"];case "below-right":case "esriServerPointLabelPlacementBelowRight":return["left","top"];case "always-horizontal":case "esriServerPolygonPlacementAlwaysHorizontal":return["center",
"middle"];default:return console.debug(`Found invalid placement type ${q}`),["center","middle"]}};e.getJustification=function(q){switch(q){case "left":return e.HAlign.Left;case "right":return e.HAlign.Right;case "center":return e.HAlign.Center}};e.getXAnchorDirection=function(q){if(!q)return e.HAlign.Center;switch(q){case "Left":case "left":return e.HAlign.Left;case "Right":case "right":return e.HAlign.Right;case "Justify":return g.getLogger("esri.views.2d.engine.webgl.alignmentUtils").warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."),
e.HAlign.Center;case "Center":case "center":return e.HAlign.Center}};e.getXDirection=function(q){switch(q){case e.HAlign.Right:case "right":return-1;case e.HAlign.Center:case "center":return 0;case e.HAlign.Left:case "left":return 1;default:return console.debug(`Found invalid horizontal alignment ${q}`),0}};e.getYAnchorDirection=function(q){if(!q)return e.VAlign.Center;switch(q){case "Top":case "top":return e.VAlign.Top;case "Center":case "middle":return e.VAlign.Center;case "Baseline":case "baseline":return e.VAlign.Baseline;
case "Bottom":case "bottom":return e.VAlign.Bottom}};e.getYDirection=function(q){switch(q){case e.VAlign.Top:case "top":return 1;case e.VAlign.Center:case "middle":return 0;case e.VAlign.Bottom:case e.VAlign.Baseline:case "baseline":case "bottom":return-1;default:return console.debug(`Found invalid vertical alignment ${q}`),0}};e.isMapAligned=function(q){switch(q){case "above-along":case "below-along":case "center-along":case "esriServerLinePlacementAboveAlong":case "esriServerLinePlacementBelowAlong":case "esriServerLinePlacementCenterAlong":return!0;
default:return!1}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/Rect":function(){define(function(){class e{constructor(g=0,q=0,h=0,m=0){this.x=g;this.y=q;this.width=h;this.height=m}get isEmpty(){return 0>=this.width||0>=this.height}union(g){this.x=Math.min(this.x,g.x);this.y=Math.min(this.y,g.y);this.width=Math.max(this.width,g.width);this.height=Math.max(this.height,g.height)}}return e})},"esri/views/2d/engine/webgl/collisions/BoundingBox":function(){define(["../../../../../core/libs/gl-matrix-2/factories/vec2f32"],
function(e){class g{constructor(q,h,m,l){this.computedY=this.computedX=0;this.center=e.fromValues(q,h);this.centerT=e.create();this.halfWidth=m/2;this.halfHeight=l/2;this.width=m;this.height=l}get x(){return this.center[0]}get y(){return this.center[1]}get blX(){return this.center[0]+this.halfWidth}get blY(){return this.center[1]+this.halfHeight}get trX(){return this.center[0]-this.halfWidth}get trY(){return this.center[1]-this.halfHeight}get xmin(){return this.x-this.halfWidth}get xmax(){return this.x+
this.halfWidth}get ymin(){return this.y-this.halfHeight}get ymax(){return this.y+this.halfHeight}set x(q){this.center[0]=q}set y(q){this.center[1]=q}clone(){return new g(this.x,this.y,this.width,this.height)}serialize(q){q.writeF32(this.center[0]);q.writeF32(this.center[1]);q.push(this.width);q.push(this.height);return q}findCollisionDelta(q,h=4){return Math.log2(Math.min((q.halfWidth+this.halfWidth+h)/Math.abs(q.centerT[0]-this.centerT[0]),(q.halfHeight+this.halfHeight+h)/Math.abs(q.centerT[1]-this.centerT[1])))}extend(q){const h=
Math.min(this.xmin,q.xmin),m=Math.min(this.ymin,q.ymin),l=Math.max(this.xmax,q.xmax)-h;q=Math.max(this.ymax,q.ymax)-m;this.width=l;this.height=q;this.halfWidth=l/2;this.halfHeight=q/2;this.x=h+l/2;this.y=m+q/2}static deserialize(q){const h=q.readF32(),m=q.readF32(),l=q.readInt32();q=q.readInt32();return new g(h,m,l,q)}}return g})},"esri/views/2d/layers/graphics/graphicsUtils":function(){define("exports ../../../../core/screenUtils ../../../../geometry/Polygon ../../../../geometry/support/aaBoundingRect ../../../../geometry/support/spatialReferenceUtils ../../engine/webgl/definitions".split(" "),
function(e,g,q,h,m,l){e.getLineWidth=function(d){const b=g.px2pt(l.minTextLineWidth),a=g.px2pt(l.maxTextLineWidth);return Math.max(b,Math.min(d||a,a))};e.intersectingInternationalDateline=function(d,b){b=m.getInfo(b);if(!b)return null;const [a,f]=b.valid;return d[2]>f?[h.create([d[0],d[1],f,d[3]]),h.create([a,d[1],a+d[2]-f,d[3]])]:d[0]<a?[h.create([a,d[1],d[2],d[3]]),h.create([f-(a-d[0]),d[1],f,d[3]])]:null};e.isMarkerSymbol=function(d){return"simple-marker"===d||"picture-marker"===d||"esriSMS"===
d||"esriPMS"===d};e.isTextSymbol=function(d){return"text"===d||"esriTS"===d};e.pixelBuffer=50;e.polygonFromExtent=function(d){if(!d)return null;const {xmin:b,ymin:a,xmax:f,ymax:n,spatialReference:c}=d;return new q({rings:[[[b,a],[b,n],[f,n],[f,a],[b,a]]],spatialReference:c})};e.roundPtToWholePixel=function(d){return g.px2pt(Math.round(g.pt2px(d)))};e.tileSize=512;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/GeometryUtils":function(){define(["exports",
"../../../../geometry/support/coordsUtils","../../../../geometry/support/TileClipper"],function(e,g,q){function h(f,n){f%=n;return 0<=f?f:f+n}const m=Number.POSITIVE_INFINITY,l=Math.PI,d=128/l,b=256/360,a=1/Math.LN2;e.between=function(f,n,c){return f>=n&&f<=c||f>=c&&f<=n};e.c2pi=2*l;e.cDegTo256=b;e.cDegToRad=l/180;e.cInfinity=m;e.cPi=l;e.cRadTo256=d;e.degToByte=function(f){return h(f*b,256)};e.distanceFromToPolylineWithinThreshold=function(f,n,c,r){let k,p,t;r*=r;for(const w of c){const u=w.length;
if(!(2>u)){c=w[0].x;k=w[0].y;for(let y=1;y<u;++y){p=w[y].x;t=w[y].y;if(g.distanceToSegmentSquared(f,n,c,k,p,t)<r)return!0;c=p;k=t}}}return!1};e.getTileMargins=function(f){return 8+Math.max(16*(f-14),0)};e.interpolate=function(f,n,c){return f*(1-c)+n*c};e.isCircleOverlapingRect=function(f,n,c,r,k,p,t){n=Math.max(r,Math.min(n,p))-n;c=Math.max(k,Math.min(c,t))-c;return n*n+c*c<=f*f};e.log2=function(f){return Math.log(f)*a};e.offsetLine=function(f,n){if(0===n||Number.isNaN(n))return f;const c=[],r=new q.Point(0,
0),k=new q.Point(0,0),p=new q.Point(0,0);for(let w=0;w<f.length;w++){const u=f[w],y=[];for(let x=0;x<u.length;x++){var t=u[x-1];const v=u[x],A=u[x+1];0===x?r.setCoords(0,0):r.assignSub(v,t).normalize().rightPerpendicular();x===u.length-1?k.setCoords(0,0):k.assignSub(A,v).normalize().rightPerpendicular();p.assignAdd(r,k).normalize();t=p.x*k.x+p.y*k.y;0!==t&&p.scale(1/t);y.push(q.Point.add(v,p.scale(n)))}c.push(y)}return c};e.pointInPolygon=function(f,n,c){let r=0,k,p;for(const t of c){c=t.length;for(let w=
1;w<c;++w)k=t[w-1],p=t[w],k.y>n!==p.y>n&&(0<(p.x-k.x)*(n-k.y)-(p.y-k.y)*(f-k.x)?r++:r--)}return 0!==r};e.positiveMod=h;e.radToByte=function(f){return h(f*d,256)};e.sqr=function(f){return f*f};e.translateAnchor=function(f,n,c,r){f=new q.Point(f[0],f[1]);f.scale(r);"viewport"===n&&(n=Math.PI/180*-c,f.rotate(Math.cos(n),Math.sin(n)));return f};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/SDFHelper":function(){define(["exports","../../core/floatRGBA","../../geometry/support/jsonUtils",
"./Rect","../../views/2d/engine/webgl/definitions"],function(e,g,q,h,m){function l(b){switch(b.type){case "CIMPointSymbol":b=b.symbolLayers;if(!b||1!==b.length)return null;b=b[0];return"CIMVectorMarker"!==b.type?null:l(b);case "CIMVectorMarker":b=b.markerGraphics;if(!b||1!==b.length)return null;var a=b[0];if(!a)return null;b=a.geometry;if(!b)return null;a=a.symbol;return!a||"CIMPolygonSymbol"!==a.type&&"CIMLineSymbol"!==a.type||a.symbolLayers?.some(f=>!!f.effects)?null:{type:"sdf",geom:b,asFill:"CIMPolygonSymbol"===
a.type}}}function d(b){let a=Infinity,f=-Infinity,n=Infinity,c=-Infinity;for(const r of b)for(const k of r)k[0]<a&&(a=k[0]),k[0]>f&&(f=k[0]),k[1]<n&&(n=k[1]),k[1]>c&&(c=k[1]);return[a,n,f,c]}e.buildSDF=function(b){var a=b.geom;var f=a?a.rings?a.rings:a.paths?a.paths:void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax?[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]]:null:null;a=Infinity;var n=-Infinity;var c=Infinity;var r=-Infinity;for(var k of f)for(var p of k)p[0]<
a&&(a=p[0]),p[0]>n&&(n=p[0]),p[1]<c&&(c=p[1]),p[1]>r&&(r=p[1]);c=new h(a,c,n-a,r-c);k=m.defaultSdfTextureSize;p=m.spritePadding;a=Math.floor(.5*(.5*k-p));r=(k-2*(a+p))/Math.max(c.width,c.height);k=Math.round(c.width*r)+2*a;p=Math.round(c.height*r)+2*a;n=[];for(var t of f)if(t&&1<t.length){f=[];for(var w of t){let [G,H]=w;G-=c.x;H-=c.y;G*=r;H*=r;G+=a-.5;H+=a-.5;b.asFill?f.push([G,H]):f.push([Math.round(G),Math.round(H)])}if(b.asFill){var u=f.length-1;f[0][0]===f[u][0]&&f[0][1]===f[u][1]||f.push(f[0])}n.push(f)}w=
k*p;t=Array(w);f=a*a+1;for(c=0;c<w;++c)t[c]=f;for(var y of n)for(f=y.length,c=1;c<f;++c){r=y[c-1];u=y[c];var x=void 0,v=void 0;r[0]<u[0]?(x=r[0],v=u[0]):(x=u[0],v=r[0]);var A=void 0,z=void 0;r[1]<u[1]?(A=r[1],z=u[1]):(A=u[1],z=r[1]);var B=Math.floor(x)-a;v=Math.floor(v)+a;A=Math.floor(A)-a;z=Math.floor(z)+a;0>B&&(B=0);v>k&&(v=k);0>A&&(A=0);z>p&&(z=p);x=u[0]-r[0];const G=u[1]-r[1],H=x*x+G*G;for(;B<v;B++)for(let K=A;K<z;K++){var D=B+.5,F=K+.5,E=(D-r[0])*x+(F-r[1])*G;let J;0>E?(J=r[0],E=r[1]):E>H?(J=
u[0],E=u[1]):(E/=H,J=r[0]+E*x,E=r[1]+E*G);D=(D-J)*(D-J)+(F-E)*(F-E);F=(p-K-1)*k+B;D<t[F]&&(t[F]=D)}}for(y=0;y<w;++y)t[y]=Math.sqrt(t[y]);if(b.asFill)for(var C of n)for(b=C.length,y=1;y<b;++y)for(n=C[y-1],w=C[y],n[0]<w[0]?(f=n[0],c=w[0]):(f=w[0],c=n[0]),n[1]<w[1]?(u=n[1],r=w[1]):(u=w[1],r=n[1]),f=Math.floor(f),c=Math.floor(c)+1,u=Math.floor(u),r=Math.floor(r)+1,f<a&&(f=a),c>k-a&&(c=k-a),u<a&&(u=a),r>p-a&&(r=p-a);u<r;++u)if(n[1]>u!==w[1]>u){A=u+.5;v=(p-u-1)*k;for(z=f;z<c;++z)z+.5<(w[0]-n[0])*(A-n[1])/
(w[1]-n[1])+n[0]&&(t[v+z]=-t[v+z]);for(A=a;A<f;++A)t[v+A]=-t[v+A]}C=2*a;a=t.length;b=new Uint8Array(4*a);for(y=0;y<a;++y)g.packFloatRGBA(.5-t[y]/C,b,4*y);return[b,k,p]};e.getExtent=function(b){return b?b.rings?d(b.rings):b.paths?d(b.paths):q.isExtent(b)?[b.xmin,b.ymin,b.xmax,b.ymax]:null:null};e.getSDFInfo=l;e.getSDFMetrics=function(b,a,f,n,c){const [r,k,p,t]=b;if(p<r||t<k)return[0,0,0,1];var w=p-r,u=t-k,y=m.defaultSdfTextureSize,x=m.spritePadding;b=Math.floor(.5*(.5*y-x));y=(y-2*(b+x))/Math.max(w,
u);x=Math.round(w*y);const v=Math.round(u*y)+2*b;u=1;a&&(u=v/y/(a.ymax-a.ymin));let A=0,z=0;w=1;n&&(c?a&&f&&0<a.ymax-a.ymin&&(w=(a.xmax-a.xmin)/(a.ymax-a.ymin),A=n.x/(f*w),z=n.y/f):(A=n.x,z=n.y));a&&(A=.5*(a.xmax+a.xmin)+A*(a.xmax-a.xmin),z=.5*(a.ymax+a.ymin)+z*(a.ymax-a.ymin));A=(A-r)*y+b;z=(z-k)*y+b;a=A/(x+2*b)-.5;n=z/v-.5;c&&f&&(a*=f*w,n*=f);return[u,a,n,w]};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/floatRGBA":function(){define(["exports","./mathUtils"],function(e,
g){function q(d,b=0){let a=0;for(let f=0;4>f;f++)a+=d[b+f]*m[f];return a}const h=[1,256,65536,16777216],m=[1/256,1/65536,1/16777216,1/4294967296],l=q(new Uint8ClampedArray([255,255,255,255]));e.packFloatRGBA=function(d,b,a=0){d=g.clamp(d,0,l);for(let c=0;4>c;c++){var f=Math,n=d*h[c];b[a+c]=f.floor.call(f,256*(n-Math.floor(n)))}};e.unpackFloatRGBA=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/effects/CIMEffectHelper":function(){define("exports ../../../geometry/GeometryCursor ../../../geometry/geometryCursorCollectUtils ../CIMEffects ../CIMOperators ../CIMSymbolHelper".split(" "),
function(e,g,q,h,m,l){const d=96/72;class b{static executeEffects(a,f,n,c){const r=l.getEffectsInflateSize(a);f=new h.SimpleEffectCursor(f);for(const k of a)(a=m.getEffectOperator(k))&&(f=a.execute(f,k,d,n,c,r));return f}static applyEffects(a,f,n){if(!a)return f;var c=l.getEffectsInflateSize(a);f=new h.SimpleEffectCursor(g.GeometryCursor.fromJSONCIM(f));for(var r of a)(a=m.getEffectOperator(r))&&(f=a.execute(f,r,1,null,n,c));c=[];for(r=null;n=f.next();)c.push(...q.collectMultipath(n)),r=n.geometryType;
return 0===c.length||null===r?null:"esriGeometryPolygon"===r?{rings:c}:{paths:c}}}e.CIMEffectHelper=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/Container":function(){define(["exports","../../../core/libs/gl-matrix-2/factories/mat3f32","../../../layers/effects/EffectView","./DisplayObject","../layers/support/util"],function(e,g,q,h,m){class l extends h.DisplayObject{constructor(){super(...arguments);this._childrenSet=new Set;this._needsSort=!1;this._children=
[];this._highlightGradient=this._highlightOptions=this._effectView=null}get blendMode(){return this._blendMode}set blendMode(d){this._blendMode=d;this.requestRender()}get children(){return this._children}get clips(){return this._clips}set clips(d){this._clips=d;this.children.forEach(b=>b.clips=d)}get computedEffects(){return this._effectView?.effects??null}get effect(){return this._effectView?.effect??""}set effect(d){if(this._effectView||d)this._effectView||(this._effectView=new q.EffectView),this._effectView.effect=
d,this.requestRender()}get highlightOptions(){return this._highlightOptions}set highlightOptions(d){d?this._highlightOptions?.equals(d)||(this._highlightOptions=d,this._highlightGradient=m.createOrReuseHighlightGradient(this._highlightGradient,d),this.requestRender()):(this._highlightOptions=null,this._highlightGradient&&(this._highlightGradient.destroy(),this._highlightGradient=null,this.requestRender()))}get hasBlending(){return!!this.blendMode}get hasHighlight(){return this.children.some(d=>d.hasHighlight)}get hasLabels(){return this.children.some(d=>
d.hasLabels)}get requiresDedicatedFBO(){return this.children.some(d=>"blendMode"in d&&d.blendMode&&"normal"!==d.blendMode)}updateTransitionProperties(d,b){super.updateTransitionProperties(d,b);this._effectView&&(this._effectView.transitionStep(d,b),this._effectView.transitioning&&this.requestRender())}doRender(d){d=this.createRenderParams(d);const {painter:b}=d;b.beforeRenderLayer(d,this._clips?.length?255:0,this.computedOpacity);this.renderChildren(d);b.afterRenderLayer(d,this.computedOpacity)}addChild(d){return this.addChildAt(d,
this.children.length)}addChildAt(d,b=this.children.length){if(!d||this.contains(d))return d;this._needsSort=!0;const a=d.parent;a&&a!==this&&a.removeChild(d);b>=this.children.length?this.children.push(d):this.children.splice(b,0,d);this._childrenSet.add(d);d.parent=this;d.stage=this.stage;this!==this.stage&&(d.clips=this.clips);this.requestRender();return d}contains(d){return this._childrenSet.has(d)}endTransitions(){super.endTransitions();this._effectView&&(this._effectView.endTransitions(),this.requestRender())}removeAllChildren(){this._childrenSet.clear();
this._needsSort=!0;for(const d of this.children)this!==this.stage&&(d.clips=null),d.stage=null,d.parent=null;this.children.length=0}removeChild(d){return this.contains(d)?this.removeChildAt(this.children.indexOf(d)):d}removeChildAt(d){if(0>d||d>=this.children.length)return null;this._needsSort=!0;d=this.children.splice(d,1)[0];this._childrenSet.delete(d);this!==this.stage&&(d.clips=null);d.stage=null;d.parent=null;return d}sortChildren(d){this._needsSort&&(this.children.sort(d),this._needsSort=!1)}beforeRender(d){super.beforeRender(d);
for(const b of this.children)b.beforeRender(d)}afterRender(d){super.afterRender(d);for(const b of this.children)b.afterRender(d)}_createTransforms(){return{displayViewScreenMat3:g.create()}}onAttach(){super.onAttach();const d=this.stage;for(const b of this.children)b.stage=d}onDetach(){super.onDetach();for(const d of this.children)d.stage=null}renderChildren(d){for(const b of this.children)b.processRender(d)}createRenderParams(d){return{...d,requireFBO:this.requiresDedicatedFBO,blendMode:this.blendMode,
effects:this.computedEffects,globalOpacity:d.globalOpacity*this.computedOpacity,inFadeTransition:this.inFadeTransition,highlightGradient:this._highlightGradient||d.highlightGradient}}}e.Container=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/effects/EffectView":function(){define("exports ../../chunks/tslib.es6 ../../core/Accessor ../../core/has ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/subclass ./parser ./utils".split(" "),
function(e,g,q,h,m,l,d,b,a,f){function n(k){k=a.parse(k)||[];var p=(p=k[0])?"type"in p:!1;return p?[{scale:-1,effects:k}]:k}function c(k,p,t){return k[0]?.effects&&p[0]?.effects?(-1===k[0]?.scale||-1===p[0]?.scale)&&(1<k.length||1<p.length)&&0>=t?!1:f.canInterpolateEffects(k[0].effects,p[0].effects):!0}function r(k,p,t){const w=k.length>p.length?k:p;k=k.length>p.length?p:k;var u=k[k.length-1];p=u?.scale??t;u=u?.effects??[];for(let y=k.length;y<w.length;y++)k.push({scale:p,effects:[...u]});for(p=0;p<
w.length;p++)k[p].scale=-1===k[p].scale?t:k[p].scale,w[p].scale=-1===w[p].scale?t:w[p].scale,f.normalizeEffects(k[p].effects,w[p].effects)}e.EffectView=class extends q{constructor(k){super(k);this._final=this._to=this._from=null;this._current=[];this._time=0;this.duration=h("mapview-transitions-duration");this.effects=[]}set effect(k){const p=this._get("effect");k=k||"";if(p!==k){this._set("effect",k);try{this._transitionTo(n(k))}catch(t){this._transitionTo([]),l.getLogger(this).warn("Invalid Effect",
{effect:k,error:t})}}}get hasEffects(){return this.transitioning||!!this.effects.length}set scale(k){this._updateForScale(k)}get transitioning(){return null!==this._to}canTransitionTo(k){try{return 0<this.scale&&c(this._current,n(k),this.scale)}catch{return!1}}transitionStep(k,p){this._applyTimeTransition(k);this._updateForScale(p)}endTransitions(){this._applyTimeTransition(this.duration)}_transitionTo(k){0<this.scale&&c(this._current,k,this.scale)?(this._final=k,this._to=m.clone(k),r(this._current,
this._to,this.scale),this._from=m.clone(this._current),this._time=0):(this._from=this._to=this._final=null,this._current=k);this._set("effects",this._current[0]?m.clone(this._current[0].effects):[])}_applyTimeTransition(k){if(this._to&&this._from&&this._current&&this._final){this._time+=k;k=Math.min(1,this._time/this.duration);for(let t=0;t<this._current.length;t++){const w=this._current[t],u=this._from[t],y=this._to[t];var p=u.scale;w.scale=p+(y.scale-p)*k;for(p=0;p<w.effects.length;p++)w.effects[p].interpolate(u.effects[p],
y.effects[p],k)}1===k&&(this._current=this._final,this._set("effects",this._current[0]?m.clone(this._current[0].effects):[]),this._from=this._to=this._final=null)}}_updateForScale(k){this._set("scale",k);if(0!==this._current.length){var p=this._current,t=this._current.length-1,w,u=1;if(1===p.length||k>=p[0].scale)var y=w=p[0].effects;else if(k<=p[t].scale)y=w=p[t].effects;else for(let x=0;x<t;x++){const v=p[x],A=p[x+1];if(v.scale>=k&&A.scale<=k){u=(k-v.scale)/(A.scale-v.scale);w=v.effects;y=A.effects;
break}}for(k=0;k<this.effects.length;k++)this.effects[k].interpolate(w[k],y[k],u)}}};g.__decorate([d.property()],e.EffectView.prototype,"_to",void 0);g.__decorate([d.property()],e.EffectView.prototype,"duration",void 0);g.__decorate([d.property({value:""})],e.EffectView.prototype,"effect",null);g.__decorate([d.property({readOnly:!0})],e.EffectView.prototype,"effects",void 0);g.__decorate([d.property({readOnly:!0})],e.EffectView.prototype,"hasEffects",null);g.__decorate([d.property({value:0})],e.EffectView.prototype,
"scale",null);g.__decorate([d.property({readOnly:!0})],e.EffectView.prototype,"transitioning",null);e.EffectView=g.__decorate([b.subclass("esri.layers.effects.EffectView")],e.EffectView);e.canInterpolateEffectStops=c;e.convertEffectToStops=n;e.normalizeEffectStops=r;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/DisplayObject":function(){define(["exports","../../../core/Evented","../../../core/has","../../../core/promiseUtils"],function(e,g,q,h){class m extends g{constructor(){super(...arguments);
this._clips=this._fadeInResolver=this._fadeOutResolver=null;this.computedVisible=!0;this.computedOpacity=1;this._isReady=this.inFadeTransition=this.fadeTransitionEnabled=!1;this._opacity=1;this._stage=this.parent=null;this._visible=!0}get clips(){return this._clips}set clips(l){this._clips=l;this.requestRender()}get isReady(){return this._isReady}get opacity(){return this._opacity}set opacity(l){this._opacity!==l&&(this._opacity=Math.min(1,Math.max(l,0)),this.requestRender())}get stage(){return this._stage}set stage(l){if(this._stage!==
l){var d=this._stage;(this._stage=l)?this._stage?.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):d?.trashDisplayObject(this)}}get transforms(){return this._getTransforms()}_getTransforms(){null==this._transforms&&(this._transforms=this._createTransforms());return this._transforms}get visible(){return this._visible}set visible(l){this._visible!==l&&(this._visible=l,this.requestRender())}get hasLabels(){return!1}get hasHighlight(){return!1}get hasBlending(){return!1}fadeIn(){if(this._fadeInResolver)return this._fadeInResolver.promise;
this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null);this.opacity=1;this.computedOpacity=0;this.fadeTransitionEnabled=!0;this._fadeInResolver=h.createResolver();this.requestRender();return this._fadeInResolver.promise}fadeOut(){if(this._fadeOutResolver)return this._fadeOutResolver.promise;this.opacity=0;this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null);this.fadeTransitionEnabled=!0;this._fadeOutResolver=h.createResolver();this.requestRender();return this._fadeOutResolver.promise}endTransitions(){this._fadeInResolver?.();
this._fadeInResolver=null;this._fadeOutResolver?.();this._fadeOutResolver=null;this.computedOpacity=this.visible?this.opacity:0;this.requestRender()}beforeRender(l){this.updateTransitionProperties(l.deltaTime,l.state.scale);this.setTransform(l.state)}afterRender(l){this._fadeInResolver&&this.computedOpacity===this.opacity?(this._fadeInResolver(),this._fadeInResolver=null):this._fadeOutResolver&&0===this.computedOpacity&&(this._fadeOutResolver(),this._fadeOutResolver=null)}remove(){this.parent?.removeChild(this)}setTransform(l){}processRender(l){this.stage&&
this.computedVisible&&this.doRender(l)}requestRender(){this.stage&&this.stage.requestRender()}processDetach(){this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null);this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null);this.onDetach();this.emit("detach")}updateTransitionProperties(l,d){const b=0===q("mapview-transitions-duration")?0:1/q("mapview-transitions-duration");if(this.fadeTransitionEnabled&&0!==b){d=this._fadeOutResolver||!this.visible?0:this.opacity;
const a=this.computedOpacity;a===d?this.computedVisible=this.visible:(l*=b,this.computedOpacity=a>d?Math.max(d,a-l):Math.min(d,a+l),this.computedVisible=0<this.computedOpacity,l=d===this.computedOpacity,this.inFadeTransition=!l,l||this.requestRender())}else this.computedOpacity=this.opacity,this.computedVisible=this.visible}onAttach(){}onDetach(){}doRender(l){}ready(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}e.DisplayObject=m;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/layers/support/util":function(){define(["exports","../../../../core/jsonMap","../../engine/webgl/effects/highlight/HighlightGradient","../../engine/webgl/effects/highlight/MultiHighlightGradient","../../engine/webgl/shaderGraph/techniques/featureTechniqueUtils"],function(e,g,q,h,m){const l=new g.JSONMap({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch",
mesh:"mesh"});e.analyzeRings=function(d,b,a){const f=[],n=[];let c=0,r=0;for(const k of d){d=r;let p=k[0][0],t=k[0][1];f[r++]=p;f[r++]=t;let w=0;for(let u=1;u<k.length;++u){const y=p,x=t;p=k[u][0];t=k[u][1];w+=t*y-p*x;f[r++]=p;f[r++]=t}b(w/2);0<w?(0<d-c&&(a(c,d,f,n),c=d),n.length=0):0>w?0<d-c?n.push(.5*(d-c)):r=d:r=d}0<r-c&&a(c,r,f,n)};e.canUseMajorityInterpolationOnDataSource=function(d){const {bandCount:b,attributeTable:a,colormap:f,pixelType:n}=d.raster.rasterInfo;return 1===b&&(null!=a||null!=
f||"u8"===n||"s8"===n)};e.createOrReuseHighlightGradient=function(d,b){"single"===d?.type&&b.multiHighlightEnabled&&(d.destroy(),d=null);"multi"!==d?.type||b.multiHighlightEnabled||(d.destroy(),d=null);d||=b.multiHighlightEnabled?new h.MultiHighlightGradient:new q;d.setHighlightOptions(b);return d};e.renderHighlight=function(d,b,a){const {painter:f,highlightGradient:n}=d,{highlight:c}=f.effects;if(n){var r=d.passOptions,k=n.getReasonsWithGradients();for(let t=0;t<k.length;t++){var p={...d,passOptions:{type:"highlight",
activeGradient:k[t].activeGradient,activeReasons:k[t].activeReasons,stepType:"burn",highlightAll:b}};c.bind(p);a(p);if(t<k.length-1){p=0;for(let w=t+1;w<k.length;w++)p|=k[w].activeReasons;a({...d,passOptions:{type:"highlight",activeGradient:k[t].activeGradient,activeReasons:p,stepType:"clear",highlightAll:b}})}p={...d,passOptions:{type:"highlight",activeGradient:k[t].activeGradient,activeReasons:k[t].activeReasons,stepType:"draw",highlightAll:b}};f.setPipelineState(m.getFeaturePipelineState(d));f.updatePipelineState(d.context);
c.draw(p);c.unbind()}d.passOptions=r}};e.toJSONGeometryType=function(d){return l.toJSON(d)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/highlight/HighlightGradient":function(){define("../../../../../../core/Logger ../../../highlightReasons ../../definitions ./parameters ../../../../../webgl/enums ../../../../../webgl/Texture ../../../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l,d){function b(c,r){r.fillColor[0]=c.color.r/255;
r.fillColor[1]=c.color.g/255;r.fillColor[2]=c.color.b/255;r.fillColor[3]=c.color.a;c.haloColor?(r.outlineColor[0]=c.haloColor.r/255,r.outlineColor[1]=c.haloColor.g/255,r.outlineColor[2]=c.haloColor.b/255,r.outlineColor[3]=c.haloColor.a):(r.outlineColor[0]=r.fillColor[0],r.outlineColor[1]=r.fillColor[1],r.outlineColor[2]=r.fillColor[2],r.outlineColor[3]=r.fillColor[3]);r.fillColor[3]*=c.fillOpacity;r.outlineColor[3]*=c.haloOpacity;r.fillColor[0]*=r.fillColor[3];r.fillColor[1]*=r.fillColor[3];r.fillColor[2]*=
r.fillColor[3];r.outlineColor[0]*=r.outlineColor[3];r.outlineColor[1]*=r.outlineColor[3];r.outlineColor[2]*=r.outlineColor[3];r.outlineWidth=h.highlightSizing.outlineWidth;r.outerHaloWidth=h.highlightSizing.outerHaloWidth;r.innerHaloWidth=h.highlightSizing.innerHaloWidth;r.outlinePosition=h.highlightSizing.outlinePosition}const a=()=>e.getLogger("esri.views.2d.engine.webgl.painter.highlight.HighlightGradient"),f=[0,0,0,0];class n{constructor(){this.type="single";this._convertedHighlightOptions={fillColor:[.2*
.75,.6*.75,.675,.75],outlineColor:[.2*.9,.54,.81,.9],outlinePosition:h.highlightSizing.outlinePosition,outlineWidth:h.highlightSizing.outlineWidth,innerHaloWidth:h.highlightSizing.innerHaloWidth,outerHaloWidth:h.highlightSizing.outerHaloWidth};this._shadeTexChanged=!0;this._texelData=new Uint8Array(4*h.shadeTextureSize);this._minMaxDistance=[0,0]}setHighlightOptions(c){function r(v,A,z){x[0]=(1-z)*v[0]+z*A[0];x[1]=(1-z)*v[1]+z*A[1];x[2]=(1-z)*v[2]+z*A[2];x[3]=(1-z)*v[3]+z*A[3]}const k=this._convertedHighlightOptions;
b(c,k);c=k.outlinePosition-k.outlineWidth/2-k.outerHaloWidth;const p=k.outlinePosition-k.outlineWidth/2,t=k.outlinePosition+k.outlineWidth/2,w=k.outlinePosition+k.outlineWidth/2+k.innerHaloWidth;var u=Math.sqrt(Math.PI/2)*h.sigma,y=Math.abs(c)>u?Math.round(10*(Math.abs(c)-u))/10:0;u=Math.abs(w)>u?Math.round(10*(Math.abs(w)-u))/10:0;y&&!u?a().error("The outer rim of the highlight is "+y+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):
!y&&u?a().error("The inner rim of the highlight is "+u+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):y&&u&&a().error("The highlight is "+Math.max(y,u)+"px away from the edge of the feature; consider reducing some width values.");const x=[void 0,void 0,void 0,void 0];({_texelData:u}=this);for(let v=0;v<h.shadeTextureSize;++v)y=c+v/(h.shadeTextureSize-1)*(w-c),y<c?(x[0]=0,x[1]=0,x[2]=0,x[3]=0):y<p?r(f,
k.outlineColor,(y-c)/(p-c)):y<t?[x[0],x[1],x[2],x[3]]=k.outlineColor:y<w?r(k.outlineColor,k.fillColor,(y-t)/(w-t)):[x[0],x[1],x[2],x[3]]=k.fillColor,u[4*v]=255*x[0],u[4*v+1]=255*x[1],u[4*v+2]=255*x[2],u[4*v+3]=255*x[3];this._minMaxDistance[0]=c;this._minMaxDistance[1]=w;this._shadeTexChanged=!0}applyHighlightOptions(c,r){if(!this._shadeTex){const k=new d.TextureDescriptor;k.wrapMode=m.TextureWrapMode.CLAMP_TO_EDGE;k.width=h.shadeTextureSize;k.height=1;this._shadeTex=new l.Texture(c,k)}this._shadeTexChanged&&
(this._shadeTex.updateData(0,0,0,h.shadeTextureSize,1,this._texelData),this._shadeTexChanged=!1);c.bindTexture(this._shadeTex,q.textureBindingHighlight1);r.setUniform2fv("u_minMaxDistance",this._minMaxDistance)}destroy(){this._shadeTex?.dispose();this._shadeTex=null}getReasonsWithGradients(){return[{activeReasons:(1<<g.highlightReasons.length)-1,activeGradient:this}]}}return n})},"esri/views/2d/engine/highlightReasons":function(){define(["exports","../../../Color","../support/HighlightOptions"],function(e,
g,q){const h={selection(l){return new q({color:new g([l.color.r/2,l.color.g/2,l.color.b/2,l.color.a])})},highlight(l){return l},popup(l){return new q({color:new g([l.color.g,l.color.b,l.color.r,l.color.a])})}},m=Object.keys(h);e.getHighlightBits=function(l){if(!l)return 0;let d=1;for(const b in h){if(b===l)break;d<<=1}return d};e.highlightConfigurator=h;e.highlightReasons=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/highlight/parameters":function(){define(["exports"],
function(e){e.alphaToRgbaChannelSelectorMatrix=[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1];e.highlightSizing={outlineWidth:1.3,outerHaloWidth:.4,innerHaloWidth:.4,outlinePosition:0};e.rgbaToRgbaChannelSelectorMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];e.shadeTextureSize=256;e.sigma=1;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient":function(){define(["exports","../../../highlightReasons","./HighlightGradient"],function(e,g,q){class h{constructor(){this.type=
"multi";const m={};for(const l in g.highlightConfigurator)m[l]=new q;this.gradients=m}setHighlightOptions(m){for(const l in g.highlightConfigurator){const d=g.highlightConfigurator[l](m);this.gradients[l].setHighlightOptions(d)}}applyHighlightOptions(m,l,d){this.gradients[d].applyHighlightOptions(m,l)}destroy(){for(const m in g.highlightConfigurator)this.gradients[m].destroy()}getReasonsWithGradients(){let m=1;const l=[];for(const d in this.gradients)l.push({activeReasons:m,activeGradient:this.gradients[d]}),
m<<=1;return l}}e.MultiHighlightGradient=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils":function(){define(["exports","../../../../../../core/unitUtils","../../definitions","../../enums","../../../../../webgl/enums"],function(e,g,q,h,m){function l({pixelRatio:c,state:r,displayLevel:k,requiredLevel:p},t){const w=1/2**(k-t.key.level);p=1/2**(p-t.key.level);return{displayMat3:Array.from(r.displayMat3),displayViewMat3:Array.from(r.displayViewMat3),
displayViewScreenMat3:Array.from(t.transforms.displayViewScreenMat3),viewMat3:Array.from(r.viewMat3),tileMat3:Array.from(t.transforms.tileMat3),displayZoomFactor:w,requiredZoomFactor:p,tileOffset:[t.x,t.y],currentScale:r.scale,currentZoom:k,metersPerSRUnit:g.getMetersPerUnitForSR(r.spatialReference),rotation:r.rotation,pixelRatio:c}}function d(c){return"highlight"===c.passOptions?.type}function b(c){return"hittest"===c.passOptions?.type}const a={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,
stencil:{write:!1,test:{ref:c=>c.stencilRef,compare:m.CompareFunction.EQUAL,mask:255,op:{fail:m.StencilOperation.KEEP,zFail:m.StencilOperation.KEEP,zPass:m.StencilOperation.REPLACE}}}},f={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:!1},n={...a,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};e.getFeaturePipelineState=function(c){return b(c)?f:d(c)&&"clear"===c.passOptions.stepType?n:a};e.getFeatureUniforms=function(c,r){const {attributeView:k,context:p}=c;var t=k.getUniforms(p);
r=l(c,r);if(b(c)){var {position:w,distance:u,smallSymbolDistance:y,smallSymbolSizeThreshold:x}=c.passOptions;var v={position:w,distance:u,smallSymbolDistance:y,smallSymbolSizeThreshold:x}}else v=null;if(d(c)){var {activeReasons:A,highlightAll:z}=c.passOptions;c={activeReasons:A,highlightAll:z?1:0}}else c=null;return{storage:t,view:r,hittestRequest:v,highlight:c}};e.getLocalTileOffset=function(c){const {row:r,col:k}=c.key;c=k*q.tileSize;const p=r*q.tileSize;return{tileOffsetFromLocalOrigin:[c%q.maxRepresentableInt,
p%q.maxRepresentableInt],maxIntsToLocalOrigin:[Math.floor(c/q.maxRepresentableInt),Math.floor(p/q.maxRepresentableInt)]}};e.getSelectionDefines=function(c){return{inside:c.selection===h.FeatureSelection.InsideEffect,outside:c.selection===h.FeatureSelection.OutsideEffect}};e.getViewUniforms=l;e.isHighlight=d;e.isHittest=b;e.resolveDynamicUniforms=function(c,r,k){const p={};for(const t in k)p[t]=k[t]instanceof Function?k[t](c,r):k[t];return p};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/enums":function(){define(["exports"],function(e){e.WGLGeometryType=void 0;(function(g){g[g.FILL=0]="FILL";g[g.LINE=1]="LINE";g[g.MARKER=2]="MARKER";g[g.TEXT=3]="TEXT";g[g.LABEL=4]="LABEL"})(e.WGLGeometryType||(e.WGLGeometryType={}));e.WGLDrawPhase=void 0;(function(g){g[g.NONE=0]="NONE";g[g.MAP=1]="MAP";g[g.LABEL=2]="LABEL";g[g.LABEL_ALPHA=4]="LABEL_ALPHA";g[g.HITTEST=8]="HITTEST";g[g.HIGHLIGHT=16]="HIGHLIGHT";g[g.CLIP=32]="CLIP";g[g.DEBUG=64]="DEBUG";g[g.NUM_DRAW_PHASES=
9]="NUM_DRAW_PHASES"})(e.WGLDrawPhase||(e.WGLDrawPhase={}));e.VVBinding=void 0;(function(g){g[g.SIZE=0]="SIZE";g[g.COLOR=1]="COLOR";g[g.OPACITY=2]="OPACITY";g[g.ROTATION=3]="ROTATION"})(e.VVBinding||(e.VVBinding={}));e.WGLVVTarget=void 0;(function(g){g[g.MINMAX_TARGETS_OUTLINE=128]="MINMAX_TARGETS_OUTLINE";g[g.SCALE_TARGETS_OUTLINE=256]="SCALE_TARGETS_OUTLINE";g[g.FIELD_TARGETS_OUTLINE=512]="FIELD_TARGETS_OUTLINE";g[g.UNIT_TARGETS_OUTLINE=1024]="UNIT_TARGETS_OUTLINE"})(e.WGLVVTarget||(e.WGLVVTarget=
{}));e.MosaicType=void 0;(function(g){g[g.SPRITE=0]="SPRITE";g[g.GLYPH=1]="GLYPH"})(e.MosaicType||(e.MosaicType={}));e.WGLSymbologyType=void 0;(function(g){g[g.DEFAULT=0]="DEFAULT";g[g.SIMPLE=1]="SIMPLE";g[g.DOT_DENSITY=2]="DOT_DENSITY";g[g.OUTLINE_FILL=3]="OUTLINE_FILL";g[g.OUTLINE_FILL_SIMPLE=4]="OUTLINE_FILL_SIMPLE";g[g.HEATMAP=5]="HEATMAP";g[g.PIE_CHART=6]="PIE_CHART"})(e.WGLSymbologyType||(e.WGLSymbologyType={}));e.FeatureSelection=void 0;(function(g){g[g.All=0]="All";g[g.Highlight=1]="Highlight";
g[g.InsideEffect=2]="InsideEffect";g[g.OutsideEffect=3]="OutsideEffect"})(e.FeatureSelection||(e.FeatureSelection={}));e.FeatureBatchingStrategy=void 0;(function(g){g[g.BATCHING=0]="BATCHING";g[g.STRICT_ORDER=1]="STRICT_ORDER";g[g.STRICT_MARKERS_AND_TEXT=2]="STRICT_MARKERS_AND_TEXT"})(e.FeatureBatchingStrategy||(e.FeatureBatchingStrategy={}));e.FeatureSymbologyDrawOrder=void 0;(function(g){g[g.FILL=0]="FILL";g[g.LINE=1]="LINE";g[g.MARKER=2]="MARKER";g[g.TEXT=3]="TEXT"})(e.FeatureSymbologyDrawOrder||
(e.FeatureSymbologyDrawOrder={}));Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/ManagedCanvas":function(){define("exports ../../../core/Evented ../../../core/events ../../../core/handleUtils ../../../core/has ../../../core/mathUtils ../../../core/libs/gl-matrix-2/math/mat2d ../../../core/libs/gl-matrix-2/factories/mat2df64 ../../webgl/contextUtils".split(" "),function(e,g,q,h,m,l,d,b,a){class f{constructor(n){this.events=new g;this._hasMajorPerformanceCaveat=
!1;this._lastRenderFrameCounter=0;this._canvas=document.createElement("canvas");this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform");const c={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0};n.appendChild(this._canvas);n=a.createContext(this._canvas,c);n||(n=a.createContext(this._canvas,{...c,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0);this._gl=n;this._handles=h.handlesGroup([q.on(this._canvas,"webglcontextlost",
r=>this.events.emit("webgl-context-lost",r))])}destroy(){this._canvas.parentNode?.removeChild(this._canvas);this._canvas=null;this._handles.remove();this._gl=null}get gl(){return this._gl}render(n,c){if(this._hasMajorPerformanceCaveat||m("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=m("esri-performance-mode-frames-between-render")&&(c(),this._lastRenderViewState=n.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const [r,k,p,t,w,u]=this._computeViewTransform(this._lastRenderViewState,
n.state);this._canvas.style.transform=`matrix(${r}, ${k}, ${p}, ${t}, ${w}, ${u})`}}else c()}resize(n){const c=this._canvas,r=c.style,{state:{size:k},pixelRatio:p}=n;n=k[0];const t=k[1],w=Math.round(n*p),u=Math.round(t*p);if(c.width!==w||c.height!==u)c.width=w,c.height=u;r.width=n+"px";r.height=t+"px"}_computeViewTransform(n,c){const [r,k]=n.center,[p,t]=c.center,[w,u]=n.toScreen([0,0],p,t),[y,x]=n.toScreen([0,0],r,k),v=y-w,A=x-u,z=n.scale/c.scale;n=c.rotation-n.rotation;c=b.create();d.identity(c);
d.scale(c,c,[z,z]);d.rotate(c,c,l.deg2rad(n));d.translate(c,c,[v,A]);return c}}e.ManagedCanvas=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/Painter":function(){define("../../../../core/has ../../../../core/maybe ../brushes ../vectorTiles/shaders/VTLMaterialManager ./BitBlitRenderer ./enums ./MaterialManager ./TextureManager ./TextureUploadManager ./VertexStream ./WorldExtentClipRenderer ./effects/AnimationEffect ./effects/BlendEffect ./effects/FeatureEffect ./effects/HighlightEffect ./effects/HittestEffect ./effects/post-processing/EffectManager ./painter/RenderPass ./shaderGraph/techniques/TechniqueProgramCache ../../../webgl/enums ../../../webgl/FramebufferObject ../../../webgl/Renderbuffer ../../../webgl/RenderbufferDescriptor ../../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A,z,B){function D(E,C,G,H){return E!==l.WGLDrawPhase.LABEL_ALPHA&&E!==l.WGLDrawPhase.LABEL&&E!==l.WGLDrawPhase.HIGHLIGHT&&(1!==H||null!=C&&"normal"!==C||null!=G&&0<G.length)}class F{constructor(E,C){this.context=E;this._currentPipelineStateNeedsUpdate=!1;this._blitRenderer=new m.BitBlitRenderer;this._worldExtentRenderer=new n.WorldExtentRenderer;this._brushCache=new Map;this._lastHeight=this._lastWidth=null;this._vtlMaterialManager=new h;this._blendEffect=
new r.BlendEffect;this._stencilBuf=null;this._prevBeforeLayerFBOStack=[];this._fboPool=[];this.effects={highlight:new p,hittest:new t.HittestEffect,integrate:new c.AnimationEffect,insideEffect:new k.FeatureEffect("inside"),outsideEffect:new k.FeatureEffect("outside")};this._programCache=new y.TechniqueProgramCache;this._shaderState={shader:null,uniforms:null,defines:null,optionalAttributes:null,useComputeBuffer:!1};this.materialManager=new d(E);this.textureManager=new b(C);this.textureUploadManager=
new a.TextureUploadManager(C);this._effectsManager=new w.EffectManager;this._quadMesh=new f(E,[0,0,1,0,0,1,1,1])}dispose(){this._programCache.destroy();this.materialManager.dispose();this.textureManager.dispose();this.textureUploadManager.destroy();this._blitRenderer=g.disposeMaybe(this._blitRenderer);this._worldExtentRenderer=g.disposeMaybe(this._worldExtentRenderer);this._quadMesh.dispose();this._brushCache&&(this._brushCache.forEach(E=>E.dispose()),this._brushCache.clear(),this._brushCache=null);
if(this._fbos){let E;for(E in this._fbos)this._fbos[E]&&this._fbos[E].dispose()}for(const E of this._fboPool)E.dispose();this._fboPool.length=0;if(this.effects){let E;for(E in this.effects)this.effects[E]&&this.effects[E].dispose()}this._effectsManager.dispose();this._blendEffect.dispose(this.context);this._vtlMaterialManager=g.disposeMaybe(this._vtlMaterialManager)}clearShaderCache(){this._programCache.destroy();this._programCache=new y.TechniqueProgramCache}get blitRenderer(){return this._blitRenderer}get vectorTilesMaterialManager(){return this._vtlMaterialManager}getFbos(){if(!this._fbos)throw Error("InternalError: Painter FBOs not initialized");
return this._fbos}acquireFbo(E,C){if(0<this._fboPool.length)var G=this._fboPool.pop();else G=new B.TextureDescriptor(E,C),G.samplingMode=x.TextureSamplingMode.NEAREST,G.wrapMode=x.TextureWrapMode.CLAMP_TO_EDGE,G=new v.FramebufferObject(this.context,G,this._stencilBuf);G.width===E&&G.height===C||G.resize(E,C);return G}releaseFbo(E){this._fboPool.push(E)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(E,C,G){const {context:H}=E;this._worldExtentRenderer.render(E,C,G);const {width:K,
height:J}=H.getViewport();this.updateFBOs(K,J);this._prevFBO=H.getBoundFramebufferObject();H.bindFramebuffer(this.getFbos().output);H.setColorMask(!0,!0,!0,!0);if(null!=C){const {r:O,g:Q,b:T,a:I}=C;H.setClearColor(I*O/255,I*Q/255,I*T/255,I)}else H.setClearColor(0,0,0,0);H.setDepthWriteEnabled(!0);H.setClearDepth(1);H.clear(H.gl.COLOR_BUFFER_BIT|H.gl.DEPTH_BUFFER_BIT);H.setDepthWriteEnabled(!1)}afterRenderPhases(E){({context:E}=E);E.bindFramebuffer(this._prevFBO);E.setStencilFunction(x.CompareFunction.EQUAL,
1,255);E.setStencilTestEnabled(!0);E.setDepthTestEnabled(!1);this.blitTexture(E,this.getFbos().output.colorTexture,x.TextureSamplingMode.NEAREST)}beforeRenderLayer(E,C,G){const {context:H,blendMode:K,effects:J,drawPhase:O,requireFBO:Q}=E;if(Q||D(O,K,J,G)){E=H.getBoundFramebufferObject();this._prevBeforeLayerFBOStack.push(E);const {width:T,height:I}=H.getViewport();E=this.acquireFbo(T,I);H.bindFramebuffer(E);H.setColorMask(!0,!0,!0,!0);H.setClearColor(0,0,0,0);H.setDepthWriteEnabled(!0);H.setClearDepth(1);
H.clear(H.gl.COLOR_BUFFER_BIT|H.gl.DEPTH_BUFFER_BIT);H.setDepthWriteEnabled(!1)}H.setDepthWriteEnabled(!1);H.setDepthTestEnabled(!1);H.setStencilTestEnabled(!0);H.setClearStencil(C);H.setStencilWriteMask(255);H.clear(H.gl.STENCIL_BUFFER_BIT)}afterRenderLayer(E,C){const {context:G,blendMode:H,effects:K,requireFBO:J,drawPhase:O}=E;if(J||D(O,H,K,C)){const Q=G.getBoundFramebufferObject();null!=K&&0<K.length&&O===l.WGLDrawPhase.MAP&&(G.setColorMask(!0,!0,!0,!0),this._applyEffects(E,K,Q));G.bindFramebuffer(this._prevBeforeLayerFBOStack.pop());
G.setStencilTestEnabled(!1);G.setStencilWriteMask(0);G.setBlendingEnabled(!0);G.setBlendFunctionSeparate(x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA,x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA);G.setColorMask(!0,!0,!0,!0);this._blendEffect.draw(E,Q.colorTexture,x.TextureSamplingMode.NEAREST,null==H||O===l.WGLDrawPhase.HIGHLIGHT?"normal":H,C);this.releaseFbo(Q)}}renderObject(E,C,G,H){if(G=q.brushes[G]){var K=this._brushCache.get(G);void 0===K&&(K=new G,this._brushCache.set(G,K));K.prepareState(E);
K.draw(E,C,H)}}renderObjects(E,C,G,H){if(G=q.brushes[G]){var K=this._brushCache.get(G);void 0===K&&(K=new G,this._brushCache.set(G,K));K.drawMany(E,C,H)}}registerRenderPass(E){const C=E.brushes.map(G=>{this._brushCache.has(G)||this._brushCache.set(G,new G);return this._brushCache.get(G)});return new u(C,E)}blitTexture(E,C,G,H=1){E.setBlendingEnabled(!0);E.setBlendFunctionSeparate(x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA,x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA);E.setColorMask(!0,
!0,!0,!0);this._blitRenderer.render(E,C,G,H);this._currentPipelineStateNeedsUpdate=!0}getPostProcessingEffects(E){return this._effectsManager.getPostProcessingEffects(E)}updateFBOs(E,C){if(E!==this._lastWidth||C!==this._lastHeight)if(this._lastWidth=E,this._lastHeight=C,this._fbos)for(var G in this._fbos)this._fbos[G].resize(E,C);else G=new B.TextureDescriptor(E,C),G.samplingMode=x.TextureSamplingMode.NEAREST,G.wrapMode=x.TextureWrapMode.CLAMP_TO_EDGE,E=new z.RenderbufferDescriptor(x.RenderbufferFormat.DEPTH_STENCIL,
E,C),this._stencilBuf=new A.Renderbuffer(this.context,E),this._fbos={output:new v.FramebufferObject(this.context,G,this._stencilBuf),effect0:new v.FramebufferObject(this.context,G,this._stencilBuf)}}_applyEffects(E,C,G){const {context:H}=E;C=this._effectsManager.getPostProcessingEffects(C);for(const {postProcessingEffect:K,effect:J}of C)H.bindFramebuffer(G),K.draw(E,G,J);this._currentPipelineStateNeedsUpdate=!0}setShader(E){this._shaderState.shader=E.shader;this._shaderState.uniforms=E.uniforms;this._shaderState.defines=
E.defines;this._shaderState.optionalAttributes=E.optionalAttributes;this._shaderState.useComputeBuffer=E.useComputeBuffer??!1}setPipelineState(E){E!==this._currentPipelineState&&(this._currentPipelineState=E,this._currentPipelineStateNeedsUpdate=!0)}submitDraw(E,C){const {shader:G,uniforms:H,defines:K,optionalAttributes:J}=this._shaderState,O=E.context;var Q=C.getAttributePrecisionPackFactors();Q=this._programCache.getProgram(G,Q,H,K??{},J??{});Q.setUniforms(H);Q.bind(O);this.updatePipelineState(O);
this.setStencilRef(O,C);C.draw(E,G.locationInfo);Q.cleanupTemporaryTextures();return{vertexShader:Q.vertexShader,fragmentShader:Q.fragmentShader}}submitDrawQuad(E){const {shader:C,uniforms:G,defines:H,optionalAttributes:K}=this._shaderState,J=this._programCache.getProgram(C,{},G,H??{},K??{});J.setUniforms(G);J.bind(E);this.updatePipelineState(E);this._quadMesh.draw();E.bindVAO(null);J.cleanupTemporaryTextures()}submitDrawMesh(E,C,G){const {shader:H,uniforms:K,defines:J,optionalAttributes:O}=this._shaderState,
Q=this._programCache.getProgram(H,{},K,J??{},O??{});Q.setUniforms(K);Q.bind(E);this.updatePipelineState(E);if(G)for(const T of G)C.bind(E,T),C.draw(E);else for(G=0;G<C.parts.length;G++)C.bind(E,G),C.draw(E);C.unbind(E);Q.cleanupTemporaryTextures()}updatePipelineState(E){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(E))}_updatePipelineState(E){if(null==this._currentPipelineState)throw Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
const {color:C,depth:G,stencil:H}=this._currentPipelineState;if(C){const {blendMode:J,write:O}=C;E.setColorMask(...O);E.setBlendingEnabled(!0);E.setBlendEquation(x.BlendOperation.ADD);switch(J){case "composite":E.setBlendFunctionSeparate(x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA,x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA);break;case "additive":E.setBlendFunctionSeparate(x.BlendFactor.ONE,x.BlendFactor.ONE,x.BlendFactor.ONE,x.BlendFactor.ONE);break;case "custom":var {blendParameters:K}=
C;const {dstAlpha:Q,dstRGB:T,srcAlpha:I,srcRGB:L}=K;E.setBlendFunctionSeparate(L,T,I,Q);break;case "delete":E.setBlendEquation(x.BlendOperation.REVERSE_SUBTRACT),E.setBlendFunctionSeparate(x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA,x.BlendFactor.ONE,x.BlendFactor.ONE_MINUS_SRC_ALPHA)}}if(G){const {test:J,write:O}=G;O?(E.setDepthWriteEnabled(!0),E.setDepthRange(O.zNear,O.zFar)):E.setDepthWriteEnabled(!1);J?(E.setDepthTestEnabled(!0),E.setDepthFunction(J)):E.setDepthTestEnabled(!1)}else E.setDepthTestEnabled(!1),
E.setDepthWriteEnabled(!1);if(H){const {test:J,write:O}=H;if(J){const {compare:Q,mask:T,op:I,ref:L}=J;E.setStencilTestEnabled(!0);"function"!==typeof L&&E.setStencilFunctionSeparate(x.Face.FRONT_AND_BACK,Q,L,T);E.setStencilOpSeparate(x.Face.FRONT_AND_BACK,I.fail,I.zFail,I.zPass)}else E.setStencilTestEnabled(!1);O?({mask:K}=O,E.setStencilWriteMask(K)):E.setStencilWriteMask(0)}else E.setStencilTestEnabled(!1),E.setStencilWriteMask(0)}setStencilRef(E,C){if(null==this._currentPipelineState)throw Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");
var {stencil:G}=this._currentPipelineState;if(G&&({test:G}=G,G)){const {compare:H,mask:K,ref:J}=G;if("function"===typeof J){C=C.getStencilReference();if(null===C)throw Error("InternalError: Stencil reference expected for target but not defined");E.setStencilFunctionSeparate(x.Face.FRONT_AND_BACK,H,C,K)}}}}return F})},"esri/views/2d/engine/brushes":function(){define("exports ./webgl/brushes/BrushBitmap ./webgl/brushes/BrushClip ./webgl/brushes/BrushOverlay ./webgl/brushes/WGLBrushStencil ./webgl/brushes/WGLBrushTileDebugInfo ./webgl/brushes/WGLBrushVTLBackground ./webgl/brushes/WGLBrushVTLCircle ./webgl/brushes/WGLBrushVTLFill ./webgl/brushes/WGLBrushVTLLine ./webgl/brushes/WGLBrushVTLSymbol".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){e.brushes={clip:q,stencil:m,bitmap:g,overlay:h,tileDebugInfo:l,vtlBackground:d.WGLBrushVTLBackground,vtlFill:a.WGLBrushVTLFill,vtlLine:f.WGLBrushVTLLine,vtlCircle:b.WGLBrushVTLCircle,vtlSymbol:n.WGLBrushVTLSymbol};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/BrushBitmap":function(){define(["../definitions","../VertexStream","./WGLBrush","../../../../webgl/enums"],function(e,g,q,h){const m={nearest:{defines:[],samplingMode:h.TextureSamplingMode.NEAREST,
mips:!1},bilinear:{defines:[],samplingMode:h.TextureSamplingMode.LINEAR,mips:!1},bicubic:{defines:["bicubic"],samplingMode:h.TextureSamplingMode.LINEAR,mips:!1},trilinear:{defines:[],samplingMode:h.TextureSamplingMode.LINEAR_MIPMAP_LINEAR,mips:!0}};class l extends q{constructor(){super(...arguments);this._desc={vsPath:"raster/bitmap",fsPath:"raster/bitmap",attributes:new Map([["a_pos",0]])}}dispose(){this._quad&&this._quad.dispose()}prepareState({context:d}){d.setBlendingEnabled(!0);d.setColorMask(!0,
!0,!0,!0);d.setStencilWriteMask(0);d.setStencilTestEnabled(!0)}draw(d,b){const {context:a,renderingOptions:f,painter:n,requestRender:c,allowDelayedRender:r}=d;if(b.source&&b.isReady){if("dynamic"===f.samplingMode){({state:p}=d);var k=b.resolution/b.pixelRatio/p.resolution;const y=Math.round(d.pixelRatio)!==d.pixelRatio;var p=p.rotation||1.05<k||.95>k||y||b.isSourceScaled||b.rotation?m.bilinear:m.nearest}else p=m[f.samplingMode];k=n.materialManager.getProgram(this._desc,p.defines);if(r&&null!=c&&!k.compiled)c();
else{d.timeline.begin(this.name);"additive"===b.blendFunction?a.setBlendFunctionSeparate(h.BlendFactor.ONE,h.BlendFactor.ONE,h.BlendFactor.ONE,h.BlendFactor.ONE):a.setBlendFunctionSeparate(h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA,h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA);a.setStencilFunction(h.CompareFunction.EQUAL,b.stencilRef,255);this._quad||(this._quad=new g(a,[0,0,1,0,0,1,1,1]));var {coordScale:t,computedOpacity:w,transforms:u}=b;b.setSamplingProfile(p);b.bind(d.context,
e.textureBindingBitmap);a.useProgram(k);k.setUniformMatrix3fv("u_dvsMat3",u.displayViewScreenMat3);k.setUniform1i("u_texture",e.textureBindingBitmap);k.setUniform2fv("u_coordScale",t);k.setUniform1f("u_opacity",w);this._quad.draw();d.timeline.end(this.name)}}}}return l})},"esri/views/2d/engine/webgl/VertexStream":function(){define(["./shaderGraph/techniques/mesh/utils","../../../webgl/BufferObject","../../../webgl/enums","../../../webgl/VertexArrayObject","../../../webgl/VertexElementDescriptor"],
function(e,g,q,h,m){class l{constructor(d,b){this._rctx=d;this._attributes=[{name:"position",offset:0,type:q.DataType.SHORT,count:2}];this.layout={hash:e.vertexLayoutHash(this._attributes),attributes:this._attributes,stride:4};this._vertexBuffer=g.BufferObject.createVertex(d,q.Usage.STATIC_DRAW,new Uint16Array(b));this._vao=new h.VertexArrayObject(d,new Map([["a_position",0]]),{geometry:[new m.VertexElementDescriptor("a_position",2,q.DataType.SHORT,0,4)]},{geometry:this._vertexBuffer});this._count=
b.length/2}bind(){this._rctx.bindVAO(this._vao)}unbind(){this._rctx.bindVAO(null)}dispose(){this._vao.dispose()}draw(){this._rctx.bindVAO(this._vao);this._rctx.drawArrays(q.PrimitiveType.TRIANGLE_STRIP,0,this._count)}}return l})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/utils":function(){define(["exports","../../../../../../../core/string"],function(e,g){function q(h,m,l,d,b,a,f){if(h.primitiveName===m)for(const n in h)if(n===l){m=d?.readWithDefault(b,a,h[n]&&f);"text"===h.type&&(m=
m.toString());h[n]=m;return}if("type"in h&&null!=h.type)switch(h.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":if(h.symbolLayers)for(const n of h.symbolLayers)q(n,m,l,d,b,a,f);break;case "CIMHatchFill":h.lineSymbol&&q(h.lineSymbol,m,l,d,b,a,f);break;case "CIMSolidStroke":case "CIMSolidFill":case "CIMVectorMarker":if("CIMVectorMarker"===h.type&&h.markerGraphics)for(const n of h.markerGraphics)q(n,m,l,d,b,a,f),q(n.symbol,m,l,d,b,a,f)}}e.applyComputedValue=q;e.getLineClippingMargin=
function(h){const m=h.width;return null!=h.effects?400:Math.max(1.25*m,8)};e.vertexLayoutHash=function(h){h=h.map(({name:m,count:l,type:d})=>`${m}.${l}.${d}`).join(",");return g.numericHash(h)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/VertexElementDescriptor":function(){define(["exports"],function(e){class g{constructor(q,h,m,l,d,b=!1,a=0){this.name=q;this.count=h;this.type=m;this.offset=l;this.stride=d;this.normalized=b;this.divisor=a}}e.VertexElementDescriptor=
g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrush":function(){define(function(){class e{constructor(){this.name=this.constructor.name||"UnnamedBrush";this.brushEffect=null}prepareState(g,q){}draw(g,q,h){}drawMany(g,q,h){for(const m of q)m.visible&&this.draw(g,m,h)}}return e})},"esri/views/2d/engine/webgl/brushes/BrushClip":function(){define("../../../../../core/libs/gl-matrix-2/factories/vec4f32 ../Utils ./WGLBrush ../shaders/BackgroundPrograms ../../../../webgl/enums ../../../../webgl/ProgramTemplate".split(" "),
function(e,g,q,h,m,l){class d extends q{constructor(){super(...arguments);this._color=e.fromValues(0,1,0,1)}dispose(){this._program&&this._program.dispose()}prepareState({context:b}){b.setStencilTestEnabled(!0);b.setBlendingEnabled(!1);b.setFaceCullingEnabled(!1);b.setColorMask(!1,!1,!1,!1);b.setStencilOp(m.StencilOperation.KEEP,m.StencilOperation.KEEP,m.StencilOperation.REPLACE);b.setStencilWriteMask(255);b.setStencilFunction(m.CompareFunction.ALWAYS,0,255)}draw(b,a){const {context:f,state:n,requestRender:c,
allowDelayedRender:r}=b;b=g.createProgramDescriptor("clip",{geometry:[{location:0,name:"a_pos",count:2,type:m.DataType.SHORT}]});a=a.getVAO(f,n,b.attributes,b.bufferLayouts);null!=a.indexBuffer&&(this._program||(this._program=l.createProgram(f,h.background)),r&&null!=c&&!this._program.compiled?c():(f.useProgram(this._program),this._program.setUniform2fv("u_coord_range",[1,1]),this._program.setUniform4fv("u_color",this._color),this._program.setUniformMatrix3fv("u_dvsMat3",n.displayMat3),f.bindVAO(a),
f.drawElements(m.PrimitiveType.TRIANGLES,a.indexBuffer.size,m.DataType.UNSIGNED_INT,0),f.bindVAO()))}}return d})},"esri/core/libs/gl-matrix-2/factories/vec4f32":function(){define(["exports"],function(e){function g(){return new Float32Array(4)}function q(y){const x=new Float32Array(4);x[0]=y[0];x[1]=y[1];x[2]=y[2];x[3]=y[3];return x}function h(y,x,v,A){const z=new Float32Array(4);z[0]=y;z[1]=x;z[2]=v;z[3]=A;return z}function m(y,x){return new Float32Array(y,x,4)}function l(){return g()}function d(){return h(1,
1,1,1)}function b(){return h(1,0,0,0)}function a(){return h(0,1,0,0)}function f(){return h(0,0,1,0)}function n(){return h(0,0,0,1)}const c=g(),r=d(),k=b(),p=a(),t=f(),w=n(),u=Object.freeze(Object.defineProperty({__proto__:null,ONES:r,UNIT_W:w,UNIT_X:k,UNIT_Y:p,UNIT_Z:t,ZEROS:c,clone:q,create:g,createView:m,fromValues:h,ones:d,unitW:n,unitX:b,unitY:a,unitZ:f,zeros:l},Symbol.toStringTag,{value:"Module"}));e.ONES=r;e.UNIT_W=w;e.UNIT_X=k;e.UNIT_Y=p;e.UNIT_Z=t;e.ZEROS=c;e.clone=q;e.create=g;e.createView=
m;e.fromValues=h;e.ones=d;e.unitW=n;e.unitX=b;e.unitY=a;e.unitZ=f;e.vec4f32=u;e.zeros=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/Utils":function(){define("exports ../../../../core/Error ../../../../core/Logger ../../../../symbols/cim/enums ../../../../core/RandomLCG ../../../../core/has ../../../webgl/checkWebGLError ../../../webgl/enums ../../../webgl/FramebufferObject ../../../../chunks/builtins ../../../webgl/GLObjectType ../../../webgl/getDataTypeBytes ../../../webgl/Texture ../../../webgl/TextureDescriptor ../../../webgl/VertexElementDescriptor".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p){function t(y){const x={};for(const v in y){let A=0;x[v]=y[v].map(z=>{const B=new p.VertexElementDescriptor(z.name,z.count,z.type,A,0,z.normalized||!1);A+=z.count*c.getDataTypeBytes(z.type);return B});x[v]?.forEach(z=>z.stride=A)}return x}const w=()=>q.getLogger("esri.views.2d.engine.webgl.Utils"),u=new Map;e.charCodes=function(y){const x=[];for(let v=0;v<y.length;v++)x.push(y.charCodeAt(v));return x};e.createAttributeLayout=t;e.createProgramDescriptor=(y,x)=>
{if(!u.has(y)){const z=t(x);var v=z;var A={};for(const B in v){const D=v[B];A[B]=D?.length?D[0].stride:0}v=A;A=new Map;for(const B in x)for(const D of x[B])A.set(D.name,D.location);u.set(y,{strides:v,bufferLayouts:z,attributes:A})}return u.get(y)};e.createTexture=function(y,x,v){const A=new k.TextureDescriptor(x.width,x.height);A.dataType=x.dataType;x.depth&&(A.depth=x.depth);x.flipped&&(A.flipped=x.flipped);x.hasMipmap&&(A.hasMipmap=x.hasMipmap);A.internalFormat=x.internalFormat;x.isImmutable&&(A.isImmutable=
x.isImmutable);x.isOpaque&&(A.isOpaque=x.isOpaque);x.maxAnisotropy&&(A.maxAnisotropy=x.maxAnisotropy);A.pixelFormat=x.pixelFormat;x.preMultiplyAlpha&&(A.preMultiplyAlpha=x.preMultiplyAlpha);x.samplingMode&&(A.samplingMode=x.samplingMode);x.target&&(A.target=x.target);A.uniform=x.uniform;x.unpackAlignment&&(A.unpackAlignment=x.unpackAlignment);x.wrapMode&&(A.wrapMode=x.wrapMode);return new r.Texture(y,A,v)};e.discardUrlIfHasUrlHash=function(y){return"url"in y&&"urlHash"in y?{...y,url:""}:y};e.getCapType=
function(y){switch(y){case "butt":return h.CapType.BUTT;case "round":return h.CapType.ROUND;case "square":return h.CapType.SQUARE;default:return w().error(new g("mapview-invalid-type",`Cap type ${y} is not a valid option. Defaulting to round`)),h.CapType.ROUND}};e.getJoinType=function(y){switch(y){case "miter":return h.JoinType.MITER;case "bevel":return h.JoinType.BEVEL;case "round":return h.JoinType.ROUND;default:return w().error(new g("mapview-invalid-type",`Join type ${y} is not a valid option. Defaulting to round`)),
h.JoinType.ROUND}};e.getPixelArrayCtor=function(y){switch(y){case b.PixelType.UNSIGNED_BYTE:return Uint8Array;case b.PixelType.UNSIGNED_SHORT_4_4_4_4:return Uint16Array;case b.PixelType.FLOAT:return Float32Array;default:w().error(new g("webgl-utils",`Unable to handle type ${y}`))}};e.getPixelBytes=function(y){switch(y){case b.PixelType.UNSIGNED_BYTE:return 1;case b.PixelType.UNSIGNED_SHORT_4_4_4_4:return 2;case b.PixelType.FLOAT:return 4;default:w().error(new g("webgl-utils",`Unable to handle type ${y}`))}};
e.isSVGImage=y=>y.includes("data:image/svg+xml");e.isValidSVG=y=>{if(!y)return!1;y=y.trim();return/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(y)&&/[\dz]$/i.test(y)&&4<y.length?!0:!1};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaders/BackgroundPrograms":function(){define(["exports","./sources/resolver"],function(e,g){g={shaders:{vertexShader:g.resolveIncludes("background/background.vert"),fragmentShader:g.resolveIncludes("background/background.frag")},
attributes:new Map([["a_pos",0]])};e.background=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaders/sources/resolver":function(){define(["exports","./shaderRepository","../../../../../webgl/ShaderCompiler"],function(e,g,q){const h=new q.ShaderCompiler(function(m){return function(l){let d=m;l.split("/").forEach(b=>{d&&=d[b]});return d}}(g));e.resolveIncludes=function(m){return h.resolveIncludes(m)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaders/sources/shaderRepository":function(){define(function(){return{background:{"background.frag":"uniform lowp vec4 u_color;\nvoid main() {\ngl_FragColor \x3d u_color;\n}","background.vert":"attribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump vec2 u_coord_range;\nuniform mediump float u_depth;\nvoid main() {\nvec3 v_pos \x3d u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0);\ngl_Position \x3d vec4(v_pos.xy, 0.0, 1.0);\n}"},bitBlit:{"bitBlit.frag":"uniform lowp sampler2D u_tex;\nuniform lowp float u_opacity;\nvarying mediump vec2 v_uv;\nvoid main() {\nlowp vec4 color \x3d texture2D(u_tex, v_uv);\ngl_FragColor \x3d color * u_opacity;\n}",
"bitBlit.vert":"attribute vec2 a_pos;\nattribute vec2 a_tex;\nvarying mediump vec2 v_uv;\nvoid main(void) {\ngl_Position \x3d vec4(a_pos , 0.0, 1.0);\nv_uv \x3d a_tex;\n}"},blend:{"blend.frag":"precision mediump float;\nuniform sampler2D u_layerTexture;\nuniform lowp float u_opacity;\nuniform lowp float u_inFadeOpacity;\n#ifndef NORMAL\nuniform sampler2D u_backbufferTexture;\n#endif\nvarying mediump vec2 v_uv;\nfloat rgb2v(in vec3 c) {\nreturn max(c.x, max(c.y, c.z));\n}\nvec3 rgb2hsv(in vec3 c) {\nvec4 K \x3d vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p \x3d c.g \x3c c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\nvec4 q \x3d c.r \x3c p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\nfloat d \x3d q.x - min(q.w, q.y);\nfloat e \x3d 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(in vec3 c) {\nvec4 K \x3d vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 p \x3d abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\nreturn c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nvec3 tint(in vec3 Cb, in vec3 Cs) {\nfloat vIn \x3d rgb2v(Cb);\nvec3 hsvTint \x3d rgb2hsv(Cs);\nvec3 hsvOut \x3d vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z);\nreturn hsv2rgb(hsvOut);\n}\nfloat overlay(in float Cb, in float Cs) {\nreturn (1.0 - step(0.5, Cs)) * (1.0 - 2.0 * (1.0 - Cs ) * (1.0 - Cb)) + step(0.5, Cs) * (2.0 * Cs * Cb);\n}\nfloat colorDodge(in float Cb, in float Cs) {\nreturn (Cb \x3d\x3d 0.0) ? 0.0 : (Cs \x3d\x3d 1.0) ? 1.0 : min(1.0, Cb / (1.0 - Cs));\n}\nfloat colorBurn(in float Cb, in float Cs) {\nreturn (Cb \x3d\x3d 1.0) ? 1.0 : (Cs \x3d\x3d 0.0) ? 0.0 : 1.0 - min(1.0, (1.0 - Cb) / Cs);\n}\nfloat hardLight(in float Cb, in float Cs) {\nreturn (1.0 - step(0.5, Cs)) * (2.0 * Cs * Cb) + step(0.5, Cs) * (1.0 - 2.0 * (1.0 - Cs) * (1.0 - Cb));\n}\nfloat reflectBlend(in float Cb, in float Cs) {\nreturn (Cs \x3d\x3d 1.0) ? Cs : min(Cb * Cb / (1.0 - Cs), 1.0);\n}\nfloat softLight(in float Cb, in float Cs) {\nif (Cs \x3c\x3d 0.5) {\nreturn Cb - (1.0 - 2.0 * Cs) * Cb * (1.0 - Cb);\n}\nif (Cb \x3c\x3d 0.25) {\nreturn Cb + (2.0 * Cs - 1.0) * Cb * ((16.0 * Cb - 12.0) * Cb + 3.0);\n}\nreturn Cb + (2.0 * Cs - 1.0) * (sqrt(Cb) - Cb);\n}\nfloat vividLight(in float Cb, in float Cs) {\nreturn (1.0 - step(0.5, Cs)) * colorBurn(Cb, 2.0 * Cs) + step(0.5, Cs) * colorDodge(Cb, (2.0 * (Cs - 0.5)));\n}\nfloat minv3(in vec3 c) {\nreturn min(min(c.r, c.g), c.b);\n}\nfloat maxv3(in vec3 c) {\nreturn max(max(c.r, c.g), c.b);\n}\nfloat lumv3(in vec3 c) {\nreturn dot(c, vec3(0.3, 0.59, 0.11));\n}\nfloat satv3(vec3 c) {\nreturn maxv3(c) - minv3(c);\n}\nvec3 clipColor(vec3 color) {\nfloat lum \x3d lumv3(color);\nfloat mincol \x3d minv3(color);\nfloat maxcol \x3d maxv3(color);\nif (mincol \x3c 0.0) {\ncolor \x3d lum + ((color - lum) * lum) / (lum - mincol);\n}\nif (maxcol \x3e 1.0) {\ncolor \x3d lum + ((color - lum) * (1.0 - lum)) / (maxcol - lum);\n}\nreturn color;\n}\nvec3 setLum(vec3 cbase, vec3 clum) {\nfloat lbase \x3d lumv3(cbase);\nfloat llum \x3d lumv3(clum);\nfloat ldiff \x3d llum - lbase;\nvec3 color \x3d cbase + vec3(ldiff);\nreturn clipColor(color);\n}\nvec3 setLumSat(vec3 cbase, vec3 csat, vec3 clum)\n{\nfloat minbase \x3d minv3(cbase);\nfloat sbase \x3d satv3(cbase);\nfloat ssat \x3d satv3(csat);\nvec3 color;\nif (sbase \x3e 0.0) {\ncolor \x3d (cbase - minbase) * ssat / sbase;\n} else {\ncolor \x3d vec3(0.0);\n}\nreturn setLum(color, clum);\n}\nvoid main() {\nvec4 src \x3d texture2D(u_layerTexture, v_uv);\n#ifdef NORMAL\ngl_FragColor \x3d src * u_opacity;\n#else\nvec4 dst \x3d texture2D(u_backbufferTexture, v_uv);\nvec3 Cs \x3d src.a \x3d\x3d 0.0 ? src.rgb : vec3(src.rgb / src.a);\nvec3 Cb \x3d dst.a \x3d\x3d 0.0 ? dst.rgb : vec3(dst.rgb / dst.a);\nfloat as \x3d u_opacity * src.a;\nfloat ab \x3d dst.a;\n#ifdef DESTINATION_OVER\ngl_FragColor \x3d vec4(as * Cs * (1.0 - ab) + ab * Cb, as + ab - as * ab);\n#endif\n#ifdef SOURCE_IN\nvec4 color \x3d vec4(as * Cs * ab, as * ab);\nvec4 fadeColor \x3d (1.0 - u_opacity) * u_inFadeOpacity * vec4(ab * Cb, ab);\ngl_FragColor \x3d color + fadeColor;\n#endif\n#ifdef DESTINATION_IN\nvec4 color \x3d vec4(ab * Cb * as, ab * as);\nvec4 fadeColor \x3d (1.0 - u_opacity) * u_inFadeOpacity * vec4(ab * Cb, ab);\ngl_FragColor \x3d color + fadeColor;\n#endif\n#ifdef SOURCE_OUT\ngl_FragColor \x3d vec4(as * Cs * (1.0 - ab), as * (1.0 - ab));\n#endif\n#ifdef DESTINATION_OUT\ngl_FragColor \x3d vec4(ab * Cb * (1.0 - as), ab * (1.0 - as));\n#endif\n#ifdef SOURCE_ATOP\ngl_FragColor \x3d vec4(as * Cs * ab + ab * Cb * (1.0 - as), ab);\n#endif\n#ifdef DESTINATION_ATOP\ngl_FragColor \x3d vec4(as * Cs * (1.0 - ab) + ab * Cb * as, as);\n#endif\n#ifdef XOR\ngl_FragColor \x3d vec4(as * Cs * (1.0 - ab) + ab * Cb * (1.0 - as),\nas * (1.0 - ab) + ab * (1.0 - as));\n#endif\n#ifdef MULTIPLY\ngl_FragColor \x3d vec4(as * Cs * ab * Cb + (1.0 - ab) * as * Cs + (1.0 - as) * ab * Cb,\nas + ab * (1.0 - as));\n#endif\n#ifdef SCREEN\ngl_FragColor \x3d vec4((Cs + Cb - Cs * Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef OVERLAY\nvec3 f \x3d vec3(overlay(Cb.r, Cs.r), overlay(Cb.g, Cs.g), overlay(Cb.b, Cs.b));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef DARKEN\ngl_FragColor \x3d vec4(min(Cs, Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef LIGHTER\ngl_FragColor \x3d vec4(as * Cs + ab * Cb, as + ab);\n#endif\n#ifdef LIGHTEN\ngl_FragColor \x3d vec4(max(Cs, Cb) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef COLOR_DODGE\nvec3 f \x3d clamp(vec3(colorDodge(Cb.r, Cs.r), colorDodge(Cb.g, Cs.g), colorDodge(Cb.b, Cs.b)), vec3(0.0), vec3(1.0));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef COLOR_BURN\nvec3 f \x3d vec3(colorBurn(Cb.r, Cs.r), colorBurn(Cb.g, Cs.g), colorBurn(Cb.b, Cs.b));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef HARD_LIGHT\nvec3 f \x3d vec3(hardLight(Cb.r, Cs.r), hardLight(Cb.g, Cs.g), hardLight(Cb.b, Cs.b));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef SOFT_LIGHT\nvec3 f \x3d vec3(softLight(Cb.r, Cs.r), softLight(Cb.g, Cs.g), softLight(Cb.b, Cs.b));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef DIFFERENCE\ngl_FragColor \x3d vec4(abs(Cb - Cs) * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef EXCLUSION\nvec3 f \x3d Cs + Cb - 2.0 * Cs * Cb;\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef INVERT\ngl_FragColor \x3d vec4((1.0 - Cb) * as * ab + Cb * ab * (1.0 - as), ab);\n#endif\n#ifdef VIVID_LIGHT\nvec3 f \x3d vec3(clamp(vividLight(Cb.r, Cs.r), 0.0, 1.0),\nclamp(vividLight(Cb.g, Cs.g), 0.0, 1.0),\nclamp(vividLight(Cb.b, Cs.b), 0.0, 1.0));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef HUE\nvec3 f \x3d setLumSat(Cs,Cb,Cb);\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef SATURATION\nvec3 f \x3d setLumSat(Cb,Cs,Cb);\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef COLOR\nvec3 f \x3d setLum(Cs,Cb);\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef LUMINOSITY\nvec3 f \x3d setLum(Cb,Cs);\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef PLUS\ngl_FragColor \x3d clamp(vec4(src.r + Cb.r, src.g + Cb.g, src.b + Cb.b, as + ab), 0.0, 1.0);\n#endif\n#ifdef MINUS\ngl_FragColor \x3d vec4(clamp(vec3(Cb.r - src.r, Cb.g - src.g, Cb.b - src.b), 0.0, 1.0), ab * as);\n#endif\n#ifdef AVERAGE\nvec3 f \x3d (Cb + Cs) / 2.0;\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#ifdef REFLECT\nvec3 f \x3d clamp(vec3(reflectBlend(Cb.r, Cs.r),\nreflectBlend(Cb.g, Cs.g),\nreflectBlend(Cb.b, Cs.b)), vec3(0.0), vec3(1.0));\ngl_FragColor \x3d vec4(f * as * ab + Cs * as * (1.0 - ab) + Cb * ab *(1.0 - as),\nas + ab * (1.0 - as));\n#endif\n#endif\n}",
"blend.vert":"attribute vec2 a_position;\nvarying mediump vec2 v_uv;\nvoid main(void) {\ngl_Position \x3d vec4(a_position , 0.0, 1.0);\nv_uv \x3d (a_position + 1.0) / 2.0;\n}"},debug:{overlay:{"overlay.frag":"precision mediump float;\nvarying vec4 v_color;\nvoid main(void) {\ngl_FragColor \x3d v_color;\n}","overlay.vert":"attribute vec3 a_PositionAndFlags;\nuniform mat3 u_dvsMat3;\nuniform vec4 u_colors[4];\nuniform float u_opacities[4];\nvarying vec4 v_color;\nvoid main(void) {\nvec2 position \x3d a_PositionAndFlags.xy;\nfloat flags \x3d a_PositionAndFlags.z;\nint colorIndex \x3d int(mod(flags, 4.0));\nvec4 color;\nfor (int i \x3d 0; i \x3c 4; i++) {\ncolor \x3d u_colors[i];\nif (i \x3d\x3d colorIndex) {\nbreak;\n}\n}\nint opacityIndex \x3d int(mod(floor(flags / 4.0), 4.0));\nfloat opacity;\nfor (int i \x3d 0; i \x3c 4; i++) {\nopacity \x3d u_opacities[i];\nif (i \x3d\x3d opacityIndex) {\nbreak;\n}\n}\nv_color \x3d color * opacity;\ngl_Position \x3d vec4((u_dvsMat3 * vec3(position, 1.0)).xy, 0.0, 1.0);\n}"}},
dot:{dot:{"dot.frag":"precision mediump float;\nvarying vec4 v_color;\nvarying float v_dotRatio;\nvarying float v_invEdgeRatio;\nuniform highp float u_tileZoomFactor;\nvoid main()\n{\nfloat dist \x3d length(gl_PointCoord - vec2(.5, .5)) * 2.;\nfloat alpha \x3d smoothstep(0., 1., v_invEdgeRatio * (dist - v_dotRatio) + 1.);\ngl_FragColor \x3d v_color * alpha;\n}","dot.vert":"precision highp float;\nattribute vec2 a_pos;\nuniform sampler2D u_texture;\nuniform highp mat3 u_dvsMat3;\nuniform highp float u_tileZoomFactor;\nuniform highp float u_dotSize;\nuniform highp float u_pixelRatio;\nvarying vec2 v_pos;\nvarying vec4 v_color;\nvarying float v_dotRatio;\nvarying float v_invEdgeRatio;\nconst float EPSILON \x3d 0.000001;\nvoid main()\n{\nmat3 tileToTileTexture \x3d mat3( 1., 0., 0.,\n0., -1., 0.,\n0., 1., 1. );\nvec3 texCoords \x3d tileToTileTexture * vec3(a_pos.xy / 512., 1.);\nv_color \x3d texture2D(u_texture, texCoords.xy);\nfloat smoothEdgeWidth \x3d max(u_dotSize / 2., 1.) ;\nfloat z \x3d 0.;\nz +\x3d 2.0 * step(v_color.a, EPSILON);\ngl_PointSize \x3d (smoothEdgeWidth + u_dotSize);\ngl_Position \x3d vec4((u_dvsMat3 * vec3(a_pos + .5, 1.)).xy, z, 1.);\nv_dotRatio \x3d u_dotSize / gl_PointSize;\nv_invEdgeRatio \x3d -1. / ( smoothEdgeWidth / gl_PointSize );\ngl_PointSize *\x3d (u_pixelRatio * u_tileZoomFactor);\n}"}},
filtering:{"bicubic.glsl":"vec4 computeWeights(float v) {\nfloat b \x3d 1.0 / 6.0;\nfloat v2 \x3d v * v;\nfloat v3 \x3d v2 * v;\nfloat w0 \x3d b * (-v3 + 3.0 * v2 - 3.0 * v + 1.0);\nfloat w1 \x3d b * (3.0 * v3 - 6.0 * v2 + 4.0);\nfloat w2 \x3d b * (-3.0 * v3 + 3.0 * v2 + 3.0 * v + 1.0);\nfloat w3 \x3d b * v3;\nreturn vec4(w0, w1, w2, w3);\n}\nvec4 bicubicOffsetsAndWeights(float v) {\nvec4 w \x3d computeWeights(v);\nfloat g0 \x3d w.x + w.y;\nfloat g1 \x3d w.z + w.w;\nfloat h0 \x3d 1.0 - (w.y / g0) + v;\nfloat h1 \x3d 1.0 + (w.w / g1) - v;\nreturn vec4(h0, h1, g0, g1);\n}\nvec4 sampleBicubicBSpline(sampler2D sampler, vec2 coords, vec2 texSize) {\nvec2 eX \x3d vec2(1.0 / texSize.x, 0.0);\nvec2 eY \x3d vec2(0.0, 1.0 / texSize.y);\nvec2 texel \x3d coords * texSize - 0.5;\nvec3 hgX \x3d bicubicOffsetsAndWeights(fract(texel).x).xyz;\nvec3 hgY \x3d bicubicOffsetsAndWeights(fract(texel).y).xyz;\nvec2 coords10 \x3d coords + hgX.x * eX;\nvec2 coords00 \x3d coords - hgX.y * eX;\nvec2 coords11 \x3d coords10 + hgY.x * eY;\nvec2 coords01 \x3d coords00 + hgY.x * eY;\ncoords10 \x3d coords10 - hgY.y * eY;\ncoords00 \x3d coords00 - hgY.y * eY;\nvec4 color00 \x3d texture2D(sampler, coords00);\nvec4 color10 \x3d texture2D(sampler, coords10);\nvec4 color01 \x3d texture2D(sampler, coords01);\nvec4 color11 \x3d texture2D(sampler, coords11);\ncolor00 \x3d mix(color00, color01, hgY.z);\ncolor10 \x3d mix(color10, color11, hgY.z);\ncolor00 \x3d mix(color00, color10, hgX.z);\nreturn color00;\n}",
"bilinear.glsl":"vec4 sampleBilinear(sampler2D sampler, vec2 coords, vec2 texSize) {\nvec2 texelStart \x3d floor(coords * texSize);\nvec2 coord0 \x3d texelStart / texSize;\nvec2 coord1 \x3d (texelStart + vec2(1.0, 0.0)) / texSize;\nvec2 coord2 \x3d (texelStart + vec2(0.0, 1.0)) / texSize;\nvec2 coord3 \x3d (texelStart + vec2(1.0, 1.0)) / texSize;\nvec4 color0 \x3d texture2D(sampler, coord0);\nvec4 color1 \x3d texture2D(sampler, coord1);\nvec4 color2 \x3d texture2D(sampler, coord2);\nvec4 color3 \x3d texture2D(sampler, coord3);\nvec2 blend \x3d fract(coords * texSize);\nvec4 color01 \x3d mix(color0, color1, blend.x);\nvec4 color23 \x3d mix(color2, color3, blend.x);\nvec4 color \x3d mix(color01, color23, blend.y);\n#ifdef NNEDGE\nfloat alpha \x3d floor(color0.a * color1.a * color2.a * color3.a + 0.5);\ncolor \x3d color * alpha + (1.0 - alpha) * texture2D(sampler, coords);\n#endif\nreturn color;\n}",
"epx.glsl":"vec4 sampleEPX(sampler2D sampler, float size, vec2 coords, vec2 texSize) {\nvec2 invSize \x3d 1.0 / texSize;\nvec2 texel \x3d coords * texSize;\nvec2 texel_i \x3d floor(texel);\nvec2 texel_frac \x3d fract(texel);\nvec4 colorP \x3d texture2D(sampler, texel_i * invSize);\nvec4 colorP1 \x3d vec4(colorP);\nvec4 colorP2 \x3d vec4(colorP);\nvec4 colorP3 \x3d vec4(colorP);\nvec4 colorP4 \x3d vec4(colorP);\nvec4 colorA \x3d texture2D(sampler, (texel_i - vec2(0.0, 1.0)) * invSize);\nvec4 colorB \x3d texture2D(sampler, (texel_i + vec2(1.0, 0.0)) * invSize);\nvec4 colorC \x3d texture2D(sampler, (texel_i - vec2(1.0, 0.0)) * invSize);\nvec4 colorD \x3d texture2D(sampler, (texel_i + vec2(0.0, 1.0)) * invSize);\nif (colorC \x3d\x3d colorA \x26\x26 colorC !\x3d colorD \x26\x26 colorA !\x3d colorB) {\ncolorP1 \x3d colorA;\n}\nif (colorA \x3d\x3d colorB \x26\x26 colorA !\x3d colorC \x26\x26 colorB !\x3d colorD) {\ncolorP2 \x3d colorB;\n}\nif (colorD \x3d\x3d colorC \x26\x26 colorD !\x3d colorB \x26\x26 colorC !\x3d colorA) {\ncolorP3 \x3d colorC;\n}\nif (colorB \x3d\x3d colorD \x26\x26 colorB !\x3d colorA \x26\x26 colorD !\x3d colorC) {\ncolorP4 \x3d colorD;\n}\nvec4 colorP12 \x3d mix(colorP1, colorP2, texel_frac.x);\nvec4 colorP34 \x3d mix(colorP1, colorP2, texel_frac.x);\nreturn mix(colorP12, colorP34, texel_frac.y);\n}"},
fx:{integrate:{"integrate.frag":"precision mediump float;\nuniform lowp sampler2D u_sourceTexture;\nuniform lowp sampler2D u_maskTexture;\nuniform mediump float u_zoomLevel;\nuniform highp float u_timeDelta;\nuniform highp float u_animationTime;\nvarying highp vec2 v_texcoord;\n#include \x3cmaterials/utils.glsl\x3e\nvoid main()\n{\n#ifdef DELTA\nvec4 texel \x3d texture2D(u_sourceTexture, v_texcoord);\nvec4 data0 \x3d texture2D(u_maskTexture, v_texcoord);\nfloat flags \x3d data0.r * 255.0;\nfloat groupMinZoom \x3d data0.g * 255.0;\nfloat epsilon \x3d 5.;\nfloat wouldClip \x3d float(groupMinZoom \x3c epsilon);\nfloat direction \x3d wouldClip * 1.0 + (1.0 - wouldClip) * -1.0;\nfloat dt \x3d u_timeDelta / max(u_animationTime, 0.0001);\nvec4 nextState \x3d vec4(texel + direction * dt);\ngl_FragColor \x3d vec4(nextState);\n#elif defined(UPDATE)\nvec4 texel \x3d texture2D(u_sourceTexture, v_texcoord);\ngl_FragColor \x3d texel;\n#endif\n}",
"integrate.vert":"precision mediump float;\nattribute vec2 a_pos;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\nv_texcoord \x3d a_pos;\ngl_Position \x3d vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n}"}},heatmap:{heatmapResolve:{"heatmapResolve.frag":"precision highp float;\n#ifdef HEATMAP_PRECISION_HALF_FLOAT\n#define COMPRESSION_FACTOR 4.0\n#else\n#define COMPRESSION_FACTOR 1.0\n#endif\nuniform sampler2D u_texture;\nuniform sampler2D u_gradient;\nuniform vec2 u_densityMinAndInvRange;\nuniform float u_densityNormalization;\nvarying vec2 v_uv;\nvoid main() {\nvec4 data \x3d texture2D(u_texture, v_uv);\nfloat density \x3d data.r * COMPRESSION_FACTOR;\ndensity *\x3d u_densityNormalization;\ndensity \x3d (density - u_densityMinAndInvRange.x) * u_densityMinAndInvRange.y;\nvec4 color \x3d texture2D(u_gradient, vec2(density, 0.5));\ngl_FragColor \x3d vec4(color.rgb * color.a, color.a);\n}",
"heatmapResolve.vert":"precision highp float;\nattribute vec2 a_pos;\nvarying vec2 v_uv;\nvoid main() {\nv_uv \x3d a_pos;\ngl_Position \x3d vec4(a_pos * 2.0 - 1.0, 1., 1.);\n}"}},highlight:{"blur.frag":"varying mediump vec2 v_texcoord;\nuniform mediump vec4 u_direction;\nuniform mediump mat4 u_channelSelector;\nuniform mediump float u_sigma;\nuniform sampler2D u_texture;\nmediump float gauss1(mediump vec2 dir) {\nreturn exp(-dot(dir, dir) / (2.0 * u_sigma * u_sigma));\n}\nmediump vec4 selectChannel(mediump vec4 sample) {\nreturn u_channelSelector * sample;\n}\nvoid accumGauss1(mediump float i, inout mediump float tot, inout mediump float weight) {\nmediump float w \x3d gauss1(i * u_direction.xy);\ntot +\x3d selectChannel(texture2D(u_texture, v_texcoord + i * u_direction.zw))[3] * w;\nweight +\x3d w;\n}\nvoid main(void) {\nmediump float tot \x3d 0.0;\nmediump float weight \x3d 0.0;\naccumGauss1(-5.0, tot, weight);\naccumGauss1(-4.0, tot, weight);\naccumGauss1(-3.0, tot, weight);\naccumGauss1(-2.0, tot, weight);\naccumGauss1(-1.0, tot, weight);\naccumGauss1(0.0, tot, weight);\naccumGauss1(1.0, tot, weight);\naccumGauss1(2.0, tot, weight);\naccumGauss1(3.0, tot, weight);\naccumGauss1(4.0, tot, weight);\naccumGauss1(5.0, tot, weight);\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, tot / weight);\n}",
"highlight.frag":"varying mediump vec2 v_texcoord;\nuniform sampler2D u_texture;\nuniform mediump float u_sigma;\nuniform sampler2D u_shade;\nuniform mediump vec2 u_minMaxDistance;\nmediump float estimateDistance() {\nmediump float y \x3d texture2D(u_texture, v_texcoord)[3];\nconst mediump float y0 \x3d 0.5;\nmediump float m0 \x3d 1.0 / (sqrt(2.0 * 3.1415) * u_sigma);\nmediump float d \x3d (y - y0) / m0;\nreturn d;\n}\nmediump vec4 shade(mediump float d) {\nmediump float mappedDistance \x3d (d - u_minMaxDistance.x) / (u_minMaxDistance.y - u_minMaxDistance.x);\nmappedDistance \x3d clamp(mappedDistance, 0.0, 1.0);\nreturn texture2D(u_shade, vec2(mappedDistance, 0.5));\n}\nvoid main(void) {\nmediump float d \x3d estimateDistance();\ngl_FragColor \x3d shade(d);\n}",
"textured.vert":"attribute mediump vec2 a_position;\nattribute mediump vec2 a_texcoord;\nvarying mediump vec2 v_texcoord;\nvoid main(void) {\ngl_Position \x3d vec4(a_position, 0.0, 1.0);\nv_texcoord \x3d a_texcoord;\n}"},magnifier:{"magnifier.frag":"uniform lowp vec4 u_background;\nuniform mediump sampler2D u_readbackTexture;\nuniform mediump sampler2D u_maskTexture;\nuniform mediump sampler2D u_overlayTexture;\nuniform bool u_maskEnabled;\nuniform bool u_overlayEnabled;\nvarying mediump vec2 v_texCoord;\nconst lowp float barrelFactor \x3d 1.1;\nlowp vec2 barrel(lowp vec2 uv) {\nlowp vec2 uvn \x3d uv * 2.0 - 1.0;\nif (uvn.x \x3d\x3d 0.0 \x26\x26 uvn.y \x3d\x3d 0.0) {\nreturn vec2(0.5, 0.5);\n}\nlowp float theta \x3d atan(uvn.y, uvn.x);\nlowp float r \x3d pow(length(uvn), barrelFactor);\nreturn r * vec2(cos(theta), sin(theta)) * 0.5 + 0.5;\n}\nvoid main(void)\n{\nlowp vec4 color \x3d texture2D(u_readbackTexture, barrel(v_texCoord));\ncolor \x3d (color + (1.0 - color.a) * u_background);\nlowp float mask \x3d u_maskEnabled ? texture2D(u_maskTexture, v_texCoord).a : 1.0;\ncolor *\x3d mask;\nlowp vec4 overlayColor \x3d u_overlayEnabled ? texture2D(u_overlayTexture, v_texCoord) : vec4(0);\ngl_FragColor \x3d overlayColor + (1.0 - overlayColor.a) * color;\n}",
"magnifier.vert":"precision mediump float;\nattribute mediump vec2 a_pos;\nuniform mediump vec4 u_drawPos;\nvarying mediump vec2 v_texCoord;\nvoid main(void)\n{\nv_texCoord \x3d a_pos;\ngl_Position \x3d vec4(u_drawPos.xy + vec2(a_pos - 0.5) * u_drawPos.zw, 0.0, 1.0);\n}"},materials:{"attributeData.glsl":"uniform highp sampler2D filterFlags;\nuniform highp sampler2D animation;\nuniform highp sampler2D gpgpu;\nuniform highp sampler2D visualVariableData;\nuniform highp sampler2D dataDriven0;\nuniform highp sampler2D dataDriven1;\nuniform highp sampler2D dataDriven2;\nuniform float size;\nhighp vec2 getAttributeDataCoords(in highp vec3 id) {\nhighp vec3 texel \x3d unpackDisplayIdTexel(id);\nhighp float u32 \x3d float(int(texel.r) + int(texel.g) * 256 + int(texel.b) * 256 * 256);\nhighp float col \x3d mod(u32, size);\nhighp float row \x3d (u32 - col) / size;\nhighp float u \x3d col / size;\nhighp float v \x3d row / size;\nreturn vec2(u, v);\n}\nhighp vec2 getAttributeDataTextureCoords(in highp vec3 id) {\nreturn (getAttributeDataCoords(id) * 2.0) - 1.0 + (.5 / vec2(size));\n}\nhighp vec4 getFilterData(in highp vec3 id) {\nvec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(filterFlags, coords);\n}\nhighp vec4 getAnimation(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(animation, coords);\n}\nhighp vec4 getVisualVariableData(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(visualVariableData, coords);\n}\nhighp vec4 getDataDriven0(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(dataDriven0, coords);\n}\nhighp vec4 getDataDriven1(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(dataDriven1, coords);\n}\nhighp vec4 getGPGPU(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(gpgpu, coords);\n}\nhighp vec4 getDataDriven2(in highp vec3 id) {\nhighp vec2 coords \x3d getAttributeDataCoords(id);\nreturn texture2D(dataDriven2, coords);\n}\nfloat u88VVToFloat(in vec2 v) {\nbool isMagic \x3d v.x \x3d\x3d 255.0 \x26\x26 v.y \x3d\x3d 255.0;\nif (isMagic) {\nreturn NAN_MAGIC_NUMBER;\n}\nreturn (v.x + v.y * float(0x100)) - 32768.0;\n}",
"barycentric.glsl":"float inTriangle(vec3 bary) {\nvec3 absBary \x3d abs(bary);\nreturn step((absBary.x + absBary.y + absBary.z), 1.05);\n}\nvec3 xyToBarycentric(in vec2 pos, in vec2 v0, in vec2 v1, in vec2 v2) {\nmat3 xyToBarycentricMat3 \x3d mat3(\nv1.x * v2.y - v2.x * v1.y, v2.x * v0.y - v0.x * v2.y, v0.x * v1.y - v1.x * v0.y,\nv1.y - v2.y, v2.y - v0.y, v0.y - v1.y,\nv2.x - v1.x, v0.x - v2.x, v1.x - v0.x\n);\nfloat A2 \x3d v0.x * (v1.y - v2.y) + v1.x * (v2.y - v0.y) + v2.x * (v0.y - v1.y);\nreturn (1. / A2) * xyToBarycentricMat3 * vec3(1., pos);\n}",
"constants.glsl":"const float C_DEG_TO_RAD \x3d 3.14159265359 / 180.0;\nconst float C_256_TO_RAD \x3d 3.14159265359 / 128.0;\nconst float C_RAD_TO_DEG \x3d 180.0 / 3.141592654;\nconst float POSITION_PRECISION \x3d 1.0 / 8.0;\nconst float FILL_POSITION_PRECISION \x3d 1.0 / 1.0;\nconst float SOFT_EDGE_RATIO \x3d 1.0;\nconst float THIN_LINE_WIDTH_FACTOR \x3d 1.1;\nconst float THIN_LINE_HALF_WIDTH \x3d 1.0;\nconst float EXTRUDE_SCALE_PLACEMENT_PADDING \x3d 1.0 / 4.0;\nconst float OFFSET_PRECISION \x3d 1.0 / 8.0;\nconst float OUTLINE_SCALE \x3d 1.0 / 5.0;\nconst float SDF_FONT_SIZE \x3d 24.0;\nconst float MAX_SDF_DISTANCE \x3d 8.0;\nconst float PLACEMENT_PADDING \x3d 8.0;\nconst float EPSILON \x3d 0.00001;\nconst float EPSILON_HITTEST \x3d 0.05;\nconst int MAX_FILTER_COUNT \x3d 2;\nconst int ATTR_VV_SIZE \x3d 0;\nconst int ATTR_VV_COLOR \x3d 1;\nconst int ATTR_VV_OPACITY \x3d 2;\nconst int ATTR_VV_ROTATION \x3d 3;\nconst highp float NAN_MAGIC_NUMBER \x3d 1e-30;\nconst int BITSET_GENERIC_LOCK_COLOR \x3d 1;\nconst int BITSET_GENERIC_CONSIDER_ALPHA_ONLY \x3d 4;\nconst int BITSET_MARKER_ALIGNMENT_MAP \x3d 0;\nconst int BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE \x3d 2;\nconst int BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY \x3d 3;\nconst int BITSET_TYPE_FILL_OUTLINE \x3d 0;\nconst int BITSET_FILL_RANDOM_PATTERN_OFFSET \x3d 2;\nconst int BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR \x3d 3;\nconst int BITSET_FILL_HAS_PATTERN_HEIGHT_PRECISION_FACTOR \x3d 5;\nconst int BITSET_FILL_HAS_PATTERN_WIDTH_PRECISION_FACTOR \x3d 6;\nconst int BITSET_LINE_SCALE_DASH \x3d 2;",
fill:{"common.glsl":"#include \x3cmaterials/symbologyTypeUtils.glsl\x3e\n#ifdef PATTERN\nuniform mediump vec2 u_mosaicSize;\nvarying mediump float v_sampleAlphaOnly;\n#endif\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nuniform lowp vec4 u_isActive[ 2 ];\nuniform highp float u_dotValue;\nuniform highp float u_tileDotsOverArea;\nuniform highp float u_dotTextureDotCount;\nuniform mediump float u_tileZoomFactor;\n#endif\nvarying highp vec3 v_id;\nvarying lowp vec4 v_color;\nvarying lowp float v_opacity;\nvarying mediump vec4 v_aux1;\n#ifdef PATTERN\nvarying mediump vec2 v_tileTextureCoord;\n#endif\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\nvarying lowp float v_isOutline;\n#endif\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nvarying highp vec2 v_dotTextureCoords;\nvarying highp vec4 v_dotThresholds[ 2 ];\n#endif",
"fill.frag":"precision highp float;\n#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/fill/common.glsl\x3e\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\n#endif\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nuniform mediump mat4 u_dotColors[ 2 ];\nuniform sampler2D u_dotTextures[ 2 ];\nuniform vec4 u_dotBackgroundColor;\n#endif\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#include \x3cmaterials/shared/line/common.glsl\x3e\n#include \x3cmaterials/shared/line/line.frag\x3e\nlowp vec4 drawLine() {\nfloat v_lineWidth \x3d v_aux1.x;\nvec2 v_normal \x3d v_aux1.yz;\nLineData inputs \x3d LineData(\nv_color,\nv_normal,\nv_lineWidth,\nv_opacity,\nv_id\n);\nreturn shadeLine(inputs);\n}\n#endif\nlowp vec4 drawFill() {\nlowp vec4 out_color \x3d vec4(0.);\n#ifdef HITTEST\nout_color \x3d v_color;\n#elif defined(PATTERN)\nmediump vec4 v_tlbr \x3d v_aux1;\nmediump vec2 normalizedTextureCoord \x3d mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos \x3d mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color \x3d texture2D(u_texture, samplePos);\nif (v_sampleAlphaOnly \x3e 0.5) {\ncolor.rgb \x3d vec3(color.a);\n}\nout_color \x3d v_opacity * v_color * color;\n#elif SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY \x26\x26 !defined(HIGHLIGHT)\nvec4 textureThresholds0 \x3d texture2D(u_dotTextures[0], v_dotTextureCoords);\nvec4 textureThresholds1 \x3d texture2D(u_dotTextures[1], v_dotTextureCoords);\nvec4 difference0 \x3d v_dotThresholds[0] - textureThresholds0;\nvec4 difference1 \x3d v_dotThresholds[1] - textureThresholds1;\n#ifdef DD_DOT_BLENDING\nvec4 isPositive0 \x3d step(0.0, difference0);\nvec4 isPositive1 \x3d step(0.0, difference1);\nfloat weightSum \x3d dot(isPositive0, difference0) + dot(isPositive1, difference1);\nfloat lessThanEqZero \x3d step(weightSum, 0.0);\nfloat greaterThanZero \x3d 1.0 - lessThanEqZero ;\nfloat divisor \x3d (weightSum + lessThanEqZero);\nvec4 weights0 \x3d difference0 * isPositive0 / divisor;\nvec4 weights1 \x3d difference1 * isPositive1 / divisor;\nvec4 dotColor \x3d u_dotColors[0] * weights0 + u_dotColors[1] * weights1;\nvec4 preEffectColor \x3d greaterThanZero * dotColor + lessThanEqZero * u_dotBackgroundColor;\n#else\nfloat diffMax \x3d max(max4(difference0), max4(difference1));\nfloat lessThanZero \x3d step(diffMax, 0.0);\nfloat greaterOrEqZero \x3d 1.0 - lessThanZero;\nvec4 isMax0 \x3d step(diffMax, difference0);\nvec4 isMax1 \x3d step(diffMax, difference1);\nvec4 dotColor \x3d u_dotColors[0] * isMax0 + u_dotColors[1] * isMax1;\nvec4 preEffectColor \x3d greaterOrEqZero * dotColor + lessThanZero * u_dotBackgroundColor;\n#endif\nout_color \x3d preEffectColor;\n#else\nout_color \x3d v_opacity * v_color;\n#endif\n#ifdef HIGHLIGHT\nout_color.a \x3d 1.0;\n#endif\nreturn out_color;\n}\nvoid main() {\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\nif (v_isOutline \x3e 0.5) {\ngl_FragColor \x3d drawLine();\n} else {\ngl_FragColor \x3d drawFill();\n}\n#else\ngl_FragColor \x3d drawFill();\n#endif\n}",
"fill.vert":"#include \x3cmaterials/symbologyTypeUtils.glsl\x3e\n#define PACKED_LINE\nprecision highp float;\nattribute float a_bitset;\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nattribute float a_inverseArea;\nvec4 a_color \x3d vec4(0.0, 0.0, 0.0, 1.0);\nvec2 a_zoomRange \x3d vec2(0.0, 10000.0);\n#else\nattribute vec4 a_color;\nattribute vec4 a_aux2;\nattribute vec4 a_aux3;\n#ifndef SYMBOLOGY_TYPE_IS_SIMPLE_LIKE\nattribute vec4 a_aux1;\nattribute vec2 a_zoomRange;\n#else\nvec2 a_zoomRange \x3d vec2(0.0, 10000.0);\n#endif\n#endif\nuniform vec2 u_tileOffset;\nuniform vec2 u_maxIntNumOfCrossing;\n#include \x3cutil/encoding.glsl\x3e\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/fill/common.glsl\x3e\n#include \x3cmaterials/fill/hittest.glsl\x3e\nconst float INV_SCALE_COMPRESSION_FACTOR \x3d 1.0 / 128.0;\nconst float MAX_REPRESENTABLE_INT \x3d 16777216.0;\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nvec4 dotThreshold(vec4 featureAttrOverFeatureArea, float dotValue, float tileDotsOverArea) {\nreturn featureAttrOverFeatureArea * (1.0 / dotValue) * (1.0 / tileDotsOverArea);\n}\n#endif\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#include \x3cmaterials/shared/line/common.glsl\x3e\n#include \x3cmaterials/shared/line/line.vert\x3e\nvoid drawLine(out lowp vec4 out_color, out highp vec3 out_pos) {\nLineData outputs \x3d buildLine(\nout_pos,\na_id,\na_pos,\na_color,\n(a_aux3.xy - 128.) / 16.,\n(a_aux3.zw - 128.) / 16.,\n0.,\na_aux2.z / 16.,\na_bitset,\nvec4(0.),\nvec2(0.),\na_aux2.w / 16.\n);\nv_id \x3d outputs.id;\nv_opacity \x3d outputs.opacity;\nv_aux1 \x3d vec4(outputs.lineHalfWidth, outputs.normal, 0.);\nout_color \x3d outputs.color;\n}\n#endif\nvoid drawFill(out lowp vec4 out_color, out highp vec3 out_pos) {\nfloat a_bitSet \x3d a_bitset;\nout_color \x3d getColor(a_color, a_bitSet, BITSET_GENERIC_LOCK_COLOR);\nv_opacity \x3d getOpacity();\nv_id \x3d norm(a_id);\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nmat3 tileToTileNormalized \x3d mat3( 2. / 512., 0., 0.,\n0., -2. / 512., 0.,\n-1., 1., 1. );\nout_pos \x3d tileToTileNormalized * vec3((a_pos * FILL_POSITION_PRECISION), 1.);\n#else\nout_pos \x3d u_dvsMat3 * vec3(a_pos * FILL_POSITION_PRECISION, 1.);\n#endif\n#ifdef PATTERN\nvec4 a_tlbr \x3d a_aux1;\nfloat a_width \x3d a_aux2.x;\nfloat a_height \x3d a_aux2.y;\nvec2 a_offset \x3d a_aux2.zw;\nvec2 a_scale \x3d a_aux3.xy;\nfloat a_angle \x3d a_aux3.z;\nif (getBit(a_bitset, BITSET_FILL_HAS_PATTERN_WIDTH_PRECISION_FACTOR) \x3e 0.5) {\na_width *\x3d INV_SCALE_COMPRESSION_FACTOR;\n}\nif (getBit(a_bitset, BITSET_FILL_HAS_PATTERN_HEIGHT_PRECISION_FACTOR) \x3e 0.5) {\na_height *\x3d INV_SCALE_COMPRESSION_FACTOR;\n}\nvec2 scale \x3d INV_SCALE_COMPRESSION_FACTOR * a_scale;\nfloat width \x3d u_zoomFactor * a_width * scale.x;\nfloat height \x3d u_zoomFactor * a_height * scale.y;\nfloat angle \x3d C_256_TO_RAD * a_angle;\nfloat sinA \x3d sin(angle);\nfloat cosA \x3d cos(angle);\nfloat dx \x3d 0.0;\nfloat dy \x3d 0.0;\nif (getBit(a_bitset, BITSET_FILL_RANDOM_PATTERN_OFFSET) \x3e 0.5) {\nfloat id \x3d rgba2float(vec4(a_id, 0.0));\ndx \x3d rand(vec2(id, 0.0));\ndy \x3d rand(vec2(0.0, id));\n}\nmat3 patternMatrix \x3d mat3(cosA / width, sinA / height, 0,\n-sinA / width, cosA / height, 0,\ndx, dy, 1);\nvec2 patternSize \x3d vec2(a_width, a_height);\nvec2 numPatternsPerMaxInt \x3d vec2(MAX_REPRESENTABLE_INT) / patternSize;\nvec2 maxIntCrossingOffsetCorrection \x3d patternSize * fract(u_maxIntNumOfCrossing * numPatternsPerMaxInt);\nvec2 tileOffset \x3d u_tileOffset + maxIntCrossingOffsetCorrection - 0.5 * patternSize;\ntileOffset \x3d vec2(tileOffset.x * cosA - tileOffset.y * sinA, tileOffset.x * sinA + tileOffset.y * cosA);\ntileOffset \x3d mod(tileOffset, patternSize);\nvec2 symbolOffset \x3d u_zoomFactor * scale * vec2(a_offset - tileOffset) / vec2(width, height);\nv_tileTextureCoord \x3d (patternMatrix * vec3(a_pos * FILL_POSITION_PRECISION, 1.0)).xy - symbolOffset;\nv_aux1 \x3d a_tlbr / u_mosaicSize.xyxy;\nv_sampleAlphaOnly \x3d getBit(a_bitset, BITSET_GENERIC_CONSIDER_ALPHA_ONLY);\nif (getBit(a_bitSet, BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR) \x3e 0.5) {\n#ifdef VV_COLOR\nv_sampleAlphaOnly *\x3d (1.0 - float(isNan(VV_ADATA[ATTR_VV_COLOR]))) * (1.0 - getBit(a_bitSet, BITSET_GENERIC_LOCK_COLOR));\n#else\nv_sampleAlphaOnly \x3d 0.0;\n#endif\n}\n#elif SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_DOT_DENSITY\nvec4 ddAttributeData0 \x3d getAttributeData2(a_id) * u_isActive[0] * a_inverseArea;\nvec4 ddAttributeData1 \x3d getAttributeData3(a_id) * u_isActive[1] * a_inverseArea;\nfloat size \x3d u_tileZoomFactor * 512.0 * 1.0 / u_pixelRatio;\nv_dotThresholds[0] \x3d dotThreshold(ddAttributeData0, u_dotValue, u_tileDotsOverArea);\nv_dotThresholds[1] \x3d dotThreshold(ddAttributeData1, u_dotValue, u_tileDotsOverArea);\nv_dotTextureCoords \x3d (a_pos * FILL_POSITION_PRECISION + 0.5) / size;\n#endif\n}\n#ifdef HITTEST\nvoid draw(out lowp vec4 out_color, out highp vec3 out_pos) {\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\nif (getBit(a_bitset, BITSET_TYPE_FILL_OUTLINE) \x3e 0.5) {\nout_pos \x3d vec3(0., 0., 2.);\nreturn;\n}\n#endif\nhittestFill(out_color, out_pos);\ngl_PointSize \x3d 1.0;\n}\n#elif defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE)\nvoid draw(out lowp vec4 out_color, out highp vec3 out_pos) {\nv_isOutline \x3d getBit(a_bitset, BITSET_TYPE_FILL_OUTLINE);\nif (v_isOutline \x3e 0.5) {\ndrawLine(out_color, out_pos);\n} else {\ndrawFill(out_color, out_pos);\n}\n}\n#else\n#define draw drawFill\n#endif\nvoid main()\n{\nINIT;\nhighp vec3 pos \x3d vec3(0.);\nhighp vec4 color \x3d vec4(0.);\ndraw(color, pos);\nv_color \x3d color;\ngl_Position \x3d vec4(clip(v_color, pos, getFilterFlags(), a_zoomRange), 1.0);\n}",
"hittest.glsl":"#ifdef HITTEST\n#include \x3cmaterials/hittest/common.glsl\x3e\nattribute vec2 a_pos1;\nattribute vec2 a_pos2;\nvoid hittestFill(\nout lowp vec4 out_color,\nout highp vec3 out_pos\n) {\nvec3 pos \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos * FILL_POSITION_PRECISION, 1.);\nvec3 pos1 \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos1 * FILL_POSITION_PRECISION, 1.);\nvec3 pos2 \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos2 * FILL_POSITION_PRECISION, 1.);\nfloat hittestDist \x3d u_hittestDist;\nfloat dist \x3d distPointTriangle(u_hittestPos, pos.xy, pos1.xy, pos2.xy);\nout_pos \x3d vec3(getAttributeDataTextureCoords(a_id), 0.0);\nif (dist \x3c 0. || dist \x3e\x3d hittestDist) {\nout_pos.z +\x3d 2.0;\n}\nout_color \x3d vec4(1. / 255., 0, 0, dist \x3d\x3d 0. ? (1. / 255.) : 0.);\n}\n#endif"},
hittest:{"common.glsl":"#ifdef HITTEST\nuniform float hittestDist;\nuniform highp vec2 hittestPos;\nfloat projectScalar(vec2 a, vec2 b) {\nreturn dot(a, normalize(b));\n}\nfloat distPointSegment(vec2 p0, vec2 p1, vec2 p2) {\nvec2 L \x3d p2 - p1;\nvec2 A \x3d p0 - p1;\nfloat projAL \x3d projectScalar(A, L);\nfloat t \x3d clamp(projAL / length(L), 0., 1.);\nreturn distance(p0, p1 + t * (p2 - p1));\n}\nvoid hittestMarker(out lowp vec4 out_color, out highp vec3 out_pos, in highp vec3 pos, float size) {\nfloat dist \x3d distance(pos, vec3(hittestPos, 1.));\nout_pos \x3d vec3(getAttributeDataTextureCoords(a_id), 0.0);\nif ((dist - size) \x3e hittestDist) {\nout_pos.z +\x3d 2.0;\n}\nout_color \x3d vec4(1. / 255., 0, 0, (dist - size) \x3c 0. ? (1. / 255.) : 0.);\n}\nfloat intersectPointTriangleBary(vec2 p, vec2 a, vec2 b, vec2 c) {\nreturn inTriangle(xyToBarycentric(p, a, b, c));\n}\nfloat distPointTriangle(vec2 p, vec2 a, vec2 b, vec2 c) {\nvec2 ba \x3d b - a;\nvec2 ca \x3d c - a;\nfloat crossProduct \x3d ba.x * ca.y - ca.x * ba.y;\nbool isParallel \x3d crossProduct \x3c EPSILON_HITTEST \x26\x26 crossProduct \x3e -EPSILON_HITTEST;\nif (isParallel) {\nreturn -1.;\n}\nif (intersectPointTriangleBary(p.xy, a, b, c) \x3d\x3d 1.) {\nreturn 0.;\n}\nfloat distAB \x3d distPointSegment(p, a, b);\nfloat distBC \x3d distPointSegment(p, b, c);\nfloat distCA \x3d distPointSegment(p, c, a);\nreturn min(min(distAB, distBC), distCA);\n}\n#endif"},
icon:{"common.glsl":"#include \x3cutil/encoding.glsl\x3e\nuniform lowp vec2 u_mosaicSize;\nvarying lowp vec4 v_color;\nvarying highp vec3 v_id;\nvarying highp vec4 v_sizeTex;\nvarying mediump vec3 v_pos;\nvarying lowp float v_opacity;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nvarying lowp vec4 v_outlineColor;\nvarying mediump float v_outlineWidth;\nvarying mediump float v_distRatio;\nvarying mediump float v_overridingOutlineColor;\nvarying mediump float v_isThin;\n#endif\n#ifdef SDF\nvec4 getColor(vec2 v_size, vec2 v_tex) {\n#ifdef HITTEST\nlowp vec4 fillPixelColor \x3d vec4(1.0);\n#else\nlowp vec4 fillPixelColor \x3d v_color;\n#endif\nfloat d \x3d 0.5 - rgba2float(texture2D(u_texture, v_tex));\nfloat size \x3d max(v_size.x, v_size.y);\nfloat dist \x3d d * size * SOFT_EDGE_RATIO * v_distRatio;\nfillPixelColor *\x3d clamp(0.5 - dist, 0.0, 1.0);\nfloat outlineWidth \x3d v_outlineWidth;\n#ifdef HIGHLIGHT\noutlineWidth \x3d max(outlineWidth, 4.0 * v_isThin);\n#endif\nif (outlineWidth \x3e 0.25) {\nlowp vec4 outlinePixelColor \x3d v_overridingOutlineColor * v_color + (1.0 - v_overridingOutlineColor) * v_outlineColor;\nfloat clampedOutlineSize \x3d min(outlineWidth, size);\noutlinePixelColor *\x3d clamp(0.5 - abs(dist) + clampedOutlineSize * 0.5, 0.0, 1.0);\nreturn v_opacity * ((1.0 - outlinePixelColor.a) * fillPixelColor + outlinePixelColor);\n}\nreturn v_opacity * fillPixelColor;\n}\n#else\nvec4 getColor(vec2 _v_size, vec2 v_tex) {\nlowp vec4 texColor \x3d texture2D(u_texture, v_tex);\nreturn v_opacity * texColor * v_color;\n}\n#endif",
heatmapAccumulate:{"common.glsl":"varying lowp vec4 v_hittestResult;\nvarying mediump vec2 v_offsetFromCenter;\nvarying highp float v_fieldValue;","heatmapAccumulate.frag":"precision mediump float;\n#include \x3cmaterials/icon/heatmapAccumulate/common.glsl\x3e\n#ifdef HEATMAP_PRECISION_HALF_FLOAT\n#define COMPRESSION_FACTOR 0.25\n#else\n#define COMPRESSION_FACTOR 1.0\n#endif\nuniform lowp sampler2D u_texture;\nvoid main() {\n#ifdef HITTEST\ngl_FragColor \x3d v_hittestResult;\n#else\nfloat radius \x3d length(v_offsetFromCenter);\nfloat shapeWeight \x3d step(radius, 1.0);\nfloat oneMinusRadiusSquared \x3d 1.0 - radius * radius;\nfloat kernelWeight \x3d oneMinusRadiusSquared * oneMinusRadiusSquared;\ngl_FragColor \x3d vec4(shapeWeight * kernelWeight * v_fieldValue * COMPRESSION_FACTOR);\n#endif\n}",
"heatmapAccumulate.vert":"precision highp float;\nattribute vec2 a_vertexOffset;\nvec4 a_color \x3d vec4(0.0);\nvec2 a_zoomRange \x3d vec2(0.0, 10000.0);\nuniform float u_radius;\nuniform float u_isFieldActive;\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/hittest/common.glsl\x3e\n#include \x3cmaterials/icon/heatmapAccumulate/common.glsl\x3e\nvoid main() {\nfloat filterFlags \x3d getFilterFlags();\n#ifdef HITTEST\nhighp vec4 out_hittestResult \x3d vec4(0.);\nhighp vec3 out_pos \x3d vec3(0.);\nvec3 pos \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos * POSITION_PRECISION, 1.0);\nhittestMarker(out_hittestResult, out_pos, pos, u_radius);\nv_hittestResult \x3d out_hittestResult;\ngl_PointSize \x3d 1.;\ngl_Position \x3d vec4(clip(a_color, out_pos, filterFlags, a_zoomRange), 1.0);\n#else\nv_offsetFromCenter \x3d sign(a_vertexOffset);\nv_fieldValue \x3d getAttributeData2(a_id).x * u_isFieldActive + 1.0 - u_isFieldActive;\nvec3 centerPos \x3d u_dvsMat3 * vec3(a_pos * POSITION_PRECISION, 1.0);\nvec3 vertexPos \x3d centerPos + u_displayViewMat3 * vec3(v_offsetFromCenter, 0.0) * u_radius;\ngl_Position \x3d vec4(clip(a_color, vertexPos, filterFlags, a_zoomRange), 1.0);\n#endif\n}"},
"hittest.glsl":"#ifdef HITTEST\n#include \x3cmaterials/hittest/common.glsl\x3e\nattribute vec2 a_vertexOffset1;\nattribute vec2 a_vertexOffset2;\nattribute vec2 a_texCoords1;\nattribute vec2 a_texCoords2;\nvec2 getTextureCoords(in vec3 bary, in vec2 texCoords0, in vec2 texCoords1, in vec2 texCoords2) {\nreturn texCoords0 * bary.x + texCoords1 * bary.y + texCoords2 * bary.z;\n}\nvoid hittestIcon(\ninout lowp vec4 out_color,\nout highp vec3 out_pos,\nin vec3 pos,\nin vec3 offset,\nin vec2 size,\nin float scaleFactor,\nin float isMapAligned\n) {\nout_pos \x3d vec3(getAttributeDataTextureCoords(a_id), 0.0);\nvec3 posBase \x3d u_viewMat3 * u_tileMat3 * pos;\nvec3 offset1 \x3d scaleFactor * vec3(a_vertexOffset1 / 16.0, 0.);\nvec3 offset2 \x3d scaleFactor * vec3(a_vertexOffset2 / 16.0, 0.);\nvec2 pos0 \x3d (posBase + getMatrixNoDisplay(isMapAligned) * offset).xy;\nvec2 pos1 \x3d (posBase + getMatrixNoDisplay(isMapAligned) * offset1).xy;\nvec2 pos2 \x3d (posBase + getMatrixNoDisplay(isMapAligned) * offset2).xy;\nvec3 bary0 \x3d xyToBarycentric(u_hittestPos + vec2(-u_hittestDist, -u_hittestDist), pos0, pos1, pos2);\nvec3 bary1 \x3d xyToBarycentric(u_hittestPos + vec2(0., -u_hittestDist), pos0, pos1, pos2);\nvec3 bary2 \x3d xyToBarycentric(u_hittestPos + vec2(u_hittestDist, -u_hittestDist), pos0, pos1, pos2);\nvec3 bary3 \x3d xyToBarycentric(u_hittestPos + vec2(-u_hittestDist, 0.), pos0, pos1, pos2);\nvec3 bary4 \x3d xyToBarycentric(u_hittestPos, pos0, pos1, pos2);\nvec3 bary5 \x3d xyToBarycentric(u_hittestPos + vec2(u_hittestDist, 0.), pos0, pos1, pos2);\nvec3 bary6 \x3d xyToBarycentric(u_hittestPos + vec2(-u_hittestDist, u_hittestDist), pos0, pos1, pos2);\nvec3 bary7 \x3d xyToBarycentric(u_hittestPos + vec2(0., u_hittestDist), pos0, pos1, pos2);\nvec3 bary8 \x3d xyToBarycentric(u_hittestPos + vec2(u_hittestDist, u_hittestDist), pos0, pos1, pos2);\nvec2 tex0 \x3d a_texCoords / u_mosaicSize;\nvec2 tex1 \x3d a_texCoords1 / u_mosaicSize;\nvec2 tex2 \x3d a_texCoords2 / u_mosaicSize;\nfloat alphaSum \x3d 0.;\nalphaSum +\x3d inTriangle(bary0) * getColor(size, getTextureCoords(bary0, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary1) * getColor(size, getTextureCoords(bary1, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary2) * getColor(size, getTextureCoords(bary2, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary3) * getColor(size, getTextureCoords(bary3, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary4) * getColor(size, getTextureCoords(bary4, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary5) * getColor(size, getTextureCoords(bary5, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary6) * getColor(size, getTextureCoords(bary6, tex0, tex1, tex2)).a;\nalphaSum +\x3d inTriangle(bary7) * getColor(size, getTextureCoords(bary7, tex0, tex1, tex2)).a;\nout_pos.z +\x3d step(alphaSum, .05) * 2.0;\nout_color \x3d vec4(1. / 255., 0., 0., alphaSum / 255.);\n}\n#endif",
"icon.frag":"precision mediump float;\n#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/icon/common.glsl\x3e\nvoid main()\n{\n#ifdef HITTEST\nvec4 color \x3d v_color;\n#else\nvec4 color \x3d getColor(v_sizeTex.xy, v_sizeTex.zw);\n#endif\n#ifdef HIGHLIGHT\ncolor.a \x3d step(1.0 / 255.0, color.a);\n#endif\ngl_FragColor \x3d color;\n}","icon.vert":"precision highp float;\nattribute vec4 a_color;\nattribute vec4 a_outlineColor;\nattribute vec4 a_sizeAndOutlineWidth;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nattribute vec2 a_bitSetAndDistRatio;\nattribute vec2 a_zoomRange;\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/icon/common.glsl\x3e\n#include \x3cmaterials/icon/hittest.glsl\x3e\nfloat getMarkerScaleFactor(inout vec2 size, in float referenceSize) {\n#ifdef VV_SIZE\nfloat f \x3d getSize(size.y) / size.y;\nfloat sizeFactor \x3d size.y / referenceSize;\nreturn getSize(referenceSize) / referenceSize;\n#else\nreturn 1.;\n#endif\n}\nvoid main()\n{\nINIT;\nfloat a_bitSet \x3d a_bitSetAndDistRatio.x;\nvec3 pos \x3d vec3(a_pos * POSITION_PRECISION, 1.0);\nvec2 size \x3d a_sizeAndOutlineWidth.xy * a_sizeAndOutlineWidth.xy / 128.0;\nvec3 offset \x3d vec3(a_vertexOffset / 16.0, 0.);\nfloat outlineSize \x3d a_sizeAndOutlineWidth.z * a_sizeAndOutlineWidth.z / 128.0;\nfloat isMapAligned \x3d getBit(a_bitSet, BITSET_MARKER_ALIGNMENT_MAP);\nfloat referenceSize \x3d a_sizeAndOutlineWidth.w * a_sizeAndOutlineWidth.w / 128.0;\nfloat scaleSymbolProportionally \x3d getBit(a_bitSet, BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY);\nfloat scaleFactor \x3d getMarkerScaleFactor(size, referenceSize);\nsize.xy *\x3d scaleFactor;\noffset.xy *\x3d scaleFactor;\noutlineSize *\x3d scaleSymbolProportionally * (scaleFactor - 1.0) + 1.0;\nvec2 v_tex \x3d a_texCoords / u_mosaicSize;\nfloat filterFlags \x3d getFilterFlags();\nv_color \x3d getColor(a_color, a_bitSet, BITSET_GENERIC_LOCK_COLOR);\nv_opacity \x3d getOpacity();\nv_id \x3d norm(a_id);\nv_pos \x3d u_dvsMat3 * pos + getMatrix(isMapAligned) * getRotation() * offset;\nv_sizeTex \x3d vec4(size.xy, v_tex.xy);\n#ifdef SDF\nv_isThin \x3d getBit(a_bitSet, BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE);\n#ifdef VV_COLOR\nv_overridingOutlineColor \x3d v_isThin;\n#else\nv_overridingOutlineColor \x3d 0.0;\n#endif\nv_outlineWidth \x3d min(outlineSize, max(max(size.x, size.y) - 0.99, 0.0));\nv_outlineColor \x3d a_outlineColor;\nv_distRatio \x3d a_bitSetAndDistRatio.y / 128.0;\n#endif\n#ifdef HITTEST\nhighp vec4 out_color \x3d vec4(0.);\nhighp vec3 out_pos \x3d vec3(0.);\nhittestIcon(out_color, out_pos, pos, offset, size, scaleFactor, isMapAligned);\nv_color \x3d out_color;\ngl_PointSize \x3d 1.;\ngl_Position \x3d vec4(clip(v_color, out_pos, filterFlags, a_zoomRange), 1.0);\n#else\ngl_Position \x3d vec4(clip(v_color, v_pos, filterFlags, a_zoomRange), 1.0);\n#endif\n}"},
label:{"common.glsl":"uniform mediump float u_zoomLevel;\nuniform mediump float u_mapRotation;\nuniform mediump float u_mapAligned;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump float v_antialiasingWidth;\nvarying mediump float v_edgeDistanceOffset;\nvarying mediump vec2 v_tex;\nvarying mediump vec4 v_color;\nvarying lowp vec4 v_animation;","label.frag":"#include \x3cmaterials/text/text.frag\x3e","label.vert":"precision highp float;\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/text/common.glsl\x3e\nattribute vec4 a_color;\nattribute vec4 a_haloColor;\nattribute vec4 a_texAndSize;\nattribute vec4 a_refSymbolAndPlacementOffset;\nattribute vec4 a_glyphData;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nuniform float u_isHaloPass;\nuniform float u_isBackgroundPass;\nuniform float u_mapRotation;\nuniform float u_mapAligned;\nfloat getZ(in float minZoom, in float maxZoom, in float angle) {\nfloat glyphAngle \x3d angle * 360.0 / 254.0;\nfloat mapAngle \x3d u_mapRotation * 360.0 / 254.0;\nfloat diffAngle \x3d min(360.0 - abs(mapAngle - glyphAngle), abs(mapAngle - glyphAngle));\nfloat z \x3d 0.0;\nz +\x3d u_mapAligned * (2.0 * (1.0 - step(minZoom, u_currentZoom)));\nz +\x3d u_mapAligned * 2.0 * step(90.0, diffAngle);\nz +\x3d 2.0 * (1.0 - step(u_currentZoom, maxZoom));\nreturn z;\n}\nvoid main()\n{\nINIT;\nfloat groupMinZoom \x3d getMinZoom();\nfloat glyphMinZoom \x3d a_glyphData.x;\nfloat glyphMaxZoom \x3d a_glyphData.y;\nfloat glyphAngle \x3d a_glyphData.z;\nfloat a_isBackground \x3d a_glyphData.w;\nfloat a_minZoom \x3d max(groupMinZoom, glyphMinZoom);\nfloat a_placementPadding \x3d a_refSymbolAndPlacementOffset.x * EXTRUDE_SCALE_PLACEMENT_PADDING;\nvec2 a_placementDir \x3d unpack_u8_nf32(a_refSymbolAndPlacementOffset.zw);\nfloat a_refSymbolSize \x3d a_refSymbolAndPlacementOffset.y;\nfloat fontSize \x3d a_texAndSize.z;\nfloat haloSize \x3d a_texAndSize.w * OUTLINE_SCALE;\nvec2 vertexOffset \x3d a_vertexOffset * OFFSET_PRECISION;\nvec3 pos \x3d vec3(a_pos * POSITION_PRECISION, 1.0);\nfloat z \x3d getZ(a_minZoom, glyphMaxZoom, glyphAngle);\nfloat fontScale \x3d fontSize / SDF_FONT_SIZE;\nfloat halfSize \x3d getSize(a_refSymbolSize) / 2.0;\nfloat animation \x3d pow(getAnimationState(), vec4(2.0)).r;\nfloat isText \x3d 1.0 - a_isBackground;\nfloat isBackground \x3d u_isBackgroundPass * a_isBackground;\nvec4 nonHaloColor \x3d (isBackground + isText) * a_color;\nv_color \x3d animation * ((1.0 - u_isHaloPass) * nonHaloColor + (u_isHaloPass * a_haloColor));\nv_opacity \x3d 1.0;\nv_tex \x3d a_texCoords / u_mosaicSize;\nv_edgeDistanceOffset \x3d u_isHaloPass * haloSize / fontScale / MAX_SDF_DISTANCE;\nv_antialiasingWidth \x3d 0.105 * SDF_FONT_SIZE / fontSize / u_pixelRatio;\nvec2 placementOffset \x3d a_placementDir * (halfSize + a_placementPadding);\nvec3 glyphOffset \x3d u_displayMat3 * vec3(vertexOffset + placementOffset, 0.0);\nvec3 v_pos \x3d vec3((u_dvsMat3 * pos + glyphOffset).xy, z);\nfloat isHidden \x3d u_isBackgroundPass * isText + (1.0 - u_isBackgroundPass) * a_isBackground;\nv_pos.z +\x3d 2.0 * isHidden;\ngl_Position \x3d vec4(v_pos, 1.0);\n#ifdef DEBUG\nv_color \x3d vec4(a_color.rgb, z \x3d\x3d 0.0 ? 1.0 : 0.645);\n#endif\n}"},
line:{"common.glsl":"varying lowp vec4 v_color;\nvarying highp vec3 v_id;\nvarying mediump vec2 v_normal;\nvarying mediump float v_lineHalfWidth;\nvarying lowp float v_opacity;\n#ifdef PATTERN\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\n#endif\n#if defined(PATTERN) || defined(SDF)\nvarying highp float v_accumulatedDistance;\n#endif\n#ifdef SDF\nvarying mediump float v_lineWidthRatio;\n#endif","hittest.glsl":"#include \x3cmaterials/hittest/common.glsl\x3e\n#ifdef HITTEST\nattribute vec2 a_pos1;\nattribute vec2 a_pos2;\nvoid hittestLine(out lowp vec4 out_color, out highp vec3 out_pos, float halfWidth) {\nvec3 pos \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos * POSITION_PRECISION, 1.);\nvec3 pos1 \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos1 * POSITION_PRECISION, 1.);\nvec3 pos2 \x3d u_viewMat3 * u_tileMat3 * vec3(a_pos2 * POSITION_PRECISION, 1.);\nvec3 outTextureCoords \x3d vec3(getAttributeDataTextureCoords(a_id), 0.0);\nfloat dist \x3d min(distPointSegment(u_hittestPos, pos.xy, pos1.xy),\ndistPointSegment(u_hittestPos, pos.xy, pos2.xy)) - halfWidth;\nout_pos \x3d vec3(getAttributeDataTextureCoords(a_id), 0.0);\nif (dist \x3e\x3d u_hittestDist) {\nout_pos.z +\x3d 2.0;\n}\nout_color \x3d vec4(1. / 255., 0, 0, dist \x3c\x3d 0. ? (1. / 255.) : 0.);\n}\n#endif",
"line.frag":"precision lowp float;\n#include \x3cutil/encoding.glsl\x3e\n#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/symbologyTypeUtils.glsl\x3e\n#include \x3cmaterials/line/common.glsl\x3e\n#include \x3cmaterials/shared/line/common.glsl\x3e\n#include \x3cmaterials/shared/line/line.frag\x3e\n#ifdef HITTEST\nvoid main() {\ngl_FragColor \x3d v_color;\n}\n#else\nvoid main() {\nLineData inputs \x3d LineData(\nv_color,\nv_normal,\nv_lineHalfWidth,\nv_opacity,\n#ifndef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#ifdef PATTERN\nv_tlbr,\nv_patternSize,\n#endif\n#ifdef SDF\nv_lineWidthRatio,\n#endif\n#if defined(PATTERN) || defined(SDF)\nv_accumulatedDistance,\n#endif\n#endif\nv_id\n);\ngl_FragColor \x3d shadeLine(inputs);\n}\n#endif",
"line.vert":"precision highp float;\nattribute vec4 a_color;\nattribute vec4 a_offsetAndNormal;\nattribute vec2 a_accumulatedDistanceAndHalfWidth;\nattribute vec4 a_tlbr;\nattribute vec4 a_segmentDirection;\nattribute vec2 a_aux;\nattribute vec2 a_zoomRange;\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/symbologyTypeUtils.glsl\x3e\n#include \x3cmaterials/line/common.glsl\x3e\n#include \x3cmaterials/line/hittest.glsl\x3e\n#include \x3cmaterials/shared/line/common.glsl\x3e\n#include \x3cmaterials/shared/line/line.vert\x3e\n#ifdef HITTEST\nvoid draw() {\nfloat aa \x3d 0.5 * u_antialiasing;\nfloat a_halfWidth \x3d a_accumulatedDistanceAndHalfWidth.y / 16.;\nfloat a_cimHalfWidth \x3d a_aux.x / 16. ;\nvec2 a_offset \x3d a_offsetAndNormal.xy / 16.;\nfloat baseWidth \x3d getBaseLineHalfWidth(a_halfWidth, a_cimHalfWidth);\nfloat halfWidth \x3d getLineHalfWidth(baseWidth, aa);\nhighp vec3 pos \x3d vec3(0.);\nv_color \x3d vec4(0.);\nhittestLine(v_color, pos, halfWidth);\ngl_PointSize \x3d 1.;\ngl_Position \x3d vec4(clip(v_color, pos, getFilterFlags(), a_zoomRange), 1.0);\n}\n#else\nvoid draw()\n{\nhighp vec3 pos \x3d vec3(0.);\nLineData outputs \x3d buildLine(\npos,\na_id,\na_pos,\na_color,\na_offsetAndNormal.xy / 16.,\na_offsetAndNormal.zw / 16.,\na_accumulatedDistanceAndHalfWidth.x,\na_accumulatedDistanceAndHalfWidth.y / 16.,\na_segmentDirection.w,\na_tlbr,\na_segmentDirection.xy / 16.,\na_aux.x / 16.\n);\nv_id \x3d outputs.id;\nv_color \x3d outputs.color;\nv_normal \x3d outputs.normal;\nv_lineHalfWidth \x3d outputs.lineHalfWidth;\nv_opacity \x3d outputs.opacity;\n#ifndef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#ifdef PATTERN\nv_tlbr \x3d outputs.tlbr;\nv_patternSize \x3d outputs.patternSize;\n#endif\n#ifdef SDF\nv_lineWidthRatio \x3d outputs.lineWidthRatio;\n#endif\n#if defined(PATTERN) || defined(SDF)\nv_accumulatedDistance \x3d outputs.accumulatedDistance;\n#endif\n#endif\ngl_Position \x3d vec4(clip(outputs.color, pos, getFilterFlags(), a_zoomRange), 1.0);\n}\n#endif\nvoid main() {\nINIT;\ndraw();\n}"},
pie:{"pie.common.glsl":"uniform float outlineWidth;\nuniform mediump float sectorThreshold;\nvarying vec3 v_id;\nvarying vec3 v_pos;\nvarying vec2 v_offset;\nvarying vec4 v_color;\nvarying float v_size;\nvarying float v_numOfEntries;\nvarying float v_maxSectorAngle;\nvarying vec2 v_filteredSectorToColorId[numberOfFields];\nvarying vec2 v_texCoords;\nvarying float v_outlineWidth;\nvarying float v_opacity;\nstruct FilteredChartInfo {\nfloat endSectorAngle;\nint colorId;\n};","pie.frag":"precision highp float;\n#include \x3cutil/atan2.glsl\x3e\n#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/pie/pie.common.glsl\x3e\nuniform lowp vec4 colors[numberOfFields];\nuniform lowp vec4 defaultColor;\nuniform lowp vec4 othersColor;\nuniform lowp vec4 outlineColor;\nuniform float donutRatio;\nlowp vec4 getSectorColor(in int index, in vec2 filteredSectorToColorId[numberOfFields]) {\nmediump int colorIndex \x3d int(filteredSectorToColorId[index].y);\nreturn colors[colorIndex];\n}\nconst int OTHER_SECTOR_ID \x3d 255;\n#ifdef HITTEST\nvec4 getColor() {\nfloat distanceSize \x3d length(v_offset) * v_size;\nfloat donutSize \x3d donutRatio * v_size;\nfloat alpha \x3d step(donutSize, distanceSize) * (1.0 - step(v_size, distanceSize));\nreturn v_color;\n}\n#else\nvec4 getColor() {\nfloat angle \x3d 90.0 - C_RAD_TO_DEG * atan2(v_offset.y, v_offset.x);\nif (angle \x3c 0.0) {\nangle +\x3d 360.0;\n} else if (angle \x3e 360.0) {\nangle \x3d mod(angle, 360.0);\n}\nint numOfEntries \x3d int(v_numOfEntries);\nfloat maxSectorAngle \x3d v_maxSectorAngle;\nlowp vec4 fillColor \x3d (maxSectorAngle \x3e 0.0 || sectorThreshold \x3e 0.0) ? othersColor : defaultColor;\nlowp vec4 prevColor \x3d vec4(0.0);\nlowp vec4 nextColor \x3d vec4(0.0);\nfloat startSectorAngle \x3d 0.0;\nfloat endSectorAngle \x3d 0.0;\nif (angle \x3c maxSectorAngle) {\nfor (int index \x3d 0; index \x3c numberOfFields; ++index) {\nstartSectorAngle \x3d endSectorAngle;\nendSectorAngle \x3d v_filteredSectorToColorId[index].x;\nif (endSectorAngle \x3e angle) {\nfillColor \x3d getSectorColor(index, v_filteredSectorToColorId);\nprevColor \x3d sectorThreshold !\x3d 0.0 \x26\x26 index \x3d\x3d 0 \x26\x26 abs(360.0 - maxSectorAngle) \x3c EPSILON ? othersColor :\ngetSectorColor(index \x3e 0 ? index - 1 : numOfEntries - 1, v_filteredSectorToColorId);\nnextColor \x3d sectorThreshold !\x3d 0.0 \x26\x26 abs(endSectorAngle - maxSectorAngle) \x3c EPSILON ? othersColor :\ngetSectorColor(index \x3c numOfEntries - 1 ? index + 1 : 0, v_filteredSectorToColorId);\nbreak;\n}\nif (index \x3d\x3d numOfEntries - 1) {\nbreak;\n}\n}\n} else {\nprevColor \x3d getSectorColor(numOfEntries - 1, v_filteredSectorToColorId);\nnextColor \x3d getSectorColor(0, v_filteredSectorToColorId);\nstartSectorAngle \x3d maxSectorAngle;\nendSectorAngle \x3d 360.0;\n}\nlowp vec4 outlineColor \x3d outlineColor;\nfloat offset \x3d length(v_offset);\nfloat distanceSize \x3d offset * v_size;\nif (startSectorAngle !\x3d 0.0 || endSectorAngle !\x3d 360.0) {\nfloat distanceToStartSector \x3d (angle - startSectorAngle);\nfloat distanceToEndSector \x3d (endSectorAngle - angle);\nfloat sectorThreshold \x3d 0.6;\nfloat beginSectorAlpha \x3d smoothstep(0.0, sectorThreshold, distanceToStartSector * offset);\nfloat endSectorAlpha \x3d smoothstep(0.0, sectorThreshold, distanceToEndSector * offset);\nif (endSectorAlpha \x3e 0.0) {\nfillColor \x3d mix(nextColor, fillColor, endSectorAlpha);\n} else if (beginSectorAlpha \x3e 0.0) {\nfillColor \x3d mix(prevColor, fillColor, beginSectorAlpha);\n}\n}\nfloat donutSize \x3d donutRatio * (v_size - v_outlineWidth);\nfloat endOfDonut \x3d donutSize - v_outlineWidth;\nfloat aaThreshold \x3d 0.75;\nfloat innerCircleAlpha \x3d endOfDonut - aaThreshold \x3e 0.0 ? smoothstep(endOfDonut - aaThreshold, endOfDonut + aaThreshold, distanceSize) : 1.0;\nfloat outerCircleAlpha \x3d 1.0 - smoothstep(v_size - aaThreshold, v_size + aaThreshold , distanceSize);\nfloat circleAlpha \x3d innerCircleAlpha * outerCircleAlpha;\nfloat startOfOutline \x3d v_size - v_outlineWidth;\nif (startOfOutline \x3e 0.0 \x26\x26 v_outlineWidth \x3e 0.25) {\nfloat outlineFactor \x3d smoothstep(startOfOutline - aaThreshold, startOfOutline + aaThreshold, distanceSize);\nfloat innerLineFactor \x3d donutSize - aaThreshold \x3e 0.0 ? 1.0 - smoothstep(donutSize - aaThreshold, donutSize + aaThreshold , distanceSize) : 0.0;\nfillColor \x3d mix(fillColor, outlineColor, innerLineFactor + outlineFactor);\n}\nreturn v_opacity * circleAlpha * fillColor;\n}\n#endif\nvoid main()\n{\nvec4 color \x3d getColor();\n#ifdef highlight\ncolor.a \x3d step(1.0 / 255.0, color.a);\n#endif\ngl_FragColor \x3d color;\n}",
"pie.vert":"#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/barycentric.glsl\x3e\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/vv.glsl\x3e\n#include \x3cmaterials/attributeData.glsl\x3e\n#include \x3cmaterials/pie/pie.common.glsl\x3e\n#include \x3cmaterials/hittest/common.glsl\x3e\nattribute float a_bitSet;\nattribute vec2 a_offset;\nattribute vec2 a_texCoords;\nattribute vec2 a_size;\nattribute float a_referenceSize;\nattribute vec2 a_zoomRange;\nint filterValue(in float sectorAngle,\nin int currentIndex,\ninout FilteredChartInfo filteredInfo,\ninout vec2 filteredSectorToColorId[numberOfFields]) {\nif (sectorAngle \x3e sectorThreshold * 360.0) {\nfilteredInfo.endSectorAngle +\x3d sectorAngle;\nfilteredSectorToColorId[filteredInfo.colorId] \x3d vec2(filteredInfo.endSectorAngle, currentIndex);\n++filteredInfo.colorId;\n}\nreturn 0;\n}\nint filterValues(inout vec2 filteredSectorToColorId[numberOfFields],\ninout FilteredChartInfo filteredInfo,\nin float sectorAngles[numberOfFields]) {\nfor (int index \x3d 0; index \x3c numberOfFields; ++index) {\nfloat sectorValue \x3d sectorAngles[index];\nfilterValue(sectorValue, index, filteredInfo, filteredSectorToColorId);\n}\nreturn filteredInfo.colorId;\n}\nvec2 getMarkerSize(inout vec2 offset, inout vec2 baseSize, inout float outlineSize, in float a_referenceSize, in float bitSet) {\nvec2 outSize \x3d baseSize;\n#ifdef VV_SIZE\nfloat r \x3d getSize(a_referenceSize, currentScale) / a_referenceSize;\noutSize.xy *\x3d r;\noffset.xy *\x3d r;\nfloat scaleSymbolProportionally \x3d getBit(bitSet, BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY);\noutlineSize *\x3d scaleSymbolProportionally * (r - 1.0) + 1.0;\n#endif\nreturn outSize;\n}\nvec3 getOffset(in vec2 in_offset, float a_bitSet) {\nfloat isMapAligned \x3d getBit(a_bitSet, BITSET_MARKER_ALIGNMENT_MAP);\nvec3 offset \x3d vec3(in_offset, 0.0);\nreturn getMatrix(isMapAligned) * offset;\n}\nfloat filterNaNValues(in float value) {\nreturn value !\x3d NAN_MAGIC_NUMBER \x26\x26 value \x3e 0.0 ? value : 0.0;\n}\nvoid main()\n{\nINIT;\nvec2 a_size \x3d a_size;\nvec2 a_offset \x3d a_offset / 16.0;\nfloat outlineSize \x3d outlineWidth;\nfloat a_bitSet \x3d a_bitSet;\nfloat a_referenceSize \x3d a_referenceSize;\nvec2 a_texCoords \x3d a_texCoords / 4.0;\nvec2 markerSize \x3d getMarkerSize(a_offset, a_size, outlineSize, a_referenceSize, a_bitSet);\nfloat filterFlags \x3d getFilterFlags();\nvec3 pos \x3d vec3(a_pos / 10.0, 1.0);\nv_opacity \x3d getOpacity();\nv_id \x3d norm(a_id);\nv_pos \x3d displayViewScreenMat3 * pos + getOffset(a_offset, a_bitSet);\nv_offset \x3d sign(a_texCoords - 0.5);\nv_size \x3d max(markerSize.x, markerSize.y);\nv_outlineWidth \x3d outlineSize;\nfloat attributeData[10];\nvec4 attributeData3 \x3d getDataDriven0(a_id);\nattributeData[0] \x3d filterNaNValues(attributeData3.x);\nattributeData[1] \x3d filterNaNValues(attributeData3.y);\nattributeData[2] \x3d filterNaNValues(attributeData3.z);\nattributeData[3] \x3d filterNaNValues(attributeData3.w);\n#if (numberOfFields \x3e 4)\nvec4 attributeData4 \x3d getDataDriven1(a_id);\nattributeData[4] \x3d filterNaNValues(attributeData4.x);\nattributeData[5] \x3d filterNaNValues(attributeData4.y);\nattributeData[6] \x3d filterNaNValues(attributeData4.z);\nattributeData[7] \x3d filterNaNValues(attributeData4.w);\n#endif\n#if (numberOfFields \x3e 8)\nvec4 attributeData5 \x3d getDataDriven2(a_id);\nattributeData[8] \x3d filterNaNValues(attributeData5.x);\nattributeData[9] \x3d filterNaNValues(attributeData5.y);\n#endif\nfloat sum \x3d 0.0;\nfor (int i \x3d 0; i \x3c numberOfFields; ++i) {\nsum +\x3d attributeData[i];\n}\nfloat sectorAngles[numberOfFields];\nfor (int i \x3d 0; i \x3c numberOfFields; ++i) {\nsectorAngles[i] \x3d 360.0 * attributeData[i] / sum;\n}\nvec2 filteredSectorToColorId[numberOfFields];\nFilteredChartInfo filteredInfo \x3d FilteredChartInfo(0.0, 0);\nint numOfEntries \x3d filterValues(filteredSectorToColorId, filteredInfo, sectorAngles);\nv_numOfEntries \x3d float(numOfEntries);\nv_maxSectorAngle \x3d filteredInfo.endSectorAngle;\nv_filteredSectorToColorId \x3d filteredSectorToColorId;\n#ifdef HITTEST\nhighp vec3 out_pos \x3d vec3(0.0);\nv_color \x3d vec4(0.0);\nhittestMarker(v_color, out_pos, viewMat3 * tileMat3 * pos, v_size);\ngl_PointSize \x3d 1.0;\ngl_Position \x3d vec4(clip(v_color, out_pos, filterFlags, a_zoomRange), 1.0);\n#else\ngl_Position \x3d vec4(clip(v_color, v_pos, filterFlags, a_zoomRange), 1.0);\n#endif\n}"},
shared:{line:{"common.glsl":"#if !defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE) \x26\x26 defined(PATTERN)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump float v_sampleAlphaOnly;\n#endif\nstruct LineData {\nlowp vec4 color;\nmediump vec2 normal;\nmediump float lineHalfWidth;\nlowp float opacity;\n#ifndef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#ifdef PATTERN\nmediump vec4 tlbr;\nmediump vec2 patternSize;\n#endif\n#ifdef SDF\nmediump float lineWidthRatio;\n#endif\n#if defined(PATTERN) || defined(SDF)\nhighp float accumulatedDistance;\n#endif\n#endif\nhighp vec3 id;\n};",
"line.frag":"uniform lowp float u_blur;\n#if !defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE) \x26\x26 !defined(HIGHLIGHT)\n#if defined(PATTERN) || defined(SDF)\nuniform sampler2D u_texture;\nuniform highp float u_pixelRatio;\n#endif\n#endif\n#if defined(SDF) \x26\x26 !defined(HIGHLIGHT) \x26\x26 !defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE)\nlowp vec4 getLineColor(LineData line) {\nmediump float adjustedPatternWidth \x3d line.patternSize.x * 2.0 * line.lineWidthRatio;\nmediump float relativeTexX \x3d fract(line.accumulatedDistance / adjustedPatternWidth);\nmediump float relativeTexY \x3d 0.5 + 0.25 * line.normal.y;\nmediump vec2 texCoord \x3d mix(line.tlbr.xy, line.tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d \x3d rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist \x3d d * line.lineHalfWidth;\nreturn line.opacity * clamp(0.5 - dist, 0.0, 1.0) * line.color;\n}\n#elif defined(PATTERN) \x26\x26 !defined(HIGHLIGHT) \x26\x26 !defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE)\nlowp vec4 getLineColor(LineData line) {\nmediump float lineHalfWidth \x3d line.lineHalfWidth;\nmediump float adjustedPatternHeight \x3d line.patternSize.y * 2.0 * lineHalfWidth / line.patternSize.x;\nmediump float relativeTexY \x3d fract(line.accumulatedDistance / adjustedPatternHeight);\nmediump float relativeTexX \x3d 0.5 + 0.5 * line.normal.y;\nmediump vec2 texCoord \x3d mix(line.tlbr.xy, line.tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color \x3d texture2D(u_texture, texCoord);\n#ifdef VV_COLOR\nif (v_sampleAlphaOnly \x3e 0.5) {\ncolor.rgb \x3d vec3(color.a);\n}\n#endif\nreturn line.opacity * line.color * color;\n}\n#else\nlowp vec4 getLineColor(LineData line) {\nreturn line.opacity * line.color;\n}\n#endif\nvec4 shadeLine(LineData line)\n{\nmediump float thinLineFactor \x3d max(THIN_LINE_WIDTH_FACTOR * step(line.lineHalfWidth, THIN_LINE_HALF_WIDTH), 1.0);\nmediump float fragDist \x3d length(line.normal) * line.lineHalfWidth;\nlowp float alpha \x3d clamp(thinLineFactor * (line.lineHalfWidth - fragDist) / (u_blur + thinLineFactor - 1.0), 0.0, 1.0);\nlowp vec4 out_color \x3d getLineColor(line) * alpha;\n#ifdef HIGHLIGHT\nout_color.a \x3d step(1.0 / 255.0, out_color.a);\n#endif\n#ifdef ID\nif (out_color.a \x3c 1.0 / 255.0) {\ndiscard;\n}\nout_color \x3d vec4(line.id, 0.0);\n#endif\nreturn out_color;\n}",
"line.vert":"float getBaseLineHalfWidth(in float lineHalfWidth, in float referenceHalfWidth) {\n#ifdef VV_SIZE\nfloat refLineWidth \x3d 2.0 * referenceHalfWidth;\nreturn 0.5 * (lineHalfWidth / max(referenceHalfWidth, EPSILON)) * getSize(refLineWidth);\n#else\nreturn lineHalfWidth;\n#endif\n}\nfloat getLineHalfWidth(in float baseWidth, in float aa) {\nfloat halfWidth \x3d max(baseWidth + aa, 0.45) + 0.1 * aa;\n#ifdef HIGHLIGHT\nhalfWidth \x3d max(halfWidth, 2.0);\n#endif\nreturn halfWidth;\n}\nvec2 getDist(in vec2 offset, in float halfWidth) {\nfloat thinLineFactor \x3d max(THIN_LINE_WIDTH_FACTOR * step(halfWidth, THIN_LINE_HALF_WIDTH), 1.0);\nreturn thinLineFactor * halfWidth * offset;\n}\nLineData buildLine(\nout vec3 out_pos,\nin vec3 in_id,\nin vec2 in_pos,\nin vec4 in_color,\nin vec2 in_offset,\nin vec2 in_normal,\nin float in_accumulatedDist,\nin float in_lineHalfWidth,\nin float in_bitSet,\nin vec4 in_tlbr,\nin vec2 in_segmentDirection,\nin float in_referenceHalfWidth\n)\n{\nfloat aa \x3d 0.5 * u_antialiasing;\nfloat baseWidth \x3d getBaseLineHalfWidth(in_lineHalfWidth, in_referenceHalfWidth);\nfloat halfWidth \x3d getLineHalfWidth(baseWidth, aa);\nfloat z \x3d 2.0 * step(baseWidth, 0.0);\nvec2 dist \x3d getDist(in_offset, halfWidth);\nvec3 offset \x3d u_displayViewMat3 * vec3(dist, 0.0);\nvec3 pos \x3d u_dvsMat3 * vec3(in_pos * POSITION_PRECISION, 1.0) + offset;\n#ifdef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\nvec4 color \x3d in_color;\nfloat opacity \x3d 1.0;\n#else\nvec4 color \x3d getColor(in_color, in_bitSet, BITSET_GENERIC_LOCK_COLOR);\nfloat opacity \x3d getOpacity();\n#ifdef SDF\nconst float SDF_PATTERN_HALF_WIDTH \x3d 15.5;\nfloat scaleDash \x3d getBit(in_bitSet, BITSET_LINE_SCALE_DASH);\nfloat lineWidthRatio \x3d (scaleDash * max(halfWidth - 0.55 * u_antialiasing, 0.25) + (1.0 - scaleDash)) / SDF_PATTERN_HALF_WIDTH;\n#endif\n#endif\n#if !defined(SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE) \x26\x26 defined(PATTERN)\nv_sampleAlphaOnly \x3d getBit(in_bitSet, BITSET_GENERIC_CONSIDER_ALPHA_ONLY);\n#endif\nout_pos \x3d vec3(pos.xy, z);\nreturn LineData(\ncolor,\nin_normal,\nhalfWidth,\nopacity,\n#ifndef SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#ifdef PATTERN\nin_tlbr / u_mosaicSize.xyxy,\nvec2(in_tlbr.z - in_tlbr.x, in_tlbr.w - in_tlbr.y),\n#endif\n#ifdef SDF\nlineWidthRatio,\n#endif\n#if defined(PATTERN) || defined(SDF)\nin_accumulatedDist * u_zoomFactor + dot(in_segmentDirection, dist),\n#endif\n#endif\nnorm(in_id)\n);\n}"}},
"symbologyTypeUtils.glsl":"#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_OUTLINE_FILL || SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_OUTLINE_FILL_SIMPLE\n#define SYMBOLOGY_TYPE_IS_OUTLINE_FILL_LIKE\n#endif\n#if SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_SIMPLE || SYMBOLOGY_TYPE \x3d\x3d SYMBOLOGY_TYPE_OUTLINE_FILL_SIMPLE\n#define SYMBOLOGY_TYPE_IS_SIMPLE_LIKE\n#endif",text:{"common.glsl":"uniform highp vec2 u_mosaicSize;\nvarying highp vec3 v_id;\nvarying mediump vec3 v_pos;\nvarying lowp float v_opacity;\nvarying lowp vec4 v_color;\nvarying highp vec2 v_tex;\nvarying mediump float v_antialiasingWidth;\nvarying mediump float v_edgeDistanceOffset;\nvarying lowp float v_transparency;",
"hittest.glsl":"#include \x3cmaterials/hittest/common.glsl\x3e","text.frag":"precision mediump float;\n#include \x3cmaterials/text/common.glsl\x3e\nuniform lowp sampler2D u_texture;\n#ifdef HITTEST\nvec4 getColor() {\nreturn v_color;\n}\n#else\nvec4 getColor()\n{\nfloat SDF_CUTOFF \x3d (2.0 / 8.0);\nfloat SDF_BASE_EDGE_DIST \x3d 1.0 - SDF_CUTOFF;\nlowp float dist \x3d texture2D(u_texture, v_tex).a;\nmediump float edge \x3d SDF_BASE_EDGE_DIST - v_edgeDistanceOffset;\n#ifdef HIGHLIGHT\nedge /\x3d 2.0;\n#endif\nlowp float aa \x3d v_antialiasingWidth;\nlowp float alpha \x3d smoothstep(edge - aa, edge + aa, dist);\nreturn alpha * v_color * v_opacity;\n}\n#endif\nvoid main()\n{\ngl_FragColor \x3d getColor();\n}",
"text.vert":"precision highp float;\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/vcommon.glsl\x3e\n#include \x3cmaterials/text/common.glsl\x3e\n#include \x3cmaterials/text/hittest.glsl\x3e\nattribute vec4 a_color;\nattribute vec4 a_haloColor;\nattribute vec4 a_texFontSize;\nattribute vec4 a_aux;\nattribute vec2 a_zoomRange;\nattribute vec2 a_vertexOffset;\nattribute vec2 a_texCoords;\nuniform float u_isHaloPass;\nuniform float u_isBackgroundPass;\nfloat getTextSize(inout vec2 offset, inout float baseSize, in float referenceSize) {\n#ifdef VV_SIZE\nfloat r \x3d getSize(referenceSize) / referenceSize;\nbaseSize *\x3d r;\noffset.xy *\x3d r;\nreturn baseSize;\n#endif\nreturn baseSize;\n}\nvoid main()\n{\nINIT;\nfloat a_isBackground \x3d a_aux.y;\nfloat a_referenceSize \x3d a_aux.z * a_aux.z / 256.0;\nfloat a_bitSet \x3d a_aux.w;\nfloat a_fontSize \x3d a_texFontSize.z;\nvec2 a_offset \x3d a_vertexOffset * OFFSET_PRECISION;\nvec3 in_pos \x3d vec3(a_pos * POSITION_PRECISION, 1.0);\nfloat fontSize \x3d getTextSize(a_offset, a_fontSize, a_referenceSize);\nfloat fontScale \x3d fontSize / SDF_FONT_SIZE;\nvec3 offset \x3d getRotation() * vec3(a_offset, 0.0);\nmat3 extrudeMatrix \x3d getBit(a_bitSet, 0) \x3d\x3d 1.0 ? u_displayViewMat3 : u_displayMat3;\nfloat isText \x3d 1.0 - a_isBackground;\nfloat isBackground \x3d u_isBackgroundPass * a_isBackground;\nvec4 nonHaloColor \x3d (isBackground * a_color) + (isText * getColor(a_color, a_bitSet, 1));\nv_color \x3d u_isHaloPass * a_haloColor + (1.0 - u_isHaloPass) * nonHaloColor;\nv_opacity \x3d getOpacity();\nv_id \x3d norm(a_id);\nv_tex \x3d a_texCoords / u_mosaicSize;\nv_pos \x3d u_dvsMat3 * in_pos + extrudeMatrix * offset;\nfloat isHidden \x3d u_isBackgroundPass * isText + (1.0 - u_isBackgroundPass) * a_isBackground;\nv_pos.z +\x3d 2.0 * isHidden;\nv_edgeDistanceOffset \x3d u_isHaloPass * OUTLINE_SCALE * a_texFontSize.w / fontScale / MAX_SDF_DISTANCE;\nv_antialiasingWidth \x3d 0.105 * SDF_FONT_SIZE / fontSize / u_pixelRatio;\n#ifdef HITTEST\nhighp vec3 out_pos \x3d vec3(0.);\nv_color \x3d vec4(0.);\nhittestMarker(v_color, out_pos, u_viewMat3 * u_tileMat3 * vec3(a_pos * POSITION_PRECISION, 1.0)\n+ u_tileMat3 * offset, fontSize / 2.);\ngl_PointSize \x3d 1.;\ngl_Position \x3d vec4(clip(v_color, out_pos, getFilterFlags(), a_zoomRange), 1.0);\n#else\ngl_Position \x3d vec4(clip(v_color, v_pos, getFilterFlags(), a_zoomRange), 1.0);\n#endif\n}"},
"utils.glsl":"float rshift(in float u32, in int amount) {\nreturn floor(u32 / pow(2.0, float(amount)));\n}\nfloat getBit(in float bitset, in int bitIndex) {\nfloat offset \x3d pow(2.0, float(bitIndex));\nreturn mod(floor(bitset / offset), 2.0);\n}\nconst int highlightReasonsLength \x3d 3;\nfloat getFilterBit(in float bitset, in int bitIndex) {\nreturn getBit(bitset, bitIndex + highlightReasonsLength);\n}\nfloat getHighlightBit(in float bitset, in int bitIndex) {\nreturn getBit(bitset, bitIndex);\n}\nhighp vec3 unpackDisplayIdTexel(in highp vec3 bitset) {\nfloat isAggregate \x3d getBit(bitset.b, 7);\nreturn (1.0 - isAggregate) * bitset + isAggregate * (vec3(bitset.rgb) - vec3(0.0, 0.0, float(0x80)));\n}\nvec4 unpack(in float u32) {\nfloat r \x3d mod(rshift(u32, 0), 255.0);\nfloat g \x3d mod(rshift(u32, 8), 255.0);\nfloat b \x3d mod(rshift(u32, 16), 255.0);\nfloat a \x3d mod(rshift(u32, 24), 255.0);\nreturn vec4(r, g, b, a);\n}\nvec3 norm(in vec3 v) {\nreturn v /\x3d 255.0;\n}\nvec4 norm(in vec4 v) {\nreturn v /\x3d 255.0;\n}\nfloat max4(vec4 target) {\nreturn max(max(max(target.x, target.y), target.z), target.w);\n}\nvec2 unpack_u8_nf32(vec2 bytes) {\nreturn (bytes - 127.0) / 127.0;\n}\nhighp float rand(in vec2 co) {\nhighp float a \x3d 12.9898;\nhighp float b \x3d 78.233;\nhighp float c \x3d 43758.5453;\nhighp float dt \x3d dot(co, vec2(a,b));\nhighp float sn \x3d mod(dt, 3.14);\nreturn fract(sin(sn) * c);\n}",
"vcommon.glsl":"#include \x3cmaterials/constants.glsl\x3e\n#include \x3cmaterials/utils.glsl\x3e\n#include \x3cmaterials/attributeData.glsl\x3e\n#include \x3cmaterials/vv.glsl\x3e\n#include \x3cmaterials/barycentric.glsl\x3e\nattribute vec2 a_pos;\nattribute highp vec3 a_id;\nuniform highp mat3 displayViewScreenMat3;\nuniform highp mat3 displayViewMat3;\nuniform highp mat3 displayMat3;\nuniform highp mat3 tileMat3;\nuniform highp mat3 viewMat3;\nuniform highp float pixelRatio;\nuniform mediump float zoomFactor;\nuniform mediump float antialiasing;\nuniform mediump float currentScale;\nuniform mediump float currentZoom;\nuniform mediump float metersPerSRUnit;\nvec4 VV_ADATA \x3d vec4(0.0);\nvoid loadVisualVariableData(inout vec4 target) {\ntarget.rgba \x3d getVisualVariableData(a_id);\n}\n#ifdef VV\n#define INIT loadVisualVariableData(VV_ADATA)\n#else\n#define INIT\n#endif\nvec4 getColor(in vec4 a_color, in float a_bitSet, int index) {\n#ifdef VV_COLOR\nfloat isColorLocked \x3d getBit(a_bitSet, index);\nreturn getVVColor(VV_ADATA[ATTR_VV_COLOR], a_color, isColorLocked);\n#else\nreturn a_color;\n#endif\n}\nfloat getOpacity() {\n#ifdef VV_OPACITY\nreturn getVVOpacity(VV_ADATA[ATTR_VV_OPACITY]);\n#else\nreturn 1.0;\n#endif\n}\nfloat getSize(in float in_size, in float currentScale) {\n#ifdef VV_SIZE\nreturn getVVSize(in_size, VV_ADATA[ATTR_VV_SIZE], currentScale);\n#else\nreturn in_size;\n#endif\n}\nmat3 getRotation() {\n#ifdef VV_ROTATION\nreturn getVVRotationMat3(mod(VV_ADATA[ATTR_VV_ROTATION], 360.0));\n#else\nreturn mat3(1.0);\n#endif\n}\nfloat getFilterFlags() {\n#ifdef IGNORES_SAMPLER_PRECISION\nreturn ceil(getFilterData(a_id).x * 255.0);\n#else\nreturn getFilterData(a_id).x * 255.0;\n#endif\n}\nvec4 getAnimationState() {\nreturn getAnimation(a_id);\n}\nfloat getMinZoom() {\nvec4 data0 \x3d getFilterData(a_id) * 255.0;\nreturn data0.g;\n}\nmat3 getMatrixNoDisplay(float isMapAligned) {\nreturn isMapAligned * viewMat3 * tileMat3 + (1.0 - isMapAligned) * tileMat3;\n}\nmat3 getMatrix(float isMapAligned) {\nreturn isMapAligned * displayViewMat3 + (1.0 - isMapAligned) * displayMat3;\n}\nfloat checkHighlightBit(float filterFlags, int index) {\nreturn getHighlightBit(filterFlags, index);\n}\nfloat checkHighlight(float filterFlags) {\nfloat result \x3d checkHighlightBit(filterFlags, 0);\nfor (int i \x3d 1; i \x3c highlightReasonsLength; i++) {\nresult \x3d result + checkHighlightBit(filterFlags, i);\n}\nreturn step(0.1, result);\n}\nvec3 clip(inout vec4 color, inout vec3 pos, in float filterFlags, in vec2 minMaxZoom) {\npos.z +\x3d 2.0 * (1.0 - getFilterBit(filterFlags, 0));\n#ifdef inside\npos.z +\x3d 2.0 * (1.0 - getFilterBit(filterFlags, 1));\n#elif defined(outside)\npos.z +\x3d 2.0 * getFilterBit(filterFlags, 1);\n#elif defined(highlight)\n#if !defined(highlight_all)\npos.z +\x3d 2.0 * (1.0 - checkHighlight(filterFlags));\n#endif\n#endif\npos.z +\x3d 2.0 * (step(minMaxZoom.y, currentZoom) + (1.0 - step(minMaxZoom.x, currentZoom)));\nreturn pos;\n}",
"vv.glsl":"#if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\n#define VV_SIZE\n#endif\n#if defined(VV_COLOR) || defined(VV_SIZE) || defined(VV_OPACITY) || defined(VV_ROTATION)\n#define VV\n#endif\n#ifdef VV_COLOR\nuniform highp float colorValues[8];\nuniform vec4 colors[8];\n#endif\n#ifdef VV_SIZE_MIN_MAX_VALUE\nuniform highp vec4 minMaxValueAndSize;\n#endif\n#ifdef VV_SIZE_SCALE_STOPS\nuniform highp float values[8];\nuniform float sizes[8];\n#endif\n#ifdef VV_SIZE_FIELD_STOPS\nuniform highp float values[8];\nuniform float sizes[8];\n#endif\n#ifdef VV_SIZE_UNIT_VALUE\nuniform highp float unitMeterRatio;\n#endif\n#ifdef VV_OPACITY\nuniform highp float opacityValues[8];\nuniform float opacities[8];\n#endif\n#ifdef VV_ROTATION\nuniform lowp float rotationType;\n#endif\nbool isNan(float val) {\nreturn (val \x3d\x3d NAN_MAGIC_NUMBER);\n}\n#ifdef VV_SIZE_MIN_MAX_VALUE\nfloat getVVMinMaxSize(float sizeValue, float fallback) {\nif (isNan(sizeValue)) {\nreturn fallback;\n}\nfloat interpolationRatio \x3d (sizeValue - minMaxValueAndSize.x) / (minMaxValueAndSize.y - minMaxValueAndSize.x);\ninterpolationRatio \x3d clamp(interpolationRatio, 0.0, 1.0);\nreturn minMaxValueAndSize.z + interpolationRatio * (minMaxValueAndSize.w - minMaxValueAndSize.z);\n}\n#endif\n#ifdef VV_SIZE_SCALE_STOPS\nfloat getVVScaleStopsSize(float currentScale) {\nfloat outSize;\nif (currentScale \x3c\x3d values[0]) {\noutSize \x3d sizes[0];\n} else {\nif (currentScale \x3e\x3d values[7]) {\noutSize \x3d sizes[7];\n} else {\nint index;\nindex \x3d -1;\nfor (int i \x3d 0; i \x3c 8; i++) {\nif (values[i] \x3e currentScale) {\nindex \x3d i;\nbreak;\n}\n}\nint prevIndex \x3d index - 1;\nfloat a \x3d currentScale - values[prevIndex];\nfloat b \x3d values[index] - values[prevIndex];\noutSize \x3d mix(sizes[prevIndex], sizes[index], a / b);\n}\n}\nreturn outSize;\n}\n#endif\n#ifdef VV_SIZE_FIELD_STOPS\nconst int VV_SIZE_N \x3d 8;\nfloat getVVStopsSize(float sizeValue, float fallback) {\nif (isNan(sizeValue)) {\nreturn fallback;\n}\nif (sizeValue \x3c\x3d values[0]) {\nreturn sizes[0];\n}\nfor (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\nif (values[i] \x3e\x3d sizeValue) {\nfloat f \x3d (sizeValue - values[i-1]) / (values[i] - values[i-1]);\nreturn mix(sizes[i-1], sizes[i], f);\n}\n}\nreturn sizes[VV_SIZE_N - 1];\n}\n#endif\n#ifdef VV_SIZE_UNIT_VALUE\nfloat getVVUnitValue(float sizeValue, float fallback) {\nif (isNan(sizeValue)) {\nreturn fallback;\n}\nreturn sizeValue * (metersPerSRUnit / unitMeterRatio);\n}\n#endif\n#ifdef VV_OPACITY\nconst int VV_OPACITY_N \x3d 8;\nfloat getVVOpacity(float opacityValue) {\nif (isNan(opacityValue)) {\nreturn 1.0;\n}\nif (opacityValue \x3c\x3d opacityValues[0]) {\nreturn opacities[0];\n}\nfor (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\nif (opacityValues[i] \x3e\x3d opacityValue) {\nfloat f \x3d (opacityValue - opacityValues[i-1]) / (opacityValues[i] - opacityValues[i-1]);\nreturn mix(opacities[i-1], opacities[i], f);\n}\n}\nreturn opacities[VV_OPACITY_N - 1];\n}\n#endif\n#ifdef VV_ROTATION\nmat4 getVVRotation(float rotationValue) {\nif (isNan(rotationValue)) {\nreturn mat4(1, 0, 0, 0,\n0, 1, 0, 0,\n0, 0, 1, 0,\n0, 0, 0, 1);\n}\nfloat rotation \x3d rotationValue;\nif (rotationType \x3d\x3d 1.0) {\nrotation \x3d 90.0 - rotation;\n}\nfloat angle \x3d C_DEG_TO_RAD * rotation;\nfloat sinA \x3d sin(angle);\nfloat cosA \x3d cos(angle);\nreturn mat4(cosA, sinA, 0, 0,\n-sinA, cosA, 0, 0,\n0, 0, 1, 0,\n0, 0, 0, 1);\n}\nmat3 getVVRotationMat3(float rotationValue) {\nif (isNan(rotationValue)) {\nreturn mat3(1, 0, 0,\n0, 1, 0,\n0, 0, 1);\n}\nfloat rotation \x3d rotationValue;\nif (rotationType \x3d\x3d 1.0) {\nrotation \x3d 90.0 - rotation;\n}\nfloat angle \x3d C_DEG_TO_RAD * -rotation;\nfloat sinA \x3d sin(angle);\nfloat cosA \x3d cos(angle);\nreturn mat3(cosA, -sinA, 0,\nsinA, cosA, 0,\n0, 0, 1);\n}\n#endif\n#ifdef VV_COLOR\nconst int VV_COLOR_N \x3d 8;\nvec4 getVVColor(float colorValue, vec4 fallback, float isColorLocked) {\nif (isNan(colorValue) || isColorLocked \x3d\x3d 1.0) {\nreturn fallback;\n}\nif (colorValue \x3c\x3d colorValues[0]) {\nreturn colors[0];\n}\nfor (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\nif (colorValues[i] \x3e\x3d colorValue) {\nfloat f \x3d (colorValue - colorValues[i-1]) / (colorValues[i] - colorValues[i-1]);\nreturn mix(colors[i-1], colors[i], f);\n}\n}\nreturn colors[VV_COLOR_N - 1];\n}\n#endif\nfloat getVVSize(in float size, in float vvSize, in float currentScale) {\n#ifdef VV_SIZE_MIN_MAX_VALUE\nreturn getVVMinMaxSize(vvSize, size);\n#elif defined(VV_SIZE_SCALE_STOPS)\nfloat outSize \x3d getVVScaleStopsSize(currentScale);\nreturn isNan(outSize) ? size : outSize;\n#elif defined(VV_SIZE_FIELD_STOPS)\nfloat outSize \x3d getVVStopsSize(vvSize, size);\nreturn isNan(outSize) ? size : outSize;\n#elif defined(VV_SIZE_UNIT_VALUE)\nreturn getVVUnitValue(vvSize, size);\n#else\nreturn size;\n#endif\n}"},
overlay:{overlay:{"overlay.frag":"precision lowp float;\nuniform lowp sampler2D u_texture;\nuniform lowp float u_opacity;\nvarying mediump vec2 v_uv;\nvoid main() {\nvec4 color \x3d texture2D(u_texture, v_uv);\ngl_FragColor \x3d color * u_opacity;\n}","overlay.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec2 a_uv;\nuniform highp mat3 u_dvsMat3;\nuniform mediump vec2 u_perspective;\nuniform highp float u_wrapAroundShift;\nuniform mediump vec2 u_texSize;\nvarying mediump vec2 v_uv;\nvoid main(void) {\nv_uv \x3d a_uv / u_texSize;\nfloat w \x3d 1.0 + dot(a_uv, u_perspective);\nvec3 pos \x3d u_dvsMat3 * vec3(a_pos + vec2(u_wrapAroundShift, 0.0), 1.0);\ngl_Position \x3d vec4(w * pos.xy, 0.0, w);\n}"}},
"post-processing":{blit:{"blit.frag":"precision mediump float;\nuniform sampler2D u_texture;\nvarying vec2 v_uv;\nvoid main() {\ngl_FragColor \x3d texture2D(u_texture, v_uv);\n}"},bloom:{composite:{"composite.frag":"precision mediump float;\nvarying vec2 v_uv;\nuniform sampler2D u_blurTexture1;\nuniform sampler2D u_blurTexture2;\nuniform sampler2D u_blurTexture3;\nuniform sampler2D u_blurTexture4;\nuniform sampler2D u_blurTexture5;\nuniform float u_bloomStrength;\nuniform float u_bloomRadius;\nuniform float u_bloomFactors[NUMMIPS];\nuniform vec3 u_bloomTintColors[NUMMIPS];\nfloat lerpBloomFactor(const in float factor) {\nfloat mirrorFactor \x3d 1.2 - factor;\nreturn mix(factor, mirrorFactor, u_bloomRadius);\n}\nvoid main() {\nvec4 color \x3d u_bloomStrength * (\nlerpBloomFactor(u_bloomFactors[0]) * vec4(u_bloomTintColors[0], 1.0) * texture2D(u_blurTexture1, v_uv) +\nlerpBloomFactor(u_bloomFactors[1]) * vec4(u_bloomTintColors[1], 1.0) * texture2D(u_blurTexture2, v_uv) +\nlerpBloomFactor(u_bloomFactors[2]) * vec4(u_bloomTintColors[2], 1.0) * texture2D(u_blurTexture3, v_uv) +\nlerpBloomFactor(u_bloomFactors[3]) * vec4(u_bloomTintColors[3], 1.0) * texture2D(u_blurTexture4, v_uv) +\nlerpBloomFactor(u_bloomFactors[4]) * vec4(u_bloomTintColors[4], 1.0) * texture2D(u_blurTexture5, v_uv)\n);\ngl_FragColor \x3d clamp(color, 0.0, 1.0);\n}"},
gaussianBlur:{"gaussianBlur.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nuniform vec2 u_texSize;\nuniform vec2 u_direction;\nvarying vec2 v_uv;\n#define KERNEL_RADIUS RADIUS\n#define SIGMA RADIUS\nfloat gaussianPdf(in float x, in float sigma) {\nreturn 0.39894 * exp(-0.5 * x * x / ( sigma * sigma)) / sigma;\n}\nvoid main() {\nvec2 invSize \x3d 1.0 / u_texSize;\nfloat fSigma \x3d float(SIGMA);\nfloat weightSum \x3d gaussianPdf(0.0, fSigma);\nvec4 pixelColorSum \x3d texture2D(u_colorTexture, v_uv) * weightSum;\nfor (int i \x3d 1; i \x3c KERNEL_RADIUS; i ++) {\nfloat x \x3d float(i);\nfloat w \x3d gaussianPdf(x, fSigma);\nvec2 uvOffset \x3d u_direction * invSize * x;\nvec4 sample1 \x3d texture2D(u_colorTexture, v_uv + uvOffset);\nvec4 sample2 \x3d texture2D(u_colorTexture, v_uv - uvOffset);\npixelColorSum +\x3d (sample1 + sample2) * w;\nweightSum +\x3d 2.0 * w;\n}\ngl_FragColor \x3d pixelColorSum /weightSum;\n}"},
luminosityHighPass:{"luminosityHighPass.frag":"precision mediump float;\nuniform sampler2D u_texture;\nuniform vec3 u_defaultColor;\nuniform float u_defaultOpacity;\nuniform float u_luminosityThreshold;\nuniform float u_smoothWidth;\nvarying vec2 v_uv;\nvoid main() {\nvec4 texel \x3d texture2D(u_texture, v_uv);\nvec3 luma \x3d vec3(0.299, 0.587, 0.114);\nfloat v \x3d dot(texel.xyz, luma);\nvec4 outputColor \x3d vec4(u_defaultColor.rgb, u_defaultOpacity);\nfloat alpha \x3d smoothstep(u_luminosityThreshold, u_luminosityThreshold + u_smoothWidth, v);\ngl_FragColor \x3d mix(outputColor, texel, alpha);\n}"}},
blur:{gaussianBlur:{"gaussianBlur.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nuniform vec2 u_texSize;\nuniform vec2 u_direction;\nuniform float u_sigma;\nvarying vec2 v_uv;\n#define KERNEL_RADIUS RADIUS\nfloat gaussianPdf(in float x, in float sigma) {\nreturn 0.39894 * exp(-0.5 * x * x / ( sigma * sigma)) / sigma;\n}\nvoid main() {\nvec2 invSize \x3d 1.0 / u_texSize;\nfloat fSigma \x3d u_sigma;\nfloat weightSum \x3d gaussianPdf(0.0, fSigma);\nvec4 pixelColorSum \x3d texture2D(u_colorTexture, v_uv) * weightSum;\nfor (int i \x3d 1; i \x3c KERNEL_RADIUS; i ++) {\nfloat x \x3d float(i);\nfloat w \x3d gaussianPdf(x, fSigma);\nvec2 uvOffset \x3d u_direction * invSize * x;\nvec4 sample1 \x3d texture2D(u_colorTexture, v_uv + uvOffset);\nvec4 sample2 \x3d texture2D(u_colorTexture, v_uv - uvOffset);\npixelColorSum +\x3d (sample1 + sample2) * w;\nweightSum +\x3d 2.0 * w;\n}\ngl_FragColor \x3d pixelColorSum /weightSum;\n}"},
"radial-blur":{"radial-blur.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nvarying vec2 v_uv;\nconst float sampleDist \x3d 1.0;\nconst float sampleStrength \x3d 2.2;\nvoid main(void) {\nfloat samples[10];\nsamples[0] \x3d -0.08;\nsamples[1] \x3d -0.05;\nsamples[2] \x3d -0.03;\nsamples[3] \x3d -0.02;\nsamples[4] \x3d -0.01;\nsamples[5] \x3d 0.01;\nsamples[6] \x3d 0.02;\nsamples[7] \x3d 0.03;\nsamples[8] \x3d 0.05;\nsamples[9] \x3d 0.08;\nvec2 dir \x3d 0.5 - v_uv;\nfloat dist \x3d sqrt(dir.x * dir.x + dir.y * dir.y);\ndir \x3d dir / dist;\nvec4 color \x3d texture2D(u_colorTexture,v_uv);\nvec4 sum \x3d color;\nfor (int i \x3d 0; i \x3c 10; i++) {\nsum +\x3d texture2D(u_colorTexture, v_uv + dir * samples[i] * sampleDist);\n}\nsum *\x3d 1.0 / 11.0;\nfloat t \x3d dist * sampleStrength;\nt \x3d clamp(t, 0.0, 1.0);\ngl_FragColor \x3d mix(color, sum, t);\n}"}},
dra:{"dra.frag":"precision mediump float;\nuniform sampler2D u_minColor;\nuniform sampler2D u_maxColor;\nuniform sampler2D u_texture;\nvarying vec2 v_uv;\nvoid main() {\nvec4 minColor \x3d texture2D(u_minColor, vec2(0.5));\nvec4 maxColor \x3d texture2D(u_maxColor, vec2(0.5));\nvec4 color \x3d texture2D(u_texture, v_uv);\nvec3 minColorUnpremultiply \x3d minColor.rgb / minColor.a;\nvec3 maxColorUnpremultiply \x3d maxColor.rgb / maxColor.a;\nvec3 colorUnpremultiply \x3d color.rgb / color.a;\nvec3 range \x3d maxColorUnpremultiply - minColorUnpremultiply;\ngl_FragColor \x3d vec4(color.a * (colorUnpremultiply - minColorUnpremultiply) / range, color.a);\n}",
"min-max":{"min-max.frag":"#extension GL_EXT_draw_buffers : require\nprecision mediump float;\n#define CELL_SIZE 2\nuniform sampler2D u_minTexture;\nuniform sampler2D u_maxTexture;\nuniform vec2 u_srcResolution;\nuniform vec2 u_dstResolution;\nvarying vec2 v_uv;\nvoid main() {\nvec2 srcPixel \x3d floor(gl_FragCoord.xy) * float(CELL_SIZE);\nvec2 onePixel \x3d vec2(1.0) / u_srcResolution;\nvec2 uv \x3d (srcPixel + 0.5) / u_srcResolution;\nvec4 minColor \x3d vec4(1.0);\nvec4 maxColor \x3d vec4(0.0);\nfor (int y \x3d 0; y \x3c CELL_SIZE; ++y) {\nfor (int x \x3d 0; x \x3c CELL_SIZE; ++x) {\nvec2 offset \x3d uv + vec2(x, y) * onePixel;\nminColor \x3d min(minColor, texture2D(u_minTexture, offset));\nmaxColor \x3d max(maxColor, texture2D(u_maxTexture, offset));\n}\n}\ngl_FragData[0] \x3d minColor;\ngl_FragData[1] \x3d maxColor;\n}"}},
"drop-shadow":{composite:{"composite.frag":"precision mediump float;\nuniform sampler2D u_layerFBOTexture;\nuniform sampler2D u_blurTexture;\nuniform vec4 u_shadowColor;\nuniform vec2 u_shadowOffset;\nuniform highp mat3 u_displayViewMat3;\nvarying vec2 v_uv;\nvoid main() {\nvec3 offset \x3d u_displayViewMat3 * vec3(u_shadowOffset, 0.0);\nvec4 layerColor \x3d texture2D(u_layerFBOTexture, v_uv);\nvec4 blurColor \x3d texture2D(u_blurTexture, v_uv - offset.xy / 2.0);\ngl_FragColor \x3d ((1.0 - layerColor.a) * blurColor.a * u_shadowColor + layerColor);\n}"}},
"edge-detect":{"frei-chen":{"frei-chen.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nuniform vec2 u_texSize;\nvarying vec2 v_uv;\nvec2 texel \x3d vec2(1.0 / u_texSize.x, 1.0 / u_texSize.y);\nmat3 G[9];\nconst mat3 g0 \x3d mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );\nconst mat3 g1 \x3d mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );\nconst mat3 g2 \x3d mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );\nconst mat3 g3 \x3d mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );\nconst mat3 g4 \x3d mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );\nconst mat3 g5 \x3d mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );\nconst mat3 g6 \x3d mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );\nconst mat3 g7 \x3d mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );\nconst mat3 g8 \x3d mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );\nvoid main() {\nG[0] \x3d g0,\nG[1] \x3d g1,\nG[2] \x3d g2,\nG[3] \x3d g3,\nG[4] \x3d g4,\nG[5] \x3d g5,\nG[6] \x3d g6,\nG[7] \x3d g7,\nG[8] \x3d g8;\nmat3 I;\nfloat cnv[9];\nvec3 sample;\nfor (float i \x3d 0.0; i \x3c 3.0; i++) {\nfor (float j \x3d 0.0; j \x3c 3.0; j++) {\nsample \x3d texture2D(u_colorTexture, v_uv + texel * vec2(i - 1.0,j - 1.0)).rgb;\nI[int(i)][int(j)] \x3d length(sample);\n}\n}\nfor (int i \x3d 0; i \x3c 9; i++) {\nfloat dp3 \x3d dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);\ncnv[i] \x3d dp3 * dp3;\n}\nfloat M \x3d (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);\nfloat S \x3d (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);\ngl_FragColor \x3d vec4(vec3(sqrt(M / S)), texture2D(u_colorTexture, v_uv).a);\n}"},
sobel:{"sobel.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nvarying vec2 v_uv;\nuniform vec2 u_texSize;\nvec2 texel \x3d vec2(1.0 / u_texSize.x, 1.0 / u_texSize.y);\nmat3 G[2];\nconst mat3 g0 \x3d mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 );\nconst mat3 g1 \x3d mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 );\nvoid main() {\nmat3 I;\nfloat cnv[2];\nvec3 sample;\nG[0] \x3d g0;\nG[1] \x3d g1;\nfor (float i \x3d 0.0; i \x3c 3.0; i++) {\nfor (float j \x3d 0.0; j \x3c 3.0; j++) {\nsample \x3d texture2D( u_colorTexture, v_uv + texel * vec2(i-1.0,j-1.0) ).rgb;\nI[int(i)][int(j)] \x3d length(sample);\n}\n}\nfor (int i \x3d 0; i \x3c 2; i++) {\nfloat dp3 \x3d dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);\ncnv[i] \x3d dp3 * dp3;\n}\ngl_FragColor \x3d vec4(vec3(0.5 * sqrt(cnv[0] * cnv[0] + cnv[1] * cnv[1])), texture2D(u_colorTexture, v_uv).a);\n}"}},
"edge-enhance":{"edge-enhance.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nvarying vec2 v_uv;\nuniform vec2 u_texSize;\nvec2 texel \x3d vec2(1.0 / u_texSize.x, 1.0 / u_texSize.y);\nmat3 G[2];\nconst mat3 g0 \x3d mat3( 1.0, 0.0, -1.0, 1.0, 0.0, -1.0, 1.0, 0.0, -1.0 );\nconst mat3 g1 \x3d mat3( 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, -1.0, -1.0, -1.0 );\nvoid main() {\nmat3 I;\nfloat cnv[2];\nvec3 sample;\nG[0] \x3d g0;\nG[1] \x3d g1;\nfor (float i \x3d 0.0; i \x3c 3.0; i++) {\nfor (float j \x3d 0.0; j \x3c 3.0; j++) {\nsample \x3d texture2D( u_colorTexture, v_uv + texel * vec2(i-1.0,j-1.0) ).rgb;\nI[int(i)][int(j)] \x3d length(sample);\n}\n}\nfor (int i \x3d 0; i \x3c 2; i++) {\nfloat dp3 \x3d dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);\ncnv[i] \x3d dp3 * dp3;\n}\nvec4 color \x3d texture2D(u_colorTexture, v_uv);\ngl_FragColor \x3d vec4(0.5 * sqrt(cnv[0] * cnv[0] + cnv[1] * cnv[1]) * color);\n}"},
filterEffect:{"filterEffect.frag":"precision mediump float;\nuniform sampler2D u_colorTexture;\nuniform mat4 u_coefficients;\nvarying vec2 v_uv;\nvoid main() {\nvec4 color \x3d texture2D(u_colorTexture, v_uv);\nvec4 rgbw \x3d u_coefficients * vec4(color.a \x3e 0.0 ? color.rgb / color.a : vec3(0.0), 1.0);\nfloat a \x3d color.a;\ngl_FragColor \x3d vec4(a * rgbw.rgb, a);\n}"},pp:{"pp.vert":"precision mediump float;\nattribute vec2 a_position;\nvarying vec2 v_uv;\nvoid main() {\ngl_Position \x3d vec4(a_position, 0.0, 1.0);\nv_uv \x3d (a_position + 1.0) / 2.0;\n}"}},
raster:{bitmap:{"bitmap.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\nuniform sampler2D u_texture;\nuniform highp vec2 u_coordScale;\nuniform lowp float u_opacity;\n#include \x3cfiltering/bicubic.glsl\x3e\nvoid main() {\n#ifdef BICUBIC\nvec4 color \x3d sampleBicubicBSpline(u_texture, v_texcoord, u_coordScale);\n#else\nvec4 color \x3d texture2D(u_texture, v_texcoord);\n#endif\ngl_FragColor \x3d vec4(color.rgb * u_opacity, color.a * u_opacity);\n}","bitmap.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\nv_texcoord \x3d a_pos;\ngl_Position \x3d vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"},
common:{"common.glsl":"uniform sampler2D u_image;\nuniform int u_bandCount;\nuniform bool u_flipY;\nuniform float u_opacity;\nuniform int u_resampling;\nuniform vec2 u_srcImageSize;\n#ifdef APPLY_PROJECTION\n#include \x3craster/common/projection.glsl\x3e\n#endif\n#ifdef BICUBIC\n#include \x3cfiltering/bicubic.glsl\x3e\n#endif\n#ifdef BILINEAR\n#include \x3cfiltering/bilinear.glsl\x3e\n#endif\nvec2 getPixelLocation(vec2 coords) {\nvec2 targetLocation \x3d u_flipY ? vec2(coords.s, 1.0 - coords.t) : coords;\n#ifdef APPLY_PROJECTION\ntargetLocation \x3d projectPixelLocation(targetLocation);\n#endif\nreturn targetLocation;\n}\nbool isOutside(vec2 coords){\nif (coords.t\x3e1.00001 ||coords.t\x3c-0.00001 || coords.s\x3e1.00001 ||coords.s\x3c-0.00001) {\nreturn true;\n} else {\nreturn false;\n}\n}\nvec4 getPixel(vec2 pixelLocation) {\n#ifdef BICUBIC\nvec4 color \x3d sampleBicubicBSpline(u_image, pixelLocation, u_srcImageSize);\n#elif defined(BILINEAR)\nvec4 color \x3d sampleBilinear(u_image, pixelLocation, u_srcImageSize);\n#else\nvec4 color \x3d texture2D(u_image, pixelLocation);\n#endif\nreturn color;\n}",
"common.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nuniform highp float u_scale;\nuniform highp vec2 u_offset;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\nv_texcoord \x3d a_pos * u_scale + u_offset;\ngl_Position \x3d vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}","contrastBrightness.glsl":"uniform float u_contrastOffset;\nuniform float u_brightnessOffset;\nvec4 adjustContrastBrightness(vec4 currentPixel, bool isFloat) {\nvec4 pixelValue \x3d isFloat ? currentPixel * 255.0 : currentPixel;\nfloat maxI \x3d 255.0;\nfloat mid \x3d 128.0;\nfloat c \x3d u_contrastOffset;\nfloat b \x3d u_brightnessOffset;\nvec4 v;\nif (c \x3e 0.0 \x26\x26 c \x3c 100.0) {\nv \x3d (200.0 * pixelValue - 100.0 * maxI + 2.0 * maxI * b) / (2.0 * (100.0 - c)) + mid;\n} else if (c \x3c\x3d 0.0 \x26\x26 c \x3e -100.0) {\nv \x3d (200.0 * pixelValue - 100.0 * maxI + 2.0 * maxI * b) * (100.0 + c) / 20000.0 + mid;\n} else if (c \x3d\x3d 100.0) {\nv \x3d (200.0 * pixelValue - 100.0 * maxI + (maxI + 1.0) * (100.0 - c) + 2.0 * maxI * b);\nv \x3d (sign(v) + 1.0) / 2.0;\n} else if (c \x3d\x3d -100.0) {\nv \x3d vec4(mid, mid, mid, currentPixel.a);\n}\nvec3 rgb \x3d clamp(v.rgb / 255.0, 0.0, 1.0);\nreturn vec4(rgb, currentPixel.a);\n}",
"getSurfaceValues.glsl":"#include \x3craster/common/mirror.glsl\x3e\nvoid getSurfaceValues(sampler2D imageTexture, vec2 texCoord, vec2 srcImageSize, inout float values[10]) {\nvec2 onePixel \x3d 1.0 / srcImageSize;\nvec4 va \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(-1.0, -1.0)));\nvec4 vb \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(0.0, -1.0)));\nvec4 vc \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(1.0, -1.0)));\nvec4 vd \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(-1.0, 0.0)));\nvec4 ve \x3d texture2D(imageTexture, mirror(texCoord));\nvec4 vf \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(1.0, 0.0)));\nvec4 vg \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(-1.0, 1.0)));\nvec4 vh \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(0.0, 1.0)));\nvec4 vi \x3d texture2D(imageTexture, mirror(texCoord + onePixel * vec2(1.0, 1.0)));\nfloat alpha \x3d va.a * vb.a * vc.a * vd.a * ve.a * vf.a * vg.a * vh.a * vi.a;\nvalues[0] \x3d va.r;\nvalues[1] \x3d vb.r;\nvalues[2] \x3d vc.r;\nvalues[3] \x3d vd.r;\nvalues[4] \x3d ve.r;\nvalues[5] \x3d vf.r;\nvalues[6] \x3d vg.r;\nvalues[7] \x3d vh.r;\nvalues[8] \x3d vi.r;\nvalues[9] \x3d alpha;\n}",
"inverse.glsl":"float invertValue(float value) {\nfloat s \x3d sign(value);\nreturn (s * s) / (value + abs(s) - 1.0);\n}","mirror.glsl":"vec2 mirror(vec2 pos) {\nvec2 pos1 \x3d abs(pos);\nreturn step(pos1, vec2(1.0, 1.0)) * pos1 + step(1.0, pos1) * (2.0 - pos1);\n}","projection.glsl":"uniform sampler2D u_transformGrid;\nuniform vec2 u_transformSpacing;\nuniform vec2 u_transformGridSize;\nuniform vec2 u_targetImageSize;\nvec2 projectPixelLocation(vec2 coords) {\n#ifdef LOOKUP_PROJECTION\nvec4 pv \x3d texture2D(u_transformGrid, coords);\nreturn vec2(pv.r, pv.g);\n#endif\nvec2 index_image \x3d floor(coords * u_targetImageSize);\nvec2 oneTransformPixel \x3d vec2(0.25 / u_transformGridSize.s, 1.0 / u_transformGridSize.t);\nvec2 index_transform \x3d floor(index_image / u_transformSpacing) / u_transformGridSize;\nvec2 pos \x3d fract((index_image + vec2(0.5, 0.5)) / u_transformSpacing);\nvec2 srcLocation;\nvec2 transform_location \x3d index_transform + oneTransformPixel * 0.5;\nif (pos.s \x3c\x3d pos.t) {\nvec4 ll_abc \x3d texture2D(u_transformGrid, vec2(transform_location.s, transform_location.t));\nvec4 ll_def \x3d texture2D(u_transformGrid, vec2(transform_location.s + oneTransformPixel.s, transform_location.t));\nsrcLocation.s \x3d dot(ll_abc.rgb, vec3(pos, 1.0));\nsrcLocation.t \x3d dot(ll_def.rgb, vec3(pos, 1.0));\n} else {\nvec4 ur_abc \x3d texture2D(u_transformGrid, vec2(transform_location.s + 2.0 * oneTransformPixel.s, transform_location.t));\nvec4 ur_def \x3d texture2D(u_transformGrid, vec2(transform_location.s + 3.0 * oneTransformPixel.s, transform_location.t));\nsrcLocation.s \x3d dot(ur_abc.rgb, vec3(pos, 1.0));\nsrcLocation.t \x3d dot(ur_def.rgb, vec3(pos, 1.0));\n}\nreturn srcLocation;\n}"},
flow:{"getFadeOpacity.glsl":"uniform float u_decayRate;\nuniform float u_fadeToZero;\nfloat getFadeOpacity(float x) {\nfloat cutOff \x3d mix(0.0, exp(-u_decayRate), u_fadeToZero);\nreturn (exp(-u_decayRate * x) - cutOff) / (1.0 - cutOff);\n}","getFragmentColor.glsl":"vec4 getFragmentColor(vec4 color, float dist, float size, float featheringSize) {\nfloat featheringStart \x3d clamp(0.5 - featheringSize / size, 0.0, 0.5);\nif (dist \x3e featheringStart) {\ncolor *\x3d 1.0 - (dist - featheringStart) / (0.5 - featheringStart);\n}\nreturn color;\n}",
imagery:{"imagery.frag":"precision highp float;\nvarying vec2 v_texcoord;\nuniform sampler2D u_texture;\nuniform float u_Min;\nuniform float u_Max;\nuniform float u_featheringSize;\n#include \x3craster/flow/vv.glsl\x3e\nfloat getIntensity(float v) {\nreturn u_Min + v * (u_Max - u_Min);\n}\nvoid main(void) {\nvec4 sampled \x3d texture2D(u_texture, v_texcoord);\nfloat intensity \x3d getIntensity(sampled.r);\ngl_FragColor \x3d getColor(intensity);\ngl_FragColor.a *\x3d getOpacity(sampled.r);\ngl_FragColor.a *\x3d sampled.a;\ngl_FragColor.rgb *\x3d gl_FragColor.a;\n}",
"imagery.vert":"attribute vec2 a_position;\nattribute vec2 a_texcoord;\nuniform mat3 u_dvsMat3;\nvarying vec2 v_texcoord;\nvoid main(void) {\nvec2 xy \x3d (u_dvsMat3 * vec3(a_position, 1.0)).xy;\ngl_Position \x3d vec4(xy, 0.0, 1.0);\nv_texcoord \x3d a_texcoord;\n}"},particles:{"particles.frag":"precision highp float;\nvarying vec4 v_color;\nvarying vec2 v_texcoord;\nvarying float v_size;\nuniform float u_featheringSize;\n#include \x3craster/flow/getFragmentColor.glsl\x3e\nvoid main(void) {\ngl_FragColor \x3d getFragmentColor(v_color, length(v_texcoord - 0.5), v_size, u_featheringSize);\n}",
"particles.vert":"attribute vec4 a_xyts0;\nattribute vec4 a_xyts1;\nattribute vec4 a_typeIdDurationSeed;\nattribute vec4 a_extrudeInfo;\nuniform mat3 u_dvsMat3;\nuniform mat3 u_displayViewMat3;\nuniform float u_time;\nuniform float u_trailLength;\nuniform float u_flowSpeed;\nvarying vec4 v_color;\nvarying vec2 v_texcoord;\nvarying float v_size;\nuniform float u_featheringSize;\nuniform float u_introFade;\n#include \x3craster/flow/vv.glsl\x3e\n#include \x3craster/flow/getFadeOpacity.glsl\x3e\nvoid main(void) {\nvec2 position0 \x3d a_xyts0.xy;\nfloat t0 \x3d a_xyts0.z;\nfloat speed0 \x3d a_xyts0.w;\nvec2 position1 \x3d a_xyts1.xy;\nfloat t1 \x3d a_xyts1.z;\nfloat speed1 \x3d a_xyts1.w;\nfloat type \x3d a_typeIdDurationSeed.x;\nfloat id \x3d a_typeIdDurationSeed.y;\nfloat duration \x3d a_typeIdDurationSeed.z;\nfloat seed \x3d a_typeIdDurationSeed.w;\nvec2 e0 \x3d a_extrudeInfo.xy;\nvec2 e1 \x3d a_extrudeInfo.zw;\nfloat animationPeriod \x3d duration + u_trailLength;\nfloat scaledTime \x3d u_time * u_flowSpeed;\nfloat randomizedTime \x3d scaledTime + seed * animationPeriod;\nfloat t \x3d mod(randomizedTime, animationPeriod);\nfloat fUnclamped \x3d (t - t0) / (t1 - t0);\nfloat f \x3d clamp(fUnclamped, 0.0, 1.0);\nfloat clampedTime \x3d mix(t0, t1, f);\nfloat speed \x3d mix(speed0, speed1, f);\nvec2 extrude;\nvec2 position;\nfloat fadeOpacity;\nfloat introOpacity;\nif (type \x3d\x3d 2.0) {\nif (fUnclamped \x3c 0.0 || (fUnclamped \x3e 1.0 \x26\x26 t1 !\x3d duration)) {\ngl_Position \x3d vec4(0.0, 0.0, -2.0, 1.0);\nreturn;\n}\nvec2 ortho \x3d mix(e0, e1, f);\nvec2 parallel;\nparallel \x3d normalize(position1 - position0) * 0.5;\nif (id \x3d\x3d 1.0) {\nextrude \x3d ortho;\nv_texcoord \x3d vec2(0.5, 0.0);\n} else if (id \x3d\x3d 2.0) {\nextrude \x3d -ortho;\nv_texcoord \x3d vec2(0.5, 1.0);\n} else if (id \x3d\x3d 3.0) {\nextrude \x3d ortho + parallel;\nv_texcoord \x3d vec2(1.0, 0.0);\n} else if (id \x3d\x3d 4.0) {\nextrude \x3d -ortho + parallel;\nv_texcoord \x3d vec2(1.0, 1.0);\n}\nfadeOpacity \x3d getFadeOpacity((t - clampedTime) / u_trailLength);\nintroOpacity \x3d 1.0 - exp(-clampedTime);\nv_size \x3d getSize(speed);\nv_color \x3d getColor(speed);\nv_color.a *\x3d getOpacity(speed);\nposition \x3d mix(position0, position1, f);\n} else {\nif (fUnclamped \x3c 0.0) {\ngl_Position \x3d vec4(0.0, 0.0, -2.0, 1.0);\nreturn;\n}\nif (id \x3d\x3d 1.0) {\nextrude \x3d e0;\nv_texcoord \x3d vec2(0.5, 0.0);\nfadeOpacity \x3d getFadeOpacity((t - t0) / u_trailLength);\nintroOpacity \x3d 1.0 - exp(-t0);\nv_size \x3d getSize(speed0);\nv_color \x3d getColor(speed0);\nv_color.a *\x3d getOpacity(speed0);\nposition \x3d position0;\n} else if (id \x3d\x3d 2.0) {\nextrude \x3d -e0;\nv_texcoord \x3d vec2(0.5, 1.0);\nfadeOpacity \x3d getFadeOpacity((t - t0) / u_trailLength);\nintroOpacity \x3d 1.0 - exp(-t0);\nv_size \x3d getSize(speed0);\nv_color \x3d getColor(speed0);\nv_color.a *\x3d getOpacity(speed0);\nposition \x3d position0;\n} else if (id \x3d\x3d 3.0) {\nextrude \x3d mix(e0, e1, f);\nv_texcoord \x3d vec2(0.5, 0.0);\nfadeOpacity \x3d getFadeOpacity((t - clampedTime) / u_trailLength);\nintroOpacity \x3d 1.0 - exp(-clampedTime);\nv_size \x3d getSize(speed);\nv_color \x3d getColor(speed);\nv_color.a *\x3d getOpacity(speed);\nposition \x3d mix(position0, position1, f);\n} else if (id \x3d\x3d 4.0) {\nextrude \x3d -mix(e0, e1, f);\nv_texcoord \x3d vec2(0.5, 1.0);\nfadeOpacity \x3d getFadeOpacity((t - clampedTime) / u_trailLength);\nintroOpacity \x3d 1.0 - exp(-clampedTime);\nv_size \x3d getSize(speed);\nv_color \x3d getColor(speed);\nv_color.a *\x3d getOpacity(speed);\nposition \x3d mix(position0, position1, f);\n}\n}\nvec2 xy \x3d (u_dvsMat3 * vec3(position, 1.0) + u_displayViewMat3 * vec3(extrude * v_size, 0.0)).xy;\ngl_Position \x3d vec4(xy, 0.0, 1.0);\nv_color.a *\x3d fadeOpacity;\nv_color.a *\x3d mix(1.0, introOpacity, u_introFade);\nv_color.rgb *\x3d v_color.a;\n}"},
streamlines:{"streamlines.frag":"precision highp float;\nvarying float v_side;\nvarying float v_time;\nvarying float v_totalTime;\nvarying float v_timeSeed;\nvarying vec4 v_color;\nvarying float v_size;\nuniform float u_time;\nuniform float u_trailLength;\nuniform float u_flowSpeed;\nuniform float u_featheringSize;\nuniform float u_introFade;\n#include \x3craster/flow/getFragmentColor.glsl\x3e\n#include \x3craster/flow/getFadeOpacity.glsl\x3e\nvoid main(void) {\nfloat t \x3d mod(v_timeSeed * (v_totalTime + u_trailLength) + u_time * u_flowSpeed, v_totalTime + u_trailLength) - v_time;\nvec4 color \x3d v_color * step(0.0, t) * getFadeOpacity(t / u_trailLength);\ncolor *\x3d mix(1.0, 1.0 - exp(-v_time), u_introFade);\ngl_FragColor \x3d getFragmentColor(color, length((v_side + 1.0) / 2.0 - 0.5), v_size, u_featheringSize);\n}",
"streamlines.vert":"attribute vec3 a_positionAndSide;\nattribute vec3 a_timeInfo;\nattribute vec2 a_extrude;\nattribute float a_speed;\nuniform mat3 u_dvsMat3;\nuniform mat3 u_displayViewMat3;\nvarying float v_time;\nvarying float v_totalTime;\nvarying float v_timeSeed;\nvarying vec4 v_color;\nvarying float v_side;\nvarying float v_size;\nuniform float u_featheringSize;\n#include \x3craster/flow/vv.glsl\x3e\nvoid main(void) {\nvec4 lineColor \x3d getColor(a_speed);\nfloat lineOpacity \x3d getOpacity(a_speed);\nfloat lineSize \x3d getSize(a_speed);\nvec2 position \x3d a_positionAndSide.xy;\nv_side \x3d a_positionAndSide.z;\nvec2 xy \x3d (u_dvsMat3 * vec3(position, 1.0) + u_displayViewMat3 * vec3(a_extrude * lineSize, 0.0)).xy;\ngl_Position \x3d vec4(xy, 0.0, 1.0);\nv_time \x3d a_timeInfo.x;\nv_totalTime \x3d a_timeInfo.y;\nv_timeSeed \x3d a_timeInfo.z;\nv_color \x3d lineColor;\nv_color.a *\x3d lineOpacity;\nv_color.rgb *\x3d v_color.a;\nv_size \x3d lineSize;\n}"},
"vv.glsl":"#define MAX_STOPS 8\n#ifdef VV_COLOR\nuniform float u_color_stops[MAX_STOPS];\nuniform vec4 u_color_values[MAX_STOPS];\nuniform int u_color_count;\n#else\nuniform vec4 u_color;\n#endif\n#ifdef VV_OPACITY\nuniform float u_opacity_stops[MAX_STOPS];\nuniform float u_opacity_values[MAX_STOPS];\nuniform int u_opacity_count;\n#else\nuniform float u_opacity;\n#endif\n#ifdef VV_SIZE\nuniform float u_size_stops[MAX_STOPS];\nuniform float u_size_values[MAX_STOPS];\nuniform int u_size_count;\n#else\nuniform float u_size;\n#endif\nuniform float u_featheringOffset;\nvec4 getColor(float x) {\n#ifdef VV_COLOR\nvec4 color \x3d u_color_values[0];\n{\nfor (int i \x3d 1; i \x3c MAX_STOPS; i++) {\nif (i \x3e\x3d u_color_count) {\nbreak;\n}\nfloat x1 \x3d u_color_stops[i - 1];\nif (x \x3c x1) {\nbreak;\n}\nfloat x2 \x3d u_color_stops[i];\nvec4 y2 \x3d u_color_values[i];\nif (x \x3c x2) {\nvec4 y1 \x3d u_color_values[i - 1];\ncolor \x3d y1 + (y2 - y1) * (x - x1) / (x2 - x1);\n} else {\ncolor \x3d y2;\n}\n}\n}\n#else\nvec4 color \x3d u_color;\n#endif\nreturn color;\n}\nfloat getOpacity(float x) {\n#ifdef VV_OPACITY\nfloat opacity \x3d u_opacity_values[0];\n{\nfor (int i \x3d 1; i \x3c MAX_STOPS; i++) {\nif (i \x3e\x3d u_opacity_count) {\nbreak;\n}\nfloat x1 \x3d u_opacity_stops[i - 1];\nif (x \x3c x1) {\nbreak;\n}\nfloat x2 \x3d u_opacity_stops[i];\nfloat y2 \x3d u_opacity_values[i];\nif (x \x3c x2) {\nfloat y1 \x3d u_opacity_values[i - 1];\nopacity \x3d y1 + (y2 - y1) * (x - x1) / (x2 - x1);\n} else {\nopacity \x3d y2;\n}\n}\n}\n#else\nfloat opacity \x3d u_opacity;\n#endif\nreturn opacity;\n}\nfloat getSize(float x) {\n#ifdef VV_SIZE\nfloat size \x3d u_size_values[0];\n{\nfor (int i \x3d 1; i \x3c MAX_STOPS; i++) {\nif (i \x3e\x3d u_size_count) {\nbreak;\n}\nfloat x1 \x3d u_size_stops[i - 1];\nif (x \x3c x1) {\nbreak;\n}\nfloat x2 \x3d u_size_stops[i];\nfloat y2 \x3d u_size_values[i];\nif (x \x3c x2) {\nfloat y1 \x3d u_size_values[i - 1];\nsize \x3d y1 + (y2 - y1) * (x - x1) / (x2 - x1);\n} else {\nsize \x3d y2;\n}\n}\n}\n#else\nfloat size \x3d u_size;\n#endif\nreturn size + 2.0 * u_featheringSize * u_featheringOffset;\n}"},
hillshade:{"hillshade.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include \x3craster/common/common.glsl\x3e\nuniform int u_hillshadeType;\nuniform float u_sinZcosAs[6];\nuniform float u_sinZsinAs[6];\nuniform float u_cosZs[6];\nuniform float u_weights[6];\nuniform vec2 u_factor;\nuniform float u_minValue;\nuniform float u_maxValue;\n#include \x3craster/lut/colorize.glsl\x3e\n#include \x3craster/common/getSurfaceValues.glsl\x3e\nvec3 rgb2hsv(vec3 c) {\nvec4 K \x3d vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p \x3d c.g \x3c c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\nvec4 q \x3d c.r \x3c p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\nfloat d \x3d q.x - min(q.w, q.y);\nfloat e \x3d 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(vec3 c) {\nvec4 K \x3d vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 p \x3d abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\nreturn c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nvec4 overlay(float val, float minValue, float maxValue, float hillshade) {\nval \x3d clamp((val - minValue) / (maxValue - minValue), 0.0, 1.0);\nvec4 rgb \x3d colorize(vec4(val, val, val, 1.0), 255.0);\nvec3 hsv \x3d rgb2hsv(rgb.xyz);\nhsv.z \x3d hillshade;\nreturn vec4(hsv2rgb(hsv), 1.0) * rgb.a;\n}\nvoid main() {\nvec2 pixelLocation \x3d getPixelLocation(v_texcoord);\nif (isOutside(pixelLocation)) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\nvec4 currentPixel \x3d getPixel(pixelLocation);\nif (currentPixel.a \x3d\x3d 0.0) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\nfloat pv[10];\ngetSurfaceValues(u_image, pixelLocation, u_srcImageSize, pv);\nfloat alpha \x3d pv[9];\nfloat dzx \x3d (pv[2] + 2.0 * pv[5] + pv[8] - pv[0] - 2.0 * pv[3] - pv[6]) * u_factor.s;\nfloat dzy \x3d (pv[6] + 2.0 * pv[7] + pv[8] - pv[0] - 2.0 * pv[1] - pv[2]) * u_factor.t;\nfloat dzd \x3d sqrt(1.0 + dzx * dzx + dzy * dzy);\nfloat hillshade \x3d 0.0;\nif (u_hillshadeType \x3d\x3d 0){\nfloat cosDelta \x3d u_sinZsinAs[0] * dzy - u_sinZcosAs[0] * dzx;\nfloat z \x3d (u_cosZs[0] + cosDelta) / dzd;\nif (z \x3c 0.0) z \x3d 0.0;\nhillshade \x3d z;\n} else {\nfor (int k \x3d 0; k \x3c 6; k++) {\nfloat cosDelta \x3d u_sinZsinAs[k] * dzy - u_sinZcosAs[k] * dzx;\nfloat z \x3d (u_cosZs[k] + cosDelta) / dzd;\nif (z \x3c 0.0) z \x3d 0.0;\nhillshade \x3d hillshade + z * u_weights[k];\nif (k \x3d\x3d 5) break;\n}\n}\n#ifdef APPLY_COLORMAP\ngl_FragColor \x3d overlay(pv[4], u_minValue, u_maxValue, hillshade) * alpha * u_opacity;\n#else\ngl_FragColor \x3d vec4(hillshade, hillshade, hillshade, 1.0) * alpha * u_opacity;\n#endif\n}"},
lut:{"colorize.glsl":"uniform sampler2D u_colormap;\nuniform float u_colormapOffset;\nuniform float u_colormapMaxIndex;\nvec4 colorize(vec4 currentPixel, float scaleFactor) {\nfloat clrIndex \x3d clamp(currentPixel.r * scaleFactor - u_colormapOffset, 0.0, u_colormapMaxIndex);\nvec2 clrPosition \x3d vec2((clrIndex + 0.5) / (u_colormapMaxIndex + 1.0), 0.0);\nvec4 color \x3d texture2D(u_colormap, clrPosition);\nvec4 result \x3d vec4(color.rgb, color.a * currentPixel.a);\nreturn result;\n}","lut.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include \x3craster/common/common.glsl\x3e\n#include \x3craster/lut/colorize.glsl\x3e\nvoid main() {\nvec2 pixelLocation \x3d getPixelLocation(v_texcoord);\nif (isOutside(pixelLocation)) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\nvec4 currentPixel \x3d getPixel(pixelLocation);\nvec4 result \x3d colorize(currentPixel, 1.0);\ngl_FragColor \x3d vec4(result.xyz, 1.0) * result.a * u_opacity;\n}"},
magdir:{"magdir.frag":"precision mediump float;\nvarying vec4 v_color;\nuniform lowp float u_opacity;\nvoid main() {\ngl_FragColor \x3d v_color * u_opacity;\n}","magdir.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_vv;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nuniform vec2 u_symbolSize;\nuniform vec2 u_symbolPercentRange;\nuniform vec2 u_dataRange;\nuniform float u_rotation;\nuniform vec4 u_colors[12];\nvarying vec4 v_color;\nvoid main()\n{\nfloat angle \x3d a_offset.y + u_rotation;\n#ifndef ROTATION_GEOGRAPHIC\nangle \x3d 3.14159265359 * 2.0 - angle - 3.14159265359 / 2.0;\n#endif\nvec2 offset \x3d vec2(cos(angle), sin(angle)) * a_offset.x;\n#ifdef DATA_RANGE\nfloat valuePercentage \x3d clamp((a_vv.y - u_dataRange.x) / (u_dataRange.y - u_dataRange.x), 0.0, 1.0);\nfloat sizeRatio \x3d u_symbolPercentRange.x + valuePercentage * (u_symbolPercentRange.y - u_symbolPercentRange.x);\nfloat sizePercentage \x3d clamp(sizeRatio, u_symbolPercentRange.x, u_symbolPercentRange.y);\n#else\nfloat sizePercentage \x3d (u_symbolPercentRange.x + u_symbolPercentRange.y) / 2.0;\n#endif\nvec2 pos \x3d a_pos + offset * sizePercentage * u_symbolSize;\nv_color \x3d u_colors[int(a_vv.x)];\ngl_Position \x3d vec4(u_dvsMat3 * vec3(pos * u_coordScale, 1.0), 1.0);\n}"},
reproject:{"reproject.frag":"precision mediump float;\nvarying vec2 v_texcoord;\n#include \x3craster/common/common.glsl\x3e\nvoid main() {\nvec2 pixelLocation \x3d getPixelLocation(v_texcoord);\nif (isOutside(pixelLocation)) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 1.0);\nreturn;\n}\nvec4 currentPixel \x3d getPixel(pixelLocation);\ngl_FragColor \x3d vec4(currentPixel.rgb, 1.0) * currentPixel.a * u_opacity;\n}","reproject.vert":"precision mediump float;\nattribute vec2 a_position;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\nv_texcoord \x3d a_position;\ngl_Position \x3d vec4(2.0 * (a_position - 0.5), 0.0, 1.0);\n}"},
rfx:{aspect:{"aspect.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform vec2 u_cellSize;\nuniform vec2 u_srcImageSize;\n#include \x3craster/common/getSurfaceValues.glsl\x3e\nconst float pi \x3d 3.14159265359;\nvoid main() {\nfloat pv[10];\ngetSurfaceValues(u_image, v_texcoord, u_srcImageSize, pv);\nfloat alpha \x3d pv[9];\nfloat dzx \x3d (pv[2] + 2.0 * pv[5] + pv[8] - pv[0] - 2.0 * pv[3] - pv[6]) / (8.0 * u_cellSize[0]);\nfloat dzy \x3d -(pv[6] + 2.0 * pv[7] + pv[8] - pv[0] - 2.0 * pv[1] - pv[2]) / (8.0 * u_cellSize[1]);\nalpha *\x3d sign(abs(dzx) + abs(dzy));\nfloat aspect_rad \x3d (dzx \x3d\x3d 0.0) ? (step(0.0, dzy) * 0.5 * pi + step(dzy, 0.0) * 1.5 * pi) : mod((2.5 * pi + atan(dzy, -dzx)), 2.0 * pi);\nfloat aspect \x3d aspect_rad * 180.0 / pi;\ngl_FragColor \x3d vec4(aspect, aspect, aspect, 1.0) * alpha;\n}"},
bandarithmetic:{"bandarithmetic.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform mediump mat3 u_bandIndexMat3;\nuniform float u_adjustments[3];\n#include \x3craster/common/inverse.glsl\x3e\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nvec3 pv2 \x3d u_bandIndexMat3 * pv.rgb;\nfloat nir \x3d pv2.r;\nfloat red \x3d pv2.g;\nfloat index;\n#ifdef NDXI\nindex \x3d (nir - red) * invertValue(nir + red);\n#elif defined(SR)\nindex \x3d nir * invertValue(red);\n#elif defined(CI)\nindex \x3d nir * invertValue(red) - 1.0;\n#elif defined(SAVI)\nindex \x3d (nir - red) * invertValue(nir + red + u_adjustments[0]) * (1.0 + u_adjustments[0]);\n#elif defined(TSAVI)\nfloat s \x3d u_adjustments[0];\nfloat a \x3d u_adjustments[1];\nfloat x \x3d u_adjustments[2];\nfloat y \x3d -a * s + x * (1.0 + s * s);\nindex \x3d (s * (nir - s * red - a)) * invertValue(a * nir + red + y);\n#elif defined(MSAVI)\nfloat nir2 \x3d 2.0 * nir + 1.0;\nindex \x3d 0.5 * (nir2 - sqrt(nir2 * nir2 - 8.0 * (nir - red)));\n#elif defined(GEMI)\nfloat eta \x3d (2.0 * (nir * nir - red * red) + 1.5 * nir + 0.5 * red) * invertValue(nir + red + 0.5);\nindex \x3d eta * (1.0 - 0.25 * eta) - (red - 0.125) * invertValue(1.0 - red);\n#elif defined(PVI)\nfloat a \x3d u_adjustments[0];\nfloat b \x3d u_adjustments[1];\nfloat y \x3d sqrt(1.0 + a * a);\nindex \x3d (nir - a * red - b) * invertValue(y);\n#elif defined(VARI)\nindex \x3d (pv2.g - pv2.r) * invertValue(pv2.g + pv2.r - pv2.b);\n#elif defined(MTVI)\nfloat green \x3d pv2.b;\nfloat v \x3d sqrt(pow((2.0 * nir + 1.0), 2.0) - (6.0 * nir - 5.0 * sqrt(red)) - 0.5);\nindex \x3d 1.5 * (1.2 * (nir - green) - 2.5 * (red - green)) * invertValue(v);\n#elif defined(RTVICORE)\nfloat green \x3d pv2.b;\nindex \x3d 100.0 * (nir - red) - 10.0 * (nir - green);\n#elif defined(EVI)\nfloat blue \x3d pv2.b;\nfloat denom \x3d nir + 6.0 * red - 7.5 * blue + 1.0;\nindex \x3d (2.5 * (nir - red)) * invertValue(denom);\n#elif defined(WNDWI)\nfloat g \x3d pv2.r;\nfloat n \x3d pv2.g;\nfloat s \x3d pv2.s;\nfloat a \x3d u_adjustments[0];\nfloat denom \x3d g + a * n + (1.0 - a) * s;\nindex \x3d (g - a * n - (1 - a) * s) * invertValue(denom);\n#elif defined(BAI)\nindex \x3d invertValue(pow((0.1 - red), 2.0) + pow((0.06 - nir), 2.0));\n#else\ngl_FragColor \x3d pv;\nreturn;\n#endif\ngl_FragColor \x3d vec4(index, index, index, pv.a);\n}"},
compositeband:{"compositeband.frag":"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\nuniform sampler2D u_image2;\n#ifdef ONE_CONSTANT\nuniform float u_image1Const;\n#ifdef TWO_CONSTANT\nuniform float u_image2Const;\n#endif\nuniform mat3 u_imageSwap;\n#endif\nvarying vec2 v_texcoord;\nvoid main() {\nvec4 pv0 \x3d texture2D(u_image, v_texcoord);\nfloat a \x3d pv0.r;\nfloat alpha \x3d pv0.a;\n#ifdef TWO_CONSTANT\nfloat b \x3d u_image1Const;\nfloat c \x3d u_image2Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, c);\na \x3d abc.s;\nb \x3d abc.t;\nc \x3d abc.p;\n#elif defined(ONE_CONSTANT)\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nfloat b \x3d pv1.r;\nfloat c \x3d u_image1Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, c);\na \x3d abc.s;\nb \x3d abc.t;\nc \x3d abc.p;\nalpha *\x3d pv1.a;\n#else\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nvec4 pv2 \x3d texture2D(u_image2, v_texcoord);\nfloat b \x3d pv1.r;\nfloat c \x3d pv2.r;\nalpha \x3d alpha * pv1.a * pv2.a;\n#endif\ngl_FragColor \x3d vec4(a, b, c, alpha);\n}"},
computechange:{"computechange.frag":"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\n#ifdef ONE_CONSTANT\nuniform float u_image1Const;\nuniform mat3 u_imageSwap;\n#endif\nvarying vec2 v_texcoord;\nuniform vec2 u_domainRange;\n#include \x3craster/common/inverse.glsl\x3e\nvoid main() {\nvec4 pv0 \x3d texture2D(u_image, v_texcoord);\nfloat a \x3d pv0.r;\n#ifdef ONE_CONSTANT\nfloat b \x3d u_image1Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, 0);\na \x3d abc.s;\nb \x3d abc.t;\n#else\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nfloat b \x3d pv1.r;\n#endif\nfloat result \x3d a;\nfloat alpha \x3d pv0.a;\n#ifdef DIFFERENCE\nresult \x3d a - b;\n#elif defined(RELATIVE)\nresult \x3d (a - b) * invertValue(max(abs(a), abs(b)));\n#endif\nbool isInvalid \x3d result \x3c u_domainRange.s || result \x3e u_domainRange.t;\nresult \x3d isInvalid ? 0.0 : result;\nalpha *\x3d float(!isInvalid);\n#ifdef ROUND_OUTPUT\nresult \x3d floor(result + 0.5);\n#endif\ngl_FragColor \x3d vec4(result, result, result, alpha);\n}"},
contrast:{"contrast.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\n#include \x3craster/common/contrastBrightness.glsl\x3e\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nvec4 result \x3d adjustContrastBrightness(pv, false) ;\ngl_FragColor \x3d vec4(result.rgb * 255.0, result.a);\n}"},convolution:{"convolution.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform vec2 u_srcImageSize;\n#define KERNEL_SIZE_ROWS ROWS\n#define KERNEL_SIZE_COLS COLS\nuniform vec2 u_clampRange;\nuniform float u_kernel[25];\n#include \x3craster/common/mirror.glsl\x3e\nvoid main() {\nvec3 rgb \x3d vec3(0.0, 0.0, 0.0);\nvec2 resolution \x3d 1.0 / u_srcImageSize;\nfloat rowOffset \x3d -float(floor(float(KERNEL_SIZE_ROWS) / 2.0));\nfloat colOffset \x3d -float(floor(float(KERNEL_SIZE_COLS) / 2.0));\nfloat alpha \x3d 1.0;\nfor (int row \x3d 0; row \x3c KERNEL_SIZE_ROWS; row++) {\nfloat pos_row \x3d rowOffset + float(row);\nfor (int col \x3d 0; col \x3c KERNEL_SIZE_COLS; col++) {\nvec2 pos \x3d v_texcoord + vec2(colOffset + float(col), pos_row) * resolution;\nvec4 pv \x3d texture2D(u_image, mirror(pos));\nrgb +\x3d pv.rgb * u_kernel[row * KERNEL_SIZE_COLS + col];\nalpha *\x3d pv.a;\n}\n}\nrgb \x3d clamp(rgb, u_clampRange.s, u_clampRange.t);\ngl_FragColor \x3d vec4(rgb * alpha, alpha);\n}"},
curvature:{"curvature.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform float u_zlFactor;\nuniform vec2 u_srcImageSize;\n#include \x3craster/common/getSurfaceValues.glsl\x3e\nvoid main() {\nfloat pv[10];\ngetSurfaceValues(u_image, v_texcoord, u_srcImageSize, pv);\nfloat alpha \x3d pv[9];\nfloat d \x3d ((pv[3] + pv[5]) * 0.5 - pv[4]);\nfloat e \x3d ((pv[1] + pv[7]) * 0.5 - pv[4]);\nfloat curvature \x3d 0.0;\n#ifdef STANDARD\ncurvature \x3d -u_zlFactor * (d + e);\ngl_FragColor \x3d vec4(curvature, curvature, curvature, alpha);\n#else\nfloat f \x3d (-pv[0] + pv[2] + pv[6] - pv[8]) / 4.0;\nfloat g \x3d (-pv[3] + pv[5]) / 2.0;\nfloat h \x3d (pv[1] - pv[7]) / 2.0;\nfloat g2 \x3d g * g;\nfloat h2 \x3d h * h;\n#ifdef PROFILE\ncurvature \x3d (u_zlFactor * (d * g2 + e * h2 + f * g * h)) / (g2 + h2);\n#else\ncurvature \x3d (-u_zlFactor * (d * h2 + e * g2 - f * g * h)) / (g2 + h2);\n#endif\n#endif\ngl_FragColor \x3d vec4(curvature, curvature, curvature, alpha);\n}"},
extractband:{"extractband.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform mediump mat3 u_bandIndexMat3;\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nvec3 pv2 \x3d u_bandIndexMat3 * pv.rgb;\ngl_FragColor \x3d vec4(pv2, pv.a);\n}"},focalstatistics:{"focalstatistics.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform vec2 u_srcImageSize;\n#define KERNEL_SIZE_ROWS ROWS\n#define KERNEL_SIZE_COLS COLS\nuniform vec2 u_clampRange;\n#include \x3craster/common/mirror.glsl\x3e\n#include \x3craster/common/inverse.glsl\x3e\nvoid main() {\nvec2 resolution \x3d 1.0 / u_srcImageSize;\nfloat rowOffset \x3d -float(floor(float(KERNEL_SIZE_ROWS) / 2.0));\nfloat colOffset \x3d -float(floor(float(KERNEL_SIZE_COLS) / 2.0));\nfloat count \x3d 0.0;\n#ifdef STDDEV\nvec3 sum \x3d vec3(0.0, 0.0, 0.0);\nvec3 sum2 \x3d vec3(0.0, 0.0, 0.0);\n#endif\nvec4 currentPixel \x3d texture2D(u_image, v_texcoord);\nvec3 rgb \x3d currentPixel.rgb;\nfor (int row \x3d 0; row \x3c KERNEL_SIZE_ROWS; row++) {\nfloat pos_row \x3d rowOffset + float(row);\nfor (int col \x3d 0; col \x3c KERNEL_SIZE_COLS; col++) {\nvec2 pos \x3d v_texcoord + vec2(colOffset + float(col), pos_row) * resolution;\nvec4 pv \x3d texture2D(u_image, mirror(pos));\ncount +\x3d pv.a;\n#ifdef MIN\nrgb \x3d min(rgb, pv.rgb);\n#elif defined(MAX)\nrgb \x3d max(rgb, pv.rgb);\n#elif defined(MEAN)\nrgb +\x3d pv.rgb;\n#elif defined(STDDEV)\nsum +\x3d pv.rgb;\nsum2 +\x3d (pv.rgb * pv.rgb);\n#endif\n}\n}\n#ifdef MEAN\nrgb *\x3d invertValue(count);\n#elif defined(STDDEV)\nrgb \x3d sqrt((sum2 - sum * sum * invertValue(count)) * invertValue(count));\n#endif\nfloat alpha \x3d step(0.9999, count);\nrgb \x3d clamp(rgb, u_clampRange.s, u_clampRange.t);\n#ifdef FILL\nrgb \x3d (1.0 - currentPixel.a) * rgb + currentPixel.a * currentPixel.rgb;\n#endif\ngl_FragColor \x3d vec4(rgb * alpha, alpha);\n}"},
grayscale:{"grayscale.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform vec3 u_weights;\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nfloat value \x3d dot(u_weights, pv.rgb);\ngl_FragColor \x3d vec4(value, value, value, pv.a);\n}"},local:{"local.frag":"precision mediump float;\nuniform sampler2D u_image;\nuniform sampler2D u_image1;\n#ifdef ONE_CONSTANT\nuniform float u_image1Const;\n#ifdef TWO_CONSTANT\nuniform float u_image2Const;\n#endif\nuniform mat3 u_imageSwap;\n#endif\nvarying vec2 v_texcoord;\nuniform vec2 u_domainRange;\n#include \x3craster/common/inverse.glsl\x3e\nvoid main() {\nvec4 pv0 \x3d texture2D(u_image, v_texcoord);\nfloat a \x3d pv0.r;\n#ifdef TWO_IMAGES\n#ifdef ONE_CONSTANT\nfloat b \x3d u_image1Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, 0);\na \x3d abc.s;\nb \x3d abc.t;\n#else\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nfloat b \x3d pv1.r;\n#endif\n#elif defined(CONDITIONAL)\n#ifdef TWO_CONSTANT\nfloat b \x3d u_image1Const;\nfloat c \x3d u_image2Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, c);\na \x3d abc.s;\nb \x3d abc.t;\nc \x3d abc.p;\n#elif defined(ONE_CONSTANT)\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nfloat b \x3d pv1.r;\nfloat c \x3d u_image1Const;\nvec3 abc \x3d u_imageSwap * vec3(a, b, c);\na \x3d abc.s;\nb \x3d abc.t;\nc \x3d abc.p;\n#else\nvec4 pv1 \x3d texture2D(u_image1, v_texcoord);\nvec4 pv2 \x3d texture2D(u_image2, v_texcoord);\nfloat b \x3d pv1.r;\nfloat c \x3d pv2.r;\n#endif\n#endif\nfloat result \x3d a;\nfloat alpha \x3d pv0.a;\n#ifdef PLUS\nresult \x3d a + b;\n#elif defined(MINUS)\nresult \x3d a - b;\n#elif defined(TIMES)\nresult \x3d a * b;\n#elif defined(DIVIDE)\nresult \x3d a * invertValue(b);\nalpha *\x3d float(abs(sign(b)));\n#elif defined(FLOATDIVIDE)\nresult \x3d a * invertValue(b);\nalpha *\x3d float(abs(sign(b)));\n#elif defined(FLOORDIVIDE)\nresult \x3d floor(a * invertValue(b));\nalpha *\x3d float(abs(sign(b)));\n#elif defined(SQUARE)\nresult \x3d a * a;\n#elif defined(SQRT)\nresult \x3d sqrt(a);\n#elif defined(POWER)\nresult \x3d pow(a, b);\n#elif defined(LN)\nresult \x3d a \x3c\x3d 0.0 ? 0.0: log(a);\nalpha *\x3d float(a \x3e 0.0);\n#elif defined(LOG_1_0)\nresult \x3d a \x3c\x3d 0.0 ? 0.0: log2(a) * invertValue(log2(10.0));\nalpha *\x3d float(a \x3e 0.0);\n#elif defined(LOG_2)\nresult \x3d a \x3c\x3d 0.0 ? 0.0: log2(a);\nalpha *\x3d float(a \x3e 0.0);\n#elif defined(EXP)\nresult \x3d exp(a);\n#elif defined(EXP_1_0)\nresult \x3d pow(10.0, a);\n#elif defined(EXP_2)\nresult \x3d pow(2.0, a);\n#elif defined(ROUNDDOWN)\nresult \x3d floor(a);\n#elif defined(ROUNDUP)\nresult \x3d ceil(a);\n#elif defined(INT)\nresult \x3d float(sign(a)) * floor(abs(a));\n#elif defined(MOD)\nresult \x3d mod(a, b);\n#elif defined(NEGATE)\nresult \x3d -a;\n#elif defined(ABS)\nresult \x3d abs(a);\n#elif defined(ACOS)\nresult \x3d abs(a) \x3e 1.0 ? 0.0: acos(a);\nalpha *\x3d step(abs(a), 1.00001);\n#elif defined(ACOSH)\nresult \x3d acosh(a);\n#elif defined(ASIN)\nresult \x3d abs(a) \x3e 1.0 ? 0.0: asin(a);\nalpha *\x3d step(abs(a), 1.00001);\n#elif defined(ASINH)\nresult \x3d asinh(a);\n#elif defined(ATAN)\nresult \x3d atan(a);\n#elif defined(ATANH)\nresult \x3d abs(a) \x3e 1.0 ? 0.0: atanh(a);\nalpha *\x3d step(abs(a), 1.0);\n#elif defined(ATAN_2)\nresult \x3d atan(a, b);\n#elif defined(COS)\nresult \x3d cos(a);\n#elif defined(COSH)\nresult \x3d cosh(a);\n#elif defined(SIN)\nresult \x3d sin(a);\n#elif defined(SINH)\nresult \x3d sinh(a);\n#elif defined(TAN)\nresult \x3d tan(a);\n#elif defined(TANH)\nresult \x3d tanh(a);\n#elif defined(BITWISEAND)\nresult \x3d a \x26 b;\n#elif defined(BITWISEOR)\nresult \x3d a | b;\n#elif defined(BITWISELEFTSHIFT)\nresult \x3d a \x3c\x3c b;\n#elif defined(BITWISERIGHTSHIFT)\nresult \x3d a \x3e\x3e b;\n#elif defined(BITWISENOT)\nresult \x3d ~a;\n#elif defined(BITWISEXOR)\nresult \x3d a ^ b;\n#elif defined(BOOLEANAND)\nresult \x3d float((a !\x3d 0.0) \x26\x26 (b !\x3d 0.0));\n#elif defined(BOOLEANNOT)\nresult \x3d float(a \x3d\x3d 0.0);\n#elif defined(BOOLEANOR)\nresult \x3d float((a !\x3d 0.0) || (b !\x3d 0.0));\n#elif defined(BOOLEANXOR)\nresult \x3d float((a !\x3d 0.0) ^^ (b !\x3d 0.0));\n#elif defined(GREATERTHAN)\nresult \x3d float(a \x3e b);\n#elif defined(GREATERTHANEQUAL)\nresult \x3d float(a \x3e\x3d b);\n#elif defined(LESSTHAN)\nresult \x3d float(a \x3c b);\n#elif defined(LESSTHANEQUAL)\nresult \x3d float(a \x3c\x3d b);\n#elif defined(EQUALTO)\nresult \x3d float(a \x3d\x3d b);\n#elif defined(NOTEQUAL)\nresult \x3d float(a !\x3d b);\n#elif defined(ISNULL)\nresult \x3d float(alpha \x3d\x3d 0.0);\nalpha \x3d 1.0;\n#elif defined(SETNULL)\nfloat maskValue \x3d float(a \x3d\x3d 0.0);\nresult \x3d maskValue * b;\nalpha *\x3d maskValue;\n#elif defined(CONDITIONAL)\nfloat weight \x3d float(abs(sign(a)));\nresult \x3d weight * b + (1.0 - weight) * c;\n#endif\nbool isInvalid \x3d result \x3c u_domainRange.s || result \x3e u_domainRange.t;\nresult \x3d isInvalid ? 0.0 : result;\nalpha *\x3d float(!isInvalid);\n#ifdef ROUND_OUTPUT\nresult \x3d floor(result + 0.5);\n#endif\ngl_FragColor \x3d vec4(result, result, result, alpha);\n}"},
mask:{"mask.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\n#define LEN_INCLUDED_RANGES 6\n#define LEN_NODATA_VALUES 6\nuniform highp float u_includedRanges[6];\nuniform highp float u_noDataValues[6];\nfloat maskFactor(float bandValue, float fromValue, float to) {\nfloat factor \x3d 1.0;\nfor (int i \x3d 0; i \x3c LEN_NODATA_VALUES; i++) {\nfactor *\x3d float(u_noDataValues[i] !\x3d bandValue);\n}\nfactor *\x3d step(fromValue, bandValue) * step(bandValue, to);\nreturn factor;\n}\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nfloat redFactor \x3d maskFactor(pv.r, u_includedRanges[0], u_includedRanges[1]);\n#ifdef MULTI_BAND\nfloat greenFactor \x3d maskFactor(pv.g, u_includedRanges[2], u_includedRanges[3]);\nfloat blueFactor \x3d maskFactor(pv.b, u_includedRanges[4], u_includedRanges[5]);\nfloat maskFactor \x3d redFactor * greenFactor * blueFactor;\ngl_FragColor \x3d pv * maskFactor;\n#else\ngl_FragColor \x3d pv * redFactor;\n#endif\n}"},
ndvi:{"ndvi.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform mediump mat3 u_bandIndexMat3;\n#include \x3craster/common/inverse.glsl\x3e\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nvec3 pv2 \x3d u_bandIndexMat3 * pv.rgb;\nfloat nir \x3d pv2.r;\nfloat red \x3d pv2.g;\nfloat index \x3d (nir - red) * invertValue(nir + red);\n#ifdef SCALED\nindex \x3d floor((index + 1.0) * 100.0 + 0.5);\n#endif\ngl_FragColor \x3d vec4(index, index, index, pv.a);\n}"},
remap:{"remap.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\n#define LEN_REMAP_RANGES 18\n#define LEN_NODATA_RANGES 12\nuniform highp float u_rangeMaps[18];\nuniform highp float u_noDataRanges[12];\nuniform highp float u_unmatchMask;\nuniform vec2 u_clampRange;\nvoid main() {\nvec4 pv \x3d texture2D(u_image, v_texcoord);\nfloat factor \x3d 1.0;\nfloat bandValue \x3d pv.r;\nfor (int i \x3d 0; i \x3c LEN_NODATA_RANGES; i+\x3d2) {\nfloat inside \x3d 1.0 - step(u_noDataRanges[i], bandValue) * step(bandValue, u_noDataRanges[i+1]);\nfactor *\x3d inside;\n}\nfloat mapValue \x3d 0.0;\nfloat includeMask \x3d 0.0;\nfor (int i \x3d 0; i \x3c LEN_REMAP_RANGES; i+\x3d3) {\nfloat stepMask \x3d step(u_rangeMaps[i], bandValue) * step(bandValue, u_rangeMaps[i+1]);\nincludeMask \x3d (1.0 - stepMask) * includeMask + stepMask;\nmapValue \x3d (1.0 - stepMask) * mapValue + stepMask * u_rangeMaps[i+2];\n}\nbandValue \x3d factor * (mapValue + (1.0 - includeMask) * u_unmatchMask * pv.r);\nfloat bandMask \x3d factor * max(u_unmatchMask, includeMask);\nbandValue \x3d clamp(bandValue, u_clampRange.s, u_clampRange.t);\ngl_FragColor \x3d vec4(bandValue, bandValue, bandValue, bandMask * pv.a);\n}"},
slope:{"slope.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying vec2 v_texcoord;\nuniform vec2 u_cellSize;\nuniform float u_zFactor;\nuniform vec2 u_srcImageSize;\nuniform float u_pixelSizePower;\nuniform float u_pixelSizeFactor;\n#include \x3craster/common/getSurfaceValues.glsl\x3e\nvoid main() {\nfloat pv[10];\ngetSurfaceValues(u_image, v_texcoord, u_srcImageSize, pv);\nfloat alpha \x3d pv[9];\nfloat xf \x3d (u_zFactor + pow(u_cellSize[0], u_pixelSizePower) * u_pixelSizeFactor) / (8.0 * u_cellSize[0]);\nfloat yf \x3d (u_zFactor + pow(u_cellSize[1], u_pixelSizePower) * u_pixelSizeFactor) / (8.0 * u_cellSize[1]);\nfloat dzx \x3d (pv[2] + 2.0 * pv[5] + pv[8] - pv[0] - 2.0 * pv[3] - pv[6]) * xf;\nfloat dzy \x3d -(pv[6] + 2.0 * pv[7] + pv[8] - pv[0] - 2.0 * pv[1] - pv[2]) * yf;\nfloat rise2run \x3d sqrt(dzx * dzx + dzy * dzy);\n#ifdef PERCENT_RISE\nfloat percentRise \x3d rise2run * 100.0;\ngl_FragColor \x3d vec4(percentRise, percentRise, percentRise, alpha);\n#else\nfloat degree \x3d atan(rise2run) * 57.2957795;\ngl_FragColor \x3d vec4(degree, degree, degree, alpha);\n#endif\n}"},
stretch:{"stretch.frag":"precision mediump float;\nuniform sampler2D u_image;\nvarying highp vec2 v_texcoord;\nuniform float u_minCutOff[3];\nuniform float u_maxCutOff[3];\nuniform float u_minOutput;\nuniform float u_maxOutput;\nuniform float u_factor[3];\nuniform float u_gamma[3];\nuniform float u_gammaCorrection[3];\nfloat stretchOneValue(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, float gamma, float gammaCorrection) {\nval \x3d clamp(val, minCutOff, maxCutOff);\nfloat stretchedVal;\n#ifdef USE_GAMMA\nfloat tempf \x3d 1.0;\nfloat outRange \x3d maxOutput - minOutput;\nfloat relativeVal \x3d (val - minCutOff) / (maxCutOff - minCutOff);\ntempf -\x3d step(1.0, gamma) * sign(gamma - 1.0) * pow(1.0 / outRange, relativeVal * gammaCorrection);\nstretchedVal \x3d tempf * outRange * pow(relativeVal, 1.0 / gamma) + minOutput;\nstretchedVal \x3d clamp(stretchedVal, minOutput, maxOutput);\n#else\nstretchedVal \x3d minOutput + (val - minCutOff) * factor;\n#endif\n#ifdef ROUND_OUTPUT\nstretchedVal \x3d floor(stretchedVal + 0.5);\n#endif\nreturn stretchedVal;\n}\nvoid main() {\nvec4 currentPixel \x3d texture2D(u_image, v_texcoord);\nfloat redVal \x3d stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_gamma[0], u_gammaCorrection[0]);\n#ifdef MULTI_BAND\nfloat greenVal \x3d stretchOneValue(currentPixel.g, u_minCutOff[1], u_maxCutOff[1], u_minOutput, u_maxOutput, u_factor[1], u_gamma[1], u_gammaCorrection[1]);\nfloat blueVal \x3d stretchOneValue(currentPixel.b, u_minCutOff[2], u_maxCutOff[2], u_minOutput, u_maxOutput, u_factor[2], u_gamma[2], u_gammaCorrection[2]);\ngl_FragColor \x3d vec4(redVal, greenVal, blueVal, currentPixel.a);\n#else\ngl_FragColor \x3d vec4(redVal, redVal, redVal, currentPixel.a);\n#endif\n}"},
vs:{"vs.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nvarying highp vec2 v_texcoord;\nvoid main()\n{\nv_texcoord \x3d a_pos;\ngl_Position \x3d vec4(u_dvsMat3 * vec3(a_pos * u_coordScale, 1.0), 1.0);\n}"}},scalar:{"scalar.frag":"precision mediump float;\nuniform lowp float u_opacity;\nvarying vec2 v_pos;\nconst vec4 outlineColor \x3d vec4(0.2, 0.2, 0.2, 1.0);\nconst float outlineSize \x3d 0.02;\nconst float innerRadius \x3d 0.25;\nconst float outerRadius \x3d 0.42;\nconst float innerSquareLength \x3d 0.15;\nvoid main() {\nmediump float dist \x3d length(v_pos);\nmediump float fillalpha1 \x3d smoothstep(outerRadius, outerRadius + outlineSize, dist);\nfillalpha1 *\x3d (1.0-smoothstep(outerRadius + outlineSize, outerRadius + 0.1 + outlineSize, dist));\n#ifdef INNER_CIRCLE\nmediump float fillalpha2 \x3d smoothstep(innerRadius, innerRadius + outlineSize, dist);\nfillalpha2 *\x3d (1.0-smoothstep(innerRadius + outlineSize, innerRadius + 0.1 + outlineSize, dist));\n#else\nmediump float fillalpha2 \x3d (abs(v_pos.x) \x3c innerSquareLength ? 1.0 : 0.0) * (abs(v_pos.y) \x3c innerSquareLength ? 1.0 : 0.0);\n#endif\ngl_FragColor \x3d (fillalpha2 + fillalpha1) * outlineColor * u_opacity;\n}",
"scalar.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_vv;\nuniform highp mat3 u_dvsMat3;\nuniform highp vec2 u_coordScale;\nuniform vec2 u_symbolSize;\nuniform vec2 u_symbolPercentRange;\nuniform vec2 u_dataRange;\nvarying vec2 v_pos;\nvoid main()\n{\n#ifdef DATA_RANGE\nfloat valuePercentage \x3d clamp((a_vv.y - u_dataRange.x) / (u_dataRange.y - u_dataRange.x), 0.0, 1.0);\nfloat sizeRatio \x3d u_symbolPercentRange.x + valuePercentage * (u_symbolPercentRange.y - u_symbolPercentRange.x);\nfloat sizePercentage \x3d clamp(sizeRatio, u_symbolPercentRange.x, u_symbolPercentRange.y);\n#else\nfloat sizePercentage \x3d (u_symbolPercentRange.x + u_symbolPercentRange.y) / 2.0;\n#endif\nvec2 size \x3d u_symbolSize * sizePercentage;\nvec2 pos \x3d a_pos + a_offset * size;\nv_pos \x3d a_offset;\ngl_Position \x3d vec4(u_dvsMat3 * vec3(pos * u_coordScale, 1.0), 1.0);\n}"},
stretch:{"stretch.frag":"precision mediump float;\nvarying highp vec2 v_texcoord;\n#include \x3craster/common/common.glsl\x3e\nuniform float u_minCutOff[3];\nuniform float u_maxCutOff[3];\nuniform float u_minOutput;\nuniform float u_maxOutput;\nuniform float u_factor[3];\nuniform bool u_useGamma;\nuniform float u_gamma[3];\nuniform float u_gammaCorrection[3];\n#include \x3craster/lut/colorize.glsl\x3e\nfloat stretchOneValue(float val, float minCutOff, float maxCutOff, float minOutput, float maxOutput, float factor, bool useGamma, float gamma, float gammaCorrection) {\nif (val \x3e\x3d maxCutOff) {\nreturn maxOutput;\n} else if (val \x3c\x3d minCutOff) {\nreturn minOutput;\n}\nfloat stretchedVal;\nif (useGamma) {\nfloat tempf \x3d 1.0;\nfloat outRange \x3d maxOutput - minOutput;\nfloat relativeVal \x3d (val - minCutOff) / (maxCutOff - minCutOff);\nif (gamma \x3e 1.0) {\ntempf -\x3d pow(1.0 / outRange, relativeVal * gammaCorrection);\n}\nstretchedVal \x3d (tempf * outRange * pow(relativeVal, 1.0 / gamma) + minOutput) / 255.0;\n} else {\nstretchedVal \x3d minOutput + (val - minCutOff) * factor;\n}\nreturn stretchedVal;\n}\nvoid main() {\nvec2 pixelLocation \x3d getPixelLocation(v_texcoord);\nif (isOutside(pixelLocation)) {\ngl_FragColor \x3d vec4(0.0, 0.0, 0.0, 0.0);\nreturn;\n}\nvec4 currentPixel \x3d getPixel(pixelLocation);\n#ifdef NOOP\ngl_FragColor \x3d vec4(currentPixel.rgb, 1.0) * currentPixel.a * u_opacity;\nreturn;\n#endif\nif (u_bandCount \x3d\x3d 1) {\nfloat grayVal \x3d stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);\n#ifdef APPLY_COLORMAP\nvec4 result \x3d colorize(vec4(grayVal, grayVal, grayVal, 1.0), u_useGamma ? 255.0 : 1.0);\ngl_FragColor \x3d vec4(result.xyz, 1.0) * result.a * currentPixel.a * u_opacity;\n#else\ngl_FragColor \x3d vec4(grayVal, grayVal, grayVal, 1.0) * currentPixel.a * u_opacity;\n#endif\n} else {\nfloat redVal \x3d stretchOneValue(currentPixel.r, u_minCutOff[0], u_maxCutOff[0], u_minOutput, u_maxOutput, u_factor[0], u_useGamma, u_gamma[0], u_gammaCorrection[0]);\nfloat greenVal \x3d stretchOneValue(currentPixel.g, u_minCutOff[1], u_maxCutOff[1], u_minOutput, u_maxOutput, u_factor[1], u_useGamma, u_gamma[1], u_gammaCorrection[1]);\nfloat blueVal \x3d stretchOneValue(currentPixel.b, u_minCutOff[2], u_maxCutOff[2], u_minOutput, u_maxOutput, u_factor[2], u_useGamma, u_gamma[2], u_gammaCorrection[2]);\ngl_FragColor \x3d vec4(redVal, greenVal, blueVal, 1.0) * currentPixel.a * u_opacity;\n}\n}"}},
stencil:{"stencil.frag":"void main() {\ngl_FragColor \x3d vec4(1.0, 1.0, 1.0, 1.0);\n}","stencil.vert":"attribute vec2 a_pos;\nuniform mat3 u_worldExtent;\nvoid main() {\ngl_Position \x3d vec4(u_worldExtent * vec3(a_pos, 1.0), 1.0);\n}"},test:{"TestShader.common.glsl":"#ifndef RETURN_RED\nvarying vec4 v_color;\n#endif\nvarying vec2 v_offset;","TestShader.frag":"precision highp float;\n#include \x3ctest/TestShader.common.glsl\x3e\nvoid main() {\nif (v_offset.x \x3e -.5 \x26\x26 v_offset.y \x3e -.5 \x26\x26 v_offset.x \x3c .5 \x26\x26 v_offset.y \x3c .5) {\ndiscard;\n}\n#ifdef RETURN_RED\ngl_FragColor \x3d vec4(1., 0., 0., 1.);\n#else\ngl_FragColor \x3d v_color;\n#endif\n}",
"TestShader.vert":"const float POS_PRECISION_FACTOR \x3d 10.;\nconst float OFFSET_PRECISION_FACTOR \x3d 10.;\nconst float SIZE_PRECISION_FACTOR \x3d 10.;\nattribute vec2 a_pos_packed;\nattribute vec2 a_offset_packed;\nattribute float a_size_packed;\n#ifdef DATA_DRIVEN_COLOR\nconst float u_dataDrivenColor_validValues[4] \x3d float[4](0., 0., 1., 0.);\nuniform vec4 u_dataDrivenColor_colorFallback;\nuniform vec4 u_dataDrivenColor_color;\n#endif\nuniform float u_view_zoomLevel;\n#include \x3ctest/TestShader.common.glsl\x3e\n#ifdef DATA_DRIVEN_COLOR\nvec4 getColor(float value) {\nint index \x3d -1;\nfor (int i \x3d 0; i \x3c 4; i++) {\nif (u_dataDrivenColor_validValues[i] \x3d\x3d value) {\nindex \x3d i;\nbreak;\n}\n}\nif (index \x3d\x3d -1) {\nreturn u_dataDrivenColor_colorFallback;\n}\nreturn u_dataDrivenColor_color;\n}\n#endif\nvoid main() {\nvec2 a_pos \x3d a_pos_packed / POS_PRECISION_FACTOR;\nvec2 a_offset \x3d a_offset_packed / OFFSET_PRECISION_FACTOR;\nfloat a_size \x3d a_size_packed / SIZE_PRECISION_FACTOR;\nvec4 color \x3d vec4(1., 0., 0., 1.);\n#ifdef DATA_DRIVEN_COLOR\ncolor \x3d getColor(1.);\n#endif\nvec2 offsetScaled \x3d a_offset * a_size;\nvec4 pos \x3d vec4(a_pos.xy + offsetScaled, 0., 1.);\ngl_Position \x3d pos;\n#ifndef RETURN_RED\nv_color \x3d color;\n#endif\nv_offset \x3d a_offset;\n}"},
tileInfo:{"tileInfo.frag":"uniform mediump sampler2D u_texture;\nvarying mediump vec2 v_tex;\nvoid main(void) {\nlowp vec4 color \x3d texture2D(u_texture, v_tex);\ncolor.rgb *\x3d color.a;\ngl_FragColor \x3d color;\n}","tileInfo.vert":"attribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_coord_ratio;\nuniform mediump vec2 u_delta;\nuniform mediump vec2 u_dimensions;\nvarying mediump vec2 v_tex;\nvoid main() {\nmediump vec2 offset \x3d u_coord_ratio * vec2(u_delta + a_pos * u_dimensions);\nvec3 v_pos \x3d u_dvsMat3 * vec3(offset, 1.0);\ngl_Position \x3d vec4(v_pos.xy, 0.0, 1.0);\nv_tex \x3d a_pos;\n}"},
util:{"atan2.glsl":"float atan2(in float y, in float x) {\nfloat t0, t1, t2, t3, t4;\nt3 \x3d abs(x);\nt1 \x3d abs(y);\nt0 \x3d max(t3, t1);\nt1 \x3d min(t3, t1);\nt3 \x3d 1.0 / t0;\nt3 \x3d t1 * t3;\nt4 \x3d t3 * t3;\nt0 \x3d - 0.013480470;\nt0 \x3d t0 * t4 + 0.057477314;\nt0 \x3d t0 * t4 - 0.121239071;\nt0 \x3d t0 * t4 + 0.195635925;\nt0 \x3d t0 * t4 - 0.332994597;\nt0 \x3d t0 * t4 + 0.999995630;\nt3 \x3d t0 * t3;\nt3 \x3d (abs(y) \x3e abs(x)) ? 1.570796327 - t3 : t3;\nt3 \x3d x \x3c 0.0 ? 3.141592654 - t3 : t3;\nt3 \x3d y \x3c 0.0 ? -t3 : t3;\nreturn t3;\n}",
"encoding.glsl":"const vec4 rgba2float_factors \x3d vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}"}}})},"esri/views/2d/engine/webgl/brushes/BrushOverlay":function(){define(["../definitions","../Utils","./WGLBrush","../../../../webgl/enums"],function(e,g,q,h){class m extends q{constructor(){super(...arguments);this._desc={vsPath:"overlay/overlay",
fsPath:"overlay/overlay",attributes:new Map([["a_pos",0],["a_uv",1]])}}dispose(){}prepareState({context:l}){l.setBlendingEnabled(!0);l.setColorMask(!0,!0,!0,!0);l.setBlendFunctionSeparate(h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA,h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA);l.setStencilWriteMask(0);l.setStencilTestEnabled(!0);l.setStencilFunction(h.CompareFunction.GREATER,255,255)}draw(l,d){const {context:b,painter:a,requestRender:f,allowDelayedRender:n}=l;if(d.isReady){var {computedOpacity:c,
dvsMat3:r,isWrapAround:k,perspectiveTransform:p,texture:t,wrapAroundShift:w}=d;l.timeline.begin(this.name);var u=a.materialManager.getProgram(this._desc);if(n&&null!=f&&!u.compiled)f();else{var y=g.createProgramDescriptor("overlay",{geometry:[{location:0,name:"a_pos",count:2,type:h.DataType.FLOAT}],tex:[{location:1,name:"a_uv",count:2,type:h.DataType.UNSIGNED_SHORT}]});if(y=d.getVAO(b,y.bufferLayouts,y.attributes))b.bindVAO(y),b.useProgram(u),b.bindTexture(t,e.textureBindingBitmap),u.setUniformMatrix3fv("u_dvsMat3",
r),u.setUniform1i("u_texture",e.textureBindingBitmap),u.setUniform1f("u_opacity",c),u.setUniform2fv("u_perspective",p),u.setUniform2fv("u_texSize",d.textureSize),u.setUniform1f("u_wrapAroundShift",0),d.draw(l.context),k&&(u.setUniform1f("u_wrapAroundShift",w),d.draw(l.context)),b.bindVAO(),l.timeline.end(this.name)}}}}return m})},"esri/views/2d/engine/webgl/brushes/WGLBrushStencil":function(){define("../../../../../core/libs/gl-matrix-2/factories/vec4f32 ../DefaultVertexAttributeLayouts ./WGLBrush ../shaders/BackgroundPrograms ../../../../webgl/BufferObject ../../../../webgl/enums ../../../../webgl/ProgramTemplate ../../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b){class a extends q{constructor(){super(...arguments);this._color=e.fromValues(1,0,0,1);this._initialized=!1}dispose(){this._solidProgram&&(this._solidProgram.dispose(),this._solidProgram=null);this._solidVertexArrayObject&&(this._solidVertexArrayObject.dispose(),this._solidVertexArrayObject=null)}prepareState({context:f}){f.setDepthWriteEnabled(!1);f.setDepthTestEnabled(!1);f.setStencilTestEnabled(!0);f.setBlendingEnabled(!1);f.setColorMask(!1,!1,!1,!1);f.setStencilOp(l.StencilOperation.KEEP,
l.StencilOperation.KEEP,l.StencilOperation.REPLACE);f.setStencilWriteMask(255)}draw(f,n){const {context:c,requestRender:r,allowDelayedRender:k}=f;this._initialized||this._initialize(c);k&&null!=r&&!this._solidProgram.compiled?r():(c.setStencilFunctionSeparate(l.Face.FRONT_AND_BACK,l.CompareFunction.GREATER,n.stencilRef,255),c.bindVAO(this._solidVertexArrayObject),c.useProgram(this._solidProgram),this._solidProgram.setUniformMatrix3fv("u_dvsMat3",n.transforms.displayViewScreenMat3),this._solidProgram.setUniform2fv("u_coord_range",
[n.rangeX,n.rangeY]),this._solidProgram.setUniform1f("u_depth",0),this._solidProgram.setUniform4fv("u_color",this._color),c.drawArrays(l.PrimitiveType.TRIANGLE_STRIP,0,4),c.bindVAO())}_initialize(f){if(this._initialized)return!0;const n=d.createProgram(f,h.background);if(!n)return!1;var c=new Int8Array([0,0,1,0,0,1,1,1]);c=m.BufferObject.createVertex(f,l.Usage.STATIC_DRAW,c);f=new b.VertexArrayObject(f,h.background.attributes,g.Pos2b,{geometry:c});this._solidProgram=n;this._solidVertexArrayObject=
f;return this._initialized=!0}}return a})},"esri/views/2d/engine/webgl/DefaultVertexAttributeLayouts":function(){define(["exports","../../../webgl/enums","../../../webgl/VertexElementDescriptor"],function(e,g,q){const h={geometry:[new q.VertexElementDescriptor("a_pos",2,g.DataType.BYTE,0,2)]},m={geometry:[new q.VertexElementDescriptor("a_pos",2,g.DataType.BYTE,0,4),new q.VertexElementDescriptor("a_tex",2,g.DataType.BYTE,2,4)]};g={geometry:[new q.VertexElementDescriptor("a_pos",2,g.DataType.UNSIGNED_SHORT,
0,4)]};e.Pos2b=h;e.Pos2us=g;e.PosTex2b=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo":function(){define("../../../../../core/libs/gl-matrix-2/factories/vec4f32 ../DefaultVertexAttributeLayouts ../FeatureTile ./WGLBrush ../shaders/BackgroundPrograms ../shaders/TileInfoPrograms ../../../../webgl/BufferObject ../../../../webgl/enums ../../../../webgl/ProgramTemplate ../../../../webgl/Texture ../../../../webgl/TextureDescriptor ../../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c){class r extends h{constructor(){super(...arguments);this._color=e.fromValues(1,0,0,1)}dispose(){this._outlineProgram?.dispose();this._outlineProgram=null;this._tileInfoProgram?.dispose();this._tileInfoProgram=null;this._outlineVertexArrayObject?.dispose();this._outlineVertexArrayObject=null;this._tileInfoVertexArrayObject?.dispose();this._ctx=this._tileInfoVertexArrayObject=null}prepareState({context:k}){k.setBlendingEnabled(!0);k.setBlendFunctionSeparate(b.BlendFactor.ONE,
b.BlendFactor.ONE_MINUS_SRC_ALPHA,b.BlendFactor.ONE,b.BlendFactor.ONE_MINUS_SRC_ALPHA);k.setColorMask(!0,!0,!0,!0);k.setStencilWriteMask(0);k.setStencilTestEnabled(!1)}draw(k,p){const {context:t,requestRender:w,allowDelayedRender:u}=k;if(!(!p.isReady&&p instanceof q.FeatureTile&&p.hasData))if(this._loadWGLResources(t),!u||null==w||this._outlineProgram.compiled&&this._tileInfoProgram.compiled){t.bindVAO(this._outlineVertexArrayObject);t.useProgram(this._outlineProgram);this._outlineProgram.setUniformMatrix3fv("u_dvsMat3",
p.transforms.displayViewScreenMat3);this._outlineProgram.setUniform2f("u_coord_range",p.rangeX,p.rangeY);this._outlineProgram.setUniform1f("u_depth",0);this._outlineProgram.setUniform4fv("u_color",this._color);t.drawArrays(b.PrimitiveType.LINE_STRIP,0,4);if(k=this._getTexture(t,p))t.bindVAO(this._tileInfoVertexArrayObject),t.useProgram(this._tileInfoProgram),t.bindTexture(k,0),this._tileInfoProgram.setUniformMatrix3fv("u_dvsMat3",p.transforms.displayViewScreenMat3),this._tileInfoProgram.setUniform1f("u_depth",
0),this._tileInfoProgram.setUniform2f("u_coord_ratio",p.rangeX/p.width,p.rangeY/p.height),this._tileInfoProgram.setUniform2f("u_delta",0,0),this._tileInfoProgram.setUniform2f("u_dimensions",k.descriptor.width,k.descriptor.height),t.drawArrays(b.PrimitiveType.TRIANGLE_STRIP,0,4);t.bindVAO()}else w()}_loadWGLResources(k){if(!this._outlineProgram||!this._tileInfoProgram){var p=a.createProgram(k,m.background),t=a.createProgram(k,l.tileInfo),w=new Int8Array([0,0,1,0,1,1,0,1]);w=d.BufferObject.createVertex(k,
b.Usage.STATIC_DRAW,w);w=new c.VertexArrayObject(k,m.background.attributes,g.Pos2b,{geometry:w});var u=new Int8Array([0,0,1,0,0,1,1,1]);u=d.BufferObject.createVertex(k,b.Usage.STATIC_DRAW,u);k=new c.VertexArrayObject(k,l.tileInfo.attributes,g.Pos2b,{geometry:u});this._outlineProgram=p;this._tileInfoProgram=t;this._outlineVertexArrayObject=w;this._tileInfoVertexArrayObject=k}}_getTexture(k,p){if(!this._ctx){var t=document.createElement("canvas");t.width=512;t.height=512;this._ctx=t.getContext("2d")}p.tileDebugInfoTexture||
(t=new n.TextureDescriptor,t.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE,t.samplingMode=b.TextureSamplingMode.LINEAR,t.isImmutable=!0,t.width=512,t.height=512,p.tileDebugInfoTexture=new f.Texture(k,t));k=this._ctx;k.clearRect(0,0,k.canvas.width,k.canvas.height);k.textAlign="left";k.textBaseline="top";k.font="14px sans-serif";k.lineWidth=2;k.fillStyle="white";k.strokeStyle="black";var {debugSlot:w}=p;t=8+99.2*w;w=`${w}) ${p.key.id} (${p.constructor.name})`;k.strokeText(w,8,t);k.fillText(w,8,t);t+=16;
({debugInfo:w}=p);if(w){const {length:y,minOrderedLength:x,minUnorderedLength:v,triangleCount:A}=w.display;if(0<y){var u=`Length: ${y}`;k.strokeText(u,8,t);k.fillText(u,8,t);t+=16}x&&(u=`Min ordered length: ${x}`,k.strokeText(u,8,t),k.fillText(u,8,t),t+=16);v&&(u=`Min unordered length: ${v}`,k.strokeText(u,8,t),k.fillText(u,8,t),t+=16);0<A&&(1E5<A&&(k.fillStyle="red",k.strokeStyle="white"),u=`Triangle count: ${A}`,k.strokeText(u,8,t),k.fillText(u,8,t),t+=16);const {bytesUsed:z,bytesReserved:B}=w.memory;
k.fillStyle="white";k.strokeStyle="black";if(0<z||0<B)w=`Memory usage: ${z} of ${B} bytes`,k.strokeText(w,8,t),k.fillText(w,8,t),t+=16}p.tileDebugInfoTexture.setData(k.canvas);return p.tileDebugInfoTexture}}return r})},"esri/views/2d/engine/webgl/FeatureTile":function(){define("exports ../../../../core/has ../../../../core/Logger ../../../../core/libs/gl-matrix-2/factories/mat2df32 ./AFeatureTile ./definitions ./DisplayEntity ./enums ./FeatureDisplayList ./ReshufflePlan ./collisions/LabelMetric ./cpuMapped/MappedMesh ./mesh/meshDebugUtils ./util/Reader ./util/serializationUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p){let t=0;class w extends m.AFeatureTile{constructor(u,y,x,v,A=!1){super(u,y,x,v);this._meshes=new Map;this._entities=[];this._nextUploadAllowed=this._invalidated=!1;this.tileAge=t++;this._metrics=[];this._entityIds=new Set;this._entityIdsFromBuffer=new Set;this._attributeEpoch=0;this._encounteredEnd=!1;this.visible=!0;this.transforms.labelMat2d=h.create();this.enableDeferredUploads=A}destroy(){super.destroy();this.clear()}clear(){for(const u of this._meshes.values())u.destroy();
this._meshes.clear();this._entities=[];this._metrics=[];this._displayList=null;this._invalidated=!0;this._entityIds.clear();this._nextUploadAllowed=!0}beforeRender(u){super.beforeRender(u);this._needsReshuffle&&u.reshuffleManager.schedule(this)}tryReady(u){const y=this._invalidated&&!this._uploadAllowed;return!this._isReady&&!y&&this._encounteredEnd&&u>=this._attributeEpoch?(g("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.ready [epoch=${u}]`),this.ready(),this.requestRender(),
!0):!1}get labelMetrics(){return this._metrics}get hasData(){return!!this._meshes.size}get needsUpload(){return this._invalidated}get _uploadAllowed(){return!this.enableDeferredUploads||this._nextUploadAllowed}upload(){this._nextUploadAllowed=!0}getDisplayList(u,y){if(this._uploadAllowed&&this._invalidated){this._entities.sort((x,v)=>{const A=v.sortKey,z=x.sortKey;return z===A?x.id-v.id:z-A});y===b.FeatureBatchingStrategy.BATCHING&&this.reshuffle(!0);this._displayList=a.DisplayList.fromDisplayEntities(this._entities,
this,u,y);for(const x of this._meshes.values())x.upload();this.debugInfo.display.length=this._displayList.length;this.debugInfo.display.minOrderedLength=this._displayList.minOrderedLength;this.debugInfo.display.minUnorderedLength=this._displayList.minUnorderedLength;this.requestRender();this._nextUploadAllowed=this._invalidated=!1}return this._displayList}getMesh(u){if(!this._meshes.has(u))throw Error(`InternalError: Unable to find VAO for instance: ${u}`);return this._meshes.get(u)}getSortKeys(u){const y=
new Map;for(const {id:x,sortKey:v}of this._entities)if(u.has(x)&&y.set(x,v),y.size===u.size)break;return y}onMessage(u){switch(u.type){case "append":this._onAppendMessage(u);break;case "update":this._onUpdateMessage(u)}this._aggregateMemoryStats();this.requestRender();if(u.end){g("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.end [epoch=${u.attributeEpoch}]`);if(!u.attributeEpoch)throw Error("InternalError: Attribute epoch not defined.");this._attributeEpoch=u.attributeEpoch;
this._encounteredEnd=!0}}_onAppendMessage(u){g("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.append`,{append:r.debugMeshDataInfo(u?.append)});u.clear&&this.clear();if(u.append){var y=p.deserializeList(new k(u.append.entities),d);this._insert(y,u.append.data,!1)}}_onUpdateMessage(u){g("esri-2d-update-debug")&&console.debug(`Tile[${this.key.id}] FeatureTile.update`,{isPixelBuffer:u.isPixelBuffer,modify:r.debugMeshDataInfo(u.modify),remove:u.remove});const y=p.deserializeList(new k(u.modify.entities),
d);var x=y.map(A=>A.id);const v=u.isPixelBuffer??!1;x=[...u.remove,...x];v?this._removeByIdsFromBuffer(x):this._removeByIds(x);this._insert(y,u.modify.data,v)}reshuffle(u=!1){if(!this.destroyed){var y=new Map;for(const x of this._entities)for(const v of x.records){const A=this._meshes.get(v.instanceId);let z=y.get(A);z||(z=new f.ReshufflePlan(u),y.set(A,z));z.copyRecord(v)}for(const [x,v]of y)x.reshuffle(v);this._invalidated=!0;this._aggregateMemoryStats();g("esri-2d-update-debug")&&q.getLogger("esri.views.2d.engine.webgl.FeatureTile").info(`Tile ${this.key.id} was reshuffled.`)}}copyPixelBufferedEntitesFrom(u,
y,x,v){x*=l.tileSize;v*=l.tileSize;for(const z of u._entities){let B=null;for(const D of z.records)if(D.overlaps&y){var A=u.getMesh(D.instanceId);A=this._ensureMesh(D.instanceId,A.layout).copyRecordFrom(A,D,x,v);B||(B=new d(z.id,z.sortKey),this._entityIdsFromBuffer.add(z.id),this._entities.push(B));B.records.push(A)}}this._invalidated=!0}_ensureMesh(u,y){this._meshes.has(u)||this._meshes.set(u,new c.MappedMesh(this._stage.bufferPool,y));return this._meshes.get(u)}_insert(u,y,x){if(u.length){this._removeDuplicatedBufferedEntites(u);
y=this._insertVertexData(y);for(const v of u){for(const A of v.records)A.updateBaseOffsets(y.get(A.instanceId));x?this._tryInsertBufferedEntity(v):this._insertEntity(v)}this._invalidated=!0}}_insertVertexData(u){const y=new Map;for(const x of u){const {instanceId:v,layout:A}=x;u=this._ensureMesh(v,A).append(x);if(x.metrics){const z=p.deserializeList(new k(x.metrics),n.LabelMetric)??[];this._metrics.push(...z)}y.set(v,u)}return y}_insertEntity(u){g("esri-2d-update-debug")&&this._entityIds.has(u.id)&&
console.error(`Tile ${this.key.id} insertEnitty: Already have entityId ${u.id}`);this._entityIds.add(u.id);this._entities.push(u)}_tryInsertBufferedEntity(u){this._entityIds.has(u.id)?this._removeRecordsFromMesh(u.records):(this._entityIdsFromBuffer.add(u.id),this._entities.push(u))}_removeDuplicatedBufferedEntites(u){if(this._entityIdsFromBuffer.size){var y=[];for(const x of u)this._entityIdsFromBuffer.has(x.id)&&y.push(x.id);this._removeByIds(y)}}_removeByIdsFromBuffer(u){this._removeByIds(u.filter(y=>
this._entityIdsFromBuffer.has(y)))}_removeByIds(u){if(0!==u.length){u=new Set(u);var y=[];for(const x of this._entities)u.has(x.id)?this._remove(x):y.push(x);this._entities=y;this._invalidated=!0}}_remove(u){this._removeRecordsFromMesh(u.records);this._entityIds.delete(u.id);this._entityIdsFromBuffer.delete(u.id)}_removeRecordsFromMesh(u){for(const y of u){const {instanceId:x,indexStart:v,indexCount:A,vertexStart:z,vertexCount:B}=y;this._meshes.get(x)?.remove(v,A,z,B)}}_aggregateMemoryStats(){this.debugInfo.memory.bytesUsed=
0;this.debugInfo.memory.bytesReserved=0;for(const [,u]of this._meshes)this.debugInfo.memory.bytesUsed+=u.memoryStats.bytesUsed,this.debugInfo.memory.bytesReserved+=u.memoryStats.bytesReserved}get _needsReshuffle(){if(this.destroyed)return!1;const {bytesUsed:u,bytesReserved:y}=this.debugInfo.memory,{minOrderedLength:x,length:v}=this.debugInfo.display;return y>l.RESHUFFLING_EXEMPT_MEMORY_BYTES&&u/y<l.RESHUFFLING_TARGET_MEMORY_EFFICIENCY||v>l.RESHUFFLING_EXEMPT_DRAW_CALLS&&x/v<l.RESHUFFLING_TARGET_DRAW_EFFICIENCY?
!0:!1}}e.FeatureTile=w;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/AFeatureTile":function(){define("exports ../../../../core/libs/gl-matrix-2/math/mat2d ../../../../core/libs/gl-matrix-2/factories/mat2df32 ../../../../core/libs/gl-matrix-2/math/mat3 ../../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f32 ./definitions ./TiledDisplayObject".split(" "),function(e,g,q,h,m,l,d,b,a){const f=
m.create(),n=d.create();class c extends a.TiledDisplayObject{constructor(r,k,p,t){super(r,k,p,t,b.tileSize,b.tileSize)}destroy(){super.destroy()}setTransform(r){var k=this.resolution/r.resolution,p=this.transforms.tileMat3;const [t,w]=r.toScreenNoRotation([0,0],[this.x,this.y]);var u=this.width/this.rangeX*k;k*=this.height/this.rangeY;h.set(p,u,0,0,0,k,0,t,w,1);h.multiply(this.transforms.displayViewScreenMat3,r.displayViewMat3,p);p=this.transforms.labelMat2d;const y=window.devicePixelRatio;u=g.set(q.create(),
u*y,0,0,k*y,t*y,w*y);g.multiply(p,r.viewMat2d,u)}_createTransforms(){return{labelMat2d:q.create(),tileMat3:m.create(),displayViewScreenMat3:m.create()}}containsScreenPoint(r,k,p){var t=h.multiply(f,r.viewMat3,this.transforms.tileMat3);t=h.invert(f,t);if(null==t)return!0;l.set(n,...k,1);k=l.transformMat3(n,n,t);r=this.resolution/r.resolution*p;return k[0]>=-r&&k[0]<this.width+r&&k[1]>=-r&&k[1]<this.height+r}}e.AFeatureTile=c;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/factories/vec3f32":function(){define(["exports"],
function(e){function g(){return new Float32Array(3)}function q(w){const u=new Float32Array(3);u[0]=w[0];u[1]=w[1];u[2]=w[2];return u}function h(w,u,y){const x=new Float32Array(3);x[0]=w;x[1]=u;x[2]=y;return x}function m(w,u){return new Float32Array(w,u,3)}function l(){return g()}function d(){return h(1,1,1)}function b(){return h(1,0,0)}function a(){return h(0,1,0)}function f(){return h(0,0,1)}const n=g(),c=d(),r=b(),k=a(),p=f(),t=Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:r,
UNIT_Y:k,UNIT_Z:p,ZEROS:n,clone:q,create:g,createView:m,fromValues:h,ones:d,unitX:b,unitY:a,unitZ:f,zeros:l},Symbol.toStringTag,{value:"Module"}));e.ONES=c;e.UNIT_X=r;e.UNIT_Y=k;e.UNIT_Z=p;e.ZEROS=n;e.clone=q;e.create=g;e.createView=m;e.fromValues=h;e.ones=d;e.unitX=b;e.unitY=a;e.unitZ=f;e.vec3f32=t;e.zeros=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TiledDisplayObject":function(){define(["exports","../../../../core/libs/gl-matrix-2/math/mat3","../DisplayObject",
"../../tiling/TileKey"],function(e,g,q,h){class m extends q.DisplayObject{constructor(l,d,b,a,f,n,c=f,r=n){super();this.tileDebugInfoTexture=null;this.debugInfo={display:{length:0,minOrderedLength:0,minUnorderedLength:0,triangleCount:0},memory:{bytesUsed:0,bytesReserved:0}};this._destroyed=!1;this.key=new h(l);this.resolution=d;this.x=b;this.y=a;this.width=f;this.height=n;this.rangeX=c;this.rangeY=r}destroy(){this.tileDebugInfoTexture&&(this.tileDebugInfoTexture.dispose(),this.tileDebugInfoTexture=
null);this._destroyed=!0}get debugSlot(){let l=this;for(;l.parent!==this._stage;){if(!l.parent)return 0;l=l.parent}return this._stage.children.indexOf(l)}setTransform(l){const d=this.resolution/(l.resolution*l.pixelRatio),b=this.transforms.tileMat3,[a,f]=l.toScreenNoRotation([0,0],[this.x,this.y]);g.set(b,this.width/this.rangeX*d,0,0,0,this.height/this.rangeY*d,0,a,f,1);g.multiply(this.transforms.displayViewScreenMat3,l.displayViewMat3,b)}get destroyed(){return this._destroyed}}e.TiledDisplayObject=
m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/DisplayEntity":function(){define(["./DisplayRecord","./util/serializationUtils"],function(e,g){class q{constructor(h,m){this.id=h;this.sortKey=m;this.records=[]}serialize(h){h.push(this.id);h.writeF32(this.sortKey);g.serializeList(h,this.records);return h}static deserialize(h){var m=h.readInt32();const l=h.readF32();m=new q(m,l);m.records=g.deserializeList(h,e)??[];return m}}q.byteSizeHint=2*Uint32Array.BYTES_PER_ELEMENT+
e.byteSizeHint;return q})},"esri/views/2d/engine/webgl/DisplayRecord":function(){define(function(){class e{constructor(g,q,h,m,l,d,b){this.instanceId=g;this.textureKey=q;this.indexStart=h;this.indexCount=m;this.vertexStart=l;this.vertexCount=d;this.overlaps=b}updateBaseOffsets(g){this.vertexStart+=g.vertexFrom;this.indexStart+=g.indexFrom}clone(){return new e(this.instanceId,this.textureKey,this.indexStart,this.indexCount,this.vertexStart,this.vertexCount,this.overlaps)}static write(g,q,h,m,l,d,b,
a){g.push(q);g.push(h);g.push(m);g.push(l);g.push(d);g.push(b);g.push(a)}serialize(g){g.push(this.instanceId);g.push(this.textureKey);g.push(this.indexStart);g.push(this.indexCount);g.push(this.vertexStart);g.push(this.vertexCount);g.push(this.overlaps);return g}static deserialize(g){const q=g.readInt32(),h=g.readInt32(),m=g.readInt32(),l=g.readInt32(),d=g.readInt32(),b=g.readInt32();g=g.readInt32();return new e(q,h,m,l,d,b,g)}}e.byteSizeHint=7*Uint32Array.BYTES_PER_ELEMENT;return e})},"esri/views/2d/engine/webgl/util/serializationUtils":function(){define(["exports"],
function(e){e.deserializeList=function(g,q,h){var m=g.readInt32();m=Array(m);for(let l=0;l<m.length;l++)m[l]=q.deserialize(g,h);return m};e.serializeList=function(g,q){if(null===q)g.push(0);else{g.push(q.length);for(const h of q)h.serialize(g);return g}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/FeatureDisplayList":function(){define("exports ../../../../core/has ./enums ./cpuMapped/FreeList ./shaderGraph/techniques/featureTechniqueUtils ../../../webgl/enums".split(" "),
function(e,g,q,h,m,l){class d{constructor(a,f,n,c,r){this.instance=a;this.materialKey=f;this.target=n;this.start=c;this.count=r}get textureKey(){return this.materialKey&255}get indexEnd(){return this.start+this.count}extend(a){this.count+=a}render(a){this.instance.techniqueRef.render(a,this)}getStencilReference(){return this.target.stencilRef}getAttributePrecisionPackFactors(){return this.target.getMesh(this.instance.instanceId).getAttributePrecisionPackFactors()}draw(a,f){m.isHittest(a)?this.drawCompute(a.context,
f):this.drawGeometry(a.context,f)}drawCompute(a,f){f=this.target.getMesh(this.instance.instanceId).getComputeVAO(a,f);const n=this.start*Uint32Array.BYTES_PER_ELEMENT/3;a.bindVAO(f);a.drawElements(l.PrimitiveType.POINTS,this.count/3,l.DataType.UNSIGNED_INT,n);a.bindVAO(null)}drawGeometry(a,f){f=this.target.getMesh(this.instance.instanceId).getGeometryVAO(a,f);const n=this.start*Uint32Array.BYTES_PER_ELEMENT;a.bindVAO(f);a.drawElements(l.PrimitiveType.TRIANGLES,this.count,l.DataType.UNSIGNED_INT,n);
a.bindVAO(null)}}class b{constructor(){this._minOrderedLength=this._length=0;this._materialKeys=new Set}static fromDisplayEntities(a,f,n,c){const r=new b;for(const k of a.values())for(const p of k.records)a=n.getInstance(p.instanceId),r.addRecord(a,a.instanceId<<16|p.textureKey&255,p.indexStart,p.indexCount,p.vertexStart,p.vertexCount,f,c);return r}get length(){return this._length}get minOrderedLength(){return this._minOrderedLength}get minUnorderedLength(){return this._materialKeys.size}render(a){const {drawPhase:f}=
a;for(const n of this.infos())n.instance.techniqueRef.drawPhase&f&&n.render(a)}addRecord(a,f,n,c,r,k,p,t){c||(n=r,c=k);if(c)if(null==this._head)a=new d(a,f,p,n,c),this._tail=this._head=new h.List(a),this._length++,this._minOrderedLength++;else{if(t===q.FeatureBatchingStrategy.STRICT_ORDER)return this._insert(a,f,p,n,c,this._tail,null);r=null;k=this._head;var w=a.instanceId,u=a.techniqueRef.symbologyPlane;if(t===q.FeatureBatchingStrategy.STRICT_MARKERS_AND_TEXT&&(u===q.FeatureSymbologyDrawOrder.MARKER||
u===q.FeatureSymbologyDrawOrder.TEXT))return this._insert(a,f,p,n,c,this._tail,null);for(;k;){t=k.data.instance;const y=t.instanceId,x=r?.data.instance.instanceId;if(u<t.techniqueRef.symbologyPlane||w===x&&w!==y)return this._insert(a,f,p,n,c,r,k);r=k;k=k.next}this._insert(a,f,p,n,c,r,null)}}*infos(){if(null!=this._head)for(const a of this._head.values())yield a}_insert(a,f,n,c,r,k,p){if(null==k&&null==p)a=new d(a,f,n,c,r),this._tail=this._head=new h.List(a),this._length++,this._minOrderedLength++;
else{f!==this._tail.data.materialKey&&this._minOrderedLength++;this._materialKeys.add(f);if(null==k&&null!=p)return this._insertAtHead(a,f,n,c,r,p);if(null!=k&&null==p)return this._insertAtEnd(a,f,n,c,r,k);if(null!=k&&null!=p)return this._insertAtMiddle(a,f,n,c,r,k,p)}}_insertAtHead(a,f,n,c,r,k){f===k.data.materialKey&&n===k.data.target&&c+r===k.data.start?(k.data.start=c,k.data.count+=r):(a=new d(a,f,n,c,r),this._head=new h.List(a),this._head.next=k,this._length++)}_insertAtEnd(a,f,n,c,r,k){k.data.materialKey===
f&&k.data.indexEnd===c?k.data.count+=r:(a=new d(a,f,n,c,r),this._tail=new h.List(a),k.next=this._tail,this._length++)}_insertAtMiddle(a,f,n,c,r,k,p){k.data.materialKey===f&&k.data.target===n&&k.data.indexEnd===c?(k.data.count+=r,k.data.materialKey===p.data.materialKey&&k.data.target===p.data.target&&k.data.indexEnd===p.data.start&&(k.data.count+=p.data.count,k.next=p.next,this._length--)):f===p.data.materialKey&&n===p.data.target&&c+r===p.data.start?(p.data.start=c,p.data.count+=r):(a=new d(a,f,n,
c,r),a=new h.List(a),k.next=a,a.next=p,this._length++)}}e.DisplayList=b;e.DisplayListInfo=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/cpuMapped/FreeList":function(){define(["exports"],function(e){class g{constructor(h){this.next=null;if(Array.isArray(h)){this.data=h[0];var m=this;for(let l=1;l<h.length;l++)m.next=new g([h[l]]),m=m.next}else this.data=h}*values(){let h=this;for(;h;)yield h.data,h=h.next}forEach(h){let m=this;for(;m;)h(m.data),m=m.next}get last(){return this.next?
this.next.last:this}}class q{constructor(h){this._head=null;null!=h&&(this._head=new g(h))}get head(){return this._head}maxAvailableSpace(){if(null==this._head)return 0;let h=0;this._head.forEach(m=>{h=Math.max(h,m.end-m.start)});return h}firstFit(h){if(null==this._head)return null;var m=null;let l=this._head;for(;l;){const d=l.data.end-l.data.start;if(d===h)return m?m.next=l.next:this._head=l.next,l.data.start;if(d>h)return m=l.data.start,l.data.start+=h,m;m=l;l=l.next}return null}free(h,m){const l=
h+m;if(null==this._head)this._head=new g({start:h,end:l});else if(l<=this._head.data.start)if(l===this._head.data.start)this._head.data.start-=m;else{var d=new g({start:h,end:l});d.next=this._head;this._head=d}else{d=this._head;for(var b=d.next;b;){if(b.data.start>=l){if(d.data.end===h){d.data.end+=m;d.data.end===b.data.start&&(d.data.end+=b.data.end-b.data.start,d.next=b.next);return}if(b.data.start===l){b.data.start-=m;return}h=new g({start:h,end:l});h.next=d.next;d.next=h;return}d=b;b=b.next}h===
d.data.end?d.data.end+=m:(h=new g({start:h,end:l}),d.next=h)}}clear(){this._head=null}}e.FreeList=q;e.List=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/ReshufflePlan":function(){define(["exports"],function(e){class g{constructor(q){this._indexOnly=q;this.vertex={count:0,operations:[]};this.index={count:0,operations:[]}}copyRecord(q){let h=0;this._indexOnly||(h=this.vertex.count-q.vertexStart,this.vertex.operations.push({srcFrom:q.vertexStart,dstFrom:this.vertex.count,
count:q.vertexCount,mutate:0}),q.vertexStart=this.vertex.count,this.vertex.count+=q.vertexCount);let m=!1;if(this._indexOnly&&1<=this.index.operations.length){const l=this.index.operations[this.index.operations.length-1];l.srcFrom+l.count===q.indexStart&&(l.count+=q.indexCount,m=!0)}m||this.index.operations.push({srcFrom:q.indexStart,dstFrom:this.index.count,count:q.indexCount,mutate:h});q.indexStart=this.index.count;this.index.count+=q.indexCount}}e.ReshufflePlan=g;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/collisions/LabelMetric":function(){define(["exports","./BoundingBox","../util/serializationUtils"],function(e,g,q){class h{constructor(m,l,d,b,a,f,n,c,r=[]){this.entityTexel=m;this.anchorX=l;this.anchorY=d;this.directionX=b;this.directionY=a;this.maxScale=f;this.minScale=n;this.referenceBounds=c;this.bounds=r}serialize(m){m.push(this.entityTexel);m.writeF32(this.anchorX);m.writeF32(this.anchorY);m.writeF32(this.directionX);m.writeF32(this.directionY);
m.writeF32(this.maxScale);m.writeF32(this.minScale);null===this.referenceBounds?(m.writeF32(0),m.writeF32(0),m.writeF32(0)):(m.writeF32(this.referenceBounds.size),m.writeF32(this.referenceBounds.offsetX),m.writeF32(this.referenceBounds.offsetY));q.serializeList(m,this.bounds)}static deserialize(m){const l=m.readInt32(),d=m.readF32(),b=m.readF32(),a=m.readF32(),f=m.readF32(),n=m.readF32(),c=m.readF32(),r=m.readF32(),k=m.readF32(),p=m.readF32();m=q.deserializeList(m,g)??[];return new h(l,d,b,a,f,n,
c,{size:r,offsetX:k,offsetY:p},m)}}e.LabelMetric=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/cpuMapped/MappedMesh":function(){define("exports ../../../../../core/maybe ../number ./Buffer ../shaderGraph/techniques/mesh/dataViewUtils ../../../../webgl/enums ../../../../webgl/VertexArrayObject".split(" "),function(e,g,q,h,m,l,d){function b(n,c){const r=[],k=n.attributes.filter(p=>c.locations.has(p.name));for(const p of k)r.push({name:p.name,type:p.type,
count:p.count,divisor:0,normalized:p.normalized??!1,offset:p.offset,stride:n.stride});return{geometry:r}}function a(n,c){const r=[];var k=n.attributes.filter(p=>c.locations.has(p.name));for(const p of k)r.push({name:p.name,type:p.type,count:p.count,divisor:0,normalized:p.normalized??!1,offset:p.offset,stride:n.stride}),k=c.computeAttributeMap[p.name],null!=k&&2===k.length&&(r.push({name:k[0],count:p.count,divisor:0,type:p.type,normalized:p.normalized??!1,offset:p.offset+n.stride,stride:n.stride}),
r.push({name:k[1],count:p.count,divisor:0,type:p.type,normalized:p.normalized??!1,offset:p.offset+2*n.stride,stride:n.stride}));return{geometry:r}}class f{constructor(n,c){this._bufferPool=n;this._layout=c;this._invalidated=!1;this._position=this._layout.attributes.find(r=>"pos"===r.name||"position"===r.name);if(!this._position)throw Error("InternalError: Unable to find position attribute");}destroy(){this._indexBuffer=g.destroyMaybe(this._indexBuffer);this._vertexBuffer=g.destroyMaybe(this._vertexBuffer);
this._computeVAO?.disposeVAOOnly();this._geometryVAO?.disposeVAOOnly()}get layout(){return this._layout}getDrawArgs(n,c,r,k){return k?{primitive:l.PrimitiveType.POINTS,count:c/3,offset:r/3}:{primitive:n,count:c,offset:r}}getAttributePrecisionPackFactors(){const n={};for(const c of this.layout.attributes)c.packPrecisionFactor&&(n[c.name]=c.packPrecisionFactor);return n}getDebugVertexInfo(n=!1){if(!this._vertexBuffer)return null;const c=this._layout,r=c.stride;var k=this._vertexBuffer.getView(0,this._vertexBuffer.byteSize);
const p=new DataView(k.slice().buffer);k=k.byteLength/r;n&&(k=this._indexBuffer.fillPointer/3);const t=this._indexBuffer.getView(0,this._indexBuffer.byteSize);let w=0;const u=[];for(let y=0;y<k;y++){n&&(w=t[3*y]*r);const x={};for(const v of c.attributes){let A=`${v.offset} ${v.name}`,z=m.unpackDataView(p,v,w);if(v.packPrecisionFactor)if(A+=` (precision: ${v.packPrecisionFactor})`,"number"===typeof z)z/=v.packPrecisionFactor;else for(let B=0;B<z.length;B++)z[B]/=v.packPrecisionFactor;x[A]=z}w+=r;u.push(x)}return{vertices:u,
layout:c}}_ensure(n,c){if(this._vertexBuffer&&this._indexBuffer)this._indexBuffer.ensure(Math.max(n,1E3)),this._vertexBuffer.ensure(Math.max(c,1E3));else{const r=this._layout.stride/Uint32Array.BYTES_PER_ELEMENT;this._indexBuffer=new h.MappedBuffer("index",Math.max(n,1E3),1,this._bufferPool);this._vertexBuffer=new h.MappedBuffer("vertex",Math.max(c,1E3),r,this._bufferPool)}}append(n){var c=n.layout.stride;this._ensure(n.indices.byteLength/Uint32Array.BYTES_PER_ELEMENT,n.vertices.byteLength/c);const {vertices:r,
indices:k}=n;n=this._vertexBuffer.insert(r,0,r.byteLength/c,0);c=this._indexBuffer.insert(k,0,k.byteLength/4,n);return{vertexFrom:n,indexFrom:c}}copyRecordFrom(n,c,r,k){const {indexStart:p,indexCount:t,vertexStart:w,vertexCount:u}=c;this._ensure(t,u);const y=n._position;var x=y.offset;r=q.i1616to32(r*(y.packPrecisionFactor??1),k*(y.packPrecisionFactor??1));x=this._vertexBuffer.copyFrom(n._vertexBuffer,w,u,r,x);n=this._indexBuffer.copyFrom(n._indexBuffer,p,t,x-w,0);c=c.clone();c.vertexStart=x;c.indexStart=
n;c.overlaps=0;return c}remove(n,c,r,k){this._indexBuffer.free(n,c);this._vertexBuffer.free(r,k)}upload(){this._invalidated=!0}getGeometryVAO(n,c){if(!this._vertexBuffer||!this._indexBuffer||!this._vertexBuffer.bufferSize)return null;if(this._invalidated){if(this._vertexBuffer.invalidated||this._indexBuffer.invalidated)this._vertexBuffer.invalidate(),this._indexBuffer.invalidate(),this._geometryVAO?.disposeVAOOnly(),this._geometryVAO=null;this._vertexBuffer.upload();this._indexBuffer.upload();const r=
this._indexBuffer.getGPUBuffer(n,!1),k=this._vertexBuffer.getGPUBuffer(n);this._geometryVAO||(this._geometryVAO=new d.VertexArrayObject(n,c.locations,b(this.layout,c),{geometry:k},r));this._invalidated=!1}return this._geometryVAO}getComputeVAO(n,c){if(!this._vertexBuffer||!this._indexBuffer||!this._vertexBuffer.bufferSize)return null;if(this._vertexBuffer.invalidated||this._indexBuffer.invalidatedComputeBuffer)this._vertexBuffer.invalidate(),this._indexBuffer.invalidate(),this._computeVAO?.disposeVAOOnly(),
this._computeVAO=null;this._vertexBuffer.upload();this._indexBuffer.upload();const r=this._indexBuffer.getGPUBuffer(n,!0),k=this._vertexBuffer.getGPUBuffer(n);this._computeVAO||(this._computeVAO=new d.VertexArrayObject(n,c.locations,a(this.layout,c),{geometry:k},r),this._invalidated=!1);return this._computeVAO}get memoryStats(){return{bytesUsed:this._vertexBuffer.memoryStats.bytesUsed+this._indexBuffer.memoryStats.bytesUsed,bytesReserved:this._vertexBuffer.memoryStats.bytesReserved+this._indexBuffer.memoryStats.bytesReserved,
vertex:this._vertexBuffer.memoryStats,index:this._indexBuffer.memoryStats}}reshuffle(n){this._vertexBuffer&&this._vertexBuffer.reshuffle(n.vertex.count,n.vertex.operations);this._indexBuffer&&this._indexBuffer.reshuffle(n.index.count,n.index.operations)}}e.MappedMesh=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/number":function(){define(["exports"],function(e){function g(l,d,b){return Math.round(Math.max(Math.min(l,b),d))}function q(l){h[0]=l;return m[0]}
const h=new Float32Array(1),m=new Uint32Array(h.buffer);e.fromUint16=function(l){let d,b;d=(l>>10&31)-15;b=(l&1023)/1024;-15<d?b+=1:d=-14;return(l>>>15?-1:1)*2**d*b};e.i16=function(l){return g(l,-32768,32767)};e.i1616to32=function(l,d){return 65535&l|d<<16};e.i32=function(l){return g(l,-2147483648,2147483647)};e.i8=function(l){return g(l,-128,127)};e.i8816to32=function(l,d,b){return l&255|(d&255)<<8|b<<16};e.i8888to32=function(l,d,b,a){return l&255|(d&255)<<8|(b&255)<<16|a<<24};e.numTo32=function(l){return l|
0};e.toFloat32=function(l){m[0]=l;return h[0]};e.toUint16=function(l){var d=q(l);l=d>>>31;var b=d&8388607;d=(d>>>23&255)-127;if(15<d)return l<<15|31744;if(-25>d)return 0;-14>d&&(b=(b+8388608)/2**(-14-d),d=-15);var a=b/8192;b=Math.floor(a);a-=b;b=1023>b&&(.5<a||.5===a&&1===b%2)?b+1:b;return l<<15|d+15<<10|b};e.toUint32=q;e.u16=function(l){return g(l,0,65535)};e.u32=function(l){return g(l,0,4294967295)};e.u32to4Xu8=function(l){return[l&255,(l&65280)>>>8,(l&16711680)>>>16,(l&4278190080)>>>24]};e.u4u4to8=
function(l,d){return 15&l|(15&d)<<4};e.u8=function(l){return g(l,0,255)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/cpuMapped/Buffer":function(){define("exports ../../../../../core/has ../../../../../core/maybe ../PooledUint32Array ./FreeList ../../../../webgl/BufferObject ../../../../webgl/enums".split(" "),function(e,g,q,h,m,l,d){class b{constructor(a,f,n,c){this._pool=c;c=h.PooledUint32Array.create(f*n*Uint32Array.BYTES_PER_ELEMENT,this._pool);this.size=
f;this.strideInt=n;this.bufferType=a;this.dirty={start:Infinity,end:0};this.memoryStats={bytesUsed:0,bytesReserved:f*n*Uint32Array.BYTES_PER_ELEMENT};this._gpu=null;this._cpu=c;this.clear()}get elementSize(){return this._cpu.length/this.strideInt}get intSize(){return this.fillPointer*this.strideInt}get byteSize(){return this.intSize*Uint32Array.BYTES_PER_ELEMENT}get invalidated(){return 0<this.bufferSize&&!this._gpu}get invalidatedComputeBuffer(){return 0<this.bufferSize&&!this._gpuComputeTriangles}invalidate(){this._invalidateTriangleBuffer();
this._gpu?.dispose();this._gpu=null}_invalidateTriangleBuffer(){this._gpuComputeTriangles?.dispose();this._gpuComputeTriangles=null}destroy(){this._gpu?.dispose();this._gpuComputeTriangles?.dispose();this._cpu?.destroy()}clear(){this.dirty.start=Infinity;this.dirty.end=0;this.freeList=new m.FreeList({start:0,end:this._cpu.length/this.strideInt});this.fillPointer=0}ensure(a){if(!(this.maxAvailableSpace()>=a)&&a*this.strideInt>this._cpu.length-this.fillPointer){this.invalidate();const f=this._cpu.length/
this.strideInt;a=Math.round(1.25*(f+a));this._cpu.expand(a*this.strideInt*Uint32Array.BYTES_PER_ELEMENT);this.freeList.free(f,a-f);this.memoryStats.bytesReserved+=(a-f)*this.strideInt*Uint32Array.BYTES_PER_ELEMENT}}set(a,f){this._cpu.array[a]!==f&&(this._cpu.array[a]=f,this.dirty.start=Math.min(a,this.dirty.start),this.dirty.end=Math.max(a+1,this.dirty.end))}getGPUBuffer(a,f=!1){if(!this.bufferSize)return null;if(f){if("index"!==this.bufferType)throw Error("Tired to get triangle buffer, but target is not an index buffer");
null==this._gpuComputeTriangles&&(this._gpuComputeTriangles=this._createComputeBuffer(a));return this._gpuComputeTriangles}null==this._gpu&&(this._gpu=this._createBuffer(a));return this._gpu}getView(a,f){return this._cpu.getUint32View(a,f/Uint32Array.BYTES_PER_ELEMENT)}get bufferSize(){return this._cpu.length/this.strideInt}maxAvailableSpace(){return this.freeList.maxAvailableSpace()}insert(a,f,n,c){const r=n*this.strideInt;if(!r)return 0;a=new Uint32Array(a,f*this.strideInt*Uint32Array.BYTES_PER_ELEMENT,
r);f=this.freeList.firstFit(n);q.assertIsSome(f,"First fit region must be defined");const k=f*this.strideInt;this._cpu.array.set(a,k);if(0!==c)for(let p=0;p<a.length;p++)this._cpu.array[p+k]+=c;this.dirty.start=Math.min(this.dirty.start,k);this.dirty.end=Math.max(this.dirty.end,k+r);this.fillPointer=Math.max(this.fillPointer,k+r);this.memoryStats.bytesUsed+=n*this.strideInt*Uint32Array.BYTES_PER_ELEMENT;return f}copyFrom(a,f,n,c,r){const k=n*this.strideInt;if(!k)return 0;var p=a._cpu.getUint32View(f*
this.strideInt*Uint32Array.BYTES_PER_ELEMENT,k);a=this.freeList.firstFit(n);q.assertIsSome(a,"First fit region must be defined");f=a*this.strideInt;this._cpu.array.set(p,f);if(0!==c)for(p=0;p<k;p++)this._cpu.array[f+p*this.strideInt+r]+=c;this.dirty.start=Math.min(this.dirty.start,f);this.dirty.end=Math.max(this.dirty.end,f+k);this.fillPointer=Math.max(this.fillPointer,f+k);this.memoryStats.bytesUsed+=n*this.strideInt*Uint32Array.BYTES_PER_ELEMENT;return a}free(a,f,n){const c=a*this.strideInt,r=(a+
f)*this.strideInt;if(!0===n)for(n=a;n!==a+f;n++)this._cpu.array[n*this.strideInt]=2147450879;this.dirty.start=Math.min(this.dirty.start,c);this.dirty.end=Math.max(this.dirty.end,r);this.freeList.free(a,f);this.memoryStats.bytesUsed-=f*this.strideInt*Uint32Array.BYTES_PER_ELEMENT}upload(){this.dirty.end&&(this._invalidateTriangleBuffer(),null!=this._gpu&&this._gpu.setSubData(this._cpu.array,this.dirty.start,this.dirty.start,this.dirty.end),this.dirty.start=Infinity,this.dirty.end=0)}reshuffle(a,f){if(0!==
f.length){a=a*this.strideInt*Uint32Array.BYTES_PER_ELEMENT;var n=this.byteSize>a,c=this._cpu,r=h.PooledUint32Array.create(a,this._pool);n||r.array.set(this._cpu.getUint32View(0,this.intSize));for(const k of f)if(n||k.srcFrom!==k.dstFrom||0!==k.mutate)for(this.dirty.start=Math.min(this.dirty.start,k.dstFrom*this.strideInt),this.dirty.end=Math.max(this.dirty.end,(k.dstFrom+k.count)*this.strideInt),f=0;f<k.count;f++){const p=(k.dstFrom+f)*this.strideInt,t=(k.srcFrom+f)*this.strideInt;for(let w=0;w<this.strideInt;w++)r.array[p+
w]=c.array[t+w]+k.mutate}this._cpu.destroy();this._cpu=r;n&&this.invalidate();this.freeList.clear();this.memoryStats.bytesUsed=this.memoryStats.bytesReserved=a}}_createBuffer(a){const f=d.Usage.DYNAMIC_DRAW;return"index"===this.bufferType?l.BufferObject.createIndex(a,f,this._cpu.array):l.BufferObject.createVertex(a,f,this._cpu.array)}_createComputeBuffer(a){const f=d.Usage.DYNAMIC_DRAW,n=new Uint32Array(this.fillPointer/3);for(let c=0;c<this.fillPointer;c+=3)n[c/3]=this._cpu.array[c];return l.BufferObject.createIndex(a,
f,n)}}e.MappedBuffer=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/PooledUint32Array":function(){define(["exports","../../../../core/has","../../../../core/maybe","./cpuMapped/FreeList"],function(e,g,q,h){const m=g("esri-2d-log-allocations");class l{static create(a,f){a=f.acquireUint32Array(a);return new l(a,f)}constructor(a,f){this._array=a;this._pool=f}get array(){return this._array}get length(){return this._array.length}getUint32View(a,f){return new Uint32Array(this._array.buffer,
a+this._array.byteOffset,f)}expand(a){a<=this._array.byteLength||(a=this._pool.acquireUint32Array(a),a.set(this._array),this._pool.releaseUint32Array(this._array),this._array=a)}destroy(){this._pool.releaseUint32Array(this._array)}}class d{constructor(){this._data=new ArrayBuffer(d.BYTE_LENGTH);this._freeList=new h.FreeList({start:0,end:this._data.byteLength})}static get BYTE_LENGTH(){return 16E6}get buffer(){return this._data}acquireUint32Array(a){const f=this._freeList.firstFit(a);return null==
f?null:new Uint32Array(this._data,f,a/Uint32Array.BYTES_PER_ELEMENT)}releaseUint32Array(a){this._freeList.free(a.byteOffset,a.byteLength)}}class b{constructor(){this._pages=[];this._pagesByBuffer=new Map;this._bytesAllocated=0}destroy(){this._pages=[];this._pagesByBuffer=null}get _bytesTotal(){return this._pages.length*d.BYTE_LENGTH}acquireUint32Array(a){this._bytesAllocated+=a;m&&console.log(`Allocating ${a}, (${this._bytesAllocated} / ${this._bytesTotal})`);if(a>=d.BYTE_LENGTH)return new Uint32Array(a/
Uint32Array.BYTES_PER_ELEMENT);for(const f of this._pages){const n=f.acquireUint32Array(a);if(null!=n)return n}a=this._addPage().acquireUint32Array(a);q.assertIsSome(a,"Expected to allocate page");return a}releaseUint32Array(a){this._bytesAllocated-=a.byteLength;m&&console.log(`Freeing ${a.byteLength}, (${this._bytesAllocated} / ${this._bytesTotal})`);const f=this._pagesByBuffer.get(a.buffer);f&&f.releaseUint32Array(a)}_addPage(){const a=new d;this._pages.push(a);this._pagesByBuffer.set(a.buffer,
a);return a}}e.ArrayBufferPool=b;e.PooledUint32Array=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/dataViewUtils":function(){define(["exports","../../../number","../../../../../../webgl/enums"],function(e,g,q){e.packDataView=function(h,m,l,d){const b=l.packPrecisionFactor??1;switch(l.type){case q.DataType.BYTE:if(1===l.count)h.setInt8(d+l.offset,m*b);else for(var a=0;a<l.count;a++)h.setInt8(d+l.offset+a*Int8Array.BYTES_PER_ELEMENT,
m[a]*b);break;case q.DataType.UNSIGNED_BYTE:if(1===l.count)h.setUint8(d+l.offset,m*b);else for(a=0;a<l.count;a++)h.setUint8(d+l.offset+a*Uint8Array.BYTES_PER_ELEMENT,m[a]*b);break;case q.DataType.SHORT:if(1===l.count)h.setInt16(d+l.offset,m*b,!0);else for(a=0;a<l.count;a++)h.setInt16(d+l.offset+a*Int16Array.BYTES_PER_ELEMENT,m[a]*b,!0);break;case q.DataType.UNSIGNED_SHORT:if(1===l.count)h.setUint16(d+l.offset,m*b,!0);else for(a=0;a<l.count;a++)h.setUint16(d+l.offset+a*Uint16Array.BYTES_PER_ELEMENT,
m[a]*b,!0);break;case q.DataType.INT:if(1===l.count)h.setInt32(d+l.offset,m*b,!0);else for(a=0;a<l.count;a++)h.setInt32(d+l.offset+a*Int32Array.BYTES_PER_ELEMENT,m[a]*b,!0);break;case q.DataType.UNSIGNED_INT:if(1===l.count)h.setUint32(d+l.offset,m*b,!0);else for(a=0;a<l.count;a++)h.setUint32(d+l.offset+a*Uint32Array.BYTES_PER_ELEMENT,m[a]*b,!0);break;case q.DataType.FLOAT:if(1===l.count)h.setFloat32(d+l.offset,m*b,!0);else for(a=0;a<l.count;a++)h.setFloat32(d+l.offset+a*Float32Array.BYTES_PER_ELEMENT,
m[a]*b,!0);break;case q.DataType.HALF_FLOAT:if(1===l.count)h.setUint16(d+l.offset,g.toUint16(m*b),!0);else for(a=0;a<l.count;a++)h.setUint16(d+l.offset+a*Uint16Array.BYTES_PER_ELEMENT,g.toUint16(m[a]*b),!0)}};e.unpackDataView=function(h,m,l){switch(m.type){case q.DataType.BYTE:if(1===m.count)return h.getInt8(l+m.offset);var d=[];for(var b=0;b<m.count;b++)d.push(h.getInt8(l+m.offset+b*Int8Array.BYTES_PER_ELEMENT));return d;case q.DataType.UNSIGNED_BYTE:if(1===m.count)return h.getUint8(l+m.offset);
d=[];for(b=0;b<m.count;b++)d.push(h.getUint8(l+m.offset+b*Uint8Array.BYTES_PER_ELEMENT));return d;case q.DataType.SHORT:if(1===m.count)return h.getInt16(l+m.offset,!0);d=[];for(b=0;b<m.count;b++)d.push(h.getInt16(l+m.offset+b*Int16Array.BYTES_PER_ELEMENT,!0));return d;case q.DataType.UNSIGNED_SHORT:if(1===m.count)return h.getUint16(l+m.offset,!0);d=[];for(b=0;b<m.count;b++)d.push(h.getUint16(l+m.offset+b*Uint16Array.BYTES_PER_ELEMENT,!0));return d;case q.DataType.INT:if(1===m.count)return h.getInt32(l+
m.offset,!0);d=[];for(b=0;b<m.count;b++)d.push(h.getInt32(l+m.offset+b*Int32Array.BYTES_PER_ELEMENT,!0));return d;case q.DataType.UNSIGNED_INT:if(1===m.count)return h.getUint32(l+m.offset,!0);d=[];for(b=0;b<m.count;b++)d.push(h.getUint32(l+m.offset+b*Uint32Array.BYTES_PER_ELEMENT,!0));return d;case q.DataType.FLOAT:if(1===m.count)return h.getFloat32(l+m.offset,!0);d=[];for(b=0;b<m.count;b++)d.push(h.getFloat32(l+m.offset+b*Float32Array.BYTES_PER_ELEMENT,!0));return d;case q.DataType.HALF_FLOAT:if(1===
m.count)return g.fromUint16(h.getUint16(l+m.offset,!0));d=[];for(b=0;b<m.count;b++)d.push(g.fromUint16(h.getUint16(l+m.offset+b*Uint16Array.BYTES_PER_ELEMENT,!0)));return d}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/mesh/meshDebugUtils":function(){define(["exports","../DisplayEntity","../shaderGraph/techniques/mesh/dataViewUtils","../util/Reader","../util/serializationUtils"],function(e,g,q,h,m){function l(d){const b=d.layout.stride,a=new DataView(d.vertices),
f=[],n=d.vertices.byteLength/b;let c=0;for(let r=0;r<n;r++){const k={};for(const p of d.layout.attributes){let t=`${p.offset} ${p.name}`,w=q.unpackDataView(a,p,c);if(p.packPrecisionFactor)if(t+=` (precision: ${p.packPrecisionFactor})`,"number"===typeof w)w/=p.packPrecisionFactor;else for(let u=0;u<w.length;u++)w[u]/=p.packPrecisionFactor;k[t]=w}c+=b;f.push(k)}return{vertices:f,layout:d.layout}}e.debugMeshDataInfo=function(d){if(!d)return null;const b=m.deserializeList(new h(d.entities),g);d=d.data.map(l);
return{entities:b,vertexData:d}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/util/Reader":function(){define(function(){class e{constructor(g){this._pos=0;this._buffer=g;this._i32View=new Int32Array(this._buffer);this._f32View=new Float32Array(this._buffer)}readInt32(){return this._i32View[this._pos++]}readF32(){return this._f32View[this._pos++]}}return e})},"esri/views/2d/engine/webgl/shaders/TileInfoPrograms":function(){define(["exports","./sources/resolver"],
function(e,g){g={shaders:{vertexShader:g.resolveIncludes("tileInfo/tileInfo.vert"),fragmentShader:g.resolveIncludes("tileInfo/tileInfo.frag")},attributes:new Map([["a_pos",0]])};e.tileInfo=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushVTLBackground":function(){define("exports ../../../../../core/mathUtils ../../../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../../../core/libs/gl-matrix-2/factories/vec4f32 ../definitions ./WGLBrush ../../../../webgl/BufferObject ../../../../webgl/enums ../../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b,a){class f extends l{constructor(){super(...arguments);this._color=h.fromValues(1,0,0,1);this._patternMatrix=q.create();this._programOptions={id:!1,pattern:!1}}dispose(){this._vao&&(this._vao.dispose(),this._vao=null)}drawMany(n,c){const {context:r,painter:k,requestRender:p,allowDelayedRender:t}=n;this._loadWGLResources(n);const w=n.displayLevel;var u=n.styleLayer,y=u.backgroundMaterial;const x=k.vectorTilesMaterialManager;var v=u.getPaintValue("background-color",w),A=u.getPaintValue("background-opacity",
w);const z=u.getPaintValue("background-pattern",w),B=void 0!==z,D=n.spriteMosaic;let F,E;n=(window.devicePixelRatio|1)>m.vtlHighResCutoff?2:1;const C=this._programOptions;C.pattern=B;y=x.getMaterialProgram(r,y,C);if(t&&null!=p&&!y.compiled)p();else{r.bindVAO(this._vao);r.useProgram(y);if(B){v=D.getMosaicItemPosition(z,!0);if(null!=v){const {tl:G,br:H,page:K}=v;F=H[0]-G[0];E=H[1]-G[1];v=D.getPageSize(K);null!=v&&(D.bind(r,b.TextureSamplingMode.LINEAR,K,m.vtlTextureBindingUnitSprites),y.setUniform4f("u_tlbr",
G[0],G[1],H[0],H[1]),y.setUniform2fv("u_mosaicSize",v),y.setUniform1i("u_texture",m.vtlTextureBindingUnitSprites))}y.setUniform1f("u_opacity",A)}else A*=v[3],this._color[0]=A*v[0],this._color[1]=A*v[1],this._color[2]=A*v[2],this._color[3]=A,y.setUniform4fv("u_color",this._color);y.setUniform1f("u_depth",u.z||0);for(const G of c)y.setUniform1f("u_coord_range",G.rangeX),y.setUniformMatrix3fv("u_dvsMat3",G.transforms.displayViewScreenMat3),B&&(u=n*G.width*Math.max(2**(Math.round(w)-G.key.level),1),c=
u/g.nextPowerOfTwo(F),u/=g.nextPowerOfTwo(E),this._patternMatrix[0]=c,this._patternMatrix[4]=u,y.setUniformMatrix3fv("u_pattern_matrix",this._patternMatrix)),r.setStencilFunction(b.CompareFunction.EQUAL,0,255),r.drawArrays(b.PrimitiveType.TRIANGLE_STRIP,0,4)}}_loadWGLResources(n){if(!this._vao){var {context:c,styleLayer:r}=n;n=r.backgroundMaterial;var k=new Int8Array([0,0,1,0,0,1,1,1]);k=d.BufferObject.createVertex(c,b.Usage.STATIC_DRAW,k);this._vao=new a.VertexArrayObject(c,n.getAttributeLocations(),
n.getLayoutInfo(),{geometry:k})}}}e.WGLBrushVTLBackground=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushVTLCircle":function(){define(["exports","../../vectorTiles/style/StyleDefinition","./WGLBrush","../../../../webgl/enums"],function(e,g,q,h){class m extends q{constructor(){super(...arguments);this._programOptions={id:!1}}dispose(){}drawMany(l,d){const {context:b,displayLevel:a,requiredLevel:f,state:n,painter:c,spriteMosaic:r,styleLayerUID:k,
requestRender:p,allowDelayedRender:t}=l;if(d.some(v=>v.layerData.get(k)?.circleIndexCount??!1)){l=l.styleLayer;var w=l.circleMaterial,u=c.vectorTilesMaterialManager,y=l.getPaintValue("circle-translate",a),x=l.getPaintValue("circle-translate-anchor",a);u=u.getMaterialProgram(b,w,this._programOptions);if(t&&null!=p&&!u.compiled)p();else{b.useProgram(u);u.setUniformMatrix3fv("u_displayMat3",x===g.TranslateAnchor.VIEWPORT?n.displayMat3:n.displayViewMat3);u.setUniform2fv("u_circleTranslation",y);u.setUniform1f("u_depth",
l.z);u.setUniform1f("u_antialiasingWidth",1.2);y=-1;for(const v of d)v.layerData.has(k)&&(v.key.level!==y&&(y=v.key.level,w.setDataUniforms(u,a,l,y,r)),d=v.layerData.get(k),d.circleIndexCount&&(d.prepareForRendering(b),x=d.vao,null!=x&&(b.bindVAO(x),u.setUniformMatrix3fv("u_dvsMat3",v.transforms.displayViewScreenMat3),f!==v.key.level?b.setStencilFunction(h.CompareFunction.EQUAL,v.stencilRef,255):b.setStencilFunction(h.CompareFunction.GREATER,255,255),b.drawElements(h.PrimitiveType.TRIANGLES,d.circleIndexCount,
h.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*d.circleIndexStart),v.triangleCount+=d.circleIndexCount/3)))}}}}e.WGLBrushVTLCircle=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/StyleDefinition":function(){define(["exports","../../../../../symbols/cim/enums"],function(e,g){e.StyleLayerType=void 0;(function(h){h[h.BACKGROUND=0]="BACKGROUND";h[h.FILL=1]="FILL";h[h.LINE=2]="LINE";h[h.SYMBOL=3]="SYMBOL";h[h.CIRCLE=4]="CIRCLE"})(e.StyleLayerType||
(e.StyleLayerType={}));e.Visibility=void 0;(function(h){h[h.VISIBLE=0]="VISIBLE";h[h.NONE=1]="NONE"})(e.Visibility||(e.Visibility={}));e.SymbolPlacement=void 0;(function(h){h[h.POINT=0]="POINT";h[h.LINE=1]="LINE";h[h.LINE_CENTER=2]="LINE_CENTER"})(e.SymbolPlacement||(e.SymbolPlacement={}));e.RotationAlignment=void 0;(function(h){h[h.MAP=0]="MAP";h[h.VIEWPORT=1]="VIEWPORT";h[h.AUTO=2]="AUTO"})(e.RotationAlignment||(e.RotationAlignment={}));e.TextJustification=void 0;(function(h){h[h.AUTO=0]="AUTO";
h[h.LEFT=1]="LEFT";h[h.CENTER=2]="CENTER";h[h.RIGHT=3]="RIGHT"})(e.TextJustification||(e.TextJustification={}));e.SymbolAnchor=void 0;(function(h){h[h.CENTER=0]="CENTER";h[h.LEFT=1]="LEFT";h[h.RIGHT=2]="RIGHT";h[h.TOP=3]="TOP";h[h.BOTTOM=4]="BOTTOM";h[h.TOP_LEFT=5]="TOP_LEFT";h[h.TOP_RIGHT=6]="TOP_RIGHT";h[h.BOTTOM_LEFT=7]="BOTTOM_LEFT";h[h.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"})(e.SymbolAnchor||(e.SymbolAnchor={}));e.TextTransform=void 0;(function(h){h[h.NONE=0]="NONE";h[h.UPPERCASE=1]="UPPERCASE";h[h.LOWERCASE=
2]="LOWERCASE"})(e.TextTransform||(e.TextTransform={}));e.TranslateAnchor=void 0;(function(h){h[h.MAP=0]="MAP";h[h.VIEWPORT=1]="VIEWPORT"})(e.TranslateAnchor||(e.TranslateAnchor={}));e.TextWritingMode=void 0;(function(h){h[h.HORIZONTAL=0]="HORIZONTAL";h[h.VERTICAL=1]="VERTICAL"})(e.TextWritingMode||(e.TextWritingMode={}));class q{}q.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:e.Visibility.VISIBLE}};q.fillLayoutDefinition={visibility:{type:"enum",values:["visible",
"none"],default:e.Visibility.VISIBLE}};q.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:e.Visibility.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:g.CapType.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:g.JoinType.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}};q.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:e.Visibility.VISIBLE},
"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:e.SymbolPlacement.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:"center left right top bottom top-left top-right bottom-left bottom-right".split(" "),default:e.SymbolAnchor.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},
"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:e.RotationAlignment.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",
values:"center left right top bottom top-left top-right bottom-left bottom-right".split(" "),default:e.SymbolAnchor.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:e.TextJustification.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},
"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:e.RotationAlignment.AUTO},"text-size":{type:"number",minimum:0,default:16},
"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:e.TextTransform.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[e.TextWritingMode.HORIZONTAL]}};q.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:e.Visibility.VISIBLE}};q.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}};
q.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:e.TranslateAnchor.MAP}};q.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",
default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:e.TranslateAnchor.MAP},"line-width":{type:"number",minimum:0,default:1}};q.symbolPaintDefinition={"icon-color":{type:"color",
default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:e.TranslateAnchor.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},
"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:e.TranslateAnchor.MAP}};q.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",
minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}};q.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",
minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:e.TranslateAnchor.MAP}};e.StyleDefinition=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushVTLFill":function(){define(["exports",
"../../vectorTiles/style/StyleDefinition","../definitions","./WGLBrush","../../../../webgl/enums"],function(e,g,q,h,m){const l=1/65536;class d extends h{constructor(){super(...arguments);this._fillProgramOptions={id:!1,pattern:!1};this._outlineProgramOptions={id:!1}}dispose(){}drawMany(b,a){const {displayLevel:f,renderPass:n,spriteMosaic:c,styleLayerUID:r}=b;var k=!1;for(var p of a)if(p.layerData.has(r)){var t=p.layerData.get(r);if(0<t.fillIndexCount||0<t.outlineIndexCount){k=!0;break}}if(k){k=b.styleLayer;
var w=k.getPaintProperty("fill-pattern");t=(p=void 0!==w)&&w.isDataDriven;if(p&&!t){var u=w.getValue(f);u=c.getMosaicItemPosition(u,!0)}w=!p&&k.getPaintValue("fill-antialias",f);var y=!0,x=1;if(!p){var v=k.getPaintProperty("fill-color"),A=k.getPaintProperty("fill-opacity");v?.isDataDriven||A?.isDataDriven||(x=k.getPaintValue("fill-color",f),x=k.getPaintValue("fill-opacity",f)*x[3],1<=x&&(y=!1))}y&&"opaque"===n||(v=k.getPaintValue("fill-translate",f),A=k.getPaintValue("fill-translate-anchor",f),(y||
"translucent"!==n)&&this._drawFill(b,r,k,a,v,A,p,u,t),u=!k.hasDataDrivenOutlineColor&&k.outlineUsesFillColor&&1>x,w&&"opaque"!==n&&!u&&this._drawOutline(b,r,k,a,v,A))}}_drawFill(b,a,f,n,c,r,k,p,t){if(!k||t||null!=p){var {context:w,displayLevel:u,state:y,painter:x,pixelRatio:v,spriteMosaic:A,requestRender:z,allowDelayedRender:B}=b;b=f.fillMaterial;var D=x.vectorTilesMaterialManager,F=v>q.vtlHighResCutoff?2:1,E=this._fillProgramOptions;E.pattern=k;D=D.getMaterialProgram(w,b,E);if(B&&null!=z&&!D.compiled)z();
else{w.useProgram(D);null!=p&&({page:p}=p,E=A.getPageSize(p),null!=E&&(A.bind(w,m.TextureSamplingMode.LINEAR,p,q.vtlTextureBindingUnitSprites),D.setUniform2fv("u_mosaicSize",E),D.setUniform1i("u_texture",q.vtlTextureBindingUnitSprites)));D.setUniformMatrix3fv("u_displayMat3",r===g.TranslateAnchor.VIEWPORT?y.displayMat3:y.displayViewMat3);D.setUniform2fv("u_fillTranslation",c);D.setUniform1f("u_depth",f.z+l);c=-1;for(const C of n)if(C.layerData.has(a)&&(C.key.level!==c&&(c=C.key.level,b.setDataUniforms(D,
u,f,c,A)),n=C.layerData.get(a),n.fillIndexCount&&(n.prepareForRendering(w),r=n.fillVAO,null!=r))){w.bindVAO(r);D.setUniformMatrix3fv("u_dvsMat3",C.transforms.displayViewScreenMat3);w.setStencilFunction(m.CompareFunction.EQUAL,C.stencilRef,255);k&&D.setUniform1f("u_patternFactor",C.rangeX/(F*C.width*Math.max(2**(Math.round(u)-C.key.level),1)));if(t){r=n.patternMap;if(!r)continue;for(const [G,H]of r)r=A.getPageSize(G),null!=r&&(A.bind(w,m.TextureSamplingMode.LINEAR,G,q.vtlTextureBindingUnitSprites),
D.setUniform2fv("u_mosaicSize",r),D.setUniform1i("u_texture",q.vtlTextureBindingUnitSprites),w.drawElements(m.PrimitiveType.TRIANGLES,H[1],m.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*H[0]))}else w.drawElements(m.PrimitiveType.TRIANGLES,n.fillIndexCount,m.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*n.fillIndexStart);C.triangleCount+=n.fillIndexCount/3}}}}_drawOutline(b,a,f,n,c,r){const {context:k,displayLevel:p,state:t,painter:w,pixelRatio:u,spriteMosaic:y,requestRender:x,allowDelayedRender:v}=
b;b=f.outlineMaterial;const A=.75/u,z=w.vectorTilesMaterialManager.getMaterialProgram(k,b,this._outlineProgramOptions);if(v&&null!=x&&!z.compiled)x();else{k.useProgram(z);z.setUniformMatrix3fv("u_displayMat3",r===g.TranslateAnchor.VIEWPORT?t.displayMat3:t.displayViewMat3);z.setUniform2fv("u_fillTranslation",c);z.setUniform1f("u_depth",f.z+l);z.setUniform1f("u_outline_width",A);c=-1;for(const B of n)B.layerData.has(a)&&(B.key.level!==c&&(c=B.key.level,b.setDataUniforms(z,p,f,c,y)),n=B.layerData.get(a),
n.prepareForRendering(k),n.outlineIndexCount&&(r=n.outlineVAO,null!=r&&(k.bindVAO(r),z.setUniformMatrix3fv("u_dvsMat3",B.transforms.displayViewScreenMat3),k.setStencilFunction(m.CompareFunction.EQUAL,B.stencilRef,255),k.drawElements(m.PrimitiveType.TRIANGLES,n.outlineIndexCount,m.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*n.outlineIndexStart),B.triangleCount+=n.outlineIndexCount/3)))}}}e.WGLBrushVTLFill=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushVTLLine":function(){define(["exports",
"../../vectorTiles/style/StyleDefinition","../definitions","./WGLBrush","../../../../webgl/enums"],function(e,g,q,h,m){class l extends h{constructor(){super(...arguments);this._programOptions={id:!1,pattern:!1,sdf:!1}}dispose(){}drawMany(d,b){const {context:a,displayLevel:f,state:n,painter:c,pixelRatio:r,spriteMosaic:k,styleLayerUID:p,requestRender:t,allowDelayedRender:w}=d;if(b.some(G=>G.layerData.get(p)?.lineIndexCount??!1)){d=d.styleLayer;var u=d.lineMaterial,y=c.vectorTilesMaterialManager,x=d.getPaintValue("line-translate",
f),v=d.getPaintValue("line-translate-anchor",f),A=d.getPaintProperty("line-pattern"),z=void 0!==A,B=z&&A.isDataDriven;if(z&&!B){A=A.getValue(f);var D=k.getMosaicItemPosition(A)}var F;A=!1;if(!z){var E=d.getPaintProperty("line-dasharray");A=(F=void 0!==E)&&E.isDataDriven;F&&!A&&(D=E.getValue(f),D=d.getDashKey(D,d.getLayoutValue("line-cap",f)),D=k.getMosaicItemPosition(D))}E=1/r;var C=this._programOptions;C.pattern=z;C.sdf=F;F=y.getMaterialProgram(a,u,C);if(w&&null!=t&&!F.compiled)t();else{a.useProgram(F);
F.setUniformMatrix3fv("u_displayViewMat3",n.displayViewMat3);F.setUniformMatrix3fv("u_displayMat3",v===g.TranslateAnchor.VIEWPORT?n.displayMat3:n.displayViewMat3);F.setUniform2fv("u_lineTranslation",x);F.setUniform1f("u_depth",d.z);F.setUniform1f("u_antialiasing",E);D&&null!=D&&({page:x}=D,v=k.getPageSize(x),null!=v&&(k.bind(a,m.TextureSamplingMode.LINEAR,x,q.vtlTextureBindingUnitSprites),F.setUniform2fv("u_mosaicSize",v),F.setUniform1i("u_texture",q.vtlTextureBindingUnitSprites)));x=-1;for(const G of b)if(G.layerData.has(p)&&
(G.key.level!==x&&(x=G.key.level,u.setDataUniforms(F,f,d,x,k)),F.setUniform1f("u_zoomFactor",2**(f-x)/r),b=G.layerData.get(p),b.lineIndexCount&&(b.prepareForRendering(a),v=b.vao,null!=v))){a.bindVAO(v);F.setUniformMatrix3fv("u_dvsMat3",G.transforms.displayViewScreenMat3);a.setStencilFunction(m.CompareFunction.EQUAL,G.stencilRef,255);if(B||A){v=b.patternMap;if(!v)continue;for(const [H,K]of v)v=k.getPageSize(H),null!=v&&(k.bind(a,m.TextureSamplingMode.LINEAR,H,q.vtlTextureBindingUnitSprites),F.setUniform2fv("u_mosaicSize",
v),F.setUniform1i("u_texture",q.vtlTextureBindingUnitSprites),a.drawElements(m.PrimitiveType.TRIANGLES,K[1],m.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*K[0]))}else a.drawElements(m.PrimitiveType.TRIANGLES,b.lineIndexCount,m.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*b.lineIndexStart);G.triangleCount+=b.lineIndexCount/3}}}}}e.WGLBrushVTLLine=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol":function(){define("exports ../../../../../core/libs/gl-matrix-2/factories/vec2f32 ../../vectorTiles/decluttering/config ../../vectorTiles/style/StyleDefinition ../definitions ../GeometryUtils ./WGLBrush ../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b){const a=1/65536;class f extends d{constructor(){super(...arguments);this._iconProgramOptions={id:!1,sdf:!1};this._sdfProgramOptions={id:!1};this._spritesTextureSize=g.create()}dispose(){}drawMany(n,c){const r=n.styleLayer;this._drawIcons(n,r,c);this._drawText(n,r,c)}_drawIcons(n,c,r){const {context:k,displayLevel:p,painter:t,spriteMosaic:w,state:u,styleLayerUID:y,requestRender:x,allowDelayedRender:v}=n,A=c.iconMaterial;var z=t.vectorTilesMaterialManager;let B;var D=!1;for(var F of r)if(F.layerData.has(y)&&
(B=F.layerData.get(y),0<B.iconPerPageElementsMap.size)){D=!0;break}if(D){D=c.getPaintValue("icon-translate",p);F=c.getPaintValue("icon-translate-anchor",p);var E=c.getLayoutValue("icon-rotation-alignment",p);E===h.RotationAlignment.AUTO&&(E=c.getLayoutValue("symbol-placement",p)===h.SymbolPlacement.POINT?h.RotationAlignment.VIEWPORT:h.RotationAlignment.MAP);var C=E===h.RotationAlignment.MAP;C=c.getLayoutValue("icon-keep-upright",p)&&C;var G=this._iconProgramOptions;G.sdf=B.isIconSDF;z=z.getMaterialProgram(k,
A,G);if(v&&null!=x&&!z.compiled)x();else{k.useProgram(z);z.setUniformMatrix3fv("u_displayViewMat3",E===h.RotationAlignment.MAP?u.displayViewMat3:u.displayMat3);z.setUniformMatrix3fv("u_displayMat3",F===h.TranslateAnchor.VIEWPORT?u.displayMat3:u.displayViewMat3);z.setUniform2fv("u_iconTranslation",D);z.setUniform1f("u_depth",c.z);z.setUniform1f("u_mapRotation",l.degToByte(u.rotation));z.setUniform1f("u_keepUpright",C?1:0);z.setUniform1f("u_level",10*p);z.setUniform1i("u_texture",m.vtlTextureBindingUnitSprites);
z.setUniform1f("u_fadeDuration",q.fadeDuration/1E3);D=-1;for(const H of r)if(H.layerData.has(y)&&(H.key.level!==D&&(D=H.key.level,A.setDataUniforms(z,p,c,D,w)),B=H.layerData.get(y),0!==B.iconPerPageElementsMap.size&&(B.prepareForRendering(k),B.updateOpacityInfo(),r=B.iconVAO,null!=r))){k.bindVAO(r);z.setUniformMatrix3fv("u_dvsMat3",H.transforms.displayViewScreenMat3);z.setUniform1f("u_time",(performance.now()-B.lastOpacityUpdate)/1E3);for(const [K,J]of B.iconPerPageElementsMap)this._renderIconRange(n,
z,J,K,H)}}}}_renderIconRange(n,c,r,k,p){const {context:t,spriteMosaic:w}=n;this._spritesTextureSize[0]=w.getWidth(k)/4;this._spritesTextureSize[1]=w.getHeight(k)/4;c.setUniform2fv("u_mosaicSize",this._spritesTextureSize);w.bind(t,b.TextureSamplingMode.LINEAR,k,m.vtlTextureBindingUnitSprites);this._setStencilState(n,p);t.drawElements(b.PrimitiveType.TRIANGLES,r[1],b.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*r[0]);p.triangleCount+=r[1]/3}_drawText(n,c,r){const {context:k,displayLevel:p,glyphMosaic:t,
painter:w,pixelRatio:u,spriteMosaic:y,state:x,styleLayerUID:v,requestRender:A,allowDelayedRender:z}=n,B=c.textMaterial;var D=w.vectorTilesMaterialManager,F=!1;for(var E of r)if(E.layerData.has(v)){var C=E.layerData.get(v);if(0<C.glyphPerPageElementsMap.size){F=!0;break}}if(F&&(C=c.getPaintProperty("text-opacity"),!C||C.isDataDriven||0!==C.getValue(p))){C=c.getPaintProperty("text-color");var G=!C||C.isDataDriven||0<C.getValue(p)[3];C=c.getPaintProperty("text-halo-width");F=c.getPaintProperty("text-halo-color");
var H=(!C||C.isDataDriven||0<C.getValue(p))&&(!F||F.isDataDriven||0<F.getValue(p)[3]);if(G||H){C=c.getLayoutValue("text-rotation-alignment",p);C===h.RotationAlignment.AUTO&&(C=c.getLayoutValue("symbol-placement",p)===h.SymbolPlacement.POINT?h.RotationAlignment.VIEWPORT:h.RotationAlignment.MAP);F=C===h.RotationAlignment.MAP;F=c.getLayoutValue("text-keep-upright",p)&&F;E=.8*3/u;this._glyphTextureSize||(this._glyphTextureSize=g.fromValues(t.width/4,t.height/4));var K=c.getPaintValue("text-translate",
p),J=c.getPaintValue("text-translate-anchor",p),O=D.getMaterialProgram(k,B,this._sdfProgramOptions);if(z&&null!=A&&!O.compiled)A();else{k.useProgram(O);O.setUniformMatrix3fv("u_displayViewMat3",C===h.RotationAlignment.MAP?x.displayViewMat3:x.displayMat3);O.setUniformMatrix3fv("u_displayMat3",J===h.TranslateAnchor.VIEWPORT?x.displayMat3:x.displayViewMat3);O.setUniform2fv("u_textTranslation",K);O.setUniform1f("u_depth",c.z+a);O.setUniform2fv("u_mosaicSize",this._glyphTextureSize);O.setUniform1f("u_mapRotation",
l.degToByte(x.rotation));O.setUniform1f("u_keepUpright",F?1:0);O.setUniform1f("u_level",10*p);O.setUniform1i("u_texture",m.vtlTextureBindingUnitGlyphs);O.setUniform1f("u_antialiasingWidth",E);O.setUniform1f("u_fadeDuration",q.fadeDuration/1E3);D=-1;for(const Q of r)Q.layerData.has(v)&&(Q.key.level!==D&&(D=Q.key.level,B.setDataUniforms(O,p,c,D,y)),C=Q.layerData.get(v),0!==C.glyphPerPageElementsMap.size&&(C.prepareForRendering(k),C.updateOpacityInfo(),r=C.textVAO,null!=r&&(k.bindVAO(r),O.setUniformMatrix3fv("u_dvsMat3",
Q.transforms.displayViewScreenMat3),this._setStencilState(n,Q),r=(performance.now()-C.lastOpacityUpdate)/1E3,O.setUniform1f("u_time",r),C.glyphPerPageElementsMap.forEach((T,I)=>{this._renderGlyphRange(k,T,I,t,O,H,G,Q)}))))}}}}_renderGlyphRange(n,c,r,k,p,t,w,u){k.bind(n,b.TextureSamplingMode.LINEAR,r,m.vtlTextureBindingUnitGlyphs);t&&(p.setUniform1f("u_halo",1),n.drawElements(b.PrimitiveType.TRIANGLES,c[1],b.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*c[0]),u.triangleCount+=c[1]/3);w&&(p.setUniform1f("u_halo",
0),n.drawElements(b.PrimitiveType.TRIANGLES,c[1],b.DataType.UNSIGNED_INT,Uint32Array.BYTES_PER_ELEMENT*c[0]),u.triangleCount+=c[1]/3)}_setStencilState(n,c){const {context:r,is3D:k,stencilSymbols:p}=n;r.setStencilTestEnabled(!0);p?(r.setStencilWriteMask(255),r.setStencilFunction(b.CompareFunction.ALWAYS,c.stencilRef,255)):(r.setStencilWriteMask(0),k?r.setStencilFunction(b.CompareFunction.EQUAL,c.stencilRef,255):r.setStencilFunction(b.CompareFunction.GREATER,255,255))}}e.WGLBrushVTLSymbol=f;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/decluttering/config":function(){define(["exports"],function(e){e.collisionGridCellSize=32;e.declutterBudget=1.5;e.declutterTiles=!0;e.fadeDuration=200;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/GeometryUtils":function(){define(["exports"],function(e){function g(l,d){l%=d;return 0<=l?l:l+d}const q=128/Math.PI,h=256/360,m=1/Math.LN2;e.between=function(l,d,b){return l>=d&&l<=b||
l>=b&&l<=d};e.degToByte=function(l){return g(l*h,256)};e.interpolate=function(l,d,b){return l*(1-b)+d*b};e.log2=function(l){return Math.log(l)*m};e.positiveMod=g;e.radToByte=function(l){return g(l*q,256)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLMaterialManager":function(){define(["../enums","./Programs"],function(e,g){class q{constructor(){this._programByKey=new Map}dispose(){this._programByKey.forEach(h=>h.dispose());this._programByKey.clear()}getMaterialProgram(h,
m,l){const d=m.key<<3|this._getMaterialOptionsValue(m.type,l);if(this._programByKey.has(d))return this._programByKey.get(d);var b=this._getProgramTemplate(m.type);({shaders:b}=b);const {vertexShader:a,fragmentShader:f}=b(l);l=m.getShaderHeader();b=m.getShaderMain();l=a.replace("#pragma header",l).replace("#pragma main",b);h=h.programCache.acquire(l,f,m.getAttributeLocations());this._programByKey.set(d,h);return h}_getMaterialOptionsValue(h,m){switch(h){case e.ShaderProgramType.BACKGROUND:return(m.pattern?
1:0)<<1;case e.ShaderProgramType.FILL:return(m.pattern?1:0)<<1;case e.ShaderProgramType.OUTLINE:return 0;case e.ShaderProgramType.LINE:return(m.sdf?1:0)<<2|(m.pattern?1:0)<<1;case e.ShaderProgramType.ICON:return(m.sdf?1:0)<<1;case e.ShaderProgramType.CIRCLE:return 0;case e.ShaderProgramType.TEXT:return 0;default:return 0}}_getProgramTemplate(h){switch(h){case e.ShaderProgramType.BACKGROUND:return g.background;case e.ShaderProgramType.CIRCLE:return g.circle;case e.ShaderProgramType.FILL:return g.fill;
case e.ShaderProgramType.ICON:return g.icon;case e.ShaderProgramType.LINE:return g.line;case e.ShaderProgramType.OUTLINE:return g.outline;case e.ShaderProgramType.TEXT:return g.text;default:return null}}}return q})},"esri/views/2d/engine/vectorTiles/enums":function(){define(["exports"],function(e){e.BucketType=void 0;(function(g){g[g.FILL=1]="FILL";g[g.LINE=2]="LINE";g[g.SYMBOL=3]="SYMBOL";g[g.CIRCLE=4]="CIRCLE"})(e.BucketType||(e.BucketType={}));e.ShaderProgramType=void 0;(function(g){g[g.BACKGROUND=
0]="BACKGROUND";g[g.FILL=1]="FILL";g[g.OUTLINE=2]="OUTLINE";g[g.LINE=3]="LINE";g[g.ICON=4]="ICON";g[g.CIRCLE=5]="CIRCLE";g[g.TEXT=6]="TEXT";g[g.TILEINFO=7]="TILEINFO"})(e.ShaderProgramType||(e.ShaderProgramType={}));e.StyleUpdateType=void 0;(function(g){g[g.PAINTER_CHANGED=0]="PAINTER_CHANGED";g[g.LAYOUT_CHANGED=1]="LAYOUT_CHANGED";g[g.LAYER_CHANGED=2]="LAYER_CHANGED";g[g.LAYER_REMOVED=3]="LAYER_REMOVED";g[g.SPRITES_CHANGED=4]="SPRITES_CHANGED"})(e.StyleUpdateType||(e.StyleUpdateType={}));Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/Programs":function(){define(["exports","./sources/resolver","../../../../webgl/programUtils"],function(e,g,q){e.background={shaders:h=>({vertexShader:q.glslifyDefineMap({PATTERN:h.pattern})+g.resolveIncludes("background/background.vert"),fragmentShader:q.glslifyDefineMap({PATTERN:h.pattern})+g.resolveIncludes("background/background.frag")})};e.circle={shaders:h=>({vertexShader:g.resolveIncludes("circle/circle.vert"),
fragmentShader:g.resolveIncludes("circle/circle.frag")})};e.fill={shaders:h=>({vertexShader:q.glslifyDefineMap({PATTERN:h.pattern})+g.resolveIncludes("fill/fill.vert"),fragmentShader:q.glslifyDefineMap({PATTERN:h.pattern})+g.resolveIncludes("fill/fill.frag")})};e.icon={shaders:h=>({vertexShader:q.glslifyDefineMap({SDF:h.sdf})+g.resolveIncludes("icon/icon.vert"),fragmentShader:q.glslifyDefineMap({SDF:h.sdf})+g.resolveIncludes("icon/icon.frag")})};e.line={shaders:h=>({vertexShader:q.glslifyDefineMap({PATTERN:h.pattern,
SDF:h.sdf})+g.resolveIncludes("line/line.vert"),fragmentShader:q.glslifyDefineMap({PATTERN:h.pattern,SDF:h.sdf})+g.resolveIncludes("line/line.frag")})};e.outline={shaders:h=>({vertexShader:g.resolveIncludes("outline/outline.vert"),fragmentShader:g.resolveIncludes("outline/outline.frag")})};e.text={shaders:h=>({vertexShader:g.resolveIncludes("text/text.vert"),fragmentShader:g.resolveIncludes("text/text.frag")})};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/sources/resolver":function(){define(["exports",
"./shaderRepository","../../../../../webgl/ShaderCompiler"],function(e,g,q){const h=new q.ShaderCompiler(function(m){let l=g;m.split("/").forEach(d=>{l&&=l[d]});return l});e.resolveIncludes=function(m){return h.resolveIncludes(m)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/sources/shaderRepository":function(){define(function(){return{background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord \x3d mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos \x3d mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color \x3d texture2D(u_texture, samplePos);\ngl_FragColor \x3d u_opacity * color;\n#else\ngl_FragColor \x3d u_color;\n#endif\n}",
"background.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position \x3d vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord \x3d (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr \x3d u_tlbr / u_mosaicSize.xyxy;\n#endif\n}"},
circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nvoid main()\n{\nmediump float dist \x3d length(v_offset);\nmediump float alpha \x3d smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio \x3d v_stroke_width \x3c 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor \x3d alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n}",
"circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color \x3d color * opacity;\nv_stroke_color \x3d stroke_color * stroke_opacity;\nv_stroke_width \x3d stroke_width;\nv_radius \x3d radius;\nv_blur \x3d max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset \x3d vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset \x3d offset;\nmediump vec3 pos \x3d u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth, 1.0);\n}"},
fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha \x3d color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor \x3d color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord \x3d fract(v_tileTextureCoord);\nmediump vec2 samplePos \x3d mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color \x3d texture2D(u_texture, samplePos);\ngl_FragColor \x3d v_color[3] * color;\n#else\ngl_FragColor \x3d v_color;\n#endif\n}",
"fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include \x3cutil/util.glsl\x3e\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color \x3d color * opacity;\n#ifdef PATTERN\nfloat patternWidth \x3d nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight \x3d nextPOT(tlbr.w - tlbr.y);\nfloat scaleX \x3d 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY \x3d 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat \x3d mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord \x3d (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr \x3d tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos \x3d u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth, 1.0);\n}"},
icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump flaot v_halo_width;\n#endif\n#include \x3cutil/encoding.glsl\x3e\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha \x3d color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor \x3d color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor \x3d v_color;\nfloat d \x3d rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio \x3d 0.248062016;\nfloat size \x3d max(v_size.x, v_size.y);\nfloat dist \x3d d * softEdgeRatio * size;\nfillPixelColor *\x3d clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width \x3e 0.25) {\nlowp vec4 outlinePixelColor \x3d u_outlineColor;\nconst float outlineLimitRatio \x3d (16.0 / 86.0);\nfloat clampedOutlineSize \x3d softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *\x3d clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor \x3d v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor \x3d v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor \x3d texture2D(u_texture, v_tex);\ngl_FragColor \x3d v_opacity * texColor;\n#endif\n}",
"icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION \x3d 1.0 / 8.0;\nconst float C_256_TO_RAD \x3d 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD \x3d 3.14159265359 / 180.0;\nconst float tileCoordRatio \x3d 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color \x3d color;\nv_opacity \x3d opacity;\n#ifdef SDF\nv_halo_width \x3d halo_width;\n#endif\nfloat modded \x3d mod(a_opacityInfo, 128.0);\nfloat targetOpacity \x3d (a_opacityInfo - modded) / 128.0;\nfloat startOpacity \x3d modded / 127.0;\nfloat interpolatedOpacity \x3d clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *\x3d interpolatedOpacity;\nmediump float a_angle \x3d a_levelInfo[1];\nmediump float a_minLevel \x3d a_levelInfo[2];\nmediump float a_maxLevel \x3d a_levelInfo[3];\nmediump vec2 a_tex \x3d a_texAngleRange.xy;\nmediump float delta_z \x3d 0.0;\nmediump float rotated \x3d mod(a_angle + u_mapRotation, 256.0);\ndelta_z +\x3d (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z +\x3d 1.0 - step(a_minLevel, u_level);\ndelta_z +\x3d step(a_maxLevel, u_level);\ndelta_z +\x3d step(v_opacity, 0.0);\nvec2 offset \x3d C_OFFSET_PRECISION * a_vertexOffset;\nv_size \x3d abs(offset);\n#ifdef SDF\noffset \x3d (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos \x3d u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth + delta_z, 1.0);\nv_tex \x3d a_tex.xy / u_mosaicSize;\n}"},
line:{"line.frag":"precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include \x3cutil/encoding.glsl\x3e\n#endif\nvoid main()\n{\nmediump float fragDist \x3d length(v_normal) * v_lineHalfWidth;\nlowp float alpha \x3d clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX \x3d fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY \x3d 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color \x3d texture2D(u_texture, texCoord);\ngl_FragColor \x3d alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX \x3d fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY \x3d 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d \x3d rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist \x3d d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor \x3d alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor \x3d alpha * v_color;\n#endif\n}",
"line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale \x3d 1.0 / 31.0;\nconst mediump float tileCoordRatio \x3d 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth \x3d 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color \x3d color * opacity;\nv_blur \x3d blur + u_antialiasing;\nv_normal \x3d a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr \x3d tlbr / u_mosaicSize.xyxy;\nv_patternSize \x3d vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio \x3d width / v_patternSize.y;\n#else\nv_widthRatio \x3d width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth \x3d (width + u_antialiasing) * 0.5;\nmediump vec2 dir \x3d a_dir_normal.xy * scale;\nmediump vec2 offset_ \x3d a_extrude_offset.zw * scale * offset;\nmediump vec2 dist \x3d v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos \x3d u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance \x3d a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n}"},
outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\nvoid main()\n{\nlowp float dist \x3d abs(v_normal.y);\nlowp float alpha \x3d smoothstep(1.0, 0.0, dist);\ngl_FragColor \x3d alpha * v_color;\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale \x3d 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color \x3d color * opacity;\nv_normal \x3d a_xnormal;\nmediump vec2 dist \x3d u_outline_width * scale * a_offset;\nmediump vec3 pos \x3d u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth, 1.0);\n}"},
text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\nvoid main()\n{\nlowp float dist \x3d texture2D(u_texture, v_tex).a;\nmediump float alpha \x3d smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor \x3d alpha * v_color;\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision \x3d 1.0 / 8.0;\nconst mediump float edgePos \x3d 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale \x3d 1.0 / 24.0;\nconst float sdfPixel \x3d 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo \x3e 0.5)\n{\nv_color \x3d halo_color * opacity;\nhalo_width *\x3d sdfPixel;\nhalo_blur *\x3d sdfPixel;\n}\nelse\n{\nv_color \x3d color * opacity;\nhalo_width \x3d 0.0;\nhalo_blur \x3d 0.0;\n}\nfloat modded \x3d mod(a_opacityInfo, 128.0);\nfloat targetOpacity \x3d (a_opacityInfo - modded) / 128.0;\nfloat startOpacity \x3d modded / 127.0;\nfloat interpolatedOpacity \x3d clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *\x3d interpolatedOpacity;\nmediump float a_angle \x3d a_levelInfo[1];\nmediump float a_minLevel \x3d a_levelInfo[2];\nmediump float a_maxLevel \x3d a_levelInfo[3];\nmediump vec2 a_tex \x3d a_texAngleRange.xy;\nmediump float a_visMinAngle \x3d a_texAngleRange.z;\nmediump float a_visMaxAngle \x3d a_texAngleRange.w;\nmediump float delta_z \x3d 0.0;\nmediump float angle \x3d mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle \x3c a_visMaxAngle)\n{\ndelta_z +\x3d (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z +\x3d (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z +\x3d 1.0 - step(a_minLevel, u_level);\ndelta_z +\x3d step(a_maxLevel, u_level);\ndelta_z +\x3d step(v_color[3], 0.0);\nv_tex \x3d a_tex.xy / u_mosaicSize;\nv_edgeDistance \x3d edgePos - halo_width / size;\nv_edgeWidth \x3d (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos \x3d u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position \x3d vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},
util:{"encoding.glsl":"const vec4 rgba2float_factors \x3d vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}}})},"esri/views/2d/engine/webgl/BitBlitRenderer":function(){define("exports ../../../../core/maybe ./DefaultVertexAttributeLayouts ./shaders/BitBlitPrograms ../../../webgl/BufferObject ../../../webgl/enums ../../../webgl/ProgramTemplate ../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b){class a{constructor(){this._initialized=!1}dispose(){this._program=g.disposeMaybe(this._program);this._vertexArrayObject=g.disposeMaybe(this._vertexArrayObject)}render(f,n,c,r){f&&(this._initialized||this._initialize(f),f.setBlendFunctionSeparate(l.BlendFactor.ONE,l.BlendFactor.ONE_MINUS_SRC_ALPHA,l.BlendFactor.ONE,l.BlendFactor.ONE_MINUS_SRC_ALPHA),f.bindVAO(this._vertexArrayObject),f.useProgram(this._program),n.setSamplingMode(c),f.bindTexture(n,0),this._program.setUniform1i("u_tex",
0),this._program.setUniform1f("u_opacity",r),f.drawArrays(l.PrimitiveType.TRIANGLE_STRIP,0,4),f.bindTexture(null,0),f.bindVAO())}_initialize(f){if(this._initialized)return!0;const n=d.createProgram(f,h.bitBlit);if(!n)return!1;const c=new Int8Array(16);c[0]=-1;c[1]=-1;c[2]=0;c[3]=0;c[4]=1;c[5]=-1;c[6]=1;c[7]=0;c[8]=-1;c[9]=1;c[10]=0;c[11]=1;c[12]=1;c[13]=1;c[14]=1;c[15]=1;f=new b.VertexArrayObject(f,h.bitBlit.attributes,q.PosTex2b,{geometry:m.BufferObject.createVertex(f,l.Usage.STATIC_DRAW,c)});this._program=
n;this._vertexArrayObject=f;return this._initialized=!0}}e.BitBlitRenderer=a;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaders/BitBlitPrograms":function(){define(["exports","./sources/resolver"],function(e,g){g={shaders:{vertexShader:g.resolveIncludes("bitBlit/bitBlit.vert"),fragmentShader:g.resolveIncludes("bitBlit/bitBlit.frag")},attributes:new Map([["a_pos",0],["a_tex",1]])};e.bitBlit=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/MaterialManager":function(){define(["./shaders/MaterialPrograms"],function(e){class g{constructor(q){this._rctx=q;this._programByKey=new Map}dispose(){this._programByKey.forEach(q=>q.dispose());this._programByKey.clear()}getProgram(q,h=[]){const m=q.vsPath+"."+q.fsPath+JSON.stringify(h);if(this._programByKey.has(m))return this._programByKey.get(m);h={...h.map(a=>"string"===typeof a?{name:a,value:!0}:a).reduce((a,f)=>({...a,[f.name]:f.value}),{})};const {vsPath:l,fsPath:d,
attributes:b}=q;q=e.createProgramTemplate(l,d,b,h);q=this._rctx.programCache.acquire(q.shaders.vertexShader,q.shaders.fragmentShader,q.attributes);if(!q)throw Error("Unable to get program for key: ${key}");this._programByKey.set(m,q);return q}}return g})},"esri/views/2d/engine/webgl/shaders/MaterialPrograms":function(){define(["exports","./sources/resolver","../../../../webgl/programUtils"],function(e,g,q){e.createProgramTemplate=(h,m,l,d)=>{h+=h.substring(h.lastIndexOf("/"));m+=m.substring(m.lastIndexOf("/"));
const b={};for(const f in d){let n=void 0;var a=f;n=""+a[0].toUpperCase();for(let c=1;c<a.length;c++){const r=a[c];r===r.toUpperCase()?(n+="_",n+=r):n+=r.toUpperCase()}b[n]=d[f]}d=q.glslifyDefineMap(b);return{attributes:l,shaders:{vertexShader:d+g.resolveIncludes(`${h}.vert`),fragmentShader:d+g.resolveIncludes(`${m}.frag`)}}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TextureManager":function(){define("../../../../config ../../../../request ../../../../core/BidiText ../../../../core/Error ../../../../core/fontUtils ../../../../core/has ../../../../core/Logger ../../../../core/promiseUtils ../../../../core/screenUtils ../../../../core/string ../../../../symbols/cim/CIMResourceManager ../../../../symbols/cim/CIMSymbolHelper ../../../../symbols/cim/Rasterizer ./definitions ./enums ./GlyphMosaic ./GlyphSource ./SDFConverter ./SpriteMosaic ./Utils ./animatedFormats/AnimatableTextureResource ../../../support/QueueProcessor ../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A,z){function B(C){switch(C.type){case "CIMVectorMarker":case "CIMPictureMarker":return C&&"markerPlacement"in C&&C.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===C.markerPlacement.type;default:return!0}}const D=(C,G,H)=>d.getLogger("esri.views.2d.engine.webgl.TextureManager").error(new h(C,G,H));class F{static fromMosaic(C,G){return new F(C,G.page,G.sdf)}constructor(C,G,H){this.mosaicType=C;this.page=G;this.sdf=H}}class E{constructor(C){this._requestRender=
C;this._resourceManager=new n;this._invalidFontsMap=new Map;this._sdfConverter=new u(k.svgSdfTextureInnerSize);this._bindingInfos=[];this._hashToBindingIndex=new Map;this._ongoingRasterizations=new Map;this._imageRequestQueue=new A.QueueProcessor({concurrency:10,process:async(G,H)=>{b.throwIfAborted(H);try{return await g(G,{responseType:"image",signal:H})}catch(K){if(!b.isAbortError(K))throw new h("mapview-invalid-resource",`Could not fetch requested resource at ${G}`,K);throw K;}}});this._spriteMosaic=
new y(2048,2048,500);this._glyphSource=new w(`${e.fontsUrl}/{fontstack}/{range}.pbf`);this._glyphMosaic=new t(1024,1024,this._glyphSource);this._rasterizer=new r(this.resourceManager)}dispose(){this._spriteMosaic.dispose();this._glyphMosaic.dispose();this._rasterizer.dispose();this._sdfConverter.dispose();this._sdfConverter=this._glyphMosaic=this._spriteMosaic=null;this._hashToBindingIndex.clear();this._bindingInfos=this._hashToBindingIndex=null;this._ongoingRasterizations.clear();this._ongoingRasterizations=
null;this._imageRequestQueue.clear();this._imageRequestQueue=null;this._resourceManager.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}async rasterizeItem(C,G){if(null==C)return D("mapview-null-resource","Unable to rasterize null resource"),null;if("cim-rasterization-info"!==C.type)return D("mapview-unexpected-resource","Unable to rasterize resource"),null;({resource:C}=C);if("text"===C.type){G=await this._rasterizeText(C,
G);for(var H of G.glyphs)this._setTextureBinding(p.MosaicType.GLYPH,H);return G}(H=await this._rasterizeSprite(C,G))&&this._setTextureBinding(p.MosaicType.SPRITE,H);return H}getMosaicInfo(C,G,H=!1){C=this._getTextureBindingInfo(C,G,H);return C?{size:C.size,texture:{texture:C.texture,unit:"sprite"===C.type?k.textureBindingSpriteAtlas:k.textureBindingGlyphAtlas}}:(D("mapview-invalid-resource",`Unable to find resource for ${G}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(C,G,
H){var K=this._bindingInfos[G-1];G=K.page;H=H?z.TextureSamplingMode.LINEAR_MIPMAP_LINEAR:z.TextureSamplingMode.LINEAR;switch(K.mosaicType){case p.MosaicType.SPRITE:K=this.sprites.getWidth(G);var J=this.sprites.getHeight(G);K=[K,J];C=this._spriteMosaic.getTexture(C,G);C.setSamplingMode(H);return{type:"sprite",texture:C,size:K};case p.MosaicType.GLYPH:return K=[this.glyphs.width,this.glyphs.height],J=this._glyphMosaic.getTexture(C,G),this._glyphMosaic.bind(C,H,G,k.textureBindingGlyphAtlas),J.setSamplingMode(H),
{type:"glyph",texture:J,size:K};default:return D("mapview-texture-manager",`Cannot handle unknown type ${K.mosaicType}`),null}}_hashMosaic(C,G){return 1|C<<1|(G.sdf?1:0)<<2|G.page<<3}_setTextureBinding(C,G){const H=this._hashMosaic(C,G);this._hashToBindingIndex.has(H)||(C=F.fromMosaic(C,G),this._hashToBindingIndex.set(H,this._bindingInfos.length+1),this._bindingInfos.push(C));G.textureBinding=this._hashToBindingIndex.get(H)}async _rasterizeText(C,G){const {font:H,textString:K}=C;C=m.getFullyQualifiedFontName(H);
var J=this._invalidFontsMap.has(C);const [O,Q]=q.bidiText(K),T=x.charCodes(O);try{return J=J?"arial-unicode-ms-regular":C,l("esri-2d-stabilize-glyphs")&&await this._glyphMosaic.preloadASCIIGlyphCache(J),{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(J,T,G),isRightToLeft:Q}}catch(I){return D("mapview-invalid-resource",`Couldn't find font ${C}. Falling back to Arial Unicode MS Regular`),this._invalidFontsMap.set(C,!0),{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems("arial-unicode-ms-regular",
T,G),isRightToLeft:Q}}}_hashSpriteResource(C){switch(C.type){case "path":return`path:${C.path}.${C.asFill?1:0}`;case "CIMPictureMarker":return`${C.type}:${C.url}:${C.size}`;case "CIMPictureFill":return`${C.type}:${C.url}:${C.height}`;case "CIMPictureStroke":return`${C.type}:${C.url}:${C.width}`;case "dash":return`dash:${C.capStyle}.${C.dashTemplate.join("")}`;case "sdf":return`sdf:${JSON.stringify(C.geom)}.${C.asFill?1:0}`;case "fill-style":return`fill_style:${C.style}`;case "animated":return JSON.stringify(x.discardUrlIfHasUrlHash(C));
case "CIMHatchFill":return JSON.stringify(C);case "CIMVectorMarker":return JSON.stringify(C)}}async _rasterizeSprite(C,G){if(!C)return null;const H=f.numericHash(this._hashSpriteResource(C));if(this._spriteMosaic.has(H))return this._spriteMosaic.getSpriteItem(H);if("url"in C&&C.url||"CIMPictureFill"===C.type||"CIMPictureStroke"===C.type||"CIMPictureMarker"===C.type||"CIMVectorMarker"===C.type){const K=[];c.CIMSymbolHelper.fetchResources({type:"CIMPointSymbol",symbolLayers:[C]},this._resourceManager,
K);0<K.length&&await Promise.all(K)}switch(C.type){case "CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===C.markerPlacement?.type?this._rasterizeJSONResource(H,C):this._handleAsyncResource(H,C,G);case "animated":return this._handleAsyncResource(H,C,G);case "CIMPictureFill":case "CIMPictureStroke":case "path":return this._handleAsyncResource(H,C,G);case "sdf":case "dash":case "fill-style":case "CIMVectorMarker":case "CIMHatchFill":return this._rasterizeJSONResource(H,C)}}_rasterizeJSONResource(C,
G){const H=this._rasterizer.rasterizeJSONResource(G);if(H){const {size:K,image:J,sdf:O,simplePattern:Q,rasterizationScale:T}=H;return this._addItemToMosaic(C,K,{type:"static",data:J},B(G),O,Q,T)}return null}async _handleAsyncResource(C,G,H){if(this._ongoingRasterizations.has(C))return this._ongoingRasterizations.get(C);G="path"===G.type?this._handleSVG(G,C,H):this._handleImage(G,C,H);this._ongoingRasterizations.set(C,G);G.finally(()=>this._ongoingRasterizations.delete(C));return G}async _handleSVG(C,
G,H){const K=[k.svgSdfTextureInnerSize,k.svgSdfTextureInnerSize],{asFill:J}=C;C=await this._sdfConverter.draw(C.path,J,H);return this._addItemToMosaic(G,K,{type:"static",data:new Uint32Array(C.buffer)},!1,!0,!0)}async _handleGIFOrPNG(C,G,H){const K=this.resourceManager.getResource(C.url);if(null==K)return null;const {width:J,height:O}=K;if(K instanceof HTMLImageElement){if("animated"===C.type)return D("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;
const {size:T,sdf:I,image:L}=this._rasterizer.rasterizeImageResource(J,O,K,"colorSubstitutions"in C?C.colorSubstitutions:void 0);return this._addItemToMosaic(G,T,{type:"static",data:L},B(C),I,!1)}let Q;"animated"===C.type?(H=!1,Q={playAnimation:C.playAnimation,reverseAnimation:C.reverseAnimation,randomizeStartTime:C.randomizeStartTime,randomizeStartSeed:C.randomizeStartSeed,startTimeOffset:C.startTimeOffset,duration:C.duration,repeatType:C.repeatType,repeatDelay:C.repeatDelay},C=C.startGroup||0):
(H=B(C),Q={},C=0);C=new v.AnimatableTextureResource(K,this._requestRender,Q,C);return this._addItemToMosaic(G,[C.width,C.height],{type:"animated",data:C},H,!1,!1)}async _handleImage(C,G,H){const K=C.url;var J;(J=K&&(K.includes(".gif")||null!=K&&K.startsWith("data:image/gif")))||(J=K&&(K.includes(".png")||null!=K&&K.startsWith("data:image/png")));if(J)return this._handleGIFOrPNG(C,G,H);if("animated"===C.type)return D("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),
null;try{let O;const Q=this.resourceManager.getResource(K);if(null!=Q&&Q instanceof HTMLImageElement)O=Q;else{const {data:R}=await this._imageRequestQueue.push(K,{...H});O=R}x.isSVGImage(K)&&("width"in C&&"height"in C?(O.width=a.pt2px(C.width),O.height=a.pt2px(C.height)):"cim"in C&&(O.width=a.pt2px(C.width??C.scaleX*C.size),O.height=a.pt2px(C.size)));if(!O.width||!O.height)return null;const {size:T,sdf:I,image:L}=this._rasterizer.rasterizeImageResource(O.width,O.height,O,"colorSubstitutions"in C?
C.colorSubstitutions:void 0);return this._addItemToMosaic(G,T,{type:"static",data:L},B(C),I,!1)}catch(O){if(!b.isAbortError(O))throw new h("mapview-invalid-resource",`Could not fetch requested resource at ${K}. ${O.message}`);throw O;}}_addItemToMosaic(C,G,H,K,J,O,Q){return this._spriteMosaic.addSpriteItem(C,G,H,K,J,O,Q)}}return E})},"esri/symbols/cim/CIMResourceManager":function(){define(["../../core/fontUtils","../../core/imageUtils"],function(e,g){class q{constructor(){this._resourceMap=new Map;
this._inFlightResourceMap=new Map;this.geometryEnginePromise=this.geometryEngine=null}destroy(){this._inFlightResourceMap.clear();this._resourceMap.clear()}getResource(h){return this._resourceMap.get(h)??null}async fetchResource(h,m){var l=this._resourceMap.get(h);if(l)return{width:l.width,height:l.height};if(l=this._inFlightResourceMap.get(h))return l.then(d=>({width:d.width,height:d.height}));l=g.getImageData(h,m);this._inFlightResourceMap.set(h,l);return l.then(d=>{this._inFlightResourceMap.delete(h);
this._resourceMap.set(h,d);return{width:d.width,height:d.height}},()=>({width:0,height:0}))}deleteResource(h){this._inFlightResourceMap.delete(h);this._resourceMap.delete(h)}loadFont(h){return e.loadFont(h)}}return q})},"esri/symbols/cim/Rasterizer":function(){define("./CIMSymbolHelper ./rasterizingUtils ./Rect ./SDFHelper ./utils ../../views/2d/engine/webgl/definitions".split(" "),function(e,g,q,h,m,l){function d(a){if(!a)return null;const [f,n,c]=h.buildSDF(a);return f?{size:[n,c],image:new Uint32Array(f.buffer),
sdf:!0,simplePattern:!0,anchorX:0,anchorY:0}:null}class b{constructor(a){this._resourceManager=a;this._cachedRasterizationCanvas=null}dispose(){this._cachedRasterizationCanvas=null}get _canvas(){this._cachedRasterizationCanvas||(this._cachedRasterizationCanvas=document.createElement("canvas"));return this._cachedRasterizationCanvas}rasterizeJSONResource(a){switch(a.type){case "dash":const [f,n,c]=g.rasterizeDash(a.dashTemplate,a.capStyle);return{size:[n,c],image:new Uint32Array(f.buffer),sdf:!0,simplePattern:!0,
anchorX:0,anchorY:0};case "fill-style":const [r,k,p,t]=g.rasterizeFillStyle(this._canvas,a,l.patternFillRasterizationScale);return{size:[k,p],image:new Uint32Array(r.buffer),sdf:!1,simplePattern:!0,anchorX:0,anchorY:0,rasterizationScale:t};case "sdf":return d(a);case "CIMHatchFill":case "CIMVectorMarker":case "CIMPictureMarker":return this._rasterizeCIMJSONResource(a)}}_rasterizeCIMJSONResource(a){switch(a.type){case "CIMHatchFill":return a=e.CIMSymbolHelper.fromCIMHatchFill(a,l.patternFillRasterizationScale),
this._rasterizeCIMVectorMarker(a);case "CIMPictureMarker":return a=e.CIMSymbolHelper.fromCIMInsidePolygon(a),this._rasterizeCIMVectorMarker(a);case "CIMVectorMarker":if("CIMMarkerPlacementInsidePolygon"===a.markerPlacement?.type)return a=e.CIMSymbolHelper.fromCIMInsidePolygon(a),this._rasterizeCIMVectorMarker(a);const f=h.getSDFInfo(a);return f&&!a.avoidSDFRasterization?d(f):this._rasterizeCIMVectorMarker(a,!1)}}_rasterizeCIMVectorMarker(a,f=!0){f=f?q.fromExtent(a.frame):null;const [n,c,r,k,p]=e.CIMSymbolHelper.rasterize(this._canvas,
a,f,this._resourceManager);return n?{size:[c,r],image:new Uint32Array(n.buffer),sdf:!1,simplePattern:!1,anchorX:k,anchorY:p}:null}rasterizeImageResource(a,f,n,c){this._canvas.width=a;this._canvas.height=f;var r=this._canvas.getContext("2d",{willReadFrequently:!0});n instanceof ImageData?r.putImageData(n,0,0):(n.setAttribute("width",`${a}px`),n.setAttribute("height",`${f}px`),r.drawImage(n,0,0,a,f));n=r.getImageData(0,0,a,f);n=new Uint8Array(n.data);if(c)for(var k of c)if(k&&k.oldColor&&4===k.oldColor.length&&
k.newColor&&4===k.newColor.length){const [p,t,w,u]=k.oldColor,[y,x,v,A]=k.newColor;if(p!==y||t!==x||w!==v||u!==A)for(c=0;c<n.length;c+=4)p===n[c]&&t===n[c+1]&&w===n[c+2]&&u===n[c+3]&&(n[c]=y,n[c+1]=x,n[c+2]=v,n[c+3]=A)}for(c=0;c<n.length;c+=4)k=n[c+3]/255,n[c]*=k,n[c+1]*=k,n[c+2]*=k;r=n;k=a;c=f;if(512<=k||512<=c){r=k/c;1<r?(k=512,c=Math.round(512/r)):(c=512,k=Math.round(512*r));r=new Uint8Array(4*k*c);const p=new Uint8ClampedArray(r.buffer);m.resampleHermite(n,a,f,p,k,c,!1)}return{size:[k,c],image:new Uint32Array(r.buffer),
sdf:!1,simplePattern:!1,anchorX:0,anchorY:0}}}return b})},"esri/symbols/cim/rasterizingUtils":function(){define(["exports","../../core/floatRGBA","../../core/mathUtils","./constants"],function(e,g,q,h){e.rasterizeDash=function(m,l){null==m&&(m=[]);var d="Butt"===l,b="Square"===l;l=!d&&!b;1===m.length%2&&(m=[...m,...m]);const a=h.dashRadius,f=2*a;var n=0;for(var c of m)n+=c;c=Math.round(n*a);n=new Float32Array(c*f);const r=.5*a;let k=0,p=0,t=.5,w=!0;for(var u of m){k=p;for(p+=u*a;t<=p;){for(m=.5;m<
f;){const y=l?(m-a)*(m-a):Math.abs(m-a);n[(m-.5)*c+t-.5]=w?d?Math.max(Math.max(k+r-t,y),Math.max(t-p+r,y)):y:l?Math.min((t-k)*(t-k)+y,(t-p)*(t-p)+y):b?Math.min(Math.max(t-k,y),Math.max(p-t,y)):Math.min(Math.max(t-k+r,y),Math.max(p+r-t,y));m++}t++}w=!w}d=n.length;u=new Uint8Array(4*d);for(b=0;b<d;++b)g.packFloatRGBA((l?Math.sqrt(n[b]):n[b])/a,u,4*b);return[u,c,f]};e.rasterizeFillStyle=function(m,l,d){l=l.style;d=q.nextPowerOfTwo(Math.ceil(d));var b="vertical"===l||"horizontal"===l||"cross"===l||"esriSFSCross"===
l||"esriSFSVertical"===l||"esriSFSHorizontal"===l?8*d:16*d,a=2*d;m.width=b;m.height=b;const f=m.getContext("2d");f.strokeStyle="#FFFFFF";f.lineWidth=d;f.beginPath();if("vertical"===l||"cross"===l||"esriSFSCross"===l||"esriSFSVertical"===l)f.moveTo(b/2,-a),f.lineTo(b/2,b+a);if("horizontal"===l||"cross"===l||"esriSFSCross"===l||"esriSFSHorizontal"===l)f.moveTo(-a,b/2),f.lineTo(b+a,b/2);if("backward-diagonal"===l||"diagonal-cross"===l||"esriSFSDiagonalCross"===l||"esriSFSBackwardDiagonal"===l)f.moveTo(-a,
-a),f.lineTo(b+a,b+a),f.moveTo(b-a,-a),f.lineTo(b+a,a),f.moveTo(-a,b-a),f.lineTo(a,b+a);if("forward-diagonal"===l||"diagonal-cross"===l||"esriSFSForwardDiagonal"===l||"esriSFSDiagonalCross"===l)f.moveTo(b+a,-a),f.lineTo(-a,b+a),f.moveTo(a,-a),f.lineTo(-a,a),f.moveTo(b+a,b-a),f.lineTo(b-a,b+a);f.stroke();l=f.getImageData(0,0,m.width,m.height);l=new Uint8Array(l.data);for(a=0;a<l.length;a+=4)b=l[a+3]/255,l[a]*=b,l[a+1]*=b,l[a+2]*=b;return[l,m.width,m.height,d]};Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/symbols/cim/constants":function(){define(["exports"],function(e){e.dashRadius=15.5;e.maxTileCoordValue=1024;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/GlyphMosaic":function(){define("../../../../core/has ../../../../core/promiseUtils ./Rect ./RectangleBinPack ../../../webgl/enums ../../../webgl/Texture ../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l,d){function b(n){const c=new Set;for(const r of n)c.add(Math.floor(r/
256));return c}function a(n,c,r){n.has(c)||n.set(c,r().then(()=>{n.delete(c)}).catch(k=>{n.delete(c);g.throwIfNotAbortError(k)}));return n.get(c)}class f{constructor(n,c,r){this.height=this.width=0;this._dirties=[];this._glyphData=[];this._currentPage=0;this._glyphCache={};this._textures=[];this._rangePromises=new Map;this._preloadCache={};this.width=n;this.height=c;this._glyphSource=r;this._binPack=new h(n-4,c-4);this._glyphData.push(new Uint8Array(n*c));this._dirties.push(!0);this._textures.push(null);
this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const n of this._textures)n&&n.dispose();this._textures.length=0;this._glyphData.length=0}_initDecorationGlyphs(){var n=[117,149,181,207,207,181,149,117];const c=[];var r=[];for(let k=0;k<n.length;k++){const p=n[k];for(let t=0;11>t;t++){const w=3<=k&&5>k&&3<=t&&8>t?255:0;c.push(p);r.push(w)}}n={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(c)};r={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(r)};
this._recordGlyph(n);this._recordGlyph(r)}getTexture(n,c){if(!this._textures[c]){const r=new d.TextureDescriptor;r.pixelFormat=m.PixelFormat.ALPHA;r.wrapMode=m.TextureWrapMode.CLAMP_TO_EDGE;r.width=this.width;r.height=this.height;this._textures[c]=new l.Texture(n,r,new Uint8Array(this.width*this.height))}this._dirties[c]&&(this._textures[c].setData(this._glyphData[c]),this._dirties[c]=!1);return this._textures[c]}async getGlyphItems(n,c,r){const k=this._getGlyphCache(n);await this._fetchRanges(n,
c,r);return c.map(p=>this._getMosaicItem(k,n,p))}bind(n,c,r,k){r=this.getTexture(n,r);r.setSamplingMode(c);n.bindTexture(r,k)}preloadASCIIGlyphCache(n){var c=this._preloadCache[n];if(null!=c)return c;c=this._glyphSource.preloadASCIIRange(n).then(()=>{const r=this._getGlyphCache(n);for(let k=0;256>k;k++)this._getMosaicItem(r,n,k)});return this._preloadCache[n]=c}_getGlyphCache(n){this._glyphCache[n]||(this._glyphCache[n]={});return this._glyphCache[n]}_invalidate(){this._dirties[this._currentPage]=
!0}async _fetchRanges(n,c,r){const k=[];b(c).forEach(p=>{k.push(this._fetchRange(n,p,r))});await Promise.all(k)}async _fetchRange(n,c,r){if(!(256<c))return a(this._rangePromises,n+c,()=>this._glyphSource.getRange(n,c,r))}_getMosaicItem(n,c,r){if(!n[r]){c=this._glyphSource.getGlyph(c,r);if(!c?.metrics)return{rect:new q(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:r,sdf:!0};const k=this._recordGlyph(c);n[r]={rect:k,page:this._currentPage,metrics:c.metrics,code:r,sdf:!0};this._invalidate()}return n[r]}_recordGlyph(n){var c=
n.metrics;if(0===c.width)c=new q(0,0,0,0);else{const r=c.width+6,k=c.height+6;c=this._binPack.allocate(r,k);c.isEmpty&&(this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new h(this.width-4,this.height-4),c=this._binPack.allocate(r,k));const p=this._glyphData[this._currentPage];n=n.bitmap;
let t,w;if(n)for(let u=0;u<k;u++){t=r*u;w=this.width*(c.y+u)+c.x;for(let y=0;y<r;y++)p[w+y]=n[t+y]}e("esri-glyph-debug")&&this._showDebugPage(p)}return c}_showDebugPage(n){const c=document.createElement("canvas"),r=c.getContext("2d"),k=new ImageData(this.width,this.height),p=k.data;c.width=this.width;c.height=this.height;c.style.border="1px solid black";for(let t=0;t<n.length;++t)p[4*t]=n[t],p[4*t+1]=0,p[4*t+2]=0,p[4*t+3]=255;r.putImageData(k,0,0);document.body.appendChild(c)}}return f})},"esri/views/2d/engine/webgl/RectangleBinPack":function(){define(["./Rect"],
function(e){class g{constructor(q,h){this._height=this._width=0;this._free=[];this._width=q;this._height=h;this._free.push(new e(0,0,q,h))}get width(){return this._width}get height(){return this._height}allocate(q,h){if(q>this._width||h>this._height)return new e;let m=null,l=-1;for(let d=0;d<this._free.length;++d){const b=this._free[d];q<=b.width&&h<=b.height&&(null===m||b.y<=m.y&&b.x<=m.x)&&(m=b,l=d)}if(null===m)return new e;this._free.splice(l,1);m.width<m.height?(m.width>q&&this._free.push(new e(m.x+
q,m.y,m.width-q,h)),m.height>h&&this._free.push(new e(m.x,m.y+h,m.width,m.height-h))):(m.width>q&&this._free.push(new e(m.x+q,m.y,m.width-q,m.height)),m.height>h&&this._free.push(new e(m.x,m.y+h,q,m.height-h)));return new e(m.x,m.y,q,h)}release(q){for(let h=0;h<this._free.length;++h){const m=this._free[h];if(m.y===q.y&&m.height===q.height&&m.x+m.width===q.x)m.width+=q.width;else if(m.x===q.x&&m.width===q.width&&m.y+m.height===q.y)m.height+=q.height;else if(q.y===m.y&&q.height===m.height&&q.x+q.width===
m.x)m.x=q.x,m.width+=q.width;else if(q.x===m.x&&q.width===m.width&&q.y+q.height===m.y)m.y=q.y,m.height+=q.height;else continue;this._free.splice(h,1);this.release(q)}this._free.push(q)}}return g})},"esri/views/2d/engine/webgl/GlyphSource":function(){define(["../../../../request","../../../../core/pbf"],function(e,g){class q{constructor(l){this._metrics=[];for(this._bitmaps=[];l.next();)switch(l.tag()){case 1:const d=l.getMessage();for(;d.next();)switch(d.tag()){case 3:const b=d.getMessage();let a,
f,n,c,r,k,p;for(;b.next();)switch(b.tag()){case 1:a=b.getUInt32();break;case 2:f=b.getBytes();break;case 3:n=b.getUInt32();break;case 4:c=b.getUInt32();break;case 5:r=b.getSInt32();break;case 6:k=b.getSInt32();break;case 7:p=b.getUInt32();break;default:b.skip()}b.release();a&&(this._metrics[a]={width:n,height:c,left:r,top:k,advance:p},this._bitmaps[a]=f);break;default:d.skip()}d.release();break;default:l.skip()}}getMetrics(l){return this._metrics[l]}getBitmap(l){return this._bitmaps[l]}}class h{constructor(){this._ranges=
[]}getRange(l){return this._ranges[l]}addRange(l,d){this._ranges[l]=d}}class m{constructor(l){this._glyphInfo={};this._baseURL=l}getRange(l,d,b){const a=this._getFontStack(l);if(a.getRange(d))return Promise.resolve();const f=256*d,n=f+255;l=this._baseURL.replace("{fontstack}",l).replace("{range}",f+"-"+n);return e(l,{responseType:"array-buffer",...b}).then(c=>{a.addRange(d,new q(new g(new Uint8Array(c.data),new DataView(c.data))))})}async preloadASCIIRange(l){const d=this._getFontStack(l);l=this._baseURL.replace("{fontstack}",
l).replace("{range}","0-255");l=await e(l,{responseType:"array-buffer"});l=new q(new g(new Uint8Array(l.data),new DataView(l.data)));for(let b=0;255>=b;b++)d.getRange(b)||d.addRange(b,l)}getGlyph(l,d){if(l=this._getFontStack(l))if(l=l.getRange(Math.floor(d/256)))return{metrics:l.getMetrics(d),bitmap:l.getBitmap(d)}}_getFontStack(l){let d=this._glyphInfo[l];d||=this._glyphInfo[l]=new h;return d}}return m})},"esri/views/2d/engine/webgl/SDFConverter":function(){define(["../../../../core/floatRGBA","../../../../core/promiseUtils"],
function(e,g){class q{constructor(h,m=2){this._textureSize=h;this._rasterizationScale=m;this._canvasSize=this._textureSize*this._rasterizationScale;this._svg=null;({_canvasSize:h}=this);m=document.createElement("canvas");m.width=m.height=h;this._context=m.getContext("2d",{willReadFrequently:!1});this._gridOuter=new Float64Array(h*h);this._gridInner=new Float64Array(h*h);this._f=new Float64Array(h);this._d=new Float64Array(h);this._z=new Float64Array(h+1);this._v=new Int16Array(h)}dispose(){this._context=
this._gridOuter=this._gridInner=this._f=this._d=this._z=this._v=null;this._svg&&(document.body.removeChild(this._svg),this._svg=null)}draw(h,m,l){const {_canvasSize:d,_textureSize:b,_rasterizationScale:a}=this,f=b/4;this._initSVG();const n=this.createSVGString(h,m);return new Promise((c,r)=>{const k=new Image;k.src="data:image/svg+xml; charset\x3dutf8, "+encodeURIComponent(n);k.onload=()=>{k.onload=null;this._context.clearRect(0,0,d,d);this._context.drawImage(k,0,0,d,d);var t=this._context.getImageData(0,
0,d,d);const w=new Uint8Array(b*b*4);for(var u=0;u<d*d;u++){var y=t.data[4*u+3]/255;this._gridOuter[u]=1===y?0:0===y?1E20:Math.max(0,.5-y)**2;this._gridInner[u]=1===y?1E20:0===y?0:Math.max(0,y-.5)**2}this._edt(this._gridOuter,d,d);this._edt(this._gridInner,d,d);for(t=0;t<b*b;t++){u=0;for(y=0;y<a;y++){const x=Math.floor(t/b)*a+y;for(let v=0;v<a;v++){const A=x*d+(t%b*a+v);u+=this._gridOuter[A]-this._gridInner[A]}}u/=a*a;u/=a;e.packFloatRGBA(.5-u/(2*f),w,4*t)}c(w)};const p=l?.signal;if(p)g.onAbort(p,
()=>r(g.createAbortError()))})}_initSVG(){if(!this._svg){const h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("style","position: absolute;");h.setAttribute("width","0");h.setAttribute("height","0");h.setAttribute("aria-hidden","true");h.setAttribute("role","presentation");document.body.appendChild(h);this._svg=h}return this._svg}createSVGString(h,m){const l=this._initSVG(),d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d",h);l.appendChild(d);
h=d.getBBox();var b=h.width/h.height;const a=this._canvasSize/2;let f,n;1<b?(f=a/h.width,n=this._canvasSize/4,b=a-1/b*a/2):(f=a/h.height,n=a-a*b/2,b=this._canvasSize/4);d.setAttribute("style",`transform: matrix(${f}, 0, 0, ${f}, ${-h.x*f+n}, ${-h.y*f+b})`);d.setAttribute("stroke-width",`${.5/f}`);m=`<svg style="fill:${m?"red":"none"}; stroke:${m?"none":"red"}" height="${this._canvasSize}" width="${this._canvasSize}" xmlns="http://www.w3.org/2000/svg">${l.innerHTML}</svg>`;l.removeChild(d);return m}_edt(h,
m,l){const d=this._f,b=this._d,a=this._v,f=this._z;for(var n=0;n<m;n++){for(var c=0;c<l;c++)d[c]=h[c*m+n];this._edt1d(d,b,a,f,l);for(c=0;c<l;c++)h[c*m+n]=b[c]}for(n=0;n<l;n++){for(c=0;c<m;c++)d[c]=h[n*m+c];this._edt1d(d,b,a,f,m);for(c=0;c<m;c++)h[n*m+c]=Math.sqrt(b[c])}}_edt1d(h,m,l,d,b){l[0]=0;d[0]=-1E20;d[1]=1E20;for(let a=1,f=0;a<b;a++){let n=(h[a]+a*a-(h[l[f]]+l[f]*l[f]))/(2*a-2*l[f]);for(;n<=d[f];)f--,n=(h[a]+a*a-(h[l[f]]+l[f]*l[f]))/(2*a-2*l[f]);f++;l[f]=a;d[f]=n;d[f+1]=1E20}for(let a=0,f=0;a<
b;a++){for(;d[f+1]<a;)f++;m[a]=(a-l[f])*(a-l[f])+h[l[f]]}}}return q})},"esri/views/2d/engine/webgl/SpriteMosaic":function(){define("../../../../core/Error ../../../../core/has ./definitions ./GeometryUtils ./Rect ./RectangleBinPack ../../../webgl/enums ../../../webgl/Texture ../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l,d,b,a){function f(k){return k&&"static"===k.type}function n(k,p){const t=new a.TextureDescriptor;t.width=p[0];t.height=p[1];t.wrapMode=d.TextureWrapMode.CLAMP_TO_EDGE;
return new b.Texture(k,t,null)}class c{constructor(k,p,t=0){this._mosaicPages=[];this._pageHeight=this._pageWidth=this._currentPage=this._maxItemSize=0;this._mosaicRects=new Map;this._spriteCopyQueue=[];this.pixelRatio=1;this._pageWidth=k;this._pageHeight=p;0<t&&(this._maxItemSize=t);this.pixelRatio=window.devicePixelRatio||1;this._binPack=new l(this._pageWidth,this._pageHeight);this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(Math.floor(this._pageWidth)*Math.floor(this._pageHeight))},
size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}getWidth(k){return k>=this._mosaicPages.length?-1:this._mosaicPages[k].size[0]}getHeight(k){return k>=this._mosaicPages.length?-1:this._mosaicPages[k].size[1]}getPageTexture(k){return k<this._mosaicPages.length?this._mosaicPages[k].texture:null}has(k){return this._mosaicRects.has(k)}get itemCount(){return this._mosaicRects.size}getSpriteItem(k){return this._mosaicRects.get(k)}addSpriteItem(k,p,t,w,u,y,x=1){if(this._mosaicRects.has(k))return this._mosaicRects.get(k);
let v,A,z;f(t)?[v,A,z]=this._allocateImage(p[0],p[1]):(v=new m(0,0,p[0],p[1]),A=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:t,size:[p[0]+2*q.spritePadding,p[1]+2*q.spritePadding],dirty:!0,texture:void 0}));if(0>=v.width||0>=v.height)return null;y={type:"sprite",rect:v,width:p[0],height:p[1],sdf:u,simplePattern:y,rasterizationScale:x,page:A};this._mosaicRects.set(k,y);f(t)&&(g("esri-mosaic-debug")&&this._showDebugSprite(p,t.data),this._copy({rect:v,spriteSize:p,spriteData:t.data,page:A,
pageSize:z,repeat:w,sdf:u}));return y}hasItemsToProcess(){return 0!==this._spriteCopyQueue.length}processNextItem(){const k=this._spriteCopyQueue.pop();k&&this._copy(k)}getMosaicItemPosition(k){k=this.getSpriteItem(k);const p=k?.rect;if(!p)return null;p.width=k.width;p.height=k.height;const t=q.spritePadding,w=this._mosaicPages[k.page].size;return{size:[k.width,k.height],tl:[(p.x+t)/w[0],(p.y+t)/w[1]],br:[(p.x+t+k.width)/w[0],(p.y+t+k.height)/w[1]],page:k.page}}bind(k,p,t=0,w=0){const u=this._mosaicPages[t],
y=u.mosaicsData;let x=u.texture;x||(x=n(k,u.size),u.texture=x);x.setSamplingMode(p);f(y)?(k.bindTexture(x,w),u.dirty&&(x.setData(new Uint8Array(y.data.buffer)),x.generateMipmap(),g("esri-mosaic-debug")&&this._showDebugPage(t))):(y.data.loadFrame(x),k.bindTexture(x,w),x.generateMipmap());u.dirty=!1}getTexture(k,p=0){const t=this._mosaicPages[p],w=t.mosaicsData;let u=t.texture;u||(u=n(k,t.size),t.texture=u);f(w)?t.dirty&&(u.setData(new Uint8Array(w.data.buffer)),u.generateMipmap(),g("esri-mosaic-debug")&&
this._showDebugPage(p)):(w.data.loadFrame(u),u.generateMipmap());t.dirty=!1;return u}dispose(){this._binPack=null;for(const p of this._mosaicPages){var k=p.texture;k&&k.dispose();k=p.mosaicsData;f(k)||k.data.destroy()}this._mosaicPages=null;this._mosaicRects.clear()}static _copyBits(k,p,t,w,u,y,x,v,A,z,B){let D=w*p+t;x=v*y+x;if(B)for(x-=y,B=-1;B<=z;B++,D=((B+z)%z+w)*p+t,x+=y)for(v=-1;v<=A;v++)u[x+v]=k[D+(v+A)%A];else for(t=0;t<z;t++){for(w=0;w<A;w++)u[x+w]=k[D+w];D+=p;x+=y}}_copy(k){if(!(k.page>=
this._mosaicPages.length)){var p=this._mosaicPages[k.page],t=p.mosaicsData;if(!f(p.mosaicsData))throw new e("mapview-invalid-resource","unsuitable data type!");c._copyBits(k.spriteData,k.spriteSize[0],0,0,t.data,k.pageSize[0],k.rect.x+q.spritePadding,k.rect.y+q.spritePadding,k.spriteSize[0],k.spriteSize[1],k.repeat);p.dirty=!0}}_allocateImage(k,p){k+=2*q.spritePadding;p+=2*q.spritePadding;var t=Math.max(k,p);if(this._maxItemSize&&this._maxItemSize<t){t=2**Math.ceil(h.log2(k));const w=2**Math.ceil(h.log2(p));
k=new m(0,0,k,p);this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(t*w)},size:[t,w],dirty:!0,texture:void 0});return[k,this._mosaicPages.length-1,[t,w]]}t=this._binPack.allocate(k,p);return 0>=t.width?(t=this._mosaicPages[this._currentPage],!t.dirty&&f(t.mosaicsData)&&(t.mosaicsData.data=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],
dirty:!0,texture:void 0}),this._binPack=new l(this._pageWidth,this._pageHeight),this._allocateImage(k,p)):[t,this._currentPage,[this._pageWidth,this._pageHeight]]}_showDebugSprite([k,p],t){const w=document.createElement("canvas");w.width=k;w.height=p;w.setAttribute("style",`position: absolute; top: ${4+204*r++}px; right: 208px; width: 200px; height: 200px; border: 1px solid black;`);const u=w.getContext("2d");k=new ImageData(k,p);k.data.set(new Uint8Array(t.buffer));u.putImageData(k,0,0);document.body.appendChild(w)}_showDebugPage(k){const {size:[p,
t],mosaicsData:w}=this._mosaicPages[k];if(f(w)){var u=`mosaicDebugPage${k}`,y=document.getElementById(u)??document.createElement("canvas");y.id=u;y.width=p;y.height=t;y.setAttribute("style",`position: absolute; top: ${4+204*k}px; right: 4px; width: 200px; height: 200px; border: 1px solid black;`);k=y.getContext("2d");u=new ImageData(p,t);u.data.set(new Uint8Array(w.data.buffer));k.putImageData(u,0,0);document.body.appendChild(y)}}}let r=0;return c})},"esri/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource":function(){define(["exports",
"../definitions","./utils"],function(e,g,q){class h{constructor(m,l,d,b){this._animation=m;this._frameData=null;this.frameCount=this._animation.frameDurations.length;this.width=this._animation.width;this.height=this._animation.height;this._playHandle=q.play(this._animation,d,b,a=>{this._frameData=a;l.requestRender()})}destroy(){this._playHandle.remove()}loadFrame(m){const l=this._frameData;null!=l&&(m.updateData(0,g.spritePadding,g.spritePadding,"width"in l?l.width:l.codedWidth,"height"in l?l.height:
l.codedHeight,l),this._frameData=null)}}e.AnimatableTextureResource=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/animatedFormats/utils":function(){define("exports ../../../../../core/handleUtils ../../../../../core/time ../../../../../geometry/support/meshUtils/exporters/gltf/imageutils ../../../../../symbols/cim/enums ../grouping".split(" "),function(e,g,q,h,m,l){function d(t){return q.Milliseconds(t.frameDurations.reduce((w,u)=>w+u,0))}function b(t){const {width:w,
height:u}=t,y=t.frameDurations.reverse();return{frameCount:t.frameCount,duration:t.duration,frameDurations:y,getFrame:x=>t.getFrame(t.frameDurations.length-1-x),width:w,height:u}}function a(t,w){const {width:u,height:y,getFrame:x}=t,v=w/t.duration;w=t.frameDurations.map(A=>q.Milliseconds(A*v));return{frameCount:t.frameCount,duration:t.duration,frameDurations:w,getFrame:x,width:u,height:y}}function f(t,w){const {width:u,height:y,getFrame:x}=t,v=t.frameDurations.slice(),A=v.shift();v.unshift(q.Milliseconds(A+
w));return{frameCount:t.frameCount,duration:t.duration+w,frameDurations:v,getFrame:x,width:u,height:y}}function n(t,w){const {width:u,height:y,getFrame:x}=t,v=t.frameDurations.slice(),A=v.pop();v.push(q.Milliseconds(A+w));return{frameCount:t.frameCount,duration:t.duration+w,frameDurations:v,getFrame:x,width:u,height:y}}function c(t,w,u,y){let {repeatType:x}=w;null==x&&(x=m.AnimatedSymbolRepeatType.Loop);!0===w.reverseAnimation&&(t=b(t));null!=w.duration&&(t=a(t,q.Milliseconds(1E3*w.duration)));if(null!=
w.repeatDelay){const v=1E3*w.repeatDelay;x===m.AnimatedSymbolRepeatType.Loop?t=n(t,q.Milliseconds(v)):x===m.AnimatedSymbolRepeatType.Oscillate&&(t=f(n(t,q.Milliseconds(v/2)),q.Milliseconds(v/2)))}null!=w.startTimeOffset?w=q.Milliseconds(1E3*w.startTimeOffset):null!=w.randomizeStartTime?(w=l.getRandomValue(u,null!=w.randomizeStartSeed?w.randomizeStartSeed:82749913),w=q.Milliseconds(w*d(t))):w=q.Milliseconds(0);return new r(t,w,x,y)}class r{constructor(t,w,u,y){this._animation=t;this._repeatType=u;
this._onFrameData=y;this._direction=1;this._currentFrame=0;this.timeToFrame=this._animation.frameDurations[this._currentFrame];for(t=0;w>t;)t+=this.timeToFrame,this.nextFrame();w=this._animation.getFrame(this._currentFrame);this._onFrameData(w)}nextFrame(){this._currentFrame+=this._direction;if(0<this._direction){if(this._currentFrame===this._animation.frameDurations.length)switch(this._repeatType){case m.AnimatedSymbolRepeatType.None:this._currentFrame-=this._direction;break;case m.AnimatedSymbolRepeatType.Loop:this._currentFrame=
0;break;case m.AnimatedSymbolRepeatType.Oscillate:this._currentFrame-=this._direction,this._direction=-1}}else if(-1===this._currentFrame)switch(this._repeatType){case m.AnimatedSymbolRepeatType.None:this._currentFrame-=this._direction;break;case m.AnimatedSymbolRepeatType.Loop:this._currentFrame=this._animation.frameDurations.length-1;break;case m.AnimatedSymbolRepeatType.Oscillate:this._currentFrame-=this._direction,this._direction=1}this.timeToFrame=this._animation.frameDurations[this._currentFrame];
const t=this._animation.getFrame(this._currentFrame);this._onFrameData(t)}}let k,p;e.Player=r;e.adjustDuration=a;e.appendDelay=n;e.createPlayer=c;e.getDuration=d;e.play=function(t,w,u,y){function x(){B=v?setTimeout(()=>{A.nextFrame();z=A.timeToFrame;x()},z):void 0}const v=null!=w.playAnimation?w.playAnimation:!0,A=c(t,w,u,y);let z=A.timeToFrame,B;x();return g.makeHandle(()=>v&&clearTimeout(B))};e.prependDelay=f;e.resize=function(t,w,u){k??=document.createElement("canvas");p??=k.getContext("2d");const {canvas:y,
ctx:x}={canvas:k,ctx:p};y.width=w;y.height=u;const v=[],A=t.frameDurations.length;for(let z=0;z<A;z++){const B=t.getFrame(z);x.clearRect(0,0,w,u);B instanceof ImageData?x.drawImage(h.imageTypeToCanvas(B),0,0,w,u):x.drawImage(B,0,0,w,u);v.push(x.getImageData(0,0,w,u))}return{width:w,height:u,frameDurations:t.frameDurations,getFrame:z=>v[z],frameCount:t.frameCount,duration:t.duration}};e.reverse=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/meshUtils/exporters/gltf/imageutils":function(){define(["exports",
"../../../../../core/has","../../../../../core/Error","../../../../../core/promiseUtils","../../../../../core/urlUtils"],function(e,g,q,h,m){function l(b){if(!(b instanceof HTMLImageElement))return"image/png";b=b.src;return m.isDataProtocol(b)?(b=m.dataComponents(b),"image/jpeg"===b?.mediaType?b.mediaType:"image/png"):/\.png$/i.test(b)?"image/png":/\.(jpg|jpeg)$/i.test(b)?"image/jpeg":"image/png"}function d(b){if(b instanceof HTMLCanvasElement)return b;if(b instanceof HTMLVideoElement)return null;
const a=document.createElement("canvas");a.width=b.width;a.height=b.height;const f=a.getContext("2d");b instanceof HTMLImageElement?f.drawImage(b,0,0,b.width,b.height):b instanceof ImageData&&f.putImageData(b,0,0);return a}e.encodeBase64DataUri=function(b){const a=[];b=new Uint8Array(b);for(let f=0;f<b.length;f++)a.push(String.fromCharCode(b[f]));return"data:application/octet-stream;base64,"+btoa(a.join(""))};e.imageToArrayBuffer=async function(b,a){const f=d(b);if(null==f)throw new q("imageToArrayBuffer",
"Unsupported image type");const n=l(b);b=await new Promise(c=>f.toBlob(c,n));h.throwIfAborted(a);if(!b)throw new q("imageToArrayBuffer","Failed to encode image");b=await b.arrayBuffer();h.throwIfAborted(a);return{data:b,type:n}};e.imageToDataURI=function(b){b=d(b);return null!=b?b.toDataURL():""};e.imageTypeToCanvas=d;e.isArrayBufferPNG=function(b){if(8>b.byteLength)return!1;b=new Uint8Array(b);return 137===b[0]&&80===b[1]&&78===b[2]&&71===b[3]&&13===b[4]&&10===b[5]&&26===b[6]&&10===b[7]};Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/grouping":function(){define(["exports","../../../../core/string"],function(e,g){function q(h,m){if("string"===typeof h)h=g.numericHash(h+`-seed(${m})`);else{let l=12;h^=m;do h=107*(h>>8^h)+l|0;while(0!==--l)}return(1+h/-2147483648)/2}e.getRandomValue=q;e.getStartGroup=function(h){return Math.floor(10*q(h,53290320))};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TextureUploadManager":function(){define(["exports",
"../../../../core/promiseUtils","./definitions"],function(e,g,q){class h{constructor(m){this._queue=[];this._refreshable=m}destroy(){this._queue=[]}enqueueTextureUpdate(m,l){const d=g.createResolver(),b=q.textureUploadManagerChunkSize,a=Math.ceil(m.height/b);g.throwIfAborted(l);for(let f=0;f<a;f++){const n=f===a-1;this._queue.push({type:"chunk",request:m,resolver:d,chunk:f,chunkOffset:f*b,destHeight:n?m.height-b*f:b,chunkIsLast:n,options:l})}g.onAbortOrThrow(l,f=>d.reject(f));return d.promise}upload(){let m=
0;for(;this._queue.length;){var l=performance.now();const d=this._queue.shift();if(d&&(null==d.options.signal||!d.options.signal.aborted)){switch(d.type){case "chunk":this._uploadChunk(d);break;case "no-chunk":this._uploadNoChunk(d)}l=performance.now()-l;m+=l;if(m+l>=q.textureUploadManagerBudget)break}}this._queue.length&&this._refreshable.requestRender()}_uploadChunk(m){const {request:l,resolver:d,chunkOffset:b,chunkIsLast:a,destHeight:f}=m,{data:n,texture:c,width:r}=l;null!=n&&(c.updateData(0,0,
b,r,f,n,b),a&&d.resolve())}_uploadNoChunk(m){const {request:l,resolver:d}=m,{data:b,texture:a}=l;a.setData(b);d.resolve()}}e.TextureUploadManager=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/WorldExtentClipRenderer":function(){define("exports ../../../../core/maybe ../../../../core/libs/gl-matrix-2/math/common ../../../../core/libs/gl-matrix-2/math/mat3 ../../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ./VertexStream ./shaders/StencilPrograms ../../../webgl/enums ../../../webgl/ProgramTemplate".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c){const r=l.fromValues(-.5,-.5);class k{constructor(){this._centerNdc=b.create();this._pxToNdc=b.create();this._worldDimensionsPx=b.create();this._mat3=m.create();this._initialized=!1}dispose(){this._program=g.disposeMaybe(this._program);this._quad=g.disposeMaybe(this._quad)}render(p,t,w){const {context:u}=p;p=this._updateGeometry(p,w);if(null!=t){const {r:y,g:x,b:v,a:A}=t;u.setClearColor(A*y/255,A*x/255,A*v/255,A)}else u.setClearColor(0,0,0,0);u.setStencilFunction(n.CompareFunction.ALWAYS,
0,255);u.setStencilWriteMask(255);p?(u.setClearStencil(0),u.clear(u.gl.STENCIL_BUFFER_BIT|u.gl.COLOR_BUFFER_BIT),this._initialized||this._initialize(u),u.setDepthWriteEnabled(!1),u.setDepthTestEnabled(!1),u.setColorMask(!1,!1,!1,!1),u.setBlendingEnabled(!1),u.setStencilOp(n.StencilOperation.KEEP,n.StencilOperation.KEEP,n.StencilOperation.REPLACE),u.setStencilFunction(n.CompareFunction.ALWAYS,1,255),u.setStencilTestEnabled(!0),u.useProgram(this._program),this._program.setUniformMatrix3fv("u_worldExtent",
this._mat3),this._quad.draw(),this._quad.unbind()):(u.setClearStencil(1),u.clear(u.gl.STENCIL_BUFFER_BIT|u.gl.COLOR_BUFFER_BIT))}_initialize(p){if(!this._initialized){var t=c.createProgram(p,f.stencil);t&&(this._program=t,this._quad=new a(p,[0,0,1,0,0,1,1,1]),this._initialized=!0)}}_updateGeometry(p,t){const {state:w,pixelRatio:u}=p,{size:y,rotation:x}=w,v=Math.round(y[0]*u),A=Math.round(y[1]*u);if(!w.spatialReference.isWrappable)return!1;p=q.toRadian(x);const z=Math.abs(Math.cos(p)),B=Math.abs(Math.sin(p)),
D=Math.round(u*w.worldScreenWidth);if(Math.round(v*z+A*B)<=D)return!1;const F=(t.left-t.right)*u/v;t=(t.bottom-t.top)*u/A;d.set(this._worldDimensionsPx,D,v*B+A*z,1);d.set(this._pxToNdc,2/v,-2/A,1);d.set(this._centerNdc,F,t,1);t=this._mat3;h.fromTranslation(t,this._centerNdc);h.scale(t,t,this._pxToNdc);0!==x&&h.rotate(t,t,p);h.scale(t,t,this._worldDimensionsPx);h.translate(t,t,r);return!0}}e.WorldExtentRenderer=k;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaders/StencilPrograms":function(){define(["exports",
"./sources/resolver"],function(e,g){g={shaders:{vertexShader:g.resolveIncludes("stencil/stencil.vert"),fragmentShader:g.resolveIncludes("stencil/stencil.frag")},attributes:new Map([["a_pos",0]])};e.stencil=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/AnimationEffect":function(){define(["exports","../../../../../core/has","../definitions","../VertexStream","./Effect"],function(e,g,q,h,m){class l extends m.Effect{constructor(){super(...arguments);
this.defines=[];this._desc={vsPath:"fx/integrate",fsPath:"fx/integrate",attributes:new Map([["a_position",0]])}}dispose(){this._quad&&this._quad.dispose()}bind(){}unbind(){}draw(d,b){if(b?.size){var {context:a,renderingOptions:f}=d;this._quad||(this._quad=new h(a,[0,0,1,0,0,1,1,1]));var n=a.getBoundFramebufferObject(),{x:c,y:r,width:k,height:p}=a.getViewport(),t=b.getBlock(q.AttributeDataType.Animation);if(null!=t){var w=b.getUniforms(a);a.setViewport(0,0,b.size,b.size);b=w.filterFlags;var u=w.animation,
y=g("featurelayer-animation-enabled")?f.labelsAnimationTime:1;w=t.getFBO(a,1);a.unbindTexture(w.colorTexture);this._computeDelta(d,w,u,b,y);t=t.getFBO(a);a.unbindTexture(t.colorTexture);this._updateAnimationState(d,w,t);a.bindFramebuffer(n);a.setViewport(c,r,k,p)}}}_computeDelta(d,b,a,f,n){const {context:c,painter:r,displayLevel:k}=d,p=r.materialManager.getProgram(this._desc,["delta"]);c.bindFramebuffer(b);c.setColorMask(!0,!0,!0,!0);c.setClearColor(0,0,0,0);c.clear(c.gl.COLOR_BUFFER_BIT);c.useProgram(p);
if(!("type"in f.texture&&"type"in a.texture))throw Error("InternalError: Expected to find texture");c.bindTexture(f.texture,f.unit);c.bindTexture(a.texture,a.unit);p.setUniform1i("u_maskTexture",f.unit);p.setUniform1i("u_sourceTexture",a.unit);p.setUniform1f("u_timeDelta",d.deltaTime);p.setUniform1f("u_animationTime",n);p.setUniform1f("u_zoomLevel",Math.round(10*k));this._quad.draw()}_updateAnimationState(d,b,a){const {context:f,painter:n}=d;d=n.materialManager.getProgram(this._desc,["update"]);f.bindTexture(b.colorTexture,
1);f.useProgram(d);d.setUniform1i("u_sourceTexture",1);f.bindFramebuffer(a);f.setColorMask(!0,!0,!0,!0);f.setClearColor(0,0,0,0);f.clear(f.gl.COLOR_BUFFER_BIT);this._quad.draw()}}e.AnimationEffect=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/Effect":function(){define(["exports"],function(e){class g{constructor(){this.name=this.constructor.name}createOptions(q,h){return null}}e.Effect=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/effects/BlendEffect":function(){define("exports ../../../../../core/Error ../../../../../core/Logger ../../../../../core/maybe ../enums ../VertexStream ../shaders/BlendPrograms ../../../../webgl/enums ../../../../webgl/Texture ../../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l,d,b,a,f){const n=()=>q.getLogger("esri.views.2d.engine.webgl.effects.blendEffects.BlendEffect");class c{constructor(){this._size=[0,0]}dispose(r){this._backBufferTexture=h.disposeMaybe(this._backBufferTexture);
this._quad=h.disposeMaybe(this._quad)}draw(r,k,p,t,w){const {context:u,drawPhase:y}=r;this._setupShader(u);t&&"normal"!==t&&y!==m.WGLDrawPhase.LABEL?this._drawBlended(r,k,p,t,w):(r=d.createProgramTemplate("normal"),(r=u.programCache.acquire(r.shaders.vertexShader,r.shaders.fragmentShader,r.attributes))?(u.useProgram(r),k.setSamplingMode(p),u.bindTexture(k,0),r.setUniform1i("u_layerTexture",0),r.setUniform1f("u_opacity",w),u.setBlendingEnabled(!0),u.setBlendFunction(b.BlendFactor.ONE,b.BlendFactor.ONE_MINUS_SRC_ALPHA),
k=this._quad,k.draw(),k.unbind(),r.dispose()):n().error(new g("mapview-BlendEffect",'Error creating shader program for blend mode "normal"')))}_drawBlended(r,k,p,t,w){const {context:u,state:y,pixelRatio:x,inFadeTransition:v}=r;var {size:A}=y,z=u.getBoundFramebufferObject();let B;null!=z?(B=z.width,A=z.height):(B=Math.round(x*A[0]),A=Math.round(x*A[1]));this._createOrResizeTexture(r,B,A);r=this._backBufferTexture;z.copyToTexture(0,0,B,A,0,0,r);u.setStencilTestEnabled(!1);u.setStencilWriteMask(0);u.setBlendingEnabled(!0);
u.setDepthTestEnabled(!1);u.setDepthWriteEnabled(!1);z=d.createProgramTemplate(t);(z=u.programCache.acquire(z.shaders.vertexShader,z.shaders.fragmentShader,z.attributes))?(u.useProgram(z),r.setSamplingMode(p),u.bindTexture(r,0),z.setUniform1i("u_backbufferTexture",0),k.setSamplingMode(p),u.bindTexture(k,1),z.setUniform1i("u_layerTexture",1),z.setUniform1f("u_opacity",w),z.setUniform1f("u_inFadeOpacity",v?1:0),u.setBlendFunction(b.BlendFactor.ONE,b.BlendFactor.ZERO),k=this._quad,k.draw(),k.unbind(),
z.dispose(),u.setBlendFunction(b.BlendFactor.ONE,b.BlendFactor.ONE_MINUS_SRC_ALPHA)):n().error(new g("mapview-BlendEffect",`Error creating shader program for blend mode ${t}`))}_setupShader(r){this._quad||(this._quad=new l(r,[-1,-1,1,-1,-1,1,1,1]))}_createOrResizeTexture(r,k,p){({context:r}=r);if(null===this._backBufferTexture||k!==this._size[0]||p!==this._size[1]){if(this._backBufferTexture)this._backBufferTexture.resize(k,p);else{const t=new f.TextureDescriptor;t.internalFormat=b.PixelFormat.RGBA;
t.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;t.width=k;t.height=p;this._backBufferTexture=new a.Texture(r,t)}this._size[0]=k;this._size[1]=p}}}e.BlendEffect=c;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaders/BlendPrograms":function(){define(["exports","./sources/resolver"],function(e,g){e.createProgramTemplate=function(q){return{attributes:new Map([["a_pos",0],["a_tex",1]]),shaders:{vertexShader:`#define ${q.replace("-","_").toUpperCase()}\n`+g.resolveIncludes("blend/blend.vert"),
fragmentShader:`#define ${q.replace("-","_").toUpperCase()}\n`+g.resolveIncludes("blend/blend.frag")}}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/FeatureEffect":function(){define(["exports","./Effect","../../../../webgl/enums"],function(e,g,q){class h extends g.Effect{constructor(m){super();this.name=this.constructor.name;this.defines=[m]}dispose(){}bind({context:m,painter:l}){this._prev=m.getBoundFramebufferObject();l=l.getFbos().effect0;
m.bindFramebuffer(l);m.setColorMask(!0,!0,!0,!0);m.setClearColor(0,0,0,0);m.clear(m.gl.COLOR_BUFFER_BIT)}unbind(){}draw(m,l){const {context:d,painter:b}=m;l=b.getPostProcessingEffects(l);const a=d.getBoundFramebufferObject();for(const {postProcessingEffect:f,effect:n}of l)f.draw(m,a,n);d.bindFramebuffer(this._prev);d.setStencilTestEnabled(!1);b.blitTexture(d,a.colorTexture,q.TextureSamplingMode.NEAREST);d.setStencilTestEnabled(!0)}}e.FeatureEffect=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/effects/HighlightEffect":function(){define("../../../../../core/has ../BitBlitRenderer ./Effect ./highlight/HighlightRenderer ./highlight/HighlightSurfaces ../../../../webgl/enums".split(" "),function(e,g,q,h,m,l){class d extends q.Effect{constructor(){super(...arguments);this.defines=["highlight"];this._hlRenderer=new h;this._height=this._width=void 0;this._boundFBO=null;this._hlSurfaces=new m;this._adjustedHeight=this._adjustedWidth=void 0;this._blitRenderer=new g.BitBlitRenderer}dispose(){this._hlSurfaces?.dispose();
this._hlRenderer?.dispose();this._boundFBO=null}bind(b){const {context:a,painter:f}=b,{width:n,height:c}=a.getViewport(),r=f.getFbos().effect0;this.setup(b,n,c);a.bindFramebuffer(r);a.setColorMask(!0,!0,!0,!0);a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT)}unbind(){}setup({context:b},a,f){this._width=a;this._height=f;const n=a%4,c=f%4;a+=2>n?-n:4-n;f+=2>c?-c:4-c;this._adjustedWidth=a;this._adjustedHeight=f;this._boundFBO=b.getBoundFramebufferObject();a=Math.round(1*a);f=Math.round(1*f);this._hlRenderer.setup(b,
a,f);this._hlSurfaces.setup(b,a,f)}draw(b){const {context:a,passOptions:f}=b;b=f.activeGradient;const n=a.getBoundFramebufferObject();a.setViewport(0,0,1*this._adjustedWidth,1*this._adjustedHeight);a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo);a.setStencilTestEnabled(!1);a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT);this._blitRenderer.render(a,n.colorTexture,l.TextureSamplingMode.NEAREST,1);a.setStencilTestEnabled(!1);a.setBlendingEnabled(!1);a.setColorMask(!1,!1,!1,!0);a.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo);
a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT);this._hlRenderer.preBlur(a,this._hlSurfaces.sharedBlur1Tex);a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo);a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT);this._hlRenderer.finalBlur(a,this._hlSurfaces.sharedBlur2Tex);a.bindFramebuffer(this._boundFBO);a.setBlendingEnabled(!0);a.setColorMask(!0,!0,!0,!0);a.setViewport(0,0,this._width,this._height);this._hlRenderer.renderHighlight(a,this._hlSurfaces.sharedBlur1Tex,b);this._boundFBO=
null}}return d})},"esri/views/2d/engine/webgl/effects/highlight/HighlightRenderer":function(){define("../../definitions ./parameters ../../shaders/HighlightPrograms ../../../../../webgl/BufferObject ../../../../../webgl/enums ../../../../../webgl/ProgramTemplate ../../../../../webgl/VertexArrayObject ../../../../../webgl/VertexElementDescriptor".split(" "),function(e,g,q,h,m,l,d,b){class a{constructor(){this._height=this._width=void 0;this._resources=null}dispose(){this._resources&&(this._resources.quadGeometry.dispose(),
this._resources.quadVAO.dispose(),this._resources.highlightProgram.dispose(),this._resources.blurProgram.dispose(),this._resources=null)}preBlur(f,n){f.bindTexture(n,e.textureBindingHighlight0);f.useProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",[1,0,1/this._width,0]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",g.alphaToRgbaChannelSelectorMatrix);f.bindVAO(this._resources.quadVAO);f.drawArrays(m.PrimitiveType.TRIANGLE_STRIP,0,4);
f.bindVAO()}finalBlur(f,n){f.bindTexture(n,e.textureBindingHighlight0);f.useProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",[0,1,0,1/this._height]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",g.rgbaToRgbaChannelSelectorMatrix);f.bindVAO(this._resources.quadVAO);f.drawArrays(m.PrimitiveType.TRIANGLE_STRIP,0,4);f.bindVAO()}renderHighlight(f,n,c){f.bindTexture(n,e.textureBindingHighlight0);f.useProgram(this._resources.highlightProgram);
c.applyHighlightOptions(f,this._resources.highlightProgram);f.bindVAO(this._resources.quadVAO);f.setBlendingEnabled(!0);f.setBlendFunction(m.BlendFactor.ONE,m.BlendFactor.ONE_MINUS_SRC_ALPHA);f.drawArrays(m.PrimitiveType.TRIANGLE_STRIP,0,4);f.bindVAO()}_initialize(f,n,c){this._width=n;this._height=c;n=h.BufferObject.createVertex(f,m.Usage.STATIC_DRAW,(new Int8Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1])).buffer);c=new d.VertexArrayObject(f,new Map([["a_position",0],["a_texcoord",1]]),{geometry:[new b.VertexElementDescriptor("a_position",
2,m.DataType.BYTE,0,4),new b.VertexElementDescriptor("a_texcoord",2,m.DataType.UNSIGNED_BYTE,2,4)]},{geometry:n});const r=l.createProgram(f,q.highlight),k=l.createProgram(f,q.blur);f.useProgram(r);r.setUniform1i("u_texture",e.textureBindingHighlight0);r.setUniform1i("u_shade",e.textureBindingHighlight1);r.setUniform1f("u_sigma",g.sigma);f.useProgram(k);k.setUniform1i("u_texture",e.textureBindingHighlight0);k.setUniform1f("u_sigma",g.sigma);this._resources={quadGeometry:n,quadVAO:c,highlightProgram:r,
blurProgram:k}}setup(f,n,c){this._resources?(this._width=n,this._height=c):this._initialize(f,n,c)}}return a})},"esri/views/2d/engine/webgl/shaders/HighlightPrograms":function(){define(["exports","./sources/resolver"],function(e,g){const q={shaders:{vertexShader:g.resolveIncludes("highlight/textured.vert"),fragmentShader:g.resolveIncludes("highlight/highlight.frag")},attributes:new Map([["a_position",0],["a_texcoord",1]])};g={shaders:{vertexShader:g.resolveIncludes("highlight/textured.vert"),fragmentShader:g.resolveIncludes("highlight/blur.frag")},
attributes:new Map([["a_position",0],["a_texcoord",1]])};e.blur=g;e.highlight=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/highlight/HighlightSurfaces":function(){define(["../../../../../webgl/enums","../../../../../webgl/FramebufferObject","../../../../../webgl/RenderbufferDescriptor","../../../../../webgl/TextureDescriptor"],function(e,g,q,h){function m(d,b,a){const f=new h.TextureDescriptor(b,a);f.wrapMode=e.TextureWrapMode.CLAMP_TO_EDGE;
return new g.FramebufferObject(d,f,new q.RenderbufferDescriptor(e.RenderbufferFormat.STENCIL_INDEX8,b,a))}class l{constructor(){this._height=this._width=void 0;this._resources=null}dispose(){this._resources&&(this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)}_initialize(d,b,a){this._width=b;this._height=a;const f=m(d,b,a);d=m(d,b,a);this._resources={sharedBlur1Fbo:f,sharedBlur2Fbo:d}}setup(d,b,a){!this._resources||this._width===b&&this._height===
a||this.dispose();this._resources||this._initialize(d,b,a)}get sharedBlur1Tex(){return this._resources.sharedBlur1Fbo.colorTexture}get sharedBlur1Fbo(){return this._resources.sharedBlur1Fbo}get sharedBlur2Tex(){return this._resources.sharedBlur2Fbo.colorTexture}get sharedBlur2Fbo(){return this._resources.sharedBlur2Fbo}}return l})},"esri/views/2d/engine/webgl/effects/HittestEffect":function(){define(["exports","../../../../../core/has","../definitions","./Effect","../../../../webgl/enums"],function(e,
g,q,h,m){class l extends h.Effect{constructor(){super(...arguments);this.name=this.constructor.name;this.defines=["hittest"]}dispose(){null!=this._fbo&&this._fbo.dispose()}createOptions({pixelRatio:d},b){if(!b.length)return null;var a=b.shift();b=a.x;const f=a.y;this._outstanding=a;a=g("esri-mobile");return{type:"hittest",distance:(a?q.hittestToleranceMobile:q.hittestToleranceDesktop)*d,smallSymbolDistance:(a?q.hittestToleranceMobile:q.hittestToleranceSmallSymbol)*d,smallSymbolSizeThreshold:q.hittestSmallSymbolThreshold,
position:[b,f]}}bind(d){const {context:b,attributeView:a}=d;a.size&&(d=a.getBlock(q.AttributeDataType.GPGPU),null!=d&&(d=d.getFBO(b),b.setViewport(0,0,a.size,a.size),b.bindFramebuffer(d),b.setColorMask(!0,!0,!0,!0),b.setClearColor(0,0,0,0),b.clear(b.gl.COLOR_BUFFER_BIT|b.gl.DEPTH_BUFFER_BIT)))}unbind(){}draw(d){if(null!=this._outstanding){var b=this._outstanding;this._outstanding=null;this._resolve(d,b.resolvers)}}async _resolve(d,b){const {context:a,attributeView:f}=d;d=f.getBlock(q.AttributeDataType.GPGPU);
if(null==d)b.forEach(r=>r.resolve([]));else{var n=d.getFBO(a);d=new Uint8Array(n.width*n.height*4);try{await n.readPixelsAsync(0,0,n.width,n.height,m.PixelFormat.RGBA,m.PixelType.UNSIGNED_BYTE,d)}catch(r){b.forEach(k=>k.resolve([]));return}var c=[];for(n=0;n<d.length;n+=4){const r=n/4;d[n]&&c.push(r)}b.forEach(r=>r.resolve(c))}}}e.HittestEffect=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/post-processing/EffectManager":function(){define("exports ./Bloom ./Blur ./Colorize ./DropShadow ./Opacity".split(" "),
function(e,g,q,h,m,l){const d={colorize:()=>new h.Colorize,blur:()=>new q.Blur,bloom:()=>new g.Bloom,opacity:()=>new l.Opacity,"drop-shadow":()=>new m.DropShadow};class b{constructor(){this._effectMap=new Map}dispose(){this._effectMap.forEach(a=>a.dispose());this._effectMap.clear()}getPostProcessingEffects(a){if(!a||0===a.length)return[];const f=[];for(const n of a){a:switch(a=n.type,a){case "bloom":case "blur":case "opacity":case "drop-shadow":break a;default:a="colorize"}let c=this._effectMap.get(a);
c||(c=d[a](),this._effectMap.set(a,c));f.push({postProcessingEffect:c,effect:n})}return f}}e.EffectManager=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/post-processing/Bloom":function(){define("exports ../../../../../../core/maybe ../../VertexStream ../../../../../webgl/enums ../../../../../webgl/FramebufferObject ../../../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l){const d=[1,0],b=[0,1],a=[1,.8,.6,.4,.2],f=[1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1];class n{constructor(){this._compositeFBO=this._intensityFBO=null;this._mipsFBOs=Array(5);this._nMips=5;this._kernelSizeArray=[3,5,7,9,11];this._size=[0,0];this._programDesc={luminosityHighPass:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/luminosityHighPass",attributes:new Map([["a_position",0]])},gaussianBlur:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/gaussianBlur",attributes:new Map([["a_position",0]])},composite:{vsPath:"post-processing/pp",fsPath:"post-processing/bloom/composite",
attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",attributes:new Map([["a_position",0]])}}}dispose(){this._quad=g.disposeMaybe(this._quad);this._intensityFBO=g.disposeMaybe(this._intensityFBO);this._compositeFBO=g.disposeMaybe(this._compositeFBO);if(this._mipsFBOs){for(let c=0;c<this._nMips;c++)this._mipsFBOs[c]&&(this._mipsFBOs[c].horizontal.dispose(),this._mipsFBOs[c].vertical.dispose());this._mipsFBOs=null}}draw(c,r,k){const {width:p,height:t}=
r,{context:w,painter:u}=c,{materialManager:y}=u;var x=w.gl;const v=this._programDesc,{strength:A,radius:z,threshold:B}=k;this._quad||(this._quad=new q(w,[-1,-1,1,-1,-1,1,1,1]));this._createOrResizeResources(c,p,t);w.setStencilTestEnabled(!1);w.setBlendingEnabled(!0);w.setBlendFunction(h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA);w.setStencilWriteMask(0);c=this._quad;c.bind();w.bindFramebuffer(this._intensityFBO);k=y.getProgram(v.luminosityHighPass);w.useProgram(k);w.bindTexture(r.colorTexture,
0);k.setUniform1i("u_texture",0);k.setUniform3fv("u_defaultColor",[0,0,0]);k.setUniform1f("u_defaultOpacity",0);k.setUniform1f("u_luminosityThreshold",B);k.setUniform1f("u_smoothWidth",.01);k=[Math.round(p/2),Math.round(t/2)];w.setViewport(0,0,k[0],k[1]);w.setClearColor(0,0,0,0);w.clear(x.COLOR_BUFFER_BIT);c.draw();w.setBlendingEnabled(!1);x=this._intensityFBO.colorTexture;for(let D=0;D<this._nMips;D++){const F=y.getProgram(v.gaussianBlur,[{name:"radius",value:this._kernelSizeArray[D]}]);w.useProgram(F);
w.bindTexture(x,D+1);F.setUniform1i("u_colorTexture",D+1);F.setUniform2fv("u_texSize",k);F.setUniform2fv("u_direction",d);w.setViewport(0,0,k[0],k[1]);const E=this._mipsFBOs[D];w.bindFramebuffer(E.horizontal);c.draw();x=E.horizontal.colorTexture;w.bindFramebuffer(E.vertical);w.bindTexture(x,D+1);F.setUniform2fv("u_direction",b);c.draw();x=E.vertical.colorTexture;k[0]=Math.round(k[0]/2);k[1]=Math.round(k[1]/2)}w.setViewport(0,0,p,t);k=y.getProgram(v.composite,[{name:"nummips",value:5}]);w.bindFramebuffer(this._compositeFBO);
w.useProgram(k);k.setUniform1f("u_bloomStrength",A);k.setUniform1f("u_bloomRadius",z);k.setUniform1fv("u_bloomFactors",a);k.setUniform3fv("u_bloomTintColors",f);w.bindTexture(this._mipsFBOs[0].vertical.colorTexture,1);k.setUniform1i("u_blurTexture1",1);w.bindTexture(this._mipsFBOs[1].vertical.colorTexture,2);k.setUniform1i("u_blurTexture2",2);w.bindTexture(this._mipsFBOs[2].vertical.colorTexture,3);k.setUniform1i("u_blurTexture3",3);w.bindTexture(this._mipsFBOs[3].vertical.colorTexture,4);k.setUniform1i("u_blurTexture4",
4);w.bindTexture(this._mipsFBOs[4].vertical.colorTexture,5);k.setUniform1i("u_blurTexture5",5);c.draw();w.bindFramebuffer(r);w.setBlendingEnabled(!0);r=y.getProgram(v.blit);w.useProgram(r);w.bindTexture(this._compositeFBO.colorTexture,6);r.setUniform1i("u_texture",6);w.setBlendFunction(h.BlendFactor.ONE,h.BlendFactor.ONE);c.draw();c.unbind();w.setBlendFunction(h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA);w.setStencilTestEnabled(!0)}_createOrResizeResources(c,r,k){({context:c}=c);if(!this._compositeFBO||
this._size[0]!==r||this._size[1]!==k){this._size[0]=r;this._size[1]=k;var p=[Math.round(r/2),Math.round(k/2)];this._compositeFBO?this._compositeFBO.resize(r,k):(r=new l.TextureDescriptor(r,k),r.internalFormat=h.PixelFormat.RGBA,r.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE,this._compositeFBO=new m.FramebufferObject(c,r));this._intensityFBO?this._intensityFBO.resize(p[0],p[1]):(r=new l.TextureDescriptor(p[0],p[1]),r.internalFormat=h.PixelFormat.RGBA,r.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE,this._intensityFBO=
new m.FramebufferObject(c,r));for(r=0;r<this._nMips;r++)this._mipsFBOs[r]?(this._mipsFBOs[r].horizontal.resize(p[0],p[1]),this._mipsFBOs[r].vertical.resize(p[0],p[1])):(k=new l.TextureDescriptor(p[0],p[1]),k.internalFormat=h.PixelFormat.RGBA,k.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE,this._mipsFBOs[r]={horizontal:new m.FramebufferObject(c,k),vertical:new m.FramebufferObject(c,k)}),p[0]=Math.round(p[0]/2),p[1]=Math.round(p[1]/2)}}}e.Bloom=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/effects/post-processing/Blur":function(){define(["exports","../../VertexStream","../../../../../webgl/enums","../../../../../webgl/FramebufferObject","../../../../../webgl/TextureDescriptor"],function(e,g,q,h,m){const l=[1,0],d=[0,1];class b{constructor(){this._blurFBO=null;this._size=[0,0];this._programDesc={gaussianBlur:{vsPath:"post-processing/pp",fsPath:"post-processing/blur/gaussianBlur",attributes:new Map([["a_position",0]])},radialBlur:{vsPath:"post-processing/pp",
fsPath:"post-processing/blur/radial-blur",attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",attributes:new Map([["a_position",0]])}}}dispose(){this._blurFBO&&(this._blurFBO.dispose(),this._blurFBO=null)}draw(a,f,n){const {context:c}=a,{type:r,radius:k}=n;0!==k&&(this._createOrResizeResources(a),this._quad||(this._quad=new g(c,[-1,-1,1,-1,-1,1,1,1])),n=this._quad,n.bind(),"blur"===r?this._gaussianBlur(a,f,k):this._radialBlur(a,f),n.unbind())}_gaussianBlur(a,
f,n){const {context:c,state:r,painter:k,pixelRatio:p}=a;var {size:t}=r,{materialManager:w}=k;a=this._quad;t=[Math.round(p*t[0]),Math.round(p*t[1])];const u=this._blurFBO;w=w.getProgram(this._programDesc.gaussianBlur,[{name:"radius",value:Math.ceil(n)}]);c.useProgram(w);c.setBlendingEnabled(!1);c.bindFramebuffer(u);c.bindTexture(f.colorTexture,4);w.setUniform1i("u_colorTexture",4);w.setUniform2fv("u_texSize",t);w.setUniform2fv("u_direction",l);w.setUniform1f("u_sigma",n);a.draw();c.bindFramebuffer(f);
c.setStencilWriteMask(0);c.setStencilTestEnabled(!1);c.setDepthWriteEnabled(!1);c.setDepthTestEnabled(!1);c.bindTexture(u?.colorTexture,5);w.setUniform1i("u_colorTexture",5);w.setUniform2fv("u_direction",d);a.draw();c.setBlendingEnabled(!0);c.setBlendFunction(q.BlendFactor.ONE,q.BlendFactor.ONE_MINUS_SRC_ALPHA);c.setStencilTestEnabled(!0)}_radialBlur(a,f){const {context:n,painter:c}=a,{materialManager:r}=c,k=this._programDesc;a=this._quad;const p=this._blurFBO;n.bindFramebuffer(p);const t=r.getProgram(k.radialBlur);
n.useProgram(t);n.setBlendingEnabled(!1);n.bindTexture(f.colorTexture,4);t.setUniform1i("u_colorTexture",4);a.draw();n.bindFramebuffer(f);n.setStencilWriteMask(0);n.setStencilTestEnabled(!1);n.setDepthWriteEnabled(!1);n.setDepthTestEnabled(!1);n.setBlendingEnabled(!0);f=r.getProgram(k.blit);n.useProgram(f);n.bindTexture(p?.colorTexture,5);f.setUniform1i("u_texture",5);n.setBlendFunction(q.BlendFactor.ONE,q.BlendFactor.ONE_MINUS_SRC_ALPHA);a.draw()}_createOrResizeResources(a){const {context:f,state:n,
pixelRatio:c}=a;var {size:r}=n;a=Math.round(c*r[0]);r=Math.round(c*r[1]);this._blurFBO&&this._size[0]===a&&this._size[1]===r||(this._size[0]=a,this._size[1]=r,this._blurFBO?this._blurFBO.resize(a,r):(a=new m.TextureDescriptor(a,r),a.internalFormat=q.PixelFormat.RGBA,a.wrapMode=q.TextureWrapMode.CLAMP_TO_EDGE,this._blurFBO=new h.FramebufferObject(f,a)))}}e.Blur=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/post-processing/Colorize":function(){define("exports ../../../../../../core/maybe ../../VertexStream ../../../../../webgl/enums ../../../../../webgl/Texture ../../../../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l){class d{constructor(){this._layerFBOTexture=null;this._size=[0,0];this._programDesc={vsPath:"post-processing/pp",fsPath:"post-processing/filterEffect",attributes:new Map([["a_position",0]])}}dispose(){this._layerFBOTexture=g.disposeMaybe(this._layerFBOTexture)}draw(b,a,f){const {width:n,height:c}=a;this._createOrResizeResources(b,n,c);const {context:r,painter:k}=b,{materialManager:p}=k,t=this._programDesc;b=this._quad;f=f.colorMatrix;b.bind();const w=this._layerFBOTexture;r.bindFramebuffer(a);
a.copyToTexture(0,0,n,c,0,0,w);r.setBlendingEnabled(!1);r.setStencilTestEnabled(!1);a=p.getProgram(t);r.useProgram(a);r.bindTexture(w,2);a.setUniformMatrix4fv("u_coefficients",f);a.setUniform1i("u_colorTexture",2);b.draw();r.setBlendingEnabled(!0);r.setBlendFunction(h.BlendFactor.ONE,h.BlendFactor.ONE_MINUS_SRC_ALPHA);r.setStencilTestEnabled(!0);b.unbind()}_createOrResizeResources(b,a,f){({context:b}=b);if(!this._layerFBOTexture||this._size[0]!==a||this._size[1]!==f){this._size[0]=a;this._size[1]=
f;if(this._layerFBOTexture)this._layerFBOTexture.resize(a,f);else{const n=new l.TextureDescriptor;n.internalFormat=h.PixelFormat.RGBA;n.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE;n.width=a;n.height=f;this._layerFBOTexture=new m.Texture(b,n)}this._quad||(this._quad=new q(b,[-1,-1,1,-1,-1,1,1,1]))}}}e.Colorize=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/post-processing/DropShadow":function(){define("exports ../../../../../../core/maybe ../../../../../../core/screenUtils ../../VertexStream ../../../../../webgl/enums ../../../../../webgl/FramebufferObject ../../../../../webgl/Texture ../../../../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l,d,b){const a=[1,0],f=[0,1];class n{constructor(){this._verticalBlurFBO=this._horizontalBlurFBO=this._layerFBOTexture=null;this._size=[0,0];this._quad=null;this._programDesc={blur:{vsPath:"post-processing/pp",fsPath:"post-processing/blur/gaussianBlur",attributes:new Map([["a_position",0]])},composite:{vsPath:"post-processing/pp",fsPath:"post-processing/drop-shadow/composite",attributes:new Map([["a_position",0]])},blit:{vsPath:"post-processing/pp",fsPath:"post-processing/blit",
attributes:new Map([["a_position",0]])}}}dispose(){this._layerFBOTexture=g.disposeMaybe(this._layerFBOTexture);this._horizontalBlurFBO=g.disposeMaybe(this._horizontalBlurFBO);this._verticalBlurFBO=g.disposeMaybe(this._verticalBlurFBO)}draw(c,r,k){const {context:p,state:t,painter:w}=c,{materialManager:u}=w,y=this._programDesc,x=r.width,v=r.height,A=[Math.round(x),Math.round(v)],{blurRadius:z,offsetX:B,offsetY:D,color:F}=k;k=[q.pt2px(B),q.pt2px(D)];this._createOrResizeResources(c,x,v,A);const E=this._horizontalBlurFBO;
c=this._verticalBlurFBO;p.setStencilWriteMask(0);p.setStencilTestEnabled(!1);p.setDepthWriteEnabled(!1);p.setDepthTestEnabled(!1);const C=this._layerFBOTexture;r.copyToTexture(0,0,x,v,0,0,C);this._quad||(this._quad=new h(p,[-1,-1,1,-1,-1,1,1,1]));p.setViewport(0,0,A[0],A[1]);const G=this._quad;G.bind();p.setBlendingEnabled(!1);const H=u.getProgram(y.blur,[{name:"radius",value:Math.ceil(z)}]);p.useProgram(H);p.bindFramebuffer(E);p.bindTexture(r.colorTexture,4);H.setUniform1i("u_colorTexture",4);H.setUniform2fv("u_texSize",
A);H.setUniform2fv("u_direction",a);H.setUniform1f("u_sigma",z);G.draw();p.bindFramebuffer(c);p.bindTexture(E?.colorTexture,5);H.setUniform1i("u_colorTexture",5);H.setUniform2fv("u_direction",f);G.draw();p.bindFramebuffer(r);p.setViewport(0,0,x,v);r=u.getProgram(y.composite);p.useProgram(r);p.bindTexture(c?.colorTexture,2);r.setUniform1i("u_blurTexture",2);p.bindTexture(C,3);r.setUniform1i("u_layerFBOTexture",3);r.setUniform4fv("u_shadowColor",[F[0]/255*F[3],F[1]/255*F[3],F[2]/255*F[3],F[3]]);r.setUniformMatrix3fv("u_displayViewMat3",
t.displayMat3);r.setUniform2fv("u_shadowOffset",k);G.draw();p.setBlendingEnabled(!0);p.setStencilTestEnabled(!0);p.setBlendFunction(m.BlendFactor.ONE,m.BlendFactor.ONE_MINUS_SRC_ALPHA);G.unbind()}_createOrResizeResources(c,r,k,p){({context:c}=c);if(!this._horizontalBlurFBO||this._size[0]!==r||this._size[1]!==k){this._size[0]=r;this._size[1]=k;if(this._horizontalBlurFBO)this._horizontalBlurFBO.resize(p[0],p[1]);else{const t=new b.TextureDescriptor(p[0],p[1]);t.internalFormat=m.PixelFormat.RGBA;t.wrapMode=
m.TextureWrapMode.CLAMP_TO_EDGE;this._horizontalBlurFBO=new l.FramebufferObject(c,t)}this._verticalBlurFBO?this._verticalBlurFBO.resize(p[0],p[1]):(p=new b.TextureDescriptor(p[0],p[1]),p.internalFormat=m.PixelFormat.RGBA,p.wrapMode=m.TextureWrapMode.CLAMP_TO_EDGE,this._verticalBlurFBO=new l.FramebufferObject(c,p));this._layerFBOTexture?this._layerFBOTexture.resize(r,k):(p=new b.TextureDescriptor,p.internalFormat=m.PixelFormat.RGBA,p.wrapMode=m.TextureWrapMode.CLAMP_TO_EDGE,p.width=r,p.height=k,this._layerFBOTexture=
new d.Texture(c,p))}}}e.DropShadow=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/effects/post-processing/Opacity":function(){define(["exports","../../../../../../core/maybe","../../../../../webgl/enums","../../../../../webgl/Texture","../../../../../webgl/TextureDescriptor"],function(e,g,q,h,m){class l{constructor(){this._size=[0,0];this._layerFBOTexture=null}dispose(){this._layerFBOTexture=g.disposeMaybe(this._layerFBOTexture)}draw(d,b,a){const {width:f,
height:n}=b;this._createOrResizeResources(d,f,n);const {context:c,painter:r}=d;({amount:d}=a);a=c.gl;const k=this._layerFBOTexture;c.bindFramebuffer(b);b.copyToTexture(0,0,f,n,0,0,k);c.setBlendingEnabled(!0);c.setStencilTestEnabled(!1);c.setDepthTestEnabled(!1);c.setClearColor(0,0,0,0);c.clear(a.COLOR_BUFFER_BIT);r.blitTexture(c,k,q.TextureSamplingMode.NEAREST,d)}_createOrResizeResources(d,b,a){({context:d}=d);if(!this._layerFBOTexture||this._size[0]!==b||this._size[1]!==a)if(this._size[0]=b,this._size[1]=
a,this._layerFBOTexture)this._layerFBOTexture.resize(b,a);else{const f=new m.TextureDescriptor;f.internalFormat=q.PixelFormat.RGBA;f.wrapMode=q.TextureWrapMode.CLAMP_TO_EDGE;f.samplingMode=q.TextureSamplingMode.NEAREST;f.width=b;f.height=a;this._layerFBOTexture=new h.Texture(d,f)}}}e.Opacity=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/painter/RenderPass":function(){define(["../../../../../core/arrayUtils","../enums"],function(e,g){class q{constructor(h,
m){this.brushes=h;this.name=m.name;this.drawPhase=m.drawPhase||g.WGLDrawPhase.MAP;this._targetFn=m.target;this.effects=m.effects||[];this.enableDefaultDraw=m.enableDefaultDraw??(()=>!0);this.forceDrawByDisplayOrder=!!m.forceDrawByDisplayOrder}render(h){const {context:m,profiler:l}=h,d=this._targetFn();var b=this.drawPhase&h.drawPhase;l.recordPassStart(this.name);if(b){this.enableDefaultDraw()&&this._doRender(h,d);l.recordPassEnd();for(const a of this.effects){if(!a.enable())continue;b=a.apply;const f=
a.args?.(),n=m.getViewport(),c=m.getBoundFramebufferObject(),r=h.passOptions;this._bindEffect(h,b,f);this._doRender(h,d,b.defines);this._drawAndUnbindEffect(h,b,n,c,r,f)}}}_doRender(h,m,l){if(null!=m){var {profiler:d,context:b}=h;for(const a of this.brushes){d.recordBrushStart(a.name);if(null!=a.brushEffect){const f=b.getViewport(),n=b.getBoundFramebufferObject(),c=h.passOptions;this._bindEffect(h,a.brushEffect);this._drawWithBrush(a,h,m,l);this._drawAndUnbindEffect(h,a.brushEffect,f,n,c)}else this._drawWithBrush(a,
h,m,l);d.recordBrushEnd()}}}_drawWithBrush(h,m,l,d){e.isArrayLike(l)?(h.prepareState(m,d),h.drawMany(m,l,d)):l.visible&&(h.prepareState(m,d),h.draw(m,l,d))}_bindEffect(h,m,l){const {profiler:d}=h;d.recordPassStart(this.name+"."+m.name);m.bind(h,l);m=m.createOptions(h,l);h.passOptions=m}_drawAndUnbindEffect(h,m,l,d,b,a){const {profiler:f,context:n}=h;h.passOptions=b;f.recordBrushStart(m.name);m.draw(h,a);m.unbind(h,a);n.bindFramebuffer(d);const {x:c,y:r,width:k,height:p}=l;n.setViewport(c,r,k,p);f.recordBrushEnd();
f.recordPassEnd()}}return q})},"esri/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache":function(){define(["exports"],function(e){class g{constructor(){this._programCache=new Map}destroy(){for(const q of this._programCache.values())q.destroy();this._programCache.clear()}getProgram(q,h,m,l,d){const b=q.getShaderKey(h,m,l,d);let a=this._programCache.get(b);a||(a=q.getProgram(h,m,l,d),this._programCache.set(b,a));return a}}e.TechniqueProgramCache=g;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/Profiler":function(){define(["exports","../../../../core/CircularArray","../../../../core/Evented","../../../../core/has","../../../webgl/capabilities/DisjointTimerQuery"],function(e,g,q,h,m){const l=h("esri-2d-profiler");class d{constructor(b,a){this._events=new q;this._entries=new Map;this._timings=new g(10);this._currentSummary=this._currentBrush=this._currentPass=this._currentContainer=null;if(l){this._ext=m.createDisjointTimerQuery(b.gl,{});this._debugOutput=
a;var f=b.gl;if(this.enableCommandLogging)for(var n in f)if("function"===typeof f[n]){const c=f[n],r=n.includes("draw");f[n]=(...k)=>{this._events.emit("command",{container:this._currentContainer,pass:this._currentPass,brush:this._currentBrush,method:n,args:k,isDrawCommand:r});this._currentSummary&&(this._currentSummary.commands++,r&&this._currentSummary.drawCommands++);return c.apply(f,k)}}}}get enableCommandLogging(){return!("object"===typeof l&&l.disableCommands)}recordContainerStart(b){l&&(this._currentContainer=
b)}recordContainerEnd(){l&&(this._currentContainer=null)}recordPassStart(b){l&&(this._currentPass=b,this._initSummary())}recordPassEnd(){l&&(this._currentPass=null,this._emitSummary())}recordBrushStart(b){l&&(this._currentBrush=b)}recordBrushEnd(){l&&(this._currentBrush=null)}recordStart(b){if(l&&null!=this._ext){if(this._entries.has(b)){const r=this._entries.get(b);var a=this._ext.resultAvailable(r.query),f=this._ext.disjoint();if(a&&!f){a=this._ext.getResult(r.query)/1E6;f=0;if(null!=this._timings.enqueue(a)){f=
this._timings.entries;const k=f.length;let p=0;for(var n of f)p+=n;f=p/k}n=a.toFixed(2);a=f?f.toFixed(2):"--";this.enableCommandLogging?(console.groupCollapsed(`Frame report for ${b}, ${n} ms (${a} last 10 avg)\n${r.commandsLen} Commands (${r.drawCommands} draw)`),console.log("RenderPass breakdown: "),console.table(r.summaries),console.log("Commands: ",r.commands),console.groupEnd()):console.log(`Frame report for ${b}, ${n} ms (${a} last 10 avg)`);this._debugOutput.innerHTML=`${n} (${a})`}for(const k of r.handles)k.remove();
this._ext.deleteQuery(r.query);this._entries.delete(b)}const c={name:b,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(c.handles.push(this._events.on("command",r=>{c.commandsLen++;c.commands.push(r);r.isDrawCommand&&c.drawCommands++})),c.handles.push(this._events.on("summary",r=>{c.summaries.push(r)})));this._ext.beginTimeElapsed(c.query);this._entries.set(b,c)}}recordEnd(b){l&&null!=this._ext&&this._entries.has(b)&&this._ext.endTimeElapsed()}_initSummary(){this.enableCommandLogging&&
(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})}_emitSummary(){this.enableCommandLogging&&this._currentSummary&&this._events.emit("summary",this._currentSummary)}}e.Profiler=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/CircularArray":function(){define(function(){class e{constructor(g){this._start=this.size=0;this.maxSize=g;this._buffer=Array(g)}get entries(){return this._buffer}enqueue(g){if(this.size===this.maxSize){const q=
this._buffer[this._start];this._buffer[this._start]=g;this._start=(this._start+1)%this.maxSize;return q}this._buffer[(this._start+this.size++)%this.maxSize]=g;return null}dequeue(){if(0===this.size)return null;const g=this._buffer[this._start];this._buffer[this._start]=null;this.size--;this._start=(this._start+1)%this.maxSize;return g}peek(){return 0===this.size?null:this._buffer[this._start]}peekLast(){return 0===this.size?null:this._buffer[(this._start+(this.size-1))%this.maxSize]}find(g){if(0===
this.size)return null;for(const q of this._buffer)if(null!=q&&g(q))return q;return null}clear(g){let q=this.dequeue();for(;null!=q;)g&&g(q),q=this.dequeue()}}return e})},"esri/views/webgl/capabilities/DisjointTimerQuery":function(){define(["exports"],function(e){class g{constructor(q,h,m,l,d,b,a,f,n){this.createQuery=q;this.deleteQuery=h;this.resultAvailable=m;this.getResult=l;this.disjoint=d;this.beginTimeElapsed=b;this.endTimeElapsed=a;this.createTimestamp=f;this.timestampBits=n}}e.hasRunningElapsedTimer=
!1;e.DisjointTimerQuery=g;e.createDisjointTimerQuery=function(q,h){if(h.disjointTimerQuery)return null;let m=q.getExtension("EXT_disjoint_timer_query_webgl2");return m?new g(()=>q.createQuery(),l=>{q.deleteQuery(l);e.hasRunningElapsedTimer=!1},l=>q.getQueryParameter(l,q.QUERY_RESULT_AVAILABLE),l=>q.getQueryParameter(l,q.QUERY_RESULT),()=>q.getParameter(m.GPU_DISJOINT_EXT),l=>{e.hasRunningElapsedTimer||(e.hasRunningElapsedTimer=!0,q.beginQuery(m.TIME_ELAPSED_EXT,l))},()=>{q.endQuery(m.TIME_ELAPSED_EXT);
e.hasRunningElapsedTimer=!1},l=>m.queryCounterEXT(l,m.TIMESTAMP_EXT),()=>q.getQuery(m.TIMESTAMP_EXT,m.QUERY_COUNTER_BITS_EXT)):(m=q.getExtension("EXT_disjoint_timer_query"))?new g(()=>m.createQueryEXT(),l=>{m.deleteQueryEXT(l);e.hasRunningElapsedTimer=!1},l=>m.getQueryObjectEXT(l,m.QUERY_RESULT_AVAILABLE_EXT),l=>m.getQueryObjectEXT(l,m.QUERY_RESULT_EXT),()=>q.getParameter(m.GPU_DISJOINT_EXT),l=>{e.hasRunningElapsedTimer||(e.hasRunningElapsedTimer=!0,m.beginQueryEXT(m.TIME_ELAPSED_EXT,l))},()=>{m.endQueryEXT(m.TIME_ELAPSED_EXT);
e.hasRunningElapsedTimer=!1},l=>m.queryCounterEXT(l,m.TIMESTAMP_EXT),()=>m.getQueryEXT(m.TIMESTAMP_EXT,m.QUERY_COUNTER_BITS_EXT)):null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TileReshuffleManager":function(){define(["exports"],function(e){class g{constructor(){this._candidateTiles=[]}schedule(q){this._candidateTiles.includes(q)||this._candidateTiles.push(q)}reshuffle(q){const h=[];for(const m of this._candidateTiles)0<q?(m.reshuffle(),q--):h.push(m);
this._candidateTiles=h}}e.TileReshuffleManager=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry":function(){define("exports ./dotDensity/DotDensityTechnique ./fill/ComplexFillTechnique ./fill/ComplexOutlineFillTechnique ./fill/FillTechnique ./fill/OutlineFillTechnique ./fill/PatternFillTechnique ./fill/PatternOutlineFillTechnique ./heatmap/HeatmapTechnique ./labels/LabelTechnique ./line/LineTechnique ./line/TexturedLineTechnique ./markers/MarkerTechnique ./pieChart/PieChartTechnique ./text/TextTechnique".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p){const t={fill:new m.FillTechnique,patternFill:new d.PatternFillTechnique,complexFill:new q.ComplexFillTechnique,outlineFill:new l.OutlineFillTechnique,patternOutlineFill:new b.PatternOutlineFillTechnique,complexOutlineFill:new h.ComplexOutlineFillTechnique,marker:new r.MarkerTechnique,pieChart:new k.PieChartTechnique,line:new n.LineTechnique,texturedLine:new c.TexturedLineTechnique,text:new p.TextTechnique,label:new f.LabelTechnique,heatmap:new a.HeatmapTechnique,
dotDensity:new g.DotDensityTechnique};e.Techniques=t;e.shutdown=function(w){for(const u in t)t[u].shutdown(w)};e.startup=function(){for(const w in t)t[w].startup()};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique":function(){define("exports ../../../definitions ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./DotDensityPointShader ./DotDensityPolygonShader ./DotDensityResources ../shaders/FillShader ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f){class n extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.DotDensity;this.shaders={polygon:new d.DotDensityPolygonShader,point:new l.DotDensityPointShader,fill:new a.FillShader};this._resources=new Map}render(c,r){h.isHighlight(c)||h.isHittest(c)?this._renderPolygons(c,r):this._renderDotDensity(c,r)}_renderPolygons(c,r){const {painter:k}=c;k.setShader({shader:this.shaders.fill,uniforms:{...h.getFeatureUniforms(c,r.target),visualVariableColor:null,
visualVariableOpacity:null},defines:{...h.getSelectionDefines(c)},optionalAttributes:{zoomRange:!1},useComputeBuffer:h.isHittest(c)});k.setPipelineState(h.getFeaturePipelineState(c));k.submitDraw(c,r)}_renderDotDensity(c,r){const {context:k,painter:p,requiredLevel:t}=c,w=r.instance.getInput().uniforms,u=this._getOrCreateResourcesRecord(k);var y=u.getDotDensityTextures(k,g.tileSize,w.seed),x=1/2**(t-r.target.key.level),v=g.tileSize;v=v*window.devicePixelRatio*v*window.devicePixelRatio;const A=1/x*
(w.dotScale?c.state.scale/w.dotScale:1)*w.dotValue*(1/x);p.setShader({shader:this.shaders.polygon,uniforms:{...h.getFeatureUniforms(c,r.target),instance:{isActive:w.isActive,colors:w.colors,dotValue:Math.max(1,A)},draw:{dotTexture0:{unit:g.textureBindingRenderer0,texture:y[0]},dotTexture1:{unit:g.textureBindingRenderer1,texture:y[1]},tileZoomFactor:x,pixelRatio:window.devicePixelRatio,tileDotsOverArea:v/(g.tileSize*window.devicePixelRatio*g.tileSize*window.devicePixelRatio)}},defines:{...h.getSelectionDefines(c),
blending:w.blending},optionalAttributes:{},useComputeBuffer:!1});p.setPipelineState(h.getFeaturePipelineState(c));y=k.getViewport();k.setViewport(0,0,g.tileSize,g.tileSize);x=k.getBoundFramebufferObject();v=u.getFBO(k);k.bindFramebuffer(v);k.setClearColor(0,0,0,0);p.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});p.updatePipelineState(k);k.clear(f.ClearBufferBit.COLOR_BUFFER_BIT);p.submitDraw(c,r);k.bindFramebuffer(x);k.setViewport(y.x,y.y,y.width,y.height);
y=u.getFBO(k).colorTexture;p.setShader({shader:this.shaders.point,uniforms:{view:h.getViewUniforms(c,r.target),instance:{dotSize:w.dotSize},draw:{locations:{unit:g.textureBindingRenderer0,texture:y},tileZoomFactor:1,pixelRatio:window.devicePixelRatio}},defines:{...h.getSelectionDefines(c)},optionalAttributes:{},useComputeBuffer:!1});p.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});p.submitDrawMesh(k,u.getDotDensityMesh(k))}shutdown(c){super.shutdown(c);this._resources.get(c)?.destroy();
this._resources.delete(c)}_getOrCreateResourcesRecord(c){let r=this._resources.get(c);null==r&&(r=new b.DotDensityResources,this._resources.set(c,r));return r}}e.DotDensityTechnique=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/FeatureTechnique":function(){define(["exports","../../enums","./Technique"],function(e,g,q){class h extends q.Technique{constructor(){super(...arguments);this.overrideStencilRef=null;this.symbologyPlane=
g.FeatureSymbologyDrawOrder.FILL;this.postProcessingEnabled=!1}postProcess(m,l){}}e.FeatureTechnique=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/Technique":function(){define(["exports","../../enums"],function(e,g){class q{constructor(){this.drawPhase=g.WGLDrawPhase.MAP|g.WGLDrawPhase.HITTEST|g.WGLDrawPhase.HIGHLIGHT|g.WGLDrawPhase.DEBUG}startup(){}shutdown(h){}}e.Technique=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType":function(){define(["exports"],function(e){e.TechniqueType=void 0;var g=e.TechniqueType||(e.TechniqueType={});g[g.Fill=0]="Fill";g[g.PatternFill=1]="PatternFill";g[g.ComplexFill=2]="ComplexFill";g[g.OutlineFill=3]="OutlineFill";g[g.PatternOutlineFill=4]="PatternOutlineFill";g[g.ComplexOutlineFill=5]="ComplexOutlineFill";g[g.Marker=6]="Marker";g[g.PieChart=7]="PieChart";g[g.Line=8]="Line";g[g.TexturedLine=9]="TexturedLine";g[g.Text=10]=
"Text";g[g.Label=11]="Label";g[g.Heatmap=12]="Heatmap";g[g.DotDensity=13]="DotDensity";g[g.Test=14]="Test";Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../definitions ../../GraphShaderModule ../../graph/glsl ../shaders/AFeatureShader ../shaders/ViewInfo".split(" "),function(e,g,q,h,m,l,d){class b extends h.VertexInput{}g.__decorate([h.location(0,
m.Vec2)],b.prototype,"pos",void 0);class a extends l.FeatureFragmentInput{}class f extends h.UniformGroup{}g.__decorate([h.uniform(m.Float)],f.prototype,"dotSize",void 0);class n extends h.UniformGroup{}g.__decorate([h.uniform(m.Sampler2D)],n.prototype,"locations",void 0);g.__decorate([h.uniform(m.Float)],n.prototype,"pixelRatio",void 0);g.__decorate([h.uniform(m.Float)],n.prototype,"tileZoomFactor",void 0);class c extends h.GraphShaderModule{vertex(r){var k=(new m.Mat3(1,0,0,0,-1,0,0,1,1)).multiply(new m.Vec3(r.pos.xy.divide(q.tileSize),
1));k=m.texture2D(this.draw.locations,k.xy);var p=m.max(this.instance.dotSize.divide(2),new m.Float(1)),t=new m.Float(0);t=t.add(m.step(k.a,new m.Float(1E-6)).multiply(2));let w=p.add(this.instance.dotSize);r=this.view.displayViewScreenMat3.multiply(new m.Vec3(r.pos.add(.5),1));r=new m.Vec4(r.xy,t,1);t=this.instance.dotSize.divide(w);p=(new m.Float(-1)).divide(p.divide(w));w=w.multiply(this.draw.pixelRatio.multiply(this.draw.tileZoomFactor));return{glPosition:r,glPointSize:w,color:k,ratio:t,invEdgeRatio:p}}fragment(r){var k=
m.length(r.glPointCoord.subtract(.5)).multiply(2);k=m.smoothstep(new m.Float(0),new m.Float(1),r.invEdgeRatio.multiply(k.subtract(r.ratio)).add(1));const p=new h.FragmentOutput;p.glFragColor=r.color.multiply(k);return p}}g.__decorate([h.uniform(f)],c.prototype,"instance",void 0);g.__decorate([h.uniform(n)],c.prototype,"draw",void 0);g.__decorate([h.uniform(d.ViewInfo)],c.prototype,"view",void 0);g.__decorate([g.__param(0,h.input(b))],c.prototype,"vertex",null);g.__decorate([g.__param(0,h.input(a))],
c.prototype,"fragment",null);e.DotDensityPointDrawUniforms=n;e.DotDensityPointFragmentInput=a;e.DotDensityPointInstanceUniforms=f;e.DotDensityPointShader=c;e.DotDensityPointVertexInput=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/GraphShaderModule":function(){define("exports ../../../../../chunks/tslib.es6 ../../../../../core/has ../../../../../core/Logger ../../../../../core/string ./ShaderBuilder2D ./graph/glsl ./graph/GlslGraphWriter ./graph/ShaderGraphContext ./graph/ShaderGraphNode ./typed/TypedShaderProgram".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){function c(x,v,A){const z=x.constructor[v]??[];x.constructor.hasOwnProperty(v)||Object.defineProperty(x.constructor,v,{value:z.slice()});x.constructor[v].push(A)}q=x=>(v,A)=>{c(v,"builtins",{builtin:x,propertyKey:A})};const r=(x,v)=>(A,z)=>{A.constructor.builtins.push({builtin:x,propertyKey:z,typeCtor:v})};class k{}k.builtins=[];g.__decorate([r("gl_VertexID",d.Int)],k.prototype,"glVertexID",void 0);class p{}class t{}t.builtins=[];g.__decorate([r("gl_FragCoord",d.Vec4)],
t.prototype,"glFragCoord",void 0);g.__decorate([r("gl_PointCoord",d.Vec2)],t.prototype,"glPointCoord",void 0);class w{}g.__decorate([q("gl_FragColor")],w.prototype,"glFragColor",void 0);class u{constructor(){this.type="uniform-group"}get _uniforms(){return this.constructor.uniforms??[]}}class y{constructor(){this.logShader=!1;this.computeAttributes={}}get vertexInput(){const x=this._shaderModuleClass.inputs.findLast(v=>"vertex"===v.propertyKey&&0===v.parameterIndex);if(!x)throw Error("Unable to find vertex input parameter");
return x}get computeInput(){return this._shaderModuleClass.inputs.findLast(x=>"vertex"===x.propertyKey&&1===x.parameterIndex)}get fragmentInput(){const x=this._shaderModuleClass.inputs.findLast(v=>"fragment"===v.propertyKey);if(!x)throw Error("Unable to find fragment input parameter");return x}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){return[...this.vertexInput.inputCtor.locations,...(this.computeInput?.inputCtor.locations??[])]}get locationsMap(){const x=
new Map,v=new Set;for(const A of this.locations)v.has(A.index)?h.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${A.propertyKey} to ${A.index}. Index already in use`,{locationsMap:x}):(x.set(A.propertyKey,A.index),v.add(A.index));return x}get locationInfo(){if(!this._locationInfo){const x=this.locationsMap,v=Array.from(x.entries()).map(([A,z])=>`${A}.${z}`).join(".");this._locationInfo={hash:m.numericHash(v),locations:x,
computeAttributeMap:this.computeAttributes}}return this._locationInfo}get renamedLocationsMap(){const x=new Map;for(const v of this.locations)x.set("a_"+v.propertyKey,v.index);return x}get optionPropertyKeys(){if(!this._optionPropertyKeys){const x=new Set;for(const v of this._options)x.add(v.propertyKey);this._optionPropertyKeys=x}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??
[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}getProgram(x,v,A,z){try{const {vertex:B,fragment:D,uniformBindings:F}=this._generateShaders(x,v,A,z);return new n.TypedShaderProgram(B,D,this.renamedLocationsMap,this.locationInfo,F,this.transformFeedbackBindings)}catch(B){return new n.TypedShaderProgram("","",this.renamedLocationsMap,this.locationInfo,[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(x){var v=this._options.find(A=>A.propertyKey===x);if(v)return{type:"option",
className:v.typeCtor};v=this._uniforms.find(A=>A.propertyKey===x);if(!v)throw Error(`Unable to find uniform class type for property: ${x}`);return{type:"required",className:v.typeCtor}}getShaderKey(x,v,A,z){const B=Object.keys(x).map(C=>`${C}.${x[C]}`).join("."),D=Object.keys(A).map(C=>`${C}.${A[C]}`).join("."),F=Object.keys(z).map(C=>`${C}.${z[C]}`).join("."),E=Object.keys(v).filter(C=>this.optionPropertyKeys.has(C)&&v[C]).join(".");return`${this.constructor.name}.${B}.${D}.${F}.${E}`}_generateShaders(x,
v,A,z){const B=[];this._setDefines(A);this._setOptionalUniforms(B,v);this._setRequiredUniforms(B);v=this._hydrateVertexInput(z);z=this._injectPackPrecisionFactor(v,x);x=(A=this._hydrateComputeInput())&&this._injectComputePackPrecisionFactor(A,x);const D=this.vertex(z,x);x=this._hydrateFragmentInput(D);z=this.fragment(x);const F=new Set;for(var E in z)f.setReachableUids(F,z[E]);E=this._getVertexInputBuiltins();E=a.ShaderGraphContext.createVertex({...v,...A},D,E,B,this.transformFeedbackBindings,F);
(new b.GlslShaderWriter).write(E);v=this._getFragmentInputBuiltins(z);v.set("glPointCoord","gl_PointCoord");v=a.ShaderGraphContext.createFragment(x,z,v,B,E,this.transformFeedbackBindings);(new b.GlslShaderWriter).write(v);v=this._createShaderBuilder(E,v);E=v.generate("vertex",!1);v=v.generate("fragment",!1);this.logShader&&(console.log(E),console.log(v));return{vertex:E,fragment:v,uniformBindings:B}}_setDefines(x){for(const v in x)this[v]=x[v]}_setOptionalUniforms(x,v){for(const A of this._options)this[A.propertyKey]=
v[A.propertyKey]?this._hydrateUniformGroup(x,A):null}_setRequiredUniforms(x){for(const v of this._uniforms)this[v.propertyKey]=this._hydrateUniformGroup(x,v)}_hydrateUniformGroup(x,v){const A=new v.typeCtor;for(const z of A._uniforms??[]){const B=new z.typeCtor,D=`u_${v.propertyKey}_${z.propertyKey}`,F=B.type,E=[v.propertyKey,z.propertyKey].join(".");if("type"in z.typeCtor&&"array"===z.typeCtor.type){const C=B;x.push({shaderModulePath:E,uniformName:D,uniformType:F,uniformArrayLength:C.size,uniformArrayElementType:C.elementType.type,
uniformHydrated:B})}else x.push({shaderModulePath:E,uniformName:D,uniformType:F,uniformHydrated:B});A[z.propertyKey]=B}return A}_hydrateVertexInput(x){var v=this.vertexInput.inputCtor;const A=v.locations.reduce((z,B)=>!1===x[B.propertyKey]?z:{...z,[B.propertyKey]:new B.typeCtor},{});for(const {propertyKey:z,typeCtor:B}of v.builtins)v=new B,A[z]=v;return A}_hydrateComputeInput(){return null==this.computeInput?null:this.computeInput.inputCtor.locations.reduce((x,v)=>({...x,[v.propertyKey]:new v.typeCtor}),
{})}_injectPackPrecisionFactor(x,v){const A={};for(const z in x){const B=x[z],D=v[z];if(D){if("float"!==B.type&&"vec2"!==B.type&&"vec3"!==B.type&&"vec4"!==B.type)throw Error(`InternalError: packPrecisionFactor requires GenType, but found ${B.type}`);A[z]=B.divide(new d.Float(D))}else A[z]=B}return A}_injectComputePackPrecisionFactor(x,v){const A={},z=new Map;for(var B in this.computeAttributes)for(var D of this.computeAttributes[B]??[])z.set(D,B);for(const F in x)if(B=x[F],D=z.get(F))if(D=v[D]){if("float"!==
B.type&&"vec2"!==B.type&&"vec3"!==B.type&&"vec4"!==B.type)throw Error(`InternalError: packPrecisionFactor requires GenType, but found ${B.type}`);A[F]=B.divide(new d.Float(D))}else A[F]=B;return A}_hydrateFragmentInput(x){const v={};for(const A in x)v[A]=x[A];for(const {propertyKey:A,typeCtor:z}of t.builtins)x=new z,v[A]=x;return v}_getVertexInputBuiltins(){const x=this.vertexInput.inputCtor,v=new Map;for(const {builtin:A,propertyKey:z}of x.builtins)v.set(z,A);return v}_getFragmentInputBuiltins(x){x=
x.constructor;const v=new Map;for(const A of x.builtins??[])v.set(A.propertyKey,A.builtin);return v}_createShaderBuilder(x,v){const A=new l.ShaderBuilder2D;this._insertDebugInfo(A);x.insertVertexShader(A);v.insertFragmentShader(A);return A}_insertDebugInfo(x){x.vertex.code.add("// DEFINES: ");x.vertex.code.add("// --------------------------------------------------------- ");for(const v of this._defines)this[v.propertyKey]?x.vertex.code.add(`// ${v.propertyKey}: true`):x.vertex.code.add(`// ${v.propertyKey}: false`);
x.vertex.code.add("");x.vertex.code.add("// OPTIONS: ");x.vertex.code.add("// --------------------------------------------------------- ");for(const v of this._options)this[v.propertyKey]?x.vertex.code.add(`// ${v.propertyKey}: true`):x.vertex.code.add(`// ${v.propertyKey}: false`)}}e.ComputeVertexInput=p;e.FragmentInput=t;e.FragmentOutput=w;e.GraphShaderModule=y;e.UniformGroup=u;e.VertexInput=k;e.builtin=q;e.define=(x,v)=>{c(x,"defines",{propertyKey:v})};e.input=x=>(v,A,z)=>{c(v,"inputs",{inputCtor:x,
propertyKey:A,parameterIndex:z})};e.location=function(x,v){return(A,z)=>{c(A,"locations",{typeCtor:v,propertyKey:z,parameterIndex:null,index:x})}};e.option=x=>(v,A)=>{c(v,"options",{typeCtor:x,propertyKey:A})};e.transformFeedback=function(x){return(v,A)=>{c(v,"transformFeedbackBindings",{propertyKey:A,parameterIndex:null,index:x})}};e.uniform=x=>(v,A)=>{c(v,"uniforms",{typeCtor:x,propertyKey:A})};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D":function(){define("exports ../../../../../core/Error ../../../../../core/has ../../../../../core/Logger ../../../../3d/webgl-engine/core/shaderTechnique/BindType ../../../../3d/webgl-engine/lib/Util".split(" "),
function(e,g,q,h,m,l){function d(w=!0){return`#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif\n${w?"out vec4 fragColor;":""}\n`}class b{constructor(){this._includedModules=new Map}include(w,u){this._includedModules.has(w)?this._includedModules.get(w):(this._includedModules.set(w,u),w(this.builder,u))}}class a extends b{constructor(){super(...arguments);this.vertex=new c;this.fragment=
new c;this.attributes=new r;this.varyings=new k;this.extensions=new p;this.constants=new t}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(w,u=!0){const y=this.extensions.generateSource(w),x=this.attributes.generateSource(w),v=this.varyings.generateSource(w);var A="vertex"===w?this.vertex:this.fragment;const z=A.uniforms.generateSource(),B=A.code.generateSource();w="vertex"===w?"precision highp float;\nprecision highp sampler2D;":d(u);A=this.constants.generateSource().concat(A.constants.generateSource());
return`${u?"#version 300 es":""}\n${y.join("\n")}\n${w}\n${A.join("\n")}\n${z.join("\n")}\n${x.join("\n")}\n${v.join("\n")}\n${B.join("\n")}`}generateBindPass(w){const u=new Map;this.vertex.uniforms.entries.forEach(v=>{const A=v.bind[m.BindType.Pass];A&&u.set(v.name,A)});this.fragment.uniforms.entries.forEach(v=>{const A=v.bind[m.BindType.Pass];A&&u.set(v.name,A)});const y=Array.from(u.values()),x=y.length;return(v,A)=>{for(let z=0;z<x;++z)y[z](w,v,A)}}generateBindDraw(w){const u=new Map;this.vertex.uniforms.entries.forEach(v=>
{const A=v.bind[m.BindType.Draw];A&&u.set(v.name,A)});this.fragment.uniforms.entries.forEach(v=>{const A=v.bind[m.BindType.Draw];A&&u.set(v.name,A)});const y=Array.from(u.values()),x=y.length;return(v,A,z)=>{for(let B=0;B<x;++B)y[B](w,v,A,z)}}}class f{constructor(){this._entries=new Map}add(...w){for(const u of w)this._add(u)}get(w){return this._entries.get(w)}_add(w){if(null==w)h.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder").error(`Trying to add null Uniform from ${Error().stack}.`);
else{if(this._entries.has(w.name)&&!this._entries.get(w.name).equals(w))throw new g(`Duplicate uniform name ${w.name} for different uniform type`);this._entries.set(w.name,w)}}generateSource(){return Array.from(this._entries.values()).map(w=>null!=w.arraySize?`uniform ${w.type} ${w.name}[${w.arraySize}];`:`uniform ${w.type} ${w.name};`)}get entries(){return Array.from(this._entries.values())}}class n{constructor(){this._entries=[]}add(w){this._entries.push(w)}generateSource(){return this._entries}}
class c extends b{constructor(){super(...arguments);this.uniforms=new f;this.code=new n;this.constants=new t}get builder(){return this}}class r{constructor(){this._entries=[]}add(w,u){this._entries.push([w,u])}generateSource(w){return"fragment"===w?[]:this._entries.map(u=>`in ${u[1]} ${u[0]};`)}}class k{constructor(){this._entries=new Map}add(w,u){this._entries.has(w)&&l.assert(this._entries.get(w)===u);this._entries.set(w,u)}generateSource(w){const u=[];this._entries.forEach((y,x)=>u.push("vertex"===
w?`out ${y} ${x};`:`in ${y} ${x};`));return u}}class p{constructor(){this._entries=new Set}add(w){this._entries.add(w)}generateSource(w){const u="vertex"===w?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(y=>u.includes(y)).map(y=>`#extension ${y} : enable`)}}p.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"];p.ALLOWLIST_VERTEX=[];class t{constructor(){this._entries=new Set}add(w,u,y){let x="ERROR_CONSTRUCTOR_STRING";switch(u){case "float":x=
t._numberToFloatStr(y);break;case "int":x=t._numberToIntStr(y);break;case "bool":x=y.toString();break;case "vec2":x=`vec2(${t._numberToFloatStr(y[0])}, ${t._numberToFloatStr(y[1])})`;break;case "vec3":x=`vec3(${t._numberToFloatStr(y[0])}, ${t._numberToFloatStr(y[1])}, ${t._numberToFloatStr(y[2])})`;break;case "vec4":x=`vec4(${t._numberToFloatStr(y[0])}, ${t._numberToFloatStr(y[1])}, ${t._numberToFloatStr(y[2])}, ${t._numberToFloatStr(y[3])})`;
break;case "ivec2":x=`ivec2(${t._numberToIntStr(y[0])}, ${t._numberToIntStr(y[1])})`;break;case "ivec3":x=`ivec3(${t._numberToIntStr(y[0])}, ${t._numberToIntStr(y[1])}, ${t._numberToIntStr(y[2])})`;break;case "ivec4":x=`ivec4(${t._numberToIntStr(y[0])}, ${t._numberToIntStr(y[1])}, ${t._numberToIntStr(y[2])}, ${t._numberToIntStr(y[3])})`;
break;case "mat2":case "mat3":case "mat4":x=`${u}(${Array.prototype.map.call(y,v=>t._numberToFloatStr(v)).join(", ")})`}this._entries.add(`const ${u} ${w} = ${x};`);return this}static _numberToIntStr(w){return w.toFixed(0)}static _numberToFloatStr(w){return Number.isInteger(w)?w.toFixed(1):w.toString()}generateSource(){return Array.from(this._entries)}}e.Code=n;e.Includes=b;e.ShaderBuilder2D=a;e.Stage=c;e.Uniforms=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/core/shaderTechnique/BindType":function(){define(["exports"],
function(e){e.BindType=void 0;var g=e.BindType||(e.BindType={});g[g.Pass=0]="Pass";g[g.Draw=1]="Draw";Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/lib/Util":function(){define(["exports","../../../../core/libs/gl-matrix-2/factories/vec2f64","../../../../chunks/vec42","../../../../core/libs/gl-matrix-2/factories/vec4f64"],function(e,g,q,h){function m(b,a){if(!b)throw a=a||"Assertion",new d(`${a} at ${Error(a).stack}`);}const l=h.create();class d{constructor(b){this.message=
b}toString(){return`AssertException: ${this.message}`}}e.assert=m;e.isTranslationMatrix=function(b){return 1===b[0]&&0===b[1]&&0===b[2]&&0===b[3]&&0===b[4]&&1===b[5]&&0===b[6]&&0===b[7]&&0===b[8]&&0===b[9]&&1===b[10]&&0===b[11]&&1===b[15]};e.logWithBase=function(b,a){return Math.log(b)/Math.log(a)};e.project=function(b,a,f,n,c){l[0]=b[0];l[1]=b[1];l[2]=b[2];l[3]=1;q.transformMat4(l,l,a);2<c.length&&(c[2]=-l[2]);q.transformMat4(l,l,f);m(0!==l[3]);c[0]=l[0]/l[3];c[1]=l[1]/l[3];c[2]=l[2]/l[3];c[0]=(.5*
c[0]+.5)*n[2]+n[0];c[1]=(.5*c[1]+.5)*n[3]+n[1]};e.rayBoxTest=function(b,a,f,n){let c,r=(f[0]-b[0])/a[0],k=(n[0]-b[0])/a[0];r>k&&(c=r,r=k,k=c);let p=(f[1]-b[1])/a[1],t=(n[1]-b[1])/a[1];p>t&&(c=p,p=t,t=c);if(r>t||p>k)return!1;p>r&&(r=p);t<k&&(k=t);f=(f[2]-b[2])/a[2];b=(n[2]-b[2])/a[2];f>b&&(c=f,f=b,b=c);if(r>b||f>k)return!1;b<k&&(k=b);return 0>k?!1:!0};e.rayRay2D=function(b,a,f,n,c,r=g.create()){const k=(n[c]-f[c])*(a[0]-b[0])-(n[0]-f[0])*(a[c]-b[c]);if(0===k)return!1;f=((n[0]-f[0])*(b[c]-f[c])-(n[c]-
f[c])*(b[0]-f[0]))/k;r[0]=b[0]+f*(a[0]-b[0]);r[1]=b[c]+f*(a[c]-b[c]);return!0};e.setMatrixTranslation3=function(b,a,f,n){b[12]=a;b[13]=f;b[14]=n};e.verify=function(b,a){b||console.warn("Verify failed: "+(a||"")+"\n"+Error("verify").stack)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/graph/glsl":function(){define(["exports","../../../../../../chunks/tslib.es6","./ShaderGraphNode"],function(e,g,q){function h(M){switch(M.type){case "uint":return ha;
case "uvec2":return e.Vec2;case "uvec3":return e.Vec3;case "uvec4":return e.Vec4;default:throw Error("Found unexpected type");}}function m(M){switch(M.type){case "float":return e.UInt;case "vec2":return e.UVec2;case "vec3":return e.UVec3;case "vec4":return e.UVec4;default:throw Error("Found unexpected type");}}function l(M){switch(M.type){case "int":return ha;case "ivec2":return e.Vec2;case "ivec3":return e.Vec3;case "ivec4":return e.Vec4;default:throw Error("Found unexpected type");}}function d(M){switch(M.type){case "float":return ka;
case "vec2":return e.IVec2;case "vec3":return e.IVec3;case "vec4":return e.IVec4;default:throw Error("Found unexpected type");}}function b(M){switch(M.type){case "bool":case "float":case "int":case "uint":return ja;case "bvec2":case "vec2":case "ivec2":case "uvec2":return e.BVec2;case "bvec3":case "vec3":case "ivec3":case "uvec3":return e.BVec3;case "bvec4":case "vec4":case "ivec4":case "uvec4":return e.BVec4;default:throw Error("Unable to handle type");}}function a(M){switch(M.type){case "float":case "int":case "uint":case "bool":case "sampler2D":return 1;
case "vec2":case "ivec2":case "uvec2":case "bvec2":return 2;case "vec3":case "ivec3":case "uvec3":case "bvec3":return 3;case "vec4":case "ivec4":case "uvec4":case "bvec4":return 4;case "mat2":return 4;case "mat3":return 9;case "mat4":return 16;case "array":return M.size*a(M.elementType)}}function f(M){const W=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const da of W)if(da.includes(M))return da.map(fa=>ua[fa]);
throw Error("Unable to find type family");}function n(M){return new Proxy(M,{get(W,da){if("constructor"===da)return new Proxy(W.constructor,{construct(fa,ma,ta){fa=new fa(...ma);return n(fa)}});if(da in W)return W[da];if("string"===typeof da)return W=f(M.type),p(M,da,W[da.length-1])}})}function c(M){return new Proxy(M,{construct(W,da,fa){W=new W(...da);return n(W)}})}function r(M){return new Proxy(M,{get(W,da){if(da in W)return W[da];if("string"===typeof da&&(W=parseInt(da,10),!isNaN(W)))return p(M,
`[${W}]`,M.elementType.constructor)}})}function k(M,W){return"number"===typeof M?new W(M):M}function p(M,W,da){M=new da(new q.ShaderPropertyAccessNode(W,M,da));M.isImplicit=!0;return M}function t(M,W,da,fa=null){if(fa){const ma=new fa;M=new fa(new q.ShaderFunctionNode(M,[W,da],!0,!1,ma));M.isImplicit=!0;return M}if("float"===W.type||"int"===W.type||("mat2"===W.type||"mat3"===W.type||"mat4"===W.type)&&"float"!==da.type)return M=new da.constructor(new q.ShaderFunctionNode(M,[W,da],!0,!1,da.constructor)),
M.isImplicit=!0,M;M=new W.constructor(new q.ShaderFunctionNode(M,[W,da],!0,!1,W.constructor));M.isImplicit=!0;return M}function w(M,W,da=W.constructor){M=new da(new q.ShaderFunctionNode(M,[W],!1,!1,da));M.isImplicit=!0;return M}function u(M,W,da,fa=W.constructor){M=new fa(new q.ShaderFunctionNode(M,[W,da],!1,!1,fa));M.isImplicit=!0;return M}function y(M,W,da,fa,ma=W.constructor){M=new ma(new q.ShaderFunctionNode(M,[W,da,fa],!1,!1,ma));M.isImplicit=!0;return M}function x(M){return D(M,sa(-1))}function v(M,
W,da,fa){return new W(new q.ShaderBlockNode(M,W,da,fa))}function A(M,W,da=0,fa=M.size){da=(new ka(da)).setMutable().setDebugName("FindIndexIterator");M=M.get(da);W=W(M).setDebugName("FindIndexPredicate");return v({iter:da},ka,W,({out:ma,iter:ta,subgraph:za})=>`\n${ma} = -1;\n\nfor (; ${ta} < ${fa}; ${ta}++) {\n\n${za.body}\n\n if (${za.varName}) {\n ${ma} = ${ta};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock")}function z(M,W,da=0,fa=M.size){return v({array:M},ka,null,({out:ma,array:ta})=>
`\n${ma} = -1;\nfor (int i = ${da}; i < ${fa}; i++) {\n bool condition;\n ${W({array:ta,i:"i",out:"condition"})}\n if (condition) {\n ${ma} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock")}function B(M,W,da){W="function"===typeof W?W():W;da="function"===typeof da?da():da;M=new W.constructor(new q.ShaderConditionNode(M,W,da));M.isImplicit=!0;return M}function D(M,W){return t("*",M,W)}function F(M,W){return t("/",M,W)}function E(M,W){return t("+",M,W)}function C(M,W){return t("-",
M,W)}function G(...M){return 1>=M.length?M[0]:M.slice(1).reduce((W,da)=>H(W,da),M[0])}function H(M,W){return t("||",M,W,ja)}function K(...M){return 1>=M.length?M[0]:M.slice(1).reduce((W,da)=>t("\x26\x26",W,da,ja),M[0])}function J(M){return w("all",M,ja)}function O(M){return w("any",M,ja)}function Q(M){return w("cos",M)}function T(M){return w("sin",M)}var I,L,R,V,S,X,N,P,U,Y,ba,Z,aa,ca;class ea extends Error{}e.FixedArray=I=class extends q.ShaderPrimitiveNode{constructor(M,W){super();this.elementType=
M;this.size=W;this.children=[];this.type="array"}clone(){const M=new I(this.elementType,this.size);super.cloneInto(M);return M}get(M){return"number"===typeof M?(M=new ka(M),M.isImplicit=!0,p(this,M,this.elementType.constructor)):p(this,M,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(M,W,da){return A(this,M,W,da)}glslFindIndex(M,W,da){return z(this,M,W,da)}static ofType(M,W){return new Proxy(I,{construct(da,fa){return new I(new M,W)}})}};e.FixedArray.type=
"array";e.FixedArray=I=g.__decorate([function(M){return new Proxy(M,{construct(W,da,fa){W=new W(...da);return r(W)}})}],e.FixedArray);class ia extends q.ShaderPrimitiveNode{constructor(){super(...arguments);this.type="sampler2D";this.children=[]}clone(){const M=new ia;M.children=this.children.map(q.cloneShaderNode);super.cloneInto(M);return M}}ia.type="sampler2D";class ha extends q.ShaderPrimitiveNode{constructor(M){super();this.type="float";this.children=[M]}clone(){const M=new ha(q.cloneShaderNode(this.children[0]));
super.cloneInto(M);return M}multiply(M){return"number"===typeof M?D(this,k(M,ha)):D(this,M)}divide(M){return"number"===typeof M?F(this,k(M,ha)):F(this,M)}add(M){return"number"===typeof M?E(this,k(M,ha)):E(this,M)}subtract(M){return"number"===typeof M?C(this,k(M,ha)):C(this,M)}}ha.type="float";e.Vec2=L=class extends q.ShaderPrimitiveNode{constructor(M,W){super();this.type="vec2";this.children=[M,W].filter(da=>null!=da)}clone(){const M=new L(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]));
super.cloneInto(M);return M}get 0(){return p(this,"[0]",ha)}get 1(){return p(this,"[1]",ha)}get 2(){throw new ea;}get 3(){throw new ea;}multiply(M){return D(this,"number"===typeof M?k(M,ha):M)}divide(M){return F(this,"number"===typeof M?k(M,ha):M)}add(M){return E(this,"number"===typeof M?k(M,ha):M)}subtract(M){return C(this,"number"===typeof M?k(M,ha):M)}};e.Vec2.type="vec2";e.Vec2=L=g.__decorate([c],e.Vec2);e.Vec3=R=class extends q.ShaderPrimitiveNode{constructor(M,W,da){super();this.type="vec3";
this.children=[M,W,da].filter(fa=>null!=fa)}get 0(){return p(this,"[0]",ha)}get 1(){return p(this,"[1]",ha)}get 2(){return p(this,"[2]",ha)}get 3(){throw new ea;}clone(){const M=new R(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]));super.cloneInto(M);return M}multiply(M){return D(this,"number"===typeof M?k(M,ha):M)}divide(M){return F(this,"number"===typeof M?k(M,ha):M)}add(M){return E(this,"number"===typeof M?k(M,ha):M)}subtract(M){return C(this,
"number"===typeof M?k(M,ha):M)}};e.Vec3.type="vec3";e.Vec3=R=g.__decorate([c],e.Vec3);e.Vec4=V=class extends q.ShaderPrimitiveNode{constructor(M,W,da,fa){super();this.type="vec4";this.children=[M,W,da,fa].filter(ma=>null!=ma)}clone(){const M=new V(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]));super.cloneInto(M);return M}get 0(){return p(this,"[0]",ha)}get 1(){return p(this,"[1]",ha)}get 2(){return p(this,
"[2]",ha)}get 3(){return p(this,"[3]",ha)}multiply(M){return D(this,"number"===typeof M?k(M,ha):M)}divide(M){return F(this,"number"===typeof M?k(M,ha):M)}add(M){return E(this,"number"===typeof M?k(M,ha):M)}subtract(M){return C(this,"number"===typeof M?k(M,ha):M)}};e.Vec4.type="vec4";e.Vec4=V=g.__decorate([c],e.Vec4);e.UInt=S=class extends q.ShaderPrimitiveNode{constructor(M){super();this.type="uint";this.children=[M]}clone(){const M=new S(q.cloneShaderNode(this.children[0]));super.cloneInto(M);return M}};
e.UInt.type="uint";e.UInt=S=g.__decorate([c],e.UInt);e.UVec2=X=class extends q.ShaderPrimitiveNode{constructor(M,W){super();this.type="uvec2";this.children=[M,W].filter(da=>null!=da)}clone(){const M=new X(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]));super.cloneInto(M);return M}};e.UVec2.type="uvec2";e.UVec2=X=g.__decorate([c],e.UVec2);e.UVec3=N=class extends q.ShaderPrimitiveNode{constructor(M,W,da){super();this.type="uvec3";this.children=[M,W,da].filter(fa=>null!=fa)}clone(){const M=
new N(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]));super.cloneInto(M);return M}};e.UVec3.type="uvec3";e.UVec3=N=g.__decorate([c],e.UVec3);e.UVec4=P=class extends q.ShaderPrimitiveNode{constructor(M,W,da,fa){super();this.type="uvec4";this.children=[M,W,da,fa].filter(ma=>null!=ma)}clone(){const M=new P(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]));
super.cloneInto(M);return M}};e.UVec4.type="uvec4";e.UVec4=P=g.__decorate([c],e.UVec4);class ja extends q.ShaderPrimitiveNode{constructor(M){super();this.type="bool";this.children=[M]}and(M){return K(this,M)}or(M){return G(this,M)}clone(){const M=new ja(q.cloneShaderNode(this.children[0]));super.cloneInto(M);return M}}ja.type="bool";e.BVec2=U=class extends q.ShaderPrimitiveNode{constructor(M,W){super();this.type="bvec2";this.children=[M,W].filter(da=>null!=da)}all(){return J(this)}any(){return O(this)}clone(){const M=
new U(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]));super.cloneInto(M);return M}};e.BVec2.type="bvec2";e.BVec2=U=g.__decorate([c],e.BVec2);e.BVec3=Y=class extends q.ShaderPrimitiveNode{constructor(M,W,da){super();this.type="bvec3";this.children=[M,W,da].filter(fa=>null!=fa)}all(){return J(this)}any(){return O(this)}clone(){const M=new Y(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]));super.cloneInto(M);return M}};
e.BVec3.type="bvec3";e.BVec3=Y=g.__decorate([c],e.BVec3);e.BVec4=ba=class extends q.ShaderPrimitiveNode{constructor(M,W,da,fa){super();this.type="bvec4";this.children=[M,W,da,fa].filter(ma=>null!=ma)}all(){return J(this)}any(){return O(this)}clone(){const M=new ba(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]));super.cloneInto(M);return M}};e.BVec4.type="bvec4";e.BVec4=ba=g.__decorate([c],e.BVec4);class ka extends q.ShaderPrimitiveNode{constructor(M){super();
this.type="int";this.children=[M]}multiply(M){return D(this,k(M,ka))}add(M){return E(this,k(M,ka))}subtract(M){return C(this,k(M,ka))}divide(M){return F(this,k(M,ka))}clone(){const M=new ka(q.cloneShaderNode(this.children[0]));super.cloneInto(M);return M}}ka.type="int";e.IVec2=Z=class extends q.ShaderPrimitiveNode{constructor(M,W){super();this.type="ivec2";this.children=[M,W].filter(da=>null!=da)}clone(){const M=new Z(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]));super.cloneInto(M);
return M}};e.IVec2.type="ivec2";e.IVec2=Z=g.__decorate([c],e.IVec2);e.IVec3=aa=class extends q.ShaderPrimitiveNode{constructor(M,W,da){super();this.type="ivec3";this.children=[M,W,da].filter(fa=>null!=fa)}clone(){const M=new aa(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]));super.cloneInto(M);return M}};e.IVec3.type="ivec3";e.IVec3=aa=g.__decorate([c],e.IVec3);e.IVec4=ca=class extends q.ShaderPrimitiveNode{constructor(M,W,da,fa){super();
this.type="ivec4";this.children=[M,W,da,fa].filter(ma=>null!=ma)}clone(){const M=new ca(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]));super.cloneInto(M);return M}};e.IVec4.type="ivec4";e.IVec4=ca=g.__decorate([c],e.IVec4);class na extends q.ShaderPrimitiveNode{constructor(M,W,da,fa){super();this.type="mat2";this.children=[M,W,da,fa]}clone(){const M=new na(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),
q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]));super.cloneInto(M);return M}}na.type="mat2";class qa extends q.ShaderPrimitiveNode{static identity(){return new qa(1,0,0,0,1,0,0,0,1)}static fromRotation(M){const W=T(M);M=Q(M);return new qa(M,W,0,x(W),M,0,0,0,1)}constructor(M,W,da,fa,ma,ta,za,cb,db){super();this.type="mat3";this.children=[M,W,da,fa,ma,ta,za,cb,db]}add(M){return E(this,M)}multiply(M){return D(this,M)}clone(){const M=new qa(q.cloneShaderNode(this.children[0]),
q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]),q.cloneShaderNode(this.children[4]),q.cloneShaderNode(this.children[5]),q.cloneShaderNode(this.children[6]),q.cloneShaderNode(this.children[7]),q.cloneShaderNode(this.children[8]));super.cloneInto(M);return M}}qa.type="mat3";class oa extends q.ShaderPrimitiveNode{static identity(){return new oa(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(M,W,da,fa,ma,ta,za,cb,db,rb,Hb,Ib,jc,kc,Jb,Fa){super();
this.type="mat4";this.children=[M,W,da,fa,ma,ta,za,cb,db,rb,Hb,Ib,jc,kc,Jb,Fa]}static fromColumns(M,W,da,fa){return new oa(M.x,M.y,M.z,M.w,W.x,W.y,W.z,W.w,da.x,da.y,da.z,da.w,fa.x,fa.y,fa.z,fa.w)}multiply(M){return D(this,M)}clone(){const M=new oa(q.cloneShaderNode(this.children[0]),q.cloneShaderNode(this.children[1]),q.cloneShaderNode(this.children[2]),q.cloneShaderNode(this.children[3]),q.cloneShaderNode(this.children[4]),q.cloneShaderNode(this.children[5]),q.cloneShaderNode(this.children[6]),q.cloneShaderNode(this.children[7]),
q.cloneShaderNode(this.children[8]),q.cloneShaderNode(this.children[9]),q.cloneShaderNode(this.children[10]),q.cloneShaderNode(this.children[11]),q.cloneShaderNode(this.children[12]),q.cloneShaderNode(this.children[13]),q.cloneShaderNode(this.children[14]),q.cloneShaderNode(this.children[15]));super.cloneInto(M);return M}}oa.type="mat4";const ua={float:ha,vec2:e.Vec2,vec3:e.Vec3,vec4:e.Vec4,int:ka,ivec2:e.IVec2,ivec3:e.IVec3,ivec4:e.IVec4,uint:e.UInt,uvec2:e.UVec2,uvec3:e.UVec3,uvec4:e.UVec4,bool:ja,
bvec2:e.BVec2,bvec3:e.BVec3,bvec4:e.BVec4},sa=(...M)=>new ha(...M);e.Bool=ja;e.Float=ha;e.Int=ka;e.Mat2=na;e.Mat3=qa;e.Mat4=oa;e.Sampler2D=ia;e._or=H;e.abs=function(M){return w("abs",M)};e.acos=function(M){return w("acos",M)};e.acosh=function(M){return w("acosh",M)};e.add=E;e.all=J;e.and=K;e.any=O;e.asin=function(M){return w("asin",M)};e.asinh=function(M){return w("asinh",M)};e.atan=function(M,W){return null==W?w("atan",M):u("atan",M,W,M.constructor)};e.atanh=function(M){return w("atanh",M)};e.bitAnd=
function(M,W){return t("\x26",M,W)};e.bitOr=function(M,W){return t("|",M,W)};e.bitRShift=function(M,W){return t("\x3e\x3e",M,W)};e.bitShift=function(M,W){return t("\x3c\x3c",M,W)};e.bitXor=function(M,W){return t("^",M,W)};e.block=v;e.ceil=function(M){return w("ceil",M)};e.clamp=function(M,W,da){return y("clamp",M,W,da,M.constructor)};e.cond=function(...M){var W=M.map(([fa,ma])=>"function"===typeof ma?[fa,ma()]:[fa,ma]);M=W[0][1].constructor;const da=W.findIndex(fa=>!0===fa[0]);if(-1===da)throw Error("A cond must have a fallthrough case with `true`/; ");
W=W.slice(0,da).reduceRight((fa,ma)=>B(ma[0],ma[1],fa),W[da][1]);M=new M(W);M.isImplicit=!0;return M};e.cos=Q;e.cosh=function(M){return w("cosh",M)};e.cross=function(M,W){return u("cross",M,W,M.constructor)};e.dFdx=function(M){return w("dFdX",M)};e.dFdy=function(M){return w("dFdY",M)};e.definePropertyAccess=p;e.degrees=function(M){return w("degrees",M)};e.determinant=function(M){return w("determinant",M,ha)};e.distance=function(M,W){return u("distance",M,W,ha)};e.divide=F;e.dot=function(M,W){return u("dot",
M,W,ha)};e.equal=function(M,W){return t("\x3d\x3d",M,W,ja)};e.equalComponent=function(M,W){return u("equal",M,W,b(M))};e.exp=function(M){return w("exp",M)};e.exp2=function(M){return w("exp2",M)};e.faceforward=function(M,W,da){return y("faceforward",M,W,da)};e.findIndex=A;e.float=sa;e.floatBitsToInt=function(M){return w("floatBitsToInt",M,d(M))};e.floatBitsToUint=function(M){return w("floatBitsToUint",M,m(M))};e.floor=function(M){return w("floor",M)};e.fract=function(M){return w("fract",M)};e.fwidth=
function(M){return w("fwidth",M)};e.getTypeElementLengthForType=a;e.glslFindIndex=z;e.greaterThan=function(M,W){return t("\x3e",M,W,ja)};e.greaterThanComponent=function(M,W){return u("greaterThan",M,W,b(M))};e.greaterThanEqual=function(M,W){return t("\x3e\x3d",M,W,ja)};e.greaterThanEqualComponent=function(M,W){return u("greaterThanEqual",M,W,b(M))};e.ifElse=B;e.int=(...M)=>new ka(...M);e.intBitsToFloat=function(M){return w("intBitsToFloat",M,l(M))};e.inverse=function(M){return w("inverse",M,ha)};
e.inversesqrt=function(M){return w("inversesqrt",M)};e.isinf=function(M){return w("isinf",M,b(M))};e.isnan=function(M){return w("isnan",M,b(M))};e.length=function(M){return w("length",M,ha)};e.lessThan=function(M,W){return t("\x3c",M,W,ja)};e.lessThanComponent=function(M,W){return u("lessThan",M,W,b(M))};e.lessThanEqual=function(M,W){return t("\x3c\x3d",M,W,ja)};e.lessThanEqualComponent=function(M,W){return u("lessThanEqual",M,W,b(M))};e.log=function(M){return w("log",M)};e.log2=function(M){return w("log2",
M)};e.mat2=(...M)=>new na(...M);e.mat3=(...M)=>new qa(...M);e.mat4=(...M)=>new oa(...M);e.matrixCompMult=function(M,W){return u("matrixCompMult",M,W)};e.max=function(M,W){return u("max",M,W)};e.min=function(M,W){return u("min",M,W)};e.mix=function(M,W,da){return y("mix",M,W,da)};e.mod=function(M,W){return u("mod",M,W)};e.modf=function(M,W){throw Error("modf not implemented");};e.multiply=D;e.namedScope=function(M,W){M="function"===typeof M?M():M;W=new M.constructor((new q.ShaderScopeNode(M)).setDebugName(W));
W.isImplicit=!0;return W};e.negate=x;e.normalize=function(M){return w("normalize",M)};e.not=function(M){return"bool"===M.type?w("!",M):w("not",M)};e.notEqual=function(M,W){return t("!\x3d",M,W,ja)};e.notEqualComponent=function(M,W){return u("notEqual",M,W,b(M))};e.or=G;e.outerProduct=function(M,W){throw Error("Impl type?");};e.packHalf2x16=function(M){return w("packHalf2x16",M,e.UInt)};e.packSnorm2x16=function(M){return w("packSnorm2x16",M,e.UInt)};e.packUnorm2x16=function(M){return w("packUnorm2x16",
M,e.UInt)};e.pow=function(M,W){return u("pow",M,W)};e.radians=function(M){return w("radians",M)};e.reflect=function(M,W){return u("reflect",M,W)};e.refract=function(M,W,da){return y("refract",M,W,da)};e.round=function(M){return w("round",M)};e.roundEven=function(M){return w("roundEven",M)};e.sign=function(M){return w("sign",M)};e.sin=T;e.sinh=function(M){return w("sinh",M)};e.smoothstep=function(M,W,da){return y("smoothstep",M,W,da)};e.sqrt=function(M){return w("sqrt",M)};e.step=function(M,W){return u("step",
M,W,W.constructor)};e.subtract=C;e.tan=function(M){return w("tan",M)};e.tanh=function(M){return w("tanh",M)};e.texelFetch=function(M,W,da){throw Error("Impl type");};e.texelFetchOffset=function(M,W,da,fa){throw Error("Impl type");};e.texture=function(M,W,da){throw Error("Impl type");};e.texture2D=function(M,W){return u("texture2D",M,W,e.Vec4)};e.textureGrad=function(M,W,da,fa){throw Error("Impl type");};e.textureGradOffset=function(M,W,da,fa,ma){throw Error("Impl type");};e.textureLod=function(M,
W,da){throw Error("Impl type");};e.textureLodOffset=function(M,W,da,fa){throw Error("Impl type");};e.textureOffset=function(M,W,da,fa){throw Error("Impl type");};e.textureProj=function(M,W,da){throw Error("Impl type");};e.textureProjGrad=function(M,W,da,fa){throw Error("Impl type");};e.textureProjGradOffset=function(M,W,da,fa,ma){throw Error("Impl type");};e.textureProjLod=function(M,W,da){throw Error("Impl type");};e.textureProjLodOffset=function(M,W,da,fa){throw Error("Impl type");};e.textureProjOffset=
function(M,W,da,fa){throw Error("Impl type");};e.textureSize=function(M,W){throw Error("Impl type");};e.transformFloatToInt=d;e.transformFloatToUInt=m;e.transformIntToFloat=l;e.transformTypeToBooleanType=b;e.transformUIntToFloat=h;e.transpose=function(M){return w("transpose",M)};e.trunc=function(M){return w("trunc",M)};e.uintBitsToFloat=function(M){return w("uintBitsToFloat",M,h(M))};e.unpackHalf2x16=function(M){return w("unpackHalf2x16",M,e.Vec2)};e.unpackSnorm2x16=function(M){return w("unpackSnorm2x16",
M,e.Vec2)};e.unpackUnorm2x16=function(M){return w("unpackUnorm2x16",M,e.Vec2)};e.vec2=(...M)=>new e.Vec2(...M);e.vec3=(...M)=>new e.Vec3(...M);e.vec4=(...M)=>new e.Vec4(...M);e.when=function(M,W){M=new W.constructor(new q.ShaderConditionNode(M,W,null));M.isImplicit=!0;return M};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode":function(){define(["exports"],function(e){function g(c){return c.split(" ").map((r,k)=>0<k?r.charAt(0).toUpperCase()+
r.slice(1):r).join("")}function q(c){return"object"===typeof c?c.clone():c}class h{constructor(){this.uid=h.NodeCount++;this._debugName=null;this.isImplicit=this._isMutable=!1}get isMutable(){return this._isMutable}setMutable(){this._isMutable=!0;return this}setDebugName(c){this._debugName=c=g(c);this.isImplicit&&this.children[0]instanceof h&&this.children[0].setDebugName(c);return this}get debugInfo(){return{name:this._debugName??""}}cloneInto(c){c._debugName=this._debugName;c._isMutable=this._isMutable;
c.isImplicit=this.isImplicit;c.uid=this.uid}}h.NodeCount=0;class m extends h{constructor(){super(...arguments);this.shaderType="primitive-node"}}class l extends h{constructor(c){super();this.child=c;this.shaderType="scope-node"}get children(){return[this.child]}clone(){const c=new l(q(this.child));this.cloneInto(c);return c}}class d extends h{constructor(c){super();this.text=c;this.shaderType="text-node"}get children(){return[]}clone(){const c=new d(this.text);this.cloneInto(c);return c}}class b extends h{constructor(c,
r,k){super();this.property=c;this.target=r;this.returnType=k;this.shaderType="property-access-node"}get children(){const c=[this.target];"string"!==typeof this.property&&c.push(this.property);return c}clone(){const c=new b(this.property,q(this.target),this.returnType);this.cloneInto(c);return c}}class a extends h{constructor(c,r,k){super();this.condition=c;this.ifTrue=r;this.ifFalse=k;this.shaderType="condition-node"}get children(){return[this.condition,this.ifTrue,this.ifFalse]}clone(){var c=q(this.ifTrue);
const r=this.ifFalse?q(this.ifFalse):null;c=new a(this.condition,c,r);this.cloneInto(c);return c}}class f extends h{constructor(c,r,k,p){super();this.captureList=c;this.returnType=r;this.generator=p;this.shaderType="block-node";k&&(this.subgraph=new l(k))}get children(){return Object.keys(this.captureList).map(c=>this.captureList[c]).concat(this.subgraph??[])}clone(){var c={};for(const r in this.captureList)c[r]=q(this.captureList[r]);c=new f(c,this.returnType,this.subgraph?q(this.subgraph.child):
this.subgraph,this.generator);this.cloneInto(c);return c}}class n extends h{constructor(c,r,k,p,t,w=!1){super();this.token=c;this._children=r;this.isInfix=k;this.isPropertyAccess=p;this.returnType=t;this.isTernary=w;this.shaderType="function-node"}get children(){return this._children}clone(){const c=new n(this.token,this._children.map(q),this.isInfix,this.isPropertyAccess,this.returnType,this.isTernary);this.cloneInto(c);return c}}e.ShaderBlockNode=f;e.ShaderConditionNode=a;e.ShaderFunctionNode=n;
e.ShaderNode=h;e.ShaderPrimitiveNode=m;e.ShaderPropertyAccessNode=b;e.ShaderScopeNode=l;e.ShaderTextNode=d;e.cloneShaderNode=q;e.setReachableUids=function(c,r){const k=[];for(k.push(r);k.length;)if(r=k.pop(),"object"===typeof r&&!c.has(r.uid)){c.add(r.uid);for(const p of r.children)k.push(p)}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter":function(){define(["exports"],function(e){function g(h,m,l){m=m.split("\n");for(const d of m)if(d.trim().length){m=
"";const b=l??"000";null!=l&&(m+=`/*id:${b}*/ `);h.body+=m.padEnd(14);h.body+=" ".repeat(h.indent)+d+"\n"}}class q{write(h){for(const m of h.rootOutputNodes())h.shouldPruneOutputNode(m)||(m.variableName=this._write(h,m.node));return h}_createVarName(h,m){let l="";"boolean"!==typeof m&&"number"!==typeof m&&m.debugInfo.name&&(l=`${m.debugInfo.name}_`);return`${l}v${h.varCount++}`}_write(h,m,l=!1){if("number"===typeof m||"boolean"===typeof m)return m.toString();let d=h.getEmit(m);if(d)return d;switch(m.shaderType){case "scope-node":d=
this._writeScopeNode(h,m);break;case "primitive-node":d=this._writePrimitiveNode(h,m,l);break;case "function-node":d=this._writeFunctionNode(h,m);break;case "property-access-node":d=this._writePropertyAccessNode(h,m);break;case "text-node":d=m.text;break;case "block-node":d=this._writeBlockNode(h,m);break;case "condition-node":d=this._writeConditionNode(h,m)}h.setEmit(m,d);return d}_writeScopeNode(h,m){var l=new m.child.constructor;l.setDebugName(m.debugInfo.name);l=this._write(h,l,!0);g(h,`{ /*ScopeStart: ${m.uid} ${m.debugInfo.name}*/`);
h.indent+=2;const d=this._write(h,m.child);g(h,`${l} = ${d};`);h.indent-=2;g(h,`} /*ScopeEnd: ${m.uid} ${m.debugInfo.name}*/`);return l}_writeConditionNode(h,m){var l=new m.ifTrue.constructor;l=this._write(h,l,!0);var d=this._write(h,m.condition);g(h,`if (${d}) {`);h.indent+=2;d=h.createSubgraphContext();const b=this._write(d,m.ifTrue);h.body+=d.body;b&&g(h,`${l} = ${b};`);h.indent-=2;g(h,"}");m.ifFalse&&(g(h,"else {"),h.indent+=2,d=h.createSubgraphContext(),m=this._write(d,m.ifFalse),h.body+=d.body,
m&&g(h,`${l} = ${m};`),h.indent-=2,g(h,"}"));return l}_writeBlockNode(h,m){const {captureList:l,generator:d,returnType:b}=m;var a={};for(var f in l)if(l[f]){var n=this._write(h,l[f]);a[f]=n}f=new b;f=this._write(h,f,!0);a.out=f;m.subgraph&&(n=h.createSubgraphContext(),m=this._write(n,m.subgraph.child),a.subgraph={varName:m,body:n.body});a=d(a);g(h,"{\n");h.indent+=2;g(h,a);h.indent-=2;g(h,"}\n");return f}_writePropertyAccessNode(h,m){const l=this._write(h,m.target);return"string"===typeof m.property&&
m.property.includes("[")?`${l}${m.property}`:"string"!==typeof m.property?(h=this._write(h,m.property),`${l}[${h}]`):`${l}.${m.property}`}_writeFunctionNode(h,m){const l=m.returnType.type;if(m.isInfix){const [a,f]=m.children.map(n=>this._write(h,n));var d=this._createVarName(h,m);g(h,`${l.padEnd(5)} ${d} = ${a} ${m.token} ${f};`,m.uid);return d}d=m.children.map(a=>this._write(h,a)).join(", ");const b=this._createVarName(h,m);g(h,`${l.padEnd(5)} ${b} = ${m.token}(${d});`,m.uid);return b}_writePrimitiveNode(h,
m,l=!1){var d=h.getInput(m);if(d)return d.isUsed=!0,d.variableName;d=1===m.children.length&&m.children[0]?.type===m.type;if(m.isImplicit||d)return this._write(h,m.children[0]);d=this._createVarName(h,m);if(l)return g(h,`${m.type.padEnd(5)} ${d};`,m.uid),d;if((l=!m.debugInfo.name&&!m.isMutable)&&"float"===m.type&&"number"===typeof m.children[0])return Number.isInteger(m.children[0])?m.children[0].toFixed(1):m.children[0].toString();if(l&&"int"===m.type&&"number"===typeof m.children[0]&&Number.isInteger(m.children[0]))return m.children[0].toString();
const b=m.children.map(a=>this._write(h,a)).join(", ");if("array"===m.type)return g(h,`${m.type.padEnd(5)} ${d} = [${b}];`,m.uid),d;if(l)return`${m.type}(${b})`;g(h,`${m.type.padEnd(5)} ${d} = ${m.type}(${b});`,m.uid);return d}}e.GlslShaderWriter=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext":function(){define(["exports","./ShaderGraphNode"],function(e,g){class q{constructor(l,d,b){this.variableName=l;this.variableInputType=
d;this.node=b;this.type="shader-input";this.isUsed=!1}clone(){return new q(this.variableName,this.variableInputType,g.cloneShaderNode(this.node))}}class h{constructor(l,d,b){this.outVariableName=l;this.outVariableType=d;this.node=b;this.type="shader-output"}clone(){const l=new h(this.outVariableName,this.outVariableType,g.cloneShaderNode(this.node));l.variableName=this.variableName;return l}}class m{static createVertex(l,d,b,a,f,n){const c=[];for(const r in l){const k=l[r],p=b.get(r);p?c.push(new q(p,
"builtin",k)):c.push(new q("a_"+r,"attribute",k))}for(const r of a)c.push(new q(r.uniformName,"uniform",r.uniformHydrated));l=[];for(const r in d)b=d[r],"glPosition"===r?l.push(new h("gl_Position","builtin",b)):"glPointSize"===r?l.push(new h("gl_PointSize","builtin",b)):l.push(new h("v_"+r,"varying",b));return new m(c,l,f,n)}static createFragment(l,d,b,a,f,n){const c=[];f=Array.from(f.rootOutputNodes());for(var r in l){const p=l[r];var k=b.get(r);k?c.push(new q(k,"builtin",p)):(k=f.find(t=>t.node===
p))&&c.push(new q(k.outVariableName,k.outVariableType,p))}for(const p of a)c.push(new q(p.uniformName,"uniform",p.uniformHydrated));l=[];for(const p in d)if(a=d[p],r=b.get(p),"discard"===p)l.push(new h(null,"discard",a));else if(r)l.push(new h(r,"builtin",a));else throw Error(`Member ${p} in shader fragment output shoule be tagged as builtin`);return new m(c,l,n)}constructor(l,d,b,a){this.type="shader-graph-context";this.indent=0;this.body="";this.varCount=0;this._inputShaderTypesByNodeUid=new Map;
this._nodeEmitMap=new Map;for(const f of l)this._inputShaderTypesByNodeUid.set(f.node.uid,f);this._outputShaderTypes=d;this._transformFeedbackBindings=b;this._transformFeedbackNames=new Set(b.map(f=>"v_"+f.propertyKey));this._usedInFragmentShader=a}shouldPruneOutputNode(l){return!this._usedInFragmentShader||"builtin"===l.outVariableType||this._transformFeedbackNames.has(l.outVariableName)?!1:!this._usedInFragmentShader.has(l.node.uid)}setEmit(l,d){this._nodeEmitMap.set(l.uid,d)}getEmit(l){return this._nodeEmitMap.get(l.uid)}inputs(){return this._inputShaderTypesByNodeUid.values()}getInput(l){return this._inputShaderTypesByNodeUid.get(l.uid)}*rootOutputNodes(){for(const l of this._outputShaderTypes)yield l}*nodes(){const l=
[];for(var d of this._outputShaderTypes.values())l.push(d.node);for(;l.length;)d=l.pop(),"number"!==typeof d&&"boolean"!==typeof d&&l.push(...d.children.filter(Boolean)),yield d}*nodesOfTypeOrFunction(){for(const l of this.nodes())"number"!==typeof l&&"boolean"!==typeof l&&(yield l)}createSubgraphContext(){const l=this.clone();l.body="";l.indent=this.indent+2;l._nodeEmitMap=new Map(this._nodeEmitMap);return l}clone(){const l=new m([],this._outputShaderTypes,this._transformFeedbackBindings,this._usedInFragmentShader);
l._inputShaderTypesByNodeUid=this._inputShaderTypesByNodeUid;l.indent=this.indent;l.body=this.body;l.varCount=this.varCount;l._nodeEmitMap=this._nodeEmitMap;return l}insertVertexShader(l){l.vertex.code.add("");this._insertInputs(l,"vertex");l.vertex.code.add("");l.vertex.code.add("// OUTPUTS: ");l.vertex.code.add("// --------------------------------------------------------- ");for(const d of this.rootOutputNodes()){const b="builtin"===d.outVariableType;this.shouldPruneOutputNode(d)||(b?l.vertex.code.add(`// ${d.outVariableType.padEnd(7)} ${d.node.type.padEnd(9)} ${d.outVariableName};`):
l.vertex.code.add(`${d.outVariableType.padEnd(10)} ${d.node.type.padEnd(9)} ${d.outVariableName};`))}l.vertex.code.add("");l.vertex.code.add("void main() {");l.vertex.code.add(" "+this.body.split("\n").join("\n "));for(const d of this.rootOutputNodes())this.shouldPruneOutputNode(d)||l.vertex.code.add(" "+`${d.outVariableName} = ${d.variableName};`);l.vertex.code.add("}")}insertFragmentShader(l){this._insertInputs(l,"fragment");l.fragment.code.add("");l.fragment.code.add("void main() {");l.fragment.code.add(" "+
this.body.split("\n").join("\n "));for(const d of this.rootOutputNodes())"discard"===d.outVariableType?(l.fragment.code.add(" // TODO: Should ensure codegen for discard appears first in fragment shader"),l.fragment.code.add(" "+`if (${d.variableName}) {`),l.fragment.code.add(" discard;"),l.fragment.code.add(" }"),l.fragment.code.add(" ")):l.fragment.code.add(" "+`${d.outVariableName} = ${d.variableName};`);l.fragment.code.add("}")}_insertInputs(l,d){l[d].code.add("// INPUTS: ");l[d].code.add("// --------------------------------------------------------- ");
for(const b of this.inputs())b.isUsed&&"builtin"!==b.variableInputType&&("array"===b.node.type?l[d].code.add(`${b.variableInputType.padEnd(10)} ${b.node.elementType.type.padEnd(9)} ${b.variableName}[${b.node.size}];`):l[d].code.add(`${b.variableInputType.padEnd(10)} ${b.node.type.padEnd(9)} ${b.variableName};`))}}e.ShaderGraphContext=m;e.ShaderInput=q;e.ShaderOutput=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram":function(){define("exports ../../../../../../core/Error ../../../../../../core/Logger ../../../../../../core/object ../../../../../../core/RandomLCG ../../../../../../core/has ../../../../../webgl/checkWebGLError ../../../../../webgl/enums ../../../../../webgl/FramebufferObject ../../../../../webgl/Program ../../../../../webgl/GLObjectType ../../../../../webgl/Texture ../../Utils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r){function k(t,w,u){const y=w.length;y!==u&&(t=new g("Invalid Uniform",`Invalid length, expected ${u} but got ${y}`,{uniformName:t,values:w}),q.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram").errorOnce(t))}class p{constructor(t,w,u,y,x,v){this._vao=this._program=null;this._temporaryTextures=[];this.vertexShader=t;this.fragmentShader=w;this._locations=u;this._locationInfo=y;this._uniformBindings=x;this._transformFeedbackBindings=v}destroy(){this._program&&
this._program.dispose();this.cleanupTemporaryTextures()}get locations(){return this._locations}get locationInfo(){return this._locationInfo}setUniforms(t){this._uniforms=t}cleanupTemporaryTextures(){for(const t of this._temporaryTextures)t.dispose();this._temporaryTextures=[]}bind(t){const w=this._uniforms;if(!this._program){var u=new Map;for(const [x,v]of this._locations)u.set(x,v);var y=[];for(const x of this._transformFeedbackBindings??[]){const {index:v,propertyKey:A}=x;y[v]=`v_${A}`}this._program=
new f.Program(t,this.vertexShader,this.fragmentShader,u,new Map,y)}u=this._program;t.useProgram(u);for(const x of this._uniformBindings){const {shaderModulePath:v,uniformName:A,uniformType:z,uniformArrayLength:B}=x;y=h.getDeepValue(v,w);if(null==y){if("sampler2D"===z)continue;throw Error(`Failed to find uniform value for ${v}`);}switch("array"===z?x.uniformArrayElementType:z){case "sampler2D":const {unit:D,texture:F}=y;u.setUniform1i(A,D);"type"in F?t.bindTexture(F,D):(y=r.createTexture(t,F.descriptor,
F.data),t.bindTexture(y,D));break;case "int":if(!B){u.setUniform1i(A,y);break}k(x.uniformName,y,B);u.setUniform1iv(A,y);break;case "float":if(!B){u.setUniform1f(A,y);break}k(x.uniformName,y,B);u.setUniform1fv(A,y);break;case "vec2":if(!B){u.setUniform2f(A,y[0],y[1]);break}k(x.uniformName,y,B);u.setUniform2fv(A,y.flat());break;case "vec3":if(!B){u.setUniform3f(A,y[0],y[1],y[2]);break}k(x.uniformName,y,B);u.setUniform3fv(A,y.flat());break;case "vec4":if(!B){u.setUniform4f(A,y[0],y[1],y[2],y[3]);break}k(x.uniformName,
y,B);u.setUniform4fv(A,y.flat());break;case "mat3":u.setUniformMatrix3fv(A,y.flat());break;case "mat4":u.setUniformMatrix4fv(A,y.flat());break;default:throw Error(`Unable to set uniform for type ${z}`);}}}}e.TypedShaderProgram=p;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../../highlightReasons ../../GraphShaderModule ../../graph/glsl ./EntityStorage ./ShaderHighlight ./ShaderHittest ./utils ./ViewInfo".split(" "),
function(e,g,q,h,m,l,d,b,a,f){class n extends h.VertexInput{}g.__decorate([h.location(0,m.Vec3)],n.prototype,"id",void 0);g.__decorate([h.location(1,m.Float)],n.prototype,"bitset",void 0);g.__decorate([h.location(2,m.Vec2)],n.prototype,"pos",void 0);class c extends h.ComputeVertexInput{}g.__decorate([h.location(14,m.Vec2)],c.prototype,"nextPos1",void 0);g.__decorate([h.location(15,m.Vec2)],c.prototype,"nextPos2",void 0);class r extends h.FragmentInput{}class k extends h.GraphShaderModule{clip(p,t){let w=
new m.Float(0);p=this.storage.getFilterFlags(p);w=w.add(m.float(2).multiply(m.float(1).subtract(a.getFilterBit(p,0))));this.inside?w=w.add(m.float(2).multiply(m.float(1).subtract(a.getFilterBit(p,1)))):this.outside?w=w.add(m.float(2).multiply(a.getFilterBit(p,1))):this.highlight&&(w=w.add(m.float(2).multiply(m.float(1).subtract(this._checkHighlight(p)))));null!=t&&(p=(new m.Float(1)).subtract(m.step(t.x,this.view.currentZoom)),t=m.step(t.y,this.view.currentZoom),w=w.add((new m.Float(2)).multiply(p.add(t))));
return w}getFragmentOutput(p,t,w=new m.Float(1/255)){const u=new h.FragmentOutput;u.glFragColor=this._maybeWriteHittest(t)??this._maybeHighlight(p,w)??p;return u}_maybeHighlight(p,t){return this.highlight?new m.Vec4(p.rgb,m.step(t,p.a)):null}_checkHighlight(p){let t=this._checkHighlightBit(p,0);for(let w=1;w<q.highlightReasons.length;w++)t=t.add(this._checkHighlightBit(p,w));return m.step(new m.Float(.1),t.add(this.highlight.highlightAll))}_checkHighlightBit(p,t){return a.getHighlightBit(p,t).multiply(a.getBit(this.highlight.activeReasons,
t))}maybeRunHittest(p,t,w){if(null==this.hittestRequest)return null;t=this.hittest(p,t,w);t=m.ifElse(m.greaterThan(t,this.hittestRequest.distance),new m.Float(2),new m.Float(0));w=this.storage.getAttributeDataCoords(p.id);w=a.uvToClip(w);t=t.add(this.clip(p.id,p.zoomRange));p=new m.Vec4(new m.Float(1/255),0,0,0);return{glPointSize:new m.Float(1),glPosition:new m.Vec4(w,t,1),color:p}}_maybeWriteHittest(p){return null!=this.hittestRequest?p.color:null}}g.__decorate([h.define],k.prototype,"inside",void 0);
g.__decorate([h.define],k.prototype,"outside",void 0);g.__decorate([h.option(d.ShaderHighlight)],k.prototype,"highlight",void 0);g.__decorate([h.uniform(l.EntityStorage)],k.prototype,"storage",void 0);g.__decorate([h.uniform(f.ViewInfo)],k.prototype,"view",void 0);g.__decorate([h.option(b.ShaderHittest)],k.prototype,"hittestRequest",void 0);e.AFeatureShader=k;e.BaseHittestVertexInput=c;e.FeatureFragmentInput=r;e.FeatureVertexInput=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/EntityStorage":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../../../../../core/has ../../GraphShaderModule ../../graph/glsl ./utils".split(" "),function(e,g,q,h,m,l){class d extends h.UniformGroup{getVisualVariableData(b){this._vvData||(b=this.getAttributeDataCoords(b),this._vvData=m.texture2D(this.visualVariableData,b).setDebugName("storage2"));return this._vvData}getAttributeDataCoords(b){if(!this._uv){var a=l.unpackDisplayIdTexel(b);
b=this.size;var f=m.int(a.x),n=m.int(a.y).multiply(m.int(256));a=m.int(a.z).multiply(m.int(256)).multiply(m.int(256));n=m.float(f.add(n).add(a));f=m.mod(n,b);n=n.subtract(f).divide(b);this._uv=(new m.Vec2(f,n)).add(.5).divide(b)}return this._uv}getFilterData(b){b=this.getAttributeDataCoords(b);return m.texture2D(this.filterFlags,b).setDebugName("storage0")}getAnimationData(b){b=this.getAttributeDataCoords(b);return m.texture2D(this.animation,b).setDebugName("storage1")}getVVData(b){return this.getVisualVariableData(b)}getDataDrivenData0(b){b=
this.getAttributeDataCoords(b);return m.texture2D(this.dataDriven0,b).setDebugName("storage30")}getDataDrivenData1(b){b=this.getAttributeDataCoords(b);return m.texture2D(this.dataDriven1,b).setDebugName("storage31")}getDataDrivenData2(b){b=this.getAttributeDataCoords(b);return m.texture2D(this.dataDriven2,b).setDebugName("storage32")}getGPGPUData(b){b=this.getAttributeDataCoords(b);return m.texture2D(this.gpgpu,b).setDebugName("storage4")}getFilterFlags(b){return q("webgl-ignores-sampler-precision")?
m.ceil(this.getFilterData(b).x.multiply(m.float(255))):this.getFilterData(b).x.multiply(m.float(255))}getAnimationValue(b){return this.getAnimationData(b).x}getSizeValue(b){return this.getVisualVariableData(b).x}getColorValue(b){return this.getVisualVariableData(b).y}getOpacityValue(b){return this.getVisualVariableData(b).z}getRotationValue(b){return this.getVisualVariableData(b).w}}g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"filterFlags",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,
"animation",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"gpgpu",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"visualVariableData",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"dataDriven0",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"dataDriven1",void 0);g.__decorate([h.uniform(m.Sampler2D)],d.prototype,"dataDriven2",void 0);g.__decorate([h.uniform(m.Float)],d.prototype,"size",void 0);e.EntityStorage=d;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils":function(){define(["exports","../../../../highlightReasons","../../graph/glsl","./constants"],function(e,g,q,h){function m(l,d){d=q.float(2**d);return q.mod(q.floor(l.divide(d)),q.float(2))}e.cross2=function(l,d){return l.x.multiply(d.y).subtract(d.x.multiply(l.y))};e.getBit=m;e.getBitBool=function(l,d){return q.greaterThan(m(l,d),q.float(.5))};e.getFilterBit=function(l,d){return m(l,d+g.highlightReasons.length)};
e.getHighlightBit=function(l,d){return m(l,d)};e.isNan=function(l){return q.equal(l,q.float(h.nanMagicNumber))};e.max4=function(l){return q.max(q.max(q.max(l.x,l.y),l.z),l.w)};e.norm=function(l){return q.divide(l,q.float(255))};e.rand=function(l){const d=q.float(12.9898),b=q.float(78.233),a=q.float(43758.5453);l=q.dot(l,q.vec2(d,b));l=q.mod(l,q.float(3.14));return q.fract(q.sin(l).multiply(a))};e.rgba2float=function(l){const d=q.vec4(.99609375,255/65536,255/16777216,255/4294967296);return q.dot(l,
d)};e.unpackDisplayIdTexel=function(l){const d=m(l.z,7),b=q.float(1).subtract(d),a=l.xyz.subtract(q.vec3(0,0,q.float(128)));return b.multiply(l).add(d.multiply(a))};e.uvToClip=function(l){return l.multiply(2).subtract(1)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants":function(){define(["exports"],function(e){e.RotationType=void 0;var g=e.RotationType||(e.RotationType={});g[g.Geographic=0]="Geographic";g[g.Arithmatic=
1]="Arithmatic";e.attrVvColor=1;e.attrVvOpacity=2;e.attrVvRotation=3;e.attrVvSize=0;e.bitsetFillRandomPatternOffset=2;e.bitsetGenericConsiderAlphaOnly=4;e.bitsetGenericLockColor=1;e.bitsetLineIsSdf=3;e.bitsetLineScaleDash=2;e.bitsetMarkerAlignmentMap=0;e.bitsetMarkerOutlineAllowColorOverride=2;e.bitsetMarkerScaleSymbolsProportionally=3;e.bitsetTextIsBackground=0;e.bitsetTextIsMapAligned=3;e.bitsetTypeFillOutline=0;e.c256ToRad=3.14159265359/128;e.cDegToRad=3.14159265359/180;e.cRadToDeg=57.29577950560105;
e.epsilon=1E-5;e.epsilonHitTest=.05;e.extrudeScalePlacementPadding=.25;e.fillPositionPrecision=1;e.maxFilterCount=2;e.maxRepresentableInt=16777216;e.maxSdfDistance=8;e.nanMagicNumber=1E-30;e.offsetPrecision=.125;e.outlineScale=.2;e.placementPadding=8;e.positionPrecision=.125;e.sdfFontSize=24;e.softEdgeRatio=1;e.thinLineHalfWidth=1;e.thinLineWidthFactor=1.1;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight":function(){define(["exports",
"../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl"],function(e,g,q,h){class m extends q.UniformGroup{}g.__decorate([q.uniform(h.Float)],m.prototype,"activeReasons",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"highlightAll",void 0);e.ShaderHighlight=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHittest":function(){define(["exports","../../../../../../../chunks/tslib.es6",
"../../GraphShaderModule","../../graph/glsl"],function(e,g,q,h){class m extends q.UniformGroup{}g.__decorate([q.uniform(h.Vec2)],m.prototype,"position",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"distance",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"smallSymbolDistance",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"smallSymbolSizeThreshold",void 0);e.ShaderHittest=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo":function(){define(["exports",
"../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl"],function(e,g,q,h){class m extends q.UniformGroup{}g.__decorate([q.uniform(h.Mat3)],m.prototype,"displayViewScreenMat3",void 0);g.__decorate([q.uniform(h.Mat3)],m.prototype,"displayViewMat3",void 0);g.__decorate([q.uniform(h.Mat3)],m.prototype,"displayMat3",void 0);g.__decorate([q.uniform(h.Mat3)],m.prototype,"viewMat3",void 0);g.__decorate([q.uniform(h.Mat3)],m.prototype,"tileMat3",void 0);g.__decorate([q.uniform(h.Float)],
m.prototype,"displayZoomFactor",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"requiredZoomFactor",void 0);g.__decorate([q.uniform(h.Vec2)],m.prototype,"tileOffset",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"currentScale",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"currentZoom",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"metersPerSRUnit",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,"rotation",void 0);g.__decorate([q.uniform(h.Float)],m.prototype,
"pixelRatio",void 0);e.ViewInfo=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../definitions ../../GraphShaderModule ../../graph/glsl ../shaders/AFeatureShader ../shaders/hittestUtils ../shaders/utils".split(" "),function(e,g,q,h,m,l,d,b){class a extends l.FeatureVertexInput{}g.__decorate([h.location(3,m.Float)],a.prototype,
"inverseArea",void 0);class f extends l.FeatureFragmentInput{}class n extends h.UniformGroup{}g.__decorate([h.uniform(m.FixedArray.ofType(m.Vec4,2))],n.prototype,"isActive",void 0);g.__decorate([h.uniform(m.FixedArray.ofType(m.Vec4,8))],n.prototype,"colors",void 0);g.__decorate([h.uniform(m.Float)],n.prototype,"dotValue",void 0);class c extends h.UniformGroup{}g.__decorate([h.uniform(m.Sampler2D)],c.prototype,"dotTexture0",void 0);g.__decorate([h.uniform(m.Sampler2D)],c.prototype,"dotTexture1",void 0);
g.__decorate([h.uniform(m.Float)],c.prototype,"tileZoomFactor",void 0);g.__decorate([h.uniform(m.Float)],c.prototype,"pixelRatio",void 0);g.__decorate([h.uniform(m.Float)],c.prototype,"tileDotsOverArea",void 0);class r extends l.AFeatureShader{_dotThreshold(k,p,t){return k.divide(p).divide(t)}vertex(k){var p=(new m.Mat3(2/q.tileSize,0,0,0,-2/q.tileSize,0,-1,1,1)).multiply(new m.Vec3(k.pos,1)),t=this.clip(k.id);p=new m.Vec4(p.xy,t,1);var w=this.storage.getVVData(k.id).multiply(this.instance.isActive.get(0)).multiply(k.inverseArea),
u=this.storage.getDataDrivenData0(k.id).multiply(this.instance.isActive.get(1)).multiply(k.inverseArea);t=this.draw.tileZoomFactor.multiply(q.tileSize).divide(this.draw.pixelRatio);w=this._dotThreshold(w,this.instance.dotValue,this.draw.tileDotsOverArea);u=this._dotThreshold(u,this.instance.dotValue,this.draw.tileDotsOverArea);k=k.pos.add(.5).divide(t);return{glPosition:p,color:new m.Vec4(0,0,0,0),textureCoords:k,thresholds0:w,thresholds1:u}}fragment(k){const p=new h.FragmentOutput;var t=m.texture2D(this.draw.dotTexture0,
k.textureCoords),w=m.texture2D(this.draw.dotTexture1,k.textureCoords);t=k.thresholds0.subtract(t);var u=k.thresholds1.subtract(w);k=m.Mat4.fromColumns(this.instance.colors[0],this.instance.colors[1],this.instance.colors[2],this.instance.colors[3]);w=m.Mat4.fromColumns(this.instance.colors[4],this.instance.colors[5],this.instance.colors[6],this.instance.colors[7]);if(this.blending){const A=m.step(new m.Float(0),t);var y=m.step(new m.Float(0),u),x=m.dot(A,t).add(m.dot(y,u));const z=m.step(x,new m.Float(0));
var v=(new m.Float(1)).subtract(z);x=x.add(z);t=t.multiply(A).divide(x);u=u.multiply(y).divide(x);k=k.multiply(t).add(w.multiply(u));k=v.multiply(k)}else y=m.max(b.max4(t),b.max4(u)),v=m.step(y,new m.Float(0)),v=(new m.Float(1)).subtract(v),t=m.step(y,t),u=m.step(y,u),k=k.multiply(t).add(w.multiply(u)),k=v.multiply(k);p.glFragColor=k;return p}hittest(k){return d.failHittest(this.hittestRequest)}}g.__decorate([h.define],r.prototype,"blending",void 0);g.__decorate([h.uniform(n)],r.prototype,"instance",
void 0);g.__decorate([h.uniform(c)],r.prototype,"draw",void 0);g.__decorate([g.__param(0,h.input(a))],r.prototype,"vertex",null);g.__decorate([g.__param(0,h.input(l.FeatureFragmentInput))],r.prototype,"fragment",null);e.DotDensityPolygonDrawUniforms=c;e.DotDensityPolygonFragmentInput=f;e.DotDensityPolygonInstanceUniforms=n;e.DotDensityPolygonShader=r;e.DotDensityPolygonVertexInput=a;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils":function(){define(["exports",
"../../graph/glsl","./constants","./utils"],function(e,g,q,h){function m(f,n){return g.dot(f,g.normalize(n))}function l(f,n,c){var r=c.subtract(n),k=f.subtract(n);k=m(k,r);r=g.clamp(k.divide(g.length(r)),new g.Float(0),new g.Float(1));return g.distance(f,n.add(r.multiply(c.subtract(n))))}function d(f){f=g.abs(f);return g.step(f.x.add(f.y).add(f.z),new g.Float(1.05))}function b(f,n,c,r){const k=new g.Mat3(c.x.multiply(r.y).subtract(r.x.multiply(c.y)),r.x.multiply(n.y).subtract(n.x.multiply(r.y)),n.x.multiply(c.y).subtract(c.x.multiply(n.y)),
c.y.subtract(r.y),r.y.subtract(n.y),n.y.subtract(c.y),r.x.subtract(c.x),n.x.subtract(r.x),c.x.subtract(n.x));var p=n.x.multiply(c.y.subtract(r.y));const t=c.x.multiply(r.y.subtract(n.y));n=r.x.multiply(n.y.subtract(c.y));p=p.add(t).add(n);return(new g.Float(1)).divide(p).multiply(k.multiply(new g.Vec3(1,f)))}function a(f,n,c,r){var k=c.subtract(n);const p=r.subtract(n);k=h.cross2(k,p);k=g.and(g.lessThan(k,new g.Float(q.epsilonHitTest)),g.greaterThan(k,new g.Float(-q.epsilonHitTest)));return g.cond([g.and(g.not(k),
g.equal(d(b(f.xy,n,c,r)),new g.Float(1))),new g.Float(-1)],[!0,()=>{const t=l(f,n,c),w=l(f,c,r),u=l(f,r,n);return g.min(g.min(t,w),u)}])}e.distPointSegment=l;e.distPointTriangle=a;e.failHittest=function(f){return f.distance.add(1)};e.hittestFill=function(f,n,c){const {viewMat3:r,tileMat3:k}=f.view,p=r.multiply(k);n=p.multiply(new g.Vec3(n.pos,1));const t=p.multiply(new g.Vec3(c.nextPos1,1));c=p.multiply(new g.Vec3(c.nextPos2,1));return a(f.hittestRequest.position,n.xy,t.xy,c.xy)};e.hittestMarker=
function(f,n,c){return g.distance(f,c).subtract(n)};e.inTriangle=d;e.projectScalar=m;e.xyToBarycentric=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources":function(){define("exports ../../../../../../../core/RandomLCG ../../../definitions ../../../meshing/SimpleMesh ../mesh/utils ../../../../../../webgl/enums ../../../../../../webgl/FramebufferObject ../../../../../../webgl/Renderbuffer ../../../../../../webgl/RenderbufferDescriptor ../../../../../../webgl/Texture ../../../../../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){class c{constructor(){this._dotTextureSize=0;this._dotMesh=this._dotTextures=null}destroy(){this._disposeTextures();this._dotFBO&&this._dotFBO.dispose();this._dotMesh&&this._dotMesh.destroy()}getFBO(r){if(null==this._dotFBO){var k=q.tileSize;const p=q.tileSize,t=new n.TextureDescriptor(k,p);t.samplingMode=l.TextureSamplingMode.NEAREST;t.wrapMode=l.TextureWrapMode.CLAMP_TO_EDGE;k=new b.Renderbuffer(r,new a.RenderbufferDescriptor(l.RenderbufferFormat.DEPTH_STENCIL,k,
p));this._dotFBO=new d.FramebufferObject(r,t,k)}return this._dotFBO}getDotDensityMesh(r){if(null==this._dotMesh){var k=q.tileSize;const p=k*k,t=new Int16Array(2*p);for(let w=0;w<k;w++)for(let u=0;u<k;u++)t[2*(u+w*k)]=u,t[2*(u+w*k)+1]=w;k=[{count:2,type:l.DataType.UNSIGNED_SHORT,name:"a_position",offset:0}];k={hash:m.vertexLayoutHash(k),attributes:k,stride:4};this._dotMesh=h.SimpleMesh.create(r,{primitive:l.PrimitiveType.POINTS,vertex:t,count:p,layout:k})}return this._dotMesh}getDotDensityTextures(r,
k,p){if(this._dotTextureSize!==k||this._seed!==p)this._disposeTextures(),this._dotTextureSize=k,this._seed=p;null===this._dotTextures&&(p=new g(p),this._dotTextures=[this._allocDotDensityTexture(r,k,p),this._allocDotDensityTexture(r,k,p)]);return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let r=0;r<this._dotTextures.length;r++)this._dotTextures[r].dispose();this._dotTextures=null}}_allocDotDensityTexture(r,k,p){const t=new Float32Array(k*k*4);for(let w=0;w<t.length;w++)t[w]=p.getFloat();
p=new n.TextureDescriptor;p.dataType=l.PixelType.FLOAT;p.samplingMode=l.TextureSamplingMode.NEAREST;p.width=k;p.height=k;return new f.Texture(r,p,t)}}e.DotDensityResources=c;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/meshing/SimpleMesh":function(){define(["exports","./definitions","./Mesh","../shaderGraph/techniques/mesh/utils"],function(e,g,q,h){class m extends q.Mesh{static create(l,d){const b=[];let {stride:a,hash:f}=d.layout;if(null==a){a=0;for(const {count:r,
type:k,offset:p}of d.layout.attributes){if(null!=p)throw Error("Stride cannot be computed automatically when attribute offsets are supplied explicitly.");a+=r*g.dataSizeInBytes[k]}}var n=0,c=0;for(const {count:r,name:k,offset:p,type:t,normalized:w}of d.layout.attributes)null!=p&&(c=p),b.push({name:k,location:n,vertex:0,count:r,type:t,offset:c,stride:a,divisor:0,normalized:null!=w?w:!1}),n++,c+=r*g.dataSizeInBytes[t];n={attributes:b,primitive:d.primitive};null!=d.index&&(n.index=0);({count:c}=d);if(null==
c&&(c=d.index?d.index.length:d.vertex.byteLength/a,Math.floor(c)!==c))throw Error(`The byte length of vertex data must be an exact multiple of the stride, which is ${a}.`);n={vertex:[d.vertex],parts:[{start:0,count:c,group:0,primitive:d.primitive}],groups:[n]};null!=d.index&&(n.index=[d.index]);null==f&&(f=h.vertexLayoutHash(b));return new m(l,n,{hash:f,attributes:b,stride:a})}constructor(l,d,b){super(l,d);this.layout=b}bind(l,d=0){super.bind(l,d)}}e.SimpleMesh=m;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/meshing/definitions":function(){define(["exports","../../../../webgl/enums"],function(e,g){e.dataSizeInBytes={[g.DataType.BYTE]:1,[g.DataType.UNSIGNED_BYTE]:1,[g.DataType.SHORT]:2,[g.DataType.UNSIGNED_SHORT]:2,[g.DataType.HALF_FLOAT]:2,[g.DataType.INT]:4,[g.DataType.UNSIGNED_INT]:4,[g.DataType.FLOAT]:4};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/meshing/Mesh":function(){define("exports ./definitions ../../../../webgl/BufferObject ../../../../webgl/enums ../../../../webgl/VertexArrayObject ../../../../webgl/VertexElementDescriptor".split(" "),
function(e,g,q,h,m,l){class d{constructor(b,a){this._boundPart=null;const f=[];for(var n of a.vertex){var c=q.BufferObject.createVertex(b,h.Usage.STATIC_DRAW,n);f.push(c)}n=[];for(var r of a.index||[])c=q.BufferObject.createIndex(b,h.Usage.STATIC_DRAW,r),n.push(c);this.groups=[];for(const p of a.groups){let t;if(null!=p.index){if(!a.index)throw Error("No index data.");({BYTES_PER_ELEMENT:r}=a.index[p.index]);2===r?t=h.DataType.UNSIGNED_SHORT:4===r&&(t=h.DataType.UNSIGNED_INT)}var k=null!=p.index?
n[p.index]:null;r=new Map;c={};const w={};for(const u of p.attributes){const {name:y,count:x,type:v,offset:A,normalized:z,divisor:B,stride:D,vertex:F,location:E}=u,C=`vertex-buffer-${F}`;let G=c[C];G||=c[C]=[];const H=new l.VertexElementDescriptor(y,x,v,A,D,z,B);G.push(H);r.set(y,E);w[C]=f[F]}k=new m.VertexArrayObject(b,r,c,w,k);this.groups.push({...p,vertexArray:k,locations:r,layout:c,indexing:t})}this.parts=a.parts}bind(b,a){this._boundPart=a;({group:a}=this.parts[this._boundPart]);({vertexArray:a}=
this.groups[a]);b.bindVAO(a)}draw(b){if(null==this._boundPart)throw Error("Mesh.bind() has not been called.");const {start:a,count:f}=this.parts[this._boundPart],{group:n}=this.parts[this._boundPart],{indexing:c,primitive:r}=this.groups[n];c?b.drawElements(r,f,c,a*g.dataSizeInBytes[c]):b.drawArrays(r,a,f)}unbind(b){this._boundPart=null;b.bindVAO(null)}destroy(){for(const {vertexArray:b}of this.groups)b.dispose()}}e.Mesh=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./hittestUtils ./VisualVariableColor ./VisualVariableOpacity ./vvUtils".split(" "),
function(e,g,q,h,m,l,d,b,a){class f extends m.FeatureVertexInput{}g.__decorate([q.location(3,h.Vec4)],f.prototype,"color",void 0);g.__decorate([q.location(4,h.Vec2)],f.prototype,"zoomRange",void 0);class n extends m.AFeatureShader{constructor(){super(...arguments);this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(c,r){var k=a.getVisualVariableOpacity(this,c.id);k=a.getVisualVariableColor(this,c.id,c.color).multiply(k);const p=this.view.displayViewScreenMat3.multiply(new h.Vec3(c.pos.xy,
1)),t=this.clip(c.id,c.zoomRange);return{glPosition:new h.Vec4(p.xy,t,1),color:k,...this.maybeRunHittest(c,r,null)}}fragment(c){return this.getFragmentOutput(c.color,c,new h.Float(0))}hittest(c,r){return l.hittestFill(this,c,r)}}g.__decorate([q.option(d.VisualVariableColor)],n.prototype,"visualVariableColor",void 0);g.__decorate([q.option(b.VisualVariableOpacity)],n.prototype,"visualVariableOpacity",void 0);g.__decorate([g.__param(0,q.input(f)),g.__param(1,q.input(m.BaseHittestVertexInput))],n.prototype,
"vertex",null);g.__decorate([g.__param(0,q.input(m.FeatureFragmentInput))],n.prototype,"fragment",null);e.FillShader=n;e.FillVertexInput=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableColor":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./utils"],function(e,g,q,h,m){class l extends q.UniformGroup{getColor(d,b,a){return h.cond([h.or(m.isNan(d),
a),b],[h.lessThanEqual(d,this.values.first()),this.colors.first()],[h.greaterThanEqual(d,this.values.last()),this.colors.last()],[!0,()=>{const f=this.values.findIndex(k=>h.greaterThan(k,d));var n=this.values.get(f);const c=f.subtract(1),r=this.values.get(c);n=d.subtract(r).divide(n.subtract(r));return h.mix(this.colors.get(c),this.colors.get(f),n)}])}}g.__decorate([q.uniform(h.FixedArray.ofType(h.Vec4,8))],l.prototype,"colors",void 0);g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],l.prototype,
"values",void 0);e.VisualVariableColor=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableOpacity":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./utils"],function(e,g,q,h,m){class l extends q.UniformGroup{getOpacity(d){return h.cond([m.isNan(d),new h.Float(1)],[h.lessThanEqual(d,this.opacityValues.first()),this.opacities.first()],[h.greaterThanEqual(d,
this.opacityValues.last()),this.opacities.last()],[!0,()=>{const b=this.opacityValues.findIndex(c=>h.greaterThan(c,d));var a=this.opacityValues.get(b);const f=b.subtract(1),n=this.opacityValues.get(f);a=d.subtract(n).divide(a.subtract(n));return h.mix(this.opacities.get(f),this.opacities.get(b),a)}])}}g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],l.prototype,"opacities",void 0);g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],l.prototype,"opacityValues",void 0);e.VisualVariableOpacity=
l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils":function(){define(["exports","../../graph/glsl"],function(e,g){function q(h){return null!=h.visualVariableSizeMinMaxValue||null!=h.visualVariableSizeScaleStops||null!=h.visualVariableSizeStops||null!=h.visualVariableSizeUnitValue}e.getVisualVariableColor=function(h,m,l,d=new g.Bool(!1)){if(null==h.visualVariableColor)return l;m=h.storage.getColorValue(m);return h.visualVariableColor.getColor(m,
l,d)};e.getVisualVariableOpacity=function(h,m){if(null==h.visualVariableOpacity)return new g.Float(1);m=h.storage.getOpacityValue(m);return h.visualVariableOpacity.getOpacity(m)};e.getVisualVariableRotation=function(h,m){if(null==h.visualVariableRotation)return g.Mat3.identity();m=h.storage.getRotationValue(m);return h.visualVariableRotation.getVVRotationMat3(m)};e.getVisualVariableSize=function(h,m,l){return q(h)?(m=h.storage.getSizeValue(m),h.visualVariableSizeMinMaxValue?.getSize(m,l)??h.visualVariableSizeScaleStops?.getSizeForViewScale(h.view.currentScale)??
h.visualVariableSizeStops?.getSize(m,l)??h.visualVariableSizeUnitValue?.getSize(m,l)):l};e.hasVisualVariableSize=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique":function(){define(["exports","../FeatureTechnique","../featureTechniqueUtils","../TechniqueType","../shaders/ComplexFillShader"],function(e,g,q,h,m){class l extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.ComplexFill;
this.shaders={geometry:new m.ComplexFillShader}}render(d,b){const {context:a,painter:f}=d,n=b.instance.getInput();f.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(d,b.target,n.uniforms),...q.getFeatureUniforms(d,b.target),mosaicInfo:f.textureManager.getMosaicInfo(a,b.textureKey),localTileOffset:q.getLocalTileOffset(b.target)},defines:{...q.getSelectionDefines(d)},optionalAttributes:n.optionalAttributes,useComputeBuffer:q.isHittest(d)});f.setPipelineState(q.getFeaturePipelineState(d));
f.submitDraw(d,b)}}e.ComplexFillTechnique=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./constants ./FillShader ./LocalTileOffset ./MosaicInfo ./utils".split(" "),function(e,g,q,h,m,l,d,b,a,f){function n(t,w){var u=t.view.requiredZoomFactor,y=new h.Vec2(w.width,w.height),x=y.multiply(w.scale).multiply(u),
v=w.angle.multiply(l.c256ToRad);const A=h.sin(v);v=h.cos(v);var z=w.id;var B=h.equal(f.getBit(w.bitset,l.bitsetFillRandomPatternOffset),h.float(1));z=f.rgba2float(new h.Vec4(z,0));B=h.ifElse(B,h.mat3(v.divide(x.x),A.divide(x.y),0,h.negate(A.divide(x.x)),v.divide(x.y),0,f.rand(h.vec2(z,0)),f.rand(h.vec2(0,z)),1),h.mat3(v.divide(x.x),A.divide(x.y),0,h.negate(A.divide(x.x)),v.divide(x.y),0,0,0,1));y=t.localTileOffset.getPatternOffsetAtTileOrigin(y,A,v);u=u.multiply(w.scale).multiply(w.offset.subtract(y)).divide(x);
x=new h.Vec3(w.pos,1);u=B.multiply(x).xy.subtract(u);x=w.tlbr.divide(t.mosaicInfo.size.xyxy);y=f.getBit(w.bitset,l.bitsetGenericConsiderAlphaOnly);null!=t.visualVariableColor&&(y=h.ifElse(f.isNan(t.storage.getColorValue(w.id)),new h.Float(0),y));return{tileTextureCoord:u,tlbr:x,sampleAlphaOnly:y}}function c(t,w){var u=h.mod(w.tileTextureCoord,new h.Float(1));u=h.mix(w.tlbr.xy,w.tlbr.zw,u);t=h.texture2D(t.mosaicInfo.texture,u);t=h.ifElse(h.greaterThan(w.sampleAlphaOnly,new h.Float(.5)),t.aaaa,t);return w.color.multiply(t)}
class r extends d.FillVertexInput{}g.__decorate([q.location(5,h.Vec4)],r.prototype,"tlbr",void 0);g.__decorate([q.location(6,h.Float)],r.prototype,"width",void 0);g.__decorate([q.location(7,h.Float)],r.prototype,"height",void 0);g.__decorate([q.location(8,h.Vec2)],r.prototype,"offset",void 0);g.__decorate([q.location(9,h.Vec2)],r.prototype,"scale",void 0);g.__decorate([q.location(10,h.Float)],r.prototype,"angle",void 0);class k extends m.FeatureFragmentInput{}class p extends d.FillShader{vertex(t,
w){return{...super.vertex(t,w),...n(this,t)}}fragment(t){const w=c(this,t);return this.getFragmentOutput(w,t,new h.Float(0))}}g.__decorate([q.uniform(a.MosaicInfo)],p.prototype,"mosaicInfo",void 0);g.__decorate([q.uniform(b.LocalTileOffset)],p.prototype,"localTileOffset",void 0);g.__decorate([g.__param(0,q.input(r)),g.__param(1,q.input(m.BaseHittestVertexInput))],p.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(k))],p.prototype,"fragment",null);e.ComplexFillFragmentInput=k;e.ComplexFillShader=
p;e.ComplexFillVertexInput=r;e.getComplexFillFragmentColor=c;e.getComplexFillVertexData=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/LocalTileOffset":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./constants"],function(e,g,q,h,m){class l extends q.UniformGroup{getPatternOffsetAtTileOrigin(d,b=new h.Float(0),a=new h.Float(1)){var f=(new h.Vec2(m.maxRepresentableInt)).divide(d);
f=d.multiply(h.fract(this.maxIntsToLocalOrigin.multiply(f))).add(this.tileOffsetFromLocalOrigin).subtract((new h.Float(.5)).multiply(d));f=new h.Vec2(f.x.multiply(a).subtract(f.y.multiply(b)),f.x.multiply(b).add(f.y.multiply(a)));return h.mod(f,d)}}g.__decorate([q.uniform(h.Vec2)],l.prototype,"tileOffsetFromLocalOrigin",void 0);g.__decorate([q.uniform(h.Vec2)],l.prototype,"maxIntsToLocalOrigin",void 0);e.LocalTileOffset=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/MosaicInfo":function(){define(["exports",
"../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl"],function(e,g,q,h){class m extends q.UniformGroup{}g.__decorate([q.uniform(h.Vec2)],m.prototype,"size",void 0);g.__decorate([q.uniform(h.Sampler2D)],m.prototype,"texture",void 0);e.MosaicInfo=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique":function(){define("exports ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ../line/utils ../shaders/ComplexOutlineFillShader".split(" "),
function(e,g,q,h,m,l){class d extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.ComplexOutlineFill;this.shaders={geometry:new l.ComplexOutlineFillShader}}render(b,a){const {context:f,painter:n,pixelRatio:c}=b,r=a.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(b,a.target,r.uniforms),...q.getFeatureUniforms(b,a.target),antialiasingControls:m.getAntialiasingControls(c),mosaicInfo:n.textureManager.getMosaicInfo(f,
a.textureKey),localTileOffset:q.getLocalTileOffset(a.target)},defines:{...q.getSelectionDefines(b)},optionalAttributes:r.optionalAttributes,useComputeBuffer:q.isHittest(b)});n.setPipelineState(q.getFeaturePipelineState(b));n.submitDraw(b,a)}}e.ComplexOutlineFillTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/line/utils":function(){define(["exports"],function(e){e.getAntialiasingControls=function(g){g=1/g;return{antialiasing:g,
blur:0+g}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./ComplexFillShader ./hittestUtils ./LineShader ./LocalTileOffset ./MosaicInfo ./OutlineFillShader ./PatternOutlineFillShader".split(" "),function(e,g,q,h,m,l,d,b,a,f,n,c){class r extends m.FeatureVertexInput{}g.__decorate([q.location(3,
h.Vec4)],r.prototype,"color",void 0);g.__decorate([q.location(4,h.Vec4)],r.prototype,"tlbr",void 0);g.__decorate([q.location(5,h.Float)],r.prototype,"angle",void 0);g.__decorate([q.location(6,h.Float)],r.prototype,"aux1",void 0);g.__decorate([q.location(7,h.Float)],r.prototype,"aux2",void 0);g.__decorate([q.location(8,h.Vec2)],r.prototype,"aux3",void 0);g.__decorate([q.location(9,h.Vec2)],r.prototype,"aux4",void 0);g.__decorate([q.location(10,h.Vec2)],r.prototype,"zoomRange",void 0);class k extends c.PatternOutlineFillFragmentInput{}
class p extends n.AOutlineFillShader{vertex(t,w){const {aux1:u,aux2:y,aux3:x,aux4:v}=t;var A={...t,width:u,height:y,offset:x,scale:v.multiply(.0625)},z={...t,halfWidth:u,referenceHalfWidth:y,offset:x,normal:v.subtract(128).multiply(.0625)};z=n.getOutlineFillVertexData(this,z);A=l.getComplexFillVertexData(this,A);const B=h.greaterThan(z.isOutline,new h.Float(.5));return{...z,...A,...this.maybeRunHittest(t,w,B)}}fragment(t){var {isOutline:w}=t;w=h.greaterThan(w,new h.Float(.5));var u=b.getLineFragmentColor(t,
this.antialiasingControls.blur);const y=l.getComplexFillFragmentColor(this,t);u=h.ifElse(w,u,y);w=h.ifElse(w,new h.Float(1/255),new h.Float(0));return this.getFragmentOutput(u,t,w)}hittest(t,w,u){return h.ifElse(u,d.failHittest(this.hittestRequest),d.hittestFill(this,t,w))}}g.__decorate([q.uniform(f.MosaicInfo)],p.prototype,"mosaicInfo",void 0);g.__decorate([q.uniform(a.LocalTileOffset)],p.prototype,"localTileOffset",void 0);g.__decorate([g.__param(0,q.input(r)),g.__param(1,q.input(m.BaseHittestVertexInput))],
p.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(k))],p.prototype,"fragment",null);e.ComplexOutlineFillShader=p;e.ComplexOutlineFillVertexInput=r;e.packPrecision=16;e.signedToUnsignedByte=128;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./constants ./hittestUtils ./VisualVariableColor ./VisualVariableOpacity ./VisualVariableSizeMinMaxValue ./VisualVariableSizeScaleStops ./VisualVariableSizeStops ./VisualVariableSizeUnitValue ./vvUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k){function p(z){return h.max((new h.Float(l.thinLineWidthFactor)).multiply(h.step(z,new h.Float(l.thinLineHalfWidth))),new h.Float(1))}function t(z,B){const {halfWidth:D,normal:F}=z;z=p(D);const E=h.length(F).multiply(D);return h.clamp(z.multiply(D.subtract(E)).divide(B.add(z).subtract(new h.Float(1))),new h.Float(0),new h.Float(1))}function w(z,B){const {id:D,offset:F,pos:E,normal:C,zoomRange:G}=B,{displayViewScreenMat3:H,displayViewMat3:K}=z.view,J=k.getVisualVariableColor(z,
D,B.color),O=k.getVisualVariableOpacity(z,D);{const {id:L,halfWidth:R,referenceHalfWidth:V}=B;k.hasVisualVariableSize(z)?(B=(new h.Float(2)).multiply(V),B=k.getVisualVariableSize(z,L,B),B=(new h.Float(.5)).multiply(R.divide(h.max(V,new h.Float(l.epsilon)))).multiply(B)):B=R}var Q=(new h.Float(.5)).multiply(z.antialiasingControls.antialiasing);Q=h.max(B.add(Q),new h.Float(.45)).add((new h.Float(.1)).multiply(Q));const T=p(Q).multiply(Q).multiply(F);var I=K.multiply(new h.Vec3(T,new h.Float(0)));I=
H.multiply(new h.Vec3(E,new h.Float(1))).add(I);z=(new h.Float(2)).multiply(h.step(B,new h.Float(0))).add(z.clip(D,G));I=new h.Vec4(I.xy,z,1);z=new h.Vec4(I.xy,z,1);return{color:J,opacity:O,halfWidth:Q,normal:C,scaledOffset:T,scaledHalfWidth:B,glPosition:z}}function u(z,B){const {opacity:D,color:F}=z;z=t(z,B);return D.multiply(F).multiply(z)}class y extends m.FeatureVertexInput{}g.__decorate([q.location(3,h.Vec4)],y.prototype,"color",void 0);g.__decorate([q.location(4,h.Vec2)],y.prototype,"offset",
void 0);g.__decorate([q.location(5,h.Vec2)],y.prototype,"normal",void 0);g.__decorate([q.location(6,h.Float)],y.prototype,"halfWidth",void 0);g.__decorate([q.location(7,h.Float)],y.prototype,"referenceHalfWidth",void 0);g.__decorate([q.location(8,h.Vec2)],y.prototype,"zoomRange",void 0);class x extends m.FeatureFragmentInput{}class v extends q.UniformGroup{}g.__decorate([q.uniform(h.Float)],v.prototype,"antialiasing",void 0);g.__decorate([q.uniform(h.Float)],v.prototype,"blur",void 0);class A extends m.AFeatureShader{constructor(){super(...arguments);
this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(z,B){const D=w(this,z);return{...D,...this.maybeRunHittest(z,B,D.halfWidth)}}fragment(z){const B=u(z,this.antialiasingControls.blur);return this.getFragmentOutput(B,z)}hittest(z,B,D){const {viewMat3:F,tileMat3:E}=this.view;var C=F.multiply(E);z=C.multiply(new h.Vec3(z.pos,1));const G=C.multiply(new h.Vec3(B.nextPos1,1));B=C.multiply(new h.Vec3(B.nextPos2,1));const {distance:H,smallSymbolDistance:K,smallSymbolSizeThreshold:J}=this.hittestRequest;
C=h.step(D,J.multiply(.5)).multiply(H.subtract(K));const O=this.hittestRequest.position;return h.min(d.distPointSegment(O,z.xy,G.xy),d.distPointSegment(O,z.xy,B.xy)).subtract(D).add(C)}}g.__decorate([q.uniform(v)],A.prototype,"antialiasingControls",void 0);g.__decorate([q.option(b.VisualVariableColor)],A.prototype,"visualVariableColor",void 0);g.__decorate([q.option(a.VisualVariableOpacity)],A.prototype,"visualVariableOpacity",void 0);g.__decorate([q.option(f.VisualVariableSizeMinMaxValue)],A.prototype,
"visualVariableSizeMinMaxValue",void 0);g.__decorate([q.option(n.VisualVariableSizeScaleStops)],A.prototype,"visualVariableSizeScaleStops",void 0);g.__decorate([q.option(c.VisualVariableSizeStops)],A.prototype,"visualVariableSizeStops",void 0);g.__decorate([q.option(r.VisualVariableSizeUnitValue)],A.prototype,"visualVariableSizeUnitValue",void 0);g.__decorate([g.__param(0,q.input(y)),g.__param(1,q.input(m.BaseHittestVertexInput))],A.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(x))],
A.prototype,"fragment",null);e.AntialiasingControls=v;e.LineFragmentInput=x;e.LineShader=A;e.LineVertexInput=y;e.getLineAntialiasing=t;e.getLineFragmentColor=u;e.getLineVertexData=w;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableSizeMinMaxValue":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./utils"],function(e,g,q,h,m){class l extends q.UniformGroup{getSize(d,
b){const a=this.minMaxValueAndSize.xy,f=this.minMaxValueAndSize.zw;return h.ifElse(m.isNan(d),b,()=>{var n=d.subtract(a.x).divide(a.y.subtract(a.x));n=h.clamp(n,new h.Float(0),new h.Float(1));return f.x.add(n.multiply(f.y.subtract(f.x)))})}}g.__decorate([q.uniform(h.Vec4)],l.prototype,"minMaxValueAndSize",void 0);e.VisualVariableSizeMinMaxValue=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableSizeScaleStops":function(){define(["exports",
"../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl"],function(e,g,q,h){class m extends q.UniformGroup{getSizeForViewScale(l){return h.cond([h.lessThanEqual(l,this.values.first()),this.sizes.first()],[h.greaterThanEqual(l,this.values.last()),this.sizes.last()],[!0,()=>{const d=this.values.findIndex(n=>h.greaterThan(n,l));var b=this.values.get(d);const a=d.subtract(1),f=this.values.get(a);b=l.subtract(f).divide(b.subtract(f));return h.mix(this.sizes.get(a),this.sizes.get(d),
b)}])}}g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],m.prototype,"sizes",void 0);g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],m.prototype,"values",void 0);e.VisualVariableSizeScaleStops=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableSizeStops":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./utils"],function(e,g,q,h,
m){class l extends q.UniformGroup{getSize(d,b){const a=h.cond([m.isNan(d),b],[h.lessThanEqual(d,this.values.first()),this.sizes.first()],[h.greaterThanEqual(d,this.values.last()),this.sizes.last()],[!0,()=>{const f=this.values.findIndex(k=>h.greaterThan(k,d));var n=this.values.get(f);const c=f.subtract(1),r=this.values.get(c);n=d.subtract(r).divide(n.subtract(r));return h.mix(this.sizes.get(c),this.sizes.get(f),n)}]);return h.ifElse(m.isNan(a),b,a)}}g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,
8))],l.prototype,"sizes",void 0);g.__decorate([q.uniform(h.FixedArray.ofType(h.Float,8))],l.prototype,"values",void 0);e.VisualVariableSizeStops=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableSizeUnitValue":function(){define(["exports","../../../../../../../chunks/tslib.es6","../../GraphShaderModule","../../graph/glsl","./utils"],function(e,g,q,h,m){class l extends q.UniformGroup{getSize(d,b){return h.ifElse(m.isNan(d),
b,d.multiply(this.unitValueToPixelsRatio))}}g.__decorate([q.uniform(h.Float)],l.prototype,"unitValueToPixelsRatio",void 0);e.VisualVariableSizeUnitValue=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./constants ./hittestUtils ./LineShader ./utils ./VisualVariableColor ./VisualVariableOpacity ./VisualVariableSizeMinMaxValue ./VisualVariableSizeScaleStops ./VisualVariableSizeStops ./VisualVariableSizeUnitValue ./vvUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t){function w(A,z,B){const {id:D,bitset:F}=z,E=a.getBit(F,l.bitsetTypeFillOutline),C=h.greaterThan(E,new h.Float(.5)),G=b.getLineVertexData(A,z),H=h.ifElse(C,G.halfWidth,new h.Float(0));var K=t.getVisualVariableOpacity(A,D),J=t.getVisualVariableColor(A,D,z.color);K=h.ifElse(C,z.color,J.multiply(K));J=A.view.displayViewScreenMat3.multiply(new h.Vec3(z.pos.xy,1));const O=A.clip(z.id);J=new h.Vec4(J.xy,O,1);J=h.ifElse(C,G.glPosition,J);A=B&&A.maybeRunHittest(z,
B,C);return{isOutline:E,color:K,opacity:new h.Float(1),halfWidth:H,normal:G.normal,glPosition:J,...A}}class u extends m.FeatureVertexInput{}g.__decorate([q.location(3,h.Vec2)],u.prototype,"offset",void 0);g.__decorate([q.location(4,h.Vec4)],u.prototype,"color",void 0);g.__decorate([q.location(5,h.Vec2)],u.prototype,"normal",void 0);g.__decorate([q.location(6,h.Float)],u.prototype,"halfWidth",void 0);g.__decorate([q.location(7,h.Float)],u.prototype,"referenceHalfWidth",void 0);g.__decorate([q.location(8,
h.Vec2)],u.prototype,"zoomRange",void 0);class y extends b.LineFragmentInput{}class x extends m.AFeatureShader{constructor(){super(...arguments);this.computeAttributes={pos:["nextPos1","nextPos2"]}}}g.__decorate([q.uniform(b.AntialiasingControls)],x.prototype,"antialiasingControls",void 0);g.__decorate([q.option(f.VisualVariableColor)],x.prototype,"visualVariableColor",void 0);g.__decorate([q.option(n.VisualVariableOpacity)],x.prototype,"visualVariableOpacity",void 0);g.__decorate([q.option(c.VisualVariableSizeMinMaxValue)],
x.prototype,"visualVariableSizeMinMaxValue",void 0);g.__decorate([q.option(r.VisualVariableSizeScaleStops)],x.prototype,"visualVariableSizeScaleStops",void 0);g.__decorate([q.option(k.VisualVariableSizeStops)],x.prototype,"visualVariableSizeStops",void 0);g.__decorate([q.option(p.VisualVariableSizeUnitValue)],x.prototype,"visualVariableSizeUnitValue",void 0);class v extends x{vertex(A,z){return w(this,A,z)}fragment(A){const {color:z,isOutline:B}=A;var D=h.greaterThan(B,new h.Float(.5)),F=b.getLineFragmentColor(A,
this.antialiasingControls.blur);F=h.ifElse(D,F,z);D=h.ifElse(D,new h.Float(1/255),new h.Float(0));return this.getFragmentOutput(F,A,D)}hittest(A,z,B){return h.ifElse(B,d.failHittest(this.hittestRequest),d.hittestFill(this,A,z))}}g.__decorate([g.__param(0,q.input(u)),g.__param(1,q.input(m.BaseHittestVertexInput))],v.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(y))],v.prototype,"fragment",null);e.AOutlineFillShader=x;e.OutlineFillFragmentInput=y;e.OutlineFillShader=v;e.OutlineFillVertexInput=
u;e.getOutlineFillVertexData=w;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./LineShader ./LocalTileOffset ./MosaicInfo ./OutlineFillShader ./PatternFillShader".split(" "),function(e,g,q,h,m,l,d,b,a,f){class n extends a.OutlineFillVertexInput{}g.__decorate([q.location(9,h.Vec4)],
n.prototype,"tlbr",void 0);g.__decorate([q.location(10,h.Float)],n.prototype,"inverseRasterizationScale",void 0);class c extends a.OutlineFillFragmentInput{}class r extends a.OutlineFillShader{vertex(k,p){return{...a.getOutlineFillVertexData(this,k,p),...f.getPatternFillVertexData(this,k)}}fragment(k){var {isOutline:p}=k;p=h.greaterThan(p,new h.Float(.5));var t=l.getLineFragmentColor(k,this.antialiasingControls.blur);const w=f.getPatternFillFragmentColor(k,this.mosaicInfo);t=h.ifElse(p,t,w);p=h.ifElse(p,
new h.Float(1/255),new h.Float(0));return this.getFragmentOutput(t,k,p)}}g.__decorate([q.uniform(b.MosaicInfo)],r.prototype,"mosaicInfo",void 0);g.__decorate([q.uniform(d.LocalTileOffset)],r.prototype,"localTileOffset",void 0);g.__decorate([g.__param(0,q.input(n)),g.__param(1,q.input(m.BaseHittestVertexInput))],r.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(c))],r.prototype,"fragment",null);e.PatternOutlineFillFragmentInput=c;e.PatternOutlineFillShader=r;e.PatternOutlineFillVertexInput=
n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./FillShader ./LocalTileOffset ./MosaicInfo".split(" "),function(e,g,q,h,m,l,d,b){function a(k,p){var t=p.tlbr.xy,w=p.tlbr.zw,u=w.x.subtract(t.x);t=t.y.subtract(w.y);u=(new h.Vec2(u,t)).multiply(p.inverseRasterizationScale);t=u.multiply(k.view.requiredZoomFactor);
w=new h.Float(1);const y=new h.Float(0);w=new h.Mat3(w.divide(t.x),y.divide(t.y),0,h.negate(y.divide(t.x)),w.divide(t.y),0,0,0,1);u=k.localTileOffset.getPatternOffsetAtTileOrigin(u).divide(t);t=new h.Vec3(p.pos,1);u=w.multiply(t).xy.subtract(u);k=p.tlbr.divide(k.mosaicInfo.size.xyxy);return{tileTextureCoord:u,tlbr:k}}function f(k,p){var t=h.mod(k.tileTextureCoord,new h.Float(1));t=h.mix(k.tlbr.xy,k.tlbr.zw,t);p=h.texture2D(p.texture,t);return k.color.multiply(p)}class n extends l.FillVertexInput{}
g.__decorate([q.location(5,h.Vec4)],n.prototype,"tlbr",void 0);g.__decorate([q.location(6,h.Float)],n.prototype,"inverseRasterizationScale",void 0);class c extends m.FeatureFragmentInput{}class r extends l.FillShader{vertex(k,p){return{...super.vertex(k,p),...a(this,k)}}fragment(k){const p=f(k,this.mosaicInfo);return this.getFragmentOutput(p,k,new h.Float(0))}}g.__decorate([q.uniform(b.MosaicInfo)],r.prototype,"mosaicInfo",void 0);g.__decorate([q.uniform(d.LocalTileOffset)],r.prototype,"localTileOffset",
void 0);g.__decorate([g.__param(0,q.input(n)),g.__param(1,q.input(m.BaseHittestVertexInput))],r.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(c))],r.prototype,"fragment",null);e.PatternFillFragmentInput=c;e.PatternFillShader=r;e.PatternFillVertexInput=n;e.getPatternFillFragmentColor=f;e.getPatternFillVertexData=a;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique":function(){define(["exports","../FeatureTechnique",
"../featureTechniqueUtils","../TechniqueType","../shaders/FillShader"],function(e,g,q,h,m){class l extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.Fill;this.shaders={geometry:new m.FillShader}}render(d,b){const {painter:a}=d,f=b.instance.getInput();a.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(d,b.target,f.uniforms),...q.getFeatureUniforms(d,b.target)},defines:q.getSelectionDefines(d),optionalAttributes:f.optionalAttributes,
useComputeBuffer:q.isHittest(d)});a.setPipelineState(q.getFeaturePipelineState(d));a.submitDraw(d,b)}}e.FillTechnique=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique":function(){define("exports ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ../line/utils ../shaders/OutlineFillShader".split(" "),function(e,g,q,h,m,l){class d extends g.FeatureTechnique{constructor(){super(...arguments);this.type=
h.TechniqueType.OutlineFill;this.shaders={geometry:new l.OutlineFillShader}}render(b,a){const {painter:f,pixelRatio:n}=b,c=a.instance.getInput();f.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(b,a.target,c.uniforms),...q.getFeatureUniforms(b,a.target),antialiasingControls:m.getAntialiasingControls(n)},defines:{...q.getSelectionDefines(b)},optionalAttributes:c.optionalAttributes,useComputeBuffer:q.isHittest(b)});f.setPipelineState(q.getFeaturePipelineState(b));f.submitDraw(b,
a)}}e.OutlineFillTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique":function(){define(["exports","../FeatureTechnique","../featureTechniqueUtils","../TechniqueType","../shaders/PatternFillShader"],function(e,g,q,h,m){class l extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.PatternFill;this.shaders={geometry:new m.PatternFillShader}}render(d,b){const {context:a,
painter:f}=d,n=b.instance.getInput();f.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(d,b.target,n.uniforms),...q.getFeatureUniforms(d,b.target),mosaicInfo:f.textureManager.getMosaicInfo(a,b.textureKey),localTileOffset:q.getLocalTileOffset(b.target)},defines:{...q.getSelectionDefines(d)},optionalAttributes:n.optionalAttributes,useComputeBuffer:q.isHittest(d)});f.setPipelineState(q.getFeaturePipelineState(d));f.submitDraw(d,b)}}e.PatternFillTechnique=l;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique":function(){define("exports ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ../line/utils ../shaders/PatternOutlineFillShader".split(" "),function(e,g,q,h,m,l){class d extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.PatternOutlineFill;this.shaders={geometry:new l.PatternOutlineFillShader}}render(b,a){const {context:f,painter:n,
pixelRatio:c}=b,r=a.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...q.resolveDynamicUniforms(b,a.target,r.uniforms),...q.getFeatureUniforms(b,a.target),antialiasingControls:m.getAntialiasingControls(c),mosaicInfo:n.textureManager.getMosaicInfo(f,a.textureKey),localTileOffset:q.getLocalTileOffset(a.target)},defines:{...q.getSelectionDefines(b)},optionalAttributes:r.optionalAttributes,useComputeBuffer:q.isHittest(b)});n.setPipelineState(q.getFeaturePipelineState(b));n.submitDraw(b,
a)}}e.PatternOutlineFillTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique":function(){define("exports ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./HeatmapResources ../shaders/HeatmapAccumulateShader ../shaders/HeatmapResolveShader ../../../../../../webgl/enums".split(" "),function(e,g,q,h,m,l,d,b){function a(p){return p.key.level+1}function f(p,t){const {referenceScale:w,radius:u}=
p.uniforms;return u*(0!==w?w/t.scale:1)}class n extends g.FeatureTechnique{constructor(){super(...arguments);this.type=h.TechniqueType.Heatmap;this.shaders={accumulate:new l.HeatmapAccumulateShader,resolve:new d.HeatmapResolveShader};this.postProcessingEnabled=!0;this._isBound=!1;this._resources=new Map;this.overrideStencilRef=a}shutdown(p){super.shutdown(p);this._resources.get(p)?.destroy();this._resources.delete(p);this._prevFBO=null;this._unbind()}render(p,t){const {context:w,painter:u,state:y}=
p;var x=t.instance.getInput();const {isFieldActive:v}=x.uniforms,A=this._getOrCreateResourcesRecord(w),z=A.loadQualityProfile(w);q.isHighlight(p)||(q.isHittest(p)||this._bind(p,A,x),u.setShader({shader:this.shaders.accumulate,uniforms:{...q.getFeatureUniforms(p,t.target),kernelControls:{radius:f(x,y),isFieldActive:v?1:0}},defines:{...q.getSelectionDefines(p),...z.defines},optionalAttributes:{},useComputeBuffer:q.isHittest(p)}),x=q.isHittest(p)?r:c,u.setPipelineState(x),u.submitDraw(p,t))}postProcess(p,
t){if(!q.isHittest(p)&&!q.isHighlight(p)){var {context:w,painter:u}=p,y=this._resources.get(w);if(null!=this._prevFBO&&null!=this._prevViewport&&y?.initialized){({defines:p}=y.loadQualityProfile(w));var {minDensity:x,maxDensity:v,radius:A}=t.getInput().uniforms;t=y.accumulateFramebuffer;y=y.resolveGradientTexture;u.setShader({shader:this.shaders.resolve,uniforms:{accumulatedDensity:{texture:{unit:8,texture:t.colorTexture},minAndInvRange:[x,1/(v-x)],normalization:3/(A*A*Math.PI)},gradient:{texture:{unit:9,
texture:y}}},defines:p,optionalAttributes:{},useComputeBuffer:!1});w.bindFramebuffer(this._prevFBO);w.setViewport(0,0,this._prevViewport.width,this._prevViewport.height);w.bindTexture(t.colorTexture,8);w.bindTexture(y,9);u.setPipelineState(k);u.submitDrawQuad(w);this._unbind()}}}_getOrCreateResourcesRecord(p){let t=this._resources.get(p);null==t&&(t=new m.HeatmapResources,this._resources.set(p,t));return t}_unbind(){this._prevViewport=this._prevFBO=null;this._isBound=!1}_bind(p,t,w){if(!this._isBound){var {context:u,
state:y,pixelRatio:x}=p;p=u.getBoundFramebufferObject();var v=u.getViewport();this._prevFBO=p;this._prevViewport=v;var {gradient:A,gradientHash:z}=w.uniforms;t.ensureResolveGradientTexture(u,z,A);var {width:B,height:D}=v;w=f(w,y);v=1.5<x?.25:.5;w=w<1/(2*v)?1:v;t=t.ensureAccumulateFBO(u,B*w,D*w);u.blitFramebuffer(p,t,0,0,p.width,p.height,0,0,t.width,t.height,b.ClearBufferBit.STENCIL_BUFFER_BIT,b.TextureSamplingMode.NEAREST);u.bindFramebuffer(t);u.setViewport(0,0,t.width,t.height);u.setColorMask(!0,
!0,!0,!0);u.setClearColor(0,0,0,0);u.clear(b.ClearBufferBit.COLOR_BUFFER_BIT);this._isBound=!0}}}const c={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{ref:a,compare:b.CompareFunction.GEQUAL,mask:255,op:{fail:b.StencilOperation.KEEP,zFail:b.StencilOperation.KEEP,zPass:b.StencilOperation.REPLACE}}}},r={...c,stencil:!1},k={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};e.HeatmapTechnique=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources":function(){define("exports ../../../../../../../core/Logger ../../../../../../../core/maybe ../../../../../../webgl/enums ../../../../../../webgl/FramebufferObject ../../../../../../webgl/heatmapTextureUtils ../../../../../../webgl/RenderbufferDescriptor ../../../../../../webgl/Texture ../../../../../../webgl/TextureDescriptor".split(" "),function(e,g,q,h,m,l,d,b,a){class f{destroy(){this._accumulateFramebuffer=q.disposeMaybe(this._accumulateFramebuffer);
this._resolveGradientTexture=q.disposeMaybe(this._resolveGradientTexture);this._qualityProfile=this._prevGradientHash=null}get initialized(){return null!=this._accumulateFramebuffer&&null!=this._resolveGradientTexture}get accumulateFramebuffer(){return this._accumulateFramebuffer}get resolveGradientTexture(){return this._resolveGradientTexture}loadQualityProfile(n){null==this._qualityProfile&&(n=l.loadHeatmapTextureConfiguration(n,g.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.heatmap.HeatmapResources")),
this._qualityProfile={...n,defines:{usesHalfFloatPrecision:n.dataType!==h.PixelType.FLOAT}});return this._qualityProfile}ensureAccumulateFBO(n,c,r){if(null==this._accumulateFramebuffer){const {dataType:k,samplingMode:p,pixelFormat:t,internalFormat:w}=this.loadQualityProfile(n),u=new a.TextureDescriptor(c,r);u.pixelFormat=t;u.internalFormat=w;u.dataType=k;u.samplingMode=p;u.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE;c=new d.RenderbufferDescriptor(h.RenderbufferFormat.DEPTH_STENCIL,c,r);this._accumulateFramebuffer=
new m.FramebufferObject(n,u,c)}else{const {width:k,height:p}=this._accumulateFramebuffer;k===c&&p===r||this._accumulateFramebuffer.resize(c,r)}return this._accumulateFramebuffer}ensureResolveGradientTexture(n,c,r){null==this._resolveGradientTexture?(c=new a.TextureDescriptor,c.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE,this._resolveGradientTexture=new b.Texture(n,c)):this._prevGradientHash!==c&&(this._resolveGradientTexture.resize(r.length/4,1),this._resolveGradientTexture.setData(r),this._prevGradientHash=
c);return this._resolveGradientTexture}}e.HeatmapResources=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/heatmapTextureUtils":function(){define(["exports","../../core/Error","./enums"],function(e,g,q){class h{constructor(m,l,d,b){this.dataType=m;this.samplingMode=l;this.pixelFormat=d;this.internalFormat=b}}e.HeatmapTextureConfiguration=h;e.loadHeatmapTextureConfiguration=function(m,l){const {textureFloatLinear:d,colorBufferFloat:b}=m.capabilities,a=b?.textureFloat,
f=b?.textureHalfFloat,n=b?.floatBlend;m=m.driverTest.floatBufferBlend.result;if(!a&&!f)throw new g("heatmap:missing-color-buffer-float","HeatmapRenderer requires the WebGL extension EXT_color_buffer_float or EXT_color_buffer_half_float or WEBGL_color_buffer_float.");if(!(n&&m||f))throw new g("heatmap:missing-float-blend",`HeatmapRenderer requires the WebGL extension EXT_float_blend or EXT_color_buffer_half_float.${m?"":" This device claims support for EXT_float_blend, but does not actually support it."}`);
const c=!!b?.R32F,r=!!b?.R16F;if(a&&n&&m&&d)return d||l.warnOnce("Missing WebGL extension OES_texture_float_linear. Heatmap quality may be reduced."),new h(q.PixelType.FLOAT,d?q.TextureSamplingMode.LINEAR:q.TextureSamplingMode.NEAREST,c?q.PixelFormat.RED:q.PixelFormat.RGBA,c?q.SizedPixelFormat.R32F:q.PixelFormat.RGBA);if(f)return new h(q.PixelType.HALF_FLOAT,q.TextureSamplingMode.LINEAR,r?q.PixelFormat.RED:q.PixelFormat.RGBA,r?q.SizedPixelFormat.R16F:q.PixelFormat.RGBA);throw new g("heatmap:missing-hardware-support",
"HeatmapRenderer requires WebGL extensions that allow it to render and blend to float or half float textures.");};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./heatmapUtils ./hittestUtils".split(" "),function(e,g,q,h,m,l,d){class b extends m.FeatureVertexInput{}g.__decorate([q.location(5,
h.Vec2)],b.prototype,"offset",void 0);class a extends m.FeatureFragmentInput{}class f extends q.UniformGroup{}g.__decorate([q.uniform(h.Float)],f.prototype,"radius",void 0);g.__decorate([q.uniform(h.Float)],f.prototype,"isFieldActive",void 0);class n extends m.AFeatureShader{constructor(){super(...arguments);this.usesHalfFloatPrecision=!1}vertex(c){const {radius:r,isFieldActive:k}=this.kernelControls,p=c.offset,t=k.multiply(this.storage.getVVData(c.id).x).add((new h.Float(1)).subtract(k)),w=this.view.displayViewScreenMat3.multiply(new h.Vec3(c.pos,
1)).add(this.view.displayViewMat3.multiply(new h.Vec3(p,0)).multiply(r)),u=this.clip(c.id);return{glPosition:new h.Vec4(w.xy,u,1),offset:p,fieldValue:t,color:new h.Vec4(0),...this.maybeRunHittest(c,{},null)}}fragment(c){const {offset:r,fieldValue:k}=c;var p=h.length(r),t=h.step(p,new h.Float(1));p=(new h.Float(1)).subtract(p.multiply(p));p=p.multiply(p);t=t.multiply(p).multiply(k).multiply(new h.Float(l.getHeatmapCompressionFactor(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new h.Vec4(t),
c)}hittest(c){const {viewMat3:r,tileMat3:k}=this.view;c=r.multiply(k).multiply(new h.Vec3(c.pos,1));return d.hittestMarker(c.xy,this.kernelControls.radius,this.hittestRequest.position)}}g.__decorate([q.define],n.prototype,"usesHalfFloatPrecision",void 0);g.__decorate([q.uniform(f)],n.prototype,"kernelControls",void 0);g.__decorate([g.__param(0,q.input(b))],n.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(a))],n.prototype,"fragment",null);e.HeatmapAccumulateFragmentInput=a;e.HeatmapAccumulateShader=
n;e.HeatmapAccumulateVertexInput=b;e.KernelControls=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/heatmapUtils":function(){define(["exports"],function(e){e.getHeatmapCompressionFactor=function(g){return g?.25:1};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader":function(){define(["exports","../../../../../../../chunks/tslib.es6",
"../../GraphShaderModule","../../graph/glsl","./heatmapUtils"],function(e,g,q,h,m){class l extends q.VertexInput{}g.__decorate([q.location(0,h.Vec2)],l.prototype,"pos",void 0);class d extends q.FragmentInput{}class b extends q.UniformGroup{}g.__decorate([q.uniform(h.Sampler2D)],b.prototype,"texture",void 0);g.__decorate([q.uniform(h.Vec2)],b.prototype,"minAndInvRange",void 0);g.__decorate([q.uniform(h.Float)],b.prototype,"normalization",void 0);class a extends q.UniformGroup{}g.__decorate([q.uniform(h.Sampler2D)],
a.prototype,"texture",void 0);class f extends q.GraphShaderModule{constructor(){super(...arguments);this.usesHalfFloatPrecision=!1}vertex(n){return{glPosition:new h.Vec4(n.pos.multiply(2).subtract(1),1,1),uv:n.pos}}fragment(n){const {accumulatedDensity:c,gradient:r}=this;n=h.texture2D(c.texture,n.uv).r.multiply(new h.Float(m.getHeatmapCompressionFactor(this.usesHalfFloatPrecision)));n=n.multiply(c.normalization);n=n.subtract(c.minAndInvRange.x).multiply(c.minAndInvRange.y);n=h.texture2D(r.texture,
new h.Vec2(n,.5));const k=new q.FragmentOutput;k.glFragColor=new h.Vec4(n.rgb.multiply(n.a),n.a);return k}}g.__decorate([q.define],f.prototype,"usesHalfFloatPrecision",void 0);g.__decorate([q.uniform(b)],f.prototype,"accumulatedDensity",void 0);g.__decorate([q.uniform(a)],f.prototype,"gradient",void 0);g.__decorate([g.__param(0,q.input(l))],f.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(d))],f.prototype,"fragment",null);e.AccumulatedDensity=b;e.Gradient=a;e.HeatmapResolveFragmentInput=
d;e.HeatmapResolveShader=f;e.HeatmapResolveVertexInput=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ../text/TextShader".split(" "),function(e,g,q,h,m,l){class d extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.Label;this.shaders={geometry:new l.TextShader};this.drawPhase=
g.WGLDrawPhase.LABEL|g.WGLDrawPhase.LABEL_ALPHA|g.WGLDrawPhase.HITTEST;this.symbologyPlane=g.FeatureSymbologyDrawOrder.TEXT}render(b,a){const {context:f,painter:n}=b,c=h.getSelectionDefines(b),r={...h.getFeaturePipelineState(b)};var k=a.instance.getInput();k={shader:this.shaders.geometry,uniforms:{...h.resolveDynamicUniforms(b,a.target,k.uniforms),...h.getFeatureUniforms(b,a.target),mosaicInfo:n.textureManager.getMosaicInfo(f,a.textureKey)},defines:{...c,isHaloPass:!1,isBackgroundPass:!0,isLabel:!0},
optionalAttributes:k.optionalAttributes,useComputeBuffer:h.isHittest(b)};n.setShader(k);n.setPipelineState(r);n.submitDraw(b,a);n.setShader({...k,defines:{...c,isHaloPass:!0,isBackgroundPass:!1,isLabel:!0}});n.setPipelineState(r);n.submitDraw(b,a);n.setShader({...k,defines:{...c,isHaloPass:!1,isBackgroundPass:!1,isLabel:!0}});n.setPipelineState(r);n.submitDraw(b,a)}}e.LabelTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../definitions ../../GraphShaderModule ../../graph/glsl ../shaders/AFeatureShader ../shaders/constants ../shaders/hittestUtils ../shaders/MosaicInfo ../shaders/utils ../shaders/VisualVariableColor ../shaders/VisualVariableOpacity ../shaders/VisualVariableRotation ../shaders/VisualVariableSizeMinMaxValue ../shaders/VisualVariableSizeScaleStops ../shaders/VisualVariableSizeStops ../shaders/VisualVariableSizeUnitValue ../shaders/vvUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u){const y=360/254;class x extends l.FeatureVertexInput{}g.__decorate([h.location(3,m.Vec4)],x.prototype,"color",void 0);g.__decorate([h.location(4,m.Vec2)],x.prototype,"offset",void 0);g.__decorate([h.location(5,m.Vec2)],x.prototype,"textureUV",void 0);g.__decorate([h.location(6,m.Float)],x.prototype,"fontSize",void 0);g.__decorate([h.location(7,m.Float)],x.prototype,"referenceSize",void 0);g.__decorate([h.location(8,m.Float)],x.prototype,"haloFontSize",
void 0);g.__decorate([h.location(9,m.Vec4)],x.prototype,"haloColor",void 0);g.__decorate([h.location(10,m.Vec2)],x.prototype,"zoomRange",void 0);g.__decorate([h.location(11,m.Float)],x.prototype,"clipAngle",void 0);g.__decorate([h.location(12,m.Vec4)],x.prototype,"referenceSymbol",void 0);class v extends h.ComputeVertexInput{}g.__decorate([h.location(13,m.Vec2)],v.prototype,"offsetNextVertex1",void 0);g.__decorate([h.location(14,m.Vec2)],v.prototype,"offsetNextVertex2",void 0);class A extends l.FeatureFragmentInput{}
class z extends l.AFeatureShader{constructor(){super(...arguments);this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]};this.isLabel=this.isBackgroundPass=this.isHaloPass=!1}clipLabel(B,D,F){D=D.multiply(y);D=m.abs(this.view.rotation.subtract(D));var E=m.min((new m.Float(360)).subtract(D),D);D=new m.Float(0);const C=m.floor(this.view.currentZoom.multiply(q.minMaxZoomPrecisionFactor)).divide(q.minMaxZoomPrecisionFactor);var G=B.x;B=B.y;G=(new m.Float(1)).subtract(m.step(G,C)).multiply(2);
E=m.step(new m.Float(90),E).multiply(2);B=(new m.Float(2)).multiply((new m.Float(1)).subtract(m.step(C,B)));D=D.add(F.multiply(G));D=D.add(F.multiply(E));return D=D.add(B)}vertex(B,D){var F=f.getBit(B.bitset,d.bitsetTextIsBackground),E=(new m.Float(1)).subtract(F),C=B.fontSize;let G=C.divide(d.sdfFontSize);var H=this.isHaloPass?B.haloColor:this._getVertexColor(B),K=this.isLabel?this.storage.getAnimationValue(B.id):new m.Float(1);H=this.isLabel?H.multiply(K):H;var J=this.view.displayViewScreenMat3.multiply(new m.Vec3(B.pos,
1)),O=B.offset;let Q=new m.Float(1),T=m.Mat3.identity();var I=new m.Vec2(0);if(this.isLabel){if(!B.referenceSymbol)throw Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");var L=B.referenceSymbol;I=L.xy;var R=L.z;L=this._unpackDirection(L.w);R=u.getVisualVariableSize(this,B.id,R).divide(2);R=L.multiply(R.add(q.labelPlacementOffsetPadding));I=I.add(R);O=O.add(I)}else Q=u.getVisualVariableSize(this,B.id,B.referenceSize).divide(B.referenceSize),C=C.multiply(Q),G=G.multiply(Q),
O=O.multiply(Q),T=u.getVisualVariableRotation(this,B.id),O=T.multiply(new m.Vec3(O,0)).xy;R=f.getBit(B.bitset,d.bitsetTextIsMapAligned);O=this._getViewRotationMatrix(R).multiply(new m.Vec3(O,0));R=this.isLabel?this.clipLabel(B.zoomRange,B.clipAngle,R):this.clip(B.id,B.zoomRange);R=this.isBackgroundPass?R.add(E.multiply(2)):R.add(F.multiply(2));F=this.isLabel?m.or(m.greaterThan(R,new m.Float(1)),m.equal(K,new m.Float(0))):new m.Bool(!1);E=new m.Vec4(J.xy.add(O.xy),R,1);K=B.textureUV.divide(this.mosaicInfo.size);
J=new m.Float(0);this.isHaloPass&&(J=B.haloFontSize.divide(G).divide(d.maxSdfDistance));C=(new m.Float(.105*d.sdfFontSize)).divide(C).divide(this.view.pixelRatio);return{glPosition:E,color:H,size:G,textureUV:K,antialiasingWidth:C,haloDistanceOffset:J,...this.maybeRunHittest(B,D,{vvSizeAdjustment:Q,vvRotation:T,labelOffset:I,labelClipped:F})}}_getViewRotationMatrix(B){const D=this.view.displayViewMat3,F=this.view.displayMat3,E=(new m.Float(1)).subtract(B);return D.multiply(B).add(F.multiply(E))}fragment(B){var D=
new m.Float(.25),F=(new m.Float(1)).subtract(D);D=m.texture2D(this.mosaicInfo.texture,B.textureUV).a;F=F.subtract(B.haloDistanceOffset);this.highlight&&(F=F.divide(2));const E=B.antialiasingWidth;D=m.smoothstep(F.subtract(E),F.add(E),D);return this.getFragmentOutput(B.color.multiply(D),B)}hittest(B,D,{vvSizeAdjustment:F,vvRotation:E,labelOffset:C,labelClipped:G}){if(this.isLabel){var H=new m.Vec3(B.offset.add(C),0);var K=new m.Vec3(D.offsetNextVertex1.add(C),0);D=new m.Vec3(D.offsetNextVertex2.add(C),
0)}else H=E.multiply(new m.Vec3(B.offset.multiply(F),0)),K=E.multiply(new m.Vec3(D.offsetNextVertex1.multiply(F),0)),D=E.multiply(new m.Vec3(D.offsetNextVertex2.multiply(F),0));const {viewMat3:J,tileMat3:O}=this.view;B=J.multiply(O).multiply(new m.Vec3(B.pos,1));H=B.add(O.multiply(H)).xy;K=B.add(O.multiply(K)).xy;B=B.add(O.multiply(D)).xy;K=b.distPointTriangle(this.hittestRequest.position,H.xy,K.xy,B.xy);return this.isLabel?m.ifElse(G,b.failHittest(this.hittestRequest),K):K}_unpackDirection(B){var D=
new m.Int(B);B=m.bitRShift(D,new m.Int(2));D=m.bitAnd(D,new m.Int(3));return new m.Vec2((new m.Float(B)).subtract(1),(new m.Float(D)).subtract(1))}_getVertexColor(B){var D=B.color;this.visualVariableColor&&(D=this.storage.getColorValue(B.id),D=this.visualVariableColor.getColor(D,B.color,new m.Bool(!1)));this.visualVariableOpacity&&(B=this.storage.getOpacityValue(B.id),B=this.visualVariableOpacity.getOpacity(B),D=D.multiply(B));return D}}g.__decorate([h.option(n.VisualVariableColor)],z.prototype,"visualVariableColor",
void 0);g.__decorate([h.option(c.VisualVariableOpacity)],z.prototype,"visualVariableOpacity",void 0);g.__decorate([h.option(r.VisualVariableRotation)],z.prototype,"visualVariableRotation",void 0);g.__decorate([h.option(k.VisualVariableSizeMinMaxValue)],z.prototype,"visualVariableSizeMinMaxValue",void 0);g.__decorate([h.option(p.VisualVariableSizeScaleStops)],z.prototype,"visualVariableSizeScaleStops",void 0);g.__decorate([h.option(t.VisualVariableSizeStops)],z.prototype,"visualVariableSizeStops",
void 0);g.__decorate([h.option(w.VisualVariableSizeUnitValue)],z.prototype,"visualVariableSizeUnitValue",void 0);g.__decorate([h.uniform(a.MosaicInfo)],z.prototype,"mosaicInfo",void 0);g.__decorate([h.define],z.prototype,"isHaloPass",void 0);g.__decorate([h.define],z.prototype,"isBackgroundPass",void 0);g.__decorate([h.define],z.prototype,"isLabel",void 0);g.__decorate([g.__param(0,h.input(x)),g.__param(1,h.input(v))],z.prototype,"vertex",null);g.__decorate([g.__param(0,h.input(A))],z.prototype,"fragment",
null);e.TextFragmentInput=A;e.TextShader=z;e.TextVertexInput=x;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/VisualVariableRotation":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./constants ./utils".split(" "),function(e,g,q,h,m,l){class d extends q.UniformGroup{getVVRotationMat4(b){return h.ifElse(l.isNan(b),h.Mat4.identity(),()=>{var a=this._getNormalizedAngle(b).multiply(m.cDegToRad);
const f=h.sin(a);a=h.cos(a);return new h.Mat4(a,f,0,0,f.multiply(new h.Float(-1)),a,0,0,0,0,1,0,0,0,0,1)})}getVVRotationMat3(b){return h.ifElse(l.isNan(b),h.Mat3.identity(),()=>{var a=this._getNormalizedAngle(b).multiply(m.cDegToRad);const f=h.sin(a);a=h.cos(a);return new h.Mat3(a,f,0,f.multiply(new h.Float(-1)),a,0,0,0,1)})}_getNormalizedAngle(b){const a=h.equal(this.rotationType,new h.Float(m.RotationType.Arithmatic));return h.ifElse(a,(new h.Float(90)).subtract(b),b)}}g.__decorate([q.uniform(h.Float)],
d.prototype,"rotationType",void 0);e.VisualVariableRotation=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./utils ../shaders/LineShader".split(" "),function(e,g,q,h,m,l,d){class b extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.Line;this.shaders={geometry:new d.LineShader};
this.symbologyPlane=g.FeatureSymbologyDrawOrder.LINE}render(a,f){const {painter:n,pixelRatio:c}=a,r=f.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...h.resolveDynamicUniforms(a,f.target,r.uniforms),...h.getFeatureUniforms(a,f.target),antialiasingControls:l.getAntialiasingControls(c)},defines:{...h.getSelectionDefines(a)},optionalAttributes:r.optionalAttributes,useComputeBuffer:h.isHittest(a)});n.setPipelineState(h.getFeaturePipelineState(a));n.submitDraw(a,f)}}e.LineTechnique=
b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./utils ../shaders/TexturedLineShader".split(" "),function(e,g,q,h,m,l,d){class b extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.TexturedLine;this.shaders={geometry:new d.TexturedLineShader};this.symbologyPlane=g.FeatureSymbologyDrawOrder.LINE}render(a,
f){const {context:n,painter:c,pixelRatio:r}=a,k=f.instance.getInput();c.setShader({shader:this.shaders.geometry,uniforms:{...h.resolveDynamicUniforms(a,f.target,k.uniforms),...h.getFeatureUniforms(a,f.target),antialiasingControls:l.getAntialiasingControls(r),mosaicInfo:c.textureManager.getMosaicInfo(n,f.textureKey)},defines:{...h.getSelectionDefines(a)},optionalAttributes:k.optionalAttributes,useComputeBuffer:h.isHittest(a)});c.setPipelineState(h.getFeaturePipelineState(a));c.submitDraw(a,f)}}e.TexturedLineTechnique=
b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../../../../../../symbols/cim/constants ../../GraphShaderModule ../../graph/glsl ./AFeatureShader ./constants ./LineShader ./MosaicInfo ./utils".split(" "),function(e,g,q,h,m,l,d,b,a,f){class n extends b.LineVertexInput{}g.__decorate([h.location(9,m.Float)],n.prototype,"accumulatedDistance",
void 0);g.__decorate([h.location(10,m.Vec2)],n.prototype,"segmentDirection",void 0);g.__decorate([h.location(11,m.Vec4)],n.prototype,"tlbr",void 0);class c extends b.LineFragmentInput{}class r extends b.LineShader{_getLineWidthRatio(k,p){const t=new m.Float(q.dashRadius);k=f.getBit(k.bitset,d.bitsetLineScaleDash);return k.multiply(m.max(p,new m.Float(.25))).add((new m.Float(1)).subtract(k)).divide(t)}_getSDFAlpha(k){const {halfWidth:p,normal:t,tlbr:w,patternSize:u,accumulatedDistance:y,lineWidthRatio:x}=
k;k=u.x.multiply(new m.Float(2)).multiply(x);k=m.fract(y.divide(k));const v=(new m.Float(.25)).multiply(t.y).add(new m.Float(.5));k=m.mix(w.xy,w.zw,new m.Vec2(k,v));k=f.rgba2float(m.texture2D(this.mosaicInfo.texture,k)).subtract(new m.Float(.5)).multiply(p);k=m.clamp((new m.Float(.5)).subtract(k),new m.Float(0),new m.Float(1));return new m.Vec4(k)}_getPatternColor(k){const {halfWidth:p,normal:t,color:w,accumulatedDistance:u,patternSize:y,sampleAlphaOnly:x,tlbr:v}=k;k=y.y.multiply((new m.Float(2)).multiply(p).divide(y.x));
k=m.fract(u.divide(k));const A=(new m.Float(.5)).multiply(t.y).add(new m.Float(.5));k=m.mix(v.xy,v.zw,new m.Vec2(A,k));k=m.texture2D(this.mosaicInfo.texture,k);null!=this.visualVariableColor&&(k=m.ifElse(m.greaterThan(x,new m.Float(.5)),new m.Vec4(w.a),w));return k}vertex(k,p){const {segmentDirection:t,tlbr:w,bitset:u}=k,y=b.getLineVertexData(this,k),x=k.accumulatedDistance.divide(this.view.displayZoomFactor).add(m.dot(t,y.scaledOffset)),v=new m.Vec2(w.z.subtract(w.x),w.w.subtract(w.y)),A=w.divide(this.mosaicInfo.size.xyxy),
z=f.getBit(u,d.bitsetLineIsSdf),B=f.getBit(u,d.bitsetGenericConsiderAlphaOnly),D=m.ifElse(m.greaterThan(z,new m.Float(.5)),this._getLineWidthRatio(k,y.scaledHalfWidth),new m.Float(1));return{...y,tlbr:A,patternSize:v,accumulatedDistance:x,isSDF:z,sampleAlphaOnly:B,lineWidthRatio:D,...this.maybeRunHittest(k,p,y.halfWidth)}}fragment(k){const {color:p,opacity:t,isSDF:w}=k;var u=b.getLineAntialiasing(k,this.antialiasingControls.blur);const y=m.ifElse(m.greaterThan(w,new m.Float(.5)),this._getSDFAlpha(k),
this._getPatternColor(k));u=p.multiply(t).multiply(u).multiply(y);return this.getFragmentOutput(u,k)}}g.__decorate([h.uniform(a.MosaicInfo)],r.prototype,"mosaicInfo",void 0);g.__decorate([g.__param(0,h.input(n)),g.__param(1,h.input(l.BaseHittestVertexInput))],r.prototype,"vertex",null);e.TexturedLineFragmentInput=c;e.TexturedLineShader=r;e.TexturedLineVertexInput=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./MarkerShader".split(" "),
function(e,g,q,h,m,l){class d extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.Marker;this.shaders={geometry:new l.MarkerShader};this.symbologyPlane=g.FeatureSymbologyDrawOrder.MARKER}render(b,a){const {context:f,painter:n}=b,c=a.instance.getInput();n.setShader({shader:this.shaders.geometry,uniforms:{...h.resolveDynamicUniforms(b,a.target,c.uniforms),...h.getFeatureUniforms(b,a.target),mosaicInfo:n.textureManager.getMosaicInfo(f,a.textureKey,!0)},defines:{...h.getSelectionDefines(b)},
optionalAttributes:c.optionalAttributes,useComputeBuffer:h.isHittest(b)});n.setPipelineState(h.getFeaturePipelineState(b));n.submitDraw(b,a)}}e.MarkerTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader":function(){define("exports ../../../../../../../chunks/tslib.es6 ../../GraphShaderModule ../../graph/glsl ./markerConstants ../shaders/AFeatureShader ../shaders/constants ../shaders/hittestUtils ../shaders/MosaicInfo ../shaders/utils ../shaders/VisualVariableColor ../shaders/VisualVariableOpacity ../shaders/VisualVariableRotation ../shaders/VisualVariableSizeMinMaxValue ../shaders/VisualVariableSizeScaleStops ../shaders/VisualVariableSizeStops ../shaders/VisualVariableSizeUnitValue ../shaders/vvUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u){function y(D,F,E,C){return F.multiply(D.x).add(E.multiply(D.y)).add(C.multiply(D.z))}function x(D){return D.multiply(D).divide(128)}class v extends l.FeatureVertexInput{}g.__decorate([q.location(3,h.Vec4)],v.prototype,"color",void 0);g.__decorate([q.location(4,h.Vec4)],v.prototype,"outlineColor",void 0);g.__decorate([q.location(5,h.Vec2)],v.prototype,"offset",void 0);g.__decorate([q.location(6,h.Vec2)],v.prototype,"textureUV",void 0);g.__decorate([q.location(7,
h.Vec4)],v.prototype,"sizing",void 0);g.__decorate([q.location(8,h.Float)],v.prototype,"placementAngle",void 0);g.__decorate([q.location(9,h.Float)],v.prototype,"sizeRatio",void 0);g.__decorate([q.location(10,h.Vec2)],v.prototype,"zoomRange",void 0);class A extends q.ComputeVertexInput{}g.__decorate([q.location(12,h.Vec2)],A.prototype,"offsetNextVertex1",void 0);g.__decorate([q.location(13,h.Vec2)],A.prototype,"offsetNextVertex2",void 0);g.__decorate([q.location(14,h.Vec2)],A.prototype,"textureUVNextVertex1",
void 0);g.__decorate([q.location(15,h.Vec2)],A.prototype,"textureUVNextVertex2",void 0);class z extends l.FeatureFragmentInput{}class B extends l.AFeatureShader{constructor(){super(...arguments);this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(D,F){var E=x(D.sizing.x),C=x(D.sizing.y),G=x(D.sizing.z),H=D.placementAngle;const K=f.getBit(D.bitset,m.MarkerConstants.bitset.isSDF),J=f.getBit(D.bitset,m.MarkerConstants.bitset.isMapAligned);
var O=f.getBit(D.bitset,m.MarkerConstants.bitset.scaleSymbolsProportionally),Q=f.getBitBool(D.bitset,m.MarkerConstants.bitset.colorLocked),T=u.getVisualVariableOpacity(this,D.id);Q=u.getVisualVariableColor(this,D.id,D.color,Q).multiply(T);T=this.view.displayViewScreenMat3.multiply(new h.Vec3(D.pos.xy,1));G=u.getVisualVariableSize(this,D.id,G).divide(G);E=E.multiply(G);var I=D.offset.xy.multiply(G);O=C.multiply(O.multiply(G.subtract(1)).add(1));O=h.min(O,h.max(E.subtract(.99),new h.Float(0)));C=h.max(O,
new h.Float(1));O=h.min(O,new h.Float(1));H=h.Mat3.fromRotation(H.multiply(d.c256ToRad));var L=u.getVisualVariableRotation(this,D.id);H=this._getViewRotationMatrix(J).multiply(L).multiply(H).multiply(new h.Vec3(I.xy,0));I=this.clip(D.id,D.zoomRange);T=new h.Vec4(T.xy.add(H.xy),I,1);H=D.textureUV.divide(this.mosaicInfo.size);O=D.outlineColor.multiply(O);I=f.getBit(D.bitset,m.MarkerConstants.bitset.overrideOutlineColor);L=D.sizeRatio.multiply(E).multiply(.5);return{glPosition:T,color:Q,textureUV:H,
outlineColor:O,outlineSize:C,distanceToPx:L,isSDF:K,overrideOutlineColor:I,...this.maybeRunHittest(D,F,{pos:D.pos,size:E,sizeCorrection:G,isMapAligned:J,outlineSize:C,distanceToPx:L,isSDF:K})}}fragment(D){const F=this._getColor(D.textureUV,D);return this.getFragmentOutput(F,D)}hittest(D,F,E){return h.ifElse(h.lessThan(E.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(D,F,E),this._hittestMarker(D,F,E))}_getViewRotationMatrix(D){const F=this.view.displayViewMat3,E=this.view.displayMat3,
C=(new h.Float(1)).subtract(D);return F.multiply(D).add(E.multiply(C))}_getViewScreenMatrix(D){const F=this.view.viewMat3.multiply(this.view.tileMat3),E=this.view.tileMat3,C=(new h.Float(1)).subtract(D);return F.multiply(D).add(E.multiply(C))}_getColor(D,F){return h.ifElse(h.equal(F.isSDF,new h.Float(1)),this._getSDFColor(D,F),this._getSpriteColor(D,F))}_getSpriteColor(D,F){return h.texture2D(this.mosaicInfo.texture,D).multiply(F.color)}_getSDFColor(D,F){D=h.texture2D(this.mosaicInfo.texture,D);var E=
(new h.Float(.5)).subtract(f.rgba2float(D)).multiply(F.distanceToPx).multiply(d.softEdgeRatio);D=h.clamp((new h.Float(.5)).subtract(E),new h.Float(0),new h.Float(1));D=F.color.multiply(D);var C=F.outlineSize;this.highlight&&(C=h.max(C,F.overrideOutlineColor.multiply(4)));C=C.multiply(.5);E=h.abs(E).subtract(C);E=h.clamp((new h.Float(.5)).subtract(E),new h.Float(0),new h.Float(1));F=h.mix(F.outlineColor,F.color,F.overrideOutlineColor).multiply(E);return(new h.Float(1)).subtract(F.a).multiply(D).add(F)}_hittestSmallMarker(D,
F,E){const {position:C,distance:G,smallSymbolDistance:H}=this.hittestRequest;D=G.subtract(H);const {viewMat3:K,tileMat3:J}=this.view;F=K.multiply(J).multiply(new h.Vec3(E.pos,1)).xy;E=E.size.multiply(.5);return h.distance(F,C).subtract(E).add(D)}_hittestMarker(D,F,E){const {pos:C,sizeCorrection:G,isMapAligned:H}=E;var K=new h.Vec3(D.offset.multiply(G),0),J=new h.Vec3(F.offsetNextVertex1.multiply(G),0),O=new h.Vec3(F.offsetNextVertex2.multiply(G),0);const {viewMat3:Q,tileMat3:T}=this.view;var I=Q.multiply(T).multiply(new h.Vec3(C,
1)),L=this._getViewScreenMatrix(H);K=I.add(L.multiply(K)).xy;J=I.add(L.multiply(J)).xy;O=I.add(L.multiply(O)).xy;I=this.hittestRequest.distance;L=b.distPointTriangle(this.hittestRequest.position,C,J,O);return h.ifElse(h.greaterThan(L,I),L,this._hittestSamples(K,J,O,D,F,E))}_hittestSamples(D,F,E,C,G,H){const {outlineSize:K,isSDF:J,distanceToPx:O}=H;var Q=this.hittestRequest.position;const T=this.hittestRequest.distance;H=b.xyToBarycentric(Q.add(new h.Vec2(h.negate(T),h.negate(T))),D,F,E);const I=b.xyToBarycentric(Q.add(new h.Vec2(0,
h.negate(T))),D,F,E),L=b.xyToBarycentric(Q.add(new h.Vec2(T,h.negate(T))),D,F,E),R=b.xyToBarycentric(Q.add(new h.Vec2(h.negate(T),0)),D,F,E),V=b.xyToBarycentric(Q,D,F,E),S=b.xyToBarycentric(Q.add(new h.Vec2(T,0)),D,F,E),X=b.xyToBarycentric(Q.add(new h.Vec2(h.negate(T),T)),D,F,E),N=b.xyToBarycentric(Q.add(new h.Vec2(0,T)),D,F,E);D=b.xyToBarycentric(Q.add(new h.Vec2(T,T)),D,F,E);C=C.textureUV.divide(this.mosaicInfo.size);F=G.textureUVNextVertex1.divide(this.mosaicInfo.size);G=G.textureUVNextVertex2.divide(this.mosaicInfo.size);
E={color:new h.Vec4(1),outlineColor:new h.Vec4(1),overrideOutlineColor:new h.Float(1),outlineSize:K,distanceToPx:O,isSDF:J};Q=new h.Float(0);Q=Q.add(b.inTriangle(H).multiply(this._getColor(y(H,C,F,G),E).a));Q=Q.add(b.inTriangle(I).multiply(this._getColor(y(I,C,F,G),E).a));Q=Q.add(b.inTriangle(L).multiply(this._getColor(y(L,C,F,G),E).a));Q=Q.add(b.inTriangle(R).multiply(this._getColor(y(R,C,F,G),E).a));Q=Q.add(b.inTriangle(V).multiply(this._getColor(y(V,C,F,G),E).a));Q=Q.add(b.inTriangle(S).multiply(this._getColor(y(S,
C,F,G),E).a));Q=Q.add(b.inTriangle(X).multiply(this._getColor(y(X,C,F,G),E).a));Q=Q.add(b.inTriangle(N).multiply(this._getColor(y(N,C,F,G),E).a));Q=Q.add(b.inTriangle(D).multiply(this._getColor(y(D,C,F,G),E).a));return h.step(Q,new h.Float(.05)).multiply(b.failHittest(this.hittestRequest))}}g.__decorate([q.option(n.VisualVariableColor)],B.prototype,"visualVariableColor",void 0);g.__decorate([q.option(c.VisualVariableOpacity)],B.prototype,"visualVariableOpacity",void 0);g.__decorate([q.option(r.VisualVariableRotation)],
B.prototype,"visualVariableRotation",void 0);g.__decorate([q.option(k.VisualVariableSizeMinMaxValue)],B.prototype,"visualVariableSizeMinMaxValue",void 0);g.__decorate([q.option(p.VisualVariableSizeScaleStops)],B.prototype,"visualVariableSizeScaleStops",void 0);g.__decorate([q.option(t.VisualVariableSizeStops)],B.prototype,"visualVariableSizeStops",void 0);g.__decorate([q.option(w.VisualVariableSizeUnitValue)],B.prototype,"visualVariableSizeUnitValue",void 0);g.__decorate([q.uniform(a.MosaicInfo)],
B.prototype,"mosaicInfo",void 0);g.__decorate([g.__param(0,q.input(v)),g.__param(1,q.input(A))],B.prototype,"vertex",null);g.__decorate([g.__param(0,q.input(z))],B.prototype,"fragment",null);e.MarkerFragmentInput=z;e.MarkerShader=B;e.MarkerVertexInput=v;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/markers/markerConstants":function(){define(["exports"],function(e){e.MarkerConstants={bitset:{isSDF:0,isMapAligned:1,scaleSymbolsProportionally:2,
overrideOutlineColor:3,colorLocked:4}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./PieChartShader".split(" "),function(e,g,q,h,m,l){class d extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.PieChart;this.shaders={geometry:new l.PieChartShader};this.symbologyPlane=
g.FeatureSymbologyDrawOrder.MARKER}render(b,a){const {painter:f}=b,{instance:n,target:c}=a,r=this.shaders.geometry,k=n.getInput(),p=k.uniforms.numberOfFields,t=h.isHittest(b),w=h.getFeatureUniforms(b,c),u=h.getSelectionDefines(b);r.setNumberOfFields(p);f.setShader({shader:r,uniforms:{...h.resolveDynamicUniforms(b,a.target,k.uniforms.shader),...w.storage,...w.view,hittestUniforms:w.hittestRequest?{hittestDist:w.hittestRequest?.distance,hittestPos:w.hittestRequest?.position}:null},defines:{VV_SIZE_MIN_MAX_VALUE:!!k.uniforms.shader.visualVariableSizeMinMaxValue,
VV_SIZE_SCALE_STOPS:!!k.uniforms.shader.visualVariableSizeScaleStops,VV_SIZE_FIELD_STOPS:!!k.uniforms.shader.visualVariableSizeStops,VV_SIZE_UNIT_VALUE:!!k.uniforms.shader.visualVariableSizeUnitValue,VV_OPACITY:!!k.uniforms.shader.visualVariableOpacity,HITTEST:t,highlight:w.highlight?1:0,...u,numberOfFields:p},optionalAttributes:{},useComputeBuffer:t});f.setPipelineState(h.getFeaturePipelineState(b));f.submitDraw(b,a)}}e.PieChartTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader":function(){define(["exports","../../GLSLShaderModule","../../graph/glsl","../../../shaders/sources/resolver"],function(e,g,q,h){const m={hittestDist:q.Float,hittestPos:q.Vec2},l={filterFlags:q.Sampler2D,animation:q.Sampler2D,visualVariableData:q.Sampler2D,dataDriven0:q.Sampler2D,dataDriven1:q.Sampler2D,dataDriven2:q.Sampler2D,gpgpu:q.Sampler2D,size:q.Float},d={displayViewScreenMat3:q.Mat3,displayViewMat3:q.Mat3,displayMat3:q.Mat3,
viewMat3:q.Mat3,tileMat3:q.Mat3,displayZoomFactor:q.Float,requiredZoomFactor:q.Float,tileOffset:q.Vec2,currentScale:q.Float,currentZoom:q.Float,metersPerSRUnit:q.Float};class b extends g.GLSLShaderModule{constructor(){super(...arguments);this.vertexShader=h.resolveIncludes("materials/pie/pie.vert");this.fragmentShader=h.resolveIncludes("materials/pie/pie.frag");this.required={...l,...d,outlineWidth:q.Float,colors:q.FixedArray,defaultColor:q.Vec4,othersColor:q.Vec4,outlineColor:q.Vec4,donutRatio:q.Float,
sectorThreshold:q.Float};this.options={hittestUniforms:m,visualVariableSizeMinMaxValue:{minMaxValueAndSize:q.Vec4},visualVariableSizeScaleStops:{sizes:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8},values:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8}},visualVariableSizeStops:{sizes:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8},values:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8}},
visualVariableSizeUnitValue:{unitValueToPixelsRatio:q.Float},visualVariableOpacity:{opacities:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8},opacityValues:{...q.FixedArray.ofType(q.Float,8),type:"array",elementType:q.Float,size:8}}};this.locations={pos:{index:0,type:q.Vec2},id:{index:1,type:q.Vec3},bitset:{index:2,type:q.Float},offset:{index:3,type:q.Vec2},texCoords:{index:4,type:q.Vec2},size:{index:5,type:q.Vec2},referenceSize:{index:6,type:q.Float},zoomRange:{index:7,
type:q.Vec2}};this.defines={VV_SIZE_MIN_MAX_VALUE:"boolean",VV_SIZE_SCALE_STOPS:"boolean",VV_SIZE_FIELD_STOPS:"boolean",VV_SIZE_UNIT_VALUE:"boolean",VV_OPACITY:"boolean",HITTEST:"boolean",numberOfFields:"number",highlight:"boolean",inside:"boolean",outside:"boolean"}}setNumberOfFields(a){this.required.colors={...q.FixedArray.ofType(q.Vec4,a),type:"array",elementType:q.Vec4,size:a}}}e.PieChartShader=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/GLSLShaderModule":function(){define(["exports",
"../../../../../core/string","./typed/TypedShaderProgram"],function(e,g,q){class h{constructor(){this.computeAttributes={}}get locationsMap(){const m=new Map;for(const l in this.locations)m.set(l,this.locations[l].index);return m}get optionPropertyKeys(){this._optionPropertyKeys||(this._optionPropertyKeys=new Set(Object.keys(this.options)));return this._optionPropertyKeys}get _transformFeedbackBindings(){return[]}get locationInfo(){if(!this._locationInfo){const m=this.locationsMap,l=Array.from(m.entries()).map(([d,
b])=>`${d}.${b}`).join(".");this._locationInfo={hash:g.numericHash(l),locations:m,computeAttributeMap:this.computeAttributes}}return this._locationInfo}get renamedLocationsMap(){const m=new Map;for(const [l,d]of this.locationsMap.entries())m.set("a_"+l,d);return m}getShaderKey(m,l,d){const b=Object.keys(m).map(f=>`${f}.${m[f]}`).join("."),a=Object.keys(d).filter(f=>d[f]).map(f=>`${f}_${d[f].toString()}`).join(".");l=Object.keys(l).filter(f=>this.optionPropertyKeys.has(f)).join(".");return`${b}.${a}.${l}`}getProgram(m,
l,d,b){b=m="";for(const a in d)if(d[a]){const f="boolean"===typeof d[a]?`#define ${a}\n`:`#define ${a} ${d[a]}\n`;m+=f;b+=f}m+=this.vertexShader;b+=this.fragmentShader;return new q.TypedShaderProgram(m,b,this.renamedLocationsMap,this.locationInfo,this._getUniformBindings(l),this._transformFeedbackBindings)}_getUniformBindings(m){const l=[];for(var d in this.required){var b=this.required[d];l.push({uniformHydrated:null,shaderModulePath:d,uniformName:d,uniformType:b.type,uniformArrayElementType:"array"===
b.type?b.elementType?.type:void 0,uniformArrayLength:"array"===b.type?b.size:void 0})}for(const a in m)if(d=this.options[a],m[a])for(const f in d)b=d[f],l.push({uniformHydrated:null,shaderModulePath:`${a}.${f}`,uniformName:f,uniformType:b.type,uniformArrayElementType:"array"===b.type?b.elementType?.type:void 0,uniformArrayLength:"array"===b.type?b.size:void 0});return l}}e.GLSLShaderModule=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique":function(){define("exports ../../../enums ../FeatureTechnique ../featureTechniqueUtils ../TechniqueType ./TextShader".split(" "),
function(e,g,q,h,m,l){class d extends q.FeatureTechnique{constructor(){super(...arguments);this.type=m.TechniqueType.Text;this.shaders={geometry:new l.TextShader};this.symbologyPlane=g.FeatureSymbologyDrawOrder.TEXT}render(b,a){const {context:f,painter:n}=b,c=h.getSelectionDefines(b);var r=a.instance.getInput();r={shader:this.shaders.geometry,uniforms:{...h.resolveDynamicUniforms(b,a.target,r.uniforms),...h.getFeatureUniforms(b,a.target),mosaicInfo:n.textureManager.getMosaicInfo(f,a.textureKey)},
defines:{...c,isHaloPass:!1,isBackgroundPass:!0,isLabel:!1},optionalAttributes:r.optionalAttributes,useComputeBuffer:h.isHittest(b)};n.setShader(r);n.setPipelineState(h.getFeaturePipelineState(b));n.submitDraw(b,a);n.setShader({...r,defines:{...c,isHaloPass:!0,isBackgroundPass:!1,isLabel:!1}});n.submitDraw(b,a);n.setShader({...r,defines:{...c,isHaloPass:!1,isBackgroundPass:!1,isLabel:!1}});n.submitDraw(b,a)}}e.TextTechnique=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry":function(){define("exports ../TechniqueType ../dotDensity/DotDensityMeshWriter ../fill/ComplexFillMeshWriter ../fill/ComplexOutlineFillMeshWriter ../fill/FillMeshWriter ../fill/OutlineFillMeshWriter ../fill/PatternFillMeshWriter ../fill/PatternOutlineFillMeshWriter ../heatmap/HeatmapMeshWriter ../labels/LabelMeshWriter ../line/LineMeshWriter ../line/TexturedLineMeshWriter ../markers/MarkerMeshWriter ./MeshWriterInputEvaluator ../pieChart/PieChartMeshWriter ../text/TextMeshWriter".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w){class u{async createMeshWriter(y,x,v,A){const z=this._getMeshWriter(A.techniqueType);y=await p.MeshWriterInputEvaluator.create(y,x,A.inputParams);v=new z(A.id,y,A.optionalAttributes,v);await v.loadDependencies();return v}_getMeshWriter(y){switch(y){case g.TechniqueType.Fill:return l.FillMeshWriter;case g.TechniqueType.DotDensity:return q.DotDensityMeshWriter;case g.TechniqueType.ComplexFill:return h.ComplexFillMeshWriter;case g.TechniqueType.PatternFill:return b.PatternFillMeshWriter;
case g.TechniqueType.OutlineFill:return d.OutlineFillMeshWriter;case g.TechniqueType.PatternOutlineFill:return a.PatternOutlineFillMeshWriter;case g.TechniqueType.ComplexOutlineFill:return m.ComplexOutlineFillMeshWriter;case g.TechniqueType.Marker:return k.MarkerMeshWriter;case g.TechniqueType.PieChart:return t.PieChartMeshWriter;case g.TechniqueType.Text:return w.TextMeshWriter;case g.TechniqueType.Line:return c.LineMeshWriter;case g.TechniqueType.TexturedLine:return r.TexturedLineMeshWriter;case g.TechniqueType.Heatmap:return f.HeatmapMeshWriter;
case g.TechniqueType.Label:return n.LabelMeshWriter;case g.TechniqueType.Test:throw Error("Internal Error: Found invalid mesh writer");}}}e.MeshWriterRegistry=u;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter":function(){define(["exports","../fill/AFillMeshWriter","../../../../../../webgl/enums"],function(e,g,q){const h={createComputedParams:l=>l,optionalAttributes:{},attributes:{id:{type:q.DataType.UNSIGNED_BYTE,
count:3,pack:"id"},bitset:{type:q.DataType.UNSIGNED_BYTE,count:1},pos:{type:q.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},inverseArea:{type:q.DataType.FLOAT,count:1,packTessellation:({inverseArea:l})=>l}}};class m extends g.AFillMeshWriter{constructor(){super(...arguments);this.vertexSpec=h}createTesselationParams(l){return{inverseArea:1/l.readGeometryArea()}}}e.DotDensityMeshWriter=m;e.dotDensityVertexSpec=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter":function(){define(["exports",
"../../../../../../../core/has","../../../../../../../geometry/libtess","../../../mesh/templates/templateUtils","../mesh/MeshWriter"],function(e,g,q,h,m){const l=g("featurelayer-fast-triangulation-enabled");class d extends m.MeshWriter{async loadDependencies(){await Promise.all([super.loadDependencies(),q.loadLibtess()])}_write(b,a,f){f=f?.asOptimized()??a.readGeometryForDisplay();if(f=this._clip(f))b.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(b,a,f),b.recordEnd()}_clip(b){return b?
h.clipMarshall(b,this.hasEffects?256:8):null}_writeGeometry(b,a,f){const n=100<f.maxLength,c=[],r=this.createTesselationParams(a);!n&&l&&h.triangulate(c,f)?c.length&&this._writeVertices(b,a,f.coords,r,c):(f=h.triangulateLibtess(f),this._writeVertices(b,a,f,r))}_writeVertices(b,a,f,n,c){const r=a.getDisplayId();a=b.vertexCount();const k=this.hasEffects;let p=0;if(c)for(var t of c){c=f[2*t];var w=f[2*t+1];k&&b.recordBounds(c,w,0,0);this._writeVertex(b,r,c,w,n);p++}else for(t=0;t<f.length;t+=2)c=Math.round(f[t]),
w=Math.round(f[t+1]),k&&b.recordBounds(c,w,0,0),this._writeVertex(b,r,c,w,n),p++;b.indexEnsureSize(p);for(f=0;f<p;f++)b.indexWrite(f+a)}}e.AFillMeshWriter=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/libtess":function(){define(["require","exports","../assets","../core/has"],function(e,g,q,h){async function m(){d=await (h("esri-csp-restrictions")?await (new Promise((b,a)=>e(["../chunks/libtess-asm"],b,a))).then(b=>b.libtessAsm):await (new Promise((b,a)=>e(["../chunks/libtess"],
b,a))).then(b=>b.libtess)).default({locateFile:b=>q.getAssetUrl(`esri/core/libs/libtess/${b}`)})}let l=null,d=null;g.loadLibtess=async function(){l||=m();return l};g.triangulate=function(b,a){return d.triangulate(b,a,Math.max(b.length,128E3))};Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/mesh/templates/templateUtils":function(){define("exports ../../../../../../chunks/earcut ../../../../../../geometry/libtess ../../../../../../geometry/support/TileClipper ../../../../../../layers/graphics/OptimizedGeometry ../../definitions ../bufcut".split(" "),
function(e,g,q,h,m,l,d){function b(c,r,k){let p=0;for(let t=1;t<k;t++)p+=(c[2*(r+t)]-c[2*(r+t-1)])*(c[2*(r+t)+1]+c[2*(r+t-1)+1]);return p}function a(c,r,k,p,t){let w=0;for(;k<p;k+=3){const u=2*(c[k]-t),y=2*(c[k+1]-t),x=2*(c[k+2]-t);w+=Math.abs((r[u]-r[x])*(r[y+1]-r[u+1])-(r[u]-r[y])*(r[x+1]-r[u+1]))}return w}const f=new h.TileClipper(0,0,0,1,0),n=new h.TileClipper(0,0,0,1,0);f.setExtent(l.tileSize);n.setExtent(l.tileSize);e.area=b;e.clipLinesMarshall=function(c,r){n.setPixelMargin(r);const k=-r;r=
l.tileSize+r;let p=[];var t=!1;if(!c.nextPath())return null;let w=!0;for(;w;){c.seekPathStart();const u=[];if(!c.pathSize)return null;n.reset(h.GeometryType.LineString);c.nextPoint();let y=c.x,x=c.y;if(t)n.moveTo(y,x);else{if(y<k||y>r||x<k||x>r){t=!0;continue}u.push({x:y,y:x})}let v=!1;for(;c.nextPoint();)if(y=c.x,x=c.y,t)n.lineTo(y,x);else{if(y<k||y>r||x<k||x>r){v=!0;break}u.push({x:y,y:x})}if(v)t=!0;else{if(t){if(t=n.resultWithStarts())for(const A of t)p.push(A)}else p.push({line:u,start:0});w=
c.nextPath();t=!1}}p=p.filter(u=>1<u.line.length);return 0===p.length?null:p};e.clipMarshall=function(c,r){if(null==c)return null;a:{var k=l.tileSize+128;var p=0;for(var t=0;t<c.lengths.length;t++){var w=c.lengths[t];for(var u=0;u<w;u++){const y=c.coords[2*(u+p)],x=c.coords[2*(u+p)+1];if(-128>y||y>k||-128>x||x>k){k=!0;break a}}p+=w}k=!1}if(!k)return c;f.setPixelMargin(r);f.reset(h.GeometryType.Polygon);r=0;for(k=0;k<c.lengths.length;k++){p=c.lengths[k];t=c.coords[2*(0+r)];w=c.coords[2*(0+r)+1];f.moveTo(t,
w);for(u=1;u<p;u++)t=c.coords[2*(u+r)],w=c.coords[2*(u+r)+1],f.lineTo(t,w);f.close();r+=p}k=f.result(!1);if(!k)return null;c=[];r=[];for(const y of k){k=0;for(const x of y)r.push(x.x),r.push(x.y),k++;c.push(k)}return new m(c,r)};e.triangleAreaArray=a;e.triangulate=function(c,r){const {coords:k,lengths:p,hasIndeterminateRingOrder:t}=r;if(t)return!1;r=0;for(var w=0;w<p.length;){let x=w,v=p[w];w=b(k,r,v);for(var u=[];++x<p.length;){var y=p[x];const A=b(k,r+v,y);if(!(0<A))break;w+=A;u.push(r+v);v+=y}y=
c.length;d.bufcut(c,k,r,r+v,u,2,0);u=a(c,k,y,c.length,0);w=Math.abs(w);if(1E-5<Math.abs((u-w)/Math.max(1E-7,w)))return c.length=0,!1;w=x;r+=v}return!0};e.triangulateEarcut=function(c,r,k){const {coords:p,lengths:t,hasIndeterminateRingOrder:w}=r;if(w)return!1;let u=0;for(var y=0;y<t.length;){let v=y,A=t[y];for(y=[];++v<t.length;){var x=t[v];if(!(0<b(p,u+A,x)))break;y.push(u+A-u);A+=x}x=r.coords.slice(2*u,2*(u+A));y=g.earcut(x,y,2);for(const z of y)c.push(z+k+u);y=v;u+=A}return!0};e.triangulateLibtess=
function(c){const {coords:r,lengths:k}=c;({buffer:c}=q.triangulate(r,k));return c};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/chunks/earcut":function(){define(["exports","./_commonjsHelpers"],function(e,g){var q={exports:{}};(function(h){(function(m){m=m();void 0!==m&&(h.exports=m)})(function(){function m(F,E,C){C=C||2;var G=E&&E.length,H=G?E[0]*C:F.length,K=l(F,0,H,C,!0),J=[];if(!K||K.next===K.prev)return J;var O;if(G){var Q=K;var T=C;K=[];var I;G=0;for(I=E.length;G<I;G++){var L=
E[G]*T;var R=G<I-1?E[G+1]*T:F.length;L=l(F,L,R,T,!1);L===L.next&&(L.steiner=!0);R=K;var V=R.push,S=L,X=L;do{if(S.x<X.x||S.x===X.x&&S.y<X.y)X=S;S=S.next}while(S!==L);V.call(R,X)}K.sort(f);for(G=0;G<K.length;G++)T=K[G],E=Q,(Q=c(T,E))?(I=v(Q,T),T=d(Q,Q.next),I=n(I),d(I,I.next),T=n(T),Q=n(E===Q?T:E)):Q=E,Q=d(Q,Q.next);K=Q}if(F.length>80*C){var N=O=F[0];var P=G=F[1];for(T=C;T<H;T+=C)E=F[T],Q=F[T+1],E<N&&(N=E),Q<P&&(P=Q),E>O&&(O=E),Q>G&&(G=Q);O=Math.max(O-N,G-P);O=0!==O?1/O:0}b(K,J,C,N,P,O);return J}function l(F,
E,C,G,H){if(H===0<D(F,E,C,G))for(H=E;H<C;H+=G)var K=A(H,F[H],F[H+1],K);else for(H=C-G;H>=E;H-=G)K=A(H,F[H],F[H+1],K);K&&t(K,K.next)&&(F=K.next,z(K),K=F);return K}function d(F,E){if(!F)return F;E||=F;do{var C=!1;if(F.steiner||!t(F,F.next)&&0!==p(F.prev,F,F.next))F=F.next;else{E=F.prev;z(F);F=E;if(F===F.next)break;C=!0}}while(C||F!==E);return E}function b(F,E,C,G,H,K,J){if(F){if(!J&&K){var O=F,Q=O;do null===Q.z&&(Q.z=r(Q.x,Q.y,G,H,K)),Q.prevZ=Q.prev,Q=Q.nextZ=Q.next;while(Q!==O);Q.prevZ.nextZ=null;
Q.prevZ=null;O=Q;var T,I,L,R,V=1;do{Q=O;var S=O=null;for(I=0;Q;){I++;var X=Q;for(T=L=0;T<V&&(L++,X=X.nextZ,X);T++);for(R=V;0<L||0<R&&X;)0!==L&&(0===R||!X||Q.z<=X.z)?(T=Q,Q=Q.nextZ,L--):(T=X,X=X.nextZ,R--),S?S.nextZ=T:O=T,T.prevZ=S,S=T;Q=X}S.nextZ=null;V*=2}while(1<I)}for(O=F;F.prev!==F.next;){Q=F.prev;X=F.next;if(K)S=a(F,G,H,K);else a:if(S=F,I=S.prev,L=S,V=S.next,0<=p(I,L,V))S=!1;else{for(T=S.next.next;T!==S.prev;){if(k(I.x,I.y,L.x,L.y,V.x,V.y,T.x,T.y)&&0<=p(T.prev,T,T.next)){S=!1;break a}T=T.next}S=
!0}if(S)E.push(Q.i/C),E.push(F.i/C),E.push(X.i/C),z(F),O=F=X.next;else if(F=X,F===O){if(!J)b(d(F),E,C,G,H,K,1);else if(1===J){F=d(F);J=E;O=C;Q=F;do X=Q.prev,S=Q.next.next,!t(X,S)&&w(X,Q,Q.next,S)&&x(X,S)&&x(S,X)&&(J.push(X.i/O),J.push(Q.i/O),J.push(S.i/O),z(Q),z(Q.next),Q=F=S),Q=Q.next;while(Q!==F);F=d(Q);b(F,E,C,G,H,K,2)}else if(2===J)a:{J=F;do{for(O=J.next.next;O!==J.prev;){if(Q=J.i!==O.i){S=S=S=S=void 0;Q=J;X=O;if(S=Q.next.i!==X.i&&Q.prev.i!==X.i){b:{S=Q;do{if(S.i!==Q.i&&S.next.i!==Q.i&&S.i!==
X.i&&S.next.i!==X.i&&w(S,S.next,Q,X)){S=!0;break b}S=S.next}while(S!==Q);S=!1}S=!S}if(S){if(S=x(Q,X)&&x(X,Q)){S=Q;I=!1;L=(Q.x+X.x)/2;V=(Q.y+X.y)/2;do S.y>V!==S.next.y>V&&S.next.y!==S.y&&L<(S.next.x-S.x)*(V-S.y)/(S.next.y-S.y)+S.x&&(I=!I),S=S.next;while(S!==Q);S=I}S=S&&(p(Q.prev,Q,X.prev)||p(Q,X.prev,X))||t(Q,X)&&0<p(Q.prev,Q,Q.next)&&0<p(X.prev,X,X.next)}Q=S}if(Q){F=v(J,O);J=d(J,J.next);F=d(F,F.next);b(J,E,C,G,H,K);b(F,E,C,G,H,K);break a}O=O.next}J=J.next}while(J!==F)}break}}}}function a(F,E,C,G){var H=
F.prev,K=F.next;if(0<=p(H,F,K))return!1;var J=H.x>F.x?H.x>K.x?H.x:K.x:F.x>K.x?F.x:K.x,O=H.y>F.y?H.y>K.y?H.y:K.y:F.y>K.y?F.y:K.y,Q=r(H.x<F.x?H.x<K.x?H.x:K.x:F.x<K.x?F.x:K.x,H.y<F.y?H.y<K.y?H.y:K.y:F.y<K.y?F.y:K.y,E,C,G);E=r(J,O,E,C,G);C=F.prevZ;for(G=F.nextZ;C&&C.z>=Q&&G&&G.z<=E;){if(C!==F.prev&&C!==F.next&&k(H.x,H.y,F.x,F.y,K.x,K.y,C.x,C.y)&&0<=p(C.prev,C,C.next))return!1;C=C.prevZ;if(G!==F.prev&&G!==F.next&&k(H.x,H.y,F.x,F.y,K.x,K.y,G.x,G.y)&&0<=p(G.prev,G,G.next))return!1;G=G.nextZ}for(;C&&C.z>=
Q;){if(C!==F.prev&&C!==F.next&&k(H.x,H.y,F.x,F.y,K.x,K.y,C.x,C.y)&&0<=p(C.prev,C,C.next))return!1;C=C.prevZ}for(;G&&G.z<=E;){if(G!==F.prev&&G!==F.next&&k(H.x,H.y,F.x,F.y,K.x,K.y,G.x,G.y)&&0<=p(G.prev,G,G.next))return!1;G=G.nextZ}return!0}function f(F,E){return F.x-E.x}function n(F){if(F.next.prev===F)return F;let E=F;do{const C=E.next;if(C.prev===E||C===E||C===F)break;E=C}while(1);return E}function c(F,E){var C=E,G=F.x,H=F.y,K=-Infinity;do{if(H<=C.y&&H>=C.next.y&&C.next.y!==C.y){var J=C.x+(H-C.y)*
(C.next.x-C.x)/(C.next.y-C.y);if(J<=G&&J>K){K=J;if(J===G){if(H===C.y)return C;if(H===C.next.y)return C.next}var O=C.x<C.next.x?C:C.next}}C=C.next}while(C!==E);if(!O)return null;if(G===K)return O;E=O;J=O.x;var Q=O.y,T=Infinity;C=O;do{if(G>=C.x&&C.x>=J&&G!==C.x&&k(H<Q?G:K,H,J,Q,H<Q?K:G,H,C.x,C.y)){var I=Math.abs(H-C.y)/(G-C.x);var L;if((L=x(C,F))&&!(L=I<T)&&(L=I===T)&&!(L=C.x>O.x)&&(L=C.x===O.x)){L=O;var R=C;L=0>p(L.prev,L,R.prev)&&0>p(R.next,L,L.next)}L&&(O=C,T=I)}C=C.next}while(C!==E);return O}function r(F,
E,C,G,H){F=32767*(F-C)*H;E=32767*(E-G)*H;F=(F|F<<8)&16711935;F=(F|F<<4)&252645135;F=(F|F<<2)&858993459;E=(E|E<<8)&16711935;E=(E|E<<4)&252645135;E=(E|E<<2)&858993459;return(F|F<<1)&1431655765|((E|E<<1)&1431655765)<<1}function k(F,E,C,G,H,K,J,O){return 0<=(H-J)*(E-O)-(F-J)*(K-O)&&0<=(F-J)*(G-O)-(C-J)*(E-O)&&0<=(C-J)*(K-O)-(H-J)*(G-O)}function p(F,E,C){return(E.y-F.y)*(C.x-E.x)-(E.x-F.x)*(C.y-E.y)}function t(F,E){return F.x===E.x&&F.y===E.y}function w(F,E,C,G){var H=y(p(F,E,C)),K=y(p(F,E,G)),J=y(p(C,
G,F)),O=y(p(C,G,E));return H!==K&&J!==O||0===H&&u(F,C,E)||0===K&&u(F,G,E)||0===J&&u(C,F,G)||0===O&&u(C,E,G)?!0:!1}function u(F,E,C){return E.x<=Math.max(F.x,C.x)&&E.x>=Math.min(F.x,C.x)&&E.y<=Math.max(F.y,C.y)&&E.y>=Math.min(F.y,C.y)}function y(F){return 0<F?1:0>F?-1:0}function x(F,E){return 0>p(F.prev,F,F.next)?0<=p(F,E,F.next)&&0<=p(F,F.prev,E):0>p(F,E,F.prev)||0>p(F,F.next,E)}function v(F,E){var C=new B(F.i,F.x,F.y),G=new B(E.i,E.x,E.y),H=F.next,K=E.prev;F.next=E;E.prev=F;C.next=H;H.prev=C;G.next=
C;C.prev=G;K.next=G;G.prev=K;return G}function A(F,E,C,G){F=new B(F,E,C);G?(F.next=G.next,F.prev=G,G.next.prev=F,G.next=F):(F.prev=F,F.next=F);return F}function z(F){F.next.prev=F.prev;F.prev.next=F.next;F.prevZ&&(F.prevZ.nextZ=F.nextZ);F.nextZ&&(F.nextZ.prevZ=F.prevZ)}function B(F,E,C){this.i=F;this.x=E;this.y=C;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function D(F,E,C,G){for(var H=0,K=C-G;E<C;E+=G)H+=(F[K]-F[E])*(F[E+1]+F[K+1]),K=E;return H}m.deviation=function(F,E,
C,G){var H=E&&E.length,K=Math.abs(D(F,0,H?E[0]*C:F.length,C));if(H){H=0;for(var J=E.length;H<J;H++)K-=Math.abs(D(F,E[H]*C,H<J-1?E[H+1]*C:F.length,C))}for(H=E=0;H<G.length;H+=3){J=G[H]*C;var O=G[H+1]*C,Q=G[H+2]*C;E+=Math.abs((F[J]-F[Q])*(F[O+1]-F[J+1])-(F[J]-F[O])*(F[Q+1]-F[J+1]))}return 0===K&&0===E?0:Math.abs((E-K)/K)};m.flatten=function(F){for(var E=F[0][0].length,C={vertices:[],holes:[],dimensions:E},G=0,H=0;H<F.length;H++){for(var K=0;K<F[H].length;K++)for(var J=0;J<E;J++)C.vertices.push(F[H][K][J]);
0<H&&(G+=F[H-1].length,C.holes.push(G))}return C};return m})})(q);g=g.getDefaultExportFromCjs(q.exports);e.earcut=g})},"esri/views/2d/engine/webgl/mesh/bufcut":function(){define(["exports"],function(e){function g(v,A,z,B,D,F,E){let C;z=0;for(let G=B,H=D-F;G<D;G+=F)z+=(v[H+A*F]-v[G+A*F])*(v[G+1+A*F]+v[H+1+A*F]),H=G;if(E===0<z)for(;B<D;B+=F)C=l(B+A*F,v[B+A*F],v[B+1+A*F],C);else for(D-=F;D>=B;D-=F)C=l(D+A*F,v[D+A*F],v[D+1+A*F],C);C&&p(C,C.next)&&(d(C),C=C.next);return C}function q(v,A=v){if(!v)return v;
let z;do if(z=!1,v.steiner||!p(v,v.next)&&0!==f(v.prev,v,v.next))v=v.next;else{d(v);v=A=v.prev;if(v===v.next)break;z=!0}while(z||v!==A);return A}function h(v,A,z,B,D,F,E,C){if(v){!C&&F&&(v=a(v,B,D,F));for(var G=v;v.prev!==v.next;){var H=v.prev,K=v.next;if(F)var J=m(v,B,D,F);else a:{J=v;var O=J.prev,Q=J;const T=J.next;if(0<=f(O,Q,T)){J=!1;break a}let I=J.next.next;const L=I;let R=0;for(;I!==J.prev&&(0===R||I!==L);){R++;if(c(O.x,O.y,Q.x,Q.y,T.x,T.y,I.x,I.y)&&0<=f(I.prev,I,I.next)){J=!1;break a}I=I.next}J=
!0}if(J)A.push(H.index/z+E),A.push(v.index/z+E),A.push(K.index/z+E),d(v),G=v=K.next;else if(v=K,v===G){if(!C)h(q(v),A,z,B,D,F,E,1);else if(1===C){C=A;G=z;H=E;K=v;do J=K.prev,O=K.next.next,!p(J,O)&&n(J,K,K.next,O)&&r(J,O)&&r(O,J)&&(C.push(J.index/G+H),C.push(K.index/G+H),C.push(O.index/G+H),d(K),d(K.next),K=v=O),K=K.next;while(K!==v);v=K;h(v,A,z,B,D,F,E,2)}else if(2===C)a:{C=v;do{for(G=C.next.next;G!==C.prev;){if(H=C.index!==G.index){J=J=J=void 0;H=C;K=G;if(J=H.next.index!==K.index&&H.prev.index!==
K.index){b:{J=H;do{if(J.index!==H.index&&J.next.index!==H.index&&J.index!==K.index&&J.next.index!==K.index&&n(J,J.next,H,K)){J=!0;break b}J=J.next}while(J!==H);J=!1}J=!J}if(J=J&&r(H,K)&&r(K,H)){J=H;O=!1;Q=(H.x+K.x)/2;K=(H.y+K.y)/2;do J.y>K!==J.next.y>K&&J.next.y!==J.y&&Q<(J.next.x-J.x)*(K-J.y)/(J.next.y-J.y)+J.x&&(O=!O),J=J.next;while(J!==H);J=O}H=J}if(H){v=w(C,G);C=q(C,C.next);v=q(v,v.next);h(C,A,z,B,D,F,E,0);h(v,A,z,B,D,F,E,0);break a}G=G.next}C=C.next}while(C!==v)}break}}}}function m(v,A,z,B){const D=
v.prev,F=v.next;if(0<=f(D,v,F))return!1;const E=D.x>v.x?D.x>F.x?D.x:F.x:v.x>F.x?v.x:F.x,C=D.y>v.y?D.y>F.y?D.y:F.y:v.y>F.y?v.y:F.y,G=k(D.x<v.x?D.x<F.x?D.x:F.x:v.x<F.x?v.x:F.x,D.y<v.y?D.y<F.y?D.y:F.y:v.y<F.y?v.y:F.y,A,z,B);A=k(E,C,A,z,B);z=v.prevZ;for(B=v.nextZ;z&&z.z>=G&&B&&B.z<=A;){if(z!==v.prev&&z!==v.next&&c(D.x,D.y,v.x,v.y,F.x,F.y,z.x,z.y)&&0<=f(z.prev,z,z.next))return!1;z=z.prevZ;if(B!==v.prev&&B!==v.next&&c(D.x,D.y,v.x,v.y,F.x,F.y,B.x,B.y)&&0<=f(B.prev,B,B.next))return!1;B=B.nextZ}for(;z&&z.z>=
G;){if(z!==v.prev&&z!==v.next&&c(D.x,D.y,v.x,v.y,F.x,F.y,z.x,z.y)&&0<=f(z.prev,z,z.next))return!1;z=z.prevZ}for(;B&&B.z<=A;){if(B!==v.prev&&B!==v.next&&c(D.x,D.y,v.x,v.y,F.x,F.y,B.x,B.y)&&0<=f(B.prev,B,B.next))return!1;B=B.nextZ}return!0}function l(v,A,z,B){v=u.create(v,A,z);B?(v.next=B.next,v.prev=B,B.next.prev=v,B.next=v):(v.prev=v,v.next=v);return v}function d(v){v.next.prev=v.prev;v.prev.next=v.next;v.prevZ&&(v.prevZ.nextZ=v.nextZ);v.nextZ&&(v.nextZ.prevZ=v.prevZ)}function b(v,A){let z=A;const B=
v.x,D=v.y;let F=-Infinity,E;do{if(D<=z.y&&D>=z.next.y&&z.next.y!==z.y){var C=z.x+(D-z.y)*(z.next.x-z.x)/(z.next.y-z.y);if(C<=B&&C>F){F=C;if(C===B){if(D===z.y)return z;if(D===z.next.y)return z.next}E=z.x<z.next.x?z:z.next}}z=z.next}while(z!==A);if(!E)return null;if(B===F)return E.prev;A=E;C=E.x;const G=E.y;let H=Infinity,K;for(z=E.next;z!==A;)B>=z.x&&z.x>=C&&B!==z.x&&c(D<G?B:F,D,C,G,D<G?F:B,D,z.x,z.y)&&(K=Math.abs(D-z.y)/(B-z.x),(K<H||K===H&&z.x>E.x)&&r(z,v)&&(E=z,H=K)),z=z.next;return E}function a(v,
A,z,B){for(var D;D!==v;D=D.next){D=D||v;null===D.z&&(D.z=k(D.x,D.y,A,z,B));if(D.prev.next!==D||D.next.prev!==D)return D.prev.next=D,D.next.prev=D,a(v,A,z,B);D.prevZ=D.prev;D.nextZ=D.next}v.prevZ.nextZ=null;v.prevZ=null;a:for(z=1;;){B=v;A=v=null;let F=0;for(;B;){F++;D=B;let E=0;for(;E<z&&D;E++)D=D.nextZ;let C=z;for(;0<E||0<C&&D;){let G;0===E?(G=D,D=D.nextZ,C--):0!==C&&D?B.z<=D.z?(G=B,B=B.nextZ,E--):(G=D,D=D.nextZ,C--):(G=B,B=B.nextZ,E--);A?A.nextZ=G:v=G;G.prevZ=A;A=G}B=D}A.nextZ=null;z*=2;if(2>F)break a}return v}
function f(v,A,z){return(A.y-v.y)*(z.x-A.x)-(A.x-v.x)*(z.y-A.y)}function n(v,A,z,B){return p(v,A)&&p(z,B)||p(v,B)&&p(z,A)?!0:0<f(v,A,z)!==0<f(v,A,B)&&0<f(z,B,v)!==0<f(z,B,A)}function c(v,A,z,B,D,F,E,C){return 0<=(D-E)*(A-C)-(v-E)*(F-C)&&0<=(v-E)*(B-C)-(z-E)*(A-C)&&0<=(z-E)*(F-C)-(D-E)*(B-C)}function r(v,A){return 0>f(v.prev,v,v.next)?0<=f(v,A,v.next)&&0<=f(v,v.prev,A):0>f(v,A,v.prev)||0>f(v,v.next,A)}function k(v,A,z,B,D){v=32767*(v-z)*D;A=32767*(A-B)*D;v=(v|v<<8)&16711935;v=(v|v<<4)&252645135;v=
(v|v<<2)&858993459;A=(A|A<<8)&16711935;A=(A|A<<4)&252645135;A=(A|A<<2)&858993459;return(v|v<<1)&1431655765|((A|A<<1)&1431655765)<<1}function p(v,A){return v.x===A.x&&v.y===A.y}function t(v,A){return v.x-A.x}function w(v,A){const z=u.create(v.index,v.x,v.y),B=u.create(A.index,A.x,A.y),D=v.next,F=A.prev;v.next=A;A.prev=v;z.next=D;D.prev=z;B.next=z;z.prev=B;F.next=B;B.prev=F;return B}class u{constructor(){this.y=this.x=this.index=0;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}static create(v,
A,z){const B=x<y.length?y[x++]:new u;B.index=v;B.x=A;B.y=z;B.prev=null;B.next=null;B.z=null;B.prevZ=null;B.nextZ=null;B.steiner=!1;return B}}const y=[];let x=0;for(let v=0;8096>v;v++)y.push(new u);e.bufcut=function(v,A,z,B,D,F,E){x=0;var C=(B-z)*F,G=D&&D.length;const H=G?(D[0]-z)*F:C;var K=g(A,z,B,0,H,F,!0);if(K&&K.next!==K.prev){var J;if(G){const L=[];for(let R=0,V=D.length;R<V;R++){const S=g(A,z,B,D[R]*F,R<V-1?D[R+1]*F:B*F,F,!1);S===S.next&&(S.steiner=!0);G=L;var O=G.push;let X=S,N=S;do{if(X.x<
N.x||X.x===N.x&&X.y<N.y)N=X;X=X.next}while(X!==S);O.call(G,N)}L.sort(t);for(var Q of L)if(B=Q,D=b(B,K))B=w(D,B),q(B,B.next),K=q(D,D.next)}if(C>80*F){var T=C=A[z*F];var I=J=A[1+z*F];for(Q=F;Q<H;Q+=F)B=A[Q+z*F],D=A[Q+1+z*F],T=Math.min(T,B),I=Math.min(I,D),C=Math.max(C,B),J=Math.max(J,D);J=Math.max(C-T,J-I);J=0!==J?1/J:0}h(K,v,F,T,I,J,E,0)}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter":function(){define(["exports",
"../../../../../../../geometry/GeometryCursor","../../../../../../../symbols/cim/effects/CIMEffectHelper","./loadGeometryEngine","./MeshWriterVertexPack"],function(e,g,q,h,m){class l{constructor(d,b,a,f){this._instanceId=d;this._evaluator=b;this._enabledOptionalAttributes=a;this._viewParams=f;this._evaluator.evaluator=n=>this.vertexSpec.createComputedParams(n)}get _vertexPack(){if(!this._cachedVertexPack){const d=m.MeshWriterVertexPack.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);
this._evaluator.hasDynamicProperties||d.pack(this._evaluator.evaluatedMeshParams,this._viewParams);this._cachedVertexPack=d}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}setReferences(d){this._references=d}getBoundsInfo(){return null}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){var d;
a:{if(d=this._evaluator.inputMeshParams.effects?.effectInfos)for(const b of d)switch(b.effect.type){case "CIMGeometricEffectBuffer":case "CIMGeometricEffectOffset":case "CIMGeometricEffectDonut":d=!0;break a}d=!1}d&&await h.loadGeometryEngine()}enqueueRequest(d,b,a){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(d,b,a)}write(d,b,a,f,n){this.ensurePacked(b,a,f);if((b=this.evaluatedMeshParams.effects)&&0!==b.length){if(f=a.readGeometryForDisplay()?.clone()){f=g.GeometryCursor.fromOptimizedCIM(f,
a.geometryType);var c=h.getGeometryEngine();f.invertY();for(b=q.CIMEffectHelper.executeEffects(b,f,d.id||"",c);f=b.next();)f.invertY(),this._write(d,a,f,n)}}else this._write(d,a,void 0,n)}ensurePacked(d,b,a){this._evaluator.hasDynamicProperties&&(d=this._evaluator.evaluateMeshParams(d,b,a),this._vertexPack.pack(d,this._viewParams))}_writeVertex(d,b,a,f,n){this._vertexPack.writeVertex(d,b,a,f,this.evaluatedMeshParams,n)}}e.MeshWriter=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/loadGeometryEngine":function(){define(["require","exports"],function(e,g){let q=null;g.getGeometryEngine=function(){return q};g.loadGeometryEngine=async function(){q=await new Promise((h,m)=>e(["../../../../../../../geometry/geometryEngineJSON"],h,m))};Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack":function(){define(["exports","../../../number","./AlignedVertexSpec",
"./dataViewUtils"],function(e,g,q,h){class m{static fromVertexSpec(l,d){l=q.AlignedVertexSpec.fromVertexSpec(l,d);return new m(l)}constructor(l){this._spec=l;this._packed=new Uint8Array(this._spec.stride*this._spec.packVertexCount);this._packedU32View=new Uint32Array(this._packed.buffer);this._dataView=new DataView(this._packed.buffer)}get attributeLayout(){return this._spec.attributeLayout}get stride(){return this._spec.stride}writeVertex(l,d,b,a,f,n){for(let k=0;k<this._spec.packVertexCount;k++){const p=
k*this._spec.stride;this._packPosition(b,a,p);this._packId(d,p);var c=this._spec.bitset;if(n){if(c.packTessellation){var r=c.packTessellation(n,f);this._pack(r,c,p)}for(const t of this._spec.standardAttributes)if(null!=t.packTessellation)c=t.packTessellation(n,f),this._pack(c,t,p);else if(t.packAlternating?.packTessellation)for(c=t.packAlternating.packTessellation(n,f),r=0;r<this._spec.packVertexCount;r++)this._pack(c[r],t,r*this._spec.stride)}}l.vertexWriteRegion(this._packedU32View)}pack(l,d){for(const f of this._spec.standardAttributes)if(f.pack&&
"string"!==typeof f.pack){var b=f.pack(l,d);for(var a=0;a<this._spec.packVertexCount;a++)this._pack(b,f,a*this._spec.stride)}else if(f.packAlternating?.pack)for(b=f.packAlternating.pack(l,d),a=0;a<this._spec.packVertexCount;a++)this._pack(b[a],f,a*this._spec.stride)}_packPosition(l,d,b){const {offset:a}=this._spec.position,f=this._spec.position.packPrecisionFactor??1;l=g.i1616to32(l*f,d*f);this._dataView.setUint32(b+a,l,!0)}_packId(l,d){l*=this._spec.id.packPrecisionFactor??1;const b=this._dataView.getUint32(d+
this._spec.id.offset,!0)&4278190080;this._dataView.setUint32(d+this._spec.id.offset,l|b,!0)}_pack(l,d,b){h.packDataView(this._dataView,l,d,b)}}e.MeshWriterVertexPack=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec":function(){define(["exports","../../../../../../../core/has","./utils","../../../../../../webgl/enums"],function(e,g,q,h){function m(b){switch(b){case h.DataType.BYTE:case h.DataType.UNSIGNED_BYTE:return 1;
case h.DataType.SHORT:case h.DataType.UNSIGNED_SHORT:case h.DataType.HALF_FLOAT:return 2;case h.DataType.FLOAT:case h.DataType.INT:case h.DataType.UNSIGNED_INT:return 4}}function l(b){const a=[],f=[],n=[];for(const c of b)switch(b=m(c.type)*c.count,b%2||b%4||4){case 4:a.push(c);continue;case 2:f.push(c);continue;case 1:n.push(c);continue;default:throw Error("Found unexpected dataType byte count");}a.push(...f);a.push(...n);return a}class d{static fromVertexSpec(b,a){const {attributes:f,optionalAttributes:n}=
b;let c,r,k;b=[];for(var p in f){const u=f[p];"position"===u.pack?c={...u,name:p,offset:0}:"id"===u.pack?r={...u,name:p,offset:4}:"bitset"===p?k={...u,name:p,offset:7}:b.push({...u,name:p})}for(var t in n)!0===a[t]&&b.push({...n[t],name:t});b=l(b);a=[];p=8;t=1;for(var w of b)a.push({...w,offset:p}),p+=m(w.type)*w.count,w.packAlternating&&(t=Math.max(w.packAlternating.count,t));w=Uint32Array.BYTES_PER_ELEMENT;b=p%w;return new d(c,r,k,a,p+(b?w-b:0),t)}constructor(b,a,f,n,c,r){this.position=b;this.id=
a;this.bitset=f;this.standardAttributes=n;this.stride=c;this.packVertexCount=r;n.push(f);this._attributes=[b,a,f,...n]}get attributeLayout(){if(!this._attributeLayout){const b=q.vertexLayoutHash(this._attributes);this._attributeLayout={attributes:this._attributes.map(a=>({name:a.name,count:a.count,offset:a.offset,type:a.type,packPrecisionFactor:a.packPrecisionFactor,normalized:a.normalized??!1})),hash:b,stride:this.stride}}return this._attributeLayout}}e.AlignedVertexSpec=d;e.sortByAlignment=l;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter":function(){define("exports ../../../../../../../core/screenUtils ../../../../vectorTiles/GeometryUtils ./meshWriterUtils ./PatternFillMeshWriter ../shaders/constants ../../../../../../webgl/enums".split(" "),function(e,g,q,h,m,l,d){function b(c){const {sprite:r,aspectRatio:k,scaleProportionally:p}=c;var t=g.pt2px(c.height);c=0<t?t:r.height;t*=k;0>=t?t=r.width:p&&(t*=r.width/r.height);
return{width:t,height:c}}function a(c){const {applyRandomOffset:r,sampleAlphaOnly:k}=c;return h.packBitset([[l.bitsetFillRandomPatternOffset,r],[l.bitsetGenericConsiderAlphaOnly,k]])}const f={createComputedParams:c=>c,optionalAttributes:m.patternFillVertexSpec.optionalAttributes,attributes:{...m.patternFillVertexSpec.attributes,bitset:{count:1,type:d.DataType.UNSIGNED_BYTE,pack:a},width:{count:1,type:d.DataType.HALF_FLOAT,pack:c=>b(c).width},height:{count:1,type:d.DataType.HALF_FLOAT,pack:c=>b(c).height},
offset:{count:2,type:d.DataType.HALF_FLOAT,pack:({offsetX:c,offsetY:r})=>[g.pt2px(c),-g.pt2px(r)]},scale:{count:2,type:d.DataType.UNSIGNED_BYTE,packPrecisionFactor:16,pack:({scaleX:c,scaleY:r})=>[c,r]},angle:{count:1,type:d.DataType.UNSIGNED_BYTE,pack:({angle:c})=>q.degToByte(c)}}};class n extends m.PatternFillMeshWriter{constructor(){super(...arguments);this.vertexSpec=f}}e.ComplexFillMeshWriter=n;e.complexFillVertexSpec=f;e.getPatternSize=b;e.packComplexFillBitset=a;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/meshWriterUtils":function(){define(["exports","../../../../../../../Color","../../../../../../../core/Error","../../../../../../../core/Logger","../../../../../../../symbols/cim/enums"],function(e,g,q,h,m){e.getBitMask=function(l){return 1<<l};e.getMinMaxZoom=function(l,d){const b=!!l?.minScale&&d.scaleToZoom(l.minScale)||0;l=!!l?.maxScale&&d.scaleToZoom(l.maxScale)||100;return[b,l]};e.packBitset=function(l){let d=0;for(const [b,
a]of l)a&&(d|=1<<b);return d};e.packByteSqrt=function(l,d){return Math.round(Math.min(Math.sqrt(l*d),255))};e.packRounded=function(l,d){return Math.round(l*d)/d};e.processColorInput=function(l){if(!l)return[0,0,0,0];if("string"===typeof l){const n=g.fromString(l);if(!n)return h.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.meshWriterUtils").errorOnce(new q("mapview:mesh-processing","Unable to parse string into color",{color:l})),[0,0,0,0];l=n.toArray()}const [d,b,a,f]=l;return[f/255*
d,f/255*b,f/255*a,f]};e.processLineCapInput=function(l){switch(l){case "butt":case m.LineCapStyle.Butt:return m.CapType.BUTT;case "round":case m.LineCapStyle.Round:return m.CapType.ROUND;case "square":case m.LineCapStyle.Square:return m.CapType.SQUARE}};e.processLineJoinInput=function(l){switch(l){case "bevel":case m.LineJoinStyle.Bevel:return m.JoinType.BEVEL;case "miter":case m.LineJoinStyle.Miter:return m.JoinType.MITER;case "round":case m.LineJoinStyle.Round:return m.JoinType.ROUND}};Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter":function(){define(["exports","../../../definitions","./FillMeshWriter","../../../../../../webgl/enums"],function(e,g,q,h){const m={createComputedParams:d=>d,optionalAttributes:q.fillVertexSpec.optionalAttributes,attributes:{...q.fillVertexSpec.attributes,tlbr:{count:4,type:h.DataType.UNSIGNED_SHORT,pack:({sprite:d})=>{const {rect:b,width:a,height:f}=d;d=b.x+g.spritePadding;const n=
b.y+g.spritePadding;return[d,n,d+a,n+f]}},inverseRasterizationScale:{count:1,type:h.DataType.BYTE,packPrecisionFactor:16,pack:({sprite:d})=>1/d.rasterizationScale}}};class l extends q.FillMeshWriter{constructor(){super(...arguments);this.vertexSpec=m}_write(d,b,a){a=a?.asOptimized()??b.readGeometryForDisplay();if(a=this._clip(a))d.recordStart(this.instanceId,this.attributeLayout,this.evaluatedMeshParams.sprite?.textureBinding),this._writeGeometry(d,b,a),d.recordEnd()}}e.PatternFillMeshWriter=l;e.patternFillVertexSpec=
m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter":function(){define(["exports","../../../definitions","./AFillMeshWriter","./meshWriterUtils","../../../../../../webgl/enums"],function(e,g,q,h,m){const l={createComputedParams:b=>b,optionalAttributes:{zoomRange:{type:m.DataType.SHORT,count:2,packPrecisionFactor:g.minMaxZoomPrecisionFactor,pack:({scaleInfo:b},{tileInfo:a})=>h.getMinMaxZoom(b,a)}},attributes:{id:{type:m.DataType.UNSIGNED_BYTE,
count:3,pack:"id"},bitset:{type:m.DataType.UNSIGNED_BYTE,count:1},pos:{type:m.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},color:{type:m.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:b})=>h.processColorInput(b)}}};class d extends q.AFillMeshWriter{constructor(){super(...arguments);this.vertexSpec=l}createTesselationParams(b){return null}}e.FillMeshWriter=d;e.fillVertexSpec=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter":function(){define("exports ../../../../../../../core/screenUtils ../../../../../../../geometry/GeometryCursor ./ComplexFillMeshWriter ./meshWriterUtils ./OutlineFillMeshWriter ../shaders/ComplexOutlineFillShader ../shaders/constants ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a){const f=h.complexFillVertexSpec,n={createComputedParams:p=>p,optionalAttributes:f.optionalAttributes,attributes:{...f.attributes,bitset:{type:a.DataType.UNSIGNED_BYTE,count:1,pack:p=>h.packComplexFillBitset(p)},aux1:{count:1,type:a.DataType.HALF_FLOAT,pack:p=>h.getPatternSize(p).width},aux2:{count:1,type:a.DataType.HALF_FLOAT,pack:p=>h.getPatternSize(p).height},aux3:{count:2,type:a.DataType.HALF_FLOAT,pack:({offsetX:p,offsetY:t})=>[g.pt2px(p),g.pt2px(t)]},aux4:{count:2,
type:a.DataType.UNSIGNED_BYTE,pack:({scaleX:p,scaleY:t})=>[p*d.packPrecision,t*d.packPrecision]}}},c={createComputedParams:p=>p,optionalAttributes:f.optionalAttributes,attributes:{...f.attributes,color:l.outlineFillVertexSpec_Outline.attributes.color,bitset:{type:a.DataType.UNSIGNED_BYTE,count:1,pack:p=>m.packBitset([[b.bitsetTypeFillOutline,!0]])},aux1:{count:1,type:a.DataType.HALF_FLOAT,pack:p=>g.pt2px(.5*p.width)},aux2:{count:1,type:a.DataType.HALF_FLOAT,pack:p=>g.pt2px(.5*p.referenceWidth)},aux3:{count:2,
type:a.DataType.HALF_FLOAT,packTessellation:({extrusionOffsetX:p,extrusionOffsetY:t})=>[p,t]},aux4:{count:2,type:a.DataType.UNSIGNED_BYTE,packTessellation:({normalX:p,normalY:t})=>[p*d.packPrecision+d.signedToUnsignedByte,t*d.packPrecision+d.signedToUnsignedByte]}}};class r extends l.OutlineFillOutlineMeshWriter{constructor(){super(...arguments);this.vertexSpec=c}}class k extends l.OutlineFillMeshWriter{constructor(){super(...arguments);this.vertexSpec=n}_createOutlineWriter(p,t,w,u){return new r(p,
t,w,u)}_write(p,t,w){w=w?.asOptimized()??t.readGeometryForDisplay();if(w=this._clip(w))p.recordStart(this.instanceId,this.attributeLayout,this.evaluatedMeshParams.sprite?.textureBinding),this._writeGeometry(p,t,w),this._lineMeshWriter.writeLineVertices(p,q.GeometryCursor.fromOptimizedCIM(w,"esriGeometryPolyline"),t),p.recordEnd()}ensurePacked(p,t,w){super.ensurePacked(p,t,w);this._lineMeshWriter.ensurePacked(p,t,w)}enqueueRequest(p,t,w){super.enqueueRequest(p,t,w);this._lineMeshWriter.enqueueRequest(p,
t,w)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}e.ComplexOutlineFillMeshWriter=k;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter":function(){define("exports ../../../../../../../geometry/GeometryCursor ../../../mesh/templates/templateUtils ./FillMeshWriter ./meshWriterUtils ../line/LineMeshWriter ../mesh/utils ../shaders/constants ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a){const f={createComputedParams:k=>k,optionalAttributes:l.LineVertexSpec.optionalAttributes,attributes:{...l.LineVertexSpec.attributes,bitset:{type:a.DataType.UNSIGNED_BYTE,count:1,pack:k=>0},color:{type:a.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:k})=>m.processColorInput(k)}}},n={createComputedParams:k=>k,optionalAttributes:l.LineVertexSpec.optionalAttributes,attributes:{...l.LineVertexSpec.attributes,bitset:{type:a.DataType.UNSIGNED_BYTE,count:1,pack:k=>
m.packBitset([[b.bitsetTypeFillOutline,!0]])},color:{type:a.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:k})=>m.processColorInput(k)}}};class c extends l.LineMeshWriter{constructor(){super(...arguments);this.vertexSpec=n}}class r extends h.FillMeshWriter{constructor(k,p,t,w){super(k,p,t,w);this.vertexSpec=f;this._lineMeshWriter=this._createOutlineWriter(k,p,t,w)}_createOutlineWriter(k,p,t,w){return new c(k,p,t,w)}_write(k,p,t){t=t?.asOptimized()??p.readGeometryForDisplay();if(t=
this._clip(t))k.recordStart(this.instanceId,this.attributeLayout),this._writeGeometry(k,p,t),this._lineMeshWriter.writeLineVertices(k,g.GeometryCursor.fromOptimizedCIM(t,"esriGeometryPolyline"),p),k.recordEnd()}_clip(k){return k?q.clipMarshall(k,d.getLineClippingMargin(this.evaluatedMeshParams)):null}ensurePacked(k,p,t){super.ensurePacked(k,p,t);this._lineMeshWriter.ensurePacked(k,p,t)}enqueueRequest(k,p,t){super.enqueueRequest(k,p,t);this._lineMeshWriter.enqueueRequest(k,p,t)}async loadDependencies(){await Promise.all([super.loadDependencies(),
this._lineMeshWriter.loadDependencies()])}}e.OutlineFillMeshWriter=r;e.OutlineFillOutlineMeshWriter=c;e.outlineFillVertexSpec_Fill=f;e.outlineFillVertexSpec_Outline=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter":function(){define("exports ../../../../../../../core/screenUtils ../../../../../../../geometry/GeometryCursor ../../../definitions ../../../TurboLine ../../../mesh/templates/templateUtils ../fill/meshWriterUtils ../mesh/MeshWriter ../mesh/utils ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f){class n{constructor(){this.distance=this.directionY=this.directionX=this.normalY=this.normalX=this.extrusionOffsetY=this.extrusionOffsetX=0}}const c={createComputedParams:p=>p,optionalAttributes:{zoomRange:{type:f.DataType.SHORT,count:2,packPrecisionFactor:h.minMaxZoomPrecisionFactor,pack:({scaleInfo:p},{tileInfo:t})=>d.getMinMaxZoom(p,t)}},attributes:{id:{type:f.DataType.UNSIGNED_BYTE,count:3,pack:"id"},pos:{type:f.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},
bitset:{type:f.DataType.UNSIGNED_BYTE,count:1},color:{type:f.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:p})=>d.processColorInput(p)},offset:{type:f.DataType.BYTE,count:2,packPrecisionFactor:16,packTessellation:({extrusionOffsetX:p,extrusionOffsetY:t})=>[d.packRounded(p,16),d.packRounded(t,16)]},normal:{type:f.DataType.BYTE,count:2,packPrecisionFactor:16,packTessellation:({normalX:p,normalY:t})=>[d.packRounded(p,16),d.packRounded(t,16)]},halfWidth:{type:f.DataType.HALF_FLOAT,count:1,
pack:({width:p})=>g.pt2px(.5*p)},referenceHalfWidth:{type:f.DataType.HALF_FLOAT,count:1,pack:({referenceWidth:p})=>g.pt2px(.5*p)}}};class r{constructor(){this.vertexBounds=this.vertexFrom=this.vertexCount=this.indexCount=this.bitset=this.id=0}}class k extends b.MeshWriter{constructor(p,t,w,u){super(p,t,w,u);this.vertexSpec=c;this._currentWrite=new r;this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:65535,textured:!1};this._tessParams=new n;this._initializeTessellator()}writeLineVertices(p,
t,w){t=this._getLines(t);null!=t&&this._writeVertices(p,w,t)}_initializeTessellator(){this._lineTessellator=new m.LineTessellation(this._writeTesselatedVertex.bind(this),this._writeTriangle.bind(this),!0)}_write(p,t,w){(w=w??q.GeometryCursor.fromFeatureSetReaderCIM(t))&&this._writeGeometry(p,t,w)}_writeGeometry(p,t,w,u){p.recordStart(this.instanceId,this.attributeLayout,u);this.writeLineVertices(p,w,t);p.recordEnd()}_getLines(p){return l.clipLinesMarshall(p,a.getLineClippingMargin(this.evaluatedMeshParams))}_writeVertices(p,
t,w){const {_currentWrite:u,_tessellationOptions:y,evaluatedMeshParams:x}=this,{width:v,capType:A,joinType:z,miterLimit:B,hasSizeVV:D}=x,F=g.pt2px(.5*v);y.halfWidth=F;y.capType=d.processLineCapInput(A);y.joinType=d.processLineJoinInput(z);y.miterLimit=B;const E=!D;u.out=p;u.id=t.getDisplayId();u.vertexCount=0;u.indexCount=0;u.vertexFrom=p.vertexCount();u.vertexBounds=E&&F<h.thinLineHalfWidthThreshold?0:1;for(const {line:C,start:G}of w)y.initialDistance=G%65535,this._lineTessellator.tessellate(C,y,
E)}_writeTesselatedVertex(p,t,w,u,y,x,v,A,z,B,D){const {out:F,id:E,vertexBounds:C}=this._currentWrite;this.hasEffects&&F.recordBounds(p,t,C,C);this._tessParams.extrusionOffsetX=v;this._tessParams.extrusionOffsetY=A;this._tessParams.normalX=z;this._tessParams.normalY=B;this._tessParams.directionX=y;this._tessParams.directionY=x;this._tessParams.distance=D;this._writeVertex(F,E,p,t,this._tessParams);return this._currentWrite.vertexFrom+this._currentWrite.vertexCount++}_writeTriangle(p,t,w){const {out:u}=
this._currentWrite;u.indexEnsureSize(3);u.indexWrite(p);u.indexWrite(t);u.indexWrite(w);this._currentWrite.indexCount+=3}}e.LineMeshWriter=k;e.LineTessellationParams=n;e.LineVertexSpec=c;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TurboLine":function(){define(["exports","../../../../symbols/cim/enums","./definitions"],function(e,g,q){function h(c,r){return c.x===r.x&&c.y===r.y}function m(c,r){c.x=r.y;c.y=-r.x;return c}function l(c,r){c.x=-r.y;c.y=r.x;
return c}function d(c,r){c.x=r.x;c.y=r.y;return c}function b(c,r){c.x=-r.x;c.y=-r.y;return c}function a(c){return Math.sqrt(c.x*c.x+c.y*c.y)}function f(c,r,k,p){c.x=r.x*k+r.y*p;c.y=r.x*p-r.y*k;return c}class n{constructor(c,r,k){this._writeVertex=c;this._writeTriangle=r;this._canUseThinTessellation=k;this._prevNormal={x:void 0,y:void 0};this._nextNormal={x:void 0,y:void 0};this._textureNormalLeft={x:0,y:1};this._textureNormalRight={x:0,y:-1};this._textureNormal={x:void 0,y:void 0};this._joinNormal=
{x:void 0,y:void 0};this._inner={x:void 0,y:void 0};this._outer={x:void 0,y:void 0};this._roundStart={x:void 0,y:void 0};this._roundEnd={x:void 0,y:void 0};this._startBreak={x:void 0,y:void 0};this._endBreak={x:void 0,y:void 0};this._innerPrev={x:void 0,y:void 0};this._innerNext={x:void 0,y:void 0};this._bevelStart={x:void 0,y:void 0};this._bevelEnd={x:void 0,y:void 0};this._bevelMiddle={x:void 0,y:void 0}}tessellate(c,r,k=this._canUseThinTessellation){if(c){var p=c.length;if(!(1>=p)){var t=0;for(let w=
1;w<p;w++)h(c[w],c[t])||++t===w||(c[t]=c[w]);c.length=t+1}}k&&r.halfWidth<q.thinLineHalfWidthThreshold&&!r.offset?this._tessellateThin(c,r):this._tessellate(c,r)}_tessellateThin(c,r){if(!(2>c.length)){var k=r.wrapDistance||65535;r=r.initialDistance||0;var p=!1,t=c[0].x,w=c[0].y,u=c.length;for(let A=1;A<u;++A){p&&(p=!1,r=0);let z=c[A].x,B=c[A].y;var y=z-t;let D=B-w;var x=Math.sqrt(y*y+D*D);y/=x;D/=x;if(r+x>k){p=!0;var v=(k-r)/x;x=k-r;z=(1-v)*t+v*z;B=(1-v)*w+v*B;--A}v=this._writeVertex(t,w,0,0,y,D,
D,-y,0,-1,r);t=this._writeVertex(t,w,0,0,y,D,-D,y,0,1,r);r+=x;x=this._writeVertex(z,B,0,0,y,D,D,-y,0,-1,r);y=this._writeVertex(z,B,0,0,y,D,-D,y,0,1,r);this._writeTriangle(v,t,x);this._writeTriangle(t,x,y);t=z;w=B}}}_tessellate(c,r){var k=c[c.length-1];const p=h(c[0],k);if(!(c.length<(p?3:2))){var t=r.pixelCoordRatio,w=null!=r.capType?r.capType:g.CapType.BUTT,u=null!=r.joinType?r.joinType:g.JoinType.MITER,y=null!=r.miterLimit?Math.min(r.miterLimit,4):2,x=null!=r.roundLimit?Math.min(r.roundLimit,1.05):
1.05,v=null!=r.halfWidth?r.halfWidth:2,A=!!r.textured,z=null,B=this._prevNormal,D=this._nextNormal,F=-1,E=-1,C=this._joinNormal,G=this._textureNormalLeft,H=this._textureNormalRight,K=this._textureNormal,J=-1,O=-1,Q=r.wrapDistance||65535,T=r.initialDistance||0,I=this._writeVertex,L=this._writeTriangle;r=(ka,na,qa,oa,ua,sa)=>{ka=I(V,S,P,U,qa,oa,ka,na,ua,sa,T);0<=J&&0<=O&&0<=ka&&L(J,O,ka);J=O;return O=ka};if(p){var R=c[c.length-2];D.x=k.x-R.x;D.y=k.y-R.y;E=a(D);D.x/=E;D.y/=E}k=!1;for(let ka=0;ka<c.length;++ka){k&&
(k=!1,T=0);R&&(B.x=-D.x,B.y=-D.y,F=E,T+F>Q&&(k=!0));k?(z=(Q-T)/F,F=Q-T,R={x:(1-z)*R.x+z*c[ka].x,y:(1-z)*R.y+z*c[ka].y},--ka):R=c[ka];var V=R.x;var S=R.y;var X=0>=ka&&!k,N=ka===c.length-1;X||(T+=F);(z=N?p?c[1]:null:c[ka+1])?(D.x=z.x-V,D.y=z.y-S,E=a(D),D.x/=E,D.y/=E):(D.x=void 0,D.y=void 0);if(!p){if(X){l(C,D);var P=C.x;var U=C.y;w===g.CapType.SQUARE&&(r(-D.y-D.x,D.x-D.y,D.x,D.y,0,-1),r(D.y-D.x,-D.x-D.y,D.x,D.y,0,1));w===g.CapType.ROUND&&(r(-D.y-D.x,D.x-D.y,D.x,D.y,-1,-1),r(D.y-D.x,-D.x-D.y,D.x,D.y,
-1,1));if(w===g.CapType.ROUND||w===g.CapType.BUTT)r(-D.y,D.x,D.x,D.y,0,-1),r(D.y,-D.x,D.x,D.y,0,1);continue}if(N){m(C,B);P=C.x;U=C.y;if(w===g.CapType.ROUND||w===g.CapType.BUTT)r(B.y,-B.x,-B.x,-B.y,0,-1),r(-B.y,B.x,-B.x,-B.y,0,1);w===g.CapType.SQUARE&&(r(B.y-B.x,-B.x-B.y,-B.x,-B.y,0,-1),r(-B.y-B.x,B.x-B.y,-B.x,-B.y,0,1));w===g.CapType.ROUND&&(r(B.y-B.x,-B.x-B.y,-B.x,-B.y,1,-1),r(-B.y-B.x,B.x-B.y,-B.x,-B.y,1,1));continue}}var Y=void 0;X=-(B.x*D.y-B.y*D.x);.01>Math.abs(X)?0<B.x*D.x+B.y*D.y?(C.x=B.x,
C.y=B.y,X=1,Y=Number.MAX_VALUE,z=!0):(l(C,D),Y=X=1,z=!1):(C.x=(B.x+D.x)/X,C.y=(B.y+D.y)/X,Y=a(C),z=(Y-1)*v*t,z=4<Y||z>F&&z>E);P=C.x;U=C.y;var ba=u;switch(u){case g.JoinType.BEVEL:1.05>Y&&(ba=g.JoinType.MITER);break;case g.JoinType.ROUND:Y<x&&(ba=g.JoinType.MITER);break;case g.JoinType.MITER:Y>y&&(ba=g.JoinType.BEVEL)}switch(ba){case g.JoinType.MITER:r(C.x,C.y,-B.x,-B.y,0,-1);r(-C.x,-C.y,-B.x,-B.y,0,1);if(N)break;A&&(z=k?0:T,J=this._writeVertex(V,S,P,U,D.x,D.y,C.x,C.y,0,-1,z),O=this._writeVertex(V,
S,P,U,D.x,D.y,-C.x,-C.y,0,1,z));break;case g.JoinType.BEVEL:X=0>X;var Z=void 0;X?(ba=J,J=O,O=ba,Z=G,ba=H):(Z=H,ba=G);var aa=void 0,ca=void 0;z?(aa=X?l(this._innerPrev,B):m(this._innerPrev,B),ca=X?m(this._innerNext,D):l(this._innerNext,D)):aa=ca=X?b(this._inner,C):d(this._inner,C);Y=X?m(this._bevelStart,B):l(this._bevelStart,B);r(aa.x,aa.y,-B.x,-B.y,Z.x,Z.y);aa=r(Y.x,Y.y,-B.x,-B.y,ba.x,ba.y);if(N)break;N=X?l(this._bevelEnd,D):m(this._bevelEnd,D);z?(z=this._writeVertex(V,S,P,U,-B.x,-B.y,0,0,0,0,T),
J=this._writeVertex(V,S,P,U,D.x,D.y,ca.x,ca.y,Z.x,Z.y,T),O=this._writeVertex(V,S,P,U,D.x,D.y,N.x,N.y,ba.x,ba.y,T),this._writeTriangle(aa,z,O)):(A?(z=this._bevelMiddle,z.x=(Y.x+N.x)/2,z.y=(Y.y+N.y)/2,f(K,z,-B.x,-B.y),r(z.x,z.y,-B.x,-B.y,K.x,K.y),f(K,z,D.x,D.y),J=this._writeVertex(V,S,P,U,D.x,D.y,z.x,z.y,K.x,K.y,T),O=this._writeVertex(V,S,P,U,D.x,D.y,ca.x,ca.y,Z.x,Z.y,T)):(z=J,J=O,O=z),r(N.x,N.y,D.x,D.y,ba.x,ba.y));X&&(z=J,J=O,O=z);break;case g.JoinType.ROUND:X=0>X;var ea=void 0;X?(ba=J,J=O,O=ba,ba=
G,ea=H):(ba=H,ea=G);var ia=X?b(this._inner,C):d(this._inner,C);z?(ca=X?l(this._innerPrev,B):m(this._innerPrev,B),Z=X?m(this._innerNext,D):l(this._innerNext,D)):Z=ca=ia;aa=X?m(this._roundStart,B):l(this._roundStart,B);var ha=X?l(this._roundEnd,D):m(this._roundEnd,D);ca=r(ca.x,ca.y,-B.x,-B.y,ba.x,ba.y);aa=r(aa.x,aa.y,-B.x,-B.y,ea.x,ea.y);if(N)break;N=this._writeVertex(V,S,P,U,-B.x,-B.y,0,0,0,0,T);z||this._writeTriangle(J,O,N);ia=b(this._outer,ia);ea=this._writeVertex(V,S,P,U,D.x,D.y,ha.x,ha.y,ea.x,
ea.y,T);let na,qa;if(ha=2<Y){var ja=void 0;Y!==Number.MAX_VALUE?(ia.x/=Y,ia.y/=Y,ja=B.x*ia.x+B.y*ia.y,ja=(Y*(ja*ja-1)+1)/ja):ja=-1;na=X?m(this._startBreak,B):l(this._startBreak,B);na.x+=B.x*ja;na.y+=B.y*ja;qa=X?l(this._endBreak,D):m(this._endBreak,D);qa.x+=D.x*ja;qa.y+=D.y*ja}f(K,ia,-B.x,-B.y);Y=this._writeVertex(V,S,P,U,-B.x,-B.y,ia.x,ia.y,K.x,K.y,T);f(K,ia,D.x,D.y);ia=A?this._writeVertex(V,S,P,U,D.x,D.y,ia.x,ia.y,K.x,K.y,T):Y;ja=N;const oa=A?this._writeVertex(V,S,P,U,D.x,D.y,0,0,0,0,T):N;let ua=
-1,sa=-1;ha&&(f(K,na,-B.x,-B.y),ua=this._writeVertex(V,S,P,U,-B.x,-B.y,na.x,na.y,K.x,K.y,T),f(K,qa,D.x,D.y),sa=this._writeVertex(V,S,P,U,D.x,D.y,qa.x,qa.y,K.x,K.y,T));A?ha?(this._writeTriangle(ja,aa,ua),this._writeTriangle(ja,ua,Y),this._writeTriangle(oa,ia,sa),this._writeTriangle(oa,sa,ea)):(this._writeTriangle(ja,aa,Y),this._writeTriangle(oa,ia,ea)):ha?(this._writeTriangle(N,aa,ua),this._writeTriangle(N,ua,sa),this._writeTriangle(N,sa,ea)):(this._writeTriangle(N,aa,Y),this._writeTriangle(N,ia,ea));
z?J=this._writeVertex(V,S,P,U,D.x,D.y,Z.x,Z.y,ba.x,ba.y,T):(J=A?this._writeVertex(V,S,P,U,D.x,D.y,Z.x,Z.y,ba.x,ba.y,T):ca,this._writeTriangle(J,oa,ea));O=ea;X&&(z=J,J=O,O=z)}}}}}e.LineTessellation=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter":function(){define(["exports","../../../../../../../geometry/GeometryCursor","./OutlineFillMeshWriter","./PatternFillMeshWriter"],function(e,g,q,h){const m=
{optionalAttributes:h.patternFillVertexSpec.optionalAttributes,createComputedParams:a=>a,attributes:{...h.patternFillVertexSpec.attributes,...q.outlineFillVertexSpec_Fill.attributes}},l={optionalAttributes:h.patternFillVertexSpec.optionalAttributes,createComputedParams:a=>a,attributes:{...h.patternFillVertexSpec.attributes,...q.outlineFillVertexSpec_Outline.attributes}};class d extends q.OutlineFillOutlineMeshWriter{constructor(){super(...arguments);this.vertexSpec=l}}class b extends q.OutlineFillMeshWriter{constructor(){super(...arguments);
this.vertexSpec=m}_createOutlineWriter(a,f,n,c){return new d(a,f,n,c)}_write(a,f,n){n=n?.asOptimized()??f.readGeometryForDisplay();if(n=this._clip(n))a.recordStart(this.instanceId,this.attributeLayout,this.evaluatedMeshParams.sprite?.textureBinding),this._writeGeometry(a,f,n),this._lineMeshWriter.writeLineVertices(a,g.GeometryCursor.fromOptimizedCIM(n,"esriGeometryPolyline"),f),a.recordEnd()}ensurePacked(a,f,n){super.ensurePacked(a,f,n);this._lineMeshWriter.ensurePacked(a,f,n)}enqueueRequest(a,f,
n){super.enqueueRequest(a,f,n);this._lineMeshWriter.enqueueRequest(a,f,n)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}e.PatternOutlineFillMeshWriter=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter":function(){define(["exports","../mesh/MeshWriter","../../../../../../webgl/enums"],function(e,g,q){const h={createComputedParams:l=>l,optionalAttributes:{},
attributes:{pos:{type:q.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:q.DataType.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:q.DataType.UNSIGNED_BYTE,count:1},offset:{type:q.DataType.BYTE,count:2,packAlternating:{count:4,pack:()=>[[-1,-1],[1,-1],[-1,1],[1,1]]}}}};class m extends g.MeshWriter{constructor(){super(...arguments);this.vertexSpec=h}_write(l,d){l.recordStart(this.instanceId,this.attributeLayout);const b=d.getDisplayId();if("esriGeometryPoint"===d.geometryType){const a=
d.readXForDisplay();d=d.readYForDisplay();this._writeQuad(l,b,a,d)}else"esriGeometryMultipoint"===d.geometryType&&d.readGeometryForDisplay()?.forEachVertex((a,f)=>{0<=a&&512>=a&&0<=f&&512>=f&&this._writeQuad(l,b,a,f)});l.recordEnd()}_writeQuad(l,d,b,a){const f=l.vertexCount();this._writeVertex(l,d,b,a);l.indexWrite(f+0);l.indexWrite(f+1);l.indexWrite(f+2);l.indexWrite(f+1);l.indexWrite(f+3);l.indexWrite(f+2)}}e.HeatmapMeshWriter=m;e.heatmapVertexSpec=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter":function(){define("exports ../../../../../../../core/MapUtils ../../../../../../../core/screenUtils ../../../../../../../core/libs/gl-matrix-2/math/mat2d ../../../../../../../core/libs/gl-matrix-2/factories/mat2df32 ../../../../../../../core/libs/gl-matrix-2/math/vec2 ../../../../../../../core/libs/gl-matrix-2/factories/vec2f32 ../../../../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../../../../layers/graphics/featureConversionUtils ../../../../../../../layers/graphics/OptimizedGeometry ../../../alignmentUtils ../../../DisplayId ../../../collisions/BoundingBox ../../../collisions/LabelMetric ../../../mesh/templates/segmentUtils ../fill/meshWriterUtils ../text/TextMeshWriter".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w){function u(v,A,z){const {coords:B,lengths:D}=A;A=b.create();const F=b.create(),E=b.create(),C=b.create(),G=b.create(),H=b.create();let K=0;for(let O=0;O<D.length;O++){const Q=D[O];for(let T=0;T<Q;T++){var J=2*(T+K-1);const I=2*(T+K),L=2*(T+K+1);0<T?l.set(A,B[J],B[J+1]):l.set(A,0,0);l.set(F,B[I],B[I+1]);T<Q-1?l.set(E,B[L],B[L+1]):l.set(E,0,0);0===T?l.set(C,0,0):(l.sub(C,F,A),l.normalize(C,C),l.set(C,C[1],-C[0]));T===Q-1?l.set(G,0,0):(l.sub(G,E,F),l.normalize(G,
G),l.set(G,G[1],-G[0]));l.add(H,C,G);l.normalize(H,H);J=H[0]*G[0]+H[1]*G[1];0!==J&&l.scale(H,H,J);l.scale(H,H,z);v.coords.push(F[0]+H[0],F[1]+H[1])}v.lengths.push(Q);K+=Q}return v}const y=g.memoize(v=>{let A=0;if(0===v)return Infinity;for(;!(v%2);)A++,v/=2;return A});class x extends w.TextMeshWriter{constructor(){super(...arguments);this._zoomLevel=0}_write(v,A,z,B){this._zoomLevel=B||0;if(null!=z)throw Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(A.geometryType){case "esriGeometryPoint":return z=
A.readXForDisplay(),B=A.readYForDisplay(),this._writePoint(v,z,B,A);case "esriGeometryEnvelope":case "esriGeometryPolygon":case "esriGeometryMultipoint":z=A.readCentroidForDisplay();if(!z)break;const [D,F]=z.coords;return this._writePoint(v,D,F,A);case "esriGeometryPolyline":this._writeLines(v,A)}}_writePoint(v,A,z,B){const D=this._getShaping();if(D){var F=this._getPointReferenceBounds();F||={offsetX:0,offsetY:0,size:0};var E=D.boundsT,C=n.getXAnchorDirection(this.evaluatedMeshParams.horizontalAlignment),
G=n.getYAnchorDirection(this.evaluatedMeshParams.verticalAlignment),H=this.evaluatedMeshParams.scaleInfo?.maxScale??0,K=this.evaluatedMeshParams.scaleInfo?.minScale??0,J=c.getDisplayIdTexel(B.getDisplayId());v.metricStart(new k.LabelMetric(J,A,z,C,G,H,K,F));v.metricBoxWrite(E);this._writeGlyphs(v,B.getDisplayId(),A,z,D,0,F);v.metricEnd()}}_getPointReferenceBounds(){if(!this._references)return null;for(const v of this._references){const A=v.getBoundsInfo();if(A)return A}return null}_writeLines(v,A){const {scaleInfo:z,
verticalAlignment:B}=this.evaluatedMeshParams;var D=this.evaluatedMeshParams.repeatLabelDistance||128;const F=this._getShaping("middle");if(F){var E=(C,G,H,K)=>this._placeSubdivGlyphs(C,G,H,K);D=(F.bounds.width+D)/2;this._current={out:v,id:A.getDisplayId(),shaping:F,zoomRange:t.getMinMaxZoom(z,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null};(this._verticalPlacement="bottom"===B?"above":"top"===B?"below":null)?this._writeAboveAndBelowAlong(A,
E,D):this._writeCenterAlong(A,E,D)}}_writeAboveAndBelowAlong(v,A,z){const {repeatLabel:B,fontSize:D}=this.evaluatedMeshParams;var {shaping:F}=this._current,E=q.pt2px(D);if(v=v.readGeometryForDisplay()){var C=new f;a.generalizeOptimizedGeometry(C,v,!1,!1,"esriGeometryPolyline",1);v=u(new f,C,E);E=u(new f,C,-E);E=a.convertToGeometry(E,"esriGeometryPolyline",!1,!1);v=a.convertToGeometry(v,"esriGeometryPolyline",!1,!1);v=p.smoothPaths(v.paths,F.bounds.width);F=p.smoothPaths(E.paths,F.bounds.width);this._current.offsetDirection=
"above";for(const G of v)p.pathDivide(G,z,A,!!B);this._current.offsetDirection="below";for(const G of F)p.pathDivide(G,z,A,!!B)}}_writeCenterAlong(v,A,z){const {repeatLabel:B}=this.evaluatedMeshParams,{shaping:D}=this._current;v=p.smoothPaths(v.readLegacyGeometryForDisplay().paths,D.bounds.width);for(const F of v)p.pathDivide(F,z,A,!!B)}_placeSubdivGlyphs(v,A,z,B){const {allowOverrun:D,labelPosition:F,repeatLabelDistance:E}=this.evaluatedMeshParams,C=this._current.zoomRange[0];var G=y(A),H=this._current.shaping.bounds.width/
2,K=Math.sqrt(E||128)/2;z=Math.min(z,B-z);H=this._current.shaping.isMultiline?w.maxLabelZoom:Math.log2(z/(K+H/2));G=Math.max(C,this._zoomLevel+1-(0===A?H:Math.min(G,H)));H=this._zoomLevel-G;K=this._current.shaping.bounds.width/2*2**H;this._current.shaping.isMultiline?0===A&&this._placeStraight(v,G):D&&0>H?this._placeStraightAlong(v,C):"parallel"===F?this._placeStraightAlong(v,G):"curved"===F&&this._placeCurved(v,G,K)}_placeStraight(v,A){const {out:z,id:B,shaping:D,referenceBounds:F}=this._current,
{x:E,y:C}=v;var G=c.getDisplayIdTexel(B);z.metricStart(new k.LabelMetric(G,v.x,v.y,0,0,this.evaluatedMeshParams.scaleInfo?.maxScale??0,this.evaluatedMeshParams.scaleInfo?.minScale??0,null));z.metricBoxWrite(D.boundsT);G=(180/Math.PI*v.angle+180)%360;this._writeGlyphs(z,B,E,C,D,0,F,{clipAngle:180/Math.PI*v.angle%360,mapAligned:!0,isLineLabel:!0,minZoom:A});this._writeGlyphs(z,B,E,C,D,0,F,{clipAngle:G,mapAligned:!0,isLineLabel:!0,minZoom:A});z.metricEnd()}_placeCurved(v,A,z){const {out:B,id:D}=this._current,
F=v.clone(),E=180/Math.PI*v.angle%360,C=(180/Math.PI*v.angle+180)%360,G=c.getDisplayIdTexel(D);B.metricStart(new k.LabelMetric(G,v.x,v.y,0,0,this.evaluatedMeshParams.scaleInfo?.maxScale??0,this.evaluatedMeshParams.scaleInfo?.minScale??0,null));this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(F,A,1,E),this._placeBack(v,F,A,z,1,E),this._placeForward(v,F,A,z,1,E));this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(F,
A,0,C),this._placeBack(v,F,A,z,0,C),this._placeForward(v,F,A,z,0,C));B.metricEnd()}_placeStraightAlong(v,A){const {out:z,id:B,shaping:D,zoomRange:F,referenceBounds:E}=this._current,{boxBorderLineColor:C,boxBackgroundColor:G}=this.evaluatedMeshParams,H=v.clone(),K=180/Math.PI*v.angle%360,J=(180/Math.PI*v.angle+180)%360;if(0<D.glyphs.length&&(C||G)){var O=Math.max(A,F[0],0),Q=Math.min(w.maxLabelZoom,F[1]),T=h.fromRotation(m.create(),-v.angle);O={minZoom:O,maxZoom:Q,clipAngle:K,mapAligned:!0,isLineLabel:!0};
Q=q.pt2px(this.evaluatedMeshParams.offsetX);const L=q.pt2px(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){var I=d.fromValues(Q,-1*L);const [R,V]=D.shapeBackground(h.translate(m.create(),T,I));z.recordStart(this.instanceId,this.attributeLayout,D.glyphs[0].textureBinding);I=2*Math.max(R.width,R.height);z.recordBounds(v.x+R.x,v.y+R.y,I,I);this._writeTextBox(z,B,v.x,v.y,V,E,O);z.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==
this._current.offsetDirection){Q=d.fromValues(Q,L);const [R,V]=D.shapeBackground(h.translate(m.create(),T,Q));O.clipAngle=J;z.recordStart(this.instanceId,this.attributeLayout,D.glyphs[0].textureBinding);T=2*Math.max(R.width,R.height);z.recordBounds(v.x+R.x,v.y+R.y,T,T);this._writeTextBox(z,B,v.x,v.y,V,E,O);z.recordEnd()}}T=c.getDisplayIdTexel(B);z.metricStart(new k.LabelMetric(T,v.x,v.y,0,0,this.evaluatedMeshParams.scaleInfo?.maxScale??0,this.evaluatedMeshParams.scaleInfo?.minScale??0,null));this._verticalPlacement&&
this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(H,A,1,K,!0);this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(H,A,0,J,!0);z.metricEnd()}_placeBack(v,A,z,B,D,F){const E=v.clone();for(v=v.backwardLength+0;E.prev()&&!(v>=B);)this._placeOnSegment(E,A,v,z,-1,D,F),v+=E.length+0}_placeForward(v,A,z,B,D,F){const E=v.clone();for(v=v.remainingLength+0;E.next()&&!(v>=B);)this._placeOnSegment(E,A,v,z,1,D,F),v+=E.length+0}_placeFirst(v,
A,z,B,D=!1){const {out:F,id:E,shaping:C,zoomRange:G,referenceBounds:H}=this._current;var K=C.glyphs;for(const J of K)K=J.x>C.bounds.x?z:1-z,K=Math.max(0,this._zoomLevel+Math.log2(Math.abs(J.x+J.width/2-C.bounds.x)/(K*v.remainingLength+(1-K)*v.backwardLength))),K=Math.max(A,D?0:K),J.maxZoom=Math.min(G[1],w.maxLabelZoom),J.angle=v.angle+(1-z)*Math.PI,J.minZoom=Math.max(G[0],K),this._writeLineGlyph(F,E,v.x,v.y,C.bounds,J,B,H,!0),z&&this._isVisible(J.minZoom,J.maxZoom)&&F.metricBoxWrite(J.bounds)}_placeOnSegment(v,
A,z,B,D,F,E){const {out:C,id:G,shaping:H,referenceBounds:K}=this._current;var J=H.glyphs,O=v.x+v.dx/v.length*-D*z,Q=v.y+v.dy/v.length*-D*z;for(const I of J)if((J=I.x>H.bounds.x?F:1-F)&&1===D||!J&&-1===D){var T=Math.abs(I.x+I.width/2-H.bounds.x);J=Math.max(0,this._zoomLevel+Math.log2(T/z)-.1);T=Math.max(B,this._zoomLevel+Math.log2(T/(z+v.length+0)));0!==J&&(I.angle=v.angle+(1-F)*Math.PI,I.minZoom=T,I.maxZoom=J,this._writeLineGlyph(C,G,O,Q,H.bounds,I,E,K,!0),F&&this._isVisible(I.minZoom,I.maxZoom)&&
(J=I.bounds,J=new r(J.center[0]+(v.x-A.x),J.center[1]+(v.y-A.y),J.width,J.height),C.metricBoxWrite(J)))}}_writeLineGlyph(v,A,z,B,D,F,E,C,G){const H=z+D.x,K=B+D.y;D=2*Math.max(D.width,D.height)*(this.evaluatedMeshParams.minPixelBuffer?this.evaluatedMeshParams.minPixelBuffer/this._textMeshTransformProps.fontSize:1);v.recordStart(this.instanceId,this.attributeLayout,F.textureBinding);v.recordBounds(H,K,D,D);const {texcoords:J,offsets:O}=F;this._writeQuad(v,A,z,B,{texcoords:J,offsets:O,fontSize:this._textMeshTransformProps.fontSize,
color:t.processColorInput(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:C,minZoom:Math.max(this._current.zoomRange[0],F.minZoom),maxZoom:Math.min(this._current.zoomRange[1],F.maxZoom),clipAngle:E,mapAligned:G,isLineLabel:!0});v.recordEnd()}_isVisible(v,A){const z=this._zoomLevel;return v<=z&&z<=A}}e.LabelMeshWriter=x;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/DisplayId":function(){define(["exports"],function(e){e.aggregateValidFiltersMask=
254;e.createDisplayId=function(g,q){return((q?8388608:0)|g)>>>0};e.displayIdTexelMask=8388607;e.displayIdTypeAggregate=1;e.displayIdTypeFeature=0;e.displayIdTypeMask=8388608;e.getDisplayIdFilterMask=g=>1===(g&8388608)>>>23?254:255;e.getDisplayIdTexel=g=>g&8388607;e.getDisplayIdType=g=>(g&8388608)>>>23;e.isAggregateId=function(g){return 1===(g&8388608)>>>23};e.nonAggregateValidFiltersMask=255;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/mesh/templates/segmentUtils":function(){define(["exports",
"../../../../../../symbols/cim/constants"],function(e,g){function q(f,n,c){f[0]=n[0]-c[0];f[1]=n[1]-c[1];return f}function h(f){var n=f[0];var c=f[1];n=Math.sqrt(n*n+c*c);f[0]/=n;f[1]/=n}function m(f){return f.length-1}function l(f){let n=0;for(let c=0;c<m(f);c++)n+=d(f,c);return n}function d(f,n,c=1){let [r,k]=f[n+1];[r,k]=[Math.round(r),Math.round(k)];return Math.sqrt(r*r+k*k)*c}function b(f,n,c,r,k){if(!(c<n)){var p=r.clone().seek(c/2);null!=p&&(f(p.clone(),c,k),c=(c-n)/2,p=p.seek(n/2),b(f,n,c,
r,k+1),b(f,n,c,p,k+1))}}class a{constructor(f,n,c,r,k){this._segments=f;this._index=n;this._distance=c;this._xStart=r;this._yStart=k;this._done=!1}static create(f){return new a(f,0,0,f[0][0],f[0][1])}clone(){return new a(this._segments,this._index,this._distance,this.xStart,this.yStart)}equals(f){return this._index===f._index||f._index===this._index-1&&(0===this._distance||1===f._distance)||f._index===this._index+1&&(1===this._distance||0===f._distance)}leq(f){return this._index<f._index||this._index===
f._index&&this._distance<=f._distance}geq(f){return this._index>f._index||this._index===f._index&&this._distance>=f._distance}get _segment(){return this._segments[this._index+1]}get angle(){const f=this.dy;let n=Math.acos((0*f+-1*-this.dx)/(1*this.length));0<f&&(n=2*Math.PI-n);return n}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+
.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const {dx:f,dy:n}=this;return Math.sqrt(f*f+n*n)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return 0<=this._index-1}hasNext(){return this._index+1<m(this._segments)}next(){if(!this.hasNext())return null;this._xStart+=
this.dx;this._yStart+=this.dy;this._distance=0;this._index+=1;return this}prev(){if(!this.hasPrev())return this._done=!0,null;--this._index;this._xStart-=this.dx;this._yStart-=this.dy;this._distance=1;return this}_seekBackwards(f,n){var c=this.backwardLength;if(f<=c)return this._distance=(c-f)/this.length,this;for(c=this.backwardLength;this.prev();){if(c+this.length>f)return this._seekBackwards(f-c);c+=this.length}this._distance=0;return n?this:null}seek(f,n=!1){if(0>f)return this._seekBackwards(Math.abs(f),
n);if(f<=this.remainingLength)return this._distance=(this.backwardLength+f)/this.length,this;let c=this.remainingLength;for(;this.next();){if(c+this.length>f)return this.seek(f-c,n);c+=this.length}this._distance=1;return n?this:null}}e.SegmentCursor=a;e.pathDivide=function(f,n,c,r=!0){const k=l(f);f=a.create(f);const p=k/2;if(r){r=Math.floor(Math.max((k-n)/2,0)/n);f.seek(p-r*n);for(let t=-r;t<=r;t++)Math.abs(f.x)<g.maxTileCoordValue&&Math.abs(f.y)<g.maxTileCoordValue&&c(f.clone(),t,p+t*n,k),f.seek(n)}else f.seek(p),
Math.abs(f.x)<g.maxTileCoordValue&&Math.abs(f.y)<g.maxTileCoordValue&&c(f.clone(),0,p+0*n,k)};e.pathLength=l;e.pathSubdivide=function(f,n,c){b(c,n,l(f),a.create(f),0)};e.segmentAt=function(f,n){return f[n+1]};e.segmentCount=m;e.segmentLength=d;e.smoothPaths=function(f,n){for(let G=0;G<f.length;G++){let H=f[G];a:{var c=H,r=n;if(0>=r)break a;const K=c.length;if(3>K)break a;const J=[];var k=0;J.push(0);for(var p=1;p<K;p++){var t=c[p],w=c[p-1],u=t[0]-w[0];t=t[1]-w[1];k+=Math.sqrt(u*u+t*t);J.push(k)}r=
Math.min(r,.2*k);p=[];p.push(c[0][0]);p.push(c[0][1]);k=c[K-1][0];u=c[K-1][1];t=q([0,0],c[0],c[1]);h(t);c[0][0]+=r*t[0];c[0][1]+=r*t[1];q(t,c[K-1],c[K-2]);h(t);c[K-1][0]+=r*t[0];c[K-1][1]+=r*t[1];for(t=1;t<K;t++)J[t]+=r;J[K-1]+=r;t=.5*r;for(w=1;w<K-1;w++){let O=0,Q=0,T=0;for(var y=w-1;0<=y&&!(J[y+1]<J[w]-t);y--){var x=t+J[y+1]-J[w],v=J[y+1]-J[y],A=J[w]-J[y]<t?1:x/v;if(1E-6>Math.abs(A))break;var z=A*A,B=A*x-.5*z*v,D=A*v/r,F=c[y+1],E=c[y][0]-F[0],C=c[y][1]-F[1];O+=D/B*(F[0]*A*x+.5*z*(x*E-v*F[0])-z*
A*v*E/3);Q+=D/B*(F[1]*A*x+.5*z*(x*C-v*F[1])-z*A*v*C/3);T+=D}for(y=w+1;y<K&&!(J[y-1]>J[w]+t);y++){x=t-J[y-1]+J[w];v=J[y]-J[y-1];A=J[y]-J[w]<t?1:x/v;if(1E-6>Math.abs(A))break;z=A*A;B=A*x-.5*z*v;D=A*v/r;F=c[y-1];E=c[y][0]-F[0];C=c[y][1]-F[1];O+=D/B*(F[0]*A*x+.5*z*(x*E-v*F[0])-z*A*v*E/3);Q+=D/B*(F[1]*A*x+.5*z*(x*C-v*F[1])-z*A*v*C/3);T+=D}p.push(O/T);p.push(Q/T)}p.push(k);p.push(u);for(let O=0,Q=0;O<K;O++)c[O][0]=p[Q++],c[O][1]=p[Q++]}c=[];c.push(H[0]);for(r=1;r<H.length;r++){const [K,J]=H[r-1],[O,Q]=
H[r];c.push([O-K,Q-J])}H=f[G]=c}return f};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter":function(){define("exports ../../../../../../../core/mathUtils ../../../../../../../core/screenUtils ../../../../../../../geometry/GeometryCursor ../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper ../../../alignmentUtils ../../../definitions ../../../mesh/templates/shapingUtils ../fill/meshWriterUtils ../mesh/loadGeometryEngine ../mesh/MeshWriter ../shaders/constants ./TextParams ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k){const p=[4,4];var t=[16,4];const w={topLeft:t,topRight:t,bottomLeft:t,bottomRight:t};t=[4,2];const u=[4,6],y={topLeft:t,topRight:t,bottomLeft:u,bottomRight:u},x={topLeft:t,topRight:u,bottomLeft:t,bottomRight:u},v={topLeft:u,topRight:u,bottomLeft:p,bottomRight:p},A={topLeft:p,topRight:p,bottomLeft:u,bottomRight:u},z={topLeft:u,topRight:p,bottomLeft:u,bottomRight:p},B={topLeft:p,topRight:u,bottomLeft:p,bottomRight:u},D={createComputedParams:E=>E,optionalAttributes:{zoomRange:{type:k.DataType.UNSIGNED_SHORT,
count:2,packPrecisionFactor:d.minMaxZoomPrecisionFactor,packTessellation:({minZoom:E,maxZoom:C})=>[E||0,C||28]},clipAngle:{type:k.DataType.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:E})=>Math.round(254/360*(E||0))},referenceSymbol:{type:k.DataType.BYTE,count:4,packPrecisionFactor:1,packTessellation:(E,C)=>{if(!E.referenceBounds)return[0,0,0,0];const G=l.getXDirection(C.horizontalAlignment);C=l.getYDirection(C.verticalAlignment);const {offsetX:H,offsetY:K,size:J}=E.referenceBounds;return[q.pt2px(H),
-q.pt2px(K),q.pt2px(J),G+1<<2|C+1]}}},attributes:{pos:{type:k.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:k.DataType.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:k.DataType.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:E,mapAligned:C})=>a.packBitset([[c.bitsetTextIsBackground,E],[c.bitsetTextIsMapAligned,!!C]])},offset:{type:k.DataType.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:E})=>{const {bottomLeft:C,bottomRight:G,
topLeft:H,topRight:K}=E;return[H,K,C,G]}}},textureUV:{type:k.DataType.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,packTessellation:({texcoords:E})=>{const {bottomLeft:C,bottomRight:G,topLeft:H,topRight:K}=E;return[H,K,C,G]}}},color:{type:k.DataType.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:E})=>E},fontSize:{type:k.DataType.UNSIGNED_SHORT,count:1,packPrecisionFactor:4,packTessellation:({fontSize:E})=>q.pt2px(E)},referenceSize:{type:k.DataType.UNSIGNED_BYTE,count:1,
packPrecisionFactor:4,packTessellation:({fontSize:E},{referenceSize:C})=>q.pt2px(C??E)},haloColor:{type:k.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:E})=>a.processColorInput(E)},haloFontSize:{type:k.DataType.UNSIGNED_SHORT,count:1,packPrecisionFactor:4,pack:({haloFontSize:E})=>q.pt2px(E)}}};class F extends n.MeshWriter{constructor(){super(...arguments);this.vertexSpec=D;this._textMeshParamsPropsInitialized=!1}ensurePacked(E,C,G){super.ensurePacked(E,C,G);if(!this._textMeshParamsPropsInitialized||
this._evaluator.hasDynamicProperties)this._textMeshTransformProps=new r.TextMeshTransformProps(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0}_write(E,C,G){const H=this._getShaping();if(H){var K=C.getDisplayId();if(null!=this.evaluatedMeshParams.placement)return this._writePlacedTextMarkers(E,C,H,G);if(G?.nextPath())return G.nextPoint(),this._writeGlyphs(E,K,G.x,G.y,H,0);if("esriGeometryPolygon"===C.geometryType){C=C.readCentroidForDisplay();if(!C)return;const [J,O]=C.coords;return this._writeGlyphs(E,
K,J,O,H,0)}if("esriGeometryMultipoint"===C.geometryType)C.readGeometryForDisplay()?.forEachVertex((J,O)=>this._writeGlyphs(E,K,J,O,H,0));else return G=C.readXForDisplay(),C=C.readYForDisplay(),this._writeGlyphs(E,K,G,C,H,0)}}_writePlacedTextMarkers(E,C,G,H){if(H=H??h.GeometryCursor.fromFeatureSetReaderCIM(C))if(H=m.CIMMarkerPlacementHelper.getPlacement(H,-1,this.evaluatedMeshParams.placement,q.pt2px(1),E.id,f.getGeometryEngine())){C=C.getDisplayId();for(var K=H.next();null!=K;){const J=K.tx,O=-K.ty;
K=-K.getAngle();this._writeGlyphs(E,C,J,O,G,K);K=H.next()}}}_getShaping(E){const C=this._textMeshTransformProps,G=this.evaluatedMeshParams;if(!G.glyphs?.glyphs.length)return null;const H=Math.round(q.pt2px(C.fontSize)),K=q.pt2px(C.offsetX),J=q.pt2px(C.offsetY),O=g.clamp(q.pt2px(G.lineWidth),d.minTextLineWidth,d.maxTextLineWidth),Q=d.magicLabelLineHeight*g.clamp(G.lineHeightRatio,.25,4);return b.shapeGlyphs(G.glyphs,{scale:H/d.glyphSize,angle:C.postAngle,xOffset:K,yOffset:J,horizontalAlignment:G.horizontalAlignment,
verticalAlignment:E||G.verticalAlignment,maxLineWidth:O,lineHeight:Q,decoration:G.decoration,borderLineSizePx:q.pt2px(G.boxBorderLineSize),hasBackground:!!G.boxBackgroundColor,useCIMAngleBehavior:G.useCIMAngleBehavior})}_writeGlyphs(E,C,G,H,K,J,O,Q){const T=this.evaluatedMeshParams;var I=this._textMeshTransformProps;const L=I.fontSize;var R=q.pt2px(I.offsetX),V=q.pt2px(I.offsetY);const [S,X]=a.getMinMaxZoom(T.scaleInfo,this.getTileInfo());0!==J&&K.setRotation(J);I=K.bounds;R=G+I.x+R;V=H+I.y-V;I=2*
Math.max(I.width,I.height)*(T.minPixelBuffer?T.minPixelBuffer/L:1);K.textBox&&(E.recordStart(this.instanceId,this.attributeLayout,K.glyphs[0].textureBinding),E.recordBounds(R,V,I,I),this._writeTextBox(E,C,G,H,K.textBox,O,Q),E.recordEnd());for(const N of K.glyphs){E.recordStart(this.instanceId,this.attributeLayout,N.textureBinding);E.recordBounds(R,V,I,I);const {texcoords:P,offsets:U}=N;this._writeQuad(E,C,G,H,{texcoords:P,offsets:U,fontSize:L,color:a.processColorInput(T.color),isBackground:!1,referenceBounds:O,
minZoom:S,maxZoom:X,...Q});E.recordEnd()}0!==J&&K.setRotation(-J)}_writeTextBox(E,C,G,H,K,J,O){const Q=this.evaluatedMeshParams,{fontSize:T}=this._textMeshTransformProps,{boxBackgroundColor:I,boxBorderLineColor:L}=Q;J={isBackground:!0,fontSize:T,referenceBounds:J,...O};I&&(this._writeQuad(E,C,G,H,{texcoords:w,offsets:K.main,color:a.processColorInput(I),...J}),L||(this._writeQuad(E,C,G,H,{texcoords:v,offsets:K.top,color:a.processColorInput(I),...J}),this._writeQuad(E,C,G,H,{texcoords:A,offsets:K.bot,
color:a.processColorInput(I),...J}),this._writeQuad(E,C,G,H,{texcoords:z,offsets:K.left,color:a.processColorInput(I),...J}),this._writeQuad(E,C,G,H,{texcoords:B,offsets:K.right,color:a.processColorInput(I),...J})));L&&(this._writeQuad(E,C,G,H,{texcoords:y,offsets:K.top,color:a.processColorInput(L),...J}),this._writeQuad(E,C,G,H,{texcoords:y,offsets:K.bot,color:a.processColorInput(L),...J}),this._writeQuad(E,C,G,H,{texcoords:x,offsets:K.left,color:a.processColorInput(L),...J}),this._writeQuad(E,C,
G,H,{texcoords:x,offsets:K.right,color:a.processColorInput(L),...J}))}_writeQuad(E,C,G,H,K){const J=E.vertexCount();this._writeVertex(E,C,G,H,K);E.indexWrite(J+0);E.indexWrite(J+1);E.indexWrite(J+2);E.indexWrite(J+1);E.indexWrite(J+3);E.indexWrite(J+2)}}e.TextMeshWriter=F;e.TextVertexSpec=D;e.maxLabelZoom=28;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/placements/CIMMarkerPlacementHelper":function(){define(["exports","../CIMOperators"],function(e,g){class q{static getPlacement(h,
m,l,d,b,a){const f=g.getPlacementOperator(l);if(!f)return null;-1===m&&h.invertY();return f.execute(h,l,d,b,a)}}e.CIMMarkerPlacementHelper=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/text/TextParams":function(){define(["exports","../../../../../../../symbols/cim/utils"],function(e,g){class q{constructor(h){const {offsetX:m,offsetY:l,postAngle:d,fontSize:b,scaleFactor:a,transforms:f}=h;this.offsetX=m;this.offsetY=l;this.postAngle=
d;this.fontSize=Math.min(b,96);(this.transforms=f)&&1<f.infos.length&&(h=g.applyParentTransform(b,d,!1,m,l,f),this.fontSize=Math.min(h.size,96),this.postAngle=h.rotation,this.offsetX=h.offsetX,this.offsetY=h.offsetY);a&&(this.fontSize*=a,this.offsetX*=a,this.offsetY*=a)}}e.TextMeshTransformProps=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter":function(){define("exports ../../../../../../../geometry/GeometryCursor ../../../definitions ../fill/meshWriterUtils ./LineMeshWriter ../shaders/constants ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d){const b={createComputedParams:f=>f,optionalAttributes:m.LineVertexSpec.optionalAttributes,attributes:{...m.LineVertexSpec.attributes,bitset:{type:d.DataType.UNSIGNED_BYTE,count:1,pack:({shouldSampleAlphaOnly:f,shouldScaleDash:n,isSDF:c})=>h.packBitset([[l.bitsetGenericConsiderAlphaOnly,f],[l.bitsetLineScaleDash,n],[l.bitsetLineIsSdf,c]])},tlbr:{type:d.DataType.UNSIGNED_SHORT,count:4,pack:({sprite:f})=>{const {rect:n,width:c,height:r}=f;f=n.x+q.spritePadding;const k=n.y+q.spritePadding;
return[f,k,f+c,k+r]}},accumulatedDistance:{type:d.DataType.UNSIGNED_SHORT,count:1,packTessellation:({distance:f})=>f},segmentDirection:{type:d.DataType.BYTE,count:2,packPrecisionFactor:16,packTessellation:({directionX:f,directionY:n})=>[f,n]}}};class a extends m.LineMeshWriter{constructor(f,n,c,r){super(f,n,c,r);this.vertexSpec=b;this._tessellationOptions.textured=!0}_write(f,n,c){if(c=c??g.GeometryCursor.fromFeatureSetReaderCIM(n)){var {sprite:r}=this.evaluatedMeshParams;this._writeGeometry(f,n,
c,r?.textureBinding)}}}e.TexturedLineMeshWriter=a;e.texturedLineVertexSpec=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter":function(){define("exports ../../../../../../../core/screenUtils ../../../../../../../core/libs/gl-matrix-2/math/mat2d ../../../../../../../core/libs/gl-matrix-2/factories/mat2df32 ../../../../../../../core/libs/gl-matrix-2/math/vec2 ../../../../../../../geometry/GeometryCursor ../../../../../../../symbols/cim/constants ../../../../../../../symbols/cim/enums ../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper ../../../definitions ../fill/meshWriterUtils ./ComputedMarkerParams ./markerConstants ../mesh/loadGeometryEngine ../mesh/MeshWriter ../../../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t){function w(A,z,B,D,F=!1){A=h.create();F=F?1:-1;q.identity(A);(z||B)&&q.translate(A,A,[z,-B]);D&&q.rotate(A,A,F*u*-D);return A}const u=3.14159265359/180,y=128/Math.PI,x={createComputedParams:A=>c.ComputedMarkerParams.from(A),optionalAttributes:{zoomRange:{type:t.DataType.SHORT,count:2,packPrecisionFactor:f.minMaxZoomPrecisionFactor,pack:({scaleInfo:A},{tileInfo:z})=>n.getMinMaxZoom(A,z)}},attributes:{pos:{type:t.DataType.SHORT,count:2,pack:"position",packPrecisionFactor:10},
id:{type:t.DataType.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:t.DataType.UNSIGNED_BYTE,count:1,pack:({sprite:A,alignment:z,scaleSymbolsProportionally:B,overrideOutlineColor:D,colorLocked:F})=>{let E=0;A.sdf&&(E|=n.getBitMask(r.MarkerConstants.bitset.isSDF));z===b.Alignment.MAP&&(E|=n.getBitMask(r.MarkerConstants.bitset.isMapAligned));B&&(E|=n.getBitMask(r.MarkerConstants.bitset.scaleSymbolsProportionally));D&&(E|=n.getBitMask(r.MarkerConstants.bitset.overrideOutlineColor));F&&(E|=n.getBitMask(r.MarkerConstants.bitset.colorLocked));
return E}},offset:{type:t.DataType.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:({angle:A,computedWidth:z,computedHeight:B,anchorX:D,anchorY:F,offsetX:E,offsetY:C,rotateClockwise:G})=>{A=w(0,E,C,-A,G);D=-(.5+D)*z;G=-(.5-F)*B;F=[D,G];E=[D+z,G];C=[D,G+B];z=[D+z,G+B];m.transformMat2d(F,F,A);m.transformMat2d(E,E,A);m.transformMat2d(C,C,A);m.transformMat2d(z,z,A);return[F,E,C,z]}}},textureUV:{type:t.DataType.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:({texXmax:A,
texXmin:z,texYmax:B,texYmin:D})=>[[z,D],[A,D],[z,B],[A,B]]}},color:{type:t.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:A})=>n.processColorInput(A)},outlineColor:{type:t.DataType.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:A})=>n.processColorInput(A)},sizing:{type:t.DataType.UNSIGNED_BYTE,count:4,pack:({rawWidth:A,rawHeight:z,outlineSize:B,referenceSize:D})=>[n.packByteSqrt(Math.max(A,z),128),n.packByteSqrt(B,128),n.packByteSqrt(D,128),0]},placementAngle:{type:t.DataType.UNSIGNED_BYTE,
count:1,packTessellation:({placementAngle:A})=>{A*=y;A%=256;return Math.abs(0<=A?A:A+256)}},sizeRatio:{type:t.DataType.UNSIGNED_SHORT,count:1,packPrecisionFactor:64,pack:({sizeRatio:A})=>A}}};class v extends p.MeshWriter{constructor(){super(...arguments);this.vertexSpec=x}getBoundsInfo(){return this.evaluatedMeshParams.boundsInfo}_write(A,z,B){var D=this.evaluatedMeshParams.sprite?.textureBinding;const F=z.getDisplayId();A.recordStart(this.instanceId,this.attributeLayout,D);D=this.evaluatedMeshParams.minPixelBuffer;
const E=Math.max(this.evaluatedMeshParams.computedWidth,D),C=Math.max(this.evaluatedMeshParams.computedHeight,D),G=this.evaluatedMeshParams.offsetX,H=-this.evaluatedMeshParams.offsetY;if(null!=this.evaluatedMeshParams.placement)this._writePlacedMarkers(A,z,B,E,C);else if(B?.nextPath())B.nextPoint(),z=B.x,B=B.y,A.recordBounds(z+G,B+H,E,C),this._writeQuad(A,F,z,B);else if("esriGeometryPolygon"===z.geometryType){z=z.readCentroidForDisplay();if(!z)return;const [K,J]=z.coords;A.recordBounds(K+G,J+H,E,
C);this._writeQuad(A,F,K,J)}else"esriGeometryPoint"===z.geometryType?(B=z.readXForDisplay(),z=z.readYForDisplay(),A.recordBounds(B+G,z+H,E,C),this._writeQuad(A,F,B,z)):z.readGeometryForDisplay()?.forEachVertex((K,J)=>{A.recordBounds(K+G,J+H,E,C);Math.abs(K)>d.maxTileCoordValue||Math.abs(J)>d.maxTileCoordValue||this._writeQuad(A,F,K,J)});A.recordEnd()}_writePlacedMarkers(A,z,B,D,F){if(B=B??l.GeometryCursor.fromFeatureSetReaderCIM(z)?.clone())if(B=a.CIMMarkerPlacementHelper.getPlacement(B,-1,this.evaluatedMeshParams.placement,
g.pt2px(1),A.id,k.getGeometryEngine())){z=z.getDisplayId();for(var E=B.next(),C=this.evaluatedMeshParams.offsetX,G=-this.evaluatedMeshParams.offsetY;null!=E;){const H=E.tx,K=-E.ty;Math.abs(H)>d.maxTileCoordValue||Math.abs(K)>d.maxTileCoordValue?E=B.next():(E=-E.getAngle(),A.recordBounds(H+C,K+G,D,F),this._writeQuad(A,z,H,K,E),E=B.next())}}}_writeQuad(A,z,B,D,F){const E=A.vertexCount();this._writeVertex(A,z,B,D,null==F?null:{placementAngle:F});A.indexWrite(E+0);A.indexWrite(E+1);A.indexWrite(E+2);
A.indexWrite(E+1);A.indexWrite(E+3);A.indexWrite(E+2)}}e.MarkerMeshWriter=v;e.MarkerVertexSpec=x;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams":function(){define(["exports","../../../../../../../core/screenUtils","../../../../../../../symbols/cim/enums","../../../../../../../symbols/cim/utils","../../../definitions"],function(e,g,q,h,m){class l{static from(d){return"width"in d?this.fromSimpleMeshParams(d):
this.fromComplexMeshParams(d)}static fromSimpleMeshParams(d){const b=new l(d.sprite,d.color,d.outlineColor,d.minPixelBuffer,d.placement,d.scaleInfo,d.effects),{type:a,width:f,height:n,angle:c,alignment:r,outlineSize:k,referenceSize:p,sprite:t,overrideOutlineColor:w}=d;b.rawWidth=g.pt2px(f);b.rawHeight=g.pt2px(n);b.angle=c;b.alignment=r;b.outlineSize=g.pt2px(k);b.referenceSize=g.pt2px(p);b.overrideOutlineColor=w;b.offsetX=g.pt2px(d.offsetX);b.offsetY=g.pt2px(d.offsetY);"simple"!==a||t.sdf||(b.rawWidth=
t.width,b.rawHeight=t.height);b.sizeRatio=t.sdf?2:1;b._computeSize(d,!1);return b}static fromComplexMeshParams(d){const b=new l(d.sprite,d.color,d.outlineColor,d.minPixelBuffer,d.placement,d.scaleInfo,d.effects);let {alignment:a,transforms:f,size:n,scaleX:c,anchorX:r,anchorY:k,angle:p,colorLocked:t,frameHeight:w,widthRatio:u,offsetX:y,offsetY:x,outlineSize:v,referenceSize:A,scaleFactor:z,sizeRatio:B,isAbsoluteAnchorPoint:D,rotateClockwise:F,scaleSymbolsProportionally:E,sprite:C}=d;if(f&&0<f.infos.length){var G=
h.applyParentTransform(n,p,F,y,x,f);n=G.size;p=G.rotation;y=G.offsetX;x=G.offsetY;F=!1}z&&(n*=z,y*=z,x*=z);G=C.width/C.height*c;b.alignment=a;b.rawHeight=g.pt2px(n);b.rawWidth=b.rawHeight*G;b.referenceSize=g.pt2px(A);b.sizeRatio=B;b.angle=p;b.rotateClockwise=F;b.anchorX=r;b.anchorY=k;b.offsetX=g.pt2px(y);b.offsetY=g.pt2px(x);D&&n&&(b.anchorX=C.sdf?r/(n*u):r/(n*G),b.anchorY=k/n);G=E&&w?n/w:1;b.outlineSize=0===v||isNaN(v)?0:g.pt2px(v)*G;b.scaleSymbolsProportionally=E;b.colorLocked=t;b._computeSize(d,
!0);return b}constructor(d,b,a,f,n,c,r){this.sprite=d;this.color=b;this.outlineColor=a;this.minPixelBuffer=f;this.placement=n;this.scaleInfo=c;this.effects=r;this.referenceSize=this.outlineSize=this.angle=this.rawHeight=this.rawWidth=0;this.sizeRatio=1;this.alignment=q.Alignment.SCREEN;this.colorLocked=this.overrideOutlineColor=this.scaleSymbolsProportionally=!1;this.offsetY=this.offsetX=this.texYmax=this.texXmax=this.texYmin=this.texXmin=this.computedHeight=this.computedWidth=this.anchorY=this.anchorX=
0;this.rotateClockwise=!0}get boundsInfo(){return{size:Math.max(this.computedHeight,this.computedWidth),offsetX:this.offsetX,offsetY:this.offsetY}}_computeSize(d,b){const {sprite:a,hasSizeVV:f}=d;var n=!!a.sdf;const {rawWidth:c,rawHeight:r,sizeRatio:k,outlineSize:p}=this;d=c*k;const t=r*k;if(n&&!f){var w=p+2;this.computedWidth=Math.min((b&&c>r?d:c)+w,d);this.computedHeight=Math.min(r+w,t)}else this.computedWidth=d,this.computedHeight=t;b=n?Math.max(a.width,a.height)/Math.max(d,t):1;w=.5*(d-this.computedWidth)*
b;var u=.5*(t-this.computedHeight)*b;b=a.rect.x+m.spritePadding+w;n=a.rect.y+m.spritePadding+u;w=b+a.width-2*w;u=n+a.height-2*u;this.texXmin=Math.floor(b);this.texYmin=Math.floor(n);this.texXmax=Math.ceil(w);this.texYmax=Math.ceil(u);this.computedWidth*=(this.texXmax-this.texXmin)/(w-b);this.computedHeight*=(this.texYmax-this.texYmin)/(u-n);this.anchorX*=d/this.computedWidth;this.anchorY*=t/this.computedHeight}}e.ComputedMarkerParams=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator":function(){define("exports ../../../../../../../core/arrayUtils ../../../../../../../core/Error ../../../../../../../core/lang ../../../../../../../core/Logger ../../../grouping ./utils ../../../../../layers/features/support/DictionaryValue".split(" "),function(e,g,q,h,m,l,d,b){async function a(k,p,t=!1){const {defaultValue:w,valueExpressionInfo:u,value:y}=p;if(u){const {expression:x}=u;return(k=await k.createComputedField({expression:x},
t))?{...p,computed:k,defaultValue:w}:null}return{...p,computed:new b.DictionaryValue(y),defaultValue:w}}async function f(k,p){const {defaultValue:t,valueExpressionInfo:w}=p,{expression:u}=w;return(k=await k.createComputedField({expression:u}))?{...p,computed:k,defaultValue:t}:null}const n=k=>"boolean"!==typeof k&&"number"!==typeof k&&"valueExpressionInfo"in k,c=k=>k.some(p=>{for(const t in p)if(n(p[t]))return!0;return!1});class r{static async create(k,p,t){const w={},u=new Map,y=new Map,x=new Map,
v=new Map,A=new Map;for(const B in t){const D=t[B];if(null==D||"object"!==typeof D)w[B]=D;else if(Array.isArray(D)){if("object"===typeof D[0])throw Error(`InternalError: Cannot handle ${B}. Nested array params are not supported`);w[B]=D}else if("valueExpressionInfo"in D)if(D.value)w[B]=D.value;else{var z=await f(k,D);z?(u.set(B,z),w[B]=null):w[B]=D.defaultValue}else switch(D.type){case "cim-effect-infos":if(D.effectInfos.some(F=>F.overrides.length)){y.set(B,{effects:await Promise.all(D.effectInfos.map(async F=>
{const E=F.overrides.map(C=>a(k,C));return{effect:F.effect,compiledOverrides:(await Promise.all(E)).filter(g.isSome)}}))});break}w[B]=D.effectInfos.map(F=>F.effect);break;case "cim-marker-placement-param":D.overrides.length&&x.set(B,{placementInfo:D,compiledOverrides:(await Promise.all(D.overrides.map(F=>a(k,F)))).filter(g.isSome)});w[B]=D.placement;break;case "text-rasterization-param":if(D.overrides.length){z=D.overrides.map(F=>a(k,F,D.useLegacyLabelEvaluationRules));v.set(B,{compiledOverrides:(await Promise.all(z)).filter(g.isSome),
rasterizationParam:D,objectIdToResourceId:new Map});continue}w[B]=await p.fetchResourceImmediate({type:"cim-rasterization-info",resource:D.resource})??null;break;case "sprite-rasterization-param":if(D.overrides.length){z=D.overrides.map(F=>a(k,F));v.set(B,{compiledOverrides:(await Promise.all(z)).filter(g.isSome),rasterizationParam:D,objectIdToResourceId:new Map});continue}if("animated"===D.resource.type){v.set(B,{compiledOverrides:[],rasterizationParam:D,objectIdToResourceId:new Map});continue}w[B]=
await p.fetchResourceImmediate({type:"cim-rasterization-info",resource:D.resource})??null;break;case "cim-marker-transform-param":({params:z}=D);if(c(z)){const F={compiledMarkerInfos:[]};await Promise.all(z.map(async E=>{const C={props:{}};for(const G in E)if(n(E[G])){const H=await f(k,E[G]);C.compiledExpressionMap||(C.compiledExpressionMap=new Map);const K=C.compiledExpressionMap;H&&K.set(G,H)}else C.props[G]=E[G];F.compiledMarkerInfos.push(C)}));A.set(B,F)}else w[B]={type:"cim-marker-transform-info",
infos:z};break;default:w[B]=D}}return new r(t,w,u,y,x,v,A)}constructor(k,p,t,w,u,y,x){this.inputMeshParams=k;this._resolvedMeshParams=p;this._dynamicProperties=t;this._dynamicEffectProperties=w;this._dynamicPlacementProperties=u;this._dynamicAsyncProperties=y;this._dynamicTransformProperties=x;this.evaluator=v=>v}get hasDynamicProperties(){return!!(this._dynamicProperties.size||this._dynamicAsyncProperties.size||this._dynamicEffectProperties.size||this._dynamicTransformProperties.size||this._dynamicPlacementProperties.size)}get evaluatedMeshParams(){this._evaluatedMeshParams||
(this._evaluatedMeshParams=this.evaluator(this._resolvedMeshParams));return this._evaluatedMeshParams}enqueueRequest(k,p,t){for(const u of this._dynamicAsyncProperties.values()){var w=h.clone(u.rasterizationParam.resource);"animated"===u.rasterizationParam.resource.type&&u.rasterizationParam.resource.randomizeStartTime&&(w.primitiveName="__RESERVED__PRIMITIVE__NAME__",w.startGroup=l.getStartGroup(p.getObjectId()||0));for(const {primitiveName:y,propertyName:x,computed:v,defaultValue:A,valueExpressionInfo:z}of u.compiledOverrides)try{d.applyComputedValue(w,
"animated"===u.rasterizationParam.resource.type?w.primitiveName:y,x,v,p,t,A)}catch(B){m.getLogger("esri.views.2d.engine.webgl.shaderGraph.techniques.mesh.MeshWriterInputEvaluator").errorOnce(new q("invalid-arcade-expression",`Encountered an error when evaluating the arcade expression '${z?.expression}' (primitive: '${y}', property: '${x}')`,B))}w=k.enqueueRequest({type:"cim-rasterization-info",resource:w});u.objectIdToResourceId.set(p.getObjectId(),w)}}evaluateMeshParams(k,p,t){for(const [y,x]of this._dynamicProperties.entries())this._resolvedMeshParams[y]=
x.computed.readWithDefault(p,t,x.defaultValue);for(const [y,x]of this._dynamicPlacementProperties.entries())for(const {computed:v,defaultValue:A,propertyName:z}of x.compiledOverrides){var w=v.readWithDefault(p,t,A);x.placementInfo.placement[z]=w;this._resolvedMeshParams[y]=x.placementInfo.placement}for(const [y,x]of this._dynamicEffectProperties.entries())for(var u of x.effects){for(const {computed:v,defaultValue:A,propertyName:z}of u.compiledOverrides)w=v.readWithDefault(p,t,A),u.effect[z]=w;this._resolvedMeshParams[y]=
x.effects.map(v=>v.effect)}for(const [y,x]of this._dynamicTransformProperties.entries()){u={type:"cim-marker-transform-info",infos:[]};for(const v of x.compiledMarkerInfos){w={...v.props};if(v.compiledExpressionMap)for(const [A,z]of v.compiledExpressionMap){const B=z.computed.readWithDefault(p,t,z.defaultValue);w[A]="number"===typeof B||"boolean"===typeof B?B:z.defaultValue}u.infos.push(w)}this._resolvedMeshParams[y]=u}for(const [y,x]of this._dynamicAsyncProperties.entries())t=x.objectIdToResourceId.get(p.getObjectId()),
null!=t&&(t=k.getResource(t),this._resolvedMeshParams[y]=t);this._evaluatedMeshParams=this.evaluator(this._resolvedMeshParams);return this.evaluatedMeshParams}}e.MeshWriterInputEvaluator=r;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/DictionaryValue":function(){define(["exports","./AComputedField"],function(e,g){class q extends g.AComputedField{constructor(h){super();this._value=h}resize(h){}read(h,m){return this._value}readWithDefault(h,m,
l){return this._value}referencesScale(){return!1}referencesGeometry(){return!1}}e.DictionaryValue=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/AComputedField":function(){define(["exports"],function(e){class g{destroy(){}}e.AComputedField=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter":function(){define(["exports","../../../../../../../core/screenUtils",
"../fill/meshWriterUtils","../mesh/MeshWriter","../../../../../../webgl/enums"],function(e,g,q,h,m){const l={createComputedParams:b=>b,optionalAttributes:{},attributes:{pos:{type:m.DataType.SHORT,count:2,packPrecisionFactor:10,pack:"position"},id:{type:m.DataType.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:m.DataType.UNSIGNED_BYTE,count:1,pack:b=>0},offset:{type:m.DataType.SHORT,count:2,packPrecisionFactor:16,packAlternating:{count:4,pack:({size:b})=>{b=g.pt2px(b);const a=-b/2,f=-b/2;return[[a,
f],[a+b,f],[a,f+b],[a+b,f+b]]}}},texCoords:{type:m.DataType.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:()=>[[0,1],[1,1],[0,0],[1,0]]}},size:{type:m.DataType.UNSIGNED_BYTE,count:2,pack:({size:b})=>[b,b]},referenceSize:{type:m.DataType.UNSIGNED_BYTE,count:1,pack:({size:b})=>g.pt2px(b)},zoomRange:{type:m.DataType.UNSIGNED_BYTE,count:2,pack:({scaleInfo:b},{tileInfo:a})=>q.getMinMaxZoom(b,a)}}};class d extends h.MeshWriter{constructor(){super(...arguments);this.vertexSpec=l}_write(b,
a){const f=a.getDisplayId();var n=this.evaluatedMeshParams.minPixelBuffer,c=Math.max(g.pt2px(this.evaluatedMeshParams.size),n);if("esriGeometryPoint"===a.geometryType)n=a.readXForDisplay(),a=a.readYForDisplay();else{a=a.readCentroidForDisplay();if(!a)return;n=a?.coords[0];a=a?.coords[1]}b.recordStart(this.instanceId,this.attributeLayout);b.recordBounds(n,a,c,c);c=b.vertexCount();this._writeVertex(b,f,n,a);b.indexWrite(c+0);b.indexWrite(c+1);b.indexWrite(c+2);b.indexWrite(c+1);b.indexWrite(c+3);b.indexWrite(c+
2);b.recordEnd()}}e.PieChartMeshWriter=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/RenderingContext":function(){define("exports ../../core/maybe ../../core/promiseUtils ../../core/time ./checkWebGLError ./ContextState ./enums ./InstanceCounter ./Parameters ./ProgramCache ./renderState ./Texture ./Util ./WebGLDriverTest ./capabilities/Capabilities".split(" "),function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p){function t(u,y,x,v){y?v!==y&&u.bindBuffer(x,y.glName):u.bindBuffer(x,
null);return y}function w(u,y){switch(u){case d.PrimitiveType.POINTS:return 2*y;case d.PrimitiveType.TRIANGLES:return y/3;case d.PrimitiveType.TRIANGLE_STRIP:return y-2;case d.PrimitiveType.TRIANGLE_FAN:return y-2;default:return 0}}e.RenderingContext=class{constructor(u,y){this.gl=u;this.instanceCounter=new b.InstanceCounter;this.programCache=new f.ProgramCache(this);this._transformFeedbackRequestInfo=null;this._state=new l.ContextState;this._numOfTriangles=this._numOfDrawCalls=0;this._loadExtensions();
this.configure(y)}configure(u){this._capabilities=new p.Capabilities(this.gl,u);this._parameters=new a.Parameters(this.gl,this._capabilities,u);c.Texture.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;u=this.gl.getParameter(this.gl.VIEWPORT);this._state=new l.ContextState;this._state.viewport={x:u[0],y:u[1],width:u[2],height:u[3]};this._stateTracker=new n.StateTracker({setBlending:y=>{y?(this.setBlendingEnabled(!0),this.setBlendEquationSeparate(y.opRgb,y.opAlpha),this.setBlendFunctionSeparate(y.srcRgb,
y.dstRgb,y.srcAlpha,y.dstAlpha),y=y.color,this.setBlendColor(y.r,y.g,y.b,y.a)):this.setBlendingEnabled(!1)},setCulling:y=>{y?(this.setFaceCullingEnabled(!0),this.setCullFace(y.face),this.setFrontFace(y.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:y=>{y?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(y.factor,y.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:y=>{y?(this.setDepthTestEnabled(!0),this.setDepthFunction(y.func)):this.setDepthTestEnabled(!1)},setStencilTest:y=>
{if(y){this.setStencilTestEnabled(!0);const x=y.function;this.setStencilFunction(x.func,x.ref,x.mask);y=y.operation;this.setStencilOp(y.fail,y.zFail,y.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:y=>{y?(this.setDepthWriteEnabled(!0),this.setDepthRange(y.zNear,y.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:y=>{y?this.setColorMask(y.r,y.g,y.b,y.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:y=>{y?this.setStencilWriteMask(y.mask):this.setStencilWriteMask(0)},setDrawBuffers:y=>
{y?this.setDrawBuffers(y.buffers):({drawFramebuffer:y}=this._state,null===y?this.setDrawBuffers([d.SpecialDrawBuffers.BACK]):0===y.colorAttachments.length?this.setDrawBuffers([d.SpecialDrawBuffers.NONE]):this.setDrawBuffers([d.ColorAttachment.COLOR_ATTACHMENT0]))}});this.enforceState();g.disposeMaybe(this._driverTest);this._driverTest=new k.WebGLDriverTest(this)}dispose(){g.disposeMaybe(this._driverTest);this.programCache.dispose();this.bindVAO(null);this.unbindBuffer(d.BufferType.ARRAY_BUFFER);this.unbindBuffer(d.BufferType.ELEMENT_ARRAY_BUFFER);
this.unbindBuffer(d.BufferType.UNIFORM_BUFFER);this._state.uniformBufferBindingPoints.length=0;this.unbindBuffer(d.BufferType.PIXEL_PACK_BUFFER);this.unbindBuffer(d.BufferType.PIXEL_UNPACK_BUFFER);this.unbindBuffer(d.BufferType.COPY_READ_BUFFER);this.unbindBuffer(d.BufferType.COPY_WRITE_BUFFER);this._state.textureUnitMap.length=0;m.webglDebugEnabled()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}setPipelineState(u){this._stateTracker.setPipeline(u)}setBlendingEnabled(u){this._state.blend!==
u&&(!0===u?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=u,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop();this._state.program=null}externalTextureUnitUpdate(u,y){for(let x=0;x<u.length;++x)this._state.textureUnitMap[u[x]]=null;0<=y&&(this._state.activeTexture=y)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null);this._state.vertexArrayObject=null;this._state.vertexBuffer=null;this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=
null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(u,y,x,v){if(u!==this._state.blendColor.r||y!==this._state.blendColor.g||x!==this._state.blendColor.b||v!==this._state.blendColor.a)this.gl.blendColor(u,y,x,v),this._state.blendColor.r=u,this._state.blendColor.g=y,this._state.blendColor.b=x,this._state.blendColor.a=v,this._stateTracker.invalidateBlending()}setBlendFunction(u,y){if(u!==this._state.blendFunction.srcRGB||y!==this._state.blendFunction.dstRGB)this.gl.blendFunc(u,
y),this._state.blendFunction.srcRGB=u,this._state.blendFunction.srcAlpha=u,this._state.blendFunction.dstRGB=y,this._state.blendFunction.dstAlpha=y,this._stateTracker.invalidateBlending()}setBlendFunctionSeparate(u,y,x,v){if(this._state.blendFunction.srcRGB!==u||this._state.blendFunction.srcAlpha!==x||this._state.blendFunction.dstRGB!==y||this._state.blendFunction.dstAlpha!==v)this.gl.blendFuncSeparate(u,y,x,v),this._state.blendFunction.srcRGB=u,this._state.blendFunction.srcAlpha=x,this._state.blendFunction.dstRGB=
y,this._state.blendFunction.dstAlpha=v,this._stateTracker.invalidateBlending()}setBlendEquation(u){this._state.blendEquation.mode!==u&&(this.gl.blendEquation(u),this._state.blendEquation.mode=u,this._state.blendEquation.modeAlpha=u,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(u,y){if(this._state.blendEquation.mode!==u||this._state.blendEquation.modeAlpha!==y)this.gl.blendEquationSeparate(u,y),this._state.blendEquation.mode=u,this._state.blendEquation.modeAlpha=y,this._stateTracker.invalidateBlending()}setColorMask(u,
y,x,v){if(this._state.colorMask.r!==u||this._state.colorMask.g!==y||this._state.colorMask.b!==x||this._state.colorMask.a!==v)this.gl.colorMask(u,y,x,v),this._state.colorMask.r=u,this._state.colorMask.g=y,this._state.colorMask.b=x,this._state.colorMask.a=v,this._stateTracker.invalidateColorWrite()}setClearColor(u,y,x,v){if(this._state.clearColor.r!==u||this._state.clearColor.g!==y||this._state.clearColor.b!==x||this._state.clearColor.a!==v)this.gl.clearColor(u,y,x,v),this._state.clearColor.r=u,this._state.clearColor.g=
y,this._state.clearColor.b=x,this._state.clearColor.a=v}setFaceCullingEnabled(u){this._state.faceCulling!==u&&(!0===u?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=u,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(u){this._state.polygonOffsetFill!==u&&(!0===u?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=u,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(u,
y){if(this._state.polygonOffset[0]!==u||this._state.polygonOffset[1]!==y)this._state.polygonOffset[0]=u,this._state.polygonOffset[1]=y,this.gl.polygonOffset(u,y),this._stateTracker.invalidatePolygonOffset()}setCullFace(u){this._state.cullFace!==u&&(this.gl.cullFace(u),this._state.cullFace=u,this._stateTracker.invalidateCulling())}setFrontFace(u){this._state.frontFace!==u&&(this.gl.frontFace(u),this._state.frontFace=u,this._stateTracker.invalidateCulling())}setScissorTestEnabled(u){this._state.scissorTest!==
u&&(!0===u?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=u)}setScissorRect(u,y,x,v){if(this._state.scissorRect.x!==u||this._state.scissorRect.y!==y||this._state.scissorRect.width!==x||this._state.scissorRect.height!==v)this.gl.scissor(u,y,x,v),this._state.scissorRect.x=u,this._state.scissorRect.y=y,this._state.scissorRect.width=x,this._state.scissorRect.height=v}setDepthTestEnabled(u){this._state.depthTest!==u&&(!0===u?this.gl.enable(this.gl.DEPTH_TEST):
this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=u,this._stateTracker.invalidateDepthTest())}setClearDepth(u){this._state.clearDepth!==u&&(this.gl.clearDepth(u),this._state.clearDepth=u)}setDepthFunction(u){this._state.depthFunction!==u&&(this.gl.depthFunc(u),this._state.depthFunction=u,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(u){this._state.depthWrite!==u&&(this.gl.depthMask(u),this._state.depthWrite=u,this._stateTracker.invalidateDepthWrite())}setDepthRange(u,y){if(this._state.depthRange.zNear!==
u||this._state.depthRange.zFar!==y)this.gl.depthRange(u,y),this._state.depthRange.zNear=u,this._state.depthRange.zFar=y,this._stateTracker.invalidateDepthWrite()}setStencilTestEnabled(u){this._state.stencilTest!==u&&(!0===u?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=u,this._stateTracker.invalidateStencilTest())}setClearStencil(u){u!==this._state.clearStencil&&(this.gl.clearStencil(u),this._state.clearStencil=u)}setStencilFunction(u,y,x){if(this._state.stencilFunction.func!==
u||this._state.stencilFunction.ref!==y||this._state.stencilFunction.mask!==x)this.gl.stencilFunc(u,y,x),this._state.stencilFunction.face=d.Face.FRONT_AND_BACK,this._state.stencilFunction.func=u,this._state.stencilFunction.ref=y,this._state.stencilFunction.mask=x,this._stateTracker.invalidateStencilTest()}setStencilFunctionSeparate(u,y,x,v){if(this._state.stencilFunction.face!==u||this._state.stencilFunction.func!==y||this._state.stencilFunction.ref!==x||this._state.stencilFunction.mask!==v)this.gl.stencilFuncSeparate(u,
y,x,v),this._state.stencilFunction.face=u,this._state.stencilFunction.func=y,this._state.stencilFunction.ref=x,this._state.stencilFunction.mask=v,this._stateTracker.invalidateStencilTest()}setStencilWriteMask(u){this._state.stencilWriteMask!==u&&(this.gl.stencilMask(u),this._state.stencilWriteMask=u,this._stateTracker.invalidateStencilWrite())}setStencilOp(u,y,x){if(this._state.stencilOperation.face!==d.Face.FRONT_AND_BACK||this._state.stencilOperation.fail!==u||this._state.stencilOperation.zFail!==
y||this._state.stencilOperation.zPass!==x)this.gl.stencilOp(u,y,x),this._state.stencilOperation.face=d.Face.FRONT_AND_BACK,this._state.stencilOperation.fail=u,this._state.stencilOperation.zFail=y,this._state.stencilOperation.zPass=x,this._stateTracker.invalidateStencilTest()}setStencilOpSeparate(u,y,x,v){if(this._state.stencilOperation.face!==u||this._state.stencilOperation.fail!==y||this._state.stencilOperation.zFail!==x||this._state.stencilOperation.zPass!==v)this.gl.stencilOpSeparate(u,y,x,v),
this._state.stencilOperation.face=u,this._state.stencilOperation.fail=y,this._state.stencilOperation.zFail=x,this._state.stencilOperation.zPass=v,this._stateTracker.invalidateStencilTest()}setActiveTexture(u,y=!1){const x=this._state.activeTexture;0<=u&&(y||u!==this._state.activeTexture)&&(this.gl.activeTexture(d.baseTextureUnit+u),this._state.activeTexture=u);return x}setDrawBuffers(u){const {drawFramebuffer:y}=this._state,x=null===y,v=x?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(y);
if(v?.length!==u.length||!v.every((A,z)=>A===u[z]))if(u.length>this.parameters.maxDrawBuffers)console.error("Setting more active draw buffers than GL.MAX_DRAW_BUFFERS allows.");else{if(x){if(1<u.length){console.error("The default framebuffer can only have one active draw buffer.");return}if(u[0]!==d.SpecialDrawBuffers.BACK&&u[0]!==d.SpecialDrawBuffers.NONE){console.error("The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers.");return}}!x&&u.includes(d.SpecialDrawBuffers.BACK)?
console.error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTi or GL.NONE as draw buffers."):(this.gl.drawBuffers(u),x?this._state.drawBuffers.defaultFramebuffer=u:this._state.drawBuffers.fbos.set(y,u),this._stateTracker.invalidateDrawBuffers())}}clear(u,y=255){if(u){if(u&d.ClearBufferBit.COLOR_BUFFER_BIT){const x=this._state.drawFramebuffer?.colorAttachments;x&&this.setDrawBuffers(x);this.setColorMask(!0,!0,!0,!0)}u&d.ClearBufferBit.DEPTH_BUFFER_BIT&&this.setDepthWriteEnabled(!0);
u&d.ClearBufferBit.STENCIL_BUFFER_BIT&&this.setStencilWriteMask(y);this.gl.clear(u)}}clearFramebuffer(u,y=!1,x=!1){let v=0;u&&(this.setClearColor(u[0],u[1],u[2],Math.max(1E-13,u[3])),v|=d.ClearBufferBit.COLOR_BUFFER_BIT);y&&(v|=d.ClearBufferBit.DEPTH_BUFFER_BIT);!1===x?x=0:(!0===x&&(x=255),v|=d.ClearBufferBit.STENCIL_BUFFER_BIT);v&&this.clear(v,x)}drawArrays(u,y,x){if(this._transformFeedbackRequestInfo){if(u!==this._transformFeedbackRequestInfo.primitiveType)throw Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");
if(null==this._state.program?.hasTransformFeedbackVaryings)throw Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying");}if(m.webglDebugEnabled()){this._numOfDrawCalls++;this._numOfTriangles+=w(u,x);const v=this._state.textureUnitMap;for(let A=0;A<v.length;A++){const z=v[A];if(null!=z&&z===this._state.drawFramebuffer?.colorTexture)throw Error(`Detected readWrite. Texture already bound at index ${A}`);}}this.gl.drawArrays(u,y,x);
m.checkWebGLError(this.gl)}drawArraysInstanced(u,y,x,v){this.gl.drawArraysInstanced(u,y,x,v);m.checkWebGLError(this.gl)}drawElements(u,y,x,v){if(this._transformFeedbackRequestInfo)throw Error("Cannot called drawElements during a transform feedback request");m.webglDebugEnabled()&&(this._numOfDrawCalls++,this._numOfTriangles+=w(u,y));this.gl.drawElements(u,y,x,v);if(m.webglDebugEnabled()){const A=r.getErrorString(this);if(A){const z=this.getBoundVAO(),B=z?.indexBuffer,D=B?.size??0,F=v+y;console.error(`drawElements: ${A}${D<
F?`. Buffer is too small. Attempted to draw index ${F} of ${D}`:""}`,{args:{mode:u,count:y,type:x,offset:v},vao:{indexBuffer:B,vertexBuffers:z?.vertexBuffers}})}}}logInfo(){m.webglDebugEnabled()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){m.webglDebugEnabled()&&(this._numOfTriangles=this._numOfDrawCalls=0)}get capabilities(){return this._capabilities}setViewport(u,y,x,v){x=Math.max(Math.round(x),1);v=Math.max(Math.round(v),1);const A=this._state.viewport;
if(A.x!==u||A.y!==y||A.width!==x||A.height!==v)A.x=u,A.y=y,A.width=x,A.height=v,this.gl.viewport(u,y,x,v)}setViewport4fv(u){this.setViewport(u[0],u[1],u[2],u[3])}restoreViewport({x:u,y,width:x,height:v}){this.setViewport(u,y,x,v)}getViewport(){const u=this._state.viewport;return{x:u.x,y:u.y,width:u.width,height:u.height}}useProgram(u){this._state.program!==u&&(this._state.program?.stop(),this._state.program=u,this.gl.useProgram(u?.glName??null))}bindTexture(u,y,x=!1){(y>=this.parameters.maxTextureImageUnits||
0>y)&&console.error("Input texture unit is out of range of available units!");const v=this._state.textureUnitMap[y];if(null==u?.glName)return null!=v&&(this.setActiveTexture(y,x),this.gl.bindTexture(v.descriptor.target,null)),this._state.textureUnitMap[y]=null,v;if(!x&&v===u)return u.isDirty&&(this.setActiveTexture(y,x),u.applyChanges()),v;this.setActiveTexture(y,x);this.gl.bindTexture(u.descriptor.target,u.glName);u.applyChanges();this._state.textureUnitMap[y]=u;return v}unbindTexture(u){if(null!=
u)for(let y=0;y<this.parameters.maxTextureImageUnits;y++)this._state.textureUnitMap[y]===u&&(this.bindTexture(null,y),this._state.textureUnitMap[y]=null)}bindFramebuffer(u,y=!1){if(y||this._state.readFramebuffer!==u||this._state.drawFramebuffer!==u)this._stateTracker.invalidateDrawBuffers(),null==u?(this.gl.bindFramebuffer(d.FramebufferTarget.FRAMEBUFFER,null),this._state.readFramebuffer=this._state.drawFramebuffer=null):(u.initializeAndBind(d.FramebufferTarget.FRAMEBUFFER),this._state.readFramebuffer=
u,this._state.drawFramebuffer=u)}bindFramebufferSeparate(u,y,x=!1){const v=y===d.FramebufferTarget.READ_FRAMEBUFFER,A=v?this._state.readFramebuffer:this._state.drawFramebuffer;if(x||A!==u)null==u?this.gl.bindFramebuffer(y,null):u.initializeAndBind(y),v?this._state.readFramebuffer=u??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=u??null)}blitFramebuffer(u,y,x=0,v=0,A=u.width,z=u.height,B=0,D=0,F=y.width,E=y.height,C=d.ClearBufferBit.COLOR_BUFFER_BIT,G=d.TextureSamplingMode.NEAREST){this.bindFramebufferSeparate(u,
d.FramebufferTarget.READ_FRAMEBUFFER);this.bindFramebufferSeparate(y,d.FramebufferTarget.DRAW_FRAMEBUFFER);this.gl.blitFramebuffer(x,v,A,z,B,D,F,E,C,G)}bindBuffer(u,y){if(u)switch(y??=u.bufferType,y){case d.BufferType.ARRAY_BUFFER:this._state.vertexBuffer=t(this.gl,u,y,this._state.vertexBuffer);break;case d.BufferType.ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=t(this.gl,u,y,this._state.indexBuffer);break;case d.BufferType.UNIFORM_BUFFER:this._state.uniformBuffer=t(this.gl,u,y,this._state.uniformBuffer);
break;case d.BufferType.PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=t(this.gl,u,y,this._state.pixelPackBuffer);break;case d.BufferType.PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=t(this.gl,u,y,this._state.pixelUnpackBuffer);break;case d.BufferType.COPY_READ_BUFFER:this._state.copyReadBuffer=t(this.gl,u,y,this._state.copyReadBuffer);break;case d.BufferType.COPY_WRITE_BUFFER:this._state.copyWriteBuffer=t(this.gl,u,y,this._state.copyWriteBuffer);break;case d.BufferType.TRANSFORM_FEEDBACK_BUFFER:this._state.transformFeedbackBuffer=
t(this.gl,u,y,this._state.transformFeedbackBuffer)}}bindRenderbuffer(u){const y=this.gl;u||(y.bindRenderbuffer(y.RENDERBUFFER,null),this._state.renderbuffer=null);this._state.renderbuffer!==u&&(y.bindRenderbuffer(y.RENDERBUFFER,u.glName),this._state.renderbuffer=u)}_getBufferBinding(u,y){if(y>=this.parameters.maxUniformBufferBindings||0>y)return console.error("Uniform buffer binding point is out of range!"),null;u=u===d.BufferType.UNIFORM_BUFFER?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints;
let x=u[y];null==x&&(x={buffer:null,offset:0,size:0},u[y]=x);return x}bindBufferBase(u,y,x){const v=this._getBufferBinding(u,y);null==v||v.buffer===x&&0===v.offset&&0===v.size||(this.gl.bindBufferBase(u,y,x?x.glName:null),v.buffer=x,v.offset=0,v.size=0)}bindBufferRange(u,y,x,v,A){const z=this._getBufferBinding(u,y);null==z||z.buffer===x&&z.offset===v&&z.size===A||(0!==v%this._parameters.uniformBufferOffsetAlignment?console.error("Uniform buffer binding offset is not a multiple of the context offset alignment"):
(this.gl.bindBufferRange(u,y,x.glName,v,A),z.buffer=x,z.offset=v,z.size=A))}bindUBO(u,y,x,v){null==y?this.bindBufferBase(d.BufferType.UNIFORM_BUFFER,u,null):(m.webglDebugEnabled()&&(v??y.byteLength)>this._parameters.maxUniformBlockSize&&console.error("Attempting to bind more data than the maximum uniform block size"),y.initialize(),void 0!==x&&void 0!==v?this.bindBufferRange(d.BufferType.UNIFORM_BUFFER,u,y.buffer,x,v):this.bindBufferBase(d.BufferType.UNIFORM_BUFFER,u,y.buffer))}unbindUBO(u){for(let y=
0,x=this._state.uniformBufferBindingPoints.length;y<x;y++){const v=this._state.uniformBufferBindingPoints[y];null!=v&&v.buffer===u.buffer&&this.bindBufferBase(d.BufferType.UNIFORM_BUFFER,y,null)}}unbindBuffer(u){switch(u){case d.BufferType.ARRAY_BUFFER:this._state.vertexBuffer=t(this.gl,null,u,this._state.vertexBuffer);break;case d.BufferType.ELEMENT_ARRAY_BUFFER:this._state.indexBuffer=t(this.gl,null,u,this._state.indexBuffer);break;case d.BufferType.UNIFORM_BUFFER:this._state.uniformBuffer=t(this.gl,
null,u,this._state.uniformBuffer);break;case d.BufferType.PIXEL_PACK_BUFFER:this._state.pixelPackBuffer=t(this.gl,null,u,this._state.pixelPackBuffer);break;case d.BufferType.PIXEL_UNPACK_BUFFER:this._state.pixelUnpackBuffer=t(this.gl,null,u,this._state.pixelUnpackBuffer);break;case d.BufferType.COPY_READ_BUFFER:this._state.copyReadBuffer=t(this.gl,null,u,this._state.copyReadBuffer);break;case d.BufferType.COPY_WRITE_BUFFER:this._state.copyWriteBuffer=t(this.gl,null,u,this._state.copyWriteBuffer)}}bindVAO(u=
null){null==u?this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null):this._state.vertexArrayObject!==u&&(u.bind(),this._state.vertexArrayObject=u)}bindTransformFeedback(u){const {gl:y}=this;y.bindTransformFeedback(y.TRANSFORM_FEEDBACK,u.glName)}beginTransformFeedback(u,y){if(this._transformFeedbackRequestInfo)throw Error("Already in a transform feedback request");const {gl:x}=this;x.bindTransformFeedback(x.TRANSFORM_FEEDBACK,u.glName);x.beginTransformFeedback(y);
this._transformFeedbackRequestInfo={primitiveType:y}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw Error("Not in a transform feedback request");const {gl:u}=this;u.endTransformFeedback();u.bindTransformFeedback(u.TRANSFORM_FEEDBACK,null);this._transformFeedbackRequestInfo=null}async clientWaitAsync(u=h.Milliseconds(10)){const {gl:y}=this,x=y.fenceSync(d.SyncCondition.SYNC_GPU_COMMANDS_COMPLETE,0);if(!x)throw Error("Client wait failed, could not create sync object");this.instanceCounter.increment(d.ResourceType.Sync,
x);y.flush();let v;do await q.after(u),v=y.clientWaitSync(x,0,0);while(v===d.ClientWaitSyncStatus.TIMEOUT_EXPIRED);this.instanceCounter.decrement(d.ResourceType.Sync,x);y.deleteSync(x);if(v===d.ClientWaitSyncStatus.WAIT_FAILED)throw Error("Client wait failed");}getBoundFramebufferObject(u=d.FramebufferTarget.FRAMEBUFFER){return u===d.FramebufferTarget.READ_FRAMEBUFFER?this._state.readFramebuffer:this._state.drawFramebuffer}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null);
this.bindVAO(null);this.bindFramebuffer(null,!0);this.unbindBuffer(d.BufferType.ARRAY_BUFFER);this.unbindBuffer(d.BufferType.ELEMENT_ARRAY_BUFFER);this.unbindBuffer(d.BufferType.UNIFORM_BUFFER);this._state.uniformBufferBindingPoints.length=0;this.unbindBuffer(d.BufferType.PIXEL_PACK_BUFFER);this.unbindBuffer(d.BufferType.PIXEL_UNPACK_BUFFER);this.unbindBuffer(d.BufferType.COPY_READ_BUFFER);this.unbindBuffer(d.BufferType.COPY_WRITE_BUFFER);for(let u=0;u<this.parameters.maxTextureImageUnits;++u)this.bindTexture(null,
u);this.setBlendingEnabled(!1);this.setBlendFunction(d.BlendFactor.ONE,d.BlendFactor.ZERO);this.setBlendEquation(d.BlendOperation.ADD);this.setBlendColor(0,0,0,0);this.setFaceCullingEnabled(!1);this.setCullFace(d.Face.BACK);this.setFrontFace(d.CullMode.CCW);this.setPolygonOffsetFillEnabled(!1);this.setPolygonOffset(0,0);this.setScissorTestEnabled(!1);this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height);this.setDepthTestEnabled(!1);this.setDepthFunction(d.CompareFunction.LESS);this.setDepthRange(0,
1);this.setStencilTestEnabled(!1);this.setStencilFunction(d.CompareFunction.ALWAYS,0,0);this.setStencilOp(d.StencilOperation.KEEP,d.StencilOperation.KEEP,d.StencilOperation.KEEP);this.setClearColor(0,0,0,0);this.setClearDepth(1);this.setClearStencil(0);this.setColorMask(!0,!0,!0,!0);this.setStencilWriteMask(4294967295);this.setDepthWriteEnabled(!0);this.setDrawBuffers([d.SpecialDrawBuffers.BACK]);this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){const {gl:u}=this;u.bindVertexArray(null);
for(var y=0;y<this.parameters.maxVertexAttributes;y++)u.disableVertexAttribArray(y);this._state.vertexBuffer?u.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):u.bindBuffer(d.BufferType.ARRAY_BUFFER,null);this._state.indexBuffer?u.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):u.bindBuffer(d.BufferType.ELEMENT_ARRAY_BUFFER,null);this._state.uniformBuffer?u.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):
u.bindBuffer(d.BufferType.UNIFORM_BUFFER,null);for(y=0;y<this._parameters.maxUniformBufferBindings;y++){var x=this._state.uniformBufferBindingPoints[y];if(null!=x){const {buffer:v,offset:A,size:z}=x;null!==v?0===A&&0===z?u.bindBufferBase(d.BufferType.UNIFORM_BUFFER,y,v.glName):u.bindBufferRange(d.BufferType.UNIFORM_BUFFER,y,v.glName,A,z):u.bindBufferBase(d.BufferType.UNIFORM_BUFFER,y,null)}}this._state.pixelPackBuffer?u.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):
u.bindBuffer(d.BufferType.PIXEL_PACK_BUFFER,null);this._state.pixelUnpackBuffer?u.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):u.bindBuffer(d.BufferType.PIXEL_UNPACK_BUFFER,null);this._state.copyReadBuffer?u.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):u.bindBuffer(d.BufferType.COPY_READ_BUFFER,null);this._state.copyWriteBuffer?u.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):
u.bindBuffer(d.BufferType.COPY_WRITE_BUFFER,null);u.bindFramebuffer(d.FramebufferTarget.READ_FRAMEBUFFER,null);u.readBuffer(u.BACK);this._state.readFramebuffer&&(u.bindFramebuffer(d.FramebufferTarget.READ_FRAMEBUFFER,this._state.readFramebuffer.glName),u.readBuffer(d.ColorAttachment.COLOR_ATTACHMENT0));u.bindFramebuffer(d.FramebufferTarget.DRAW_FRAMEBUFFER,this._state.drawFramebuffer?.glName??null);null===this._state.drawFramebuffer?u.drawBuffers(this._state.drawBuffers.defaultFramebuffer??[d.SpecialDrawBuffers.BACK]):
(y=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer),u.drawBuffers(y??[d.ColorAttachment.COLOR_ATTACHMENT0]));if(this._state.vertexArrayObject){if(y=this._state.vertexArrayObject)this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null;this.bindVAO(y)}u.useProgram(this._state.program?.glName??null);u.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a);u.bindRenderbuffer(u.RENDERBUFFER,this._state.renderbuffer?.glName??
null);!0===this._state.blend?u.enable(this.gl.BLEND):u.disable(this.gl.BLEND);u.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha);u.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha);u.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a);u.clearDepth(this._state.clearDepth);u.clearStencil(this._state.clearStencil);
u.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a);u.cullFace(this._state.cullFace);u.depthFunc(this._state.depthFunction);u.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar);!0===this._state.depthTest?u.enable(u.DEPTH_TEST):u.disable(u.DEPTH_TEST);u.depthMask(this._state.depthWrite);u.frontFace(this._state.frontFace);u.lineWidth(1);!0===this._state.faceCulling?u.enable(u.CULL_FACE):u.disable(u.CULL_FACE);u.polygonOffset(this._state.polygonOffset[0],
this._state.polygonOffset[1]);!0===this._state.polygonOffsetFill?u.enable(u.POLYGON_OFFSET_FILL):u.disable(u.POLYGON_OFFSET_FILL);u.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height);!0===this._state.scissorTest?u.enable(u.SCISSOR_TEST):u.disable(u.SCISSOR_TEST);u.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask);u.stencilOpSeparate(this._state.stencilOperation.face,
this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass);!0===this._state.stencilTest?u.enable(u.STENCIL_TEST):u.disable(u.STENCIL_TEST);u.stencilMask(this._state.stencilWriteMask);for(y=0;y<this.parameters.maxTextureImageUnits;y++)u.activeTexture(d.baseTextureUnit+y),u.bindTexture(d.TextureType.TEXTURE_2D,null),u.bindTexture(d.TextureType.TEXTURE_CUBE_MAP,null),u.bindTexture(d.TextureType.TEXTURE_3D,null),u.bindTexture(d.TextureType.TEXTURE_2D_ARRAY,
null),x=this._state.textureUnitMap[y],null!=x&&u.bindTexture(x.descriptor.target,x.glName);u.activeTexture(d.baseTextureUnit+this._state.activeTexture);y=this._state.viewport;u.viewport(y.x,y.y,y.width,y.height);this.resetInfo()}_loadExtensions(){this.gl.getExtension("KHR_parallel_shader_compile")}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/ContextState":function(){define(["exports","./enums"],function(e,g){class q{constructor(){this.blend=!1;this.blendColor=
{r:0,g:0,b:0,a:0};this.blendFunction={srcRGB:g.BlendFactor.ONE,dstRGB:g.BlendFactor.ZERO,srcAlpha:g.BlendFactor.ONE,dstAlpha:g.BlendFactor.ZERO};this.blendEquation={mode:g.BlendOperation.ADD,modeAlpha:g.BlendOperation.ADD};this.colorMask={r:!0,g:!0,b:!0,a:!0};this.faceCulling=!1;this.cullFace=g.Face.BACK;this.frontFace=g.CullMode.CCW;this.scissorTest=!1;this.scissorRect={x:0,y:0,width:0,height:0};this.depthTest=!1;this.depthFunction=g.CompareFunction.LESS;this.clearDepth=1;this.depthWrite=!0;this.depthRange=
{zNear:0,zFar:1};this.viewport=null;this.polygonOffsetFill=this.stencilTest=!1;this.polygonOffset=[0,0];this.stencilFunction={face:g.Face.FRONT_AND_BACK,func:g.CompareFunction.ALWAYS,ref:0,mask:1};this.clearStencil=0;this.stencilWriteMask=1;this.stencilOperation={face:g.Face.FRONT_AND_BACK,fail:g.StencilOperation.KEEP,zFail:g.StencilOperation.KEEP,zPass:g.StencilOperation.KEEP};this.clearColor={r:0,g:0,b:0,a:0};this.transformFeedbackBuffer=this.copyWriteBuffer=this.copyReadBuffer=this.pixelUnpackBuffer=
this.pixelPackBuffer=this.uniformBuffer=this.indexBuffer=this.vertexBuffer=this.program=null;this.uniformBufferBindingPoints=[];this.transformBufferBindingPoints=[];this.drawFramebuffer=this.readFramebuffer=null;this.drawBuffers={defaultFramebuffer:[g.SpecialDrawBuffers.BACK],fbos:new WeakMap};this.renderbuffer=null;this.activeTexture=0;this.textureUnitMap=[];this.vertexArrayObject=null}}e.ContextState=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/InstanceCounter":function(){define(["exports",
"./AllocationTracer","./enums"],function(e,g,q){const h={RECORD_ALLOCATIONS:!1};class m{constructor(){this._current=[];for(this._allocations=h.RECORD_ALLOCATIONS?new g.AllocationTracer("WebGLObject"):null;this._current.length<q.ResourceType.COUNT;)this._current.push(0)}increment(l,d,b=1){this._current[l]+=b;this._allocations?.add(d)}decrement(l,d,b=1){this._current[l]-=b;this._allocations?.remove(d)}get current(){return this._current}get total(){return this.current.reduce((l,d,b)=>l+(b<q.ResourceType.UNCOUNTED?
d:0),0)}get resourceInformation(){let l="";if(0<this.total){l+="Live objects:\n";for(let d=0;d<q.ResourceType.COUNT;++d){const b=this._current[d];0<b&&(l+=`${q.ResourceType[d]}: ${b}\n`)}}return l+=this._allocations?.resetLog()}}e.InstanceCounter=m;e.test=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/AllocationTracer":function(){define(["exports"],function(e){class g{constructor(q){this._objectType=q;this._active=new Map}add(q){const h=Error().stack.split("\n");
h.shift();h.shift();this._active.set(q,h.join("\n"))}remove(q){this._active.delete(q)}resetLog(){const q=new Map;this._active.forEach((l,{usedMemory:d})=>{q.has(l)||q.set(l,new Map);l=q.get(l);l.set(d??0,l.get(d??0)??1)});this._active.clear();let h=0;const m=[];q.forEach((l,d)=>{let b=0;l.forEach((a,f)=>b+=a*f);l.set(-1,b);h+=b;m.push([d,l])});q.clear();m.sort((l,d)=>d[1].get(-1)-l[1].get(-1));return m.reduce((l,[d,b])=>{const a=Math.round(b.get(-1)/1024);b.delete(-1);b=Array.from(b.values()).reduce((f,
n)=>f+n,0);return l+=` ${a}KB from ${b} allocations at ${d}\n`},`Total unestimated ${this._objectType} memory: ${Math.round(h/1024)}KB\n`)}}e.AllocationTracer=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/Parameters":function(){define(["exports"],function(e){class g{constructor(q,h,m){h=h.textureFilterAnisotropic;m=m.maxAnisotropy??Infinity;this.versionString=q.getParameter(q.VERSION);this.maxVertexTextureImageUnits=q.getParameter(q.MAX_VERTEX_TEXTURE_IMAGE_UNITS);
this.maxVertexAttributes=q.getParameter(q.MAX_VERTEX_ATTRIBS);this.maxMaxAnisotropy=h?Math.min(q.getParameter(h.MAX_TEXTURE_MAX_ANISOTROPY),m):1;this.maxTextureImageUnits=q.getParameter(q.MAX_TEXTURE_IMAGE_UNITS);this.maxTextureSize=q.getParameter(q.MAX_TEXTURE_SIZE);this.maxRenderbufferSize=q.getParameter(q.MAX_RENDERBUFFER_SIZE);this.maxViewportDims=q.getParameter(q.MAX_VIEWPORT_DIMS);this.maxUniformBufferBindings=q.getParameter(q.MAX_UNIFORM_BUFFER_BINDINGS);this.maxVertexUniformBlocks=q.getParameter(q.MAX_VERTEX_UNIFORM_BLOCKS);
this.maxFragmentUniformBlocks=q.getParameter(q.MAX_FRAGMENT_UNIFORM_BLOCKS);this.maxUniformBlockSize=q.getParameter(q.MAX_UNIFORM_BLOCK_SIZE);this.uniformBufferOffsetAlignment=q.getParameter(q.UNIFORM_BUFFER_OFFSET_ALIGNMENT);this.maxArrayTextureLayers=q.getParameter(q.MAX_ARRAY_TEXTURE_LAYERS);this.maxSamples=q.getParameter(q.MAX_SAMPLES);this.maxDrawBuffers=q.getParameter(q.MAX_DRAW_BUFFERS)}}e.Parameters=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/renderState":function(){define(["exports",
"../3d/webgl-engine/lib/basicInterfaces","./enums"],function(e,g,q){function h(L){return F.intern(L)}function m(L){return E.intern(L)}function l(L){return C.intern(L)}function d(L){return G.intern(L)}function b(L){return H.intern(L)}function a(L){return K.intern(L)}function f(L){return J.intern(L)}function n(L){return O.intern(L)}function c(L){return Q.intern(L)}function r(L){return"["+L.join(",")+"]"}function k(L){return L?r([L.srcRgb,L.srcAlpha,L.dstRgb,L.dstAlpha,L.opRgb,L.opAlpha,L.color.r,L.color.g,
L.color.b,L.color.a]):null}function p(L){return L?r([L.face,L.mode]):null}function t(L){return L?r([L.factor,L.units]):null}function w(L){return L?r([L.func]):null}function u(L){return L?r([L.function.func,L.function.ref,L.function.mask,L.operation.fail,L.operation.zFail,L.operation.zPass]):null}function y(L){return L?r([L.zNear,L.zFar]):null}function x(L){return L?r([L.r,L.g,L.b,L.a]):null}function v(L){return L?r([L.mask]):null}function A(L){return L?r(L.buffers):null}const z={face:q.Face.BACK,
mode:q.CullMode.CCW},B={face:q.Face.FRONT,mode:q.CullMode.CCW};class D{constructor(L,R){this._makeKey=L;this._makeRef=R;this._interns=new Map}intern(L){if(!L)return null;const R=this._makeKey(L),V=this._interns;V.has(R)||V.set(R,this._makeRef(L));return V.get(R)??null}}const F=new D(k,L=>({__tag:"Blending",...L})),E=new D(p,L=>({__tag:"Culling",...L})),C=new D(t,L=>({__tag:"PolygonOffset",...L})),G=new D(w,L=>({__tag:"DepthTest",...L})),H=new D(u,L=>({__tag:"StencilTest",...L})),K=new D(y,L=>({__tag:"DepthWrite",
...L})),J=new D(x,L=>({__tag:"ColorWrite",...L})),O=new D(v,L=>({__tag:"StencilWrite",...L})),Q=new D(A,L=>({__tag:"DrawBuffers",...L})),T=new D(function(L){return L?r([k(L.blending),p(L.culling),t(L.polygonOffset),w(L.depthTest),u(L.stencilTest),y(L.depthWrite),x(L.colorWrite),v(L.stencilWrite),A(L.drawBuffers)]):null},L=>({blending:h(L.blending),culling:m(L.culling),polygonOffset:l(L.polygonOffset),depthTest:d(L.depthTest),stencilTest:b(L.stencilTest),depthWrite:a(L.depthWrite),colorWrite:f(L.colorWrite),
stencilWrite:n(L.stencilWrite),drawBuffers:c(L.drawBuffers)}));class I{constructor(L){this._drawBuffersInvalid=this._stencilWriteInvalid=this._colorWriteInvalid=this._depthWriteInvalid=this._stencilTestInvalid=this._depthTestInvalid=this._polygonOffsetInvalid=this._cullingInvalid=this._blendingInvalid=this._pipelineInvalid=!0;this._stateSetters=L}setPipeline(L){if(this._pipelineInvalid||L!==this._pipeline)this._setBlending(L.blending),this._setCulling(L.culling),this._setPolygonOffset(L.polygonOffset),
this._setDepthTest(L.depthTest),this._setStencilTest(L.stencilTest),this._setDepthWrite(L.depthWrite),this._setColorWrite(L.colorWrite),this._setStencilWrite(L.stencilWrite),this._setDrawBuffers(L.drawBuffers),this._pipeline=L;this._pipelineInvalid=!1}invalidateBlending(){this._pipelineInvalid=this._blendingInvalid=!0}invalidateCulling(){this._pipelineInvalid=this._cullingInvalid=!0}invalidatePolygonOffset(){this._pipelineInvalid=this._polygonOffsetInvalid=!0}invalidateDepthTest(){this._pipelineInvalid=
this._depthTestInvalid=!0}invalidateStencilTest(){this._pipelineInvalid=this._stencilTestInvalid=!0}invalidateDepthWrite(){this._pipelineInvalid=this._depthWriteInvalid=!0}invalidateColorWrite(){this._pipelineInvalid=this._colorWriteInvalid=!0}invalidateStencilWrite(){this._pipelineInvalid=this._stencilTestInvalid=!0}invalidateDrawBuffers(){this._pipelineInvalid=this._drawBuffersInvalid=!0}_setBlending(L){this._blending=this._setSubState(L,this._blending,this._blendingInvalid,this._stateSetters.setBlending);
this._blendingInvalid=!1}_setCulling(L){this._culling=this._setSubState(L,this._culling,this._cullingInvalid,this._stateSetters.setCulling);this._cullingInvalid=!1}_setPolygonOffset(L){this._polygonOffset=this._setSubState(L,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset);this._polygonOffsetInvalid=!1}_setDepthTest(L){this._depthTest=this._setSubState(L,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest);this._depthTestInvalid=!1}_setStencilTest(L){this._stencilTest=
this._setSubState(L,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest);this._stencilTestInvalid=!1}_setDepthWrite(L){this._depthWrite=this._setSubState(L,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite);this._depthWriteInvalid=!1}_setColorWrite(L){this._colorWrite=this._setSubState(L,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite);this._colorWriteInvalid=!1}_setStencilWrite(L){this._stencilWrite=this._setSubState(L,this._stencilWrite,
this._stencilWriteInvalid,this._stateSetters.setStencilWrite);this._stencilTestInvalid=!1}_setDrawBuffers(L){this._drawBuffers=this._setSubState(L,this._drawBuffers,this._drawBuffersInvalid,this._stateSetters.setDrawBuffers);this._drawBuffersInvalid=!1}_setSubState(L,R,V,S){if(V||L!==R)S(L),this._pipelineInvalid=!0;return L}}e.StateTracker=I;e.backFaceCullingParams=z;e.cullingParams=L=>L===g.CullFaceOptions.Back?z:L===g.CullFaceOptions.Front?B:null;e.defaultColorWriteParams={r:!0,g:!0,b:!0,a:!0};
e.defaultDepthWriteParams={zNear:0,zFar:1};e.frontFaceCullingParams=B;e.makeBlending=h;e.makeColorWrite=f;e.makeCulling=m;e.makeDepthTest=d;e.makeDepthWrite=a;e.makeDrawBuffers=c;e.makePipelineState=function(L){return T.intern(L)};e.makePolygonOffset=l;e.makeStencilTest=b;e.makeStencilWrite=n;e.separateBlendingParams=function(L,R,V,S,X=q.BlendOperation.ADD,N=q.BlendOperation.ADD,P=[0,0,0,0]){return{srcRgb:L,srcAlpha:R,dstRgb:V,dstAlpha:S,opRgb:X,opAlpha:N,color:{r:P[0],g:P[1],b:P[2],a:P[3]}}};e.simpleBlendingParams=
function(L,R,V=q.BlendOperation.ADD,S=[0,0,0,0]){return{srcRgb:L,srcAlpha:L,dstRgb:R,dstAlpha:R,opRgb:V,opAlpha:V,color:{r:S[0],g:S[1],b:S[2],a:S[3]}}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/lib/basicInterfaces":function(){define(["exports"],function(e){e.CullFaceOptions=void 0;(function(g){g[g.None=0]="None";g[g.Front=1]="Front";g[g.Back=2]="Back";g[g.COUNT=3]="COUNT"})(e.CullFaceOptions||(e.CullFaceOptions={}));e.DepthTestFunction=void 0;(function(g){g[g.Less=
0]="Less";g[g.Lequal=1]="Lequal";g[g.COUNT=2]="COUNT"})(e.DepthTestFunction||(e.DepthTestFunction={}));e.RenderRequestType=void 0;(function(g){g[g.BACKGROUND=0]="BACKGROUND";g[g.UPDATE=1]="UPDATE"})(e.RenderRequestType||(e.RenderRequestType={}));e.ResourceState=void 0;(function(g){g[g.NOT_LOADED=0]="NOT_LOADED";g[g.LOADING=1]="LOADING";g[g.LOADED=2]="LOADED"})(e.ResourceState||(e.ResourceState={}));e.StencilBits=void 0;(function(g){g[g.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded";g[g.OutlineVisualElementMask=
2]="OutlineVisualElementMask"})(e.StencilBits||(e.StencilBits={}));e.Object3DState=void 0;(function(g){g[g.Highlight=0]="Highlight";g[g.MaskOccludee=1]="MaskOccludee";g[g.COUNT=2]="COUNT"})(e.Object3DState||(e.Object3DState={}));e.AlphaDiscardMode=void 0;(function(g){g[g.Blend=0]="Blend";g[g.Opaque=1]="Opaque";g[g.Mask=2]="Mask";g[g.MaskBlend=3]="MaskBlend";g[g.COUNT=4]="COUNT"})(e.AlphaDiscardMode||(e.AlphaDiscardMode={}));e.Decorations=void 0;(function(g){g[g.OFF=0]="OFF";g[g.ON=1]="ON"})(e.Decorations||
(e.Decorations={}));e.TextureEncodingMimeType=void 0;(function(g){g.DDS_ENCODING="image/vnd-ms.dds";g.KTX2_ENCODING="image/ktx2";g.BASIS_ENCODING="image/x.basis"})(e.TextureEncodingMimeType||(e.TextureEncodingMimeType={}));Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/WebGLDriverTest":function(){define(["exports","./testAppleAmdDrawArrays","./testDoublePrecisionArithmetic","./testFloatBufferBlend","./testSVGPremultipliedAlpha"],function(e,g,q,h,m){class l{constructor(d){this.rctx=
d;this.floatBufferBlend=new h.FloatBufferBlend(d);this.svgPremultipliesAlpha=new m.SVGPremultipliedAlpha(d);this.doublePrecisionRequiresObfuscation=new q.DoublePrecisionRequiresObfuscation(d);this.drawArraysRequiresIndicesTypeReset=new g.DrawArraysRequiresIndicesTypeReset(d)}dispose(){this.doublePrecisionRequiresObfuscation.dispose();this.svgPremultipliesAlpha.dispose();this.floatBufferBlend.dispose();this.drawArraysRequiresIndicesTypeReset.dispose()}}e.WebGLDriverTest=l;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/webgl/testAppleAmdDrawArrays":function(){define("exports ../../core/has ../3d/webgl-engine/core/shaderModules/interfaces ./AppleAmdDriverHelper ./BufferObject ./enums ./FramebufferObject ./TextureDescriptor ./WebGLDriverTestModule".split(" "),function(e,g,q,h,m,l,d,b,a){class f extends a.WebGLDriverTestModule{constructor(n){super();this._rctx=n;this._helperProgram=null;g("mac")&&g("chrome")&&(this._program=this._prepareProgram(),this._helperProgram=this._prepareHelperProgram())}dispose(){super.dispose();
this._helperProgram?.dispose();this._helperProgram=null}_test(n){const c=this._rctx,r=c.getBoundFramebufferObject(),{x:k,y:p,width:t,height:w}=c.getViewport();c.resetState();var u=new b.TextureDescriptor(1);u.wrapMode=l.TextureWrapMode.CLAMP_TO_EDGE;u.samplingMode=l.TextureSamplingMode.NEAREST;u=new d.FramebufferObject(c,u);const y=m.BufferObject.createIndex(this._rctx,l.Usage.STATIC_DRAW,new Uint8Array([0]));c.bindFramebuffer(u);c.setViewport(0,0,1,1);c.useProgram(this._helperProgram);c.bindBuffer(y,
l.BufferType.ELEMENT_ARRAY_BUFFER);c.drawElements(l.PrimitiveType.POINTS,1,l.DataType.UNSIGNED_BYTE,0);c.useProgram(n);c.bindVAO(null);c.drawArrays(l.PrimitiveType.TRIANGLES,0,258);n=new Uint8Array(4);u.readPixels(0,0,1,1,l.PixelFormat.RGBA,l.PixelType.UNSIGNED_BYTE,n);c.setViewport(k,p,t,w);c.bindFramebuffer(r);u.dispose();y.dispose();return 255===n[0]}_prepareProgram(){const n=`#version 300 es\n precision highp float;\n\n out float triangleId;\n\n const vec3 triangleVertices[3] = vec3[3](vec3(-0.5, -0.5, 0.0), vec3(0.5, -0.5, 0.0), vec3(0.0, 0.5, 0.0));\n\n void main(void) {\n triangleId = floor(float(gl_VertexID)/3.0);\n\n vec3 position = triangleVertices[gl_VertexID % 3];\n float offset = triangleId / ${q.glsl.float(85)};\n position.z = 0.5 - offset;\n\n gl_Position = vec4(position, 1.0);\n }\n `,
c=`#version 300 es\n precision highp float;\n\n in float triangleId;\n\n out vec4 fragColor;\n\n void main(void) {\n fragColor = triangleId == ${q.glsl.float(85)} ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);\n }\n `;return this._rctx.programCache.acquire(n,c,new Map([]))}_prepareHelperProgram(){const n=h.AppleAmdDriverHelper.getShaderSources();return this._rctx.programCache.acquire(n.vertex,n.fragment,new Map([]))}}e.DrawArraysRequiresIndicesTypeReset=f;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/3d/webgl-engine/core/shaderModules/interfaces":function(){define(["exports"],function(e){function g(m,...l){let d="";for(let b=0;b<l.length;b++)d+=m[b]+l[b];return d+=m[m.length-1]}class q{}const h=q;(function(m){m.int=function(l){return Math.round(l).toString()};m.float=function(l){return l.toPrecision(8)}})(g||={});e.NoParameters=h;e.glsl=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/AppleAmdDriverHelper":function(){define(["exports",
"../../core/has","./BufferObject","./enums"],function(e,g,q,h){class m{constructor(l){this._rctx=l;this._indexBuffer=this._createIndexbuffer();this._program=this._createHelperProgram()}static getShaderSources(){return{vertex:"#version 300 es\n precision highp float;\n\n void main(void) {\n gl_Position \x3d vec4(0.0, 0.0, float(gl_VertexID)-2.0, 1.0);\n }",fragment:"#version 300 es\n precision highp float;\n\n out vec4 fragColor;\n\n void main(void) {\n fragColor \x3d vec4(0.0, 0.0, 0.0, 1.0);\n }"}}_createHelperProgram(){const l=
m.getShaderSources();return this._rctx.programCache.acquire(l.vertex,l.fragment,new Map([]))}_createIndexbuffer(){return q.BufferObject.createIndex(this._rctx,h.Usage.STATIC_DRAW,new Uint32Array([0]))}run(){this._program.compiled&&this._indexBuffer&&(this._rctx.bindVAO(null),this._rctx.useProgram(this._program),this._rctx.bindBuffer(this._indexBuffer,h.BufferType.ELEMENT_ARRAY_BUFFER),this._rctx.drawElements(h.PrimitiveType.POINTS,1,h.DataType.UNSIGNED_INT,0))}dispose(){this._program.dispose();this._indexBuffer.dispose()}get test(){}}
e.AppleAmdDriverHelper=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/WebGLDriverTestModule":function(){define(["exports","../../core/maybe"],function(e,g){class q{constructor(){this._result=!1}dispose(){this._program=g.disposeMaybe(this._program)}get result(){null!=this._program&&(this._result=this._test(this._program),this.dispose());return this._result}}e.WebGLDriverTestModule=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/testDoublePrecisionArithmetic":function(){define("exports ../../core/floatRGBA ../../core/has ../../core/maybe ../../core/libs/gl-matrix-2/factories/vec3f64 ./BufferObject ./doublePrecisionUtils ./enums ./FramebufferObject ./TextureDescriptor ./VertexArrayObject ./VertexElementDescriptor ./WebGLDriverTestModule".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r){function k(t,w){return t.programCache.acquire(`\n\n precision highp float;\n\n attribute vec2 position;\n\n uniform vec3 u_highA;\n uniform vec3 u_lowA;\n uniform vec3 u_highB;\n uniform vec3 u_lowB;\n\n varying vec4 v_color;\n\n ${w?"#define DOUBLE_PRECISION_REQUIRES_OBFUSCATION":""}\n\n #ifdef DOUBLE_PRECISION_REQUIRES_OBFUSCATION\n\n vec3 dpPlusFrc(vec3 a, vec3 b) {\n return mix(a, a + b, vec3(notEqual(b, vec3(0))));\n }\n\n vec3 dpMinusFrc(vec3 a, vec3 b) {\n return mix(vec3(0), a - b, vec3(notEqual(a, b)));\n }\n\n vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {\n vec3 t1 = dpPlusFrc(hiA, hiB);\n vec3 e = dpMinusFrc(t1, hiA);\n vec3 t2 = dpMinusFrc(hiB, e) + dpMinusFrc(hiA, dpMinusFrc(t1, e)) + loA + loB;\n return t1 + t2;\n }\n\n #else\n\n vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {\n vec3 t1 = hiA + hiB;\n vec3 e = t1 - hiA;\n vec3 t2 = ((hiB - e) + (hiA - (t1 - e))) + loA + loB;\n return t1 + t2;\n }\n\n #endif\n\n const float MAX_RGBA_FLOAT =\n 255.0 / 256.0 +\n 255.0 / 256.0 / 256.0 +\n 255.0 / 256.0 / 256.0 / 256.0 +\n 255.0 / 256.0 / 256.0 / 256.0 / 256.0;\n\n const vec4 FIXED_POINT_FACTORS = vec4(1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0);\n\n vec4 float2rgba(const float value) {\n // Make sure value is in the domain we can represent\n float valueInValidDomain = clamp(value, 0.0, MAX_RGBA_FLOAT);\n\n // Decompose value in 32bit fixed point parts represented as\n // uint8 rgba components. Decomposition uses the fractional part after multiplying\n // by a power of 256 (this removes the bits that are represented in the previous\n // component) and then converts the fractional part to 8bits.\n vec4 fixedPointU8 = floor(fract(valueInValidDomain * FIXED_POINT_FACTORS) * 256.0);\n\n // Convert uint8 values (from 0 to 255) to floating point representation for\n // the shader\n const float toU8AsFloat = 1.0 / 255.0;\n\n return fixedPointU8 * toU8AsFloat;\n }\n\n void main() {\n vec3 val = dpAdd(u_highA, u_lowA, -u_highB, -u_lowB);\n\n v_color = float2rgba(val.z / 25.0);\n\n gl_Position = vec4(position * 2.0 - 1.0, 0.0, 1.0);\n }\n `,
"\n precision highp float;\n\n varying vec4 v_color;\n\n void main() {\n gl_FragColor \x3d v_color;\n }\n ",new Map([["position",0]]))}class p extends r.WebGLDriverTestModule{constructor(t){super();this._rctx=t;this._program=k(this._rctx,!1);this._obfuscated=k(this._rctx,!0)}dispose(){super.dispose();this._obfuscated=h.disposeMaybe(this._obfuscated)}_test(t){if(q("force-double-precision-obfuscation"))return!0;if(null==this._obfuscated)return!1;const w=this._rctx,u=w.getBoundFramebufferObject(),
{x:y,y:x,width:v,height:A}=w.getViewport();t=this._runProgram(t);const z=this._runProgram(this._obfuscated);w.setViewport(y,x,v,A);w.bindFramebuffer(u);return 0!==t&&(0===z||5<t/z)}_runProgram(t){var w=this._rctx;w.resetState();var u=new f.TextureDescriptor(1);u.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;u.samplingMode=b.TextureSamplingMode.NEAREST;u=new a.FramebufferObject(w,u);var y=l.BufferObject.createVertex(w,b.Usage.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1]));y=new n.VertexArrayObject(w,new Map([["position",
0]]),{geometry:[new c.VertexElementDescriptor("position",2,b.DataType.UNSIGNED_SHORT,0,4)]},{geometry:y});const x=m.fromValues(5633261.287538229,2626832.878767164,1434988.0495278358),v=m.fromValues(5633271.46742708,2626873.6381334523,1434963.231608387),A=new Float32Array(6);d.encodeDoubleArray(x,A,3);const z=new Float32Array(6);d.encodeDoubleArray(v,z,3);w.useProgram(t);t.setUniform3f("u_highA",A[0],A[2],A[4]);t.setUniform3f("u_lowA",A[1],A[3],A[5]);t.setUniform3f("u_highB",z[0],z[2],z[4]);t.setUniform3f("u_lowB",
z[1],z[3],z[5]);w.bindFramebuffer(u);w.setViewport(0,0,1,1);w.bindVAO(y);w.drawArrays(b.PrimitiveType.TRIANGLE_STRIP,0,4);t=new Uint8Array(4);u.readPixels(0,0,1,1,b.PixelFormat.RGBA,b.PixelType.UNSIGNED_BYTE,t);y.dispose();u.dispose();w=(x[2]-v[2])/25;t=g.unpackFloatRGBA(t);return Math.abs(w-t)}}e.DoublePrecisionRequiresObfuscation=p;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/doublePrecisionUtils":function(){define(["exports"],function(e){const g=new Float32Array(2);
e.decodeDoubleArray=function(q,h,m){for(let l=0;l<m;++l)h[l]=q[2*l]+q[2*l+1]};e.encodeDoubleArray=function(q,h,m){for(let l=0;l<m;++l)h[2*l]=q[l],h[2*l+1]=q[l]-h[2*l]};e.encodeDoubleHi=function(q,h){const m=q.length;for(let l=0;l<m;++l)g[0]=q[l],h[l]=g[0];return h};e.encodeDoubleLo=function(q,h){const m=q.length;for(let l=0;l<m;++l)g[0]=q[l],g[1]=q[l]-g[0],h[l]=g[1];return h};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/testFloatBufferBlend":function(){define("exports ./BufferObject ./enums ./FramebufferObject ./renderState ./TextureDescriptor ./VertexArrayObject ./VertexElementDescriptor ./WebGLDriverTestModule".split(" "),
function(e,g,q,h,m,l,d,b,a){class f extends a.WebGLDriverTestModule{constructor(n){super();this._rctx=n;n.gl&&n.capabilities.colorBufferFloat?.textureFloat&&n.capabilities.colorBufferFloat?.floatBlend&&(this._program=n.programCache.acquire("\n precision highp float;\n attribute vec2 a_pos;\n\n void main() {\n gl_Position \x3d vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n void main() {\n gl_FragColor \x3d vec4(0.5, 0.5, 0.5, 0.5);\n }\n ",
new Map([["a_pos",0]])))}_test(n){const c=this._rctx;var r=new l.TextureDescriptor(1);r.wrapMode=q.TextureWrapMode.CLAMP_TO_EDGE;r.dataType=q.PixelType.FLOAT;r.internalFormat=q.SizedPixelFormat.RGBA32F;r.samplingMode=q.TextureSamplingMode.NEAREST;r=new h.FramebufferObject(c,r);var k=g.BufferObject.createVertex(c,q.Usage.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1]));k=new d.VertexArrayObject(c,new Map([["a_pos",0]]),{geometry:[new b.VertexElementDescriptor("a_pos",2,q.DataType.UNSIGNED_SHORT,0,4)]},
{geometry:k});c.gl.getError();c.useProgram(n);n=c.getBoundFramebufferObject();const {x:p,y:t,width:w,height:u}=c.getViewport();c.bindFramebuffer(r);c.setViewport(0,0,1,1);c.bindVAO(k);c.drawArrays(q.PrimitiveType.TRIANGLE_STRIP,0,4);var y=m.makePipelineState({blending:m.simpleBlendingParams(q.BlendFactor.ZERO,q.BlendFactor.ONE_MINUS_SRC_ALPHA)});c.setPipelineState(y);c.drawArrays(q.PrimitiveType.TRIANGLE_STRIP,0,4);y=c.gl.getError();c.setViewport(p,t,w,u);c.bindFramebuffer(n);k.dispose();r.dispose();
return y===c.gl.INVALID_OPERATION?(console.warn("Device claims support for WebGL extension EXT_float_blend but does not support it. Using fall back."),!1):!0}}e.FloatBufferBlend=f;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/testSVGPremultipliedAlpha":function(){define("exports ../2d/engine/webgl/DefaultVertexAttributeLayouts ./BufferObject ./enums ./FramebufferObject ./Texture ./TextureDescriptor ./VertexArrayObject ./WebGLDriverTestModule".split(" "),function(e,
g,q,h,m,l,d,b,a){class f extends a.WebGLDriverTestModule{constructor(c){super();this._rctx=c;this._program=c.programCache.acquire("\n precision highp float;\n\n attribute vec2 a_pos;\n varying vec2 v_uv;\n\n void main() {\n v_uv \x3d a_pos;\n gl_Position \x3d vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n varying vec2 v_uv;\n\n uniform sampler2D u_texture;\n\n void main() {\n gl_FragColor \x3d texture2D(u_texture, v_uv);\n }\n ",
new Map([["a_pos",0]]))}dispose(){super.dispose()}_test(c){const r=this._rctx;if(!r.gl)return c.dispose(),!0;var k=new d.TextureDescriptor(1);k.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE;k.samplingMode=h.TextureSamplingMode.NEAREST;k=new m.FramebufferObject(r,k);var p=q.BufferObject.createVertex(r,h.Usage.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1]));p=new b.VertexArrayObject(r,new Map([["a_pos",0]]),g.Pos2us,{geometry:p});var t=new d.TextureDescriptor;t.samplingMode=h.TextureSamplingMode.LINEAR;
t.wrapMode=h.TextureWrapMode.CLAMP_TO_EDGE;t=new l.Texture(r,t,n);r.useProgram(c);r.bindTexture(t,0);c.setUniform1i("u_texture",0);c=r.getBoundFramebufferObject();const {x:w,y:u,width:y,height:x}=r.getViewport();r.bindFramebuffer(k);r.setViewport(0,0,1,1);r.setClearColor(0,0,0,0);r.setBlendingEnabled(!1);r.clear(h.ClearBufferBit.COLOR_BUFFER_BIT);r.bindVAO(p);r.drawArrays(h.PrimitiveType.TRIANGLE_STRIP,0,4);const v=new Uint8Array(4);k.readPixels(0,0,1,1,h.PixelFormat.RGBA,h.PixelType.UNSIGNED_BYTE,
v);p.dispose();k.dispose();t.dispose();r.setViewport(w,u,y,x);r.bindFramebuffer(c);return 255!==v[0]}}const n=new Image;n.src="data:image/svg+xml,%3C%3Fxml version\x3d'1.0' encoding\x3d'UTF-8'%3F%3E%3Csvg width\x3d'5' height\x3d'5' version\x3d'1.1' viewBox\x3d'0 0 5 5' xmlns\x3d'http://www.w3.org/2000/svg'%3E%3Crect width\x3d'5' height\x3d'5' fill\x3d'%23f00' fill-opacity\x3d'.5'/%3E%3C/svg%3E%0A";n.width=5;n.height=5;n.decode();e.SVGPremultipliedAlpha=f;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/webgl/capabilities/Capabilities":function(){define(["exports","./DisjointTimerQuery","./load","./LoseContext"],function(e,g,q,h){class m{constructor(l,d){this._gl=l;this._textureFloatLinear=this._textureNorm16=this._loseContext=this._colorBufferFloat=this._textureFilterAnisotropic=this._compressedTextureS3TC=this._compressedTextureETC=null;this._disabledExtensions=d.disabledExtensions||{};this._debugWebGLExtensions=d.debugWebGLExtensions||{}}get compressedTextureETC(){this._compressedTextureETC??
(this._compressedTextureETC=q.loadCompressedTextureETC(this._gl,this._disabledExtensions));return this._compressedTextureETC}get compressedTextureS3TC(){this._compressedTextureS3TC??(this._compressedTextureS3TC=q.loadCompressedTextureS3TC(this._gl,this._disabledExtensions));return this._compressedTextureS3TC}get textureFilterAnisotropic(){this._textureFilterAnisotropic??(this._textureFilterAnisotropic=q.loadTextureFilterAnisotropicCapability(this._gl,this._disabledExtensions));return this._textureFilterAnisotropic}get disjointTimerQuery(){this._disjointTimerQuery??
(this._disjointTimerQuery=g.createDisjointTimerQuery(this._gl,this._disabledExtensions));return this._disjointTimerQuery}get colorBufferFloat(){this._colorBufferFloat??(this._colorBufferFloat=q.loadColorBufferFloat(this._gl,this._disabledExtensions));return this._colorBufferFloat}get loseContext(){this._loseContext??(this._loseContext=h.load(this._gl,this._debugWebGLExtensions));return this._loseContext}get textureNorm16(){this._textureNorm16??(this._textureNorm16=q.loadTextureNorm16(this._gl,this._disabledExtensions));
return this._textureNorm16}get textureFloatLinear(){this._textureFloatLinear??(this._textureFloatLinear=q.loadBooleanExtension(this._gl,this._disabledExtensions,"textureFloatLinear",!1,["OES_texture_float_linear"]));return this._textureFloatLinear}enable(l){return this[l]}}e.Capabilities=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/capabilities/load":function(){define(["exports"],function(e){e.loadBooleanExtension=function(g,q,h,m,l){if(m)return!0;if(q[h])return!1;
for(const d of l)if(g.getExtension(d))return!0;return!1};e.loadColorBufferFloat=function(g,q){const h=!q.colorBufferHalfFloat&&g.getExtension("EXT_color_buffer_half_float")||!q.colorBufferFloat&&g.getExtension("EXT_color_buffer_float"),m=!q.colorBufferFloat&&g.getExtension("EXT_color_buffer_float");q=!q.floatBlend&&!q.colorBufferFloat&&g.getExtension("EXT_float_blend");return h||m||q?{textureFloat:!!m,textureHalfFloat:!!h,floatBlend:!!q,R16F:g.R16F,RG16F:g.RG16F,RGBA16F:g.RGBA16F,R32F:g.R32F,RG32F:g.RG32F,
RGBA32F:g.RGBA32F,R11F_G11F_B10F:g.R11F_G11F_B10F,RGB16F:g.RGB16F}:null};e.loadCompressedTextureETC=function(g,q){return q.compressedTextureETC?null:(g=g.getExtension("WEBGL_compressed_texture_etc"))?{COMPRESSED_R11_EAC:g.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:g.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:g.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:g.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:g.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:g.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:g.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:g.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:g.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:g.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null};e.loadCompressedTextureS3TC=function(g,q){return q.compressedTextureS3TC?null:(g=g.getExtension("WEBGL_compressed_texture_s3tc"))?{COMPRESSED_RGB_S3TC_DXT1:g.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:g.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:g.COMPRESSED_RGBA_S3TC_DXT3_EXT,
COMPRESSED_RGBA_S3TC_DXT5:g.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null};e.loadTextureFilterAnisotropicCapability=function(g,q){return q.textureFilterAnisotropic?null:(g=g.getExtension("EXT_texture_filter_anisotropic")||g.getExtension("MOZ_EXT_texture_filter_anisotropic")||g.getExtension("WEBKIT_EXT_texture_filter_anisotropic"))?{MAX_TEXTURE_MAX_ANISOTROPY:g.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:g.TEXTURE_MAX_ANISOTROPY_EXT}:null};e.loadTextureNorm16=function(g,q){return q.textureNorm16?null:
(g=g.getExtension("EXT_texture_norm16"))?{R16:g.R16_EXT,RG16:g.RG16_EXT,RGB16:g.RGB16_EXT,RGBA16:g.RGBA16_EXT,R16_SNORM:g.R16_SNORM_EXT,RG16_SNORM:g.RG16_SNORM_EXT,RGB16_SNORM:g.RGB16_SNORM_EXT,RGBA16_SNORM:g.RGBA16_SNORM_EXT}:null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/capabilities/LoseContext":function(){define(["exports"],function(e){e.load=function(g,q){const h=q.loseContext&&g.getExtension("WEBGL_lose_context");return h?{loseRenderingContext:()=>h.loseContext()}:
null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/LabelManager":function(){define("exports ../../chunks/tslib.es6 ../../core/Accessor ../../core/Error ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/property ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./engine/webgl/collisions/CollisionEngine".split(" "),function(e,g,q,h,m,l,d,b,a,f){e.LabelManager=class extends q{constructor(n){super(n);this._lastUpdate=0;this.collisionEngine=
new f.CollisionEngine;this.lastUpdateId=-1;this.updateRequested=!1;this.view=null}get updating(){m("esri-2d-log-updating")&&console.log(`Updating LabelManager ${this.updateRequested}:\n-> updateRequested: ${this.updateRequested}`);return this.updateRequested}update(n){const c=performance.now();32<=c-this._lastUpdate?(this._lastUpdate=c,this.doUpdate(n)):this.requestUpdate()}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view?.requestUpdate())}processUpdate(n){this.updateRequested&&
(this.updateRequested=!1,this.update(n))}doUpdate(n){const c=this.view;if(c)try{const r=n.state.scale,k=c.featuresTilingScheme.getClosestInfoForScale(r).level;this.collisionEngine.run(c.allLayerViews.items,n,r,k)}catch(r){}}};g.__decorate([d.property()],e.LabelManager.prototype,"updateRequested",void 0);g.__decorate([d.property()],e.LabelManager.prototype,"updating",null);g.__decorate([d.property()],e.LabelManager.prototype,"view",void 0);e.LabelManager=g.__decorate([a.subclass("esri.views.2d.LabelManager")],
e.LabelManager);Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/collisions/CollisionEngine":function(){define(["exports","../../../../../core/has","../definitions","./CollisionGrid"],function(e,g,q,h){function m(b,a){b=b.children.slice();b.sort((f,n)=>f.tileAge-n.tileAge);b.forEach(f=>{null!=f.labelMetrics&&f.isReady&&a(f,f.labelMetrics)})}function l(b,a){return(!b.minScale||b.minScale>=a)&&(!b.maxScale||b.maxScale<=a)}class d{run(b,a,f,n){const c=[];for(let r=
b.length-1;0<=r;r--){const k=b[r];k.labelingCollisionInfos?.length&&c.push(...k.labelingCollisionInfos)}g("esri-2d-update-debug")&&c.length&&console.debug("CollisionEngine.run");this._transformMetrics(c);this._runCollision(c,a,f,n);for(const r of c)r.container.requestRender()}_runCollision(b,a,f,n){const [c,r]=a.state.size,k=new h.CollisionBitsetGrid(c,r,a.pixelRatio);for(const {container:p,deconflictionEnabled:t,visible:w}of b){const u=p.attributeView;t?w?(this._prepare(p),this._collideVisible(k,
p,f,n),this._collideInvisible(k,p)):m(p,(y,x)=>{for(const v of x)u.setLabelMinZoom(v.entityTexel,255)}):m(p,(y,x)=>{for(const v of x)l(v,f)?(u.setLabelMinZoom(v.entityTexel,0),w&&k.insertMetrics(v)):u.setLabelMinZoom(v.entityTexel,254)})}}_isFiltered(b,a,f){b=a.getFilterFlags(b);a=null==f.featureEffect||f.featureEffect.excludedLabelsVisible||!!(b&q.effectFlag0);return!((!f.hasFilter||b&q.filterFlag0)&&a)}_prepare(b){const a=b.attributeView,f=new Set;m(b,(n,c)=>{for(const r of c)n=r.entityTexel,f.has(n)||
(f.add(n),this._isFiltered(n,a,b.layerView)?a.setLabelMinZoom(n,254):0!==a.getLabelMinZoom(n)?a.setLabelMinZoom(n,255):a.setLabelMinZoom(n,0))})}_collideVisible(b,a,f,n){const c=a.attributeView,r=new Set;m(a,(k,p)=>{for(var t=0;t<p.length;t++){const u=p[t].entityTexel;if(r.has(u))continue;if(k.key.level!==n){c.setLabelMinZoom(u,254);r.add(u);continue}if(!l(p[t],f)){c.setLabelMinZoom(u,254);r.add(u);continue}if(0!==c.getLabelMinZoom(u)){r.add(u);continue}let y=!1,x=!0;for(var w=t;t<p.length;t++){const v=
p[t];if(v.entityTexel!==u)break;if(!y)switch(b.hasCollision(v)){case h.hasCollision:y=!0;x=!1;break;case h.none:x=!1}}if(!y)for(;w<t;w++)b.insertMetrics(p[w]);--t;x||(r.add(u),c.setLabelMinZoom(u,y?254:0))}})}_collideInvisible(b,a){const f=a.attributeView,n=new Set;m(a,(c,r)=>{for(var k=0;k<r.length;k++){c=r[k].entityTexel;if(n.has(c))continue;if(255!==f.getLabelMinZoom(c)){n.add(c);continue}let t=!1,w=!0;for(var p=k;k<r.length;k++){const u=r[k];if(u.entityTexel!==c)break;if(!t)switch(b.hasCollision(u)){case h.hasCollision:t=
!0;w=!1;break;case h.none:w=!1}}if(!t)for(;p<k;p++)b.insertMetrics(r[p]);--k;w||(n.add(c),f.setLabelMinZoom(c,t?255:0))}})}_transformMetrics(b){for(const {container:a,geometryType:f,vvEvaluators:n}of b)m(a,(c,r)=>{const k=a.attributeView;c=c.transforms.labelMat2d;c[4]=Math.round(c[4]);c[5]=Math.round(c[5]);const p="polyline"===f;for(const y of r){const {entityTexel:x,anchorX:v,anchorY:A}=y;var t=y.referenceBounds?.size??0;r=n[0];if(null!=r){var w=k.getVVSize(x);r=r(w);t=isNaN(r)||null==r||Infinity===
r?t:r}r=t/2*y.directionX;t=t/2*y.directionY;for(const z of y.bounds){w=v;var u=A;p?(w=w+z.x+r,u=u+z.y+t,w=c[0]*w+c[2]*u+c[4],u=c[1]*w+c[3]*u+c[5],z.computedX=Math.floor(w),z.computedY=Math.floor(u)):(w=c[0]*v+c[2]*A+c[4],u=c[1]*v+c[3]*A+c[5],u=u+z.y+t,z.computedX=w+z.x+r,z.computedY=u)}}})}}e.CollisionEngine=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/collisions/CollisionGrid":function(){define(["exports","../../../../../core/mathUtils","../definitions",
"../../../layers/features/support/StaticBitSet"],function(e,g,q,h){class m{constructor(l,d,b){this._width=l*b;this._height=d*b;this._pixelRatio=b;l=Math.ceil(this._width/1);d=Math.ceil(this._height/1);this._cols=l;this._rows=d;this._cells=h.StaticBitSet.create(l*d)}insertMetrics(l){this._markMetrics(l)}hasCollision(l){let d=0;for(const {computedX:b,computedY:a,width:f,height:n}of l.bounds)switch(this._collide(b,a,(f+q.labelPlacementOffsetPadding)*this._pixelRatio,(n+q.labelPlacementOffsetPadding)*
this._pixelRatio)){case 2:return 2;case 1:d++}return d===l.bounds.length?1:0}getCellId(l,d){return l+d*this._cols}has(l){return this._cells.has(l)}hasRange(l,d){return this._cells.hasRange(l,d)}set(l){this._cells.set(l)}setRange(l,d){this._cells.setRange(l,d)}_collide(l,d,b,a){l-=b/2;d-=a/2;b=l+b;var f=d+a;if(0>b||0>f||l>this._width||d>this._height)return 1;a=g.clamp(Math.floor(l/1),0,this._cols);var n=g.clamp(Math.floor(d/1),0,this._rows);l=g.clamp(Math.ceil(b/1),0,this._cols);d=g.clamp(Math.ceil(f/
1),0,this._rows);for(b=n;b<=d;b++)for(f=a;f<=l;f++)if(n=this.getCellId(f,b),this.has(n))return 2;return 0}_mark(l,d,b,a,f){l-=b/2;d-=a/2;b=l+b;f=d+a;a=g.clamp(Math.floor(l/1),0,this._cols);d=g.clamp(Math.floor(d/1),0,this._rows);b=g.clamp(Math.ceil(b/1),0,this._cols);for(l=g.clamp(Math.ceil(f/1),0,this._rows);d<=l;d++)for(f=a;f<=b;f++){const n=this.getCellId(f,d);this.set(n)}return!1}_markMetrics(l){for(const {computedX:d,computedY:b,width:a,height:f}of l.bounds)this._mark(d,b,(a+q.labelPlacementOffsetPadding)*
this._pixelRatio,(f+q.labelPlacementOffsetPadding)*this._pixelRatio,l.entityTexel)}}e.CollisionBitsetGrid=m;e.hasCollision=2;e.none=0;e.outsideExtent=1;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/StaticBitSet":function(){define(["exports"],function(e){class g{static fromBuffer(q,h){return new g(q,h)}static create(q,h=4294967295){q=new Uint32Array(Math.ceil(q/32));return new g(q,h)}constructor(q,h){this._mask=0;this._buf=q;this._mask=h}_getIndex(q){return Math.floor(q/
32)}has(q){q&=this._mask;return!!(this._buf[this._getIndex(q)]&1<<q%32)}hasRange(q,h){for(;q%32&&q!==h;){if(this.has(q))return!0;q++}for(;h%32&&q!==h;){if(this.has(q))return!0;h--}if(q===h)return!1;for(q/=32;q!==h/32;q++)if(this._buf[q])return!0;return!1}set(q){q&=this._mask;const h=this._getIndex(q);this._buf[h]|=1<<q%32}setRange(q,h){for(;q%32&&q!==h;)this.set(q++);for(;h%32&&q!==h;)this.set(h--);if(q!==h)for(q/=32;q!==h/32;q++)this._buf[q]=4294967295}unset(q){q&=this._mask;const h=this._getIndex(q);
this._buf[h]&=4294967295^1<<q%32}resize(q){const h=this._buf;q=new Uint32Array(Math.ceil(q/32));q.set(h);this._buf=q}or(q){for(let h=0;h<this._buf.length;h++)this._buf[h]|=q._buf[h];return this}and(q){for(let h=0;h<this._buf.length;h++)this._buf[h]&=q._buf[h];return this}xor(q){for(let h=0;h<this._buf.length;h++)this._buf[h]^=q._buf[h];return this}ior(q){for(let h=0;h<this._buf.length;h++)this._buf[h]|=~q._buf[h];return this}iand(q){for(let h=0;h<this._buf.length;h++)this._buf[h]&=~q._buf[h];return this}ixor(q){for(let h=
0;h<this._buf.length;h++)this._buf[h]^=~q._buf[h];return this}any(){for(let q=0;q<this._buf.length;q++)if(this._buf[q])return!0;return!1}copy(q){for(let h=0;h<this._buf.length;h++)this._buf[h]=q._buf[h];return this}clone(){return new g(this._buf.slice(),this._mask)}clear(){for(let q=0;q<this._buf.length;q++)this._buf[q]=0;return this}forEachSet(q){for(let h=0;h<this._buf.length;h++){let m=this._buf[h],l=32*h;if(m)for(;m;)m&1&&q(l),m>>>=1,l++}}countSet(){let q=0;this.forEachSet(h=>{q++});return q}}
e.StaticBitSet=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/graphics/GraphicsView2D":function(){define("../../../../chunks/tslib.es6 ../../../../core/Accessor ../../../../core/arrayUtils ../../../../core/has ../../../../core/Identifiable ../../../../core/maybe ../../../../core/promiseUtils ../../../../core/reactiveUtils ../../../../core/accessorSupport/decorators/property ../../../../core/Logger ../../../../core/accessorSupport/decorators/subclass ../../../../geometry/support/aaBoundingRect ../../../../geometry/support/jsonUtils ../../../../layers/support/FieldsIndex ../../../../symbols/cim/CIMSymbolHelper ../../../../symbols/cim/OverrideHelper ../../../../symbols/support/defaults ../../engine/webgl/definitions ../../engine/webgl/FeatureTile ../../engine/webgl/mesh/MeshData ../../engine/webgl/mesh/factories/ResourceProxy ../../engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas ../features/schema/processor/StorageSchema ../features/support/AttributeStore ../features/support/ComputedAttributeStorage ../features/support/FeatureMetadata ../features/support/GraphicsReader ./GraphicStore ../support/FeatureCommandQueue ../support/UpdateTracking2D".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y,x,v,A,z,B,D,F,E,C,G,H){class K{static getOrCreate(J,O,Q){let T=O.get(J.id);T||(T=new K(J,Q),O.set(J.id,T));return T}static fromItems(J,O,Q){J=new K(J,Q);J.addedOrModified.push(...O);return J}constructor(J,O){this.tile=J;this.metadata=O;this.addedOrModified=[];this.removed=[]}get reader(){this._reader||(this._reader=E.GraphicsReader.from(this.addedOrModified,this.tile,this.metadata));return this._reader}}g=class extends m.IdentifiableMixin(g){constructor(J){super(J);
this._attached=!1;this._tiles=new Map;this._controller=new AbortController;this._hashToSymbolInfo=new Map;this._lastCleanup=performance.now();this._cleanupRequired=!0;this.lastUpdateId=-1;this.renderer=null;this._updateTracking=new H.UpdateTracking2D({debugName:"GraphicsView2D"});this.updateRequested=!1;this.defaultPointSymbolEnabled=!0;this._commandQueue=new G({process:O=>{switch(O.type){case "update":return this._update();default:throw Error("InternalError: Unsupported command");}}});this.graphicUpdateHandler=
this.graphicUpdateHandler.bind(this)}destroy(){this.container.destroy();this.renderer=this.view=null;this._set("graphics",null);this._controller.abort();this._graphicStore.clear();this._attributeStore=null;this._hashToSymbolInfo.clear();this._updateTracking.destroy();this._commandQueue.destroy()}_initAttributeStore(){this._storage=new D.ComputedAttributeStorage({spatialReference:this.view.spatialReference,fields:new k});this._attributeStore=new B.AttributeStore({isLocal:!0,update:O=>{h("esri-2d-update-debug")&&
console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateStart`,{message:O});this.container.attributeView.requestUpdate(O);this.container.requestRender();h("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateEnd`,{message:O})}});const J=z.createStorageSchema(null,[]);this._attributeStore.update(J,this._storage,null);this.container.checkHighlight=()=>this._attributeStore.hasHighlight}initialize(){this._initAttributeStore();this._metadata=
F.GraphicsMetadata.create(this.view.spatialReference);this._resourceProxy=new v.ResourceProxy({fetch:J=>Promise.all(J.map(O=>this.view.stage.textureManager.rasterizeItem(O))),fetchDictionary:J=>{throw Error("InternalError: Graphics do not support Dictionary requests");}});this.addHandles([b.watch(()=>this._effectiveRenderer,()=>this._pushUpdate()),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",()=>{this.addHandles([this.graphics.on("change",()=>this._pushUpdate())]);
this._graphicStore=new C(this.view.spatialReference,this._cimResourceManager,this.view.featuresTilingScheme,this.view.state.scale,this._attributeStore);this._attached=!0;this.requestUpdate();this._pushUpdate()})]);this._updateTracking.addUpdateTracking("CommandQueue",this._commandQueue.updateTracking);this._onTileUpdate({added:this.view.graphicsTileStore.tiles,removed:[]})}get _effectiveRenderer(){return"function"===typeof this.renderer?this.renderer():this.renderer}get _cimResourceManager(){return this.view.stage.textureManager.resourceManager}get updating(){const J=
!this._attached||this._updateTracking.updating;h("esri-2d-log-updating")&&console.log(`Updating GraphicsView2D: ${J}\n -> attaching ${!this._attached}\n -> updateTracking ${this._updateTracking.updating}`);return J}hitTest(J){if(!this.view||this.view.suspended)return[];const {resolution:O,rotation:Q}=this.view.state;J=this._graphicStore.hitTest(J.x,J.y,2,O,Q);const T=new Set(J),I=this.graphics.items.reduce((L,R)=>{T.has(R.uid)&&L.set(R.uid,R);return L},new Map);return J.map(L=>I.get(L)).filter(q.isSome)}requestUpdate(){this.updateRequested||
(this.updateRequested=!0,this.requestUpdateCallback());this.notifyChange("updating")}processUpdate(J){this.updateRequested&&(this.updateRequested=!1,this.update(J))}viewChange(){this.requestUpdate()}setHighlight(J){const O=[];for(const {objectId:Q,highlightFlags:T}of J){const I=this._graphicStore.getItem(Q)?.displayId;O.push({objectId:Q,highlightFlags:T,displayId:I})}this._attributeStore.setHighlight(O,J);this._pushUpdate()}graphicUpdateHandler(J){this._pushUpdate()}update(J){this.updateRequested=
!1;this._attached&&this._graphicStore.updateLevel(J.state.resolution)}pushUpdate(){this._pushUpdate()}_pushUpdate(){d.ignoreAbortErrors(this._commandQueue.push({type:"update"}))}async _update(){try{h("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView._update start`);const J=await this._graphicStore.update(this.graphics,Q=>this._getSymbolForGraphic(Q),Q=>this._ensureSymbolResource(Q));if(!J.hasAnyUpdate()){this._attributeStore.sendUpdates();return}J.removed.length&&(this._cleanupRequired=
!0);h("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView updateMessage`,J);const O=this._createTileMessages(J);await this._fetchResources(O);this._write(O);for(const Q of J.added)this._setFilterState(Q);for(const Q of J.updated)this._setFilterState(Q);h("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate`,J);this._attributeStore.sendUpdates();h("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate.await`,J)}catch(J){}this._cleanupSharedResources()}_createTileMessages(J){const O=
new Map;for(var Q of J.added){var T=this.view.graphicsTileStore.getIntersectingTiles(Q.bounds);for(const I of T)K.getOrCreate(I,O,this._metadata).addedOrModified.push(Q)}for(const I of J.updated){Q=this.view.graphicsTileStore.getIntersectingTiles(I.prevBounds);T=this.view.graphicsTileStore.getIntersectingTiles(I.bounds);for(const L of Q)K.getOrCreate(L,O,this._metadata).removed.push(I.displayId);for(const L of T)K.getOrCreate(L,O,this._metadata).addedOrModified.push(I)}for(const I of J.removed){J=
this.view.graphicsTileStore.getIntersectingTiles(I.bounds);for(const L of J)K.getOrCreate(L,O,this._metadata).removed.push(I.displayId)}return Array.from(O.values())}async _fetchResources(J){for(const {tile:O,reader:Q}of J){h("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${O.id}] GraphicsView fetchResources`,J);const T=Q.getCursor();for(;T.next();)for(const I of T.getMeshWriters())I.enqueueRequest(this._resourceProxy,T,O.createArcadeEvaluationOptions(this.view.timeZone))}await this._resourceProxy.fetchEnqueuedResources()}_write(J){for(const O of J){h("esri-2d-update-debug")&&
console.debug(`Id[${this.layerId}] Tile[${O.tile.id}] GraphicsView write`,O);J=this._writeMeshes(O);let Q=this._tiles.get(O.tile.key);Q||=this._createFeatureTile(O.tile.key);h("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${O.tile.id}] GraphicsView onTileData`,O);this.container.onTileData(Q,{type:"update",modify:J,remove:O.removed,end:!1,attributeEpoch:this._attributeStore.epoch});this.container.requestRender()}}_writeMeshes(J){const O=new x.MeshData(J.tile.id),Q=J.reader.getCursor();
for(;Q.next();){O.entityStart(Q.getDisplayId(),Q.getZOrder());for(const T of Q.getMeshWriters())T.write(O,this._resourceProxy,Q,J.tile.createArcadeEvaluationOptions(this.view.timeZone),J.tile.level);O.entityEnd()}return{...O.serialize().message,tileId:J.tile.id}}_setFilterState(J){const O=J.displayId,Q=this._attributeStore.getHighlightFlags(J.objectId);this._attributeStore.setData(O,0,0,Q|(J.visible?u.filterFlag0:0))}_getSymbolForGraphic(J){return null!=J.symbol?J.symbol:null!=this._effectiveRenderer?
this._effectiveRenderer.getSymbol(J):this._getNullSymbol(J)}async _ensureSymbolResource(J){if(J.symbol){var O=await this._getSymbolInfo(J.symbol);if(O){var Q=O.linearCIM.filter(T=>"text"===T.type);0<Q.length?(Q=await this._getTextResources(J,Q),J.symbolResource={symbolInfo:O,textInfo:Q}):J.symbolResource={symbolInfo:O}}}}_getSymbolInfo(J){const O=J.hash();this._hashToSymbolInfo.has(O)||this._hashToSymbolInfo.set(O,this._createSymbolInfo(O,J).catch(Q=>null));return this._hashToSymbolInfo.get(O)}async _createSymbolInfo(J,
O){O=await this._convertToCIMSymbol(O);const Q=await this._createLinearCIM(O),T=await this._createMeshWriters(O,Q);return{hash:J,cimSymbol:O,linearCIM:Q,meshWriters:T}}async _convertToCIMSymbol(J){J=p.symbolToCIM(J);return"web-style"===J.type?(await J.fetchCIMSymbol()).data:J}async _createLinearCIM(J){await Promise.all(p.CIMSymbolHelper.fetchResources(J.symbol,this._cimResourceManager,[]));return this.view.stage.cimAnalyzer.analyzeSymbolReference(J,!1)}async _createMeshWriters(J,O){d.throwIfAborted(this._controller.signal);
const Q=this.view.stage.meshWriterRegistry;J=await A.createGraphicSymbolMeshSchemas(J,O,this.container.instanceStore);return Promise.all(J.map(T=>Q.createMeshWriter(this._storage,this._resourceProxy,{tileInfo:this.view.featuresTilingScheme.tileInfo},T)))}_onTileUpdate(J){if(J.added&&0<J.added.length)for(const O of J.added)this._updateTracking.addPromise(this._addTile(O));if(J.removed&&0<J.removed.length)for(const O of J.removed)this._removeTile(O.key)}_createFeatureTile(J){var O=this.view.featuresTilingScheme.getTileBounds(c.create(),
J);const Q=this.view.featuresTilingScheme.getTileResolution(J.level);O=new y.FeatureTile(J,Q,O[0],O[3]);this._tiles.set(J,O);this.container.addChild(O);return O}async _addTile(J){if(this._attached){var O=this._graphicStore.queryItems(J);if(O.length){var Q=this._createFeatureTile(J.key);J=K.fromItems(J,O,this._metadata);await this._fetchResources([J]);J=this._writeMeshes(J);Q.onMessage({type:"append",append:J,clear:!1,end:!0,attributeEpoch:this._attributeStore.epoch})}}}_removeTile(J){if(this._tiles.has(J)){var O=
this._tiles.get(J);this.container.removeChild(O);O.destroy();this._tiles.delete(J)}}_getNullSymbol(J){J=J.geometry;return r.isPolyline(J)?w.errorPolylineSymbol2D:r.isPolygon(J)||r.isExtent(J)?w.errorPolygonSymbol2D:this.defaultPointSymbolEnabled?w.errorPointSymbol2D:null}async _getTextResources(J,O){var Q=[];const T=[];for(var I=0;I<O.length;I++){const R=O[I],{resource:V,overrides:S}=R.textRasterizationParam;if(0<S?.length){var L=t.OverrideHelper.resolveSymbolOverrides({type:"CIMSymbolReference",
primitiveOverrides:S,symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:V.symbol.height,anchorPointUnits:"Relative",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:V.symbol,textString:V.textString}],scaleSymbolsProportionally:!0,respectFrame:!0}]}},J,this.view.spatialReference,null,r.getJsonType(J.projectedGeometry),null,null);L.then(X=>{({textString:X}=X.symbolLayers[0].markerGraphics[0]);T.push({type:"cim-rasterization-info",
resource:{type:"text",textString:X||"",font:V.font}});R.text=V.textString=X||""});Q.push(L)}else T.push({type:"cim-rasterization-info",resource:V})}0<Q.length&&await Promise.all(Q);J=T.map(R=>this.view.stage.textureManager.rasterizeItem(R));J=await Promise.all(J);l.assertIsSome(J);Q=new Map;for(I=0;I<O.length;I++)L=O[I],Q.set(L.textRasterizationParam.resource.symbol,{text:L.text,glyphMosaicItems:J[I]});return Q}_cleanupSharedResources(){if(this._cleanupRequired){var J=performance.now();if(!(5E3>J-
this._lastCleanup)){this._cleanupRequired=!1;this._lastCleanup=J;J=new Set;for(var O of this._graphicStore.items())J.add(O.symbolResource?.symbolInfo.hash);O=new Set(this._hashToSymbolInfo.keys());for(const Q of O.values())J.has(Q)||this._hashToSymbolInfo.delete(Q)}}}};e.__decorate([a.property()],g.prototype,"_effectiveRenderer",null);e.__decorate([a.property({constructOnly:!0})],g.prototype,"layerId",void 0);e.__decorate([a.property({constructOnly:!0})],g.prototype,"requestUpdateCallback",void 0);
e.__decorate([a.property()],g.prototype,"container",void 0);e.__decorate([a.property({constructOnly:!0})],g.prototype,"graphics",void 0);e.__decorate([a.property()],g.prototype,"renderer",void 0);e.__decorate([a.property()],g.prototype,"_updateTracking",void 0);e.__decorate([a.property()],g.prototype,"updating",null);e.__decorate([a.property()],g.prototype,"view",void 0);e.__decorate([a.property()],g.prototype,"updateRequested",void 0);e.__decorate([a.property()],g.prototype,"defaultPointSymbolEnabled",
void 0);return g=e.__decorate([n.subclass("esri.views.2d.layers.graphics.GraphicsView2D")],g)})},"esri/views/2d/engine/webgl/mesh/MeshData":function(){define(["exports","../DisplayEntity","../DisplayRecord","./VertexDataWriter","../util/Writer"],function(e,g,q,h,m){class l{constructor(d,b=0){this._id=d;this._sizeHint=b;this._entitySortKeyIndex=this._entityIdIndex=this._entityCountOffset=this._entityRecordCountOffset=0;this._didEntityStart=!1;this._instanceIdToVertexData=new Map;this._recordVertexCount=
this._recordVertexStart=this._recordIndexCount=this._recordIndexStart=0;this._current={metric:null,writer:null,start:0,sortKey:0,instanceId:0,layoutHash:0,indexStart:0,vertexStart:0,textureKey:0,metricBoxLenPointer:0};this._entities=new m(Uint32Array,this._sizeHint*g.byteSizeHint);this._entityCountOffset=this._entities.push(0)}get id(){return this._id}serialize(){const d=[],b=[],a=this._entities.buffer();for(const f of this._instanceIdToVertexData.values())b.push(f.serialize(d));return{message:{data:b,
entities:a},transferList:d}}vertexCount(){return this._current.writer?.vertexCount??0}indexCount(){return this._current.writer?.indexCount??0}vertexEnsureSize(d){this._current.writer.vertexEnsureSize(d)}indexEnsureSize(d){this._current.writer.indexEnsureSize(d)}vertexWrite(d){this._current.writer.writeVertex(d)}vertexWriteRegion(d){this._current.writer.writeVertexRegion(d)}vertexWriteF32(d){this._current.writer.writeVertexF32(d)}recordBounds(d,b,a,f){}indexWrite(d){this._current.writer.writeIndex(d)}metricStart(d){this._current.metric=
d}metricEnd(){this._current.metric.bounds.length&&this._current.writer.writeMetric(this._current.metric)}metricBoxWrite(d){this._current.metric.bounds.push(d)}entityStart(d,b=d){this._entityIdIndex=this._entities.push(d);this._entitySortKeyIndex=this._entities.writeF32(b);this._entityRecordCountOffset=this._entities.push(0);this._didEntityStart=!0}entityRecordCount(){return this._entities.getValue(this._entityRecordCountOffset)}entityEnd(){this._didEntityStart&&(0===this.entityRecordCount()?this._entities.seek(this._entityIdIndex):
this._entities.incr(this._entityCountOffset),this._didEntityStart=!1)}recordCount(){return this._entities.getValue(this._entityRecordCountOffset)}recordStart(d,b,a=0){this._current.writer=this._getVertexWriter(d,b);this._current.indexStart=this._current.writer.indexCount;this._current.vertexStart=this._current.writer.vertexCount;this._current.instanceId=d;this._current.layoutHash=b.hash;this._current.textureKey=a}recordEnd(d=0){const b=this._current.vertexStart,a=this._current.writer.vertexCount-
b;if(!a)return!1;const f=this._current.indexStart,n=this._current.writer.indexCount-f;this._recordIndexStart=f;this._recordIndexCount=n;this._recordVertexStart=b;this._recordVertexCount=a;this._entities.incr(this._entityRecordCountOffset);q.write(this._entities,this._current.instanceId,this._current.textureKey,f,n,b,a,d);return!0}copyLast(d,b){var a=this._recordVertexStart+this._recordVertexCount;this._entities.incr(this._entityRecordCountOffset);q.write(this._entities,this._current.instanceId,this._current.textureKey,
this._recordIndexStart+this._recordIndexCount,this._recordIndexCount,a,this._recordVertexCount,0);var f=this._current.writer.indexWriter;const n=this._current.writer.vertexWriter;var c=this._recordIndexStart+this._recordIndexCount,r=this._recordVertexCount;for(var k=this._recordIndexStart;k!==c;k++){const p=f.getValue(k);f.push(p+r)}f=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT;r=this._recordVertexStart*f;for(c=(this._recordVertexStart+this._recordVertexCount)*f;r!==c;r++)k=n.getValue(r),
n.push(k);c=this._current.writer.layout.position;r=c.packPrecisionFactor??1;c=c.offset/Uint32Array.BYTES_PER_ELEMENT;d*=r;b*=r;for(a*=f;a<=n.length;a+=f)n.i1616Add(a+c,d,b)}copyLastFrom(d,b,a){var f=d._entities.getValue(d._entityIdIndex),n=this._entities.getValue(this._entityIdIndex);f!==n&&(n=d._entities.getValueF32(d._entitySortKeyIndex),this.entityStart(f,n));this.recordStart(d._current.instanceId,d._current.writer.layout,d._current.textureKey);f=this._current.writer.layout.stride/Uint32Array.BYTES_PER_ELEMENT;
var c=this._current.vertexStart,r=d._current.vertexStart-c;const k=this._current.writer.indexWriter;n=this._current.writer.vertexWriter;const p=d._current.writer.indexWriter;var t=d._current.writer.vertexWriter;for(let w=d._current.indexStart;w!==p.length;w++){const u=p.getValue(w);k.push(u-r)}for(d=d._current.vertexStart*f;d!==t.length;d++)r=t.getValue(d),n.push(r);d=this._current.writer.layout.position;t=d.packPrecisionFactor??1;d=d.offset/Uint32Array.BYTES_PER_ELEMENT;b*=t;a*=t;for(c*=f;c<=n.length;c+=
f)n.i1616Add(c+d,b,a);this.recordEnd()}_getVertexWriter(d,b){const a=this._instanceIdToVertexData;a.has(d)||a.set(d,new h.VertexDataWriter(d,b,this._sizeHint));return a.get(d)}}e.MeshData=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/mesh/VertexDataWriter":function(){define(["exports","../util/Writer"],function(e,g){class q{constructor(h,m,l=0){const d=6*l*Uint32Array.BYTES_PER_ELEMENT;l=4*l*m.stride;const b=m.stride/4,a=m.attributes.find(f=>"pos"===
f.name||"position"===f.name);if(!a)throw Error("InternalError: Unable to find position attribute");this.layout={...m,position:a};this._indices=new g(Uint32Array,d);this._vertices=new g(Uint32Array,l);this._metrics=new g(Uint32Array,0);this._metricCountOffset=this._metrics.push(0);this._strideInt=b;this._instanceId=h}serialize(h){const m=this._indices.buffer(),l=this._vertices.buffer(),d=this._metrics.length?this._metrics.buffer():null;h.push(m,l);return{instanceId:this._instanceId,layout:this.layout,
indices:m,vertices:l,metrics:d}}get strideInt(){return this._strideInt}get vertexCount(){return this._vertices.length/this._strideInt}get indexCount(){return this._indices.length}get indexWriter(){return this._indices}get vertexWriter(){return this._vertices}get metricWriter(){return this._metrics}vertexEnsureSize(h){this._vertices.ensureSize(h)}indexEnsureSize(h){this._indices.ensureSize(h)}writeIndex(h){this._indices.push(h)}writeVertex(h){this._vertices.push(h)}writeVertexRegion(h){this._vertices.writeRegion(h)}writeVertexF32(h){this._vertices.writeF32(h)}writeMetric(h){this._metrics.incr(this._metricCountOffset);
h.serialize(this._metrics)}}e.VertexDataWriter=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/util/Writer":function(){define(function(){class e{get length(){return this._pos}constructor(g,q){this._pos=0;q=q?this._roundToNearest(q,g.BYTES_PER_ELEMENT):40;this._array=new ArrayBuffer(q);this._buffer=new g(this._array);this._ctor=g;this._i16View=new Int16Array(this._array)}_roundToNearest(g,q){g=Math.round(g);return 1===q?g:g+(q-g%q)}_ensureSize(g){if(this._pos+
g>=this._buffer.length){g=this._roundToNearest(1.25*(this._array.byteLength+g*this._buffer.BYTES_PER_ELEMENT),this._buffer.BYTES_PER_ELEMENT);g=new ArrayBuffer(g);const q=new this._ctor(g);q.set(this._buffer,0);this._array=g;this._buffer=q;this._i16View=new Int16Array(this._array)}}ensureSize(g){this._ensureSize(g)}writeF32(g){this._ensureSize(1);const q=this._pos;(new Float32Array(this._array,4*this._pos,1))[0]=g;this._pos++;return q}push(g){this._ensureSize(1);const q=this._pos;this._buffer[this._pos++]=
g;return q}writeFixed(g){this._buffer[this._pos++]=g}setValue(g,q){this._buffer[g]=q}i1616Add(g,q,h){this._i16View[2*g]+=q;this._i16View[2*g+1]+=h}getValue(g){return this._buffer[g]}getValueF32(g){return(new Float32Array(this._array,4*g,1))[0]}incr(g){if(this._buffer.length<g)throw Error("Increment index overflows the target buffer");this._buffer[g]++}decr(g){this._buffer[g]--}writeRegion(g){this._ensureSize(g.length);const q=this._pos;this._buffer.set(g,this._pos);this._pos+=g.length;return q}writeManyFrom(g,
q,h){for(this._ensureSize(h-q);q!==h;q++)this.writeFixed(g._buffer[q])}buffer(){const g=this._array.slice(0,4*this._pos);this.destroy();return g}toArray(){return[...this._buffer]}seek(g){this._pos=g}destroy(){this._buffer=this._array=null}}return e})},"esri/views/2d/engine/webgl/mesh/factories/ResourceProxy":function(){define(["exports","../../../../../../core/string","../../Utils","../../shaderGraph/techniques/mesh/AResourceProxy"],function(e,g,q,h){class m extends h.AResourceProxy{constructor(l){super();
this._fetcher=l;this._controller=new AbortController;this._pendingIds=new Set;this._pendingRequests=[];this._resourceIdToResource=new Map}destroy(){this._controller.abort()}get _abortOptions(){return{signal:this._controller.signal}}enqueueRequest(l){var d=q.discardUrlIfHasUrlHash(l.resource);d=g.numericHash(JSON.stringify(d));if(this._pendingIds.has(d))return d;this._pendingIds.add(d);this._pendingRequests.push({...l,resourceId:d});return d}async fetchEnqueuedResources(){const l=this._pendingRequests;
this._pendingIds.clear();this._pendingRequests=[];const d=await this._fetcher.fetch(l,this._abortOptions);for(let b=0;b<d.length;b++)this._resourceIdToResource.set(l[b].resourceId,d[b])}async fetchResourceImmediate(l){l=await this._fetcher.fetch([l],this._abortOptions);if(1!==l.length)throw Error("FeaturePipelineResourceProxy: failed to fetch resources");return l[0]}async fetchDictionaryResourceImmediate(l){l=await this._fetcher.fetchDictionary([l],this._abortOptions);if(1!==l.length)throw Error("FeaturePipelineResourceProxy: failed to fetch dictionary resources");
return l[0]}getResource(l){return this._resourceIdToResource.get(l)}}e.ResourceProxy=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/AResourceProxy":function(){define(["exports"],function(e){class g{}e.AResourceProxy=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas":function(){define(["exports","../../../../layers/features/schema/processor/VisualVariablesSchema",
"../../../../layers/features/schema/processor/symbols/ComplexSymbolSchema"],function(e,g,q){e.createGraphicSymbolMeshSchemas=async function(h,m,l){const d=[];h={scaleInfo:q.getScaleInfo(h),scaleExpression:null};for(const b of m)switch(b.type){case "marker":d.push(...q.createComplexMarkerMeshInfos(l.instances.marker,b,g.noVisualVariables,h));break;case "fill":null==b.spriteRasterizationParam?d.push(...q.createComplexSimpleFillMeshInfos(l.instances.fill,b,h)):d.push(...q.createComplexFillMeshInfos(l.instances.complexFill,
b,!1,h));break;case "line":b.spriteRasterizationParam?d.push(...q.createComplexTexturedLineMeshInfos(l.instances.texturedLine,b,!1,h)):d.push(...q.createComplexSimpleLineMeshInfos(l.instances.line,b,!1,h));break;case "text":d.push(...q.createComplexTextMeshInfos(l.instances.text,b,g.noVisualVariables,h))}return d};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/schema/processor/VisualVariablesSchema":function(){define("exports ../../../../../../core/has ../../../../../../core/screenUtils ../../../../../../core/unitUtils ../../../../../../renderers/support/lengthUtils ../../../../engine/webgl/definitions ../../../../engine/webgl/shaderGraph/techniques/shaders/constants ./schemaUtils ../../support/rendererUtils".split(" "),
function(e,g,q,h,m,l,d,b,a){function f(u){if(!u.stops?.length)return null;u=u.stops.sort((x,v)=>x.value-v.value);var y=b.padStops(u,8);u=y.map(({value:x})=>x);y=y.map(({color:x})=>b.premultiplyColor(x));return{values:u,colors:y}}function n(u){if(!u.stops?.length)return null;u=u.stops.sort((x,v)=>x.value-v.value);var y=b.padStops(u,8);u=y.map(({value:x})=>x);y=y.map(({opacity:x})=>x);return{opacityValues:u,opacities:y}}function c(u){return{rotationType:"geographic"===u.rotationType?d.RotationType.Geographic:
d.RotationType.Arithmatic}}function r(u){if(!u.stops?.length)return null;if(u.stops.some(v=>v.useMaxValue||v.useMinValue))return(v,A)=>{const z=v.statisticsByLevel.get(A.key.level);v=u.stops.map(B=>{const D=B.useMaxValue?z?.get(u.field)?.maxValue??0:B.useMinValue?z?.get(u.field)?.minValue??0:B.value;B=B.size?q.pt2px(B.size):l.nanMagicNumber;return{value:D,size:B}}).sort((B,D)=>B.value-D.value);A=b.padStops(v,8);v=A.map(({value:B})=>B);A=A.map(({size:B})=>B);return{values:v,sizes:A}};var y=u.stops.sort((v,
A)=>v.value-A.value),x=b.padStops(y,8);y=x.map(({value:v})=>v);x=x.map(({size:v})=>q.pt2px(v));return{values:y,sizes:x}}function k(u){return y=>{({state:y}=y);return{unitValueToPixelsRatio:h.getMetersPerUnitForSR(y.spatialReference)/m.meterIn[u.valueUnit??"meters"]/y.resolution}}}function p(u,y){const x=y.length;if(u<y[0].value||1===x)return y[0].size;for(let v=1;v<x;v++)if(u<y[v].value)return y[v-1].size+(u-y[v-1].value)/(y[v].value-y[v-1].value)*(y[v].size-y[v-1].size);return y[x-1].size}function t(u){const {minDataValue:y,
maxDataValue:x,minSize:v,maxSize:A}=u;if("object"===typeof v&&"object"===typeof A)return(z,B)=>{B=z.state.scale;z=q.pt2px(p(B,v.stops));B=q.pt2px(p(B,A.stops));return{minMaxValueAndSize:[y,x,z,B]}};if("object"===typeof v||"object"===typeof A)throw Error("InternalError: Found a partial VisualVariableSizeMinMaxValue");return{minMaxValueAndSize:[y,x,q.pt2px(v),q.pt2px(A)]}}const w={visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,
visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null};e.createVisualVariableColor=f;e.createVisualVariableOpacity=n;e.createVisualVariableRotation=c;e.createVisualVariableSizeMinMaxValue=t;e.createVisualVariableSizeScaleStops=function(u){if(!u.stops?.length)return null;u=u.stops.sort((x,v)=>x.value-v.value);var y=b.padStops(u,8);u=y.map(({value:x})=>x);y=y.map(({size:x})=>q.pt2px(x));return{values:u,sizes:y}};e.createVisualVariableSizeStops=
r;e.createVisualVariableSizeUnitValue=k;e.createVisualVariableUniforms=function(u){const y={...w};if(!(u&&"visualVariables"in u&&u.visualVariables))return y;for(const x of a.simplifyVisualVariables(u.visualVariables))switch(x.type){case "color":y.visualVariableColor=f(x);break;case "opacity":y.visualVariableOpacity=n(x);break;case "rotation":y.visualVariableRotation=c(x);break;case "size":switch(u=x,"number"===typeof u.minDataValue&&"number"===typeof u.maxDataValue&&null!=u.minSize&&null!=u.maxSize?
"min-max":"$view.scale"===u?.valueExpression&&Array.isArray(u.stops)?"scale-stops":null==u.field&&"$view.scale"===u?.valueExpression||!(Array.isArray(u.stops)||"levels"in u&&u.levels)?null!=u.field||"$view.scale"!==u?.valueExpression?"unit-value":null:"field-stops"){case "field-stops":y.visualVariableSizeStops=r(x);break;case "scale-stops":"outline"===x.target?y.visualVariableSizeOutlineScaleStops=r(x):y.visualVariableSizeScaleStops=r(x);break;case "min-max":y.visualVariableSizeMinMaxValue=t(x);break;
case "unit-value":y.visualVariableSizeUnitValue=k(x)}}return y};e.getMaxSizeVVSize=function(u,y=128,x=1.25){if(u.visualVariableSizeMinMaxValue)return u.visualVariableSizeMinMaxValue instanceof Function?128:Math.max(u.visualVariableSizeMinMaxValue.minMaxValueAndSize[3]*x,y);if(u.visualVariableSizeScaleStops){if(u.visualVariableSizeScaleStops instanceof Function)return 128;u=u.visualVariableSizeScaleStops.sizes;return Math.max(u[u.length-1]*x,y)}if(u.visualVariableSizeStops){if(u.visualVariableSizeStops instanceof
Function)return 128;u=u.visualVariableSizeStops.sizes;return Math.max(u[u.length-1]*x,y)}return u.visualVariableSizeUnitValue?256:0};e.noVisualVariables=w;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/schema/processor/schemaUtils":function(){define(["exports"],function(e){e.padStops=function(g,q){g=g.slice(0,q);q-=g.length;for(let h=0;h<q;h++)g.push(g[g.length-1]);return g};e.premultiplyColor=function(g){if(!g)return[0,0,0,0];const {r:q,g:h,b:m,a:l}=
g;return[l/255*q,l/255*h,l/255*m,l]};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/rendererUtils":function(){define(["exports","../../../../../core/Error","../../../../../core/Logger","../../../../../core/screenUtils","../../../../webgl/capabilities"],function(e,g,q,h,m){function l(){const {supportsColorBufferFloat:b,supportsColorBufferFloatBlend:a,supportsColorBufferHalfFloat:f}=m.getWebGLCapabilities();return b&&a||f}const d=()=>q.getLogger("esri.views.2d.layers.features.support.rendererUtils");
e.isRendererSupported=function(b){if(!b)return!0;switch(b.type){case "heatmap":if(!l()){const a=m.getWebGLCapabilities();b=["supportsColorBufferFloat","supportsColorBufferFloatBlend","supportsColorBufferHalfFloat"].filter(f=>!a[f]).join(", ");d().errorOnce(new g("webgl-missing-extension",`Missing WebGL2 requirements for Heatmap: ${b}`));return!1}}return!0};e.simplifyVisualVariables=function(b){return b.map(a=>{if(("size"===a.type||"color"===a.type||"opacity"===a.type)&&null!=a.stops){a=a.clone();
var f=a.type;var n=a.stops??[];if(8>=n.length)f=n;else if(d().warn(`Found ${n.length} Visual Variable stops, but MapView only supports ${8}. Displayed stops will be simplified.`),16<n.length){const [A,...z]=n;var c=z.pop(),r=z[0].value,k=z[z.length-1].value,p=(k-r)/6;const B=[];for(;r<k;r+=p){for(var t=0;r>=z[t].value;)t++;var w=z[t],u=n[t-1],y=r-u.value;w=w.value===u.value?1:y/(w.value-u.value);"color"===f?(u=z[t],t=n[t-1],y=u.color.clone(),y.r=(1-w)*t.color.r+w*y.r,y.g=(1-w)*t.color.g+w*y.g,y.b=
(1-w)*t.color.b+w*y.b,y.a=(1-w)*t.color.a+w*y.a,B.push({value:r,color:y,label:u.label})):"size"===f?(u=z[t],y=n[t-1],t=h.toPt(u.size),y=h.toPt(y.size),B.push({value:r,size:(1-w)*y+w*t,label:u.label})):(u=z[t],B.push({value:r,opacity:(1-w)*n[t-1].opacity+w*u.opacity,label:u.label}))}f=[A,...B,c]}else{var [x,...v]=n;for(f=v.pop();6<v.length;){c=n=0;for(k=1;k<v.length;k++)p=Math.abs(v[k].value-v[k-1].value),p>c&&(c=p,n=k);v.splice(n,1)}f=[x,...v,f]}a.stops=f}return a})};Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema":function(){define("exports ../../../../../../../symbols/cim/CIMSymbolHelper ../../../../../../../symbols/cim/defaultCIMValues ../../../../../engine/webgl/shaderGraph/techniques/TechniqueRegistry ../VisualVariablesSchema ./utils".split(" "),function(e,g,q,h,m,l){function d(t){return t.minScale||t.maxScale?{minScale:t.minScale??0,maxScale:t.maxScale??0}:null}function b(t){if(null==t)return null;if(Array.isArray(t)){const [w,
u,y,x]=t;return[w,u,y,255*x]}return"string"===typeof t?t:{...t,defaultValue:b(t?.defaultValue)}}function a(t,w,u,{scaleInfo:y,scaleExpression:x}){const v=l.hasSizeVVUniform(u);return[t.createMeshInfo({size:w.size,scaleX:w.scaleX,anchorX:w.anchorPoint.x,anchorY:w.anchorPoint.y,angle:w.rotation,color:b(w.color)??[0,0,0,0],colorLocked:w.colorLocked,frameHeight:w.frameHeight,widthRatio:w.widthRatio,scaleInfo:y,offsetX:w.offsetX,offsetY:w.offsetY,outlineColor:b(w.outlineColor)??[0,0,0,0],outlineSize:w.outlineWidth,
referenceSize:w.referenceSize||q.defaultCIMValues.CIMVectorMarker.size,rotateClockwise:w.rotateClockwise,scaleFactor:x??1,sizeRatio:w.sizeRatio,alignment:w.alignment,isAbsoluteAnchorPoint:w.isAbsoluteAnchorPoint,scaleSymbolsProportionally:w.scaleSymbolsProportionally,sprite:w.spriteRasterizationParam,hasSizeVV:v,placement:w.markerPlacement,effects:w.effects?{type:"cim-effect-infos",effectInfos:w.effects}:null,transforms:w.transform,minPixelBuffer:m.getMaxSizeVVSize(u)})]}function f(t,w,{scaleInfo:u}){return[t.createMeshInfo({color:b(w.color)??
[0,0,0,0],scaleInfo:u,effects:w.effects?{type:"cim-effect-infos",effectInfos:w.effects}:null})]}function n(t,w,u,{scaleInfo:y}){if(!w.spriteRasterizationParam)throw Error("InternalError: Sprite should always be defined");u=!!w.hasUnresolvedReplacementColor&&(!u||w.colorLocked);u=w.sampleAlphaOnly&&!u;const x=w.spriteRasterizationParam;return[t.createMeshInfo({color:b(w.color)??[0,0,0,0],height:w.height,aspectRatio:w.scaleX,offsetX:w.offsetX,offsetY:w.offsetY,scaleX:1,scaleY:1,angle:w.angle,applyRandomOffset:w.applyRandomOffset,
sampleAlphaOnly:u,scaleProportionally:"CIMHatchFill"===x.resource.type,sprite:x,scaleInfo:y,effects:w.effects?{type:"cim-effect-infos",effectInfos:w.effects}:null})]}function c(t,w,{scaleInfo:u}){return{color:b(t.color)??[0,0,0,0],width:t.width,referenceWidth:t.referenceWidth,capType:t.cap,joinType:t.join,miterLimit:t.miterLimit,scaleInfo:u,hasSizeVV:w,effects:t.effects?{type:"cim-effect-infos",effectInfos:t.effects}:null}}function r(t,w,u,y){if(w.spriteRasterizationParam)throw Error("InternalError: Sprite should not be defined");
w=c(w,u,y);return[t.createMeshInfo(w)]}function k(t,w,u,y){const {spriteRasterizationParam:x,scaleDash:v,sampleAlphaOnly:A}=w;if(!x)throw Error("InternalError: Sprite should be defined");return[t.createMeshInfo({...c(w,u,y),shouldScaleDash:v??!1,shouldSampleAlphaOnly:A,isSDF:"CIMPictureStroke"!==x.resource.type,sprite:x})]}function p(t,w,u,{scaleInfo:y,scaleExpression:x}){return[t.createMeshInfo({boxBackgroundColor:b(w.backgroundColor),boxBorderLineColor:b(w.borderLineColor),boxBorderLineSize:w.borderLineWidth??
0,color:b(w.color)??[0,0,0,0],offsetX:w.offsetX,offsetY:w.offsetY,postAngle:w.angle,fontSize:w.size,referenceSize:w.referenceSize,decoration:w.decoration,haloColor:b(w.outlineColor)??[0,0,0,0],haloFontSize:w.outlineSize,lineWidth:w.lineWidth||512,lineHeightRatio:1,horizontalAlignment:w.horizontalAlignment??"center",verticalAlignment:w.verticalAlignment??"baseline",useCIMAngleBehavior:!1,glyphs:w.textRasterizationParam,scaleInfo:y,effects:w.effects?{type:"cim-effect-infos",effectInfos:w.effects}:null,
placement:w.markerPlacement,transforms:w.transform,scaleFactor:x??1,minPixelBuffer:m.getMaxSizeVVSize(u),repeatLabel:null,repeatLabelDistance:null,allowOverrun:null,labelPosition:null,isLineLabel:!1})]}e.createComplexFillMeshInfos=n;e.createComplexMarkerMeshInfos=a;e.createComplexSimpleFillMeshInfos=f;e.createComplexSimpleLineMeshInfos=r;e.createComplexSymbolInstances=async function(t,w){const {cimResourceManager:u,cimAnalyzer:y,scaleExpression:x}=w.schemaOptions;await Promise.all(g.CIMSymbolHelper.fetchResources(t.symbol,
u,[]));var v=y.analyzeSymbolReference(t,!1);t={scaleInfo:d(t),scaleExpression:x};const A=[];for(const C of v)switch(C.type){case "marker":v=A;var z=v.push;var B=C;var D=t;const {uniforms:G,schemaOptions:H}=w;var {store:F}=H;F=F.ensureInstance(h.Techniques.marker,{uniforms:B.isOutline?{...m.noVisualVariables,visualVariableSizeScaleStops:G.visualVariableSizeOutlineScaleStops}:{visualVariableColor:G.visualVariableColor,visualVariableOpacity:G.visualVariableOpacity,visualVariableSizeMinMaxValue:G.visualVariableSizeMinMaxValue,
visualVariableSizeScaleStops:G.visualVariableSizeScaleStops,visualVariableSizeStops:G.visualVariableSizeStops,visualVariableSizeUnitValue:G.visualVariableSizeUnitValue,visualVariableRotation:G.visualVariableRotation},optionalAttributes:{zoomRange:!!D.scaleInfo}});B=a(F,B,G,D);z.call(v,...B);break;case "fill":v=A;z=v.push;a:{D=C;F=w;B=t;if(!D.spriteRasterizationParam){const {uniforms:T,schemaOptions:I}=F;({store:F}=I);F=F.ensureInstance(h.Techniques.fill,{uniforms:{visualVariableColor:D.colorLocked?
null:T.visualVariableColor,visualVariableOpacity:T.visualVariableOpacity},optionalAttributes:{zoomRange:!!B.scaleInfo}});B=f(F,D,B);break a}const {uniforms:O,schemaOptions:Q}=F;({store:F}=Q);F=F.ensureInstance(h.Techniques.complexFill,{uniforms:{visualVariableColor:D.colorLocked?null:O.visualVariableColor,visualVariableOpacity:O.visualVariableOpacity},optionalAttributes:{zoomRange:!!B.scaleInfo}});B=n(F,D,null!=O.visualVariableColor,B)}z.call(v,...B);break;case "line":v=A;z=v.push;{B=C;D=t;const {uniforms:O,
schemaOptions:Q}=w;var {store:E}=Q;F=B.isOutline?{...m.noVisualVariables,visualVariableSizeScaleStops:O.visualVariableSizeOutlineScaleStops}:{visualVariableColor:B.colorLocked?null:O.visualVariableColor,visualVariableOpacity:O.visualVariableOpacity,visualVariableSizeMinMaxValue:O.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:O.visualVariableSizeScaleStops,visualVariableSizeStops:O.visualVariableSizeStops,visualVariableSizeUnitValue:O.visualVariableSizeUnitValue};const T={uniforms:F,optionalAttributes:{zoomRange:!!D.scaleInfo}};
F=!!(F.visualVariableSizeMinMaxValue||F.visualVariableSizeScaleStops||F.visualVariableSizeStops||F.visualVariableSizeUnitValue);B.spriteRasterizationParam?(E=E.ensureInstance(h.Techniques.texturedLine,T),B=k(E,B,F,D)):(E=E.ensureInstance(h.Techniques.line,T),B=r(E,B,F,D))}z.call(v,...B);break;case "text":v=A;z=v.push;B=C;D=t;const {uniforms:K,schemaOptions:J}=w;({store:F}=J);F=F.ensureInstance(h.Techniques.text,{uniforms:{visualVariableColor:B.colorLocked?null:K.visualVariableColor,visualVariableOpacity:K.visualVariableOpacity,
visualVariableRotation:K.visualVariableRotation,visualVariableSizeMinMaxValue:K.visualVariableSizeMinMaxValue,visualVariableSizeScaleStops:K.visualVariableSizeScaleStops,visualVariableSizeStops:K.visualVariableSizeStops,visualVariableSizeUnitValue:K.visualVariableSizeUnitValue},optionalAttributes:{zoomRange:!!D.scaleInfo,referenceSymbol:!1,clipAngle:!1}});B=p(F,B,K,D);z.call(v,...B)}return A};e.createComplexTextMeshInfos=p;e.createComplexTexturedLineMeshInfos=k;e.getScaleInfo=d;Object.defineProperty(e,
Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/schema/processor/symbols/utils":function(){define(["exports"],function(e){e.hasRotationVVUniform=function(g){return!!g.visualVariableRotation};e.hasSizeVVUniform=function(g){return!!(g.visualVariableSizeMinMaxValue||g.visualVariableSizeScaleStops||g.visualVariableSizeStops||g.visualVariableSizeUnitValue||g.visualVariableSizeOutlineScaleStops)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/schema/processor/StorageSchema":function(){define(["exports",
"../../../../../../core/arrayUtils","../../../../engine/webgl/enums","../../support/rendererUtils","../../../../../webgl/capabilities"],function(e,g,q,h,m){function l(r){switch(r){case "opacity":return q.VVBinding.OPACITY;case "color":return q.VVBinding.COLOR;case "rotation":return q.VVBinding.ROTATION;case "size":return q.VVBinding.SIZE;default:return null}}function d(r){if(!r)return[];switch(r.type){case "simple":case "class-breaks":case "unique-value":case "dictionary":return n(r);case "dot-density":return b(r);
case "pie-chart":return a(r);case "heatmap":return f(r)}}function b(r){const k=[];for(const p of r.attributes)k.push({binding:k.length,expression:p.valueExpression,field:p.field});return k}function a(r){const k=n(r);let p=4;for(const t of r.attributes)k.push({binding:p++,expression:t.valueExpression,field:t.field});return k}function f({valueExpression:r,field:k}){return r||k?[{binding:0,expression:r,field:k}]:[]}function n(r){return"visualVariables"in r&&r.visualVariables?.length?h.simplifyVisualVariables(r.visualVariables).map(k=>
c(k)).filter(g.isSome):[]}function c(r){switch(r.type){case "size":return r="$view.scale"===r.valueExpression?null:{binding:l(r.type),field:r.field,normalizationField:r.normalizationField,expression:r.valueExpression,valueRepresentation:r.valueRepresentation},r;case "color":return{binding:l(r.type),field:r.field,normalizationField:r.normalizationField,expression:r.valueExpression};case "opacity":return{binding:l(r.type),field:r.field,normalizationField:r.normalizationField,expression:r.valueExpression};
case "rotation":return{binding:l(r.type),expression:r.valueExpression,field:r.field}}}e.createDotDensityBindings=b;e.createHeatmapBindings=f;e.createPieChartBindings=a;e.createStorageSchema=function(r,k){const p=m.getWebGLCapabilities();return{type:"simple",filters:k,capabilities:{maxTextureSize:p.maxTextureSize},bindings:d(r)}};e.createVVBindings=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/AttributeStore":function(){define("exports ../../../../../core/Error ../../../../../core/has ../../../../../core/Logger ../../../../../core/accessorSupport/diffUtils ../../../engine/highlightReasons ../../../engine/webgl/definitions ../../../engine/webgl/DisplayId ../../../engine/webgl/Utils ../../../engine/webgl/shaderGraph/techniques/shaders/constants ../../../engine/webgl/util/debug ./DisplayIdGenerator ./FeatureFilter ../../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k){function p(v,A){if(!v||!A)return v;switch(A){case "radius":case "distance":return 2*v;case "area":return Math.sqrt(v)}return v}const t=()=>h.getLogger("esri.views.layers.2d.features.support.AttributeStore"),w=n.createDebugLogger(n.DEBUG_ATTR_UPDATES,t());var u=q("esri-shared-array-buffer");q("esri-atomics");class y{constructor(v,A,z){this.size=0;this.texelSize=4;this.dirtyEnd=this.dirtyStart=0;const {pixelType:B,layout:D,textureOnly:F}=A;this.textureOnly=F||!1;
this.pixelType=B;this.layout=D;this._resetRange();this.size=v;this.isLocal=z;F||(this.data=this._initData(B,v))}get buffer(){return this.data?.buffer}unsetComponentAllTexels(v,A){const z=this.data;for(let B=0;B<this.size*this.size;B++)z[B*this.texelSize+v]&=~A;this.dirtyStart=0;this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(v,A){const z=this.data;for(let B=0;B<this.size*this.size;B++)z[B*this.texelSize+v]|=255&A;this.dirtyStart=0;this.dirtyEnd=this.size*this.size-1}setComponent(v,A,z){const B=
this.data;for(const D of z)B[D*this.texelSize+v]|=A,this.dirtyStart=Math.min(this.dirtyStart,D),this.dirtyEnd=Math.max(this.dirtyEnd,D)}setComponentTexel(v,A,z){this.data[z*this.texelSize+v]|=A;this.dirtyStart=Math.min(this.dirtyStart,z);this.dirtyEnd=Math.max(this.dirtyEnd,z)}unsetComponentTexel(v,A,z){this.data[z*this.texelSize+v]&=~A;this.dirtyStart=Math.min(this.dirtyStart,z);this.dirtyEnd=Math.max(this.dirtyEnd,z)}getData(v,A){v=b.getDisplayIdTexel(v);return this.data[v*this.texelSize+A]}setData(v,
A,z){v=b.getDisplayIdTexel(v);0===(this.layout&1<<A)?t().error("mapview-attributes-store","Tried to set a value for a texel's readonly component"):null!=this.data&&(this.data[v*this.texelSize+A]=z,this.dirtyStart=Math.min(this.dirtyStart,v),this.dirtyEnd=Math.max(this.dirtyEnd,v))}expand(v){this.size=v;this.textureOnly||(v=this._initData(this.pixelType,v),v.set(this.data),this.data=v)}toMessage(){const v=this.dirtyStart,A=this.dirtyEnd;var z=this.texelSize;if(v>A)return null;this._resetRange();const B=
this.pixelType,D=this.layout,F=this.data;z=!this.isLocal&&F.slice(v*z,(A+1)*z)||null;return{start:v,end:A,data:z,pixelType:B,layout:D}}_initData(v,A){var z=ArrayBuffer;v=a.getPixelArrayCtor(v);A=new v(new z(A*A*4*v.BYTES_PER_ELEMENT));for(z=0;z<A.length;z+=4)A[z+1]=255;return A}_resetRange(){this.dirtyStart=2147483647;this.dirtyEnd=0}}class x{constructor(v){this._client=v;this._filters=[];this._blocks=[];this._attributeComputeInfo=null;this._abortController=new AbortController;this._size=d.attributeStoreInitialSize;
this._idsToHighlight=new Map;this._initialized=this._referencesGeometry=this._referencesScale=!1;this.version=0;this._idGenerator=new c.DisplayIdGenerator;this._epoch=1}destroy(){this._abortController.abort()}_initialize(){if(null==this._blockDescriptors){var v=k.PixelType.FLOAT;w(`Creating AttributeStore ${u?"with":"without"} shared memory`);this._blockDescriptors=[{pixelType:k.PixelType.UNSIGNED_BYTE,layout:1},{pixelType:k.PixelType.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:k.PixelType.UNSIGNED_BYTE,
layout:15,textureOnly:!0},{pixelType:v,layout:15},{pixelType:v,layout:15},{pixelType:v,layout:15},{pixelType:v,layout:15}];this._blocks=this._blockDescriptors.map(()=>null)}}get referencesScale(){return this._referencesScale}get referencesGeometry(){return this._referencesGeometry}get hasHighlight(){return 0<this._idsToHighlight.size}createDisplayIdForObjectId(v){return this._idGenerator.createIdForObjectId(v)}releaseDisplayIdForObjectId(v){return this._idGenerator.releaseIdForObjectId(v)}incrementDisplayIdGeneration(){this._idGenerator.incrementGeneration()}releaseAllIds(){this._idGenerator.releaseAll()}async update(v,
A,z,B,D=0){const F=m.diff(this._schema,v);this.version=D;if(F&&(q("esri-2d-update-debug")&&console.debug(`Version[${D}] AttributeStore.update`,{changed:F}),this._schema=v,this._attributeComputeInfo=null,this._initialize(),null!=v))if(z&&(this._filters=await Promise.all(v.filters.map(E=>E?r.create({geometryType:z.geometryType,hasM:!1,hasZ:!1,timeInfo:z.timeInfo,fieldsIndex:z.fieldsIndex,spatialReference:B??z.spatialReference,filterJSON:E}):null))),"subtype"===v.type){this._attributeComputeInfo={isSubtype:!0,
subtypeField:v.subtypeField,map:new Map};this._referencesGeometry=this._referencesScale=!1;for(const E in v.bindings)await Promise.all(v.bindings[E].map(async C=>{C=await this._bind(A,C,parseInt(E,10));this._referencesGeometry=this._referencesGeometry||(C?.referencesGeometry()??!1);this._referencesScale=this._referencesScale||(C?.referencesScale()??!1)}))}else this._attributeComputeInfo={isSubtype:!1,map:new Map},await Promise.all(v.bindings.map(async E=>{E=await this._bind(A,E);this._referencesGeometry=
this._referencesGeometry||(E?.referencesGeometry()??!1);this._referencesScale=this._referencesScale||(E?.referencesScale()??!1)}))}setHighlight(v,A){const z=this._getBlock(0);z.unsetComponentAllTexels(0,(1<<l.highlightReasons.length)-1);for(const {displayId:B,highlightFlags:D}of v){if(null==B)continue;const F=b.getDisplayIdTexel(B);z.setComponent(0,D,[F])}this._idsToHighlight.clear();for(const {objectId:B,highlightFlags:D}of v)this._idsToHighlight.set(B,D);for(const {objectId:B,highlightFlags:D}of A)this._idsToHighlight.set(B,
D)}setData(v,A,z,B){const D=b.getDisplayIdTexel(v);this._ensureSizeForTexel(D);this._getBlock(A).setData(v,z,B)}getData(v,A,z){return this._getBlock(A).getData(v,z)}getHighlightFlags(v){return this._idsToHighlight.get(v)||0}unsetAttributeData(v){v=b.getDisplayIdTexel(v);this._getBlock(0).setData(v,0,0)}setAttributeData(v,A,z){const B=b.getDisplayIdTexel(v);this._ensureSizeForTexel(B);this._getBlock(0).setData(B,0,this.getFilterFlags(A));v=this._attributeComputeInfo;let D=null;v&&(D=v.isSubtype?v.map.get(A.readAttribute(v.subtypeField)):
v.map,D?.size&&D.forEach((F,E)=>{const C=1*E%4;E=this._getBlock(Math.floor(1*E/4)+d.AttributeDataType.VV);let G=F.field?.read(A,z);F.valueRepresentation&&(G=p(G,F.valueRepresentation));if(null===G||isNaN(G)||Infinity===G||-Infinity===G)G=f.nanMagicNumber;E.setData(B,C,G)}))}get epoch(){return this._epoch}sendUpdates(){const v=this._blocks.map(z=>null!=z?z.toMessage():null),A=this._getInitArgs();q("esri-2d-log-updating")&&console.log("AttributeStore: _doSendUpdate.start");this._client.update({initArgs:A,
blockData:v,version:this.version,sendUpdateEpoch:this._epoch});this._epoch+=1;q("esri-2d-log-updating")&&console.log("AttributeStore: _doSendUpdate.end")}_ensureSizeForTexel(v){for(;v>=this._size*this._size&&!this._expand(););}async _bind(v,A,z){v=await v.createComputedField(A);const {valueRepresentation:B}=A,D=this._attributeComputeInfo;if(D.isSubtype){const F=D.map.get(z)??new Map;F.set(A.binding,{field:v,valueRepresentation:B});D.map.set(z,F)}else D.map.set(A.binding,{field:v,valueRepresentation:B});
return v}_getInitArgs(){if(this._initialized)return null;this._initialized=!0;this._getBlock(d.AttributeDataType.Animation);this._getBlock(d.AttributeDataType.GPGPU);return{blockSize:this._size,blockDescriptors:this._blocks.map(v=>null!=v?{textureOnly:v.textureOnly,buffer:v.buffer,pixelType:v.pixelType}:null)}}_getBlock(v){var A=this._blocks[v];if(null!=A)return A;w(`Initializing AttributeBlock at index ${v}`);A=new y(this._size,this._blockDescriptors[v],this._client.isLocal);this._blocks[v]=A;this._initialized=
!1;return A}_expand(){if(this._size<this._schema.capabilities.maxTextureSize){const v=this._size<<=1;w("Expanding block size to",v,this._blocks);for(const A of this._blocks)A?.expand(v);this._initialized=!1;this._size=v;return 0}t().error(new g("mapview-limitations","Maximum number of onscreen features exceeded."));return-1}isVisible(v){return!!(this._getBlock(0).getData(v,0)&1<<l.highlightReasons.length)}getFilterFlags(v){let A=0;for(var z=0;z<this._filters.length;z++){var B=this._filters[z];B=!(1<<
z)||null==B||B.check(v);A|=(B?1:0)<<z}z=0;this._idsToHighlight.size&&(v=v.getObjectId(),z=this.getHighlightFlags(v));return A<<l.highlightReasons.length|z}}e.AttributeStore=x;e.getVisualVariableSizeValueRepresentationRatio=p;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/util/debug":function(){define(["exports"],function(e){e.DEBUG_ATTR_UPDATES=!1;e.createDebugLogger=(g,q)=>g&&((...h)=>q.warn("DEBUG:",...h))||(()=>null);Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/layers/features/support/DisplayIdGenerator":function(){define(["exports","../../../engine/webgl/DisplayId"],function(e,g){class q{constructor(m){this.data=m;this._referenceCount=0}increment(){this._referenceCount+=1}decrement(){--this._referenceCount}empty(){return 0===this._referenceCount}}class h{constructor(){this._freeIdsGenerationA=[];this._freeIdsGenerationB=[];this._idCounter=1;this._freeIds=this._freeIdsGenerationA;this._objectIdToDisplayId=new Map}createIdForObjectId(m){let l=
this._objectIdToDisplayId.get(m);l?l.increment():(l=new q(g.createDisplayId(this._getFreeId(),!1)),l.increment(),this._objectIdToDisplayId.set(m,l));return l.data}releaseIdForObjectId(m){const l=this._objectIdToDisplayId.get(m);l&&(l.decrement(),l.empty()&&(this._objectIdToDisplayId.delete(m),this._freeIds.push(l.data)))}releaseAll(){for(const m of this._objectIdToDisplayId.values())this._freeIds.push(m.data);this._objectIdToDisplayId.clear()}incrementGeneration(){this._freeIds=this._freeIds===this._freeIdsGenerationA?
this._freeIdsGenerationB:this._freeIdsGenerationA}_getFreeId(){return this._freeIds.length?this._freeIds.pop():this._idCounter++}}e.DisplayIdGenerator=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/FeatureFilter":function(){define("../../../../../core/Error ../../../../../core/Logger ../../../../../geometry/support/aaBoundingRect ../../../../../geometry/support/boundsUtils ../../../../../layers/graphics/data/queryUtils ../../../../../layers/graphics/data/spatialQuerySupport ../../../../../layers/graphics/data/timeSupport ../../../../../rest/support/Query ../FeatureStoreQueryAdapter ./whereUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f){class n{constructor(c){this._geometryBounds=q.create();this._idToVisibility=new Map;this._serviceInfo=c}static async create(c){const r=new n(c);await r.update(c.filterJSON,c.spatialReference);return r}get hash(){return this._hash}check(c){return this._applyFilter(c)}clear(){const c=this._resetAllHiddenIds();this.update();return{show:c,hide:[]}}invalidate(){this._idToVisibility.forEach((c,r)=>{this._idToVisibility.set(r,0)})}setKnownIds(c){for(const r of c)this._idToVisibility.set(r,
1)}setTrue(c){const r=[],k=[],p=new Set(c);this._idToVisibility.forEach((t,w)=>{t=!!(this._idToVisibility.get(w)&1);const u=p.has(w);!t&&u?r.push(w):t&&!u&&k.push(w);this._idToVisibility.set(w,u?3:0)});return{show:r,hide:k}}createQuery(){const {geometry:c,spatialRel:r,where:k,timeExtent:p,objectIds:t}=this;return b.fromJSON({geometry:c,spatialRel:r,where:k,timeExtent:p,objectIds:t})}async update(c,r){this._hash=JSON.stringify(c);c=await m.normalizeQueryLike(c,null,r);await Promise.all([this._setGeometryFilter(c),
this._setIdFilter(c),this._setAttributeFilter(c),this._setTimeFilter(c)])}async _setAttributeFilter(c){c?.where?(this._clause=await f.createWhereClause(c.where,this._serviceInfo.fieldsIndex),this.where=c.where):this.where=this._clause=null}_setIdFilter(c){this._idsToShow=c?.objectIds&&new Set(c.objectIds);this._idsToHide=c?.hiddenIds&&new Set(c.hiddenIds);this.objectIds=c?.objectIds}async _setGeometryFilter(c){if(c?.geometry){var r=c.geometry;c=c.spatialRel||"esriSpatialRelIntersects";var k=await l.getSpatialQueryOperator(c,
r,this._serviceInfo.geometryType,this._serviceInfo.hasZ,this._serviceInfo.hasM);h.getBoundsXY(this._geometryBounds,r);this._spatialQueryOperator=k;this.geometry=r;this.spatialRel=c}else this.spatialRel=this.geometry=this._spatialQueryOperator=null}_setTimeFilter(c){this.timeExtent=this._timeOperator=null;c?.timeExtent&&(this._serviceInfo.timeInfo?(this.timeExtent=c.timeExtent,this._timeOperator=d.getTimeOperator(this._serviceInfo.timeInfo,c.timeExtent,a.FeatureStoreQueryAdapter.Shared)):(c=new e("feature-layer-view:time-filter-not-available",
"Unable to apply time filter, as layer doesn't have time metadata.",c.timeExtent),g.getLogger("esri.views.2d.layers.features.controllers.FeatureFilter").error(c)))}_applyFilter(c){return this._filterByGeometry(c)&&this._filterById(c)&&this._filterByTime(c)&&this._filterByExpression(c)}_filterByExpression(c){return this.where?this._clause(c):!0}_filterById(c){return(!this._idsToHide?.size||!this._idsToHide.has(c.getObjectId()))&&(!this._idsToShow?.size||this._idsToShow.has(c.getObjectId()))}_filterByGeometry(c){return this.geometry?
(c=c.readGeometryWorldSpace())?this._spatialQueryOperator(c):!1:!0}_filterByTime(c){return null==this._timeOperator?!0:this._timeOperator(c)}_resetAllHiddenIds(){const c=[];this._idToVisibility.forEach((r,k)=>{r&1||(this._idToVisibility.set(k,1),c.push(k))});return c}}return n})},"esri/layers/graphics/data/queryUtils":function(){define("require exports ../../../core/jsonMap ../../../core/unitUtils ../../../geometry/projection ../../../geometry/support/extentUtils ../../../geometry/support/jsonUtils ../../../geometry/support/normalizeUtils ../../../geometry/support/spatialReferenceUtils ./projectionSupport".split(" "),
function(e,g,q,h,m,l,d,b,a,f){async function n(w,u,y){if(!w)return null;var {where:x}=w;w.where=x=x?.trim();if(!x||/^1 *= *1$/.test(x)||u&&u===x)w.where=null;if(!w.geometry)return w;u=await r(w);w.distance=0;w.units=null;"esriSpatialRelEnvelopeIntersects"===w.spatialRel&&({spatialReference:x}=w.geometry,u=l.getGeometryExtent(u),u.spatialReference=x);if(u){await f.checkProjectionSupport(u.spatialReference,y);x=u.spatialReference;u=c(u,y)&&d.isExtent(u)?{spatialReference:x,rings:[[[u.xmin,u.ymin],[u.xmin,
u.ymax],[u.xmax,u.ymax],[u.xmax,u.ymin],[u.xmin,u.ymin]]]}:u;x=(await b.normalizeCentralMeridian(d.fromJSON(u)))[0];if(null==x)throw t;const v="quantizationParameters"in w&&w.quantizationParameters?.tolerance||"maxAllowableOffset"in w&&w.maxAllowableOffset||0;u=v&&c(u,y)?{densificationStep:8*v}:void 0;x=x.toJSON();u=f.project(x,x.spatialReference,y,u);if(!u)throw t;u.spatialReference=y;w.geometry=u}return w}function c(w,u){if(!w)return!1;const y=w.spatialReference;return(d.isExtent(w)||d.isPolygon(w)||
d.isPolyline(w))&&!a.equals(y,u)&&!m.canProjectWithoutEngine(y,u)}async function r(w){const {distance:u,units:y}=w,x=w.geometry;if(null==u||"vertexAttributes"in x)return x;var v=x.spatialReference;w=y?p.fromJSON(y):h.getUnitString(v);v=v&&(a.isGeographic(v)||a.isWebMercator(v))?x:await f.checkProjectionSupport(v,a.wgs84).then(()=>f.project(x,a.wgs84));return(await k())(v.spatialReference,v,u,w)}async function k(){return(await new Promise((w,u)=>e(["../../../geometry/geometryEngineJSON"],w,u))).geodesicBuffer}
const p=new q.JSONMap({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),t=Object.freeze({});g.normalizeQuery=async function(w,u,y){const {outFields:x,orderByFields:v,groupByFieldsForStatistics:A,outStatistics:z}=w;if(x)for(var B=0;B<x.length;B++)x[B]=x[B].trim();if(v)for(B=0;B<v.length;B++)v[B]=v[B].trim();if(A)for(B=0;B<A.length;B++)A[B]=A[B].trim();
if(z)for(B=0;B<z.length;B++)z[B].onStatisticField&&(z[B].onStatisticField=z[B].onStatisticField.trim());w.geometry&&!w.outSR&&(w.outSR=w.geometry.spatialReference);return n(w,u,y)};g.normalizeQueryLike=n;g.queryEngineEmptyResult=t;g.unitsKebabDict=p;Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/data/projectionSupport":function(){define("exports ../../../core/arrayUtils ../../../core/promiseUtils ../../../geometry/projection ../../../geometry/geometryAdapters/json ../../../geometry/support/spatialReferenceUtils ../../../geometry/support/webMercatorUtils".split(" "),
function(e,g,q,h,m,l,d){function b(t,w){if(!w)return null;if("x"in w){var u={x:0,y:0};[u.x,u.y]=t(w.x,w.y,n);null!=w.z&&(u.z=w.z);null!=w.m&&(u.m=w.m);return u}return"xmin"in w?(u={xmin:0,ymin:0,xmax:0,ymax:0},[u.xmin,u.ymin]=t(w.xmin,w.ymin,n),[u.xmax,u.ymax]=t(w.xmax,w.ymax,n),w.hasZ&&(u.zmin=w.zmin,u.zmax=w.zmax,u.hasZ=!0),w.hasM&&(u.mmin=w.mmin,u.mmax=w.mmax,u.hasM=!0),u):"rings"in w?{rings:a(w.rings,t),hasM:w.hasM,hasZ:w.hasZ}:"paths"in w?{paths:a(w.paths,t),hasM:w.hasM,hasZ:w.hasZ}:"points"in
w?{points:f(w.points,t),hasM:w.hasM,hasZ:w.hasZ}:null}function a(t,w){const u=[];for(const y of t)u.push(f(y,w));return u}function f(t,w){const u=[];for(const y of t)t=w(y[0],y[1],[0,0]),u.push(t),2<y.length&&t.push(y[2]),3<y.length&&t.push(y[3]);return u}const n=[0,0],c=b.bind(null,d.lngLatToXY),r=b.bind(null,d.xyToLngLat);class k{constructor(){this._jobs=[];this._timer=null;this._process=this._process.bind(this)}async push(t,w,u,y){if(!t?.length||!w||!u||l.equals(w,u))return t;t={geometries:t,inSpatialReference:w,
outSpatialReference:u,geographicTransformation:y,resolve:q.createResolver()};this._jobs.push(t);this._timer??(this._timer=setTimeout(this._process,10));return t.resolve.promise}_process(){this._timer=null;const t=this._jobs.shift();if(t){var {geometries:w,inSpatialReference:u,outSpatialReference:y,resolve:x,geographicTransformation:v}=t;d.canProject(u,y)?l.isWebMercator(y)?x(w.map(c)):x(w.map(r)):x(h.projectMany(m.jsonAdapter,w,u,y,v,null));0<this._jobs.length&&(this._timer=setTimeout(this._process,
10))}}}const p=new k;e.checkProjectionSupport=async function(t,w){t&&w&&(t=Array.isArray(t)?t.map(u=>null!=u.geometry?u.geometry.spatialReference:null).filter(g.isSome):[t],await h.initializeProjection(t.map(u=>({source:u,dest:w}))))};e.project=function(t,w,u,y){if(!t)return t;u||(u=w,w=t.spatialReference);return l.isValid(w)&&l.isValid(u)&&!l.equals(w,u)?d.canProject(w,u)?(t=l.isWebMercator(u)?c(t):r(t),t.spatialReference=u,t):h.projectMany(m.jsonAdapter,[t],w,u,null,y)[0]:t};e.projectMany=function(t,
w,u,y){return p.push(t,w,u,y)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/geometryAdapters/json":function(){define(["exports"],function(e){class g{constructor(d,b,a){this.x=d;this.y=b;this.spatialReference=a;this.m=this.z=void 0}}class q{constructor(d,b,a,f){this.rings=d;this.spatialReference=b;this.hasM=this.hasZ=void 0;a&&(this.hasZ=a);f&&(this.hasM=f)}}class h{constructor(d,b,a,f){this.paths=d;this.spatialReference=b;this.hasM=this.hasZ=void 0;a&&(this.hasZ=
a);f&&(this.hasM=f)}}class m{constructor(d,b,a,f){this.points=d;this.spatialReference=b;this.hasM=this.hasZ=void 0;a&&(this.hasZ=a);f&&(this.hasM=f)}}class l{constructor(d,b,a,f,n){this.xmin=d;this.ymin=b;this.xmax=a;this.ymax=f;this.spatialReference=n;this.mmax=this.mmin=this.zmax=this.zmin=void 0}}e.jsonAdapter={convertToGEGeometry:function(d,b){return null==b?null:d.convertJSONToGeometry(b)},exportPoint:function(d,b,a){a=new g(d.getPointX(b),d.getPointY(b),a);const f=d.hasZ(b),n=d.hasM(b);f&&(a.z=
d.getPointZ(b));n&&(a.m=d.getPointM(b));return a},exportPolygon:function(d,b,a){return new q(d.exportPaths(b),a,d.hasZ(b),d.hasM(b))},exportPolyline:function(d,b,a){return new h(d.exportPaths(b),a,d.hasZ(b),d.hasM(b))},exportMultipoint:function(d,b,a){return new m(d.exportPoints(b),a,d.hasZ(b),d.hasM(b))},exportExtent:function(d,b,a){var f=d.hasZ(b);const n=d.hasM(b);a=new l(d.getXMin(b),d.getYMin(b),d.getXMax(b),d.getYMax(b),a);f&&(f=d.getZExtent(b),a.zmin=f.vmin,a.zmax=f.vmax);n&&(d=d.getMExtent(b),
a.mmin=d.vmin,a.mmax=d.vmax);return a}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/data/spatialQuerySupport":function(){define("require exports ../../../core/Error ../../../geometry/support/contains ../../../geometry/support/intersects ../../../geometry/support/jsonUtils ../../../geometry/support/spatialReferenceUtils ../contains ../featureConversionUtils ../OptimizedGeometry ./geometryUtils ./projectionSupport".split(" "),function(e,g,q,h,m,l,d,b,a,f,n,
c){function r(){return new Promise((u,y)=>e(["../../../geometry/geometryEngineJSON"],u,y))}const k={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null};var p={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,
esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},t={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},w={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};g.canQueryWithRBush=function(u){if(l.isExtent(u))return!0;
if(l.isPolygon(u)){for(const y of u.rings)if(5!==y.length||y[0][0]!==y[1][0]||y[0][0]!==y[4][0]||y[2][0]!==y[3][0]||y[0][1]!==y[3][1]||y[0][1]!==y[4][1]||y[1][1]!==y[2][1])return!1;return!0}return!1};g.checkSpatialQuerySupport=async function(u,y,x){const {spatialRel:v,geometry:A}=u;if(A){if(null==v||!0!==p[v])throw new q("unsupported-query","Unsupported query spatial relationship",{query:u});if(d.isValid(A.spatialReference)&&d.isValid(x)){if(null==A||!0!==t[l.getJsonType(A)])throw new q("unsupported-query",
"Unsupported query geometry type",{query:u});if(null==y||!0!==w[y])throw new q("unsupported-query","Unsupported layer geometry type",{query:u});if(u.outSR)return c.checkProjectionSupport(u.geometry?.spatialReference,u.outSR)}}};g.getSpatialQueryOperator=function(u,y,x,v,A){if(l.isPolygon(y)&&"esriGeometryPoint"===x&&("esriSpatialRelIntersects"===u||"esriSpatialRelContains"===u)){const z=a.convertFromPolygon(new f,y,!1,!1);return Promise.resolve(B=>b.polygonContainsPoint(z,!1,!1,B))}if(l.isPolygon(y)&&
"esriGeometryMultipoint"===x){const z=a.convertFromPolygon(new f,y,!1,!1);if("esriSpatialRelContains"===u)return Promise.resolve(B=>b.polygonContainsMultipoint(z,!1,!1,B,v,A))}if(l.isExtent(y)&&"esriGeometryPoint"===x&&("esriSpatialRelIntersects"===u||"esriSpatialRelContains"===u))return Promise.resolve(z=>h.extentContainsPoint(y,n.getGeometry(x,v,A,z)));if(l.isExtent(y)&&"esriGeometryMultipoint"===x&&"esriSpatialRelContains"===u)return Promise.resolve(z=>h.extentContainsMultipoint(y,n.getGeometry(x,
v,A,z)));if(l.isExtent(y)&&"esriSpatialRelIntersects"===u){const z=m.getExtentIntersector(x);return Promise.resolve(B=>z(y,n.getGeometry(x,v,A,B)))}return r().then(z=>{const B=z[k[u]].bind(null,y.spatialReference,y);return D=>B(n.getGeometry(x,v,A,D))})};Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/intersects":function(){define(["exports","./intersectsBase"],function(e,g){e.extentIntersectsExtent=g.extentIntersectsExtent;e.extentIntersectsMultipoint=g.extentIntersectsMultipoint;
e.extentIntersectsPoint=g.extentIntersectsPoint;e.extentIntersectsPolygon=g.extentIntersectsPolygon;e.extentIntersectsPolyline=g.extentIntersectsPolyline;e.getFeatureExtentIntersector=g.getFeatureExtentIntersector;e.isSelfIntersecting=g.isSelfIntersecting;e.segmentIntersects=g.segmentIntersects;e.getExtentIntersector=function(q){return"mesh"===q?g.extentIntersectsExtent:g.getFeatureExtentIntersector(q)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/contains":function(){define(["exports"],
function(e){function g(q,h,m,l,d){if(!q)return!1;h=h?m?4:3:m?3:2;const {coords:b,lengths:a}=q;m=!1;q=0;for(const n of a){var f=q;for(let c=q,r=q+n*h;c<r;c+=h){f=c+h;f===r&&(f=q);const k=b[c],p=b[c+1],t=b[f];f=b[f+1];(p<d&&f>=d||f<d&&p>=d)&&k+(d-p)/(f-p)*(t-k)<l&&(m=!m)}q+=n*h}return m}e.polygonContainsCoords=g;e.polygonContainsMultipoint=function(q,h,m,l,d,b){d=d?b?4:3:b?3:2;const {coords:a,lengths:f}=l;if(!f)return!1;for(let n=0,c=0;n<f.length;n++,c+=d)if(!g(q,h,m,a[c],a[c+1]))return!1;return!0};
e.polygonContainsPoint=function(q,h,m,l){return g(q,h,m,l.coords[0],l.coords[1])};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/data/geometryUtils":function(){define(["exports","../featureConversionUtils","../OptimizedGeometry"],function(e,g,q){const h=new q,m=new q,l=new q,d={esriGeometryPoint:g.convertToPoint,esriGeometryPolyline:g.convertToPolyline,esriGeometryPolygon:g.convertToPolygon,esriGeometryMultipoint:g.convertToMultipoint},b=(a,f)=>"_geVersion"!==
a?f:void 0;e.cleanFromGeometryEngine=function(a){return a&&"_geVersion"in a?JSON.parse(JSON.stringify(a,b)):a};e.getGeometry=function(a,f,n,c,r,k,p=f,t=n){const w=f&&p,u=n&&t;c=null!=c?"coords"in c?c:c.geometry:null;if(null==c)return null;if(r)return f=g.generalizeOptimizedGeometry(m,c,f,n,a,r,p,t),k&&(f=g.quantizeOptimizedGeometry(l,f,w,u,a,k)),d[a]?.(f,w,u)??null;if(k)return k=g.quantizeOptimizedGeometry(l,c,f,n,a,k,p,t),d[a]?.(k,w,u)??null;g.removeZMValues(h,c,f,n,p,t);return d[a]?.(h,w,u)??null};
e.transformCentroid=function(a,f,n,c=a.hasZ,r=a.hasM){if(null==f)return null;const k=a.hasZ&&c,p=a.hasM&&r;return n?(a=g.quantizeOptimizedGeometry(l,f,a.hasZ,a.hasM,"esriGeometryPoint",n,c,r),g.convertToPoint(a,k,p)):g.convertToPoint(f,k,p)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/data/timeSupport":function(){define(["exports"],function(e){function g(m,l,d,b,a){if(null!=b&&null!=a)return f=>{const n=m(f,l);f=m(f,d);return(null==n||n<=a)&&(null==f||f>=
b)};if(null!=b)return f=>{f=m(f,d);return null==f||f>=b};if(null!=a)return f=>{f=m(f,l);return null==f||f<=a}}function q(m,l,d,b){if(null!=d&&null!=b&&d===b)return a=>m(a,l)===d;if(null!=d&&null!=b)return a=>{a=m(a,l);return null!=a&&a>=d&&a<=b};if(null!=d)return a=>{a=m(a,l);return null!=a&&a>=d};if(null!=b)return a=>{a=m(a,l);return null!=a&&a<=b}}function h(){return()=>!1}e.getTimeExtent=async function(m,l){if(!m)return null;const d=l.featureAdapter,{startTimeField:b,endTimeField:a}=m;let f=Number.POSITIVE_INFINITY,
n=Number.NEGATIVE_INFINITY;if(b&&a)await l.forEach(c=>{const r=d.getAttribute(c,b);c=d.getAttribute(c,a);null==r||isNaN(r)||(f=Math.min(f,r));null==c||isNaN(c)||(n=Math.max(n,c))});else{const c=b||a;await l.forEach(r=>{r=d.getAttribute(r,c);null==r||isNaN(r)||(f=Math.min(f,r),n=Math.max(n,r))})}return{start:f,end:n}};e.getTimeOperator=function(m,l,d){if(!l||!m)return null;const {startTimeField:b,endTimeField:a}=m;if(!b&&!a)return null;const {start:f,end:n}=l;if(null===f&&null===n)return null;if(void 0===
f&&void 0===n)return h();m=d.getAttributeAsTimestamp?.bind(d)??d.getAttribute.bind(d);return b&&a?g(m,b,a,f,n):q(m,b||a,f,n)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/FeatureStoreQueryAdapter":function(){define(["exports"],function(e){class g{getObjectId(q){return q.getObjectId()}getAttributes(q){return q.readAttributes()}getAttribute(q,h){return q.readAttribute(h)}getAttributeAsTimestamp(q,h){return q.readAttributeAsTimestamp(h)}cloneWithGeometry(q,
h){return q}getGeometry(q){return q.readGeometryWorldSpace()}getCentroid(q,h){return q.readCentroidForDisplay()}}g.Shared=new g;e.FeatureStoreQueryAdapter=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/whereUtils":function(){define(["exports","../../../../../core/Error","../../../../../core/Logger","../../../../../core/sql"],function(e,g,q,h){const m=()=>q.getLogger("esri.views.2d.layers.features.support.whereUtils"),l={getAttribute(d,b){return d.readAttribute(b)}};
e.createWhereClause=async function(d,b){try{const a=await h.parseWhereClause(d,b);if(!a.isStandardized){const f=new g("mapview - bad input","Unable to apply filter's definition expression, as expression is not standardized.",a);m().error(f)}return f=>{f=f.readArcadeFeature();try{return a.testFeature(f,l)}catch(n){return m().warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",d),!0}}}catch(a){return m().warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",
d),f=>!0}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/ComputedAttributeStorage":function(){define("exports ../../../../../core/Error ../../../../../core/Logger ../../../../../geometry/support/aaBoundingBox ../../../engine/webgl/DisplayId ./CachedField ./ComputedExpression ./ComputedLegacyLabelExpression ./NormalizedField ./StaticBitSet ./whereUtils".split(" "),function(e,g,q,h,m,l,d,b,a,f,n){function c(p,t,w){if(!(p.length>t))for(;p.length<=
t;)p.push(w)}const r=()=>q.getLogger("esri.views.2d.layers.features.support.ComputedAttributeStorage");class k{constructor(p){this._numerics=[];this._strings=[];this._allocatedSize=256;this._bitsets=[];this._instanceIds=[];this._bounds=[];this._dirtyBitset=this.getBitset(this.createBitset());this.compilationOptions=p}createBitset(){const p=this._bitsets.length;this._bitsets.push(f.StaticBitSet.create(this._allocatedSize,m.displayIdTexelMask));return p+1}async createComputedField(p,t=!1){if(p.expression)try{if(!this.compilationOptions)throw Error("InternalError: Compilation options not defined");
return t?b.ComputedLegacyLabelExpression.create(p.expression,this.compilationOptions):await d.ComputedExpression.create(p.expression,this.compilationOptions)}catch(w){return p=new g("featurelayer","Failed to compile arcade expression",{error:w,expression:p.expression}),r().error(p),null}if(p.normalizationType||p.normalizationField)return new a.NormalizedField(p.field,p);if(p.field)return new l.CachedField(p.field);p=new g("featurelayer","Unable to create computed field. No expression or field found",
{info:p});r().error(p);return null}async createWhereClause(p){return p?n.createWhereClause(p,this.compilationOptions.fields):null}getBitset(p){return this._bitsets[p-1]}getComputedNumeric(p,t){return this.getComputedNumericAtIndex(p&m.displayIdTexelMask,0)}setComputedNumeric(p,t,w){return this.setComputedNumericAtIndex(p&m.displayIdTexelMask,w,0)}getComputedString(p,t){return this.getComputedStringAtIndex(p&m.displayIdTexelMask,0)}setComputedString(p,t,w){return this.setComputedStringAtIndex(p&m.displayIdTexelMask,
0,w)}getComputedNumericAtIndex(p,t){p&=m.displayIdTexelMask;this._ensureNumeric(t,p);return this._numerics[t][p]}setComputedNumericAtIndex(p,t,w){p&=m.displayIdTexelMask;this._ensureNumeric(t,p);this._numerics[t][p]=w}getPackedChunkId(p){p&=m.displayIdTexelMask;this._ensureInstanceId(p);return this._instanceIds[p]}setPackedChunkId(p,t){p&=m.displayIdTexelMask;this._ensureInstanceId(p);this._instanceIds[p]=t}getComputedStringAtIndex(p,t){p&=m.displayIdTexelMask;this._ensureString(t,p);return this._strings[t][p]}setComputedStringAtIndex(p,
t,w){p&=m.displayIdTexelMask;this._ensureString(t,p);this._strings[t][p]=w}getXMin(p){return this._bounds[4*(p&m.displayIdTexelMask)]}getYMin(p){return this._bounds[4*(p&m.displayIdTexelMask)+1]}getXMax(p){return this._bounds[4*(p&m.displayIdTexelMask)+2]}getYMax(p){return this._bounds[4*(p&m.displayIdTexelMask)+3]}setBounds(p,t,w=!1){const u=p&m.displayIdTexelMask;if(!w&&!this._dirtyBitset.has(p))return 4294967295!==this._bounds[4*u];this._dirtyBitset.unset(p);p=t.readGeometryWorldSpace();c(this._bounds,
4*u+4,0);if(!p||!p.coords.length)return this._bounds[4*u]=4294967295,this._bounds[4*u+1]=4294967295,this._bounds[4*u+2]=4294967295,this._bounds[4*u+3]=4294967295,!1;let y=Infinity,x=Infinity,v=-Infinity,A=-Infinity;p.forEachVertex((z,B)=>{y=Math.min(y,z);x=Math.min(x,B);v=Math.max(v,z);A=Math.max(A,B)});this._bounds[4*u]=y;this._bounds[4*u+1]=x;this._bounds[4*u+2]=v;this._bounds[4*u+3]=A;return!0}getBounds(p,t){const w=this.getXMin(t),u=this.getYMin(t),y=this.getXMax(t);t=this.getYMax(t);h.fromRectValues(p,
w,u,y,t);return 4294967295!==w}_ensureNumeric(p,t){this._numerics[p]||(this._numerics[p]=[]);c(this._numerics[p],t,0)}_ensureInstanceId(p){c(this._instanceIds,p,0)}_ensureString(p,t){this._strings[p]||(this._strings[p]=[]);c(this._strings[p],t,null)}}e.ComputedAttributeStorage=k;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/CachedField":function(){define(["exports","./AComputedField"],function(e,g){class q extends g.AComputedField{constructor(h){super();
this._field=h}resize(h){throw Error("Method not implemented.");}read(h,m){return h.readAttribute(this._field)}readWithDefault(h,m){return h.readAttribute(this._field)}referencesScale(){return!1}referencesGeometry(){return!1}}e.CachedField=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/ComputedExpression":function(){define(["exports","../../../../../core/string","../../../../../support/arcadeOnDemand","../../../arcade/callExpressionWithCursor",
"./AComputedField"],function(e,g,q,h,m){class l extends m.AComputedField{static async create(d,b){b=await q.createRendererExpression(d,b.spatialReference,b.fields);d=g.numericHash(d);return new l(b,d)}constructor(d,b){super();this._compiled=d;this._cacheKey=b}resize(d){}read(d,b){return this.referencesScale()||"system"!==b.$view.timeZone?h.callExpressionWithCursor(this._compiled,d,b):this._readCached(d,b)}readWithDefault(d,b,a){return this.referencesScale()||"system"!==b.$view.timeZone?h.callExpressionWithCursorWithDefault(this._compiled,
d,b,a):this._readWithDefaultCached(d,b,a)}referencesScale(){return this._compiled?.referencesScale()??!1}referencesGeometry(){return this._compiled?.referencesGeometry()??!1}_readCached(d,b){d.setCache(this._cacheKey);if(d.hasCachedValue())return d.getCachedValue();b=h.callExpressionWithCursor(this._compiled,d,b);d.setCachedValue(b);return b}_readWithDefaultCached(d,b,a){d.setCache(this._cacheKey);if(d.hasCachedValue())return d.getCachedValue();b=h.callExpressionWithCursorWithDefault(this._compiled,
d,b,a);d.setCachedValue(b);return b}}e.ComputedExpression=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/arcade/callExpressionWithCursor":function(){define(["exports","../../../core/has","../../../core/Logger"],function(e,g,q){function h(m){return null==m||Infinity===m||-Infinity===m||"number"===typeof m&&isNaN(m)}e.callExpressionWithCursor=function(m,l,d){if(null==m)return null;const b=l.readArcadeFeature();l.contextTimeZone=d.$view?.timeZone;try{return m.evaluate({...d,
$feature:b},m.services)}catch(a){return q.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",a),null}};e.callExpressionWithCursorWithDefault=function(m,l,d,b){if(null==m)return null!=b?b:null;const a=l.readArcadeFeature();l.contextTimeZone=d.$view?.timeZone;m=m.evaluate({...d,$feature:a},m.services);return h(m)?null!=b?b:null:m};e.isBadArcadeResult=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/ComputedLegacyLabelExpression":function(){define(["exports",
"../../../../../layers/support/labelFormatUtils","../../../../../layers/support/labelUtils","../../../arcade/callExpressionWithCursor","./AComputedField"],function(e,g,q,h,m){class l extends m.AComputedField{static async create(d,b){const a=q.sqlToTemplateString(d);return new l(f=>a.replaceAll(/{[^}]*}/g,n=>{const c=n.slice(1,-1),r=f.metadata.fieldsIndex.get(c);if(null==r)return n;n=f.readAttribute(c);return null==n?"":g.formatField(n,r)}))}constructor(d){super();this._evaluator=d}resize(d){}read(d,
b){return this._evaluator(d)}readWithDefault(d,b,a){d=this._evaluator(d);return h.isBadArcadeResult(d)?a:d}referencesScale(){return!1}referencesGeometry(){return!1}}e.ComputedLegacyLabelExpression=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/labelFormatUtils":function(){define("exports ../../core/Error ../../core/Logger ../../core/sql ../../intl/date ../../intl/number ./domainUtils ./fieldUtils ./labelUtils ../../support/arcadeOnDemand".split(" "),function(e,
g,q,h,m,l,d,b,a,f){function n(p,t){if(null==p)return"";const w=t.domain;if(w)if("codedValue"===w.type||"coded-value"===w.type)for(var u of w.codedValues){if(u.code===p)return u.name}else if("range"===w.type){const {max:y,min:x}=d.getDomainRange(t);u=+p;if(null!=x&&null!=y&&x<=u&&u<=y)return w.name}b.isDateField(t)?p=m.formatDate(p,m.convertDateFormatToIntlOptions("short-date")):b.isNumericField(t)&&(p=l.formatNumber(+p));return p||""}const c=()=>q.getLogger("esri.layers.support.labelFormatUtils"),
r={type:"simple",evaluate(){return null}},k={getAttribute(p,t){return p.field(t)}};e.createLabelFunction=async function(p,t,w){if(!p||!p.symbol||!t)return r;const u=p.where,y=a.getLabelExpression(p);if("arcade"===y.type){const x=await f.createLabelExpression(y.expression,w,t);if(null==x)return r;p={type:"arcade",evaluate(v,A){try{const z="attributes"in v?x.repurposeFeature(v):v;z.contextTimeZone=A??null;const B=x.evaluate({$view:{timeZone:A},$feature:z},x.services);if(null!=B)return B.toString()}catch(z){c().error(new g("arcade-expression-error",
"Encountered an error when evaluating label expression for feature",{error:z,feature:v,expression:y}))}return null},needsHydrationToEvaluate(){return null==a.getSingleFieldArcadeExpression(y.expression)}}}else p={type:"simple",evaluate(x){return y.expression.replaceAll(/{[^}]*}/g,v=>{var A=v.slice(1,-1);A=t.get(A);if(!A)return v;v=null;"attributes"in x?x&&x.attributes&&(v=x.attributes[A.name]):v=x.field(A.name);return null==v?"":n(v,A)})}};if(u){let x;try{x=await h.parseWhereClause(u,t)}catch(A){return c().error(new g("bad-where-clause",
"Encountered an error when evaluating where clause, ignoring",{where:u,error:A})),r}const v=p.evaluate;p.evaluate=(A,z)=>{const B="attributes"in A?void 0:k;try{if(x.testFeature(A,B))return v(A,z)}catch(D){c().error(new g("bad-where-clause","Encountered an error when evaluating where clause for feature",{where:u,feature:A,error:D}))}return null}}return p};e.formatField=n;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/NormalizedField":function(){define(["exports",
"./AComputedField"],function(e,g){class q extends g.AComputedField{constructor(h,m){super();this._field=h;this._normalizationInfo=m}resize(h){throw Error("Method not implemented.");}read(h,m){return this._readNormalized(h)}readWithDefault(h,m){return this._readNormalized(h)}referencesScale(){return!1}referencesGeometry(){return!1}_readNormalized(h){const m=h.readAttribute(this._field);if(null==m)return null;const {normalizationField:l,normalizationTotal:d,normalizationType:b}=this._normalizationInfo;
h=h.readAttribute(l);switch(b??"esriNormalizeByField"){case "esriNormalizeByField":return h?(h||void 0)&&m/h:null;case "esriNormalizeByLog":return Math.log(m)*Math.LOG10E;case "esriNormalizeByPercentOfTotal":return d?m/d*100:null}}}e.NormalizedField=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/FeatureMetadata":function(){define(["exports","../../../../../geometry/SpatialReference","../../../../../layers/support/FieldsIndex"],function(e,g,
q){class h{static minimal(l,d,b=[]){return new h({geometryType:l,fields:b,objectIdField:d,subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,typeIdField:null})}constructor(l){this._options=l;this._fieldsIndex="fieldsIndex"in l?q.fromJSON(l.fieldsIndex):new q(l.fields);l.spatialReference&&(this._spatialReference=g.fromJSON(l.spatialReference));this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,
geometryType:this.geometryType,objectIdField:this.objectIdField,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get objectIdField(){return this._options.objectIdField}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}}
class m extends h{static create(l){return new m({fields:[],objectIdField:"uid",geometryType:null,spatialReference:l,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:null,typeIdField:null,types:null,timeReferenceUnknownClient:null})}}e.FeatureMetadata=h;e.GraphicsMetadata=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/GraphicsReader":function(){define("exports ../../../../../geometry/support/centroid ../../../../../geometry/support/jsonUtils ../../../../../layers/graphics/featureConversionUtils ../../../../../layers/graphics/OptimizedGeometry ../../../engine/webgl/definitions ./FeatureSetReader".split(" "),
function(e,g,q,h,m,l,d){class b extends d.FeatureSetReader{static from(a,f,n){return new b(a,f,n)}constructor(a,f,n){super(n);this._items=a;this._tile=f;this._index=-1;this._cachedGeometry=null;a=f.lod;a.wrap&&(this._wrappingInfo={worldSizeX:a.worldSize[0]})}get _current(){return this._items[this._index]}getItem(){return this._current}getZOrder(){return this._current.zOrder}getMeshWriters(){return this._current.symbolResource?.symbolInfo.meshWriters??[]}hasField(a){return null!=this._current.attributes[a]}field(a){return this.readAttribute(a)}get geometryType(){const a=
q.getJsonType(this._current.geometry);return"esriGeometryPoint"===a?"esriGeometryMultipoint":a}getCursor(){return this.copy()}copy(){const a=new b(this._items,this._tile,this.metadata);this.copyInto(a);return a}copyInto(a){super.copyInto(a);a._cachedGeometry=this._cachedGeometry;a._index=this._index}get fields(){throw Error("Fields reading not supported to graphics.");}get hasFeatures(){return!!this._items.length}get hasNext(){return this._index+1<this._items.length}get exceededTransferLimit(){throw Error("InternalError: exceededTransferLimit not implemented for graphics.");
}get hasZ(){return!1}get hasM(){return!1}getInTransform(){return this._tile.transform}getSize(){return this._items.length}getAttributeHash(){let a="";for(const f in this._current.attributes)a+=this._current.attributes[f];return a}getObjectId(){return this._items[this._index].objectId}getDisplayId(){return this._current.displayId}setDisplayId(a){throw Error("InternalError: Setting displayId not supported for graphics.");}setIndex(a){this._index=a}getIndex(){return this._index}next(){for(this._cachedGeometry=
null;++this._index<this._items.length&&!this._getExists(););return this._index<this._items.length}readGeometryArea(){throw Error("InternalError: readGeometryArea not supported for graphics.");}_readGeometry(){if(!this._cachedGeometry){let a=h.convertFromGeometry(this._current.projectedGeometry,this.hasZ,this.hasM);"esriGeometryPolyline"===this.geometryType&&(a=h.generalizeOptimizedGeometry(new m,a,this.hasZ,this.hasM,this.geometryType,this._tile.transform.scale[0]));this._cachedGeometry=h.quantizeOptimizedGeometry(new m,
a,this.hasZ,this.hasM,this.geometryType,this._tile.transform);if(!this._cachedGeometry)return null;this._wrapGeometry(this._cachedGeometry)}return this._cachedGeometry}_wrapGeometry(a){if(this._wrappingInfo){var {worldSizeX:f}=this._wrappingInfo;if(a.isPoint)1===f?(a.coords.push(l.tileSize,0),a.coords.push(2*-l.tileSize,0),a.lengths.push(3)):2===f?(a.coords.push(2*l.tileSize,0),a.coords.push(4*-l.tileSize,0),a.lengths.push(3)):this._wrapVertex(a.coords,0,2,f);else if("esriGeometryMultipoint"===this.geometryType)if(1===
f){f=a.coords.slice();f[0]-=512;const n=a.coords.slice();n[0]+=512;a.coords.push(...f,...n);f=a.lengths[0];a.lengths.push(f,f)}else this._wrapVertex(a.coords,0,2,f)}}_wrapVertex(a,f,n,c){f*=n;n=a[f];n<-(l.tileSize*(c-2))?a[f]=n+l.tileSize*c:n>l.tileSize*(c-1)&&(a[f]=n-l.tileSize*c)}_readX(){const a=this._readGeometry();return null!=a?a.coords[0]:0}_readY(){const a=this._readGeometry();return null!=a?a.coords[1]:0}_readServerCentroid(){switch(this.geometryType){case "esriGeometryPolygon":var a=g.polygonCentroid(this._current.projectedGeometry);
a=new m([],a);return h.quantizeOptimizedGeometry(new m,a,this.hasZ,this.hasM,this.geometryType,this._tile.transform);case "esriGeometryPolyline":return a=g.ringsCentroid(this._current.projectedGeometry.paths,this.hasZ),a=new m([],a),h.quantizeOptimizedGeometry(new m,a,this.hasZ,this.hasM,this.geometryType,this._tile.transform)}return null}_readAttribute(a,f){f=this._current.attributes[a];if(void 0!==f)return f;a=a.toLowerCase();for(const n in this._current.attributes)if(n.toLowerCase()===a)return this._current.attributes[n]}_readAttributes(){return this._current.attributes}}
e.GraphicsReader=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/FeatureSetReader":function(){define("exports ../../../../../geometry ../../../../../arcade/ArcadeDate ../../../../../core/has ../../../../../core/maybe ../../../../../core/sql/DateOnly ../../../../../core/sql/TimeOnly ../../../../../geometry/GeometryCursor ../../../../../geometry/support/aaBoundingBox ../../../../../geometry/support/labelPoint ../../../../../layers/graphics/centroid ../../../../../layers/graphics/featureConversionUtils ../../../../../layers/graphics/OptimizedFeature ../../../../../layers/graphics/OptimizedGeometry ../../../../../time/timeZoneUtils ./FeatureSetCache ./StaticBitSet ../../../../../geometry/support/jsonUtils".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u){function y(H,K,J){if(!(H.length>K))for(;H.length<=K;)H.push(J)}g=h("featurelayer-simplify-thresholds")??[.5,.5,.5,.5];const x=g[0],v=g[1],A=g[2],z=g[3];g=h("featurelayer-simplify-payload-size-factors")??[1,2,4];const B=g[0],D=g[1],F=g[2],E=h("featurelayer-simplify-mobile-factor")??2,C=h("esri-mobile");class G{constructor(H){this.metadata=H;this.type="FeatureSetReader";this._deleted=null;this._joined=[];this._objectIdToIndex=null;this._boundsBuffer=[];
this._caches=new Map;this.arcadeDeclaredClass="esri.arcade.Feature";this._contextTimeZone=null}get isEmpty(){return null!=this._deleted&&this._deleted.countSet()===this.getSize()}getAreaSimplificationThreshold(H,K){let J=1;const O=C?E:1;4E6<K?J=F*O:1E6<K?J=D*O:5E5<K?J=B*O:1E5<K&&(J=O);K=0;4E3<H?K=z*J:2E3<H?K=A*J:100<H?K=v:15<H&&(K=x);return K}parseTimestampOffset(H){return H}getBounds(H){y(this._boundsBuffer,4*this.getIndex()+4,0);if(4294967295===this.getBoundsXMin())return!1;if(0===this.getBoundsXMin()){var K=
this.readGeometryWorldSpace();if(!K)return this.setBoundsXMin(4294967295),!1;let T=Infinity,I=Infinity,L=-Infinity,R=-Infinity;K.forEachVertex((V,S)=>{T=Math.min(T,V);I=Math.min(I,S);L=Math.max(L,V);R=Math.max(R,S)});this.setBoundsXMin(T);this.setBoundsYMin(I);this.setBoundsXMax(L);this.setBoundsYMax(R);a.fromRectValues(H,T,I,L,R);return!0}K=this.getBoundsXMin();const J=this.getBoundsYMin(),O=this.getBoundsXMax(),Q=this.getBoundsYMax();a.fromRectValues(H,K,J,O,Q);return!0}getBoundsXMin(){return this._boundsBuffer[4*
this.getIndex()]}setBoundsXMin(H){this._boundsBuffer[4*this.getIndex()]=H}getBoundsYMin(){return this._boundsBuffer[4*this.getIndex()+1]}setBoundsYMin(H){this._boundsBuffer[4*this.getIndex()+1]=H}getBoundsXMax(){return this._boundsBuffer[4*this.getIndex()+2]}setBoundsXMax(H){this._boundsBuffer[4*this.getIndex()+2]=H}getBoundsYMax(){return this._boundsBuffer[4*this.getIndex()+3]}setBoundsYMax(H){this._boundsBuffer[4*this.getIndex()+3]=H}readAttributeAsTimestamp(H){H=this.readAttribute(H);return"string"===
typeof H?(new Date(H)).getTime():"number"===typeof H||null==H?H:null}readAttribute(H,K=!1){var J=this._readAttribute(H,K);if(void 0!==J)return J;for(const O of this._joined)if(O.setIndex(this.getIndex()),J=O._readAttribute(H,K),void 0!==J)return J}readAttributes(){const H=this._readAttributes();for(const K of this._joined){K.setIndex(this.getIndex());const J=K._readAttributes();for(const O of Object.keys(J))H[O]=J[O]}return H}joinAttributes(H){this._joined.push(H)}removeIds(H){if(null==this._objectIdToIndex){var K=
new Map;const J=this.getCursor();for(;J.next();){const O=J.getObjectId();m.assertIsSome(O);K.set(O,J.getIndex())}this._objectIdToIndex=K}K=this._objectIdToIndex;for(const J of H.values())K.has(J)&&this._removeAtIndex(K.get(J))}readOptimizedFeatureWorldSpace(){var H=this.readGeometryWorldSpace();const K=this.readAttributes(),J=this.readCentroidWorldSpace();H=new r.OptimizedFeature(H,K,J);H.objectId=this.getObjectId();H.displayId=this.getDisplayId();return H}readLegacyFeatureForDisplay(){const H=this.readCentroidForDisplay();
return{attributes:this.readAttributes(),geometry:this.readLegacyGeometryForDisplay(),centroid:(H&&{x:H.coords[0],y:H.coords[1]})??null}}readLegacyFeatureWorldSpace(){const H=this.readCentroidWorldSpace();return{attributes:this.readAttributes(),geometry:this._readLegacyGeometryWorldSpace(),centroid:(H&&{x:H.coords[0],y:H.coords[1]})??null}}readLegacyGeometryForDisplay(){const H=this.readGeometryForDisplay();return c.convertToGeometry(H,this.geometryType,!1,!1)}readXForDisplay(){return this._readX()}readYForDisplay(){return this._readY()}readXWorldSpace(){const H=
this._readX(),K=this.getInTransform();return null==K?H:H*K.scale[0]+K.translate[0]}readYWorldSpace(){const H=this._readY(),K=this.getInTransform();return null==K?H:K.translate[1]-H*K.scale[1]}readGeometryForDisplay(){var H=this._readGeometryDeltaDecoded(!0);return H?H:(H=this._createGeometryFromServerCentroid())?H.deltaDecode():null}readGeometryWorldSpace(){var H=this._readGeometry();H||=this._createGeometryFromServerCentroid();if(!H)return null;H=H.clone();const K=this.getInTransform();null!=K&&
c.unquantizeOptimizedGeometry(H,H,this.hasZ,this.hasM,K);return H}readCentroidForDisplay(){const H=this.readGeometryForDisplay();return H?this._computeDisplayCentroid(H):this._readServerCentroid()}readCentroidWorldSpace(){var H=this.readGeometryForDisplay();H=H?this._computeDisplayCentroid(H):this._readServerCentroid();if(!H)return null;H=H.clone();const K=this.getInTransform();null!=K&&c.unquantizeOptimizedGeometry(H,H,this.hasZ,this.hasM,K);return H}setCache(H){let K=this._caches.get(H);null==K&&
(K=new t.FeatureSetCache(this.getSize()),this._caches.set(H,K));this._activeCache=K}setCachedValue(H){this._activeCache.set(this.getIndex(),H)}hasCachedValue(){return this._activeCache.has(this.getIndex())}getCachedValue(){return this._activeCache.get(this.getIndex())}_readGeometryDeltaDecoded(H){H=this._readGeometry(H);return"esriGeometryPoint"!==this.geometryType&&H&&this.getInTransform()?H.deltaDecode():H}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(H){this._contextTimeZone=
H}readArcadeFeature(){return this}hasField(H){return this.fields.has(H)||this._joined.some(K=>K.hasField(H))}geometry(){var H=this.readGeometryWorldSpace();H=c.convertToGeometry(H,this.geometryType,this.hasZ,this.hasM);if(H=u.fromJSON(H)){if(!this.metadata.spatialReference)throw Error("InternalError: Expected spatial reference to be defined");H.spatialReference=this.metadata.spatialReference}return H}autocastArcadeDate(H,K){return K&&K instanceof Date?this.isUnknownDateTimeField(H)?q.ArcadeDate.unknownDateJSToArcadeDate(K):
q.ArcadeDate.dateJSAndZoneToArcadeDate(K,this.contextTimeZone??p.system):K}isUnknownDateTimeField(H){return this.metadata.fieldsIndex.getTimeZone(H)===p.unknown}field(H){let K=this.fields.get(H);if(K)switch(K.type){case "date-only":case "esriFieldTypeDateOnly":return l.DateOnly.fromReader(this.readAttribute(H,!1));case "time-only":case "esriFieldTypeTimeOnly":return d.TimeOnly.fromReader(this.readAttribute(H,!1));case "esriFieldTypeTimestampOffset":case "timestamp-offset":return q.ArcadeDate.fromReaderAsTimeStampOffset(this.readAttribute(H,
!1));case "date":case "esriFieldTypeDate":return this.autocastArcadeDate(H,this.readAttribute(H,!0));default:return this.readAttribute(H,!1)}for(const J of this._joined)if(J.setIndex(this.getIndex()),K=J.fields.get(H))switch(K.type){case "date-only":case "esriFieldTypeDateOnly":return l.DateOnly.fromReader(J._readAttribute(H,!1));case "time-only":case "esriFieldTypeTimeOnly":return d.TimeOnly.fromReader(J._readAttribute(H,!1));case "esriFieldTypeTimestampOffset":case "timestamp-offset":return q.ArcadeDate.fromReaderAsTimeStampOffset(J._readAttribute(H,
!1));case "date":case "esriFieldTypeDate":return this.autocastArcadeDate(H,J._readAttribute(H,!0));default:return this.readAttribute(H,!1)}throw Error(`Field ${H} does not exist`);}setField(H,K){throw Error("Unable to update feature attribute values, feature is readonly");}keys(){return this.fields.fields.map(H=>H.name)}castToText(H=!1){if(!H)return JSON.stringify(this.readLegacyFeatureForDisplay());H=this.readLegacyFeatureForDisplay();if(!H)return JSON.stringify(null);H={geometry:H.geometry,attributes:{...(H.attributes??
{})}};for(const K in H.attributes){const J=H.attributes[K];J instanceof Date&&(H.attributes[K]=J.getTime())}return JSON.stringify(H)}gdbVersion(){return null}fullSchema(){return this.metadata.arcadeSchema}castAsJson(H=null){return{attributes:this._readAttributes(),geometry:!0===H?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(H,K=null){return Promise.resolve(this.castAsJson(K))}_getExists(){return null==this._deleted||!this._deleted.has(this.getIndex())}_computeDisplayCentroid(H){if(null==
this.getInTransform())return n.getCentroidOptimizedGeometry(new k,H,this.hasM,this.hasZ);H=b.GeometryCursor.fromOptimized(H,this.geometryType);H.yFactor*=-1;return(H=f.getLabelPoint(H))?(H[1]*=-1,new k([],H)):null}copyInto(H){H._joined=this._joined;H._deleted=this._deleted;H._objectIdToIndex=this._objectIdToIndex;H._boundsBuffer=this._boundsBuffer;H._activeCache=this._activeCache;H._caches=this._caches;H._contextTimeZone=this._contextTimeZone}_readLegacyGeometryWorldSpace(){const H=this.readGeometryWorldSpace();
return c.convertToGeometry(H,this.geometryType,!1,!1)}_createGeometryFromServerCentroid(){const H=this._readServerCentroid();if(!H)return null;const [K,J]=H.coords;return this._createQuantizedExtrudedGeometry(K,J)}_createQuantizedExtrudedGeometry(H,K){return"esriGeometryPolyline"===this.geometryType?this._createQuantizedExtrudedLine(H,K):this._createQuantizedExtrudedQuad(H,K)}_createQuantizedExtrudedQuad(H,K){return new k([5],[H-1,K,1,-1,1,1,-1,1,-1,-1])}_createQuantizedExtrudedLine(H,K){return new k([2],
[H-1,K+1,1,-1])}_removeAtIndex(H){null==this._deleted&&(this._deleted=w.StaticBitSet.create(this.getSize()));this._deleted.set(H)}}e.FeatureSetReader=G;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/arcade/ArcadeDate":function(){define(["exports","../core/string","../core/sql/UnknownTimeZone","../chunks/datetime"],function(e,g,q,h){function m(f,n,c){return f<n?f-n:f>c?f-c:0}function l(f,n=!0){if(f instanceof h.Zone)return f;if("system"===f.toLowerCase())return"system";if("utc"===
f.toLowerCase())return"UTC";if("unknown"===f.toLowerCase())return q.UnknownTimeZone.instance;if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(f)){const c=h.FixedOffsetZone.parseSpecifier("UTC"+(f.startsWith("+")||f.startsWith("-")?"":"+")+f);if(c)return c}f=h.IANAZone.create(f);if(!f.isValid){if(n)throw new b(e.ArcadeDateErrorCodes.TimeZoneNotRecognized);return null}return f}e.ArcadeDateErrorCodes=void 0;(e.ArcadeDateErrorCodes||(e.ArcadeDateErrorCodes={})).TimeZoneNotRecognized="TimeZoneNotRecognized";
const d={[e.ArcadeDateErrorCodes.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class b extends Error{constructor(f,n){super(g.replace(d[f],n));this.declaredRootClass="esri.arcade.arcadedate.dateerror";Error.captureStackTrace&&Error.captureStackTrace(this,b)}}class a{constructor(f){this._date=f;this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(f=0,n=1,c=1,r=0,k=0,p=0,t=0,w){if(isNaN(f)||isNaN(n)||isNaN(c)||isNaN(r)||isNaN(k)||isNaN(p)||isNaN(t))return null;const u=
h.DateTime.local(f,n).daysInMonth;f=h.DateTime.fromObject({day:1>c?1:c>u?u:c,year:f,month:1>n?1:12<n?12:n,hour:0>r?0:23<r?23:r,minute:0>k?0:59<k?59:k,second:0>p?0:59<p?59:p,millisecond:0>t?0:999<t?999:t},{zone:l(w)});f=f.plus({months:m(n,1,12),days:m(c,1,u),hours:m(r,0,23),minutes:m(k,0,59),seconds:m(p,0,59),milliseconds:m(t,0,999)});return new a(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(f,n){n=
l(n);return f.isUnknownTimeZone||n===q.UnknownTimeZone.instance?a.fromParts(f.year,f.monthJS+1,f.day,f.hour,f.minute,f.second,f.millisecond,n):new a(f._date.setZone(n))}static dateJSToArcadeDate(f){return new a(h.DateTime.fromJSDate(f,{zone:"system"}))}static dateJSAndZoneToArcadeDate(f,n="system"){n=l(n);return new a(h.DateTime.fromJSDate(f,{zone:n}))}static unknownEpochToArcadeDate(f){return new a(h.DateTime.fromMillis(f,{zone:q.UnknownTimeZone.instance}))}static unknownDateJSToArcadeDate(f){return new a(h.DateTime.fromMillis(f.getTime(),
{zone:q.UnknownTimeZone.instance}))}static epochToArcadeDate(f,n="system"){n=l(n);return new a(h.DateTime.fromMillis(f,{zone:n}))}static dateTimeToArcadeDate(f){return new a(f)}clone(){return new a(this._date)}changeTimeZone(f){f=l(f);return a.dateTimeToArcadeDate(this._date.setZone(f))}static dateTimeAndZoneToArcadeDate(f,n){n=l(n);return f.zone===q.UnknownTimeZone.instance||n===q.UnknownTimeZone.instance?a.fromParts(f.year,f.month,f.day,f.hour,f.minute,f.second,f.millisecond,n):new a(f.setZone(n))}static nowToArcadeDate(f){f=
l(f);return new a(h.DateTime.fromJSDate(new Date,{zone:f}))}static nowUTCToArcadeDate(){return new a(h.DateTime.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===a.systemTimeZoneCanonicalName}equals(f){return this.isSystem&&f.isSystem?this.toNumber()===f.toNumber():this.isUnknownTimeZone!==f.isUnknownTimeZone?!1:this._date.equals(f._date)}get isUnknownTimeZone(){return this._date.zone===q.UnknownTimeZone.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let f=
this._date.weekday;6<f&&(f=0);return f}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";
const f=this.zone;return"fixed"===f.type?0===f.fixed?"UTC":f.formatOffset(0,"short"):f.name}stringify(){return JSON.stringify(this.toJSDate())}plus(f){return new a(this._date.plus(f))}diff(f,n="milliseconds"){return this._date.diff(f._date,n)[n]}toISODate(){return this._date.toISODate()}toISOString(f){return f?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(f,n){return this._date.toISOTime({suppressMilliseconds:f,
includeOffset:n&&!this.isUnknownTimeZone})}toFormat(f,n){this.isUnknownTimeZone&&(f=f.replaceAll("Z",""));return this._date.toFormat(f,n)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new a(this._date.toUTC())}toLocal(){return new a(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(f){if(!f)return null;
f=h.DateTime.fromISO(f,{setZone:!0});return new a(f)}}e.ArcadeDate=a;e.ArcadeDateError=b;e.arcadeDateErrorMessages=d;e.createDateTimeZone=l;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/sql/DateOnly":function(){define(["exports","../../arcade/ArcadeDate","../../intl/locale","../../chunks/datetime"],function(e,g,q,h){function m(d){d=d.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$\x26]");let b="";const a=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
for(const f of d.match(a)||[])switch(f){case "D":b+="d";break;case "DD":b+="dd";break;case "DDD":b+="o";break;case "d":b+="c";break;case "ddd":b+="ccc";break;case "dddd":b+="cccc";break;case "M":b+="L";break;case "MM":b+="LL";break;case "MMM":b+="LLL";break;case "MMMM":b+="LLLL";break;case "YY":b+="yy";break;case "Y":case "YYYY":b+="yyyy";break;case "Q":b+="q";break;case "X":case "x":b+=f;break;default:b=2<=f.length&&"["===f.slice(0,1)&&"]"===f.slice(-1)?b+`'${f.slice(1,-1)}'`:b+`'${f}'`}return b}
class l{constructor(d,b,a){this._year=d;this._month=b;this._day=a;this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(d){return d instanceof l&&d.day===this.day&&d.month===this.month&&d.year===this.year}clone(){return new l(this._year,this._month,this._day)}toDateTime(d){return h.DateTime.fromObject({day:this.day,month:this.month,
year:this.year},{zone:g.createDateTimeZone(d)})}toDateTimeLuxon(d){return h.DateTime.fromObject({day:this.day,month:this.month,year:this.year},{zone:g.createDateTimeZone(d)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(d=null,b=!0){if(null===d||""===d)return this.toString();b&&(d=m(d));if(!d)return"";b=this.toDateTime("unknown");return g.ArcadeDate.dateTimeToArcadeDate(b).toFormat(d,{locale:q.getLocale(),
numberingSystem:"latn"})}toArcadeDate(){const d=this.toDateTime("unknown");return g.ArcadeDate.dateTimeToArcadeDate(d)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(d,b){return l.fromDateTime(this.toUTCDateTime().plus({[d]:b}))}toUTCDateTime(){return h.DateTime.utc(this.year,
this.month,this.day,0,0,0,0)}difference(d,b){switch(b.toLowerCase()){case "days":case "day":case "d":return this.toUTCDateTime().diff(d.toUTCDateTime(),"days").days;case "months":case "month":return this.toUTCDateTime().diff(d.toUTCDateTime(),"months").months;case "minutes":case "minute":case "m":return"M"===b?this.toUTCDateTime().diff(d.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(d.toUTCDateTime(),"minutes").minutes;case "seconds":case "second":case "s":return this.toUTCDateTime().diff(d.toUTCDateTime(),
"seconds").seconds;case "milliseconds":case "millisecond":case "ms":return this.toUTCDateTime().diff(d.toUTCDateTime(),"milliseconds").milliseconds;case "hours":case "hour":case "h":return this.toUTCDateTime().diff(d.toUTCDateTime(),"hours").hours;case "years":case "year":case "y":return this.toUTCDateTime().diff(d.toUTCDateTime(),"years").years;default:return this.toUTCDateTime().diff(d.toUTCDateTime(),"milliseconds").milliseconds}}static fromMilliseconds(d){d=h.DateTime.fromMillis(d,{zone:h.FixedOffsetZone.utcInstance});
return d.isValid?l.fromParts(d.year,d.month,d.day):null}static fromSeconds(d){d=h.DateTime.fromSeconds(d,{zone:h.FixedOffsetZone.utcInstance});return d.isValid?l.fromParts(d.year,d.month,d.day):null}static fromReader(d){if(!d)return null;d=d.split("-");return 3!==d.length?null:new l(parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10))}static fromParts(d,b,a){d=new l(d,b,a);return!1===d.isValid?null:d}static fromDateJS(d){return l.fromParts(d.getFullYear(),d.getMonth()+1,d.getDay())}static fromDateTime(d){return l.fromParts(d.year,
d.month,d.day)}static fromSqlTimeStampOffset(d){return this.fromDateTime(d.toDateTime())}static fromString(d,b=null){if(""===d||null===d)return null;var a=[];if(b)(b=m(b))&&a.push(b);else if(null===b||""===b)return d=h.DateTime.fromISO(d,{setZone:!0}),d.isValid?l.fromParts(d.year,d.month,d.day):null;for(const f of a)if(a=h.DateTime.fromFormat(d,b??f),a.isValid)return new l(a.year,a.month,a.day);return null}static fromNow(d="system"){d=h.DateTime.fromJSDate(new Date).setZone(g.createDateTimeZone(d));
return new l(d.year,d.month,d.day)}}e.DateOnly=l;e.standardizeDateOnlyFormat=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/sql/TimeOnly":function(){define(["exports","../../arcade/kernel","../../intl/locale","../../chunks/datetime"],function(e,g,q,h){function m(d){if(!d)return"";const b=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let a="";for(const f of d.match(b)||[])switch(f){case "SSS":a+=f;break;case "A":case "a":a+="a";break;case "m":case "mm":case "h":case "hh":case "H":case "HH":case "s":case "ss":a+=
f;break;default:a+=`'${f}'`}return a}class l{constructor(d,b,a,f){this._hour=d;this._minute=b;this._second=a;this._millisecond=f;this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(d){return d instanceof l&&d.hour===this.hour&&d.minute===this.minute&&d.second===this.second&&d.millisecond===this.millisecond}clone(){return new l(this.hour,this.minute,this.second,
this.millisecond)}isValid(){return g.isInteger(this.hour)&&g.isInteger(this.minute)&&g.isInteger(this.second)&&g.isInteger(this.millisecond)&&0<=this.hour&&24>this.hour&&0<=this.minute&&60>this.minute&&0<=this.second&&60>this.second&&0<=this.millisecond&&1E3>this.millisecond}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(0<this.millisecond?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,
"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${0<this.millisecond?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(d=null){return null===d||""===d?this.toString():(d=m(d))?h.DateTime.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(d,{locale:q.getLocale(),numberingSystem:"latn"}):
""}toNumber(){return this.millisecond+1E3*this.second+6E4*this.minute+36E5*this.hour}static fromParts(d,b,a,f){d=new l(d,b,a,f);return d.isValid()?d:null}static fromReader(d){if(!d)return null;d=d.split(":");return 3!==d.length?null:new l(parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10),0)}static fromMilliseconds(d){return 864E5<d||0>d?null:new l(Math.floor(d/36E5%24),Math.floor(d/6E4%60),Math.floor(d/1E3%60),Math.floor(d%1E3))}static fromDateJS(d){return new l(d.getHours(),d.getMinutes(),d.getSeconds(),
d.getMilliseconds())}static fromDateTime(d){return new l(d.hour,d.minute,d.second,d.millisecond)}static fromSqlTimeStampOffset(d){return this.fromDateTime(d.toDateTime())}static fromString(d,b=null){if(""===d||null===d)return null;const a=[];if(b)(b=m(b))&&a.push(b);else if(null===b||""===b)a.push("HH:mm:ss"),a.push("HH:mm:ss.SSS"),a.push("hh:mm:ss a"),a.push("hh:mm:ss.SSS a"),a.push("HH:mm"),a.push("hh:mm a"),a.push("H:mm"),a.push("h:mm a"),a.push("H:mm:ss"),a.push("h:mm:ss a"),a.push("H:mm:ss.SSS"),
a.push("h:mm:ss.SSS a");for(const f of a)if(b=h.DateTime.fromFormat(d,f),b.isValid)return new l(b.hour,b.minute,b.second,b.millisecond);return null}plus(d,b){switch(d){case "days":case "years":case "months":return this.clone();case "hours":case "minutes":case "seconds":case "milliseconds":return l.fromDateTime(this.toUTCDateTime().plus({[d]:b}))}return null}toUTCDateTime(){return h.DateTime.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(d,b){switch(b.toLowerCase()){case "days":case "day":case "d":return this.toUTCDateTime().diff(d.toUTCDateTime(),
"days").days;case "months":case "month":return this.toUTCDateTime().diff(d.toUTCDateTime(),"months").months;case "minutes":case "minute":case "m":return"M"===b?this.toUTCDateTime().diff(d.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(d.toUTCDateTime(),"minutes").minutes;case "seconds":case "second":case "s":return this.toUTCDateTime().diff(d.toUTCDateTime(),"seconds").seconds;case "milliseconds":case "millisecond":case "ms":return this.toUTCDateTime().diff(d.toUTCDateTime(),"milliseconds").milliseconds;
case "hours":case "hour":case "h":return this.toUTCDateTime().diff(d.toUTCDateTime(),"hours").hours;case "years":case "year":case "y":return this.toUTCDateTime().diff(d.toUTCDateTime(),"years").years;default:return this.toUTCDateTime().diff(d.toUTCDateTime(),"milliseconds").milliseconds}}}e.TimeOnly=l;e.standardizeTimeFormat=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/arcade/kernel":function(){define(["exports","../geometry/Extent"],function(e,g){e.cloneGeometry=function(q){if(null==
q)return null;const h=q.clone();void 0!==q.cache._geVersion&&(h.cache._geVersion=q.cache._geVersion);return h};e.convertLinearUnitsToCode=function(q){if(null==q)return null;if("number"===typeof q)return q;q=q.toLowerCase();q=q.replaceAll(/\s/g,"");q=q.replaceAll("-","");switch(q){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":return 9001;case "miles":case "mile":case "squaremile":case "squaremiles":return 9093;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "km":return 9036;
case "yard":case "yd":case "yards":case "squareyards":case "squareyard":return 9096;case "feet":case "ft":case "foot":case "squarefeet":case "squarefoot":return 9002;case "nmi":case "nauticalmile":case "nauticalmiles":case "squarenauticalmile":case "squarenauticalmiles":return 9030}return null};e.convertSquareUnitsToCode=function(q){if(null==q)return null;if("number"===typeof q)return q;q=q.toLowerCase();q=q.replaceAll(/\s/g,"");q=q.replaceAll("-","");switch(q){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":return 109404;
case "miles":case "mile":case "squaremile":case "squaremiles":return 109439;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "km":return 109414;case "acres":case "acre":case "ac":return 109402;case "hectares":case "hectare":case "ha":return 109401;case "yard":case "yd":case "yards":case "squareyards":case "squareyard":return 109442;case "feet":case "ft":case "foot":case "squarefeet":case "squarefoot":return 109405;case "nmi":case "nauticalmile":case "nauticalmiles":case "squarenauticalmile":case "squarenauticalmiles":return 109409}return null};
e.isInteger=function(q){return"number"===typeof q&&isFinite(q)&&Math.floor(q)===q};e.sameGeomType=function(q,h){return q===h||"point"===q&&"esriGeometryPoint"===h||"polyline"===q&&"esriGeometryPolyline"===h||"polygon"===q&&"esriGeometryPolygon"===h||"extent"===q&&"esriGeometryEnvelope"===h||"multipoint"===q&&"esriGeometryMultipoint"===h||"point"===h&&"esriGeometryPoint"===q||"polyline"===h&&"esriGeometryPolyline"===q||"polygon"===h&&"esriGeometryPolygon"===q||"extent"===h&&"esriGeometryEnvelope"===
q||"multipoint"===h&&"esriGeometryMultipoint"===q?!0:!1};e.shapeExtent=function(q){if(null==q)return null;switch(q.type){case "polygon":case "multipoint":case "polyline":return q.extent;case "point":return new g({xmin:q.x,ymin:q.y,xmax:q.x,ymax:q.y,spatialReference:q.spatialReference});case "extent":return q}return null};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/layers/graphics/centroid":function(){define(["exports"],function(e){function g(h,m,l,d,b,a){a=b?a?4:3:a?3:2;
let f=l,n=l+a,c=0,r=0,k=l=0,p=0;for(let t=0,w=d-1;t<w;t++,f+=a,n+=a){d=m[f];const u=m[f+1],y=m[f+2],x=m[n],v=m[n+1],A=m[n+2];let z=d*v-x*u;k+=z;c+=(d+x)*z;r+=(u+v)*z;b&&(z=d*A-x*y,l+=(y+A)*z,p+=z);d<h[0]&&(h[0]=d);d>h[1]&&(h[1]=d);u<h[2]&&(h[2]=u);u>h[3]&&(h[3]=u);b&&(y<h[4]&&(h[4]=y),y>h[5]&&(h[5]=y))}0<k&&(k*=-1);0<p&&(p*=-1);if(!k)return null;h=[c,r,.5*k];b&&(h[3]=l,h[4]=.5*p);return h}function q(h,m,l,d,b){b=d?b?4:3:b?3:2;let a=m,f=m+b,n=0,c=0,r=0,k=0;for(let u=0,y=l-1;u<y;u++,a+=b,f+=b){var p=
h[a];const x=h[a+1],v=h[a+2],A=h[f],z=h[f+1],B=h[f+2];if(d){var t=A-p;var w=z-x;const D=B-v;t=Math.sqrt(t*t+w*w+D*D)}else t=A-p,w=z-x,t=Math.sqrt(t*t+w*w);t&&(n+=t,d?(p=[p+.5*(A-p),x+.5*(z-x),v+.5*(B-v)],c+=t*p[0],r+=t*p[1],k+=t*p[2]):(p=[p+.5*(A-p),x+.5*(z-x)],c+=t*p[0],r+=t*p[1]))}return 0<n?d?[c/n,r/n,k/n]:[c/n,r/n]:0<l?d?[h[m],h[m+1],h[m+2]]:[h[m],h[m+1]]:null}e.getCentroidOptimizedGeometry=function(h,m,l,d){if(!m?.lengths.length)return null;h.lengths.length&&(h.lengths.length=0);h.coords.length&&
(h.coords.length=0);const b=h.coords,a=[],f=l?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:n,coords:c}=m;var r=l?d?4:3:d?3:2;let k=0;for(const p of n){const t=g(f,c,k,p,l,d);t&&a.push(t);k+=p*r}a.sort((p,t)=>{let w=p[2]-t[2];0===w&&l&&(w=p[4]-t[4]);return w});a.length&&(r=6*a[0][2],
b[0]=a[0][0]/r,b[1]=a[0][1]/r,l&&(r=6*a[0][4],b[2]=0!==r?a[0][3]/r:0),b[0]<f[0]||b[0]>f[1]||b[1]<f[2]||b[1]>f[3]||l&&(b[2]<f[4]||b[2]>f[5]))&&(b.length=0);if(!b.length)if(m=m.lengths[0]?q(c,0,n[0],l,d):null)b[0]=m[0],b[1]=m[1],l&&2<m.length&&(b[2]=m[2]);else return null;return h};e.lineCentroid=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/features/support/FeatureSetCache":function(){define(["exports","./StaticBitSet"],function(e,g){class q{constructor(h){this._valid=
g.StaticBitSet.create(h);this._data=Array(h)}has(h){return this._valid.has(h)}set(h,m){this._valid.set(h);this._data[h]=m}get(h){return this._data[h]}}e.FeatureSetCache=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/graphics/GraphicStore":function(){define("../../../../core/has ../../../../core/screenUtils ../../../../chunks/rbush ../../../../geometry/support/aaBoundingRect ../../../../geometry/support/boundsUtils ../../../../geometry/support/normalizeUtils ../../../../geometry/support/spatialReferenceUtils ../../../../symbols/cim/CIMSymbolDrawHelper ../../../../symbols/cim/CIMSymbolHelper ../../engine/webgl/definitions ./GraphicStoreItem ./graphicsUtils ./GraphicUpdateMessage".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r){function k(t,w){return w.zOrder-t.zOrder}class p{constructor(t,w,u,y,x){this._items=new Map;this._boundsDirty=!1;this._outSpatialReference=t;this._cimResourceManager=w;this._hittestDrawHelper=new b.HittestDrawHelper(w);this._tileInfoView=u;this._store=x;t=u.getClosestInfoForScale(y);this._resolution=this._tileInfoView.getTileResolution(t.level)}items(){return this._items.values()}getItem(t){return this._items.get(t)}async update(t,w,u){const y=[],x=[],v=[],A=new Set,
z=[];let B=0;for(const F of t.items){B++;var D=F.uid;const E=this._items.get(D);t=w(F);A.add(D);E?E.update(F,t,B)&&(x.push(E),z.push(this._updateItem(E,u))):(D=this._store.createDisplayIdForObjectId(D),t=n.GraphicStoreItem.fromGraphic(F,t,B,D),z.push(this._updateItem(t,u)),this._items.set(t.objectId,t),y.push(t))}for(const [F,E]of this._items.entries())A.has(F)||(this._store.releaseDisplayIdForObjectId(F),this._items.delete(F),v.push(E));await Promise.all(z);this._index=null;return new r.GraphicUpdateMessage(y,
x,v)}updateLevel(t){this._resolution!==t&&(this._index=null,this._boundsDirty=!0,this._resolution=t)}hitTest(t,w,u,y,x){var v=(u=e("esri-mobile"))?f.hittestToleranceMobile:f.hittestToleranceDesktop,A=v+(u?0:f.hittestToleranceSmallSymbol);t=l.normalizeMapX(t,this._tileInfoView.spatialReference);var z=y*window.devicePixelRatio*A;u=h.create();u[0]=t-z;u[1]=w-z;u[2]=t+z;u[3]=w+z;z=y*window.devicePixelRatio*v;v=h.create();v[0]=t-z;v[1]=w-z;v[2]=t+z;v[3]=w+z;A=.5*y*(A+c.pixelBuffer);w=this._searchIndex(t-
A,w-A,t+A,w+A);if(!w||0===w.length)return[];t=[];A=h.create();z=h.create();for(var B of w){if(!B.visible)continue;const {projectedGeometry:D,symbolResource:F}=B;this._getSymbolBounds(A,F,D,z,x);z[3]=z[2]=z[1]=z[0]=0;h.intersects(A,u)&&t.push(B)}if(0===t.length)return[];B=this._hittestDrawHelper;u=[];for(const D of t){const {projectedGeometry:F,symbolResource:E}=D;if(!E)continue;const {textInfo:C,symbolInfo:G}=E;B.hitTest(v,G.cimSymbol.symbol,F,C,x,y)&&u.push(D)}u.sort(k);return u.map(D=>D.objectId)}queryItems(t){return 0===
this._items.size?[]:this._searchForItems(t)}clear(){this._items.clear();this._index=null}async _updateItem(t,w){await t.projectAndNormalize(this._outSpatialReference);await w(t);({size:w}=t);w[0]=w[1]=w[2]=w[3]=0;this._getSymbolBounds(t.bounds,t.symbolResource,t.projectedGeometry,t.size,0)}_searchIndex(t,w,u,y){this._boundsDirty&&(this._items.forEach(x=>this._getSymbolBounds(x.bounds,x.symbolResource,x.projectedGeometry,x.size,0)),this._boundsDirty=!1);this._index||(this._index=q.rbush(9,x=>({minX:x.bounds[0],
minY:x.bounds[1],maxX:x.bounds[2],maxY:x.bounds[3]})),this._index.load(Array.from(this._items.values())));return this._index.search({minX:t,minY:w,maxX:u,maxY:y})}_searchForItems(t){var w=this._tileInfoView.spatialReference,u=t.bounds,y=d.getInfo(w);if(y&&w.isWrappable){const [x,v]=y.valid;w=1E-5>Math.abs(u[2]-v);y=1E-5>Math.abs(u[0]-x);if(!(w&&y||!w&&!y))return t=t.resolution,t=w?h.create([x,u[1],x+t*c.pixelBuffer,u[3]]):h.create([v-t*c.pixelBuffer,u[1],v,u[3]]),u=this._searchIndex(u[0],u[1],u[2],
u[3]),t=this._searchIndex(t[0],t[1],t[2],t[3]),[...(new Set([...u,...t]))]}return this._searchIndex(u[0],u[1],u[2],u[3])}_getSymbolBounds(t,w,u,y,x){if(!w||!w.symbolInfo.linearCIM||!u)return null;t||=h.create();m.getBoundsXY(t,u);if(!y||0===y[0]&&0===y[1]&&0===y[2]&&0===y[3]){const {textInfo:v,symbolInfo:A}=w;w=A.cimSymbol;y||=[0,0,0,0];x=a.CIMSymbolInflatedSizeHelper.getSymbolInflateSize(y,w.symbol,this._cimResourceManager,x,v);y[0]=g.pt2px(x[0]);y[1]=g.pt2px(x[1]);y[2]=g.pt2px(x[2]);y[3]=g.pt2px(x[3])}x=
this._resolution;y=a.CIMSymbolInflatedSizeHelper.safeSize(y);t[0]-=y*x;t[1]-=y*x;t[2]+=y*x;t[3]+=y*x;return t}}return p})},"esri/views/2d/layers/graphics/GraphicStoreItem":function(){define("exports ../../../../geometry/support/aaBoundingRect ../../../../geometry/support/coordsUtils ../../../../geometry/support/jsonUtils ../../../../geometry/support/normalizeUtilsSync ../../../../layers/graphics/data/projectionSupport ./graphicsUtils".split(" "),function(e,g,q,h,m,l,d){class b{static fromGraphic(a,
f,n,c){return new b(a.geometry,f,{...a.attributes},a.visible,a.uid,n,c)}constructor(a,f,n,c,r,k,p){this.geometry=a;this.symbol=f;this.attributes=n;this.visible=c;this.objectId=r;this.zOrder=k;this.displayId=p;this.bounds=g.create();this.prevBounds=g.create();this.size=[0,0,0,0]}get linearCIM(){return this.symbolResource?.symbolInfo.linearCIM}update(a,f,n){if(this.geometry===a.geometry&&JSON.stringify(this.attributes)===JSON.stringify(a.attributes)&&this.symbol===f&&this.zOrder===n&&this.visible===
a.visible)return!1;this.prevBounds=this.bounds;this.bounds=g.create();this.zOrder=n;this.geometry=a.geometry;this.attributes={...a.attributes};this.symbol=f;this.visible=a.visible;this.projectedGeometry=this.symbolResource=null;return!0}async projectAndNormalize(a){let f=this.geometry;if(f&&f.spatialReference&&"mesh"!==f.type){"extent"===f.type&&(f=d.polygonFromExtent(f));await l.checkProjectionSupport(f.spatialReference,a);var n=m.normalizeCentralMeridianForDisplay(f);n&&((a=l.project(n,f.spatialReference,
a))&&q.closeRingsAndFixWinding(a),this.projectedGeometry=h.isExtent(a)?d.polygonFromExtent(a):a)}}}e.GraphicStoreItem=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/normalizeUtilsSync":function(){define("exports ../../core/JSONSupport ./aaBoundingRect ./boundsUtils ./coordsUtils ./jsonUtils ./normalizeUtilsCommon ./spatialReferenceUtils".split(" "),function(e,g,q,h,m,l,d,b){function a(v,A){if(null==v)return null;var z=v.spatialReference,B=b.getInfo(z);v=g.isSerializable(v)?
v.toJSON():v;if(!B)return v;z=b.isWebMercator(z)?102100:4326;const D=d.cutParams[z].maxX,F=d.cutParams[z].minX;if(l.isPoint(v))return n(v,D,F);if(l.isMultipoint(v))v.points=v.points.map(E=>n(E,D,F));else{if(l.isExtent(v))return f(v,B);if(l.isPolygon(v)||l.isPolyline(v)){z=h.getBoundsXY(y,v);B=z[0];z=z[2];const E=2*d.offsetMagnitude(B,F)*D;v=0===E?v:d.updatePolyGeometry(v,E);B+=E;z+=E;return z>D?t(v,D,A):B<F?t(v,F,A):v}}return v}function f(v,A){if(!A)return v;const z=c(v,A).map(B=>B.extent);return 2>
z.length?z[0]||v:2<z.length?(v.xmin=A.valid[0],v.xmax=A.valid[1],v):{rings:z.map(B=>[[B.xmin,B.ymin],[B.xmin,B.ymax],[B.xmax,B.ymax],[B.xmax,B.ymin],[B.xmin,B.ymin]])}}function n(v,A,z){if(Array.isArray(v)){var B=v[0];B>A?(z=d.offsetMagnitude(B,A),v[0]=B+-2*z*A):B<z&&(A=d.offsetMagnitude(B,z),v[0]=B+-2*A*z)}else B=v.x,B>A?(z=d.offsetMagnitude(B,A),v.x+=-2*z*A):B<z&&(A=d.offsetMagnitude(B,z),v.x+=-2*A*z);return v}function c(v,A){const z=[],{ymin:B,ymax:D,xmin:F,xmax:E}=v;var C=v.xmax-v.xmin;const [G,
H]=A.valid,{x:K,frameId:J}=r(v.xmin,A),{x:O,frameId:Q}=r(v.xmax,A);v=K===O&&0<C;if(C>2*H){C={xmin:F<E?K:O,ymin:B,xmax:H,ymax:D};v={xmin:G,ymin:B,xmax:F<E?O:K,ymax:D};A={xmin:0,ymin:B,xmax:H,ymax:D};const T={xmin:G,ymin:B,xmax:0,ymax:D},I=[],L=[];k(C,A)&&I.push(J);k(C,T)&&L.push(J);k(v,A)&&I.push(Q);k(v,T)&&L.push(Q);for(let R=J+1;R<Q;R++)I.push(R),L.push(R);z.push(new u(C,[J]),new u(v,[Q]),new u(A,I),new u(T,L))}else K>O||v?z.push(new u({xmin:K,ymin:B,xmax:H,ymax:D},[J]),new u({xmin:G,ymin:B,xmax:O,
ymax:D},[Q])):z.push(new u({xmin:K,ymin:B,xmax:O,ymax:D},[J]));return z}function r(v,A){const [z,B]=A.valid;A=2*B;var D=0;v>B?(D=Math.ceil(Math.abs(v-B)/A),v-=D*A):v<z&&(D=Math.ceil(Math.abs(v-z)/A),v+=D*A,D=-D);return{x:v,frameId:D}}function k(v,A){const {xmin:z,ymin:B,xmax:D,ymax:F}=A;return p(v,z,B)&&p(v,z,F)&&p(v,D,F)&&p(v,D,B)}function p(v,A,z){return A>=v.xmin&&A<=v.xmax&&z>=v.ymin&&z<=v.ymax?!0:!1}function t(v,A,z=!0){const B=!l.isPolyline(v);B&&m.closeRings(v);if(z)return(new x).cut(v,A);
z=B?v.rings:v.paths;const D=B?4:2,F=z.length;A*=-2;for(let E=0;E<F;E++){const C=z[E];if(C&&C.length>=D){const G=[];for(const H of C)G.push([H[0]+A,H[1]]);z.push(G)}}B?v.rings=z:v.paths=z;return v}function w(v,A,z){const B=v.length;1<B&&v[B-1][0]===A&&v[B-2][0]===A?v[B-1][1]=z:v.push([A,z])}class u{constructor(v,A){this.extent=v;this.frameIds=A}}const y=q.create();class x{constructor(){this._linesIn=[];this._linesOut=[]}cut(v,A){this._xCut=A;if(v.rings)this._closed=!0,A=v.rings,this._minPts=4;else if(v.paths)this._closed=
!1,A=v.paths,this._minPts=2;else return null;for(var z of A)if(z&&!(z.length<this._minPts)){A=!0;for(const B of z)A?(this.moveTo(B),A=!1):this.lineTo(B);this._closed&&this.close()}this._pushLineIn();this._pushLineOut();A=[];for(const B of this._linesIn)B&&B.length>=this._minPts&&A.push(B);z=-2*this._xCut;for(const B of this._linesOut)if(B&&B.length>=this._minPts){for(const D of B)D[0]+=z;A.push(B)}this._closed?v.rings=A:v.paths=A;return v}moveTo(v){this._pushLineIn();this._pushLineOut();this._prevSide=
this._side(v[0]);this._moveTo(v[0],v[1],this._prevSide);this._firstPt=this._prevPt=v}lineTo(v){const A=this._side(v[0]);if(-1===A*this._prevSide){const z=this._intersect(this._prevPt,v);this._lineTo(this._xCut,z,0);this._prevSide=0}this._lineTo(v[0],v[1],A);this._prevSide=A;this._prevPt=v}close(){const v=this._firstPt,A=this._prevPt;v[0]===A[0]&&v[1]===A[1]||this.lineTo(v);this._checkClosingPt(this._lineIn);this._checkClosingPt(this._lineOut)}_moveTo(v,A,z){this._closed?(this._lineIn.push([0>=z?v:
this._xCut,A]),this._lineOut.push([0<=z?v:this._xCut,A])):(0>=z&&this._lineIn.push([v,A]),0<=z&&this._lineOut.push([v,A]))}_lineTo(v,A,z){this._closed?(w(this._lineIn,0>=z?v:this._xCut,A),w(this._lineOut,0<=z?v:this._xCut,A)):0>z?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([v,A])):0<z?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([v,A])):0>this._prevSide?(this._lineIn.push([v,A]),this._lineOut.push([v,A])):0<this._prevSide&&(this._lineOut.push([v,A]),this._lineIn.push([v,
A]))}_checkClosingPt(v){const A=v.length;3<A&&v[0][0]===this._xCut&&v[A-2][0]===this._xCut&&v[1][0]===this._xCut&&(v[0][1]=v[A-2][1],v.pop())}_side(v){return v<this._xCut?-1:v>this._xCut?1:0}_intersect(v,A){return v[1]+(this._xCut-v[0])/(A[0]-v[0])*(A[1]-v[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn);this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut);this._lineOut=[]}}e.CutVertical=
x;e.normalizeCentralMeridianForDisplay=function(v){return a(v,!1)};e.normalizeCentralMeridianSync=function(v){return a(v,!0)};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/graphics/GraphicUpdateMessage":function(){define(["exports"],function(e){class g{constructor(q,h,m){this.added=q;this.updated=h;this.removed=m}hasAnyUpdate(){return!!(this.added.length||this.updated.length||this.removed.length)}}e.GraphicUpdateMessage=g;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/layers/support/FeatureCommandQueue":function(){define(["../../../../core/promiseUtils","./UpdateTracking2D","../../../support/QueueProcessor"],function(e,g,q){class h{constructor(m){this.updateTracking=new g.UpdateTracking2D({debugName:"FeatureCommandQueue"});this._queueProcessor=new q.QueueProcessor({concurrency:1,process:m.process})}destroy(){this.updateTracking.destroy();this._queueProcessor.destroy();this.clear()}clear(){this._queueProcessor.clear()}async push(m){return e.ignoreAbortErrors(this.updateTracking.addPromise(this._doPush(m)))}async _doPush(m){const l=
this._queueProcessor,d=l.last();switch(m.type){case "update":case "highlight":if(d?.type===m.type)break;return l.push(m);case "edit-by-id":case "edit-by-feature":return l.push(m)}}}return h})},"esri/views/2d/layers/support/UpdateTracking2D":function(){define("exports ../../../../chunks/tslib.es6 ../../../../core/Accessor ../../../../core/has ../../../../core/ReactiveMap ../../../../core/reactiveUtils ../../../../core/accessorSupport/decorators/property ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../core/support/UpdatingHandles".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){e.UpdateTracking2D=class extends q{constructor(c){super(c);this.debugName="";this._updatingHandles=new n.UpdatingHandles;this._idToUpdatingState=new m}get updating(){const c=this._updatingHandles.updating||Array.from(this._idToUpdatingState.values()).some(r=>r);if(h("esri-2d-log-updating")){const r=Array.from(this._idToUpdatingState.entries()).map(([k,p])=>`-> ${k}: ${p}`).join("\n");console.log(`${this.debugName}: Updating: ${c}\n-> Handles: ${this._updatingHandles.updating}\n${r}`)}return c}addUpdateTracking(c,
r){const k=l.watch(()=>r.updating,p=>this._idToUpdatingState.set(c,p),{sync:!0});this.addHandles(k)}addPromise(c){return this._updatingHandles.addPromise(c)}};g.__decorate([d.property({constructOnly:!0})],e.UpdateTracking2D.prototype,"debugName",void 0);g.__decorate([d.property({readOnly:!0})],e.UpdateTracking2D.prototype,"updating",null);e.UpdateTracking2D=g.__decorate([f.subclass("esri.views.2d.layers.support.UpdateTracking2D")],e.UpdateTracking2D);Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/layers/graphics/GraphicContainer":function(){define(["../../engine/webgl/enums","./AGraphicContainer","../support/util"],function(e,g,q){class h extends g.AGraphicContainer{renderChildren(m){for(const l of this.children)l.setTransform(m.state);super.renderChildren(m);this.attributeView.update();if(this.children.some(l=>l.hasData)){switch(m.drawPhase){case e.WGLDrawPhase.MAP:this._renderChildren(m,e.FeatureSelection.All);break;case e.WGLDrawPhase.HIGHLIGHT:this.hasHighlight&&this._renderHighlight(m)}this._boundsRenderer&&
this._boundsRenderer.doRender(m)}}_renderHighlight(m){q.renderHighlight(m,!1,l=>{this._renderChildren(l,e.FeatureSelection.Highlight)})}}return h})},"esri/views/2d/layers/graphics/AGraphicContainer":function(){define("exports ../../../../core/maybe ../../engine/AFeatureContainer ../../engine/webgl/enums ../../engine/webgl/shaderGraph/techniques/GraphicInstanceStore ./GraphicBoundsRenderer".split(" "),function(e,g,q,h,m,l){class d extends q.AFeatureContainer{constructor(b){super(b);this._instanceStore=
new m.GraphicInstanceStore;this.checkHighlight=()=>!0}destroy(){super.destroy();this._boundsRenderer=g.destroyMaybe(this._boundsRenderer)}get instanceStore(){return this._instanceStore}enableRenderingBounds(b){this._boundsRenderer=new l(b);this.requestRender()}get hasHighlight(){return this.checkHighlight()}onTileData(b,a){b.onMessage(a);this.contains(b)||this.addChild(b);this.requestRender()}_renderChildren(b,a){b.selection=a;for(const f of this.children)f.visible&&f.getDisplayList(this._instanceStore,
h.FeatureBatchingStrategy.STRICT_ORDER)?.render(b)}}e.AGraphicContainer=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/AFeatureContainer":function(){define(["exports","./webgl/AttributeStoreView","./webgl/TileContainer"],function(e,g,q){class h extends q{constructor(m){super(m);this._statisticsByLevel=new Map;this.attributeView=new g.AttributeStoreView}destroy(){this.children.forEach(m=>m.destroy());this.removeAllChildren();this.attributeView.destroy()}doRender(m){m.context.capabilities.enable("textureFloatLinear");
super.doRender(m)}createRenderParams(m){m=super.createRenderParams(m);m.attributeView=this.attributeView;m.instanceStore=this._instanceStore;m.statisticsByLevel=this._statisticsByLevel;return m}}e.AFeatureContainer=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/AttributeStoreView":function(){define("exports ../../../../core/Error ../../../../core/has ../../../../core/Logger ./definitions ./DisplayId ./Utils ../../../webgl/enums ../../../webgl/FramebufferObject ../../../webgl/Texture ../../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){class c{constructor(k,p,t){this._lastTexture=this._texture=null;this._fbos={};this.texelSize=4;const {buffer:w,pixelType:u,textureOnly:y}=k;k=d.getPixelArrayCtor(u);this.blockIndex=t;this.pixelType=u;this.size=p;this.textureOnly=y;y||(this.data=new k(w));this._resetRange()}destroy(){this._texture?.dispose();for(const k in this._fbos){const p=this._fbos[k];p&&("0"===k&&p.detachColorTexture(),p.dispose());this._fbos[k]=null}this._texture=null}get _textureDesc(){const k=
new n.TextureDescriptor;k.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;k.samplingMode=b.TextureSamplingMode.NEAREST;k.dataType=this.pixelType;k.width=this.size;k.height=this.size;return k}setData(k,p,t){k=l.getDisplayIdTexel(k);const w=this.data;p=k*this.texelSize+p;!w||p>=w.length||(w[p]=t,this.dirtyStart=Math.min(this.dirtyStart,k),this.dirtyEnd=Math.max(this.dirtyEnd,k))}getData(k,p){if(null==this.data)return null;k=l.getDisplayIdTexel(k)*this.texelSize+p;return!this.data||k>=this.data.length?null:
this.data[k]}getTexture(k){return this._texture??this._initTexture(k)}getFBO(k,p=0){if(!this._fbos[p]){const t=0===p?this.getTexture(k):this._textureDesc;this._fbos[p]=new a.FramebufferObject(k,t)}return this._fbos[p]}get hasDirty(){return this.dirtyEnd>=this.dirtyStart}updateTexture(k,p){try{const D=this.dirtyStart,F=this.dirtyEnd;if(this.hasDirty){q("esri-2d-update-debug")&&console.debug(`Version[${p}] AttributeStoreView.updateTexture`,{start:D,end:F,firstBytes:new Uint8Array(this.data.buffer.slice(0,
16)),block:this});this._resetRange();var t=this.data.buffer,w=this.getTexture(k),u=(D-D%this.size)/this.size,y=(F-F%this.size)/this.size,x=u*this.size*4,v=4*(this.size+y*this.size)-x,A=d.getPixelArrayCtor(this.pixelType),z=new A(t,x*A.BYTES_PER_ELEMENT,v),B=this.size;k=y-u+1;k>this.size?h.getLogger("esri.views.2d.engine.webgl.AttributeStoreView").error(new g("mapview-webgl","Out-of-bounds index when updating AttributeData")):w.updateData(0,0,u,B,k,z)}}catch(D){}}update(k){const {data:p,start:t,end:w}=
k;if(null!=p&&null!=this.data){const u=this.data,y=t*this.texelSize;for(let x=0;x<p.length;x++)k.layout&1<<x%this.texelSize&&(u[y+x]=p[x])}this.dirtyStart=Math.min(this.dirtyStart,t);this.dirtyEnd=Math.max(this.dirtyEnd,w)}resize(k,p){const t=this.size;this.size=p;this.textureOnly?t!==this.size&&(this._lastTexture=this._texture,this._texture=null):(p=d.getPixelArrayCtor(this.pixelType),this.destroy(),this.data=new p(k.buffer))}_resetRange(){this.dirtyStart=2147483647;this.dirtyEnd=0}_initTexture(k){const p=
new f.Texture(k,this._textureDesc,this.data??void 0);if(null!=this._lastTexture&&this._fbos[0]){const u=this._lastTexture.descriptor.width,y=this._lastTexture.descriptor.height,x=this._lastTexture.descriptor.dataType,v=this._lastTexture.descriptor.pixelFormat,A=this.getFBO(k);var t=d.getPixelBytes(x),w=d.getPixelArrayCtor(x);t=new ArrayBuffer(u*y*t*this.texelSize);w=new w(t);t=k.getBoundFramebufferObject();const {x:z,y:B,width:D,height:F}=k.getViewport();k.bindFramebuffer(A);A.readPixels(0,0,u,y,
v,x,w);p.updateData(0,0,0,2*u,y/2,w);k.setViewport(z,B,D,F);k.bindFramebuffer(t)}this.destroy();return this._texture=p}}class r{constructor(){this.size=0;this._pendingAttributeUpdates=[];this._epoch=this._version=0;this._locked=!1}_initialize(k){if(!k)throw Error("InternalError: initArgs must be defined");const p=k.blockDescriptors;this.size=k.blockSize;q("esri-2d-update-debug")&&console.debug("AttributeStoreView.initialize",{message:k});if(null==this._data)this._data=p.map((t,w)=>null!=t?new c(t,
this.size,w):null);else for(k=0;k<this._data.length;k++){const t=this._data[k],w=p[k];null!=w&&(null==t?this._data[k]=new c(w,this.size,k):t.resize(w,this.size))}}destroy(){for(const k of this._data??[])k?.destroy();this._defaultTexture?.dispose();this._defaultTexture=null;this._pendingAttributeUpdates=[]}isEmpty(){return null==this._data}getBlock(k){return null==this._data?null:this._data[k]}setLabelMinZoom(k,p){this.setData(k,0,1,p)}getLabelMinZoom(k){return this.getData(k,0,1,255)}getFilterFlags(k){return this.getData(k,
0,0,0)}getVVSize(k){return this.getData(k,m.AttributeDataType.VV,0,0)}getData(k,p,t,w){if(!this._data)return 0;p=this._data[p];if(null==p)return 0;k=p.getData(k,t);return null!=k?k:w}setData(k,p,t,w){this._data[p].setData(k,t,w)}lockTextureUploads(){this._locked=!0}unlockTextureUploads(){this._locked=!1;this.update()}requestUpdate(k){this._version=k.version;this._pendingAttributeUpdates.push(k);q("esri-2d-update-debug")&&console.debug(`Version[${this._version}] AttributeStoreView.requestUpdate`,{message:k})}get currentEpoch(){return this._epoch}update(){if(!this._locked){var k=
this._pendingAttributeUpdates;this._pendingAttributeUpdates=[];for(const p of k){const {blockData:t,initArgs:w,sendUpdateEpoch:u,version:y}=p;q("esri-2d-update-debug")&&console.debug(`Version[${this._version}] Epoch[${u}] AttributeStoreView.applyUpdate`);this._version=y;this._epoch=u;null!=w&&this._initialize(w);k=this._data;for(let x=0;x<t.length;x++){const v=t[x],A=k[x];null!=A&&null!=v&&(q("esri-2d-update-debug")&&console.debug(`Version[${this._version}] CpuBlock[${x}] AttributeStoreView.update`,
{block:v}),A.update(v))}}}}getUniforms(k){return{filterFlags:{texture:this._getTexture(k,m.AttributeDataType.FilterFlags),unit:m.filterFlagsUnit},animation:{texture:this._getTexture(k,m.AttributeDataType.Animation),unit:m.animationUnit},gpgpu:{texture:this._getTexture(k,m.AttributeDataType.GPGPU),unit:m.gpgpuUnit},visualVariableData:{texture:this._getTexture(k,m.AttributeDataType.VV),unit:m.visualVariableUnit},dataDriven0:{texture:this._getTexture(k,m.AttributeDataType.DD0),unit:m.dataDrivenUnit0},
dataDriven1:{texture:this._getTexture(k,m.AttributeDataType.DD1),unit:m.dataDrivenUnit1},dataDriven2:{texture:this._getTexture(k,m.AttributeDataType.DD2),unit:m.dataDrivenUnit2},size:this.size}}_getTexture(k,p){p=this._data?.[p];if(!p)return this._getDefaultTexture(k);p.updateTexture(k,this._version);return p.getTexture(k)}_getDefaultTexture(k){if(null==this._defaultTexture){const p=new n.TextureDescriptor;p.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;p.samplingMode=b.TextureSamplingMode.NEAREST;p.width=
1;p.height=1;this._defaultTexture=new f.Texture(k,p,new Uint8Array(4))}return this._defaultTexture}}e.AttributeStoreView=r;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/TileContainer":function(){define(["../../../../core/has","./enums","./WGLContainer","./brushes/WGLBrushStencil","./brushes/WGLBrushTileDebugInfo"],function(e,g,q,h,m){const l=(b,a)=>0!==b.key.level-a.key.level?b.key.level-a.key.level:0!==b.key.row-a.key.row?b.key.row-a.key.row:b.key.col-
a.key.col;class d extends q{constructor(b){super();this._tileInfoView=b}renderChildren(b){this.sortChildren(l);this.setStencilReference(b);super.renderChildren(b)}createRenderParams(b){const {state:a}=b;b=super.createRenderParams(b);b.requiredLevel=this._tileInfoView.getClosestInfoForScale(a.scale).level;b.displayLevel=this._tileInfoView.tileInfo.scaleToZoom(a.scale);return b}prepareRenderPasses(b){const a=super.prepareRenderPasses(b);a.push(b.registerRenderPass({name:"stencil",brushes:[h],drawPhase:g.WGLDrawPhase.DEBUG|
g.WGLDrawPhase.MAP|g.WGLDrawPhase.HIGHLIGHT|g.WGLDrawPhase.LABEL,target:()=>this.getStencilTarget()}));e("esri-tiles-debug")&&a.push(b.registerRenderPass({name:"tileInfo",brushes:[m],drawPhase:g.WGLDrawPhase.DEBUG,target:()=>this.children}));return a}getStencilTarget(){return this.children}setStencilReference(b){b=1;for(const a of this.children)a.stencilRef=b++}}return d})},"esri/views/2d/engine/webgl/WGLContainer":function(){define(["../../../../core/has","../brushes","../Container","./ClippingInfo",
"./enums"],function(e,g,q,h,m){class l extends q.Container{set clips(d){super.clips=d;this._updateClippingInfo(d)}renderChildren(d){d.painter.setPipelineState(null);null==this._renderPasses&&(this._renderPasses=this.prepareRenderPasses(d.painter));for(const b of this._renderPasses)try{b.render(d)}catch(a){}}prepareRenderPasses(d){return[d.registerRenderPass({name:"clip",brushes:[g.brushes.clip],target:()=>this._clippingInfos,drawPhase:m.WGLDrawPhase.MAP|m.WGLDrawPhase.LABEL|m.WGLDrawPhase.LABEL_ALPHA|
m.WGLDrawPhase.DEBUG|m.WGLDrawPhase.HIGHLIGHT})]}_updateClippingInfo(d){null!=this._clippingInfos&&(this._clippingInfos.forEach(b=>b.destroy()),this._clippingInfos=null);null!=d&&d.length&&(this._clippingInfos=d.items.map(b=>h.fromClipArea(this.stage,b)));this.requestRender()}}return l})},"esri/views/2d/engine/webgl/ClippingInfo":function(){define("../../../../core/Error ../../../../core/Logger ../../../../core/reactiveUtils ../../../../core/libs/gl-matrix-2/factories/mat3f32 ../DisplayObject ./Mesh2D ../../support/clippingUtils ../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b){class a extends m.DisplayObject{constructor(f,n){super();this._clip=n;this._cache={};this.stage=f;this._handle=q.watch(()=>n.version,()=>this._invalidate());this.ready()}static fromClipArea(f,n){return new a(f,n)}_destroyGL(){null!=this._cache.mesh&&(this._cache.mesh.destroy(),this._cache.mesh=null);null!=this._cache.vao&&(this._cache.vao.dispose(),this._cache.vao=null)}destroy(){this._destroyGL();this._handle.remove()}getVAO(f,n,c,r){const [k,p]=n.size;if("geometry"===this._clip.type||
this._lastWidth!==k||this._lastHeight!==p)this._lastWidth=k,this._lastHeight=p,this._destroyGL();if(null==this._cache.vao){n=this._createMesh(n,this._clip);const t=n.getIndexBuffer(f),w=n.getVertexBuffers(f);this._cache.mesh=n;this._cache.vao=new b.VertexArrayObject(f,c,r,w,t)}return this._cache.vao}_createTransforms(){return{displayViewScreenMat3:h.create()}}_invalidate(){this._destroyGL();this.requestRender()}_createMesh(f,n){switch(n.type){case "rect":return l.fromScreenExtent(d.createScreenExtent(n,
f.size[0],f.size[1]));case "path":return l.fromPath(n);case "geometry":return l.fromGeometry(f,n);default:return g.getLogger("esri.views.2d.engine.webgl.ClippingInfo").error(new e("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),l.fromScreenExtent({xmin:0,ymin:0,xmax:1,ymax:1})}}}return a})},"esri/views/2d/engine/webgl/Mesh2D":function(){define("../../../../core/Error ../../../../core/Logger ../../../../chunks/earcut ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../layers/graphics/featureConversionUtils ../../../../layers/graphics/OptimizedGeometry ./number ../../../webgl/BufferObject ../../../webgl/enums".split(" "),
function(e,g,q,h,m,l,d,b,a,f){const n=({coords:r,lengths:k},p)=>{const t=[];for(let y=0,x=0;y<k.length;x+=k[y],y+=1){const v=x;for(var w=[];y<k.length-1;y+=1,x+=k[y]){var u=x+k[y];let A=0;for(let z=1;z<k[y+1];z++)A+=(r[2*(u+z)]-r[2*(u+z-1)])*(r[2*(u+z)+1]+r[2*(u+z-1)+1]);if(!(p?0<A:0>A))break;w.push(x+k[y]-v)}u=r.slice(2*v,2*(x+k[y]));w=q.earcut(u,w,2);for(const A of w)t.push(A+v)}return t};class c{constructor(r,k,p,t=!1){this._cache={};this.vertices=r;this.indices=k;this.primitiveType=p;this.isMapSpace=
t}static fromPath(r){var k=l.convertFromNestedArray(new d,r.path,!1,!1);r=k.coords;k=new Uint32Array(n(k,!0));const p=new Uint32Array(r.length/2);for(let t=0;t<p.length;t++)p[t]=b.i1616to32(Math.floor(r[2*t]),Math.floor(r[2*t+1]));return new c({geometry:p},k,f.PrimitiveType.TRIANGLES)}static fromGeometry(r,k){const p=k.geometry?.type;switch(p){case "polygon":return c.fromPolygon(r,k.geometry);case "extent":return c.fromMapExtent(r,k.geometry);default:return g.getLogger("esri.views.2d.engine.webgl.Mesh2D").error(new e("mapview-bad-type",
`Unable to create a mesh from type ${p}`,k)),c.fromScreenExtent({xmin:0,ymin:0,xmax:1,ymax:1})}}static fromPolygon(r,k){var p=l.convertFromPolygon(new d,k,!1,!1);k=p.coords;p=new Uint32Array(n(p,!1));const t=new Uint32Array(k.length/2),w=m.create(),u=m.create();for(let y=0;y<t.length;y++)h.set(w,k[2*y],k[2*y+1]),r.toScreen(u,w),t[y]=b.i1616to32(Math.floor(u[0]),Math.floor(u[1]));return new c({geometry:t},p,f.PrimitiveType.TRIANGLES,!0)}static fromScreenExtent({xmin:r,xmax:k,ymin:p,ymax:t}){r={geometry:new Uint32Array([b.i1616to32(r,
p),b.i1616to32(k,p),b.i1616to32(r,t),b.i1616to32(r,t),b.i1616to32(k,p),b.i1616to32(k,t)])};k=new Uint32Array([0,1,2,3,4,5]);return new c(r,k,f.PrimitiveType.TRIANGLES)}static fromMapExtent(r,k){const [p,t]=r.toScreen([0,0],[k.xmin,k.ymin]),[w,u]=r.toScreen([0,0],[k.xmax,k.ymax]);r={geometry:new Uint32Array([b.i1616to32(p,t),b.i1616to32(w,t),b.i1616to32(p,u),b.i1616to32(p,u),b.i1616to32(w,t),b.i1616to32(w,u)])};k=new Uint32Array([0,1,2,3,4,5]);return new c(r,k,f.PrimitiveType.TRIANGLES)}destroy(){null!=
this._cache.indexBuffer&&this._cache.indexBuffer.dispose();for(const r in this._cache.vertexBuffers)null!=this._cache.vertexBuffers[r]&&this._cache.vertexBuffers[r].dispose()}get elementType(){a:switch(this.indices.BYTES_PER_ELEMENT){case 1:var r=f.DataType.UNSIGNED_BYTE;break a;case 2:r=f.DataType.UNSIGNED_SHORT;break a;case 4:r=f.DataType.UNSIGNED_INT;break a;default:throw new e("Cannot get DataType of array");}return r}getIndexBuffer(r,k=f.Usage.STATIC_DRAW){this._cache.indexBuffer||(this._cache.indexBuffer=
a.BufferObject.createIndex(r,k,this.indices));return this._cache.indexBuffer}getVertexBuffers(r,k=f.Usage.STATIC_DRAW){this._cache.vertexBuffers||(this._cache.vertexBuffers=Object.keys(this.vertices).reduce((p,t)=>({...p,[t]:a.BufferObject.createVertex(r,k,this.vertices[t])}),{}));return this._cache.vertexBuffers}}return c})},"esri/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore":function(){define(["exports","./TechniqueInstance","./TechniqueRegistry","./mesh/instanceIdUtils"],function(e,
g,q,h){function m(a,f){return new g.FeatureTechniqueInstance(h.castInstanceId(l++),a,f)}let l=0;const d={visualVariableColor:null,visualVariableOpacity:null,visualVariableSizeMinMaxValue:null,visualVariableSizeScaleStops:null,visualVariableSizeStops:null,visualVariableSizeUnitValue:null,visualVariableRotation:null,visualVariableSizeOutlineScaleStops:null};class b{constructor(){this.instances={fill:m(q.Techniques.fill,{uniforms:d,optionalAttributes:{zoomRange:!0}}),marker:m(q.Techniques.marker,{uniforms:d,
optionalAttributes:{zoomRange:!0}}),line:m(q.Techniques.line,{uniforms:d,optionalAttributes:{zoomRange:!0}}),text:m(q.Techniques.text,{uniforms:d,optionalAttributes:{zoomRange:!0,referenceSymbol:!1,clipAngle:!1}}),complexFill:m(q.Techniques.complexFill,{uniforms:d,optionalAttributes:{zoomRange:!0}}),texturedLine:m(q.Techniques.texturedLine,{uniforms:d,optionalAttributes:{zoomRange:!0}})};this._instancesById=Object.values(this.instances).reduce((a,f)=>{a.set(f.instanceId,f);return a},new Map)}getInstance(a){return this._instancesById.get(a)}}
e.GraphicInstanceStore=b;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/TechniqueInstance":function(){define(["exports","./mesh/instanceIdUtils"],function(e,g){class q{constructor(h,m,l){this._instanceId=h;this.techniqueRef=m;this._input=l}get instanceId(){return g.castStrictInstanceId(this._instanceId)}createMeshInfo(h){return{id:g.castStrictInstanceId(this._instanceId),techniqueType:this.techniqueRef.type,inputParams:h,optionalAttributes:this._input.optionalAttributes}}getInput(){return this._input}setInput(h){this._input=
h}}e.FeatureTechniqueInstance=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/shaderGraph/techniques/mesh/instanceIdUtils":function(){define(["exports"],function(e){e.castInstanceId=function(g){return g};e.castStrictInstanceId=function(g){return g};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/graphics/GraphicBoundsRenderer":function(){define("../../../../core/maybe ../../../../core/libs/gl-matrix-2/math/mat3 ../../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../../core/libs/gl-matrix-2/factories/vec2f32 ../../../../core/libs/gl-matrix-2/factories/vec3f32 ../../../../geometry/support/normalizeUtils ../../engine/DisplayObject ../../engine/webgl/Utils ../../../webgl/BufferObject ../../../webgl/enums ../../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n){const c=Math.PI/180;class r extends d.DisplayObject{constructor(p){super();this._indexBuffer=this._vertexBuffer=this._vao=this._program=null;this._dvsMat3=q.create();this._localOrigin={x:0,y:0};this._getBounds=p}destroy(){this._vao&&(this._vao.dispose(),this._indexBuffer=this._vertexBuffer=this._vao=null);this._program=e.disposeMaybe(this._program)}doRender(p){const {context:t}=p,w=this._getBounds();1>w.length||(this._createShaderProgram(t),this._updateMatricesAndLocalOrigin(p),
this._updateBufferData(t,w),t.setBlendingEnabled(!0),t.setDepthTestEnabled(!1),t.setStencilWriteMask(0),t.setStencilTestEnabled(!1),t.setBlendFunction(f.BlendFactor.ONE,f.BlendFactor.ONE_MINUS_SRC_ALPHA),t.setColorMask(!0,!0,!0,!0),p=this._program,t.bindVAO(this._vao),t.useProgram(p),p.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),t.gl.lineWidth(1),t.drawElements(f.PrimitiveType.LINES,8*w.length,f.DataType.UNSIGNED_INT,0),t.bindVAO())}_createTransforms(){return{displayViewScreenMat3:q.create()}}_createShaderProgram(p){this._program||
(this._program=p.programCache.acquire("precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos \x3d u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position \x3d vec4(pos.xy, 0.0, 1.0);\n }","precision mediump float;\n void main() {\n gl_FragColor \x3d vec4(0.75, 0.0, 0.0, 0.75);\n }",k().attributes))}_updateMatricesAndLocalOrigin(p){var {state:t}=p;const {displayMat3:w,size:u,resolution:y,
pixelRatio:x,rotation:v,viewpoint:A}=t;p=c*v;const {x:z,y:B}=A.targetGeometry;t=l.normalizeMapX(z,t.spatialReference);this._localOrigin.x=t;this._localOrigin.y=B;t=x*u[0];const D=x*u[1],F=y*t,E=y*D,C=g.identity(this._dvsMat3);g.multiply(C,C,w);g.translate(C,C,h.fromValues(t/2,D/2));g.scale(C,C,m.fromValues(u[0]/F,-D/E,1));g.rotate(C,C,-p)}_updateBufferData(p,t){const {x:w,y:u}=this._localOrigin,y=new Float32Array(8*t.length),x=new Uint32Array(8*t.length);let v=0,A=0;for(const z of t)z&&(y[2*v]=z[0]-
w,y[2*v+1]=z[1]-u,y[2*v+2]=z[0]-w,y[2*v+3]=z[3]-u,y[2*v+4]=z[2]-w,y[2*v+5]=z[3]-u,y[2*v+6]=z[2]-w,y[2*v+7]=z[1]-u,x[A]=v+0,x[A+1]=v+3,x[A+2]=v+3,x[A+3]=v+2,x[A+4]=v+2,x[A+5]=v+1,x[A+6]=v+1,x[A+7]=v+0,v+=4,A+=8);this._vertexBuffer?this._vertexBuffer.setData(y.buffer):this._vertexBuffer=a.BufferObject.createVertex(p,f.Usage.DYNAMIC_DRAW,y.buffer);this._indexBuffer?this._indexBuffer.setData(x):this._indexBuffer=a.BufferObject.createIndex(p,f.Usage.DYNAMIC_DRAW,x);this._vao||(t=k(),this._vao=new n.VertexArrayObject(p,
t.attributes,t.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer))}}const k=()=>b.createProgramDescriptor("bounds",{geometry:[{location:0,name:"a_position",count:2,type:f.DataType.FLOAT}]});return r})},"esri/views/2d/navigation/MapViewNavigation":function(){define("../../../chunks/tslib.es6 ../../../Viewpoint ../../../core/Accessor ../../../core/has ../../../core/maybe ../../../core/time ../../../core/accessorSupport/decorators/property ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/Point ../viewpointUtils ./ZoomBox ./actions/Pan ./actions/Pinch ./actions/Rotate".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t){const w=new g({targetGeometry:new n}),u=[0,0];g=class extends q{constructor(y){super(y);this.animationManager=this._lastEventTimestamp=this._endTimer=null;this.interacting=!1}initialize(){this.pan=new k({navigation:this});this.rotate=new t({navigation:this});this.pinch=new p({navigation:this});this.zoomBox=new r({view:this.view,navigation:this})}destroy(){this.pan=m.destroyMaybe(this.pan);this.rotate=m.destroyMaybe(this.rotate);this.pinch=m.destroyMaybe(this.pinch);
this.zoomBox=m.destroyMaybe(this.zoomBox);this.animationManager=null}begin(){this.stop();this._set("interacting",!0)}end(){this._lastEventTimestamp=performance.now();this._startTimer(250)}async zoom(y,x=this._getDefaultAnchor()){this.begin();if(this.view.constraints.snapToZoom&&this.view.constraints.effectiveLODs)return 1>y?this.zoomIn(x):this.zoomOut(x);this.setViewpoint(x,y,0,[0,0])}async zoomIn(y){var x=this.view;x=x.constraints.snapToNextScale(x.scale);return this._zoomToScale(x,y)}async zoomOut(y){var x=
this.view;x=x.constraints.snapToPreviousScale(x.scale);return this._zoomToScale(x,y)}setViewpoint(y,x,v,A){this.begin();this.view.stateManager.state.viewpoint=this._scaleRotateTranslateViewpoint(this.view.viewpoint,y,x,v,A);this.end()}setViewpointImmediate(y,x=0,v=[0,0],A=this._getDefaultAnchor()){this.view.stateManager.state.viewpoint=this._scaleRotateTranslateViewpoint(this.view.viewpoint,A,y,x,v)}continuousRotateClockwise(){const y=this.view.viewpoint;this.animationManager?.animateContinuous(y,
x=>{c.rotateBy(x,x,-1)})}continuousRotateCounterclockwise(){const y=this.view.viewpoint;this.animationManager?.animateContinuous(y,x=>{c.rotateBy(x,x,1)})}resetRotation(){this.view.constraints.rotationEnabled&&(this.view.rotation=0)}continuousPanLeft(){this._continuousPan([-10,0])}continuousPanRight(){this._continuousPan([10,0])}continuousPanUp(){this._continuousPan([0,10])}continuousPanDown(){this._continuousPan([0,-10])}continuousPanVector({x:y,y:x}){this._continuousPan([10*y,10*x])}stop(){this.pan.stopMomentumNavigation();
this.animationManager?.stop();this.end();null!==this._endTimer&&(clearTimeout(this._endTimer),this._endTimer=null,this._set("interacting",!1))}_continuousPan(y){const x=this.view.viewpoint;this.animationManager?.animateContinuous(x,v=>{c.translateBy(v,v,y);this.view.constraints.constrainByGeometry(v)})}_startTimer(y){return null!==this._endTimer?this._endTimer:this._endTimer=setTimeout(()=>{this._endTimer=null;const x=performance.now()-(this._lastEventTimestamp??0);250>x?this._endTimer=this._startTimer(x):
this._set("interacting",!1)},y)}_getDefaultAnchor(){const {size:y,padding:{left:x,right:v,top:A,bottom:z}}=this.view;u[0]=.5*(y[0]-v+x);u[1]=.5*(y[1]-z+A);return u}async _zoomToScale(y,x=this._getDefaultAnchor()){const {view:v}=this,{constraints:A,scale:z,viewpoint:B,size:D,padding:F}=v,E=A.canZoomInTo(y),C=A.canZoomOutTo(y);if(!(y<z&&!E||y>z&&!C))return c.padAndScaleAndRotateBy(w,B,y/z,0,x,D,F),A.constrainByGeometry(w),v.goTo(w,{animate:!0,animationMode:"always",duration:l.Milliseconds(h("mapview-essential-goto-duration")),
pickClosestTarget:!1})}_scaleRotateTranslateViewpoint(y,x,v,A,z){var {view:B}=this;const {size:D,padding:F,constraints:E,scale:C,viewpoint:G}=B;var H=C*v;B=E.canZoomInTo(H);H=E.canZoomOutTo(H);if(1>v&&!B||1<v&&!H)v=1;c.translateBy(G,G,z);c.padAndScaleAndRotateBy(y,G,v,A,x,D,F);return E.constrainByGeometry(y)}};e.__decorate([d.property()],g.prototype,"animationManager",void 0);e.__decorate([d.property({type:Boolean,readOnly:!0})],g.prototype,"interacting",void 0);e.__decorate([d.property()],g.prototype,
"pan",void 0);e.__decorate([d.property()],g.prototype,"pinch",void 0);e.__decorate([d.property()],g.prototype,"rotate",void 0);e.__decorate([d.property()],g.prototype,"view",void 0);e.__decorate([d.property()],g.prototype,"zoomBox",void 0);return g=e.__decorate([f.subclass("esri.views.2d.navigation.MapViewNavigation")],g)})},"esri/views/2d/navigation/ZoomBox":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/has ../../../core/screenUtils ../../../core/time ../../../core/accessorSupport/decorators/property ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../input/InputManager".split(" "),
function(e,g,q,h,m,l,d,b,a,f){g=class extends g{constructor(n){super(n);this._boxShape=this._backgroundShape=this._overlay=this._container=null;this._box={x:0,y:0,width:0,height:0};this._rafId=null;this._redraw=this._redraw.bind(this)}destroy(){this.view=null}set view(n){this.removeAllHandles();this._destroyOverlay();this._set("view",n);n&&this.addHandles([n.on("drag",["Shift"],c=>this._handleDrag(c,1),f.ViewEventPriorities.INTERNAL),n.on("drag",["Shift","Control"],c=>this._handleDrag(c,-1),f.ViewEventPriorities.INTERNAL)])}_start(){this._createContainer();
this._createOverlay();this.navigation.begin()}_update(n,c,r,k){this._box.x=n;this._box.y=c;this._box.width=r;this._box.height=k;this._rafId||(this._rafId=requestAnimationFrame(this._redraw))}_end(n,c,r,k,p){const t=this.view;n=t.toMap(h.createScreenPoint(n+.5*r,c+.5*k));r=Math.max(r/t.width,k/t.height);-1===p&&(r=1/r);this._destroyOverlay();this.navigation.end();t.goTo({center:n,scale:t.scale*r},{animationMode:"always",duration:m.Milliseconds(q("mapview-essential-goto-duration"))})}_updateBox(n,c,
r,k){const p=this._boxShape;p.setAttributeNS(null,"x",""+n);p.setAttributeNS(null,"y",""+c);p.setAttributeNS(null,"width",""+r);p.setAttributeNS(null,"height",""+k);p.setAttributeNS(null,"class","esri-zoom-box__outline")}_updateBackground(n,c,r,k){this._backgroundShape.setAttributeNS(null,"d",this._toSVGPath(n,c,r,k,this.view.width,this.view.height))}_createContainer(){const n=document.createElement("div");n.className="esri-zoom-box__container";this.view.root.appendChild(n);this._container=n}_createOverlay(){var n=
this.view.width,c=this.view.height;const r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttributeNS(null,"d","M 0 0 L "+n+" 0 L "+n+" "+c+" L 0 "+c+" Z");r.setAttributeNS(null,"class","esri-zoom-box__overlay-background");n=document.createElementNS("http://www.w3.org/2000/svg","rect");c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");c.setAttributeNS(null,"class","esri-zoom-box__overlay");
c.appendChild(r);c.appendChild(n);this._container.appendChild(c);this._backgroundShape=r;this._boxShape=n;this._overlay=c}_destroyOverlay(){this._container&&this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container=this._backgroundShape=this._boxShape=this._overlay=null}_toSVGPath(n,c,r,k,p,t){r=n+r;k=c+k;return"M 0 0 L "+p+" 0 L "+p+" "+t+" L 0 "+t+" ZM "+n+" "+c+" L "+n+" "+k+" L "+r+" "+k+" L "+r+" "+c+" Z"}_handleDrag(n,c){var r=n.x,k=n.y,p=n.origin.x;
const t=n.origin.y;let w;r>p?(w=p,p=r-p):(w=r,p-=r);k>t?(r=t,k-=t):(r=k,k=t-k);switch(n.action){case "start":this._start();break;case "update":this._update(w,r,p,k);break;case "end":this._end(w,r,p,k,c)}n.stopPropagation()}_redraw(){if(this._rafId&&(this._rafId=null,this._overlay)){var {x:n,y:c,width:r,height:k}=this._box;this._updateBox(n,c,r,k);this._updateBackground(n,c,r,k);this._rafId=requestAnimationFrame(this._redraw)}}};e.__decorate([l.property()],g.prototype,"navigation",void 0);e.__decorate([l.property()],
g.prototype,"view",null);return g=e.__decorate([a.subclass("esri.views.2d.navigation.ZoomBox")],g)})},"esri/views/2d/navigation/actions/Pan":function(){define("../../../../chunks/tslib.es6 ../../../../geometry ../../../../Viewpoint ../../../../core/Accessor ../../../../core/reactiveUtils ../../../../core/screenUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../chunks/vec32 ../../../../core/libs/gl-matrix-2/factories/vec3f64 ../../viewpointUtils ../../../navigation/PanPlanarMomentumEstimator ../../../../geometry/Point".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t){g=class extends h{constructor(w){super(w);this.animationTime=0;this.momentumEstimator=new p.PanPlanarMomentumEstimator(500,6,.92);this.momentum=null;this.tmpMomentum=r.create();this.momentumFinished=!1;this.viewpoint=new q({targetGeometry:new t,scale:0,rotation:0});this._previousDrag=null;m.when(()=>this.momentumFinished,()=>this.navigation.stop())}begin(w,u){this.navigation.begin();this.momentumEstimator.reset();this.addToEstimator(u);this._previousDrag=
u}update(w,u){this.addToEstimator(u);let y=u.center.x,x=u.center.y;const v=this._previousDrag;y=v?v.center.x-y:-y;x=v?x-v.center.y:x;w.viewpoint=k.translateBy(this.viewpoint,w.viewpoint,[y||0,x||0]);this._previousDrag=u}end(w,u){this.addToEstimator(u);this.momentum=w.navigation.effectiveMomentumEnabled?this.momentumEstimator.evaluateMomentum():null;this.animationTime=0;if(this.momentum)this.onAnimationUpdate(w);this._previousDrag=null;this.navigation.end()}addToEstimator(w){var u=w.center.x;const y=
w.center.y,x=l.createScreenPointArray(-u,y);u=r.fromValues(-u,y,0);this.momentumEstimator.add(x,u,.001*w.timestamp)}onAnimationUpdate(w){this.navigation.animationManager?.animateContinuous(w.viewpoint,(u,y)=>{const {momentum:x,animationTime:v,tmpMomentum:A}=this;var z=this.momentumFinished=!x||x.isFinished(v);y*=.001;z||(z=x.valueDelta(v,y),c.scale(A,x.direction,z),k.translateBy(u,u,A),w.constraints.constrainByGeometry(u));this.animationTime+=y})}stopMomentumNavigation(){this.momentum&&(this.momentumEstimator.reset(),
this.momentum=null,this.navigation.stop())}};e.__decorate([d.property()],g.prototype,"momentumFinished",void 0);e.__decorate([d.property()],g.prototype,"viewpoint",void 0);e.__decorate([d.property()],g.prototype,"navigation",void 0);return g=e.__decorate([n.subclass("esri.views.2d.navigation.actions.Pan")],g)})},"esri/views/navigation/PanPlanarMomentumEstimator":function(){define(["exports","../../chunks/vec32","../../core/libs/gl-matrix-2/factories/vec3f64","./FilteredFiniteDifference","./Momentum"],
function(e,g,q,h,m){class l extends m.Momentum{constructor(b,a,f,n,c){super(b,a,f);this._sceneVelocity=n;this.direction=c}value(b){return super.valueFromInitialVelocity(this._sceneVelocity,b)}}class d{constructor(b=300,a=12,f=.84){this._minimumInitialVelocity=b;this._stopVelocity=a;this._friction=f;this.enabled=!0;this._time=new h.FilteredFiniteDifference(.6);this._screen=[new h.FilteredFiniteDifference(.4),new h.FilteredFiniteDifference(.4)];this._scene=[new h.FilteredFiniteDifference(.6),new h.FilteredFiniteDifference(.6),
new h.FilteredFiniteDifference(.6)];this._tmpDirection=q.create()}add(b,a,f){!this.enabled||this._time.hasLastValue()&&.015>this._time.computeDelta(f)||(this._screen[0].update(b[0]),this._screen[1].update(b[1]),this._scene[0].update(a[0]),this._scene[1].update(a[1]),this._scene[2].update(a[2]),this._time.update(f))}reset(){this._screen[0].reset();this._screen[1].reset();this._scene[0].reset();this._scene[1].reset();this._scene[2].reset();this._time.reset()}evaluateMomentum(){if(!this.enabled||!this._screen[0].hasFilteredDelta()||
!this._time.hasFilteredDelta())return null;var b=this._screen[0].filteredDelta,a=this._screen[1].filteredDelta;b=null==b||null==a?0:Math.sqrt(b*b+a*a);a=this._time.filteredDelta;b=null==a||null==b?0:b/a;return Math.abs(b)<this._minimumInitialVelocity?null:this.createMomentum(b,this._stopVelocity,this._friction)}createMomentum(b,a,f){g.set(this._tmpDirection,this._scene[0].filteredDelta??0,this._scene[1].filteredDelta??0,this._scene[2].filteredDelta??0);const n=g.length(this._tmpDirection);0<n&&g.scale(this._tmpDirection,
this._tmpDirection,1/n);const c=this._time.filteredDelta;return new l(b,a,f,null==c?0:n/c,this._tmpDirection)}}e.PanPlanarMomentum=l;e.PanPlanarMomentumEstimator=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/navigation/FilteredFiniteDifference":function(){define(["exports"],function(e){class g{constructor(q){this._gain=q;this.filteredDelta=this.lastValue=void 0}update(q){if(this.hasLastValue()){const h=this.computeDelta(q);this._updateDelta(h)}this.lastValue=q}reset(){this.filteredDelta=
this.lastValue=void 0}hasLastValue(){return void 0!==this.lastValue}hasFilteredDelta(){return void 0!==this.filteredDelta}computeDelta(q){return void 0===this.lastValue?NaN:q-this.lastValue}_updateDelta(q){this.filteredDelta=void 0!==this.filteredDelta?(1-this._gain)*this.filteredDelta+this._gain*q:q}}e.FilteredFiniteDifference=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/navigation/Momentum":function(){define(["exports"],function(e){class g{constructor(q,h,m){this._initialVelocity=
q;this._stopVelocity=h;this._friction=m;this._duration=Math.abs(Math.log(Math.abs(this._initialVelocity)/this._stopVelocity)/Math.log(1-this._friction))}get duration(){return this._duration}isFinished(q){return q>this.duration}get friction(){return this._friction}value(q){return this.valueFromInitialVelocity(this._initialVelocity,q)}valueDelta(q,h){const m=this.value(q);return this.value(q+h)-m}valueFromInitialVelocity(q,h){h=Math.min(h,this.duration);const m=1-this.friction;return q*(m**h-1)/Math.log(m)}}
e.Momentum=g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/navigation/actions/Pinch":function(){define("../../../../chunks/tslib.es6 ../../../../Viewpoint ../../../../core/Accessor ../../../../core/reactiveUtils ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../../../geometry/Point ../../viewpointUtils ../../../navigation/RotationMomentumEstimator ../../../navigation/ZoomMomentumEstimator".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p){q=class extends q{constructor(t){super(t);this._animationTime=0;this._momentumFinished=!1;this._previousRadius=this._previousAngle=0;this._previousCenter=null;this._rotationMomentumEstimator=new k.RotationMomentumEstimator(.6,.15,.95);this._rotationDirection=1;this._startRadius=this._startAngle=0;this._updateTimestamp=null;this._zoomDirection=1;this._zoomMomentumEstimator=new p.ZoomMomentumEstimator;this._zoomOnly=null;this.viewpoint=new g({targetGeometry:new c,
scale:0,rotation:0});this.rotateMomentum=this.zoomMomentum=null;this.addHandles(h.when(()=>this._momentumFinished,()=>this.navigation.stop()))}begin(t,w){this.navigation.begin();this._rotationMomentumEstimator.reset();this._zoomMomentumEstimator.reset();this._zoomOnly=null;this._previousAngle=this._startAngle=w.angle;this._previousRadius=this._startRadius=w.radius;this._previousCenter=w.center;this._updateTimestamp=null;t.constraints.rotationEnabled&&this.addToRotateEstimator(0,w.timestamp);this.addToZoomEstimator(w,
1)}update(t,w){null===this._updateTimestamp&&(this._updateTimestamp=w.timestamp);const u=w.angle,y=w.radius,x=w.center,v=Math.abs(180*(u-this._startAngle)/Math.PI),A=Math.abs(y-this._startRadius),z=this._startRadius/y;if(this._previousRadius&&this._previousCenter){const B=y/this._previousRadius;let D=180*(u-this._previousAngle)/Math.PI;this._rotationDirection=0<=D?1:-1;this._zoomDirection=1<=B?1:-1;t.constraints.rotationEnabled?(null===this._zoomOnly&&200<w.timestamp-this._updateTimestamp&&(this._zoomOnly=
0<A-v),null===this._zoomOnly||this._zoomOnly?D=0:this.addToRotateEstimator(u-this._startAngle,w.timestamp)):D=0;this.addToZoomEstimator(w,z);this.navigation.setViewpoint([x.x,x.y],1/B,D,[this._previousCenter.x-x.x,x.y-this._previousCenter.y])}this._previousAngle=u;this._previousRadius=y;this._previousCenter=x}end(t){this.rotateMomentum=this._rotationMomentumEstimator.evaluateMomentum();this.zoomMomentum=this._zoomMomentumEstimator.evaluateMomentum();this._animationTime=0;if(this.rotateMomentum||this.zoomMomentum)this.onAnimationUpdate(t);
this.navigation.end()}addToRotateEstimator(t,w){this._rotationMomentumEstimator.add(t,.001*w)}addToZoomEstimator(t,w){this._zoomMomentumEstimator.add(w,.001*t.timestamp)}canZoomIn(t){const w=t.scale;t=t.constraints.effectiveMaxScale;return 0===t||w>t}canZoomOut(t){const w=t.scale;t=t.constraints.effectiveMinScale;return 0===t||w<t}onAnimationUpdate(t){this.navigation.animationManager?.animateContinuous(t.viewpoint,(w,u)=>{var y=!this.canZoomIn(t)&&1<this._zoomDirection||!this.canZoomOut(t)&&1>this._zoomDirection,
x=!this.rotateMomentum||this.rotateMomentum.isFinished(this._animationTime);y=y||!this.zoomMomentum||this.zoomMomentum.isFinished(this._animationTime);u*=.001;this._momentumFinished=x&&y;if(!this._momentumFinished){x=this.rotateMomentum?Math.abs(this.rotateMomentum.valueDelta(this._animationTime,u))*this._rotationDirection*180/Math.PI:0;y=this.zoomMomentum?Math.abs(this.zoomMomentum.valueDelta(this._animationTime,u)):1;const A=n.create();var v=n.create();if(this._previousCenter){f.set(A,this._previousCenter.x,
this._previousCenter.y);r.getPaddingScreenTranslation(v,t.size,t.padding);f.add(A,A,v);const {constraints:z,scale:B}=t;v=B*y;1>y&&!z.canZoomInTo(v)?(y=B/z.effectiveMaxScale,this.rotateMomentum=this.zoomMomentum=null):1<y&&!z.canZoomOutTo(v)&&(y=B/z.effectiveMinScale,this.rotateMomentum=this.zoomMomentum=null);r.scaleAndRotateBy(w,t.viewpoint,y,x,A,t.size);t.constraints.constrainByGeometry(w)}}this._animationTime+=u})}stopMomentumNavigation(){if(this.rotateMomentum||this.zoomMomentum)this.rotateMomentum&&
(this._rotationMomentumEstimator.reset(),this.rotateMomentum=null),this.zoomMomentum&&(this._zoomMomentumEstimator.reset(),this.zoomMomentum=null),this.navigation.stop()}};e.__decorate([m.property()],q.prototype,"_momentumFinished",void 0);e.__decorate([m.property()],q.prototype,"viewpoint",void 0);e.__decorate([m.property()],q.prototype,"navigation",void 0);return q=e.__decorate([a.subclass("esri.views.2d.navigation.actions.Pinch")],q)})},"esri/views/navigation/RotationMomentumEstimator":function(){define(["exports",
"./MomentumEstimator"],function(e,g){class q extends g.MomentumEstimator{constructor(h=3,m=.01,l=.95,d=12){super(h,m,l,d)}add(h,m){const l=this.value.lastValue;if(null!=l){for(h-=l;h>Math.PI;)h-=2*Math.PI;for(;h<-Math.PI;)h+=2*Math.PI;h=l+h}super.add(h,m)}}e.RotationMomentumEstimator=q;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/navigation/MomentumEstimator":function(){define(["exports","../../core/mathUtils","./FilteredFiniteDifference","./Momentum"],function(e,g,
q,h){class m{constructor(l=2.5,d=.01,b=.95,a=12){this._minimumInitialVelocity=l;this._stopVelocity=d;this._friction=b;this._maxVelocity=a;this.enabled=!0;this.value=new q.FilteredFiniteDifference(.8);this.time=new q.FilteredFiniteDifference(.3)}add(l,d){if(this.enabled&&null!=d){if(this.time.hasLastValue()){if(.01>this.time.computeDelta(d))return;if(this.value.hasFilteredDelta()){const b=this.value.computeDelta(l);0>this.value.filteredDelta*b&&this.value.reset()}}this.time.update(d);this.value.update(l)}}reset(){this.value.reset();
this.time.reset()}evaluateMomentum(){if(!this.enabled||!this.value.hasFilteredDelta()||!this.time.hasFilteredDelta())return null;let l=this.value.filteredDelta/this.time.filteredDelta;l=g.clamp(l,-this._maxVelocity,this._maxVelocity);return Math.abs(l)<this._minimumInitialVelocity?null:this.createMomentum(l,this._stopVelocity,this._friction)}createMomentum(l,d,b){return new h.Momentum(l,d,b)}}e.MomentumEstimator=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/navigation/ZoomMomentumEstimator":function(){define(["exports",
"./Momentum","./MomentumEstimator"],function(e,g,q){class h extends g.Momentum{constructor(l,d,b){super(l,d,b)}value(l){l=super.value(l);return Math.exp(l)}valueDelta(l,d){const b=super.value(l);l=super.value(l+d);return Math.exp(l-b)}}class m extends q.MomentumEstimator{constructor(l=2.5,d=.01,b=.95,a=12){super(l,d,b,a)}add(l,d){super.add(Math.log(l),d)}createMomentum(l,d,b){return new h(l,d,b)}}e.ZoomMomentum=h;e.ZoomMomentumEstimator=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},
"esri/views/2d/navigation/actions/Rotate":function(){define("../../../../chunks/tslib.es6 ../../../../geometry ../../../../Viewpoint ../../../../core/Accessor ../../../../core/accessorSupport/decorators/property ../../../../core/has ../../../../core/Logger ../../../../core/RandomLCG ../../../../core/accessorSupport/decorators/subclass ../../../../core/libs/gl-matrix-2/math/vec2 ../../../../core/libs/gl-matrix-2/factories/vec2f64 ../../viewpointUtils ../../../../geometry/Point".split(" "),function(e,
g,q,h,m,l,d,b,a,f,n,c,r){const k=n.create(),p=n.create();g=class extends h{constructor(t){super(t);this._previousCenter=n.create();this.viewpoint=new q({targetGeometry:new r,scale:0,rotation:0})}begin(t,w){this.navigation.begin();f.set(this._previousCenter,w.center.x,w.center.y)}update(t,w){const {state:{size:u,padding:y}}=t;f.set(k,w.center.x,w.center.y);c.getAnchor(p,u,y);t.viewpoint=c.rotateBy(this.viewpoint,t.state.paddedViewState.viewpoint,c.angleBetween(p,this._previousCenter,k));f.copy(this._previousCenter,
k)}end(){this.navigation.end()}};e.__decorate([m.property()],g.prototype,"viewpoint",void 0);e.__decorate([m.property()],g.prototype,"navigation",void 0);return g=e.__decorate([a.subclass("esri.views.2d.navigation.actions.Rotate")],g)})},"esri/views/2d/magnifier/MagnifierView2D":function(){define("../../../request ../../../core/asyncUtils ../../../core/Handles ../../../core/mathUtils ../../../core/maybe ../../../core/reactiveUtils ../../../core/urlUtils ../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../core/support/UpdatingHandles ../engine/DisplayObject ../engine/webgl/DefaultVertexAttributeLayouts ../engine/webgl/enums ../engine/webgl/shaders/MagnifierPrograms ../../magnifier/resources ../../webgl/BufferObject ../../webgl/enums ../../webgl/Texture ../../webgl/TextureDescriptor ../../webgl/VertexArrayObject".split(" "),
function(e,g,q,h,m,l,d,b,a,f,n,c,r,k,p,t,w,u,y){class x extends f.DisplayObject{constructor(){super();this._handles=new q;this._resourcePixelRatio=1;this.updatingHandles=new a.UpdatingHandles;this.visible=!1}destroy(){this._handles=m.destroyMaybe(this._handles);this._disposeRenderResources();this._resourcesTask=m.abortMaybe(this._resourcesTask)}get backgroundColor(){return this._backgroundColor}set backgroundColor(v){this._backgroundColor=v;this.requestRender()}get magnifier(){return this._magnifier}set magnifier(v){this._magnifier=
v;this._handles.removeAll();this._handles.add([l.watch(()=>v.version,()=>{this.visible=v.visible&&null!=v.position&&0<v.size;this.requestRender()},l.initial),l.watch(()=>[v.maskUrl,v.overlayUrl],()=>this._reloadResources()),l.watch(()=>v.size,()=>{this._disposeRenderResources();this.requestRender()})])}_createTransforms(){return{displayViewScreenMat3:b.create()}}doRender(v){const A=v.context;if(!this._resourcesTask)this._reloadResources();else if(v.drawPhase===c.WGLDrawPhase.MAP&&this._canRender()){this._updateResources(v);
var z=this._magnifier;if(null!=z.position){var B=v.pixelRatio,D=z.size*B,F=Math.ceil(1/z.factor*D);this._readbackTexture.resize(F,F);var {size:E}=v.state;v=B*E[0];E=B*E[1];var C=.5*F,G=.5*F,H=h.clamp(B*z.position.x,C,v-C-1),K=h.clamp(E-B*z.position.y,G,E-G-1);A.setBlendingEnabled(!0);C=H-C;G=K-G;var J=this._readbackTexture;A.bindTexture(J,0);A.gl.copyTexImage2D(J.descriptor.target,0,J.descriptor.pixelFormat,C,G,F,F,0);F=(F=this.backgroundColor)?[F.a*F.r/255,F.a*F.g/255,F.a*F.b/255,F.a]:[1,1,1,1];
H=-1+(H+z.offset.x*B)/v*2;B=-1+(K-z.offset.y*B)/E*2;v=D/v*2;D=D/E*2;E=this._program;A.bindVAO(this._vertexArrayObject);A.bindTexture(this._overlayTexture,6);A.bindTexture(this._maskTexture,7);A.useProgram(E);E.setUniform4fv("u_background",F);E.setUniform1i("u_readbackTexture",0);E.setUniform1i("u_overlayTexture",6);E.setUniform1i("u_maskTexture",7);E.setUniform4f("u_drawPos",H,B,v,D);E.setUniform1i("u_maskEnabled",z.maskEnabled?1:0);E.setUniform1i("u_overlayEnabled",z.overlayEnabled?1:0);A.setStencilTestEnabled(!1);
A.setColorMask(!0,!0,!0,!0);A.drawArrays(t.PrimitiveType.TRIANGLE_STRIP,0,4);A.bindVAO()}}}_canRender(){return this._mask&&this._overlay&&null!=this._magnifier}_reloadResources(){this._resourcesTask&&this._resourcesTask.abort();const v=null!=this._magnifier?this._magnifier.maskUrl:null,A=null!=this._magnifier?this._magnifier.overlayUrl:null;this._resourcesTask=g.createTask(async z=>{const B=null==v||null==A?k.loadMagnifierResources(z):null,D=null!=v?e(v,{responseType:"image",signal:z}).then(C=>C.data):
B.then(C=>C.mask);z=null!=A?e(A,{responseType:"image",signal:z}).then(C=>C.data):B.then(C=>C.overlay);const [F,E]=await Promise.all([D,z]);this._mask=F;this._overlay=E;this._disposeRenderResources();this.requestRender()});this.updatingHandles.addPromise(this._resourcesTask.promise)}_disposeRenderResources(){this._readbackTexture=m.disposeMaybe(this._readbackTexture);this._overlayTexture=m.disposeMaybe(this._overlayTexture);this._maskTexture=m.disposeMaybe(this._maskTexture);this._vertexArrayObject=
m.disposeMaybe(this._vertexArrayObject);this._program=m.disposeMaybe(this._program)}_updateResources(v){v.pixelRatio!==this._resourcePixelRatio&&this._disposeRenderResources();if(!this._readbackTexture){var A=v.context;this._resourcePixelRatio=v.pixelRatio;var z=Math.ceil(this._magnifier.size*v.pixelRatio);this._program=r.createMagnifierProgram(A);var B=new Uint16Array([0,1,0,0,1,1,1,0]);this._vertexArrayObject=new y.VertexArrayObject(A,r.magnifierProgramTemplate.attributes,n.Pos2us,{geometry:p.BufferObject.createVertex(A,
t.Usage.STATIC_DRAW,B)});this._overlay.width=z;this._overlay.height=z;B=new u.TextureDescriptor;B.internalFormat=t.PixelFormat.RGBA;B.wrapMode=t.TextureWrapMode.CLAMP_TO_EDGE;B.samplingMode=t.TextureSamplingMode.NEAREST;B.flipped=!0;B.preMultiplyAlpha=!d.isSVG(this._overlay.src)||!v.context.driverTest.svgPremultipliesAlpha.result;this._overlayTexture=new w.Texture(A,B,this._overlay);this._mask.width=z;this._mask.height=z;B.pixelFormat=B.internalFormat=t.PixelFormat.ALPHA;this._maskTexture=new w.Texture(A,
B,this._mask);v=1/this._magnifier.factor;B.pixelFormat=B.internalFormat=t.PixelFormat.RGBA;B.width=B.height=Math.ceil(v*z);B.samplingMode=t.TextureSamplingMode.LINEAR;B.flipped=!1;this._readbackTexture=new w.Texture(A,B)}}}return x})},"esri/views/2d/engine/webgl/shaders/MagnifierPrograms":function(){define(["exports","./sources/resolver","../../../../webgl/ProgramTemplate"],function(e,g,q){const h={shaders:{vertexShader:g.resolveIncludes("magnifier/magnifier.vert"),fragmentShader:g.resolveIncludes("magnifier/magnifier.frag")},
attributes:new Map([["a_pos",0]])};e.createMagnifierProgram=function(m){return q.createProgram(m,h)};e.magnifierProgramTemplate=h;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/magnifier/resources":function(){define(["require","exports","../../core/promiseUtils","../../support/requestImageUtils"],function(e,g,q,h){const m=l=>Object.freeze(Object.defineProperty({__proto__:null,default:l},Symbol.toStringTag,{value:"Module"}));g.loadMagnifierResources=async function(l){var d=
new Promise((a,f)=>e(["./mask-svg"],n=>a(m(n)),f)),b=new Promise((a,f)=>e(["./overlay-svg"],n=>a(m(n)),f));d=h.requestImage((await d).default,{signal:l});b=h.requestImage((await b).default,{signal:l});b={mask:await d,overlay:await b};q.throwIfAborted(l);return b};Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})})},"esri/support/requestImageUtils":function(){define(["exports","../request"],function(e,g){e.requestImage=async function(q,h){({data:q}=await g(q,{responseType:"image",...h}));
return q};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/mat4":function(){define(["exports","./math/mat4"],function(e,g){e.mat4=g.mat4;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/mat4f32":function(){define(["exports","./factories/mat4f32"],function(e,g){e.mat4f32=g.mat4f32;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/vec3f32":function(){define(["exports","./factories/vec3f32"],
function(e,g){e.vec3f32=g.vec3f32;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/vec4f32":function(){define(["exports","./factories/vec4f32"],function(e,g){e.vec4f32=g.vec4f32;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/Bitmap":function(){define("exports ../../../core/promiseUtils ../../../core/libs/gl-matrix-2/math/mat3 ../../../core/libs/gl-matrix-2/factories/mat3f32 ../../../core/libs/gl-matrix-2/factories/vec2f32 ./DisplayObject ./ImageryBitmapSource ../../webgl/enums ../../webgl/Texture ../../webgl/TextureDescriptor".split(" "),
function(e,g,q,h,m,l,d,b,a,f){function n(k){return k&&"render"in k}function c(k){const p=document.createElement("canvas");p.width=k.width;p.height=k.height;k.render(p.getContext("2d"));return p}class r extends l.DisplayObject{constructor(k=null,p=!1){super();this.blendFunction="standard";this._sourceHeight=this._sourceWidth=0;this._textureInvalidated=!1;this._texture=null;this.stencilRef=0;this.coordScale=[1,1];this._height=void 0;this.pixelRatio=1;this.rotation=this.resolution=0;this._source=null;
this._width=void 0;this.y=this.x=0;this.immutable=p;this.source=k;this.requestRender=this.requestRender.bind(this)}destroy(){this._texture&&(this._texture.dispose(),this._texture=null);null!=this._uploadStatus&&(this._uploadStatus.controller.abort(),this._uploadStatus=null)}get isSourceScaled(){return this.width!==this._sourceWidth||this.height!==this._sourceHeight}get height(){return void 0!==this._height?this._height:this._sourceHeight}set height(k){this._height=k}get source(){return this._source}set source(k){if(null!=
k||null!=this._source)this._source=k,this.invalidateTexture(),this.requestRender()}get width(){return void 0!==this._width?this._width:this._sourceWidth}set width(k){this._width=k}beforeRender(k){super.beforeRender(k);this.updateTexture(k)}async setSourceAsync(k,p){null!=this._uploadStatus&&this._uploadStatus.controller.abort();const t=new AbortController,w=g.createResolver();g.onAbortOrThrow(p,()=>t.abort());g.onAbortOrThrow(t,u=>w.reject(u));this._uploadStatus={controller:t,resolver:w};this.source=
k;return w.promise}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this._source instanceof HTMLImageElement?(this._sourceHeight=this._source.naturalHeight,this._sourceWidth=this._source.naturalWidth):this._source&&(this._sourceHeight=this._source.height,this._sourceWidth=this._source.width))}updateTransitionProperties(k,p){64<=k&&(this.inFadeTransition=this.fadeTransitionEnabled=!1);super.updateTransitionProperties(k,p)}setTransform(k){const p=q.identity(this.transforms.displayViewScreenMat3),
[t,w]=k.toScreenNoRotation([0,0],[this.x,this.y]);var u=this.resolution/this.pixelRatio/k.resolution;const y=u*this.width;u*=this.height;const x=Math.PI*this.rotation/180;q.translate(p,p,m.fromValues(t,w));q.translate(p,p,m.fromValues(y/2,u/2));q.rotate(p,p,-x);q.translate(p,p,m.fromValues(-y/2,-u/2));q.scaleByVec2(p,p,m.fromValues(y,u));q.multiply(this.transforms.displayViewScreenMat3,k.displayViewMat3,p)}setSamplingProfile(k){this._texture&&(k.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),
this._texture.setSamplingMode(k.samplingMode))}bind(k,p){this._texture&&k.bindTexture(this._texture,p)}async updateTexture({context:k,painter:p}){if(this._textureInvalidated)if(this._textureInvalidated=!1,this._texture||(this._texture=this._createTexture(k)),this.source){this._texture.resize(this._sourceWidth,this._sourceHeight);k=this.source;k=n(k)?k instanceof d?k.getRenderedRasterPixels()?.renderedRasterPixels:c(k):k;try{if(null!=this._uploadStatus){const {controller:t,resolver:w}=this._uploadStatus,
u={signal:t.signal},{width:y,height:x}=this;await p.textureUploadManager.enqueueTextureUpdate({data:k,texture:this._texture,width:y,height:x},u);w.resolve();this._uploadStatus=null}else this._texture.setData(k);this.ready()}catch(t){g.throwIfNotAbortError(t)}}else this._texture.setData(null)}onDetach(){this.destroy()}_createTransforms(){return{displayViewScreenMat3:h.create()}}_createTexture(k){const p=this.immutable,t=new f.TextureDescriptor;t.internalFormat=p?b.SizedPixelFormat.RGBA8:b.PixelFormat.RGBA;
t.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;t.isImmutable=p;t.width=this._sourceWidth;t.height=this._sourceHeight;return new a.Texture(k,t)}}e.Bitmap=r;e.isImageSource=n;e.rasterize=c;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/ImageryBitmapSource":function(){define(function(){class e{constructor(g,q,h){this.pixelBlock=g;this.extent=q;this.originalPixelBlock=h}get width(){return null!=this.pixelBlock?this.pixelBlock.width:0}get height(){return null!=this.pixelBlock?
this.pixelBlock.height:0}render(g){var q=this.pixelBlock;if(null!=q){var h=this.filter({extent:this.extent,pixelBlock:this.originalPixelBlock??q});null!=h.pixelBlock&&(h.pixelBlock.maskIsAlpha&&(h.pixelBlock.premultiplyAlpha=!0),q=h.pixelBlock.getAsRGBA(),h=g.createImageData(h.pixelBlock.width,h.pixelBlock.height),h.data.set(q),g.putImageData(h,0,0))}}getRenderedRasterPixels(){const g=this.filter({extent:this.extent,pixelBlock:this.pixelBlock});if(null==g.pixelBlock)return null;g.pixelBlock.maskIsAlpha&&
(g.pixelBlock.premultiplyAlpha=!0);return{width:g.pixelBlock.width,height:g.pixelBlock.height,renderedRasterPixels:new Uint8Array(g.pixelBlock.getAsRGBA().buffer)}}}return e})},"esri/views/2d/engine/BitmapContainer":function(){define(["exports","./brushes","./webgl/enums","./webgl/WGLContainer"],function(e,g,q,h){class m extends h{constructor(){super(...arguments);this._hasCrossfade=!1}get requiresDedicatedFBO(){return super.requiresDedicatedFBO||this._hasCrossfade}beforeRender(l){super.beforeRender(l);
this._manageFade()}prepareRenderPasses(l){const d=l.registerRenderPass({name:"bitmap",brushes:[g.brushes.bitmap],target:()=>this.children,drawPhase:q.WGLDrawPhase.MAP});return[...super.prepareRenderPasses(l),d]}_manageFade(){2<=this.children.reduce((l,d)=>l+(d.inFadeTransition?1:0),0)?(this.children.forEach(l=>l.blendFunction="additive"),this._hasCrossfade=!0):(this.children.forEach(l=>l.blendFunction="standard"),this._hasCrossfade=!1)}}e.BitmapContainer=m;Object.defineProperty(e,Symbol.toStringTag,
{value:"Module"})})},"esri/views/2d/engine/BitmapTile":function(){define(["exports","../../../core/libs/gl-matrix-2/factories/mat3f32","./Bitmap","./webgl/TiledDisplayObject"],function(e,g,q,h){class m extends h.TiledDisplayObject{constructor(l,d,b,a,f,n,c=null){super(l,d,b,a,f,n);this.bitmap=new q.Bitmap(c);this.bitmap.coordScale=[f,n];this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy();this.bitmap.destroy()}beforeRender(l){this.bitmap.beforeRender(l);super.beforeRender(l)}afterRender(l){this.bitmap.afterRender(l);
super.afterRender(l)}set stencilRef(l){this.bitmap.stencilRef=l}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{displayViewScreenMat3:g.create(),tileMat3:g.create()}}setTransform(l){super.setTransform(l);this.bitmap.transforms.displayViewScreenMat3=this.transforms.displayViewScreenMat3}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap&&(this.bitmap.stage=null)}}e.BitmapTile=m;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/BitmapTileContainer":function(){define("exports ../../../geometry/support/aaBoundingRect ./BitmapTile ./brushes ./webgl/enums ./webgl/TileContainer".split(" "),
function(e,g,q,h,m,l){class d extends l{get requiresDedicatedFBO(){return this.children.some(b=>"additive"===b.bitmap.blendFunction)}createTile(b){const a=this._tileInfoView.getTileBounds(g.create(),b),f=this._tileInfoView.getTileResolution(b.level),[n,c]=this._tileInfoView.tileInfo.size;return new q.BitmapTile(b,f,a[0],a[3],n,c)}prepareRenderPasses(b){const a=b.registerRenderPass({name:"bitmap (tile)",brushes:[h.brushes.bitmap],target:()=>this.children.map(f=>f.bitmap),drawPhase:m.WGLDrawPhase.MAP});
return[...super.prepareRenderPasses(b),a]}doRender(b){this.visible&&b.drawPhase===m.WGLDrawPhase.MAP&&super.doRender(b)}}e.BitmapTileContainer=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/color":function(){define(["exports","./number"],function(e,g){e.premultiplyAlpha=function(q,h=0,m=!1){const l=q[h+3];q[h]*=l;q[h+1]*=l;q[h+2]*=l;m||(q[h+3]*=255);return q};e.premultiplyAlphaRGBA=function(q){if(!q)return 0;const {r:h,g:m,b:l,a:d}=q;return g.i8888to32(h*
d,m*d,l*d,255*d)};e.premultiplyAlphaRGBAArray=function(q){if(!q)return 0;const [h,m,l,d]=q;return g.i8888to32(d/255*h,d/255*m,d/255*l,d)};e.writeColor=function(q,h,m=0){if(null==h)q[m]=0,q[m+1]=0,q[m+2]=0,q[m+3]=0;else{var {r:l,g:d,b,a}=h;q[m]=l*a/255;q[m+1]=d*a/255;q[m+2]=b*a/255;q[m+3]=a}};Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/webgl/util/Matcher":function(){define(["exports"],function(e){class g{constructor(){this._backgroundFillResult=this._defaultResult=
null}static async from(q,h){const m=new g;m.setDefault(await q.createMeshWriters(h.meshes));return m}size(){return 1}getDefault(){return this._defaultResult}setDefault(q){this._defaultResult=q}getBackgroundFill(){return this._backgroundFillResult}setBackgroundFill(q){this._backgroundFillResult=q}match(q,h){return(q=this.doMatch(q,h)||this.getDefault())&&0<q.length&&(h=this.getBackgroundFill())?[...h,...q]:q}getSortKey(q,h){return 0}doMatch(q,h){return null}async fetchResources(q,h){}}e.FeatureMatcher=
g;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})})},"*noref":1}});
define("exports ./engine/Stage ./LabelManager ./layers/graphics/GraphicsView2D ./layers/graphics/GraphicContainer ./navigation/MapViewNavigation ./magnifier/MagnifierView2D".split(" "),function(e,g,q,h,m,l,d){e.Stage=g.Stage;Object.defineProperty(e,"LabelManager",{enumerable:!0,get:()=>q.LabelManager});e.GraphicsView2D=h;e.GraphicContainer=m;e.MapViewNavigation=l;e.MagnifierView2D=d;Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});