@arcgis/core 4.33.0-next.20250225 → 4.33.0-next.20250227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/4253438dd3045566892d.js +1 -0
  3. package/assets/esri/core/workers/chunks/823bf95f42cc42f20e22.js +1 -0
  4. package/assets/esri/core/workers/chunks/ae25c6108918d37e61bf.js +1 -0
  5. package/assets/esri/core/workers/chunks/{feb656f172ec9fe64752.js → af005704f23088db3ded.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{dea40706ca4e37d5c6e2.js → d4d011eea16a89a5aad9.js} +1 -1
  7. package/core/sql/StandardizedFunctions.js +1 -1
  8. package/core/sql/WhereClause.js +1 -1
  9. package/core/sql/sqlCompareUtils.js +1 -1
  10. package/geometry/SpatialReference.js +1 -1
  11. package/layers/SubtypeGroupLayer.js +1 -1
  12. package/package.json +1 -1
  13. package/support/popupUtils.js +1 -1
  14. package/support/revision.js +1 -1
  15. package/symbols/cim/animationUtils.js +1 -1
  16. package/views/2d/engine/webgl/animations/utils.js +1 -1
  17. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  18. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  19. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  20. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  21. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  22. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  23. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  24. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  25. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  26. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  27. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  28. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  29. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
  30. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  31. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  32. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  33. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  34. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  35. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  36. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  37. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  38. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TestShader.js +1 -1
  40. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  41. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerLUTShader.js +1 -1
  42. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerShadedReliefShader.js +1 -1
  43. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  44. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
  45. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/BandArithmeticShader.js +1 -1
  46. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ColormapToRGBShader.js +1 -1
  47. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CompositeBandShader.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ComputeChangeShader.js +1 -1
  49. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ContrastBrightnessShader.js +1 -1
  50. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ConvolutionShader.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
  52. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ExtractBandShader.js +1 -1
  53. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/FocalStatisticsShader.js +1 -1
  54. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/GrayscaleShader.js +1 -1
  55. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/HillshadeShader.js +1 -1
  56. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/LocalShader.js +1 -1
  57. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
  58. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/NDVIShader.js +1 -1
  59. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  60. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js +1 -1
  61. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ShadedReliefShader.js +1 -1
  62. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
  63. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/StretchShader.js +1 -1
  64. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  65. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  66. package/views/3d/layers/support/FeatureTile.js +1 -1
  67. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  68. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  69. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  70. package/views/3d/webgl-engine/lib/ComponentUtils.js +1 -1
  71. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  72. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  73. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  74. package/views/View.js +1 -1
  75. package/views/support/TileTreeDebugger.js +1 -1
  76. package/views/webgl/capabilities/Capabilities.js +1 -1
  77. package/views/webgl/capabilities/DebugRendererInfo.js +1 -1
  78. package/views/webgl/capabilities.js +1 -1
  79. package/widgets/Feature/FeatureRelationship.js +1 -1
  80. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  81. package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
  82. package/widgets/Feature.js +1 -1
  83. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  84. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  85. package/widgets/FeatureTable.js +1 -1
  86. package/widgets/Features/FeaturesDrillIn.js +1 -1
  87. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  88. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  89. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  90. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  91. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
  92. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  93. package/widgets/OrientedImageryViewer.js +1 -1
  94. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  95. package/assets/esri/core/workers/chunks/66338f008ff0992ffca2.js +0 -1
  96. package/assets/esri/core/workers/chunks/69c13ca7b572ad2ca3ce.js +0 -1
  97. package/assets/esri/core/workers/chunks/d5ebe6b7cd9c8e40b386.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t,a as o}from"../../../../../../../chunks/tslib.es6.js";import{location as r,uniform as e,input as s}from"../../GraphShaderModule.js";import{greaterThan as i,Float as a,ifElse as l,Vec4 as n}from"../../graph/glsl.js";import{BaseHittestVertexInput as p}from"./AFeatureShader.js";import{getLineFragmentColor as m}from"./LineShader.js";import{LocalTileOffset as f}from"./LocalTileOffset.js";import{MosaicInfo as d}from"./MosaicInfo.js";import{OutlineFillVertexInput as h,OutlineFillFragmentInput as u,OutlineFillShader as c,getOutlineFillVertexData as j}from"./OutlineFillShader.js";import{getPatternFillVertexData as g,getPatternFillFragmentColor as v}from"./PatternFillShader.js";class x extends h{}t([r(9,n)],x.prototype,"tlbr",void 0),t([r(10,a)],x.prototype,"inverseRasterizationScale",void 0);class y extends u{}class S extends c{vertex(t,o){return{...j(this,t,o),...g(this,t)}}fragment(t){const{isOutline:o}=t,r=i(o,new a(.5)),e=m(t,this.antialiasingControls.blur),s=v(t,this.mosaicInfo),n=l(r,e,s),p=l(r,new a(1/255),new a(0));return this.getFragmentOutput(n,t,p)}}t([e(d)],S.prototype,"mosaicInfo",void 0),t([e(f)],S.prototype,"localTileOffset",void 0),t([o(0,s(x)),o(1,s(p))],S.prototype,"vertex",null),t([o(0,s(y))],S.prototype,"fragment",null);export{y as PatternOutlineFillFragmentInput,S as PatternOutlineFillShader,x as PatternOutlineFillVertexInput};
5
+ import{_ as t,a as r}from"../../../../../../../chunks/tslib.es6.js";import{location as e,uniform as o,input as s}from"../../GraphShaderModule.js";import{greaterThan as i,Float as a,ifElse as l,Vec4 as n}from"../../graph/glsl.js";import{BaseHittestVertexInput as p}from"./AFeatureShader.js";import{getLineFragmentColor as m}from"./LineShader.js";import{LocalTileOffset as f}from"./LocalTileOffset.js";import{MosaicInfo as h}from"./MosaicInfo.js";import{OutlineFillVertexInput as u,OutlineFillFragmentInput as d,OutlineFillShader as c,getOutlineFillVertexData as j}from"./OutlineFillShader.js";import{getPatternFillVertexData as g,getPatternFillFragmentColor as v}from"./PatternFillShader.js";class y extends u{}t([e(9,n)],y.prototype,"tlbr",void 0),t([e(10,a)],y.prototype,"inverseRasterizationScale",void 0);class S extends d{}class x extends c{constructor(){super(...arguments),this.type="PatternOutlineFillShader"}vertex(t,r){return{...j(this,t,r),...g(this,t)}}fragment(t){const{isOutline:r}=t,e=i(r,new a(.5)),o=m(t,this.antialiasingControls.blur),s=v(t,this.mosaicInfo),n=l(e,o,s),p=l(e,new a(1/255),new a(0));return this.getFragmentOutput(n,t,p)}}t([o(h)],x.prototype,"mosaicInfo",void 0),t([o(f)],x.prototype,"localTileOffset",void 0),t([r(0,s(y)),r(1,s(p))],x.prototype,"vertex",null),t([r(0,s(S))],x.prototype,"fragment",null);export{S as PatternOutlineFillFragmentInput,x as PatternOutlineFillShader,y as PatternOutlineFillVertexInput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o,a as t}from"../../../../../../../chunks/tslib.es6.js";import{uniform as e,UniformGroup as r,location as s,GraphShaderModule as l,option as p,define as i,VertexInput as d,FragmentOutput as n,input as a,FragmentInput as v}from"../../GraphShaderModule.js";import{FixedArray as c,Float as y,equal as f,ifElse as u,Int as x,Vec4 as h,and as m,lessThan as w,greaterThan as g,Vec2 as C,Vec3 as b}from"../../graph/glsl.js";class j extends r{}o([e(y)],j.prototype,"zoomLevel",void 0);class k extends r{getColor(o){const t=this.validValues.findIndex((t=>f(t,o)));return u(f(t,new x(-1)),this.colorFallback,this.color)}}o([e(h)],k.prototype,"color",void 0),o([e(h)],k.prototype,"colorFallback",void 0),o([e(c.ofType(y,4))],k.prototype,"validValues",void 0);class z extends d{}o([s(0,C)],z.prototype,"pos",void 0),o([s(1,b)],z.prototype,"id",void 0),o([s(2,y)],z.prototype,"bitset",void 0),o([s(3,C)],z.prototype,"offset",void 0),o([s(4,y)],z.prototype,"size",void 0),o([s(5,h)],z.prototype,"color",void 0);class D extends v{}class F extends l{vertex(o){const{size:t,offset:e,pos:r}=o;let s=o.color;this.dataDrivenColor&&(s=this.dataDrivenColor.getColor(new y(1)));const l=e.multiply(t);return{glPosition:new h(r.add(l),0,1),color:s,offset:e}}fragment(o){const t=new n,{offset:e}=o;return t.discard=m(g(e.x,new y(-.5)),g(e.y,new y(-.5)),w(e.x,new y(.5)),w(e.y,new y(.5))),this.returnRed?t.fragColor=new h(1,0,0,1):t.fragColor=o.color,t}}o([p(k)],F.prototype,"dataDrivenColor",void 0),o([e(j)],F.prototype,"view",void 0),o([i],F.prototype,"returnRed",void 0),o([t(0,a(z))],F.prototype,"vertex",null),o([t(0,a(D))],F.prototype,"fragment",null);export{k as DataDrivenColorByValueMatch,F as TestShader};
5
+ import{_ as o,a as t}from"../../../../../../../chunks/tslib.es6.js";import{uniform as e,UniformGroup as r,location as s,GraphShaderModule as p,option as l,define as i,VertexInput as d,FragmentOutput as n,input as a,FragmentInput as c}from"../../GraphShaderModule.js";import{FixedArray as v,Float as y,equal as f,ifElse as u,Int as h,Vec4 as x,and as m,lessThan as w,greaterThan as g,Vec2 as C,Vec3 as b}from"../../graph/glsl.js";class j extends r{}o([e(y)],j.prototype,"zoomLevel",void 0);class k extends r{getColor(o){const t=this.validValues.findIndex((t=>f(t,o)));return u(f(t,new h(-1)),this.colorFallback,this.color)}}o([e(x)],k.prototype,"color",void 0),o([e(x)],k.prototype,"colorFallback",void 0),o([e(v.ofType(y,4))],k.prototype,"validValues",void 0);class z extends d{}o([s(0,C)],z.prototype,"pos",void 0),o([s(1,b)],z.prototype,"id",void 0),o([s(2,y)],z.prototype,"bitset",void 0),o([s(3,C)],z.prototype,"offset",void 0),o([s(4,y)],z.prototype,"size",void 0),o([s(5,x)],z.prototype,"color",void 0);class D extends c{}class F extends p{constructor(){super(...arguments),this.type="TestShader"}vertex(o){const{size:t,offset:e,pos:r}=o;let s=o.color;this.dataDrivenColor&&(s=this.dataDrivenColor.getColor(new y(1)));const p=e.multiply(t);return{glPosition:new x(r.add(p),0,1),color:s,offset:e}}fragment(o){const t=new n,{offset:e}=o;return t.discard=m(g(e.x,new y(-.5)),g(e.y,new y(-.5)),w(e.x,new y(.5)),w(e.y,new y(.5))),this.returnRed?t.fragColor=new x(1,0,0,1):t.fragColor=o.color,t}}o([l(k)],F.prototype,"dataDrivenColor",void 0),o([e(j)],F.prototype,"view",void 0),o([i],F.prototype,"returnRed",void 0),o([t(0,a(z))],F.prototype,"vertex",null),o([t(0,a(D))],F.prototype,"fragment",null);export{k as DataDrivenColorByValueMatch,F as TestShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{dashSdfRasterizationScale as o,dashSdfDistanceNormalization as s}from"../../../../../../../symbols/cim/constants.js";import{location as a,uniform as l,input as n}from"../../GraphShaderModule.js";import{max as r,Float as p,fract as m,mix as c,Vec2 as u,texture2D as d,cond as y,equal as h,sqrt as f,pow as w,clamp as b,Vec4 as g,ifElse as x,greaterThan as v,dot as D}from"../../graph/glsl.js";import{BaseHittestVertexInput as j}from"./AFeatureShader.js";import{bitsetLineScaleDash as S,bitsetLineIsSdf as A,bitsetGenericConsiderAlphaOnly as z}from"./constants.js";import{LineVertexInput as F,LineFragmentInput as _,LineShader as T,getLineVertexData as I,getLineAntialiasing as L}from"./LineShader.js";import{MosaicInfo as C}from"./MosaicInfo.js";import{getBit as O,rgba2float as P}from"./utils.js";class W extends F{}t([a(9,p)],W.prototype,"accumulatedDistance",void 0),t([a(10,u)],W.prototype,"segmentDirection",void 0),t([a(11,p)],W.prototype,"offsetAlongLine",void 0),t([a(12,p)],W.prototype,"capType",void 0),t([a(13,g)],W.prototype,"tlbr",void 0);class R extends _{}class H extends T{_getDistanceRatio(t,e){const o=O(t.bitset,S);return o.multiply(r(e,new p(.25)).multiply(new p(2))).add(new p(1).subtract(o).multiply(i(1)))}_getSDFAlpha(t){const{halfWidth:e,normal:i,tlbr:a,patternSize:l,accumulatedDistance:n,offsetAlongLine:x,dashToPx:v,capType:D}=t,j=l.x.divide(o).multiply(v),S=m(n.add(x).divide(j)),A=c(a.xy,a.zw,new u(S,.5)),z=P(d(this.mosaicInfo.texture,A)).multiply(2).subtract(1).multiply(s).multiply(v),F=i.y.multiply(e),_=y([h(D,new p(1)),z.subtract(e)],[h(D,new p(2)),f(w(r(z,new p(0)),new p(2)).add(F.multiply(F))).subtract(e)],[!0,z]),T=b(new p(.25).subtract(_),new p(0),new p(1));return new g(T)}_getPatternColor(t){const{halfWidth:e,normal:i,color:o,accumulatedDistance:s,patternSize:a,sampleAlphaOnly:l,tlbr:n}=t,r=a.y.multiply(new p(2).multiply(e).divide(a.x)),y=m(s.divide(r)),h=new p(.5).multiply(i.y).add(new p(.5)),f=c(n.xy,n.zw,new u(h,y));let w=d(this.mosaicInfo.texture,f);return null!=this.visualVariableColor&&(w=x(v(l,new p(.5)),new g(o.a),o)),w}vertex(t,e){const{segmentDirection:i,tlbr:o,bitset:s}=t,a=I(this,t),l=t.accumulatedDistance.divide(this.view.displayZoomFactor).add(D(i,a.scaledOffset)),n=new u(o.z.subtract(o.x),o.w.subtract(o.y)),r=o.divide(this.mosaicInfo.size.xyxy),m=O(s,A),c=O(s,z),d=x(v(m,new p(.5)),this._getDistanceRatio(t,a.scaledHalfWidth),new p(1));return{...a,tlbr:r,patternSize:n,accumulatedDistance:l,isSDF:m,sampleAlphaOnly:c,dashToPx:d,offsetAlongLine:t.offsetAlongLine,capType:t.capType,...this.maybeRunHittest(t,e,a.halfWidth)}}fragment(t){const{color:e,opacity:i,isSDF:o}=t,s=L(t,this.antialiasingControls.blur),a=x(v(o,new p(.5)),this._getSDFAlpha(t),this._getPatternColor(t)),l=e.multiply(i).multiply(s).multiply(a);return this.getFragmentOutput(l,t)}}t([l(C)],H.prototype,"mosaicInfo",void 0),t([e(0,n(W)),e(1,n(j))],H.prototype,"vertex",null);export{R as TexturedLineFragmentInput,H as TexturedLineShader,W as TexturedLineVertexInput};
5
+ import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{dashSdfRasterizationScale as s,dashSdfDistanceNormalization as o}from"../../../../../../../symbols/cim/constants.js";import{location as a,uniform as r,input as l}from"../../GraphShaderModule.js";import{max as n,Float as p,fract as c,mix as m,Vec2 as u,texture2D as d,cond as y,equal as h,sqrt as f,pow as w,clamp as b,Vec4 as g,ifElse as x,greaterThan as v,dot as D}from"../../graph/glsl.js";import{BaseHittestVertexInput as S}from"./AFeatureShader.js";import{bitsetLineScaleDash as j,bitsetLineIsSdf as A,bitsetGenericConsiderAlphaOnly as z}from"./constants.js";import{LineVertexInput as F,LineFragmentInput as T,LineShader as _,getLineVertexData as L,getLineAntialiasing as I}from"./LineShader.js";import{MosaicInfo as C}from"./MosaicInfo.js";import{getBit as O,rgba2float as P}from"./utils.js";class W extends F{}t([a(9,p)],W.prototype,"accumulatedDistance",void 0),t([a(10,u)],W.prototype,"segmentDirection",void 0),t([a(11,p)],W.prototype,"offsetAlongLine",void 0),t([a(12,p)],W.prototype,"capType",void 0),t([a(13,g)],W.prototype,"tlbr",void 0);class R extends T{}class H extends _{constructor(){super(...arguments),this.type="TexturedLineShader"}_getDistanceRatio(t,e){const s=O(t.bitset,j);return s.multiply(n(e,new p(.25)).multiply(new p(2))).add(new p(1).subtract(s).multiply(i(1)))}_getSDFAlpha(t){const{halfWidth:e,normal:i,tlbr:a,patternSize:r,accumulatedDistance:l,offsetAlongLine:x,dashToPx:v,capType:D}=t,S=r.x.divide(s).multiply(v),j=c(l.add(x).divide(S)),A=m(a.xy,a.zw,new u(j,.5)),z=P(d(this.mosaicInfo.texture,A)).multiply(2).subtract(1).multiply(o).multiply(v),F=i.y.multiply(e),T=y([h(D,new p(1)),z.subtract(e)],[h(D,new p(2)),f(w(n(z,new p(0)),new p(2)).add(F.multiply(F))).subtract(e)],[!0,z]),_=b(new p(.25).subtract(T),new p(0),new p(1));return new g(_)}_getPatternColor(t){const{halfWidth:e,normal:i,color:s,accumulatedDistance:o,patternSize:a,sampleAlphaOnly:r,tlbr:l}=t,n=a.y.multiply(new p(2).multiply(e).divide(a.x)),y=c(o.divide(n)),h=new p(.5).multiply(i.y).add(new p(.5)),f=m(l.xy,l.zw,new u(h,y));let w=d(this.mosaicInfo.texture,f);return null!=this.visualVariableColor&&(w=x(v(r,new p(.5)),new g(s.a),s)),w}vertex(t,e){const{segmentDirection:i,tlbr:s,bitset:o}=t,a=L(this,t),r=t.accumulatedDistance.divide(this.view.displayZoomFactor).add(D(i,a.scaledOffset)),l=new u(s.z.subtract(s.x),s.w.subtract(s.y)),n=s.divide(this.mosaicInfo.size.xyxy),c=O(o,A),m=O(o,z),d=x(v(c,new p(.5)),this._getDistanceRatio(t,a.scaledHalfWidth),new p(1));return{...a,tlbr:n,patternSize:l,accumulatedDistance:r,isSDF:c,sampleAlphaOnly:m,dashToPx:d,offsetAlongLine:t.offsetAlongLine,capType:t.capType,...this.maybeRunHittest(t,e,a.halfWidth)}}fragment(t){const{color:e,opacity:i,isSDF:s}=t,o=I(t,this.antialiasingControls.blur),a=x(v(s,new p(.5)),this._getSDFAlpha(t),this._getPatternColor(t)),r=e.multiply(i).multiply(o).multiply(a);return this.getFragmentOutput(r,t)}}t([r(C)],H.prototype,"mosaicInfo",void 0),t([e(0,l(W)),e(1,l(S))],H.prototype,"vertex",null);export{R as TexturedLineFragmentInput,H as TexturedLineShader,W as TexturedLineVertexInput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../chunks/tslib.es6.js";import{uniform as r}from"../../../GraphShaderModule.js";import{Float as s}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as t}from"./BaseRasterColorizerShader.js";import{lookupColor as e,ColormapConfig as i}from"./lut.js";class m extends t{_colorize(o){const r=this._getPixel(o);return e(r,new s(1),this.colormapConfig,!1)}}o([r(i)],m.prototype,"colormapConfig",void 0);export{m as RasterColorizerLUTShader};
5
+ import{_ as r}from"../../../../../../../../chunks/tslib.es6.js";import{uniform as o}from"../../../GraphShaderModule.js";import{Float as s}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as t}from"./BaseRasterColorizerShader.js";import{lookupColor as e,ColormapConfig as i}from"./lut.js";class p extends t{constructor(){super(...arguments),this.type="RasterColorizerLUTShader"}_colorize(r){const o=this._getPixel(r);return e(o,new s(1),this.colormapConfig,!1)}}r([o(i)],p.prototype,"colormapConfig",void 0);export{p as RasterColorizerLUTShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../chunks/tslib.es6.js";import{define as i,uniform as r,option as t}from"../../../GraphShaderModule.js";import{Vec4 as e,clamp as s,Float as l,Vec3 as a}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as p}from"./BaseRasterColorizerShader.js";import{rgb2hsv as n,hsv2rgb as m}from"./colorConversion.js";import{lookupColor as h,ColormapConfig as c}from"./lut.js";import{getSurfaceValues as u,hillshade as d,HillshadeConfig as f}from"./surface.js";class g extends p{constructor(){super(...arguments),this.applyColormap=!1,this.isMultidirectional=!1}_colorize(o){const{texture:i}=this.config,r=u(i,o,this.config.srcImageSize),t=d(r,this.hillshadeConfig,this.isMultidirectional);if(!this.applyColormap)return new e(t.x,t.x,t.x,t.a);const{minValue:p,maxValue:c}=this.hillshadeConfig,f=this._getPixel(o),g=c.subtract(p),x=f.r.subtract(p),y=s(x.divide(g),new l(0),new l(1)),C=h(new e(y,y,y,1),new l(255),this.colormapConfig),j=n(C.xyz),w=m(new a(j.xy,t.x));return new e(w,C.a.multiply(t.a))}}o([i],g.prototype,"applyColormap",void 0),o([i],g.prototype,"isMultidirectional",void 0),o([r(f)],g.prototype,"hillshadeConfig",void 0),o([t(c)],g.prototype,"colormapConfig",void 0);export{g as RasterColorizerShadedReliefShader};
5
+ import{_ as o}from"../../../../../../../../chunks/tslib.es6.js";import{define as i,uniform as r,option as t}from"../../../GraphShaderModule.js";import{Vec4 as e,clamp as s,Float as l,Vec3 as a}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as p}from"./BaseRasterColorizerShader.js";import{rgb2hsv as n,hsv2rgb as h}from"./colorConversion.js";import{lookupColor as m,ColormapConfig as c}from"./lut.js";import{getSurfaceValues as d,hillshade as f,HillshadeConfig as u}from"./surface.js";class g extends p{constructor(){super(...arguments),this.type="RasterColorizerShadedReliefShader",this.applyColormap=!1,this.isMultidirectional=!1}_colorize(o){const{texture:i}=this.config,r=d(i,o,this.config.srcImageSize),t=f(r,this.hillshadeConfig,this.isMultidirectional);if(!this.applyColormap)return new e(t.x,t.x,t.x,t.a);const{minValue:p,maxValue:c}=this.hillshadeConfig,u=this._getPixel(o),g=c.subtract(p),x=u.r.subtract(p),y=s(x.divide(g),new l(0),new l(1)),C=m(new e(y,y,y,1),new l(255),this.colormapConfig),j=n(C.xyz),w=h(new a(j.xy,t.x));return new e(w,C.a.multiply(t.a))}}o([i],g.prototype,"applyColormap",void 0),o([i],g.prototype,"isMultidirectional",void 0),o([r(u)],g.prototype,"hillshadeConfig",void 0),o([t(c)],g.prototype,"colormapConfig",void 0);export{g as RasterColorizerShadedReliefShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../chunks/tslib.es6.js";import{define as t,uniform as r,option as s}from"../../../GraphShaderModule.js";import{Vec4 as i,Float as p}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as e}from"./BaseRasterColorizerShader.js";import{lookupColor as a,ColormapConfig as m}from"./lut.js";import{stretch as l,StretchConfig as h}from"./stretch.js";class n extends e{constructor(){super(...arguments),this.isMultiband=!0,this.applyColormap=!1,this.useGamma=!1,this.noOp=!1}_colorize(o){const t=this._getPixel(o);if(this.noOp)return t;let r=l(t,this.stretchConfig,this.useGamma);if(this.isMultiband)return r;if(r=new i(r.rrr,r.a),this.applyColormap){const o=this.useGamma?255:1;r=a(r,new p(o),this.colormapConfig)}return r}}o([t],n.prototype,"isMultiband",void 0),o([t],n.prototype,"applyColormap",void 0),o([t],n.prototype,"useGamma",void 0),o([t],n.prototype,"noOp",void 0),o([r(h)],n.prototype,"stretchConfig",void 0),o([s(m)],n.prototype,"colormapConfig",void 0);export{n as RasterColorizerStretchShader};
5
+ import{_ as o}from"../../../../../../../../chunks/tslib.es6.js";import{define as t,uniform as r,option as s}from"../../../GraphShaderModule.js";import{Vec4 as i,Float as e}from"../../../graph/glsl.js";import{BaseRasterColorizerShader as p}from"./BaseRasterColorizerShader.js";import{lookupColor as a,ColormapConfig as m}from"./lut.js";import{stretch as h,StretchConfig as l}from"./stretch.js";class n extends p{constructor(){super(...arguments),this.type="RasterColorizerStretchShader",this.isMultiband=!0,this.applyColormap=!1,this.useGamma=!1,this.noOp=!1}_colorize(o){const t=this._getPixel(o);if(this.noOp)return t;let r=h(t,this.stretchConfig,this.useGamma);if(this.isMultiband)return r;if(r=new i(r.rrr,r.a),this.applyColormap){const o=this.useGamma?255:1;r=a(r,new e(o),this.colormapConfig)}return r}}o([t],n.prototype,"isMultiband",void 0),o([t],n.prototype,"applyColormap",void 0),o([t],n.prototype,"useGamma",void 0),o([t],n.prototype,"noOp",void 0),o([r(l)],n.prototype,"stretchConfig",void 0),o([s(m)],n.prototype,"colormapConfig",void 0);export{n as RasterColorizerStretchShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,UniformGroup as i}from"../../../../GraphShaderModule.js";import{Vec2 as s,negate as l,sign as o,abs as r,Float as p,step as m,mod as d,atan as a,mix as n,Vec4 as c}from"../../../../graph/glsl.js";import{getSurfaceValues as u,computeDeltaZ as y}from"../surface.js";import{BaseRasterProcessorShader as f}from"./BaseRasterProcessorShader.js";class h extends i{}e([t(s)],h.prototype,"cellSize",void 0);class g extends f{_process(e){const{texture:t}=this.config,i=u(t,e,this.config.srcImageSize),f=new s(1).divide(this.aspectConfig.cellSize.multiply(8)),{x:h,y:g}=y(i,f),w=l(g),j=i[9].multiply(o(r(h).add(r(w)))),x=r(o(h)),S=new p(3.14159265359),v=new p(0),z=m(v,w).multiply(.5).multiply(S).add(m(w,v).multiply(1.5).multiply(S)),C=d(new p(2.5).multiply(S).add(a(w,l(h))),new p(2).multiply(S)),_=n(z,C,x).multiply(180).divide(S);return new c(_,_,_,j)}}e([t(h)],g.prototype,"aspectConfig",void 0);export{g as AspectShader};
5
+ import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,UniformGroup as s}from"../../../../GraphShaderModule.js";import{Vec2 as i,negate as r,sign as l,abs as o,Float as p,step as m,mod as d,atan as a,mix as c,Vec4 as n}from"../../../../graph/glsl.js";import{getSurfaceValues as u,computeDeltaZ as y}from"../surface.js";import{BaseRasterProcessorShader as f}from"./BaseRasterProcessorShader.js";class h extends s{}e([t(i)],h.prototype,"cellSize",void 0);class g extends f{constructor(){super(...arguments),this.type="AspectShader"}_process(e){const{texture:t}=this.config,s=u(t,e,this.config.srcImageSize),f=new i(1).divide(this.aspectConfig.cellSize.multiply(8)),{x:h,y:g}=y(s,f),w=r(g),S=s[9].multiply(l(o(h).add(o(w)))),j=o(l(h)),x=new p(3.14159265359),v=new p(0),z=m(v,w).multiply(.5).multiply(x).add(m(w,v).multiply(1.5).multiply(x)),C=d(new p(2.5).multiply(x).add(a(w,r(h))),new p(2).multiply(x)),_=c(z,C,j).multiply(180).divide(x);return new n(_,_,_,S)}}e([t(h)],g.prototype,"aspectConfig",void 0);export{g as AspectShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,define as u,option as r,UniformGroup as l}from"../../../../GraphShaderModule.js";import{Vec4 as a,pow as i,Float as e,sqrt as d,Mat3 as p,Vec3 as c}from"../../../../graph/glsl.js";import{oneMinus as m}from"../../utils.js";import{BaseRasterProcessorShader as n}from"./BaseRasterProcessorShader.js";import{roundOutput as o,invertValue as y}from"./math.js";class b extends l{}t([s(p)],b.prototype,"bandIndexMat3",void 0);class h extends l{}t([s(c)],h.prototype,"adjustments",void 0);class x extends n{constructor(){super(...arguments),this.isOutputRounded=!1}_process(t){const s=this._getPixel(t),u=this.bandArithmeticConfig.bandIndexMat3.multiply(s.rgb),r=this._processIndex(u),l=new a(r,r,r,s.a);return this.isOutputRounded?o(l):l}_processIndex(t){const{r:s,g:u}=t,r=this.adjustmentConfig?.adjustments;switch(this.indexType){case"ndxi":{const t=s.subtract(u),r=s.add(u);return t.multiply(y(r))}case"sr":return s.multiply(y(u));case"ci":return s.multiply(y(u)).subtract(1);case"savi":{const{x:t}=r,l=s.subtract(u),a=s.add(u).add(t);return l.multiply(y(a)).multiply(t.add(1))}case"tsavi":{const{x:t,y:l,z:a}=r,i=a.multiply(t.multiply(t).add(1)).subtract(l.multiply(t)),e=t.multiply(s.subtract(t.multiply(u)).subtract(l)),d=l.multiply(s).add(u).add(i);return e.multiply(y(d))}case"msavi":{const t=s.multiply(2).add(1),r=t.multiply(t).subtract(s.subtract(u).multiply(8));return t.subtract(d(r)).multiply(.5)}case"gemi":{const t=s.multiply(s).subtract(u.multiply(u)).multiply(2).add(s.multiply(1.5)).add(u.multiply(.5)),r=s.add(u).add(.5),l=t.multiply(y(r)),a=l.multiply(m(l.multiply(.25))),i=u.subtract(.125).multiply(y(m(u)));return a.subtract(i)}case"pvi":{const{x:t,y:l}=r,a=d(t.multiply(t).add(1));return s.subtract(u.multiply(t)).subtract(l).multiply(y(a))}case"vari":{const s=t.g.subtract(t.r),u=t.g.add(t.r).subtract(t.b);return s.multiply(y(u))}case"rtvicore":return s.subtract(u).multiply(100).subtract(s.subtract(t.b).multiply(10));case"bai":{const t=i(new e(.1).subtract(u),new e(2)),r=i(new e(.06).subtract(s),new e(2));return y(t.add(r))}case"evi":{const r=t.b,l=s.add(u.multiply(6)).subtract(r.multiply(7.5)).add(1);return s.subtract(u).multiply(2.5).multiply(y(l))}case"wndwi":{const{r:s,g:u,b:l}=t,a=r.x,i=a.multiply(u),e=a.multiply(l),d=s.add(i).add(l).subtract(e);return s.subtract(i).subtract(l).add(e).multiply(y(d))}case"mtvi":{const r=t.b,l=i(s.multiply(2).add(1),new e(2)),a=s.multiply(6).subtract(d(u).multiply(5)),p=d(l.subtract(a).subtract(.5)),c=s.subtract(r).multiply(1.2),m=u.subtract(r).multiply(2.5);return c.subtract(m).multiply(1.5).multiply(y(p))}default:return s}}}t([u],x.prototype,"indexType",void 0),t([u],x.prototype,"isOutputRounded",void 0),t([s(b)],x.prototype,"bandArithmeticConfig",void 0),t([r(h)],x.prototype,"adjustmentConfig",void 0);export{x as BandArithmeticShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,define as u,option as r,UniformGroup as l}from"../../../../GraphShaderModule.js";import{Vec4 as i,pow as a,Float as e,sqrt as d,Mat3 as p,Vec3 as c}from"../../../../graph/glsl.js";import{oneMinus as m}from"../../utils.js";import{BaseRasterProcessorShader as n}from"./BaseRasterProcessorShader.js";import{roundOutput as o,invertValue as y}from"./math.js";class b extends l{}t([s(p)],b.prototype,"bandIndexMat3",void 0);class h extends l{}t([s(c)],h.prototype,"adjustments",void 0);class x extends n{constructor(){super(...arguments),this.type="BandArithmeticShader",this.isOutputRounded=!1}_process(t){const s=this._getPixel(t),u=this.bandArithmeticConfig.bandIndexMat3.multiply(s.rgb),r=this._processIndex(u),l=new i(r,r,r,s.a);return this.isOutputRounded?o(l):l}_processIndex(t){const{r:s,g:u}=t,r=this.adjustmentConfig?.adjustments;switch(this.indexType){case"ndxi":{const t=s.subtract(u),r=s.add(u);return t.multiply(y(r))}case"sr":return s.multiply(y(u));case"ci":return s.multiply(y(u)).subtract(1);case"savi":{const{x:t}=r,l=s.subtract(u),i=s.add(u).add(t);return l.multiply(y(i)).multiply(t.add(1))}case"tsavi":{const{x:t,y:l,z:i}=r,a=i.multiply(t.multiply(t).add(1)).subtract(l.multiply(t)),e=t.multiply(s.subtract(t.multiply(u)).subtract(l)),d=l.multiply(s).add(u).add(a);return e.multiply(y(d))}case"msavi":{const t=s.multiply(2).add(1),r=t.multiply(t).subtract(s.subtract(u).multiply(8));return t.subtract(d(r)).multiply(.5)}case"gemi":{const t=s.multiply(s).subtract(u.multiply(u)).multiply(2).add(s.multiply(1.5)).add(u.multiply(.5)),r=s.add(u).add(.5),l=t.multiply(y(r)),i=l.multiply(m(l.multiply(.25))),a=u.subtract(.125).multiply(y(m(u)));return i.subtract(a)}case"pvi":{const{x:t,y:l}=r,i=d(t.multiply(t).add(1));return s.subtract(u.multiply(t)).subtract(l).multiply(y(i))}case"vari":{const s=t.g.subtract(t.r),u=t.g.add(t.r).subtract(t.b);return s.multiply(y(u))}case"rtvicore":return s.subtract(u).multiply(100).subtract(s.subtract(t.b).multiply(10));case"bai":{const t=a(new e(.1).subtract(u),new e(2)),r=a(new e(.06).subtract(s),new e(2));return y(t.add(r))}case"evi":{const r=t.b,l=s.add(u.multiply(6)).subtract(r.multiply(7.5)).add(1);return s.subtract(u).multiply(2.5).multiply(y(l))}case"wndwi":{const{r:s,g:u,b:l}=t,i=r.x,a=i.multiply(u),e=i.multiply(l),d=s.add(a).add(l).subtract(e);return s.subtract(a).subtract(l).add(e).multiply(y(d))}case"mtvi":{const r=t.b,l=a(s.multiply(2).add(1),new e(2)),i=s.multiply(6).subtract(d(u).multiply(5)),p=d(l.subtract(i).subtract(.5)),c=s.subtract(r).multiply(1.2),m=u.subtract(r).multiply(2.5);return c.subtract(m).multiply(1.5).multiply(y(p))}default:return s}}}t([u],x.prototype,"indexType",void 0),t([u],x.prototype,"isOutputRounded",void 0),t([s(b)],x.prototype,"bandArithmeticConfig",void 0),t([r(h)],x.prototype,"adjustmentConfig",void 0);export{x as BandArithmeticShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r}from"../../../../GraphShaderModule.js";import{Float as s,Vec4 as t}from"../../../../graph/glsl.js";import{lookupColor as e,ColormapConfig as p}from"../lut.js";import{BaseRasterProcessorShader as i}from"./BaseRasterProcessorShader.js";class m extends i{_process(o){const r=this._getPixel(o),p=e(r,new s(1),this.colormapConfig,!1);return new t(p.xyz.multiply(255),p.a)}}o([r(p)],m.prototype,"colormapConfig",void 0);export{m as ColormapToRGBShader};
5
+ import{_ as o}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r}from"../../../../GraphShaderModule.js";import{Float as s,Vec4 as t}from"../../../../graph/glsl.js";import{lookupColor as e,ColormapConfig as p}from"../lut.js";import{BaseRasterProcessorShader as i}from"./BaseRasterProcessorShader.js";class m extends i{constructor(){super(...arguments),this.type="ColormapToRGBShader"}_process(o){const r=this._getPixel(o),p=e(r,new s(1),this.colormapConfig,!1);return new t(p.xyz.multiply(255),p.a)}}o([r(p)],m.prototype,"colormapConfig",void 0);export{m as ColormapToRGBShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Vec4 as s}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as r}from"./BaseRasterProcessorShader.js";import{MultiRasterMixin as e}from"./MultiRasterMixin.js";class t extends(e(r)){_process(r){const{a:e,b:t,c:a,alpha:o}=this._getRasterValues(r);return new s(e,t,a,o)}}export{t as CompositeBandShader};
5
+ import{Vec4 as s}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as r}from"./BaseRasterProcessorShader.js";import{MultiRasterMixin as e}from"./MultiRasterMixin.js";class t extends(e(r)){constructor(){super(...arguments),this.type="CompositeBandShader"}_process(r){const{a:e,b:t,c:o,alpha:a}=this._getRasterValues(r);return new s(e,t,o,a)}}export{t as CompositeBandShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{define as o,uniform as r}from"../../../../GraphShaderModule.js";import{max as s,abs as e,Vec4 as i}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{DomainRangeConfig as p}from"./LocalShader.js";import{invertValue as m,getRangeClipFactor as d,roundOutput as n}from"./math.js";import{MultiRasterMixin as u}from"./MultiRasterMixin.js";class h extends(u(a)){constructor(){super(...arguments),this.isOutputRounded=!1}_process(t){const{a:o,b:r,alpha:a}=this._getRasterValues(t);let p=o.subtract(r);"relative-difference"===this.method&&(p=p.multiply(m(s(e(o),e(r)))));const u=d(p,this.domainRangeConfig.domainRange),h=new i(p,p,p,a).multiply(u);return this.isOutputRounded?n(h):h}}t([o],h.prototype,"method",void 0),t([o],h.prototype,"isOutputRounded",void 0),t([r(p)],h.prototype,"domainRangeConfig",void 0);export{h as ComputeChangeShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{define as o,uniform as e}from"../../../../GraphShaderModule.js";import{max as r,abs as s,Vec4 as i}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{DomainRangeConfig as p}from"./LocalShader.js";import{invertValue as m,getRangeClipFactor as d,roundOutput as n}from"./math.js";import{MultiRasterMixin as u}from"./MultiRasterMixin.js";class h extends(u(a)){constructor(){super(...arguments),this.type="ComputeChangeShader",this.isOutputRounded=!1}_process(t){const{a:o,b:e,alpha:a}=this._getRasterValues(t);let p=o.subtract(e);"relative-difference"===this.method&&(p=p.multiply(m(r(s(o),s(e)))));const u=d(p,this.domainRangeConfig.domainRange),h=new i(p,p,p,a).multiply(u);return this.isOutputRounded?n(h):h}}t([o],h.prototype,"method",void 0),t([o],h.prototype,"isOutputRounded",void 0),t([e(p)],h.prototype,"domainRangeConfig",void 0);export{h as ComputeChangeShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,UniformGroup as e}from"../../../../GraphShaderModule.js";import{Float as r,cond as i,greaterThan as o,equal as d,sign as n,Vec3 as a,Vec4 as p}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as l}from"./BaseRasterProcessorShader.js";import{roundOutput as m}from"./math.js";class f extends e{}t([s(r)],f.prototype,"contrastOffset",void 0),t([s(r)],f.prototype,"brightnessOffset",void 0);class c extends l{_process(t){const{rgb:s,a:e}=this._getPixel(t),{contrastOffset:l,brightnessOffset:f}=this.contrastBrightnessConfig,c=new r(255),h=new r(128),u=s.multiply(200),g=c.multiply(100),y=c.multiply(2).multiply(f),w=u.subtract(g).add(y),b=i([d(l,new r(-100)),new a(h)],[d(l,new r(100)),n(w).add(1).divide(2).multiply(c)],[o(l,new r(0)),w.divide(new r(100).subtract(l).multiply(2)).add(h)],[!0,w.multiply(l.add(100)).divide(2e4).add(h)]);return m(new p(b,e))}}t([s(f)],c.prototype,"contrastBrightnessConfig",void 0);export{c as ContrastBrightnessShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,UniformGroup as e}from"../../../../GraphShaderModule.js";import{Float as r,cond as o,greaterThan as i,equal as n,sign as d,Vec3 as a,Vec4 as p}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as l}from"./BaseRasterProcessorShader.js";import{roundOutput as m}from"./math.js";class f extends e{}t([s(r)],f.prototype,"contrastOffset",void 0),t([s(r)],f.prototype,"brightnessOffset",void 0);class h extends l{constructor(){super(...arguments),this.type="ContrastBrightnessShader"}_process(t){const{rgb:s,a:e}=this._getPixel(t),{contrastOffset:l,brightnessOffset:f}=this.contrastBrightnessConfig,h=new r(255),c=new r(128),u=s.multiply(200),g=h.multiply(100),y=h.multiply(2).multiply(f),w=u.subtract(g).add(y),b=o([n(l,new r(-100)),new a(c)],[n(l,new r(100)),d(w).add(1).divide(2).multiply(h)],[i(l,new r(0)),w.divide(new r(100).subtract(l).multiply(2)).add(c)],[!0,w.multiply(l.add(100)).divide(2e4).add(c)]);return m(new p(b,e))}}t([s(f)],h.prototype,"contrastBrightnessConfig",void 0);export{h as ContrastBrightnessShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,define as e,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray2D as s,Float as i,Vec2 as n,reduce2D as l,Vec4 as a,texture2D as p,clamp as c}from"../../../../graph/glsl.js";import{mirror as m}from"../surface.js";import{BaseRasterProcessorShader as u}from"./BaseRasterProcessorShader.js";class d extends r{}o([t(s.ofType(i,5,5,!0))],d.prototype,"kernel",void 0),o([t(n)],d.prototype,"clampRange",void 0);class g extends u{constructor(){super(...arguments),this.rows=3,this.cols=3}_process(o){const{rows:t,cols:e}=this,r=new n(Math.floor(t/2),Math.floor(e/2)),{texture:s,srcImageSize:u}=this.config,d=new i(1).divide(u),{kernel:g}=this.convolutionConfig,f=l(g,{initialValue:new a(0,0,0,1),xRange:[0,t],yRange:[0,e],callback:(t,e,l,c)=>{const u=new n(new i(l),new i(c)).subtract(r).multiply(d),g=p(s,m(o.add(u))),f=g.rgb.multiply(e).add(t.rgb),h=g.a.multiply(t.a);return new a(f,h)}}),{clampRange:h}=this.convolutionConfig;return new a(c(f.rgb,h.x,h.y),1).multiply(f.a)}}o([e],g.prototype,"rows",void 0),o([e],g.prototype,"cols",void 0),o([t(d)],g.prototype,"convolutionConfig",void 0);export{g as ConvolutionShader};
5
+ import{_ as o}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,define as e,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray2D as s,Float as i,Vec2 as n,reduce2D as l,Vec4 as a,texture2D as p,clamp as c}from"../../../../graph/glsl.js";import{mirror as u}from"../surface.js";import{BaseRasterProcessorShader as d}from"./BaseRasterProcessorShader.js";class m extends r{}o([t(s.ofType(i,5,5,!0))],m.prototype,"kernel",void 0),o([t(n)],m.prototype,"clampRange",void 0);class h extends d{constructor(){super(...arguments),this.type="ConvolutionShader",this.rows=3,this.cols=3}_process(o){const{rows:t,cols:e}=this,r=new n(Math.floor(t/2),Math.floor(e/2)),{texture:s,srcImageSize:d}=this.config,m=new i(1).divide(d),{kernel:h}=this.convolutionConfig,g=l(h,{initialValue:new a(0,0,0,1),xRange:[0,t],yRange:[0,e],callback:(t,e,l,c)=>{const d=new n(new i(l),new i(c)).subtract(r).multiply(m),h=p(s,u(o.add(d))),g=h.rgb.multiply(e).add(t.rgb),f=h.a.multiply(t.a);return new a(g,f)}}),{clampRange:f}=this.convolutionConfig;return new a(c(g.rgb,f.x,f.y),1).multiply(g.a)}}o([e],h.prototype,"rows",void 0),o([e],h.prototype,"cols",void 0),o([t(m)],h.prototype,"convolutionConfig",void 0);export{h as ConvolutionShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,define as e,UniformGroup as s}from"../../../../GraphShaderModule.js";import{negate as i,dot as o,Vec3 as a,Vec4 as d,Float as l}from"../../../../graph/glsl.js";import{getSurfaceValues as u}from"../surface.js";import{BaseRasterProcessorShader as p}from"./BaseRasterProcessorShader.js";class c extends s{}t([r(l)],c.prototype,"zlFactor",void 0);class m extends p{_process(t){const{texture:r}=this.config,e=u(r,t,this.config.srcImageSize),s=e[3].add(e[5]).multiply(.5).subtract(e[4]),l=e[1].add(e[7]).multiply(.5).subtract(e[4]),{zlFactor:p}=this.curvatureConfig,{curvatureType:c}=this;let m;if("standard"===c)m=i(p).multiply(s.add(l));else{const t=e[2].subtract(e[0]).add(e[6]).subtract(e[8]).divide(4),r=e[5].subtract(e[3]).divide(2),d=e[1].subtract(e[7]).divide(2),u=r.multiply(r),n=d.multiply(d),y=r.multiply(d),f=p.divide(u.add(n));m="profile"===c?o(new a(s,l,t),new a(u,n,y)).multiply(f):o(new a(s,l,i(t)),new a(n,u,y)).multiply(i(f))}return new d(m,m,m,e[9])}}t([e],m.prototype,"curvatureType",void 0),t([r(c)],m.prototype,"curvatureConfig",void 0);export{m as CurvatureShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,define as e,UniformGroup as s}from"../../../../GraphShaderModule.js";import{negate as i,dot as o,Vec3 as a,Vec4 as u,Float as d}from"../../../../graph/glsl.js";import{getSurfaceValues as p}from"../surface.js";import{BaseRasterProcessorShader as l}from"./BaseRasterProcessorShader.js";class c extends s{}t([r(d)],c.prototype,"zlFactor",void 0);class m extends l{constructor(){super(...arguments),this.type="CurvatureShader"}_process(t){const{texture:r}=this.config,e=p(r,t,this.config.srcImageSize),s=e[3].add(e[5]).multiply(.5).subtract(e[4]),d=e[1].add(e[7]).multiply(.5).subtract(e[4]),{zlFactor:l}=this.curvatureConfig,{curvatureType:c}=this;let m;if("standard"===c)m=i(l).multiply(s.add(d));else{const t=e[2].subtract(e[0]).add(e[6]).subtract(e[8]).divide(4),r=e[5].subtract(e[3]).divide(2),u=e[1].subtract(e[7]).divide(2),p=r.multiply(r),n=u.multiply(u),y=r.multiply(u),f=l.divide(p.add(n));m="profile"===c?o(new a(s,d,t),new a(p,n,y)).multiply(f):o(new a(s,d,i(t)),new a(n,p,y)).multiply(i(f))}return new u(m,m,m,e[9])}}t([e],m.prototype,"curvatureType",void 0),t([r(c)],m.prototype,"curvatureConfig",void 0);export{m as CurvatureShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,UniformGroup as s}from"../../../../GraphShaderModule.js";import{Vec4 as e,Mat3 as o}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";class n extends s{}t([r(o)],n.prototype,"bandIndexMat3",void 0);class d extends a{_process(t){const r=this._getPixel(t),s=this.extractBandConfig.bandIndexMat3.multiply(r.rgb);return new e(s,r.a)}}t([r(n)],d.prototype,"extractBandConfig",void 0);export{d as ExtractBandShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,UniformGroup as s}from"../../../../GraphShaderModule.js";import{Vec4 as e,Mat3 as o}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";class n extends s{}t([r(o)],n.prototype,"bandIndexMat3",void 0);class d extends a{constructor(){super(...arguments),this.type="ExtractBandShader"}_process(t){const r=this._getPixel(t),s=this.extractBandConfig.bandIndexMat3.multiply(r.rgb);return new e(s,r.a)}}t([r(n)],d.prototype,"extractBandConfig",void 0);export{d as ExtractBandShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as e,define as r,UniformGroup as s}from"../../../../GraphShaderModule.js";import{step as a,Float as n,mix as o,Vec4 as i,clamp as l,Vec2 as u,texture2D as c,sqrt as m,max as p,min as d,Int as w,block as b}from"../../../../graph/glsl.js";import{mirror as g}from"../surface.js";import{BaseRasterProcessorShader as h}from"./BaseRasterProcessorShader.js";import{invertValue as y}from"./math.js";class f extends s{}t([e(u)],f.prototype,"clampRange",void 0);class _ extends h{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fill=!1}_process(t){const e=this._process1(t),r=a(new n(1),e.a);if(!this.fill)return this._clamp(e.rgb,r);const s=this._getPixel(t),i=o(e.rgb,s.rgb,s.a);return this._clamp(i,r)}_clamp(t,e){const{clampRange:r}=this.focalStatisticsConfig;return new i(l(t,r.x,r.y),1).multiply(e)}_process1(t){const{texture:e,srcImageSize:r}=this.config,{rows:s,cols:a}=this,o=new u(Math.floor(s/2),Math.floor(a/2)),l=new n(1).divide(r),w=this._getPixel(t),{statisticsType:b}=this,h="min"===b||"max"===b?new i(w.rgb,0):new i(0,0,0,0);switch(b){case"min":return this._stat(s,a,h,((r,s,a)=>{const m=new u(new n(s),new n(a)).subtract(o).multiply(l),p=c(e,g(t.add(m))),w=d(r.rgb,p.rgb);return new i(w,r.a.add(p.a))}));case"max":return this._stat(s,a,h,((r,s,a)=>{const m=new u(new n(s),new n(a)).subtract(o).multiply(l),d=c(e,g(t.add(m))),w=p(r.rgb,d.rgb);return new i(w,r.a.add(d.a))}));case"mean":{const r=this._stat(s,a,h,((r,s,a)=>{const m=new u(new n(s),new n(a)).subtract(o).multiply(l),p=c(e,g(t.add(m))),d=r.rgb.add(p.rgb.multiply(p.a));return new i(d,r.a.add(p.a))})),m=r.rgb.multiply(y(r.a));return new i(m,r.a)}case"stddev":{const r=this._stat(s,a,h,((r,s,a)=>{const m=new u(new n(s),new n(a)).subtract(o).multiply(l),p=c(e,g(t.add(m))),d=r.rgb.add(p.rgb.multiply(p.a));return new i(d,r.a.add(p.a))})),p=this._stat(s,a,h,((r,s,a)=>{const m=new u(new n(s),new n(a)).subtract(o).multiply(l),p=c(e,g(t.add(m))),d=r.rgb.add(p.a.multiply(p.rgb).multiply(p.rgb));return new i(d,r.a.add(p.a))})),d=y(p.a),w=m(p.subtract(r.multiply(r).multiply(d)).multiply(d));return new i(w.rgb,r.a)}default:return w}}_stat(t=3,e=3,r,s){const a=new w(0).setMutable().setDebugName("StatColIterator"),n=new w(0).setMutable().setDebugName("StatRowIterator"),o=r.setMutable().setDebugName("StatAccumulator"),l=s(o,a,n).setDebugName("StatPredicate"),u=b({iterX:a,iterY:n,accumulator:o},i,l,(({out:r,iterX:s,iterY:a,accumulator:n,subgraph:o})=>`\n for (${a} = 0; ${a} < ${t}; ${a}++) {\n for (${s} = 0; ${s} < ${e}; ${s}++) {\n \n ${o.body}\n \n ${n} = ${o.varName};\n }\n }\n ${r} = ${n};\n `)).setDebugName("statBody");return u}}t([r],_.prototype,"rows",void 0),t([r],_.prototype,"cols",void 0),t([r],_.prototype,"statisticsType",void 0),t([r],_.prototype,"fill",void 0),t([e(f)],_.prototype,"focalStatisticsConfig",void 0);export{_ as FocalStatisticsShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as e,define as r,UniformGroup as s}from"../../../../GraphShaderModule.js";import{step as a,Float as o,mix as n,Vec4 as i,clamp as l,Vec2 as c,texture2D as u,sqrt as p,max as m,min as d,Int as w,block as b}from"../../../../graph/glsl.js";import{mirror as g}from"../surface.js";import{BaseRasterProcessorShader as h}from"./BaseRasterProcessorShader.js";import{invertValue as y}from"./math.js";class f extends s{}t([e(c)],f.prototype,"clampRange",void 0);class _ extends h{constructor(){super(...arguments),this.type="FocalStatisticsShader",this.rows=3,this.cols=3,this.fill=!1}_process(t){const e=this._process1(t),r=a(new o(1),e.a);if(!this.fill)return this._clamp(e.rgb,r);const s=this._getPixel(t),i=n(e.rgb,s.rgb,s.a);return this._clamp(i,r)}_clamp(t,e){const{clampRange:r}=this.focalStatisticsConfig;return new i(l(t,r.x,r.y),1).multiply(e)}_process1(t){const{texture:e,srcImageSize:r}=this.config,{rows:s,cols:a}=this,n=new c(Math.floor(s/2),Math.floor(a/2)),l=new o(1).divide(r),w=this._getPixel(t),{statisticsType:b}=this,h="min"===b||"max"===b?new i(w.rgb,0):new i(0,0,0,0);switch(b){case"min":return this._stat(s,a,h,((r,s,a)=>{const p=new c(new o(s),new o(a)).subtract(n).multiply(l),m=u(e,g(t.add(p))),w=d(r.rgb,m.rgb);return new i(w,r.a.add(m.a))}));case"max":return this._stat(s,a,h,((r,s,a)=>{const p=new c(new o(s),new o(a)).subtract(n).multiply(l),d=u(e,g(t.add(p))),w=m(r.rgb,d.rgb);return new i(w,r.a.add(d.a))}));case"mean":{const r=this._stat(s,a,h,((r,s,a)=>{const p=new c(new o(s),new o(a)).subtract(n).multiply(l),m=u(e,g(t.add(p))),d=r.rgb.add(m.rgb.multiply(m.a));return new i(d,r.a.add(m.a))})),p=r.rgb.multiply(y(r.a));return new i(p,r.a)}case"stddev":{const r=this._stat(s,a,h,((r,s,a)=>{const p=new c(new o(s),new o(a)).subtract(n).multiply(l),m=u(e,g(t.add(p))),d=r.rgb.add(m.rgb.multiply(m.a));return new i(d,r.a.add(m.a))})),m=this._stat(s,a,h,((r,s,a)=>{const p=new c(new o(s),new o(a)).subtract(n).multiply(l),m=u(e,g(t.add(p))),d=r.rgb.add(m.a.multiply(m.rgb).multiply(m.rgb));return new i(d,r.a.add(m.a))})),d=y(m.a),w=p(m.subtract(r.multiply(r).multiply(d)).multiply(d));return new i(w.rgb,r.a)}default:return w}}_stat(t=3,e=3,r,s){const a=new w(0).setMutable().setDebugName("StatColIterator"),o=new w(0).setMutable().setDebugName("StatRowIterator"),n=r.setMutable().setDebugName("StatAccumulator"),l=s(n,a,o).setDebugName("StatPredicate"),c=b({iterX:a,iterY:o,accumulator:n},i,l,(({out:r,iterX:s,iterY:a,accumulator:o,subgraph:n})=>`\n for (${a} = 0; ${a} < ${t}; ${a}++) {\n for (${s} = 0; ${s} < ${e}; ${s}++) {\n \n ${n.body}\n \n ${o} = ${n.varName};\n }\n }\n ${r} = ${o};\n `)).setDebugName("statBody");return c}}t([r],_.prototype,"rows",void 0),t([r],_.prototype,"cols",void 0),t([r],_.prototype,"statisticsType",void 0),t([r],_.prototype,"fill",void 0),t([e(f)],_.prototype,"focalStatisticsConfig",void 0);export{_ as FocalStatisticsShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,UniformGroup as e}from"../../../../GraphShaderModule.js";import{dot as o,Vec4 as t,Vec3 as a}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as i}from"./BaseRasterProcessorShader.js";class p extends e{}s([r(a)],p.prototype,"weights",void 0);class g extends i{_process(s){const r=this._getPixel(s),{weights:e}=this.grayscaleConfig,a=o(e,r.rgb);return new t(a,a,a,r.a)}}s([r(p)],g.prototype,"grayscaleConfig",void 0);export{g as GrayscaleShader};
5
+ import{_ as s}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r,UniformGroup as e}from"../../../../GraphShaderModule.js";import{dot as o,Vec4 as t,Vec3 as a}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as i}from"./BaseRasterProcessorShader.js";class p extends e{}s([r(a)],p.prototype,"weights",void 0);class c extends i{constructor(){super(...arguments),this.type="GrayscaleShader"}_process(s){const r=this._getPixel(s),{weights:e}=this.grayscaleConfig,a=o(e,r.rgb);return new t(a,a,a,r.a)}}s([r(p)],c.prototype,"grayscaleConfig",void 0);export{c as GrayscaleShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../../../../../../../../../chunks/tslib.es6.js";import{define as i,uniform as r}from"../../../../GraphShaderModule.js";import{Vec4 as o}from"../../../../graph/glsl.js";import{getSurfaceValues as t,hillshade as e,HillshadeConfig as l}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";class p extends a{constructor(){super(...arguments),this.isMultidirectional=!1}_process(s){const{texture:i}=this.config,r=t(i,s,this.config.srcImageSize),l=e(r,this.hillshadeConfig,this.isMultidirectional);return new o(l.rgb.multiply(255),l.a)}}s([i],p.prototype,"isMultidirectional",void 0),s([r(l)],p.prototype,"hillshadeConfig",void 0);export{p as HillshadeShader};
5
+ import{_ as s}from"../../../../../../../../../chunks/tslib.es6.js";import{define as i,uniform as r}from"../../../../GraphShaderModule.js";import{Vec4 as t}from"../../../../graph/glsl.js";import{getSurfaceValues as o,hillshade as e,HillshadeConfig as l}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";class h extends a{constructor(){super(...arguments),this.type="HillshadeShader",this.isMultidirectional=!1}_process(s){const{texture:i}=this.config,r=o(i,s,this.config.srcImageSize),l=e(r,this.hillshadeConfig,this.isMultidirectional);return new t(l.rgb.multiply(255),l.a)}}s([i],h.prototype,"isMultidirectional",void 0),s([r(l)],h.prototype,"hillshadeConfig",void 0);export{h as HillshadeShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{UniformGroup as a,uniform as s,define as n}from"../../../../GraphShaderModule.js";import{Vec4 as t,float as r,equal as i,Float as o,notEqual as c,lessThanEqual as b,lessThan as l,greaterThanEqual as u,greaterThan as w,xor as p,or as k,and as h,bitXor as m,Int as d,bitNot as g,bitRShift as _,bitShift as y,bitOr as f,bitAnd as R,tanh as v,tan as x,sinh as A,sin as O,cosh as j,cos as q,atan as B,ifElse as T,atanh as Z,asinh as M,asin as N,acosh as C,acos as S,abs as V,negate as G,mod as P,sign as z,floor as D,ceil as E,pow as F,exp as H,log2 as I,log as J,sqrt as K,mix as L,Vec2 as Q}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as U}from"./BaseRasterProcessorShader.js";import{getRangeClipFactor as W,roundOutput as X,invertValue as Y}from"./math.js";import{MultiRasterMixin as $}from"./MultiRasterMixin.js";class ee extends a{}e([s(Q)],ee.prototype,"domainRange",void 0);class ae extends($(U)){constructor(){super(...arguments),this.isOutputRounded=!1}_process(e){if("conditional"===this.operationName)return this._conditional(e);const{a,b:s,alpha:n}=this._getRasterValues(e),{value:t,alpha:r}=this._compute(a,s,n);return this._processResult(t,r)}_processResult(e,a){const s=W(e,this.domainRangeConfig.domainRange),n=new t(e,e,e,a).multiply(s);return this.isOutputRounded?X(n):n}_compute(e,a,s){const{operationName:n}=this;let t;switch(n){case"plus":t=e.add(a);break;case"minus":t=e.subtract(a);break;case"times":t=e.multiply(a);break;case"divide":case"floatdivide":t=e.multiply(Y(a)),s=s.multiply(r(V(z(a))));break;case"floordivide":t=D(e.multiply(Y(a))),s=s.multiply(r(V(z(a))));break;case"square":t=e.multiply(e);break;case"sqrt":t=K(e);break;case"power":t=F(e,a);break;case"ln":t=T(w(e,new o(0)),J(e),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"log10":t=T(w(e,new o(0)),I(e).multiply(Y(I(new o(10)))),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"log2":t=T(w(e,new o(0)),I(e),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"exp":t=H(e);break;case"exp10":t=F(new o(10),e);break;case"exp2":t=F(new o(2),e);break;case"rounddown":t=D(e);break;case"roundup":t=E(e);break;case"int":t=z(e).multiply(D(V(e)));break;case"mod":t=P(e,a);break;case"negate":t=G(e);break;case"abs":t=V(e);break;case"acos":{const a=this._isAbsBiggerThanOne(e);t=T(a,new o(0),S(e)),s=T(a,new o(0),s);break}case"acosh":t=C(e);break;case"asin":{const a=this._isAbsBiggerThanOne(e);t=T(a,new o(0),N(e)),s=T(a,new o(0),s);break}case"asinh":t=M(e);break;case"atan":t=B(e);break;case"atanh":{const a=this._isAbsBiggerThanOne(e);t=T(a,new o(0),Z(e)),s=T(a,new o(0),s);break}case"atan2":t=B(e,a);break;case"cos":t=q(e);break;case"cosh":t=j(e);break;case"sin":t=O(e);break;case"sinh":t=A(e);break;case"tan":t=x(e);break;case"tanh":t=v(e);break;case"bitwiseand":t=new o(R(new d(e),new d(a)));break;case"bitwiseor":t=new o(f(new d(e),new d(a)));break;case"bitwiseleftshift":t=new o(y(new d(e),new d(a)));break;case"bitwiserightshift":t=new o(_(new d(e),new d(a)));break;case"bitwisenot":t=new o(g(new d(e)));break;case"bitwisexor":t=new o(m(new d(e),new d(a)));break;case"booleanand":t=r(h(c(e,new o(0)),c(a,new o(0))));break;case"booleanor":t=r(k(c(e,new o(0)),c(a,new o(0))));break;case"booleannot":t=r(i(e,new o(0)));break;case"booleanxor":t=r(p(c(e,new o(0)),c(a,new o(0))));break;case"greaterthan":t=r(w(e,a));break;case"greaterthanequal":t=r(u(e,a));break;case"lessthan":t=r(l(e,a));break;case"lessthanequal":t=r(b(e,a));break;case"equalto":t=r(i(e,a));break;case"notequal":t=r(c(e,a));break;case"isnull":t=r(i(s,new o(0))),s=new o(1);break;case"setnull":{const n=r(i(e,new o(0)));t=n.multiply(a),s=s.multiply(n);break}default:t=e}return{value:t,alpha:s}}_conditional(e){const{a,b:s,c:n,alpha:t}=this._getRasterValues(e),r=new o(V(z(a))),i=L(n,s,r);return this._processResult(i,t)}_isAboveZero(e){return r(w(e,new o(0)))}_isAbsBiggerThanOne(e){return w(V(e),new o(1))}}e([n],ae.prototype,"operationName",void 0),e([n],ae.prototype,"isOutputRounded",void 0),e([s(ee)],ae.prototype,"domainRangeConfig",void 0);export{ee as DomainRangeConfig,ae as LocalShader};
5
+ import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{UniformGroup as a,uniform as s,define as t}from"../../../../GraphShaderModule.js";import{Vec4 as n,float as r,equal as i,Float as o,notEqual as c,lessThanEqual as b,lessThan as l,greaterThanEqual as u,greaterThan as p,xor as w,or as k,and as h,bitXor as m,Int as d,bitNot as g,bitRShift as y,bitShift as _,bitOr as f,bitAnd as R,tanh as v,tan as x,sinh as A,sin as O,cosh as j,cos as q,atan as B,ifElse as T,atanh as Z,asinh as M,asin as N,acosh as S,acos as C,abs as V,negate as G,mod as L,sign as P,floor as z,ceil as D,pow as E,exp as F,log2 as H,log as I,sqrt as J,mix as K,Vec2 as Q}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as U}from"./BaseRasterProcessorShader.js";import{getRangeClipFactor as W,roundOutput as X,invertValue as Y}from"./math.js";import{MultiRasterMixin as $}from"./MultiRasterMixin.js";class ee extends a{}e([s(Q)],ee.prototype,"domainRange",void 0);class ae extends($(U)){constructor(){super(...arguments),this.type="LocalShader",this.isOutputRounded=!1}_process(e){if("conditional"===this.operationName)return this._conditional(e);const{a,b:s,alpha:t}=this._getRasterValues(e),{value:n,alpha:r}=this._compute(a,s,t);return this._processResult(n,r)}_processResult(e,a){const s=W(e,this.domainRangeConfig.domainRange),t=new n(e,e,e,a).multiply(s);return this.isOutputRounded?X(t):t}_compute(e,a,s){const{operationName:t}=this;let n;switch(t){case"plus":n=e.add(a);break;case"minus":n=e.subtract(a);break;case"times":n=e.multiply(a);break;case"divide":case"floatdivide":n=e.multiply(Y(a)),s=s.multiply(r(V(P(a))));break;case"floordivide":n=z(e.multiply(Y(a))),s=s.multiply(r(V(P(a))));break;case"square":n=e.multiply(e);break;case"sqrt":n=J(e);break;case"power":n=E(e,a);break;case"ln":n=T(p(e,new o(0)),I(e),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"log10":n=T(p(e,new o(0)),H(e).multiply(Y(H(new o(10)))),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"log2":n=T(p(e,new o(0)),H(e),new o(0)),s=s.multiply(this._isAboveZero(e));break;case"exp":n=F(e);break;case"exp10":n=E(new o(10),e);break;case"exp2":n=E(new o(2),e);break;case"rounddown":n=z(e);break;case"roundup":n=D(e);break;case"int":n=P(e).multiply(z(V(e)));break;case"mod":n=L(e,a);break;case"negate":n=G(e);break;case"abs":n=V(e);break;case"acos":{const a=this._isAbsBiggerThanOne(e);n=T(a,new o(0),C(e)),s=T(a,new o(0),s);break}case"acosh":n=S(e);break;case"asin":{const a=this._isAbsBiggerThanOne(e);n=T(a,new o(0),N(e)),s=T(a,new o(0),s);break}case"asinh":n=M(e);break;case"atan":n=B(e);break;case"atanh":{const a=this._isAbsBiggerThanOne(e);n=T(a,new o(0),Z(e)),s=T(a,new o(0),s);break}case"atan2":n=B(e,a);break;case"cos":n=q(e);break;case"cosh":n=j(e);break;case"sin":n=O(e);break;case"sinh":n=A(e);break;case"tan":n=x(e);break;case"tanh":n=v(e);break;case"bitwiseand":n=new o(R(new d(e),new d(a)));break;case"bitwiseor":n=new o(f(new d(e),new d(a)));break;case"bitwiseleftshift":n=new o(_(new d(e),new d(a)));break;case"bitwiserightshift":n=new o(y(new d(e),new d(a)));break;case"bitwisenot":n=new o(g(new d(e)));break;case"bitwisexor":n=new o(m(new d(e),new d(a)));break;case"booleanand":n=r(h(c(e,new o(0)),c(a,new o(0))));break;case"booleanor":n=r(k(c(e,new o(0)),c(a,new o(0))));break;case"booleannot":n=r(i(e,new o(0)));break;case"booleanxor":n=r(w(c(e,new o(0)),c(a,new o(0))));break;case"greaterthan":n=r(p(e,a));break;case"greaterthanequal":n=r(u(e,a));break;case"lessthan":n=r(l(e,a));break;case"lessthanequal":n=r(b(e,a));break;case"equalto":n=r(i(e,a));break;case"notequal":n=r(c(e,a));break;case"isnull":n=r(i(s,new o(0))),s=new o(1);break;case"setnull":{const t=r(i(e,new o(0)));n=t.multiply(a),s=s.multiply(t);break}default:n=e}return{value:n,alpha:s}}_conditional(e){const{a,b:s,c:t,alpha:n}=this._getRasterValues(e),r=new o(V(P(a))),i=K(t,s,r);return this._processResult(i,n)}_isAboveZero(e){return r(p(e,new o(0)))}_isAbsBiggerThanOne(e){return p(V(e),new o(1))}}e([t],ae.prototype,"operationName",void 0),e([t],ae.prototype,"isOutputRounded",void 0),e([s(ee)],ae.prototype,"domainRangeConfig",void 0);export{ee as DomainRangeConfig,ae as LocalShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as o}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as s,define as e,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray as i,Float as a,Vec3 as l,abs as p,sign as n,step as u}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as c}from"./BaseRasterProcessorShader.js";class m extends r{}t([s(i.ofType(a,6))],m.prototype,"includedRanges",void 0),t([s(i.ofType(a,o))],m.prototype,"noDataValues",void 0);class y extends c{constructor(){super(...arguments),this.isMultiband=!0}_process(t){const o=this._getPixel(t),s=this._computeNoDataFactor(o.r),e=this._computeRangeFactor(o.rgb);let r;if(this.isMultiband){const t=this._computeNoDataFactor(o.g),i=this._computeNoDataFactor(o.b),a=new l(s,t,i).multiply(e);r=a.x.multiply(a.y).multiply(a.z)}else r=s.multiply(e.x);return o.multiply(r)}_computeNoDataFactor(t){const{noDataValues:s}=this.maskConfig;let e=new l(1);for(let r=0;r<o/3;r++){const o=3*r,i=new l(s[o+0],s[o+1],s[o+2]),a=p(n(i.subtract(t)));e=e.multiply(a)}return e.x.multiply(e.y).multiply(e.z)}_computeRangeFactor(t){const{includedRanges:o}=this.maskConfig,s=new l(o[0],o[2],o[4]),e=new l(o[1],o[3],o[5]);return u(s,t).multiply(u(t,e))}}t([e],y.prototype,"isMultiband",void 0),t([s(m)],y.prototype,"maskConfig",void 0);export{y as MaskShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as o}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as s,define as e,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray as i,Float as a,Vec3 as l,abs as p,sign as n,step as u}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as c}from"./BaseRasterProcessorShader.js";class m extends r{}t([s(i.ofType(a,6))],m.prototype,"includedRanges",void 0),t([s(i.ofType(a,o))],m.prototype,"noDataValues",void 0);class y extends c{constructor(){super(...arguments),this.type="MaskShader",this.isMultiband=!0}_process(t){const o=this._getPixel(t),s=this._computeNoDataFactor(o.r),e=this._computeRangeFactor(o.rgb);let r;if(this.isMultiband){const t=this._computeNoDataFactor(o.g),i=this._computeNoDataFactor(o.b),a=new l(s,t,i).multiply(e);r=a.x.multiply(a.y).multiply(a.z)}else r=s.multiply(e.x);return o.multiply(r)}_computeNoDataFactor(t){const{noDataValues:s}=this.maskConfig;let e=new l(1);for(let r=0;r<o/3;r++){const o=3*r,i=new l(s[o+0],s[o+1],s[o+2]),a=p(n(i.subtract(t)));e=e.multiply(a)}return e.x.multiply(e.y).multiply(e.z)}_computeRangeFactor(t){const{includedRanges:o}=this.maskConfig,s=new l(o[0],o[2],o[4]),e=new l(o[1],o[3],o[5]);return u(s,t).multiply(u(t,e))}}t([e],y.prototype,"isMultiband",void 0),t([s(m)],y.prototype,"maskConfig",void 0);export{y as MaskShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,define as r,UniformGroup as o}from"../../../../GraphShaderModule.js";import{Vec4 as e,floor as a,Mat3 as i}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as d}from"./BaseRasterProcessorShader.js";import{invertValue as p}from"./math.js";class n extends o{}t([s(i)],n.prototype,"bandIndexMat3",void 0);class l extends d{constructor(){super(...arguments),this.scaled=!0}_process(t){const s=this._getPixel(t),{r,g:o}=this.ndviConfig.bandIndexMat3.multiply(s.rgb),i=r.subtract(o),d=r.add(o),n=i.multiply(p(d));if(!this.scaled)return new e(n,n,n,s.a);const l=a(n.multiply(100).add(100.5));return new e(l,l,l,s.a)}}t([r],l.prototype,"scaled",void 0),t([s(n)],l.prototype,"ndviConfig",void 0);export{l as NDVIShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as s,define as r,UniformGroup as e}from"../../../../GraphShaderModule.js";import{Vec4 as o,floor as a,Mat3 as i}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as d}from"./BaseRasterProcessorShader.js";import{invertValue as p}from"./math.js";class n extends e{}t([s(i)],n.prototype,"bandIndexMat3",void 0);class l extends d{constructor(){super(...arguments),this.type="NDVIShader",this.scaled=!0}_process(t){const s=this._getPixel(t),{r,g:e}=this.ndviConfig.bandIndexMat3.multiply(s.rgb),i=r.subtract(e),d=r.add(e),n=i.multiply(p(d));if(!this.scaled)return new o(n,n,n,s.a);const l=a(n.multiply(100).add(100.5));return new o(l,l,l,s.a)}}t([r],l.prototype,"scaled",void 0),t([s(n)],l.prototype,"ndviConfig",void 0);export{l as NDVIShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as o,define as a,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray as p,Float as s,mix as n,clamp as l,max as i,Vec4 as m,Vec3 as c,step as u,sign as d,dot as y,Vec2 as h}from"../../../../graph/glsl.js";import{oneMinus as f}from"../../utils.js";import{BaseRasterProcessorShader as g}from"./BaseRasterProcessorShader.js";class w extends r{}e([o(p.ofType(s,3*t))],w.prototype,"rangeMaps",void 0),e([o(p.ofType(s,2*t))],w.prototype,"noDataRanges",void 0),e([o(s)],w.prototype,"unmatchMask",void 0),e([o(s)],w.prototype,"replacementValue",void 0),e([o(h)],w.prototype,"clampRange",void 0);class M extends g{_process(e){const t=this._getPixel(e),{rrr:o}=t,{mapValue:a,includeMask:r}=this._computeMapValue(o),{unmatchMask:p,clampRange:s,replacementValue:c}=this.remapConfig,u=this.replaceUnmatched?c:p.multiply(t.r),d=n(u,a,r),y=l(d,s.x,s.y),h=this._computeNoDataFactor(o).multiply(i(p,r));return new m(y,y,y,t.a).multiply(h)}_computeMapValue(e){const{rangeMaps:o}=this.remapConfig;let a=new c(0,0,0),r=new s(0);for(let p=0;p<t/3;p++){const t=9*p,s=new c(o[t],o[t+3],o[t+6]),l=new c(o[t+1],o[t+4],o[t+7]),i=u(s,e).multiply(u(e,l)),m=new c(o[t+2],o[t+5],o[t+8]);r=n(r,m.x,i.x),r=n(r,m.y,i.y),r=n(r,m.z,i.z),a=a.add(i)}return{mapValue:r,includeMask:d(y(a,new c(1,1,1)))}}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let a=new c(0,0,0);for(let r=0;r<t/3;r++){const t=6*r,p=new c(o[t],o[t+2],o[t+4]),s=new c(o[t+1],o[t+3],o[t+5]);a=a.add(u(p,e).multiply(u(e,s)))}return f(d(y(a,new c(1,1,1))))}}e([o(w)],M.prototype,"remapConfig",void 0),e([a],M.prototype,"replaceUnmatched",void 0);export{M as RemapShader};
5
+ import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/support/rasterFunctions/pixelUtils.js";import{uniform as o,define as a,UniformGroup as r}from"../../../../GraphShaderModule.js";import{FixedArray as p,Float as s,mix as n,clamp as l,max as i,Vec4 as m,Vec3 as c,step as u,sign as d,dot as y,Vec2 as h}from"../../../../graph/glsl.js";import{oneMinus as f}from"../../utils.js";import{BaseRasterProcessorShader as g}from"./BaseRasterProcessorShader.js";class w extends r{}e([o(p.ofType(s,3*t))],w.prototype,"rangeMaps",void 0),e([o(p.ofType(s,2*t))],w.prototype,"noDataRanges",void 0),e([o(s)],w.prototype,"unmatchMask",void 0),e([o(s)],w.prototype,"replacementValue",void 0),e([o(h)],w.prototype,"clampRange",void 0);class M extends g{constructor(){super(...arguments),this.type="RemapShader"}_process(e){const t=this._getPixel(e),{rrr:o}=t,{mapValue:a,includeMask:r}=this._computeMapValue(o),{unmatchMask:p,clampRange:s,replacementValue:c}=this.remapConfig,u=this.replaceUnmatched?c:p.multiply(t.r),d=n(u,a,r),y=l(d,s.x,s.y),h=this._computeNoDataFactor(o).multiply(i(p,r));return new m(y,y,y,t.a).multiply(h)}_computeMapValue(e){const{rangeMaps:o}=this.remapConfig;let a=new c(0,0,0),r=new s(0);for(let p=0;p<t/3;p++){const t=9*p,s=new c(o[t],o[t+3],o[t+6]),l=new c(o[t+1],o[t+4],o[t+7]),i=u(s,e).multiply(u(e,l)),m=new c(o[t+2],o[t+5],o[t+8]);r=n(r,m.x,i.x),r=n(r,m.y,i.y),r=n(r,m.z,i.z),a=a.add(i)}return{mapValue:r,includeMask:d(y(a,new c(1,1,1)))}}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let a=new c(0,0,0);for(let r=0;r<t/3;r++){const t=6*r,p=new c(o[t],o[t+2],o[t+4]),s=new c(o[t+1],o[t+3],o[t+5]);a=a.add(u(p,e).multiply(u(e,s)))}return f(d(y(a,new c(1,1,1))))}}e([o(w)],M.prototype,"remapConfig",void 0),e([a],M.prototype,"replaceUnmatched",void 0);export{M as RemapShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BaseRasterColorizerShader as e}from"../BaseRasterColorizerShader.js";class r extends e{_colorize(e){return this._getPixel(e)}}export{r as ReprojectShader};
5
+ import{BaseRasterColorizerShader as e}from"../BaseRasterColorizerShader.js";class r extends e{constructor(){super(...arguments),this.type="ReprojectShader"}_colorize(e){return this._getPixel(e)}}export{r as ReprojectShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as r}from"../../../../GraphShaderModule.js";import{clamp as s,Float as e,Vec4 as i,Vec3 as t}from"../../../../graph/glsl.js";import{rgb2hsv as l,hsv2rgb as m}from"../colorConversion.js";import{lookupColor as p,ColormapConfig as a}from"../lut.js";import{HillshadeShader as n}from"./HillshadeShader.js";class d extends n{_process(o){const r=super._process(o),{minValue:a,maxValue:n}=this.hillshadeConfig,d=this._getPixel(o),h=n.subtract(a),u=d.r.subtract(a),c=s(u.divide(h),new e(0),new e(1)),f=p(new i(c,c,c,1),new e(255),this.colormapConfig),x=l(f.xyz),g=m(new t(x.xy,r.x.divide(255))).multiply(255);return new i(g,f.a.multiply(r.a))}}o([r(a)],d.prototype,"colormapConfig",void 0);export{d as ShadedReliefShader};
5
+ import{_ as r}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as e}from"../../../../GraphShaderModule.js";import{clamp as o,Float as s,Vec4 as t,Vec3 as i}from"../../../../graph/glsl.js";import{rgb2hsv as l,hsv2rgb as p}from"../colorConversion.js";import{lookupColor as a,ColormapConfig as m}from"../lut.js";import{HillshadeShader as n}from"./HillshadeShader.js";class d extends n{constructor(){super(...arguments),this.type="ShadedReliefShader"}_process(r){const e=super._process(r),{minValue:m,maxValue:n}=this.hillshadeConfig,d=this._getPixel(r),h=n.subtract(m),u=d.r.subtract(m),c=o(u.divide(h),new s(0),new s(1)),f=a(new t(c,c,c,1),new s(255),this.colormapConfig),x=l(f.xyz),g=p(new i(x.xy,e.x.divide(255))).multiply(255);return new t(g,f.a.multiply(e.a))}}r([e(m)],d.prototype,"colormapConfig",void 0);export{d as ShadedReliefShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as c,computeDeltaZ as m}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class y extends i{}e([t(u)],y.prototype,"pixelSizePower",void 0),e([t(u)],y.prototype,"pixelSizeFactor",void 0),e([t(u)],y.prototype,"zFactor",void 0),e([t(p)],y.prototype,"cellSize",void 0);class h extends a{constructor(){super(...arguments),this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),{texture:y}=this.config,h=c(y,e,this.config.srcImageSize),{x:f,y:x}=m(h,a),z=s(f.multiply(f).add(x.multiply(x))),S=this.percentRise?z.multiply(100):l(z).multiply(57.2957795),v=new d(S,S,S,h[9]);return this.isOutputRounded?n(v):v}}e([o],h.prototype,"isOutputRounded",void 0),e([o],h.prototype,"percentRise",void 0),e([t(y)],h.prototype,"slopeConfig",void 0);export{h as SlopeShader};
5
+ import{_ as e}from"../../../../../../../../../chunks/tslib.es6.js";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as c,computeDeltaZ as m}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class h extends i{}e([t(u)],h.prototype,"pixelSizePower",void 0),e([t(u)],h.prototype,"pixelSizeFactor",void 0),e([t(u)],h.prototype,"zFactor",void 0),e([t(p)],h.prototype,"cellSize",void 0);class y extends a{constructor(){super(...arguments),this.type="SlopeShader",this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),{texture:h}=this.config,y=c(h,e,this.config.srcImageSize),{x:f,y:S}=m(y,a),x=s(f.multiply(f).add(S.multiply(S))),z=this.percentRise?x.multiply(100):l(x).multiply(57.2957795),v=new d(z,z,z,y[9]);return this.isOutputRounded?n(v):v}}e([o],y.prototype,"isOutputRounded",void 0),e([o],y.prototype,"percentRise",void 0),e([t(h)],y.prototype,"slopeConfig",void 0);export{y as SlopeShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{define as s,uniform as o}from"../../../../GraphShaderModule.js";import{Vec4 as r}from"../../../../graph/glsl.js";import{stretch as i,StretchConfig as e}from"../stretch.js";import{BaseRasterProcessorShader as p}from"./BaseRasterProcessorShader.js";import{roundOutput as u}from"./math.js";class a extends p{constructor(){super(...arguments),this.isMultiband=!0,this.isOutputRounded=!1,this.useGamma=!1}_process(t){const s=this._getPixel(t);let o=i(s,this.stretchConfig,this.useGamma,1);return this.isMultiband||(o=new r(o.rrr,o.a)),this.isOutputRounded?u(o):o}}t([s],a.prototype,"isMultiband",void 0),t([s],a.prototype,"isOutputRounded",void 0),t([s],a.prototype,"useGamma",void 0),t([o(e)],a.prototype,"stretchConfig",void 0);export{a as StretchShader};
5
+ import{_ as t}from"../../../../../../../../../chunks/tslib.es6.js";import{define as s,uniform as r}from"../../../../GraphShaderModule.js";import{Vec4 as o}from"../../../../graph/glsl.js";import{stretch as e,StretchConfig as i}from"../stretch.js";import{BaseRasterProcessorShader as p}from"./BaseRasterProcessorShader.js";import{roundOutput as a}from"./math.js";class h extends p{constructor(){super(...arguments),this.type="StretchShader",this.isMultiband=!0,this.isOutputRounded=!1,this.useGamma=!1}_process(t){const s=this._getPixel(t);let r=e(s,this.stretchConfig,this.useGamma,1);return this.isMultiband||(r=new o(r.rrr,r.a)),this.isOutputRounded?a(r):r}}t([s],h.prototype,"isMultiband",void 0),t([s],h.prototype,"isOutputRounded",void 0),t([s],h.prototype,"useGamma",void 0),t([r(i)],h.prototype,"stretchConfig",void 0);export{h as StretchShader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as a,define as r,ComputeVertexInput as n,input as p}from"../../GraphShaderModule.js";import{abs as d,min as u,Float as y,floor as m,step as c,Vec3 as f,Mat3 as h,Vec2 as v,ifElse as w,equal as b,or as x,lessThanEqual as V,greaterThan as S,Bool as g,Vec4 as z,texture2D as j,smoothstep as R,Int as C,bitRShift as O,bitAnd as M}from"../../graph/glsl.js";import{FeatureVertexInput as L,FeatureFragmentInput as A,AFeatureShader as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as P,sdfFontSize as N,bitsetTextIsMapAligned as U,maxSdfDistance as _}from"../shaders/constants.js";import{distPointTriangle as k,failHittest as T}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as D}from"../shaders/utils.js";import{VisualVariableColor as B}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as q}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as F}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as G}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Z}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as K}from"../shaders/vvUtils.js";const Q=360/254;var X;!function(t){t[t.Color=0]="Color",t[t.Outline=1]="Outline",t[t.Halo=2]="Halo"}(X||(X={}));class Y extends L{}t([s(3,z)],Y.prototype,"color",void 0),t([s(4,v)],Y.prototype,"offset",void 0),t([s(5,v)],Y.prototype,"textureUV",void 0),t([s(6,y)],Y.prototype,"fontSize",void 0),t([s(7,y)],Y.prototype,"referenceSize",void 0),t([s(8,z)],Y.prototype,"outlineColor",void 0),t([s(9,z)],Y.prototype,"haloColor",void 0),t([s(10,v)],Y.prototype,"outlineAndHaloSize",void 0),t([s(11,v)],Y.prototype,"zoomRange",void 0),t([s(12,y)],Y.prototype,"clipAngle",void 0),t([s(13,z)],Y.prototype,"referenceSymbol",void 0);class $ extends n{}t([s(14,v)],$.prototype,"offsetNextVertex1",void 0),t([s(15,v)],$.prototype,"offsetNextVertex2",void 0);class tt extends A{}class et extends H{constructor(){super(...arguments),this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=X.Color,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e,o){const s=e.multiply(Q),l=d(this.view.rotation.subtract(s)),a=u(new y(360).subtract(l),l);let r=new y(0);const n=m(this.view.currentZoom.multiply(i)).divide(i),p=t.x,f=t.y,h=new y(1).subtract(c(p,n)).multiply(2),v=c(new y(90),a).multiply(2),w=new y(2).multiply(new y(1).subtract(c(n,f)));return r=r.add(o.multiply(h)),r=r.add(o.multiply(v)),r=r.add(w),r}vertex(t,e){const i=D(t.bitset,P),s=new y(1).subtract(i);let l=t.fontSize,a=l.divide(N);const r=this.textRenderPassType===X.Outline?t.outlineColor:this.textRenderPassType===X.Halo?t.haloColor:this._getVertexColor(t),n=this.isLabel?this.storage.getLabelVisibility(t.id):new y(1),p=this.isLabel?r.multiply(n):r,d=this.view.displayViewScreenMat3.multiply(new f(t.pos,1));let u=t.offset,m=new y(1),c=h.identity(),j=new v(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),a=J(this,t.id,s).divide(2),r=l.multiply(a.add(o));j=i.add(r),u=u.add(j)}else{m=J(this,t.id,t.referenceSize).divide(t.referenceSize),l=l.multiply(m),a=a.multiply(m),u=u.multiply(m),c=K(this,t.id),u=c.multiply(new f(u,0)).xy}const R=D(t.bitset,U),C=this._getViewRotationMatrix(R).multiply(new f(u,0));let O=this.isLabel?this.clipLabel(t.zoomRange,t.clipAngle,R):this.clip(t.id,t.zoomRange);O=this.isBackgroundPass?O.add(s.multiply(2)):O.add(i.multiply(2));let M=new y(0);if(this.textRenderPassType===X.Outline){O=O.add(w(b(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));M=new y(t.outlineAndHaloSize.x).divide(a).divide(_)}if(this.textRenderPassType===X.Halo){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);O=O.add(w(b(i,new y(0)),new y(2),new y(0)));M=i.add(e).divide(a).divide(_)}const L=this.isLabel?x(S(O,new y(1)),V(n,new y(0))):new g(!1);return{glPosition:new z(d.xy.add(C.xy),O,1),color:p,size:a,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.105*N).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:M,...this.maybeRunHittest(t,e,{vvSizeAdjustment:m,vvRotation:c,labelOffset:j,labelClipped:L})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicInfo.texture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=R(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){let a,r,n;this.isLabel?(a=new f(t.offset.add(s),0),r=new f(e.offsetNextVertex1.add(s),0),n=new f(e.offsetNextVertex2.add(s),0)):(a=o.multiply(new f(t.offset.multiply(i),0)),r=o.multiply(new f(e.offsetNextVertex1.multiply(i),0)),n=o.multiply(new f(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:p,tileMat3:d}=this.view,u=p.multiply(d).multiply(new f(t.pos,1)),y=u.add(d.multiply(a)).xy,m=u.add(d.multiply(r)).xy,c=u.add(d.multiply(n)).xy,h=k(this.hittestRequest.position,y.xy,m.xy,c.xy);return this.isLabel?w(l,T(this.hittestRequest),h):h}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new v(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.storage.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new g(!1))}if(this.visualVariableOpacity){const i=this.storage.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(B)],et.prototype,"visualVariableColor",void 0),t([l(q)],et.prototype,"visualVariableOpacity",void 0),t([l(E)],et.prototype,"visualVariableRotation",void 0),t([l(F)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],et.prototype,"visualVariableSizeScaleStops",void 0),t([l(G)],et.prototype,"visualVariableSizeStops",void 0),t([l(Z)],et.prototype,"visualVariableSizeUnitValue",void 0),t([a(I)],et.prototype,"mosaicInfo",void 0),t([r],et.prototype,"textRenderPassType",void 0),t([r],et.prototype,"isBackgroundPass",void 0),t([r],et.prototype,"isLabel",void 0),t([e(0,p(Y)),e(1,p($))],et.prototype,"vertex",null),t([e(0,p(tt))],et.prototype,"fragment",null);export{tt as TextFragmentInput,X as TextRenderPassType,et as TextShader,Y as TextVertexInput};
5
+ import{_ as t,a as e}from"../../../../../../../chunks/tslib.es6.js";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as a,define as r,ComputeVertexInput as n,input as p}from"../../GraphShaderModule.js";import{abs as d,min as u,Float as y,floor as m,step as c,Vec3 as h,Mat3 as f,Vec2 as v,ifElse as w,equal as b,or as x,lessThanEqual as V,greaterThan as S,Bool as g,Vec4 as z,texture2D as j,smoothstep as R,Int as C,bitRShift as O,bitAnd as M}from"../../graph/glsl.js";import{FeatureVertexInput as L,FeatureFragmentInput as A,AFeatureShader as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as P,sdfFontSize as N,bitsetTextIsMapAligned as U,maxSdfDistance as T}from"../shaders/constants.js";import{distPointTriangle as _,failHittest as k}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as D}from"../shaders/utils.js";import{VisualVariableColor as B}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as q}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as F}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as G}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Z}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as K}from"../shaders/vvUtils.js";const Q=360/254;var X;!function(t){t[t.Color=0]="Color",t[t.Outline=1]="Outline",t[t.Halo=2]="Halo"}(X||(X={}));class Y extends L{}t([s(3,z)],Y.prototype,"color",void 0),t([s(4,v)],Y.prototype,"offset",void 0),t([s(5,v)],Y.prototype,"textureUV",void 0),t([s(6,y)],Y.prototype,"fontSize",void 0),t([s(7,y)],Y.prototype,"referenceSize",void 0),t([s(8,z)],Y.prototype,"outlineColor",void 0),t([s(9,z)],Y.prototype,"haloColor",void 0),t([s(10,v)],Y.prototype,"outlineAndHaloSize",void 0),t([s(11,v)],Y.prototype,"zoomRange",void 0),t([s(12,y)],Y.prototype,"clipAngle",void 0),t([s(13,z)],Y.prototype,"referenceSymbol",void 0);class $ extends n{}t([s(14,v)],$.prototype,"offsetNextVertex1",void 0),t([s(15,v)],$.prototype,"offsetNextVertex2",void 0);class tt extends A{}class et extends H{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=X.Color,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e,o){const s=e.multiply(Q),l=d(this.view.rotation.subtract(s)),a=u(new y(360).subtract(l),l);let r=new y(0);const n=m(this.view.currentZoom.multiply(i)).divide(i),p=t.x,h=t.y,f=new y(1).subtract(c(p,n)).multiply(2),v=c(new y(90),a).multiply(2),w=new y(2).multiply(new y(1).subtract(c(n,h)));return r=r.add(o.multiply(f)),r=r.add(o.multiply(v)),r=r.add(w),r}vertex(t,e){const i=D(t.bitset,P),s=new y(1).subtract(i);let l=t.fontSize,a=l.divide(N);const r=this.textRenderPassType===X.Outline?t.outlineColor:this.textRenderPassType===X.Halo?t.haloColor:this._getVertexColor(t),n=this.isLabel?this.storage.getLabelVisibility(t.id):new y(1),p=this.isLabel?r.multiply(n):r,d=this.view.displayViewScreenMat3.multiply(new h(t.pos,1));let u=t.offset,m=new y(1),c=f.identity(),j=new v(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),a=J(this,t.id,s).divide(2),r=l.multiply(a.add(o));j=i.add(r),u=u.add(j)}else{m=J(this,t.id,t.referenceSize).divide(t.referenceSize),l=l.multiply(m),a=a.multiply(m),u=u.multiply(m),c=K(this,t.id),u=c.multiply(new h(u,0)).xy}const R=D(t.bitset,U),C=this._getViewRotationMatrix(R).multiply(new h(u,0));let O=this.isLabel?this.clipLabel(t.zoomRange,t.clipAngle,R):this.clip(t.id,t.zoomRange);O=this.isBackgroundPass?O.add(s.multiply(2)):O.add(i.multiply(2));let M=new y(0);if(this.textRenderPassType===X.Outline){O=O.add(w(b(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));M=new y(t.outlineAndHaloSize.x).divide(a).divide(T)}if(this.textRenderPassType===X.Halo){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);O=O.add(w(b(i,new y(0)),new y(2),new y(0)));M=i.add(e).divide(a).divide(T)}const L=this.isLabel?x(S(O,new y(1)),V(n,new y(0))):new g(!1);return{glPosition:new z(d.xy.add(C.xy),O,1),color:p,size:a,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.105*N).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:M,...this.maybeRunHittest(t,e,{vvSizeAdjustment:m,vvRotation:c,labelOffset:j,labelClipped:L})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicInfo.texture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=R(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){let a,r,n;this.isLabel?(a=new h(t.offset.add(s),0),r=new h(e.offsetNextVertex1.add(s),0),n=new h(e.offsetNextVertex2.add(s),0)):(a=o.multiply(new h(t.offset.multiply(i),0)),r=o.multiply(new h(e.offsetNextVertex1.multiply(i),0)),n=o.multiply(new h(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:p,tileMat3:d}=this.view,u=p.multiply(d).multiply(new h(t.pos,1)),y=u.add(d.multiply(a)).xy,m=u.add(d.multiply(r)).xy,c=u.add(d.multiply(n)).xy,f=_(this.hittestRequest.position,y.xy,m.xy,c.xy);return this.isLabel?w(l,k(this.hittestRequest),f):f}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new v(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.storage.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new g(!1))}if(this.visualVariableOpacity){const i=this.storage.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(B)],et.prototype,"visualVariableColor",void 0),t([l(q)],et.prototype,"visualVariableOpacity",void 0),t([l(E)],et.prototype,"visualVariableRotation",void 0),t([l(F)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],et.prototype,"visualVariableSizeScaleStops",void 0),t([l(G)],et.prototype,"visualVariableSizeStops",void 0),t([l(Z)],et.prototype,"visualVariableSizeUnitValue",void 0),t([a(I)],et.prototype,"mosaicInfo",void 0),t([r],et.prototype,"textRenderPassType",void 0),t([r],et.prototype,"isBackgroundPass",void 0),t([r],et.prototype,"isLabel",void 0),t([e(0,p(Y)),e(1,p($))],et.prototype,"vertex",null),t([e(0,p(tt))],et.prototype,"fragment",null);export{tt as TextFragmentInput,X as TextRenderPassType,et as TextShader,Y as TextVertexInput};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Evented.js";import{i as t,g as r,h as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n,c as o}from"../../../../chunks/vec42.js";import{fromValues as a,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as h}from"../../../../geometry/projection/projectBuffer.js";import{expandWithBuffer as c}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as d}from"../../../../geometry/support/DoubleArray.js";import{makeDehydratedPoint as m}from"../../../../layers/graphics/dehydratedPoint.js";import{getGeometryEffectiveElevationMode as p}from"../../../../support/elevationInfoUtils.js";import u from"../../../../symbols/support/ElevationInfo.js";import{EngineVisualElement as _}from"./EngineVisualElement.js";import{LaserlineVisualElement as f}from"./LaserlineVisualElement.js";import{ElevationContext as g}from"../../layers/graphics/ElevationContext.js";import{createGeometry as y}from"../../support/engineContent/line.js";import{geometryToRenderInfoDraped as O,geometryToRenderInfo as C}from"../../support/renderInfoUtils/line.js";import{RenderOccludedFlag as v}from"../../webgl-engine/lib/Material.js";import{RenderGeometry as b}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as w}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class j extends _{constructor(t){super(t),this._attachmentOrigin=m(0,0,0,null),this._attachmentOriginDirty=!0,this.events=new e,this._geometry=null,this._width=1,this._color=a(1,0,1,1),this._innerWidth=0,this._innerColor=a(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._elevationInfo=null,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=v.OccludeAndTransparentStencil,this._attachmentOrigin.spatialReference=t.view.spatialReference,this._laserline=new f({view:t.view,isDecoration:t.isDecoration}),this.applyProperties(t),this.attached=t.attached??!0}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:D,recreateGeometry:(e,t)=>{e.geometries.length=0,this._recreateGeometry(t,e.material,e.geometries)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:D,recreateGeometry:e=>{e.geometries=this._createRenderGeometriesDraped(e.material),this._attachmentOriginChanged()}}}get _laserlineAttached(){return this.attached&&this.visible&&null!=this._laserlineStyle&&!this.isDraped&&this.laserlineEnabled}onAttachedChange(e){this._laserline.attached=this._laserlineAttached,e&&this._attachmentOriginChanged()}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){n(e,this._color)||(o(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){n(e,this._innerColor)||(o(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){e&&this._stippleOffColor&&n(e,this._stippleOffColor)||(this._stippleOffColor=e?l(e):null,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get attachmentOrigin(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;const e=this.object3dResources.resources?.geometries;if(!e||0===e.length)return null;t(E,0,0,0);let s=0;for(const t of e)t.computeAttachmentOrigin(P)&&(r(E,E,P),s++);return 0===s?null:(i(E,E,1/s),this.view.renderCoordsHelper.fromRenderCoords(E,this._attachmentOrigin),this._attachmentOriginDirty=!1,this._attachmentOrigin)}_updateMaterial(){this.object3dResources.resources?.material.setParameters(this._materialParameters),this.drapedResources.resources?.material.setParameters(this._materialParameters)}get _isClosed(){return null!=this.geometry&&"polygon"===this.geometry.type}get _materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:!1,isClosed:this._isClosed,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,join:"round",hasPolygonOffset:!0,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration}}get _normalizedRenderOccluded(){return this.isDraped&&this._renderOccluded===v.OccludeAndTransparentStencil?v.OccludeAndTransparent:this._renderOccluded}_recreateGeometry(e,t,r){this._createRenderGeometries(t,r);for(const i of r)e.addGeometry(i);this._attachmentOriginChanged()}_attachmentOriginChanged(){this._attachmentOriginDirty=!0,this.events.emit("attachment-origin-changed")}_createObject3DResources(e){const t=new R(this._materialParameters),r=new Array;return this._recreateGeometry(e,t,r),{material:t,geometries:r,forEach:e=>{e(t),r.forEach(e)}}}_createDrapedResources(){const e=new R(this._materialParameters);return{material:e,geometries:this._createRenderGeometriesDraped(e)}}_createRenderGeometriesDraped(e){const{geometry:t,view:r}=this,i=r.basemapTerrain.spatialReference;if(null==t||null==i)return[];return O(t,i).lines.map((({position:t})=>{const s={overlayInfo:{spatialReference:i,renderCoordsHelper:r.renderCoordsHelper},attributeData:{position:t},removeDuplicateStartEnd:this._isClosed};return new b(y(e,s))}))}calculateMapBounds(e){if(null==this.object3dResources.resources)return!1;const t=this.view.renderCoordsHelper;for(const r of this.object3dResources.resources.geometries){const i=r.attributes.get(w.POSITION),s=d(i.data.length);h(i.data,t.spatialReference,0,s,this.view.spatialReference,0),c(e,s)}return!0}_createRenderGeometries(e,t){const r=this.geometry;if(null==r)return;const i=C(r,this.view.elevationProvider,this.view.renderCoordsHelper,g.fromElevationInfo(this.elevationInfo??new u({mode:p(r,null)}))),s=new Array;for(const{position:n,mapPositions:o}of i.lines){const r={mapPositions:o,attributeData:{position:n},removeDuplicateStartEnd:this._isClosed};t.push(y(e,r)),s.push(n)}this._laserline.pathVerticalPlane=s}}function D(e){e.geometries=[]}const P=s(),E=s();export{j as OutlineVisualElement};
5
+ import e from"../../../../core/Evented.js";import{i as t,g as r,h as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n,c as o}from"../../../../chunks/vec42.js";import{fromValues as a,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as h}from"../../../../geometry/projection/projectBuffer.js";import{expandWithBuffer as c}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as d}from"../../../../geometry/support/DoubleArray.js";import{makeDehydratedPoint as p}from"../../../../layers/graphics/dehydratedPoint.js";import{getGeometryEffectiveElevationMode as m}from"../../../../support/elevationInfoUtils.js";import u from"../../../../symbols/support/ElevationInfo.js";import{EngineVisualElement as _}from"./EngineVisualElement.js";import{LaserlineVisualElement as f}from"./LaserlineVisualElement.js";import{ElevationContext as g}from"../../layers/graphics/ElevationContext.js";import{createGeometry as y}from"../../support/engineContent/line.js";import{geometryToRenderInfoDraped as O,geometryToRenderInfo as C}from"../../support/renderInfoUtils/line.js";import{RenderOccludedFlag as v}from"../../webgl-engine/lib/Material.js";import{RenderGeometry as b}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as w}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class j extends _{constructor(t){super(t),this._attachmentOrigin=p(0,0,0,null),this._attachmentOriginDirty=!0,this.events=new e,this._geometry=null,this._width=1,this._color=a(1,0,1,1),this._innerWidth=0,this._innerColor=a(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._elevationInfo=null,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=v.OccludeAndTransparentStencil,this._attachmentOrigin.spatialReference=t.view.spatialReference,this._laserline=new f({view:t.view,isDecoration:t.isDecoration}),this.applyProperties(t),this.attached=t.attached??!0}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:D,recreateGeometry:(e,t)=>{e.geometries.length=0,this._recreateGeometry(t,e.material,e.geometries)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:D,recreateGeometry:e=>{e.geometries=this._createRenderGeometriesDraped(e.material),this._attachmentOriginChanged()}}}get _laserlineAttached(){return this.attached&&this.visible&&null!=this._laserlineStyle&&!this.isDraped&&this.laserlineEnabled}onAttachedChange(e){this._laserline.attached=this._laserlineAttached,e&&this._attachmentOriginChanged()}get geometry(){return this._geometry}set geometry(e){const t=this._isClosed;this._geometry=e,this.recreateGeometry(),t!==this._isClosed&&this._updateMaterial()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){n(e,this._color)||(o(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){n(e,this._innerColor)||(o(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){e&&this._stippleOffColor&&n(e,this._stippleOffColor)||(this._stippleOffColor=e?l(e):null,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get attachmentOrigin(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;const e=this.object3dResources.resources?.geometries;if(!e||0===e.length)return null;t(E,0,0,0);let s=0;for(const t of e)t.computeAttachmentOrigin(P)&&(r(E,E,P),s++);return 0===s?null:(i(E,E,1/s),this.view.renderCoordsHelper.fromRenderCoords(E,this._attachmentOrigin),this._attachmentOriginDirty=!1,this._attachmentOrigin)}_updateMaterial(){this.object3dResources.resources?.material.setParameters(this._materialParameters),this.drapedResources.resources?.material.setParameters(this._materialParameters)}get _isClosed(){return null!=this.geometry&&"polygon"===this.geometry.type}get _materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:!1,isClosed:this._isClosed,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,join:"round",hasPolygonOffset:!0,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration}}get _normalizedRenderOccluded(){return this.isDraped&&this._renderOccluded===v.OccludeAndTransparentStencil?v.OccludeAndTransparent:this._renderOccluded}_recreateGeometry(e,t,r){this._createRenderGeometries(t,r);for(const i of r)e.addGeometry(i);this._attachmentOriginChanged()}_attachmentOriginChanged(){this._attachmentOriginDirty=!0,this.events.emit("attachment-origin-changed")}_createObject3DResources(e){const t=new R(this._materialParameters),r=new Array;return this._recreateGeometry(e,t,r),{material:t,geometries:r,forEach:e=>{e(t),r.forEach(e)}}}_createDrapedResources(){const e=new R(this._materialParameters);return{material:e,geometries:this._createRenderGeometriesDraped(e)}}_createRenderGeometriesDraped(e){const{geometry:t,view:r}=this,i=r.basemapTerrain.spatialReference;if(null==t||null==i)return[];return O(t,i).lines.map((({position:t})=>{const s={overlayInfo:{spatialReference:i,renderCoordsHelper:r.renderCoordsHelper},attributeData:{position:t},removeDuplicateStartEnd:this._isClosed};return new b(y(e,s))}))}calculateMapBounds(e){if(null==this.object3dResources.resources)return!1;const t=this.view.renderCoordsHelper;for(const r of this.object3dResources.resources.geometries){const i=r.attributes.get(w.POSITION),s=d(i.data.length);h(i.data,t.spatialReference,0,s,this.view.spatialReference,0),c(e,s)}return!0}_createRenderGeometries(e,t){const r=this.geometry;if(null==r)return;const i=C(r,this.view.elevationProvider,this.view.renderCoordsHelper,g.fromElevationInfo(this.elevationInfo??new u({mode:m(r,null)}))),s=new Array;for(const{position:n,mapPositions:o}of i.lines){const r={mapPositions:o,attributeData:{position:n},removeDuplicateStartEnd:this._isClosed};t.push(y(e,r)),s.push(n)}this._laserline.pathVerticalPlane=s}}function D(e){e.geometries=[]}const P=s(),E=s();export{j as OutlineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{shuffle as t}from"../../../../core/arrayUtils.js";import{baseObjectMemory as e}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{create as i,fromExtent as r,intersects as u,copy as a,positiveInfinity as h,intersection as n}from"../../../../geometry/support/aaBoundingRect.js";import{numVertices as f,estimateSize as l,getObjectId as _}from"../../../../layers/graphics/dehydratedFeatures.js";import{computeMaxZ as m}from"../graphics/graphicUtils.js";const d=16438;class c{constructor(t){this.descriptor=t,this.fetchStatus=F.FETCH_NEEDED,this._numVertices=0,this._featuresMissing=s(!0),this._fetchFailed=s(!1),this._shuffled=!1,this._numFeatures=o,this._emptyFeatureRatio=s(0),this._estimatedSize=-1,this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._displayingFeatures=null,this.alive=!0,this.filtered=!1,this._features=null,this._featuresLength=s(0),this._featureLimit=s(0),this.fetchingResolution=this.displayingResolution=t.resolution}get featuresMissing(){return this._featuresMissing.value}set featuresMissing(t){this._featuresMissing.value=t}get missingAttributes(){return this._missingAttributes}get fetchFailed(){return this._fetchFailed.value}set fetchFailed(t){this._fetchFailed.value=t}get displayingFeatures(){return this._displayingFeatures}set displayingFeatures(t){this._displayingFeatures=t,this.extentIncludingBorrowedFeatures=null}get perTileMaximumNumberOfFeaturesExceeded(){const t=(this.fetchStatus===F.DONE||this.fetchStatus===F.FULL)&&this.featuresMissing;return!this.filtered&&(t||this.hasFeatureLimit)}get features(){return this._features}get featureLimit(){return this._featureLimit.value}set featureLimit(t){this._featureLimit.value!==t&&(this._featureLimit.value=t,this._estimatedUnusedSizeDirty=!0)}get hasFeatureLimit(){return this.featureLimit!==this._featuresLength.value}get hasAllFeatures(){return!(this.featuresMissing||this.fetchFailed||this.hasFeatureLimit)}get availableFields(){return this._availableFields}setFeatures(t,e,s,i){this._availableFields=s,this._features=t,this._featuresLength.value=t?.length??0,this._shuffled=!1,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0,this._missingAttributes=i,t&&t.length>0?(this._emptyFeatureRatio.value=e/(t.length+e),this._numVertices=t.reduce(((t,e)=>t+f(e.geometry)),0)):(this._emptyFeatureRatio.value=0,this._numVertices=0)}computeZQuantizationFactor(){if(this._features&&this._features.length>0){const t=this._features.reduce(((t,{geometry:e})=>Math.max(t,m(e)??0)),0);return Math.floor(t/this.descriptor.planetRadius)+1}return 1}get emptyFeatureRatio(){return this._emptyFeatureRatio.value}get numFeatures(){return this.hasPreciseFeatureCount?this._numFeatures:this._features?this._features.length:0}set numFeatures(t){this._numFeatures=t}get hasPreciseFeatureCount(){return this._numFeatures>o}get needsFeatureCount(){return this._numFeatures===o}get numVertices(){return this._numVertices}get id(){return this.descriptor.id}get estimatedSize(){return this.updateMemoryEstimates(),this._estimatedSize}get estimatedUnusedSize(){return this._estimatedUnusedSize}updateMemoryEstimates(){if(this._estimatedSize<0){if(this._estimatedSize=0,this._estimatedUnusedSize=0,this._features)for(let t=0;t<this._features.length;++t){const e=l(this._features[t]);this._estimatedSize+=e,t>=this.featureLimit&&(this._estimatedUnusedSize+=e)}return!0}if(this._estimatedUnusedSizeDirty){if(this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._features)for(let t=this.featureLimit;t<this._features.length;++t)this._estimatedUnusedSize+=l(this._features[t]);return!0}return!1}get isFetching(){return this.fetchStatus===F.FETCHING||this.fetchStatus===F.REFETCHING}get isRefetching(){return this.fetchStatus===F.REFETCHING}get needsFetch(){return this.fetchStatus===F.FETCH_NEEDED||this.fetchStatus===F.REFETCH_NEEDED}get needsRefetch(){return this.fetchStatus===F.REFETCH_NEEDED}get isFetched(){return this.fetchStatus===F.DONE||this.fetchStatus===F.FULL}resetFetching(){this.fetchStatus=this.fetchStatus===F.REFETCHING?F.REFETCH_NEEDED:F.FETCH_NEEDED}get needsDisplayUpdate(){return!!this._features&&!S(this._features,this.displayingFeatures,this.featureLimit)}intersects(t){return null==t||!this.descriptor.extent||(r(t,p),u(this.descriptor.extent,p))}intersectionIncludingBorrowed(t,e){const s=null!=this.extentIncludingBorrowedFeatures?this.extentIncludingBorrowedFeatures:this.descriptor.extent;return t||s?(null!=t?(r(t,e),n(e,s,e)):a(e,s),e):(a(e,h),e)}_shuffle(e){this._features&&(this._features.sort(((t,s)=>_(t,e)-_(s,e))),t(this._features,d),this._shuffled=!0,this._estimatedUnusedSizeDirty=!0)}reduceFeatures(t,e,s){if(t<=0)return!1;if(!this._features)return this.featureLimit=0,!1;let i=!1;this.featureLimit=Math.ceil(this.numFeatures*t),this.featureLimit>this._features.length&&(this.featureLimit=this._features.length,this.fetchStatus===F.DONE&&this._features.length>0&&(this.fetchStatus=F.REFETCH_NEEDED,i=!0)),!this._shuffled&&t<1&&this._shuffle(s);const r=Math.max(this.featureLimit,Math.ceil(e*this.numFeatures));return this._features.length>r&&(this._features.length=r,this._featuresLength.value=r,this.featuresMissing=!0,this.fetchStatus===F.FULL&&(this.fetchStatus=F.DONE)),i}get cache(){return new E(this,this._features,this._numFeatures,this._emptyFeatureRatio.value)}set cache(t){this.requestController=null,this._availableFields=t.availableFields,this._features=t.features,this._featuresLength.value=t.features?.length??0,this._numFeatures=t.numFeatures,this._emptyFeatureRatio.value=t.emptyFeatureRatio,this.fetchStatus=t.fetchStatus,this.featuresMissing=t.featuresMissing,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0}}const o=-1,g=-2;var F;!function(t){t[t.FETCH_NEEDED=0]="FETCH_NEEDED",t[t.REFETCH_NEEDED=1]="REFETCH_NEEDED",t[t.FETCHING=2]="FETCHING",t[t.REFETCHING=3]="REFETCHING",t[t.DONE=4]="DONE",t[t.FULL=5]="FULL"}(F||(F={}));class E{constructor(t,s,i,r){this.features=s,this.numFeatures=i,this.emptyFeatureRatio=r,this.cachedMemory=e+t.estimatedSize,this.resolution=t.displayingResolution,this.availableFields=t.availableFields,this.fetchStatus=t.fetchStatus,this.featuresMissing=t.featuresMissing}}function S(t,e,s){if(null==e||null==t||s!==e.length||s>t.length)return!1;for(let i=0;i<s;++i)if(t[i]!==e[i])return!1;return!0}const p=i();export{c as FeatureTile,E as FeatureTileCacheItem,F as FetchStatus,g as failedFeatureCount};
5
+ import{shuffle as t}from"../../../../core/arrayUtils.js";import{baseObjectMemory as e}from"../../../../core/memoryEstimations.js";import{signal as s}from"../../../../core/signal.js";import{create as i,fromExtent as r,intersects as u,copy as a,positiveInfinity as h,intersection as n}from"../../../../geometry/support/aaBoundingRect.js";import{numVertices as f,estimateSize as _,getObjectId as l}from"../../../../layers/graphics/dehydratedFeatures.js";import{computeMaxZ as c}from"../graphics/graphicUtils.js";const d=16438;class m{constructor(t){this.descriptor=t,this._numVertices=0,this._featuresMissing=s(!0),this._fetchFailed=s(!1),this._shuffled=!1,this._numFeatures=F,this._emptyFeatureRatio=s(0),this._estimatedSize=-1,this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._displayingFeatures=null,this.alive=!0,this.filtered=!1,this._features=null,this._featuresLength=s(0),this._featureLimit=s(0),this._fetchStatus=g.FETCH_NEEDED,this.fetchingResolution=this.displayingResolution=t.resolution}get featuresMissing(){return this._featuresMissing.value}set featuresMissing(t){this._featuresMissing.value=t}get missingAttributes(){return this._missingAttributes}get fetchFailed(){return this._fetchFailed.value}set fetchFailed(t){this._fetchFailed.value=t}get displayingFeatures(){return this._displayingFeatures}set displayingFeatures(t){this._displayingFeatures=t,this.extentIncludingBorrowedFeatures=null}get perTileMaximumNumberOfFeaturesExceeded(){const t=this.isFetched&&this.featuresMissing;return!this.filtered&&(t||this.hasFeatureLimit)}get features(){return this._features}get featureLimit(){return this._featureLimit.value}set featureLimit(t){this._featureLimit.value!==t&&(this._featureLimit.value=t,this._estimatedUnusedSizeDirty=!0)}get hasFeatureLimit(){return this.featureLimit!==this._featuresLength.value}get hasAllFeatures(){return!(this.featuresMissing||this.fetchFailed||this.hasFeatureLimit)}get availableFields(){return this._availableFields}setFeatures(t,e,s,i){this._availableFields=s,this._features=t,this._featuresLength.value=t?.length??0,this._shuffled=!1,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0,this._missingAttributes=i,t&&t.length>0?(this._emptyFeatureRatio.value=e/(t.length+e),this._numVertices=t.reduce(((t,e)=>t+f(e.geometry)),0)):(this._emptyFeatureRatio.value=0,this._numVertices=0)}computeZQuantizationFactor(){if(this._features&&this._features.length>0){const t=this._features.reduce(((t,{geometry:e})=>Math.max(t,c(e)??0)),0);return Math.floor(t/this.descriptor.planetRadius)+1}return 1}get emptyFeatureRatio(){return this._emptyFeatureRatio.value}get numFeatures(){return this.hasPreciseFeatureCount?this._numFeatures:this._features?this._features.length:0}set numFeatures(t){this._numFeatures=t}get hasPreciseFeatureCount(){return this._numFeatures>F}get needsFeatureCount(){return this._numFeatures===F}get numVertices(){return this._numVertices}get id(){return this.descriptor.id}get estimatedSize(){return this.updateMemoryEstimates(),this._estimatedSize}get estimatedUnusedSize(){return this._estimatedUnusedSize}updateMemoryEstimates(){if(this._estimatedSize<0){if(this._estimatedSize=0,this._estimatedUnusedSize=0,this._features)for(let t=0;t<this._features.length;++t){const e=_(this._features[t]);this._estimatedSize+=e,t>=this.featureLimit&&(this._estimatedUnusedSize+=e)}return!0}if(this._estimatedUnusedSizeDirty){if(this._estimatedUnusedSize=0,this._estimatedUnusedSizeDirty=!1,this._features)for(let t=this.featureLimit;t<this._features.length;++t)this._estimatedUnusedSize+=_(this._features[t]);return!0}return!1}get fetchStatus(){return this._fetchStatus}requestFetch(){this._fetchStatus=g.FETCH_NEEDED}requestRefetch(){this._fetchStatus=g.REFETCH_NEEDED}startFetch(){this._fetchStatus=this.needsRefetch?g.REFETCHING:g.FETCHING}fetchDone(t){this._fetchStatus=t?g.FULL:g.DONE}get isFetching(){return this._fetchStatus===g.FETCHING||this._fetchStatus===g.REFETCHING}get isRefetching(){return this._fetchStatus===g.REFETCHING}get needsFetch(){return this._fetchStatus===g.FETCH_NEEDED||this._fetchStatus===g.REFETCH_NEEDED}get needsRefetch(){return this._fetchStatus===g.REFETCH_NEEDED}get isFetched(){return this._fetchStatus===g.DONE||this._fetchStatus===g.FULL}isFullyFetched(t){return!!this.features&&(this.features.length>=t||this.fetchStatus===g.FULL)}resetFetching(){this._fetchStatus=this.isRefetching?g.REFETCH_NEEDED:g.FETCH_NEEDED}get needsDisplayUpdate(){return!!this._features&&!S(this._features,this.displayingFeatures,this.featureLimit)}intersects(t){return null==t||!this.descriptor.extent||(r(t,p),u(this.descriptor.extent,p))}intersectionIncludingBorrowed(t,e){const s=null!=this.extentIncludingBorrowedFeatures?this.extentIncludingBorrowedFeatures:this.descriptor.extent;return t||s?(null!=t?(r(t,e),n(e,s,e)):a(e,s),e):(a(e,h),e)}_shuffle(e){this._features&&(this._features.sort(((t,s)=>l(t,e)-l(s,e))),t(this._features,d),this._shuffled=!0,this._estimatedUnusedSizeDirty=!0)}reduceFeatures(t,e,s){if(t<=0)return!1;if(!this._features)return this.featureLimit=0,!1;let i=!1;this.featureLimit=Math.ceil(this.numFeatures*t),this.featureLimit>this._features.length&&(this.featureLimit=this._features.length,this._fetchStatus===g.DONE&&this._features.length>0&&(this._fetchStatus=g.REFETCH_NEEDED,i=!0)),!this._shuffled&&t<1&&this._shuffle(s);const r=Math.max(this.featureLimit,Math.ceil(e*this.numFeatures));return this._features.length>r&&(this._features.length=r,this._featuresLength.value=r,this.featuresMissing=!0,this._fetchStatus===g.FULL&&(this._fetchStatus=g.DONE)),i}get cache(){return new E(this,this._features,this._numFeatures,this._emptyFeatureRatio.value)}set cache(t){this.requestController=null,this._availableFields=t.availableFields,this._features=t.features,this._featuresLength.value=t.features?.length??0,this._numFeatures=t.numFeatures,this._emptyFeatureRatio.value=t.emptyFeatureRatio,this._fetchStatus=t.fetchStatus,this.featuresMissing=t.featuresMissing,this._estimatedSize=-1,this._estimatedUnusedSizeDirty=!0}}const F=-1,o=-2;var g;!function(t){t[t.FETCH_NEEDED=0]="FETCH_NEEDED",t[t.REFETCH_NEEDED=1]="REFETCH_NEEDED",t[t.FETCHING=2]="FETCHING",t[t.REFETCHING=3]="REFETCHING",t[t.DONE=4]="DONE",t[t.FULL=5]="FULL"}(g||(g={}));class E{constructor(t,s,i,r){this.features=s,this.numFeatures=i,this.emptyFeatureRatio=r,this.cachedMemory=e+t.estimatedSize,this.resolution=t.displayingResolution,this.availableFields=t.availableFields,this.fetchStatus=t.fetchStatus,this.featuresMissing=t.featuresMissing}}function S(t,e,s){if(null==e||null==t||s!==e.length||s>t.length)return!1;for(let i=0;i<s;++i)if(t[i]!==e[i])return!1;return!0}const p=i();export{m as FeatureTile,E as FeatureTileCacheItem,o as failedFeatureCount};