/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import e from"../../../geometry/Point.js";import{normalizeTransform as t,quantizeY as o,quantizeX as r}from"../../../geometry/support/quantizationUtils.js";import i from"../../../layers/graphics/OptimizedGeometry.js";import{project as s}from"../../../layers/graphics/data/projectionSupport.js";const n="BEGINX",a="BEGINY",p="ENDX",y="ENDY";function c(c,m,f){const x=f.spatialReference,l=f.outSpatialReference,u=t(m),g={x:0,y:0,spatialReference:x},j={x:0,y:0,spatialReference:x};for(const t of c){const{attributes:c}=t;g.x=c[n],g.y=c[a],j.x=c[p],j.y=c[y];const m=s(new e(g),x,l),f=s(new e(j),x,l),E={x:r(u,m.x),y:o(u,m.y)},N={x:r(u,f.x),y:o(u,f.y)};t.geometry=new i([2],[r(u,E.x),o(u,E.y),r(u,N.x),o(u,N.y)])}}export{c as loadDimensionGeometry};
