/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t,__param as o}from"tslib";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as d,BaseHittestVertexInput as c,FeatureVertexInput as f}from"./AFeatureShader.js";import{bitsetTypeFillOutline as y,bitsetOutlineUsesColorVV as v}from"./constants.js";import{hittestFill as h,failHittest as V}from"./hittestUtils.js";import{getLineFragmentColor as S,getLineVertexData as b,AntialiasingControls as j,LineFragmentInput as x}from"./LineShader.js";import{getBit as g,getBitBool as w}from"./utils.js";import{VisualVariableColor as z}from"./VisualVariableColor.js";import{VisualVariableOpacity as M}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as O}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as C}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as U}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as W,getVisualVariableColor as F}from"./vvUtils.js";class R extends f{}t([i(3,m)],R.prototype,"offset",void 0),t([i(4,u)],R.prototype,"color",void 0),t([i(5,m)],R.prototype,"normal",void 0),t([i(6,l)],R.prototype,"halfWidth",void 0),t([i(7,l)],R.prototype,"referenceHalfWidth",void 0),t([i(8,m)],R.prototype,"zoomRange",void 0);class A extends x{}function H(t,o,i){const{id:e,bitset:r}=o,s=g(r,y),m=a(s,new l(.5)),d=b(t,o),c=p(m,d.halfWidth,new l(0)),f=W(t,e),h=F(t,e,o.color),V=p(m,p(w(r,v),h,o.color),h.multiply(f)),S=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),j=t.clip(o.id),x=new u(S.xy,j,1),z=p(m,d.glPosition,x),M=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:V,opacity:new l(1),halfWidth:c,normal:d.normal,glPosition:z,...M}}class q extends d{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(j)],q.prototype,"antialiasingControls",void 0),t([r(z)],q.prototype,"visualVariableColor",void 0),t([r(M)],q.prototype,"visualVariableOpacity",void 0),t([r(O)],q.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(C)],q.prototype,"visualVariableSizeScaleStops",void 0),t([r(P)],q.prototype,"visualVariableSizeStops",void 0),t([r(U)],q.prototype,"visualVariableSizeUnitValue",void 0);class G extends q{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return H(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=S(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){return p(i,V(this.hittestRequest),h(this,t,o))}}t([o(0,s(R)),o(1,s(c))],G.prototype,"vertex",null),t([o(0,s(A))],G.prototype,"fragment",null);export{q as AOutlineFillShader,A as OutlineFillFragmentInput,G as OutlineFillShader,R as OutlineFillVertexInput,H as getOutlineFillVertexData};
