//>>built
define("put-selector/node-html",["dijit","dojo","dojox"],function(_1,_2,_3){"use strict";var _4;function _5(_6){this.tag=_6;};var _7={};["base","link","meta","hr","br","wbr","img","embed","param","source","track","area","col","input","keygen","command"].forEach(function(_8){_7[_8]=true;});var _9=_5.prototype;var _a="";_9.nodeType=1;_9.put=function(){var _b=[this];_b.push.apply(_b,arguments);return _4.apply(null,_b);};_9.toString=function(_c){var _d=this.tag;var _e=_7[_d];if(_4.indentation&&!_c){var _f=_a;_a+=_4.indentation;var _10=(_d=="html"?"<!DOCTYPE html>\n<html":"\n"+_f+"<"+_d)+(this.attributes?this.attributes.join(""):"")+(this.className?" class=\""+this.className+"\"":"")+">"+(this.children?this.children.join(""):"")+(!this.mixed&&!_e&&this.children?"\n"+_f:"")+(_e?"":("</"+_d+">"));_a=_f;return _10;}return (this.tag=="html"?"<!DOCTYPE html>\n<html":"<"+this.tag)+(this.attributes?this.attributes.join(""):"")+(this.className?" class=\""+this.className+"\"":"")+">"+(this.children?this.children.join(""):"")+((_c||_e)?"":("</"+_d+">"));};_9.sendTo=function(_11){if(typeof _11=="function"){_11={write:_11,end:_11};}var _12=this;var _13="";function _14(_15){var _16=_17(this);if(_16){_11.write(_16);}var tag=_15.tag;if(_15.tag){if(_4.indentation){_11.write("\n"+_13+_15.toString(true));_13+=_4.indentation;}else{_11.write(_15.toString(true));}this.children=true;_12=_15;_15.pipe=_14;}else{_11.write(_15.toString());}};function _17(_18){var _19="";while(_12!=_18){if(!_12){throw new Error("Can not add to an element that has already been streamed");}var tag=_12.tag;var _1a=_7[tag];if(_4.indentation){_13=_13.slice(_4.indentation.length);if(!_1a){_19+=((_12.mixed||!_12.children)?"":"\n"+_13)+"</"+tag+">";}}else{if(!_1a){_19+="</"+tag+">";}}_12=_12.parentNode;}return _19;};_14.call(this,this);this.end=function(_1b){_11[_1b?"write":"end"](_17(this)+"\n</"+this.tag+">");};return this;};_9.children=false;_9.attributes=false;_9.insertBefore=function(_1c,_1d){_1c.parentNode=this;if(this.pipe){return this.pipe(_1c);}var _1e=this.children;if(!_1e){_1e=this.children=[];}if(_1d){for(var i=0,l=_1e.length;i<l;i++){if(_1d==_1e[i]){_1c.nextSibling=_1d;if(i>0){_1e[i-1].nextSibling=_1c;}return _1e.splice(i,0,_1c);}}}if(_1e.length>0){_1e[_1e.length-1].nextSibling=_1c;}_1e.push(_1c);};_9.appendChild=function(_1f){if(typeof _1f=="string"){this.mixed=true;}if(this.pipe){return this.pipe(_1f);}var _20=this.children;if(!_20){_20=this.children=[];}_20.push(_1f);};_9.setAttribute=function(_21,_22,_23){var _24=this.attributes;if(!_24){_24=this.attributes=[];}_24.push(" "+_21+"=\""+_22+"\"");};_9.removeAttribute=function(_25,_26){var _27=this.attributes;if(!_27){return;}var _28=" "+_25+"=",_29=_28.length;for(var i=0,l=_27.length;i<l;i++){if(_27[i].slice(0,_29)==_28){return _27.splice(i,1);}}};Object.defineProperties(_9,{innerHTML:{get:function(){return this.children.join("");},set:function(_2a){this.mixed=true;if(this.pipe){return this.pipe(_2a);}this.children=[_2a];}}});function _2b(){};_2b.prototype=new _5();_2b.prototype.toString=function(){return this.children?this.children.join(""):"";};var _2c=/</g,_2d=/&/g;module.exports=function(_2e,_2f){_4=_2e.exports=_2f().forDocument({createElement:function(tag){return new _5(tag);},createTextNode:function(_30){return (typeof _30=="string"?_30:(""+_30)).replace(_2c,"&lt;").replace(_2d,"&amp;");},createDocumentFragment:function(){return new _2b();}},{test:function(){return false;}});_4.indentation="  ";_4.Page=function(_31){return _4("html").sendTo(_31);};};});