define("dojo/html",["./_base/kernel","./_base/lang","./_base/array","./_base/declare","./dom","./dom-construct","./parser"],function(_1,_2,_3,_4,_5,_6,_7){var_8=0;var_9={_secureForInnerHtml:function(_a){return_a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"");},_emptyNode:_6.empty,_setNodeContent:function(_b,_c){_6.empty(_b);if(_c){if(typeof_c=="number"){_c=_c.toString();}if(typeof_c=="string"){_c=_6.toDom(_c,_b.ownerDocument);}if(!_c.nodeType&&_2.isArrayLike(_c)){for(var_d=_c.length,i=0;i<_c.length;i=_d==_c.length?i+1:0){_6.place(_c[i],_b,"last");}}else{_6.place(_c,_b,"last");}}return_b;},_ContentSetter:_4("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,parserScope:_1._scopeName,startup:true,constructor:function(_e,_f){_2.mixin(this,_e||{});_f=this.node=_5.byId(this.node||_f);if(!this.id){this.id=["Setter",(_f)?_f.id||_f.tagName:"",_8++].join("_");}},set:function(_10,_11){if(undefined!==_10){this.content=_10;}if(typeof_10=="number"){_10=_10.toString();}if(_11){this._mixin(_11);}this.onBegin();this.setContent();varret=this.onEnd();if(ret&&ret.then){returnret;}else{returnthis.node;}},setContent:function(){var_12=this.node;if(!_12){thrownewError(this.declaredClass+": setContent given no node");}try{_12=_9._setNodeContent(_12,this.content);}catch(e){var_13=this.onContentError(e);try{_12.innerHTML=_13;}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e);}}this.node=_12;},empty:function(){if(this.parseDeferred){if(!this.parseDeferred.isResolved()){this.parseDeferred.cancel();}deletethis.parseDeferred;}if(this.parseResults&&this.parseResults.length){_3.forEach(this.parseResults,function(w){if(w.destroy){w.destroy();}});deletethis.parseResults;}_6.empty(this.node);},onBegin:function(){var_14=this.content;if(_2.isString(_14)){if(this.cleanContent){_14=_9._secureForInnerHtml(_14);}if(this.extractContent){var_15=_14.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_15){_14=_15[1];}}}this.empty();this.content=_14;returnthis.node;},onEnd:function(){if(this.parseContent){this._parse();}returnthis.node;},tearDown:function(){deletethis.parseResults;deletethis.parseDeferred;deletethis.node;deletethis.content;},onContentError:function(err){return"Error occurred setting content: "+err;},onExecError:function(err){return"Error occurred executing scripts: "+err;},_mixin:function(_16){var_17={},key;for(keyin_16){if(keyin_17){continue;}this[key]=_16[key];}},_parse:function(){var_18=this.node;try{var_19={};_3.forEach(["dir","lang","textDir"],function(_1a){if(this[_1a]){_19[_1a]=this[_1a];}},this);var_1b=this;this.parseDeferred=_7.parse({rootNode:_18,noStart:!this.startup,inherited:_19,scope:this.parserScope}).then(function(_1c){return_1b.parseResults=_1c;},function(e){_1b._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);});}catch(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id);}},_onError:function(_1d,err,_1e){var_1f=this["on"+_1d+"Error"].call(this,err);if(_1e){console.error(_1e,err);}else{if(_1f){_9._setNodeContent(this.node,_1f,true);}}}}),set:function(_20,_21,_22){if(undefined==_21){console.warn("dojo.html.set: no cont argument provided, using empty string");_21="";}if(typeof_21=="number"){_21=_21.toString();}if(!_22){return_9._setNodeContent(_20,_21,true);}else{varop=new_9._ContentSetter(_2.mixin(_22,{content:_21,node:_20}));returnop.set();}}};_2.setObject("dojo.html",_9);return_9;});