// 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/ReportPlayer/dataProviders/commands/createHTML/HTMLToSVGBuilder","dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-style dojo/when ./CSSFilesLoader ./HTMLStringBuilder esri/dijit/geoenrichment/utils/htmlToSvg/HTMLtoSVGConverter esri/dijit/geoenrichment/utils/htmlToSvg/supportClasses/imageUtils/ImageOptimizer esri/dijit/geoenrichment/utils/async/AsyncQueue esri/dijit/geoenrichment/utils/DelayUtil".split(" "),function(m,d,b,v,e,n,p,q,r,t,u){return{htmlToSvg:function(a,
h,c,b){return this._htmlToSvg(a,h,c,b)},htmlToSvgInHtml:function(a,b,c,k,l){return e(this._htmlToSvg(a,c,k,l),function(a){return e(n.loadCssFontFiles(),function(c){return p.composeHtmlStringFromParts({reportTitle:b,contentString:a.join(""),cssFiles:c})})})},_htmlToSvg:function(a,h,c,k){var l=this,f=b.create("div",{style:"position: absolute; left: 0px; top: 0px; z-index: -1000;"},document.body);f.innerHTML=a;for(var g=[];f.children.length;)a=b.create("div",{style:"position: absolute; left: 0px; top: 0px; z-index: -1000;"},
document.body),b.place(f.children[0],a),g.push(a);var d=new t,e=[];g.map(function(a,c){d.add(function(){return l._nodeToSvg(a,{fitParams:h}).then(function(a){e.push(a);k(c,g.length);return u.delay(50)})})});return d.getPromise().then(function(){b.destroy(f);g.forEach(function(a){b.destroy(a)});return r.optimizeSize(e,c)})},_nodeToSvg:function(a,b){return q.htmlToSvg(a,m.mixin({iterationsPerScript:100,clipFunc:function(a){return a&&(d.contains(a,"shapeContainer_svgContainerShowAsBar")||d.contains(a,
"imageNavigator_imagePaginationRoot"))}},b))}}});