/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as t,__param as e}from"tslib";import{input as i}from"../../GraphShaderModule.js";import{Float as r,sin as s,cos as o,Vec3 as l,Vec4 as n,mix as m}from"../../graph/glsl.js";import{AAnimatedPolyShader as a,PolyVertexInput as p,PolyHittestVertexInput as u,PolyFragmentInput as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as h}from"../shaders/ComplexFillShader.js";import{hittestFill as y}from"../shaders/hittestUtils.js";class c extends a{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:i,ndc:a,z:p,color:u,isOutline:d,strokeWidth:y,isSDF:c,scale:f,scaleSymbolsProportionally:x}=this._vertexPoly(t),g=this.view.requiredZoomFactor,b=t.sizing.xy,P=b.multiply(g),v=new r(0),S=s(v),w=o(v),F=h(t.id,P,S,w,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(b,S,w),j=g.multiply(t.offset.subtract(O)).divide(P),A=new l(t.pos,1),T=F.multiply(A).xy.subtract(j),z=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(a,p,1),tlbr:z,uv:T,color:u.multiply(new r(1).subtract(d)),outlineColor:u.multiply(d),distanceToPx:i,strokeWidth:y.multiply(m(new r(1),f,x)),isOutline:d,isSDF:c,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return y(this,t,e)}}t([e(0,i(p)),e(1,i(u))],c.prototype,"vertex",null),t([e(0,i(d))],c.prototype,"fragment",null);export{c as AnimatedFillShader};
