// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/geoenrichment/utils/htmlToSvg/supportClasses/VisualsCollector","dojo/_base/Color ./dom-style ./TransformUtil ./VisibilityChecker ./text/TextMeasurer ./text/TextStyleBuilder".split(" "),function(k,b,y,z,A,p){var B={SPAN:1,A:1,B:1,I:1,U:1,FONT:1};return{getNodeVisuals:function(a,c){function g(c,d){var e=new k(b.get(a,"border"+d+"Color"));q[c]={color:e.toHex(),opacity:e.a*l,width:b.get(a,"border"+d+"Width"),style:b.get(a,"border"+d+"Style")}}if(!z.checkNode(a))return null;b.cacheComputedStyle(a);
var l=c?c.style.opacity:1,h=c&&c.isLink,C=c&&c.isB,D=c&&c.isI,E=c&&c.isU,r=b.get(a,"width"),t=b.get(a,"height"),f={l:b.get(a,"paddingLeft"),r:b.get(a,"paddingRight"),t:b.get(a,"paddingTop"),b:b.get(a,"paddingBottom")},F=r+f.l+f.r,G=t+f.t+f.b,d=new k(b.get(a,"backgroundColor")),d={color:d.toHex(),opacity:d.a*l,image:b.get(a,"backgroundImage"),size:b.get(a,"backgroundSize"),positionX:b.get(a,"backgroundPositionX"),positionY:b.get(a,"backgroundPositionY")};d.sizePx=b.toPixelValue(document.body,d.size);
d.positionXPx=b.toPixelValue(document.body,d.positionX);d.positionYPx=b.toPixelValue(document.body,d.positionY);var q={};g("l","Left");g("r","Right");g("t","Top");g("b","Bottom");var m=b.toPixelValue(a,b.get(a,"fontSize")),n=b.get(a,"textAlign"),u=b.get(a,"lineHeight"),v=y.measureNode(a,c),w=b.get(a,"position"),x=B[a.nodeName],e={node:a,parentVs:c,box:v.box,style:{cw:r,ch:t,pw:F,ph:G,paddings:f,border:q,borderRadius:b.toPixelValue(a,b.get(a,"borderBottomLeftRadius")),background:d,color:(new k(b.get(a,
"color"))).toHex(),fontSize:m,textAlign:n,getTextStyle:function(c,d){if(c)return b.get(a,c);var f=p.buildTextStyleString(a,e,m,n,u);if(d)for(var g in d)f=f.replace(new RegExp("(^|;)"+g+":.*?(;|$)"),"$1"+g+":"+d[g]+"$2");return f},getTextStyleObject:function(){return p.buildTextStyleObject(a,e,m,n,u)},opacity:b.get(a,"opacity")*l,overflow:b.get(a,"overflow"),spanFlowStartOffset:0,spanFlowEndOffset:0,display:b.get(a,"display"),isMiddle:"middle"===b.get(a,"verticalAlign"),transform:v.transform,parentHasTransform:!(!c||
!c.style.transform),isRelAbs:"relative"===w||"absolute"===w},isSpanLike:x,isLink:"A"===a.nodeName||h,isB:"B"===a.nodeName||"H"===a.nodeName.charAt(0)||C,isI:"I"===a.nodeName||D,isU:"U"===a.nodeName||E};x&&(h=A.getSpanFlowOffsets(a,e),e.style.spanFlowStartOffset=h.start,e.style.spanFlowEndOffset=h.end);e.isLink&&(e.href=a.href||c.href,e.target=a.target||c.target);b.clearCache(a);return e}}});