// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/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,z,C,r,h,c,
e,b,d,a,f,g,p,A,l,k,t,F,I,B,G,J,E,y,x){function w(q){return new B({command:q.name})}function n(q){return new B({buttonClass:I,command:q.name})}C=C("dijit.Editor",y,{plugins:null,extraPlugins:null,constructor:function(){f.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",G]);this._plugins=[];this._editInterval=
1E3*this.editActionInterval;if(g("ie")||g("trident")||g("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new r;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);f.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=h.getLocalization("dijit._editor","commands",this.lang);
g("webkit")&&d.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new k({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));z.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(){z.forEach(this._plugins,function(q){q&&q.destroy&&q.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(q,H){var K=f.isString(q)?{name:q}:f.isFunction(q)?{ctor:q}:q;if(!K.setEditor){var m={args:K,plugin:null,editor:this};K.name&&(B.registry[K.name]?m.plugin=B.registry[K.name](K):A.publish(x._scopeName+".Editor.getPlugin",m));if(!m.plugin)try{var u=K.ctor||f.getObject(K.name)||
v(K.name);u&&(m.plugin=new u(K))}catch(D){throw Error(this.id+": cannot find plugin ["+K.name+"]");}if(!m.plugin)throw Error(this.id+": cannot find plugin ["+K.name+"]");q=m.plugin}1<arguments.length?this._plugins[H]=q:this._plugins.push(q);q.setEditor(this);f.isFunction(q.setToolbar)&&q.setToolbar(this.toolbar)},resize:function(q){q&&F.prototype.resize.apply(this,arguments)},layout:function(){var q=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+b.getPadBorderExtents(this.iframe.parentNode).h+
b.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=q+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(q){var H,K=this.document.body,m=K.clientWidth,u=K.clientHeight,D=K.clientLeft,M=K.offsetWidth,L=K.offsetHeight,N=K.offsetLeft;/^rtl$/i.test(K.dir||"")?m<M&&q.x>m&&q.x<M&&(H=!0):q.x<D&&q.x>N&&(H=!0);H||u<L&&q.y>u&&q.y<L&&(H=!0);H||(delete this._cursorToStart,delete this._savedSelection,"BODY"==q.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(q){this.customUndo&&this.endEditing(!0);"BODY"!=q.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(q){this._inEditing||(this._inEditing=!0,this._beginEditing(q));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(q){if(!this.customUndo||
"undo"!=q&&"redo"!=q){this.customUndo&&(this.endEditing(),this._beginEditing());var H=this.inherited(arguments);this.customUndo&&this._endEditing();return H}return this[q]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(q){try{var H=this.document.execCommand(q,!1,null);if(g("webkit")&&!H)throw{};}catch(K){H=p.substitute,alert(H(this.commands.systemShortcut,
[this.commands[q],H(this.commands[g("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[q]])])),H=!1}return H},queryCommandEnabled:function(q){return!this.customUndo||"undo"!=q&&"redo"!=q?this.inherited(arguments):"undo"==q?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(q){var H=q.mark,K=q.mark;q=q.isCollapsed;var m;if(K)if(9>g("ie")||9===g("ie")&&g("quirks"))if(f.isArray(K))H=[],z.forEach(K,function(M){H.push(E.getNode(M,this.editNode))},this),this.selection.moveToBookmark({mark:H,
isCollapsed:q});else{if(K.startContainer&&K.endContainer&&(m=E.getSelection(this.window))&&m.removeAllRanges){m.removeAllRanges();q=E.create(this.window);var u=E.getNode(K.startContainer,this.editNode);var D=E.getNode(K.endContainer,this.editNode);u&&D&&(q.setStart(u,K.startOffset),q.setEnd(D,K.endOffset),m.addRange(q))}}else(m=E.getSelection(this.window))&&m.removeAllRanges&&(m.removeAllRanges(),q=E.create(this.window),u=E.getNode(K.startContainer,this.editNode),D=E.getNode(K.endContainer,this.editNode),
u&&D&&(q.setStart(u,K.startOffset),q.setEnd(D,K.endOffset),m.addRange(q)))},_changeToStep:function(q,H){this.setValue(H.text);(q=H.bookmark)&&this._moveToBookmark(q)},undo:function(){var q=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var H=this._steps.pop();H&&0<this._steps.length&&(this.focus(),this._changeToStep(H,this._steps[this._steps.length-1]),this._undoedSteps.push(H),this.onDisplayChanged(),delete this._undoRedoActive,q=!0);delete this._undoRedoActive}return q},
redo:function(){var q=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var H=this._undoedSteps.pop();H&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],H),this._steps.push(H),this.onDisplayChanged(),q=!0);delete this._undoRedoActive}return q},endEditing:function(q){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(q),this._inEditing=!1)},_getBookmark:function(){var q=this.selection.getBookmark(),
H=[];if(q&&q.mark){var K=q.mark;if(9>g("ie")||9===g("ie")&&g("quirks")){var m=E.getSelection(this.window);if(f.isArray(K))z.forEach(q.mark,function(D){H.push(E.getIndex(D,this.editNode).o)},this),q.mark=H;else if(m){var u;m.rangeCount&&(u=m.getRangeAt(0));q.mark=u?u.cloneRange():this.selection.getBookmark()}}try{q.mark&&q.mark.startContainer&&(H=E.getIndex(q.mark.startContainer,this.editNode).o,q.mark={startContainer:H,startOffset:q.mark.startOffset,endContainer:q.mark.endContainer===q.mark.startContainer?
H:E.getIndex(q.mark.endContainer,this.editNode).o,endOffset:q.mark.endOffset})}catch(D){q.mark=null}}return q},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:J.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var q=J.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:q,bookmark:this._getBookmark()})},onKeyDown:function(q){g("ie")||this.iframe||q.keyCode!=a.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var H=
q.keyCode;if(q.ctrlKey&&!q.shiftKey&&!q.altKey){if(90==H||122==H){q.stopPropagation();q.preventDefault();this.undo();return}if(89==H||121==H){q.stopPropagation();q.preventDefault();this.redo();return}}this.inherited(arguments);switch(H){case a.ENTER:case a.BACKSPACE:case a.DELETE:this.beginEditing();break;case 88:case 86:if(q.ctrlKey&&!q.altKey&&!q.metaKey){this.endEditing();88==q.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!q.ctrlKey&&!q.altKey&&
!q.metaKey&&(q.keyCode<a.F1||q.keyCode>a.F15)){this.beginEditing();break}case a.ALT:this.endEditing();break;case a.UP_ARROW:case a.DOWN_ARROW:case a.LEFT_ARROW:case a.RIGHT_ARROW:case a.HOME:case a.END:case a.PAGE_UP:case a.PAGE_DOWN:this.endEditing(!0);case a.CTRL:case a.SHIFT:case a.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(q){}},_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(q){this.customUndo?this.isClosed?this.setValue(q):(this.beginEditing(),q||(q="\x26#160;"),this.setValue(q),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(q){this.setValueDeferred.then(f.hitch(this,function(){!this.disabled&&q||!this._buttonEnabledPlugins&&q?
z.forEach(this._plugins,function(H){H.set("disabled",!0)}):this.disabled&&!q&&z.forEach(this._plugins,function(H){H.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(d.set(this.document.body,"color",d.get(this.iframe,"color")),d.set(this.document.body,"background-color",d.get(this.iframe,"background-color")))}catch(q){}}});f.mixin(B.registry,{undo:w,redo:w,cut:w,copy:w,paste:w,insertOrderedList:w,insertUnorderedList:w,
indent:w,outdent:w,justifyCenter:w,justifyFull:w,justifyLeft:w,justifyRight:w,"delete":w,selectAll:w,removeFormat:w,unlink:w,insertHorizontalRule:w,bold:n,italic:n,underline:n,strikethrough:n,subscript:n,superscript:n,"|":function(){return new B({setEditor:function(q){this.editor=q;this.button=new t({ownerDocument:q.ownerDocument})}})}});return C})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(v,z,C,r,h,c,e,b){C("dijit-legacy-requires")&&h(0,function(){v(["dijit/ToolbarSeparator"])});return z("dijit.Toolbar",[c,b,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,z,C,r){return v("dijit.ToolbarSeparator",[C,r],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);z.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,z,C,r,h){z=z("dijit._editor._Plugin",r,{constructor:function(c){this.params=
c||{};C.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:h,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,b=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(c=C.mixin({label:c,ownerDocument:e.ownerDocument,dir:e.dir,
lang:e.lang,showLabel:!1,iconClass:b,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,b){this.own(v.connect(c,e,this,b))},updateState:function(){var c=this.editor,e=this.command;if(c&&c.isLoaded&&e.length){var b=this.get("disabled");if(this.button)try{var d=
c._implCommand(e);var a=!b&&(this[d]?this[d](e):c.queryCommandEnabled(e));this.enabled!==a&&(this.enabled=a,this.button.set("disabled",!a));if(a&&"boolean"==typeof this.button.checked){var f=c.queryCommandState(e);this.checked!==f&&(this.checked=f,this.button.set("checked",c.queryCommandState(e)))}}catch(g){console.log(g)}}},setEditor:function(c){this.editor=c;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",C.hitch(this.editor,
"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",C.hitch(this,"updateState")))},setToolbar:function(c){this.button&&c.addChild(this.button)},set:function(c,e){if("object"===typeof c){for(var b in c)this.set(b,c[b]);return this}b=this._getAttrNames(c);if(this[b.s])var d=this[b.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(c,e);return d||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 b=c.charAt(0).toUpperCase()+c.substr(1);return e[c]={s:"_set"+b+"Attr",g:"_get"+b+"Attr"}},_set:function(c,e){this[c]=e}});z.registry={};return z})},"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,z,C,r,h,c,e,b,d,a,f){return v("dijit._editor.plugins.EnterKeyHandling",d,{blockNodeForEnter:"BR",constructor:function(g){g&&("blockNodeForEnter"in g&&(g.blockNodeForEnter=g.blockNodeForEnter.toUpperCase()),r.mixin(this,g))},setEditor:function(g){if(this.editor!==g)if(this.editor=g,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,g.onLoadDeferred.then(r.hitch(this,function(A){this.own(h(g.document,"keydown",r.hitch(this,function(l){if(l.keyCode==C.ENTER){var k=r.mixin({},l);k.shiftKey=
!0;this.handleEnterKey(k)||(l.stopPropagation(),l.preventDefault())}})));9<=c("ie")&&10>=c("ie")&&this.own(h(g.document,"paste",r.hitch(this,function(l){setTimeout(r.hitch(this,function(){var k=this.editor.document.selection.createRange();k.move("character",-1);k.select();k.move("character",1);k.select()}),0)})));return A}));else if(this.blockNodeForEnter){var p=r.hitch(this,"handleEnterKey");g.addKeyHandler(13,0,0,p);g.addKeyHandler(13,0,1,p);this.own(this.editor.on("KeyPressed",r.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var g=this.editor.selection.getAncestorElement("LI");if(g){c("mozilla")&&"LI"==g.parentNode.parentNode.nodeName&&(g=g.parentNode.parentNode);var p=g.firstChild;!p||1!=p.nodeType||"UL"!=p.nodeName&&"OL"!=p.nodeName||(g.insertBefore(p.ownerDocument.createTextNode("\u00a0"),p),p=f.create(this.editor.window),p.setStart(g.firstChild,0),g=f.getSelection(this.editor.window,!0),g.removeAllRanges(),g.addRange(p))}else a.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(g=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(g.innerHTML=this.bogusHtmlContent,9>=c("ie")&&(g=this.editor.document.selection.createRange(),g.move("character",-1),g.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(g){var p,A=this.editor.document,l;if(g.shiftKey){g=this.editor.selection.getParentElement();if(p=f.getAncestor(g,this.blockNodes)){if("LI"==p.tagName)return!0;g=f.getSelection(this.editor.window);var k=g.getRangeAt(0);k.collapsed||(k.deleteContents(),g=f.getSelection(this.editor.window),k=g.getRangeAt(0));if(f.atBeginningOfContainer(p,k.startContainer,k.startOffset)){var t=A.createElement("br");k=f.create(this.editor.window);p.insertBefore(t,
p.firstChild);k.setStartAfter(t);g.removeAllRanges();g.addRange(k)}else if(f.atEndOfContainer(p,k.startContainer,k.startOffset))k=f.create(this.editor.window),t=A.createElement("br"),p.appendChild(t),p.appendChild(A.createTextNode("\u00a0")),k.setStart(p.lastChild,0),g.removeAllRanges(),g.addRange(k);else{if((l=k.startContainer)&&3==l.nodeType){var F=l.nodeValue;var I=A.createTextNode(F.substring(0,k.startOffset));var B=A.createTextNode(F.substring(k.startOffset));p=A.createElement("br");""==B.nodeValue&&
c("webkit")&&(B=A.createTextNode("\u00a0"));z.place(I,l,"after");z.place(p,I,"after");z.place(B,p,"after");z.destroy(l);k=f.create(this.editor.window);k.setStart(B,0);g.removeAllRanges();g.addRange(k);return!1}return!0}}else g=f.getSelection(this.editor.window),g.rangeCount?(k=g.getRangeAt(0))&&k.startContainer&&(k.collapsed||(k.deleteContents(),g=f.getSelection(this.editor.window),k=g.getRangeAt(0)),(l=k.startContainer)&&3==l.nodeType?(p=k.startOffset,l.length<p&&(B=this._adjustNodeAndOffset(l,p),
l=B.node,p=B.offset),F=l.nodeValue,I=A.createTextNode(F.substring(0,p)),B=A.createTextNode(F.substring(p)),p=A.createElement("br"),B.length||(B=A.createTextNode("\u00a0")),I.length?z.place(I,l,"after"):I=l,z.place(p,I,"after"),z.place(B,p,"after"),z.destroy(l)):(0<=k.startOffset&&(t=l.childNodes[k.startOffset]),p=A.createElement("br"),B=A.createTextNode("\u00a0"),t?(z.place(p,t,"before"),z.place(B,p,"after")):(l.appendChild(p),l.appendChild(B))),k=f.create(this.editor.window),k.setStart(B,0),k.setEnd(B,
B.length),g.removeAllRanges(),g.addRange(k),this.editor.selection.collapse(!0)):a.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var G=!0;g=f.getSelection(this.editor.window);k=g.getRangeAt(0);k.collapsed||(k.deleteContents(),g=f.getSelection(this.editor.window),k=g.getRangeAt(0));t=f.getBlockAncestor(k.endContainer,null,this.editor.editNode);var J=t.blockNode;if(this._checkListLater=J&&("LI"==J.nodeName||"LI"==J.parentNode.nodeName))return c("mozilla")&&(this._pressedEnterInBlock=
J),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(J.innerHTML)&&(J.innerHTML="",c("webkit")&&(k=f.create(this.editor.window),k.setStart(J,0),g.removeAllRanges(),g.addRange(k)),this._checkListLater=!1),!0;if(!t.blockNode||t.blockNode===this.editor.editNode){try{a.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(E){}t={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(t.blockNode){if(t.blockNode!=this.editor.editNode&&!(t.blockNode.textContent||t.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(t.blockNode),!1}else t.blockNode=this.editor.editNode;g=f.getSelection(this.editor.window);k=g.getRangeAt(0)}J=A.createElement(this.blockNodeForEnter);J.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(t.blockNode);B=k.endOffset;G=k.endContainer;G.length<B&&(B=this._adjustNodeAndOffset(G,B),G=
B.node,B=B.offset);if(f.atEndOfContainer(t.blockNode,G,B))t.blockNode===t.blockContainer?t.blockNode.appendChild(J):z.place(J,t.blockNode,"after"),G=!1,k=f.create(this.editor.window),k.setStart(J,0),g.removeAllRanges(),g.addRange(k),this.editor.height&&b.scrollIntoView(J);else if(f.atBeginningOfContainer(t.blockNode,k.startContainer,k.startOffset))z.place(J,t.blockNode,t.blockNode===t.blockContainer?"first":"before"),J.nextSibling&&this.editor.height&&(k=f.create(this.editor.window),k.setStart(J.nextSibling,
0),g.removeAllRanges(),g.addRange(k),b.scrollIntoView(J.nextSibling)),G=!1;else{t.blockNode===t.blockContainer?t.blockNode.appendChild(J):z.place(J,t.blockNode,"after");G=!1;t.blockNode.style&&J.style&&t.blockNode.style.cssText&&(J.style.cssText=t.blockNode.style.cssText);if((l=k.startContainer)&&3==l.nodeType){B=k.endOffset;l.length<B&&(B=this._adjustNodeAndOffset(l,B),l=B.node,B=B.offset);F=l.nodeValue;I=A.createTextNode(F.substring(0,B));B=A.createTextNode(F.substring(B,F.length));z.place(I,l,
"before");z.place(B,l,"after");z.destroy(l);for(k=I.parentNode;k!==t.blockNode;){F=A.createElement(k.tagName);k.style&&F.style&&k.style.cssText&&(F.style.cssText=k.style.cssText);"FONT"===k.tagName&&(k.color&&(F.color=k.color),k.face&&(F.face=k.face),k.size&&(F.size=k.size));for(;B;)l=B.nextSibling,F.appendChild(B),B=l;z.place(F,k,"after");I=k;B=F;k=k.parentNode}if(1==B.nodeType||3==B.nodeType&&B.nodeValue)J.innerHTML="";for(I=B;B;)l=B.nextSibling,J.appendChild(B),B=l}k=f.create(this.editor.window);
A=I;if("BR"!==this.blockNodeForEnter){for(;A;)p=A,A=l=A.firstChild;p&&p.parentNode?(J=p.parentNode,k.setStart(J,0),g.removeAllRanges(),g.addRange(k),this.editor.height&&b.scrollIntoView(J),c("mozilla")&&(this._pressedEnterInBlock=t.blockNode)):G=!0}else k.setStart(J,0),g.removeAllRanges(),g.addRange(k),this.editor.height&&b.scrollIntoView(J),c("mozilla")&&(this._pressedEnterInBlock=t.blockNode)}return G},_adjustNodeAndOffset:function(g,p){for(;g.length<p&&g.nextSibling&&3==g.nextSibling.nodeType;)p-=
g.length,g=g.nextSibling;return{node:g,offset:p}},removeTrailingBr:function(g){if(g=/P|DIV|LI/i.test(g.tagName)?g:this.editor.selection.getParentOfType(g,["P","DIV","LI"]))g.lastChild&&(1<g.childNodes.length&&3==g.lastChild.nodeType&&/^[\s\xAD]*$/.test(g.lastChild.nodeValue)||"BR"==g.lastChild.tagName)&&z.destroy(g.lastChild),g.childNodes.length||(g.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,z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t,F,I,B,G,J,E,y,x,w,n,q,H){var K=C("dijit._editor.RichText",[E,y],{constructor:function(m){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};m&&p.isString(m.value)&&(this.value=m.value);this.onLoadDeferred=new r},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=[p.trim,p.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);t("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));t("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(t("ie")||t("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[p.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[p.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);I.publish(H._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var m=p.hitch(this,function(M,L){return function(){return!this.execCommand(M,L)}}),u={b:m("bold"),i:m("italic"),u:m("underline"),a:m("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:m("formatblock",
"h1"),2:m("formatblock","h2"),3:m("formatblock","h3"),4:m("formatblock","h4"),"\\":m("insertunorderedlist")};t("ie")||(u.Z=m("redo"));for(var D in u)this.addKeyHandler(D,!0,!1,u[D])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(K._editorCommandsLocalized)this._local2NativeFormatNames=K._local2NativeFormatNames,this._native2LocalFormatNames=K._native2LocalFormatNames;else{K._editorCommandsLocalized=!0;K._local2NativeFormatNames={};
K._native2LocalFormatNames={};this._local2NativeFormatNames=K._local2NativeFormatNames;this._native2LocalFormatNames=K._native2LocalFormatNames;for(var m="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),u="",D,M=0;D=m[M++];)u="l"!==D.charAt(1)?u+("\x3c"+D+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+D+"\x3e\x3cbr/\x3e"):u+("\x3c"+D+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+D+"\x3e\x3cbr/\x3e");var L=b.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:u});this.ownerDocumentBody.appendChild(L);
m=p.hitch(this,function(){for(var N=L.firstChild;N;)try{this.selection.selectElement(N.firstChild);var O=N.tagName.toLowerCase();this._local2NativeFormatNames[O]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[O]]=O;N=N.nextSibling.nextSibling}catch(Q){}b.destroy(L)});this.defer(m)}},open:function(m){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new r;this.isClosed||this.close();I.publish(H._scopeName+"._editor.RichText::open",
this);1===arguments.length&&m.nodeName&&(this.domNode=m);var u=this.domNode;if(p.isString(this.value)){var D=this.value;u.innerHTML=""}else if(u.nodeName&&"textarea"==u.nodeName.toLowerCase()){var M=this.textarea=u;this.name=M.name;D=M.value;u=this.domNode=this.ownerDocument.createElement("div");u.setAttribute("widgetId",this.id);M.removeAttribute("widgetId");u.cssText=M.cssText;u.className+=" "+M.className;b.place(u,M,"before");var L=p.hitch(this,function(){a.set(M,{display:"block",position:"absolute",
top:"-1000px"});if(t("ie")){var P=M.style;this.__overflow=P.overflow;P.overflow="hidden"}});t("ie")?this.defer(L,10):L();if(M.form){var N=M.value;this.reset=function(){this.getValue()!==N&&this.replaceValue(N)};A(M.form,"submit",p.hitch(this,function(){c.set(M,"disabled",this.disabled);M.value=this.getValue()}))}}else D=n.getChildrenHtml(u),u.innerHTML="";this.value=D;u.nodeName&&"LI"===u.nodeName&&(u.innerHTML=" \x3cbr\x3e");this.header=u.ownerDocument.createElement("div");u.appendChild(this.header);
this.editingArea=u.ownerDocument.createElement("div");u.appendChild(this.editingArea);this.footer=u.ownerDocument.createElement("div");u.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!z.useXDomain||z.allowXdRichTextSave)){if((D=h.byId(H._scopeName+"._editor.RichText.value"))&&""!==D.value){L=D.value.split(this._SEPARATOR);for(var O=0,Q;Q=L[O++];)if(Q=Q.split(this._NAME_CONTENT_SEP),Q[0]===this.name){this.value=Q[1];L=L.splice(O,1);D.value=L.join(this._SEPARATOR);
break}}K._globalSaveHandler||(K._globalSaveHandler={},B.addOnUnload(function(){for(var P in K._globalSaveHandler){var S=K._globalSaveHandler[P];p.isFunction(S)&&S()}}));K._globalSaveHandler[this.id]=p.hitch(this,"_saveContent")}this.isClosed=!1;D=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");D.id=this.id+"_iframe";D.style.border="none";D.style.width="100%";this._layoutMode?D.style.height="100%":7<=t("ie")?(this.height&&(D.style.height=this.height),this.minHeight&&(D.style.minHeight=
this.minHeight)):D.style.height=this.height?this.height:this.minHeight;D.frameBorder=0;D._loadFunc=p.hitch(this,function(P){this.window=P;this.document=P.document;this.selection=new x.SelectionManager(P);t("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});L=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");L=11>t("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+L+"');document.close()":"javascript: '"+
L+"'";this.editingArea.appendChild(D);D.src=L;"LI"===u.nodeName&&(u.lastChild.style.marginTop="-1.2em");e.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var m=a.getComputedStyle(this.domNode);if(this["aria-label"])var u=this["aria-label"];else{var D=l('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||h.byId(this["aria-labelledby"],this.ownerDocument);D&&(u=D.textContent||D.innerHTML||"")}D="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(u?" aria-label\x3d'"+F.escape(u)+"'":"")+"\x3e\x3c/div\x3e";var M=[m.fontWeight,m.fontSize,m.fontFamily].join(" "),L=m.lineHeight;L=0<=L.indexOf("px")?parseFloat(L)/parseFloat(m.fontSize):0<=L.indexOf("em")?parseFloat(L):"normal";var N="",O=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(Q){Q=Q.replace(/^;/ig,"")+";";var P=Q.split(":")[0];if(P){P=p.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}}a.set(O.domNode,R,"")}N+=Q+";"});this.iframe.setAttribute("title",u);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||f.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",u?"\x3ctitle\x3e"+F.escape(u)+"\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:",M,";\n",this.height||t("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",L,";\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",t("ie")||t("trident")||t("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",u?" aria-label\x3d'"+F.escape(u)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+N+"'\x3e",D,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var m=[];this.styleSheets&&(m=this.styleSheets.split(";"),this.styleSheets=
"");m=m.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var u="",D=0,M,L=J.get(this.ownerDocument);M=m[D++];)M=(new G(L.location,M)).toString(),this.editingAreaStyleSheets.push(M),u+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+M+'"/\x3e';return u},addStyleSheet:function(m){var u=m.toString(),D=J.get(this.ownerDocument);if("."===u.charAt(0)||"/"!==u.charAt(0)&&!m.host)u=(new G(D.location,u)).toString();-1<v.indexOf(this.editingAreaStyleSheets,u)||(this.editingAreaStyleSheets.push(u),
this.onLoadDeferred.then(p.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(u);else{var M=this.document.getElementsByTagName("head")[0],L=this.document.createElement("link");L.rel="stylesheet";L.type="text/css";L.href=u;M.appendChild(L)}})))},removeStyleSheet:function(m){var u=m.toString(),D=J.get(this.ownerDocument);if("."===u.charAt(0)||"/"!==u.charAt(0)&&!m.host)u=(new G(D.location,u)).toString();m=v.indexOf(this.editingAreaStyleSheets,u);-1!==m&&(delete this.editingAreaStyleSheets[m],
l('link[href\x3d"'+u+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(m){m=!!m;this._set("disabled",m);if(this.isLoaded){var u=t("ie")&&(this.isLoaded||!this.focusOnLoad);u&&(this.editNode.unselectable="on");this.editNode.contentEditable=!m;this.editNode.tabIndex=m?"-1":this.tabIndex;u&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(t("mozilla")&&!m&&this._mozSettingProps){m=this._mozSettingProps;for(var D in m)if(m.hasOwnProperty(D))try{this.document.execCommand(D,
!1,m[D])}catch(M){}}this._disabledOK=!0}},onLoad:function(m){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=q.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var u=this;this.beforeIframeNode=b.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=b.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){u.editNode.focus()};this.focusNode=
this.editNode;var D=this.events.concat(this.captureEvents),M=this.iframe?this.document:this.editNode;this.own.apply(this,v.map(D,function(L){var N=L.toLowerCase().replace(/^on/,"");return A(M,N,p.hitch(this,L))},this));this.own(A(M,"mouseup",p.hitch(this,"onClick")));t("ie")&&(this.own(A(this.document,"mousedown",p.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);t("webkit")&&(this._webkitListener=this.own(A(this.document,"mouseup",p.hitch(this,"onDisplayChanged")))[0],this.own(A(this.document,
"mousedown",p.hitch(this,function(L){L=L.target;!L||L!==this.document.body&&L!==this.document||this.defer("placeCursorAtEnd")}))));if(t("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(L){}this.isLoaded=!0;this.set("disabled",this.disabled);D=p.hitch(this,function(){this.setValue(m);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&k(p.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(D):D()},onKeyDown:function(m){if(m.keyCode===g.SHIFT||m.keyCode===g.ALT||m.keyCode===g.META||m.keyCode===g.CTRL)return!0;m.keyCode===g.TAB&&this.isTabIndent&&(m.stopPropagation(),m.preventDefault(),this.queryCommandEnabled(m.shiftKey?"outdent":"indent")&&this.execCommand(m.shiftKey?"outdent":"indent"));if(m.keyCode==g.TAB&&!this.isTabIndent&&!m.ctrlKey&&!m.altKey)return m.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>t("ie")&&m.keyCode===g.BACKSPACE&&"Control"===this.document.selection.type&&(m.stopPropagation(),m.preventDefault(),this.execCommand("delete"));t("ff")&&(m.keyCode===g.PAGE_UP||m.keyCode===g.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&m.preventDefault();var u=this._keyHandlers[m.keyCode],D=arguments;u&&!m.altKey&&v.some(u,function(M){if(!(M.shift^m.shiftKey||M.ctrl^(m.ctrlKey||m.metaKey)))return M.handler.apply(this,D)||m.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(m){f.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",m)},_setValueAttr:function(m){this.setValue(m)},_setDisableSpellCheckAttr:function(m){this.document?c.set(this.document.body,"spellcheck",!m):this.onLoadDeferred.then(p.hitch(this,function(){c.set(this.document.body,"spellcheck",!m)}));this._set("disableSpellCheck",m)},addKeyHandler:function(m,u,D,M){"string"==
typeof m&&(m=m.toUpperCase().charCodeAt(0));p.isArray(this._keyHandlers[m])||(this._keyHandlers[m]=[]);this._keyHandlers[m].push({shift:D||!1,ctrl:u||!1,handler:M})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(m){this.onDisplayChanged(m)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(m){(t("ie")||t("trident"))&&this.defer(function(){q.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var u=this.getValue(!0);if(u!==this.value)this.onChange(u);
this._set("value",u)},_onFocus:function(m){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!t("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>t("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(m,u){m=m.toLowerCase();"formatblock"===m?t("safari")&&void 0===u&&(m="heading"):"hilitecolor"!==m||t("mozilla")||(m="backcolor");return m},_implCommand:function(m){return"_"+this._normalizeCommand(m)+"EnabledImpl"},_qcaCache:{},
queryCommandAvailable:function(m){var u=this._qcaCache[m];return void 0!==u?u:this._qcaCache[m]=this._queryCommandAvailable(m)},_queryCommandAvailable:function(m){switch(m.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 t("ie")||t("trident")||t("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!t("webkit");default:return!1}},execCommand:function(m,u){this.focused&&this.focus();m=this._normalizeCommand(m,u);if(void 0!==u){if("heading"===m)throw Error("unimplemented");"formatblock"===
m&&(t("ie")||t("trident"))&&(u="\x3c"+u+"\x3e")}var D="_"+m+"Impl";if(this[D])var M=this[D](u);else if((u=1<arguments.length?u:null)||"createlink"!==m)M=this.document.execCommand(m,!1,u);this.onDisplayChanged();return M},queryCommandEnabled:function(m){if(this.disabled||!this._disabledOK)return!1;m=this._normalizeCommand(m);var u=this._implCommand(m);return this[u]?this[u](m):this._browserQueryCommandEnabled(m)},queryCommandState:function(m){if(this.disabled||!this._disabledOK)return!1;m=this._normalizeCommand(m);
try{return this.document.queryCommandState(m)}catch(u){return!1}},queryCommandValue:function(m){if(this.disabled||!this._disabledOK)return!1;m=this._normalizeCommand(m);if(t("ie")&&"formatblock"===m)m=this._native2LocalFormatNames[this.document.queryCommandValue(m)];else if(t("mozilla")&&"hilitecolor"===m){try{var u=this.document.queryCommandValue("styleWithCSS")}catch(D){u=!1}this.document.execCommand("styleWithCSS",!1,!0);m=this.document.queryCommandValue(m);this.document.execCommand("styleWithCSS",
!1,u)}else m=this.document.queryCommandValue(m);return m},_sCall:function(m,u){return this.selection[m].apply(this.selection,u)},placeCursorAtStart:function(){this.focus();var m=!1;if(t("mozilla"))for(var u=this.editNode.firstChild;u;){if(3===u.nodeType){if(0<u.nodeValue.replace(/^\s+|\s+$/g,"").length){m=!0;this.selection.selectElement(u);break}}else if(1===u.nodeType){m=!0;var D=u.tagName?u.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(D)?this.selection.selectElement(u):
this.selection.selectElementChildren(u);break}u=u.nextSibling}else m=!0,this.selection.selectElementChildren(this.editNode);m&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var m=!1;if(t("mozilla"))for(var u=this.editNode.lastChild;u;){if(3===u.nodeType){if(0<u.nodeValue.replace(/^\s+|\s+$/g,"").length){m=!0;this.selection.selectElement(u);break}}else if(1===u.nodeType){m=!0;this.selection.selectElement(u.lastChild||u);break}u=u.previousSibling}else m=!0,this.selection.selectElementChildren(this.editNode);
m&&this.selection.collapse(!1)},getValue:function(m){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,m):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(m){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){m=this._preFilterContent(m);var u=this.isClosed?this.domNode:this.editNode;u.innerHTML=m;this._preDomFilterContent(u)}else this.textarea.value=m;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(p.hitch(this,function(){this.setValue(m)}))},replaceValue:function(m){this.isClosed?this.setValue(m):this.window&&this.window.getSelection&&!t("mozilla")?this.setValue(m):this.window&&this.window.getSelection?(m=this._preFilterContent(m),this.execCommand("selectall"),this.execCommand("inserthtml",m),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(m);this._set("value",this.getValue(!0))},_preFilterContent:function(m){var u=
m;v.forEach(this.contentPreFilters,function(D){D&&(u=D(u))});return u},_preDomFilterContent:function(m){m=m||this.editNode;v.forEach(this.contentDomPreFilters,function(u){u&&p.isFunction(u)&&u(m)},this)},_postFilterContent:function(m,u){if(p.isString(m))var D=m;else m=m||this.editNode,this.contentDomPostFilters.length&&(u&&(m=p.clone(m)),v.forEach(this.contentDomPostFilters,function(M){m=M(m)})),D=n.getChildrenHtml(m);p.trim(D.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(D="");v.forEach(this.contentPostFilters,
function(M){D=M(D)});return D},_saveContent:function(){var m=h.byId(H._scopeName+"._editor.RichText.value");m&&(m.value&&(m.value+=this._SEPARATOR),m.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(m,u){m=m.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");u||(m=m.replace(/'/gm,"\x26#39;"));return m},getNodeHtml:function(m){f.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return n.getNodeHtml(m)},getNodeChildrenHtml:function(m){f.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return n.getChildrenHtml(m)},close:function(m){if(!this.isClosed){arguments.length||(m=!0);m&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);t("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var u=this.textarea.style;u.position="";u.left=u.top="";t("ie")&&(u.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;b.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);K._globalSaveHandler&&delete K._globalSaveHandler[this.id]},_removeMozBogus:function(m){return m.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(m){m=m.replace(/\sclass="webkit-block-placeholder"/gi,"");m=m.replace(/\sclass="apple-style-span"/gi,
"");return m=m.replace(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(m){return m.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(m){return m.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(m){if(!m)return!1;
if(t("ie")||t("trident")||t("edge"))return this.focused&&!this.disabled;var u=9>t("ie")?this.document.selection.createRange():this.document;try{return u.queryCommandEnabled(m)}catch(D){return!1}},_createlinkEnabledImpl:function(){var m=!0;return m=t("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var m=!0;return m=t("mozilla")||t("webkit")||t("ie")||t("trident")||t("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var m=!0;return m=t("mozilla")||t("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var m=!0;t("webkit")?((m=this.window.getSelection())&&(m=m.toString()),m=!!m):m=this._browserQueryCommandEnabled("cut");return m},_copyEnabledImpl:function(){var m=!0;t("webkit")?((m=this.window.getSelection())&&(m=m.toString()),m=!!m):m=this._browserQueryCommandEnabled("copy");
return m},_pasteEnabledImpl:function(){var m=!0;return t("webkit")?!0:m=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(m){return t("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,m)},_unlinkImpl:function(m){return this.queryCommandEnabled("unlink")&&(t("mozilla")||t("webkit"))?(m=this.selection.getAncestorElement("a"),this.selection.selectElement(m),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,m)},_hilitecolorImpl:function(m){if(!this._handleTextColorOrProperties("hilitecolor",m))if(t("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var u=this.document.execCommand("hilitecolor",!1,m);this.document.execCommand("styleWithCSS",!1,!1)}else u=this.document.execCommand("hilitecolor",!1,m);return u},_backcolorImpl:function(m){t("ie")&&(m=m?m:null);var u=this._handleTextColorOrProperties("backcolor",m);u||(u=this.document.execCommand("backcolor",
!1,m));return u},_forecolorImpl:function(m){t("ie")&&(m=m?m:null);var u=!1;(u=this._handleTextColorOrProperties("forecolor",m))||(u=this.document.execCommand("forecolor",!1,m));return u},_inserthtmlImpl:function(m){m=this._preFilterContent(m);var u=!0;if(9>t("ie")){var D=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var M=D.item(0);D.length;)D.remove(D.item(0));M.outerHTML=m}else D.pasteHTML(m);D.select()}else if(8>t("trident")){var L=w.getSelection(this.window);
if(L&&L.rangeCount&&L.getRangeAt){D=L.getRangeAt(0);D.deleteContents();var N=b.create("div");N.innerHTML=m;for(M=this.document.createDocumentFragment();m=N.firstChild;)var O=M.appendChild(m);D.insertNode(M);O&&(D=D.cloneRange(),D.setStartAfter(O),D.collapse(!1),L.removeAllRanges(),L.addRange(D))}}else t("mozilla")&&!m.length?this.selection.remove():u=this.document.execCommand("inserthtml",!1,m);return u},_boldImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),u=this._adaptIEFormatAreaAndExec("bold");
u||(u=this.document.execCommand("bold",!1,m));return u},_italicImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),u=this._adaptIEFormatAreaAndExec("italic");u||(u=this.document.execCommand("italic",!1,m));return u},_underlineImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),u=this._adaptIEFormatAreaAndExec("underline");u||(u=this.document.execCommand("underline",!1,m));return u},_strikethroughImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),
u=this._adaptIEFormatAreaAndExec("strikethrough");u||(u=this.document.execCommand("strikethrough",!1,m));return u},_superscriptImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),u=this._adaptIEFormatAreaAndExec("superscript");u||(u=this.document.execCommand("superscript",!1,m));return u},_subscriptImpl:function(m){var u=!1;if(t("ie")||t("trident"))this._adaptIESelection(),u=this._adaptIEFormatAreaAndExec("subscript");u||(u=this.document.execCommand("subscript",!1,m));return u},
_fontnameImpl:function(m){if(t("ie")||t("trident"))var u=this._handleTextColorOrProperties("fontname",m);u||(u=this.document.execCommand("fontname",!1,m));return u},_fontsizeImpl:function(m){if(t("ie")||t("trident"))var u=this._handleTextColorOrProperties("fontsize",m);u||(u=this.document.execCommand("fontsize",!1,m));return u},_insertorderedlistImpl:function(m){var u=!1;if(t("ie")||t("trident")||t("edge"))u=this._adaptIEList("insertorderedlist",m);u||(u=this.document.execCommand("insertorderedlist",
!1,m));return u},_insertunorderedlistImpl:function(m){var u=!1;if(t("ie")||t("trident")||t("edge"))u=this._adaptIEList("insertunorderedlist",m);u||(u=this.document.execCommand("insertunorderedlist",!1,m));return u},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(m){var u=0;if(m&&m.childNodes){var D;for(D=0;D<m.childNodes.length;D++){var M=d.position(m.childNodes[D]);
u+=M.h}}return u},_isNodeEmpty:function(m,u){return 1===m.nodeType?0<m.childNodes.length?this._isNodeEmpty(m.childNodes[0],u):!0:3===m.nodeType?""===m.nodeValue.substring(u):!1},_removeStartingRangeFromRange:function(m,u){if(m.nextSibling)u.setStart(m.nextSibling,0);else{for(m=m.parentNode;m&&null==m.nextSibling;)m=m.parentNode;m&&u.setStart(m.nextSibling,0)}return u},_adaptIESelection:function(){var m=w.getSelection(this.window);if(m&&m.rangeCount&&!m.isCollapsed){for(var u=m.getRangeAt(0),D=u.startContainer,
M=u.startOffset;3===D.nodeType&&M>=D.length&&D.nextSibling;)M-=D.length,D=D.nextSibling;for(var L=null;this._isNodeEmpty(D,M)&&D!==L;)L=D,u=this._removeStartingRangeFromRange(D,u),D=u.startContainer,M=0;m.removeAllRanges();m.addRange(u)}},_adaptIEFormatAreaAndExec:function(m){var u=w.getSelection(this.window),D=this.document,M;if(m&&u&&u.isCollapsed){if(this.queryCommandValue(m)){m=this._tagNamesForCommand(m);var L=u.getRangeAt(0);var N=L.startContainer;if(3===N.nodeType){var O=L.endOffset;N.length<
O&&(O=this._adjustNodeAndOffset(Q,O),N=O.node,O=O.offset)}for(;N&&N!==this.editNode;){var Q=N.tagName?N.tagName.toLowerCase():"";if(-1<v.indexOf(m,Q)){var P=N;break}N=N.parentNode}if(P&&(Q=L.startContainer,m=D.createElement(P.tagName),b.place(m,P,"after"),Q&&3===Q.nodeType)){O=L.endOffset;Q.length<O&&(O=this._adjustNodeAndOffset(Q,O),Q=O.node,O=O.offset);N=Q.nodeValue;L=D.createTextNode(N.substring(0,O));var S=N.substring(O,N.length);S&&(M=D.createTextNode(S));b.place(L,Q,"before");if(M){var R=D.createElement("span");
R.className="ieFormatBreakerSpan";b.place(R,Q,"after");b.place(M,R,"after");M=R}b.destroy(Q);O=L.parentNode;for(Q=[];O!==P;){N=O.tagName;L={tagName:N};Q.push(L);N=D.createElement(N);O.style&&N.style&&O.style.cssText&&(N.style.cssText=O.style.cssText,L.cssText=O.style.cssText);"FONT"===O.tagName&&(O.color&&(N.color=O.color,L.color=O.color),O.face&&(N.face=O.face,L.face=O.face),O.size&&(N.size=O.size,L.size=O.size));O.className&&(N.className=O.className,L.className=O.className);if(M)for(;M;)L=M.nextSibling,
N.appendChild(M),M=L;N.tagName==O.tagName?(R=D.createElement("span"),R.className="ieFormatBreakerSpan",b.place(R,O,"after"),b.place(N,R,"after")):b.place(N,O,"after");L=O;M=N;O=O.parentNode}if(M){if(1===M.nodeType||3===M.nodeType&&M.nodeValue)m.innerHTML="";for(;M;)L=M.nextSibling,m.appendChild(M),M=L}if(Q.length){L=Q.pop();M=D.createElement(L.tagName);L.cssText&&M.style&&(M.style.cssText=L.cssText);L.className&&(M.className=L.className);"FONT"===L.tagName&&(L.color&&(M.color=L.color),L.face&&(M.face=
L.face),L.size&&(M.size=L.size));for(b.place(M,m,"before");Q.length;)L=Q.pop(),P=D.createElement(L.tagName),L.cssText&&P.style&&(P.style.cssText=L.cssText),L.className&&(P.className=L.className),"FONT"===L.tagName&&(L.color&&(P.color=L.color),L.face&&(P.face=L.face),L.size&&(P.size=L.size)),M.appendChild(P),M=P;P=D.createTextNode(".");R.appendChild(P);M.appendChild(P)}else R=D.createElement("span"),R.className="ieFormatBreakerSpan",P=D.createTextNode("."),R.appendChild(P),b.place(R,m,"before");M=
w.create(this.window);M.setStart(P,0);M.setEnd(P,P.length);u.removeAllRanges();u.addRange(M);this.selection.collapse(!1);P.parentNode.innerHTML="";m.firstChild||b.destroy(m);return!0}return!1}L=u.getRangeAt(0);if((Q=L.startContainer)&&3===Q.nodeType)return O=L.startOffset,Q.length<O&&(O=this._adjustNodeAndOffset(Q,O),Q=O.node,O=O.offset),N=Q.nodeValue,L=D.createTextNode(N.substring(0,O)),S=N.substring(O),""!==S&&(M=D.createTextNode(N.substring(O))),R=D.createElement("span"),P=D.createTextNode("."),
R.appendChild(P),L.length?b.place(L,Q,"after"):L=Q,b.place(R,L,"after"),M&&b.place(M,R,"after"),b.destroy(Q),M=w.create(this.window),M.setStart(P,0),M.setEnd(P,P.length),u.removeAllRanges(),u.addRange(M),D.execCommand(m),b.place(R.firstChild,R,"before"),b.destroy(R),M.setStart(P,0),M.setEnd(P,P.length),u.removeAllRanges(),u.addRange(M),this.selection.collapse(!1),P.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(m){var u=w.getSelection(this.window);if(u.isCollapsed&&u.rangeCount&&
!this.queryCommandValue(m)){var D=u.getRangeAt(0),M=D.startContainer;if(M&&3==M.nodeType&&!D.startOffset)return D="ul","insertorderedlist"===m&&(D="ol"),m=this.document.createElement(D),D=b.create("li",null,m),b.place(m,M,"before"),D.appendChild(M),b.create("br",null,m,"after"),m=w.create(this.window),m.setStart(M,0),m.setEnd(M,M.length),u.removeAllRanges(),u.addRange(m),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(m,u){var D=w.getSelection(this.window),M=this.document,
L,N;u=u||null;if(m&&D&&D.isCollapsed&&D.rangeCount){var O=D.getRangeAt(0);if((L=O.startContainer)&&3===L.nodeType){var Q=O.startOffset;L.length<Q&&(O=this._adjustNodeAndOffset(L,Q),L=O.node,Q=O.offset);var P=L.nodeValue;O=M.createTextNode(P.substring(0,Q));""!==P.substring(Q)&&(N=M.createTextNode(P.substring(Q)));P=M.createElement("span");Q=M.createTextNode(".");P.appendChild(Q);M=M.createElement("span");P.appendChild(M);O.length?b.place(O,L,"after"):O=L;b.place(P,O,"after");N&&b.place(N,P,"after");
b.destroy(L);L=w.create(this.window);L.setStart(Q,0);L.setEnd(Q,Q.length);D.removeAllRanges();D.addRange(L);if(t("webkit")){D="color";if("hilitecolor"===m||"backcolor"===m)D="backgroundColor";a.set(P,D,u);this.selection.remove();b.destroy(M);P.innerHTML="\x26#160;";this.selection.selectElement(P);this.focus()}else this.execCommand(m,u),b.place(P.firstChild,P,"before"),b.destroy(P),L.setStart(Q,0),L.setEnd(Q,Q.length),D.removeAllRanges(),D.addRange(L),this.selection.collapse(!1),Q.parentNode.removeChild(Q);
return!0}}return!1},_adjustNodeAndOffset:function(m,u){for(;m.length<u&&m.nextSibling&&3===m.nextSibling.nodeType;)u-=m.length,m=m.nextSibling;return{node:m,offset:u}},_tagNamesForCommand:function(m){return"bold"===m?["b","strong"]:"italic"===m?["i","em"]:"strikethrough"===m?["s","strike"]:"superscript"===m?["sup"]:"subscript"===m?["sub"]:"underline"===m?["u"]:[]},_stripBreakerNodes:function(m){if(this.isLoaded)return l(".ieFormatBreakerSpan",m).forEach(function(u){for(;u.firstChild;)b.place(u.firstChild,
u,"before");b.destroy(u)}),m},_stripTrailingEmptyNodes:function(m){function u(D){return/^(p|div|br)$/i.test(D.nodeName)&&0==D.children.length&&/^[\s\xA0]*$/.test(D.textContent||D.innerText||"")||3===D.nodeType&&/^[\s\xA0]*$/.test(D.nodeValue)}for(;m.lastChild&&u(m.lastChild);)b.destroy(m.lastChild);return m},_setTextDirAttr:function(m){this._set("textDir",m);this.onLoadDeferred.then(p.hitch(this,function(){this.editNode.dir=m}))}});return K})},"dijit/_editor/range":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/lang"],function(v,z,C){var r={getIndex:function(e,b){for(var d=[],a=[],f=e,g,p;e!=b;){var A=0;for(g=e.parentNode;p=g.childNodes[A++];)if(p===e){--A;break}d.unshift(A);a.unshift(A-g.childNodes.length);e=g}if(0<d.length&&3==f.nodeType){for(p=f.previousSibling;p&&3==p.nodeType;)d[d.length-1]--,p=p.previousSibling;for(p=f.nextSibling;p&&3==p.nodeType;)a[a.length-1]++,p=p.nextSibling}return{o:d,r:a}},getNode:function(e,b){if(!C.isArray(e)||0==e.length)return b;var d=b;
v.every(e,function(a){if(0<=a&&a<d.childNodes.length)d=d.childNodes[a];else return d=null,!1;return!0});return d},getCommonAncestor:function(e,b,d){d=d||e.ownerDocument.body;var a=function(p){for(var A=[];p;)if(A.unshift(p),p!==d)p=p.parentNode;else break;return A};e=a(e);b=a(b);a=Math.min(e.length,b.length);for(var f=e[0],g=1;g<a;g++)if(e[g]===b[g])f=e[g];else break;return f},getAncestor:function(e,b,d){for(d=d||e.ownerDocument.body;e&&e!==d;){var a=e.nodeName.toUpperCase();if(b.test(a))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,b,d){d=d||e.ownerDocument.body;b=b||r.BlockTagNames;for(var a=null,f;e&&e!==d;){var g=e.nodeName.toUpperCase();!a&&b.test(g)&&(a=e);!f&&/^(?:BODY|TD|TH|CAPTION)$/.test(g)&&(f=e);e=e.parentNode}return{blockNode:a,blockContainer:f||e.ownerDocument.body}},atBeginningOfContainer:function(e,b,d){var a=!1,f=0==d;f||3!=b.nodeType||/^[\s\xA0]+$/.test(b.nodeValue.substr(0,d))&&(f=
!0);if(f)for(a=!0;b&&b!==e;){if(b.previousSibling){a=!1;break}b=b.parentNode}return a},atEndOfContainer:function(e,b,d){var a=!1,f=d==(b.length||b.childNodes.length);f||3!=b.nodeType||/^[\s\xA0]+$/.test(b.nodeValue.substr(d))&&(f=!0);if(f)for(a=!0;b&&b!==e;){if(b.nextSibling){a=!1;break}b=b.parentNode}return a},adjacentNoneTextNode:function(e,b){var d=e;e=0-e.length||0;for(b=b?"nextSibling":"previousSibling";d&&3==d.nodeType;)e+=d.length,d=d[b];return[d,e]},create:function(e){e=e||window;return e.getSelection?
e.document.createRange():new c},getSelection:function(e,b){if(e.getSelection)return e.getSelection();e=new h.selection(e);b||e._getCurrentSelection();return e}};if(!window.getSelection)var h=r.ie={cachedSelection:{},selection:function(e){this._ranges=[];this.addRange=function(b,d){this._ranges.push(b);d||b._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(b){return this._ranges[b]};this._getCurrentSelection=function(){this.removeAllRanges();
var b=e.document.selection.createRange();b="CONTROL"==e.document.selection.type.toUpperCase()?new c(h.decomposeControlRange(b)):new c(h.decomposeTextRange(b));this.addRange(b,!0),this.isCollapsed=b.collapsed}},decomposeControlRange:function(e){var b=e.item(0),d=e.item(e.length-1);e=b.parentNode;var a=d.parentNode;b=r.getIndex(b,e).o[0];d=r.getIndex(d,a).o[0]+1;return[e,b,a,d]},getEndPoint:function(e,b){var d=e.duplicate();d.collapse(!b);var a="EndTo"+(b?"End":"Start"),f=d.parentElement(),g;if(0<f.childNodes.length)v.every(f.childNodes,
function(l,k){if(3!=l.nodeType)if(d.moveToElementText(l),0<d.compareEndPoints(a,e))if(g&&3==g.nodeType){p=g;var t=!0}else return p=f,A=k,!1;else{if(k==f.childNodes.length-1)return p=f,A=f.childNodes.length,!1}else k==f.childNodes.length-1&&(p=l,t=!0);if(t&&p)return p=(l=r.adjacentNoneTextNode(p)[0])?l.nextSibling:f.firstChild,k=r.adjacentNoneTextNode(p),l=k[0],k=k[1],l?(d.moveToElementText(l),d.collapse(!1)):d.moveToElementText(f),d.setEndPoint(a,e),A=d.text.length-k,!1;g=l;return!0});else{var p=
f;var A=0}b||1!=p.nodeType||A!=p.childNodes.length||(b=p.nextSibling)&&3==b.nodeType&&(p=b,A=0);return[p,A]},setEndPoint:function(e,b,d){e=e.duplicate();var a;if(3!=b.nodeType)if(0<d){if(a=b.childNodes[d-1])if(3==a.nodeType)b=a,d=a.length;else if(a.nextSibling&&3==a.nextSibling.nodeType)b=a.nextSibling,d=0;else{e.moveToElementText(a.nextSibling?a:b);var f=a.parentNode;a=f.insertBefore(a.ownerDocument.createTextNode(" "),a.nextSibling);e.collapse(!1);f.removeChild(a)}}else e.moveToElementText(b),e.collapse(!0);
3==b.nodeType&&(a=r.adjacentNoneTextNode(b),f=a[0],a=a[1],f?(e.moveToElementText(f),e.collapse(!1),"inherit"!=f.contentEditable&&a++):(e.moveToElementText(b.parentNode),e.collapse(!0),e.move("character",1),e.move("character",-1)),d+=a,0<d&&e.move("character",d)!=d&&console.error("Error when moving!"));return e},decomposeTextRange:function(e){var b=h.getEndPoint(e),d=b[0],a=b[1],f=b[0];b=b[1];e.htmlText.length&&(e.htmlText==e.text?b=a+e.text.length:(b=h.getEndPoint(e,!0),f=b[0],b=b[1]));return[d,a,
f,b]},setRange:function(e,b,d,a,f,g){b=h.setEndPoint(e,b,d);e.setEndPoint("StartToStart",b);if(!g)var p=h.setEndPoint(e,a,f);e.setEndPoint("EndToEnd",p||b);return e}},c=r.W3CRange=z(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?r.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(e,b){b=parseInt(b);if(this.startContainer!==e||this.startOffset!=b)delete this._cachedBookmark,this.startContainer=e,this.startOffset=b,this.endContainer?this._updateInternal():this.setEnd(e,b)},setEnd:function(e,b){b=parseInt(b);if(this.endContainer!==e||this.endOffset!=b)delete this._cachedBookmark,
this.endContainer=e,this.endOffset=b,this.startContainer?this._updateInternal():this.setStart(e,b)},setStartAfter:function(e,b){this._setPoint("setStart",e,b,1)},setStartBefore:function(e,b){this._setPoint("setStart",e,b,0)},setEndAfter:function(e,b){this._setPoint("setEnd",e,b,1)},setEndBefore:function(e,b){this._setPoint("setEnd",e,b,0)},_setPoint:function(e,b,d,a){d=r.getIndex(b,b.parentNode).o;this[e](b.parentNode,d.pop()+a)},_getIERange:function(){var e=(this._body||this.endContainer.ownerDocument.body).createTextRange();
h.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,b=this._getIERange();3!==e.nodeType||this.startOffset||this.setStartBefore(e);b.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}});C.setObject("dijit.range",r);return r})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(v,z,C){var r={};z.setObject("dijit._editor.html",r);var h=r.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};r.getNodeHtml=function(c){var e=[];r.getNodeHtmlHelper(c,e);return e.join("")};r.getNodeHtmlHelper=function(c,e){switch(c.nodeType){case 1:var b=c.nodeName.toLowerCase();if(!b||"/"==b.charAt(0))return"";e.push("\x3c",b);var d=[],a={},f;if(C("dom-attributes-explicit")||C("dom-attributes-specified-flag"))for(var g=0;f=c.attributes[g++];){var p=f.name;"_dj"===p.substr(0,3)||C("dom-attributes-specified-flag")&&
!f.specified||p in a||(f=f.value,("src"==p||"href"==p)&&c.getAttribute("_djrealurl")&&(f=c.getAttribute("_djrealurl")),8===C("ie")&&"style"===p&&(f=f.replace("HEIGHT:","height:").replace("WIDTH:","width:")),d.push([p,f]),a[p]=f)}else{var A=(/^input$|^img$/i.test(c.nodeName)?c:c.cloneNode(!1)).outerHTML;a=A.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);A=A.substr(0,A.indexOf("\x3e"));v.forEach(a,function(l){if(l){var k=l.indexOf("\x3d");if(0<k&&(l=l.substring(0,k),"_dj"!=l.substr(0,3)))if("src"!=l&&"href"!=
l||!c.getAttribute("_djrealurl")){switch(l){case "style":var t=c.style.cssText.toLowerCase();break;case "class":t=c.className;break;case "width":if("img"===b){(k=/width=(\S+)/i.exec(A))&&(t=k[1]);break}case "height":if("img"===b){(k=/height=(\S+)/i.exec(A))&&(t=k[1]);break}default:t=c.getAttribute(l)}null!=t&&d.push([l,t.toString()])}else d.push([l,c.getAttribute("_djrealurl")])}},this)}d.sort(function(l,k){return l[0]<k[0]?-1:l[0]==k[0]?0:1});for(a=0;f=d[a++];)e.push(" ",f[0],'\x3d"',"string"===
typeof f[1]?h(f[1],!0):f[1],'"');switch(b){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/",b,"\x3e");break;default:e.push("\x3e"),c.hasChildNodes()&&r.getChildrenHtmlHelper(c,e),e.push("\x3c/",b,"\x3e")}break;case 4:case 3:e.push(h(c.nodeValue,!0));break;case 8:e.push("\x3c!--",h(c.nodeValue,!0),"--\x3e");break;default:e.push("\x3c!-- Element not recognized - Type: ",c.nodeType," Name: ",
c.nodeName,"--\x3e")}};r.getChildrenHtml=function(c){var e=[];r.getChildrenHtmlHelper(c,e);return e.join("")};r.getChildrenHtmlHelper=function(c,e){if(c)for(var b=c.childNodes||c,d=!C("ie")||b!==c,a,f=0;a=b[f++];)d&&a.parentNode!=c||r.getNodeHtmlHelper(a,e)};return r})},"esri/dijit/geoenrichment/SelectableTree":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Evented ./when dojo/store/util/QueryResults dojo/store/util/SimpleQueryEngine dstore/QueryResults".split(" "),function(v,
z,C,r,h,c,e,b){var d=function(a,f){this.storage=a;this.data=f};d.prototype={storage:null,data:null,filter:function(a){return this.storage._filter(this.data,a)},sort:function(a,f){return this.storage._sort(this.data,a,f)},fetch:function(){return this.storage._fetchRange(this.data)},fetchRange:function(a){return this.storage._fetchRange(this.data,a)},mayHaveChildren:function(a){return this.storage.mayHaveChildren(a)},getChildren:function(a){return this.storage.getChildren(a,{returnCollection:!0})}};
return v(r,{idProperty:"id",bindingProperty:null,autoIdentify:!0,queryEngine:e,isDstoreTree:!1,root:null,data:null,_hash:null,_autoId:null,storage:null,constructor:function(a,f){z.mixin(this,f);this.storage=this;this.root={children:a||[]};z.mixin(this._provideBinding(this.root),{deepness:-1,selectCount:0,leafCount:0});this._hash={};this.idProperty&&this.autoIdentify&&(this._autoId=1);this._initializeNode(this.root,0);this.data=this.root.children},_provideBinding:function(a){var f=this._getBinding(a);
f||(a[this.bindingProperty]=f={});return f},_getBinding:function(a){return this.bindingProperty?a[this.bindingProperty]:a},_initializeNode:function(a,f){var g=this._provideBinding(a);g.selected=!!g.selected;a.children?(g.selectCount=0,g.leafCount=0,C.forEach(a.children,function(p){this._registerNode(p);var A=this._provideBinding(p);A.parent=a;A.deepness=f;this._initializeNode(p,f+1);g.selectCount+=A.selectCount;g.leafCount+=A.leafCount},this),g.selectCount)?g.selectCount===g.leafCount&&(g.selected=
!0):g.selected=!1:("number"!==typeof g.leafCount&&(g.leafCount=1),g.selectCount=g.selected?g.leafCount:0)},isOwned:function(a,f){return f||a!==this.root?this.get(this.getIdentity(a))===a:!0},_registerNode:function(a){this._autoId&&void 0===a[this.idProperty]&&(a[this.idProperty]=this._autoId++);this.idProperty&&(this._hash[a[this.idProperty]]=a)},_unregisterNode:function(a){this.isOwned(a,!0)&&delete this._hash[a[this.idProperty]]},clear:function(){this.root.children.length&&(C.forEach(this.root.children,
function(a){this._unbindNode(a)},this),this.data=this.root.children=[])},destroy:function(){this.clear()},_unbindNode:function(a){a.children&&C.forEach(a.children,function(g){delete this._getBinding(g).parent;this._unbindNode(g)},this);this._unregisterNode(a);var f=this._getBinding(a);f.parent&&(this._incrementCounts(f.parent,-f.selectCount,-f.leafCount),delete f.parent);f!==a&&delete a[this.bindingProperty]},removeNodes:function(a,f){C.forEach(a&&a.slice(),function(g){if(this.isOwned(g,!0)){var p=
this._getBinding(g).parent,A=C.indexOf(p.children,g);0<=A&&p.children.splice(A,1);this._unbindNode(g)}},this);!f&&this.emit("updated")},addNodes:function(a,f,g){if(!f)f=this.root;else if(!this.isOwned(f)||!f.children)return!1;var p=this._getBinding(f).deepness+1,A=0,l=0;C.forEach(a,function(k){if(!this.isOwned(k)){f.children.push(k);this._registerNode(k);var t=this._provideBinding(k);t.parent=f;t.deepness=p;this._initializeNode(k,p+1);A+=t.selectCount;l+=t.leafCount}},this);this._incrementCounts(f,
A,l);!g&&this.emit("updated");return!0},select:function(a,f){return this.changeSelect(a,!0,f)},deselect:function(a){this.changeSelect(a,!1)},changeSelect:function(a,f,g){g=g||this.root.leafCount;var p=a&&this._getBinding(a);if(p){f=!!f;var A=(f?p.leafCount:0)-p.selectCount,l=0>A||this.root.selectCount+A<=g;if(!a.children)return l&&(p.selected=f,A&&this._incrementCounts(a,A)),l;l&&(p.selected=f);C.forEach(a.children,function(k){this.changeSelect(k,f,g)},this);return l}},_incrementCounts:function(a,
f,g){a=this._getBinding(a);a.selectCount+=f;g&&(a.leafCount+=g);a.selectCount?a.selectCount==a.leafCount&&(a.selected=!0):a.selected=!1;a.parent&&this._incrementCounts(a.parent,f,g)},getSelectionState:function(a){if(!this.isOwned(a))return!1;a=this._getBinding(a);return a.selectCount&&a.selectCount!=a.leafCount?"mixed":a.selected=!!a.selectCount},getSelectedNodes:function(a){return this.getDescendingNodes(this.root,!0,a)},getDescendingNodes:function(a,f,g){if(!this.isOwned(a))return[];var p=[];this._collectNodes(a.children,
p,f,g);return p},_collectNodes:function(a,f,g,p){C.forEach(a,function(A){var l=this._getBinding(A),k=null===g||void 0===g?l.leafCount:g?l.selectCount:l.leafCount-l.selectCount;k&&(!A.children||!p&&k==l.leafCount?f.push(A):this._collectNodes(A.children,f,g,p))},this)},inspectChildren:function(a,f,g,p){p&&(f=z.hitch(p,f));a=a||this.root;(a=a.children)&&g&&(a=a.slice(),a.sort(g));return C.every(a,function(A){var l=f(A);return null===l?!1:!1!==l&&A.children?this.inspectChildren(A,f,g):!0},this)},updateExpandedNodes:function(a,
f){for(var g in this._hash)this.updateExpand(this._hash[g],!!a[g]);this._updateOddEven(null,f)},updateExpand:function(a,f,g,p){if(a){var A=!1;a.children&&(a=this._getBinding(a),a.expanded!==f&&(A=!0,a.expanded=f));f={};A&&g&&this._updateOddEven(f,p);return f}},_updateOddEven:function(a,f){var g=1;this.inspectChildren(null,function(p){!1!==p.visible&&(g=1-g);var A=this._getBinding(p);a&&A.isOdd!==g&&(a[this.getIdentity(p)]=g);A.isOdd=g;return!(!p.children||!A.expanded)},f,this)},isOdd:function(a){return(a=
this._getBinding(a))&&a.isOdd},get:function(a){return this._hash[a]},getIdentity:function(a){return this.idProperty?a[this.idProperty]:null},query:function(a,f){return c(this._query(this.data,a,f))},_query:function(a,f,g){return this.queryEngine(f,g)(a)},filter:function(a){return this._filter(this.data,a)},_filter:function(a,f){a=this._query(a,f);return new d(this.storage,a)},sort:function(a,f){return this._sort(this.data,a,f)},_sort:function(a,f,g){"function"===typeof f?(a=a.slice(),a.sort(f)):(f=
Array.isArray(f)?f.map(function(p){return{attribute:p.property,descending:p.descending}}):[{attribute:f,descending:g}],a=this._query(a,{},{sort:f}));return new d(this.storage,a)},mayHaveChildren:function(a){return!!a.children},getChildren:function(a,f){var g=this.isOwned(a,!0)?a.children:null;a=this.isDstoreTree||f&&f.returnCollection;f=this.queryEngine({},a?null:f)(g||[]);return a?new d(this.storage,f):c(f)},fetch:function(){return this._fetchRange(this.data)},fetchRange:function(a){return this._fetchRange(this.data,
a)},_fetchRange:function(a,f){return b(h(f?a.slice(f.start,f.end):a.slice()),{totalLength:h(a.length)})}})})},"esri/dijit/geoenrichment/when":function(){define(["dojo/when"],function(v){return v})},"dstore/QueryResults":function(){define(["dojo/_base/lang","dojo/when"],function(v,z){function C(r,h){return z(this,function(c){for(var e=0,b=c.length;e<b;e++)r.call(h,c[e],e,c)})}return function(r,h){var c=h&&"totalLength"in h;if(r.then){r=v.delegate(r);var e=r.then(function(b){var d=c?h.totalLength:b.totalLength||
b.length;b.totalLength=d;return!c&&d});r.totalLength=c?h.totalLength:e;r.response=h&&h.response}else r.totalLength=c?h.totalLength:r.length;r.forEach=C;return r}})},"widgets/BusinessAnalyst/esriAnalystX/widgets/SelectableTreeGrid/SelectableTreeGrid":function(){define("dojo/_base/declare dojo/aspect dojo/Evented dojo/dom-class dojo/dom-construct dojo/dom-style dojo/on dojo/query dijit/Tooltip dijit/_WidgetBase ../../dijit/_TemplatedMixin dgrid/OnDemandGrid dgrid/tree esri/dijit/geoenrichment/utils/KeyboardUtil esri/dijit/geoenrichment/TriStateItem ../../dijit/utils/DgridUtil ../../dijit/utils/DomUtil ../../dijit/utils/MouseUtil ../../dijit/tooltips/TooltipUtil dojo/text!./templates/SelectableTreeGrid.html xstyle/css!./css/SelectableTreeGrid.css".split(" "),
function(v,z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t,F,I,B){var G=v(null,{_selectedRowInfos:null,_lastSelectedRowInfo:null,_outsideHandler:null,_isSelectionFrozen:!1,keepSelectionOnOutsideClick:!1,_previouslySelectedRowsByNode:null,constructor:function(){this._previouslySelectedRowsByNode=new WeakMap},buildRendering:function E(){this._selectedRowInfos={};this.inherited(E,arguments)},postCreate:function y(){this.inherited(y,arguments);r.add(this.domNode,"esriMapsAnalystXNonSelectable")},_reselectSingleNode:function(y){this.selectSingleRow(this._previouslySelectedRowsByNode.get(y),
y)},selectSingleRow:function(y,x){this.unselectAllRows();this._selectRow(y,x)},_selectRow:function(y,x){r.add(y,this.selectedRowClass);r.add(y,"row-level-"+this._getNodeLevel(x));var w=this.tree.getIdentity(x),n={row:y,node:x,nodeId:w,index:x.parent&&x.parent.children.indexOf(x)};this._lastSelectedRowInfo=this._selectedRowInfos[w]=n;this._previouslySelectedRowsByNode.set(x,y);var q=this;this._outsideHandler=this._outsideHandler||e(document.body,"click",function(){F.isMouseOver(q.domNode)||q._isSelectionFrozen||
q.keepSelectionOnOutsideClick||q.unselectAllRows()})},_unselectRow:function(y,x){delete this._selectedRowInfos[this.tree.getIdentity(x)];r.remove(y,this.selectedRowClass)},unselectAllRows:function(){for(var y in this._selectedRowInfos)r.remove(this._selectedRowInfos[y].row,this.selectedRowClass);this._selectedRowInfos={};this._lastSelectedRowInfo=null;this._outsideHandler&&this._outsideHandler.remove();this._outsideHandler=null},getSelectedRowNodes:function(){return this._getSelectedNodesRows().nodes},
selectRowNodes:function(y){var x=this;y&&y.forEach(function(w){var n=x.grid.row(w);n&&n.element&&x._selectRow(n.element,w)})},freezeRowSelection:function(){this._isSelectionFrozen=!0},unfreezeRowSelection:function(){this._isSelectionFrozen=!1},_getSelectedNodesRows:function(){var y=[],x=[],w=[],n;for(n in this._selectedRowInfos)w.push(this._selectedRowInfos[n]);w.sort(function(q,H){return q.index-H.index});w.forEach(function(q){y.push(q.node);x.push(q.row)});return{nodes:y,rows:x}},_emitSelectedRowsEvent:function(){var y=
this._getSelectedNodesRows();if(y.nodes.length)this.onRowsSelected(y.nodes,y.rows)}});return v([a,f,C,G],{templateString:B,tree:null,grid:null,gridClass:"",highlightSelected:!0,firstColumns:null,additionalColumns:null,showRootCheckbox:!0,showCheckboxColumn:!0,showHeader:!0,labelColumnField:"label",gridParams:null,keepContentUnderScroll:void 0,hideInvisibleExpandoIcons:!1,expandOnNodeClick:!1,checkLimit:0,checkLimitMessage:null,checkLimitMessageTimeout:5E3,handleMultipleCheck:!1,enableRowSelection:!1,
enableMultipleRowSelection:!1,allowSelectionFromManyParents:!1,selectedRowFilter:null,selectedRowClass:"row-selected",enableHeaderLabelToggleClick:!0,defaultExpand:null,fitParentSize:!1,renderAllRows:!1,rowPostProcessor:null,_rootCheckbox:null,_checkboxes:null,_lastCheckedNode:null,updateSelectionCountDiv:function(y,x){},getLabel:function(y,x){return y.label},postCreate:function x(){this.inherited(x,arguments);this._createGrid()},resize:function(){this.grid.resize();this._updateCheckboxState(this._rootCheckbox);
for(var x in this._checkboxes)this._updateCheckboxState(this._checkboxes[x]);this._emitSelectionChanged()},setWidth:function(x){this.grid&&this.grid.domNode&&c.set(this.grid.domNode,"width",x+"px")},setHeight:function(x){this.grid&&this.grid.domNode&&c.set(this.grid.domNode,"height",x+"px")},row:function(x){return this.grid.row(x)},cell:function(x){return this.grid.cell(x)},_labelColumn:null,_createGrid:function(){var x=this;this._checkboxes={};var w={label:this.getLabel(this.tree.root,!0),sortable:!1,
field:this.labelColumnField,renderCell:this._renderLabel.bind(this),renderHeaderCell:this._renderLabelHeader.bind(this,this.tree.root)},n;if(this.additionalColumns&&this.additionalColumns.length&&(n=this.additionalColumns.filter(function(H){return H.field===x.labelColumnField})[0])){for(var q in w)void 0===n[q]&&(n[q]=w[q]);w=n}w.indentWidth=w.indentWidth||16;this._labelColumn=w=this._prepareTreeColumn(w);q=[];this.firstColumns&&(q=q.concat(this.firstColumns));this.showCheckboxColumn&&q.push({label:"",
field:"checkbox",sortable:!1,renderCell:this._renderCheckboxForColumn.bind(this),renderHeaderCell:this._renderCheckboxForColumn.bind(this,this.tree.root)});n||q.push(w);this.additionalColumns&&(q=q.concat(this.additionalColumns));w=["esriMapsAnalystXSelectableTreeGrid"];this.gridClass&&w.push(this.gridClass);this.fitParentSize&&w.push("fitParentSize");w=Object.assign({class:w.join(" "),keepScrollPosition:!0,store:this.tree,columns:q},this.gridParams);this.grid=this._createGridObject(w,this.gridContainer);
this.own(this.grid);this.grid._expanded=this.defaultExpand||this.grid._expanded||{};k.oddEvenFix(this.grid);this.own(e(this.tree,"updated",this._onStoreUpdated.bind(this)));this._addKeepScrollHandlers();this._addGridHandlers();this.renderAllRows&&(this.grid.minRowsPerPage=1E4,this.grid.maxRowsPerPage=10250);this.grid.startup();I.autoTooltip(this.domNode);this.showHeader||r.add(this.domNode,"esriMapsAnalystXGridNoHeader");e(this.grid.domNode,".dgrid-expando-icon:click,.dgrid-content .dgrid-column-labelColumn:dblclick,.dgrid-content .dgrid-column-labelColumn:keydown",
function(H){(H=x.grid.row(H))&&x.onExpandChangedUser(H.data)})},_createGridObject:function(x,w){return new g(x,w)},onRowInserted:function(x,w){},_addGridHandlers:function(){function x(n,q){w.enableRowSelection&&q.parent&&(!w.selectedRowFilter||w.selectedRowFilter(q))&&(r.add(n,"esriMapsAnalystXClickable"),e(n,"click",function(H){setTimeout(function(){if(!w._isSelectionFrozen){if(H.shiftKey&&w.enableMultipleRowSelection){if(w._lastSelectedRowInfo&&w._lastSelectedRowInfo.row.parentNode&&w._lastSelectedRowInfo.node.parent===
q.parent){var K=t.getChildIndex(w._lastSelectedRowInfo.row.parentNode,w._lastSelectedRowInfo.row),m=t.getChildIndex(n.parentNode,n),u=K<=m?w._lastSelectedRowInfo.row:n;K=K<=m?n:w._lastSelectedRowInfo.row;m=u;if(u.id!==K.id){do{u=w.grid.row(m).data;w._selectRow(m,u);if(m.id===K.id)break;m=m.nextSibling}while(m)}}else w.selectSingleRow(n,q);t.stealFocus()}else A.isCtrl(H)&&w.enableMultipleRowSelection?w._lastSelectedRowInfo&&w._lastSelectedRowInfo.row.parentNode&&w._lastSelectedRowInfo.node.parent===
q.parent||w.allowSelectionFromManyParents?w._selectedRowInfos[q.id]?w._unselectRow(n,q):w._selectRow(n,q):w.selectSingleRow(n,q):w.selectSingleRow(n,q);w._emitSelectedRowsEvent()}})}))}var w=this;this.own(z.after(this.grid,"insertRow",function(n){var q=n&&w.grid._rowIdToObject[n.id];if(n){if(q&&w.hideInvisibleExpandoIcons&&(!q.children||!q.children.length)){var H=b(".dgrid-expando-icon",n)[0];H&&(H.style.width="0")}t[q&&!1===q.visible?"hide":"show"](n);x(n,q)}q&&(w._updateRowHighlighting(q,n),w.onRowInserted(n,
q));w.rowPostProcessor&&w.rowPostProcessor(n,q);return n}))},_addKeepScrollHandlers:function(){function x(n){if(!w.grid.contentNode)return n;if(w.fitParentSize){var q=t.hasScrollbars(w.grid.bodyNode);w.grid.headerNode.style[w.isLeftToRight()?"right":"left"]=q.w?"":"0px";w._lastContentWidth=w.grid.contentNode.style.width||w._lastContentWidth||"";w.grid.contentNode.style.width=q.h?w._lastContentWidth:""}else w.keepContentUnderScroll?w.grid.contentNode.style.width=w.grid.headerNode.firstChild.offsetWidth+
"px":!1===w.keepContentUnderScroll&&(w.grid.contentNode.style.width="");return n}var w=this;if(this.fitParentSize||void 0!==this.keepContentUnderScroll)z.before(this.grid,"refresh",function(){w.hideCheckLimitMessage();w._lastCheckedNode=null}),z.after(this.grid,"resize",x),z.after(this.grid,"refresh",x)},_getNodeLevel:function(x){var w=-1;for(x=x&&x.parent;x;)w++,x=x.parent;return w},_prepareTreeColumn:function(x){return this._wrapTreeColumn(p(x))},_wrapTreeColumn:function(x){return x},_onStoreUpdated:function(){this._checkboxes=
{};this._refreshGrid();this._rootCheckbox&&this._updateCheckboxState(this._rootCheckbox);this._emitSelectionChanged()},_emitSelectionChanged:function(x){var w=this.tree.root.selectCount;this.updateSelectionCountDiv(this.selectionCounter,w);this.emit("SelectionChanged",{selected:w,toggledTreeNode:x})},refresh:function(){this._refreshGrid();this.refreshCheckboxes()},_isRefreshSuspended:!1,setRefreshSuspended:function(x){this._isRefreshSuspended=x},_refreshGrid:function(){if(!this._isRefreshSuspended){var x=
this.grid.getScrollPosition();this.grid.refresh();this.grid.scrollTo(x);for(var w in this._selectedRowInfos)this.grid.row(this._selectedRowInfos[w].node).element&&this._selectRow(this.grid.row(this._selectedRowInfos[w].node).element,this._selectedRowInfos[w].node)}},getScrollPosition:function(){return this.grid&&this.grid.getScrollPosition()},setScrollPosition:function(x){return this.grid&&this.grid.scrollTo(x)},_renderCheckbox:function(x){if(!x.leafCount&&x!==this.tree.root||!this.showCheckboxColumn||
!1===x.selectable&&void 0===x.indepSelection)return document.createTextNode("");var w=new l(null,{class:"esriStyleInTable"});w.autoToggle=!1;w.node=x;this._updateCheckboxState(w,x);!1===x.enabled&&w.set("disabled",!0);x===this.tree.root?(this._rootCheckbox=w,t[this.showRootCheckbox?"show":"hide"](w.domNode)):this._checkboxes[this.tree.getIdentity(x)]=w;w.onClick=this._onCheckboxClick.bind(this,x,w);return w},_renderCheckboxForColumn:function(x){return(x=this._renderCheckbox(x))&&x.domNode},refreshCheckboxes:function(){this._rootCheckbox&&
this._updateCheckboxState(this._rootCheckbox);for(var x in this._checkboxes)this._updateCheckboxState(this._checkboxes[x])},clearLastCheckInfo:function(){this._lastCheckedNode=null},_onCheckboxClick:function(x,w,n){n.stopPropagation();this.hideCheckLimitMessage();var q=this.handleMultipleCheck&&("function"!==typeof this.handleMultipleCheck||this.handleMultipleCheck(x));q&&n.shiftKey&&this._tryToggleMultipleNodes(this._lastCheckedNode,x,w||n)?this._lastCheckedNode=x:(this._lastCheckedNode=q?x:null,
this._toggleNodeSelection(x,w||n),this.refreshCheckboxes())},_tryToggleMultipleNodes:function(x,w,n){if(!x||x===w||x.parent!==w.parent)return!1;var q=w.parent.children,H=q.indexOf(x);w=q.indexOf(w);x=H<w?1:-1;var K=[],m=[];for(H+=x;;H+=x){var u=q[H];((void 0===u.indepSelection?u.selected:u.indepSelection)?K:m).push(u);if(H===w)break}K.forEach(function(D){this._toggleNodeSelection(D,n)},this);m.every(function(D){return this._toggleNodeSelection(D,n)},this);this.refreshCheckboxes();return!0},_toggleNodeSelection:function(x,
w){var n=void 0===x.indepSelection?!x.selected:!x.indepSelection;if(n&&this.checkLimit){var q=this.getSelectedNodes().length,H="function"===typeof this.checkLimit?this.checkLimit(this.tree,q):this.checkLimit;if(q>=H)if(void 0===x.indepSelection&&x.children&&!1!==this.tree.getSelectionState(x))n=!1;else return this.showCheckLimitMessage(w),!1}q=!0;void 0===x.indepSelection?(q=this.tree.changeSelect(x,n,H),!q&&this.showCheckLimitMessage(w)):x.indepSelection=n;this._emitSelectionChanged(x);return q},
_checkLimitHandler:null,showCheckLimitMessage:function(x){if(this.checkLimitMessage){var w=x&&(x.domNode||x.target);w&&(d.show(this.checkLimitMessage,w,["above","below"]),x=function(){w&&d.hide(w);w=null},setTimeout(x,this.checkLimitMessageTimeout),this._checkLimitHandler=x,this.onCheckLimitReached(x))}},hideCheckLimitMessage:function(){this._checkLimitHandler&&this._checkLimitHandler();this._checkLimitHandler=null},onCheckLimitReached:function(x){},_updateCheckboxState:function(x){if(x){var w=this._getNodeSelection(x.node);
x.set("checked",w);this._updateRowHighlighting(x.node,null,w)}},_getNodeSelection:function(x){return void 0!==x.indepSelection?x.indepSelection:this.tree.getSelectionState(x)},_updateRowHighlighting:function(x,w,n){this.highlightSelected&&x&&(n=void 0!==n?n:this._getNodeSelection(x),(w=w||this.grid&&this.row(x).element)&&(!0!==n||void 0===x.indepSelection&&!1===x.selectable?r.remove(w,"selected"):r.add(w,"selected")))},_renderLabel:function(x,w,n){w=this._renderLabelNode(x,n);this._provideLabelClickAction(w,
n,x);return w},_provideLabelClickAction:function(x,w,n){var q=this.expandOnNodeClick&&n.children?n.children.length&&(x=w,function(){this.toggleExpand(n);this.onExpandChangedUser(n)}.bind(this)):!1!==n.enabled&&this.showCheckboxColumn?this._onCheckboxClick.bind(this,n,null):null;q&&(r.add(x,"esriMapsAnalystXClickable"),e(x,"click",function(H){H.stopPropagation();q(H)}))},_renderLabelNode:function(x){return h.create("div",{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(x)})},
_renderLabelHeader:function(x){var w=h.create("div",{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(x)||this._labelColumn&&this._labelColumn.label||""});this.enableHeaderLabelToggleClick&&this.showRootCheckbox&&(r.add(w,"esriMapsAnalystXClickable"),e(w,"click",this._onCheckboxClick.bind(this,x,null)));return w},onRowsSelected:function(x,w){},isNodeSelected:function(x){return x&&(x.selected||x.indepSelection)},getSelectedNodes:function(){var x=this.tree.getSelectedNodes(!1),
w=this._getIndepSelectedNodes();return x.concat(w)},_getIndepSelectedNodes:function(){function x(n){n&&(n.indepSelection&&w.push(n),n.children&&n.children.forEach(x))}var w=[];x(this.tree.root);return w},getSelectedState:function(){if(!this.tree)return null;var x={normalSelection:{},indepSelection:{}},w=this.tree.getSelectedNodes(!1);w&&w.forEach(function(n){x.normalSelection[n.id]=!0});(w=this._getIndepSelectedNodes())&&w.forEach(function(n){x.indepSelection[n.id]=!0});return x},setSelectedState:function(x){if(this.tree){this.tree.changeSelect(this.tree.root,
!1);if(x){for(var w in x.normalSelection){var n=this.tree.get(w);n&&this.tree.changeSelect(n,!0)}for(w in x.indepSelection)if(n=this.tree.get(w))n.indepSelection=!0}this.refreshCheckboxes()}},setNodeSelected:function(x,w,n){x&&(void 0!==x.indepSelection?x.indepSelection=w:this.tree.changeSelect(x,w),!1!==n&&this.refreshCheckboxes())},isExpanded:function(x){x="string"===typeof x?x:x[this.tree.idProperty];return this.grid._expanded&&this.grid._expanded[x]},setExpanded:function(x,w,n){x="string"==typeof x?
x:x[this.tree.idProperty];void 0!==x&&(!1!==n?(n=this.grid.row(x))&&n.element&&this.grid.expand(x,w):this.grid._expanded[x]=w)},toggleExpand:function(x){this.setExpanded(x,!this.isExpanded(x))},getExpandedState:function(){return Object.assign({},this.grid._expanded)},setExpandedState:function(x){this.grid._expanded=x||{}},onExpandChangedUser:function(x){},destroy:function(){this.unselectAllRows();this.inherited(arguments)}})})},"widgets/BusinessAnalyst/esriAnalystX/dijit/_TemplatedMixin":function(){define(["dojo/_base/declare",
"dijit/_TemplatedMixin","./_EscapeValueMixin"],function(v,z,C){return v([z,C],{})})},"widgets/BusinessAnalyst/esriAnalystX/dijit/_EscapeValueMixin":function(){define(["dojo/_base/declare"],function(v){return v(null,{_escapeValue:function(z){return z.replace(/"/g,"\x26quot;")}})})},"dgrid/tree":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/Deferred dojo/_base/lang dojo/query dojo/on dojo/aspect ./util/has-css3 ./Grid dojo/has!touch?./util/touch put-selector/put".split(" "),function(v,
z,C,r,h,c,e,b,d,a,f){function g(l,k,t,F){F=this.grid.isRTL?"right":"left";var I=".dgrid-expando-icon";k&&(I+=".ui-icon.ui-icon-triangle-1-"+(t?"se":"e"));l=f("div"+I+"[style\x3dmargin-"+F+": "+l*(this.indentWidth||9)+"px; float: "+F+"]");l.innerHTML="\x26nbsp;";return l}function p(l){var k=this,t=this.style.height;t&&(this.style.display="0px"==t?"none":"block");l&&(f(this,".dgrid-tree-resetting"),setTimeout(function(){f(k,"!dgrid-tree-resetting")}));this.style.height=""}function A(l){var k=l.renderCell||
d.defaultRenderCell,t,F;l||(l={});l.shouldExpand=l.shouldExpand||function(I,B,G){return G};e.after(l,"init",function(){var I=l.grid,B=".dgrid-content .dgrid-column-"+l.id,G=[];I.cleanEmptyObservers=!1;if(!I.store)throw Error("dgrid tree column plugin requires a store to operate.");l.renderExpando||(l.renderExpando=g);G.push(I.on(l.expandOn||".dgrid-expando-icon:click,"+B+":dblclick,"+B+":keydown",function(J){var E=I.row(J);I.store.mayHaveChildren&&!I.store.mayHaveChildren(E.data)||"keydown"==J.type&&
32!=J.keyCode||"dblclick"==J.type&&F&&1<F.count&&E.id==F.id&&-1<J.target.className.indexOf("dgrid-expando-icon")||I.expand(E);-1<J.target.className.indexOf("dgrid-expando-icon")&&(F&&F.id==I.row(J).id?F.count++:F={id:I.row(J).id,count:1})}));b("touch")&&G.push(I.on(a.selector(B,a.dbltap),function(){I.expand(this)}));I._expanded||(I._expanded={});G.push(e.after(I,"insertRow",function(J){var E=this.row(J);l.shouldExpand(E,t,this._expanded[E.id])&&this.expand(J,!0,!0);return J}));G.push(e.before(I,"removeRow",
function(J,E){if(J=J.connected)h("\x3e.dgrid-row",J).forEach(function(y){I.removeRow(y,!0)}),E||f(J,"!")}));l.collapseOnRefresh&&G.push(e.after(I,"cleanup",function(){this._expanded={}}));I._calcRowHeight=function(J){var E=J.connected;return J.offsetHeight+(E?E.offsetHeight:0)};I.expand=function(J,E,y){var x=J.element?J:I.row(J),w=b("transitionend");J=new C;var n=J.promise;J.resolve();J=x.element;J=-1<J.className.indexOf("dgrid-expando-icon")?J:h(".dgrid-expando-icon",J)[0];y=y||!1===l.enableTransitions;
if(J&&J.mayHaveChildren&&(y||E!==!!this._expanded[x.id])){var q=void 0===E?!this._expanded[x.id]:E;f(J,".ui-icon-triangle-1-"+(q?"se":"e")+"!ui-icon-triangle-1-"+(q?"e":"se"));E=x.element;var H=E.connected,K={originalQuery:this.query};if(!H){H=K.container=E.connected=f(E,"+div.dgrid-tree-container");var m=function(M){return I.store.getChildren(x.data,M)};l.allowDuplicates&&(K.parentId=x.id);"level"in J&&(m.level=J.level);n=n.then(function(){if(I.renderQuery)return I.renderQuery(m,K);var M=f(H,"div"),
L=I.renderArray(m(K),M,"level"in m?{queryLevel:m.level}:{});C.when(L,function(){f(M,"!")});return L});w?c(H,w,p):p.call(H)}H.hidden=!q;var u=H.style;if(!w||y)u.display=q?"block":"none",u.height="";else{if(q){u.display="block";var D=H.scrollHeight;u.height="0px"}else f(H,".dgrid-tree-resetting"),u.height=H.scrollHeight+"px";setTimeout(function(){f(H,"!dgrid-tree-resetting");u.height=q?D?D+"px":"auto":"0px"})}q?this._expanded[x.id]=!0:delete this._expanded[x.id]}return n};e.after(l,"destroy",function(){z.forEach(G,
function(J){J.remove()});delete I.expand;delete I._calcRowHeight})});l.renderCell=function(I,B,G,J){var E=l.grid,y=Number(J&&J.queryLevel)+1,x=!E.store.mayHaveChildren||E.store.mayHaveChildren(I),w=J.parentId;y=t=isNaN(y)?0:y;E=l.renderExpando(y,x,E._expanded[(w?w+"-":"")+E.store.getIdentity(I)],I);E.level=y;E.mayHaveChildren=x;(I=k.call(l,I,B,G,J))&&I.nodeType?(f(G,E),f(G,I)):G.insertBefore(E,G.firstChild)};return l}A.defaultRenderExpando=g;r.getObject("dgrid.tree",!0);return dgrid.tree=A})},"dgrid/util/has-css3":function(){define(["dojo/has"],
function(v){function z(r,h){r=r.style;var c;if(h in r)return!0;h=h.slice(0,1).toUpperCase()+h.slice(1);for(c=C.length;c--;)if(C[c]+h in r)return C[c];return!1}var C=["ms","O","Moz","Webkit"];v.add("css-transitions",function(r,h,c){return z(c,"transitionProperty")});v.add("css-transforms",function(r,h,c){return z(c,"transform")});v.add("css-transforms3d",function(r,h,c){return z(c,"perspective")});v.add("transitionend",function(){var r=v("css-transitions");return r?!0===r?"transitionend":{ms:"MSTransitionEnd",
O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[r]:!1});return v})},"esri/dijit/geoenrichment/utils/KeyboardUtil":function(){define(["dojo/on","dojo/sniff","./DomUtil"],function(v,z,C){var r={listenToKeyboardCombinationOverNode:function(h){return v(document.body,"keydown",function(c){if(!h.isCtrl||r.isCtrl(c))if(!h.isShift||c.shiftKey)if(!h.isAlt||c.altKey)String.fromCharCode(c.keyCode).toLowerCase()!==h["char"]||h.node&&!C.isNodeInLayout(h.node)||h.callback(c)})},isCtrl:function(h){return z("mac")?
h.metaKey:h.ctrlKey}};return r})},"esri/dijit/geoenrichment/utils/DomUtil":function(){define("dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/query esri/dijit/geoenrichment/Deferred dojo/domReady!".split(" "),function(v,z,C,r,h,c,e){function b(l,k){Array.isArray(l)?l.forEach(k):k(l);return l}function d(l,k,t){var F=!1,I=function(B){!B||t&&!t(B)||(B.parentNode===k?F=!0:I(B.parentNode))};I(l);return F}function a(l){return!g.isHidden(l)&&"none"!==h.get(l,"display")&&
!z.contains(l,"dijitHidden")}function f(){p||(p=C.create("div",{"class":"esriGEOffscreen"},document.body));return p}var g={isHidden:function(l){return l&&z.contains(l,"esriGEHidden")},hasVisibleChildren:function(l){if(!l||!l.children.length)return!1;for(var k=0;k<l.children.length;k++)if(!g.isHidden(l.children[k]))return!0;return!1},hide:function(l){return g.addTag(l,"esriGEHidden")},show:function(l){return g.removeTag(l,"esriGEHidden")},display:function(l,k){return g[k?"show":"hide"](l)},addTag:function(l,
k){return b(l,function(t){t&&z.add(t,k)})},removeTag:function(l,k){return b(l,function(t){t&&z.remove(t,k)})},getChildIndex:function(l,k){if(!l||!l.children||!k)return-1;for(var t=0;t<l.children.length;t++)if(l.children[t]===k)return t;return-1},isChildOf:function(l,k){return d(l,k)},isNodeInLayout:function(l){return d(l,document.body,function(k){return a(k)})},isNodeVisible:function(l){return d(l,document.body,function(k){return a(k)&&"hidden"!==h.get(k,"visibility")})},isNodeOnscreen:function(l){return d(l,
document.body,function(k){return!z.contains(k,"esriGEOffscreen")})},enableContent:function(l,k,t){if(l){t=t||{};var F=l.children.length-1;if(!(0>F||(F=l.children[F],z.contains(F,"esriGEDisabledContent")||(F=null),F&&l.removeChild(F),k)))return F=C.create("div",{"class":"esriGEDisabledContent"+(t.overlayClass?" "+t.overlayClass:"")},l),t.textContent&&(F.textContent=t.textContent),!1!==t.fitParent&&(l=r[t.marginBox?"getMarginBox":"getContentBox"](l).h)&&h.set(F,{height:l+"px",marginTop:-l+"px"}),F}},
enableContentAbsolute:function(l,k,t){if(l){t=t||{};var F=h.get(l,"position");"relative"===F||"absolute"===F||k||h.set(l,"position","relative");return g.enableContent(l,k,{overlayClass:"esriGEAbsoluteStretched"+(t.overlayClass?" "+t.overlayClass:"")+(t.isTransparent?" esriGEDisabledContentTransparent":""),fitParent:!1,textContent:t.textContent})}}},p;g.hideNodeInBackground=function(l,k){if(l){if(l._hideNodeInBackgroundUndoController)return l._hideNodeInBackgroundUndoController;var t=C.create("div",
null,l,"after"),F=C.create("div",{style:"position: absolute; left: 0px; top: 0px;"},f());C.place(l,F);k="DomUtil.hideNodeInBackground"+(k?"."+k:"");v.set(t,"_bg_memo_node",k);v.set(F,"_bg_temp_node",k);k={remove:function(){t&&(t.parentNode&&C.place(l,t,"replace"),C.destroy(t),C.destroy(F),p.children.length||(C.destroy(p),p=null),t=null,delete l._hideNodeInBackgroundUndoController)}};return l._hideNodeInBackgroundUndoController=k}};g.showNodeFromBackground=function(l){l&&l._hideNodeInBackgroundUndoController&&
l._hideNodeInBackgroundUndoController.remove()};g.noTransformPosition=function(l){function k(B){for(var G={x:0,y:0};B.offsetParent;)G.x+=B.offsetLeft,G.y+=B.offsetTop,B=B.offsetParent,G.x+=h.get(B,"borderLeftWidth"),G.y+=h.get(B,"borderTopWidth");return G}function t(B){return h.get(B,"width")+h.get(B,"paddingLeft")+h.get(B,"paddingRight")+h.get(B,"borderLeftWidth")+h.get(B,"borderRightWidth")}function F(B){return h.get(B,"height")+h.get(B,"paddingTop")+h.get(B,"paddingBottom")+h.get(B,"borderTopWidth")+
h.get(B,"borderBottomWidth")}if(l){if(l instanceof SVGElement&&l.getBBox){var I=(I=l.ownerSVGElement&&l.ownerSVGElement.parentNode)&&k(I);l=l.getBBox();return{x:(l.x||0)+I.x,y:(l.y||0)+I.y,w:l.width||0,h:l.height||0}}I=k(l);return{x:I.x,y:I.y,w:t(l),h:F(l)}}};g.getNodesBox=function(l,k){if(!l||!l.length)return null;k=k||{};for(var t=1E6,F=-1E6,I=1E6,B=-1E6,G=0;G<l.length;G++){var J=l[G];J=k.ignoreTransformation?g.noTransformPosition(J):r.position(J);t=Math.min(t,J.x);I=Math.min(I,J.y);F=Math.max(F,
J.x+J.w);B=Math.max(B,J.y+J.h)}l={x:t,y:I,w:F-t,h:B-I};k.originNode&&(k=k.ignoreTransformation?g.noTransformPosition(k.originNode):r.position(k.originNode),l.x-=k.x,l.y-=k.y);return l};g.traverseChildren=function(l,k){function t(F){if(F&&F.children)for(var I=0;I<F.children.length;I++){var B=F.children[I];if(k(B))break;t(B)}}t(l)};g.scrollToListNode=function(l,k,t){var F=k.offsetTop+k.clientHeight,I=F-(l.scrollTop+l.clientHeight);0<I&&(l.scrollTop+=I);t&&(F-=k.clientHeight-t.offsetTop,I=l.scrollTop-
F,0<I&&(l.scrollTop-=I))};var A;g.getScrollbarSize=function(){if(!A){var l=C.create("div",null,document.body);l.style.width="100px";l.style.height="100px";l.style.overflow="scroll";l.style.position="absolute";l.style.top="9999px";A={w:l.offsetWidth-l.clientWidth,h:l.offsetHeight-l.clientHeight};C.destroy(l)}return A};g.hasScrollbars=function(l){var k=h.getComputedStyle(l);return{w:"scroll"===k.overflowX||l.offsetWidth>l.clientWidth&&"auto"===k.overflowX,h:"scroll"===k.overflowY||l.offsetHeight>l.clientHeight&&
"auto"===k.overflowY}};g.getMeasureContext=function(l){l=l||{};l.style=l.style?l.style+" ":"";l.style+="display: inline-block; position: absolute; left: 0; top: 0;";return{div:C.create("div",l,document.body),measureText:function(k){this.div.innerHTML=k;k=r.getMarginBox(this.div);delete k.l;delete k.t;return k},destroy:function(){C.destroy(this.div)}}};g.getTextBox=function(l,k){k=g.getMeasureContext(k);l=k.measureText(l);k.destroy();return l};g.getNodeFontFamily=function(l){return(l=h.get(l,"fontFamily")||
h.getComputedStyle(l).fontFamily)&&l.replace(/'|"/g,"").split(",")[0]};g.getNodeFontSize=function(l){return h.toPixelValue(l,h.get(l,"fontSize"))};g.stealFocus=function(){var l=new e;try{var k=C.create("input",{type:"text",style:"position: absolute; left: 0px; top: 0px;"});C.place(k,document.body);k.select();C.destroy(k)}catch(t){}setTimeout(l.resolve,0);return l.promise};g.getWindowBox=function(){for(var l=[],k=0,t=document.body.children.length;k<t;k++){var F=document.body.children[k];g.isHidden(F)||
(g.hide(F),l.push(F))}k={w:document.body.clientWidth,h:document.body.clientHeight};l.forEach(function(I){g.show(I)});return k};g.isBodyLtr=function(){return"ltr"===(document.body.dir||"ltr").toLowerCase()};g.setAttribute=function(l,k,t){return 2===arguments.length?v.set(l,k):v.set(l,k,t)};g.getAttribute=function(l,k,t){return 2===arguments.length?v.get(l,k):v.get(l,k,t)};g.addClass=function(l,k){z.add(l,k)};g.removeClass=function(l,k){z.remove(l,k||"")};g.toggleClass=function(l,k,t){z[t?"add":"remove"](l,
k||"")};g.replaceClass=function(l,k,t){return z.replace(l,k,t)};g.containsClass=function(l,k){return z.contains(l,k)};g.getStyle=function(l,k){return h.get(l,k)};g.setStyle=function(l,k,t){return 2===arguments.length?h.set(l,k):h.set(l,k,t)};g.getStylePixelValue=function(l,k){l=g.getStyle(l,k);return"number"===typeof l?l:parseFloat(l)||0};g.getComputedStyle=function(l){return l&&1===l.nodeType&&window.getComputedStyle(l)};g.position=function(l,k){return r.position(l,k)};g.getMarginBox=function(l,
k){return r.getMarginBox(l,k)};g.getMarginExtents=function(l,k){return r.getMarginExtents(l,k)};g.getContentBox=function(l,k){return r.getContentBox(l,k)};g.getPadBorderExtents=function(l,k){return r.getPadBorderExtents(l,k)};g.getPadExtents=function(l,k){return r.getPadExtents(l,k)};g.getBorderExtents=function(l,k){return r.getBorderExtents(l,k)};g.docScroll=function(){return r.docScroll()};g.create=function(l,k,t,F){return C.create(l,k,t,F)};g.toDom=function(l){return C.toDom(l)};g.place=function(l,
k,t){return C.place(l,k,t)};g.empty=function(l){return C.empty(l)};g.destroy=function(l){return C.destroy(l)};g.query=function(l,k){l=c(l,k);k=[];for(var t=0,F=l.length;t<F;t++)k.push(l[t]);return k};return g})},"esri/dijit/geoenrichment/Deferred":function(){define(["dojo/Deferred"],function(v){return v})},"esri/dijit/geoenrichment/TriStateItem":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/Stateful dojo/on dojo/dom-construct dojo/dom-class ./utils/DeviceUtil ./utils/AccessibilityUtils".split(" "),
function(v,z,C,r,h,c,e,b,d){return v(r,{domNode:null,checkboxNode:null,checked:!1,disabled:!1,autoToggle:!0,_currentClass:null,_lastChecked:!1,constructor:function(a,f,g,p){var A=b.isMobileDevice()?"touchstart":"click";f=f||{};var l=f["class"];f["class"]=(l?l+" ":"")+"esriTriStateCheckBoxIcon";if(l=f.label){if(a instanceof HTMLLabelElement)a.innerHTML="\x26nbsp;"+l;else{var k=f.labelAttrs||{};k.innerHTML="\x26nbsp;"+l;k=c.create("label",k);a&&c.place(k,a);a=k}f=C.mixin({},f);delete f.label;delete f.labelAttrs}this.checkboxNode=
c.create("div",f,a,a instanceof HTMLLabelElement?"first":g);this._currentClass=this._composeClass();e.add(this.checkboxNode,this._currentClass);a instanceof HTMLLabelElement?(h(a,A,C.hitch(this,this._onClick)),e.add(a,"esriTriStateCheckBoxLabel"),p&&d.registerButton(a,this._onClick.bind(this),l)):(h(this.checkboxNode,A,C.hitch(this,this._onClick)),p&&d.registerButton(this.checkboxNode,this._onClick.bind(this),l));this.domNode=l?a:this.checkboxNode},postscript:function(){},_onClick:function(a){this.disabled||
(this.autoToggle&&this.toggle(),a&&(a.checked=this.checked),this.onClick(z.fix(a)))},onClick:function(a){},toggle:function(){this.set("checked",!this._lastChecked);return this.checked},_checkedSetter:function(a){a!==this.checked&&(this.checked="mixed"===a?a:this._lastChecked=!!a,this._updateClass())},_disabledSetter:function(a){this.disabled=!!a;this._updateClass()},_updateClass:function(){var a=this._composeClass();a!==this._currentClass&&(e.replace(this.checkboxNode,a,this._currentClass),this._currentClass=
a)},_composeClass:function(){var a="esriTriStateCheckBox"+("mixed"==this.checked?"Mixed":this.checked?"Checked":"");return this.disabled?a+"Disabled":a}})})},"esri/dijit/geoenrichment/utils/DeviceUtil":function(){define(["dojo/sniff","dojo/domReady!"],function(v){var z={},C=function(){var h=window,c=h.navigator.platform,e=h.navigator.userAgent,b={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!h.cordova&&!h.phonegap),
phonegap:!(!h.cordova&&!h.phonegap),electron:!1,nwjs:!1},d=h.screen.width,a=h.screen.height,f=e.match(/(Android);?[\s\/]+([\d.]+)?/),g=e.match(/(iPad).*OS\s([\d_]+)/),p=e.match(/(iPod)(.*OS\s([\d_]+))?/),A=!g&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/),l=0<=e.indexOf("MSIE ")||0<=e.indexOf("Trident/"),k=0<=e.indexOf("Edge/"),t=0<=e.indexOf("Gecko/")&&0<=e.indexOf("Firefox/"),F="Win32"===c,I=0<=e.toLowerCase().indexOf("electron"),B="undefined"!==typeof nw&&"undefined"!==typeof process&&"undefined"!==typeof process.versions&&
"undefined"!==typeof process.versions.nw;c="MacIntel"===c;var G="1024x1366 1366x1024 834x1194 1194x834 834x1112 1112x834 768x1024 1024x768".split(" ");!g&&c&&v("touch")&&0<=G.indexOf(d+"x"+a)&&((g=e.match(/(Version)\/([\d.]+)/))||(g=[0,1,"13_0_0"]),c=!1);b.ie=l;b.edge=k;b.firefox=t;f&&!F&&(b.os="android",b.osVersion=f[2],b.android=!0,b.androidChrome=0<=e.toLowerCase().indexOf("chrome"));if(g||A||p)b.os="ios",b.ios=!0;A&&!p&&(b.osVersion=A[2].replace(/_/g,"."),b.iphone=!0);g&&(b.osVersion=g[2].replace(/_/g,
"."),b.ipad=!0);p&&(b.osVersion=p[3]?p[3].replace(/_/g,"."):null,b.ipod=!0);b.ios&&b.osVersion&&0<=e.indexOf("Version/")&&"10"===b.osVersion.split(".")[0]&&(b.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]);b.webView=!(!(A||g||p)||!e.match(/.*AppleWebKit(?!.*Safari)/i)&&!h.navigator.standalone)||h.matchMedia&&h.matchMedia("(display-mode: standalone)").matches;b.webview=b.webView;b.standalone=b.webView;b.desktop=!(b.ios||b.android)||I||B;b.desktop&&(b.electron=I,b.nwjs=B,b.macos=c,b.windows=
F,b.macos&&(b.os="macos"),b.windows&&(b.os="windows"));b.pixelRatio=h.devicePixelRatio||1;return b}();z.device=C;z.isMobileDevice=function(){return!C.desktop};z.isPCWithTouchScreen=function(){return C.desktop&&v("touch")};z.isLandscape=function(){return 90===Math.abs(window.orientation)};var r=null;z.isWebLayout=function(){if(!r){var h=document.createElement("div");h.style="visibility:hidden;height:1in;width:1in;position:absolute;left: -100%;top:-100%;";document.body.appendChild(h);r=h.offsetHeight;
h.parentNode.removeChild(h)}h=r;h*=7;var c=document.body.offsetWidth;if(c>=h)return!0;var e=document.body.offsetHeight;return c>=e&&Math.sqrt(c*c+e*e)>=h?!0:!1};z.press=C.desktop?"mousedown":"touchstart";z.release=C.desktop?"mouseup":"touchend";z.click=C.desktop?"click":"touchend";z.clickOrRelease=C.desktop?"click, mouseup":"touchend";z.move=C.desktop?"mousemove":"touchmove";return z})},"esri/dijit/geoenrichment/utils/AccessibilityUtils":function(){define(["exports"],function(v){function z(r,h,c){var e=
c?c:"AriaLabelID_"+C++;h.id=e;Array.isArray(r)?r.forEach(function(b){b.setAttribute("aria-labelledby",e)}):r.setAttribute("aria-labelledby",e);return e}var C=0;v.setId=function(r,h){h=h?h:"AriaLabelID_"+C++;return r.id=h};v.setLabeledBy=z;v.setLabeledByToFocusNode=function(r,h,c){var e=r.focusNode;if(!e)return null;var b=h&&h.getAttribute("id");b=z(e,h,b||c);r.sliderHandleMax&&z(r.sliderHandleMax,h,b);return b};v.setLabelToFocusNode=function(r,h){var c=r.focusNode;if(!c)return null;c.setAttribute("aria-label",
h);r.sliderHandleMax&&r.sliderHandleMax&&r.sliderHandleMax.setAttribute("aria-label",h);return h};v.registerButton=function(r,h,c){r&&(r.setAttribute("tabindex","0"),c&&r.setAttribute("aria-label",c),r.addEventListener("keydown",function(e){13===e.keyCode&&h()}))}})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/DgridUtil":function(){define(["dojo/aspect","dojo/dom-class","dojo/query","../../utils/ArrayUtil"],function(v,z,C,r){function h(d,a,f){if(void 0===f){var g=d._rowIdToObject[a.id];g&&(f=
(d=d.store)&&d.isOdd&&d.isOdd(g))}0!==f&&1!==f||z.replace(a,b[f],b[1-f])}function c(d,a,f){var g=d.store;if(g&&g.updateExpand){f=g.updateExpand(a.data,f,!0,d.getSortingFunction());for(var p in f)a=d.row(g.get(p)),a.element&&h(d,a.element,f[p])}}var e=["ui-icon-triangle-1-e","ui-icon-triangle-1-se"],b=["dgrid-row-even","dgrid-row-odd"];return{createExpando:function(d){z.add(d,"dgrid-expando-icon ui-icon ui-icon-triangle-1-e esriMapsAnalystXClickable");return{expando:d,update:function(a){a=a?1:0;z.replace(d,
e[a],e[1-a])}}},oddEvenFix:function(d){d.expand&&(d.getSortingFunction=function(){var a=this.get("sort");return a&&a.length?r.getSorting(a):null},v.after(d,"insertRow",function(a){h(d,a);return a}),v.before(d,"refresh",function(){var a=d.store;a&&a.updateExpandedNodes&&a.updateExpandedNodes(d._expanded,d.getSortingFunction())}),v.around(d,"expand",function(a){return function(f,g){var p=f.element?f:d.row(f);void 0===g&&(g=!d._expanded[p.id]);!0===g&&c(d,p,!0);var A=a.apply(this,arguments);!1===g&&
c(d,p,!1);return A}}),v.around(d,"adjustRowIndices",function(a){return function(){var f=d.store;f&&f.updateExpandedNodes&&f.updateExpand&&f.isOdd||a.apply(this,arguments)}}))},makeContentNeverGoUnderScroll:function(d){function a(){var f=d.headerNode.firstChild,g=d.contentNode;g&&f&&f.offsetWidth!==g.offsetWidth&&(g.style.width="",f.style.width="",f.style.width=g.offsetWidth+"px")}v.after(d,"resize",a);v.after(d,"refresh",a);v.after(d,"expand",function(f){setTimeout(a,100);setTimeout(a,300);return f})},
inlineSortArrow:function(d,a,f){a=r.arrayToObject(r.listToArray(a));v.after(d,"updateSortArrow",function(g,p){if((p=g[0]&&g[0].attribute)&&a[p]){var A=(p=d._sortNode||d._findSortArrowParent(p))&&C(".dgrid-sort-arrow",p)[0];g=g[0].descending;if(A){A.remove();z.remove(p,"dgrid-sort-down dgrid-sort-up");var l=f?C(f,p)[0]:p.lastChild.append?p.lastChild:p;l.append||(l=p);z.add(l,g?"dgrid-sort-down":"dgrid-sort-up");l.append(A)}}},!0)}}})},"widgets/BusinessAnalyst/esriAnalystX/utils/ArrayUtil":function(){define("require exports ../../baUtil/array dojo/store/util/SimpleQueryEngine ./ObjectUtil esri/dijit/geoenrichment/utils/ArrayUtil".split(" "),
function(v,z,C,r,h,c){function e(a,f){a.some(function(g,p){f.func(g,p,f,a);if(f.stop)return!0});return f}function b(a){var f=a.split(" "),g=f[1];a={};switch(f[0]){case "max":a.result=-Infinity;f=function(p,A,l){l.result=Math.max(l.result,h.getObject(p,g))};break;case "min":a.result=Infinity;f=function(p,A,l){l.result=Math.min(l.result,h.getObject(p,g))};break;case "sum":a.result=0;f=function(p,A,l){l.result+=h.getObject(p,g)};break;case "random":a.result=void 0;f=function(p,A,l,k){l.result=k[Math.round((k.length-
1)*Math.random())];l.stop=!0};break;default:throw Error("Unsupported query.");}a.func=f;return a}var d={getSorting:function(a,f){if(!a)return h.compare;if("function"===typeof a)return a;var g=Array.isArray(a)?a:a.sort||[a];var p={};"string"===typeof f&&(f=[f]);Array.isArray(f)?f.forEach(function(A){p[A]=h.compareNames}):f&&(p=f);return function(A,l){for(var k=void 0,t=0;k=g[t];t++){var F=A[k.attribute],I=l[k.attribute];if(F=(p[k.attribute]||(p["*"]?p["*"].bind(null,k.attribute):h.compare))(F,I,!1,
!1,A,l))return k.descending?-F:F}return 0}},sort:function(a,f,g){return a.sort(d.getSorting(f,g))},sortIndices:function(a,f,g){a=C.map(a,function(A,l){return{value:A,index:l}});var p=d.getSorting(f,g);a.sort(function(A,l){return p(A.value,l.value)});return C.map(a,function(A){return A.index})},getQueryEngine:function(a,f){return function(g,p){p&&p.sort&&(p=Object.assign({},p),p.sort=d.getSorting(p.sort,a));return(f||r)(g,p)}},objectToArray:function(a,f){void 0===f&&(f=null);var g=[],p=f?function(k){return a[k]?
a[k][f]:void 0}:function(k){return a[k]},A;for(A in a){var l=p(A);"undefined"!==typeof l&&g.push(l)}return g},arrayToObject:function(a,f){var g={},p=c.composeIdentityFunction(f);C.forEach(a,function(A){g[p(A)]=A});return g},composeIdentityFunction:c.composeIdentityFunction,removeDuplicates:c.removeDuplicates,splitArrayToBunches:c.splitArrayToBunches,contains:function(a,f){return-1!==C.indexOfLoose(a,f)},remove:function(a,f){f=C.indexOfLoose(a,f);-1!==f&&a.splice(f,1);return-1!==f},merge:function(a,
f){a=a||[];null!=f&&Array.prototype.push.apply(a,f);return a},listToArray:function(a,f){if(null==a)return[];void 0===f&&(f=",");a="string"===typeof a?a.split(f):a.slice();for(f=0;f<a.length;f++)"string"===typeof a[f]&&(a[f]=a[f].trim());return a},reorderArray:function(a,f){var g=a.length,p=0,A=Array(g),l={},k={},t;for(t in f){var F=Math.round(t);if(0<=F&&F<g&&!l[F]){var I=Math.round(f[t]);0<=I&&I<g&&!k[I]&&(A[I]=a[F],l[F]=1,k[I]=1,p++)}}p!==g&&(A=A.filter(function(B,G){return k[G]}),a.forEach(function(B,
G){!l[G]&&A.push(B)}));return A},mapIndices:function(a,f,g,p){p=null==p?null:p;if(1===a)g.call(p,0,Math.floor(f/2));else{f=(f-1)/(a-1);for(var A=0;A<a;A++)g.call(p,A,Math.floor(.5+A*f))}},moveElement:function(a,f,g,p){var A=Array.isArray(f)?f:[f];if(-1!==A.indexOf(g))return a.slice();var l=[];a.forEach(function(k){-1===A.indexOf(k)&&(k==g?"before"===p?(A.forEach(function(t){l.push(t)}),l.push(g)):"after"===p&&(l.push(g),A.forEach(function(t){l.push(t)})):l.push(k))});return l},min:function(a,f){var g=
a.length;switch(g){case 0:return null;case 1:return a[0];default:for(var p=a[0],A=f(p),l=0,k=1;k<g;k++){var t=f(a[k]);A>t&&(p=a[k],A=t,l=k)}return{key:l,value:p,comparisonValue:A}}},max:function(a,f){var g=a.length;switch(g){case 0:return null;case 1:return a[0];default:for(var p=a[0],A=f(p),l=0,k=1;k<g;k++){var t=f(a[k]);A<t&&(p=a[k],A=t,l=k)}return{key:l,value:p,comparisonValue:A}}},query:function(a,f){if("object"===typeof f)return e(a,f);if("string"===typeof f)return f=b(f),e(a,f).result},everyEqualProperty:function(a,
f){if(2>a.length)return!0;var g;return!a.some(function(p,A){if(0===A)g=p[f];else if(g!==p[f])return!0})}};return d})},"widgets/BusinessAnalyst/baUtil/array":function(){define(["require","exports"],function(v,z){var C=Array.prototype,r={every:function(h,c,e){return null==h?!0:"string"===typeof h?C.every.call(h.split(""),c,e):C.every.call(h,c,e)},some:function(h,c,e){return null==h?!1:"string"===typeof h?C.some.call(h.split(""),c,e):C.some.call(h,c,e)},forEach:function(h,c,e){if(null!=h)return"string"===
typeof h?C.forEach.call(h.split(""),c,e):C.forEach.call(h,c,e)},map:function(h,c,e){return null==h?[]:"string"===typeof h?C.map.call(h.split(""),c,e):C.map.call(h,c,e)},filter:function(h,c,e){return null==h?[]:"string"===typeof h?C.filter.call(h.split(""),c,e):C.filter.call(h,c,e)},indexOf:function(h,c){return null==h?-1:"string"===typeof h?C.indexOf.call(h.split(""),c):C.indexOf.call(h,c)},indexOfLoose:function(h,c){if(null==h||void 0===h.length)return-1;if("string"===typeof h)return r.indexOfLoose(h.split(""),
c);for(var e=0,b=h.length;e<b;e++)if(h[e]==c)return e;return-1},lastIndexOf:function(h,c){return null==h?-1:"string"===typeof h?C.lastIndexOf.call(h.split(""),c):C.lastIndexOf.call(h,c)},lastIndexOfLoose:function(h,c){if(null==h||void 0===h.length)return-1;if("string"===typeof h)return r.lastIndexOfLoose(h.split(""),c);for(var e=h.length-1;0<=e;e--)if(h[e]==c)return e;return-1}};return r})},"widgets/BusinessAnalyst/esriAnalystX/utils/ObjectUtil":function(){define(["../../baUtil/ObjectUtil","esri/dijit/geoenrichment/utils/ObjectUtil",
"esri/dijit/geoenrichment/utils/SortUtil"],function(v,z,C){var r=Object.assign({},v,z,C);r.getPrototypeOf=function(h){try{return Object.getPrototypeOf?Object.getPrototypeOf(h):h.__proto__||h.constructor&&h.constructor.prototype}catch(c){return null}};r.isJson=function(h){return"object"===typeof h&&r.getPrototypeOf(h)===Object.prototype};r.copyJson=function(h){return void 0===h||null===h?null:JSON.parse(JSON.stringify({object:h})).object};r.convert=function(h,c,e){var b=c||function(){};c=b(h);if("undefined"!==
typeof c)return c;if(Array.isArray(h)){var d=[];h.forEach(function(p){d.push(r.convert(p,b,e))},this);return d}if(!r.isJson(h))return h;c={};for(var a in h){var f=h[a],g=e?b(a):a;"undefined"===typeof g&&(g=a);c[g]=r.convert(f,b,e)}return c};r.getDeepCopy=function(h){return r.convert(h)};r.getRange=function(h,c,e){c="function"===typeof c?c.bind(null==e?null:e):null;var b,d;for(d in h)if(e=h[d],e=Number(null===c?e:c(e,d)),!isNaN(e))if(void 0===a)var a=b=e;else a=Math.min(a,e),b=Math.max(b,e);return void 0===
a?{}:{min:a,max:b}};r.removeEmptyObjects=function(h){function c(b){b&&"object"===typeof b&&Object.keys(b).forEach(function(d){var a=b[d];!a||"object"!==typeof a||Array.isArray(a)||Object.keys(a).length?c(a):(e=!0,delete b[d])})}for(var e=!0;e;)e=!1,c(h);return h};r.removeValues=function(h,c){function e(b){b&&"object"===typeof b&&Object.keys(b).forEach(function(d){c(d,b[d])?e(b[d]):delete b[d]})}e(h);return h};r.isEqual=function(h,c){if(null===h||"object"!==typeof h||null===c||"object"!==typeof c)return h===
c;if(Object.keys(h).length!==Object.keys(c).length)return!1;var e={},b;for(b in h)e[b]=!0;for(b in c)if(void 0!==e[b])delete e[b];else return!1;for(b in h)if(!r.isEqual(h[b],c[b]))return!1;return!0};r.getObject=function(h,c){if(!c)return h;c=c.split(".");for(var e=0;e<c.length;e++)h=h&&h[c[e]];return h};r.formatNumber=function(h,c){c="number"===typeof c?{places:c}:c||{};if(null==c.places||0>c.places)c.places=r.getPlaces(h,!0),c.maxPlaces&&c.places>c.maxPlaces&&(c.places=c.maxPlaces);return z.formatNumber(h,
c)};r.getPlaces=function(h,c){function e(g,p){var A=h.indexOf(g,b);if(0>A)return d;g=h.charAt(A+g.length);return!g||0>p.indexOf(g)?d:A-b}h=+h;if(isNaN(h))return-1;h+="";var b=h.indexOf(".")+1,d=b?h.length-b:0;if(2>=d||!c)return d;c=0;if(!+h.substr(0,b-1))for(;"0"===h.charAt(b);)b++,c++,d--;for(var a=d-1;2<=a;a--){var f=Math.min(e("000000000000000".substr(0,a),"01234"),e("999999999999999".substr(0,a),"56789"));if(f!==d){d=f;break}}return d+c};return r})},"widgets/BusinessAnalyst/baUtil/ObjectUtil":function(){define(["require",
"exports"],function(v,z){function C(r,h){for(var c=0,e=Object.keys(h);c<e.length;c++){var b=e[c];"object"!==typeof r[b]||null===r[b]||"object"!==typeof h[b]||null===h[b]?r[b]=h[b]:Array.isArray(r[b])?Array.isArray(h[b])?r[b].concat(h[b]):r[b]=h[b]:Array.isArray(h[b])?r[b]=h[b]:C(r[b],h[b])}}return{map:function(r,h,c){void 0!==c&&(h=h.bind(c));if("object"!==typeof r)throw Error("Object or array expected");if(Array.isArray(r)){c=[];for(var e=0,b=r.length;e<b;e++)c.push(h(r[e],e));return c}c={};e=0;
for(b=Object.keys(r);e<b.length;e++){var d=b[e];Object.hasOwnProperty.call(r,d)&&(c[d]=h(r[d],d))}return c},deepAssign:function(r){for(var h=[],c=1;c<arguments.length;c++)h[c-1]=arguments[c];for(c=0;c<h.length;c++)C(r,h[c]);return r}}})},"esri/dijit/geoenrichment/utils/ObjectUtil":function(){define(["dojo/number","./DateUtil"],function(v,z){var C={};Math.log10=Math.log10||function(h){return Math.log(h)*Math.LOG10E};C.populateObject=function(h,c,e){function b(d,a){function f(p){var A=d[p],l=a[p],k=
A&&"object"===typeof A;void 0!==A&&(void 0===l?a[p]=A:l&&"object"===typeof l&&k?b(A,l):e&&(k?(l=a[p]={},b(A,l)):a[p]=d[p]))}if(d&&a&&!(Array.isArray(d)&&!Array.isArray(a)||Array.isArray(a)&&!Array.isArray(d)))if(Array.isArray(d))d.forEach(function(p,A){f(A)});else for(var g in d)f(g)}b(c,h);return h};C.filterByPattern=function(h,c){function e(d,a,f){for(var g in d){var p=d[g],A=a[g];if(Array.isArray(p)){var l=p[0];if(A&&Array.isArray(A)){var k=f[g]=[];A.forEach(function(F){if(F&&"object"===typeof F){var I=
Array.isArray(F)?[]:{};e(l,F,I);k.push(I)}})}}else if("object"===typeof p){if(A&&"object"===typeof A){var t=f[g]={};e(p,A,t)}}else void 0!==A&&(f[g]=A)}}var b={};e(c,h,b);return b};C.traverseObject=function(h,c){for(var e in h){var b=h[e];c(b,e,h);b&&"object"===typeof b&&C.traverseObject(b,c)}};C.copyOwnJsonProperties=function(h,c,e){c=c||{};for(var b in h){var d=h[b];h.hasOwnProperty(b)&&"function"!=typeof d&&(d&&"object"==typeof d&&e&&(d=e(b,d)),void 0!==d&&(c[b]=d))}return c};C.removeUndefinedProperties=
function(h){h&&Object.keys(h).forEach(function(c){void 0===h[c]&&delete h[c]});return h};C.getValue=function(h,c){if("string"!==typeof c)return h;c=c.split(".");for(var e=0;e<c.length;e++)h=h&&h[c[e]];return h};C.setValue=function(h,c,e){if("string"===typeof c&&(c=c.split("."),c.length)){for(var b=0;b<c.length-1;b++)h=h&&h[c[b]];h&&(h[c[c.length-1]]=e)}};C.isNumber=function(h){return!isNaN(parseFloat(h))&&isFinite(h)};C.roundNumber=function(h,c){return"number"!==typeof h?h:parseFloat(h.toFixed(void 0!==
c?c:0))};C.getBestPrecision=function(h){return 0===h?0:Math.max(0,Math.round(Math.log10(3E3/Math.abs(h))))};C.getPlaces=function(h,c){function e(g,p){var A=h.indexOf(g,b);if(0>A)return d;g=h.charAt(A+g.length);return!g||0>p.indexOf(g)?d:A-b}h=+h;if(isNaN(h))return-1;h+="";var b=h.indexOf(".")+1,d=b?h.length-b:0;if(2>=d||!c)return d;c=0;if(!+h.substr(0,b-1))for(;"0"===h.charAt(b);)b++,c++,d--;for(var a=d-1;2<=a;a--){var f=Math.min(e("000000000000000".substr(0,a),"01234"),e("999999999999999".substr(0,
a),"56789"));if(f!==d){d=f;break}}return d+c};C.formatNumber=function(h,c){c="number"===typeof c?{places:c}:c||{};var e=c.places,b={};0<=e?b.places=e:e=-1;b.locale=c.locale||z.getDateNumberLocale();h=v.format(h,b);if(c.noSeparator){b=C.getSeparator();var d;if(b)for(;0<=(d=h.indexOf(b));)h=h.substr(0,d)+h.substr(d+1)}if(c.preserveTrailingZeroes||0>=e||!h)return h;for(c=h.length;0<e&&"0"==h.charAt(c-1);)c--,--e||c--;return h.substr(0,c)};C.formatNumberAsCurrency=function(h,c,e){return c?c.split(";")[0>
h?1:0].replace("0",C.formatNumber(Math.abs(h),e)):C.formatNumber(h,e)};var r;C.getSeparator=function(){void 0===r&&(r=v.format(9999,{places:0}).replace(/9/g,""));return r};C.parseNumber=function(h,c,e,b){if(""===h)return"undefined"!==typeof e?e:NaN;if(null==h||"string"!==typeof h&&isNaN(h))return NaN;h=String(h);if(!h.trim())return void 0!==e?e:NaN;e=v.parse(h,{strict:b,locale:z.getDateNumberLocale()});isNaN(e)&&h.trim().length&&(e=b?v.parse(h,{strict:b,locale:"en-US"}):Number(h));return isNaN(e)||
void 0===c||0>c?e:v.round(e,c)};C.parsePercentOrCurrency=function(h,c,e,b,d){"string"===typeof h&&(h=h.replace("%",""),c&&(c=c.split(";")[0].replace("0",""),h=h.replace(c,"")));return C.parseNumber(h,e,b,d)};C.compareEqual=function(h,c,e){return void 0===e?h===c:Number(Number(h).toFixed(e))===Number(Number(c).toFixed(e))};return C})},"esri/dijit/geoenrichment/utils/DateUtil":function(){define(["dojo/date/locale","esri/moment"],function(v,z){var C={formatDate:function(r,h){r=C.objectToDate(r);h.locale=
h.locale||C.getDateNumberLocale();return r?v.format(r,h):""},formatMoment:function(r,h){return(r=C.objectToTime(r))?z(r).format(h):""},formatDateShort:function(r){return C.formatMoment(r,"L")},formatDateTimeShort:function(r){return C.formatMoment(r,"L LT")},formatLiveTime:function(r){var h=C.formatMoment(r,"l, LT").replace(/\d\d\d\d/,function(c){return c.substr(2)});return h?h+" "+C.formatDate(r,{datePattern:"ZZZZ",selector:"date"}):""},formatTypicalTime:function(r){return C.formatMoment(r,"ddd LT")},
parseDateShort:function(r){return(r=+z(r,"L"))?new Date(r):null},getReportFooterDate:function(r){return v.format(r||new Date,{datePattern:"MMMM d, yyyy",selector:"date"})},getFullYear:function(){return(new Date).getFullYear()},objectToTime:function(r){if(!r)return null;r="string"===typeof r?new Date(r):r;return r.getTime?r.getTime():Number(r)||null},objectToDate:function(r){return r?r.getTime?r:new Date(r):null},getDateNumberLocale:function(){return window.dojoConfig&&window.dojoConfig.extraLocale&&
window.dojoConfig.extraLocale[0]||window.dojo.locale}};return C})},"esri/dijit/geoenrichment/utils/SortUtil":function(){define([],function(){function v(h,c,e,b){h=void 0===h||null===h;return h!=(void 0===c||null===c)?(c=h?-1:1,(void 0===b?e:b)?-c:c):h?0:null}function z(h){var c=/^(.+)\s([1-9]\d*)$/.exec(h);return c?{base:c[1],number:c[2]}:/^[1-9]\d*$/.test(h)?{base:"",number:+h}:{base:h,number:0}}var C={NEWEST:"newest",OLDEST:"oldest",ALPHABETICAL:"alphabetical",UNALPHABETICAL:"unalphabetical",compareNumeric:function(h,
c,e,b){b=v(h,c,e,b);if(null!==b)return b;h=Number(h);c=Number(c);b=h>c?1:h<c?-1:0;return e?-b:b},compareString:function(h,c,e,b){b=v(h,c,e,b);if(null!==b)return b;h=String(h);c=String(c);b=h.localeCompare(c);return e?-b:b}},r=/^(.+)\s([1-9]\d*)(\D*)$/;C.compareNames=function(h,c,e,b){var d=z("string"===typeof h?h.toLowerCase():h),a=z("string"===typeof c?c.toLowerCase():c),f=null;if(d.base===a.base)f=C.compareNumeric(d.number,a.number,e,b);else{var g=r.exec(d.base);if(g){var p=r.exec(a.base);p&&g[1]===
p[1]&&g[3]===p[3]&&(f=C.compareNumeric(g[2],p[2],e,b))}null===f&&(f=C.compareString(d.base,a.base,e,b))}return f||C.compareString(h,c,e,b)};C.compare=function(h,c,e,b){var d=v(h,c,e,b);if(null!==d)return d;d=typeof h;typeof c!=d&&(d="");switch(d){case "number":case "boolean":break;case "object":h=h.valueOf();c=c.valueOf();break;default:return C.compareString(h,c,e,b)}d=h>c?1:h<c?-1:0;return e?-d:d};return C})},"esri/dijit/geoenrichment/utils/ArrayUtil":function(){define(["dojo/_base/array"],function(v){var z=
{},C={}.toString();z.arraysEqual=function(r,h){if(!r&&!h)return!0;if(!r||!h||r.length!==h.length)return!1;for(var c=0;c<r.length;c++)if(r[c]!==h[c])return!1;return!0};z.composeIdentityFunction=function(r,h){var c="function"===typeof r?r:r?function(e){return e[r]}:function(e){return e};return function(e){return(e=c(e))&&e.toString?e.toString():h&&void 0===e?e:String(e)}};z.removeDuplicates=function(r,h){var c=[],e={};h=z.composeIdentityFunction(h,!0);v.forEach(r,function(b,d){var a=h(b);a===C&&(void 0===
b["__ArrayUtil.js_uniqueKey__"]&&(b["__ArrayUtil.js_uniqueKey__"]="__ArrayUtil.js_uniqueKey__"+d),a=b["__ArrayUtil.js_uniqueKey__"]);void 0===a||a in e||(e[a]=b,c.push(b))});return c};z.splitArrayToBunches=function(r,h){h=h||100;for(var c=[],e,b=0,d=r.length;b<d;b++)e&&e.length!==h||(e=[],c.push(e)),e.push(r[b]);return c};return z})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/DomUtil":function(){define("dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/on ../../utils/ObjectUtil esri/dijit/geoenrichment/utils/DomUtil".split(" "),
function(v,z,C,r,h,c,e){var b=Object.assign({},e);b.select=function(d){return b.addTag(d,"selected")};b.unselect=function(d){return b.removeTag(d,"selected")};b.floatStart=function(d){return b.addTag(d,"esriMapsAnalystXFloatStart")};b.floatEnd=function(d){return b.addTag(d,"esriMapsAnalystXFloatEnd")};b.addSpacer=function(d,a){d=v.create("div",{"class":"esriMapsAnalystXSpacer",innerHTML:"\x26nbsp;"},d);if(a)b[a](d);return d};b.getAndUpdateNumber=function(d,a){if(!d)return NaN;var f=d.get&&d.set;void 0===
a&&(a=0);var g=c.parseNumber(f?d.get("value"):d.value,a);isNaN(g)||(f?d.set("value",c.formatNumber(g,a)):d.value=c.formatNumber(g,a));return g};b.getAndUpdateString=function(d){if(!d)return null;if(d.get&&d.set){var a=d.get("value").trim();d.set("value",a)}else a=d.value.trim(),d.value=a;return a};b.getScreenScaleFactor=function(){return b.getTextBox("",{style:"width: 72pt; height: 72pt"}).w/96};b.positionAtCenter=function(d,a){if(d&&a){var f=z.position(d);a=z.position(a);f.w&&f.h&&a.w&&a.h&&C.set(d,
{left:(a.w-f.w)/2+"px",top:(a.h-f.h)/2+"px"})}};b.showAroundOverlay=function(d,a){a=a||{};b.removeAroundOverlay(d);var f={w:"width",h:"height",l:"left",t:"top",r:"right",b:"bottom"},g=z.position(d);if(a.viewPortContainer){var p=z.position(a.viewPortContainer),A=g.x,l=g.y;g.x=Math.max(g.x,p.x);g.w-=g.x-A;g.y=Math.max(g.y,p.y);g.h-=g.y-l;g.w=Math.min(g.w,p.x+p.w-g.x);g.h=Math.min(g.h,p.y+p.h-g.y)}d.__aroundOverlays=(a.placeInNode?[{l:0,t:-g.y,w:g.w,h:g.y},{l:g.w,t:-g.y,w:document.body.clientWidth-(g.x+
g.w),h:document.body.clientHeight},{l:0,t:g.h,w:g.w,h:document.body.clientHeight-(g.y+g.h)},{l:-g.x,t:-g.y,w:g.x,h:document.body.clientHeight}]:[{l:g.x,t:0,w:g.w,h:g.y},{w:document.body.clientWidth-(g.x+g.w),r:0,t:0,b:0},{l:g.x,h:document.body.clientHeight-(g.y+g.h),w:g.w,b:0},{l:0,t:0,w:g.x,b:0}]).map(function(t){var F=v.create("div",{"class":a.overlayClass||"esriMapsAnalystXNodeAroundOverlay"},a.placeInNode?d:document.body),I={position:"absolute"},B;for(B in f)void 0!==t[B]&&(I[f[B]]=Math.round(t[B])+
"px");C.set(F,I);return F});g=function(){b.removeAroundOverlay(d)};a.removeOnClick&&(d.__aroundOverlaysRemoveHandle=h.once(document.body,"click",g));d.__aroundOverlaysResizeHandle=h(window,"resize",function(){b.showAroundOverlay(d,a)});var k;d.__aroundOverlaysSetIntervalHandle=setInterval(function(){if(k){var t=z.position(d);t.x==k.x&&t.y==k.y&&t.w==k.w&&t.h==k.h||b.showAroundOverlay(d,a)}else k=z.position(d)},50);return{remove:g}};b.removeAroundOverlay=function(d){d.__aroundOverlays&&d.__aroundOverlays.forEach(function(a){v.destroy(a)});
delete d.__aroundOverlays;d.__aroundOverlaysRemoveHandle&&d.__aroundOverlaysRemoveHandle.remove();delete d.__aroundOverlaysRemoveHandle;d.__aroundOverlaysResizeHandle&&d.__aroundOverlaysResizeHandle.remove();delete d.__aroundOverlaysResizeHandle;clearInterval(d.__aroundOverlaysSetIntervalHandle);delete d.__aroundOverlaysSetIntervalHandle};b.getDocumentStyleDeclaration=function(d){function a(p){try{var A=p.rules||p.cssRules}catch(k){A=null}if(A)for(p=0;p<A.length;p++){var l=A[p];if(l.styleSheet){if(l=
a(l.styleSheet))return l}else if(l.selectorText==d)return l.style}}for(var f=0;f<document.styleSheets.length;f++){var g=a(document.styleSheets[f]);if(g)return g}return null};b.getNodeFontFamily=function(d){return(d=C.get(d,"fontFamily")||C.getComputedStyle(d)["font-family"])?d.replace(/'|"/g,"").split(",")[0]:d};b.getNodeFontSize=function(d){return C.toPixelValue(d,C.get(d,"fontSize"))};b.listenToNodeAdded=function(d,a,f){if(b.isNodeInLayout(d))a();else{d.__listenToNodeAddedHandle&&d.__listenToNodeAddedHandle.remove();
var g=setInterval(function(){b.isNodeInLayout(d)&&(d.__listenToNodeAddedHandle&&d.__listenToNodeAddedHandle.remove(),a())},f||100);d.__listenToNodeAddedHandle={remove:function(){clearInterval(g);delete d.__listenToNodeAddedHandle}};return d.__listenToNodeAddedHandle}};b.isNodeVisible=function(d){return b.isChildOf(d,document.body,function(a){return!r.contains(a,"dijitHidden")&&"hidden"!=C.get(a,"visibility")})};b.enableHyperlink=function(d,a){a?r.replace(d,"esriMapsAnalystXLink","esriMapsAnalystXLinkDisabled"):
r.replace(d,"esriMapsAnalystXLinkDisabled","esriMapsAnalystXLink")};return b})},"widgets/BusinessAnalyst/esriAnalystX/dijit/utils/MouseUtil":function(){define(["dojo/dom-geometry","esri/dijit/geoenrichment/utils/MouseUtil"],function(v,z){var C;z.unitTesting_setCursorOverNode=function(r){r=v.position(r);z.unitTesting_setCursorPosition(r.x+r.w/2,r.y+r.h/2)};z.unitTesting_setCursorPosition=function(r,h){z._latestEvent={clientX:r,pageX:r,clientY:h,pageY:h}};z.unitTesting_lockPosition=function(r){C=r};
z.unitTesting_shiftMousePosition=function(r,h){z.unitTesting_setCursorPosition(z._latestEvent.clientX+(r||0),z._latestEvent.clientY+(h||0))};z._setLatestEvent=function(r){C||(z._latestEvent=r)};return z})},"esri/dijit/geoenrichment/utils/MouseUtil":function(){define("dojo/_base/lang dojo/on dojo/sniff dojo/touch dojo/dom-geometry ./DomUtil dojo/domReady!".split(" "),function(v,z,C,r,h,c){var e={_latestEvent:null,_setLatestEvent:function(f){e._latestEvent=f},_getLatestEvent:function(){return e._latestEvent}};
C("touch")?(z(document.body,r.press,function(f){e._setLatestEvent(a(f))}),z(document.body,r.move,function(f){e._setLatestEvent(a(f))})):z(document.body,"mousemove",function(f){e._setLatestEvent(a(f))});var b;z(document.body,"mousedown",function(){b||(b=!0,z.once(document.body,"mouseup, click",function(){b=!1}))});e.getCursorPosition=function(){return e._latestEvent};e.isMouseOver=function(f,g){var p=g&&g.event||e._latestEvent;if(!(f&&f.parentNode&&f.getBoundingClientRect&&p))return!1;if(g&&g.checkAllChildren){g=
v.mixin({},g);delete g.checkAllChildren;var A=!1;c.traverseChildren(f,function(l){if(e.isMouseOver(l,g))return A=!0});return A}return e.isMouseOverBox(h.position(f),g)};e.isMouseOverBox=function(f,g){if(!f)return!1;var p=g&&g.event||e._latestEvent;g&&g.ignoreBorderTolerance&&(g=g.ignoreBorderTolerance,f=v.mixin({},f),f.x+=g,f.y+=g,f.w-=2*g,f.h-=2*g);return f.x<=p.clientX&&f.x+f.w>=p.clientX&&f.y<=p.clientY&&f.y+f.h>=p.clientY};var d=function(f){if(f.touches){if(!f.touches.length)return f.changedTouches[0];
for(var g=f.touches[0].identifier,p,A=0;A<f.changedTouches.length;A++)if(f.changedTouches[A].identifier===g){p=f.changedTouches[A];break}return p||f.touches[0]}},a=function(f){var g=d(f);g&&(g.type=f.type);return g||f};e.fixTouchEvent=function(f){var g=d(f);g&&(f.screenX=g.screenX,f.screenY=g.screenY,f.clientX=g.clientX,f.clientY=g.clientY,f.pageX=g.pageX,f.pageY=g.pageY);return f};e.isBeingDragged=function(){return b};e.addOverOutHandler=function(f){function g(){clearTimeout(A);p&&p.remove()}var p,
A,l=z(f.node,"mouseover",function(k){function t(){e.isMouseOver(f.node)&&(f.onMouseOver(k),p=z(document.body,"mousemove",function(F){e.isMouseOver(f.node)||(g(),f.onMouseOut(F))}))}g();f.delayTimeout?A=setTimeout(t,f.delayTimeout):t()});return{remove:function(){l.remove();g()}}};e.addOutHandler=function(f,g){return z(document.body,"mousemove",function(p){e.isMouseOver(f,{checkAllChildren:!0})||g(p)})};return e})},"widgets/BusinessAnalyst/esriAnalystX/dijit/tooltips/TooltipUtil":function(){define("dojo/dom-construct dojo/dom-style dojo/dom-geometry dojo/dom-class dojo/query dojo/on dojox/gfx dojo/sniff dojo/aspect dojox/uuid/generateRandomUuid dijit/Tooltip ../utils/DomUtil ../utils/MouseUtil esri/dijit/geoenrichment/utils/TooltipUtil dojo/domReady!".split(" "),
function(v,z,C,r,h,c,e,b,d,a,f,g,p,A){function l(){E&&(E.isMultilineContainer?B.hideTooltipForNode(E):(clearInterval(E.__autoTooltipInLayoutCheckHandle),delete E.__autoTooltipInLayoutCheckHandle,f.hide(E)),E=null)}function k(y,x){x=x||"";var w=v.create("div",{class:"esriMapsAnalystXValidationTooltip"+x},document.body);!x&&v.create("div",{class:"esriMapsAnalystXValidationTooltipTip"+x},w);v.create("div",{innerHTML:y,class:"esriMapsAnalystXValidationTooltipBody"+x},w);z.set(w,"position","fixed");return w}
function t(y,x){function w(){y&&(document.body.removeChild(y),H.forEach(function(K){K.remove()}),y=H=null)}x=x.textbox||x;var n=C.getMarginBox(y),q=C.position(x);"rtl"===document.dir?z.set(y,{left:q.x-n.w+"px",top:q.y+q.h/2-n.h/2+"px"}):z.set(y,{left:q.x+q.w+"px",top:q.y+q.h/2-n.h/2+"px"});var H=[c(document.body,"mousedown, keydown",w),c(x,"blur",w)];return{remove:w}}function F(y,x,w){function n(){var u=v.create("div",{class:"esriMapsAnalystXClosableTooltipTip"},H);r.add(u,"right"===w?"esriMapsAnalystXClosableTooltipTipRight":
"esriMapsAnalystXClosableTooltipTipLeft")}function q(){K=v.create("div",{class:"esriMapsAnalystXClosableTooltipBody"},H);v.create("div",{innerHTML:y,class:"esriMapsAnalystXClosableTooltipLabel"},K);m=v.create("div",{class:"esriMapsAnalystXClosableTooltipCloseButton esriMapsAnalystXCloseWindow esriMapsAnalystXCloseWindowWhite"},K)}x={class:"esriMapsAnalystXClosableTooltip "+(x||"")};x.id=a();var H=v.create("div",x,document.body),K,m;"right"!==w?(q(),n()):(n(),q());z.set(H,"position","fixed");return{tooltip:H,
body:K,closeButton:m}}function I(y,x,w,n){var q=C.getMarginBox(y.tooltip),H=C.position(x);"rtl"===document.dir&&"right"!==n||"rtl"!==document.dir&&"right"===n?z.set(y.tooltip,{left:H.x+H.w+"px",top:H.y+H.h/2-q.h/2+"px"}):z.set(y.tooltip,{left:H.x-q.w+"px",top:H.y+H.h/2-q.h/2+"px"});var K,m=function(){K&&clearTimeout(K);u&&clearInterval(u);D&&D.remove();y.tooltip.parentNode===document.body&&document.body.removeChild(y.tooltip)};var u=setInterval(function(){g.isNodeInLayout(x)||m();g.isNodeVisible(x)?
g.show(y.tooltip):g.hide(y.tooltip)},300);w&&(K=setTimeout(m,w));var D=c(y.closeButton,"click",function(){m()});y.tooltip._removeFunc=m;return y.tooltip}var B={},G={};B.hideTooltipForNode=A.hideTooltipForNode;B.setTooltipToNode=A.setTooltipToNode;B.createTooltip=function(y,x,w){var n={orientation:C.isBodyLtr(document)?"right":"left",offset:{x:15,y:0}};x&&(n.innerHTML=x);w&&(n=Object.assign(n,w));n.id=a();n.toMouseCursor&&(n.mouseEvent=p.getCursorPosition(),delete n.toMouseCursor);x=n.mouseEvent;delete n.mouseEvent;
w=n.htmlFragment;delete n.htmlFragment;var q=n.widget;delete n.widget;var H=n.orientation;delete n.orientation;var K=n.offset;delete n.offset;var m=n.horizontalOffset;delete n.horizontalOffset;var u=v.create("div",n,y?y.container:document.body);w?v.place(w,u):q&&q.placeAt(u);z.set(u,"position","fixed");var D=C.getMarginBox(u),M=function(L,N){var O=L.touches?event.touches[0].clientX:L.clientX;L=L.touches?event.touches[0].clientY:L.clientY;var Q,P,S=K.x,R=K.y;"left"===H?0>O-D.w-S&&(Q="right"):O+D.w+
S>document.body.clientWidth&&(Q="left");L+D.h+R>document.body.clientHeight&&(P="above");Q=Q||H;z.set(u,{left:N?N+"px":O+("left"===Q?-D.w-S:S)+"px",top:L+("above"===P?-D.h-R:R)+"px"});u.style.display=""};x&&M(x,m);n=[];n.push(c(y?y:document.body,y?"mouse-move, mousemove":"mousemove, touchmove",function(L){M(L,m)}));n.push(c(y?y:document.body,y?"mouse-out, mouseout":"mouseout, touchend",function(L){u.style.display="none"}));y={};y.handlers=n;y.tooltip=u;G[u.id]=y;return u};B.removeTooltip=function(y){if(y){y=
"string"===typeof y?y:y.id;var x=G[y];delete G[y];x&&(x.handlers.forEach(function(w){w.remove()}),v.destroy(x.tooltip))}};var J={};B.registerTooltipForSlider=function(y,x,w,n){var q={offsetX:0,offsetY:0,class:"esriMapsAnalystXTooltip"};x&&(q=Object.assign(q,x));q.id=a();var H=v.create("div",q,document.body);H.style.display="none";z.set(H,"position","fixed");var K=!1,m=function(D,M){if(!K){K=!0;H.style.display="";H.innerHTML=M();var L=C.getMarginBox(H),N=C.position(D);z.set(H,{left:N.x+N.w/2-L.w/2+
q.offsetX+"px",top:N.y-L.h-5+q.offsetY+"px"});var O=[];O.push(d.after(y,"onChange",function(){H.innerHTML=M();N=C.position(D);z.set(H,{left:N.x+N.w/2-L.w/2+"px",top:N.y-L.h-5+"px"})}));var Q=function(){H.style.display="none";O.forEach(function(S){S.remove()});K=!1},P=!1;O.push(c(D,"mousedown, mouseDown, mouse-down",function(){P=!0;O.push(c(document,"mouseup, mouseUp, mouse-up",function(){Q()}))}));O.push(c(D,"mouseout, mouseOut, mouse-out",function(){P||Q()}))}};x=[];x.push(c(y.sliderHandle,"mouseover, mouseOver, mouse-over",
function(){n&&y.isSliderDisabled&&y.isSliderDisabled()||m(y.sliderHandle,function(){var D=n?y.get("value")[0]:y.get("value");return w?w(D):D})}));n&&x.push(c(y.sliderHandleMax,"mouseover, mouseOver, mouse-over",function(){y.isSliderDisabled&&y.isSliderDisabled()||m(y.sliderHandleMax,function(){return w?w(y.get("value")[1]):y.get("value")[1]})}));x.push(d.before(y,"destroy",function(){B.unregisterTooltipForSlider(y)}));y.tooltipId=H.id;var u={};u.tooltip=H;u.handlers=x;J[H.id]=u};B.unregisterTooltipForSlider=
function(y){var x=J[y.tooltipId];x&&(x.handlers.forEach(function(w){w.remove()}),v.destroy(x.tooltip));delete J[y.tooltipId];delete y.tooltipId};var E=null;B.autoTooltip=function(y,x,w){"string"===typeof x&&(x=x.split(" ").filter(function(q){return q&&!!q.trim().length}));x=x||[];x.push("TrimWithEllipses");w=w||[];w.push("esriMapsAnalystXInfoIcon");for(var n=0;n<x.length;n++)c(y,"."+x[n]+":mouseover, "+x[n]+":touchstart, ",function(q){this!==E&&this.offsetWidth<this.scrollWidth&&!this.noAutoTooltip&&
(q=getComputedStyle(this).width,q=Number(q.substr(0,q.length-2)),0>q-Math.round(q)&&this.offsetWidth==this.scrollWidth-1||(l(),E=this,q=E.autoTooltip||E.textContent||E.value,E.title&&(q+=" ("+E.title+")"),q&&f.show(q,E,["above","below"]),c.once(E,"mouseout, touchstart, touchout",function(){l()}),E.__autoTooltipInLayoutCheckHandle=setInterval(function(){g.isNodeInLayout(E)||l()},500)))});if(b("touch"))for(n=0;n<w.length;n++)c(y,"."+w[n]+":touchstart ",function(q){this!==E&&(E=this,E.title&&(f.show(E.title,
E,["above","below"]),c.once(E,"touchstart, touchout",function(){f.hide(E);E=null})))})};B.addAutoTooltipsToTabContainer=function(y){h(".tabLabel",y.domNode).forEach(function(x){r.add(x,"TrimWithEllipses")});B.autoTooltip(y)};B.setMultilineText=function(y,x,w,n){w=w||2;x=x.trim();n=n||["above","below"];r.remove(y,"TrimWithEllipses");y.style.overflow="hidden";y.innerHTML="";for(var q=x,H=!1;q;){w--;var K=v.create("div",null,y);K.style.overflow="hidden";K.style.whiteSpace="nowrap";for(var m=q;m;)if(K.textContent=
m,K.offsetWidth<K.scrollWidth-1)m=(m=m.match(/^(.*[^\s]+)\s+[^\s]+$/))&&m[1]||"";else break;!m||!w&&m!==q?(K.textContent=q,q="",K.style.textOverflow="ellipsis",H=!0):q=q.substr(m.length).trim()}H&&B.setTooltipToNode(y,function(){l();E=y;E.isMultilineContainer=!0;return x},{position:n})};B.showErrorTip=function(y,x){return t(k(x),y.domNode||y)};B.showNewStyleErrorTip=function(y,x,w){return t(k(x,"NewStyle"+(w?" esriMapsAnalystXWarningStyle":"")),y.domNode||y)};B.showAlertTooltip=function(y){y&&y.node&&
y.message&&(f.show(y.message,y.node,y.position||["above","below"]),setTimeout(function(){f.hide(y.node)},y.timeout||5E3))};B.showClosableTooltip=function(y){var x=F(y.message,y.tooltipClass,y.position);return I(x,y.component,y.timeout,y.position)};B.removeClosableTooltip=function(y){y&&y._removeFunc&&y._removeFunc()};B.showClosableTooltipOnVerticalBracket=function(y){var x=y.below||y.above,w=C.position(y.above,!0),n=C.position(x,!0),q="rtl"!==document.dir?"start"===y.direction:"end"===y.direction,
H=w.x+w.w*(q?0:1);w=w.y;var K=n.y+n.h,m=v.create("div",{class:"esriMapsAnalystFlexibleTooltip_tooltip esriMapsAnalystXNonSelectable"},document.body),u=v.create("div",{class:"esriMapsAnalystFlexibleTooltip_surfaceContainer"},m);n={};H={top:w-2,left:H+(q?-3:3),height:K-w+4,width:10};for(var D in H)n[D]=H[D]+"px";z.set(m,n);var M=e.createSurface(u,H.width,H.height);M.clear();M.createPolyline([{x:q?H.width:0,y:0},{x:q?0:H.width,y:0},{x:q?0:H.width,y:H.height},{x:q?H.width:0,y:H.height}]).setStroke({color:"#6E6E6E",
width:6});y.component=m;q=F(y.message,y.tooltipClass,y.position);var L=function(){clickHandler&&clickHandler.remove();N&&clearInterval(N);M&&M.clear();v.destroy(u);v.destroy(m)},N=setInterval(function(){g.isNodeInLayout(x)||L();g.isNodeVisible(x)?z.set(m,"visibility","visible"):z.set(m,"visibility","hidden")},300);y.timeout&&setTimeout(L,y.timeout);clickHandler=c(q.closeButton,"click",L);tooltip=I(q,y.component,y.timeout,y.position);var O=tooltip._removeFunc;tooltip._removeFunc=function(){O();L()};
return tooltip};return B})},"dojox/uuid/generateRandomUuid":function(){define(["./_base"],function(){dojox.uuid.generateRandomUuid=function(){function v(){for(var c=Math.floor(Math.random()%1*Math.pow(2,32)).toString(16);8>c.length;)c="0"+c;return c}var z=v(),C=v();C=C.substring(0,4)+"-4"+C.substring(5,8);var r=v();r="8"+r.substring(1,4)+"-"+r.substring(4,8);var h=v();return(z+"-"+C+"-"+r+h).toLowerCase()};return dojox.uuid.generateRandomUuid})},"dojox/uuid/_base":function(){define(["dojo/_base/kernel",
"dojo/_base/lang"],function(v){v.getObject("uuid",!0,dojox);dojox.uuid.NIL_UUID="00000000-0000-0000-0000-000000000000";dojox.uuid.version={UNKNOWN:0,TIME_BASED:1,DCE_SECURITY:2,NAME_BASED_MD5:3,RANDOM:4,NAME_BASED_SHA1:5};dojox.uuid.variant={NCS:"0",DCE:"10",MICROSOFT:"110",UNKNOWN:"111"};dojox.uuid.assert=function(z,C){if(!z)throw C||(C="An assert statement failed.\nThe method dojox.uuid.assert() was called with a 'false' value.\n"),Error(C);};dojox.uuid.generateNilUuid=function(){return dojox.uuid.NIL_UUID};
dojox.uuid.isValid=function(z){z=z.toString();var C=v.isString(z)&&36==z.length&&z==z.toLowerCase();if(C){z=z.split("-");C=5==z.length&&8==z[0].length&&4==z[1].length&&4==z[2].length&&4==z[3].length&&12==z[4].length;for(var r in z){var h=parseInt(z[r],16);C=C&&isFinite(h)}}return C};dojox.uuid.getVariant=function(z){if(!dojox.uuid._ourVariantLookupTable){var C=dojox.uuid.variant,r=[];r[0]=C.NCS;r[1]=C.NCS;r[2]=C.NCS;r[3]=C.NCS;r[4]=C.NCS;r[5]=C.NCS;r[6]=C.NCS;r[7]=C.NCS;r[8]=C.DCE;r[9]=C.DCE;r[10]=
C.DCE;r[11]=C.DCE;r[12]=C.MICROSOFT;r[13]=C.MICROSOFT;r[14]=C.UNKNOWN;r[15]=C.UNKNOWN;dojox.uuid._ourVariantLookupTable=r}z=z.toString();z=z.charAt(19);z=parseInt(z,16);dojox.uuid.assert(0<=z&&16>=z);return dojox.uuid._ourVariantLookupTable[z]};dojox.uuid.getVersion=function(z){dojox.uuid.assert(dojox.uuid.getVariant(z)==dojox.uuid.variant.DCE,"dojox.uuid.getVersion() was not passed a DCE Variant UUID.");z=z.toString();z=z.charAt(14);return parseInt(z,16)};dojox.uuid.getNode=function(z){dojox.uuid.assert(dojox.uuid.getVersion(z)==
dojox.uuid.version.TIME_BASED,"dojox.uuid.getNode() was not passed a TIME_BASED UUID.");z=z.toString();return z.split("-")[4]};dojox.uuid.getTimestamp=function(z,C){dojox.uuid.assert(dojox.uuid.getVersion(z)==dojox.uuid.version.TIME_BASED,"dojox.uuid.getTimestamp() was not passed a TIME_BASED UUID.");z=z.toString();C||(C=null);switch(C){case "string":case String:return dojox.uuid.getTimestamp(z,Date).toUTCString();case "hex":var r=z.split("-");z=r[0];C=r[1];r=r[2];r=r.slice(1);z=r+C+z;dojox.uuid.assert(15==
z.length);return z;case null:case "date":case Date:return r=z.split("-"),z=parseInt(r[0],16),C=parseInt(r[1],16),r=(parseInt(r[2],16)&4095)<<16,r=4294967296*(r+C),r+=z,new Date(r/1E4-122192928E5);default:dojox.uuid.assert(!1,"dojox.uuid.getTimestamp was not passed a valid returnType: "+C)}};return dojox.uuid})},"esri/dijit/geoenrichment/utils/TooltipUtil":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/on dojo/mouse dojo/sniff dijit/Tooltip dijit/place dojox/gfx ./DeviceUtil ./DnDUtil ./DomUtil ./MouseUtil esri/dijit/geoenrichment/ReportPlayer/config dojo/domReady!".split(" "),
function(v,z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t){function F(){}var I={},B=v(a._MasterTooltip,{_customClasses:null,_customStyle:null,_orientKey:null,addCustomClasses:function(w){w&&(C.add(this.domNode,w),this._customClasses=w)},setCustomStyle:function(w){this._customStyle=w},show:function(w,n,q,H,K,m,u){if(!this.aroundNode||this.aroundNode!==n||this.containerNode.innerHTML!=w)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{"string"===typeof w?this.containerNode.innerHTML=w:(this.containerNode.innerHTML=
"",r.place(w.domNode||w,this.containerNode));K&&this.set("textDir",K);this.containerNode.align=H?"right":"left";var D=f.around(this.domNode,n,q&&q.length?q:a.defaultPosition,!H,z.hitch(this,"orient")),M=D.aroundNodePos;"M"==D.corner.charAt(0)&&"M"==D.aroundCorner.charAt(0)?(this.connectorNode.style.top=M.y+(M.h-this.connectorNode.offsetHeight>>1)-D.y+"px",this.connectorNode.style.left=""):"M"==D.corner.charAt(1)&&"M"==D.aroundCorner.charAt(1)?this.connectorNode.style.left=M.x+(M.w-this.connectorNode.offsetWidth>>
1)-D.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");this._drawBackground();this.domNode.style.opacity="0";this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=n;this.onMouseEnter=m||F;this.onMouseLeave=u||F}},orient:function(w,n,q,H,K){this.connectorNode.style.top="";var m=H.h;H=H.w;w.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft",
"TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[this._orientKey=n+"-"+q];this.addCustomClasses(this._customClasses);this.domNode.style.width="auto";var u=h.position(this.domNode);u.w=Math.ceil(u.w);if(d("ie")||d("trident"))u.w+=2;h.setMarginBox(this.domNode,{w:Math.min(Math.max(H,1),u.w)});"B"==q.charAt(0)&&"B"==n.charAt(0)?(w=h.position(w),n=this.connectorNode.offsetHeight,
w.h>m?(this.connectorNode.style.top=m-(K.h+n>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(K.h/2-n/2,0),w.h-n)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");this._drawBackground();return Math.max(0,u.w-H)},_surface:null,_surfaceContainer:null,_drawBackground:function(){if(this._orientKey){var w=this.domNode.clientWidth,n=this.domNode.clientHeight,q=h.position(this.domNode),H=h.position(this.connectorNode),
K=h.position(this.containerNode);H.x-=q.x;H.y-=q.y;K.x-=q.x;K.y-=q.y;K.x+=1;K.y+=1;K.w-=2;K.h-=2;this._surface&&this._surface.destroy();this._surfaceContainer&&r.destroy(this._surfaceContainer);q=this._surfaceContainer=r.create("div",{"class":"esriGEAbsoluteStretched"},this.domNode,"first");q.style.pointerEvents="none";w=this._surface=g.createSurface(q,w,n);n=[{x:K.x,y:K.y},{x:K.x+K.w,y:K.y},{x:K.x+K.w,y:K.y+K.h},{x:K.x,y:K.y+K.h},{x:K.x,y:K.y}];q=H.x+H.w/2;H=H.y+H.h/2;switch(this._orientKey){case "BL-TL":case "BM-TM":case "BR-TR":K=
[{x:q-5,y:K.y},{x:q,y:H},{x:q+5,y:K.y}];n.splice.apply(n,[1,0].concat(K));break;case "ML-MR":case "BL-BR":K=[{x:K.x+K.w,y:H-5},{x:q,y:H},{x:K.x+K.w,y:H+5}];n.splice.apply(n,[2,0].concat(K));break;case "TM-BM":case "TL-BL":case "TR-BR":K=[{x:q+5,y:K.y+K.h},{x:q,y:H},{x:q-5,y:K.y+K.h}];n.splice.apply(n,[3,0].concat(K));break;case "MR-ML":case "BR-BL":K=[{x:K.x,y:H+5},{x:q,y:H},{x:K.x,y:H-5}],n.splice.apply(n,[4,0].concat(K))}K=w.createPolyline(n);H="function"===typeof this._customStyle?this._customStyle():
this._customStyle;K.setFill(H&&H.backgroundColor||"white").setStroke({color:"#d3d3d3",width:1,join:"round"});H&&H.color&&(this.containerNode.style.color=H.color)}}}),G={show:function(w,n,q,H,K){"string"===typeof q&&(q=[q]);q=q&&q.map(function(u){return{after:"after-centered",before:"before-centered"}[u]||u});var m=new B;K&&m.setCustomStyle(K);m.addCustomClasses(H);m.show(w,n,q);return m}};I.setTooltipToNode=function(w,n,q){function H(){!K&&I.showTooltipForNode(w,n,q)}q=q||{};if(w&&!t.isPlayerOnServer&&
(I.hideTooltipForNode(w),w.__setTooltipToNodeMouseEnterHandle&&w.__setTooltipToNodeMouseEnterHandle.remove(),n)){var K=!1;p.isMobileDevice()?w.__setTooltipToNodeMouseEnterHandle=A.addNoDragClickHandler(w,H):w.__setTooltipToNodeMouseEnterHandle=e(w,b.enter,H);q.showTooltip&&H();return{remove:function(){n=null;I.hideTooltipForNode(w)},suspend:function(){I.hideTooltipForNode(w);K=!0},resume:function(){K=!1},refresh:function(){w._shownTooltip&&H()}}}};I.showTooltipForNode=function(w,n,q){function H(){I.hideTooltipForNode(w);
var D=Array.isArray(q.classes)?q.classes.join(" "):q.classes;D=(D||"")+" esriGETooltip";q.notRestricted&&(D+=" notRestricted");w._shownTooltip=m=G.show(K,w,q.position||["after","before"],D,q.style)}q=q||{};if(w&&!t.isPlayerOnServer){w.title="";I.hideTooltipForNode(w);var K="function"==typeof n?n():n;if(K){"string"===typeof K&&q.textAlign&&(K="\x3cdiv class\x3d'"+("start"===q.textAlign?"esriGEStart":"end"===q.textAlign?"esriGEEnd":"")+"'\x3e"+K+"\x3c/div\x3e");C.add(w,"esriGESimpleTextTooltip");var m;
H();var u=I.hideTooltipForNode.bind(I,w);n=function(D,M){var L=setInterval(D,M);m.own({remove:function(){clearInterval(L)}})};p.isMobileDevice()?m.own(e(document.body,"touchstart",function(D){!k.isMouseOver(w,{event:D})&&u()})):m.own(e.once(w,b.leave,function(){!q.stayOnHover&&u()}));q.ignoreNodeRemoval||n(function(){!l.isNodeInLayout(w)&&u()},300);p.isMobileDevice()||(n(function(){q.stayOnHover&&k.isMouseOver(m.domNode)||k.isMouseOver(w)||u()},300),m.own(e(w,"click",function(D){q.hideOnClick?u():
!w._shownTooltip&&H()})),q.stayOnHover&&m.own(e(m.domNode,b.leave,u)));return w._shownTooltip}}};I.hideTooltipForNode=function(w){w&&w._shownTooltip&&(C.remove(w,"esriGESimpleTextTooltip"),w._shownTooltip.destroy(),delete w._shownTooltip)};var J,E;I.autoTooltip=function(w){t.isPlayerOnServer||e(w,".TrimWithEllipses:mouseover",function(){if(this!==J&&this.offsetWidth<this.scrollWidth){var n=function(){J=null;E&&(E.tooltip.destroy(),E.mouseOutH.remove(),E.mouseMoveH.remove(),E=null)};n();J=this;E={tooltip:G.show(J.textContent,
J,["above","below"]),mouseOutH:e.once(J,"mouseout, mousedown, touchstart",n),mouseMoveH:e(document.body,"mousemove",function(){k.isMouseOver(J)||n()})}}})};I.showClosableTooltip=function(w){var n="rtl"===document.dir&&"after"!==w.position||"rtl"!==document.dir&&"after"===w.position,q=y(w.message,w.tooltipClass,w.position,n);return x(q,w.node,w.timeout,n,w.onClosed)};I.removeClosableTooltip=function(w){w&&w._removeFunc&&w._removeFunc()};var y=function(w,n,q,H){function K(){var L=r.create("div",{"class":"esriGEClosableTooltipTip"},
u);C.add(L,H?"esriGEClosableTooltipTipRight":"esriGEClosableTooltipTipLeft")}function m(){D=r.create("div",{"class":"esriGEClosableTooltipBody"},u);r.create("div",{innerHTML:w,"class":"esriGEClosableTooltipLabel"},D);M=r.create("div",{"class":"esriGEClosableTooltipCloseButton"},D)}var u=r.create("div",{"class":"esriGEClosableTooltip esriGENonSelectable"+(n?" "+n:"")},document.body),D,M;"after"!==q?(m(),K()):(K(),m());u.style.position="fixed";return{tooltip:u,body:D,closeButton:M}},x=function(w,n,
q,H,K){function m(){var P=h.position(n),S=P.x+";"+P.y+";"+P.w+";"+P.h;S!==u&&(u=S,S=h.getMarginBox(w.tooltip),c.set(w.tooltip,{left:(H?P.x+P.w:P.x-S.w)+"px",top:P.y+P.h/2-S.h/2+"px"}))}var u;m();var D,M,L=function(){D&&clearTimeout(D);N&&clearInterval(N);O&&clearInterval(O);Q&&Q.remove();w.tooltip.parentNode&&w.tooltip.parentNode.removeChild(w.tooltip)};var N=setInterval(function(){l.isNodeInLayout(n)&&n.parentNode||(M=!1,L());l.isNodeVisible(n)&&l.isNodeOnscreen(n)?(M=!0,l.show(w.tooltip)):(M=!1,
l.hide(w.tooltip))},0);var O=setInterval(function(){M&&m()},0);q&&(D=setTimeout(L,q));var Q=e(w.closeButton,"click",function(){L();K&&K()});w.tooltip._removeFunc=L;return w.tooltip};I.showTooltipForNode(document.body,"Normal \x3cb\x3eBold\x3c/b\x3e \x3ci\x3eItalic\x3c/i\x3e",{});I.hideTooltipForNode(document.body);return I})},"esri/dijit/geoenrichment/utils/DnDUtil":function(){define(["dojo/on","dojo/sniff","./DeviceUtil","./KeyboardUtil"],function(v,z,C,r){var h={MOBILE_TOLERANCE:10,LONG_PRESS_TIMEOUT:500,
addNoDragClickHandler:function(c,e,b){b=b||{};return C.isMobileDevice()?h._addMobile(c,e,b):h._addPC(c,e,b)},_addPC:function(c,e,b){var d=b.tolerance||0,a,f,g=v(c,"mousedown",function(p){f&&f.remove();var A=p.clientX,l=p.clientY,k;a=v(document.body,"mousemove",function(t){if(!t.shiftKey&&!r.isCtrl(t)){var F=t.clientY;if(0<Math.abs(t.clientX-A)||0<Math.abs(F-l))k=!0}});f=v.once(document.body,"mouseup",function(t){a.remove();var F=t.clientX,I=t.clientY;!k&&Math.abs(F-A)<=d&&Math.abs(I-l)<=d&&e(t)})});
return{remove:function(){a&&a.remove();f&&f.remove();g&&g.remove()}}},_addMobile:function(c,e,b){function d(){f&&f.remove();g&&g.remove();p&&p.remove();clearTimeout(A)}var a=b.tolerance||h.MOBILE_TOLERANCE,f,g,p,A;var l=v(c,"touchstart",function(k){function t(B){return Math.abs(k.clientX-B.clientX)<a&&Math.abs(k.clientY-B.clientY)<a}d();var F;if(b.detectLongPress){var I;g=v(c,"touchmove",function(B){I=B});A=setTimeout(function(){t(I||k)&&(b.ignoreReleaseIfLongPressHappened&&(F=!0),b.longPressCallback(k))},
b.longPressTimeout||h.LONG_PRESS_TIMEOUT)}f=v.once(c,"touchend",function(B){!F&&t(B)&&e(B);d()});p=v.once(c,"touchcancel",d)});return{remove:function(){l&&l.remove();d()}}},addGlobalDragHanlder:function(c){function e(){b&&b.remove();d&&d.remove();a&&a.remove();f&&f.remove();g&&c.destroyDnDBox&&c.destroyDnDBox(g)}c.tolerance=0<c.tolerance?c.tolerance:5;var b,d,a,f,g;return v(c.node,c.downEventName||C.press,function(p){e();if(!c.onMouseDown||c.onMouseDown(p)){var A=p.clientX,l=p.clientY,k=A,t=l;b=v(document.body,
C.move,function(F){function I(){e();c.dragEnded&&c.dragEnded()}F.shiftKey||r.isCtrl(F)||!(Math.abs(A-F.clientX)>=c.tolerance||Math.abs(l-F.clientY)>=c.tolerance)||(b.remove(),c.dragStarted&&!c.dragStarted(F,F.clientX-k,F.clientY-t))||(k=F.clientX,t=F.clientY,g=c.createDnDBox&&c.createDnDBox(),d=v(document.body,C.move,function(B){c.dragMoved&&c.dragMoved(B,B.clientX-k,B.clientY-t,I);k=B.clientX;t=B.clientY}),a=v.once(document.body,z("ie")||z("trident")?"mouseup, touchend, click":"mouseup, touchend",
function(){I()}),f=v(document.body,"keyup",function(B){27==B.keyCode&&(e(),c.dragCanceled&&c.dragCanceled())}))});v.once(document.body,z("ie")||z("trident")?"mouseup, touchend, click":"mouseup, touchend",function(){b.remove()})}})}};return h})},"esri/dijit/geoenrichment/ReportPlayer/config":function(){define(["esri/kernel"],function(v){function z(C){C=C.split(".");return Number((Number(C[0])+Number(C[1])/100).toFixed(2))}v=Math.max(z("3.36"),z(v.version)).toFixed(2);return{jsapiVersion:v,esriDijitCssUrl:"https://js.arcgis.com/"+
v+"/dijit/themes/claro/claro.css",esriCssUrl:"https://js.arcgis.com/"+v+"/esri/css/esri.css",playerSourceRootUrl:"https://js.arcgis.com/"+v+"/",configScriptText:null,env:"prod",isPlayerOnServer:!1,updateVariableInfoFromDataXml:!0,runReportTask:{cacheResult:!0,ignoreErrors:!0,secondAttempt:!0},maps:{maxNumberOfMapsShownAtTheSameTime:6},charts:{showErrorIfHasUnavailableData:!1},tables:{leaveEmptyCellsUponError:!0,showUnavailableData:!0},createImageCommand:{skipSavingFile:!1},createPDFCommand:{skipSavingFile:!1,
skipCreditConsumption:!1},createPlayerCommand:{loadMapPortalItems:!0,compressData:!1,prettifyDataJson:!1,skipCreditConsumption:!1},exportToExcel:{skipSavingFile:!1},modules:{exportCommands:!0,complexCellTooltips:!0,paths:{panoramicViewer:null}},generalization:{factor:-1,maxVerticesInAllFeatures:1E5,numVerticesPerFeature:5E4}}})},"widgets/BusinessAnalyst/utils/GEUtil":function(){define("dojo/_base/array dojo/when esri/request ./GeocodeUtil esri/geometry/webMercatorUtils esri/dijit/geoenrichment/utils/FileUtil jimu/portalUtils".split(" "),
function(v,z,C,r,h,c,e){return{getAvailableCountries:function(){return e.getPortal(portalUrl).loadSelfInfo().then(function(b){return C({url:(b&&b.helperServices&&b.helperServices.geoenrichment&&b.helperServices.geoenrichment.url?b.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Countries",content:{appID:"webappbuilder",f:"json",langCode:"en-us"},handleAs:"json"})})},createRingOrDriveTimes:function(b){return e.getPortal(portalUrl).loadSelfInfo().then(function(d){return C({url:(d&&
d.helperServices&&d.helperServices.geoenrichment&&d.helperServices.geoenrichment.url?d.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Enrich",content:{appID:"webappbuilder",f:"json",langCode:"en-us",useData:JSON.stringify({sourceCountry:b.sourceCountry}),studyAreasOptions:JSON.stringify(b.studyAreasOptions),dataCollections:JSON.stringify(["GlobalIntersect"]),returnGeometry:!0,outSR:JSON.stringify({wkid:102100}),studyAreas:JSON.stringify([{geometry:b.geometry}]),
token:esri.id.credentials[0].token},handleAs:"json"})})},createReport:function(b){var d={appID:"webappbuilder",langCode:"en-us",report:"string"===typeof b.report?b.report:JSON.stringify(b.report),format:"pdf",f:"bin",token:esri.id.credentials[0].token,useData:JSON.stringify({sourceCountry:b.sourceCountry}),studyAreas:JSON.stringify(b.studyAreas),reportFields:JSON.stringify({locationname:b.locationName,latitude:b.lat,longitude:b.long,subtitle:"Prepared by Esri",areadesc2:b.areadesc2})};return e.getPortal(portalUrl).loadSelfInfo().then(function(a){return C({url:(a&&
a.helperServices&&a.helperServices.geoenrichment&&a.helperServices.geoenrichment.url?a.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/createReport",content:d,handleAs:"blob"}).then(function(f){return c.saveAs(f,b.reportDownloadName+".pdf")}).otherwise(function(f){alert("Error: "+f)})})},checkCapabilities:function(b){return e.getPortal(portalUrl).loadSelfInfo().then(function(d){var a=!1,f=!1,g=d&&d.user&&d.user.privileges,
p=d&&d.helperServices;d=p.geoenrichment&&p.geoenrichment.url;p=p.routingUtilities&&p.routingUtilities.url;var A=d?d:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";!window.isBuilder&&!b.mode&&b.appProxies&&0<b.appProxies.length&&v.some(b.appProxies,function(l){return A.toLowerCase()===l.sourceUrl.toLowerCase()})?f=a=!0:v.forEach(g,function(l){"premium:user:geoenrichment"===l?a=!0:"premium:user:networkanalysis"===l&&(f=!0)});return{hasPrivilege:a&&f,geServiceConfigured:!!d,
dirRoutingServiceConfigured:!!p}})},getCountryForPolygon:function(b,d,a){return e.getPortal(portalUrl).loadSelfInfo().then(function(f){return C({url:(f&&f.helperServices&&f.helperServices.geoenrichment&&f.helperServices.geoenrichment.url?f.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver")+"/Geoenrichment/Enrich",content:{appID:"webappbuilder",f:"json",langCode:"en-us",dataCollections:JSON.stringify(["GlobalIntersect"]),outSR:JSON.stringify({wkid:102100}),
studyAreas:JSON.stringify([{geometry:b.toJson()}]),token:esri.id.credentials[0].token},handleAs:"json"}).then(function(g){if(g&&g.results&&1===g.results.length&&1===g.results[0].value.FeatureSet[0].features.length)return g.results[0].value.FeatureSet[0].features[0].attributes.sourceCountry;if(g&&g.results&&1===g.results.length&&1<g.results[0].value.FeatureSet[0].features.length){var p=b.getCentroid();p=h.xyToLngLat(p.x,p.y);var A=function(l){var k="";v.forEach(l,function(t){t.attributes.sourceCountry==
a&&(k=a)});if(k)return k;v.forEach(l,function(t){t.attributes.sourceCountry==d.defaultCountryID&&(k=defaultCountryID)});return k?k:l[0].attributes.sourceCountry};return z(r.reverseGeocode({x:p[0],y:p[1]})).then(function(l){return l&&l.address&&l.address.CountryCode?l.address.CountryCode:A(g.results[0].value.FeatureSet[0].features)}).otherwise(function(){return A(g.results[0].value.FeatureSet[0].features)})}return d.defaultCountryID})})},getGEProxyUrl:function(b){var d=!1;return e.getPortal(portalUrl).loadSelfInfo().then(function(a){geUrl=
a&&a.helperServices&&a.helperServices.geoenrichment&&a.helperServices.geoenrichment.url?a.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";!window.isBuilder&&!b.mode&&b.appProxies&&0<b.appProxies.length&&v.forEach(b.appProxies,function(f){geUrl.toLowerCase()===f.sourceUrl.toLowerCase()&&(d=f.proxyUrl)});return d})}}})},"widgets/BusinessAnalyst/utils/GeocodeUtil":function(){define(["esri/request","jimu/portalUtils"],function(v,z){return{reverseGeocode:function(C){return z.getPortal(portalUrl).loadSelfInfo().then(function(r){return v({url:(r&&
r.isPortal&&r.helperServices&&r.helperServices.geocode&&0<r.helperServices.geocode.length?r.helperServices.geocode[0].url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer")+"/reverseGeocode",content:{appID:"webappbuilder",f:"json",langCode:"en-us",location:JSON.stringify({x:C.x,y:C.y}),distance:250},handleAs:"json"})})}}})},"esri/dijit/geoenrichment/utils/FileUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when","./DataUtil","./ImageUtil"],
function(v,z,C,r){function h(){return new v.reject(Error("Saving not supported."))}var c=h,e=/[\\/:*?"<>|]/g,b={savingSupported:function(){return void 0!==window.Blob},saveTextFile:function(f,g,p,A){return b.savingSupported()?b.saveAs(new Blob([f],{type:p||"text/plain"}),g||"text.txt",A):h()},saveImageFile:function(f,g){if(b.savingSupported()){if("string"===typeof f){var p=r.base64DataFromDataURL(f);p=C.binaryStringToByteArray(atob(p)).buffer}else f instanceof ArrayBuffer&&(p=f);return b.saveAs(p?
C.arrayBuffersToBlob([p],"image/png"):f,g)}h()},_queue:[],_isSavePendingFlag:!1,_saveTimeoutH:null,saveAs:function(f,g,p){return p&&p.addDownloadIntervals?(p=new v,b._queue.push({blob:f,name:g||"download",dfd:p}),b._trySaveAsNext(),p.promise):c(f,b.validateName(g||"download"))},_trySaveAsNext:function(){if(b._queue.length&&!b._isSavePendingFlag){var f=b._queue.shift();b._isSavePendingFlag=!0;z(c(f.blob,b.validateName(f.name))).then(f.dfd.resolve,f.dfd.reject).always(function(){setTimeout(function(){b._isSavePendingFlag=
!1;b._trySaveAsNext()},100)})}},validateName:function(f){return String(f).trim().replace(e,"")}};if(!b.savingSupported())return b;if(window.navigator&&window.navigator.msSaveOrOpenBlob)return c=function(f,g){var p=new v;window.navigator.msSaveOrOpenBlob(f,g)?p.resolve():p.reject(Error("Failed to save or open downloaded file."));return p.promise},b;var d=window.URL||window.webkitURL;if("download"in window.document.createElement("a")){var a=function(f){if(void 0!==window.MouseEvent)var g=new MouseEvent("click",
{bubbles:!0,cancelable:!1});else g=document.createEvent("MouseEvent"),g.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);f.dispatchEvent(g)};c=function(f,g){var p=new v,A=d.createObjectURL(f),l=window.document.createElement("a");l.href=A;l.download=g;a(l);setTimeout(function(){d.revokeObjectURL(A);l=null;p.resolve();p=null},1E3);return p.promise};return b}c=function(f,g){var p=new v;f=new File([f],g,{type:f.type});var A=d.createObjectURL(f);window.open(A,"_blank");setTimeout(function(){d.revokeObjectURL(A);
p.resolve()},1E3);return p.promise};return b})},"esri/dijit/geoenrichment/utils/DataUtil":function(){define(["esri/dijit/geoenrichment/Deferred","esri/dijit/geoenrichment/when"],function(v,z){function C(e){return"string"==typeof e?{source:e,getLength:function(){return this.source.length},getByte:function(b){return this.source.charCodeAt(b)&255}}:window.ArrayBuffer&&e instanceof ArrayBuffer?{source:new Uint8Array(e),getLength:function(){return this.source.byteLength},getByte:function(b){return this.source[b]}}:
e}function r(e){for(var b=e.length,d=new Uint8Array(e.length),a=0;a<b;a++)d[a]=e.charCodeAt(a);return d}function h(e,b){e=new Uint8Array(e);b=Math.min(b,e.byteLength);for(var d="",a=0;a<b;a++)d+=String.fromCharCode(e[a]);return d}var c={arrayBufferFromBlob:function(e){var b=new v,d=new FileReader;d.onloadend=function(){d.error?b.reject(d.error):b.resolve(d.result)};d.readAsArrayBuffer(e);return b.promise},arrayBuffersToBlob:function(e,b){return new Blob(e,{type:b||"application/octet-stream"})},binaryStringFromByteSource:function(e){if("string"==
typeof e)return e;e=C(e);var b=e.getLength(),d=b%4;b-=d;for(var a="",f=0,g,p,A,l;f<b;)g=e.getByte(f++),p=e.getByte(f++),A=e.getByte(f++),l=e.getByte(f++),a+=String.fromCharCode(g,p,A,l);1==d?a+=String.fromCharCode(e.getByte(f)):2==d?a+=String.fromCharCode(e.getByte(f),e.getByte(f+1)):3==d&&(a+=String.fromCharCode(e.getByte(f),e.getByte(f+1),e.getByte(f+2)));return a},base64FromByteSource:function(e){e=C(e);var b=e.getLength(),d=b%3;b-=d;for(var a,f,g,p,A="",l=0;l<b;l+=3)p=e.getByte(l)<<16|e.getByte(l+
1)<<8|e.getByte(l+2),a=p>>18&63,f=p>>12&63,g=p>>6&63,p&=63,A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[g]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p];1==d?(p=e.getByte(l),A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p>>2&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p<<
4&63]+"\x3d\x3d"):2==d&&(p=e.getByte(l)<<8|e.getByte(l+1),A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p>>10&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p>>4&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[p<<2&63]+"\x3d");return A},base64FromJson:function(e){return btoa(unescape(encodeURIComponent("string"===typeof e?e:JSON.stringify(e))))}};c.binaryStringToByteArray=r;c.base64ToByteArray=function(e){return r(atob(e))};c.getFirstBytes=
function(e,b){if("string"==typeof e)var d=e.substr(0,b);else if(window.ArrayBuffer&&e instanceof ArrayBuffer)d=h(e,b);else if(window.Blob&&e instanceof Blob){d=new v;var a=new FileReader;a.onloadend=function(){a.error?d.resolve(""):d.resolve(h(a.result,b))};a.readAsArrayBuffer(e.slice(0,b))}return z(d||"")};c.isBase64=function(e){return e&&0==e.length%4&&/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\/]+$/.test(e.replace(/={0,2}$/,""))};c.base64ToJson=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))};
c.getContentType=function(e){e=c.getFileExtension(e);if(null===e)return null;switch(e){case "png":return"image/png";case "jpg":case "jpeg":return"image/jpeg";case "gif":return"image/gif";case "svg":return"image/svg+xml";case "json":return"application/json";case "txt":return"text/plain";case "xml":return"text/xml";default:return null}};c.getFileExtension=function(e){var b=e.lastIndexOf(".")+1;return b?e.substr(b).toLowerCase():null};return c})},"esri/dijit/geoenrichment/utils/ImageUtil":function(){define(["esri/dijit/geoenrichment/Deferred",
"esri/dijit/geoenrichment/when","./UrlUtil"],function(v,z,C){var r={base64DataToDataURL:function(h,c){if(/^data:image/.test(h))return h;c||(c=atob(h.substr(0,16)),c=r.getImageContentType(c));return"data:"+(c||"image/png")+";base64,"+h},getImageContentType:function(h){if("\u00ff\u00d8\u00ff"===h.substr(0,3)&&"JFIF"===h.substr(6,4))return"image/jpeg";if("\u0089PNG\r\n\u001a\n"===h.substr(0,8))return"image/png";if("GIF89a"===h.substr(0,6)||"GIF87a"===h.substr(0,6))return"image/gif"},base64DataFromDataURL:function(h){0==
h.indexOf("data:")&&(h=h.substr(h.indexOf(",")+1));return h},getBase64DataIndex:function(h){h=0==h.indexOf("data:")?h.indexOf(";base64,"):-1;return 0<h?h+8:0},getContentType:function(h){var c=r.getBase64DataIndex(h);return c?h.substring(5,c-8):null},checkBase64FileSize:function(h,c){return r.getBase64FileSize(h)<=c},getBase64FileSize:function(h){return.75*h.length},imageToDataURL:function(h,c){c=c||{};var e=document.createElement("canvas"),b=e.getContext("2d");e.width=c.width||h.width;e.height=c.height||
h.height;var d=c.opacity;null!=d&&!isNaN(d)&&0<=d&&1>d&&(b.globalAlpha=+d,c.format="image/png");(d=c.pos)?b.drawImage(h,d.x||0,d.y||0):b.drawImage(h,0,0,e.width,e.height);return e.toDataURL(c.format)},imageFromUrl:function(h,c){var e=new v,b=new Image;0!==h.indexOf("data:")&&c&&c.crossOrigin&&b.setAttribute("crossOrigin",c.crossOrigin);b.onload=function(){if(b.width&&b.height)e.resolve(b);else{var d=Error("Error of reading an image from URL.");c&&c.ignoreError?e.resolve(null):e.reject(d)}b.onload=
b.onerror=null};b.onerror=function(d){c&&c.ignoreError?e.resolve(null):e.reject(d);b.onload=b.onerror=null};h=require.toUrl(h);/^http:/i.test(h)&&/^https/i.test(window.location.protocol)&&(h=C.toHttpsUrl(h));b.src=h;return e.promise},scaleImage:function(h,c){if("string"===typeof h){var e=r.base64DataToDataURL(h),b=r.getContentType(e);e=r.imageFromUrl(e)}return z(e||h).then(function(d){var a=1,f=d.width,g=d.height;if(c.factor)a=c.factor;else if(c.maxDim)a=c.maxDim/Math.max(f,g);else if(c.imageDim){var p=
c.imageDim.w,A=c.imageDim.h;c.imageDim.preserveRatio?(a=Math.min(p/f,A/g),c.imageDim.reduceOnly&&1<a&&(a=1)):c.imageDim.reduceOnly?(f=Math.min(f,p),g=Math.min(g,A)):(f=p,g=A)}return r.imageToDataURL(d,{width:f*a,height:g*a,format:c.format||b,opacity:c.opacity})})},getImageViewType:function(h,c){return 1E3<=c?(h/=c,.025>=Math.abs(h-2)?"360":2<h?"pano":null):null}};return r})},"esri/dijit/geoenrichment/utils/UrlUtil":function(){define(["dojo/_base/url","esri/config","esri/kernel","esri/urlUtils","esri/arcgis/utils"],
function(v,z,C,r,h){var c={getDomain:function(b){if("string"!==typeof b)return null;b=b.replace(/^(http:\/\/|https:\/\/)/i,"");var d=b.indexOf("/");return 0>d?b:b.substr(0,d)},getPortalUrl:function(b){if("string"!==typeof b)return null;b=b.replace(/\?.*$/,"");var d=b.match(/^(.+)\/sharing(\/|$)/i);return d||(d=b.match(/^(.+)\/home$/i))?d[1]:(d=b.match(/^(.+)\/portal(\/|$)/i))?d[1]+"/portal":b},getProxyUrl:function(b){var d=z.defaults.io.proxyUrl;d&&!/^http/i.test(d)&&(d=r.getAbsoluteUrl(d));d&&b&&
(d=c.toHttpsUrl(d));return d},registerCORS:function(b){(b=c.getDomain(b))&&-1==z.defaults.io.corsEnabledServers.indexOf(b)&&z.defaults.io.corsEnabledServers.push(b);c._fixCORS()},_fixCORS:function(){z.defaults.io.corsEnabledServers=z.defaults.io.corsEnabledServers.filter(function(b){return b.indexOf&&0===b.indexOf("null://")?(console.log("WARNING: incorrect CORS URL detected: "+b),!1):!0})},indexOfQuery:function(b){var d=b.indexOf("?");0<=d&&(b=b.substr(d+1),/^(http:\/\/|https:\/\/)/i.test(b)&&(b=
b.indexOf("?"),d=0<=b?d+1+b:-1));return d},removeQuery:function(b){var d=c.indexOfQuery(b);return 0>d?b:b.substr(0,d)},addQueryPart:function(b,d){var a=0>c.indexOfQuery(b)?"?":"\x26";return b+a+d},getVariableValue:function(b,d){if(b&&"string"===typeof d){var a=r.urlToObject(b);if(a.query){var f={};Object.keys(a.query).forEach(function(g){f[g.toLowerCase()]=a.query[g]});return f[d.toLowerCase()]}}},addUrlVariable:function(b,d,a){d=encodeURIComponent(d);a=encodeURIComponent(a);return c.addQueryPart(b,
d+"\x3d"+a)},securePortsMap:{80:"443",8080:"8443"},toHttpUrl:function(b){return!b||/^http/i.test(b)?b:"http://"+b},toHttpsUrl:function(b){b&&(b=c.toHttpUrl(b));if(!b||!/^http:\/\//i.test(b))return b;var d=new v(b);b=b.replace(/^http/i,"https");var a=c.securePortsMap[d.port];a&&(b=b.replace(":"+d.port,":"+a));return b},combine:function(b,d){"number"===typeof d&&(d+="");if(d){if(/^(http:\/\/|https:\/\/)/i.test(d)||!b)return d;"/"!=d.charAt(0)&&(d="/"+d);if(1==d.length)return b;var a=b.length-1;"/"==
b.charAt(a)&&(b=b.substr(0,a));var f=r.urlToObject(b);b=c.removeQuery(b);a=b.length-d.length;0<=a&&b.substr(a).toLowerCase()==d.toLowerCase()&&(b=b.substr(0,a));b+=d;for(var g in f.query)c.addQueryPart(b,f.query[g])}return b},combineMulti:function(b){for(var d=b[0],a=1;a<b.length;a++)d=c.combine(d,b[a]);return d},openUrl:function(b,d){if(d)return window.open(b,"_blank");d=window.open();d.opener=null;d.referrer=null;d.location=b;return d},isPageRunOnWebService:function(){return/^http/i.test(window.location.protocol)},
getToken:function(b){return(b=b&&C.id.findCredential(b)||C.id.credentials[0])&&b.token}},e;c.getArcgisUrl=function(){return e};c.setArcgisUrl=function(b){b&&(e=b,h.arcgisUrl=c.combine(b,"/sharing/rest/content/items"))};return c})},"widgets/BusinessAnalyst/utils/ReportUtil":function(){define("dojo/Deferred dojo/promise/all dojo/when dojo/_base/array esri/request jimu/portalUtils dojo/i18n!../nls/strings".split(" "),function(v,z,C,r,h,c,e){STANDARD_INFOGRAPHIC_TYPEKEYWORD="esriReportPlayerStandardInfographic";
return{_ownedCachedCustomReports:null,_sharedCachedCustomReports:null,_cachedCountryClassicReports:[],_cachedInfographicReports:null,_countryInitDfds:[],getAvailableClassicReports:function(b,d){var a=this,f=[],g=new v,p;d&&r.forEach(d.countryConfig,function(t){b==t.countryID&&(p=t)});p||(p={countryID:b,allowEsriReports:!0,allowAllEsriReports:!0,allowEsriInfographics:!0,allowAllEsriInfographics:!0,allowMyReports:!0,allowMyInfographics:!0,allowSharedReports:!0,allowSharedInfographics:!0,allowAllOrgReports:!0,
allowAllOrgInfographics:!0,defaultInfographicID:"",defaultReportID:"",enabledEsriReports:[],enabledOrgReports:[],enabledEsriInfographics:[],enabledOrgInfographics:[]});var A=null,l=null,k=null;C(this._initReports(b),function(){if(!d||p.allowAllEsriReports||a._hasEnabledReports(a._cachedCountryClassicReports[b],p.enabledEsriReports))A=f.length,f.push({value:"esriReports",label:e.esriReports,children:[]});if(!d||p.allowAllOrgReports&&a._hasReportsForCountry(a._ownedCachedCustomReports,b)||a._hasEnabledReportsForCountry(a._ownedCachedCustomReports,
b,p.enabledOrgReports))l=f.length,f.push({value:"myReports",label:e.myReports,children:[]});if(!d||p.allowAllOrgReports&&a._hasReportsForCountry(a._sharedCachedCustomReports,b)||a._hasEnabledReportsForCountry(a._sharedCachedCustomReports,b,p.enabledOrgReports))k=f.length,f.push({value:"sharedReports",label:e.sharedReports,children:[]});(p.allowAllEsriReports||a._hasEnabledReports(a._cachedCountryClassicReports[b],p.enabledEsriReports))&&a._cachedCountryClassicReports[b]&&0<a._cachedCountryClassicReports[b].length&&
r.forEach(a._cachedCountryClassicReports[b],function(I){(p.allowAllEsriReports||p.enabledEsriReports.includes(I.reportID))&&f[A].children.push(a._formatClassicReportsForDropDown(I))});var t=["esriWebInfographicReport","esriWebSingleInfographic","esriWebBlankInfographic","esriWebHiddenInfographic","esriWebComparisonReport"];(p.allowAllOrgReports&&a._hasReportsForCountry(a._ownedCachedCustomReports,b)||a._hasEnabledReportsForCountry(a._ownedCachedCustomReports,b,p.enabledOrgReports))&&r.forEach(a._ownedCachedCustomReports,
function(I){I.properties.countries.includes(b)&&(p.allowAllOrgReports||p.enabledOrgReports.includes(I.id))&&(I.typeKeywords.some(function(B){return 0<=t.indexOf(B)})||f[l].children.push(a._formatClassicReportsForDropDown(I)))});(p.allowAllOrgReports&&a._hasReportsForCountry(a._sharedCachedCustomReports,b)||a._hasEnabledReportsForCountry(a._sharedCachedCustomReports,b,p.enabledOrgReports))&&r.forEach(a._sharedCachedCustomReports,function(I){I.properties.countries.includes(b)&&(p.allowAllOrgReports||
p.enabledOrgReports.includes(I.id))&&(I.typeKeywords.some(function(B){return 0<=t.indexOf(B)})||f[k].children.push(a._formatClassicReportsForDropDown(I)))});var F=function(I,B){I=I.label.toUpperCase();B=B.label.toUpperCase();var G=0;I>B?G=1:I<B&&(G=-1);return G};0<f.length&&f[0].children.sort(F);1<f.length&&f[1].children.sort(F);2<f.length&&f[2].children.sort(F);g.resolve(f)});return g},_hasEnabledReports:function(b,d){return b&&d?r.some(b,function(a){return d.includes(a.reportID)}):!1},_hasReportsForCountry:function(b,
d){return b&&d?r.some(b,function(a){return a.properties.countries.includes(d)}):!1},_hasEnabledReportsForCountry:function(b,d,a){return b&&d&&a?r.some(b,function(f){return f.properties.countries.includes(d)?a.includes(f.id):!1}):!1},_formatClassicReportsForDropDown:function(b){return b.metadata?{label:b.metadata.title,value:b.reportID,reportType:b.metadata.type}:{label:b.title,value:b.id,reportType:b.properties.type,item:{itemid:b.id,url:portalUrl,token:esri.id.credentials[0].token}}},getAvailableInfographicReports:function(b,
d){var a=this,f=[],g=new v,p;d&&r.forEach(d.countryConfig,function(t){b==t.countryID&&(p=t)});p||(p={countryID:b,allowEsriReports:!0,allowAllEsriReports:!0,allowEsriInfographics:!0,allowAllEsriInfographics:!0,allowMyReports:!0,allowMyInfographics:!0,allowSharedReports:!0,allowSharedInfographics:!0,allowAllOrgReports:!0,allowAllOrgInfographics:!0,defaultInfographicID:"",defaultReportID:"",enabledEsriReports:[],enabledOrgReports:[],enabledEsriInfographics:[],enabledOrgInfographics:[]});var A=null,l=
null,k=null;C(this._initReports(b),function(){if(!d||p.allowAllEsriInfographics||a._hasEnabledInfographics(a._cachedInfographicReports,p.enabledEsriInfographics))A=f.length,f.push({value:"esriReports",label:e.esriInfographics,children:[]});if(!d||p.allowAllOrgInfographics&&0<a._ownedCachedCustomReports.length||a._hasEnabledInfographics(a._ownedCachedCustomReports,p.enabledOrgInfographics))l=f.length,f.push({value:"myReports",label:e.myInfographics,children:[]});if(!d||p.allowAllOrgInfographics&&0<
a._sharedCachedCustomReports.length||a._hasEnabledInfographics(a._sharedCachedCustomReports,p.enabledOrgInfographics))k=f.length,f.push({value:"sharedReports",label:e.sharedInfographics,children:[]});(p.allowAllEsriInfographics||a._hasEnabledInfographics(a._cachedInfographicReports,p.enabledEsriInfographics))&&r.forEach(a._cachedInfographicReports,function(F){F.properties.countries.includes(b)&&(p.allowAllEsriInfographics||p.enabledEsriInfographics.includes(F.id))&&f[A].children.push(a._formatInfographicReportsForDropDown(F))});
(p.allowAllOrgInfographics&&0<a._ownedCachedCustomReports.length||a._hasEnabledInfographics(a._ownedCachedCustomReports,p.enabledOrgInfographics))&&r.forEach(a._ownedCachedCustomReports,function(F){F.properties.countries.includes(b)&&(p.allowAllOrgInfographics||p.enabledOrgInfographics.includes(F.id))&&(F.typeKeywords.includes("esriWebInfographicReport")||a._isOldPortalInfographic(F))&&f[l].children.push(a._formatInfographicReportsForDropDown(F))});(p.allowAllOrgInfographics&&0<a._sharedCachedCustomReports.length||
a._hasEnabledInfographics(a._sharedCachedCustomReports,p.enabledOrgInfographics))&&r.forEach(a._sharedCachedCustomReports,function(F){F.properties.countries.includes(b)&&(p.allowAllOrgInfographics||p.enabledOrgInfographics.includes(F.id))&&(F.typeKeywords.includes("esriWebInfographicReport")||a._isOldPortalInfographic(F))&&f[k].children.push(a._formatInfographicReportsForDropDown(F))});var t=function(F,I){F=F.label.toUpperCase();I=I.label.toUpperCase();var B=0;F>I?B=1:F<I&&(B=-1);return B};0<f.length&&
f[0].children.sort(t);1<f.length&&f[1].children.sort(t);2<f.length&&f[2].children.sort(t);g.resolve(f)});return g},_hasEnabledInfographics:function(b,d){return r.some(b,function(a){return d.includes(a.id)})},_isOldPortalInfographic:function(b){return b.properties&&b.properties.isHidden&&"true"===b.properties.isHidden?!1:b.properties&&b.properties.isGraphicReport&&"true"===b.properties.isGraphicReport?!0:!1},_formatInfographicReportsForDropDown:function(b){return{label:b.title,value:b.id}},_initReports:function(b){var d=
[],a=this;if(this._countryInitDfds[b])return this._countryInitDfds[b];this._countryInitDfds[b]=new v;var f=function(g,p){return h(g).then(function(A){r.forEach(A.results,function(l){p.push(l)});if(-1!=A.nextStart)return g.content.start=A.nextStart,f(g,p)},function(A){alert(A)})};c.getPortal(portalUrl).loadSelfInfo().then(function(g){var p=g&&g.helperServices&&g.helperServices.geoenrichment&&g.helperServices.geoenrichment.url?g.helperServices.geoenrichment.url:"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";
a._cachedCountryClassicReports[b]||d.push(h({url:p+"/Geoenrichment/reports/"+b,content:{appID:"webappbuilder",f:"json",langCode:"en-us"}}).then(function(A){a._cachedCountryClassicReports[b]=A.reports},function(A){alert(A)}));a._cachedInfographicReports||(a._cachedInfographicReports=[],d.push(f({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:"typekeywords:(esriWebStandardInfographicReport)"}},a._cachedInfographicReports)));
a._ownedCachedCustomReports||(a._ownedCachedCustomReports=[],d.push(f({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) owner:'+esri.id.credentials[0].userId}},a._ownedCachedCustomReports)));a._sharedCachedCustomReports||(a._sharedCachedCustomReports=[],d.push(f({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",
start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:shared type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId}},a._sharedCachedCustomReports)),d.push(f({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:org type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId}},
a._sharedCachedCustomReports)),g&&g.appInfo&&g.appInfo.orgId&&d.push(f({url:portalUrl+"/sharing/rest/search",content:{appID:"webappbuilder",f:"json",start:1,num:100,sortField:"modified",sortOrder:"desc",q:'access:public type:"Report Template" typekeywords:(esriWebReport NOT esriWebSingleInfographic) NOT owner:'+esri.id.credentials[0].userId+" orgid: "+g.id}},a._sharedCachedCustomReports)));0===d.length?a._countryInitDfds[b].resolve():z(d).then(function(){a._countryInitDfds[b].resolve()})});return this._countryInitDfds[b]}}})},
"widgets/BusinessAnalyst/utils/ValidationUtil":function(){define(["dojo/dom-class"],function(v){return{MIN_RINGS_VALUE:0,MAX_RINGS_VALUE:1E3,MIN_DTWT_VALUE:0,MAX_DTWT_VALUE:300,validateInvalidValues:function(z,C,r,h,c){var e=z.get("value"),b=C.get("value"),d=r.get("value"),a=!0;0<e.length&&null===this._tryParseFloat(e)?(a=!1,v.remove(h,"hidden"),h.innerHTML=c,v.add(z.domNode,"invalidValue")):v.remove(z.domNode,"invalidValue");0<b.length&&null===this._tryParseFloat(b)?(a=!1,v.remove(h,"hidden"),h.innerHTML=
c,v.add(C.domNode,"invalidValue")):v.remove(C.domNode,"invalidValue");0<d.length&&null===this._tryParseFloat(d)?(a=!1,v.remove(h,"hidden"),h.innerHTML=c,v.add(r.domNode,"invalidValue")):v.remove(r.domNode,"invalidValue");a&&v.add(h,"hidden");return a},validateMinMaxValues:function(z,C,r,h,c,e,b){var d=z.get("value"),a=C.get("value"),f=r.get("value"),g=!0;0<d.length?(d=parseFloat(d),d<h||d>c?(g=!1,v.remove(e,"hidden"),e.innerHTML=b,v.add(z.domNode,"invalidValue")):v.remove(z.domNode,"invalidValue")):
v.remove(z.domNode,"invalidValue");0<a.length?(d=parseFloat(a),d<h||d>c?(g=!1,v.remove(e,"hidden"),e.innerHTML=b,v.add(C.domNode,"invalidValue")):v.remove(C.domNode,"invalidValue")):v.remove(C.domNode,"invalidValue");0<f.length?(d=parseFloat(f),d<h||d>c?(g=!1,v.remove(e,"hidden"),e.innerHTML=b,v.add(r.domNode,"invalidValue")):v.remove(r.domNode,"invalidValue")):v.remove(r.domNode,"invalidValue");g&&v.add(e,"hidden");return g},_tryParseFloat:function(z){var C=null;null!==z&&0<z.length&&(isNaN(z)||
(C=parseFloat(z)));return C}}})},"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,z,C,r,h,c){var e=null,b=v([C,h],{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:r.hitch(this,function(d,a,f,g){return"style"===a?this.xss.friendlyAttrValue(f).replace(/"/g,"'"):"img"===d&&"src"===a?this.xss.escapeAttrValue(f):this.xss.safeAttrValue(d,a,f,g)}),onTag:r.hitch(this,function(d,a,f){if(f.isWhite&&this._isInWhiteList(d,this.graphicsWhiteList))return a}),onIgnoreTagAttr:r.hitch(this,function(d,a,f,g){if("data-"===a.substr(0,5))return a+'\x3d"'+this.xss.escapeAttrValue(f)+'"'}),onIgnoreTag:r.hitch(this,function(d,a,f){if("o:"===d.substr(0,2)||"!--[if"===
d||"!--[endif]--"===d)return a})},!0);this.xss=this.sanitizer.xss},sanitize:function(d){return this.sanitizer.sanitize(d)},_getWhiteList:function(){var d="title height width class style font-family id align text-align".split(" "),a={div:d,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,p:d,s:d,strong:d,em:d,u:d,ol:d,ul:d,li:d,a:["href","target"].concat(d),img:["src","alt","border"].concat(d),blockquote:d,font:["face","size","color"].concat(d),pre:d,code:d,b:d,i:d,wbr:d,video:"autoplay controls loop muted poster preload".split(" ").concat(d),
audio:["autoplay","controls","loop","muted","preload"].concat(d),source:["media","src","type"].concat(d),table:["cellpadding","cellspacing","border"].concat(d),tbody:[].concat(d),tr:["valign"].concat(d),td:["valign","colspan","rowspan","nowrap"].concat(d),th:["valign","colspan","rowspan","nowrap"].concat(d),hr:d,html:d,title:d,link:["rel","href"],style:["type"].concat(d),body:d};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:d};return this._extendObjectOfArrays([a,{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(d){var a={};z.forEach(d,function(f){var g=Object.keys(f);z.forEach(g,function(p){Array.isArray(f[p])&&Array.isArray(a[p])?a[p]=a[p].concat(f[p]):
a[p]=f[p]},this)},this);return a},_isInWhiteList:function(d,a){a=Object.keys(a);var f=!1;z.forEach(a,function(g){d===g&&(f=!0)},this);return f}});b.getInstance=function(){null===e&&(e=new b);return e};return b})},"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,z,C,r,h,c,e,b,d,a,f,g,p){var A=C("dijit._editor.plugins.LinkDialog",
f,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:g,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(k){v("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),c.hitch(this,function(t,F,I){var B=this;this.tag="insertImage"==this.command?"img":"a";t=c.delegate(t.getLocalization("dijit","common",this.lang),t.getLocalization("dijit._editor",
"LinkDialog",this.lang));var G=this.dropDown=this.button.dropDown=new F({title:t[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:c.hitch(this,"setValue"),onOpen:function(){B._onOpenDialog();F.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(c.hitch(B,"_onCloseDialog"),0)}});t.urlRegExp=this.urlRegExp;t.id=I.getUniqueId(this.editor.id);this._uniqueId=t.id;this._setContent(G.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
a.substitute(this.linkDialogTemplate,t));G.startup();this._urlInput=I.byId(this._uniqueId+"_urlInput");this._textInput=I.byId(this._uniqueId+"_textInput");this._setButton=I.byId(this._uniqueId+"_setButton");this.own(I.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 J=this._urlInput.get("value");return this._urlRegExp.test(J)||this._emailRegExp.test(J)});this.own(e(G.domNode,"keydown",c.hitch(this,c.hitch(this,function(J){!J||J.keyCode!=h.ENTER||J.shiftKey||J.metaKey||J.ctrlKey||J.altKey||this._setButton.get("disabled")||(G.onExecute(),G.execute(G.get("value")))}))));k()}))},_checkAndFixInput:function(){var k=this,t=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var F=t,I=!1,B=!1;F&&1<F.length&&(F=c.trim(F),0!==F.indexOf("mailto:")&&(0<F.indexOf("/")?-1===F.indexOf("://")&&"/"!==F.charAt(0)&&F.indexOf("./")&&0!==F.indexOf("../")&&k._hostRxp.test(F)&&(I=!0):k._userAtRxp.test(F)&&(B=!0)));I&&k._urlInput.set("value","http://"+F);B&&k._urlInput.set("value","mailto:"+F);k._setButton.set("disabled",!k._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(k){this.dropDown.set({parserScope:"dojo",content:k})},_checkValues:function(k){k&&k.urlInput&&(k.urlInput=k.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&k&&k.textInput&&("function"===typeof this.linkFilter?k.textInput=this.linkFilter(k.textInput):
z.forEach(this.linkFilter,function(t){k.textInput=k.textInput.replace(t[0],t[1])}));return k},_createlinkEnabledImpl:function(){return!0},setValue:function(k){this._onCloseDialog();if(9>b("ie")){var t=p.getSelection(this.editor.window).getRangeAt(0).endContainer;3===t.nodeType&&(t=t.parentNode);t&&t.nodeName&&t.nodeName.toLowerCase()!==this.tag&&(t=this.editor.selection.getSelectedElement(this.tag));t&&t.nodeName&&t.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(t),
this.editor.execCommand("unlink"))}k=this._checkValues(k);this.editor.execCommand("inserthtml",a.substitute(this.htmlTemplate,k));d("a",this.editor.document).forEach(function(F){F.innerHTML||r.has(F,"name")||F.parentNode.removeChild(F)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(k){if(k&&k.tagName.toLowerCase()===this.tag){var t=k.getAttribute("_djrealurl")||k.getAttribute("href");var F=k.getAttribute("target")||"_self";var I=k.textContent||
k.innerText;this.editor.selection.selectElement(k,!0)}else I=this.editor.selection.getSelectedText();return{urlInput:t||"",textInput:I||"",targetSelect:F||""}},_onOpenDialog:function(){if(b("ie")){var k=p.getSelection(this.editor.window);if(k.rangeCount){var t=k.getRangeAt(0);var F=t.endContainer;3===F.nodeType&&(F=F.parentNode);F&&F.nodeName&&F.nodeName.toLowerCase()!==this.tag&&(F=this.editor.selection.getSelectedElement(this.tag));if(!F||F.nodeName&&F.nodeName.toLowerCase()!==this.tag)(k=this.editor.selection.getAncestorElement(this.tag))&&
k.nodeName&&k.nodeName.toLowerCase()==this.tag?(F=k,this.editor.selection.selectElement(F)):t.startContainer===t.endContainer&&(k=t.startContainer.firstChild)&&k.nodeName&&k.nodeName.toLowerCase()==this.tag&&(F=k,this.editor.selection.selectElement(F))}}else F=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(F))},_onDblClick:function(k){if(k&&k.target&&(k=k.target,(k.tagName?k.tagName.toLowerCase():
"")===this.tag&&r.get(k,"href"))){var t=this.editor;this.editor.selection.selectElement(k);t.onDisplayChanged();t._updateTimer&&(t._updateTimer.remove(),delete t._updateTimer);t.onNormalizedDisplayChanged();var F=this.button;setTimeout(function(){F.set("disabled",!1);F.loadAndOpenDropDown().then(function(){F.dropDown.focus&&F.dropDown.focus()})},10)}},_onMouseUp:function(){if(b("ff")){var k=this.editor.selection.getAncestorElement(this.tag);if(k){var t=p.getSelection(this.editor.window).getRangeAt(0);
if(t.collapsed&&k.childNodes.length){var F=t.cloneRange();F.selectNodeContents(k.childNodes[k.childNodes.length-1]);F.setStart(k.childNodes[0],0);1!==t.compareBoundaryPoints(F.START_TO_START,F)?t.setStartBefore(k):-1!==t.compareBoundaryPoints(F.END_TO_START,F)&&t.setStartAfter(k)}}}}}),l=C("dijit._editor.plugins.ImgLinkDialog",[A],{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(k){if(k&&k.tagName.toLowerCase()===this.tag){var t=k.getAttribute("_djrealurl")||k.getAttribute("src");var F=k.getAttribute("alt");this.editor.selection.selectElement(k,!0)}else F=this.editor.selection.getSelectedText();return{urlInput:t||"",textInput:F||""}},_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(k){k&&k.target&&(k=k.target,(k.tagName?k.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(k))},_checkValues:function(k){k&&k.urlInput&&(k.urlInput=k.urlInput.replace(/"/g,"\x26quot;"));k&&k.textInput&&(k.textInput=k.textInput.replace(/"/g,"\x26quot;"));return k},_onDblClick:function(k){if(k&&k.target&&(k=k.target,(k.tagName?
k.tagName.toLowerCase():"")===this.tag&&r.get(k,"src"))){var t=this.editor;this.editor.selection.selectElement(k);t.onDisplayChanged();t._updateTimer&&(t._updateTimer.remove(),delete t._updateTimer);t.onNormalizedDisplayChanged();var F=this.button;setTimeout(function(){F.set("disabled",!1);F.loadAndOpenDropDown().then(function(){F.dropDown.focus&&F.dropDown.focus()})},10)}}});f.registry.createLink=function(k){var t={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in k?k.allowUnsafeHtml:!1};
"linkFilter"in k&&(t.linkFilter=k.linkFilter);return new A(t)};f.registry.insertImage=function(){return new l({command:"insertImage"})};A.ImgLinkDialog=l;return A})},"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,z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t,F){var I=C("dijit._editor.plugins.ViewSource",l,{stripScripts:!0,stripComments:!0,stripIFrames:!0,stripEventHandlers:!0,readOnly:!1,_fsPlugin:null,toggle:function(){g("webkit")&&(this._vsFocused=!0);this.button.set("checked",!this.button.get("checked"))},_initButton:function(){var B=b.getLocalization("dijit._editor","commands"),G=this.editor;this.button=new k({label:B.viewSource,ownerDocument:G.ownerDocument,dir:G.dir,lang:G.lang,showLabel:!1,iconClass:this.iconClassPrefix+
" "+this.iconClassPrefix+"ViewSource",tabIndex:"-1",onChange:a.hitch(this,"_showSource")});this.button.set("readOnly",!1)},setEditor:function(B){this.editor=B;this._initButton();this.removeValueFilterHandles();this._setValueFilterHandle=z.before(this.editor,"setValue",a.hitch(this,function(G){return[this._filter(G)]}));this._getValueFilterHandle=z.after(this.editor,"getValue",a.hitch(this,function(G){return this._filter(G)}));this.editor.addKeyHandler(d.F12,!0,!0,a.hitch(this,function(G){this.button.focus();
this.toggle();G.stopPropagation();G.preventDefault();setTimeout(a.hitch(this,function(){this.editor.focused&&this.editor.focus()}),100)}))},_showSource:function(B){var G=this.editor,J=G._plugins;this._sourceShown=B;var E=this;try{this.sourceArea||this._createSourceView();if(B)G._sourceQueryCommandEnabled=G.queryCommandEnabled,G.queryCommandEnabled=function(x){return"viewsource"===x.toLowerCase()},this.editor.onDisplayChanged(),v.forEach(J,function(x){!x||x instanceof I||!x.isInstanceOf(l)||x.set("disabled",
!0)}),this._fsPlugin&&(this._fsPlugin._getAltViewNode=function(){return E.sourceArea}),this.sourceArea.value=G.get("value"),this.sourceArea.style.height=G.iframe.style.height,this.sourceArea.style.width=G.iframe.style.width,G.iframe.parentNode.style.position="relative",e.set(G.iframe,{position:"absolute",top:0,visibility:"hidden"}),e.set(this.sourceArea,{display:"block"}),this._resizeHandle=f(window,"resize",a.hitch(this,function(){var x=p.getBox(G.ownerDocument);"_prevW"in this&&"_prevH"in this&&
x.w===this._prevW&&x.h===this._prevH||(this._prevW=x.w,this._prevH=x.h,this._resizer&&(clearTimeout(this._resizer),delete this._resizer),this._resizer=setTimeout(a.hitch(this,function(){delete this._resizer;this._resize()}),10))})),setTimeout(a.hitch(this,this._resize),100),this.editor.onNormalizedDisplayChanged(),this.editor.__oldGetValue=this.editor.getValue,this.editor.getValue=a.hitch(this,function(){var x=this.sourceArea.value;return x=this._filter(x)}),this._setListener=z.after(this.editor,
"setValue",a.hitch(this,function(x){this.sourceArea.value=x||""}),!0);else{if(!G._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);G.queryCommandEnabled=G._sourceQueryCommandEnabled;if(!this._readOnly){var y=this.sourceArea.value;G.beginEditing();G.set("value",y);G.endEditing()}v.forEach(J,function(x){x&&
x.isInstanceOf(l)&&x.set("disabled",!1)});e.set(this.sourceArea,"display","none");e.set(G.iframe,{position:"relative",visibility:"visible"});delete G._sourceQueryCommandEnabled;this.editor.onDisplayChanged()}setTimeout(a.hitch(this,function(){var x=G.domNode.parentNode;x&&(x=F.getEnclosingWidget(x))&&x.resize&&x.resize();G.resize()}),300)}catch(x){console.log(x)}},updateState:function(){this.button.set("disabled",this.get("disabled"))},_resize:function(){var B=this.editor,G=B.getHeaderHeight(),J=
B.getFooterHeight(),E=c.position(B.domNode),y=c.getPadBorderExtents(B.iframe.parentNode),x=c.getMarginExtents(B.iframe.parentNode),w=c.getPadBorderExtents(B.domNode),n=E.w-w.w;E=E.h-(G+w.h+J);this._fsPlugin&&this._fsPlugin.isFullscreen&&(B=p.getBox(B.ownerDocument),n=B.w-w.w,E=B.h-(G+w.h+J));c.setMarginBox(this.sourceArea,{w:Math.round(n-(y.w+x.w)),h:Math.round(E-(y.h+x.h))})},_createSourceView:function(){var B=this.editor,G=B._plugins;this.sourceArea=h.create("textarea");this.readOnly&&(r.set(this.sourceArea,
"readOnly",!0),this._readOnly=!0);e.set(this.sourceArea,{padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});r.set(this.sourceArea,"aria-label",this.editor.id);h.place(this.sourceArea,B.iframe,"before");g("ie")&&B.iframe.parentNode.lastChild!==B.iframe&&e.set(B.iframe.parentNode.lastChild,{width:"0px",height:"0px",padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});B._viewsource_oldFocus=B.focus;var J=this;B.focus=function(){if(J._sourceShown)J.setSourceAreaCaret();else try{this._vsFocused?
(delete this._vsFocused,A.focus(B.editNode)):B._viewsource_oldFocus()}catch(x){console.log("ViewSource focus code error: "+x)}};var E,y;for(E=0;E<G.length;E++)if((y=G[E])&&("dijit._editor.plugins.FullScreen"===y.declaredClass||y.declaredClass===t._scopeName+"._editor.plugins.FullScreen")){this._fsPlugin=y;break}this._fsPlugin&&(this._fsPlugin._viewsource_getAltViewNode=this._fsPlugin._getAltViewNode,this._fsPlugin._getAltViewNode=function(){return J._sourceShown?J.sourceArea:this._viewsource_getAltViewNode()});
this.own(f(this.sourceArea,"keydown",a.hitch(this,function(x){this._sourceShown&&x.keyCode==d.F12&&x.ctrlKey&&x.shiftKey&&(this.button.focus(),this.button.set("checked",!1),setTimeout(a.hitch(this,function(){B.focus()}),100),x.stopPropagation(),x.preventDefault())})))},_stripScripts:function(B){B&&(B=B.replace(/<\s*script[^>]*>((.|\s)*?)<\\?\/\s*script\s*>/ig,""),B=B.replace(/<\s*script\b([^<>]|\s)*>?/ig,""),B=B.replace(/<[^>]*=(\s|)*[("|')]javascript:[^$1][(\s|.)]*[$1][^>]*>/ig,""));return B},_stripComments:function(B){B&&
(B=B.replace(/\x3c!--(.|\s){1,}?--\x3e/g,""));return B},_stripIFrames:function(B){B&&(B=B.replace(/<\s*iframe[^>]*>((.|\s)*?)<\\?\/\s*iframe\s*>/ig,""));return B},_stripEventHandlers:function(B){if(B){var G=B.match(/<[a-z]+?\b(.*?on.*?(['"]).*?\2.*?)+>/gim);if(G)for(var J=0,E=G.length;J<E;J++){var y=G[J],x=y.replace(/\s+on[a-z]*\s*=\s*(['"])(.*?)\1/igm,"");B=B.replace(y,x)}}return B},_filter:function(B){B&&(this.stripScripts&&(B=this._stripScripts(B)),this.stripComments&&(B=this._stripComments(B)),
this.stripIFrames&&(B=this._stripIFrames(B)),this.stripEventHandlers&&(B=this._stripEventHandlers(B)));return B},removeValueFilterHandles:function(){this._setValueFilterHandle&&(this._setValueFilterHandle.remove(),delete this._setValueFilterHandle);this._getValueFilterHandle&&(this._getValueFilterHandle.remove(),delete this._getValueFilterHandle)},setSourceAreaCaret:function(){var B=this.sourceArea;A.focus(B);this._sourceShown&&!this.readOnly&&(B.setSelectionRange?B.setSelectionRange(0,0):this.sourceArea.createTextRange&&
(B=B.createTextRange(),B.collapse(!0),B.moveStart("character",-99999),B.moveStart("character",0),B.moveEnd("character",0),B.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)}});l.registry.viewSource=l.registry.viewsource=function(B){return new I({readOnly:"readOnly"in
B?B.readOnly:!1,stripComments:"stripComments"in B?B.stripComments:!0,stripScripts:"stripScripts"in B?B.stripScripts:!0,stripIFrames:"stripIFrames"in B?B.stripIFrames:!0,stripEventHandlers:"stripEventHandlers"in B?B.stripEventHandlers:!0})};return I})},"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,z,C,r,h,c,e,b,d,a,f,g,p,A,l){v=C("dijit._editor.plugins._FontDropDown",[a,f,g],{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=h.getLocalization("dijit._editor","FontChoice");this.label=this.strings[this.command];this.id=d.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.selectId=this.id+"_select";this.inherited(arguments)},postCreate:function(){this.select.set("store",new b({idProperty:"value",data:z.map(this.values,function(B){var G=this.strings[B]||B;return{label:this.getLabel(B,G),name:G,value:B}},this)}));this.select.set("value",
"",!1);this.disabled=this.select.get("disabled")},_setValueAttr:function(B,G){G=!1!==G;this.select.set("value",0>z.indexOf(this.values,B)?"":B,G);G||(this.select._lastValueReported=null)},_getValueAttr:function(){return this.select.get("value")},focus:function(){this.select.focus()},_setDisabledAttr:function(B){this._set("disabled",B);this.select.set("disabled",B)}});var k=C("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(B,G){return this.plainText?G:"\x3cdiv style\x3d'font-family: "+B+"'\x3e"+G+"\x3c/div\x3e"},_normalizeFontName:function(B){var G=this.values;if(!B||!G)return B;var J=B.split(",");if(1<J.length)for(var E=0,y=J.length;E<y;E++){var x=e.trim(J[E]);if(-1<z.indexOf(G,x))return x}return B},_setValueAttr:function(B,G){G=!1!==
G;B=this._normalizeFontName(B);this.generic&&(B={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"}[B]||B);this.inherited(arguments,[B,G])}}),t=C("dijit._editor.plugins._FontSizeDropDown",v,{command:"fontSize",comboClass:"dijitFontSizeCombo",values:[1,2,3,4,5,6,7],getLabel:function(B,
G){return this.plainText?G:"\x3cfont size\x3d"+B+"'\x3e"+G+"\x3c/font\x3e"},_setValueAttr:function(B,G){G=!1!==G;B.indexOf&&-1!=B.indexOf("px")&&(B={10:1,13:2,16:3,18:4,24:5,32:6,48:7}[parseInt(B,10)]||B);this.inherited(arguments,[B,G])}}),F=C("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(B,G){return this.plainText||
"noFormat"==B?G:"\x3c"+B+"\x3e"+G+"\x3c/"+B+"\x3e"},_execCommand:function(B,G,J){if("noFormat"===J){var E;if((G=l.getSelection(B.window))&&0<G.rangeCount&&(J=G.getRangeAt(0),J)){G=J.startContainer;for(E=J.endContainer;G&&G!==B.editNode&&G!==B.document.body&&1!==G.nodeType;)G=G.parentNode;for(;E&&E!==B.editNode&&E!==B.document.body&&1!==E.nodeType;)E=E.parentNode;var y=c.hitch(this,function(q,H){if(q.childNodes&&q.childNodes.length){var K;for(K=0;K<q.childNodes.length;K++){var m=q.childNodes[K];if(1==
m.nodeType&&B.selection.inSelection(m)){var u=m.tagName?m.tagName.toLowerCase():"";-1!==z.indexOf(this.values,u)&&H.push(m);y(m,H)}}}});J=c.hitch(this,function(q){if(q&&q.length){for(B.beginEditing();q.length;)this._removeFormat(B,q.pop());B.endEditing()}});var x=[];if(G==E){for(E=G;E&&E!==B.editNode&&E!==B.document.body;){if(1==E.nodeType){var w=E.tagName?E.tagName.toLowerCase():"";if(-1!==z.indexOf(this.values,w)){var n=E;break}}E=E.parentNode}y(G,x);n&&(x=[n].concat(x))}else for(E=G;B.selection.inSelection(E);)1==
E.nodeType&&(w=E.tagName?E.tagName.toLowerCase():"",-1!==z.indexOf(this.values,w)&&x.push(E),y(E,x)),E=E.nextSibling;J(x);B.onDisplayChanged()}}else B.execCommand(G,J)},_removeFormat:function(B,G){if(B.customUndo){for(;G.firstChild;)r.place(G.firstChild,G,"before");G.parentNode.removeChild(G)}else{B.selection.selectElementChildren(G);var J=B.selection.getSelectedHtml();B.selection.selectElement(G);B.execCommand("inserthtml",J||"")}}}),I=C("dijit._editor.plugins.FontChoice",A,{useDefaultCommand:!1,
_initButton:function(){var B={fontName:k,fontSize:t,formatBlock:F}[this.command],G=this.params;this.params.custom&&(G.values=this.params.custom);var J=this.editor;this.button=new B(c.delegate({dir:J.dir,lang:J.lang},G));this.own(this.button.select.on("change",c.hitch(this,function(E){this.editor.focused&&this.editor.focus();"fontName"==this.command&&-1!=E.indexOf(" ")&&(E="'"+E+"'");this.button._execCommand?this.button._execCommand(this.editor,this.command,E):this.editor.execCommand(this.command,
E)})))},updateState:function(){var B=this.editor,G=this.command;if(B&&B.isLoaded&&G.length&&this.button){var J=this.get("disabled");this.button.set("disabled",J);if(!J){try{var E=B.queryCommandValue(G)||""}catch(x){E=""}(J=c.isString(E)&&(E.match(/'([^']*)'/)||E.match(/"([^"]*)"/)))&&(E=J[1]);"fontSize"!==G||E||(E=3);if("formatBlock"===G)if(E&&"p"!=E)0>z.indexOf(this.button.values,E)&&(E="noFormat");else{E=null;if((G=l.getSelection(this.editor.window))&&0<G.rangeCount&&(G=G.getRangeAt(0)))var y=G.endContainer;
for(;y&&y!==B.editNode&&y!==B.document;){if((G=y.tagName?y.tagName.toLowerCase():"")&&-1<z.indexOf(this.button.values,G)){E=G;break}y=y.parentNode}E||(E="noFormat")}E!==this.button.get("value")&&this.button.set("value",E,!1)}}}});z.forEach(["fontName","fontSize","formatBlock"],function(B){A.registry[B]=function(G){return new I({command:B,plainText:G.plainText})}});I._FontDropDown=v;I._FontNameDropDown=k;I._FontSizeDropDown=t;I._FormatBlockDropDown=F;return I})},"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,z,C,r){var h=v.declare("dojox.editor.plugins.Preview",r,{useDefaultCommand:!1,styles:"",stylesheets:null,iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Preview");this.button=new z.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",b;if(this.stylesheets)for(b=0;b<this.stylesheets.length;b++)e+="\t\t\x3clink rel\x3d'stylesheet' type\x3d'text/css' href\x3d'"+this.stylesheets[b]+"'\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 d=window.open("javascript: ''",this._nlsResources.preview,"status\x3d1,menubar\x3d0,location\x3d0,toolbar\x3d0");d.document.open();d.document.write(c);d.document.close()}catch(a){console.warn(a)}}});v.subscribe(z._scopeName+".Editor.getPlugin",null,function(c){c.plugin||"preview"!==c.args.name.toLowerCase()||(c.plugin=new h({styles:"styles"in c.args?c.args.styles:"",stylesheets:"stylesheets"in c.args?c.args.stylesheets:null}))});return h})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),
function(v,z,C,r,h,c){var e=C("dijit._editor.plugins.TextColor",h,{buttonClass:c,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;this.inherited(arguments);var b=this;this.button.loadDropDown=function(d){function a(f){b.button.dropDown=new f({dir:b.editor.dir,ownerDocument:b.editor.ownerDocument,value:b.value,onChange:function(g){b.editor.execCommand(b.command,g)},onExecute:function(){b.editor.execCommand(b.command,this.get("value"))}});d()}"string"==
typeof b.colorPicker?v([b.colorPicker],a):a(b.colorPicker)}},updateState:function(){var b=this.editor,d=this.command;if(b&&b.isLoaded&&d.length){if(this.button){var a=this.get("disabled");this.button.set("disabled",a);if(a)return;try{var f=b.queryCommandValue(d)||""}catch(g){f=""}}""==f&&(f="#000000");"transparent"==f&&(f="#ffffff");"string"==typeof f?-1<f.indexOf("rgb")&&(f=z.fromRgb(f).toHex()):(f=((f&255)<<16|f&65280|(f&16711680)>>>16).toString(16),f="#000000".slice(0,7-f.length)+f);this.value=
f;(b=this.button.dropDown)&&b.get&&f!==b.get("value")&&b.set("value",f,!1)}}});h.registry.foreColor=function(b){return new e(b)};h.registry.hiliteColor=function(b){return new e(b)};return e})},"dojox/editor/plugins/ToolbarLineBreak":function(){define("dojo dijit dojox dijit/_Widget dijit/_TemplatedMixin dijit/_editor/_Plugin dojo/_base/declare".split(" "),function(v,z,C,r,h,c,e){var b=e("dojox.editor.plugins.ToolbarLineBreak",[r,h],{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(z._scopeName+".Editor.getPlugin",null,function(d){if(!d.plugin){var a=d.args.name.toLowerCase();if("||"===a||"toolbarlinebreak"===a)d.plugin=new c({button:new b,setEditor:function(f){this.editor=f}})}});return b})},"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,z,C,r,h,c,e,b,d,a,f,g,p,A,l){v.experimental("dojox.editor.plugins.FindReplace");var k=v.declare("dojox.editor.plugins._FindReplaceCloseBox",[c,e,d],{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=z.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.btnId=this.id+"_close";this.inherited(arguments)},startup:function(){this.connect(this.button,"onClick","onClick")},onClick:function(){}}),t=v.declare("dojox.editor.plugins._FindReplaceTextBox",[c,e,d],{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=z.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(G){this.value=G;this.textBox.set("value",G)},focus:function(){this.textBox.focus()},_setDisabledAttr:function(G){this.disabled=G;this.textBox.set("disabled",
G)},onChange:function(G){this.value=G},_onKeyPress:function(G){var J=0,E=0;!G.target||G.ctrlKey||G.altKey||G.shiftKey||(G.keyCode==v.keys.LEFT_ARROW?(J=G.target.selectionStart,E=G.target.selectionEnd,J<E&&(z.selectInputText(G.target,J,J),v.stopEvent(G))):G.keyCode==v.keys.RIGHT_ARROW&&(J=G.target.selectionStart,E=G.target.selectionEnd,J<E&&(z.selectInputText(G.target,E,E),v.stopEvent(G))))}}),F=v.declare("dojox.editor.plugins._FindReplaceCheckBox",[c,e,d],{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=z.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(G){this.checkBox.set("value",G)},_getValueAttr:function(){return this.checkBox.get("value")},focus:function(){this.checkBox.focus()},_setDisabledAttr:function(G){this.disabled=G;this.checkBox.set("disabled",G)}}),I=v.declare("dojox.editor.plugins._FindReplaceToolbar",f,
{postCreate:function(){this.connectKeyNavHandlers([],[]);this.connect(this.containerNode,"onclick","_onToolbarEvent");this.connect(this.containerNode,"onkeydown","_onToolbarEvent");v.addClass(this.domNode,"dijitToolbar")},addChild:function(G,J){z._KeyNavContainer.superclass.addChild.apply(this,arguments)},_onToolbarEvent:function(G){G.stopPropagation()}}),B=v.declare("dojox.editor.plugins.FindReplace",[l],{buttonClass:z.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 z.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(G,J){"disabled"===G&&this._toggleFindReplace(!J&&this._displayed,!0,!0)}))},setEditor:function(G){this.editor=G;this._initButton()},toggle:function(){this.button.set("checked",!this.button.get("checked"))},_toggleFindReplace:function(G,J,E){var y=v.marginBox(this.editor.domNode);G&&!v.isOpera?(v.style(this._frToolbar.domNode,"display","block"),this._populateFindField(),J||(this._displayed=
!0)):(v.style(this._frToolbar.domNode,"display","none"),J||(this._displayed=!1),E||this.editor.focus());this.editor.resize({h:y.h})},_populateFindField:function(){var G=this.editor._sCall("getSelectedText",[null]);this._findField&&this._findField.textBox&&(G&&this._findField.textBox.set("value",G),this._findField.textBox.focus(),z.selectInputText(this._findField.textBox.focusNode))},setToolbar:function(G){this.inherited(arguments);if(!v.isOpera){var J=this._frToolbar=new I;v.style(J.domNode,"display",
"none");v.place(J.domNode,G.domNode,"after");J.startup();this._closeBox=new k;J.addChild(this._closeBox);this._findField=new t({label:this._strings.findLabel,tooltip:this._strings.findTooltip});J.addChild(this._findField);this._replaceField=new t({label:this._strings.replaceLabel,tooltip:this._strings.replaceTooltip});J.addChild(this._replaceField);J.addChild(new C.editor.plugins.ToolbarLineBreak);this._findButton=new z.form.Button({label:this._strings.findButton,showLabel:!0,iconClass:this.iconClassPrefix+
" dijitEditorIconFind"});this._findButton.titleNode.title=this._strings.findButtonTooltip;J.addChild(this._findButton);this._replaceButton=new z.form.Button({label:this._strings.replaceButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplace"});this._replaceButton.titleNode.title=this._strings.replaceButtonTooltip;J.addChild(this._replaceButton);this._replaceAllButton=new z.form.Button({label:this._strings.replaceAllButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplaceAll"});
this._replaceAllButton.titleNode.title=this._strings.replaceAllButtonTooltip;J.addChild(this._replaceAllButton);this._caseSensitive=new F({label:this._strings.matchCase,tooltip:this._strings.matchCaseTooltip});J.addChild(this._caseSensitive);this._backwards=new F({label:this._strings.backwards,tooltip:this._strings.backwardsTooltip});J.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 z.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(G){G.keyCode==v.keys.ENTER&&(this._find(),v.stopEvent(G))},_onReplaceKeyDown:function(G){G.keyCode==v.keys.ENTER&&(this._replace()||this._replace(),v.stopEvent(G))},_find:function(G){var J=this._findField.get("value")||"";if(J){var E=this._caseSensitive.get("value"),
y=this._backwards.get("value");J=this._findText(J,E,y);!J&&G&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextFind})),z.popup.open({popup:this._promDialog,around:this._findButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;z.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return J}return!1},_replace:function(G){var J=
!1,E=this.editor;E.focus();var y=this._findField.get("value")||"",x=this._replaceField.get("value")||"";if(y){var w=this._caseSensitive.get("value"),n=this._backwards.get("value"),q=E._sCall("getSelectedText",[null]);v.isMoz&&(y=v.trim(y),q=v.trim(q));y=this._filterRegexp(y,!w);q&&y.test(q)&&(E.execCommand("inserthtml",x),J=!0,n&&(this._findText(x,w,n),E._sCall("collapse",[!0])));!this._find(!1)&&G&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextReplace})),
z.popup.open({popup:this._promDialog,around:this._replaceButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;z.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return J}return null},_replaceAll:function(G){var J=0;this._backwards.get("value")?this.editor.placeCursorAtEnd():this.editor.placeCursorAtStart();this._replace(!1)&&J++;var E=v.hitch(this,function(){this._replace(!1)?
(J++,setTimeout(E,10)):G&&(this._promDialog.set("content",v.string.substitute(this._strings.replaceDialogText,{0:""+J})),z.popup.open({popup:this._promDialog,around:this._replaceAllButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;z.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this._findField.focus();this._findField.textBox.focusNode.select()}),0))});E()},_findText:function(G,J,
E){var y=this.editor,x=y.window,w=!1;if(G)if(x.find)w=x.find(G,J,E,!1,!1,!1,!1);else{var n=y.document;if(n.selection||x.getSelection)if(this.editor.focus(),y=n.body.createTextRange(),w=y.duplicate(),x.getSelection().getRangeAt(0),(n=n.selection?n.selection.createRange():null)?E?y.setEndPoint("EndToStart",n):y.setEndPoint("StartToEnd",n):this._bookmark&&(x=x.getSelection().toString(),y.moveToBookmark(this._bookmark),y.text!=x?(y=w.duplicate(),this._bookmark=null):(E?w.setEndPoint("EndToStart",y):w.setEndPoint("StartToEnd",
y),y=w.duplicate())),J=J?4:0,E&&(J|=1),w=y.findText(G,y.text.length,J))y.select(),this._bookmark=y.getBookmark()}return w},_filterRegexp:function(G,J){for(var E="",y=null,x=0;x<G.length;x++)switch(y=G.charAt(x),y){case "\\":E+=y;x++;E+=G.charAt(x);break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":E+="\\";default:E+=y}E="^"+E+"$";return J?new RegExp(E,"mi"):new RegExp(E,"m")},updateState:function(){this.button.set("disabled",this.get("disabled"))},
destroy:function(){this.inherited(arguments);this._promDialogTimeout&&(clearTimeout(this._promDialogTimeout),this._promDialogTimeout=null,z.popup.close(this._promDialog));this._frToolbar&&(this._frToolbar.destroyRecursive(),this._frToolbar=null);this._promDialog&&(this._promDialog.destroyRecursive(),this._promDialog=null)}});B._FindReplaceCloseBox=k;B._FindReplaceTextBox=t;B._FindReplaceCheckBox=F;B._FindReplaceToolbar=I;v.subscribe(z._scopeName+".Editor.getPlugin",null,function(G){G.plugin||"findreplace"!==
G.args.name.toLowerCase()||(G.plugin=new B({}))});return B})},"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,z,C,r){var h=v.declare("dojox.editor.plugins.PasteFromWord",
r,{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 z.form.Button({label:c.pasteFromWord,
showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"PasteFromWord",tabIndex:"-1",onClick:v.hitch(this,"_openDialog")});this._uId=z.getUniqueId(this.editor.id);c.uId=this._uId;c.width=this.width||"400px";c.height=this.height||"300px";this._dialog=(new z.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(z.byId(this._uId+"_paste"),"onClick","_paste");this.connect(z.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 z._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=C.html.format.prettyPrint(this._rte.get("value"));this._dialog.hide();var e;for(e=0;e<this._filters.length;e++){var b=this._filters[e];c=c.replace(b.regexp,b.handler)}c=C.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(z._scopeName+".Editor.getPlugin",null,function(c){c.plugin||"pastefromword"!==c.args.name.toLowerCase()||(c.plugin=new h({width:"width"in c.args?c.args.width:"400px",height:"height"in c.args?c.args.width:"300px"}))});return h})},"dojox/html/format":function(){define(["dojo/_base/kernel","./entities","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,z,C,r,h){var c=v.getObject("dojox.html.format",!0);c.prettyPrint=
function(e,b,d,a,f){var g=[],p=0,A=[],l="\t",k="",t=[],F,I=/[=]([^"']+?)(\s|>)/g,B=/style=("[^"]*"|'[^']*'|\S*)/gi,G=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;if(b&&0<b&&10>b)for(l="",F=0;F<b;F++)l+=" ";b=r.doc.createElement("div");b.innerHTML=e;var J=z.encode,E=z.decode,y=b.ownerDocument.createElement("div"),x=function(u){u=u.cloneNode(!1);y.appendChild(u);u=y.innerHTML;y.innerHTML="";return u},w=function(){var u;for(u=0;u<p;u++)g.push(l)},n=function(){g.push("\n")},q=function(u){var D;u=u.split("\n");for(D=
0;D<u.length;D++)u[D]=v.trim(u[D]);u=u.join(" ");u=v.trim(u);if(""!==u){var M=[];if(d&&0<d){var L="";for(D=0;D<p;D++)L+=l;D=L.length;L=d;for(d>D&&(L-=D);u;)if(u.length>d){for(D=L;0<D&&" "!==u.charAt(D);D--);if(!D)for(D=L;D<u.length&&" "!==u.charAt(D);D++);var N=u.substring(0,D);N=v.trim(N);u=v.trim(u.substring(D==u.length?u.length:D+1,u.length));if(N){var O="";for(D=0;D<p;D++)O+=l;N=O+N+"\n"}M.push(N)}else{O="";for(D=0;D<p;D++)O+=l;u=O+u+"\n";M.push(u);u=null}return M.join("")}O="";for(D=0;D<p;D++)O+=
l;return O+u+"\n"}return""},H=function(u){if(u){var D=u;D&&(D=D.replace(/&quot;/gi,'"'),D=D.replace(/&gt;/gi,"\x3e"),D=D.replace(/&lt;/gi,"\x3c"),D=D.replace(/&amp;/gi,"\x26"));var M;u=0;var L=D.split("\n"),N=[];for(D=0;D<L.length;D++){var O=L[D],Q=-1<O.indexOf("\n");if(O=v.trim(O)){Q=u;for(M=0;M<O.length;M++){var P=O.charAt(M);"{"===P?u++:"}"===P&&(u--,Q=u)}P="";for(M=0;M<p+Q;M++)P+=l;N.push(P+O+"\n")}else Q&&0===D&&N.push("\n")}u=N.join("")}return u},K=function(u){var D=u.nodeName.toLowerCase(),
M=v.trim(x(u));u=M.substring(0,M.indexOf("\x3e")+1);u=u.replace(I,'\x3d"$1"$2');u=u.replace(B,function(N){var O=N.substring(0,6);N=N.substring(6,N.length);var Q=N.charAt(0);N=v.trim(N.substring(1,N.length-1));N=N.split(";");var P=[];C.forEach(N,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();N=P.join("; ");var S=v.trim(N);return S&&";"!==S?O+Q+(N+";")+Q:""});var L=[];u=u.replace(G,function(N){L.push(v.trim(N));return""});
L=L.sort();u="\x3c"+D;L.length&&(u+=" "+L.join(" "));-1!=M.indexOf("\x3c/")?(A.push(D),u+="\x3e"):(u=f?u+" /\x3e":u+"\x3e",A.push(!1));a:switch(D){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":D=!0;break a;default:D=!1}t.push(D);k&&!D&&(g.push(q(k)),k="");D?k+=u:(w(),g.push(u),n(),p++)},m=function(u){var D=u.childNodes;if(D){var M;for(M=0;M<D.length;M++){var L=D[M];if(1===
L.nodeType){var N=v.trim(L.tagName.toLowerCase());h("ie")&&L.parentNode!=u||N&&"/"===N.charAt(0)||(K(L),"script"===N?g.push(H(L.innerHTML)):"pre"===N?(L=L.innerHTML,h("mozilla")&&(L=L.replace("\x3cbr\x3e","\n"),L=L.replace("\x3cpre\x3e",""),L=L.replace("\x3c/pre\x3e","")),"\n"!==L.charAt(L.length-1)&&(L+="\n"),g.push(L)):m(L),L=t.pop(),k&&!L&&(g.push(q(k)),k=""),(N=A.pop())?(N="\x3c/"+N+"\x3e",L?k+=N:(p--,w(),g.push(N),n())):p--)}else 3===L.nodeType||4===L.nodeType?k+=J(L.nodeValue,a):8===L.nodeType&&
(L=E(L.nodeValue,a),w(),g.push("\x3c!--"),n(),p++,g.push(q(L)),p--,w(),g.push("--\x3e"),n())}}};m(b);k&&(g.push(q(k)),k="");return g.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,z,C,r){var h=v.declare("dojox.editor.plugins.InsertAnchor",r,{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),b=this.dropDown=new z.TooltipDialog({title:e.title,execute:v.hitch(this,"setValue"),onOpen:function(){c._onOpenDialog();z.TooltipDialog.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(v.hitch(c,"_onCloseDialog"),0)}});this.button=new z.form.DropDownButton({label:e.insertAnchor,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"InsertAnchor",tabIndex:"-1",
dropDown:this.dropDown});e.id=z.getUniqueId(this.editor.id);this._uniqueId=e.id;this.dropDown.set("content",b.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));b.startup();this._anchorInput=z.byId(this._uniqueId+"_anchorInput");this._textInput=z.byId(this._uniqueId+"_textInput");this._setButton=z.byId(this._uniqueId+"_setButton");this.connect(z.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(C._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 b=c.createElement("style");b.appendChild(c.createTextNode(e));c.getElementsByTagName("head")[0].appendChild(b)}}catch(d){}},_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=
z.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 b=c.textContent||c.innerText;this.editor._sCall("selectElement",[c,!0])}else b=this.editor._sCall("getSelectedText");return{anchorInput:e||"",textInput:b||""}},_onOpenDialog:function(){if(this.editor.window.getSelection)var c=this.editor._sCall("getAncestorElement",["a"]);else c=z.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(z._scopeName+".Editor.getPlugin",null,function(c){if(!c.plugin){var e=c.args.name;e&&(e=e.toLowerCase());"insertanchor"===e&&(c.plugin=new h)}});return h})},"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,z,C,r){var h=v.declare("dojox.editor.plugins.Blockquote",r,{iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Blockquote");this.button=new z.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 b=this.button.get("checked"),d=z.range.getSelection(e.window),a,f,g,p;d&&0<d.rangeCount&&(a=d.getRangeAt(0));if(a){e.beginEditing();if(b)if(a.startContainer===a.endContainer){if(this._isRootInline(a.startContainer)){for(g=a.startContainer;g&&g.parentNode!==e.editNode;)g=g.parentNode;for(;g&&g.previousSibling&&(this._isTextElement(g)||1===g.nodeType&&this._isInlineFormat(this._getTagName(g)));)g=
g.previousSibling;g&&1===g.nodeType&&!this._isInlineFormat(this._getTagName(g))&&(g=g.nextSibling);if(g){var A=e.document.createElement("blockquote");v.place(A,g,"after");A.appendChild(g);for(p=A.nextSibling;p&&(this._isTextElement(p)||1===p.nodeType&&this._isInlineFormat(this._getTagName(p)));)A.appendChild(p),p=A.nextSibling}}else{for(var l=a.startContainer;(this._isTextElement(l)||this._isInlineFormat(this._getTagName(l))||"li"===this._getTagName(l))&&l!==e.editNode&&l!==e.document.body;)l=l.parentNode;
l!==e.editNode&&l!==l.ownerDocument.documentElement&&(A=e.document.createElement("blockquote"),v.place(A,l,"after"),A.appendChild(l))}A&&(e._sCall("selectElementChildren",[A]),e._sCall("collapse",[!0]))}else{var k;g=a.startContainer;for(p=a.endContainer;g&&this._isTextElement(g)&&g.parentNode!==e.editNode;)g=g.parentNode;for(k=g;k.nextSibling&&e._sCall("inSelection",[k]);)k=k.nextSibling;p=k;if(p===e.editNode||p===e.document.body){A=e.document.createElement("blockquote");v.place(A,g,"after");var t=
this._getTagName(g);if(this._isTextElement(g)||this._isInlineFormat(t))for(e=g;e&&(this._isTextElement(e)||1===e.nodeType&&this._isInlineFormat(this._getTagName(e)));)A.appendChild(e),e=A.nextSibling;else A.appendChild(g);return}p=p.nextSibling;for(k=g;k&&k!==p;){if(1===k.nodeType){if(t=this._getTagName(k),"br"!==t){if(!window.getSelection&&"p"===t&&this._isEmpty(k)){k=k.nextSibling;continue}this._isInlineFormat(t)?A||(A=e.document.createElement("blockquote"),v.place(A,k,"after")):(A&&this._isEmpty(A)&&
A.parentNode.removeChild(A),A=e.document.createElement("blockquote"),v.place(A,k,"after"));A.appendChild(k);k=A}}else this._isTextElement(k)&&(A||(A=e.document.createElement("blockquote"),v.place(A,k,"after")),A.appendChild(k),k=A);k=k.nextSibling}A&&(this._isEmpty(A)?A.parentNode.removeChild(A):(e._sCall("selectElementChildren",[A]),e._sCall("collapse",[!0])),A=null)}else if(A=!1,a.startContainer===a.endContainer){for(f=a.endContainer;f&&f!==e.editNode&&f!==e.document.body;){if("blockquote"===(f.tagName?
f.tagName.toLowerCase():"")){A=!0;break}f=f.parentNode}if(A){for(var F;f.firstChild;)F=f.firstChild,v.place(F,f,"before");f.parentNode.removeChild(f);F&&(e._sCall("selectElementChildren",[F]),e._sCall("collapse",[!0]))}}else{g=a.startContainer;for(p=a.endContainer;g&&this._isTextElement(g)&&g.parentNode!==e.editNode;)g=g.parentNode;for(a=[];g&&g.nextSibling&&e._sCall("inSelection",[g]);)g.parentNode&&"blockquote"===this._getTagName(g.parentNode)&&(g=g.parentNode),a.push(g),g=g.nextSibling;for(var I=
this._findBlockQuotes(a);I.length;){var B=I.pop();if(B.parentNode){for(;B.firstChild;)v.place(B.firstChild,B,"before");B.parentNode.removeChild(B)}}}e.endEditing()}e.onNormalizedDisplayChanged()}catch(G){}},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 b=z.range.getSelection(c.window);if(b&&0<b.rangeCount&&(b=b.getRangeAt(0)))var d=b.endContainer;for(;d&&d!==c.editNode&&d!==c.document;){if("blockquote"===
(d.tagName?d.tagName.toLowerCase():"")){e=!0;break}d=d.parentNode}this.button.set("checked",e)}},_findBlockQuotes:function(c){var e=[];if(c){var b;for(b=0;b<c.length;b++){var d=c[b];1===d.nodeType&&("blockquote"===this._getTagName(d)&&e.push(d),d.childNodes&&0<d.childNodes.length&&(e=e.concat(this._findBlockQuotes(d.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,b;for(b=0;b<c.childNodes.length;b++){var d=c.childNodes[b];if(1===
d.nodeType){if("p"!==this._getTagName(d)||v.trim(d.innerHTML)){e=!1;break}}else if(this._isTextElement(d)){if((d=v.trim(d.nodeValue))&&"\x26nbsp;"!==d&&"\u00a0"!==d){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(z._scopeName+".Editor.getPlugin",
null,function(c){c.plugin||"blockquote"!==c.args.name.toLowerCase()||(c.plugin=new h({}))});return h})},"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,z,C,r){v.experimental("dojox.editor.plugins.UploadImage");var h=v.declare("dojox.editor.plugins.UploadImage",r,{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 C.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,b){c=c[0];e=v.byId(this.currentImageId,this.editor.document);b=this.downloadPath?this.downloadPath+c.name:c.file;
e.src=b;v.attr(e,"_djrealurl",b);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(z._scopeName+".Editor.getPlugin",null,function(c){if(!c.plugin)switch(c.args.name){case "uploadImage":c.plugin=new h({url:c.args.url})}});return h})},"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,z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t,F,I,B,G,J,E,y,x,w){v.deprecated("dojox.form.FileUploader","Use dojox.form.Uploader","2.0");return z("dojox.form.FileUploader",[G,J,E],{swfPath:k.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=(y.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 n="createFlashUploader";else this.uploaderType="html",n="createHtmlUploader";this[n]();this.fileListId&&this.connect(d.byId(this.fileListId),"click",function(q){q=q.target.parentNode.parentNode.parentNode;q.id&&-1<q.id.indexOf("file_")&&
this.removeFile(q.id.split("file_")[1])});B.addOnUnload(this,this.destroy)},getHiddenNode:function(n){if(!n)return null;var q=null;for(n=n.parentNode;n&&"body"!=n.tagName.toLowerCase();){if("none"==a.get(n,"display")){q=n;break}n=n.parentNode}return q},getButtonStyle:function(){var n=this.srcNodeRef;(this._hiddenNode=this.getHiddenNode(n))&&a.set(this._hiddenNode,"display","block");if(!n&&this.button&&this.button.domNode){var q=!0;n=this.button.domNode.className+" dijitButtonNode";var H=this.getText(b(".dijitButtonText",
this.button.domNode)[0]);this.srcNodeRef=n=A.place('\x3cbutton id\x3d"'+this.button.id+'" class\x3d"'+n+'"\x3e'+H+"\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&&(n=this.button);g.get(n,"class")&&(this.baseClass+=" "+g.get(n,"class"));g.set(n,"class",this.baseClass);this.norm=this.getStyle(n);this.width=
this.norm.w;this.height=this.norm.h;"flash"==this.uploaderType?(this.over=this.getTempNodeStyle(n,this.baseClass+" "+this.hoverClass,q),this.down=this.getTempNodeStyle(n,this.baseClass+" "+this.activeClass,q),this.dsbl=this.getTempNodeStyle(n,this.baseClass+" "+this.disabledClass,q),this.fhtml={cn:this.getText(n),nr:this.norm,ov:this.over,dn:this.down,ds:this.dsbl}):(this.fhtml={cn:this.getText(n),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(){a.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&&a.set(this.domNode,"lineHeight",this.norm.lh+"px");this.showProgress?(this.progTextNode.innerHTML=this.progressMessage,
a.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"}),a.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})):A.destroy(this.progNode);
a.set(this.insideNode,{position:"absolute",top:"0px",left:"0px",display:""});p.add(this.domNode,this.srcNodeRef.className);-1<this.fhtml.nr.d.indexOf("inline")&&p.add(this.domNode,"dijitInline");try{this.insideNode.innerHTML=this.fhtml.cn}catch(q){if("flash"==this.uploaderType){this.insideNode=this.insideNode.parentNode.removeChild(this.insideNode);c.body().appendChild(this.insideNode);this.insideNode.innerHTML=this.fhtml.cn;var n=h.connect(this,"onReady",this,function(){h.disconnect(n);this.insideNode=
this.insideNode.parentNode.removeChild(this.insideNode);this.domNode.appendChild(this.insideNode)})}else this.insideNode.appendChild(document.createTextNode(this.fhtml.cn))}this._hiddenNode&&a.set(this._hiddenNode,"display","none")},onChange:function(n){},onProgress:function(n){},onComplete:function(n){},onCancel:function(){},onError:function(n){},onReady:function(n){},onLoad:function(n){},submit:function(n){n=n?l.toObject(n):null;this.upload(n);return!1},upload:function(n){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 q=t.byId(this.progressWidgetId).domNode;"none"==a.get(q,"display")&&(this.restoreProgDisplay="none",a.set(q,"display","block"));"hidden"==a.get(q,"visibility")&&(this.restoreProgDisplay="hidden",a.set(q,"visibility","visible"))}n&&!n.target&&(this.postData=n);this.log("upload type:",this.uploaderType," - postData:",this.postData);for(n=0;n<this.fileList.length;n++)q=
this.fileList[n],q.bytesLoaded=0,q.bytesTotal=q.size||1E5,q.percent=0;"flash"==this.uploaderType?this.uploadFlash():this.uploadHTML();return!1},removeFile:function(n,q){var H;for(H=0;H<this.fileList.length;H++)if(this.fileList[H].name==n){q||this.fileList.splice(H,1);break}"flash"==this.uploaderType?this.flashMovie.removeFile(n):q||(A.destroy(this.fileInputs[H]),this.fileInputs.splice(H,1),this._renumberInputs());this.fileListId&&A.destroy("file_"+n)},destroy:function(){"flash"!=this.uploaderType||
this.flashMovie?(r.forEach(this._subs,h.unsubscribe,dojo),r.forEach(this._cons,h.disconnect,dojo),this.scrollConnect&&h.disconnect(this.scrollConnect),"flash"==this.uploaderType?(this.flashObject.destroy(),delete this.flashObject):(A.destroy(this._fileInput),A.destroy(this._formNode)),this.inherited(arguments)):this._cons.push(h.connect(this,"onLoad",this,"destroy"))},_displayProgress:function(n){!0===n?("flash"==this.uploaderType?a.set(this.insideNode,"top","-2500px"):a.set(this.insideNode,"display",
"none"),a.set(this.progNode,"display","")):!1===n?(a.set(this.insideNode,{display:"",top:"0"}),a.set(this.progNode,"display","none")):a.set(this.progNode,"width",n*this.fhtml.nr.w+"px")},_animateProgress:function(){this._displayProgress(!0);var n=!1,q=h.connect(this,"_complete",function(){h.disconnect(q);n=!0}),H=0,K=setInterval(C.hitch(this,function(){H+=5;H>this.fhtml.nr.w&&(H=0,n=!0);this._displayProgress(H/this.fhtml.nr.w);n&&(clearInterval(K),setTimeout(C.hitch(this,function(){this._displayProgress(!1)}),
500))}),50)},_error:function(n){"string"==typeof n&&(n=Error(n));this.onError(n)},_addToFileList:function(){if(this.fileListId){var n="";r.forEach(this.fileList,function(q){n+='\x3ctable id\x3d"file_'+q.name+'" class\x3d"fileToUpload"\x3e\x3ctr\x3e\x3ctd class\x3d"fileToUploadClose"\x3e\x3c/td\x3e\x3ctd class\x3d"fileToUploadName"\x3e'+q.name+'\x3c/td\x3e\x3ctd class\x3d"fileToUploadSize"\x3e'+(q.size?Math.ceil(.001*q.size)+"kb":"")+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"},this);d.byId(this.fileListId).innerHTML=
n}},_change:function(n){e("ie")&&r.forEach(n,function(q){q.name=q.name.split("\\")[q.name.split("\\").length-1]});this.selectMultipleFiles?this.fileList=this.fileList.concat(n):(this.fileList[0]&&this.removeFile(this.fileList[0].name,!0),this.fileList=n);this._addToFileList();this.onChange(n);this.uploadOnChange?("html"==this.uploaderType&&this._buildFileInput(),this.upload()):"html"==this.uploaderType&&this.selectMultipleFiles&&(this._buildFileInput(),this._connectInput())},_complete:function(n){n=
C.isArray(n)?n:[n];r.forEach(n,function(q){q.ERROR&&this._error(q.ERROR)},this);r.forEach(this.fileList,function(q){q.bytesLoaded=1;q.bytesTotal=1;q.percent=100;this._progress(q)},this);r.forEach(this.fileList,function(q){this.removeFile(q.name,!0)},this);this.onComplete(n);this.fileList=[];this._resetHTML();this.set("disabled",!1);this.restoreProgDisplay&&setTimeout(C.hitch(this,function(){a.set(t.byId(this.progressWidgetId).domNode,"none"==this.restoreProgDisplay?"display":"visibility",this.restoreProgDisplay)}),
500)},_progress:function(n){for(var q=0,H=0,K=0;K<this.fileList.length;K++){var m=this.fileList[K];m.name==n.name&&(m.bytesLoaded=n.bytesLoaded,m.bytesTotal=n.bytesTotal,m.percent=Math.ceil(m.bytesLoaded/m.bytesTotal*100),this.log(m.name,"percent:",m.percent));H+=Math.ceil(.001*m.bytesLoaded);q+=Math.ceil(.001*m.bytesTotal)}n=Math.ceil(H/q*100);this.progressWidgetId&&t.byId(this.progressWidgetId).update({progress:n+"%"});this.showProgress&&this._displayProgress(.01*n);this.onProgress(this.fileList)},
_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(n){if(this._disabled!=n){if("flash"==this.uploaderType){if(!this.flashReady){var q=h.connect(this,"onLoad",this,function(){h.disconnect(q);this._setDisabledAttr(n)});return}this._disabled=n;this.flashMovie.doDisable(n)}else this._disabled=n,a.set(this._fileInput,"display",this._disabled?"none":"");p.toggle(this.domNode,this.disabledClass,n)}},_onFlashBlur:function(){this.flashMovie.blur();if(!this.nextFocusObject&&this.tabIndex)for(var n=
b("[tabIndex]"),q=0;q<n.length;q++)if(n[q].tabIndex>=Number(this.tabIndex)+1){this.nextFocusObject=n[q];break}this.nextFocusObject.focus()},_disconnect:function(){r.forEach(this._cons,h.disconnect,dojo)},uploadHTML:function(){this.selectMultipleFiles&&A.destroy(this._fileInput);this._setHtmlPostData();this.showProgress&&this._animateProgress();F.send({url:this.uploadUrl.toString(),form:this._formNode,handleAs:"json",error:C.hitch(this,function(n){this._error("HTML Upload Error:"+n.message)}),load:C.hitch(this,
function(n,q,H){this._complete(n)})})},createHtmlUploader:function(){this._buildForm();this._setFormStyle();this._buildFileInput();this._connectInput();this._styleContent();a.set(this.insideNode,"visibility","visible");this.onReady()},_connectInput:function(){this._disconnect();this._cons.push(h.connect(this._fileInput,"mouseover",this,function(n){p.add(this.domNode,this.hoverClass);this.onMouseOver(n)}));this._cons.push(h.connect(this._fileInput,"mouseout",this,function(n){setTimeout(C.hitch(this,
function(){p.remove(this.domNode,this.activeClass);p.remove(this.domNode,this.hoverClass);this.onMouseOut(n);this._checkHtmlCancel("off")}),0)}));this._cons.push(h.connect(this._fileInput,"mousedown",this,function(n){p.add(this.domNode,this.activeClass);p.remove(this.domNode,this.hoverClass);this.onMouseDown(n)}));this._cons.push(h.connect(this._fileInput,"mouseup",this,function(n){p.remove(this.domNode,this.activeClass);this.onMouseUp(n);this.onClick(n);this._checkHtmlCancel("up")}));this._cons.push(h.connect(this._fileInput,
"change",this,function(){this._checkHtmlCancel("change");var n=this._fileInput.value;n?this._change([{name:n,type:"",size:0}]):this._change([])}));0<=this.tabIndex&&g.set(this.domNode,"tabIndex",this.tabIndex)},_checkHtmlCancel:function(n){"change"==n&&(this.dialogIsOpen=!1);"up"==n&&(this.dialogIsOpen=!0);if("off"==n){if(this.dialogIsOpen)this.onCancel();this.dialogIsOpen=!1}},_styleContent:function(){var n=this.fhtml.nr;a.set(this.insideNode,{width:n.w+"px",height:"middle"==n.va?n.h+"px":"auto",
textAlign:n.ta,paddingTop:n.p[0]+"px",paddingRight:n.p[1]+"px",paddingBottom:n.p[2]+"px",paddingLeft:n.p[3]+"px"});try{a.set(this.insideNode,"lineHeight","inherit")}catch(q){}},_resetHTML:function(){"html"==this.uploaderType&&this._formNode&&(this.fileInputs=[],b("*",this._formNode).forEach(function(n){A.destroy(n)}),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=t.getUniqueId("FileUploaderForm"),this.domNode.appendChild(this._formNode)):this._formNode=A.create("form",{enctype:"multipart/form-data",method:"post",id:t.getUniqueId("FileUploaderForm")},this.domNode))},_buildFileInput:function(){this._fileInput&&(this._disconnect(),this._fileInput.id+=this.fileCount,a.set(this._fileInput,"display","none"));this._fileInput=document.createElement("input");this.fileInputs.push(this._fileInput);var n=
this.htmlFieldName;this.selectMultipleFiles&&(n+=this.fileCount,this.fileCount++);g.set(this._fileInput,{id:this.id,name:n,type:"file"});p.add(this._fileInput,"dijitFileInputReal");this._formNode.appendChild(this._fileInput);n=f.getMarginBox(this._fileInput);a.set(this._fileInput,{position:"relative",left:this.fhtml.nr.w-n.w+"px",opacity:0})},_renumberInputs:function(){if(this.selectMultipleFiles){var n;this.fileCount=0;r.forEach(this.fileInputs,function(q){n=this.htmlFieldName+this.fileCount;this.fileCount++;
g.set(q,"name",n)},this)}},_setFormStyle:function(){w.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");a.set(this.domNode,{overflow:"hidden",position:"relative"});a.set(this.insideNode,"position","absolute")},_setHtmlPostData:function(){if(this.postData)for(var n in this.postData)A.create("input",{type:"hidden",name:n,value:this.postData[n]},this._formNode)},uploadFlash:function(){try{if(this.showProgress){this._displayProgress(!0);
var n=h.connect(this,"_complete",this,function(){h.disconnect(n);this._displayProgress(!1)})}var q={},H;for(H in this.postData)q[H]=this.postData[H];this.flashMovie.doUpload(q)}catch(K){this._error("FileUploader - Sorry, the SWF failed to initialize."+K)}},createFlashUploader:function(){if(this.uploadUrl=this.uploadUrl.toString())if(0>this.uploadUrl.toLowerCase().indexOf("http")&&0!=this.uploadUrl.indexOf("/")){var n=window.location.href.split("/");n.pop();n=n.join("/")+"/";this.uploadUrl=n+this.uploadUrl;
this.log("SWF Fixed - Relative loc:",n," abs loc:",this.uploadUrl)}else this.log("SWF URL unmodified:",this.uploadUrl);else console.warn("Warning: no uploadUrl provided.");n={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:x.serialize("fh",this.fhtml),fileMask:x.serialize("fm",this.fileMask),noReturnCheck:this.skipServerCheck,serverTimeout:this.serverTimeout},params:{scale:"noscale",wmode:"opaque",allowScriptAccess:"always",allowNetworking:"all"}};this.flashObject=new y(n,this.insideNode);this.flashObject.onError=C.hitch(function(q){this._error("Flash Error: "+q)});this.flashObject.onReady=C.hitch(this,function(){a.set(this.insideNode,"visibility","visible");
this.log("FileUploader flash object ready");this.onReady(this)});this.flashObject.onLoad=C.hitch(this,function(q){this.flashMovie=q;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&&g.set(this.domNode,"tabIndex",this.tabIndex)},_doSub:function(n,q){this._subs.push(h.subscribe(this.id+n,this,q))},urlencode:function(n){return n&&"none"!=n?n.replace(/:/g,"||").replace(/\./g,"^^").replace("url(","").replace(")","").replace(/'/g,"").replace(/"/g,""):!1},isButton:function(n){n=n.tagName.toLowerCase();
return"button"==n||"input"==n},getTextStyle:function(n){var q={};q.ff=a.get(n,"fontFamily");if(q.ff){q.ff=q.ff.replace(", ",",");q.ff=q.ff.replace(/"|'/g,"");q.ff="sans-serif"==q.ff?"Arial":q.ff;q.fw=a.get(n,"fontWeight");q.fi=a.get(n,"fontStyle");q.fs=parseInt(a.get(n,"fontSize"),10);if(-1<a.get(n,"fontSize").indexOf("%"))for(var H=n;H.tagName;){if(-1==a.get(H,"fontSize").indexOf("%")){q.fs=parseInt(a.get(H,"fontSize"),10);break}"body"==H.tagName.toLowerCase()&&(q.fs=.16*parseInt(a.get(H,"fontSize"),
10));H=H.parentNode}q.fc=(new I(a.get(n,"color"))).toHex();q.fc=parseInt(q.fc.substring(1,Infinity),16)}q.lh=a.get(n,"lineHeight");q.ta=a.get(n,"textAlign");q.ta="start"!=q.ta&&q.ta?q.ta:"left";q.va=this.isButton(n)?"middle":q.lh==q.h?"middle":a.get(n,"verticalAlign");return q},getText:function(n){n=C.trim(n.innerHTML);-1<n.indexOf("\x3c")&&(n=escape(n));return n},getStyle:function(n){var q={},H=f.getContentBox(n),K=f.getPadExtents(n);q.p=[K.t,K.w-K.l,K.h-K.t,K.l];q.w=H.w+K.w;q.h=H.h+K.h;q.d=a.get(n,
"display");H=new I(a.get(n,"backgroundColor"));q.bc=0==H.a?"#ffffff":H.toHex();q.bc=parseInt(q.bc.substring(1,Infinity),16);if(H=this.urlencode(a.get(n,"backgroundImage")))q.bi={url:H,rp:a.get(n,"backgroundRepeat"),pos:escape(a.get(n,"backgroundPosition"))},q.bi.pos||(H=a.get(n,"backgroundPositionX"),K=a.get(n,"backgroundPositionY"),q.bi.pos=escape(("left"==H?"0%":"right"==H?"100%":H)+" "+("top"==K?"0%":"bottom"==K?"100%":K)));return C.mixin(q,this.getTextStyle(n))},getTempNodeStyle:function(n,q,
H){if(H){H=A.place("\x3c"+n.tagName+"\x3e\x3cspan\x3e"+n.innerHTML+"\x3c/span\x3e\x3c/"+n.tagName+"\x3e",n.parentNode);var K=H.firstChild;p.add(K,n.className);p.add(H,q);n=this.getStyle(K)}else H=A.place("\x3c"+n.tagName+"\x3e"+n.innerHTML+"\x3c/"+n.tagName+"\x3e",n.parentNode),p.add(H,n.className),p.add(H,q),H.id=n.id,n=this.getStyle(H);A.destroy(H);return n}})})},"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,z,C,r,h,c,e,b,d,a,f,g,p){C.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");c=p._iframeName;c=c.substring(0,c.lastIndexOf("_"));var A=r.delegate(p,{create:function(){return A._frame=p.create.apply(p,arguments)},get:null,post:null,send:function(l){var k=h._ioSetArgs(l,function(J){G&&G.cancel()},function(J){var E=null;J=J.ioArgs;try{var y=J.handleAs;"xml"===y||"html"===y?E=G.response.data:(E=G.response.text,"json"===y?E=z.fromJson(E):"javascript"===y&&(E=C.eval(E)))}catch(x){E=
x}return E},function(J,E){E.ioArgs._hasError=!0;return J}),t=k.ioArgs,F="GET",I=b.byId(l.form);l.method&&"POST"===l.method.toUpperCase()&&I&&(F="POST");l={method:F,handleAs:"json"===l.handleAs||"javascript"===l.handleAs?"text":l.handleAs,form:l.form,query:I?null:l.content,data:I?l.content:null,timeout:l.timeout,ioArgs:t};l.method&&(l.method=l.method.toUpperCase());if(v.ioPublish&&C.publish&&!1!==t.args.ioPublish)var B=g.after(p,"_notifyStart",function(J){J.options.ioArgs===t&&(B.remove(),h._ioNotifyStart(k))},
!0);var G=p(t.url,l,!0);t._callNext=G._callNext;G.then(function(){k.resolve(k)}).otherwise(function(J){k.ioArgs.error=J;k.reject(J)});return k},_iframeOnload:e.global[c+"_onload"]});r.setObject("dojo.io.iframe",A);return A})},"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,z,C,r,h,c,e,b,d){function a(k){k=v.delegate(g,k);if(!("path"in k))return console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided."),
null;"id"in k||(k.id="dojox-embed-flash-"+f++);return k}var f=0,g={expressInstall:!1,width:320,height:240,swLiveConnect:"true",allowScriptAccess:"sameDomain",allowNetworking:"all",style:null,redirect:null};if(h("ie")){var p=function(k){k=a(k);if(!k)return null;var t,F=k.path;if(k.vars){var I=[];for(t in k.vars)I.push(encodeURIComponent(t)+"\x3d"+encodeURIComponent(k.vars[t]));k.params.FlashVars=I.join("\x26");delete k.vars}F='\x3cobject id\x3d"'+d.escape(String(k.id))+'" classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width\x3d"'+
d.escape(String(k.width))+'" height\x3d"'+d.escape(String(k.height))+'"'+(k.style?' style\x3d"'+d.escape(String(k.style))+'"':"")+'\x3e\x3cparam name\x3d"movie" value\x3d"'+d.escape(String(F))+'" /\x3e';if(k.params)for(t in k.params)F+='\x3cparam name\x3d"'+d.escape(t)+'" value\x3d"'+d.escape(String(k.params[t]))+'" /\x3e';return{id:k.id,markup:F+"\x3c/object\x3e"}};var A=function(){for(var k=10,t=null;!t&&7<k;)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+k--)}catch(F){}return t?(k=t.GetVariable("$version").split(" ")[1].split(","),
{major:null!=k[0]?parseInt(k[0]):0,minor:null!=k[1]?parseInt(k[1]):0,rev:null!=k[2]?parseInt(k[2]):0}):{major:0,minor:0,rev:0}}();z.addOnWindowUnload(function(){console.warn("***************UNLOAD");var k=function(){};r("object").reverse().style("display","none").forEach(function(t){for(var F in t)if("FlashVars"!=F&&"function"==typeof t[F])try{t[F]=k}catch(I){}})})}else p=function(k){k=a(k);if(!k)return null;var t,F=k.path;if(k.vars){var I=[];for(t in k.vars)I.push(encodeURIComponent(t)+"\x3d"+encodeURIComponent(k.vars[t]));
k.params.flashVars=I.join("\x26");delete k.vars}F='\x3cembed type\x3d"application/x-shockwave-flash" src\x3d"'+d.escape(String(F))+'" id\x3d"'+d.escape(String(k.id))+'" width\x3d"'+d.escape(String(k.width))+'" height\x3d"'+d.escape(String(k.height))+'"'+(k.style?' style\x3d"'+d.escape(String(k.style))+'" ':"")+'pluginspage\x3d"'+window.location.protocol+'//www.adobe.com/go/getflashplayer" ';if(k.params)for(t in k.params)F+=" "+d.escape(t)+'\x3d"'+d.escape(String(k.params[t]))+'"';return{id:k.id,markup:F+
" /\x3e"}},A=function(){var k=navigator.plugins["Shockwave Flash"];return k&&k.description?(k=k.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."),{major:null!=k[0]?parseInt(k[0]):0,minor:null!=k[1]?parseInt(k[1]):0,rev:null!=k[2]?parseInt(k[2]):0}):{major:0,minor:0,rev:0}}();var l=function(k,t){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=A.major;this.minimumVersion=k.minimumVersion||9;this.domNode=this.movie=this.id=null;t&&(t=c.byId(t));setTimeout(v.hitch(this,function(){if(k.expressInstall||this.available&&this.available>=this.minimumVersion)if(k&&t)this.init(k,t);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(l,{onReady:function(k){},onLoad:function(k){},onError:function(k){},_onload:function(){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;this.onLoad(this.movie)},init:function(k,t){this.destroy();t=c.byId(t||this.domNode);if(!t)throw Error("dojox.embed.Flash: no domNode reference has been passed.");var F=0;this._poller=null;this._pollCount=0;this._pollMax=15;this.pollTime=100;l.initialized&&(this.id=l.place(k,t),this.domNode=t,setTimeout(v.hitch(this,
function(){this.movie=this.byId(this.id,k.doc);this.onReady(this.movie);this._poller=setInterval(v.hitch(this,function(){try{F=this.movie.PercentLoaded()}catch(I){console.warn("this.movie.PercentLoaded() failed",I,this.movie)}if(100==F)this._onload();else if(0==F&&this._pollCount++>this._pollMax)throw clearInterval(this._poller),Error("Building SWF failed.");}),this.pollTime)}),1))},_destroy:function(){try{this.domNode.removeChild(this.movie)}catch(k){}this.id=this.movie=this.domNode=null},destroy:function(){if(this.movie){var k=
v.delegate({id:!0,movie:!0,domNode:!0,onReady:!0,onLoad:!0}),t;for(t in this)k[t]||delete this[t];this._poller?e(this,"Load",this,"_destroy"):this._destroy()}},byId:function(k,t){t=t||document;return t.embeds[k]?t.embeds[k]:t[k]?t[k]:window[k]?window[k]:document[k]?document[k]:null}});v.mixin(l,{minSupported:8,available:A.major,supported:A.major>=A.required,minimumRequired:A.required,version:A,initialized:!1,onInitialize:function(){l.initialized=!0},__ie_markup__:function(k){return p(k)},proxy:function(k,
t){C.forEach(t instanceof Array?t:[t],function(F){this[F]=v.hitch(this,function(){return function(){return eval(this.movie.CallFunction('\x3cinvoke name\x3d"'+F+'" returntype\x3d"javascript"\x3e\x3carguments\x3e'+C.map(arguments,function(I){return __flash__toXML(I)}).join("")+"\x3c/arguments\x3e\x3c/invoke\x3e"))}.apply(this,arguments||[])})},k)}});l.place=function(k,t){k=p(k);t=c.byId(t);t||(t=b.doc.createElement("div"),t.id=k.id+"-container",b.body().appendChild(t));return k?(t.innerHTML=k.markup,
k.id):null};l.onInitialize();v.setObject("dojox.embed.Flash",l);return l})},"dojox/embed/flashVars":function(){define(["dojo"],function(v){v.deprecated("dojox.embed.flashVars","Will be removed in 2.0","2.0");var z={serialize:function(C,r){var h=function(d){"string"==typeof d&&(d=d.replace(/;/g,"_sc_"),d=d.replace(/\./g,"_pr_"),d=d.replace(/:/g,"_cl_"));return d},c=dojox.embed.flashVars.serialize,e="";if(v.isArray(r)){for(var b=0;b<r.length;b++)e+=c(C+"."+b,h(r[b]))+";";return e.replace(/;{2,}/g,";")}if(v.isObject(r)){for(b in r)e+=
c(C+"."+b,h(r[b]))+";";return e.replace(/;{2,}/g,";")}return C+":"+r}};v.setObject("dojox.embed.flashVars",z);return z})},"dojox/html/styles":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,z,C,r){var h=v.getObject("dojox.html",!0),c={},e={},b=[];h.insertCssRule=function(d,a,f){f=h.getDynamicStyleSheet(f);var g=d+" {"+a+"}";console.log("insertRule:",g);r("ie")?(f.cssText+=g,console.log("ss.cssText:",f.cssText)):f.sheet?f.sheet.insertRule(g,
f._indicies.length):f.appendChild(C.doc.createTextNode(g));f._indicies.push(d+" "+a);return d};h.removeCssRule=function(d,a,f){var g=-1,p,A;for(p in c)if(!f||f===p){var l=c[p];for(A=0;A<l._indicies.length;A++)if(d+" "+a===l._indicies[A]){g=A;break}if(-1<g)break}if(!l)return console.warn("No dynamic style sheet has been created from which to remove a rule."),!1;if(-1===g)return console.warn("The css rule was not found and could not be removed."),!1;l._indicies.splice(g,1);r("ie")?l.removeRule(g):l.sheet&&
l.sheet.deleteRule(g);return!0};h.modifyCssRule=function(d,a,f){};h.getStyleSheet=function(d){if(c[d||"default"])return c[d||"default"];if(!d)return!1;var a=h.getStyleSheets();if(a[d])return h.getStyleSheets()[d];for(var f in a)if(a[f].href&&-1<a[f].href.indexOf(d))return a[f];return!1};h.getDynamicStyleSheet=function(d){d||(d="default");c[d]||(C.doc.createStyleSheet?(c[d]=C.doc.createStyleSheet(),9>r("ie")&&(c[d].title=d)):(c[d]=C.doc.createElement("style"),c[d].setAttribute("type","text/css"),C.doc.getElementsByTagName("head")[0].appendChild(c[d]),
console.log(d," ss created: ",c[d].sheet)),c[d]._indicies=[]);return c[d]};h.enableStyleSheet=function(d){if(d=h.getStyleSheet(d))d.sheet?d.sheet.disabled=!1:d.disabled=!1};h.disableStyleSheet=function(d){if(d=h.getStyleSheet(d))d.sheet?d.sheet.disabled=!0:d.disabled=!0};h.activeStyleSheet=function(d){var a=h.getToggledStyleSheets(),f;if(1===arguments.length)z.forEach(a,function(g){g.disabled=g.title===d?!1:!0});else for(f=0;f<a.length;f++)if(!1===a[f].disabled)return a[f];return!0};h.getPreferredStyleSheet=
function(){};h.getToggledStyleSheets=function(){var d;if(!b.length){var a=h.getStyleSheets();for(d in a)a[d].title&&b.push(a[d])}return b};h.getStyleSheets=function(){if(e.collected)return e;z.forEach(C.doc.styleSheets,function(d){var a=d.sheet?d.sheet:d;d=a.title||a.href;if(r("ie"))-1===a.cssText.indexOf("#default#VML")&&(a.href?e[d]=a:a.imports.length?z.forEach(a.imports,function(f){e[f.title||f.href]=f}):e[d]=a);else{e[d]=a;e[d].id=a.ownerNode.id;d=[];try{d=a[a.cssRules?"cssRules":"rules"]}catch(f){console.warn("Reading css rules from stylesheet "+
a.href+" is forbidden due to same-origin policy. See http://www.w3.org/TR/CSP/#cascading-style-sheet-css-parsing",a)}z.forEach(d,function(f){f.href&&(e[f.href]=f.styleSheet,e[f.href].id=a.ownerNode.id)})}});e.collected=!0;return e};return h})},"jimu/dijit/EditorChooseImage":function(){define("dojo dijit dijit/_editor/_Plugin jimu/dijit/ImageChooser dojo/_base/html dojo/_base/lang dojo/i18n dojo/_base/connect dojo/_base/declare".split(" "),function(v,z,C,r,h,c,e){v.experimental("dojox.editor.plugins.ChooseImage");
var b=v.declare("dojox.editor.plugins.ChooseImage",C,{iconClassPrefix:"editorIcon",useDefaultCommand:!1,_initButton:function(){this.createFileInput();this.command="chooseImage";var d=e.getLocalization("dijit._editor","commands");this.button=new z.form.Button({label:d.insertImage,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"UploadImage",tabIndex:"-1",onClick:c.hitch(this,this._chooseImage)});this.button.set("readOnly",!1);this.editor.commands[this.command]="Upload Image";this.inherited("_initButton",
arguments);delete this.command},updateState:function(){var d=this.get("disabled");this.button.set("disabled",this.get("disabled"));!0===d?(h.addClass(this.button,"dijitButtonDisabled"),this.imageChooser.disableChooseImage()):(h.removeClass(this.button,"dijitButtonDisabled"),this.imageChooser.enableChooseImage())},createFileInput:function(){var d=v.create("span",{innerHTML:"."},document.body);this.imageChooser=new r({showSelfImg:!1,cropImage:!1,format:[r.GIF,r.JPEG,r.PNG]},d);this.connect(this.imageChooser,
"onImageChange","insertTempImage")},_chooseImage:function(){h.setStyle(this.imageChooser.domNode,"display","none");this.imageChooser.triggerImgUpload()},onComplete:function(d){d=d[0];var a=v.byId(this.currentImageId,this.editor.document);var f=this.downloadPath?this.downloadPath+d.name:d.file;a.src=f;v.attr(a,"_djrealurl",f);d.width&&(a.width=d.width,a.height=d.height)},insertTempImage:function(d,a){a=a&&a.fileName?'alt\x3d"'+a.fileName+'"':"";this.currentImageId="img_"+(new Date).getTime();this.editor.execCommand("inserthtml",
'\x3cimg id\x3d"'+this.currentImageId+'" src\x3d"'+d+'" '+a+"/\x3e")},destroy:function(){this.imageChooser&&this.imageChooser.destroy();this.inherited(arguments)}});v.subscribe(z._scopeName+".Editor.getPlugin",null,function(d){if(!d.plugin)switch(d.args.name){case "chooseImage":d.plugin=new b({url:d.args.url})}});C.registry.chooseImage=function(d){return new b(d)};return b})},"jimu/dijit/EditorTextColor":function(){define("require dojo dijit dojo/_base/declare dijit/_editor/_Plugin dijit/form/DropDownButton".split(" "),
function(v,z,C,r,h,c){z.experimental("dijit.editor.plugins.EditorTextColor");var e=r("dijit.editor.plugins.EditorTextColor",h,{buttonClass:c,colorPicker:"jimu/dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command="editorTextColor";this.hackCommand="foreColor";this.inherited(arguments);var b="",d=!1;this.params.custom&&(this.params.custom.recordUID&&(b=this.params.custom.recordUID),this.params.custom.forceAttr&&(d=this.params.custom.forceAttr));var a=this;this.button.set("iconClass",
this.iconClassPrefix+" "+this.iconClassPrefix+"ForeColor");this.button.set("title",this.getLabel(this.hackCommand));this.button.loadDropDown=function(f){function g(p){a.button.dropDown=new p({dir:a.editor.dir,ownerDocument:a.editor.ownerDocument,value:a.value,appearance:{showTransparent:!1,showColorPalette:!0,showCoustom:!0,showColorPickerApply:!1,showCoustomRecord:!0},recordUID:b,onChange:function(A){a.editor.execCommand("useCSS",d);a.editor.execCommand("styleWithCSS",!d);a.editor.execCommand(a.hackCommand,
A)},onClose:function(){a.button.closeDropDown()}});f()}"string"===typeof a.colorPicker?v([a.colorPicker],g):g(a.colorPicker)}},updateState:function(){var b=this.editor,d=this.hackCommand;if(b&&b.isLoaded&&d.length){if(this.button){var a=this.get("disabled");this.button.set("disabled",a);if(a)return;try{var f=b.queryCommandValue(d)||""}catch(g){f=""}}""===f?f="#000000":"transparent"===f&&(f="rgba(0, 0, 0, 0)");this.value=f;(b=this.button.dropDown)&&b.getColor&&f!==b.getColor()&&(b.refreshRecords(),
b.setColor(f))}}});z.subscribe(C._scopeName+".Editor.getPlugin",null,function(b){if(!b.plugin)switch(b.args.name){case "editorTextColor":b.plugin=new e}});return e})},"jimu/dijit/EditorBackgroundColor":function(){define("require dojo dijit dojo/_base/declare dijit/_editor/_Plugin dijit/form/DropDownButton".split(" "),function(v,z,C,r,h,c){z.experimental("dijit.editor.plugins.EditorBackgroundColor");var e=r("dijit.editor.plugins.EditorBackgroundColor",h,{buttonClass:c,colorPicker:"jimu/dijit/ColorPalette",
useDefaultCommand:!1,_initButton:function(){this.command="editorBackgroundColor";this.hackCommand="hiliteColor";this.inherited(arguments);var b="";this.params.custom&&this.params.custom.recordUID&&(b=this.params.custom.recordUID);var d=this;this.button.set("iconClass",this.iconClassPrefix+" "+this.iconClassPrefix+"HiliteColor");this.button.set("title",this.getLabel(this.hackCommand));this.button.loadDropDown=function(a){function f(g){d.button.dropDown=new g({dir:d.editor.dir,ownerDocument:d.editor.ownerDocument,
value:d.value,appearance:{showTransparent:!0,showColorPalette:!0,showCoustom:!0,showColorPickerOK:!0,showColorPickerApply:!1,showCoustomRecord:!0},recordUID:b,onChange:function(p){d.editor.execCommand("useCSS",!1);d.editor.execCommand("styleWithCSS",!0);d.editor.execCommand(d.hackCommand,p)},onExecute:function(){d.editor.execCommand(d.hackCommand,this.get("value"))},onClose:function(){d.button.closeDropDown()}});a()}"string"===typeof d.colorPicker?v([d.colorPicker],f):f(d.colorPicker)}},updateState:function(){var b=
this.editor,d=this.hackCommand;if(b&&b.isLoaded&&d.length){if(this.button){var a=this.get("disabled");this.button.set("disabled",a);if(a)return;try{var f=b.queryCommandValue(d)||""}catch(g){f=""}}""===f?f="#000000":"transparent"===f&&(f="rgba(0, 0, 0, 0)");this.value=f;(b=this.button.dropDown)&&b.getColor&&f!==b.getColor()&&(b.refreshRecords(),b.setColor(f))}}});z.subscribe(C._scopeName+".Editor.getPlugin",null,function(b){if(!b.plugin)switch(b.args.name){case "editorBackgroundColor":b.plugin=new e}});
return e})},"widgets/BusinessAnalyst/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/BusinessAnalyst/esriAnalystX/widgets/SelectableTreeGrid/templates/SelectableTreeGrid.html":'\x3cdiv class\x3d"esriMapsAnalystXNonSelectable"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"gridContainer"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"selectionCounter" class\x3d"esriMapsAnalystXSelectableTreeCounter"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/setting/Setting.html":'\x3cdiv\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"reportInfographicTabContainer" style\x3d"width: 100%; height: 520px;"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"homeContentPane" title\x3d"${nls.home}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px;"\x3e\r\n                \x3cdiv class\x3d"editor-container" data-dojo-attach-point\x3d"editorContainer"\x3e\r\n                    \x3cdiv data-dojo-attach-point\x3d"editor"\x3e\x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv style\x3d"margin-top: 15px;"\x3e\r\n                    \x3cdiv style\x3d"float: left;"\x3e${nls.options}\x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"searchTextBoxOption"\r\n                            data-dojo-attach-point\x3d"searchTextBoxOption"\x3e\r\n                        \x3clabel for\x3d"searchTextBoxOption"\x3e${nls.searchTextBox}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"dropPinOption"\r\n                            data-dojo-attach-point\x3d"dropPinOption"\x3e\r\n                        \x3clabel for\x3d"dropPinOption"\x3e${nls.dropPin}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"drawPolygonOption"\r\n                            data-dojo-attach-point\x3d"drawPolygonOption"\x3e\r\n                        \x3clabel for\x3d"drawPolygonOption"\x3e${nls.drawPolygon}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"drawFreehandPolygonOption"\r\n                            data-dojo-attach-point\x3d"drawFreehandPolygonOption"\x3e\r\n                        \x3clabel for\x3d"drawFreehandPolygonOption"\x3e${nls.drawFreehandPolygon}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"infographicsContentPane" title\x3d"${nls.infographics}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px; margin-left: 15px;"\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"disabledInfographicsOption"\r\n                        data-dojo-attach-point\x3d"disabledInfographicsOption"\x3e\r\n                    \x3clabel for\x3d"disabledInfographicsOption"\x3e${nls.disable}\x3c/label\x3e\r\n                \x3c/div\x3e\r\n                \x3cbr\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cdiv style\x3d"float: left;"\x3e${nls.exportOptions}\x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"exportPrintOption"\r\n                            data-dojo-attach-point\x3d"exportPrintOption"\x3e\r\n                        \x3clabel for\x3d"exportPrintOption"\x3e${nls.print}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"exportImageOption"\r\n                            data-dojo-attach-point\x3d"exportImageOption"\x3e\r\n                        \x3clabel for\x3d"exportImageOption"\x3e${nls.image}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"exportPDFOption"\r\n                            data-dojo-attach-point\x3d"exportPDFOption"\x3e\r\n                        \x3clabel for\x3d"exportPDFOption"\x3e${nls.pdf}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv style\x3d"float: left; margin-left: 15px;"\x3e\r\n                        \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"exportDynamicHTMLOption"\r\n                            data-dojo-attach-point\x3d"exportDynamicHTMLOption"\x3e\r\n                        \x3clabel for\x3d"exportDynamicHTMLOption"\x3e${nls.dynamicHTML}\x3c/label\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                \x3cspan style\x3d"float: left; margin-top: 3px;"\x3e${nls.selectCountryOrRegion}\x3c/span\x3e\r\n                \x3cdiv style\x3d"float:left; margin-left: 5px;" data-dojo-attach-point\x3d"countryDropDownContainerInfographics"\x3e\x3c/div\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                \x3cdiv style\x3d"height: 40px;" data-dojo-attach-point\x3d"infographicTreeGridContainer"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"reportsContentPane" title\x3d"${nls.reports}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px; margin-left: 15px;"\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"disabledReportsOption"\r\n                        data-dojo-attach-point\x3d"disabledReportsOption"\x3e\r\n                    \x3clabel for\x3d"disabledReportsOption"\x3e${nls.disable}\x3c/label\x3e\r\n                \x3c/div\x3e\r\n                \x3cbr\x3e\r\n                \x3cspan style\x3d"float: left; margin-top: 3px;"\x3e${nls.selectCountryOrRegion}\x3c/span\x3e\r\n                \x3cdiv style\x3d"float:left; margin-left: 5px;" data-dojo-attach-point\x3d"countryDropDownContainerReports"\x3e\x3c/div\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                \x3cdiv style\x3d"height: 40px;" data-dojo-attach-point\x3d"reportTreeGridContainer"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"ringsContentPane" title\x3d"${nls.rings}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px; margin-left: 15px;"\x3e\r\n                \x3cspan\x3e${nls.defaultValues}\x3c/span\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                ${nls.radius}\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 1"\r\n                    data-dojo-attach-point\x3d"ringsBufferRadii1"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 3"\r\n                    data-dojo-attach-point\x3d"ringsBufferRadii2"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 5"\r\n                    data-dojo-attach-point\x3d"ringsBufferRadii3"\x3e\x3c/div\x3e\r\n                \x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"ringsBufferUnits"\x3e\r\n                    \x3coption value\x3d"esriMiles" selected\x3d"selected"\x3e${nls.miles}\x3c/option\x3e\r\n                    \x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n                \x3c/select\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"ringValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n                \x3cbr /\x3e\r\n                \x3cbr /\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"disabledRingsOption"\r\n                        data-dojo-attach-point\x3d"disabledRingsOption"\x3e\r\n                    \x3clabel for\x3d"disabledRingsOption"\x3e${nls.disable}\x3c/label\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"driveTimeContentPane" title\x3d"${nls.driveTime}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px; margin-left: 15px;"\x3e\r\n                \x3cspan\x3e${nls.defaultValues}\x3c/span\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                ${nls.time}\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 5"\r\n                    data-dojo-attach-point\x3d"driveTimeBufferRadii1"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 10"\r\n                    data-dojo-attach-point\x3d"driveTimeBufferRadii2"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 15"\r\n                    data-dojo-attach-point\x3d"driveTimeBufferRadii3"\x3e\x3c/div\x3e\r\n                \x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"driveTimeBufferUnits"\x3e\r\n                    \x3coption value\x3d"Minutes" selected\x3d"selected"\x3e${nls.minutes}\x3c/option\x3e\r\n                    \x3coption value\x3d"esriMiles"\x3e${nls.miles}\x3c/option\x3e\r\n                    \x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n                \x3c/select\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"driveTimeValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n                \x3cbr /\x3e\r\n                \x3cbr /\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" data-dojo-attach-point\x3d"disabledDriveTimeOption"\r\n                        id\x3d"disabledDriveTimeOption"\x3e\r\n                    \x3clabel for\x3d"disabledDriveTimeOption"\x3e${nls.disable}\x3c/label\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"walkTimeContentPane" title\x3d"${nls.walkTime}"\x3e\r\n            \x3cdiv style\x3d"margin-top: 15px; margin-left: 15px;"\x3e\r\n                \x3cspan\x3e${nls.defaultValues}\x3c/span\x3e\r\n                \x3cbr\x3e\r\n                \x3cbr\x3e\r\n                ${nls.time}\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 5"\r\n                    data-dojo-attach-point\x3d"walkTimeBufferRadii1"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 10"\r\n                    data-dojo-attach-point\x3d"walkTimeBufferRadii2"\x3e\x3c/div\x3e\r\n                \x3cdiv data-dojo-type\x3d"dijit/form/TextBox" style\x3d"width: 50px;" data-dojo-props\x3d"value: 15"\r\n                    data-dojo-attach-point\x3d"walkTimeBufferRadii3"\x3e\x3c/div\x3e\r\n                \x3cselect data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"walkTimeBufferUnits"\x3e\r\n                    \x3coption value\x3d"Minutes" selected\x3d"selected"\x3e${nls.minutes}\x3c/option\x3e\r\n                    \x3coption value\x3d"esriMiles"\x3e${nls.miles}\x3c/option\x3e\r\n                    \x3coption value\x3d"esriKilometers"\x3e${nls.km}\x3c/option\x3e\r\n                \x3c/select\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"walkTimeValidationErrorMessage" class\x3d"validationErrorMessage hidden"\x3e\x3c/div\x3e\r\n                \x3cbr /\x3e\r\n                \x3cbr /\x3e\r\n                \x3cdiv style\x3d"margin-top: 10px"\x3e\r\n                    \x3cinput data-dojo-type\x3d"dijit/form/CheckBox" id\x3d"disabledWalkTimeOption"\r\n                        data-dojo-attach-point\x3d"disabledWalkTimeOption"\x3e\r\n                    \x3clabel for\x3d"disabledWalkTimeOption"\x3e${nls.disable}\x3c/label\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BusinessAnalyst/setting/css/style.css":'.widget-setting-page .esriMapsAnalystXSelectableTreeGrid.dgrid {position: absolute; top: 33px; right: 0; left: -8px; bottom: 0; height: auto; width: auto;}.jimu-widget-business-analyst-setting .tabs {font-family: "Avenir Light"; color: #000000; height: 100%;} .jimu-widget-business-analyst-setting .tabs .tab-description {margin: 10px 0;} .jimu-widget-business-analyst-setting .jimu-tab\x3e.control\x3e.tab{background-color: #fff; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #dedede; color:#898989; font-family: "Avenir Medium"; font-size: 14px;} .jimu-widget-business-analyst-setting .jimu-tab\x3e.control\x3e.tab.jimu-state-selected {border-bottom: 3px solid #24b5cc; font-family: "Avenir Heavy"; color: #000000;} .jimu-widget-business-analyst-setting .tabs .titles {font-weight: bold; font-family: "Avenir Medium"; font-size: 14px; margin: 20px 0 10px 0;} .jimu-widget-business-analyst-setting .tabs .hide{display: none;} .jimu-widget-business-analyst-setting .tabs .indent{margin-left: 20px; margin-top: 10px;} .jimu-widget-business-analyst-setting .tabs .unit-item{margin: 15px 5px 5px 5px; line-height: 18px; height: 18px; vertical-align: middle;} .jimu-widget-business-analyst-setting .tabs .clearFix {*overflow: hidden; *zoom: 1;} .jimu-widget-business-analyst-setting .tabs .clearFix:after {display: table; content: ""; width: 0; clear: both;} .jimu-widget-business-analyst-setting .tabs .view{height: 100%; overflow-y: auto;} .jimu-widget-business-analyst-setting .tabs .jimu-tab\x3e.jimu-viewstack{padding-bottom: 30px;} .jimu-widget-business-analyst-setting .validationErrorMessage {color: #FF0000; margin-top: 10px;} .jimu-widget-business-analyst-setting .validationErrorMessage.hidden {display: none;} .jimu-widget-business-analyst-setting .invalidValue {outline: 3px solid #FF0000;} .jimu-widget-business-analyst-setting .makeDefaultLink {cursor: pointer!important; color: #0079c1;} .jimu-widget-business-analyst-setting .makeDefaultLink:hover {text-decoration: underline; text-decoration-color: #0079c1;} .jimu-widget-business-analyst-setting .esriMapsAnalystXSelectableTreeLabel.default {color: #0079c1;} .jimu-widget-business-analyst-setting .editor-container {height: 325px;} .jimu-widget-business-analyst-setting .dijitEditorIFrameContainer {height: 262px;}',
"*now":function(v){v(['dojo/i18n!*preload*widgets/BusinessAnalyst/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/array dojo/_base/declare dojo/_base/html dojo/dom-class dojo/dom-construct dojo/dom-style dojo/mouse dojo/on dojo/query dojo/sniff jimu/BaseWidgetSetting jimu/utils dijit/_WidgetsInTemplateMixin dijit/Editor esri/dijit/geoenrichment/SelectableTree ../esriAnalystX/widgets/SelectableTreeGrid/SelectableTreeGrid ../utils/GEUtil ../utils/ReportUtil ../utils/ValidationUtil jimu/dijit/formSelect jimu/dijit/TabContainer jimu/dijit/EditorXssFilter dojo/NodeList-manipulate dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/ViewSource dijit/_editor/plugins/FontChoice dojox/editor/plugins/Preview dijit/_editor/plugins/TextColor dojox/editor/plugins/ToolbarLineBreak dijit/ToolbarSeparator dojox/editor/plugins/FindReplace dojox/editor/plugins/PasteFromWord dojox/editor/plugins/InsertAnchor dojox/editor/plugins/Blockquote dojox/editor/plugins/UploadImage jimu/dijit/EditorChooseImage jimu/dijit/EditorTextColor jimu/dijit/EditorBackgroundColor dijit/form/CheckBox dijit/layout/ContentPane".split(" "),function(v,
z,C,r,h,c,e,b,d,a,f,g,p,A,l,k,t,F,I,B,G,J){return z([f,p],{baseClass:"jimu-widget-business-analyst-setting",selectedCountryID:"",currentDefaultInfographicID:"",currentDefaultInfographicDiv:null,currentDefaultReportID:"",currentDefaultReportDiv:null,postCreate:function(){this.inherited(arguments);this.tab=new G({tabs:[{title:this.nls.home,content:this.homeContentPane},{title:this.nls.infographics,content:this.infographicsContentPane},{title:this.nls.reports,content:this.reportsContentPane},{title:this.nls.rings,
content:this.ringsContentPane},{title:this.nls.driveTime,content:this.driveTimeContentPane},{title:this.nls.walkTime,content:this.walkTimeContentPane}],selected:this.nls.home});this.tab.placeAt(this.reportInfographicTabContainer);this.tab.startup();this.editorXssFilter=J.getInstance()},startup:function(){this._started||(this.inherited(arguments),this.initEditor(),this.setConfig(this.config))},initEditor:function(){var E=document.getElementsByTagName("head")[0],y=window.apiUrl+"dojox/editor/plugins/resources/css/TextColor.css";
d('link[href\x3d"'+y+'"]',E)[0]||g.loadStyleLink("editor_plugins_resources_TextColor",y);y=window.apiUrl+"dojox/editor/plugins/resources/editorPlugins.css";d('link[href\x3d"'+y+'"]',E)[0]||g.loadStyleLink("editor_plugins_resources_editorPlugins",y);y=window.apiUrl+"dojox/editor/plugins/resources/css/PasteFromWord.css";d('link[href\x3d"'+y+'"]',E)[0]||g.loadStyleLink("editor_plugins_resources_PasteFromWord",y);this.editor=new A({plugins:["bold","italic","underline",g.getEditorTextColor("about"),g.getEditorBackgroundColor("about"),
"|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent"],extraPlugins:["|","createLink","unlink","pastefromword","|","undo","redo","|","chooseImage","|","viewsource","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.editor);C.setStyle(this.editor.domNode,
{width:"100%",height:"100%"});this.editor.startup();8!==a("ie")&&this.editor.resize({w:"100%",h:"100%"})},setConfig:function(E){var y=this;this.initializeNewConfigValues(E);t.getAvailableCountries().then(function(x){var w=[];v.forEach(x.countries,function(n){w.push({label:n.name,value:n.id,selected:n.id==y.config.defaultCountryID?"selected":""})});y.countryDropDownInfographics=(new B({options:w})).placeAt(y.countryDropDownContainerInfographics);y.countryDropDownInfographics.startup();y.selectedCountryID=
y.countryDropDownInfographics.get("value");b(y.countryDropDownInfographics,"change",function(){y._countryChangeInfographics()});y.countryDropDownReports=(new B({options:w})).placeAt(y.countryDropDownContainerReports);y.countryDropDownReports.startup();y.selectedCountryID=y.countryDropDownReports.get("value");b(y.countryDropDownReports,"change",function(){y._countryChangeReports()});y._loadConfigForCountry(y.selectedCountryID)});this._loadRingDTWTConfig();this._loadInfographicExportOptions();this._loadFirstPageOptions();
E=this.editorXssFilter.sanitize(E.firstPageText||this.nls.defaultFirstPageText);this.editor.set("value",E)},getConfig:function(){if(!this._validateRingDTWT())return!1;this._setConfigForCountry(this.selectedCountryID);this._setRingDTWTConfig();this._setInfographicExportOptions();this._setFirstPageOptions();this.config.defaultCountryID=this.selectedCountryID;this.config.firstPageText=this.editor.get("value");return this.config},_countryChangeInfographics:function(){this.countryDropDownReports.get("value")!=
this.countryDropDownInfographics.get("value")&&(this.countryDropDownReports.set("value",this.countryDropDownInfographics.get("value")),this._countryChange())},_countryChangeReports:function(){this.countryDropDownInfographics.get("value")!=this.countryDropDownReports.get("value")&&(this.countryDropDownInfographics.set("value",this.countryDropDownReports.get("value")),this._countryChange())},_countryChange:function(){this._setConfigForCountry(this.selectedCountryID);this.selectedCountryID=this.countryDropDownInfographics.get("value");
this._loadConfigForCountry(this.selectedCountryID)},_setConfigForCountry:function(E){var y=null;v.forEach(this.config.countryConfig,function(w){w.countryID==E&&(y=w)});y||(y={countryID:E,allowEsriReports:!0,allowAllEsriReports:!0,allowEsriInfographics:!0,allowAllEsriInfographics:!0,allowMyReports:!0,allowMyInfographics:!0,allowSharedReports:!0,allowSharedInfographics:!0,allowAllOrgReports:!0,allowAllOrgInfographics:!0,defaultInfographicID:"",defaultReportID:"",enabledEsriReports:[],enabledOrgReports:[],
enabledEsriInfographics:[],enabledOrgInfographics:[]});y.allowEsriInfographics=0<this.infographicsTreeGrid.tree.data[0].leafCount?0!=this.infographicsTreeGrid.tree.data[0].selectCount:!0;y.allowMyInfographics=0<this.infographicsTreeGrid.tree.data[1].leafCount?0!=this.infographicsTreeGrid.tree.data[1].selectCount:!0;y.allowSharedInfographics=0<this.infographicsTreeGrid.tree.data[2].leafCount?0!=this.infographicsTreeGrid.tree.data[2].selectCount:!0;y.allowAllEsriInfographics=this.infographicsTreeGrid.tree.data[0].leafCount===
this.infographicsTreeGrid.tree.data[0].selectCount;y.allowAllOrgInfographics=this.infographicsTreeGrid.tree.data[1].leafCount===this.infographicsTreeGrid.tree.data[1].selectCount&&this.infographicsTreeGrid.tree.data[2].leafCount===this.infographicsTreeGrid.tree.data[2].selectCount;y.allowAllEsriInfographics||(y.enabledEsriInfographics=this._getEnabledReports(this.infographicsTreeGrid.tree.data[0].children));y.allowAllOrgInfographics||(y.enabledOrgInfographics=this._getEnabledReports(this.infographicsTreeGrid.tree.data[1].children.concat(this.infographicsTreeGrid.tree.data[2].children)));
y.defaultInfographicID=this.currentDefaultInfographicID;y.allowEsriReports=0<this.reportsTreeGrid.tree.data[0].leafCount?0!=this.reportsTreeGrid.tree.data[0].selectCount:!0;y.allowMyReports=0<this.reportsTreeGrid.tree.data[1].leafCount?0!=this.reportsTreeGrid.tree.data[1].selectCount:!0;y.allowSharedReports=0<this.reportsTreeGrid.tree.data[2].leafCount?0!=this.reportsTreeGrid.tree.data[2].selectCount:!0;y.allowAllEsriReports=this.reportsTreeGrid.tree.data[0].leafCount===this.reportsTreeGrid.tree.data[0].selectCount;
y.allowAllOrgReports=this.reportsTreeGrid.tree.data[1].leafCount===this.reportsTreeGrid.tree.data[1].selectCount&&this.reportsTreeGrid.tree.data[2].leafCount===this.reportsTreeGrid.tree.data[2].selectCount;y.allowAllEsriReports||(y.enabledEsriReports=this._getEnabledReports(this.reportsTreeGrid.tree.data[0].children));y.allowAllOrgReports||(y.enabledOrgReports=this._getEnabledReports(this.reportsTreeGrid.tree.data[1].children.concat(this.reportsTreeGrid.tree.data[2].children)));y.defaultReportID=
this.currentDefaultReportID;var x=-1;v.forEach(this.config.countryConfig,function(w,n){w.countryID==E&&(x=n)});-1!=x?this.config.countryConfig[x]=y:this.config.countryConfig.push(y)},_loadConfigForCountry:function(E){var y=this;F.getAvailableInfographicReports(E).then(function(x){v.forEach(x,function(n){v.forEach(n.children,function(q){q.selected=!0})});y.infographicsTreeGrid||(y.infographicsTreeGrid=new k({tree:new l(x),showHeader:!1,_renderLabelNode:function(n,q){var H=h.create("div"),K=h.create("div",
{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(n),style:"float: left"},H);if(1===n.deepness){n.value===y.currentDefaultInfographicID&&(r.add(K,"default"),y.currentDefaultInfographicDiv=K);var m=h.create("span",{class:"esriMapsAnalystXSelectableTreeLabel makeDefaultLink",innerHTML:y.nls.makeDefault,style:"margin-left: 10px; display: none"},H),u=h.create("span",{class:"esriMapsAnalystXSelectableTreeLabel makeDefaultLink",innerHTML:y.nls.removeDefault,style:"margin-left: 10px; display: none"},
H);n.makeDefaultDiv=m;n.unselectDefaultDiv=u;b(m,"click",function(D){D.stopPropagation();y.currentDefaultInfographicDiv&&r.remove(y.currentDefaultInfographicDiv,"default");r.add(K,"default");y.currentDefaultInfographicID=n.value;y.currentDefaultInfographicDiv=K;c.set(m,"display","none");c.set(u,"display","")});b(u,"click",function(D){D.stopPropagation();y.currentDefaultInfographicDiv&&r.remove(y.currentDefaultInfographicDiv,"default");y.currentDefaultInfographicID="";y.currentDefaultInfographicDiv=
null;c.set(u,"display","none");c.set(m,"display","")});b(q,e.enter,function(){n.selected&&(n.value!==y.currentDefaultInfographicID?c.set(m,"display",""):c.set(u,"display",""))});b(q,e.leave,function(){c.set(m,"display","none");c.set(u,"display","none")})}return H}},y.infographicTreeGridContainer));y.own(b(y.infographicsTreeGrid,"SelectionChanged",function(n){n.toggledTreeNode&&0==n.toggledTreeNode.deepness?n.toggledTreeNode.selected||v.forEach(n.toggledTreeNode.children,function(q){q.value===y.currentDefaultInfographicID&&
y.currentDefaultInfographicDiv&&(r.remove(y.currentDefaultInfographicDiv,"default"),y.currentDefaultInfographicID="",y.currentDefaultInfographicDiv=null)}):n.toggledTreeNode&&!n.toggledTreeNode.selected&&n.toggledTreeNode.value===y.currentDefaultInfographicID?y.currentDefaultInfographicDiv&&(r.remove(y.currentDefaultInfographicDiv,"default"),y.currentDefaultInfographicID="",y.currentDefaultInfographicDiv=null,c.set(n.toggledTreeNode.makeDefaultDiv,"display","none"),c.set(n.toggledTreeNode.unselectDefaultDiv,
"display","none")):n.toggledTreeNode&&!n.toggledTreeNode.selected?c.set(n.toggledTreeNode.makeDefaultDiv,"display","none"):n.toggledTreeNode&&n.toggledTreeNode.selected&&c.set(n.toggledTreeNode.makeDefaultDiv,"display","")}));var w=-1;v.forEach(y.config.countryConfig,function(n,q){n.countryID==E&&(w=q)});y.currentDefaultInfographicID="";y.currentDefaultReportID="";-1!=w&&(y.currentDefaultInfographicID=y.config.countryConfig[w].defaultInfographicID,y.currentDefaultReportID=y.config.countryConfig[w].defaultReportID,
y.config.countryConfig[w].allowAllEsriInfographics||v.forEach(x[0].children,function(n){v.some(y.config.countryConfig[w].enabledEsriInfographics,function(q){return n.value===q})||(n.selected=!1)}),y.config.countryConfig[w].allowAllOrgInfographics||v.forEach(x[1].children.concat(x[2].children),function(n){v.some(y.config.countryConfig[w].enabledOrgInfographics,function(q){return n.value===q})||(n.selected=!1)}));y.infographicsTreeGrid.tree.clear();y.infographicsTreeGrid.tree.addNodes(x)});F.getAvailableClassicReports(E).then(function(x){v.forEach(x,
function(n){v.forEach(n.children,function(q){q.selected=!0})});y.reportsTreeGrid||(y.reportsTreeGrid=new k({tree:new l(x),showHeader:!1,_renderLabelNode:function(n,q){var H=h.create("div"),K=h.create("div",{class:"esriMapsAnalystXSelectableTreeLabel TrimWithEllipses",innerHTML:this.getLabel(n),style:"float: left"},H);if(1===n.deepness){n.value===y.currentDefaultReportID&&(r.add(K,"default"),y.currentDefaultReportDiv=K);var m=h.create("span",{class:"esriMapsAnalystXSelectableTreeLabel makeDefaultLink",
innerHTML:y.nls.makeDefault,style:"margin-left: 10px; display: none"},H),u=h.create("span",{class:"esriMapsAnalystXSelectableTreeLabel makeDefaultLink",innerHTML:y.nls.removeDefault,style:"margin-left: 10px; display: none"},H);n.makeDefaultDiv=m;n.unselectDefaultDiv=u;b(m,"click",function(D){D.stopPropagation();y.currentDefaultReportDiv&&r.remove(y.currentDefaultReportDiv,"default");r.add(K,"default");y.currentDefaultReportID=n.value;y.currentDefaultReportDiv=K;c.set(m,"display","none");c.set(u,"display",
"")});b(u,"click",function(D){D.stopPropagation();y.currentDefaultReportDiv&&r.remove(y.currentDefaultReportDiv,"default");y.currentDefaultReportID="";y.currentDefaultReportDiv=null;c.set(u,"display","none");c.set(m,"display","")});b(q,e.enter,function(){n.selected&&(n.value!==y.currentDefaultReportID?c.set(m,"display",""):c.set(u,"display",""))});b(q,e.leave,function(){c.set(m,"display","none");c.set(u,"display","none")})}return H}},y.reportTreeGridContainer));y.own(b(y.reportsTreeGrid,"SelectionChanged",
function(n){n.toggledTreeNode&&0==n.toggledTreeNode.deepness?n.toggledTreeNode.selected||v.forEach(n.toggledTreeNode.children,function(q){q.value===y.currentDefaultReportID&&y.currentDefaultReportDiv&&(r.remove(y.currentDefaultReportDiv,"default"),y.currentDefaultReportID="",y.currentDefaultReportDiv=null)}):n.toggledTreeNode&&!n.toggledTreeNode.selected&&n.toggledTreeNode.value===y.currentDefaultReportID?y.currentDefaultReportDiv&&(r.remove(y.currentDefaultReportDiv,"default"),y.currentDefaultReportID=
"",y.currentDefaultReportDiv=null,c.set(n.toggledTreeNode.makeDefaultDiv,"display","none"),c.set(n.toggledTreeNode.unselectDefaultDiv,"display","none")):n.toggledTreeNode&&!n.toggledTreeNode.selected?c.set(n.toggledTreeNode.makeDefaultDiv,"display","none"):n.toggledTreeNode&&n.toggledTreeNode.selected&&c.set(n.toggledTreeNode.makeDefaultDiv,"display","")}));var w=-1;v.forEach(y.config.countryConfig,function(n,q){n.countryID==E&&(w=q)});-1!=w&&(y.config.countryConfig[w].allowAllEsriReports||v.forEach(x[0].children,
function(n){v.some(y.config.countryConfig[w].enabledEsriReports,function(q){return n.value===q})||(n.selected=!1)}),y.config.countryConfig[w].allowAllOrgReports||v.forEach(x[1].children.concat(x[2].children),function(n){v.some(y.config.countryConfig[w].enabledOrgReports,function(q){return n.value===q})||(n.selected=!1)}));y.reportsTreeGrid.tree.clear();y.reportsTreeGrid.tree.addNodes(x)})},_getClassicReportId:function(E){return E.value&&E.value.itemid?E.value.itemid:E.value},_getEnabledReports:function(E){var y=
[];v.forEach(E,function(x){x.selected&&(x.value&&x.value.itemid?y.push(x.value.itemid):y.push(x.value))});return y},_setRingDTWTConfig:function(){this.config.ringDefaults=this._getRadii(this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3);this.config.driveTimeDefaults=this._getRadii(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3);this.config.walkTimeDefaults=this._getRadii(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3);
this.config.ringUnitDefault=this.ringsBufferUnits.get("value");this.config.driveTimeUnitDefault=this.driveTimeBufferUnits.get("value");this.config.walkTimeUnitDefault=this.walkTimeBufferUnits.get("value");this.config.ringDisabled=this.disabledRingsOption.checked;this.config.driveTimeDisabled=this.disabledDriveTimeOption.checked;this.config.walkTimeDisabled=this.disabledWalkTimeOption.checked;this.config.infographicsDisabled=this.disabledInfographicsOption.checked;this.config.reportsDisabled=this.disabledReportsOption.checked},
_loadRingDTWTConfig:function(){this._setRadii(this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3,this.config.ringDefaults);this.ringsBufferUnits.set("value",this.config.ringUnitDefault);this.disabledRingsOption.setChecked(this.config.ringDisabled);this._setRadii(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3,this.config.driveTimeDefaults);this.driveTimeBufferUnits.set("value",this.config.driveTimeUnitDefault);this.disabledDriveTimeOption.setChecked(this.config.driveTimeDisabled);
this._setRadii(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3,this.config.walkTimeDefaults);this.walkTimeBufferUnits.set("value",this.config.walkTimeUnitDefault);this.disabledWalkTimeOption.setChecked(this.config.walkTimeDisabled);this.disabledInfographicsOption.setChecked(this.config.infographicsDisabled);this.disabledReportsOption.setChecked(this.config.reportsDisabled)},_setInfographicExportOptions:function(){this.config.exportInfographicsPrintOption=this.exportPrintOption.checked;
this.config.exportInfographicsImageOption=this.exportImageOption.checked;this.config.exportInfographicsPDFOption=this.exportPDFOption.checked;this.config.exportInfographicsDynamicHTMLOption=this.exportDynamicHTMLOption.checked},_loadInfographicExportOptions:function(){this.exportPrintOption.setChecked(this.config.exportInfographicsPrintOption);this.exportImageOption.setChecked(this.config.exportInfographicsImageOption);this.exportPDFOption.setChecked(this.config.exportInfographicsPDFOption);this.exportDynamicHTMLOption.setChecked(this.config.exportInfographicsDynamicHTMLOption)},
_setFirstPageOptions:function(){this.config.searchTextBoxOption=this.searchTextBoxOption.checked;this.config.dropPinOption=this.dropPinOption.checked;this.config.drawPolygonOption=this.drawPolygonOption.checked;this.config.drawFreehandPolygonOption=this.drawFreehandPolygonOption.checked},_loadFirstPageOptions:function(){this.searchTextBoxOption.setChecked(this.config.searchTextBoxOption);this.dropPinOption.setChecked(this.config.dropPinOption);this.drawPolygonOption.setChecked(this.config.drawPolygonOption);
this.drawFreehandPolygonOption.setChecked(this.config.drawFreehandPolygonOption)},_getRadii:function(E,y,x){E=E.get("value");y=y.get("value");x=x.get("value");var w=[];""!=E&&w.push(E);""!=y&&w.push(y);""!=x&&w.push(x);return w},_setRadii:function(E,y,x,w){0<w.length?E.set("value",w[0]):E.set("value","");1<w.length?y.set("value",w[1]):y.set("value","");2<w.length?x.set("value",w[2]):x.set("value","")},_validateRingDTWT:function(){var E=!0,y=!0,x=!1;y=E=I.validateInvalidValues(this.ringsBufferRadii1,
this.ringsBufferRadii2,this.ringsBufferRadii3,this.ringValidationErrorMessage,this.nls.thisEntryIsNotValid);E||(this.tab.selectTab(this.nls.rings),x=!0);E=I.validateInvalidValues(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3,this.driveTimeValidationErrorMessage,this.nls.thisEntryIsNotValid);y=y&&E;E||x||(this.tab.selectTab(this.nls.driveTime),x=!0);E=I.validateInvalidValues(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3,this.walkTimeValidationErrorMessage,
this.nls.thisEntryIsNotValid);y=y&&E;E||x||(this.tab.selectTab(this.nls.walkTime),x=!0);if(!y)return y;tabChange=!1;y=E=I.validateMinMaxValues(this.ringsBufferRadii1,this.ringsBufferRadii2,this.ringsBufferRadii3,I.MIN_RINGS_VALUE,I.MAX_RINGS_VALUE,this.ringValidationErrorMessage,this.nls.invalidValueRing);E||(this.tab.selectTab(this.nls.rings),x=!0);E=I.validateMinMaxValues(this.driveTimeBufferRadii1,this.driveTimeBufferRadii2,this.driveTimeBufferRadii3,I.MIN_DTWT_VALUE,I.MAX_DTWT_VALUE,this.driveTimeValidationErrorMessage,
this.nls.invalidValueDTWT);y=y&&E;E||x||(this.tab.selectTab(this.nls.driveTime),x=!0);E=I.validateMinMaxValues(this.walkTimeBufferRadii1,this.walkTimeBufferRadii2,this.walkTimeBufferRadii3,I.MIN_DTWT_VALUE,I.MAX_DTWT_VALUE,this.walkTimeValidationErrorMessage,this.nls.invalidValueDTWT);y=y&&E;E||x||(this.tab.selectTab(this.nls.walkTime),x=!0);return y},initializeNewConfigValues:function(E){"undefined"===typeof E.exportInfographicsPrintOption&&(E.exportInfographicsPrintOption=!0);"undefined"===typeof E.exportInfographicsImageOption&&
(E.exportInfographicsImageOption=!0);"undefined"===typeof E.exportInfographicsPDFOption&&(E.exportInfographicsPDFOption=!0);"undefined"===typeof E.exportInfographicsDynamicHTMLOption&&(E.exportInfographicsDynamicHTMLOption=!0);"undefined"===typeof E.firstPageText&&(E.firstPageText=this.nls.defaultFirstPageText);"undefined"===typeof E.searchTextBoxOption&&(E.searchTextBoxOption=!0);"undefined"===typeof E.dropPinOption&&(E.dropPinOption=!0);"undefined"===typeof E.drawPolygonOption&&(E.drawPolygonOption=
!0);"undefined"===typeof E.drawFreehandPolygonOption&&(E.drawFreehandPolygonOption=!0)}})});