text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
  
  //>>built
  require({cache:{"dijit/Editor":function(){define("require dojo/_base/array dojo/_base/declare dojo/Deferred dojo/i18n dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/string dojo/topic ./_Container ./Toolbar ./ToolbarSeparator ./layout/_LayoutWidget ./form/ToggleButton ./_editor/_Plugin ./_editor/plugins/EnterKeyHandling ./_editor/html ./_editor/range ./_editor/RichText ./main dojo/i18n!./_editor/nls/commands".split(" "),function(v,E,L,H,G,c,
  e,f,h,l,p,n,u,x,z,b,g,A,N,q,t,B,F,Q,O){function C(k){return new q({command:k.name})}function m(k){return new q({buttonClass:N,command:k.name})}L=L("dijit.Editor",Q,{plugins:null,extraPlugins:null,constructor:function(){p.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",t]);this._plugins=[];this._editInterval=
  1E3*this.editActionInterval;if(n("ie")||n("trident")||n("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new H;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);p.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=G.getLocalization("dijit._editor","commands",this.lang);
  n("webkit")&&h.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new b({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));E.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);e.add(this.iframe.parentNode,"dijitEditorIFrameContainer");e.add(this.iframe,"dijitEditorIFrame");c.set(this.iframe,"allowTransparency",!0);this.toolbar.startup();
  this.onNormalizedDisplayChanged()},destroy:function(){E.forEach(this._plugins,function(k){k&&k.destroy&&k.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(k,D){var J=p.isString(k)?{name:k}:p.isFunction(k)?{ctor:k}:k;if(!J.setEditor){var a={args:J,plugin:null,editor:this};J.name&&(q.registry[J.name]?a.plugin=q.registry[J.name](J):x.publish(O._scopeName+".Editor.getPlugin",a));if(!a.plugin)try{var d=J.ctor||p.getObject(J.name)||
  v(J.name);d&&(a.plugin=new d(J))}catch(r){throw Error(this.id+": cannot find plugin ["+J.name+"]");}if(!a.plugin)throw Error(this.id+": cannot find plugin ["+J.name+"]");k=a.plugin}1<arguments.length?this._plugins[D]=k:this._plugins.push(k);k.setEditor(this);p.isFunction(k.setToolbar)&&k.setToolbar(this.toolbar)},resize:function(k){k&&A.prototype.resize.apply(this,arguments)},layout:function(){var k=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+f.getPadBorderExtents(this.iframe.parentNode).h+
  f.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=k+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(k){var D,J=this.document.body,a=J.clientWidth,d=J.clientHeight,r=J.clientLeft,y=J.offsetWidth,w=J.offsetHeight,I=J.offsetLeft;/^rtl$/i.test(J.dir||"")?a<y&&k.x>a&&k.x<y&&(D=!0):k.x<r&&k.x>I&&(D=!0);D||d<w&&k.y>d&&k.y<w&&(D=!0);D||(delete this._cursorToStart,delete this._savedSelection,"BODY"==k.target.tagName&&this.defer("placeCursorAtEnd"),
  this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(k){this.customUndo&&this.endEditing(!0);"BODY"!=k.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(k){this._inEditing||(this._inEditing=!0,this._beginEditing(k));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(k){if(!this.customUndo||
  "undo"!=k&&"redo"!=k){this.customUndo&&(this.endEditing(),this._beginEditing());var D=this.inherited(arguments);this.customUndo&&this._endEditing();return D}return this[k]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(k){try{var D=this.document.execCommand(k,!1,null);if(n("webkit")&&!D)throw{};}catch(J){D=u.substitute,alert(D(this.commands.systemShortcut,
  [this.commands[k],D(this.commands[n("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[k]])])),D=!1}return D},queryCommandEnabled:function(k){return!this.customUndo||"undo"!=k&&"redo"!=k?this.inherited(arguments):"undo"==k?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(k){var D=k.mark,J=k.mark;k=k.isCollapsed;var a;if(J)if(9>n("ie")||9===n("ie")&&n("quirks"))if(p.isArray(J))D=[],E.forEach(J,function(y){D.push(F.getNode(y,this.editNode))},this),this.selection.moveToBookmark({mark:D,
  isCollapsed:k});else{if(J.startContainer&&J.endContainer&&(a=F.getSelection(this.window))&&a.removeAllRanges){a.removeAllRanges();k=F.create(this.window);var d=F.getNode(J.startContainer,this.editNode);var r=F.getNode(J.endContainer,this.editNode);d&&r&&(k.setStart(d,J.startOffset),k.setEnd(r,J.endOffset),a.addRange(k))}}else(a=F.getSelection(this.window))&&a.removeAllRanges&&(a.removeAllRanges(),k=F.create(this.window),d=F.getNode(J.startContainer,this.editNode),r=F.getNode(J.endContainer,this.editNode),
  d&&r&&(k.setStart(d,J.startOffset),k.setEnd(r,J.endOffset),a.addRange(k)))},_changeToStep:function(k,D){this.setValue(D.text);(k=D.bookmark)&&this._moveToBookmark(k)},undo:function(){var k=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var D=this._steps.pop();D&&0<this._steps.length&&(this.focus(),this._changeToStep(D,this._steps[this._steps.length-1]),this._undoedSteps.push(D),this.onDisplayChanged(),delete this._undoRedoActive,k=!0);delete this._undoRedoActive}return k},
  redo:function(){var k=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var D=this._undoedSteps.pop();D&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],D),this._steps.push(D),this.onDisplayChanged(),k=!0);delete this._undoRedoActive}return k},endEditing:function(k){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(k),this._inEditing=!1)},_getBookmark:function(){var k=this.selection.getBookmark(),
  D=[];if(k&&k.mark){var J=k.mark;if(9>n("ie")||9===n("ie")&&n("quirks")){var a=F.getSelection(this.window);if(p.isArray(J))E.forEach(k.mark,function(r){D.push(F.getIndex(r,this.editNode).o)},this),k.mark=D;else if(a){var d;a.rangeCount&&(d=a.getRangeAt(0));k.mark=d?d.cloneRange():this.selection.getBookmark()}}try{k.mark&&k.mark.startContainer&&(D=F.getIndex(k.mark.startContainer,this.editNode).o,k.mark={startContainer:D,startOffset:k.mark.startOffset,endContainer:k.mark.endContainer===k.mark.startContainer?
  D:F.getIndex(k.mark.endContainer,this.editNode).o,endOffset:k.mark.endOffset})}catch(r){k.mark=null}}return k},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:B.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var k=B.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:k,bookmark:this._getBookmark()})},onKeyDown:function(k){n("ie")||this.iframe||k.keyCode!=l.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var D=
  k.keyCode;if(k.ctrlKey&&!k.shiftKey&&!k.altKey){if(90==D||122==D){k.stopPropagation();k.preventDefault();this.undo();return}if(89==D||121==D){k.stopPropagation();k.preventDefault();this.redo();return}}this.inherited(arguments);switch(D){case l.ENTER:case l.BACKSPACE:case l.DELETE:this.beginEditing();break;case 88:case 86:if(k.ctrlKey&&!k.altKey&&!k.metaKey){this.endEditing();88==k.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!k.ctrlKey&&!k.altKey&&
  !k.metaKey&&(k.keyCode<l.F1||k.keyCode>l.F15)){this.beginEditing();break}case l.ALT:this.endEditing();break;case l.UP_ARROW:case l.DOWN_ARROW:case l.LEFT_ARROW:case l.RIGHT_ARROW:case l.HOME:case l.END:case l.PAGE_UP:case l.PAGE_DOWN:this.endEditing(!0);case l.CTRL:case l.SHIFT:case l.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(k){}},_restoreSelection:function(){this._savedSelection&&
  (delete this._cursorToStart,this.selection.isCollapsed()&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(k){this.customUndo?this.isClosed?this.setValue(k):(this.beginEditing(),k||(k="\x26#160;"),this.setValue(k),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(k){this.setValueDeferred.then(p.hitch(this,function(){!this.disabled&&k||!this._buttonEnabledPlugins&&k?
  E.forEach(this._plugins,function(D){D.set("disabled",!0)}):this.disabled&&!k&&E.forEach(this._plugins,function(D){D.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(h.set(this.document.body,"color",h.get(this.iframe,"color")),h.set(this.document.body,"background-color",h.get(this.iframe,"background-color")))}catch(k){}}});p.mixin(q.registry,{undo:C,redo:C,cut:C,copy:C,paste:C,insertOrderedList:C,insertUnorderedList:C,
  indent:C,outdent:C,justifyCenter:C,justifyFull:C,justifyLeft:C,justifyRight:C,"delete":C,selectAll:C,removeFormat:C,unlink:C,insertHorizontalRule:C,bold:m,italic:m,underline:m,strikethrough:m,subscript:m,superscript:m,"|":function(){return new q({setEditor:function(k){this.editor=k;this.button=new g({ownerDocument:k.ownerDocument})}})}});return L})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
  function(v,E,L,H,G,c,e,f){L("dijit-legacy-requires")&&G(0,function(){v(["dijit/ToolbarSeparator"])});return E("dijit.Toolbar",[c,f,e],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],
  function(v,E,L,H){return v("dijit.ToolbarSeparator",[L,H],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);E.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/_editor/_Plugin":function(){define(["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(v,E,L,H,G){E=E("dijit._editor._Plugin",H,{constructor:function(c){this.params=
  c||{};L.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:G,disabled:!1,getLabel:function(c){return this.editor.commands[c]},_initButton:function(){if(this.command.length){var c=this.getLabel(this.command),e=this.editor,f=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(c=L.mixin({label:c,ownerDocument:e.ownerDocument,dir:e.dir,
  lang:e.lang,showLabel:!1,iconClass:f,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete c.name,this.button=new this.buttonClass(c))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(c,e,f){this.own(v.connect(c,e,this,f))},updateState:function(){var c=this.editor,e=this.command;if(c&&c.isLoaded&&e.length){var f=this.get("disabled");if(this.button)try{var h=
  c._implCommand(e);var l=!f&&(this[h]?this[h](e):c.queryCommandEnabled(e));this.enabled!==l&&(this.enabled=l,this.button.set("disabled",!l));if(l&&"boolean"==typeof this.button.checked){var p=c.queryCommandState(e);this.checked!==p&&(this.checked=p,this.button.set("checked",c.queryCommandState(e)))}}catch(n){console.log(n)}}},setEditor:function(c){this.editor=c;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",L.hitch(this.editor,
  "execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",L.hitch(this,"updateState")))},setToolbar:function(c){this.button&&c.addChild(this.button)},set:function(c,e){if("object"===typeof c){for(var f in c)this.set(f,c[f]);return this}f=this._getAttrNames(c);if(this[f.s])var h=this[f.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(c,e);return h||this},get:function(c){var e=this._getAttrNames(c);
  return this[e.g]?this[e.g]():this[c]},_setDisabledAttr:function(c){this._set("disabled",c);this.updateState()},_getAttrNames:function(c){var e=this._attrPairNames;if(e[c])return e[c];var f=c.charAt(0).toUpperCase()+c.substr(1);return e[c]={s:"_set"+f+"Attr",g:"_get"+f+"Attr"}},_set:function(c,e){this[c]=e}});E.registry={};return E})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dojo/_base/declare dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p){return v("dijit._editor.plugins.EnterKeyHandling",h,{blockNodeForEnter:"BR",constructor:function(n){n&&("blockNodeForEnter"in n&&(n.blockNodeForEnter=n.blockNodeForEnter.toUpperCase()),H.mixin(this,n))},setEditor:function(n){if(this.editor!==n)if(this.editor=n,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,n.onLoadDeferred.then(H.hitch(this,function(x){this.own(G(n.document,"keydown",H.hitch(this,function(z){if(z.keyCode==L.ENTER){var b=H.mixin({},z);b.shiftKey=
  !0;this.handleEnterKey(b)||(z.stopPropagation(),z.preventDefault())}})));9<=c("ie")&&10>=c("ie")&&this.own(G(n.document,"paste",H.hitch(this,function(z){setTimeout(H.hitch(this,function(){var b=this.editor.document.selection.createRange();b.move("character",-1);b.select();b.move("character",1);b.select()}),0)})));return x}));else if(this.blockNodeForEnter){var u=H.hitch(this,"handleEnterKey");n.addKeyHandler(13,0,0,u);n.addKeyHandler(13,0,1,u);this.own(this.editor.on("KeyPressed",H.hitch(this,"onKeyPressed")))}},
  onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var n=this.editor.selection.getAncestorElement("LI");if(n){c("mozilla")&&"LI"==n.parentNode.parentNode.nodeName&&(n=n.parentNode.parentNode);var u=n.firstChild;!u||1!=u.nodeType||"UL"!=u.nodeName&&"OL"!=u.nodeName||(n.insertBefore(u.ownerDocument.createTextNode("\u00a0"),u),u=p.create(this.editor.window),u.setStart(n.firstChild,0),n=p.getSelection(this.editor.window,!0),n.removeAllRanges(),n.addRange(u))}else l.prototype.execCommand.call(this.editor,
  "formatblock",this.blockNodeForEnter),(n=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(n.innerHTML=this.bogusHtmlContent,9>=c("ie")&&(n=this.editor.document.selection.createRange(),n.move("character",-1),n.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:"\x26#160;",
  blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(n){var u,x=this.editor.document,z;if(n.shiftKey){n=this.editor.selection.getParentElement();if(u=p.getAncestor(n,this.blockNodes)){if("LI"==u.tagName)return!0;n=p.getSelection(this.editor.window);var b=n.getRangeAt(0);b.collapsed||(b.deleteContents(),n=p.getSelection(this.editor.window),b=n.getRangeAt(0));if(p.atBeginningOfContainer(u,b.startContainer,b.startOffset)){var g=x.createElement("br");b=p.create(this.editor.window);u.insertBefore(g,
  u.firstChild);b.setStartAfter(g);n.removeAllRanges();n.addRange(b)}else if(p.atEndOfContainer(u,b.startContainer,b.startOffset))b=p.create(this.editor.window),g=x.createElement("br"),u.appendChild(g),u.appendChild(x.createTextNode("\u00a0")),b.setStart(u.lastChild,0),n.removeAllRanges(),n.addRange(b);else{if((z=b.startContainer)&&3==z.nodeType){var A=z.nodeValue;var N=x.createTextNode(A.substring(0,b.startOffset));var q=x.createTextNode(A.substring(b.startOffset));u=x.createElement("br");""==q.nodeValue&&
  c("webkit")&&(q=x.createTextNode("\u00a0"));E.place(N,z,"after");E.place(u,N,"after");E.place(q,u,"after");E.destroy(z);b=p.create(this.editor.window);b.setStart(q,0);n.removeAllRanges();n.addRange(b);return!1}return!0}}else n=p.getSelection(this.editor.window),n.rangeCount?(b=n.getRangeAt(0))&&b.startContainer&&(b.collapsed||(b.deleteContents(),n=p.getSelection(this.editor.window),b=n.getRangeAt(0)),(z=b.startContainer)&&3==z.nodeType?(u=b.startOffset,z.length<u&&(q=this._adjustNodeAndOffset(z,u),
  z=q.node,u=q.offset),A=z.nodeValue,N=x.createTextNode(A.substring(0,u)),q=x.createTextNode(A.substring(u)),u=x.createElement("br"),q.length||(q=x.createTextNode("\u00a0")),N.length?E.place(N,z,"after"):N=z,E.place(u,N,"after"),E.place(q,u,"after"),E.destroy(z)):(0<=b.startOffset&&(g=z.childNodes[b.startOffset]),u=x.createElement("br"),q=x.createTextNode("\u00a0"),g?(E.place(u,g,"before"),E.place(q,u,"after")):(z.appendChild(u),z.appendChild(q))),b=p.create(this.editor.window),b.setStart(q,0),b.setEnd(q,
  q.length),n.removeAllRanges(),n.addRange(b),this.editor.selection.collapse(!0)):l.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var t=!0;n=p.getSelection(this.editor.window);b=n.getRangeAt(0);b.collapsed||(b.deleteContents(),n=p.getSelection(this.editor.window),b=n.getRangeAt(0));g=p.getBlockAncestor(b.endContainer,null,this.editor.editNode);var B=g.blockNode;if(this._checkListLater=B&&("LI"==B.nodeName||"LI"==B.parentNode.nodeName))return c("mozilla")&&(this._pressedEnterInBlock=
  B),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(B.innerHTML)&&(B.innerHTML="",c("webkit")&&(b=p.create(this.editor.window),b.setStart(B,0),n.removeAllRanges(),n.addRange(b)),this._checkListLater=!1),!0;if(!g.blockNode||g.blockNode===this.editor.editNode){try{l.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(F){}g={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
  blockContainer:this.editor.editNode};if(g.blockNode){if(g.blockNode!=this.editor.editNode&&!(g.blockNode.textContent||g.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(g.blockNode),!1}else g.blockNode=this.editor.editNode;n=p.getSelection(this.editor.window);b=n.getRangeAt(0)}B=x.createElement(this.blockNodeForEnter);B.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(g.blockNode);q=b.endOffset;t=b.endContainer;t.length<q&&(q=this._adjustNodeAndOffset(t,q),t=
  q.node,q=q.offset);if(p.atEndOfContainer(g.blockNode,t,q))g.blockNode===g.blockContainer?g.blockNode.appendChild(B):E.place(B,g.blockNode,"after"),t=!1,b=p.create(this.editor.window),b.setStart(B,0),n.removeAllRanges(),n.addRange(b),this.editor.height&&f.scrollIntoView(B);else if(p.atBeginningOfContainer(g.blockNode,b.startContainer,b.startOffset))E.place(B,g.blockNode,g.blockNode===g.blockContainer?"first":"before"),B.nextSibling&&this.editor.height&&(b=p.create(this.editor.window),b.setStart(B.nextSibling,
  0),n.removeAllRanges(),n.addRange(b),f.scrollIntoView(B.nextSibling)),t=!1;else{g.blockNode===g.blockContainer?g.blockNode.appendChild(B):E.place(B,g.blockNode,"after");t=!1;g.blockNode.style&&B.style&&g.blockNode.style.cssText&&(B.style.cssText=g.blockNode.style.cssText);if((z=b.startContainer)&&3==z.nodeType){q=b.endOffset;z.length<q&&(q=this._adjustNodeAndOffset(z,q),z=q.node,q=q.offset);A=z.nodeValue;N=x.createTextNode(A.substring(0,q));q=x.createTextNode(A.substring(q,A.length));E.place(N,z,
  "before");E.place(q,z,"after");E.destroy(z);for(b=N.parentNode;b!==g.blockNode;){A=x.createElement(b.tagName);b.style&&A.style&&b.style.cssText&&(A.style.cssText=b.style.cssText);"FONT"===b.tagName&&(b.color&&(A.color=b.color),b.face&&(A.face=b.face),b.size&&(A.size=b.size));for(;q;)z=q.nextSibling,A.appendChild(q),q=z;E.place(A,b,"after");N=b;q=A;b=b.parentNode}if(1==q.nodeType||3==q.nodeType&&q.nodeValue)B.innerHTML="";for(N=q;q;)z=q.nextSibling,B.appendChild(q),q=z}b=p.create(this.editor.window);
  x=N;if("BR"!==this.blockNodeForEnter){for(;x;)u=x,x=z=x.firstChild;u&&u.parentNode?(B=u.parentNode,b.setStart(B,0),n.removeAllRanges(),n.addRange(b),this.editor.height&&f.scrollIntoView(B),c("mozilla")&&(this._pressedEnterInBlock=g.blockNode)):t=!0}else b.setStart(B,0),n.removeAllRanges(),n.addRange(b),this.editor.height&&f.scrollIntoView(B),c("mozilla")&&(this._pressedEnterInBlock=g.blockNode)}return t},_adjustNodeAndOffset:function(n,u){for(;n.length<u&&n.nextSibling&&3==n.nextSibling.nodeType;)u-=
  n.length,n=n.nextSibling;return{node:n,offset:u}},removeTrailingBr:function(n){if(n=/P|DIV|LI/i.test(n.tagName)?n:this.editor.selection.getParentOfType(n,["P","DIV","LI"]))n.lastChild&&(1<n.childNodes.length&&3==n.lastChild.nodeType&&/^[\s\xAD]*$/.test(n.lastChild.nodeValue)||"BR"==n.lastChild.tagName)&&E.destroy(n.lastChild),n.childNodes.length||(n.innerHTML=this.bogusHtmlContent)}})})},"dijit/_editor/RichText":function(){define("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/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/domReady dojo/sniff dojo/string dojo/topic dojo/_base/unload dojo/_base/url dojo/window ../_Widget ../_CssStateMixin ../selection ./range ./html ../focus ../main".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u,x,z,b,g,A,N,q,t,B,F,Q,O,C,m,k,D){var J=L("dijit._editor.RichText",[F,Q],{constructor:function(a){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};a&&u.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("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[u.trim,u.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);g("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
  this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));g("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(g("ie")||g("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[u.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[u.hitch(this,
  "_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);N.publish(D._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var a=u.hitch(this,function(y,w){return function(){return!this.execCommand(y,w)}}),d={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")};g("ie")||(d.Z=a("redo"));for(var r in d)this.addKeyHandler(r,!0,!1,d[r])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(J._editorCommandsLocalized)this._local2NativeFormatNames=J._local2NativeFormatNames,this._native2LocalFormatNames=J._native2LocalFormatNames;else{J._editorCommandsLocalized=!0;J._local2NativeFormatNames={};
  J._native2LocalFormatNames={};this._local2NativeFormatNames=J._local2NativeFormatNames;this._native2LocalFormatNames=J._native2LocalFormatNames;for(var a="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),d="",r,y=0;r=a[y++];)d="l"!==r.charAt(1)?d+("\x3c"+r+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+r+"\x3e\x3cbr/\x3e"):d+("\x3c"+r+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+r+"\x3e\x3cbr/\x3e");var w=f.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:d});this.ownerDocumentBody.appendChild(w);
  a=u.hitch(this,function(){for(var I=w.firstChild;I;)try{this.selection.selectElement(I.firstChild);var K=I.tagName.toLowerCase();this._local2NativeFormatNames[K]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[K]]=K;I=I.nextSibling.nextSibling}catch(M){}f.destroy(w)});this.defer(a)}},open:function(a){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new H;this.isClosed||this.close();N.publish(D._scopeName+"._editor.RichText::open",
  this);1===arguments.length&&a.nodeName&&(this.domNode=a);var d=this.domNode;if(u.isString(this.value)){var r=this.value;d.innerHTML=""}else if(d.nodeName&&"textarea"==d.nodeName.toLowerCase()){var y=this.textarea=d;this.name=y.name;r=y.value;d=this.domNode=this.ownerDocument.createElement("div");d.setAttribute("widgetId",this.id);y.removeAttribute("widgetId");d.cssText=y.cssText;d.className+=" "+y.className;f.place(d,y,"before");var w=u.hitch(this,function(){l.set(y,{display:"block",position:"absolute",
  top:"-1000px"});if(g("ie")){var P=y.style;this.__overflow=P.overflow;P.overflow="hidden"}});g("ie")?this.defer(w,10):w();if(y.form){var I=y.value;this.reset=function(){this.getValue()!==I&&this.replaceValue(I)};x(y.form,"submit",u.hitch(this,function(){c.set(y,"disabled",this.disabled);y.value=this.getValue()}))}}else r=m.getChildrenHtml(d),d.innerHTML="";this.value=r;d.nodeName&&"LI"===d.nodeName&&(d.innerHTML=" \x3cbr\x3e");this.header=d.ownerDocument.createElement("div");d.appendChild(this.header);
  this.editingArea=d.ownerDocument.createElement("div");d.appendChild(this.editingArea);this.footer=d.ownerDocument.createElement("div");d.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!E.useXDomain||E.allowXdRichTextSave)){if((r=G.byId(D._scopeName+"._editor.RichText.value"))&&""!==r.value){w=r.value.split(this._SEPARATOR);for(var K=0,M;M=w[K++];)if(M=M.split(this._NAME_CONTENT_SEP),M[0]===this.name){this.value=M[1];w=w.splice(K,1);r.value=w.join(this._SEPARATOR);
  break}}J._globalSaveHandler||(J._globalSaveHandler={},q.addOnUnload(function(){for(var P in J._globalSaveHandler){var S=J._globalSaveHandler[P];u.isFunction(S)&&S()}}));J._globalSaveHandler[this.id]=u.hitch(this,"_saveContent")}this.isClosed=!1;r=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");r.id=this.id+"_iframe";r.style.border="none";r.style.width="100%";this._layoutMode?r.style.height="100%":7<=g("ie")?(this.height&&(r.style.height=this.height),this.minHeight&&(r.style.minHeight=
  this.minHeight)):r.style.height=this.height?this.height:this.minHeight;r.frameBorder=0;r._loadFunc=u.hitch(this,function(P){this.window=P;this.document=P.document;this.selection=new O.SelectionManager(P);g("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});w=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");w=11>g("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+w+"');document.close()":"javascript: '"+
  w+"'";this.editingArea.appendChild(r);r.src=w;"LI"===d.nodeName&&(d.lastChild.style.marginTop="-1.2em");e.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var a=l.getComputedStyle(this.domNode);if(this["aria-label"])var d=this["aria-label"];else{var r=z('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||G.byId(this["aria-labelledby"],this.ownerDocument);r&&(d=r.textContent||r.innerHTML||"")}r="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
  (d?" aria-label\x3d'"+A.escape(d)+"'":"")+"\x3e\x3c/div\x3e";var y=[a.fontWeight,a.fontSize,a.fontFamily].join(" "),w=a.lineHeight;w=0<=w.indexOf("px")?parseFloat(w)/parseFloat(a.fontSize):0<=w.indexOf("em")?parseFloat(w):"normal";var I="",K=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(M){M=M.replace(/^;/ig,"")+";";var P=M.split(":")[0];if(P){P=u.trim(P);P=P.toLowerCase();var S,R="";for(S=0;S<P.length;S++){var T=P.charAt(S);switch(T){case "-":S++,T=P.charAt(S).toUpperCase();default:R+=
  T}}l.set(K.domNode,R,"")}I+=M+";"});this.iframe.setAttribute("title",d);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||p.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",d?"\x3ctitle\x3e"+A.escape(d)+"\x3c/title\x3e":"","\x3cstyle\x3e\n\tbody,html {\n\t\tbackground:transparent;\n\t\tpadding: 1px 0 0 0;\n\t\tmargin: -1px 0 0 0;\n\t}\n\tbody,html,#dijitEditorBody { outline: none; }html { height: 100%; width: 100%; overflow: hidden; }\n",
  this.height?"\tbody,#dijitEditorBody { height: 100%; width: 100%; overflow: auto; }\n":"\tbody,#dijitEditorBody { min-height: "+this.minHeight+"; width: 100%; overflow-x: auto; overflow-y: hidden; }\n","\tbody{\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\tfont:",y,";\n",this.height||g("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",w,";\n\t}\n\tp{ margin: 1em 0; }\n\tli \x3e ul:-moz-first-node, li \x3e ol:-moz-first-node{ padding-top: 1.2em; }\n",g("ie")||g("trident")||g("edge")?"":"\tli{ min-height:1.2em; }\n",
  "\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",d?" aria-label\x3d'"+A.escape(d)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+I+"'\x3e",r,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var a=[];this.styleSheets&&(a=this.styleSheets.split(";"),this.styleSheets=
  "");a=a.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var d="",r=0,y,w=B.get(this.ownerDocument);y=a[r++];)y=(new t(w.location,y)).toString(),this.editingAreaStyleSheets.push(y),d+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+y+'"/\x3e';return d},addStyleSheet:function(a){var d=a.toString(),r=B.get(this.ownerDocument);if("."===d.charAt(0)||"/"!==d.charAt(0)&&!a.host)d=(new t(r.location,d)).toString();-1<v.indexOf(this.editingAreaStyleSheets,d)||(this.editingAreaStyleSheets.push(d),
  this.onLoadDeferred.then(u.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(d);else{var y=this.document.getElementsByTagName("head")[0],w=this.document.createElement("link");w.rel="stylesheet";w.type="text/css";w.href=d;y.appendChild(w)}})))},removeStyleSheet:function(a){var d=a.toString(),r=B.get(this.ownerDocument);if("."===d.charAt(0)||"/"!==d.charAt(0)&&!a.host)d=(new t(r.location,d)).toString();a=v.indexOf(this.editingAreaStyleSheets,d);-1!==a&&(delete this.editingAreaStyleSheets[a],
  z('link[href\x3d"'+d+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(a){a=!!a;this._set("disabled",a);if(this.isLoaded){var d=g("ie")&&(this.isLoaded||!this.focusOnLoad);d&&(this.editNode.unselectable="on");this.editNode.contentEditable=!a;this.editNode.tabIndex=a?"-1":this.tabIndex;d&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(g("mozilla")&&!a&&this._mozSettingProps){a=this._mozSettingProps;for(var r in a)if(a.hasOwnProperty(r))try{this.document.execCommand(r,
  !1,a[r])}catch(y){}}this._disabledOK=!0}},onLoad:function(a){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=k.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var d=this;this.beforeIframeNode=f.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=f.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){d.editNode.focus()};this.focusNode=
  this.editNode;var r=this.events.concat(this.captureEvents),y=this.iframe?this.document:this.editNode;this.own.apply(this,v.map(r,function(w){var I=w.toLowerCase().replace(/^on/,"");return x(y,I,u.hitch(this,w))},this));this.own(x(y,"mouseup",u.hitch(this,"onClick")));g("ie")&&(this.own(x(this.document,"mousedown",u.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);g("webkit")&&(this._webkitListener=this.own(x(this.document,"mouseup",u.hitch(this,"onDisplayChanged")))[0],this.own(x(this.document,
  "mousedown",u.hitch(this,function(w){w=w.target;!w||w!==this.document.body&&w!==this.document||this.defer("placeCursorAtEnd")}))));if(g("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(w){}this.isLoaded=!0;this.set("disabled",this.disabled);r=u.hitch(this,function(){this.setValue(a);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&b(u.hitch(this,"defer","focus",this.updateInterval));this.value=
  this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(r):r()},onKeyDown:function(a){if(a.keyCode===n.SHIFT||a.keyCode===n.ALT||a.keyCode===n.META||a.keyCode===n.CTRL)return!0;a.keyCode===n.TAB&&this.isTabIndent&&(a.stopPropagation(),a.preventDefault(),this.queryCommandEnabled(a.shiftKey?"outdent":"indent")&&this.execCommand(a.shiftKey?"outdent":"indent"));if(a.keyCode==n.TAB&&!this.isTabIndent&&!a.ctrlKey&&!a.altKey)return a.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
  !0;9>g("ie")&&a.keyCode===n.BACKSPACE&&"Control"===this.document.selection.type&&(a.stopPropagation(),a.preventDefault(),this.execCommand("delete"));g("ff")&&(a.keyCode===n.PAGE_UP||a.keyCode===n.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&a.preventDefault();var d=this._keyHandlers[a.keyCode],r=arguments;d&&!a.altKey&&v.some(d,function(y){if(!(y.shift^a.shiftKey||y.ctrl^(a.ctrlKey||a.metaKey)))return y.handler.apply(this,r)||a.preventDefault(),!0},this);this.defer("onKeyPressed",
  1);return!0},onKeyUp:function(){},setDisabled:function(a){p.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(a){this.document?c.set(this.document.body,"spellcheck",!a):this.onLoadDeferred.then(u.hitch(this,function(){c.set(this.document.body,"spellcheck",!a)}));this._set("disableSpellCheck",a)},addKeyHandler:function(a,d,r,y){"string"==
  typeof a&&(a=a.toUpperCase().charCodeAt(0));u.isArray(this._keyHandlers[a])||(this._keyHandlers[a]=[]);this._keyHandlers[a].push({shift:r||!1,ctrl:d||!1,handler:y})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(a){this.onDisplayChanged(a)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(a){(g("ie")||g("trident"))&&this.defer(function(){k.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var d=this.getValue(!0);if(d!==this.value)this.onChange(d);
  this._set("value",d)},_onFocus:function(a){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!g("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():this.ownerDocumentBody.focus&&this.ownerDocumentBody.focus()},focus:function(){this.isLoaded?9>g("ie")?this.iframe.fireEvent("onfocus",document.createEventObject()):this.editNode.focus():this.focusOnLoad=!0},updateInterval:200,
  _updateTimer:null,onDisplayChanged:function(){this._updateTimer&&this._updateTimer.remove();this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(a,d){a=a.toLowerCase();"formatblock"===a?g("safari")&&void 0===d&&(a="heading"):"hilitecolor"!==a||g("mozilla")||(a="backcolor");return a},_implCommand:function(a){return"_"+this._normalizeCommand(a)+"EnabledImpl"},_qcaCache:{},
  queryCommandAvailable:function(a){var d=this._qcaCache[a];return void 0!==d?d:this._qcaCache[a]=this._queryCommandAvailable(a)},_queryCommandAvailable:function(a){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":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":case "cut":case "copy":case "paste":return!0;
  case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":return g("ie")||g("trident")||g("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!g("webkit");default:return!1}},execCommand:function(a,d){this.focused&&this.focus();a=this._normalizeCommand(a,d);if(void 0!==d){if("heading"===a)throw Error("unimplemented");"formatblock"===
  a&&(g("ie")||g("trident"))&&(d="\x3c"+d+"\x3e")}var r="_"+a+"Impl";if(this[r])var y=this[r](d);else if((d=1<arguments.length?d:null)||"createlink"!==a)y=this.document.execCommand(a,!1,d);this.onDisplayChanged();return y},queryCommandEnabled:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);var d=this._implCommand(a);return this[d]?this[d](a):this._browserQueryCommandEnabled(a)},queryCommandState:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);
  try{return this.document.queryCommandState(a)}catch(d){return!1}},queryCommandValue:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);if(g("ie")&&"formatblock"===a)a=this._native2LocalFormatNames[this.document.queryCommandValue(a)];else if(g("mozilla")&&"hilitecolor"===a){try{var d=this.document.queryCommandValue("styleWithCSS")}catch(r){d=!1}this.document.execCommand("styleWithCSS",!1,!0);a=this.document.queryCommandValue(a);this.document.execCommand("styleWithCSS",
  !1,d)}else a=this.document.queryCommandValue(a);return a},_sCall:function(a,d){return this.selection[a].apply(this.selection,d)},placeCursorAtStart:function(){this.focus();var a=!1;if(g("mozilla"))for(var d=this.editNode.firstChild;d;){if(3===d.nodeType){if(0<d.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(d);break}}else if(1===d.nodeType){a=!0;var r=d.tagName?d.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(r)?this.selection.selectElement(d):
  this.selection.selectElementChildren(d);break}d=d.nextSibling}else a=!0,this.selection.selectElementChildren(this.editNode);a&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var a=!1;if(g("mozilla"))for(var d=this.editNode.lastChild;d;){if(3===d.nodeType){if(0<d.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(d);break}}else if(1===d.nodeType){a=!0;this.selection.selectElement(d.lastChild||d);break}d=d.previousSibling}else a=!0,this.selection.selectElementChildren(this.editNode);
  a&&this.selection.collapse(!1)},getValue:function(a){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,a):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(a){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){a=this._preFilterContent(a);var d=this.isClosed?this.domNode:this.editNode;d.innerHTML=a;this._preDomFilterContent(d)}else this.textarea.value=a;this.onDisplayChanged();this._set("value",
  this.getValue(!0))}else this.onLoadDeferred.then(u.hitch(this,function(){this.setValue(a)}))},replaceValue:function(a){this.isClosed?this.setValue(a):this.window&&this.window.getSelection&&!g("mozilla")?this.setValue(a):this.window&&this.window.getSelection?(a=this._preFilterContent(a),this.execCommand("selectall"),this.execCommand("inserthtml",a),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(a);this._set("value",this.getValue(!0))},_preFilterContent:function(a){var d=
  a;v.forEach(this.contentPreFilters,function(r){r&&(d=r(d))});return d},_preDomFilterContent:function(a){a=a||this.editNode;v.forEach(this.contentDomPreFilters,function(d){d&&u.isFunction(d)&&d(a)},this)},_postFilterContent:function(a,d){if(u.isString(a))var r=a;else a=a||this.editNode,this.contentDomPostFilters.length&&(d&&(a=u.clone(a)),v.forEach(this.contentDomPostFilters,function(y){a=y(a)})),r=m.getChildrenHtml(a);u.trim(r.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(r="");v.forEach(this.contentPostFilters,
  function(y){r=y(r)});return r},_saveContent:function(){var a=G.byId(D._scopeName+"._editor.RichText.value");a&&(a.value&&(a.value+=this._SEPARATOR),a.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(a,d){a=a.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");d||(a=a.replace(/'/gm,"\x26#39;"));return a},getNodeHtml:function(a){p.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
  2);return m.getNodeHtml(a)},getNodeChildrenHtml:function(a){p.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return m.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._webkitListener.remove(),delete this._webkitListener);g("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="";g("ie")&&(d.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;f.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;e.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&&this._updateTimer.remove();this.inherited(arguments);J._globalSaveHandler&&delete J._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(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(a){return a.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(a){return a.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2")},_browserQueryCommandEnabled:function(a){if(!a)return!1;
  if(g("ie")||g("trident")||g("edge"))return this.focused&&!this.disabled;var d=9>g("ie")?this.document.selection.createRange():this.document;try{return d.queryCommandEnabled(a)}catch(r){return!1}},_createlinkEnabledImpl:function(){var a=!0;return a=g("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var a=!0;return a=g("mozilla")||g("webkit")||g("ie")||g("trident")||g("edge")?
  this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var a=!0;return a=g("mozilla")||g("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var a=!0;g("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("cut");return a},_copyEnabledImpl:function(){var a=!0;g("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("copy");
  return a},_pasteEnabledImpl:function(){var a=!0;return g("webkit")?!0:a=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(a){return g("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,a)},_unlinkImpl:function(a){return this.queryCommandEnabled("unlink")&&(g("mozilla")||g("webkit"))?(a=this.selection.getAncestorElement("a"),this.selection.selectElement(a),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
  !1,a)},_hilitecolorImpl:function(a){if(!this._handleTextColorOrProperties("hilitecolor",a))if(g("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var d=this.document.execCommand("hilitecolor",!1,a);this.document.execCommand("styleWithCSS",!1,!1)}else d=this.document.execCommand("hilitecolor",!1,a);return d},_backcolorImpl:function(a){g("ie")&&(a=a?a:null);var d=this._handleTextColorOrProperties("backcolor",a);d||(d=this.document.execCommand("backcolor",
  !1,a));return d},_forecolorImpl:function(a){g("ie")&&(a=a?a:null);var d=!1;(d=this._handleTextColorOrProperties("forecolor",a))||(d=this.document.execCommand("forecolor",!1,a));return d},_inserthtmlImpl:function(a){a=this._preFilterContent(a);var d=!0;if(9>g("ie")){var r=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var y=r.item(0);r.length;)r.remove(r.item(0));y.outerHTML=a}else r.pasteHTML(a);r.select()}else if(8>g("trident")){var w=C.getSelection(this.window);
  if(w&&w.rangeCount&&w.getRangeAt){r=w.getRangeAt(0);r.deleteContents();var I=f.create("div");I.innerHTML=a;for(y=this.document.createDocumentFragment();a=I.firstChild;)var K=y.appendChild(a);r.insertNode(y);K&&(r=r.cloneRange(),r.setStartAfter(K),r.collapse(!1),w.removeAllRanges(),w.addRange(r))}}else g("mozilla")&&!a.length?this.selection.remove():d=this.document.execCommand("inserthtml",!1,a);return d},_boldImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),d=this._adaptIEFormatAreaAndExec("bold");
  d||(d=this.document.execCommand("bold",!1,a));return d},_italicImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),d=this._adaptIEFormatAreaAndExec("italic");d||(d=this.document.execCommand("italic",!1,a));return d},_underlineImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),d=this._adaptIEFormatAreaAndExec("underline");d||(d=this.document.execCommand("underline",!1,a));return d},_strikethroughImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),
  d=this._adaptIEFormatAreaAndExec("strikethrough");d||(d=this.document.execCommand("strikethrough",!1,a));return d},_superscriptImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),d=this._adaptIEFormatAreaAndExec("superscript");d||(d=this.document.execCommand("superscript",!1,a));return d},_subscriptImpl:function(a){var d=!1;if(g("ie")||g("trident"))this._adaptIESelection(),d=this._adaptIEFormatAreaAndExec("subscript");d||(d=this.document.execCommand("subscript",!1,a));return d},
  _fontnameImpl:function(a){if(g("ie")||g("trident"))var d=this._handleTextColorOrProperties("fontname",a);d||(d=this.document.execCommand("fontname",!1,a));return d},_fontsizeImpl:function(a){if(g("ie")||g("trident"))var d=this._handleTextColorOrProperties("fontsize",a);d||(d=this.document.execCommand("fontsize",!1,a));return d},_insertorderedlistImpl:function(a){var d=!1;if(g("ie")||g("trident")||g("edge"))d=this._adaptIEList("insertorderedlist",a);d||(d=this.document.execCommand("insertorderedlist",
  !1,a));return d},_insertunorderedlistImpl:function(a){var d=!1;if(g("ie")||g("trident")||g("edge"))d=this._adaptIEList("insertunorderedlist",a);d||(d=this.document.execCommand("insertunorderedlist",!1,a));return d},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(a){var d=0;if(a&&a.childNodes){var r;for(r=0;r<a.childNodes.length;r++){var y=h.position(a.childNodes[r]);
  d+=y.h}}return d},_isNodeEmpty:function(a,d){return 1===a.nodeType?0<a.childNodes.length?this._isNodeEmpty(a.childNodes[0],d):!0:3===a.nodeType?""===a.nodeValue.substring(d):!1},_removeStartingRangeFromRange:function(a,d){if(a.nextSibling)d.setStart(a.nextSibling,0);else{for(a=a.parentNode;a&&null==a.nextSibling;)a=a.parentNode;a&&d.setStart(a.nextSibling,0)}return d},_adaptIESelection:function(){var a=C.getSelection(this.window);if(a&&a.rangeCount&&!a.isCollapsed){for(var d=a.getRangeAt(0),r=d.startContainer,
  y=d.startOffset;3===r.nodeType&&y>=r.length&&r.nextSibling;)y-=r.length,r=r.nextSibling;for(var w=null;this._isNodeEmpty(r,y)&&r!==w;)w=r,d=this._removeStartingRangeFromRange(r,d),r=d.startContainer,y=0;a.removeAllRanges();a.addRange(d)}},_adaptIEFormatAreaAndExec:function(a){var d=C.getSelection(this.window),r=this.document,y;if(a&&d&&d.isCollapsed){if(this.queryCommandValue(a)){a=this._tagNamesForCommand(a);var w=d.getRangeAt(0);var I=w.startContainer;if(3===I.nodeType){var K=w.endOffset;I.length<
  K&&(K=this._adjustNodeAndOffset(M,K),I=K.node,K=K.offset)}for(;I&&I!==this.editNode;){var M=I.tagName?I.tagName.toLowerCase():"";if(-1<v.indexOf(a,M)){var P=I;break}I=I.parentNode}if(P&&(M=w.startContainer,a=r.createElement(P.tagName),f.place(a,P,"after"),M&&3===M.nodeType)){K=w.endOffset;M.length<K&&(K=this._adjustNodeAndOffset(M,K),M=K.node,K=K.offset);I=M.nodeValue;w=r.createTextNode(I.substring(0,K));var S=I.substring(K,I.length);S&&(y=r.createTextNode(S));f.place(w,M,"before");if(y){var R=r.createElement("span");
  R.className="ieFormatBreakerSpan";f.place(R,M,"after");f.place(y,R,"after");y=R}f.destroy(M);K=w.parentNode;for(M=[];K!==P;){I=K.tagName;w={tagName:I};M.push(w);I=r.createElement(I);K.style&&I.style&&K.style.cssText&&(I.style.cssText=K.style.cssText,w.cssText=K.style.cssText);"FONT"===K.tagName&&(K.color&&(I.color=K.color,w.color=K.color),K.face&&(I.face=K.face,w.face=K.face),K.size&&(I.size=K.size,w.size=K.size));K.className&&(I.className=K.className,w.className=K.className);if(y)for(;y;)w=y.nextSibling,
  I.appendChild(y),y=w;I.tagName==K.tagName?(R=r.createElement("span"),R.className="ieFormatBreakerSpan",f.place(R,K,"after"),f.place(I,R,"after")):f.place(I,K,"after");w=K;y=I;K=K.parentNode}if(y){if(1===y.nodeType||3===y.nodeType&&y.nodeValue)a.innerHTML="";for(;y;)w=y.nextSibling,a.appendChild(y),y=w}if(M.length){w=M.pop();y=r.createElement(w.tagName);w.cssText&&y.style&&(y.style.cssText=w.cssText);w.className&&(y.className=w.className);"FONT"===w.tagName&&(w.color&&(y.color=w.color),w.face&&(y.face=
  w.face),w.size&&(y.size=w.size));for(f.place(y,a,"before");M.length;)w=M.pop(),P=r.createElement(w.tagName),w.cssText&&P.style&&(P.style.cssText=w.cssText),w.className&&(P.className=w.className),"FONT"===w.tagName&&(w.color&&(P.color=w.color),w.face&&(P.face=w.face),w.size&&(P.size=w.size)),y.appendChild(P),y=P;P=r.createTextNode(".");R.appendChild(P);y.appendChild(P)}else R=r.createElement("span"),R.className="ieFormatBreakerSpan",P=r.createTextNode("."),R.appendChild(P),f.place(R,a,"before");y=
  C.create(this.window);y.setStart(P,0);y.setEnd(P,P.length);d.removeAllRanges();d.addRange(y);this.selection.collapse(!1);P.parentNode.innerHTML="";a.firstChild||f.destroy(a);return!0}return!1}w=d.getRangeAt(0);if((M=w.startContainer)&&3===M.nodeType)return K=w.startOffset,M.length<K&&(K=this._adjustNodeAndOffset(M,K),M=K.node,K=K.offset),I=M.nodeValue,w=r.createTextNode(I.substring(0,K)),S=I.substring(K),""!==S&&(y=r.createTextNode(I.substring(K))),R=r.createElement("span"),P=r.createTextNode("."),
  R.appendChild(P),w.length?f.place(w,M,"after"):w=M,f.place(R,w,"after"),y&&f.place(y,R,"after"),f.destroy(M),y=C.create(this.window),y.setStart(P,0),y.setEnd(P,P.length),d.removeAllRanges(),d.addRange(y),r.execCommand(a),f.place(R.firstChild,R,"before"),f.destroy(R),y.setStart(P,0),y.setEnd(P,P.length),d.removeAllRanges(),d.addRange(y),this.selection.collapse(!1),P.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(a){var d=C.getSelection(this.window);if(d.isCollapsed&&d.rangeCount&&
  !this.queryCommandValue(a)){var r=d.getRangeAt(0),y=r.startContainer;if(y&&3==y.nodeType&&!r.startOffset)return r="ul","insertorderedlist"===a&&(r="ol"),a=this.document.createElement(r),r=f.create("li",null,a),f.place(a,y,"before"),r.appendChild(y),f.create("br",null,a,"after"),a=C.create(this.window),a.setStart(y,0),a.setEnd(y,y.length),d.removeAllRanges(),d.addRange(a),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(a,d){var r=C.getSelection(this.window),y=this.document,
  w,I;d=d||null;if(a&&r&&r.isCollapsed&&r.rangeCount){var K=r.getRangeAt(0);if((w=K.startContainer)&&3===w.nodeType){var M=K.startOffset;w.length<M&&(K=this._adjustNodeAndOffset(w,M),w=K.node,M=K.offset);var P=w.nodeValue;K=y.createTextNode(P.substring(0,M));""!==P.substring(M)&&(I=y.createTextNode(P.substring(M)));P=y.createElement("span");M=y.createTextNode(".");P.appendChild(M);y=y.createElement("span");P.appendChild(y);K.length?f.place(K,w,"after"):K=w;f.place(P,K,"after");I&&f.place(I,P,"after");
  f.destroy(w);w=C.create(this.window);w.setStart(M,0);w.setEnd(M,M.length);r.removeAllRanges();r.addRange(w);if(g("webkit")){r="color";if("hilitecolor"===a||"backcolor"===a)r="backgroundColor";l.set(P,r,d);this.selection.remove();f.destroy(y);P.innerHTML="\x26#160;";this.selection.selectElement(P);this.focus()}else this.execCommand(a,d),f.place(P.firstChild,P,"before"),f.destroy(P),w.setStart(M,0),w.setEnd(M,M.length),r.removeAllRanges(),r.addRange(w),this.selection.collapse(!1),M.parentNode.removeChild(M);
  return!0}}return!1},_adjustNodeAndOffset:function(a,d){for(;a.length<d&&a.nextSibling&&3===a.nextSibling.nodeType;)d-=a.length,a=a.nextSibling;return{node:a,offset:d}},_tagNamesForCommand:function(a){return"bold"===a?["b","strong"]:"italic"===a?["i","em"]:"strikethrough"===a?["s","strike"]:"superscript"===a?["sup"]:"subscript"===a?["sub"]:"underline"===a?["u"]:[]},_stripBreakerNodes:function(a){if(this.isLoaded)return z(".ieFormatBreakerSpan",a).forEach(function(d){for(;d.firstChild;)f.place(d.firstChild,
  d,"before");f.destroy(d)}),a},_stripTrailingEmptyNodes:function(a){function d(r){return/^(p|div|br)$/i.test(r.nodeName)&&0==r.children.length&&/^[\s\xA0]*$/.test(r.textContent||r.innerText||"")||3===r.nodeType&&/^[\s\xA0]*$/.test(r.nodeValue)}for(;a.lastChild&&d(a.lastChild);)f.destroy(a.lastChild);return a},_setTextDirAttr:function(a){this._set("textDir",a);this.onLoadDeferred.then(u.hitch(this,function(){this.editNode.dir=a}))}});return J})},"dijit/_editor/range":function(){define(["dojo/_base/array",
  "dojo/_base/declare","dojo/_base/lang"],function(v,E,L){var H={getIndex:function(e,f){for(var h=[],l=[],p=e,n,u;e!=f;){var x=0;for(n=e.parentNode;u=n.childNodes[x++];)if(u===e){--x;break}h.unshift(x);l.unshift(x-n.childNodes.length);e=n}if(0<h.length&&3==p.nodeType){for(u=p.previousSibling;u&&3==u.nodeType;)h[h.length-1]--,u=u.previousSibling;for(u=p.nextSibling;u&&3==u.nodeType;)l[l.length-1]++,u=u.nextSibling}return{o:h,r:l}},getNode:function(e,f){if(!L.isArray(e)||0==e.length)return f;var h=f;
  v.every(e,function(l){if(0<=l&&l<h.childNodes.length)h=h.childNodes[l];else return h=null,!1;return!0});return h},getCommonAncestor:function(e,f,h){h=h||e.ownerDocument.body;var l=function(u){for(var x=[];u;)if(x.unshift(u),u!==h)u=u.parentNode;else break;return x};e=l(e);f=l(f);l=Math.min(e.length,f.length);for(var p=e[0],n=1;n<l;n++)if(e[n]===f[n])p=e[n];else break;return p},getAncestor:function(e,f,h){for(h=h||e.ownerDocument.body;e&&e!==h;){var l=e.nodeName.toUpperCase();if(f.test(l))return e;
  e=e.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(e,f,h){h=h||e.ownerDocument.body;f=f||H.BlockTagNames;for(var l=null,p;e&&e!==h;){var n=e.nodeName.toUpperCase();!l&&f.test(n)&&(l=e);!p&&/^(?:BODY|TD|TH|CAPTION)$/.test(n)&&(p=e);e=e.parentNode}return{blockNode:l,blockContainer:p||e.ownerDocument.body}},atBeginningOfContainer:function(e,f,h){var l=!1,p=0==h;p||3!=f.nodeType||/^[\s\xA0]+$/.test(f.nodeValue.substr(0,h))&&(p=
  !0);if(p)for(l=!0;f&&f!==e;){if(f.previousSibling){l=!1;break}f=f.parentNode}return l},atEndOfContainer:function(e,f,h){var l=!1,p=h==(f.length||f.childNodes.length);p||3!=f.nodeType||/^[\s\xA0]+$/.test(f.nodeValue.substr(h))&&(p=!0);if(p)for(l=!0;f&&f!==e;){if(f.nextSibling){l=!1;break}f=f.parentNode}return l},adjacentNoneTextNode:function(e,f){var h=e;e=0-e.length||0;for(f=f?"nextSibling":"previousSibling";h&&3==h.nodeType;)e+=h.length,h=h[f];return[h,e]},create:function(e){e=e||window;return e.getSelection?
  e.document.createRange():new c},getSelection:function(e,f){if(e.getSelection)return e.getSelection();e=new G.selection(e);f||e._getCurrentSelection();return e}};if(!window.getSelection)var G=H.ie={cachedSelection:{},selection:function(e){this._ranges=[];this.addRange=function(f,h){this._ranges.push(f);h||f._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(f){return this._ranges[f]};this._getCurrentSelection=function(){this.removeAllRanges();
  var f=e.document.selection.createRange();f="CONTROL"==e.document.selection.type.toUpperCase()?new c(G.decomposeControlRange(f)):new c(G.decomposeTextRange(f));this.addRange(f,!0),this.isCollapsed=f.collapsed}},decomposeControlRange:function(e){var f=e.item(0),h=e.item(e.length-1);e=f.parentNode;var l=h.parentNode;f=H.getIndex(f,e).o[0];h=H.getIndex(h,l).o[0]+1;return[e,f,l,h]},getEndPoint:function(e,f){var h=e.duplicate();h.collapse(!f);var l="EndTo"+(f?"End":"Start"),p=h.parentElement(),n;if(0<p.childNodes.length)v.every(p.childNodes,
  function(z,b){if(3!=z.nodeType)if(h.moveToElementText(z),0<h.compareEndPoints(l,e))if(n&&3==n.nodeType){u=n;var g=!0}else return u=p,x=b,!1;else{if(b==p.childNodes.length-1)return u=p,x=p.childNodes.length,!1}else b==p.childNodes.length-1&&(u=z,g=!0);if(g&&u)return u=(z=H.adjacentNoneTextNode(u)[0])?z.nextSibling:p.firstChild,b=H.adjacentNoneTextNode(u),z=b[0],b=b[1],z?(h.moveToElementText(z),h.collapse(!1)):h.moveToElementText(p),h.setEndPoint(l,e),x=h.text.length-b,!1;n=z;return!0});else{var u=
  p;var x=0}f||1!=u.nodeType||x!=u.childNodes.length||(f=u.nextSibling)&&3==f.nodeType&&(u=f,x=0);return[u,x]},setEndPoint:function(e,f,h){e=e.duplicate();var l;if(3!=f.nodeType)if(0<h){if(l=f.childNodes[h-1])if(3==l.nodeType)f=l,h=l.length;else if(l.nextSibling&&3==l.nextSibling.nodeType)f=l.nextSibling,h=0;else{e.moveToElementText(l.nextSibling?l:f);var p=l.parentNode;l=p.insertBefore(l.ownerDocument.createTextNode(" "),l.nextSibling);e.collapse(!1);p.removeChild(l)}}else e.moveToElementText(f),e.collapse(!0);
  3==f.nodeType&&(l=H.adjacentNoneTextNode(f),p=l[0],l=l[1],p?(e.moveToElementText(p),e.collapse(!1),"inherit"!=p.contentEditable&&l++):(e.moveToElementText(f.parentNode),e.collapse(!0),e.move("character",1),e.move("character",-1)),h+=l,0<h&&e.move("character",h)!=h&&console.error("Error when moving!"));return e},decomposeTextRange:function(e){var f=G.getEndPoint(e),h=f[0],l=f[1],p=f[0];f=f[1];e.htmlText.length&&(e.htmlText==e.text?f=l+e.text.length:(f=G.getEndPoint(e,!0),p=f[0],f=f[1]));return[h,l,
  p,f]},setRange:function(e,f,h,l,p,n){f=G.setEndPoint(e,f,h);e.setEndPoint("StartToStart",f);if(!n)var u=G.setEndPoint(e,l,p);e.setEndPoint("EndToEnd",u||f);return e}},c=H.W3CRange=E(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=
  this.startContainer!==this.endContainer?H.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(e,f){f=parseInt(f);if(this.startContainer!==e||this.startOffset!=f)delete this._cachedBookmark,this.startContainer=e,this.startOffset=f,this.endContainer?this._updateInternal():this.setEnd(e,f)},setEnd:function(e,f){f=parseInt(f);if(this.endContainer!==e||this.endOffset!=f)delete this._cachedBookmark,
  this.endContainer=e,this.endOffset=f,this.startContainer?this._updateInternal():this.setStart(e,f)},setStartAfter:function(e,f){this._setPoint("setStart",e,f,1)},setStartBefore:function(e,f){this._setPoint("setStart",e,f,0)},setEndAfter:function(e,f){this._setPoint("setEnd",e,f,1)},setEndBefore:function(e,f){this._setPoint("setEnd",e,f,0)},_setPoint:function(e,f,h,l){h=H.getIndex(f,f.parentNode).o;this[e](f.parentNode,h.pop()+l)},_getIERange:function(){var e=(this._body||this.endContainer.ownerDocument.body).createTextRange();
  G.setRange(e,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return e},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var e=this.startContainer,f=this._getIERange();3!==e.nodeType||this.startOffset||this.setStartBefore(e);f.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var e=new c([this.startContainer,
  this.startOffset,this.endContainer,this.endOffset]);e._body=this._body;return e},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});L.setObject("dijit.range",H);return H})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(v,E,L){var H={};E.setObject("dijit._editor.html",H);var G=H.escapeXml=function(c,e){c=c.replace(/&/gm,"\x26amp;").replace(/</gm,
  "\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");e||(c=c.replace(/'/gm,"\x26#39;"));return c};H.getNodeHtml=function(c){var e=[];H.getNodeHtmlHelper(c,e);return e.join("")};H.getNodeHtmlHelper=function(c,e){switch(c.nodeType){case 1:var f=c.nodeName.toLowerCase();if(!f||"/"==f.charAt(0))return"";e.push("\x3c",f);var h=[],l={},p;if(L("dom-attributes-explicit")||L("dom-attributes-specified-flag"))for(var n=0;p=c.attributes[n++];){var u=p.name;"_dj"===u.substr(0,3)||L("dom-attributes-specified-flag")&&
  !p.specified||u in l||(p=p.value,("src"==u||"href"==u)&&c.getAttribute("_djrealurl")&&(p=c.getAttribute("_djrealurl")),8===L("ie")&&"style"===u&&(p=p.replace("HEIGHT:","height:").replace("WIDTH:","width:")),h.push([u,p]),l[u]=p)}else{var x=(/^input$|^img$/i.test(c.nodeName)?c:c.cloneNode(!1)).outerHTML;l=x.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);x=x.substr(0,x.indexOf("\x3e"));v.forEach(l,function(z){if(z){var b=z.indexOf("\x3d");if(0<b&&(z=z.substring(0,b),"_dj"!=z.substr(0,3)))if("src"!=z&&"href"!=
  z||!c.getAttribute("_djrealurl")){switch(z){case "style":var g=c.style.cssText.toLowerCase();break;case "class":g=c.className;break;case "width":if("img"===f){(b=/width=(\S+)/i.exec(x))&&(g=b[1]);break}case "height":if("img"===f){(b=/height=(\S+)/i.exec(x))&&(g=b[1]);break}default:g=c.getAttribute(z)}null!=g&&h.push([z,g.toString()])}else h.push([z,c.getAttribute("_djrealurl")])}},this)}h.sort(function(z,b){return z[0]<b[0]?-1:z[0]==b[0]?0:1});for(l=0;p=h[l++];)e.push(" ",p[0],'\x3d"',"string"===
  typeof p[1]?G(p[1],!0):p[1],'"');switch(f){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":e.push(" /\x3e");break;case "script":e.push("\x3e",c.innerHTML,"\x3c/",f,"\x3e");break;default:e.push("\x3e"),c.hasChildNodes()&&H.getChildrenHtmlHelper(c,e),e.push("\x3c/",f,"\x3e")}break;case 4:case 3:e.push(G(c.nodeValue,!0));break;case 8:e.push("\x3c!--",G(c.nodeValue,!0),"--\x3e");break;default:e.push("\x3c!-- Element not recognized - Type: ",c.nodeType," Name: ",
  c.nodeName,"--\x3e")}};H.getChildrenHtml=function(c){var e=[];H.getChildrenHtmlHelper(c,e);return e.join("")};H.getChildrenHtmlHelper=function(c,e){if(c)for(var f=c.childNodes||c,h=!L("ie")||f!==c,l,p=0;l=f[p++];)h&&l.parentNode!=c||H.getNodeHtmlHelper(l,e)};return H})},"widgets/GroupFilter/LayersHandler":function(){define("dojo/Evented dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/promise/all esri/request".split(" "),function(v,E,L,H,G,c,e){return E([v],{declaredClass:"LayersHandler",
  layers:null,layerStore:[],fieldName:null,childList:null,validFieldTypes:"esriFieldTypeInteger esriFieldTypeSmallInteger esriFieldTypeDouble esriFieldTypeSingle esriFieldTypeString esriFieldTypeDate esriFieldTypeGeometry esriFieldTypeOID esriFieldTypeBlob esriFieldTypeGlobalID esriFieldTypeRaster esriFieldTypeGUID esriFieldTypeXML".split(" "),layersOnly:!1,constructor:function(f){E.safeMixin(this,f)},getAllMapLayers:function(){var f=[],h=new G,l;this.layerStore=[];H.forEach(this.layers,L.hitch(this,
  function(p){if(!p.featureCollection)if("undefined"===typeof p.originOperLayer||!p.originOperLayer.layerType||"ArcGISFeatureLayer"!==p.originOperLayer.layerType&&"ArcGISImageServiceLayer"!==p.originOperLayer.layerType)if(0<p.newSubLayers.length){if(this.childList=[],"undefined"===typeof p.originOperLayer.layerType||"ArcGISTiledMapServiceLayer"!==p.originOperLayer.layerType&&"VectorTileLayer"!==p.originOperLayer.layerType)H.forEach(p.layerObject.layerInfos,L.hitch(this,function(n){n={label:n.name,id:p.id+
  "."+n.id,url:p.originOperLayer.url+"/"+n.id,type:"Layer",fieldName:this.fieldName,checked:!1,children:[],layer:p.layerObject};this.childList.push(n);f.push(this._getLayerInfo(n))})),l={label:p.title,id:p.id,url:p.originOperLayer.url,type:"Service",checked:!1,children:this.childList,layer:p.layerObject},this.layerStore.push(l)}else("undefined"===typeof p.originOperLayer.layerType||"ArcGISTiledMapServiceLayer"!==p.originOperLayer.layerType&&"VectorTileLayer"!==p.originOperLayer.layerType)&&"ArcGISMapServiceLayer"===
  p.originOperLayer.layerType&&(this.childList=[],H.forEach(p.layerObject.layerInfos,L.hitch(this,function(n){n={label:n.name,id:p.id+"."+n.id,url:p.originOperLayer.url+"/"+n.id,type:"Layer",fieldName:this.fieldName,checked:!1,children:[],layer:p.layerObject};this.childList.push(n);f.push(this._getLayerInfo(n))})),l={label:p.title,id:p.id,url:p.originOperLayer.url,type:"MapService",checked:!1,children:this.childList,layer:p.layerObject},this.layerStore.push(l));else"undefined"===typeof p.originOperLayer.featureCollection&&
  (l={label:p.title,id:p.id,url:p.url,fieldName:this.fieldName,type:"Feature Layer",checked:!1,children:[],layer:p.layerObject},f.push(this._getLayerInfo(l)),this.layerStore.push(l))}));c(f).then(L.hitch(this,function(){var p=this._controlComplete();this.emit("complete",p);h.resolve(p)}),L.hitch(this,function(){h.resolve(null)}));return h.promise},_getLayerInfo:function(f){var h=new G;f.url?0===f.url.length?h.resolve():e({url:f.url,content:{f:"json"},callbackParamName:"callback"}).then(L.hitch(this,
  function(l){if(l.hasOwnProperty("fields")&&!1===this.layersOnly){var p=H.map(l.fields,L.hitch(this,function(n){return{label:n.alias,id:f.id+"."+n.name,name:n.name,type:"Field",fieldType:n.type,checked:!1}}));p=H.filter(p,L.hitch(this,function(n){return 0<=H.indexOf(this.validFieldTypes,n.fieldType)}));f.children=p}f.geometryType=l.geometryType;f.visible=!0;this.geometryTypes&&!H.some(this.geometryTypes,function(n){if(n===f.geometryType)return!0})&&(f.visible=!1);h.resolve(l)}),function(){h.resolve(null)}):
  h.resolve();return h.promise},_controlComplete:function(){H.forEach(this.layerStore,function(f){if(f.children&&0<f.children.length){var h=H.filter(f.children,function(l){return l.hasOwnProperty("visible")?l.visible:!0});f.children=h;0===f.children.length&&(f.visible=!1)}});return this.store={data:{identifier:"id",label:"label",items:H.filter(this.layerStore,function(f){return f.hasOwnProperty("visible")?f.visible:!0})}}}})})},"widgets/GroupFilter/setting/presetValuePicker":function(){define("dojo/_base/declare jimu/BaseWidgetSetting jimu/dijit/FilterParameters dijit/_WidgetsInTemplateMixin dojo/on dojo/dom-construct dojo/dom-attr dojo/query dojo/_base/lang dojo/_base/array dijit/form/Select esri/layers/FeatureLayer dojo/text!./presetValuePicker.html".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u){return v([E,H],{baseClass:"jimu-widget-map-filter-preset",templateString:u,layerList:null,map:null,nls:null,valueParam:null,postCreate:function(){this.inherited(arguments);this.startup()},startup:function(){this.inherited(arguments);this.createLayerSelection()},createLayerSelection:function(){var x=[];l.forEach(this.layerList,h.hitch(this,function(b){if(0<b.children.length)l.forEach(b.children,h.hitch(this,function(A){var N={};N.value=A.id;N.label=A.label;N.selected=
  !1;x.push(N)}));else{var g={};g.value=b.id;g.label=b.label;g.selected=!1;x.push(g)}}));var z=(new p({options:x})).placeAt(this.layerLevel);z.startup();this.own(G(z,"change",h.hitch(this,function(b){this.createFieldSelection(b)})));this.createFieldSelection(z.value)},createFieldSelection:function(x){var z=[];l.forEach(this.layerList,h.hitch(this,function(g){0<g.children.length?l.forEach(g.children,h.hitch(this,function(A){A.id===x&&l.forEach(A.children,h.hitch(this,function(N){if(-1==="esriFieldTypeBlob,esriFieldTypeOID".indexOf(N.fieldType)){var q=
  {};q.value=N.name;q.label=N.label;q.selected=!1;z.push(q)}}))})):g.id===x&&l.forEach(g.layer.fields,h.hitch(this,function(A){if(-1==="esriFieldTypeBlob,esriFieldTypeOID".indexOf(A.type)){var N={};N.value=A.name;N.label=""===A.alias?A.name:A.alias;N.selected=!1;z.push(N)}}))}));c.empty(this.fieldLevel);var b=(new p({options:z})).placeAt(this.fieldLevel);b.startup();this.own(G(b,"change",h.hitch(this,function(g){this.createValueList(g,x)})));this.createValueList(b.value,x)},createValueList:function(x,
  z){c.empty(this.valueLevel);this.valueParam=new L;this.valueParam.placeAt(this.valueLevel);this.valueParam.startup();setTimeout(function(){var b=f(".jimu-single-filter-parameter");b=f("colgroup",b[0]);0<b.length&&e.set(b[0].childNodes[1],"width","0px")},200);l.forEach(this.layerList,h.hitch(this,function(b){0<b.children.length?l.forEach(b.children,h.hitch(this,function(g){g.id===z&&l.forEach(g.children,h.hitch(this,function(A){if("Shape"!==A.name&&A.name===x){var N=new n(g.url);this.own(G(N,"load",
  h.hitch(this,function(){var q=this._makefilterObject({name:A.name,label:A.label,type:A.fieldType});this.valueParam.build(g.url,N,q);q=f(".jimu-single-filter-parameter");q=f("colgroup",q[0]);e.set(q[0].childNodes[1],"width","0px")})))}}))})):b.id===z&&l.forEach(b.layer.fields,h.hitch(this,function(g){g.name===x&&(g=this._makefilterObject({name:g.name,label:g.alias,type:g.type}),this.valueParam.build(b.layer.url,b.layer,g),g=f(".jimu-single-filter-parameter"),g=f("colgroup",g[0]),0<g.length&&e.set(g[0].childNodes[1],
  "width","0px"))}))}))},_makefilterObject:function(x){var z={},b=[],g={fieldObj:{}};g.fieldObj.name=x.name;g.fieldObj.label="undefined"===typeof x.alias?x.name:x.alias;g.fieldObj.shortType=x.type.replace("esriFieldType","").toLowerCase();if("guid"!==g.fieldObj.shortType||"globalid"!==g.fieldObj.shortType)g.fieldObj.shortType="string";"date"!==g.fieldObj.shortType&&"string"!==g.fieldObj.shortType&&(g.fieldObj.shortType="number");g.fieldObj.type=x.type;g.operator=g.fieldObj.shortType+"OperatorIs";g.valueObj=
  {};g.valueObj.isValid=!0;g.valueObj.type="unique";g.valueObj.value="";g.interactiveObj={};g.interactiveObj.prompt="";g.interactiveObj.hint="";g.caseSensitive=!1;b.push(g);z.logicalOperator="OR";z.expr="";z.parts=b;return z}})})},"jimu/dijit/EditorXssFilter":function(){define("dojo/_base/declare dojo/_base/array dijit/_WidgetBase dojo/_base/lang dojo/Evented libs/arcgis-html-sanitizer/arcgis-html-sanitizer".split(" "),function(v,E,L,H,G,c){var e=null,f=v([L,G],{baseClass:"jimu-editor-xss-filter",declaredClass:"jimu.dijit.EditorXssFilter",
  sanitizer:null,xss:null,whiteList:{},graphicsWhiteList:{},postCreate:function(){this.whiteList=this._getWhiteList();this.sanitizer=new c({whiteList:this.whiteList,safeAttrValue:H.hitch(this,function(h,l,p,n){return"style"===l?this.xss.friendlyAttrValue(p).replace(/"/g,"'"):"img"===h&&"src"===l?this.xss.escapeAttrValue(p):this.xss.safeAttrValue(h,l,p,n)}),onTag:H.hitch(this,function(h,l,p){if(p.isWhite&&this._isInWhiteList(h,this.graphicsWhiteList))return l}),onIgnoreTagAttr:H.hitch(this,function(h,
  l,p,n){if("data-"===l.substr(0,5))return l+'\x3d"'+this.xss.escapeAttrValue(p)+'"'}),onIgnoreTag:H.hitch(this,function(h,l,p){if("o:"===h.substr(0,2)||"!--[if"===h||"!--[endif]--"===h)return l})},!0);this.xss=this.sanitizer.xss},sanitize:function(h){return this.sanitizer.sanitize(h)},_getWhiteList:function(){var h="title height width class style font-family id align text-align".split(" "),l={div:h,h1:h,h2:h,h3:h,h4:h,h5:h,h6:h,span:h,p:h,s:h,strong:h,em:h,u:h,ol:h,ul:h,li:h,a:["href","target"].concat(h),
  img:["src","alt","border"].concat(h),blockquote:h,font:["face","size","color"].concat(h),pre:h,code:h,b:h,i:h,wbr:h,video:"autoplay controls loop muted poster preload".split(" ").concat(h),audio:["autoplay","controls","loop","muted","preload"].concat(h),source:["media","src","type"].concat(h),table:["cellpadding","cellspacing","border"].concat(h),tbody:[].concat(h),tr:["valign"].concat(h),td:["valign","colspan","rowspan","nowrap"].concat(h),th:["valign","colspan","rowspan","nowrap"].concat(h),hr:h,
  html:h,title:h,link:["rel","href"],style:["type"].concat(h),body:h};this.graphicsWhiteList={animate:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],defs:[],desc:[],discard:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feDropShadow:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],
  feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],foreignObject:[],g:[],hatch:[],hatchpath:[],line:[],linearGradient:[],marker:[],mask:[],mesh:[],meshgradient:[],meshpatch:[],meshrow:[],metadata:[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],radialGradient:[],rect:[],set:[],solidcolor:[],stop:[],svg:[],switch:[],symbol:[],text:[],textPath:[],title:[],tspan:[],use:[],view:[],object:[],canvas:h};return this._extendObjectOfArrays([l,{a:["target",
  "href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src",
  "alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:"autoplay controls loop preload src height width".split(" ")},this.graphicsWhiteList])},
  _extendObjectOfArrays:function(h){var l={};E.forEach(h,function(p){var n=Object.keys(p);E.forEach(n,function(u){Array.isArray(p[u])&&Array.isArray(l[u])?l[u]=l[u].concat(p[u]):l[u]=p[u]},this)},this);return l},_isInWhiteList:function(h,l){l=Object.keys(l);var p=!1;E.forEach(l,function(n){h===n&&(p=!0)},this);return p}});f.getInstance=function(){null===e&&(e=new f);return e};return f})},"dijit/_editor/plugins/LinkDialog":function(){define("require dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/query dojo/string ../_Plugin ../../form/DropDownButton ../range".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u){var x=L("dijit._editor.plugins.LinkDialog",p,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:n,useDefaultCommand:!1,urlRegExp:"((https?|ftps?|file)\\://|./|../|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",
  emailRegExp:"\x3c?(mailto\\:)([!#-'*+\\-\\/-9\x3d?A-Z^-~]+[.])*[!#-'*+\\-\\/-9\x3d?A-Z^-~]+@((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*\x3e?",htmlTemplate:'\x3ca href\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" target\x3d"${targetSelect}"\x3e${textInput}\x3c/a\x3e',tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,
  linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_targetSelect'\x3e${target}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cselect id\x3d'${id}_targetSelect' name\x3d'targetSelect' data-dojo-type\x3d'dijit.form.Select'\x3e\x3coption selected\x3d'selected' value\x3d'_self'\x3e${currentWindow}\x3c/option\x3e\x3coption value\x3d'_blank'\x3e${newWindow}\x3c/option\x3e\x3coption value\x3d'_top'\x3e${topWindow}\x3c/option\x3e\x3coption value\x3d'_parent'\x3e${parentWindow}\x3c/option\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
  _initButton:function(){this.inherited(arguments);this.button.loadDropDown=c.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(b){v("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),c.hitch(this,function(g,A,N){var q=this;this.tag="insertImage"==this.command?"img":"a";g=c.delegate(g.getLocalization("dijit","common",this.lang),g.getLocalization("dijit._editor",
  "LinkDialog",this.lang));var t=this.dropDown=this.button.dropDown=new A({title:g[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:c.hitch(this,"setValue"),onOpen:function(){q._onOpenDialog();A.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(c.hitch(q,"_onCloseDialog"),0)}});g.urlRegExp=this.urlRegExp;g.id=N.getUniqueId(this.editor.id);this._uniqueId=g.id;this._setContent(t.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
  l.substitute(this.linkDialogTemplate,g));t.startup();this._urlInput=N.byId(this._uniqueId+"_urlInput");this._textInput=N.byId(this._uniqueId+"_textInput");this._setButton=N.byId(this._uniqueId+"_setButton");this.own(N.byId(this._uniqueId+"_cancelButton").on("click",c.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",c.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",c.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
  this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=c.hitch(this,function(){var B=this._urlInput.get("value");return this._urlRegExp.test(B)||this._emailRegExp.test(B)});this.own(e(t.domNode,"keydown",c.hitch(this,c.hitch(this,function(B){!B||B.keyCode!=G.ENTER||B.shiftKey||B.metaKey||B.ctrlKey||B.altKey||this._setButton.get("disabled")||(t.onExecute(),t.execute(t.get("value")))}))));b()}))},_checkAndFixInput:function(){var b=this,g=this._urlInput.get("value");
  this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var A=g,N=!1,q=!1;A&&1<A.length&&(A=c.trim(A),0!==A.indexOf("mailto:")&&(0<A.indexOf("/")?-1===A.indexOf("://")&&"/"!==A.charAt(0)&&A.indexOf("./")&&0!==A.indexOf("../")&&b._hostRxp.test(A)&&(N=!0):b._userAtRxp.test(A)&&(q=!0)));N&&b._urlInput.set("value","http://"+A);q&&b._urlInput.set("value","mailto:"+A);b._setButton.set("disabled",!b._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(c.hitch(this,
  function(){this.own(e(this.editor.editNode,"mouseup",c.hitch(this,"_onMouseUp")));this.own(e(this.editor.editNode,"dblclick",c.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(b){this.dropDown.set({parserScope:"dojo",content:b})},_checkValues:function(b){b&&b.urlInput&&(b.urlInput=b.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&b&&b.textInput&&("function"===typeof this.linkFilter?b.textInput=this.linkFilter(b.textInput):
  E.forEach(this.linkFilter,function(g){b.textInput=b.textInput.replace(g[0],g[1])}));return b},_createlinkEnabledImpl:function(){return!0},setValue:function(b){this._onCloseDialog();if(9>f("ie")){var g=u.getSelection(this.editor.window).getRangeAt(0).endContainer;3===g.nodeType&&(g=g.parentNode);g&&g.nodeName&&g.nodeName.toLowerCase()!==this.tag&&(g=this.editor.selection.getSelectedElement(this.tag));g&&g.nodeName&&g.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(g),
  this.editor.execCommand("unlink"))}b=this._checkValues(b);this.editor.execCommand("inserthtml",l.substitute(this.htmlTemplate,b));h("a",this.editor.document).forEach(function(A){A.innerHTML||H.has(A,"name")||A.parentNode.removeChild(A)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(b){if(b&&b.tagName.toLowerCase()===this.tag){var g=b.getAttribute("_djrealurl")||b.getAttribute("href");var A=b.getAttribute("target")||"_self";var N=b.textContent||
  b.innerText;this.editor.selection.selectElement(b,!0)}else N=this.editor.selection.getSelectedText();return{urlInput:g||"",textInput:N||"",targetSelect:A||""}},_onOpenDialog:function(){if(f("ie")){var b=u.getSelection(this.editor.window);if(b.rangeCount){var g=b.getRangeAt(0);var A=g.endContainer;3===A.nodeType&&(A=A.parentNode);A&&A.nodeName&&A.nodeName.toLowerCase()!==this.tag&&(A=this.editor.selection.getSelectedElement(this.tag));if(!A||A.nodeName&&A.nodeName.toLowerCase()!==this.tag)(b=this.editor.selection.getAncestorElement(this.tag))&&
  b.nodeName&&b.nodeName.toLowerCase()==this.tag?(A=b,this.editor.selection.selectElement(A)):g.startContainer===g.endContainer&&(b=g.startContainer.firstChild)&&b.nodeName&&b.nodeName.toLowerCase()==this.tag&&(A=b,this.editor.selection.selectElement(A))}}else A=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(A))},_onDblClick:function(b){if(b&&b.target&&(b=b.target,(b.tagName?b.tagName.toLowerCase():
  "")===this.tag&&H.get(b,"href"))){var g=this.editor;this.editor.selection.selectElement(b);g.onDisplayChanged();g._updateTimer&&(g._updateTimer.remove(),delete g._updateTimer);g.onNormalizedDisplayChanged();var A=this.button;setTimeout(function(){A.set("disabled",!1);A.loadAndOpenDropDown().then(function(){A.dropDown.focus&&A.dropDown.focus()})},10)}},_onMouseUp:function(){if(f("ff")){var b=this.editor.selection.getAncestorElement(this.tag);if(b){var g=u.getSelection(this.editor.window).getRangeAt(0);
  if(g.collapsed&&b.childNodes.length){var A=g.cloneRange();A.selectNodeContents(b.childNodes[b.childNodes.length-1]);A.setStart(b.childNodes[0],0);1!==g.compareBoundaryPoints(A.START_TO_START,A)?g.setStartBefore(b):-1!==g.compareBoundaryPoints(A.END_TO_START,A)&&g.setStartAfter(b)}}}}}),z=L("dijit._editor.plugins.ImgLinkDialog",[x],{linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' regExp\x3d'${urlRegExp}' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'false' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
  htmlTemplate:'\x3cimg src\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" alt\x3d"${textInput}" /\x3e',tag:"img",_getCurrentValues:function(b){if(b&&b.tagName.toLowerCase()===this.tag){var g=b.getAttribute("_djrealurl")||b.getAttribute("src");var A=b.getAttribute("alt");this.editor.selection.selectElement(b,!0)}else A=this.editor.selection.getSelectedText();return{urlInput:g||"",textInput:A||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);
  this.editor.onLoadDeferred.then(c.hitch(this,function(){this.own(e(this.editor.editNode,"mousedown",c.hitch(this,"_selectTag")))}))},_selectTag:function(b){b&&b.target&&(b=b.target,(b.tagName?b.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(b))},_checkValues:function(b){b&&b.urlInput&&(b.urlInput=b.urlInput.replace(/"/g,"\x26quot;"));b&&b.textInput&&(b.textInput=b.textInput.replace(/"/g,"\x26quot;"));return b},_onDblClick:function(b){if(b&&b.target&&(b=b.target,(b.tagName?
  b.tagName.toLowerCase():"")===this.tag&&H.get(b,"src"))){var g=this.editor;this.editor.selection.selectElement(b);g.onDisplayChanged();g._updateTimer&&(g._updateTimer.remove(),delete g._updateTimer);g.onNormalizedDisplayChanged();var A=this.button;setTimeout(function(){A.set("disabled",!1);A.loadAndOpenDropDown().then(function(){A.dropDown.focus&&A.dropDown.focus()})},10)}}});p.registry.createLink=function(b){var g={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in b?b.allowUnsafeHtml:!1};
  "linkFilter"in b&&(g.linkFilter=b.linkFilter);return new x(g)};p.registry.insertImage=function(){return new z({command:"insertImage"})};x.ImgLinkDialog=z;return x})},"dijit/_editor/plugins/ViewSource":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/window ../../focus ../_Plugin ../../form/ToggleButton ../.. ../../registry dojo/i18n!../nls/commands".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u,x,z,b,g,A){var N=L("dijit._editor.plugins.ViewSource",z,{stripScripts:!0,stripComments:!0,stripIFrames:!0,stripEventHandlers:!0,readOnly:!1,_fsPlugin:null,toggle:function(){n("webkit")&&(this._vsFocused=!0);this.button.set("checked",!this.button.get("checked"))},_initButton:function(){var q=f.getLocalization("dijit._editor","commands"),t=this.editor;this.button=new b({label:q.viewSource,ownerDocument:t.ownerDocument,dir:t.dir,lang:t.lang,showLabel:!1,iconClass:this.iconClassPrefix+
  " "+this.iconClassPrefix+"ViewSource",tabIndex:"-1",onChange:l.hitch(this,"_showSource")});this.button.set("readOnly",!1)},setEditor:function(q){this.editor=q;this._initButton();this.removeValueFilterHandles();this._setValueFilterHandle=E.before(this.editor,"setValue",l.hitch(this,function(t){return[this._filter(t)]}));this._getValueFilterHandle=E.after(this.editor,"getValue",l.hitch(this,function(t){return this._filter(t)}));this.editor.addKeyHandler(h.F12,!0,!0,l.hitch(this,function(t){this.button.focus();
  this.toggle();t.stopPropagation();t.preventDefault();setTimeout(l.hitch(this,function(){this.editor.focused&&this.editor.focus()}),100)}))},_showSource:function(q){var t=this.editor,B=t._plugins;this._sourceShown=q;var F=this;try{this.sourceArea||this._createSourceView();if(q)t._sourceQueryCommandEnabled=t.queryCommandEnabled,t.queryCommandEnabled=function(O){return"viewsource"===O.toLowerCase()},this.editor.onDisplayChanged(),v.forEach(B,function(O){!O||O instanceof N||!O.isInstanceOf(z)||O.set("disabled",
  !0)}),this._fsPlugin&&(this._fsPlugin._getAltViewNode=function(){return F.sourceArea}),this.sourceArea.value=t.get("value"),this.sourceArea.style.height=t.iframe.style.height,this.sourceArea.style.width=t.iframe.style.width,t.iframe.parentNode.style.position="relative",e.set(t.iframe,{position:"absolute",top:0,visibility:"hidden"}),e.set(this.sourceArea,{display:"block"}),this._resizeHandle=p(window,"resize",l.hitch(this,function(){var O=u.getBox(t.ownerDocument);"_prevW"in this&&"_prevH"in this&&
  O.w===this._prevW&&O.h===this._prevH||(this._prevW=O.w,this._prevH=O.h,this._resizer&&(clearTimeout(this._resizer),delete this._resizer),this._resizer=setTimeout(l.hitch(this,function(){delete this._resizer;this._resize()}),10))})),setTimeout(l.hitch(this,this._resize),100),this.editor.onNormalizedDisplayChanged(),this.editor.__oldGetValue=this.editor.getValue,this.editor.getValue=l.hitch(this,function(){var O=this.sourceArea.value;return O=this._filter(O)}),this._setListener=E.after(this.editor,
  "setValue",l.hitch(this,function(O){this.sourceArea.value=O||""}),!0);else{if(!t._sourceQueryCommandEnabled)return;this._setListener.remove();delete this._setListener;this._resizeHandle.remove();delete this._resizeHandle;this.editor.__oldGetValue&&(this.editor.getValue=this.editor.__oldGetValue,delete this.editor.__oldGetValue);t.queryCommandEnabled=t._sourceQueryCommandEnabled;if(!this._readOnly){var Q=this.sourceArea.value;t.beginEditing();t.set("value",Q);t.endEditing()}v.forEach(B,function(O){O&&
  O.isInstanceOf(z)&&O.set("disabled",!1)});e.set(this.sourceArea,"display","none");e.set(t.iframe,{position:"relative",visibility:"visible"});delete t._sourceQueryCommandEnabled;this.editor.onDisplayChanged()}setTimeout(l.hitch(this,function(){var O=t.domNode.parentNode;O&&(O=A.getEnclosingWidget(O))&&O.resize&&O.resize();t.resize()}),300)}catch(O){console.log(O)}},updateState:function(){this.button.set("disabled",this.get("disabled"))},_resize:function(){var q=this.editor,t=q.getHeaderHeight(),B=
  q.getFooterHeight(),F=c.position(q.domNode),Q=c.getPadBorderExtents(q.iframe.parentNode),O=c.getMarginExtents(q.iframe.parentNode),C=c.getPadBorderExtents(q.domNode),m=F.w-C.w;F=F.h-(t+C.h+B);this._fsPlugin&&this._fsPlugin.isFullscreen&&(q=u.getBox(q.ownerDocument),m=q.w-C.w,F=q.h-(t+C.h+B));c.setMarginBox(this.sourceArea,{w:Math.round(m-(Q.w+O.w)),h:Math.round(F-(Q.h+O.h))})},_createSourceView:function(){var q=this.editor,t=q._plugins;this.sourceArea=G.create("textarea");this.readOnly&&(H.set(this.sourceArea,
  "readOnly",!0),this._readOnly=!0);e.set(this.sourceArea,{padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});H.set(this.sourceArea,"aria-label",this.editor.id);G.place(this.sourceArea,q.iframe,"before");n("ie")&&q.iframe.parentNode.lastChild!==q.iframe&&e.set(q.iframe.parentNode.lastChild,{width:"0px",height:"0px",padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});q._viewsource_oldFocus=q.focus;var B=this;q.focus=function(){if(B._sourceShown)B.setSourceAreaCaret();else try{this._vsFocused?
  (delete this._vsFocused,x.focus(q.editNode)):q._viewsource_oldFocus()}catch(O){console.log("ViewSource focus code error: "+O)}};var F,Q;for(F=0;F<t.length;F++)if((Q=t[F])&&("dijit._editor.plugins.FullScreen"===Q.declaredClass||Q.declaredClass===g._scopeName+"._editor.plugins.FullScreen")){this._fsPlugin=Q;break}this._fsPlugin&&(this._fsPlugin._viewsource_getAltViewNode=this._fsPlugin._getAltViewNode,this._fsPlugin._getAltViewNode=function(){return B._sourceShown?B.sourceArea:this._viewsource_getAltViewNode()});
  this.own(p(this.sourceArea,"keydown",l.hitch(this,function(O){this._sourceShown&&O.keyCode==h.F12&&O.ctrlKey&&O.shiftKey&&(this.button.focus(),this.button.set("checked",!1),setTimeout(l.hitch(this,function(){q.focus()}),100),O.stopPropagation(),O.preventDefault())})))},_stripScripts:function(q){q&&(q=q.replace(/<\s*script[^>]*>((.|\s)*?)<\\?\/\s*script\s*>/ig,""),q=q.replace(/<\s*script\b([^<>]|\s)*>?/ig,""),q=q.replace(/<[^>]*=(\s|)*[("|')]javascript:[^$1][(\s|.)]*[$1][^>]*>/ig,""));return q},_stripComments:function(q){q&&
  (q=q.replace(/\x3c!--(.|\s){1,}?--\x3e/g,""));return q},_stripIFrames:function(q){q&&(q=q.replace(/<\s*iframe[^>]*>((.|\s)*?)<\\?\/\s*iframe\s*>/ig,""));return q},_stripEventHandlers:function(q){if(q){var t=q.match(/<[a-z]+?\b(.*?on.*?(['"]).*?\2.*?)+>/gim);if(t)for(var B=0,F=t.length;B<F;B++){var Q=t[B],O=Q.replace(/\s+on[a-z]*\s*=\s*(['"])(.*?)\1/igm,"");q=q.replace(Q,O)}}return q},_filter:function(q){q&&(this.stripScripts&&(q=this._stripScripts(q)),this.stripComments&&(q=this._stripComments(q)),
  this.stripIFrames&&(q=this._stripIFrames(q)),this.stripEventHandlers&&(q=this._stripEventHandlers(q)));return q},removeValueFilterHandles:function(){this._setValueFilterHandle&&(this._setValueFilterHandle.remove(),delete this._setValueFilterHandle);this._getValueFilterHandle&&(this._getValueFilterHandle.remove(),delete this._getValueFilterHandle)},setSourceAreaCaret:function(){var q=this.sourceArea;x.focus(q);this._sourceShown&&!this.readOnly&&(q.setSelectionRange?q.setSelectionRange(0,0):this.sourceArea.createTextRange&&
  (q=q.createTextRange(),q.collapse(!0),q.moveStart("character",-99999),q.moveStart("character",0),q.moveEnd("character",0),q.select()))},destroy:function(){this._resizer&&(clearTimeout(this._resizer),delete this._resizer);this._resizeHandle&&(this._resizeHandle.remove(),delete this._resizeHandle);this._setListener&&(this._setListener.remove(),delete this._setListener);this.removeValueFilterHandles();this.inherited(arguments)}});z.registry.viewSource=z.registry.viewsource=function(q){return new N({readOnly:"readOnly"in
  q?q.readOnly:!1,stripComments:"stripComments"in q?q.stripComments:!0,stripScripts:"stripScripts"in q?q.stripScripts:!0,stripIFrames:"stripIFrames"in q?q.stripIFrames:!0,stripEventHandlers:"stripEventHandlers"in q?q.stripEventHandlers:!0})};return N})},"dijit/_editor/plugins/FontChoice":function(){define("require dojo/_base/array dojo/_base/declare dojo/dom-construct dojo/i18n dojo/_base/lang dojo/string dojo/store/Memory ../../registry ../../_Widget ../../_TemplatedMixin ../../_WidgetsInTemplateMixin ../../form/FilteringSelect ../_Plugin ../range dojo/i18n!../nls/FontChoice".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u,x,z){v=L("dijit._editor.plugins._FontDropDown",[l,p,n],{label:"",plainText:!1,templateString:"\x3cspan style\x3d'white-space: nowrap' class\x3d'dijit dijitReset dijitInline'\x3e\x3clabel class\x3d'dijitLeft dijitInline' for\x3d'${selectId}'\x3e${label}\x3c/label\x3e\x3cinput data-dojo-type\x3d'../../form/FilteringSelect' required\x3d'false' data-dojo-props\x3d'labelType:\"html\", labelAttr:\"label\", searchAttr:\"name\"' class\x3d'${comboClass}' tabIndex\x3d'-1' id\x3d'${selectId}' data-dojo-attach-point\x3d'select' value\x3d''/\x3e\x3c/span\x3e",
  contextRequire:v,postMixInProperties:function(){this.inherited(arguments);this.strings=G.getLocalization("dijit._editor","FontChoice");this.label=this.strings[this.command];this.id=h.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.selectId=this.id+"_select";this.inherited(arguments)},postCreate:function(){this.select.set("store",new f({idProperty:"value",data:E.map(this.values,function(q){var t=this.strings[q]||q;return{label:this.getLabel(q,t),name:t,value:q}},this)}));this.select.set("value",
  "",!1);this.disabled=this.select.get("disabled")},_setValueAttr:function(q,t){t=!1!==t;this.select.set("value",0>E.indexOf(this.values,q)?"":q,t);t||(this.select._lastValueReported=null)},_getValueAttr:function(){return this.select.get("value")},focus:function(){this.select.focus()},_setDisabledAttr:function(q){this._set("disabled",q);this.select.set("disabled",q)}});var b=L("dijit._editor.plugins._FontNameDropDown",v,{generic:!1,command:"fontName",comboClass:"dijitFontNameCombo",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(q,t){return this.plainText?t:"\x3cdiv style\x3d'font-family: "+q+"'\x3e"+t+"\x3c/div\x3e"},_normalizeFontName:function(q){var t=this.values;if(!q||!t)return q;var B=q.split(",");if(1<B.length)for(var F=0,Q=B.length;F<Q;F++){var O=e.trim(B[F]);if(-1<E.indexOf(t,O))return O}return q},_setValueAttr:function(q,t){t=!1!==
  t;q=this._normalizeFontName(q);this.generic&&(q={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"}[q]||q);this.inherited(arguments,[q,t])}}),g=L("dijit._editor.plugins._FontSizeDropDown",v,{command:"fontSize",comboClass:"dijitFontSizeCombo",values:[1,2,3,4,5,6,7],getLabel:function(q,
  t){return this.plainText?t:"\x3cfont size\x3d"+q+"'\x3e"+t+"\x3c/font\x3e"},_setValueAttr:function(q,t){t=!1!==t;q.indexOf&&-1!=q.indexOf("px")&&(q={10:1,13:2,16:3,18:4,24:5,32:6,48:7}[parseInt(q,10)]||q);this.inherited(arguments,[q,t])}}),A=L("dijit._editor.plugins._FormatBlockDropDown",v,{command:"formatBlock",comboClass:"dijitFormatBlockCombo",values:"noFormat p h1 h2 h3 pre".split(" "),postCreate:function(){this.inherited(arguments);this.set("value","noFormat",!1)},getLabel:function(q,t){return this.plainText||
  "noFormat"==q?t:"\x3c"+q+"\x3e"+t+"\x3c/"+q+"\x3e"},_execCommand:function(q,t,B){if("noFormat"===B){var F;if((t=z.getSelection(q.window))&&0<t.rangeCount&&(B=t.getRangeAt(0),B)){t=B.startContainer;for(F=B.endContainer;t&&t!==q.editNode&&t!==q.document.body&&1!==t.nodeType;)t=t.parentNode;for(;F&&F!==q.editNode&&F!==q.document.body&&1!==F.nodeType;)F=F.parentNode;var Q=c.hitch(this,function(k,D){if(k.childNodes&&k.childNodes.length){var J;for(J=0;J<k.childNodes.length;J++){var a=k.childNodes[J];if(1==
  a.nodeType&&q.selection.inSelection(a)){var d=a.tagName?a.tagName.toLowerCase():"";-1!==E.indexOf(this.values,d)&&D.push(a);Q(a,D)}}}});B=c.hitch(this,function(k){if(k&&k.length){for(q.beginEditing();k.length;)this._removeFormat(q,k.pop());q.endEditing()}});var O=[];if(t==F){for(F=t;F&&F!==q.editNode&&F!==q.document.body;){if(1==F.nodeType){var C=F.tagName?F.tagName.toLowerCase():"";if(-1!==E.indexOf(this.values,C)){var m=F;break}}F=F.parentNode}Q(t,O);m&&(O=[m].concat(O))}else for(F=t;q.selection.inSelection(F);)1==
  F.nodeType&&(C=F.tagName?F.tagName.toLowerCase():"",-1!==E.indexOf(this.values,C)&&O.push(F),Q(F,O)),F=F.nextSibling;B(O);q.onDisplayChanged()}}else q.execCommand(t,B)},_removeFormat:function(q,t){if(q.customUndo){for(;t.firstChild;)H.place(t.firstChild,t,"before");t.parentNode.removeChild(t)}else{q.selection.selectElementChildren(t);var B=q.selection.getSelectedHtml();q.selection.selectElement(t);q.execCommand("inserthtml",B||"")}}}),N=L("dijit._editor.plugins.FontChoice",x,{useDefaultCommand:!1,
  _initButton:function(){var q={fontName:b,fontSize:g,formatBlock:A}[this.command],t=this.params;this.params.custom&&(t.values=this.params.custom);var B=this.editor;this.button=new q(c.delegate({dir:B.dir,lang:B.lang},t));this.own(this.button.select.on("change",c.hitch(this,function(F){this.editor.focused&&this.editor.focus();"fontName"==this.command&&-1!=F.indexOf(" ")&&(F="'"+F+"'");this.button._execCommand?this.button._execCommand(this.editor,this.command,F):this.editor.execCommand(this.command,
  F)})))},updateState:function(){var q=this.editor,t=this.command;if(q&&q.isLoaded&&t.length&&this.button){var B=this.get("disabled");this.button.set("disabled",B);if(!B){try{var F=q.queryCommandValue(t)||""}catch(O){F=""}(B=c.isString(F)&&(F.match(/'([^']*)'/)||F.match(/"([^"]*)"/)))&&(F=B[1]);"fontSize"!==t||F||(F=3);if("formatBlock"===t)if(F&&"p"!=F)0>E.indexOf(this.button.values,F)&&(F="noFormat");else{F=null;if((t=z.getSelection(this.editor.window))&&0<t.rangeCount&&(t=t.getRangeAt(0)))var Q=t.endContainer;
  for(;Q&&Q!==q.editNode&&Q!==q.document;){if((t=Q.tagName?Q.tagName.toLowerCase():"")&&-1<E.indexOf(this.button.values,t)){F=t;break}Q=Q.parentNode}F||(F="noFormat")}F!==this.button.get("value")&&this.button.set("value",F,!1)}}}});E.forEach(["fontName","fontSize","formatBlock"],function(q){x.registry[q]=function(t){return new N({command:q,plainText:t.plainText})}});N._FontDropDown=v;N._FontNameDropDown=b;N._FontSizeDropDown=g;N._FormatBlockDropDown=A;return N})},"dojox/editor/plugins/Preview":function(){define("dojo dijit dojox dijit/_editor/_Plugin dijit/form/Button dojo/_base/connect dojo/_base/declare dojo/i18n dojo/i18n!dojox/editor/plugins/nls/Preview".split(" "),
  function(v,E,L,H){var G=v.declare("dojox.editor.plugins.Preview",H,{useDefaultCommand:!1,styles:"",stylesheets:null,iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Preview");this.button=new E.form.Button({label:this._nlsResources.preview,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Preview",tabIndex:"-1",onClick:v.hitch(this,"_preview")})},setEditor:function(c){this.editor=c;this._initButton()},
  updateState:function(){this.button.set("disabled",this.get("disabled"))},_preview:function(){try{var c=this.editor.get("value"),e="\t\t\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html; charset\x3dUTF-8'\x3e\n",f;if(this.stylesheets)for(f=0;f<this.stylesheets.length;f++)e+="\t\t\x3clink rel\x3d'stylesheet' type\x3d'text/css' href\x3d'"+this.stylesheets[f]+"'\x3e\n";this.styles&&(e+="\t\t\x3cstyle\x3e"+this.styles+"\x3c/style\x3e\n");c="\x3chtml\x3e\n\t\x3chead\x3e\n"+e+"\t\x3c/head\x3e\n\t\x3cbody\x3e\n"+
  c+"\n\t\x3c/body\x3e\n\x3c/html\x3e";var h=window.open("javascript: ''",this._nlsResources.preview,"status\x3d1,menubar\x3d0,location\x3d0,toolbar\x3d0");h.document.open();h.document.write(c);h.document.close()}catch(l){console.warn(l)}}});v.subscribe(E._scopeName+".Editor.getPlugin",null,function(c){c.plugin||"preview"!==c.args.name.toLowerCase()||(c.plugin=new G({styles:"styles"in c.args?c.args.styles:"",stylesheets:"stylesheets"in c.args?c.args.stylesheets:null}))});return G})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),
  function(v,E,L,H,G,c){var e=L("dijit._editor.plugins.TextColor",G,{buttonClass:c,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;this.inherited(arguments);var f=this;this.button.loadDropDown=function(h){function l(p){f.button.dropDown=new p({dir:f.editor.dir,ownerDocument:f.editor.ownerDocument,value:f.value,onChange:function(n){f.editor.execCommand(f.command,n)},onExecute:function(){f.editor.execCommand(f.command,this.get("value"))}});h()}"string"==
  typeof f.colorPicker?v([f.colorPicker],l):l(f.colorPicker)}},updateState:function(){var f=this.editor,h=this.command;if(f&&f.isLoaded&&h.length){if(this.button){var l=this.get("disabled");this.button.set("disabled",l);if(l)return;try{var p=f.queryCommandValue(h)||""}catch(n){p=""}}""==p&&(p="#000000");"transparent"==p&&(p="#ffffff");"string"==typeof p?-1<p.indexOf("rgb")&&(p=E.fromRgb(p).toHex()):(p=((p&255)<<16|p&65280|(p&16711680)>>>16).toString(16),p="#000000".slice(0,7-p.length)+p);this.value=
  p;(f=this.button.dropDown)&&f.get&&p!==f.get("value")&&f.set("value",p,!1)}}});G.registry.foreColor=function(f){return new e(f)};G.registry.hiliteColor=function(f){return new e(f)};return e})},"dojox/editor/plugins/ToolbarLineBreak":function(){define("dojo dijit dojox dijit/_Widget dijit/_TemplatedMixin dijit/_editor/_Plugin dojo/_base/declare".split(" "),function(v,E,L,H,G,c,e){var f=e("dojox.editor.plugins.ToolbarLineBreak",[H,G],{templateString:"\x3cspan class\x3d'dijit dijitReset'\x3e\x3cbr\x3e\x3c/span\x3e",
  postCreate:function(){v.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}});v.subscribe(E._scopeName+".Editor.getPlugin",null,function(h){if(!h.plugin){var l=h.args.name.toLowerCase();if("||"===l||"toolbarlinebreak"===l)h.plugin=new c({button:new f,setEditor:function(p){this.editor=p}})}});return f})},"dojox/editor/plugins/FindReplace":function(){define("dojo dijit dojox dijit/_base/manager dijit/_base/popup dijit/_Widget dijit/_TemplatedMixin dijit/_KeyNavContainer dijit/_WidgetsInTemplateMixin dijit/TooltipDialog dijit/Toolbar dijit/form/CheckBox dijit/form/_TextBoxMixin dijit/form/TextBox dijit/_editor/_Plugin dijit/form/Button dijit/form/DropDownButton dijit/form/ToggleButton ./ToolbarLineBreak dojo/_base/connect dojo/_base/declare dojo/i18n dojo/string dojo/i18n!dojox/editor/plugins/nls/FindReplace".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u,x,z){v.experimental("dojox.editor.plugins.FindReplace");var b=v.declare("dojox.editor.plugins._FindReplaceCloseBox",[c,e,h],{btnId:"",widget:null,widgetsInTemplate:!0,templateString:"\x3cspan style\x3d'float: right' class\x3d'dijitInline' tabindex\x3d'-1'\x3e\x3cbutton class\x3d'dijit dijitReset dijitInline' id\x3d'${btnId}' dojoAttachPoint\x3d'button' dojoType\x3d'dijit.form.Button' tabindex\x3d'-1' iconClass\x3d'dijitEditorIconsFindReplaceClose' showLabel\x3d'false'\x3eX\x3c/button\x3e\x3c/span\x3e",
  postMixInProperties:function(){this.id=E.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.btnId=this.id+"_close";this.inherited(arguments)},startup:function(){this.connect(this.button,"onClick","onClick")},onClick:function(){}}),g=v.declare("dojox.editor.plugins._FindReplaceTextBox",[c,e,h],{textId:"",label:"",toolTip:"",widget:null,widgetsInTemplate:!0,templateString:"\x3cspan style\x3d'white-space: nowrap' class\x3d'dijit dijitReset dijitInline dijitEditorFindReplaceTextBox' title\x3d'${tooltip}' tabindex\x3d'-1'\x3e\x3clabel class\x3d'dijitLeft dijitInline' for\x3d'${textId}' tabindex\x3d'-1'\x3e${label}\x3c/label\x3e\x3cinput dojoType\x3d'dijit.form.TextBox' intermediateChanges\x3d'true' class\x3d'focusTextBox' tabIndex\x3d'0' id\x3d'${textId}' dojoAttachPoint\x3d'textBox, focusNode' value\x3d'' dojoAttachEvent\x3d'onKeyPress: _onKeyPress'/\x3e\x3c/span\x3e",
  postMixInProperties:function(){this.id=E.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.textId=this.id+"_text";this.inherited(arguments)},postCreate:function(){this.textBox.set("value","");this.disabled=this.textBox.get("disabled");this.connect(this.textBox,"onChange","onChange");v.attr(this.textBox.textbox,"formnovalidate","true")},_setValueAttr:function(t){this.value=t;this.textBox.set("value",t)},focus:function(){this.textBox.focus()},_setDisabledAttr:function(t){this.disabled=t;this.textBox.set("disabled",
  t)},onChange:function(t){this.value=t},_onKeyPress:function(t){var B=0,F=0;!t.target||t.ctrlKey||t.altKey||t.shiftKey||(t.keyCode==v.keys.LEFT_ARROW?(B=t.target.selectionStart,F=t.target.selectionEnd,B<F&&(E.selectInputText(t.target,B,B),v.stopEvent(t))):t.keyCode==v.keys.RIGHT_ARROW&&(B=t.target.selectionStart,F=t.target.selectionEnd,B<F&&(E.selectInputText(t.target,F,F),v.stopEvent(t))))}}),A=v.declare("dojox.editor.plugins._FindReplaceCheckBox",[c,e,h],{checkId:"",label:"",tooltip:"",widget:null,
  widgetsInTemplate:!0,templateString:"\x3cspan style\x3d'white-space: nowrap' tabindex\x3d'-1' class\x3d'dijit dijitReset dijitInline dijitEditorFindReplaceCheckBox' title\x3d'${tooltip}' \x3e\x3cinput dojoType\x3d'dijit.form.CheckBox' tabIndex\x3d'0' id\x3d'${checkId}' dojoAttachPoint\x3d'checkBox, focusNode' value\x3d''/\x3e\x3clabel tabindex\x3d'-1' class\x3d'dijitLeft dijitInline' for\x3d'${checkId}'\x3e${label}\x3c/label\x3e\x3c/span\x3e",postMixInProperties:function(){this.id=E.getUniqueId(this.declaredClass.replace(/\./g,
  "_"));this.checkId=this.id+"_check";this.inherited(arguments)},postCreate:function(){this.checkBox.set("checked",!1);this.disabled=this.checkBox.get("disabled");this.checkBox.isFocusable=function(){return!1}},_setValueAttr:function(t){this.checkBox.set("value",t)},_getValueAttr:function(){return this.checkBox.get("value")},focus:function(){this.checkBox.focus()},_setDisabledAttr:function(t){this.disabled=t;this.checkBox.set("disabled",t)}}),N=v.declare("dojox.editor.plugins._FindReplaceToolbar",p,
  {postCreate:function(){this.connectKeyNavHandlers([],[]);this.connect(this.containerNode,"onclick","_onToolbarEvent");this.connect(this.containerNode,"onkeydown","_onToolbarEvent");v.addClass(this.domNode,"dijitToolbar")},addChild:function(t,B){E._KeyNavContainer.superclass.addChild.apply(this,arguments)},_onToolbarEvent:function(t){t.stopPropagation()}}),q=v.declare("dojox.editor.plugins.FindReplace",[z],{buttonClass:E.form.ToggleButton,iconClassPrefix:"dijitEditorIconsFindReplace",editor:null,button:null,
  _frToolbar:null,_closeBox:null,_findField:null,_replaceField:null,_findButton:null,_replaceButton:null,_replaceAllButton:null,_caseSensitive:null,_backwards:null,_promDialog:null,_promDialogTimeout:null,_strings:null,_bookmark:null,_initButton:function(){this._strings=v.i18n.getLocalization("dojox.editor.plugins","FindReplace");this.button=new E.form.ToggleButton({label:this._strings.findReplace,showLabel:!1,iconClass:this.iconClassPrefix+" dijitEditorIconFindString",tabIndex:"-1",onChange:v.hitch(this,
  "_toggleFindReplace")});v.isOpera&&this.button.set("disabled",!0);this.connect(this.button,"set",v.hitch(this,function(t,B){"disabled"===t&&this._toggleFindReplace(!B&&this._displayed,!0,!0)}))},setEditor:function(t){this.editor=t;this._initButton()},toggle:function(){this.button.set("checked",!this.button.get("checked"))},_toggleFindReplace:function(t,B,F){var Q=v.marginBox(this.editor.domNode);t&&!v.isOpera?(v.style(this._frToolbar.domNode,"display","block"),this._populateFindField(),B||(this._displayed=
  !0)):(v.style(this._frToolbar.domNode,"display","none"),B||(this._displayed=!1),F||this.editor.focus());this.editor.resize({h:Q.h})},_populateFindField:function(){var t=this.editor._sCall("getSelectedText",[null]);this._findField&&this._findField.textBox&&(t&&this._findField.textBox.set("value",t),this._findField.textBox.focus(),E.selectInputText(this._findField.textBox.focusNode))},setToolbar:function(t){this.inherited(arguments);if(!v.isOpera){var B=this._frToolbar=new N;v.style(B.domNode,"display",
  "none");v.place(B.domNode,t.domNode,"after");B.startup();this._closeBox=new b;B.addChild(this._closeBox);this._findField=new g({label:this._strings.findLabel,tooltip:this._strings.findTooltip});B.addChild(this._findField);this._replaceField=new g({label:this._strings.replaceLabel,tooltip:this._strings.replaceTooltip});B.addChild(this._replaceField);B.addChild(new L.editor.plugins.ToolbarLineBreak);this._findButton=new E.form.Button({label:this._strings.findButton,showLabel:!0,iconClass:this.iconClassPrefix+
  " dijitEditorIconFind"});this._findButton.titleNode.title=this._strings.findButtonTooltip;B.addChild(this._findButton);this._replaceButton=new E.form.Button({label:this._strings.replaceButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplace"});this._replaceButton.titleNode.title=this._strings.replaceButtonTooltip;B.addChild(this._replaceButton);this._replaceAllButton=new E.form.Button({label:this._strings.replaceAllButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplaceAll"});
  this._replaceAllButton.titleNode.title=this._strings.replaceAllButtonTooltip;B.addChild(this._replaceAllButton);this._caseSensitive=new A({label:this._strings.matchCase,tooltip:this._strings.matchCaseTooltip});B.addChild(this._caseSensitive);this._backwards=new A({label:this._strings.backwards,tooltip:this._strings.backwardsTooltip});B.addChild(this._backwards);this._findButton.set("disabled",!0);this._replaceButton.set("disabled",!0);this._replaceAllButton.set("disabled",!0);this.connect(this._findField,
  "onChange","_checkButtons");this.connect(this._findField,"onKeyDown","_onFindKeyDown");this.connect(this._replaceField,"onKeyDown","_onReplaceKeyDown");this.connect(this._findButton,"onClick","_find");this.connect(this._replaceButton,"onClick","_replace");this.connect(this._replaceAllButton,"onClick","_replaceAll");this.connect(this._closeBox,"onClick","toggle");this._promDialog=new E.TooltipDialog;this._promDialog.startup();this._promDialog.set("content","")}},_checkButtons:function(){this._findField.get("value")?
  (this._findButton.set("disabled",!1),this._replaceButton.set("disabled",!1),this._replaceAllButton.set("disabled",!1)):(this._findButton.set("disabled",!0),this._replaceButton.set("disabled",!0),this._replaceAllButton.set("disabled",!0))},_onFindKeyDown:function(t){t.keyCode==v.keys.ENTER&&(this._find(),v.stopEvent(t))},_onReplaceKeyDown:function(t){t.keyCode==v.keys.ENTER&&(this._replace()||this._replace(),v.stopEvent(t))},_find:function(t){var B=this._findField.get("value")||"";if(B){var F=this._caseSensitive.get("value"),
  Q=this._backwards.get("value");B=this._findText(B,F,Q);!B&&t&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextFind})),E.popup.open({popup:this._promDialog,around:this._findButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;E.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return B}return!1},_replace:function(t){var B=
  !1,F=this.editor;F.focus();var Q=this._findField.get("value")||"",O=this._replaceField.get("value")||"";if(Q){var C=this._caseSensitive.get("value"),m=this._backwards.get("value"),k=F._sCall("getSelectedText",[null]);v.isMoz&&(Q=v.trim(Q),k=v.trim(k));Q=this._filterRegexp(Q,!C);k&&Q.test(k)&&(F.execCommand("inserthtml",O),B=!0,m&&(this._findText(O,C,m),F._sCall("collapse",[!0])));!this._find(!1)&&t&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextReplace})),
  E.popup.open({popup:this._promDialog,around:this._replaceButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;E.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return B}return null},_replaceAll:function(t){var B=0;this._backwards.get("value")?this.editor.placeCursorAtEnd():this.editor.placeCursorAtStart();this._replace(!1)&&B++;var F=v.hitch(this,function(){this._replace(!1)?
  (B++,setTimeout(F,10)):t&&(this._promDialog.set("content",v.string.substitute(this._strings.replaceDialogText,{0:""+B})),E.popup.open({popup:this._promDialog,around:this._replaceAllButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;E.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this._findField.focus();this._findField.textBox.focusNode.select()}),0))});F()},_findText:function(t,B,
  F){var Q=this.editor,O=Q.window,C=!1;if(t)if(O.find)C=O.find(t,B,F,!1,!1,!1,!1);else{var m=Q.document;if(m.selection||O.getSelection)if(this.editor.focus(),Q=m.body.createTextRange(),C=Q.duplicate(),O.getSelection().getRangeAt(0),(m=m.selection?m.selection.createRange():null)?F?Q.setEndPoint("EndToStart",m):Q.setEndPoint("StartToEnd",m):this._bookmark&&(O=O.getSelection().toString(),Q.moveToBookmark(this._bookmark),Q.text!=O?(Q=C.duplicate(),this._bookmark=null):(F?C.setEndPoint("EndToStart",Q):C.setEndPoint("StartToEnd",
  Q),Q=C.duplicate())),B=B?4:0,F&&(B|=1),C=Q.findText(t,Q.text.length,B))Q.select(),this._bookmark=Q.getBookmark()}return C},_filterRegexp:function(t,B){for(var F="",Q=null,O=0;O<t.length;O++)switch(Q=t.charAt(O),Q){case "\\":F+=Q;O++;F+=t.charAt(O);break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":F+="\\";default:F+=Q}F="^"+F+"$";return B?new RegExp(F,"mi"):new RegExp(F,"m")},updateState:function(){this.button.set("disabled",this.get("disabled"))},
  destroy:function(){this.inherited(arguments);this._promDialogTimeout&&(clearTimeout(this._promDialogTimeout),this._promDialogTimeout=null,E.popup.close(this._promDialog));this._frToolbar&&(this._frToolbar.destroyRecursive(),this._frToolbar=null);this._promDialog&&(this._promDialog.destroyRecursive(),this._promDialog=null)}});q._FindReplaceCloseBox=b;q._FindReplaceTextBox=g;q._FindReplaceCheckBox=A;q._FindReplaceToolbar=N;v.subscribe(E._scopeName+".Editor.getPlugin",null,function(t){t.plugin||"findreplace"!==
  t.args.name.toLowerCase()||(t.plugin=new q({}))});return q})},"dojox/editor/plugins/PasteFromWord":function(){define("dojo dijit dojox dijit/_editor/_Plugin dijit/_base/manager dijit/_editor/RichText dijit/form/Button dijit/Dialog dojox/html/format dojo/_base/connect dojo/_base/declare dojo/i18n dojo/string dojo/i18n!dojox/editor/plugins/nls/PasteFromWord dojo/i18n!dijit/nls/common dojo/i18n!dijit/_editor/nls/commands".split(" "),function(v,E,L,H){var G=v.declare("dojox.editor.plugins.PasteFromWord",
  H,{iconClassPrefix:"dijitAdditionalEditorIcon",width:"400px",height:"300px",_template:"\x3cdiv class\x3d'dijitPasteFromWordEmbeddedRTE'\x3e\x3cdiv style\x3d'width: ${width}; padding-top: 5px; padding-bottom: 5px;'\x3e${instructions}\x3c/div\x3e\x3cdiv id\x3d'${uId}_rte' style\x3d'width: ${width}; height: ${height}'\x3e\x3c/div\x3e\x3ctable style\x3d'width: ${width}' tabindex\x3d'-1'\x3e\x3ctbody\x3e\x3ctr\x3e\x3ctd align\x3d'center'\x3e\x3cbutton type\x3d'button' dojoType\x3d'dijit.form.Button' id\x3d'${uId}_paste'\x3e${paste}\x3c/button\x3e\x26nbsp;\x3cbutton type\x3d'button' dojoType\x3d'dijit.form.Button' id\x3d'${uId}_cancel'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e",
  _filters:[{regexp:/(<meta\s*[^>]*\s*>)|(<\s*link\s* href="file:[^>]*\s*>)|(<\/?\s*\w+:[^>]*\s*>)/gi,handler:""},{regexp:/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,handler:""},{regexp:/(class="Mso[^"]*")|(\x3c!--(.|\s){1,}?--\x3e)/gi,handler:""},{regexp:/(<p[^>]*>\s*(&nbsp;|\u00A0)*\s*<\/p[^>]*>)|(<p[^>]*>\s*<font[^>]*>\s*(&nbsp;|\u00A0)*\s*<\/\s*font\s*>\s<\/p[^>]*>)/ig,handler:""},{regexp:/(style="[^"]*mso-[^;][^"]*")|(style="margin:\s*[^;"]*;")/gi,
  handler:""},{regexp:/(<\s*script[^>]*>((.|\s)*?)<\\?\/\s*script\s*>)|(<\s*script\b([^<>]|\s)*>?)|(<[^>]*=(\s|)*[("|')]javascript:[^$1][(\s|.)]*[$1][^>]*>)/ig,handler:""},{regexp:/<(\/?)o:p[^>]*>/gi,handler:""}],_initButton:function(){this._filters=this._filters.slice(0);var c=v.i18n.getLocalization("dojox.editor.plugins","PasteFromWord");v.mixin(c,v.i18n.getLocalization("dijit","common"));v.mixin(c,v.i18n.getLocalization("dijit._editor","commands"));this.button=new E.form.Button({label:c.pasteFromWord,
  showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"PasteFromWord",tabIndex:"-1",onClick:v.hitch(this,"_openDialog")});this._uId=E.getUniqueId(this.editor.id);c.uId=this._uId;c.width=this.width||"400px";c.height=this.height||"300px";this._dialog=(new E.Dialog({title:c.pasteFromWord})).placeAt(v.body());this._dialog.set("content",v.string.substitute(this._template,c));v.style(v.byId(this._uId+"_rte"),"opacity",.001);this.connect(E.byId(this._uId+"_paste"),"onClick","_paste");this.connect(E.byId(this._uId+
  "_cancel"),"onClick","_cancel");this.connect(this._dialog,"onHide","_clearDialog")},updateState:function(){this.button.set("disabled",this.get("disabled"))},setEditor:function(c){this.editor=c;this._initButton()},_openDialog:function(){this._dialog.show();this._rte||setTimeout(v.hitch(this,function(){this._rte=new E._editor.RichText({height:this.height||"300px"},this._uId+"_rte");this._rte.startup();this._rte.onLoadDeferred.addCallback(v.hitch(this,function(){v.animateProperty({node:this._rte.domNode,
  properties:{opacity:{start:.001,end:1}}}).play()}))}),100)},_paste:function(){var c=L.html.format.prettyPrint(this._rte.get("value"));this._dialog.hide();var e;for(e=0;e<this._filters.length;e++){var f=this._filters[e];c=c.replace(f.regexp,f.handler)}c=L.html.format.prettyPrint(c);this.editor.focus();this.editor.execCommand("inserthtml",c)},_cancel:function(){this._dialog.hide()},_clearDialog:function(){this._rte.set("value","")},destroy:function(){this._rte&&this._rte.destroy();this._dialog&&this._dialog.destroyRecursive();
  delete this._dialog;delete this._rte;this.inherited(arguments)}});v.subscribe(E._scopeName+".Editor.getPlugin",null,function(c){c.plugin||"pastefromword"!==c.args.name.toLowerCase()||(c.plugin=new G({width:"width"in c.args?c.args.width:"400px",height:"height"in c.args?c.args.width:"300px"}))});return G})},"dojox/html/format":function(){define(["dojo/_base/kernel","./entities","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,E,L,H,G){var c=v.getObject("dojox.html.format",!0);c.prettyPrint=
  function(e,f,h,l,p){var n=[],u=0,x=[],z="\t",b="",g=[],A,N=/[=]([^"']+?)(\s|>)/g,q=/style=("[^"]*"|'[^']*'|\S*)/gi,t=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;if(f&&0<f&&10>f)for(z="",A=0;A<f;A++)z+=" ";f=H.doc.createElement("div");f.innerHTML=e;var B=E.encode,F=E.decode,Q=f.ownerDocument.createElement("div"),O=function(d){d=d.cloneNode(!1);Q.appendChild(d);d=Q.innerHTML;Q.innerHTML="";return d},C=function(){var d;for(d=0;d<u;d++)n.push(z)},m=function(){n.push("\n")},k=function(d){var r;d=d.split("\n");for(r=
  0;r<d.length;r++)d[r]=v.trim(d[r]);d=d.join(" ");d=v.trim(d);if(""!==d){var y=[];if(h&&0<h){var w="";for(r=0;r<u;r++)w+=z;r=w.length;w=h;for(h>r&&(w-=r);d;)if(d.length>h){for(r=w;0<r&&" "!==d.charAt(r);r--);if(!r)for(r=w;r<d.length&&" "!==d.charAt(r);r++);var I=d.substring(0,r);I=v.trim(I);d=v.trim(d.substring(r==d.length?d.length:r+1,d.length));if(I){var K="";for(r=0;r<u;r++)K+=z;I=K+I+"\n"}y.push(I)}else{K="";for(r=0;r<u;r++)K+=z;d=K+d+"\n";y.push(d);d=null}return y.join("")}K="";for(r=0;r<u;r++)K+=
  z;return K+d+"\n"}return""},D=function(d){if(d){var r=d;r&&(r=r.replace(/&quot;/gi,'"'),r=r.replace(/&gt;/gi,"\x3e"),r=r.replace(/&lt;/gi,"\x3c"),r=r.replace(/&amp;/gi,"\x26"));var y;d=0;var w=r.split("\n"),I=[];for(r=0;r<w.length;r++){var K=w[r],M=-1<K.indexOf("\n");if(K=v.trim(K)){M=d;for(y=0;y<K.length;y++){var P=K.charAt(y);"{"===P?d++:"}"===P&&(d--,M=d)}P="";for(y=0;y<u+M;y++)P+=z;I.push(P+K+"\n")}else M&&0===r&&I.push("\n")}d=I.join("")}return d},J=function(d){var r=d.nodeName.toLowerCase(),
  y=v.trim(O(d));d=y.substring(0,y.indexOf("\x3e")+1);d=d.replace(N,'\x3d"$1"$2');d=d.replace(q,function(I){var K=I.substring(0,6);I=I.substring(6,I.length);var M=I.charAt(0);I=v.trim(I.substring(1,I.length-1));I=I.split(";");var P=[];L.forEach(I,function(R){if(R=v.trim(R))R=R.substring(0,R.indexOf(":")).toLowerCase()+R.substring(R.indexOf(":"),R.length),P.push(R)});P=P.sort();I=P.join("; ");var S=v.trim(I);return S&&";"!==S?K+M+(I+";")+M:""});var w=[];d=d.replace(t,function(I){w.push(v.trim(I));return""});
  w=w.sort();d="\x3c"+r;w.length&&(d+=" "+w.join(" "));-1!=y.indexOf("\x3c/")?(x.push(r),d+="\x3e"):(d=p?d+" /\x3e":d+"\x3e",x.push(!1));a:switch(r){case "a":case "b":case "strong":case "s":case "strike":case "i":case "u":case "em":case "sup":case "sub":case "span":case "font":case "big":case "cite":case "q":case "small":r=!0;break a;default:r=!1}g.push(r);b&&!r&&(n.push(k(b)),b="");r?b+=d:(C(),n.push(d),m(),u++)},a=function(d){var r=d.childNodes;if(r){var y;for(y=0;y<r.length;y++){var w=r[y];if(1===
  w.nodeType){var I=v.trim(w.tagName.toLowerCase());G("ie")&&w.parentNode!=d||I&&"/"===I.charAt(0)||(J(w),"script"===I?n.push(D(w.innerHTML)):"pre"===I?(w=w.innerHTML,G("mozilla")&&(w=w.replace("\x3cbr\x3e","\n"),w=w.replace("\x3cpre\x3e",""),w=w.replace("\x3c/pre\x3e","")),"\n"!==w.charAt(w.length-1)&&(w+="\n"),n.push(w)):a(w),w=g.pop(),b&&!w&&(n.push(k(b)),b=""),(I=x.pop())?(I="\x3c/"+I+"\x3e",w?b+=I:(u--,C(),n.push(I),m())):u--)}else 3===w.nodeType||4===w.nodeType?b+=B(w.nodeValue,l):8===w.nodeType&&
  (w=F(w.nodeValue,l),C(),n.push("\x3c!--"),m(),u++,n.push(k(w)),u--,C(),n.push("--\x3e"),m())}}};a(f);b&&(n.push(k(b)),b="");return n.join("")};return c})},"dojox/editor/plugins/InsertAnchor":function(){define("dojo dijit dojox dijit/_editor/_Plugin dijit/_base/manager dijit/_editor/range dijit/_Templated dijit/TooltipDialog dijit/form/ValidationTextBox dijit/form/Select dijit/form/Button dijit/form/DropDownButton dojo/_base/declare dojo/i18n dojo/string dojo/NodeList-dom dojox/editor/plugins/ToolbarLineBreak dojo/i18n!dojox/editor/plugins/nls/InsertAnchor dojo/i18n!dijit/nls/common".split(" "),
  function(v,E,L,H){var G=v.declare("dojox.editor.plugins.InsertAnchor",H,{htmlTemplate:'\x3ca name\x3d"${anchorInput}" class\x3d"dijitEditorPluginInsertAnchorStyle"\x3e${textInput}\x3c/a\x3e',iconClassPrefix:"dijitAdditionalEditorIcon",_template:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_anchorInput'\x3e${anchor}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_anchorInput' name\x3d'anchorInput' intermediateChanges\x3d'true'\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' intermediateChanges\x3d'true'\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton dojoType\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton dojoType\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${cancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
  _initButton:function(){var c=this,e=v.i18n.getLocalization("dojox.editor.plugins","InsertAnchor",this.lang),f=this.dropDown=new E.TooltipDialog({title:e.title,execute:v.hitch(this,"setValue"),onOpen:function(){c._onOpenDialog();E.TooltipDialog.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(v.hitch(c,"_onCloseDialog"),0)}});this.button=new E.form.DropDownButton({label:e.insertAnchor,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"InsertAnchor",tabIndex:"-1",
  dropDown:this.dropDown});e.id=E.getUniqueId(this.editor.id);this._uniqueId=e.id;this.dropDown.set("content",f.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+v.string.substitute(this._template,e));f.startup();this._anchorInput=E.byId(this._uniqueId+"_anchorInput");this._textInput=E.byId(this._uniqueId+"_textInput");this._setButton=E.byId(this._uniqueId+"_setButton");this.connect(E.byId(this._uniqueId+"_cancelButton"),"onClick",function(){this.dropDown.onCancel()});
  this._anchorInput&&this.connect(this._anchorInput,"onChange","_checkInput");this._textInput&&this.connect(this._anchorInput,"onChange","_checkInput");this.editor.contentDomPreFilters.push(v.hitch(this,this._preDomFilter));this.editor.contentDomPostFilters.push(v.hitch(this,this._postDomFilter));this._setup()},updateState:function(){this.button.set("disabled",this.get("disabled"))},setEditor:function(c){this.editor=c;this._initButton()},_checkInput:function(){var c=!0;this._anchorInput.isValid()&&
  (c=!1);this._setButton.set("disabled",c)},_setup:function(){this.editor.onLoadDeferred.addCallback(v.hitch(this,function(){this.connect(this.editor.editNode,"ondblclick",this._onDblClick);setTimeout(v.hitch(this,function(){this._applyStyles()}),100)}))},getAnchorStyle:function(){var c=v.moduleUrl(L._scopeName,"editor/plugins/resources").toString();if(!c.match(/^https?:\/\//i)&&!c.match(/^file:\/\//i)){var e="/"===c.charAt(0)?v.doc.location.protocol+"//"+v.doc.location.host:this._calcBaseUrl(v.global.location.href);
  "/"!==e[e.length-1]&&"/"!==c.charAt(0)&&(e+="/");c=e+c}return"@media screen {\n\t.dijitEditorPluginInsertAnchorStyle {\n\t\tbackground-image: url({MODURL}/images/anchor.gif);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tborder-width: 1px;\n\t\tborder-style: dashed;\n\t\tborder-color: #D0D0D0;\n\t\tpadding-left: 20px;\n\t}\n}\n".replace(/\{MODURL\}/gi,c)},_applyStyles:function(){if(!this._styled)try{this._styled=!0;var c=this.editor.document,e=this.getAnchorStyle();if(v.isIE)c.createStyleSheet("").cssText=
  e;else{var f=c.createElement("style");f.appendChild(c.createTextNode(e));c.getElementsByTagName("head")[0].appendChild(f)}}catch(h){}},_calcBaseUrl:function(c){var e=null;null!==c&&(e=c.indexOf("?"),-1!=e&&(c=c.substring(0,e)),e=c.lastIndexOf("/"),e=0<e&&e<c.length?c.substring(0,e):c);return e},_checkValues:function(c){c&&(c.anchorInput&&(c.anchorInput=c.anchorInput.replace(/"/g,"\x26quot;")),c.textInput||(c.textInput="\x26nbsp;"));return c},setValue:function(c){this._onCloseDialog();if(!this.editor.window.getSelection){var e=
  E.range.getSelection(this.editor.window).getRangeAt(0).endContainer;3===e.nodeType&&(e=e.parentNode);e&&e.nodeName&&"a"!==e.nodeName.toLowerCase()&&(e=this.editor._sCall("getSelectedElement",["a"]));e&&e.nodeName&&"a"===e.nodeName.toLowerCase()&&this.editor.queryCommandEnabled("unlink")&&(this.editor._sCall("selectElementChildren",[e]),this.editor.execCommand("unlink"))}c=this._checkValues(c);this.editor.execCommand("inserthtml",v.string.substitute(this.htmlTemplate,c))},_onCloseDialog:function(){this.editor.focus()},
  _getCurrentValues:function(c){if(c&&"a"===c.tagName.toLowerCase()&&v.attr(c,"name")){var e=v.attr(c,"name");var f=c.textContent||c.innerText;this.editor._sCall("selectElement",[c,!0])}else f=this.editor._sCall("getSelectedText");return{anchorInput:e||"",textInput:f||""}},_onOpenDialog:function(){if(this.editor.window.getSelection)var c=this.editor._sCall("getAncestorElement",["a"]);else c=E.range.getSelection(this.editor.window).getRangeAt(0).endContainer,3===c.nodeType&&(c=c.parentNode),c&&c.nodeName&&
  "a"!==c.nodeName.toLowerCase()&&(c=this.editor._sCall("getSelectedElement",["a"]));this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(c))},_onDblClick:function(c){c&&c.target&&(c=c.target,"a"===(c.tagName?c.tagName.toLowerCase():"")&&v.attr(c,"name")&&(this.editor.onDisplayChanged(),this.editor._sCall("selectElement",[c]),setTimeout(v.hitch(this,function(){this.button.set("disabled",!1);this.button.openDropDown();this.button.dropDown.focus&&this.button.dropDown.focus()}),
  10)))},_preDomFilter:function(c){v.query("a[name]:not([href])",this.editor.editNode).addClass("dijitEditorPluginInsertAnchorStyle")},_postDomFilter:function(c){c&&v.query("a[name]:not([href])",c).removeClass("dijitEditorPluginInsertAnchorStyle");return c}});v.subscribe(E._scopeName+".Editor.getPlugin",null,function(c){if(!c.plugin){var e=c.args.name;e&&(e=e.toLowerCase());"insertanchor"===e&&(c.plugin=new G)}});return G})},"dojox/editor/plugins/Blockquote":function(){define("dojo dijit dojox dijit/_editor/_Plugin dijit/form/ToggleButton dojo/_base/connect dojo/_base/declare dojo/i18n dojo/i18n!dojox/editor/plugins/nls/Blockquote".split(" "),
  function(v,E,L,H){var G=v.declare("dojox.editor.plugins.Blockquote",H,{iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Blockquote");this.button=new E.form.ToggleButton({label:this._nlsResources.blockquote,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Blockquote",tabIndex:"-1",onClick:v.hitch(this,"_toggleQuote")})},setEditor:function(c){this.editor=c;this._initButton();this.connect(this.editor,
  "onNormalizedDisplayChanged","updateState");c.customUndo=!0},_toggleQuote:function(c){try{var e=this.editor;e.focus();var f=this.button.get("checked"),h=E.range.getSelection(e.window),l,p,n,u;h&&0<h.rangeCount&&(l=h.getRangeAt(0));if(l){e.beginEditing();if(f)if(l.startContainer===l.endContainer){if(this._isRootInline(l.startContainer)){for(n=l.startContainer;n&&n.parentNode!==e.editNode;)n=n.parentNode;for(;n&&n.previousSibling&&(this._isTextElement(n)||1===n.nodeType&&this._isInlineFormat(this._getTagName(n)));)n=
  n.previousSibling;n&&1===n.nodeType&&!this._isInlineFormat(this._getTagName(n))&&(n=n.nextSibling);if(n){var x=e.document.createElement("blockquote");v.place(x,n,"after");x.appendChild(n);for(u=x.nextSibling;u&&(this._isTextElement(u)||1===u.nodeType&&this._isInlineFormat(this._getTagName(u)));)x.appendChild(u),u=x.nextSibling}}else{for(var z=l.startContainer;(this._isTextElement(z)||this._isInlineFormat(this._getTagName(z))||"li"===this._getTagName(z))&&z!==e.editNode&&z!==e.document.body;)z=z.parentNode;
  z!==e.editNode&&z!==z.ownerDocument.documentElement&&(x=e.document.createElement("blockquote"),v.place(x,z,"after"),x.appendChild(z))}x&&(e._sCall("selectElementChildren",[x]),e._sCall("collapse",[!0]))}else{var b;n=l.startContainer;for(u=l.endContainer;n&&this._isTextElement(n)&&n.parentNode!==e.editNode;)n=n.parentNode;for(b=n;b.nextSibling&&e._sCall("inSelection",[b]);)b=b.nextSibling;u=b;if(u===e.editNode||u===e.document.body){x=e.document.createElement("blockquote");v.place(x,n,"after");var g=
  this._getTagName(n);if(this._isTextElement(n)||this._isInlineFormat(g))for(e=n;e&&(this._isTextElement(e)||1===e.nodeType&&this._isInlineFormat(this._getTagName(e)));)x.appendChild(e),e=x.nextSibling;else x.appendChild(n);return}u=u.nextSibling;for(b=n;b&&b!==u;){if(1===b.nodeType){if(g=this._getTagName(b),"br"!==g){if(!window.getSelection&&"p"===g&&this._isEmpty(b)){b=b.nextSibling;continue}this._isInlineFormat(g)?x||(x=e.document.createElement("blockquote"),v.place(x,b,"after")):(x&&this._isEmpty(x)&&
  x.parentNode.removeChild(x),x=e.document.createElement("blockquote"),v.place(x,b,"after"));x.appendChild(b);b=x}}else this._isTextElement(b)&&(x||(x=e.document.createElement("blockquote"),v.place(x,b,"after")),x.appendChild(b),b=x);b=b.nextSibling}x&&(this._isEmpty(x)?x.parentNode.removeChild(x):(e._sCall("selectElementChildren",[x]),e._sCall("collapse",[!0])),x=null)}else if(x=!1,l.startContainer===l.endContainer){for(p=l.endContainer;p&&p!==e.editNode&&p!==e.document.body;){if("blockquote"===(p.tagName?
  p.tagName.toLowerCase():"")){x=!0;break}p=p.parentNode}if(x){for(var A;p.firstChild;)A=p.firstChild,v.place(A,p,"before");p.parentNode.removeChild(p);A&&(e._sCall("selectElementChildren",[A]),e._sCall("collapse",[!0]))}}else{n=l.startContainer;for(u=l.endContainer;n&&this._isTextElement(n)&&n.parentNode!==e.editNode;)n=n.parentNode;for(l=[];n&&n.nextSibling&&e._sCall("inSelection",[n]);)n.parentNode&&"blockquote"===this._getTagName(n.parentNode)&&(n=n.parentNode),l.push(n),n=n.nextSibling;for(var N=
  this._findBlockQuotes(l);N.length;){var q=N.pop();if(q.parentNode){for(;q.firstChild;)v.place(q.firstChild,q,"before");q.parentNode.removeChild(q)}}}e.endEditing()}e.onNormalizedDisplayChanged()}catch(t){}},updateState:function(){var c=this.editor,e=this.get("disabled");if(c&&c.isLoaded&&this.button&&(this.button.set("disabled",e),!e)){e=!1;var f=E.range.getSelection(c.window);if(f&&0<f.rangeCount&&(f=f.getRangeAt(0)))var h=f.endContainer;for(;h&&h!==c.editNode&&h!==c.document;){if("blockquote"===
  (h.tagName?h.tagName.toLowerCase():"")){e=!0;break}h=h.parentNode}this.button.set("checked",e)}},_findBlockQuotes:function(c){var e=[];if(c){var f;for(f=0;f<c.length;f++){var h=c[f];1===h.nodeType&&("blockquote"===this._getTagName(h)&&e.push(h),h.childNodes&&0<h.childNodes.length&&(e=e.concat(this._findBlockQuotes(h.childNodes))))}}return e},_getTagName:function(c){var e="";c&&1===c.nodeType&&(e=c.tagName?c.tagName.toLowerCase():"");return e},_isRootInline:function(c){var e=this.editor;if(this._isTextElement(c)&&
  c.parentNode===e.editNode||1===c.nodeType&&this._isInlineFormat(c)&&c.parentNode===e.editNode)return!0;if(this._isTextElement(c)&&this._isInlineFormat(this._getTagName(c.parentNode))){for(c=c.parentNode;c&&c!==e.editNode&&this._isInlineFormat(this._getTagName(c));)c=c.parentNode;if(c===e.editNode)return!0}return!1},_isTextElement:function(c){return c&&3===c.nodeType||4===c.nodeType?!0:!1},_isEmpty:function(c){if(c.childNodes){var e=!0,f;for(f=0;f<c.childNodes.length;f++){var h=c.childNodes[f];if(1===
  h.nodeType){if("p"!==this._getTagName(h)||v.trim(h.innerHTML)){e=!1;break}}else if(this._isTextElement(h)){if((h=v.trim(h.nodeValue))&&"\x26nbsp;"!==h&&"\u00a0"!==h){e=!1;break}}else{e=!1;break}}return e}return!0},_isInlineFormat:function(c){switch(c){case "a":case "b":case "strong":case "s":case "strike":case "i":case "u":case "em":case "sup":case "sub":case "span":case "font":case "big":case "cite":case "q":case "img":case "small":return!0;default:return!1}}});v.subscribe(E._scopeName+".Editor.getPlugin",
  null,function(c){c.plugin||"blockquote"!==c.args.name.toLowerCase()||(c.plugin=new G({}))});return G})},"dojox/editor/plugins/UploadImage":function(){define("dojo dijit dojox dijit/_editor/_Plugin dojo/_base/connect dojo/_base/declare dojox/form/FileUploader dijit/_editor/_Plugin".split(" "),function(v,E,L,H){v.experimental("dojox.editor.plugins.UploadImage");var G=v.declare("dojox.editor.plugins.UploadImage",H,{tempImageUrl:"",iconClassPrefix:"editorIcon",useDefaultCommand:!1,uploadUrl:"",button:null,
  label:"Upload",setToolbar:function(c){this.button.destroy();this.createFileInput();c.addChild(this.button)},_initButton:function(){this.command="uploadImage";this.editor.commands[this.command]="Upload Image";this.inherited("_initButton",arguments);delete this.command},updateState:function(){this.button.set("disabled",this.get("disabled"))},createFileInput:function(){var c=v.create("span",{innerHTML:"."},document.body);v.style(c,{width:"40px",height:"20px",paddingLeft:"8px",paddingRight:"8px"});this.button=
  new L.form.FileUploader({isDebug:!0,uploadUrl:this.uploadUrl,uploadOnChange:!0,selectMultipleFiles:!1,baseClass:"dojoxEditorUploadNorm",hoverClass:"dojoxEditorUploadHover",activeClass:"dojoxEditorUploadActive",disabledClass:"dojoxEditorUploadDisabled"},c);this.connect(this.button,"onChange","insertTempImage");this.connect(this.button,"onComplete","onComplete")},onComplete:function(c,e,f){c=c[0];e=v.byId(this.currentImageId,this.editor.document);f=this.downloadPath?this.downloadPath+c.name:c.file;
  e.src=f;v.attr(e,"_djrealurl",f);c.width&&(e.width=c.width,e.height=c.height)},insertTempImage:function(){this.currentImageId="img_"+(new Date).getTime();this.editor.execCommand("inserthtml",'\x3cimg id\x3d"'+this.currentImageId+'" src\x3d"'+this.tempImageUrl+'" width\x3d"32" height\x3d"32"/\x3e')}});v.subscribe(E._scopeName+".Editor.getPlugin",null,function(c){if(!c.plugin)switch(c.args.name){case "uploadImage":c.plugin=new G({url:c.args.url})}});return G})},"dojox/form/FileUploader":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/window dojo/_base/sniff dojo/query dojo/dom dojo/dom-style dojo/dom-geometry dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-form dojo/_base/config dijit/_base/manager dojo/io/iframe dojo/_base/Color dojo/_base/unload dijit/_Widget dijit/_TemplatedMixin dijit/_Contained dojox/embed/Flash dojox/embed/flashVars dojox/html/styles".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u,x,z,b,g,A,N,q,t,B,F,Q,O,C){v.deprecated("dojox.form.FileUploader","Use dojox.form.Uploader","2.0");return E("dojox.form.FileUploader",[t,B,F],{swfPath:b.uploaderPath||require.toUrl("dojox/form/resources/fileuploader.swf"),templateString:'\x3cdiv\x3e\x3cdiv dojoAttachPoint\x3d"progNode"\x3e\x3cdiv dojoAttachPoint\x3d"progTextNode"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv dojoAttachPoint\x3d"insideNode" class\x3d"uploaderInsideNode"\x3e\x3c/div\x3e\x3c/div\x3e',uploadUrl:"",
  isDebug:!1,devMode:!1,baseClass:"dojoxUploaderNorm",hoverClass:"dojoxUploaderHover",activeClass:"dojoxUploaderActive",disabledClass:"dojoxUploaderDisabled",force:"",uploaderType:"",flashObject:null,flashMovie:null,insideNode:null,deferredUploading:1,fileListId:"",uploadOnChange:!1,selectMultipleFiles:!0,htmlFieldName:"uploadedfile",flashFieldName:"flashUploadFiles",fileMask:null,minFlashVersion:9,tabIndex:-1,showProgress:!1,progressMessage:"Loading",progressBackgroundUrl:require.toUrl("dijit/themes/tundra/images/buttonActive.png"),
  progressBackgroundColor:"#ededed",progressWidgetId:"",skipServerCheck:!1,serverTimeout:5E3,log:function(){this.isDebug&&console.log(Array.prototype.slice.call(arguments).join(" "))},constructor:function(){this._subs=[]},postMixInProperties:function(){this.fileList=[];this._cons=[];this.fileMask=this.fileMask||[];this.fileInputs=[];this.fileCount=0;this._disabled=this.flashReady=!1;this.force=this.force.toLowerCase();this.uploaderType=(Q.available>=this.minFlashVersion||"flash"==this.force)&&"html"!=
  this.force?"flash":"html";this.deferredUploading=!0===this.deferredUploading?1:this.deferredUploading;this._refNode=this.srcNodeRef;this.getButtonStyle()},startup:function(){},postCreate:function(){this.inherited(arguments);this.setButtonStyle();if("flash"==this.uploaderType)var m="createFlashUploader";else this.uploaderType="html",m="createHtmlUploader";this[m]();this.fileListId&&this.connect(h.byId(this.fileListId),"click",function(k){k=k.target.parentNode.parentNode.parentNode;k.id&&-1<k.id.indexOf("file_")&&
  this.removeFile(k.id.split("file_")[1])});q.addOnUnload(this,this.destroy)},getHiddenNode:function(m){if(!m)return null;var k=null;for(m=m.parentNode;m&&"body"!=m.tagName.toLowerCase();){if("none"==l.get(m,"display")){k=m;break}m=m.parentNode}return k},getButtonStyle:function(){var m=this.srcNodeRef;(this._hiddenNode=this.getHiddenNode(m))&&l.set(this._hiddenNode,"display","block");if(!m&&this.button&&this.button.domNode){var k=!0;m=this.button.domNode.className+" dijitButtonNode";var D=this.getText(f(".dijitButtonText",
  this.button.domNode)[0]);this.srcNodeRef=m=x.place('\x3cbutton id\x3d"'+this.button.id+'" class\x3d"'+m+'"\x3e'+D+"\x3c/button\x3e",this.button.domNode,"after");this.button.destroy();this.baseClass="dijitButton";this.hoverClass="dijitButtonHover";this.pressClass="dijitButtonActive";this.disabledClass="dijitButtonDisabled"}else!this.srcNodeRef&&this.button&&(m=this.button);n.get(m,"class")&&(this.baseClass+=" "+n.get(m,"class"));n.set(m,"class",this.baseClass);this.norm=this.getStyle(m);this.width=
  this.norm.w;this.height=this.norm.h;"flash"==this.uploaderType?(this.over=this.getTempNodeStyle(m,this.baseClass+" "+this.hoverClass,k),this.down=this.getTempNodeStyle(m,this.baseClass+" "+this.activeClass,k),this.dsbl=this.getTempNodeStyle(m,this.baseClass+" "+this.disabledClass,k),this.fhtml={cn:this.getText(m),nr:this.norm,ov:this.over,dn:this.down,ds:this.dsbl}):(this.fhtml={cn:this.getText(m),nr:this.norm},"middle"==this.norm.va&&(this.norm.lh=this.norm.h));this.devMode&&(this.log("classes - base:",
  this.baseClass," hover:",this.hoverClass,"active:",this.activeClass),this.log("fhtml:",this.fhtml),this.log("norm:",this.norm),this.log("over:",this.over),this.log("down:",this.down))},setButtonStyle:function(){l.set(this.domNode,{width:this.fhtml.nr.w+"px",height:this.fhtml.nr.h+"px",padding:"0px",lineHeight:"normal",position:"relative"});"html"==this.uploaderType&&"middle"==this.norm.va&&l.set(this.domNode,"lineHeight",this.norm.lh+"px");this.showProgress?(this.progTextNode.innerHTML=this.progressMessage,
  l.set(this.progTextNode,{width:this.fhtml.nr.w+"px",height:this.fhtml.nr.h+0+"px",padding:"0px",margin:"0px",left:"0px",lineHeight:this.fhtml.nr.h+0+"px",position:"absolute"}),l.set(this.progNode,{width:this.fhtml.nr.w+"px",height:this.fhtml.nr.h+0+"px",padding:"0px",margin:"0px",left:"0px",position:"absolute",display:"none",backgroundImage:"url("+this.progressBackgroundUrl+")",backgroundPosition:"bottom",backgroundRepeat:"repeat-x",backgroundColor:this.progressBackgroundColor})):x.destroy(this.progNode);
  l.set(this.insideNode,{position:"absolute",top:"0px",left:"0px",display:""});u.add(this.domNode,this.srcNodeRef.className);-1<this.fhtml.nr.d.indexOf("inline")&&u.add(this.domNode,"dijitInline");try{this.insideNode.innerHTML=this.fhtml.cn}catch(k){if("flash"==this.uploaderType){this.insideNode=this.insideNode.parentNode.removeChild(this.insideNode);c.body().appendChild(this.insideNode);this.insideNode.innerHTML=this.fhtml.cn;var m=G.connect(this,"onReady",this,function(){G.disconnect(m);this.insideNode=
  this.insideNode.parentNode.removeChild(this.insideNode);this.domNode.appendChild(this.insideNode)})}else this.insideNode.appendChild(document.createTextNode(this.fhtml.cn))}this._hiddenNode&&l.set(this._hiddenNode,"display","none")},onChange:function(m){},onProgress:function(m){},onComplete:function(m){},onCancel:function(){},onError:function(m){},onReady:function(m){},onLoad:function(m){},submit:function(m){m=m?z.toObject(m):null;this.upload(m);return!1},upload:function(m){if(!this.fileList.length)return!1;
  if(!this.uploadUrl)return console.warn("uploadUrl not provided. Aborting."),!1;this.showProgress||this.set("disabled",!0);if(this.progressWidgetId){var k=g.byId(this.progressWidgetId).domNode;"none"==l.get(k,"display")&&(this.restoreProgDisplay="none",l.set(k,"display","block"));"hidden"==l.get(k,"visibility")&&(this.restoreProgDisplay="hidden",l.set(k,"visibility","visible"))}m&&!m.target&&(this.postData=m);this.log("upload type:",this.uploaderType," - postData:",this.postData);for(m=0;m<this.fileList.length;m++)k=
  this.fileList[m],k.bytesLoaded=0,k.bytesTotal=k.size||1E5,k.percent=0;"flash"==this.uploaderType?this.uploadFlash():this.uploadHTML();return!1},removeFile:function(m,k){var D;for(D=0;D<this.fileList.length;D++)if(this.fileList[D].name==m){k||this.fileList.splice(D,1);break}"flash"==this.uploaderType?this.flashMovie.removeFile(m):k||(x.destroy(this.fileInputs[D]),this.fileInputs.splice(D,1),this._renumberInputs());this.fileListId&&x.destroy("file_"+m)},destroy:function(){"flash"!=this.uploaderType||
  this.flashMovie?(H.forEach(this._subs,G.unsubscribe,dojo),H.forEach(this._cons,G.disconnect,dojo),this.scrollConnect&&G.disconnect(this.scrollConnect),"flash"==this.uploaderType?(this.flashObject.destroy(),delete this.flashObject):(x.destroy(this._fileInput),x.destroy(this._formNode)),this.inherited(arguments)):this._cons.push(G.connect(this,"onLoad",this,"destroy"))},_displayProgress:function(m){!0===m?("flash"==this.uploaderType?l.set(this.insideNode,"top","-2500px"):l.set(this.insideNode,"display",
  "none"),l.set(this.progNode,"display","")):!1===m?(l.set(this.insideNode,{display:"",top:"0"}),l.set(this.progNode,"display","none")):l.set(this.progNode,"width",m*this.fhtml.nr.w+"px")},_animateProgress:function(){this._displayProgress(!0);var m=!1,k=G.connect(this,"_complete",function(){G.disconnect(k);m=!0}),D=0,J=setInterval(L.hitch(this,function(){D+=5;D>this.fhtml.nr.w&&(D=0,m=!0);this._displayProgress(D/this.fhtml.nr.w);m&&(clearInterval(J),setTimeout(L.hitch(this,function(){this._displayProgress(!1)}),
  500))}),50)},_error:function(m){"string"==typeof m&&(m=Error(m));this.onError(m)},_addToFileList:function(){if(this.fileListId){var m="";H.forEach(this.fileList,function(k){m+='\x3ctable id\x3d"file_'+k.name+'" class\x3d"fileToUpload"\x3e\x3ctr\x3e\x3ctd class\x3d"fileToUploadClose"\x3e\x3c/td\x3e\x3ctd class\x3d"fileToUploadName"\x3e'+k.name+'\x3c/td\x3e\x3ctd class\x3d"fileToUploadSize"\x3e'+(k.size?Math.ceil(.001*k.size)+"kb":"")+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"},this);h.byId(this.fileListId).innerHTML=
  m}},_change:function(m){e("ie")&&H.forEach(m,function(k){k.name=k.name.split("\\")[k.name.split("\\").length-1]});this.selectMultipleFiles?this.fileList=this.fileList.concat(m):(this.fileList[0]&&this.removeFile(this.fileList[0].name,!0),this.fileList=m);this._addToFileList();this.onChange(m);this.uploadOnChange?("html"==this.uploaderType&&this._buildFileInput(),this.upload()):"html"==this.uploaderType&&this.selectMultipleFiles&&(this._buildFileInput(),this._connectInput())},_complete:function(m){m=
  L.isArray(m)?m:[m];H.forEach(m,function(k){k.ERROR&&this._error(k.ERROR)},this);H.forEach(this.fileList,function(k){k.bytesLoaded=1;k.bytesTotal=1;k.percent=100;this._progress(k)},this);H.forEach(this.fileList,function(k){this.removeFile(k.name,!0)},this);this.onComplete(m);this.fileList=[];this._resetHTML();this.set("disabled",!1);this.restoreProgDisplay&&setTimeout(L.hitch(this,function(){l.set(g.byId(this.progressWidgetId).domNode,"none"==this.restoreProgDisplay?"display":"visibility",this.restoreProgDisplay)}),
  500)},_progress:function(m){for(var k=0,D=0,J=0;J<this.fileList.length;J++){var a=this.fileList[J];a.name==m.name&&(a.bytesLoaded=m.bytesLoaded,a.bytesTotal=m.bytesTotal,a.percent=Math.ceil(a.bytesLoaded/a.bytesTotal*100),this.log(a.name,"percent:",a.percent));D+=Math.ceil(.001*a.bytesLoaded);k+=Math.ceil(.001*a.bytesTotal)}m=Math.ceil(D/k*100);this.progressWidgetId&&g.byId(this.progressWidgetId).update({progress:m+"%"});this.showProgress&&this._displayProgress(.01*m);this.onProgress(this.fileList)},
  _getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(m){if(this._disabled!=m){if("flash"==this.uploaderType){if(!this.flashReady){var k=G.connect(this,"onLoad",this,function(){G.disconnect(k);this._setDisabledAttr(m)});return}this._disabled=m;this.flashMovie.doDisable(m)}else this._disabled=m,l.set(this._fileInput,"display",this._disabled?"none":"");u.toggle(this.domNode,this.disabledClass,m)}},_onFlashBlur:function(){this.flashMovie.blur();if(!this.nextFocusObject&&this.tabIndex)for(var m=
  f("[tabIndex]"),k=0;k<m.length;k++)if(m[k].tabIndex>=Number(this.tabIndex)+1){this.nextFocusObject=m[k];break}this.nextFocusObject.focus()},_disconnect:function(){H.forEach(this._cons,G.disconnect,dojo)},uploadHTML:function(){this.selectMultipleFiles&&x.destroy(this._fileInput);this._setHtmlPostData();this.showProgress&&this._animateProgress();A.send({url:this.uploadUrl.toString(),form:this._formNode,handleAs:"json",error:L.hitch(this,function(m){this._error("HTML Upload Error:"+m.message)}),load:L.hitch(this,
  function(m,k,D){this._complete(m)})})},createHtmlUploader:function(){this._buildForm();this._setFormStyle();this._buildFileInput();this._connectInput();this._styleContent();l.set(this.insideNode,"visibility","visible");this.onReady()},_connectInput:function(){this._disconnect();this._cons.push(G.connect(this._fileInput,"mouseover",this,function(m){u.add(this.domNode,this.hoverClass);this.onMouseOver(m)}));this._cons.push(G.connect(this._fileInput,"mouseout",this,function(m){setTimeout(L.hitch(this,
  function(){u.remove(this.domNode,this.activeClass);u.remove(this.domNode,this.hoverClass);this.onMouseOut(m);this._checkHtmlCancel("off")}),0)}));this._cons.push(G.connect(this._fileInput,"mousedown",this,function(m){u.add(this.domNode,this.activeClass);u.remove(this.domNode,this.hoverClass);this.onMouseDown(m)}));this._cons.push(G.connect(this._fileInput,"mouseup",this,function(m){u.remove(this.domNode,this.activeClass);this.onMouseUp(m);this.onClick(m);this._checkHtmlCancel("up")}));this._cons.push(G.connect(this._fileInput,
  "change",this,function(){this._checkHtmlCancel("change");var m=this._fileInput.value;m?this._change([{name:m,type:"",size:0}]):this._change([])}));0<=this.tabIndex&&n.set(this.domNode,"tabIndex",this.tabIndex)},_checkHtmlCancel:function(m){"change"==m&&(this.dialogIsOpen=!1);"up"==m&&(this.dialogIsOpen=!0);if("off"==m){if(this.dialogIsOpen)this.onCancel();this.dialogIsOpen=!1}},_styleContent:function(){var m=this.fhtml.nr;l.set(this.insideNode,{width:m.w+"px",height:"middle"==m.va?m.h+"px":"auto",
  textAlign:m.ta,paddingTop:m.p[0]+"px",paddingRight:m.p[1]+"px",paddingBottom:m.p[2]+"px",paddingLeft:m.p[3]+"px"});try{l.set(this.insideNode,"lineHeight","inherit")}catch(k){}},_resetHTML:function(){"html"==this.uploaderType&&this._formNode&&(this.fileInputs=[],f("*",this._formNode).forEach(function(m){x.destroy(m)}),this.fileCount=0,this._buildFileInput(),this._connectInput())},_buildForm:function(){this._formNode||(9>e("ie")||e("ie")&&e("quirks")?(this._formNode=document.createElement('\x3cform enctype\x3d"multipart/form-data" method\x3d"post"\x3e'),
  this._formNode.encoding="multipart/form-data",this._formNode.id=g.getUniqueId("FileUploaderForm"),this.domNode.appendChild(this._formNode)):this._formNode=x.create("form",{enctype:"multipart/form-data",method:"post",id:g.getUniqueId("FileUploaderForm")},this.domNode))},_buildFileInput:function(){this._fileInput&&(this._disconnect(),this._fileInput.id+=this.fileCount,l.set(this._fileInput,"display","none"));this._fileInput=document.createElement("input");this.fileInputs.push(this._fileInput);var m=
  this.htmlFieldName;this.selectMultipleFiles&&(m+=this.fileCount,this.fileCount++);n.set(this._fileInput,{id:this.id,name:m,type:"file"});u.add(this._fileInput,"dijitFileInputReal");this._formNode.appendChild(this._fileInput);m=p.getMarginBox(this._fileInput);l.set(this._fileInput,{position:"relative",left:this.fhtml.nr.w-m.w+"px",opacity:0})},_renumberInputs:function(){if(this.selectMultipleFiles){var m;this.fileCount=0;H.forEach(this.fileInputs,function(k){m=this.htmlFieldName+this.fileCount;this.fileCount++;
  n.set(k,"name",m)},this)}},_setFormStyle:function(){C.insertCssRule("#"+this._formNode.id+" input","font-size:"+Math.max(2,Math.max(Math.ceil(this.fhtml.nr.w/60),Math.ceil(this.fhtml.nr.h/15)))+"em");l.set(this.domNode,{overflow:"hidden",position:"relative"});l.set(this.insideNode,"position","absolute")},_setHtmlPostData:function(){if(this.postData)for(var m in this.postData)x.create("input",{type:"hidden",name:m,value:this.postData[m]},this._formNode)},uploadFlash:function(){try{if(this.showProgress){this._displayProgress(!0);
  var m=G.connect(this,"_complete",this,function(){G.disconnect(m);this._displayProgress(!1)})}var k={},D;for(D in this.postData)k[D]=this.postData[D];this.flashMovie.doUpload(k)}catch(J){this._error("FileUploader - Sorry, the SWF failed to initialize."+J)}},createFlashUploader:function(){if(this.uploadUrl=this.uploadUrl.toString())if(0>this.uploadUrl.toLowerCase().indexOf("http")&&0!=this.uploadUrl.indexOf("/")){var m=window.location.href.split("/");m.pop();m=m.join("/")+"/";this.uploadUrl=m+this.uploadUrl;
  this.log("SWF Fixed - Relative loc:",m," abs loc:",this.uploadUrl)}else this.log("SWF URL unmodified:",this.uploadUrl);else console.warn("Warning: no uploadUrl provided.");m={expressInstall:!0,path:this.swfPath.uri||this.swfPath,width:this.fhtml.nr.w,height:this.fhtml.nr.h,allowScriptAccess:"always",allowNetworking:"all",vars:{uploadDataFieldName:this.flashFieldName,uploadUrl:this.uploadUrl,uploadOnSelect:this.uploadOnChange,deferredUploading:this.deferredUploading||0,selectMultipleFiles:this.selectMultipleFiles,
  id:this.id,isDebug:this.isDebug,devMode:this.devMode,flashButton:O.serialize("fh",this.fhtml),fileMask:O.serialize("fm",this.fileMask),noReturnCheck:this.skipServerCheck,serverTimeout:this.serverTimeout},params:{scale:"noscale",wmode:"opaque",allowScriptAccess:"always",allowNetworking:"all"}};this.flashObject=new Q(m,this.insideNode);this.flashObject.onError=L.hitch(function(k){this._error("Flash Error: "+k)});this.flashObject.onReady=L.hitch(this,function(){l.set(this.insideNode,"visibility","visible");
  this.log("FileUploader flash object ready");this.onReady(this)});this.flashObject.onLoad=L.hitch(this,function(k){this.flashMovie=k;this.flashReady=!0;this.onLoad(this)});this._connectFlash()},_connectFlash:function(){this._doSub("/filesSelected","_change");this._doSub("/filesUploaded","_complete");this._doSub("/filesProgress","_progress");this._doSub("/filesError","_error");this._doSub("/filesCanceled","onCancel");this._doSub("/stageBlur","_onFlashBlur");this._doSub("/up","onMouseUp");this._doSub("/down",
  "onMouseDown");this._doSub("/over","onMouseOver");this._doSub("/out","onMouseOut");this.connect(this.domNode,"focus",function(){this.flashMovie.focus();this.flashMovie.doFocus()});0<=this.tabIndex&&n.set(this.domNode,"tabIndex",this.tabIndex)},_doSub:function(m,k){this._subs.push(G.subscribe(this.id+m,this,k))},urlencode:function(m){return m&&"none"!=m?m.replace(/:/g,"||").replace(/\./g,"^^").replace("url(","").replace(")","").replace(/'/g,"").replace(/"/g,""):!1},isButton:function(m){m=m.tagName.toLowerCase();
  return"button"==m||"input"==m},getTextStyle:function(m){var k={};k.ff=l.get(m,"fontFamily");if(k.ff){k.ff=k.ff.replace(", ",",");k.ff=k.ff.replace(/"|'/g,"");k.ff="sans-serif"==k.ff?"Arial":k.ff;k.fw=l.get(m,"fontWeight");k.fi=l.get(m,"fontStyle");k.fs=parseInt(l.get(m,"fontSize"),10);if(-1<l.get(m,"fontSize").indexOf("%"))for(var D=m;D.tagName;){if(-1==l.get(D,"fontSize").indexOf("%")){k.fs=parseInt(l.get(D,"fontSize"),10);break}"body"==D.tagName.toLowerCase()&&(k.fs=.16*parseInt(l.get(D,"fontSize"),
  10));D=D.parentNode}k.fc=(new N(l.get(m,"color"))).toHex();k.fc=parseInt(k.fc.substring(1,Infinity),16)}k.lh=l.get(m,"lineHeight");k.ta=l.get(m,"textAlign");k.ta="start"!=k.ta&&k.ta?k.ta:"left";k.va=this.isButton(m)?"middle":k.lh==k.h?"middle":l.get(m,"verticalAlign");return k},getText:function(m){m=L.trim(m.innerHTML);-1<m.indexOf("\x3c")&&(m=escape(m));return m},getStyle:function(m){var k={},D=p.getContentBox(m),J=p.getPadExtents(m);k.p=[J.t,J.w-J.l,J.h-J.t,J.l];k.w=D.w+J.w;k.h=D.h+J.h;k.d=l.get(m,
  "display");D=new N(l.get(m,"backgroundColor"));k.bc=0==D.a?"#ffffff":D.toHex();k.bc=parseInt(k.bc.substring(1,Infinity),16);if(D=this.urlencode(l.get(m,"backgroundImage")))k.bi={url:D,rp:l.get(m,"backgroundRepeat"),pos:escape(l.get(m,"backgroundPosition"))},k.bi.pos||(D=l.get(m,"backgroundPositionX"),J=l.get(m,"backgroundPositionY"),k.bi.pos=escape(("left"==D?"0%":"right"==D?"100%":D)+" "+("top"==J?"0%":"bottom"==J?"100%":J)));return L.mixin(k,this.getTextStyle(m))},getTempNodeStyle:function(m,k,
  D){if(D){D=x.place("\x3c"+m.tagName+"\x3e\x3cspan\x3e"+m.innerHTML+"\x3c/span\x3e\x3c/"+m.tagName+"\x3e",m.parentNode);var J=D.firstChild;u.add(J,m.className);u.add(D,k);m=this.getStyle(J)}else D=x.place("\x3c"+m.tagName+"\x3e"+m.innerHTML+"\x3c/"+m.tagName+"\x3e",m.parentNode),u.add(D,m.className),u.add(D,k),D.id=m.id,m=this.getStyle(D);x.destroy(D);return m}})})},"dojo/io/iframe":function(){define("../_base/config ../_base/json ../_base/kernel ../_base/lang ../_base/xhr ../sniff ../_base/window ../dom ../dom-construct ../query require ../aspect ../request/iframe".split(" "),
  function(v,E,L,H,G,c,e,f,h,l,p,n,u){L.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");c=u._iframeName;c=c.substring(0,c.lastIndexOf("_"));var x=H.delegate(u,{create:function(){return x._frame=u.create.apply(u,arguments)},get:null,post:null,send:function(z){var b=G._ioSetArgs(z,function(B){t&&t.cancel()},function(B){var F=null;B=B.ioArgs;try{var Q=B.handleAs;"xml"===Q||"html"===Q?F=t.response.data:(F=t.response.text,"json"===Q?F=E.fromJson(F):"javascript"===Q&&(F=L.eval(F)))}catch(O){F=
  O}return F},function(B,F){F.ioArgs._hasError=!0;return B}),g=b.ioArgs,A="GET",N=f.byId(z.form);z.method&&"POST"===z.method.toUpperCase()&&N&&(A="POST");z={method:A,handleAs:"json"===z.handleAs||"javascript"===z.handleAs?"text":z.handleAs,form:z.form,query:N?null:z.content,data:N?z.content:null,timeout:z.timeout,ioArgs:g};z.method&&(z.method=z.method.toUpperCase());if(v.ioPublish&&L.publish&&!1!==g.args.ioPublish)var q=n.after(u,"_notifyStart",function(B){B.options.ioArgs===g&&(q.remove(),G._ioNotifyStart(b))},
  !0);var t=u(g.url,z,!0);g._callNext=t._callNext;t.then(function(){b.resolve(b)}).otherwise(function(B){b.ioArgs.error=B;b.reject(B)});return b},_iframeOnload:e.global[c+"_onload"]});H.setObject("dojo.io.iframe",x);return x})},"dojox/embed/Flash":function(){define("dojo/_base/lang dojo/_base/unload dojo/_base/array dojo/query dojo/has dojo/dom dojo/on dojo/window dojo/string".split(" "),function(v,E,L,H,G,c,e,f,h){function l(b){b=v.delegate(n,b);if(!("path"in b))return console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided."),
  null;"id"in b||(b.id="dojox-embed-flash-"+p++);return b}var p=0,n={expressInstall:!1,width:320,height:240,swLiveConnect:"true",allowScriptAccess:"sameDomain",allowNetworking:"all",style:null,redirect:null};if(G("ie")){var u=function(b){b=l(b);if(!b)return null;var g,A=b.path;if(b.vars){var N=[];for(g in b.vars)N.push(encodeURIComponent(g)+"\x3d"+encodeURIComponent(b.vars[g]));b.params.FlashVars=N.join("\x26");delete b.vars}A='\x3cobject id\x3d"'+h.escape(String(b.id))+'" classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width\x3d"'+
  h.escape(String(b.width))+'" height\x3d"'+h.escape(String(b.height))+'"'+(b.style?' style\x3d"'+h.escape(String(b.style))+'"':"")+'\x3e\x3cparam name\x3d"movie" value\x3d"'+h.escape(String(A))+'" /\x3e';if(b.params)for(g in b.params)A+='\x3cparam name\x3d"'+h.escape(g)+'" value\x3d"'+h.escape(String(b.params[g]))+'" /\x3e';return{id:b.id,markup:A+"\x3c/object\x3e"}};var x=function(){for(var b=10,g=null;!g&&7<b;)try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b--)}catch(A){}return g?(b=g.GetVariable("$version").split(" ")[1].split(","),
  {major:null!=b[0]?parseInt(b[0]):0,minor:null!=b[1]?parseInt(b[1]):0,rev:null!=b[2]?parseInt(b[2]):0}):{major:0,minor:0,rev:0}}();E.addOnWindowUnload(function(){console.warn("***************UNLOAD");var b=function(){};H("object").reverse().style("display","none").forEach(function(g){for(var A in g)if("FlashVars"!=A&&"function"==typeof g[A])try{g[A]=b}catch(N){}})})}else u=function(b){b=l(b);if(!b)return null;var g,A=b.path;if(b.vars){var N=[];for(g in b.vars)N.push(encodeURIComponent(g)+"\x3d"+encodeURIComponent(b.vars[g]));
  b.params.flashVars=N.join("\x26");delete b.vars}A='\x3cembed type\x3d"application/x-shockwave-flash" src\x3d"'+h.escape(String(A))+'" id\x3d"'+h.escape(String(b.id))+'" width\x3d"'+h.escape(String(b.width))+'" height\x3d"'+h.escape(String(b.height))+'"'+(b.style?' style\x3d"'+h.escape(String(b.style))+'" ':"")+'pluginspage\x3d"'+window.location.protocol+'//www.adobe.com/go/getflashplayer" ';if(b.params)for(g in b.params)A+=" "+h.escape(g)+'\x3d"'+h.escape(String(b.params[g]))+'"';return{id:b.id,markup:A+
  " /\x3e"}},x=function(){var b=navigator.plugins["Shockwave Flash"];return b&&b.description?(b=b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."),{major:null!=b[0]?parseInt(b[0]):0,minor:null!=b[1]?parseInt(b[1]):0,rev:null!=b[2]?parseInt(b[2]):0}):{major:0,minor:0,rev:0}}();var z=function(b,g){if(-1<location.href.toLowerCase().indexOf("file://"))throw Error("dojox.embed.Flash can't be run directly from a file. To instatiate the required SWF correctly it must be run from a server, like localHost.");
  this.available=x.major;this.minimumVersion=b.minimumVersion||9;this.domNode=this.movie=this.id=null;g&&(g=c.byId(g));setTimeout(v.hitch(this,function(){if(b.expressInstall||this.available&&this.available>=this.minimumVersion)if(b&&g)this.init(b,g);else this.onError("embed.Flash was not provided with the proper arguments.");else if(this.available)this.onError("Flash version detected: "+this.available+" is out of date. Minimum required: "+this.minimumVersion);else this.onError("Flash is not installed.")}),
  100)};v.extend(z,{onReady:function(b){},onLoad:function(b){},onError:function(b){},_onload:function(){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;this.onLoad(this.movie)},init:function(b,g){this.destroy();g=c.byId(g||this.domNode);if(!g)throw Error("dojox.embed.Flash: no domNode reference has been passed.");var A=0;this._poller=null;this._pollCount=0;this._pollMax=15;this.pollTime=100;z.initialized&&(this.id=z.place(b,g),this.domNode=g,setTimeout(v.hitch(this,
  function(){this.movie=this.byId(this.id,b.doc);this.onReady(this.movie);this._poller=setInterval(v.hitch(this,function(){try{A=this.movie.PercentLoaded()}catch(N){console.warn("this.movie.PercentLoaded() failed",N,this.movie)}if(100==A)this._onload();else if(0==A&&this._pollCount++>this._pollMax)throw clearInterval(this._poller),Error("Building SWF failed.");}),this.pollTime)}),1))},_destroy:function(){try{this.domNode.removeChild(this.movie)}catch(b){}this.id=this.movie=this.domNode=null},destroy:function(){if(this.movie){var b=
  v.delegate({id:!0,movie:!0,domNode:!0,onReady:!0,onLoad:!0}),g;for(g in this)b[g]||delete this[g];this._poller?e(this,"Load",this,"_destroy"):this._destroy()}},byId:function(b,g){g=g||document;return g.embeds[b]?g.embeds[b]:g[b]?g[b]:window[b]?window[b]:document[b]?document[b]:null}});v.mixin(z,{minSupported:8,available:x.major,supported:x.major>=x.required,minimumRequired:x.required,version:x,initialized:!1,onInitialize:function(){z.initialized=!0},__ie_markup__:function(b){return u(b)},proxy:function(b,
  g){L.forEach(g instanceof Array?g:[g],function(A){this[A]=v.hitch(this,function(){return function(){return eval(this.movie.CallFunction('\x3cinvoke name\x3d"'+A+'" returntype\x3d"javascript"\x3e\x3carguments\x3e'+L.map(arguments,function(N){return __flash__toXML(N)}).join("")+"\x3c/arguments\x3e\x3c/invoke\x3e"))}.apply(this,arguments||[])})},b)}});z.place=function(b,g){b=u(b);g=c.byId(g);g||(g=f.doc.createElement("div"),g.id=b.id+"-container",f.body().appendChild(g));return b?(g.innerHTML=b.markup,
  b.id):null};z.onInitialize();v.setObject("dojox.embed.Flash",z);return z})},"dojox/embed/flashVars":function(){define(["dojo"],function(v){v.deprecated("dojox.embed.flashVars","Will be removed in 2.0","2.0");var E={serialize:function(L,H){var G=function(h){"string"==typeof h&&(h=h.replace(/;/g,"_sc_"),h=h.replace(/\./g,"_pr_"),h=h.replace(/:/g,"_cl_"));return h},c=dojox.embed.flashVars.serialize,e="";if(v.isArray(H)){for(var f=0;f<H.length;f++)e+=c(L+"."+f,G(H[f]))+";";return e.replace(/;{2,}/g,";")}if(v.isObject(H)){for(f in H)e+=
  c(L+"."+f,G(H[f]))+";";return e.replace(/;{2,}/g,";")}return L+":"+H}};v.setObject("dojox.embed.flashVars",E);return E})},"dojox/html/styles":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,E,L,H){var G=v.getObject("dojox.html",!0),c={},e={},f=[];G.insertCssRule=function(h,l,p){p=G.getDynamicStyleSheet(p);var n=h+" {"+l+"}";console.log("insertRule:",n);H("ie")?(p.cssText+=n,console.log("ss.cssText:",p.cssText)):p.sheet?p.sheet.insertRule(n,
  p._indicies.length):p.appendChild(L.doc.createTextNode(n));p._indicies.push(h+" "+l);return h};G.removeCssRule=function(h,l,p){var n=-1,u,x;for(u in c)if(!p||p===u){var z=c[u];for(x=0;x<z._indicies.length;x++)if(h+" "+l===z._indicies[x]){n=x;break}if(-1<n)break}if(!z)return console.warn("No dynamic style sheet has been created from which to remove a rule."),!1;if(-1===n)return console.warn("The css rule was not found and could not be removed."),!1;z._indicies.splice(n,1);H("ie")?z.removeRule(n):z.sheet&&
  z.sheet.deleteRule(n);return!0};G.modifyCssRule=function(h,l,p){};G.getStyleSheet=function(h){if(c[h||"default"])return c[h||"default"];if(!h)return!1;var l=G.getStyleSheets();if(l[h])return G.getStyleSheets()[h];for(var p in l)if(l[p].href&&-1<l[p].href.indexOf(h))return l[p];return!1};G.getDynamicStyleSheet=function(h){h||(h="default");c[h]||(L.doc.createStyleSheet?(c[h]=L.doc.createStyleSheet(),9>H("ie")&&(c[h].title=h)):(c[h]=L.doc.createElement("style"),c[h].setAttribute("type","text/css"),L.doc.getElementsByTagName("head")[0].appendChild(c[h]),
  console.log(h," ss created: ",c[h].sheet)),c[h]._indicies=[]);return c[h]};G.enableStyleSheet=function(h){if(h=G.getStyleSheet(h))h.sheet?h.sheet.disabled=!1:h.disabled=!1};G.disableStyleSheet=function(h){if(h=G.getStyleSheet(h))h.sheet?h.sheet.disabled=!0:h.disabled=!0};G.activeStyleSheet=function(h){var l=G.getToggledStyleSheets(),p;if(1===arguments.length)E.forEach(l,function(n){n.disabled=n.title===h?!1:!0});else for(p=0;p<l.length;p++)if(!1===l[p].disabled)return l[p];return!0};G.getPreferredStyleSheet=
  function(){};G.getToggledStyleSheets=function(){var h;if(!f.length){var l=G.getStyleSheets();for(h in l)l[h].title&&f.push(l[h])}return f};G.getStyleSheets=function(){if(e.collected)return e;E.forEach(L.doc.styleSheets,function(h){var l=h.sheet?h.sheet:h;h=l.title||l.href;if(H("ie"))-1===l.cssText.indexOf("#default#VML")&&(l.href?e[h]=l:l.imports.length?E.forEach(l.imports,function(p){e[p.title||p.href]=p}):e[h]=l);else{e[h]=l;e[h].id=l.ownerNode.id;h=[];try{h=l[l.cssRules?"cssRules":"rules"]}catch(p){console.warn("Reading css rules from stylesheet "+
  l.href+" is forbidden due to same-origin policy. See http://www.w3.org/TR/CSP/#cascading-style-sheet-css-parsing",l)}E.forEach(h,function(p){p.href&&(e[p.href]=p.styleSheet,e[p.href].id=l.ownerNode.id)})}});e.collected=!0;return e};return G})},"widgets/GroupFilter/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/GroupFilter/setting/presetValuePicker.html":'\x3cdiv\x3e\r\n\t\x3cdiv\x3e\x3ch3\x3e${nls.picker.description}\x3c/h3\x3e\x3c/div\x3e\r\n\t\x3cbr\x3e\r\n\t\x3ctable width\x3d"100%" cellpadding\x3d"2" cellspacing\x3d"2"\x3e\r\n\t\t\x3ctr\x3e\r\n\t\t\t\x3ctd class\x3d"picker-cell"\x3e\r\n\t\t\t\t${nls.picker.layer}\x3cbr\x3e\r\n\t\t\t\t\x3cdiv class\x3d"" data-dojo-attach-point\x3d"layerLevel"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/td\x3e\r\n\t\t\x3c/tr\x3e\r\n\t\t\x3ctr\x3e\r\n\t\t\t\x3ctd class\x3d"picker-cell"\x3e\r\n\t\t\t\t${nls.picker.field}\x3cbr\x3e\r\n\t\t\t\t\x3cdiv class\x3d"" data-dojo-attach-point\x3d"fieldLevel"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/td\x3e\r\n\t\t\x3c/tr\x3e\r\n\t\t\x3ctr\x3e\r\n\t\t\t\x3ctd class\x3d"picker-cell"\x3e\r\n\t\t\t\t${nls.picker.value}\x3cbr\x3e\r\n\t\t\t\t\x3cdiv class\x3d"value-level" data-dojo-attach-point\x3d"valueLevel"\x3e\x3c/div\x3e\r\n\t\t\t\x3c/td\x3e\r\n\t\t\x3c/tr\x3e\r\n\t\x3c/table\x3e\r\n\x3c/div\x3e',
  "url:widgets/GroupFilter/setting/Setting.html":'\x3cdiv\x3e\r\n\t\x3clabel\x3e${nls.configText}\x3c/label\x3e\r\n\t\x3cdiv class\x3d"widget-intro" data-dojo-attach-point\x3d"widgetIntro"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"layer-Mapping-Block" data-dojo-attach-point\x3d"layerMappingBlock" id\x3d"layerMappingBlock"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"jimu-btn layer-Mapping-Block-add" data-dojo-attach-point\x3d"layerMappingBlockAdd" data-dojo-attach-event\x3d"click:createGroupBlock" title\x3d"${nls.buttons.addNewGroupTip}"\x3e${nls.buttons.addNewGroup}\x3c/div\x3e\r\n  \x3chr\x3e\r\n\r\n  \x3clabel\x3e${nls.labels.headerTextHelp}\x3c/label\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"editorDescription"\x3e\x3c/div\x3e\r\n  \x3chr\x3e\r\n\r\n\t\x3cdiv\x3e\r\n\t\t\x3ctable width\x3d"98%"\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkSimpleMode" data-dojo-props\x3d"value:true,checked:false"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.inputs.simpleModeTip}"\x3e${nls.inputs.simpleMode}\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkOptionsMode" data-dojo-props\x3d"value:true,checked:false"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.inputs.optionsModeTip}"\x3e${nls.inputs.optionsMode}\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkWebmapAppendMode" data-dojo-props\x3d"value:true,checked:true"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.inputs.webmapAppendModeTip}"\x3e\r\n\t\t\t\t\t\x3cselect data-dojo-attach-point\x3d"slAppendChoice" data-dojo-type\x3d"dijit/form/Select"\x3e\r\n\t\t\t\t\t    \x3coption value\x3d"OR"\x3e${nls.inputs.webmapAppendModeAny}\x3c/option\x3e\r\n\t\t\t\t\t    \x3coption value\x3d"AND"\x3e${nls.inputs.webmapAppendModeAll}\x3c/option\x3e\r\n\t\t\t\t\t\x3c/select\x3e\r\n\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkZoomMode" data-dojo-props\x3d"value:true,checked:true"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.zoomTo} ${nls.allFeaturesTip}"\x3e${nls.zoomTo}\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3ctr\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkPersistOnClose" data-dojo-props\x3d"value:true,checked:false"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.inputs.persistOnClose}"\x3e${nls.inputs.persistOnClose}\x3c/td\x3e\r\n\t\t\t\t\x3ctd\x3e\x3cinput type\x3d"checkbox" data-dojo-type\x3d"dijit/form/CheckBox"  data-dojo-attach-point\x3d"chkHideDropdown" data-dojo-props\x3d"value:true,checked:false"/\x3e\x3c/td\x3e\r\n\t\t\t\t\x3ctd title\x3d"${nls.inputs.hideDropDown}"\x3e${nls.inputs.hideDropDown}\x3c/td\x3e\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/table\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e',
  "url:widgets/GroupFilter/setting/css/style.css":'.jimu-widget-map-filter input{margin-left: 10px;}.jimu-widget-map-filter .group-block {background-color: #FFFFFF; border-color: #e1e1e1; border-style: solid; border-width: 2px; border-radius: 5px; width: 100%; position: relative; margin-top: 10px;}.jimu-widget-map-filter .layer-Mapping-Block-add {margin-top: 10px; margin-bottom: 5px;}.jimu-widget-map-filter .group-setting-table {width: 100%; margin-left: 10px;}.jimu-widget-map-filter .group-block-item {position: relative; width: 90%;}.jimu-widget-map-filter .group-block-delete{padding-left: 10px; padding-right: 10px; cursor: pointer; cursor: hand; content: url("../../images/delete.png");}.jimu-widget-map-filter .group-block-delete:after{padding-left: 10px; padding-right: 10px; cursor: pointer; cursor: hand; content: url("../../images/delete.png");}.jimu-widget-map-filter .group-block-delete:hover{padding-left: 10px; padding-right: 10px; cursor: pointer; cursor: hand; content: url("../../images/delete_hover.png");}.jimu-widget-map-filter .group-block-layer-select {}.jimu-widget-map-filter .group-block-field-select {position: absolute; right: 0px; top: 0px;}.jimu-widget-map-filter .group-block-add-layer {margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px;}.jimu-widget-map-filter .groupName-textbox {margin-top: 5px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; width: 175px;}.jimu-widget-map-filter .groupName-Desctextbox {margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px; width: 400px;}.jimu-widget-map-filter .groupName-Defaulttextbox {margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px; width: 400px;}.jimu-widget-map-filter .groupName-defaultPicker {padding-left: 10px; padding-right: 10px; content: url("../../images/find.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .groupName-defaultPicker:after {padding-left: 10px; padding-right: 10px; content: url("../../images/find.png"); cursor: hand; cursor: pointer;}.jimu-widget-map-filter .layer-tables {margin-top: 5px; margin-bottom: 5px; width: 98%; margin-left: 10px;}.jimu-widget-map-filter .operator-select {font-size: 8pt;}.jimu-widget-map-filter .operator-append-select {font-size: 8pt; margin-top: 5px; margin-bottom: 5px; margin-left: 10px; margin-right: 10px;}.jimu-widget-map-filter-preset .picker-cell {padding-bottom: 15px;}.jimu-widget-map-filter-preset .value-level{margin-left: -3px; margin-right: -3px;}',
  "*now":function(v){v(['dojo/i18n!*preload*widgets/GroupFilter/setting/nls/Setting*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
  define("dojo/_base/declare jimu/BaseWidgetSetting dijit/_WidgetsInTemplateMixin jimu/dijit/SimpleTable dojo/dom dojo/dom-construct dojo/dom-class dojo/on dojo/query dojo/dom-attr dojo/_base/lang dojo/_base/array dijit/form/Select dijit/form/TextBox dijit/form/ValidationTextBox dijit/form/CheckBox dijit/Editor jimu/utils jimu/LayerInfos/LayerInfos jimu/dijit/Message jimu/dijit/Popup dojox/html/entities ../LayersHandler ./presetValuePicker jimu/dijit/EditorXssFilter dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/ViewSource dijit/_editor/plugins/FontChoice dojox/editor/plugins/Preview dijit/_editor/plugins/TextColor dojox/editor/plugins/ToolbarLineBreak dojox/editor/plugins/FindReplace dojox/editor/plugins/PasteFromWord dojox/editor/plugins/InsertAnchor dojox/editor/plugins/Blockquote dojox/editor/plugins/UploadImage".split(" "),function(v,
  E,L,H,G,c,e,f,h,l,p,n,u,x,z,b,g,A,N,q,t,B,F,Q,O){return v([E,L],{baseClass:"jimu-widget-map-filter",groupCounter:0,groupLayerContainer:[],groupLayerName:[],groupLayerDesc:[],groupLayerOperator:[],groupLayerDefault:[],groupAppendSameConjunc:[],groupCaseSearch:[],layerCounter:0,layerList:null,_editorObj:null,postMixInProperties:function(){this.nls=p.mixin(this.nls,window.jimuNls.common);this.nls=p.mixin(this.nls,window.jimuNls.spatialFilterByFeatures)},postCreate:function(){this.inherited(arguments);
  this.editorXssFilter=O.getInstance()},startup:function(){this.inherited(arguments);this.setConfig(this.config)},setConfig:function(C){this.config=C;this.groupLayerContainer=[];this.groupLayerName=[];this.groupLayerDesc=[];this.groupLayerOperator=[];this.groupLayerDefault=[];this.groupAppendSameConjunc=[];this.groupCaseSearch=[];this.chkSimpleMode.set("checked",this.config.simpleMode);this.chkOptionsMode.set("checked",this.config.optionsMode);this.chkWebmapAppendMode.set("checked",this.config.webmapAppendMode);
  this.slAppendChoice.set("value",this.config.slAppendChoice);this.chkZoomMode.set("checked",this.config.zoomMode);this.chkPersistOnClose.set("checked",this.config.persistOnClose);this.chkHideDropdown.set("checked",this.config.hideHeaderSelection);this.createMapLayerList();this.createHeaderEditor()},getConfig:function(){if(null===this.layerList)return new q({message:this.nls.errors.noLayers}),!1;if(0<this.layerList.length){var C=this.validateNoGroups(),m=this.validateNoGroupsName(),k=this.validateDuplicateGroupsName(),
  D=this.validateTableRows();return C&&m&&k&&D?(this.config.simpleMode=this.chkSimpleMode.checked,this.config.optionsMode=this.chkOptionsMode.checked,this.config.webmapAppendMode=this.chkWebmapAppendMode.checked,this.config.slAppendChoice=this.slAppendChoice.get("value"),this.config.zoomMode=this.chkZoomMode.checked,this.config.persistOnClose=this.chkPersistOnClose.checked,this.config.headerText=this.editorXssFilter.sanitize(this._editorObj.get("value")),this.config.hideHeaderSelection=this.chkHideDropdown.checked,
  this.config.groups=[],n.forEach(this.groupLayerName,p.hitch(this,function(J,a){if(null!==J&&null!==this.groupLayerContainer[a]){var d={};d.name=A.sanitizeHTML(J.value);d.desc=A.sanitizeHTML(this.groupLayerDesc[a].value);d.operator=A.sanitizeHTML(this.groupLayerOperator[a].value);d.defaultVal=A.sanitizeHTML(this.groupLayerDefault[a].value);d.appendSameLayer=!0;d.appendSameLayerConjunc=this.groupAppendSameConjunc[a].value;d.caseSearch=this.groupCaseSearch[a].get("checked");d.layers=[];n.forEach(this.groupLayerContainer[a].getRows(),
  p.hitch(this,function(r){var y={},w=r.cells[2].childNodes[0];y.layer=r.layerCol.value;y.field=r.fieldCol.value;y.dataType=r.dataTypeCol.attr("displayedValue");y.useDomain=w.checked?w.checked:"";d.layers.push(y)}));this.config.groups.push(d)}})),this.config):!1}new q({message:this.nls.errors.noLayers});return!1},createMapLayerList:function(){N.getInstance(this.map,this.map.itemInfo).then(p.hitch(this,function(C){C._layerInfos&&0<C._layerInfos.length&&(C=new F({layers:C._layerInfos}),this.own(f(C,"complete",
  p.hitch(this,function(m){this.layerList=m.data.items;0<this.config.groups.length?n.forEach(this.config.groups,p.hitch(this,function(k){this.createGroupBlock({group:k})})):this.createGroupBlock({group:null})}))),this.own(f(C,"error",p.hitch(this,function(){console.log("error")}))),C.getAllMapLayers())}))},createGroupBlock:function(C){this.groupCounter++;var m=c.create("div",{id:"grpDiv_"+this.groupCounter,"class":"group-block"});c.place(m,this.layerMappingBlock);var k=c.create("table",{"class":"group-setting-table"});
  c.place(k,m);var D=k.insertRow(-1),J=D.insertCell(0);l.set(J,"title",this.nls.labels.groupNameTip);var a=D.insertCell(1),d=D.insertCell(2);l.set(d,"title",this.nls.labels.groupDescTip);m=D.insertCell(3);D=D.insertCell(4);var r=k.insertRow(-1),y=r.insertCell(0);l.set(y,"title",this.nls.labels.groupOperatorTip);var w=r.insertCell(1),I=r.insertCell(2);l.set(I,"title",this.nls.labels.groupDefaultTip);var K=r.insertCell(3);r=r.insertCell(4);var M=k.insertRow(-1),P=M.insertCell(0);l.set(P,"colspan","3");
  var S=M.insertCell(1);M.insertCell(2);l.set(M,"id","appendLayers_"+this.groupCounter);M=k.insertRow(-1);var R=M.insertCell(0);l.set(R,"colspan","3");k=M.insertCell(1);M.insertCell(2);l.set(M,"id","caseSearch_"+this.groupCounter);J.innerHTML=this.nls.labels.groupName;d.innerHTML=this.nls.labels.groupDesc;y.innerHTML=this.nls.labels.groupOperator;I.innerHTML=this.nls.labels.groupDefault;P.innerHTML=this.nls.labels.sameLayerAppend;R.innerHTML=this.nls.labels.caseSearch;d=I=J=P=M="";y=!1;"undefined"!==
  typeof C.group&&null!==C.group&&(M=C.group.name,P=C.group.desc,J=C.group.operator,I=C.group.defaultVal,"undefined"!==typeof C.group.appendSameLayerConjunc&&(d=C.group.appendSameLayerConjunc),"undefined"!==typeof C.group.caseSearch&&(y=C.group.caseSearch));M=new z({name:"txtGroupName",value:M,"class":"groupName-textbox",placeHolder:this.nls.inputs.groupName,required:"true"});c.place(M.domNode,a);this.groupLayerName.push(M);a=new x({name:"txtGroupDesc",value:P,"class":"groupName-Desctextbox",placeHolder:this.nls.inputs.groupDesc});
  c.place(a.domNode,m);this.groupLayerDesc.push(a);var T=new x({name:"txtGroupDefault",value:I,"class":"groupName-Defaulttextbox",placeHolder:this.nls.inputs.groupDefault});c.place(T.domNode,K);this.groupLayerDefault.push(T);m=c.create("div",{"class":"groupName-defaultPicker"});c.place(m,r);this.own(f(m,"click",p.hitch(this,function(){this.presetPickerPopup(T)})));var U=c.create("div",{id:"addGroupDelete_"+this.groupCounter,"class":"group-block-delete"}),W=f(U,"click",p.hitch(this,function(){W.remove();
  this.removeGroup(U.id)}));c.place(U,D);this.createOperatorSelection({cell:w,value:J});this.createAppendConjunc({cell:S,value:d});this.createCaseSearch({cell:k,value:y});this.createTableObject(C);var V=c.create("div",{id:"addLyrDiv_"+this.groupCounter,"class":"jimu-btn group-block-add-layer",title:this.nls.buttons.addLayerTip});this.own(f(V,"click",p.hitch(this,function(){this.addLayerRow(V.id)})));c.place(V,G.byId("grpDiv_"+this.groupCounter));G.byId("addLyrDiv_"+this.groupCounter).innerHTML=this.nls.buttons.addLayer},
  createOperatorSelection:function(C){var m=(new u({options:[{value:"",label:this.nls.inputs.optionNONE},{value:"\x3d",label:this.nls.inputs.optionEQUAL},{value:"\x3c\x3e",label:this.nls.inputs.optionNOTEQUAL},{value:"\x3e",label:this.nls.inputs.optionGREATERTHAN},{value:"\x3e\x3d",label:this.nls.inputs.optionGREATERTHANEQUAL},{value:"\x3c",label:this.nls.inputs.optionLESSTHAN},{value:"\x3c\x3d",label:this.nls.inputs.optionLESSTHANEQUAL},{value:"START",label:this.nls.inputs.optionSTART},{value:"END",
  label:this.nls.inputs.optionEND},{value:"LIKE",label:this.nls.inputs.optionLIKE},{value:"NOT LIKE",label:this.nls.inputs.optionNOTLIKE},{value:"d\x3c\x3d",label:this.nls.inputs.optionONORBEFORE},{value:"d\x3e\x3d",label:this.nls.inputs.optionONORAFTER}],"class":"operator-select"})).placeAt(C.cell);m.startup();m.set("value",B.decode(C.value));this.groupLayerOperator.push(m)},createAppendConjunc:function(C){var m=(new u({options:[{value:"OR",label:this.nls.inputs.sameLayerAny},{value:"AND",label:this.nls.inputs.sameLayerAll}],
  "class":"operator-append-select"})).placeAt(C.cell);m.startup();m.set("value",B.decode(C.value));this.groupAppendSameConjunc.push(m)},createCaseSearch:function(C){var m=(new b({"class":"operator-append-select"})).placeAt(C.cell);m.startup();m.set("checked",C.value);this.groupCaseSearch.push(m)},createTableObject:function(C){var m=null;m=[{name:"layerCol",title:this.nls.tables.layer,"class":"label",type:"empty",width:"375px"},{name:"fieldCol",title:this.nls.tables.field,"class":"label",type:"empty",
  width:"350px"},{name:"domainCol",title:this.nls.tables.value,"class":"label",type:"radio",width:"100px"},{name:"actions",title:this.nls.tables.action,type:"actions",actions:["delete"],width:"100px"},{name:"dataTypeCol",type:"empty",hidden:!0,width:0}];m=new H({fields:m,"class":"layer-tables"});m.placeAt(G.byId("grpDiv_"+this.groupCounter));this.groupLayerContainer.push(m);"undefined"!==typeof C.group&&null!==C.group?n.forEach(C.group.layers,p.hitch(this,function(k){this.addLayerRow(G.byId("grpDiv_"+
  this.groupCounter).id,k)})):this.addLayerRow(G.byId("grpDiv_"+this.groupCounter).id,C)},addLayerRow:function(C,m){C=C.substring(C.indexOf("_")+1);var k=this.groupLayerContainer[C-1].addRow({});if(k.success&&k.tr){k=k.tr;this.createLayerSelection(k,m,C);var D=k.cells[2].childNodes[0],J=D.checked;this.own(f(D,"click",p.hitch(this,function(){J=J?D.checked=!1:D.checked=!0})))}},createLayerSelection:function(C,m,k){var D=[];n.forEach(this.layerList,p.hitch(this,function(d){if(0<d.children.length)n.forEach(d.children,
  p.hitch(this,function(y){var w={};w.value=y.id;w.label=y.label;w.selected=!1;D.push(w)}));else{var r={};r.value=d.id;r.label=d.label;r.selected=!1;D.push(r)}}));var J=h(".simple-table-cell",C)[0];if(J){var a=(new u({options:D})).placeAt(J);a.startup();C.layerCol=a;this.own(f(a,"change",p.hitch(this,function(d){this.createFieldSelection(d,C,m,k)})));"undefined"!==typeof m&&a.set("value",m.layer)}this.createFieldSelection(a.value,C,m,k)},createFieldSelection:function(C,m,k,D){var J=[],a=[];n.forEach(this.layerList,
  p.hitch(this,function(w){0<w.children.length?n.forEach(w.children,p.hitch(this,function(I){I.id===C&&n.forEach(I.children,p.hitch(this,function(K){if(-1==="esriFieldTypeBlob,esriFieldTypeOID".indexOf(K.fieldType)){var M={};M.value=K.name;M.label=K.label;M.selected=!1;J.push(M);M={};M.value=K.name;M.label=K.fieldType;M.selected=!1;a.push(M)}}))})):w.id===C&&n.forEach(w.layer.fields,p.hitch(this,function(I){if(-1==="esriFieldTypeBlob,esriFieldTypeOID".indexOf(I.type)){var K={};K.value=I.name;K.label=
  ""===I.alias?I.name:I.alias;K.selected=!1;J.push(K);K={};K.value=I.name;K.label=I.type;K.selected=!1;a.push(K)}}))}));var d=h(".simple-table-cell",m)[1],r=h(".simple-table-cell",m)[4];if(d){c.empty(d);d=(new u({options:J})).placeAt(d);d.startup();m.fieldCol=d;c.empty(r);var y=(new u({options:a})).placeAt(r);y.startup();m.dataTypeCol=y;this.own(f(d,"change",p.hitch(this,function(w){this.resetRadio({layer:C,field:w,row:m,param:k,counter:D});this.dataTypeSync({layer:C,field:w,row:m,param:k,select:y})})));
  "undefined"!==typeof k&&(this.resetRadio({layer:C,row:m,param:k,counter:D}),d.set("value",k.field),y.set("value",k.field))}},createHeaderEditor:function(){this._editorObj=new g({height:"100px",plugins:"bold italic underline foreColor | justifyLeft justifyCenter justifyRight justifyFull | insertOrderedList insertUnorderedList indent outdent".split(" "),extraPlugins:["|","createLink","unlink","pastefromword","|","undo","redo","|","toolbarlinebreak",{name:"dijit._editor.plugins.FontChoice",command:"fontName",
  custom:"Arial;Comic Sans MS;Courier New;Garamond;Tahoma;Times New Roman;Verdana".split(";")},"fontSize","formatBlock"],style:"font-family:Verdana;"},this.editorDescription);this._editorObj.startup();this.config.hasOwnProperty("headerText")?this._editorObj.set("value",this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.inputs.selectGroup):this._editorObj.set("value",this.nls.inputs.selectGroup)},dataTypeSync:function(C){C.select.set("value",C.field)},resetRadio:function(C){var m=
  C.row.cells[2].childNodes[0];"undefined"!==typeof C.param&&(C.param.hasOwnProperty("useDomain")?m.checked=""!==C.param.useDomain?!0:!1:m.checked=!1)},validateNoGroups:function(){var C=!1,m=this.nls.errors.noGroups;n.forEach(this.groupLayerName,p.hitch(this,function(k){null!==k&&(C=!0)}));if(C)return!0;new q({message:m});return!1},validateNoGroupsName:function(){var C=!0,m=this.nls.errors.noGroupName;n.forEach(this.groupLayerName,p.hitch(this,function(k){null!==k&&(k.get("value")||(C=!1))}));!1===
  C&&new q({message:m});return C},validateDuplicateGroupsName:function(){var C=!0,m=this.nls.errors.noDuplicates,k=[];n.forEach(this.groupLayerName,p.hitch(this,function(D){null!==D&&D.get("value")&&k.push(D.get("value"))}));1<k.length&&k.sort().filter(function(D,J,a){return D!==a[J-1]}).length!==k.length&&(C=!1);!1===C&&new q({message:m});return C},validateTableRows:function(){var C=!0;n.forEach(this.groupLayerContainer,p.hitch(this,function(m){null!==m&&0>=m.getRows().length&&(C=!1)}));!1===C&&new q({message:this.nls.errors.noRows});
  return C},presetPickerPopup:function(C){var m=new Q({map:this.map,nls:this.nls,layerList:this.layerList}),k=new t({titleLabel:this.nls.popup.label,width:500,height:420,content:m,buttons:[{label:window.jimuNls.common.ok,onClick:p.hitch(this,function(){var D="";if("undefined"!==typeof m.valueParam&&null!==m.valueParam.getFilterExpr()){var J=m.valueParam.getValueProviders()[0].getValueObject();J&&(D=J.value);C.set("value",D)}k.close();k=null})},{label:window.jimuNls.common.cancel,classNames:["jimu-btn-vacation"]}]})},
  removeGroup:function(C){C=C.substring(C.indexOf("_")+1);this.groupLayerContainer[C-1]=null;this.groupLayerName[C-1]=null;this.groupLayerDesc[C-1]=null;this.groupLayerOperator[C-1]=null;this.groupLayerDefault[C-1]=null;this.groupAppendSameConjunc[C-1]=null;c.destroy(G.byId("addGroupDelete_"+C));c.destroy(G.byId("addLyrDiv_"+C));c.destroy(G.byId("grpDiv_"+C))}})});