//>>built require({cache:{"dijit/_editor/plugins/BuxEnterKeyHandling":function(){define("dijit/_editor/plugins/BuxEnterKeyHandling","dojo/_base/declare dojo/dom-construct dojo/_base/event dojo/keys dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/window ../_Plugin ../BuxRichText ../range ../selection".split(" "),function(m,o,x,h,f,a,b,c,d,g,e,u){return m("dijit._editor.plugins.EnterKeyHandling",d,{blockNodeForEnter:"BR",constructor:function(a){a&&("blockNodeForEnter"in a&&(a.blockNodeForEnter=a.blockNodeForEnter.toUpperCase()), f.mixin(this,a))},setEditor:function(b){if(this.editor!==b)if(this.editor=b,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,b.onLoadDeferred.then(f.hitch(this,function(c){this.connect(b.document,"onkeypress",function(a){if(a.charOrCode==h.ENTER){var b=f.mixin({},a);b.shiftKey=!0;this.handleEnterKey(b)||x.stop(a)}});9<=a("ie")&&this.connect(b.document,"onpaste",function(){setTimeout(dojo.hitch(this,function(){var a=this.editor.document.selection.createRange();a.move("character",-1);a.select(); a.move("character",1);a.select()}),0)});return c}));else if(this.blockNodeForEnter){var c=f.hitch(this,this.handleEnterKey);b.addKeyHandler(13,0,0,c);b.addKeyHandler(13,0,1,c);this.connect(this.editor,"onKeyPressed","onKeyPressed")}},onKeyPressed:function(){if(this._checkListLater){if(b.withGlobal(this.editor.window,"isCollapsed",dijit)){var c=b.withGlobal(this.editor.window,"getAncestorElement",u,["LI"]);if(c){a("mozilla")&&"LI"==c.parentNode.parentNode.nodeName&&(c=c.parentNode.parentNode);var d= c.firstChild;if(d&&1==d.nodeType&&("UL"==d.nodeName||"OL"==d.nodeName))c.insertBefore(d.ownerDocument.createTextNode("\u00a0"),d),d=e.create(this.editor.window),d.setStart(c.firstChild,0),c=e.getSelection(this.editor.window,!0),c.removeAllRanges(),c.addRange(d)}else g.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter),(c=b.withGlobal(this.editor.window,"getAncestorElement",u,[this.blockNodeForEnter]))?(c.innerHTML=this.bogusHtmlContent,9>=a("ie")&&(c=this.editor.document.selection.createRange(), c.move("character",-1),c.select())):console.error("onKeyPressed: Cannot find the new block node")}this._checkListLater=!1}this._pressedEnterInBlock&&(this._pressedEnterInBlock.previousSibling&&this.removeTrailingBr(this._pressedEnterInBlock.previousSibling),delete this._pressedEnterInBlock)},bogusHtmlContent:" ",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(d){var j,p,h,m,i,x,y=this.editor.document,B,r,D;if(d.shiftKey){B=b.withGlobal(this.editor.window,"getParentElement", u);if(d=e.getAncestor(B,this.blockNodes)){if("LI"==d.tagName)return!0;j=e.getSelection(this.editor.window);p=j.getRangeAt(0);p.collapsed||(p.deleteContents(),j=e.getSelection(this.editor.window),p=j.getRangeAt(0));if(e.atBeginningOfContainer(d,p.startContainer,p.startOffset))B=y.createElement("br"),h=e.create(this.editor.window),d.insertBefore(B,d.firstChild),h.setStartAfter(B),j.removeAllRanges(),j.addRange(h);else if(e.atEndOfContainer(d,p.startContainer,p.startOffset))h=e.create(this.editor.window), B=y.createElement("br"),d.appendChild(B),d.appendChild(y.createTextNode("\u00a0")),h.setStart(d.lastChild,0),j.removeAllRanges(),j.addRange(h);else return(r=p.startContainer)&&3==r.nodeType?(D=r.nodeValue,b.withGlobal(this.editor.window,function(){m=y.createTextNode(D.substring(0,p.startOffset));i=y.createTextNode(D.substring(p.startOffset));x=y.createElement("br");""==i.nodeValue&&a("webkit")&&(i=y.createTextNode("\u00a0"));o.place(m,r,"after");o.place(x,m,"after");o.place(i,x,"after");o.destroy(r); h=e.create();h.setStart(i,0);j.removeAllRanges();j.addRange(h)}),!1):!0}else if(j=e.getSelection(this.editor.window),j.rangeCount){if((p=j.getRangeAt(0))&&p.startContainer)if(p.collapsed||(p.deleteContents(),j=e.getSelection(this.editor.window),p=j.getRangeAt(0)),(r=p.startContainer)&&3==r.nodeType)b.withGlobal(this.editor.window,f.hitch(this,function(){var k=!1,l=p.startOffset;r.length");return!1}var z=!0;j=e.getSelection(this.editor.window);p=j.getRangeAt(0);p.collapsed||(p.deleteContents(),j=e.getSelection(this.editor.window),p=j.getRangeAt(0));var d=e.getBlockAncestor(p.endContainer,null,this.editor.editNode),t=d.blockNode;if(this._checkListLater= t&&("LI"==t.nodeName||"LI"==t.parentNode.nodeName))return a("mozilla")&&(this._pressedEnterInBlock=t),/^(\s| | |\xA0|]*\bclass=['"]Apple-style-span['"][^>]*>(\s| | |\xA0)<\/span>)?(
)?$/.test(t.innerHTML)&&(t.innerHTML="",a("webkit")&&(h=e.create(this.editor.window),h.setStart(t,0),j.removeAllRanges(),j.addRange(h)),this._checkListLater=!1),!0;if(!d.blockNode||d.blockNode===this.editor.editNode){try{g.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(F){}d= {blockNode:b.withGlobal(this.editor.window,"getAncestorElement",u,[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(d.blockNode){if(d.blockNode!=this.editor.editNode&&!(d.blockNode.textContent||d.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(d.blockNode),!1}else d.blockNode=this.editor.editNode;j=e.getSelection(this.editor.window);p=j.getRangeAt(0)}t=y.createElement(this.blockNodeForEnter);t.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(d.blockNode); var n=p.endOffset,z=p.endContainer;if(z.lengthb&&a.xi&&(k=!0);k||cc&&a.yu("ie"))if(e.isArray(l))k=[],m.forEach(l,function(a){k.push(z.getNode(a,this.editNode))},this),p.withGlobal(this.window,"moveToBookmark",F,[{mark:k,isCollapsed:a}]);else{if(l.startContainer&&l.endContainer&&(d=z.getSelection(this.window))&& d.removeAllRanges)d.removeAllRanges(),a=z.create(this.window),b=z.getNode(l.startContainer,this.editNode),c=z.getNode(l.endContainer,this.editNode),b&&c&&(a.setStart(b,l.startOffset),a.setEnd(c,l.endOffset),d.addRange(a))}else if((d=z.getSelection(this.window))&&d.removeAllRanges)d.removeAllRanges(),a=z.create(this.window),b=z.getNode(l.startContainer,this.editNode),c=z.getNode(l.endContainer,this.editNode),b&&c&&(a.setStart(b,l.startOffset),a.setEnd(c,l.endOffset),d.addRange(a))},_changeToStep:function(a, k){this.setValue(k.text);var l=k.bookmark;l&&this._moveToBookmark(l)},undo:function(){var a=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var k=this._steps.pop();k&&0u("ie")){var b=z.getSelection(this.window);if(e.isArray(l))m.forEach(a.mark, function(a){k.push(z.getIndex(a,this.editNode).o)},this),a.mark=k;else if(b){var c;b.rangeCount&&(c=b.getRangeAt(0));a.mark=c?c.cloneRange():p.withGlobal(this.window,H.getBookmark)}}try{a.mark&&a.mark.startContainer&&(k=z.getIndex(a.mark.startContainer,this.editNode).o,a.mark={startContainer:k,startOffset:a.mark.startOffset,endContainer:a.mark.endContainer===a.mark.startContainer?k:z.getIndex(a.mark.endContainer,this.editNode).o,endOffset:a.mark.endOffset})}catch(d){a.mark=null}}return a},_beginEditing:function(){0=== this._steps.length&&this._steps.push({text:G.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var a=G.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:a,bookmark:this._getBookmark()})},onKeyDown:function(a){!u("ie")&&(!this.iframe&&a.keyCode==g.TAB&&!this.tabIndent)&&this._saveSelection();if(this.customUndo){var k=a.keyCode;if(a.ctrlKey&&!a.altKey){if(90==k||122==k){d.stop(a);this.undo();return}if(89==k||121==k){d.stop(a);this.redo(); return}}this.inherited(arguments);switch(k){case g.ENTER:case g.BACKSPACE:case g.DELETE:this.beginEditing();break;case 88:case 86:if(a.ctrlKey&&!a.altKey&&!a.metaKey){this.endEditing();88==a.keyCode?this.beginEditing("cut"):this.beginEditing("paste");setTimeout(e.hitch(this,this.endEditing),1);break}default:if(!a.ctrlKey&&!a.altKey&&!a.metaKey&&(a.keyCodeg.F15)){this.beginEditing();break}case g.ALT:this.endEditing();break;case g.UP_ARROW:case g.DOWN_ARROW:case g.LEFT_ARROW:case g.RIGHT_ARROW:case g.HOME:case g.END:case g.PAGE_UP:case g.PAGE_DOWN:this.endEditing(!0); case g.CTRL:case g.SHIFT:case g.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(a){}},_restoreSelection:function(){this._savedSelection&&(delete this._cursorToStart,p.withGlobal(this.window,"isCollapsed",F)&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(a){this.customUndo? this.isClosed?this.setValue(a):(this.beginEditing(),a||(a=" "),this.setValue(a),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(a){var k=e.hitch(this,function(){!this.disabled&&a||!this._buttonEnabledPlugins&&a?m.forEach(this._plugins,function(k){k.set("disabled",!0)}):this.disabled&&!a&&m.forEach(this._plugins,function(k){k.set("disabled",!1)})});this.setValueDeferred.addCallback(k);this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&& this.document.body&&c.set(this.document.body,"color",c.get(this.iframe,"color"))}catch(a){}}});e.mixin(r.registry,{undo:n,redo:n,cut:n,copy:n,paste:n,insertOrderedList:n,insertUnorderedList:n,indent:n,outdent:n,justifyCenter:n,justifyFull:n,justifyLeft:n,justifyRight:n,"delete":n,selectAll:n,removeFormat:n,unlink:n,insertHorizontalRule:n,bold:A,italic:A,underline:A,strikethrough:A,subscript:A,superscript:A,"|":function(){return new r({button:new I,setEditor:function(a){this.editor=a}})}});return o})}, "dijit/_editor/_Plugin":function(){define("dijit/_editor/_Plugin",["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../form/Button"],function(m,o,x,h){o=o("dijit._editor._Plugin",null,{constructor:function(f){this.params=f||{};x.mixin(this,this.params);this._connects=[];this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:h,disabled:!1,getLabel:function(f){return this.editor.commands[f]},_initButton:function(){if(this.command.length){var f= this.getLabel(this.command),a=this.editor,b=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(f=x.mixin({label:f,dir:a.dir,lang:a.lang,showLabel:!1,iconClass:b,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),this.button=new this.buttonClass(f))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){for(var f;f=this._connects.pop();)f.remove();this.dropDown&&this.dropDown.destroyRecursive()}, connect:function(f,a,b){this._connects.push(m.connect(f,a,this,b))},updateState:function(){var f=this.editor,a=this.command,b,c;if(f&&f.isLoaded&&a.length){var d=this.get("disabled");if(this.button)try{c=!d&&f.queryCommandEnabled(a),this.enabled!==c&&(this.enabled=c,this.button.set("disabled",!c)),"boolean"==typeof this.button.checked&&(b=f.queryCommandState(a),this.checked!==b&&(this.checked=b,this.button.set("checked",f.queryCommandState(a))))}catch(g){}}},setEditor:function(f){this.editor=f;this._initButton(); this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.connect(this.button,"onClick",x.hitch(this.editor,"execCommand",this.command,this.commandArg)):this.button.domNode.style.display="none");this.connect(this.editor,"onNormalizedDisplayChanged","updateState")},setToolbar:function(f){this.button&&f.addChild(this.button)},set:function(f,a){if("object"===typeof f){for(var b in f)this.set(b,f[b]);return this}b=this._getAttrNames(f);if(this[b.s])var c=this[b.s].apply(this, Array.prototype.slice.call(arguments,1));else this._set(f,a);return c||this},get:function(f){var a=this._getAttrNames(f);return this[a.g]?this[a.g]():this[f]},_setDisabledAttr:function(f){this.disabled=f;this.updateState()},_getAttrNames:function(f){var a=this._attrPairNames;if(a[f])return a[f];var b=f.charAt(0).toUpperCase()+f.substr(1);return a[f]={s:"_set"+b+"Attr",g:"_get"+b+"Attr"}},_set:function(f,a){this[f]=a}});o.registry={};return o})},"dijit/_editor/plugins/FontChoice":function(){define("dijit/_editor/plugins/FontChoice", "dojo/_base/array dojo/_base/declare dojo/dom-construct dojo/i18n dojo/_base/lang dojo/store/Memory dojo/_base/window ../../registry ../../_Widget ../../_TemplatedMixin ../../_WidgetsInTemplateMixin ../../form/FilteringSelect ../_Plugin ../range ../selection dojo/i18n!../nls/FontChoice".split(" "),function(m,o,x,h,f,a,b,c,d,g,e,u,s,j,p){var d=o("dijit._editor.plugins._FontDropDown",[d,g,e],{label:"",plainText:!1,templateString:"", postMixInProperties:function(){this.inherited(arguments);this.strings=h.getLocalization("dijit._editor","FontChoice");this.label=this.strings[this.command];this.id=c.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.selectId=this.id+"_select";this.inherited(arguments)},postCreate:function(){this.select.set("store",new a({idProperty:"value",data:m.map(this.values,function(a){var b=this.strings[a]||a;return{label:this.getLabel(a,b),name:b,value:a}},this)}));this.select.set("value","",!1);this.disabled= this.select.get("disabled")},_setValueAttr:function(a,b){b=!1!==b;this.select.set("value",0>m.indexOf(this.values,a)?"":a,b);b||(this.select._lastValueReported=null)},_getValueAttr:function(){return this.select.get("value")},focus:function(){this.select.focus()},_setDisabledAttr:function(a){this.disabled=a;this.select.set("disabled",a)}}),H=o("dijit._editor.plugins._FontNameDropDown",d,{generic:!1,command:"fontName",postMixInProperties:function(){this.values||(this.values=this.generic?["serif","sans-serif", "monospace","cursive","fantasy"]:["Arial","Times New Roman","Comic Sans MS","Courier New"]);this.inherited(arguments)},getLabel:function(a,b){return this.plainText?b:"
"+b+"
"},_setValueAttr:function(a,b){this.generic&&(a={Arial:"sans-serif",Helvetica:"sans-serif",Myriad:"sans-serif",Times:"serif","Times New Roman":"serif","Comic Sans MS":"cursive","Apple Chancery":"cursive",Courier:"monospace","Courier New":"monospace",Papyrus:"fantasy","Estrangelo Edessa":"cursive", Gabriola:"fantasy"}[a]||a);this.inherited(arguments,[a,!1!==b])}}),J=o("dijit._editor.plugins._FontSizeDropDown",d,{command:"fontSize",values:[1,2,3,4,5,6,7],getLabel:function(a,b){return this.plainText?b:""+b+""},_setValueAttr:function(a,b){b=!1!==b;a.indexOf&&-1!=a.indexOf("px")&&(a={10:1,13:2,16:3,18:4,24:5,32:6,48:7}[parseInt(a,10)]||a);this.inherited(arguments,[a,b])}}),i=o("dijit._editor.plugins._FormatBlockDropDown",d,{command:"formatBlock",values:"noFormat p h1 h2 h3 pre".split(" "), postCreate:function(){this.inherited(arguments);this.set("value","noFormat",!1)},getLabel:function(a,b){return this.plainText||"noFormat"==a?b:"<"+a+">"+b+""},_execCommand:function(a,c,d){if("noFormat"===d){var e;if((c=j.getSelection(a.window))&&0m.indexOf(this.button.values,d)&&(d="noFormat");d!==this.button.get("value")&&this.button.set("value",d,!1)}}}});m.forEach(["fontName","fontSize","formatBlock"],function(a){s.registry[a]=function(b){return new I({command:a, plainText:b.plainText})}})})},"dijit/_editor/html":function(){define("dijit/_editor/html",["dojo/_base/array","dojo/_base/lang","dojo/_base/sniff",".."],function(m,o,x,h){var f=document.createElement("form");x.add("dom-attributes-explicit",0==f.attributes.length);x.add("dom-attributes-specified-flag",0f.attributes.length);o.getObject("_editor",!0,h);h._editor.escapeXml=function(a,b){a=a.replace(/&/gm,"&").replace(//gm,">").replace(/"/gm,"""); b||(a=a.replace(/'/gm,"'"));return a};h._editor.getNodeHtml=function(a){var b;switch(a.nodeType){case 1:var c=a.nodeName.toLowerCase();if(!c||"/"==c.charAt(0))return"";b="<"+c;var d=[],g={},e;if(x("dom-attributes-explicit")||x("dom-attributes-specified-flag"))for(var f=0;e=a.attributes[f++];){var s=e.name;if("_dj"!==s.substr(0,3)&&(!x("dom-attributes-specified-flag")||e.specified)&&!(s in g)){e=e.value;if("src"==s||"href"==s)a.getAttribute("_djrealurl")&&(e=a.getAttribute("_djrealurl"));8===x("ie")&& "style"===s&&(e=e.replace("HEIGHT:","height:").replace("WIDTH:","width:"));d.push([s,e]);g[s]=e}}else{var j=(/^input$|^img$/i.test(a.nodeName)?a:a.cloneNode(!1)).outerHTML,g=j.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi),j=j.substr(0,j.indexOf(">"));m.forEach(g,function(b){if(b){var e=b.indexOf("=");if(0"+a.innerHTML+"";else if(a.childNodes.length)b+=">"+h._editor.getChildrenHtml(a)+ "";else switch(c){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":b+=" />";break;default:b+=">"}break;case 4:case 3:b=h._editor.escapeXml(a.nodeValue,!0);break;case 8:b="<\!--"+h._editor.escapeXml(a.nodeValue,!0)+"--\>";break;default:b="<\!-- Element not recognized - Type: "+a.nodeType+" Name: "+a.nodeName+"--\>"}return b};h._editor.getChildrenHtml=function(a){var b="";if(!a)return b;for(var c=a.childNodes||a,d=!x("ie")||c!==a,g,e=0;g= c[e++];)if(!d||g.parentNode==a)b+=h._editor.getNodeHtml(g);return b};return h._editor})},"dijit/_editor/BuxRichText":function(){define("dijit/_editor/BuxRichText","dojo/_base/array dojo/_base/config dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/_base/event dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/ready dojo/_base/sniff dojo/topic dojo/_base/unload dojo/_base/url dojo/_base/window ../_Widget ../_CssStateMixin ./selection ./range ./html ../focus ..".split(" "), function(m,o,x,h,f,a,b,c,d,g,e,u,s,j,p,H,J,i,I,y,B,r,D,G,z,t,F,n,A){var q=x("dijit._editor.BuxRichText",[D,G],{constructor:function(a){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};a&&j.isString(a.value)&&(this.value=a.value);this.onLoadDeferred=new h},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em", isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("BuxRichText should not be used with the TEXTAREA tag. See dijit._editor.BuxRichText docs.");this.contentPreFilters=[j.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);i("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters), this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));i("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(i("ie")||i("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[j.hitch(this,this._stripBreakerNodes)].concat(this.contentDomPostFilters);this.inherited(arguments);I.publish(A._scopeName+ "._editor.BuxRichText::init",this);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var a=j.hitch(this,function(a,k){return function(){return!this.execCommand(a,k)}}),l={b:a("bold"),i:a("italic"),u:a("underline"),a:a("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:a("formatblock","h1"),2:a("formatblock","h2"),3:a("formatblock","h3"),4:a("formatblock","h4"),"\\":a("insertunorderedlist")};i("ie")||(l.Z=a("redo"));for(var b in l)this.addKeyHandler(b, !0,!1,l[b])},events:["onKeyPress","onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(q._editorCommandsLocalized)this._local2NativeFormatNames=q._local2NativeFormatNames,this._native2LocalFormatNames=q._native2LocalFormatNames;else{q._editorCommandsLocalized=!0;q._local2NativeFormatNames={};q._native2LocalFormatNames={};this._local2NativeFormatNames=q._local2NativeFormatNames;this._native2LocalFormatNames=q._native2LocalFormatNames;for(var a="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "), b="",d,e=0;d=a[e++];)b="l"!==d.charAt(1)?b+("<"+d+">content
"):b+("<"+d+">
  • content

  • ");var g=c.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:0.01},innerHTML:b});r.body().appendChild(g);a=j.hitch(this,function(){for(var a=g.firstChild;a;)try{z.selectElement(a.firstChild);var k=a.tagName.toLowerCase();this._local2NativeFormatNames[k]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[k]]= k;a=a.nextSibling.nextSibling}catch(b){}g.parentNode.removeChild(g);g.innerHTML=""});setTimeout(a,0)}},open:function(k){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new h;this.isClosed||this.close();I.publish(A._scopeName+"._editor.BuxRichText::open",this);1===arguments.length&&k.nodeName&&(this.domNode=k);var l=this.domNode,d;if(j.isString(this.value))d=this.value,delete this.value,l.innerHTML="";else if(l.nodeName&&"textarea"==l.nodeName.toLowerCase()){var e=this.textarea= l;this.name=e.name;d=e.value;l=this.domNode=r.doc.createElement("div");l.setAttribute("widgetId",this.id);e.removeAttribute("widgetId");l.cssText=e.cssText;l.className+=" "+e.className;c.place(l,e,"before");var E=j.hitch(this,function(){g.set(e,{display:"block",position:"absolute",top:"-1000px"});if(i("ie")){var a=e.style;this.__overflow=a.overflow;a.overflow="hidden"}});i("ie")?setTimeout(E,10):E();if(e.form){var u=e.value;this.reset=function(){this.getValue()!==u&&this.replaceValue(u)};p(e.form, "submit",j.hitch(this,function(){a.set(e,"disabled",this.disabled);e.value=this.getValue()}))}}else d=F.getChildrenHtml(l),l.innerHTML="";this.value=d;l.nodeName&&"LI"===l.nodeName&&(l.innerHTML="
    ");this.header=l.ownerDocument.createElement("div");l.appendChild(this.header);this.editingArea=l.ownerDocument.createElement("div");l.appendChild(this.editingArea);this.footer=l.ownerDocument.createElement("div");l.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&& (!o.useXDomain||o.allowXdRichTextSave)){if((E=f.byId(A._scopeName+"._editor.BuxRichText.value"))&&""!==E.value)for(var m=E.value.split(this._SEPARATOR),n=0,t;t=m[n++];)if(t=t.split(this._NAME_CONTENT_SEP),t[0]===this.name){d=t[1];m=m.splice(n,1);E.value=m.join(this._SEPARATOR);break}q._globalSaveHandler||(q._globalSaveHandler={},y.addOnUnload(function(){for(var a in q._globalSaveHandler){var k=q._globalSaveHandler[a];j.isFunction(k)&&k()}}));q._globalSaveHandler[this.id]=j.hitch(this,"_saveContent")}this.isClosed= !1;var C=this.editorObject=this.iframe=r.doc.createElement("iframe");C.id=this.id+"_iframe";C.style.border="none";C.style.width="100%";this._layoutMode?C.style.height="100%":7<=i("ie")?(this.height&&(C.style.height=this.height),this.minHeight&&(C.style.minHeight=this.minHeight)):C.style.height=this.height?this.height:this.minHeight;C.frameBorder=0;C._loadFunc=j.hitch(this,function(a){this.window=a;this.document=a.document;i("ie")&&this._localizeEditorCommands();this.onLoad(d)});var E=this._getIframeDocTxt().replace(/\\/g, "\\\\").replace(/'/g,"\\'"),K;K=11>i("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain="'+document.domain+"\";}document.write('"+E+"');document.close()":"javascript: '"+E+"'";9==i("ie")?(this.editingArea.appendChild(C),C.src=K):(C.setAttribute("src",K),this.editingArea.appendChild(C));4>=i("safari")&&(E=C.getAttribute("src"),(!E||-1===E.indexOf("javascript"))&&setTimeout(function(){C.setAttribute("src",K)},0));"LI"===l.nodeName&&(l.lastChild.style.marginTop="-1.2em");b.add(this.domNode, this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var a=g.getComputedStyle(this.domNode),b=[a.fontWeight,a.fontSize,a.fontFamily].join(" "),c=a.lineHeight,c=0<=c.indexOf("px")?parseFloat(c)/parseFloat(a.fontSize):0<=c.indexOf("em")?parseFloat(c):"normal",d="",e=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(a){var a=a.replace(/^;/ig,"")+";",k=a.split(":")[0];if(k){var k=j.trim(k),k=k.toLowerCase(),b,l="";for(b=0;b\n\n":"\n\n",i("mozilla")&&a.length?""+a[0].innerHTML+"\n":"","\n\n",this._applyEditingAreaStyleSheets(),"\n\n\n","
    \n"].join("")},_applyEditingAreaStyleSheets:function(){var a=[];this.styleSheets&&(a=this.styleSheets.split(";"),this.styleSheets="");a=a.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var b="",c=0,d;d=a[c++];)d=(new B(r.global.location,d)).toString(), this.editingAreaStyleSheets.push(d),b+='';return b},addStyleSheet:function(a){var b=a.toString();if("."===b.charAt(0)||"/"!==b.charAt(0)&&!a.host)b=(new B(r.global.location,b)).toString();-1",this.iframe,"before");this.afterIframeNode=c.place("
    ",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){b.editNode.focus()};this.focusNode=this.editNode;var d=this.events.concat(this.captureEvents),e=this.iframe?this.document:this.editNode;m.forEach(d,function(a){this.connect(e,a.toLowerCase(), a)},this);this.connect(e,"onmouseup","onClick");i("ie")?(this.connect(this.document,"onmousedown","_onIEMouseDown"),this.editNode.style.zoom=1):this.connect(this.document,"onmousedown",function(){delete this._cursorToStart});i("webkit")&&(this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged"),this.connect(this.document,"onmousedown",function(a){(a=a.target)&&(a===this.document.body||a===this.document)&&setTimeout(j.hitch(this,"placeCursorAtEnd"),0)}));if(i("ie"))try{this.document.execCommand("RespectVisibilityInDesign", !0,null)}catch(g){}this.isLoaded=!0;this.set("disabled",this.disabled);d=j.hitch(this,function(){var b=this.value;this.setValue(a);try{this.onLoadDeferred&&this.onLoadDeferred.callback(!0)}catch(l){if("This deferred has already been resolved"===l.message)this.setValue(b);else throw l;}this.onDisplayChanged();this.focusOnLoad&&J(j.hitch(this,function(){setTimeout(j.hitch(this,"focus"),this.updateInterval)}));this.value=this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.addCallback(d): d()},onKeyDown:function(a){if(a.keyCode===s.TAB&&this.isTabIndent&&(e.stop(a),this.queryCommandEnabled(a.shiftKey?"outdent":"indent")))this.execCommand(a.shiftKey?"outdent":"indent");a.keyCode==s.TAB&&!this.isTabIndent&&(a.shiftKey&&!a.ctrlKey&&!a.altKey?this.beforeIframeNode.focus():!a.shiftKey&&(!a.ctrlKey&&!a.altKey)&&this.afterIframeNode.focus());9>i("ie")&&(a.keyCode===s.BACKSPACE&&"Control"===this.document.selection.type)&&(a.stopPropagation(),a.preventDefault(),this.execCommand("delete")); i("ff")&&(a.keyCode===s.PAGE_UP||a.keyCode===s.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&a.preventDefault();return!0},onKeyUp:function(){},setDisabled:function(a){u.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",a)},_setValueAttr:function(a){this.setValue(a)},_setDisableSpellCheckAttr:function(k){this.document?a.set(this.document.body,"spellcheck",!k):this.onLoadDeferred.addCallback(j.hitch(this, function(){a.set(this.document.body,"spellcheck",!k)}));this._set("disableSpellCheck",k)},onKeyPress:function(a){if(a.keyCode===s.SHIFT||a.keyCode===s.ALT||a.keyCode===s.META||a.keyCode===s.CTRL||a.keyCode==s.TAB&&!this.isTabIndent&&!a.ctrlKey&&!a.altKey)return!0;var b=a.keyChar&&a.keyChar.toLowerCase()||a.keyCode,b=this._keyHandlers[b],c=arguments;b&&!a.altKey&&m.some(b,function(b){if(!(b.shift^a.shiftKey)&&!(b.ctrl^(a.ctrlKey||a.metaKey)))return b.handler.apply(this,c)||a.preventDefault(),!0},this); this._onKeyHitch||(this._onKeyHitch=j.hitch(this,"onKeyPressed"));setTimeout(this._onKeyHitch,1);return!0},addKeyHandler:function(a,b,c,d){j.isArray(this._keyHandlers[a])||(this._keyHandlers[a]=[]);this._keyHandlers[a].push({shift:c||!1,ctrl:b||!1,handler:d})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(a){this.onDisplayChanged(a)},_onIEMouseDown:function(){!this.focused&&!this.disabled&&this.focus()},_onBlur:function(a){this.inherited(arguments);var b=this.getValue(!0);if(b!== this.value)this.onChange(b);this._set("value",b)},_onFocus:function(a){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!i("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():r.doc.body.focus&&r.doc.body.focus()},focus:function(){if(this.isLoaded){if(this._cursorToStart&&(delete this._cursorToStart,this.editNode.childNodes)){this.placeCursorAtStart();return}9>i("ie")? this.iframe.fireEvent("onfocus",document.createEventObject()):this.editNode.focus()}else this.focusOnLoad=!0},updateInterval:200,_updateTimer:null,onDisplayChanged:function(){this._updateTimer&&clearTimeout(this._updateTimer);this._updateHandler||(this._updateHandler=j.hitch(this,"onNormalizedDisplayChanged"));this._updateTimer=setTimeout(this._updateHandler,this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(a,b){var c= a.toLowerCase();"formatblock"===c?i("safari")&&void 0===b&&(c="heading"):"hilitecolor"===c&&!i("mozilla")&&(c="backcolor");return c},_qcaCache:{},queryCommandAvailable:function(a){var b=this._qcaCache[a];return void 0!==b?b:this._qcaCache[a]=this._queryCommandAvailable(a)},_queryCommandAvailable:function(a){function b(a){return{ie:Boolean(a&c),mozilla:Boolean(a&d),webkit:Boolean(a&e),opera:Boolean(a&g)}}var c=1,d=2,e=4,g=8,f=null;switch(a.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":f= b(d|c|e|g);break;case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":f=b(d|c|g|e);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":f=b(c);break;case "cut":case "copy":case "paste":f=b(c|d|e);break;case "inserttable":f= b(d|c);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":f=b(c|d);break;default:return!1}return(i("ie")||i("trident"))&&f.ie||i("mozilla")&&f.mozilla||i("webkit")&&f.webkit||i("opera")&&f.opera},execCommand:function(a,b){var c;this.focused&&this.focus();a=this._normalizeCommand(a,b);if(void 0!==b){if("heading"===a)throw Error("unimplemented");if("formatblock"===a&&(i("ie")||i("trident")))b="<"+b+">"}var d= "_"+a+"Impl";if(this[d])c=this[d](b);else if((b=1/gm,">").replace(/"/gm,""");b||(a=a.replace(/'/gm,"'"));return a},getNodeHtml:function(a){u.deprecated("dijit.Editor::getNodeHtml is deprecated", "use dijit/_editor/html::getNodeHtml instead",2);return F.getNodeHtml(a)},getNodeChildrenHtml:function(a){u.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return F.getChildrenHtml(a)},close:function(a){if(!this.isClosed){arguments.length||(a=!0);a&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this.disconnect(this._webkitListener),delete this._webkitListener);i("ie")&&(this.iframe.onfocus= null);this.iframe._loadFunc=null;this._iframeRegHandle&&(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var d=this.textarea.style;d.position="";d.left=d.top="";i("ie")&&(d.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;c.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;b.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode; this.window&&this.window._frameElement&&(this.window._frameElement=null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&clearTimeout(this._updateTimer);this.inherited(arguments);q._globalSaveHandler&&delete q._globalSaveHandler[this.id]},_removeMozBogus:function(a){return a.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(a){a= a.replace(/\sclass="webkit-block-placeholder"/gi,"");a=a.replace(/\sclass="apple-style-span"/gi,"");return a=a.replace(//gi,"")},_normalizeFontStyle:function(a){return a.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2")},_preFixUrlAttributes:function(a){return a.replace(/(?:(]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(]+))/gi, "$1$4$2$3$5$2 _djrealurl=$2$3$5$2")},_browserQueryCommandEnabled:function(a){if(!a)return!1;var b=9>i("ie")?this.document.selection.createRange():this.document;try{return b.queryCommandEnabled(a)}catch(c){return!1}},_createlinkEnabledImpl:function(){var a=!0;return a=i("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var a=!0;return a=i("mozilla")||i("webkit")?this._sCall("hasAncestorElement", ["a"]):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var a=!0;return a=i("mozilla")||i("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var a=!0;i("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("cut");return a},_copyEnabledImpl:function(){var a=!0;i("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("copy");return a},_pasteEnabledImpl:function(){var a= !0;return i("webkit")?!0:a=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(a){return i("ie")?this._inserthtmlImpl("
    "):this.document.execCommand("inserthorizontalrule",!1,a)},_unlinkImpl:function(a){return this.queryCommandEnabled("unlink")&&(i("mozilla")||i("webkit"))?(a=this._sCall("getAncestorElement",["a"]),this._sCall("selectElement",[a]),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",!1,a)},_hilitecolorImpl:function(a){var b; this._handleTextColorOrProperties("hilitecolor",a)||(i("mozilla")?(this.document.execCommand("styleWithCSS",!1,!0),b=this.document.execCommand("hilitecolor",!1,a),this.document.execCommand("styleWithCSS",!1,!1)):b=this.document.execCommand("hilitecolor",!1,a));return b},_backcolorImpl:function(a){i("ie")&&(a=a?a:null);var b=this._handleTextColorOrProperties("backcolor",a);b||(b=this.document.execCommand("backcolor",!1,a));return b},_forecolorImpl:function(a){i("ie")&&(a=a?a:null);var b=!1;(b=this._handleTextColorOrProperties("forecolor", a))||(b=this.document.execCommand("forecolor",!1,a));return b},_inserthtmlImpl:function(a){var a=this._preFilterContent(a),b=!0;if(9>i("ie")){var d=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var e=d.item(0);d.length;)d.remove(d.item(0));e.outerHTML=a}else d.pasteHTML(a);d.select()}else if(8>i("trident")){var g=t.getSelection(this.window);if(g&&g.rangeCount&&g.getRangeAt){d=g.getRangeAt(0);d.deleteContents();var f=c.create("div");f.innerHTML= a;for(var h,e=this.document.createDocumentFragment();a=f.firstChild;)h=e.appendChild(a);d.insertNode(e);h&&(d=d.cloneRange(),d.setStartAfter(h),d.collapse(!1),g.removeAllRanges(),g.addRange(d))}}else i("mozilla")&&!a.length?this._sCall("remove"):b=this.document.execCommand("inserthtml",!1,a);return b},_boldImpl:function(a){var b=!1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("bold");b||(b=this.document.execCommand("bold",!1,a));return b},_italicImpl:function(a){var b= !1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("italic");b||(b=this.document.execCommand("italic",!1,a));return b},_underlineImpl:function(a){var b=!1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("underline");b||(b=this.document.execCommand("underline",!1,a));return b},_strikethroughImpl:function(a){var b=!1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("strikethrough");b||(b=this.document.execCommand("strikethrough", !1,a));return b},_superscriptImpl:function(a){var b=!1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("superscript");b||(b=this.document.execCommand("superscript",!1,a));return b},_subscriptImpl:function(a){var b=!1;if(i("ie")||i("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("subscript");b||(b=this.document.execCommand("subscript",!1,a));return b},_fontnameImpl:function(a){var b;if(i("ie")||i("trident"))b=this._handleTextColorOrProperties("fontname", a);b||(b=this.document.execCommand("fontname",!1,a));return b},_fontsizeImpl:function(a){var b;if(i("ie")||i("trident"))b=this._handleTextColorOrProperties("fontsize",a);b||(b=this.document.execCommand("fontsize",!1,a));return b},_insertorderedlistImpl:function(a){var b=!1;if(i("ie")||i("trident"))b=this._adaptIEList("insertorderedlist",a);b||(b=this.document.execCommand("insertorderedlist",!1,a));return b},_insertunorderedlistImpl:function(a){var b=!1;if(i("ie")||i("trident"))b=this._adaptIEList("insertunorderedlist", a);b||(b=this.document.execCommand("insertunorderedlist",!1,a));return b},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(a){var b=0;if(a&&a.childNodes){var c;for(c=0;c=c.length&&c.nextSibling;)d-=c.length,c=c.nextSibling;for(var e=null;this._isNodeEmpty(c,d)&& c!==e;)e=c,b=this._removeStartingRangeFromRange(c,b),c=b.startContainer,d=0;a.removeAllRanges();a.addRange(b)}},_adaptIEFormatAreaAndExec:function(a){var b=t.getSelection(this.window),d=this.document,e,g,f,i,h,u,p,n;if(a&&b&&b.isCollapsed){if(this.queryCommandValue(a)){var o=this._tagNamesForCommand(a);f=b.getRangeAt(0);var q=f.startContainer;if(3===q.nodeType){var w=f.endOffset;q.length>>16).toString(16),e="#000000".slice(0,7-e.length)+e);this.value=e;(a=this.button.dropDown)&&e!==a.get("value")&&a.set("value",e,!1)}}});f.registry.foreColor=function(){return new b({command:"foreColor"})};f.registry.hiliteColor=function(){return new b({command:"hiliteColor"})};return b})},"dijit/_editor/selection":function(){define("dijit/_editor/selection",["dojo/dom","dojo/_base/lang","dojo/_base/sniff","dojo/_base/window",".."],function(m, o,x,h,f){o.getObject("_editor.selection",!0,f);o.mixin(f._editor.selection,{getType:function(){if(h.doc.getSelection){var a="text",b;try{b=h.global.getSelection()}catch(c){}b&&1==b.rangeCount&&(b=b.getRangeAt(0),b.startContainer==b.endContainer&&(1==b.endOffset-b.startOffset&&3!=b.startContainer.nodeType)&&(a="control"));return a}return h.doc.selection.type.toLowerCase()},getSelectedText:function(){if(h.doc.getSelection){var a=h.global.getSelection();if(a)return a.toString()}else return"control"== f._editor.selection.getType()?null:h.doc.selection.createRange().text;return""},getSelectedHtml:function(){if(h.doc.getSelection){var a=h.global.getSelection();if(a&&a.rangeCount){var b,c="";for(b=0;b