// 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,x,L,H,B,b,
c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R,I){function P(u){return new l({command:u.name})}function w(u){return new l({buttonClass:K,command:u.name})}L=L("dijit.Editor",R,{plugins:null,extraPlugins:null,constructor:function(){n.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",t]);this._plugins=[];this._editInterval=
1E3*this.editActionInterval;if(h("ie")||h("trident")||h("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new H;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);n.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=B.getLocalization("dijit._editor","commands",this.lang);
h("webkit")&&e.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new a({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));x.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);c.add(this.iframe.parentNode,"dijitEditorIFrameContainer");c.add(this.iframe,"dijitEditorIFrame");b.set(this.iframe,"allowTransparency",!0);this.toolbar.startup();
this.onNormalizedDisplayChanged()},destroy:function(){x.forEach(this._plugins,function(u){u&&u.destroy&&u.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(u,Q){var S=n.isString(u)?{name:u}:n.isFunction(u)?{ctor:u}:u;if(!S.setEditor){var g={args:S,plugin:null,editor:this};S.name&&(l.registry[S.name]?g.plugin=l.registry[S.name](S):A.publish(I._scopeName+".Editor.getPlugin",g));if(!g.plugin)try{var q=S.ctor||n.getObject(S.name)||
v(S.name);q&&(g.plugin=new q(S))}catch(E){throw Error(this.id+": cannot find plugin ["+S.name+"]");}if(!g.plugin)throw Error(this.id+": cannot find plugin ["+S.name+"]");u=g.plugin}1<arguments.length?this._plugins[Q]=u:this._plugins.push(u);u.setEditor(this);n.isFunction(u.setToolbar)&&u.setToolbar(this.toolbar)},resize:function(u){u&&z.prototype.resize.apply(this,arguments)},layout:function(){var u=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+d.getPadBorderExtents(this.iframe.parentNode).h+
d.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=u+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(u){var Q,S=this.document.body,g=S.clientWidth,q=S.clientHeight,E=S.clientLeft,N=S.offsetWidth,m=S.offsetHeight,C=S.offsetLeft;/^rtl$/i.test(S.dir||"")?g<N&&u.x>g&&u.x<N&&(Q=!0):u.x<E&&u.x>C&&(Q=!0);Q||q<m&&u.y>q&&u.y<m&&(Q=!0);Q||(delete this._cursorToStart,delete this._savedSelection,"BODY"==u.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(u){this.customUndo&&this.endEditing(!0);"BODY"!=u.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(u){this._inEditing||(this._inEditing=!0,this._beginEditing(u));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(u){if(!this.customUndo||
"undo"!=u&&"redo"!=u){this.customUndo&&(this.endEditing(),this._beginEditing());var Q=this.inherited(arguments);this.customUndo&&this._endEditing();return Q}return this[u]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(u){try{var Q=this.document.execCommand(u,!1,null);if(h("webkit")&&!Q)throw{};}catch(S){Q=p.substitute,alert(Q(this.commands.systemShortcut,
[this.commands[u],Q(this.commands[h("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[u]])])),Q=!1}return Q},queryCommandEnabled:function(u){return!this.customUndo||"undo"!=u&&"redo"!=u?this.inherited(arguments):"undo"==u?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(u){var Q=u.mark,S=u.mark;u=u.isCollapsed;var g;if(S)if(9>h("ie")||9===h("ie")&&h("quirks"))if(n.isArray(S))Q=[],x.forEach(S,function(N){Q.push(J.getNode(N,this.editNode))},this),this.selection.moveToBookmark({mark:Q,
isCollapsed:u});else{if(S.startContainer&&S.endContainer&&(g=J.getSelection(this.window))&&g.removeAllRanges){g.removeAllRanges();u=J.create(this.window);var q=J.getNode(S.startContainer,this.editNode);var E=J.getNode(S.endContainer,this.editNode);q&&E&&(u.setStart(q,S.startOffset),u.setEnd(E,S.endOffset),g.addRange(u))}}else(g=J.getSelection(this.window))&&g.removeAllRanges&&(g.removeAllRanges(),u=J.create(this.window),q=J.getNode(S.startContainer,this.editNode),E=J.getNode(S.endContainer,this.editNode),
q&&E&&(u.setStart(q,S.startOffset),u.setEnd(E,S.endOffset),g.addRange(u)))},_changeToStep:function(u,Q){this.setValue(Q.text);(u=Q.bookmark)&&this._moveToBookmark(u)},undo:function(){var u=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var Q=this._steps.pop();Q&&0<this._steps.length&&(this.focus(),this._changeToStep(Q,this._steps[this._steps.length-1]),this._undoedSteps.push(Q),this.onDisplayChanged(),delete this._undoRedoActive,u=!0);delete this._undoRedoActive}return u},
redo:function(){var u=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var Q=this._undoedSteps.pop();Q&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],Q),this._steps.push(Q),this.onDisplayChanged(),u=!0);delete this._undoRedoActive}return u},endEditing:function(u){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(u),this._inEditing=!1)},_getBookmark:function(){var u=this.selection.getBookmark(),
Q=[];if(u&&u.mark){var S=u.mark;if(9>h("ie")||9===h("ie")&&h("quirks")){var g=J.getSelection(this.window);if(n.isArray(S))x.forEach(u.mark,function(E){Q.push(J.getIndex(E,this.editNode).o)},this),u.mark=Q;else if(g){var q;g.rangeCount&&(q=g.getRangeAt(0));u.mark=q?q.cloneRange():this.selection.getBookmark()}}try{u.mark&&u.mark.startContainer&&(Q=J.getIndex(u.mark.startContainer,this.editNode).o,u.mark={startContainer:Q,startOffset:u.mark.startOffset,endContainer:u.mark.endContainer===u.mark.startContainer?
Q:J.getIndex(u.mark.endContainer,this.editNode).o,endOffset:u.mark.endOffset})}catch(E){u.mark=null}}return u},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:F.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var u=F.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:u,bookmark:this._getBookmark()})},onKeyDown:function(u){h("ie")||this.iframe||u.keyCode!=f.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var Q=
u.keyCode;if(u.ctrlKey&&!u.shiftKey&&!u.altKey){if(90==Q||122==Q){u.stopPropagation();u.preventDefault();this.undo();return}if(89==Q||121==Q){u.stopPropagation();u.preventDefault();this.redo();return}}this.inherited(arguments);switch(Q){case f.ENTER:case f.BACKSPACE:case f.DELETE:this.beginEditing();break;case 88:case 86:if(u.ctrlKey&&!u.altKey&&!u.metaKey){this.endEditing();88==u.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!u.ctrlKey&&!u.altKey&&
!u.metaKey&&(u.keyCode<f.F1||u.keyCode>f.F15)){this.beginEditing();break}case f.ALT:this.endEditing();break;case f.UP_ARROW:case f.DOWN_ARROW:case f.LEFT_ARROW:case f.RIGHT_ARROW:case f.HOME:case f.END:case f.PAGE_UP:case f.PAGE_DOWN:this.endEditing(!0);case f.CTRL:case f.SHIFT:case f.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(u){}},_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(u){this.customUndo?this.isClosed?this.setValue(u):(this.beginEditing(),u||(u="\x26#160;"),this.setValue(u),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(u){this.setValueDeferred.then(n.hitch(this,function(){!this.disabled&&u||!this._buttonEnabledPlugins&&u?
x.forEach(this._plugins,function(Q){Q.set("disabled",!0)}):this.disabled&&!u&&x.forEach(this._plugins,function(Q){Q.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(e.set(this.document.body,"color",e.get(this.iframe,"color")),e.set(this.document.body,"background-color",e.get(this.iframe,"background-color")))}catch(u){}}});n.mixin(l.registry,{undo:P,redo:P,cut:P,copy:P,paste:P,insertOrderedList:P,insertUnorderedList:P,
indent:P,outdent:P,justifyCenter:P,justifyFull:P,justifyLeft:P,justifyRight:P,"delete":P,selectAll:P,removeFormat:P,unlink:P,insertHorizontalRule:P,bold:w,italic:w,underline:w,strikethrough:w,subscript:w,superscript:w,"|":function(){return new l({setEditor:function(u){this.editor=u;this.button=new k({ownerDocument:u.ownerDocument})}})}});return L})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(v,x,L,H,B,b,c,d){L("dijit-legacy-requires")&&B(0,function(){v(["dijit/ToolbarSeparator"])});return x("dijit.Toolbar",[b,d,c],{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,x,L,H){return v("dijit.ToolbarSeparator",[L,H],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);x.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,x,L,H,B){x=x("dijit._editor._Plugin",H,{constructor:function(b){this.params=
b||{};L.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:B,disabled:!1,getLabel:function(b){return this.editor.commands[b]},_initButton:function(){if(this.command.length){var b=this.getLabel(this.command),c=this.editor,d=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(b=L.mixin({label:b,ownerDocument:c.ownerDocument,dir:c.dir,
lang:c.lang,showLabel:!1,iconClass:d,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete b.name,this.button=new this.buttonClass(b))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(b,c,d){this.own(v.connect(b,c,this,d))},updateState:function(){var b=this.editor,c=this.command;if(b&&b.isLoaded&&c.length){var d=this.get("disabled");if(this.button)try{var e=
b._implCommand(c);var f=!d&&(this[e]?this[e](c):b.queryCommandEnabled(c));this.enabled!==f&&(this.enabled=f,this.button.set("disabled",!f));if(f&&"boolean"==typeof this.button.checked){var n=b.queryCommandState(c);this.checked!==n&&(this.checked=n,this.button.set("checked",b.queryCommandState(c)))}}catch(h){console.log(h)}}},setEditor:function(b){this.editor=b;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",L.hitch(this.editor,
"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",L.hitch(this,"updateState")))},setToolbar:function(b){this.button&&b.addChild(this.button)},set:function(b,c){if("object"===typeof b){for(var d in b)this.set(d,b[d]);return this}d=this._getAttrNames(b);if(this[d.s])var e=this[d.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(b,c);return e||this},get:function(b){var c=this._getAttrNames(b);
return this[c.g]?this[c.g]():this[b]},_setDisabledAttr:function(b){this._set("disabled",b);this.updateState()},_getAttrNames:function(b){var c=this._attrPairNames;if(c[b])return c[b];var d=b.charAt(0).toUpperCase()+b.substr(1);return c[b]={s:"_set"+d+"Attr",g:"_get"+d+"Attr"}},_set:function(b,c){this[b]=c}});x.registry={};return x})},"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,x,L,H,B,b,c,d,e,f,n){return v("dijit._editor.plugins.EnterKeyHandling",e,{blockNodeForEnter:"BR",constructor:function(h){h&&("blockNodeForEnter"in h&&(h.blockNodeForEnter=h.blockNodeForEnter.toUpperCase()),H.mixin(this,h))},setEditor:function(h){if(this.editor!==h)if(this.editor=h,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,h.onLoadDeferred.then(H.hitch(this,function(A){this.own(B(h.document,"keydown",H.hitch(this,function(y){if(y.keyCode==L.ENTER){var a=H.mixin({},y);a.shiftKey=
!0;this.handleEnterKey(a)||(y.stopPropagation(),y.preventDefault())}})));9<=b("ie")&&10>=b("ie")&&this.own(B(h.document,"paste",H.hitch(this,function(y){setTimeout(H.hitch(this,function(){var a=this.editor.document.selection.createRange();a.move("character",-1);a.select();a.move("character",1);a.select()}),0)})));return A}));else if(this.blockNodeForEnter){var p=H.hitch(this,"handleEnterKey");h.addKeyHandler(13,0,0,p);h.addKeyHandler(13,0,1,p);this.own(this.editor.on("KeyPressed",H.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var h=this.editor.selection.getAncestorElement("LI");if(h){b("mozilla")&&"LI"==h.parentNode.parentNode.nodeName&&(h=h.parentNode.parentNode);var p=h.firstChild;!p||1!=p.nodeType||"UL"!=p.nodeName&&"OL"!=p.nodeName||(h.insertBefore(p.ownerDocument.createTextNode("\u00a0"),p),p=n.create(this.editor.window),p.setStart(h.firstChild,0),h=n.getSelection(this.editor.window,!0),h.removeAllRanges(),h.addRange(p))}else f.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(h=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(h.innerHTML=this.bogusHtmlContent,9>=b("ie")&&(h=this.editor.document.selection.createRange(),h.move("character",-1),h.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(h){var p,A=this.editor.document,y;if(h.shiftKey){h=this.editor.selection.getParentElement();if(p=n.getAncestor(h,this.blockNodes)){if("LI"==p.tagName)return!0;h=n.getSelection(this.editor.window);var a=h.getRangeAt(0);a.collapsed||(a.deleteContents(),h=n.getSelection(this.editor.window),a=h.getRangeAt(0));if(n.atBeginningOfContainer(p,a.startContainer,a.startOffset)){var k=A.createElement("br");a=n.create(this.editor.window);p.insertBefore(k,
p.firstChild);a.setStartAfter(k);h.removeAllRanges();h.addRange(a)}else if(n.atEndOfContainer(p,a.startContainer,a.startOffset))a=n.create(this.editor.window),k=A.createElement("br"),p.appendChild(k),p.appendChild(A.createTextNode("\u00a0")),a.setStart(p.lastChild,0),h.removeAllRanges(),h.addRange(a);else{if((y=a.startContainer)&&3==y.nodeType){var z=y.nodeValue;var K=A.createTextNode(z.substring(0,a.startOffset));var l=A.createTextNode(z.substring(a.startOffset));p=A.createElement("br");""==l.nodeValue&&
b("webkit")&&(l=A.createTextNode("\u00a0"));x.place(K,y,"after");x.place(p,K,"after");x.place(l,p,"after");x.destroy(y);a=n.create(this.editor.window);a.setStart(l,0);h.removeAllRanges();h.addRange(a);return!1}return!0}}else h=n.getSelection(this.editor.window),h.rangeCount?(a=h.getRangeAt(0))&&a.startContainer&&(a.collapsed||(a.deleteContents(),h=n.getSelection(this.editor.window),a=h.getRangeAt(0)),(y=a.startContainer)&&3==y.nodeType?(p=a.startOffset,y.length<p&&(l=this._adjustNodeAndOffset(y,p),
y=l.node,p=l.offset),z=y.nodeValue,K=A.createTextNode(z.substring(0,p)),l=A.createTextNode(z.substring(p)),p=A.createElement("br"),l.length||(l=A.createTextNode("\u00a0")),K.length?x.place(K,y,"after"):K=y,x.place(p,K,"after"),x.place(l,p,"after"),x.destroy(y)):(0<=a.startOffset&&(k=y.childNodes[a.startOffset]),p=A.createElement("br"),l=A.createTextNode("\u00a0"),k?(x.place(p,k,"before"),x.place(l,p,"after")):(y.appendChild(p),y.appendChild(l))),a=n.create(this.editor.window),a.setStart(l,0),a.setEnd(l,
l.length),h.removeAllRanges(),h.addRange(a),this.editor.selection.collapse(!0)):f.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var t=!0;h=n.getSelection(this.editor.window);a=h.getRangeAt(0);a.collapsed||(a.deleteContents(),h=n.getSelection(this.editor.window),a=h.getRangeAt(0));k=n.getBlockAncestor(a.endContainer,null,this.editor.editNode);var F=k.blockNode;if(this._checkListLater=F&&("LI"==F.nodeName||"LI"==F.parentNode.nodeName))return b("mozilla")&&(this._pressedEnterInBlock=
F),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(F.innerHTML)&&(F.innerHTML="",b("webkit")&&(a=n.create(this.editor.window),a.setStart(F,0),h.removeAllRanges(),h.addRange(a)),this._checkListLater=!1),!0;if(!k.blockNode||k.blockNode===this.editor.editNode){try{f.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(J){}k={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(k.blockNode){if(k.blockNode!=this.editor.editNode&&!(k.blockNode.textContent||k.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(k.blockNode),!1}else k.blockNode=this.editor.editNode;h=n.getSelection(this.editor.window);a=h.getRangeAt(0)}F=A.createElement(this.blockNodeForEnter);F.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(k.blockNode);l=a.endOffset;t=a.endContainer;t.length<l&&(l=this._adjustNodeAndOffset(t,l),t=
l.node,l=l.offset);if(n.atEndOfContainer(k.blockNode,t,l))k.blockNode===k.blockContainer?k.blockNode.appendChild(F):x.place(F,k.blockNode,"after"),t=!1,a=n.create(this.editor.window),a.setStart(F,0),h.removeAllRanges(),h.addRange(a),this.editor.height&&d.scrollIntoView(F);else if(n.atBeginningOfContainer(k.blockNode,a.startContainer,a.startOffset))x.place(F,k.blockNode,k.blockNode===k.blockContainer?"first":"before"),F.nextSibling&&this.editor.height&&(a=n.create(this.editor.window),a.setStart(F.nextSibling,
0),h.removeAllRanges(),h.addRange(a),d.scrollIntoView(F.nextSibling)),t=!1;else{k.blockNode===k.blockContainer?k.blockNode.appendChild(F):x.place(F,k.blockNode,"after");t=!1;k.blockNode.style&&F.style&&k.blockNode.style.cssText&&(F.style.cssText=k.blockNode.style.cssText);if((y=a.startContainer)&&3==y.nodeType){l=a.endOffset;y.length<l&&(l=this._adjustNodeAndOffset(y,l),y=l.node,l=l.offset);z=y.nodeValue;K=A.createTextNode(z.substring(0,l));l=A.createTextNode(z.substring(l,z.length));x.place(K,y,
"before");x.place(l,y,"after");x.destroy(y);for(a=K.parentNode;a!==k.blockNode;){z=A.createElement(a.tagName);a.style&&z.style&&a.style.cssText&&(z.style.cssText=a.style.cssText);"FONT"===a.tagName&&(a.color&&(z.color=a.color),a.face&&(z.face=a.face),a.size&&(z.size=a.size));for(;l;)y=l.nextSibling,z.appendChild(l),l=y;x.place(z,a,"after");K=a;l=z;a=a.parentNode}if(1==l.nodeType||3==l.nodeType&&l.nodeValue)F.innerHTML="";for(K=l;l;)y=l.nextSibling,F.appendChild(l),l=y}a=n.create(this.editor.window);
A=K;if("BR"!==this.blockNodeForEnter){for(;A;)p=A,A=y=A.firstChild;p&&p.parentNode?(F=p.parentNode,a.setStart(F,0),h.removeAllRanges(),h.addRange(a),this.editor.height&&d.scrollIntoView(F),b("mozilla")&&(this._pressedEnterInBlock=k.blockNode)):t=!0}else a.setStart(F,0),h.removeAllRanges(),h.addRange(a),this.editor.height&&d.scrollIntoView(F),b("mozilla")&&(this._pressedEnterInBlock=k.blockNode)}return t},_adjustNodeAndOffset:function(h,p){for(;h.length<p&&h.nextSibling&&3==h.nextSibling.nodeType;)p-=
h.length,h=h.nextSibling;return{node:h,offset:p}},removeTrailingBr:function(h){if(h=/P|DIV|LI/i.test(h.tagName)?h:this.editor.selection.getParentOfType(h,["P","DIV","LI"]))h.lastChild&&(1<h.childNodes.length&&3==h.lastChild.nodeType&&/^[\s\xAD]*$/.test(h.lastChild.nodeValue)||"BR"==h.lastChild.tagName)&&x.destroy(h.lastChild),h.childNodes.length||(h.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,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R,I,P,w,u,Q){var S=L("dijit._editor.RichText",[J,R],{constructor:function(g){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};g&&p.isString(g.value)&&(this.value=g.value);this.onLoadDeferred=new H},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em",
isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[p.trim,p.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);k("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));k("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(k("ie")||k("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);K.publish(Q._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var g=p.hitch(this,function(N,m){return function(){return!this.execCommand(N,m)}}),q={b:g("bold"),i:g("italic"),u:g("underline"),a:g("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:g("formatblock",
"h1"),2:g("formatblock","h2"),3:g("formatblock","h3"),4:g("formatblock","h4"),"\\":g("insertunorderedlist")};k("ie")||(q.Z=g("redo"));for(var E in q)this.addKeyHandler(E,!0,!1,q[E])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(S._editorCommandsLocalized)this._local2NativeFormatNames=S._local2NativeFormatNames,this._native2LocalFormatNames=S._native2LocalFormatNames;else{S._editorCommandsLocalized=!0;S._local2NativeFormatNames={};
S._native2LocalFormatNames={};this._local2NativeFormatNames=S._local2NativeFormatNames;this._native2LocalFormatNames=S._native2LocalFormatNames;for(var g="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),q="",E,N=0;E=g[N++];)q="l"!==E.charAt(1)?q+("\x3c"+E+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+E+"\x3e\x3cbr/\x3e"):q+("\x3c"+E+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+E+"\x3e\x3cbr/\x3e");var m=d.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:q});this.ownerDocumentBody.appendChild(m);
g=p.hitch(this,function(){for(var C=m.firstChild;C;)try{this.selection.selectElement(C.firstChild);var G=C.tagName.toLowerCase();this._local2NativeFormatNames[G]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[G]]=G;C=C.nextSibling.nextSibling}catch(M){}d.destroy(m)});this.defer(g)}},open:function(g){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new H;this.isClosed||this.close();K.publish(Q._scopeName+"._editor.RichText::open",
this);1===arguments.length&&g.nodeName&&(this.domNode=g);var q=this.domNode;if(p.isString(this.value)){var E=this.value;q.innerHTML=""}else if(q.nodeName&&"textarea"==q.nodeName.toLowerCase()){var N=this.textarea=q;this.name=N.name;E=N.value;q=this.domNode=this.ownerDocument.createElement("div");q.setAttribute("widgetId",this.id);N.removeAttribute("widgetId");q.cssText=N.cssText;q.className+=" "+N.className;d.place(q,N,"before");var m=p.hitch(this,function(){f.set(N,{display:"block",position:"absolute",
top:"-1000px"});if(k("ie")){var r=N.style;this.__overflow=r.overflow;r.overflow="hidden"}});k("ie")?this.defer(m,10):m();if(N.form){var C=N.value;this.reset=function(){this.getValue()!==C&&this.replaceValue(C)};A(N.form,"submit",p.hitch(this,function(){b.set(N,"disabled",this.disabled);N.value=this.getValue()}))}}else E=w.getChildrenHtml(q),q.innerHTML="";this.value=E;q.nodeName&&"LI"===q.nodeName&&(q.innerHTML=" \x3cbr\x3e");this.header=q.ownerDocument.createElement("div");q.appendChild(this.header);
this.editingArea=q.ownerDocument.createElement("div");q.appendChild(this.editingArea);this.footer=q.ownerDocument.createElement("div");q.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!x.useXDomain||x.allowXdRichTextSave)){if((E=B.byId(Q._scopeName+"._editor.RichText.value"))&&""!==E.value){m=E.value.split(this._SEPARATOR);for(var G=0,M;M=m[G++];)if(M=M.split(this._NAME_CONTENT_SEP),M[0]===this.name){this.value=M[1];m=m.splice(G,1);E.value=m.join(this._SEPARATOR);
break}}S._globalSaveHandler||(S._globalSaveHandler={},l.addOnUnload(function(){for(var r in S._globalSaveHandler){var D=S._globalSaveHandler[r];p.isFunction(D)&&D()}}));S._globalSaveHandler[this.id]=p.hitch(this,"_saveContent")}this.isClosed=!1;E=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");E.id=this.id+"_iframe";E.style.border="none";E.style.width="100%";this._layoutMode?E.style.height="100%":7<=k("ie")?(this.height&&(E.style.height=this.height),this.minHeight&&(E.style.minHeight=
this.minHeight)):E.style.height=this.height?this.height:this.minHeight;E.frameBorder=0;E._loadFunc=p.hitch(this,function(r){this.window=r;this.document=r.document;this.selection=new I.SelectionManager(r);k("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});m=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");m=11>k("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+m+"');document.close()":"javascript: '"+
m+"'";this.editingArea.appendChild(E);E.src=m;"LI"===q.nodeName&&(q.lastChild.style.marginTop="-1.2em");c.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var g=f.getComputedStyle(this.domNode);if(this["aria-label"])var q=this["aria-label"];else{var E=y('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||B.byId(this["aria-labelledby"],this.ownerDocument);E&&(q=E.textContent||E.innerHTML||"")}E="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(q?" aria-label\x3d'"+z.escape(q)+"'":"")+"\x3e\x3c/div\x3e";var N=[g.fontWeight,g.fontSize,g.fontFamily].join(" "),m=g.lineHeight;m=0<=m.indexOf("px")?parseFloat(m)/parseFloat(g.fontSize):0<=m.indexOf("em")?parseFloat(m):"normal";var C="",G=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(M){M=M.replace(/^;/ig,"")+";";var r=M.split(":")[0];if(r){r=p.trim(r);r=r.toLowerCase();var D,O="";for(D=0;D<r.length;D++){var T=r.charAt(D);switch(T){case "-":D++,T=r.charAt(D).toUpperCase();default:O+=
T}}f.set(G.domNode,O,"")}C+=M+";"});this.iframe.setAttribute("title",q);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||n.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",q?"\x3ctitle\x3e"+z.escape(q)+"\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:",N,";\n",this.height||k("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",m,";\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",k("ie")||k("trident")||k("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",q?" aria-label\x3d'"+z.escape(q)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+C+"'\x3e",E,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var g=[];this.styleSheets&&(g=this.styleSheets.split(";"),this.styleSheets=
"");g=g.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var q="",E=0,N,m=F.get(this.ownerDocument);N=g[E++];)N=(new t(m.location,N)).toString(),this.editingAreaStyleSheets.push(N),q+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+N+'"/\x3e';return q},addStyleSheet:function(g){var q=g.toString(),E=F.get(this.ownerDocument);if("."===q.charAt(0)||"/"!==q.charAt(0)&&!g.host)q=(new t(E.location,q)).toString();-1<v.indexOf(this.editingAreaStyleSheets,q)||(this.editingAreaStyleSheets.push(q),
this.onLoadDeferred.then(p.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(q);else{var N=this.document.getElementsByTagName("head")[0],m=this.document.createElement("link");m.rel="stylesheet";m.type="text/css";m.href=q;N.appendChild(m)}})))},removeStyleSheet:function(g){var q=g.toString(),E=F.get(this.ownerDocument);if("."===q.charAt(0)||"/"!==q.charAt(0)&&!g.host)q=(new t(E.location,q)).toString();g=v.indexOf(this.editingAreaStyleSheets,q);-1!==g&&(delete this.editingAreaStyleSheets[g],
y('link[href\x3d"'+q+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(g){g=!!g;this._set("disabled",g);if(this.isLoaded){var q=k("ie")&&(this.isLoaded||!this.focusOnLoad);q&&(this.editNode.unselectable="on");this.editNode.contentEditable=!g;this.editNode.tabIndex=g?"-1":this.tabIndex;q&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(k("mozilla")&&!g&&this._mozSettingProps){g=this._mozSettingProps;for(var E in g)if(g.hasOwnProperty(E))try{this.document.execCommand(E,
!1,g[E])}catch(N){}}this._disabledOK=!0}},onLoad:function(g){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=u.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var q=this;this.beforeIframeNode=d.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=d.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){q.editNode.focus()};this.focusNode=
this.editNode;var E=this.events.concat(this.captureEvents),N=this.iframe?this.document:this.editNode;this.own.apply(this,v.map(E,function(m){var C=m.toLowerCase().replace(/^on/,"");return A(N,C,p.hitch(this,m))},this));this.own(A(N,"mouseup",p.hitch(this,"onClick")));k("ie")&&(this.own(A(this.document,"mousedown",p.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);k("webkit")&&(this._webkitListener=this.own(A(this.document,"mouseup",p.hitch(this,"onDisplayChanged")))[0],this.own(A(this.document,
"mousedown",p.hitch(this,function(m){m=m.target;!m||m!==this.document.body&&m!==this.document||this.defer("placeCursorAtEnd")}))));if(k("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(m){}this.isLoaded=!0;this.set("disabled",this.disabled);E=p.hitch(this,function(){this.setValue(g);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&a(p.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(E):E()},onKeyDown:function(g){if(g.keyCode===h.SHIFT||g.keyCode===h.ALT||g.keyCode===h.META||g.keyCode===h.CTRL)return!0;g.keyCode===h.TAB&&this.isTabIndent&&(g.stopPropagation(),g.preventDefault(),this.queryCommandEnabled(g.shiftKey?"outdent":"indent")&&this.execCommand(g.shiftKey?"outdent":"indent"));if(g.keyCode==h.TAB&&!this.isTabIndent&&!g.ctrlKey&&!g.altKey)return g.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>k("ie")&&g.keyCode===h.BACKSPACE&&"Control"===this.document.selection.type&&(g.stopPropagation(),g.preventDefault(),this.execCommand("delete"));k("ff")&&(g.keyCode===h.PAGE_UP||g.keyCode===h.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&g.preventDefault();var q=this._keyHandlers[g.keyCode],E=arguments;q&&!g.altKey&&v.some(q,function(N){if(!(N.shift^g.shiftKey||N.ctrl^(g.ctrlKey||g.metaKey)))return N.handler.apply(this,E)||g.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(g){n.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",g)},_setValueAttr:function(g){this.setValue(g)},_setDisableSpellCheckAttr:function(g){this.document?b.set(this.document.body,"spellcheck",!g):this.onLoadDeferred.then(p.hitch(this,function(){b.set(this.document.body,"spellcheck",!g)}));this._set("disableSpellCheck",g)},addKeyHandler:function(g,q,E,N){"string"==
typeof g&&(g=g.toUpperCase().charCodeAt(0));p.isArray(this._keyHandlers[g])||(this._keyHandlers[g]=[]);this._keyHandlers[g].push({shift:E||!1,ctrl:q||!1,handler:N})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(g){this.onDisplayChanged(g)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(g){(k("ie")||k("trident"))&&this.defer(function(){u.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var q=this.getValue(!0);if(q!==this.value)this.onChange(q);
this._set("value",q)},_onFocus:function(g){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!k("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>k("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(g,q){g=g.toLowerCase();"formatblock"===g?k("safari")&&void 0===q&&(g="heading"):"hilitecolor"!==g||k("mozilla")||(g="backcolor");return g},_implCommand:function(g){return"_"+this._normalizeCommand(g)+"EnabledImpl"},_qcaCache:{},
queryCommandAvailable:function(g){var q=this._qcaCache[g];return void 0!==q?q:this._qcaCache[g]=this._queryCommandAvailable(g)},_queryCommandAvailable:function(g){switch(g.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 k("ie")||k("trident")||k("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!k("webkit");default:return!1}},execCommand:function(g,q){this.focused&&this.focus();g=this._normalizeCommand(g,q);if(void 0!==q){if("heading"===g)throw Error("unimplemented");"formatblock"===
g&&(k("ie")||k("trident"))&&(q="\x3c"+q+"\x3e")}var E="_"+g+"Impl";if(this[E])var N=this[E](q);else if((q=1<arguments.length?q:null)||"createlink"!==g)N=this.document.execCommand(g,!1,q);this.onDisplayChanged();return N},queryCommandEnabled:function(g){if(this.disabled||!this._disabledOK)return!1;g=this._normalizeCommand(g);var q=this._implCommand(g);return this[q]?this[q](g):this._browserQueryCommandEnabled(g)},queryCommandState:function(g){if(this.disabled||!this._disabledOK)return!1;g=this._normalizeCommand(g);
try{return this.document.queryCommandState(g)}catch(q){return!1}},queryCommandValue:function(g){if(this.disabled||!this._disabledOK)return!1;g=this._normalizeCommand(g);if(k("ie")&&"formatblock"===g)g=this._native2LocalFormatNames[this.document.queryCommandValue(g)];else if(k("mozilla")&&"hilitecolor"===g){try{var q=this.document.queryCommandValue("styleWithCSS")}catch(E){q=!1}this.document.execCommand("styleWithCSS",!1,!0);g=this.document.queryCommandValue(g);this.document.execCommand("styleWithCSS",
!1,q)}else g=this.document.queryCommandValue(g);return g},_sCall:function(g,q){return this.selection[g].apply(this.selection,q)},placeCursorAtStart:function(){this.focus();var g=!1;if(k("mozilla"))for(var q=this.editNode.firstChild;q;){if(3===q.nodeType){if(0<q.nodeValue.replace(/^\s+|\s+$/g,"").length){g=!0;this.selection.selectElement(q);break}}else if(1===q.nodeType){g=!0;var E=q.tagName?q.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(E)?this.selection.selectElement(q):
this.selection.selectElementChildren(q);break}q=q.nextSibling}else g=!0,this.selection.selectElementChildren(this.editNode);g&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var g=!1;if(k("mozilla"))for(var q=this.editNode.lastChild;q;){if(3===q.nodeType){if(0<q.nodeValue.replace(/^\s+|\s+$/g,"").length){g=!0;this.selection.selectElement(q);break}}else if(1===q.nodeType){g=!0;this.selection.selectElement(q.lastChild||q);break}q=q.previousSibling}else g=!0,this.selection.selectElementChildren(this.editNode);
g&&this.selection.collapse(!1)},getValue:function(g){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,g):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(g){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){g=this._preFilterContent(g);var q=this.isClosed?this.domNode:this.editNode;q.innerHTML=g;this._preDomFilterContent(q)}else this.textarea.value=g;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(p.hitch(this,function(){this.setValue(g)}))},replaceValue:function(g){this.isClosed?this.setValue(g):this.window&&this.window.getSelection&&!k("mozilla")?this.setValue(g):this.window&&this.window.getSelection?(g=this._preFilterContent(g),this.execCommand("selectall"),this.execCommand("inserthtml",g),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(g);this._set("value",this.getValue(!0))},_preFilterContent:function(g){var q=
g;v.forEach(this.contentPreFilters,function(E){E&&(q=E(q))});return q},_preDomFilterContent:function(g){g=g||this.editNode;v.forEach(this.contentDomPreFilters,function(q){q&&p.isFunction(q)&&q(g)},this)},_postFilterContent:function(g,q){if(p.isString(g))var E=g;else g=g||this.editNode,this.contentDomPostFilters.length&&(q&&(g=p.clone(g)),v.forEach(this.contentDomPostFilters,function(N){g=N(g)})),E=w.getChildrenHtml(g);p.trim(E.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(E="");v.forEach(this.contentPostFilters,
function(N){E=N(E)});return E},_saveContent:function(){var g=B.byId(Q._scopeName+"._editor.RichText.value");g&&(g.value&&(g.value+=this._SEPARATOR),g.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(g,q){g=g.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");q||(g=g.replace(/'/gm,"\x26#39;"));return g},getNodeHtml:function(g){n.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return w.getNodeHtml(g)},getNodeChildrenHtml:function(g){n.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return w.getChildrenHtml(g)},close:function(g){if(!this.isClosed){arguments.length||(g=!0);g&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);k("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var q=this.textarea.style;q.position="";q.left=q.top="";k("ie")&&(q.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;d.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;c.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);S._globalSaveHandler&&delete S._globalSaveHandler[this.id]},_removeMozBogus:function(g){return g.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(g){g=g.replace(/\sclass="webkit-block-placeholder"/gi,"");g=g.replace(/\sclass="apple-style-span"/gi,
"");return g=g.replace(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(g){return g.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(g){return g.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(g){if(!g)return!1;
if(k("ie")||k("trident")||k("edge"))return this.focused&&!this.disabled;var q=9>k("ie")?this.document.selection.createRange():this.document;try{return q.queryCommandEnabled(g)}catch(E){return!1}},_createlinkEnabledImpl:function(){var g=!0;return g=k("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var g=!0;return g=k("mozilla")||k("webkit")||k("ie")||k("trident")||k("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var g=!0;return g=k("mozilla")||k("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var g=!0;k("webkit")?((g=this.window.getSelection())&&(g=g.toString()),g=!!g):g=this._browserQueryCommandEnabled("cut");return g},_copyEnabledImpl:function(){var g=!0;k("webkit")?((g=this.window.getSelection())&&(g=g.toString()),g=!!g):g=this._browserQueryCommandEnabled("copy");
return g},_pasteEnabledImpl:function(){var g=!0;return k("webkit")?!0:g=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(g){return k("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,g)},_unlinkImpl:function(g){return this.queryCommandEnabled("unlink")&&(k("mozilla")||k("webkit"))?(g=this.selection.getAncestorElement("a"),this.selection.selectElement(g),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,g)},_hilitecolorImpl:function(g){if(!this._handleTextColorOrProperties("hilitecolor",g))if(k("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var q=this.document.execCommand("hilitecolor",!1,g);this.document.execCommand("styleWithCSS",!1,!1)}else q=this.document.execCommand("hilitecolor",!1,g);return q},_backcolorImpl:function(g){k("ie")&&(g=g?g:null);var q=this._handleTextColorOrProperties("backcolor",g);q||(q=this.document.execCommand("backcolor",
!1,g));return q},_forecolorImpl:function(g){k("ie")&&(g=g?g:null);var q=!1;(q=this._handleTextColorOrProperties("forecolor",g))||(q=this.document.execCommand("forecolor",!1,g));return q},_inserthtmlImpl:function(g){g=this._preFilterContent(g);var q=!0;if(9>k("ie")){var E=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var N=E.item(0);E.length;)E.remove(E.item(0));N.outerHTML=g}else E.pasteHTML(g);E.select()}else if(8>k("trident")){var m=P.getSelection(this.window);
if(m&&m.rangeCount&&m.getRangeAt){E=m.getRangeAt(0);E.deleteContents();var C=d.create("div");C.innerHTML=g;for(N=this.document.createDocumentFragment();g=C.firstChild;)var G=N.appendChild(g);E.insertNode(N);G&&(E=E.cloneRange(),E.setStartAfter(G),E.collapse(!1),m.removeAllRanges(),m.addRange(E))}}else k("mozilla")&&!g.length?this.selection.remove():q=this.document.execCommand("inserthtml",!1,g);return q},_boldImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),q=this._adaptIEFormatAreaAndExec("bold");
q||(q=this.document.execCommand("bold",!1,g));return q},_italicImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),q=this._adaptIEFormatAreaAndExec("italic");q||(q=this.document.execCommand("italic",!1,g));return q},_underlineImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),q=this._adaptIEFormatAreaAndExec("underline");q||(q=this.document.execCommand("underline",!1,g));return q},_strikethroughImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),
q=this._adaptIEFormatAreaAndExec("strikethrough");q||(q=this.document.execCommand("strikethrough",!1,g));return q},_superscriptImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),q=this._adaptIEFormatAreaAndExec("superscript");q||(q=this.document.execCommand("superscript",!1,g));return q},_subscriptImpl:function(g){var q=!1;if(k("ie")||k("trident"))this._adaptIESelection(),q=this._adaptIEFormatAreaAndExec("subscript");q||(q=this.document.execCommand("subscript",!1,g));return q},
_fontnameImpl:function(g){if(k("ie")||k("trident"))var q=this._handleTextColorOrProperties("fontname",g);q||(q=this.document.execCommand("fontname",!1,g));return q},_fontsizeImpl:function(g){if(k("ie")||k("trident"))var q=this._handleTextColorOrProperties("fontsize",g);q||(q=this.document.execCommand("fontsize",!1,g));return q},_insertorderedlistImpl:function(g){var q=!1;if(k("ie")||k("trident")||k("edge"))q=this._adaptIEList("insertorderedlist",g);q||(q=this.document.execCommand("insertorderedlist",
!1,g));return q},_insertunorderedlistImpl:function(g){var q=!1;if(k("ie")||k("trident")||k("edge"))q=this._adaptIEList("insertunorderedlist",g);q||(q=this.document.execCommand("insertunorderedlist",!1,g));return q},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(g){var q=0;if(g&&g.childNodes){var E;for(E=0;E<g.childNodes.length;E++){var N=e.position(g.childNodes[E]);
q+=N.h}}return q},_isNodeEmpty:function(g,q){return 1===g.nodeType?0<g.childNodes.length?this._isNodeEmpty(g.childNodes[0],q):!0:3===g.nodeType?""===g.nodeValue.substring(q):!1},_removeStartingRangeFromRange:function(g,q){if(g.nextSibling)q.setStart(g.nextSibling,0);else{for(g=g.parentNode;g&&null==g.nextSibling;)g=g.parentNode;g&&q.setStart(g.nextSibling,0)}return q},_adaptIESelection:function(){var g=P.getSelection(this.window);if(g&&g.rangeCount&&!g.isCollapsed){for(var q=g.getRangeAt(0),E=q.startContainer,
N=q.startOffset;3===E.nodeType&&N>=E.length&&E.nextSibling;)N-=E.length,E=E.nextSibling;for(var m=null;this._isNodeEmpty(E,N)&&E!==m;)m=E,q=this._removeStartingRangeFromRange(E,q),E=q.startContainer,N=0;g.removeAllRanges();g.addRange(q)}},_adaptIEFormatAreaAndExec:function(g){var q=P.getSelection(this.window),E=this.document,N;if(g&&q&&q.isCollapsed){if(this.queryCommandValue(g)){g=this._tagNamesForCommand(g);var m=q.getRangeAt(0);var C=m.startContainer;if(3===C.nodeType){var G=m.endOffset;C.length<
G&&(G=this._adjustNodeAndOffset(M,G),C=G.node,G=G.offset)}for(;C&&C!==this.editNode;){var M=C.tagName?C.tagName.toLowerCase():"";if(-1<v.indexOf(g,M)){var r=C;break}C=C.parentNode}if(r&&(M=m.startContainer,g=E.createElement(r.tagName),d.place(g,r,"after"),M&&3===M.nodeType)){G=m.endOffset;M.length<G&&(G=this._adjustNodeAndOffset(M,G),M=G.node,G=G.offset);C=M.nodeValue;m=E.createTextNode(C.substring(0,G));var D=C.substring(G,C.length);D&&(N=E.createTextNode(D));d.place(m,M,"before");if(N){var O=E.createElement("span");
O.className="ieFormatBreakerSpan";d.place(O,M,"after");d.place(N,O,"after");N=O}d.destroy(M);G=m.parentNode;for(M=[];G!==r;){C=G.tagName;m={tagName:C};M.push(m);C=E.createElement(C);G.style&&C.style&&G.style.cssText&&(C.style.cssText=G.style.cssText,m.cssText=G.style.cssText);"FONT"===G.tagName&&(G.color&&(C.color=G.color,m.color=G.color),G.face&&(C.face=G.face,m.face=G.face),G.size&&(C.size=G.size,m.size=G.size));G.className&&(C.className=G.className,m.className=G.className);if(N)for(;N;)m=N.nextSibling,
C.appendChild(N),N=m;C.tagName==G.tagName?(O=E.createElement("span"),O.className="ieFormatBreakerSpan",d.place(O,G,"after"),d.place(C,O,"after")):d.place(C,G,"after");m=G;N=C;G=G.parentNode}if(N){if(1===N.nodeType||3===N.nodeType&&N.nodeValue)g.innerHTML="";for(;N;)m=N.nextSibling,g.appendChild(N),N=m}if(M.length){m=M.pop();N=E.createElement(m.tagName);m.cssText&&N.style&&(N.style.cssText=m.cssText);m.className&&(N.className=m.className);"FONT"===m.tagName&&(m.color&&(N.color=m.color),m.face&&(N.face=
m.face),m.size&&(N.size=m.size));for(d.place(N,g,"before");M.length;)m=M.pop(),r=E.createElement(m.tagName),m.cssText&&r.style&&(r.style.cssText=m.cssText),m.className&&(r.className=m.className),"FONT"===m.tagName&&(m.color&&(r.color=m.color),m.face&&(r.face=m.face),m.size&&(r.size=m.size)),N.appendChild(r),N=r;r=E.createTextNode(".");O.appendChild(r);N.appendChild(r)}else O=E.createElement("span"),O.className="ieFormatBreakerSpan",r=E.createTextNode("."),O.appendChild(r),d.place(O,g,"before");N=
P.create(this.window);N.setStart(r,0);N.setEnd(r,r.length);q.removeAllRanges();q.addRange(N);this.selection.collapse(!1);r.parentNode.innerHTML="";g.firstChild||d.destroy(g);return!0}return!1}m=q.getRangeAt(0);if((M=m.startContainer)&&3===M.nodeType)return G=m.startOffset,M.length<G&&(G=this._adjustNodeAndOffset(M,G),M=G.node,G=G.offset),C=M.nodeValue,m=E.createTextNode(C.substring(0,G)),D=C.substring(G),""!==D&&(N=E.createTextNode(C.substring(G))),O=E.createElement("span"),r=E.createTextNode("."),
O.appendChild(r),m.length?d.place(m,M,"after"):m=M,d.place(O,m,"after"),N&&d.place(N,O,"after"),d.destroy(M),N=P.create(this.window),N.setStart(r,0),N.setEnd(r,r.length),q.removeAllRanges(),q.addRange(N),E.execCommand(g),d.place(O.firstChild,O,"before"),d.destroy(O),N.setStart(r,0),N.setEnd(r,r.length),q.removeAllRanges(),q.addRange(N),this.selection.collapse(!1),r.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(g){var q=P.getSelection(this.window);if(q.isCollapsed&&q.rangeCount&&
!this.queryCommandValue(g)){var E=q.getRangeAt(0),N=E.startContainer;if(N&&3==N.nodeType&&!E.startOffset)return E="ul","insertorderedlist"===g&&(E="ol"),g=this.document.createElement(E),E=d.create("li",null,g),d.place(g,N,"before"),E.appendChild(N),d.create("br",null,g,"after"),g=P.create(this.window),g.setStart(N,0),g.setEnd(N,N.length),q.removeAllRanges(),q.addRange(g),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(g,q){var E=P.getSelection(this.window),N=this.document,
m,C;q=q||null;if(g&&E&&E.isCollapsed&&E.rangeCount){var G=E.getRangeAt(0);if((m=G.startContainer)&&3===m.nodeType){var M=G.startOffset;m.length<M&&(G=this._adjustNodeAndOffset(m,M),m=G.node,M=G.offset);var r=m.nodeValue;G=N.createTextNode(r.substring(0,M));""!==r.substring(M)&&(C=N.createTextNode(r.substring(M)));r=N.createElement("span");M=N.createTextNode(".");r.appendChild(M);N=N.createElement("span");r.appendChild(N);G.length?d.place(G,m,"after"):G=m;d.place(r,G,"after");C&&d.place(C,r,"after");
d.destroy(m);m=P.create(this.window);m.setStart(M,0);m.setEnd(M,M.length);E.removeAllRanges();E.addRange(m);if(k("webkit")){E="color";if("hilitecolor"===g||"backcolor"===g)E="backgroundColor";f.set(r,E,q);this.selection.remove();d.destroy(N);r.innerHTML="\x26#160;";this.selection.selectElement(r);this.focus()}else this.execCommand(g,q),d.place(r.firstChild,r,"before"),d.destroy(r),m.setStart(M,0),m.setEnd(M,M.length),E.removeAllRanges(),E.addRange(m),this.selection.collapse(!1),M.parentNode.removeChild(M);
return!0}}return!1},_adjustNodeAndOffset:function(g,q){for(;g.length<q&&g.nextSibling&&3===g.nextSibling.nodeType;)q-=g.length,g=g.nextSibling;return{node:g,offset:q}},_tagNamesForCommand:function(g){return"bold"===g?["b","strong"]:"italic"===g?["i","em"]:"strikethrough"===g?["s","strike"]:"superscript"===g?["sup"]:"subscript"===g?["sub"]:"underline"===g?["u"]:[]},_stripBreakerNodes:function(g){if(this.isLoaded)return y(".ieFormatBreakerSpan",g).forEach(function(q){for(;q.firstChild;)d.place(q.firstChild,
q,"before");d.destroy(q)}),g},_stripTrailingEmptyNodes:function(g){function q(E){return/^(p|div|br)$/i.test(E.nodeName)&&0==E.children.length&&/^[\s\xA0]*$/.test(E.textContent||E.innerText||"")||3===E.nodeType&&/^[\s\xA0]*$/.test(E.nodeValue)}for(;g.lastChild&&q(g.lastChild);)d.destroy(g.lastChild);return g},_setTextDirAttr:function(g){this._set("textDir",g);this.onLoadDeferred.then(p.hitch(this,function(){this.editNode.dir=g}))}});return S})},"dijit/_editor/range":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/lang"],function(v,x,L){var H={getIndex:function(c,d){for(var e=[],f=[],n=c,h,p;c!=d;){var A=0;for(h=c.parentNode;p=h.childNodes[A++];)if(p===c){--A;break}e.unshift(A);f.unshift(A-h.childNodes.length);c=h}if(0<e.length&&3==n.nodeType){for(p=n.previousSibling;p&&3==p.nodeType;)e[e.length-1]--,p=p.previousSibling;for(p=n.nextSibling;p&&3==p.nodeType;)f[f.length-1]++,p=p.nextSibling}return{o:e,r:f}},getNode:function(c,d){if(!L.isArray(c)||0==c.length)return d;var e=d;
v.every(c,function(f){if(0<=f&&f<e.childNodes.length)e=e.childNodes[f];else return e=null,!1;return!0});return e},getCommonAncestor:function(c,d,e){e=e||c.ownerDocument.body;var f=function(p){for(var A=[];p;)if(A.unshift(p),p!==e)p=p.parentNode;else break;return A};c=f(c);d=f(d);f=Math.min(c.length,d.length);for(var n=c[0],h=1;h<f;h++)if(c[h]===d[h])n=c[h];else break;return n},getAncestor:function(c,d,e){for(e=e||c.ownerDocument.body;c&&c!==e;){var f=c.nodeName.toUpperCase();if(d.test(f))return c;
c=c.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(c,d,e){e=e||c.ownerDocument.body;d=d||H.BlockTagNames;for(var f=null,n;c&&c!==e;){var h=c.nodeName.toUpperCase();!f&&d.test(h)&&(f=c);!n&&/^(?:BODY|TD|TH|CAPTION)$/.test(h)&&(n=c);c=c.parentNode}return{blockNode:f,blockContainer:n||c.ownerDocument.body}},atBeginningOfContainer:function(c,d,e){var f=!1,n=0==e;n||3!=d.nodeType||/^[\s\xA0]+$/.test(d.nodeValue.substr(0,e))&&(n=
!0);if(n)for(f=!0;d&&d!==c;){if(d.previousSibling){f=!1;break}d=d.parentNode}return f},atEndOfContainer:function(c,d,e){var f=!1,n=e==(d.length||d.childNodes.length);n||3!=d.nodeType||/^[\s\xA0]+$/.test(d.nodeValue.substr(e))&&(n=!0);if(n)for(f=!0;d&&d!==c;){if(d.nextSibling){f=!1;break}d=d.parentNode}return f},adjacentNoneTextNode:function(c,d){var e=c;c=0-c.length||0;for(d=d?"nextSibling":"previousSibling";e&&3==e.nodeType;)c+=e.length,e=e[d];return[e,c]},create:function(c){c=c||window;return c.getSelection?
c.document.createRange():new b},getSelection:function(c,d){if(c.getSelection)return c.getSelection();c=new B.selection(c);d||c._getCurrentSelection();return c}};if(!window.getSelection)var B=H.ie={cachedSelection:{},selection:function(c){this._ranges=[];this.addRange=function(d,e){this._ranges.push(d);e||d._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(d){return this._ranges[d]};this._getCurrentSelection=function(){this.removeAllRanges();
var d=c.document.selection.createRange();d="CONTROL"==c.document.selection.type.toUpperCase()?new b(B.decomposeControlRange(d)):new b(B.decomposeTextRange(d));this.addRange(d,!0),this.isCollapsed=d.collapsed}},decomposeControlRange:function(c){var d=c.item(0),e=c.item(c.length-1);c=d.parentNode;var f=e.parentNode;d=H.getIndex(d,c).o[0];e=H.getIndex(e,f).o[0]+1;return[c,d,f,e]},getEndPoint:function(c,d){var e=c.duplicate();e.collapse(!d);var f="EndTo"+(d?"End":"Start"),n=e.parentElement(),h;if(0<n.childNodes.length)v.every(n.childNodes,
function(y,a){if(3!=y.nodeType)if(e.moveToElementText(y),0<e.compareEndPoints(f,c))if(h&&3==h.nodeType){p=h;var k=!0}else return p=n,A=a,!1;else{if(a==n.childNodes.length-1)return p=n,A=n.childNodes.length,!1}else a==n.childNodes.length-1&&(p=y,k=!0);if(k&&p)return p=(y=H.adjacentNoneTextNode(p)[0])?y.nextSibling:n.firstChild,a=H.adjacentNoneTextNode(p),y=a[0],a=a[1],y?(e.moveToElementText(y),e.collapse(!1)):e.moveToElementText(n),e.setEndPoint(f,c),A=e.text.length-a,!1;h=y;return!0});else{var p=
n;var A=0}d||1!=p.nodeType||A!=p.childNodes.length||(d=p.nextSibling)&&3==d.nodeType&&(p=d,A=0);return[p,A]},setEndPoint:function(c,d,e){c=c.duplicate();var f;if(3!=d.nodeType)if(0<e){if(f=d.childNodes[e-1])if(3==f.nodeType)d=f,e=f.length;else if(f.nextSibling&&3==f.nextSibling.nodeType)d=f.nextSibling,e=0;else{c.moveToElementText(f.nextSibling?f:d);var n=f.parentNode;f=n.insertBefore(f.ownerDocument.createTextNode(" "),f.nextSibling);c.collapse(!1);n.removeChild(f)}}else c.moveToElementText(d),c.collapse(!0);
3==d.nodeType&&(f=H.adjacentNoneTextNode(d),n=f[0],f=f[1],n?(c.moveToElementText(n),c.collapse(!1),"inherit"!=n.contentEditable&&f++):(c.moveToElementText(d.parentNode),c.collapse(!0),c.move("character",1),c.move("character",-1)),e+=f,0<e&&c.move("character",e)!=e&&console.error("Error when moving!"));return c},decomposeTextRange:function(c){var d=B.getEndPoint(c),e=d[0],f=d[1],n=d[0];d=d[1];c.htmlText.length&&(c.htmlText==c.text?d=f+c.text.length:(d=B.getEndPoint(c,!0),n=d[0],d=d[1]));return[e,f,
n,d]},setRange:function(c,d,e,f,n,h){d=B.setEndPoint(c,d,e);c.setEndPoint("StartToStart",d);if(!h)var p=B.setEndPoint(c,f,n);c.setEndPoint("EndToEnd",p||d);return c}},b=H.W3CRange=x(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=
this.startContainer!==this.endContainer?H.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(c,d){d=parseInt(d);if(this.startContainer!==c||this.startOffset!=d)delete this._cachedBookmark,this.startContainer=c,this.startOffset=d,this.endContainer?this._updateInternal():this.setEnd(c,d)},setEnd:function(c,d){d=parseInt(d);if(this.endContainer!==c||this.endOffset!=d)delete this._cachedBookmark,
this.endContainer=c,this.endOffset=d,this.startContainer?this._updateInternal():this.setStart(c,d)},setStartAfter:function(c,d){this._setPoint("setStart",c,d,1)},setStartBefore:function(c,d){this._setPoint("setStart",c,d,0)},setEndAfter:function(c,d){this._setPoint("setEnd",c,d,1)},setEndBefore:function(c,d){this._setPoint("setEnd",c,d,0)},_setPoint:function(c,d,e,f){e=H.getIndex(d,d.parentNode).o;this[c](d.parentNode,e.pop()+f)},_getIERange:function(){var c=(this._body||this.endContainer.ownerDocument.body).createTextRange();
B.setRange(c,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return c},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var c=this.startContainer,d=this._getIERange();3!==c.nodeType||this.startOffset||this.setStartBefore(c);d.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var c=new b([this.startContainer,
this.startOffset,this.endContainer,this.endOffset]);c._body=this._body;return c},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});L.setObject("dijit.range",H);return H})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(v,x,L){var H={};x.setObject("dijit._editor.html",H);var B=H.escapeXml=function(b,c){b=b.replace(/&/gm,"\x26amp;").replace(/</gm,
"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");c||(b=b.replace(/'/gm,"\x26#39;"));return b};H.getNodeHtml=function(b){var c=[];H.getNodeHtmlHelper(b,c);return c.join("")};H.getNodeHtmlHelper=function(b,c){switch(b.nodeType){case 1:var d=b.nodeName.toLowerCase();if(!d||"/"==d.charAt(0))return"";c.push("\x3c",d);var e=[],f={},n;if(L("dom-attributes-explicit")||L("dom-attributes-specified-flag"))for(var h=0;n=b.attributes[h++];){var p=n.name;"_dj"===p.substr(0,3)||L("dom-attributes-specified-flag")&&
!n.specified||p in f||(n=n.value,("src"==p||"href"==p)&&b.getAttribute("_djrealurl")&&(n=b.getAttribute("_djrealurl")),8===L("ie")&&"style"===p&&(n=n.replace("HEIGHT:","height:").replace("WIDTH:","width:")),e.push([p,n]),f[p]=n)}else{var A=(/^input$|^img$/i.test(b.nodeName)?b:b.cloneNode(!1)).outerHTML;f=A.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);A=A.substr(0,A.indexOf("\x3e"));v.forEach(f,function(y){if(y){var a=y.indexOf("\x3d");if(0<a&&(y=y.substring(0,a),"_dj"!=y.substr(0,3)))if("src"!=y&&"href"!=
y||!b.getAttribute("_djrealurl")){switch(y){case "style":var k=b.style.cssText.toLowerCase();break;case "class":k=b.className;break;case "width":if("img"===d){(a=/width=(\S+)/i.exec(A))&&(k=a[1]);break}case "height":if("img"===d){(a=/height=(\S+)/i.exec(A))&&(k=a[1]);break}default:k=b.getAttribute(y)}null!=k&&e.push([y,k.toString()])}else e.push([y,b.getAttribute("_djrealurl")])}},this)}e.sort(function(y,a){return y[0]<a[0]?-1:y[0]==a[0]?0:1});for(f=0;n=e[f++];)c.push(" ",n[0],'\x3d"',"string"===
typeof n[1]?B(n[1],!0):n[1],'"');switch(d){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":c.push(" /\x3e");break;case "script":c.push("\x3e",b.innerHTML,"\x3c/",d,"\x3e");break;default:c.push("\x3e"),b.hasChildNodes()&&H.getChildrenHtmlHelper(b,c),c.push("\x3c/",d,"\x3e")}break;case 4:case 3:c.push(B(b.nodeValue,!0));break;case 8:c.push("\x3c!--",B(b.nodeValue,!0),"--\x3e");break;default:c.push("\x3c!-- Element not recognized - Type: ",b.nodeType," Name: ",
b.nodeName,"--\x3e")}};H.getChildrenHtml=function(b){var c=[];H.getChildrenHtmlHelper(b,c);return c.join("")};H.getChildrenHtmlHelper=function(b,c){if(b)for(var d=b.childNodes||b,e=!L("ie")||d!==b,f,n=0;f=d[n++];)e&&f.parentNode!=b||H.getNodeHtmlHelper(f,c)};return H})},"jimu/dijit/LayerChooserFromMapWithDropbox":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/keys dojo/Evented dojo/Deferred dijit/popup dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/LayerChooserFromMapWithDropbox.html jimu/LayerInfos/LayerInfos".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h){return v([e,f,b],{templateString:n,baseClass:"jimu-layer-chooser-from-map-withdropbox",declaredClass:"jimu.dijit.LayerChooserFromMapWithDropbox",_selectedItem:null,_isLayerChooserShow:!1,layerInfosObj:null,layerChooser:null,customClass:"",postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.queryableLayerSource;this.nls.customSelectLayer=this.label?this.label:this.nls.selectLayer},postCreate:function(){this.inherited(arguments);this.layerInfosObj=
h.getInstanceSync();this.layerChooser.domNode.style.zIndex=1;this.layerChooser.tree.domNode.style.borderTop="0";this.layerChooser.tree.domNode.style.maxHeight="290px";this.own(H(this.layerChooser,"tree-click",x.hitch(this,this._onTreeClick)));this.own(H(this.layerChooser,"update",x.hitch(this,this._onLayerChooserUpdate)));this.own(H(document.body,"click",x.hitch(this,this._onBodyClicked)));this.own(H(document.body,"keydown",x.hitch(this,function(p){p.keyCode===B.ENTER&&this._onBodyClicked(p)})));
this.own(H(this.layerChooser.domNode,"keydown",x.hitch(this,function(p){p.keyCode===B.ESCAPE&&this.hideLayerChooser()})))},destroy:function(){this.hideLayerChooser();this.layerChooser&&this.layerChooser.destroy();this.layerChooser=null;this.inherited(arguments)},getLayerChooser:function(){return this.layerChooser},setSelectedLayer:function(p){var A=new c;if(p){var y=this.layerInfosObj.getLayerOrTableInfoById(p.id);y?this.layerChooser.filter(y).then(x.hitch(this,function(a){a?(this._onSelectNewItem({layerInfo:y,
name:y.title,url:p.url}),A.resolve(!0)):A.resolve(!1)}),x.hitch(this,function(){A.resolve(!1)})):A.resolve(!1)}else this._onSelectNewItem(null),A.resolve(!0);return A},getSelectedItem:function(){return this._selectedItem},getSelectedItems:function(){return[this._selectedItem]},_onBodyClicked:function(p){p=p.target||p.srcElement;p===this.domNode||L.isDescendant(p,this.domNode)||p===this.layerChooser.domNode||L.isDescendant(p,this.layerChooser.domNode)||this.hideLayerChooser()},_onDropDownClick:function(p){p.stopPropagation();
p.preventDefault();this._isLayerChooserShow?this.hideLayerChooser():(this.isActive=!0,this.showLayerChooser())},_onDropDownKeydown:function(p){p.keyCode===B.ENTER&&this._onDropDownClick(p)},_getSelectedItems:function(){return this.layerChooser.getSelectedItems()},showLayerChooser:function(){this.layerChooser.domNode.style.minWidth=this.domNode.clientWidth+2+"px";d.open({parent:this,popup:this.layerChooser,around:this.domNode});var p=this.layerChooser.domNode.parentNode;p&&(L.addClass(p,"jimu-layer-chooser-from-map-withdropbox-popup"),
this.customClass&&L.addClass(p,this.customClass),this.layerChooser.tree.domNode.focus());this._isLayerChooserShow=!0},hideLayerChooser:function(){d.close(this.layerChooser);this._isLayerChooserShow=!1;this.isActive&&(this.dropDownBtn.focus(),this.isActive=!1)},_onLayerChooserUpdate:function(){this._selectedItem&&this.layerChooser.onlyShowVisible&&!this._selectedItem.layerInfo.isShowInMap()&&(this._selectedItem=null,this.emit("selection-change",[]))},_onSelectNewItem:function(p){var A=x.getObject("layerInfo.id",
!1,this._selectedItem)||-1,y=x.getObject("layerInfo.id",!1,p)||-1;A=A!==y;this._selectedItem=p;this.hideLayerChooser();p=x.getObject("layerInfo.title",!1,this._selectedItem)||"";this.layerNameNode.innerHTML=p;L.setAttr(this.layerNameNode,"title",p);p=x.getObject("layerInfo.layerObject",!1,this._selectedItem);A&&this.emit("selection-change",[p])},_onTreeClick:function(){var p=this._getSelectedItems();this._onSelectNewItem(0<p.length?p[0]:null)}})})},"widgets/DataAggregation/locatorUtils":function(){define("dojo/_base/lang dojo/Deferred dojo/when dojo/promise/all jimu/portalUtils esri/request".split(" "),
function(v,x,L,H,B,b){return{map:null,layerInfosObj:null,appConfig:null,_esriLocatorRegExp:/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g,setMap:function(c){this.map=c},setAppConfig:function(c){this.appConfig=c},setDefaultXYFields:function(c){this.defaultXYFields=c},getConfigInfo:function(c){return c&&c.sources&&0<c.sources.length?c:L(this._getSoucesFromPortalAndWebmap()).then(v.hitch(this,function(d){return{allPlaceholder:"",showInfoWindowOnSelect:!0,sources:d}}))},
_getSoucesFromPortalAndWebmap:function(){var c=[];return B.getPortalSelfInfo(this.appConfig.portalUrl).then(v.hitch(this,function(d){if((d=d.helperServices&&d.helperServices.geocode)&&0<d.length)for(var e=0,f=d.length;e<f;e++){var n=d[e];n&&c.push(this._processSingleLine(n))}return H(c).then(v.hitch(this,function(h){for(var p=[],A=0;A<h.length;A++){var y=h[A];y&&(y&&"query"===y.type?p.push(y):(y={name:y.name||this._getGeocodeName(y.url),url:y.url,singleLineFieldName:y.singleLineFieldName,placeholder:y.placeholder||
y.name||this._getGeocodeName(y.url),maxResults:6,searchInCurrentMapExtent:!1,type:"locator"},y.enableLocalSearch=this._isEsriLocator(y.url),y.localSearchMinScale=3E5,y.localSearchDistance=5E4,p.push(y)))}return p}))}))},_isEsriLocator:function(c){this._esriLocatorRegExp.lastIndex=0;return this._esriLocatorRegExp.test(c)},_processSingleLine:function(c){if(c.singleLineFieldName)return c;if(this._isEsriLocator(c.url))return c.singleLineFieldName="SingleLine",c;var d=new x;b({url:c.url,content:{f:"json"},
handleAs:"json",callbackParamName:"callback"}).then(v.hitch(this,function(e){e.singleLineAddressField&&e.singleLineAddressField.name?(c.singleLineFieldName=e.singleLineAddressField.name,d.resolve(c)):(console.warn(c.url+"has no singleLineFieldName"),d.resolve(null))}),v.hitch(this,function(e){console.error(e);d.resolve(null)}));return d.promise},_getGeocodeName:function(c){if("string"!==typeof c)return"geocoder";c=c.split("/");return c[c.length-2]||"geocoder"},getGeocoderName:function(c){return this._getGeocodeName(c)},
hasAppSearchInfo:function(c){return c.itemInfo&&c.itemInfo.itemData&&c.itemInfo.itemData.applicationProperties&&c.itemInfo.itemData.applicationProperties.viewing&&c.itemInfo.itemData.applicationProperties.viewing.search}}})},"widgets/DataAggregation/setting/EditablePointFeatureLayerChooserFromMap":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred","jimu/dijit/LayerChooserFromMap","jimu/dijit/QueryableLayerChooserFromMap"],function(v,x,L,H,B){return v([B],{skipLayerIds:[],postMixInProperties:function(){this.inherited(arguments);
this.filter=x.hitch(this,H.andCombineFilters([this.filter,x.hitch(this,this._customFilter)]))},_customFilter:function(b){var c=new L;b.isTable?c.resolve(!1):b.getLayerObject().then(x.hitch(this,function(d){c.resolve("Feature Layer"===d.type&&d.url&&d.isEditable&&d.isEditable()&&"esriGeometryPoint"===d.geometryType&&0>this.skipLayerIds.indexOf(d.id))}),x.hitch(this,function(d){console.error(d);c.resolve(!1)}));return c}})})},"jimu/dijit/LayerChooserFromMap":function(){define("dojo/on dojo/Evented dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/store/Memory dojo/Deferred dojo/store/Observable dijit/tree/ObjectStoreModel dojo/promise/all dojo/_base/lang dojo/_base/html dojo/_base/array jimu/utils jimu/dijit/_Tree jimu/LayerInfos/LayerInfos jimu/dijit/LoadingIndicator".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z){var K=L([H,B,b,x],{templateString:'\x3cdiv style\x3d"width:100%;"\x3e\x3cdiv data-dojo-attach-point\x3d"errorTipSection" class\x3d"error-tip-section"\x3e\x3cspan class\x3d"jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\x3cspan class\x3d"jimu-state-error-text" data-dojo-attach-point\x3d"errTip"\x3e${nls.noLayersTip}\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e',_store:null,_id:0,_treeClass:"layer-chooser-tree",createMapResponse:null,multiple:!1,onlyShowVisible:!1,
updateWhenLayerInfosIsShowInMapChanged:!1,onlyShowWebMapLayers:!1,displayTooltipForTreeNode:!1,onlyFilterCurrentLayerWhenAddItem:!1,postMixInProperties:function(){this.nls=window.jimuNls.basicLayerChooserFromMap},postCreate:function(){this.inherited(arguments);p.addClass(this.domNode,"jimu-basic-layer-chooser-from-map");this.multiple=!!this.multiple;this.shelter=new z({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this._createTree();this.basicFilter=h.hitch(this,this.basicFilter);
this.filter=K.andCombineFilters([this.basicFilter,this.filter]);this.createMapResponse&&this.setCreateMapResponse(this.createMapResponse)},basicFilter:function(l){var t=new d;this.onlyShowVisible?t.resolve(l.isShowInMap()):t.resolve(!0);return t},filter:function(l){l=new d;l.resolve(!0);return l},getSelectedItems:function(){var l=this.tree.getSelectedItems();return A.map(l,h.hitch(this,function(t){return this.getHandledItem(t)}))},getAllItems:function(){var l=this.tree.getAllItems(),t=[];A.forEach(l,
h.hitch(this,function(F){"root"!==F.id&&(F=this.getHandledItem(F),t.push(F))}));return t},getHandledItem:function(l){return{name:l.name,layerInfo:l.layerInfo}},_isLeafItem:function(l){return l.isLeaf},setCreateMapResponse:function(l){this.createMapResponse=l;k.getInstance(this.createMapResponse.map,this.createMapResponse.itemInfo).then(h.hitch(this,function(t){this.layerInfosObj=t;this.own(v(this.layerInfosObj,"layerInfosChanged",h.hitch(this,this._onLayerInfosChanged)));this.updateWhenLayerInfosIsShowInMapChanged&&
this.own(v(this.layerInfosObj,"layerInfosIsShowInMapChanged",h.hitch(this,this._onLayerInfosIsShowInMapChanged)));this._buildTree(this.layerInfosObj)}))},_onLayerInfosChanged:function(l,t){this._buildTree(this.layerInfosObj);this.emit("update")},_onLayerInfosIsShowInMapChanged:function(l){this._buildTree(this.layerInfosObj);this.emit("update")},_buildTree:function(l){this._clear();p.setStyle(this.errorTipSection,"display","block");var t=[];this.onlyShowWebMapLayers?(t=l.getLayerInfoArrayOfWebmap(),
t=t.concat(l.getTableInfoArrayOfWebmap())):(t=l.getLayerInfoArray(),t=t.concat(l.getTableInfoArray()));0!==t.length&&(p.setStyle(this.errorTipSection,"display","none"),A.forEach(t,h.hitch(this,function(F){this._addDirectLayerInfo(F)})))},_addDirectLayerInfo:function(l){l&&l.getLayerObject().then(h.hitch(this,function(){this._addItem("root",l)}),h.hitch(this,function(t){console.error(t)}))},_clear:function(){var l=this._store.query({parent:"root"});A.forEach(l,h.hitch(this,function(t){t&&"root"!==
t.id&&this._store.remove(t.id)}))},_addItem:function(l,t){var F=null,J=t.getLayerType(),R=this.filter(t);n({layerType:J,valid:R}).then(h.hitch(this,function(I){if(I.valid){var P=h.hitch(this,function(S,g){this._id++;F={name:t.title||"",parent:l,layerInfo:t,type:I.layerType,layerClass:t.layerObject.declaredClass,id:this._id.toString(),isLeaf:S,hasChildren:g};this._store.add(F)}),w=t.getSubLayers(),u=0===w.length,Q=!0;this.onlyFilterCurrentLayerWhenAddItem?(u&&(Q=!1),P(u,Q)):u?P(u,!1):(w=A.map(w,h.hitch(this,
function(S){return this.filter(S)})),n(w).then(h.hitch(this,function(S){(S=A.some(S,function(g){return g}))&&P(u,S)})))}}))},_getRootItem:function(){return{id:"root",name:"Map Root",type:"root",isLeaf:!1,hasChildren:!0}},_createTree:function(){var l=this._getRootItem();l=new c({data:[l],getChildren:function(t){return this.query({parent:t.id})}});this._store=new e(l);l=new f({store:this._store,query:{id:"root"},mayHaveChildren:h.hitch(this,this._mayHaveChildren)});this.tree=new a({multiple:this.multiple,
model:l,showRoot:!1,isLeafItem:h.hitch(this,this._isLeafItem),style:{width:"100%"},onOpen:h.hitch(this,function(t,F){"root"!==t.id&&this._onTreeOpen(t,F)}),onClick:h.hitch(this,function(t,F,J){this._onTreeClick(t,F,J);this.emit("tree-click",t,F,J)}),getIconStyle:h.hitch(this,function(t,F){var J=null;if(!t||"root"===t.id)return null;var R={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},I=window.location.protocol+"//"+window.location.host+
require.toUrl("jimu");if(t=this._getIconInfo(t,F).imageName)R.backgroundImage="url("+I+"/css/images/"+t+")",J=R;return J}),getIconClass:h.hitch(this,function(t,F){return this._getIconInfo(t,F).className}),getTooltip:h.hitch(this,function(t){return this.displayTooltipForTreeNode?t.layerInfo.title:""})});p.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.shelter.domNode,"before")},_mayHaveChildren:function(l){return l.hasChildren},_getIconInfo:function(l,t){var F="",J="";"ArcGISDynamicMapServiceLayer"===
l.type||"ArcGISTiledMapServiceLayer"===l.type?t?(F="mapserver_open.png",J="mapservice-layer-icon open"):(F="mapserver_close.png",J="mapservice-layer-icon close"):"GroupLayer"===l.type?t?(F="group_layer2.png",J="group-layer-icon open"):(F="group_layer1.png",J="group-layer-icon close"):"FeatureLayer"===l.type?(l=y.getTypeByGeometryType(l.layerInfo.layerObject.geometryType),"point"===l?(F="point_layer1.png",J="point-layer-icon"):"polyline"===l?(F="line_layer1.png",J="line-layer-icon"):"polygon"===l&&
(F="polygon_layer1.png",J="polygon-layer-icon")):"Table"===l.type?(F="table.png",J="table-icon"):"ArcGISImageServiceLayer"===l.type||"ArcGISImageServiceVectorLayer"===l.type?(F="image_layer.png",J="iamge-layer-icon"):t?(F="mapserver_open.png",J="mapservice-layer-icon open"):(F="mapserver_close.png",J="mapservice-layer-icon close");return{imageName:F,className:J}},_onTreeOpen:function(l,t){if("root"!==l.id){var F=[];t=[];F=l.layerInfo.getSubLayers();l.checked||(this.shelter.show(),t=A.map(F,h.hitch(this,
function(J){return J.getLayerObject()})),n(t).then(h.hitch(this,function(){this.domNode&&(A.forEach(F,h.hitch(this,function(J){this._addItem(l.id,J)})),l.checked=!0,this.shelter.hide())}),h.hitch(this,function(J){console.error(J);this.shelter.hide()})))}},_onTreeClick:function(l,t,F){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.tree&&this.tree.destroy();this.inherited(arguments)}});K.createFilterByLayerType=function(l){h.isArrayLike(l)||(l=[]);return function(t){var F=
new d;if(0===l.length)F.resolve(!0);else{var J=[];t.traversal(function(R){J.push(R.getLayerType())});n(J).then(function(R){for(var I=0;I<R.length;I++)for(var P=0;P<l.length;P++)if(R[I]===l[P]){F.resolve(!0);return}F.resolve(!1)},function(R){console.error(R);F.reject(R)})}return F}};K.createFeaturelayerFilter=function(l,t,F,J){var R=["point","polyline","polygon"];l&&0<l.length?(l=A.filter(l,function(I){return 0<=R.indexOf(I)}),0===l.length&&(l=R)):l=R;return function(I){var P=I.getLayerType();I=I.getLayerObject();
return n({layerType:P,layerObject:I}).then(function(w){var u=w.layerType;w=w.layerObject;if("ArcGISDynamicMapServiceLayer"===u||"ArcGISTiledMapServiceLayer"===u||"GroupLayer"===u||"FeatureCollection"===u)return!0;if("FeatureLayer"===u){u=y.getTypeByGeometryType(w.geometryType);u=0<=A.indexOf(l,u);var Q=K._shouldPassStatisticsCheck(J,w);return w.url?(w=y.isFeaturelayerUrlSupportQuery(w.url,w.capabilities),u&&w&&Q):t&&u}return"Table"===u?(u=y.isFeaturelayerUrlSupportQuery(w.url,w.capabilities),w=K._shouldPassStatisticsCheck(J,
w),F&&u&&w):!1})}};K.createImageServiceLayerFilter=function(l,t){return function(F){var J=F.getLayerType();F=F.getLayerObject();return n({layerType:J,layerObject:F}).then(function(R){var I=R.layerType,P=R.layerObject;return"ArcGISImageServiceLayer"===I||"ArcGISImageServiceVectorLayer"===I?l?y.isImageServiceSupportQuery(R.layerObject.capabilities)?t?K._shouldPassStatisticsCheck(t,P):!0:!1:!0:!1})}};K._shouldPassStatisticsCheck=function(l,t){return l?(l=!1,l=t.advancedQueryCapabilities?!!t.advancedQueryCapabilities.supportsStatistics:
!!t.supportsStatistics):!0};K.createQueryableLayerFilter=function(l){var t=K.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,l);l=K.createImageServiceLayerFilter(!0,l);return K.orCombineFilters([t,l])};K.andCombineFilters=function(l){return K._combineFilters(l,!0)};K.orCombineFilters=function(l){return K._combineFilters(l,!1)};K._combineFilters=function(l,t){return function(F){var J=new d,R=A.map(l,function(I){return I(F)});n(R).then(function(I){var P=!1;P=t?A.every(I,function(w){return w}):
A.some(I,function(w){return w});J.resolve(P)},function(I){console.error(I);J.reject(I)});return J}};return K})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),function(v,x,L,H,B,b,c){return L("dijit.tree.ObjectStoreModel",c,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(d){B.mixin(this,d);this.childrenCache={}},getRoot:function(d,e){if(this.root)d(this.root);
else{var f=this.store.query(this.query);f.then&&this.own(f);b(f,B.hitch(this,function(n){if(1!=n.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+n.length+" items, but must return exactly one");this.root=n[0];d(this.root);f.observe&&f.observe(B.hitch(this,function(h){this.onChange(h)}),!0)}),e)}},mayHaveChildren:function(){return!0},getChildren:function(d,e,f){var n=this.store.getIdentity(d);if(this.childrenCache[n])b(this.childrenCache[n],e,f);else{var h=this.childrenCache[n]=
this.store.getChildren(d);h.then&&this.own(h);h.observe&&this.own(h.observe(B.hitch(this,function(p,A,y){this.onChange(p);A!=y&&b(h,B.hitch(this,"onChildrenChange",d))}),!0));b(h,e,f)}},isItem:function(){return!0},getIdentity:function(d){return this.store.getIdentity(d)},getLabel:function(d){return d[this.labelAttr]},newItem:function(d,e,f,n){return this.store.put(d,{parent:e,before:n})},pasteItem:function(d,e,f,n,h,p){var A=new H;if(e===f&&!n&&!p)return A.resolve(!0),A;e&&!n?this.getChildren(e,B.hitch(this,
function(y){y=[].concat(y);var a=v.indexOf(y,d);y.splice(a,1);this.onChildrenChange(e,y);A.resolve(this.store.put(d,{overwrite:!0,parent:f,oldParent:e,before:p,isCopy:!1}))})):A.resolve(this.store.put(d,{overwrite:!0,parent:f,oldParent:e,before:p,isCopy:!0}));return A},onChange:function(){},onChildrenChange:function(){},onDelete:function(){}})})},"jimu/dijit/_Tree":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/_TreeNode.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/_base/event dojo/query dojo/aspect dojo/on dojo/keys dojo/Evented dijit/registry dijit/Tree jimu/utils".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a){var k=v([y._TreeNode,p],{templateString:H,declaredClass:"jimu._TreeNode",isLeaf:!1,groupId:"",postCreate:function(){this.inherited(arguments);b.addClass(this.domNode,"jimu-tree-node");this.isLeaf=!!this.isLeaf;this.groupId?(this.checkNode=b.toDom('\x3cinput type\x3d"radio" /\x3e'),this.checkNode.name=this.groupId):this.checkNode=b.toDom('\x3cinput type\x3d"checkbox" /\x3e');b.addClass(this.checkNode,"jimu-tree-check-node");b.place(this.checkNode,this.contentNode,
"first");this.own(n(this.checkNode,"click",B.hitch(this,this._onClick)));this.own(n(this.rowNode,"keydown",B.hitch(this,function(z,K){K.target=z;K.keyCode!==h.ENTER&&K.keyCode!==h.SPACE||this._onClick(K)},this.checkNode)));this.isLeaf?this.groupId?b.setStyle(this.checkNode,"display","none"):b.setStyle(this.checkNode,"display","inline"):b.setStyle(this.checkNode,"display","none");this.isLeaf?b.addClass(this.domNode,"jimu-tree-leaf-node"):b.addClass(this.domNode,"jimu-tree-not-leaf-node")},select:function(){this.isLeaf&&
(this.checkNode.checked=!0,b.addClass(this.domNode,"jimu-tree-selected-leaf-node"))},unselect:function(){this.isLeaf&&(this.checkNode.checked=!1,b.removeClass(this.domNode,"jimu-tree-selected-leaf-node"))},toggleSelect:function(){this.isLeaf&&(this.checkNode.checked?this.unselect():this.select())},_onClick:function(z){(z.target||z.srcElement)===this.checkNode?this.tree._onCheckNodeClick(this,this.checkNode.checked,z):this.tree._onClick(this,z)},_onChange:function(){this.isLeaf&&setTimeout(B.hitch(this,
function(){this.checkNode.checked?this.emit("tn-select",this):this.emit("tn-unselect",this)}),100)},destroy:function(){delete this.tree;this.inherited(arguments)}});return v([y,p],{declaredClass:"jimu._Tree",openOnClick:!0,multiple:!0,uniqueId:"",showRoot:!1,postMixInProperties:function(){this.inherited(arguments);this.uniqueId="tree_"+a.getRandomString()},postCreate:function(){this.inherited(arguments);b.addClass(this.domNode,"jimu-tree");this.own(f.before(this,"onClick",B.hitch(this,this._jimuBeforeClick)));
this.rootLoadingIndicator&&b.setStyle(this.rootLoadingIndicator,"display","none");this.dndController.singular=!0;b.setAttr(this.domNode,"tabindex",0)},removeItem:function(z){this.model.store.remove(z)},getAllItems:function(){var z=this.getAllTreeNodeWidgets();return c.map(z,B.hitch(this,function(K){var l=K.item;l.selected=K.checkNode.checked;return l}))},getSelectedItems:function(){var z=this.getAllTreeNodeWidgets();z=c.filter(z,B.hitch(this,function(K){return K.checkNode.checked}));return c.map(z,
B.hitch(this,function(K){return K.item}))},getFilteredItems:function(z){var K=this.getAllTreeNodeWidgets();K=c.map(K,B.hitch(this,function(l){var t=l.item;t.selected=l.checkNode.checked;return t}));return c.filter(K,B.hitch(this,function(l){return z(l)}))},getTreeNodeByItemId:function(z){for(var K=this._getAllTreeNodeDoms(),l=0;l<K.length;l++){var t=A.byNode(K[l]);if(t.item.id.toString()===z.toString())return t}return null},selectItem:function(z){(z=this.getTreeNodeByItemId(z))&&z.isLeaf&&this.selectNodeWidget(z)},
unselectItem:function(z){(z=this.getTreeNodeByItemId(z))&&z.isLeaf&&z.unselect()},getAllLeafTreeNodeWidgets:function(){var z=this.getAllTreeNodeWidgets();return c.filter(z,B.hitch(this,function(K){return K.isLeaf}))},getAllTreeNodeWidgets:function(){var z=this._getAllTreeNodeDoms();return c.map(z,B.hitch(this,function(K){return A.byNode(K)}))},isLeafItem:function(z){return z&&z.isLeaf},_getAllTreeNodeDoms:function(){return e(".dijitTreeNode",this.domNode)},_createTreeNode:function(z){z.isLeaf=this.isLeafItem(z.item);
this.multiple||(z.groupId=this.uniqueId);return new k(z)},_onTreeNodeSelect:function(z){this.emit("item-select",{item:z.item,treeNode:z})},_onTreeNodeUnselect:function(z){this.emit("item-unselect",{item:z.item,treeNode:z})},selectNodeWidget:function(z){this.multiple||this.unselectAllLeafNodeWidgets();z.select()},_jimuBeforeClick:function(z,K,l){K.isLeaf&&(b.hasClass(l.target||l.srcElement,"jimu-tree-check-node")||(this.multiple?K.toggleSelect():this.selectNodeWidget(K)));return arguments},_onCheckNodeClick:function(z,
K,l){!this.multiple&&K&&this.unselectAllLeafNodeWidgets();d.stop(l);this.focusNode(z);setTimeout(B.hitch(this,function(){K?this.selectNodeWidget(z):z.unselect();this.onClick(z.item,z,l)}),0)},unselectAllLeafNodeWidgets:function(){var z=this.getAllLeafTreeNodeWidgets();c.forEach(z,B.hitch(this,function(K){K.unselect()}))}})})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R,I,P,w,u,Q,S,g,q,E,N,m){function C(r){return a.delegate(r.promise||r,{addCallback:function(D){this.then(D)},addErrback:function(D){this.otherwise(D)}})}var G=H("dijit._TreeNode",[I,P,w,u,Q],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(r){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=r;this._set("label",r);p("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:g,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&this.labelNode.setAttribute("aria-expanded",this.isExpanded);this.setSelected(!1)},_setIndentAttr:function(r){var D=Math.max(r,0)*this.tree._nodePixelIndent+"px";f.set(this.domNode,
"backgroundPosition",D+" 0px");f.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",D);v.forEach(this.getChildren(),function(O){O.set("indent",r+1)});this._set("indent",r)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(r){var D=this.tree,O=D.model;D._v10Compat&&r===O.root&&(r=null);this._applyClassAndStyle(r,"icon","Icon");this._applyClassAndStyle(r,"label","Label");this._applyClassAndStyle(r,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(r,D,O){var T="_"+D+"Class";D+="Node";var U=this[T];this[T]=this.tree["get"+O+"Class"](r,this.isExpanded);d.replace(this[D],this[T]||"",U||"");f.set(this[D],this.tree["get"+O+"Style"](r,this.isExpanded)||{})},_updateLayout:function(){var r=this.getParent();r=!r||!r.rowNode||"none"==r.rowNode.style.display;d.toggle(this.domNode,"dijitTreeIsRoot",r);d.toggle(this.domNode,"dijitTreeIsLast",!r&&!this.getNextSibling())},_setExpando:function(r){var D=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];r=r?0:this.isExpandable?this.isExpanded?1:2:3;d.replace(this.expandoNode,D[r],D);this.expandoNodeText.innerHTML=["*","-","+","*"][r]},expand:function(){if(this._expandDeferred)return C(this._expandDeferred);this._collapseDeferred&&(this._collapseDeferred.cancel(),delete this._collapseDeferred);this.isExpanded=!0;this.labelNode.setAttribute("aria-expanded","true");(this.tree.showRoot||this!==this.tree.rootNode)&&
this.containerNode.setAttribute("role","group");d.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","true");var r=h.wipeIn({node:this.containerNode,duration:R.defaultDuration}),D=this._expandDeferred=new B(function(){r.stop()});x.after(r,"onEnd",function(){D.resolve(!0)},!0);r.play();return C(D)},collapse:function(){if(this._collapseDeferred)return C(this._collapseDeferred);
this._expandDeferred&&(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;this.labelNode.setAttribute("aria-expanded","false");this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","false");d.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var r=h.wipeOut({node:this.containerNode,duration:R.defaultDuration}),D=this._collapseDeferred=new B(function(){r.stop()});x.after(r,"onEnd",
function(){D.resolve(!0)},!0);r.play();return C(D)},indent:0,setChildItems:function(r){var D=this.tree,O=D.model,T=[],U=D.focusedChild,Z=this.getChildren();v.forEach(Z,function(V){w.prototype.removeChild.call(this,V)},this);this.defer(function(){v.forEach(Z,function(V){if(!V._destroyed&&!V.getParent()){D.dndController.removeTreeNode(V);(function da(W){var aa=O.getIdentity(W.item),ca=D._itemNodesMap[aa];1==ca.length?delete D._itemNodesMap[aa]:(aa=v.indexOf(ca,W),-1!=aa&&ca.splice(aa,1));v.forEach(W.getChildren(),
da)})(V);if(D.persist){var Y=v.map(V.getTreePath(),function(W){return D.model.getIdentity(W)}).join("/"),X;for(X in D._openedNodes)X.substr(0,Y.length)==Y&&delete D._openedNodes[X];D._saveExpandedNodes()}D.lastFocusedChild&&!c.isDescendant(D.lastFocusedChild.domNode,D.domNode)&&delete D.lastFocusedChild;U&&!c.isDescendant(U.domNode,D.domNode)&&D.focus();V.destroyRecursive()}})});this.state="Loaded";r&&0<r.length?(this.isExpandable=!0,v.forEach(r,function(V){var Y=O.getIdentity(V),X=D._itemNodesMap[Y];
if(X)for(var ba=0;ba<X.length;ba++)if(X[ba]&&!X[ba].getParent()){var W=X[ba];W.set("indent",this.indent+1);break}W||(W=this.tree._createTreeNode({item:V,tree:D,isExpandable:O.mayHaveChildren(V),label:D.getLabel(V),labelType:D.model&&D.model.labelType||"text",tooltip:D.getTooltip(V),ownerDocument:D.ownerDocument,dir:D.dir,lang:D.lang,textDir:D.textDir,indent:this.indent+1}),X?X.push(W):D._itemNodesMap[Y]=[W]);this.addChild(W);(this.tree.autoExpand||this.tree._state(W))&&T.push(D._expandNode(W))},this),
v.forEach(this.getChildren(),function(V){V._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);r=b(T);this.tree._startPaint(r);return C(r)},getTreePath:function(){for(var r=this,D=[];r&&r!==this.tree.rootNode;)D.unshift(r.item),r=r.getParent();D.unshift(this.tree.rootNode.item);return D},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(r){this.inherited(arguments);var D=this.getChildren();0==D.length&&
(this.isExpandable=!1,this.collapse());v.forEach(D,function(O){O._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(r){this.labelNode.setAttribute("aria-selected",r?"true":"false");d.toggle(this.rowNode,"dijitTreeRowSelected",r)},focus:function(){F.focus(this.focusNode)}});p("dojo-bidi")&&G.extend({_setTextDirAttr:function(r){!r||this.textDir==r&&this._created||(this._set("textDir",r),this.applyTextDir(this.labelNode),v.forEach(this.getChildren(),
function(D){D.set("textDir",r)},this))}});var M=H("dijit.Tree",[I,S,P,Q],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:q,persist:!1,autoExpand:!1,dndController:m,dndParams:"onDndDrop itemCreator onDndCancel checkAcceptance checkItemAcceptance dragThreshold betweenThreshold".split(" "),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,
checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(r,D){z.publish(this.id,a.mixin({tree:this,event:r},D||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new B;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var r=
this;this.own(k(this.containerNode,k.selector(".dijitTreeNode",K.enter),function(T){r._onNodeMouseEnter(J.byNode(this),T)}),k(this.containerNode,k.selector(".dijitTreeNode",K.leave),function(T){r._onNodeMouseLeave(J.byNode(this),T)}),k(this.containerNode,k.selector(".dijitTreeRow",t.press),function(T){r._onNodePress(J.getEnclosingWidget(this),T)}),k(this.containerNode,k.selector(".dijitTreeRow",t),function(T){r._onClick(J.getEnclosingWidget(this),T)}),k(this.containerNode,k.selector(".dijitTreeRow",
"dblclick"),function(T){r._onDblClick(J.getEnclosingWidget(this),T)}));this.model||this._store2model();this.own(x.after(this.model,"onChange",a.hitch(this,"_onItemChange"),!0),x.after(this.model,"onChildrenChange",a.hitch(this,"_onItemChildrenChange"),!0),x.after(this.model,"onDelete",a.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){a.isString(this.dndController)&&(this.dndController=a.getObject(this.dndController));for(var D={},O=0;O<this.dndParams.length;O++)this[this.dndParams[O]]&&
(D[this.dndParams[O]]=this[this.dndParams[O]]);this.dndController=new this.dndController(this,D)}this._load();this.onLoadDeferred=C(this.pendingCommandsPromise);this.onLoadDeferred.then(a.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;A.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var r={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(r.mayHaveChildren=
a.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&(r.getChildren=a.hitch(this,function(D,O,T){this.getItemChildren(this._v10Compat&&D===this.model.root?null:D,O,T)}));this.model=new N(r);this.showRoot=!!this.label},onLoad:function(){},_load:function(){this.model.getRoot(a.hitch(this,function(r){var D=this.rootNode=this.tree._createTreeNode({item:r,tree:this,isExpandable:!0,label:this.label||this.getLabel(r),labelType:this.model.labelType||"text",textDir:this.textDir,indent:this.showRoot?
0:-1});this.showRoot?(this.domNode.setAttribute("aria-multiselectable",!this.dndController.singular),this.rootLoadingIndicator.style.display="none"):(D.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(D.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(D.containerNode.setAttribute("aria-labelledby",
this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),D.labelNode.setAttribute("role","presentation"),D.labelNode.removeAttribute("aria-selected"),D.containerNode.setAttribute("role","tree"),D.containerNode.setAttribute("aria-expanded","true"),D.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(D.domNode);r=this.model.getIdentity(r);this._itemNodesMap[r]?this._itemNodesMap[r].push(D):this._itemNodesMap[r]=[D];D._updateLayout();
this._expandNode(D).then(a.hitch(this,function(){this._destroyed||(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),a.hitch(this,function(r){console.error(this,": error loading root: ",r)}))},getNodesByItem:function(r){if(!r)return[];r=a.isString(r)?r:this.model.getIdentity(r);return[].concat(this._itemNodesMap[r])},_setSelectedItemAttr:function(r){this.set("selectedItems",[r])},_setSelectedItemsAttr:function(r){var D=this;return this.pendingCommandsPromise=
this.pendingCommandsPromise.always(a.hitch(this,function(){var O=v.map(r,function(U){return!U||a.isString(U)?U:D.model.getIdentity(U)}),T=[];v.forEach(O,function(U){T=T.concat(D._itemNodesMap[U]||[])});this.set("selectedNodes",T)}))},_setPathAttr:function(r){return r.length?C(this.set("paths",[r]).then(function(D){return D[0]})):C(this.set("paths",[]).then(function(D){return D[0]}))},_setPathsAttr:function(r){function D(T,U){var Z=T.shift(),V=v.filter(U,function(Y){return Y.getIdentity()==Z})[0];
if(V)return T.length?O._expandNode(V).then(function(){return D(T,V.getChildren())}):V;throw new M.PathError("Could not expand path at "+Z);}var O=this;return C(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return b(v.map(r,function(T){T=v.map(T,function(U){return U&&a.isObject(U)?O.model.getIdentity(U):U});if(T.length)return D(T,[O.rootNode]);throw new M.PathError("Empty path");}))}).then(function(T){O.set("selectedNodes",T);return O.paths}))},_setSelectedNodeAttr:function(r){this.set("selectedNodes",
[r])},_setSelectedNodesAttr:function(r){this.dndController.setSelection(r)},expandAll:function(){function r(O){return D._expandNode(O).then(function(){var T=v.filter(O.getChildren()||[],function(U){return U.isExpandable});return b(v.map(T,r))})}var D=this;return C(r(this.rootNode))},collapseAll:function(){function r(O){var T=v.filter(O.getChildren()||[],function(U){return U.isExpandable});T=b(v.map(T,r));return!O.isExpanded||O==D.rootNode&&!D.showRoot?T:T.then(function(){return D._collapseNode(O)})}
var D=this;return C(r(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(r){return this.model.getLabel(r)},getIconClass:function(r,D){return!r||this.model.mayHaveChildren(r)?D?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(r,D){(r=this._getNext(D))&&r.isTreeNode&&this.focusNode(r)},
_onUpArrow:function(r,D){if(r=D.getPreviousSibling())for(D=r;D.isExpandable&&D.isExpanded&&D.hasChildren();)D=D.getChildren(),D=D[D.length-1];else if(r=D.getParent(),this.showRoot||r!==this.rootNode)D=r;D&&D.isTreeNode&&this.focusNode(D)},_onRightArrow:function(r,D){D.isExpandable&&!D.isExpanded?this._expandNode(D):D.hasChildren()&&(D=D.getChildren()[0])&&D.isTreeNode&&this.focusNode(D)},_onLeftArrow:function(r,D){D.isExpandable&&D.isExpanded?this._collapseNode(D):(r=D.getParent())&&r.isTreeNode&&
(this.showRoot||r!==this.rootNode)&&this.focusNode(r)},focusLastChild:function(){var r=this._getLast();r&&r.isTreeNode&&this.focusNode(r)},_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var r=this.rootNode;r.isExpanded;){var D=r.getChildren();if(!D.length)break;r=D[D.length-1]}return r},_getNext:function(r){if(r.isExpandable&&r.isExpanded&&r.hasChildren())return r.getChildren()[0];for(;r&&r.isTreeNode;){var D=r.getNextSibling();if(D)return D;
r=r.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(r,D){return c.isDescendant(r,D.expandoNode)||c.isDescendant(r,D.expandoNodeText)},_onNodePress:function(r,D){this.focusNode(r)},__click:function(r,D,O,T){var U=this.isExpandoNode(D.target,r);r.isExpandable&&(O||U)?this._onExpandoClick({node:r}):(this._publish("execute",{item:r.item,node:r,evt:D}),this[T](r.item,r,D),this.focusNode(r));D.stopPropagation();D.preventDefault()},_onClick:function(r,D){this.__click(r,D,this.openOnClick,
"onClick")},_onDblClick:function(r,D){this.__click(r,D,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(r){r=r.node;this.focusNode(r);r.isExpanded?this._collapseNode(r):this._expandNode(r)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(r){A.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(r)},_getRootOrFirstNode:function(){A.deprecated(this.declaredClass+
"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(r){r._expandNodeDeferred&&delete r._expandNodeDeferred;if("Loading"!=r.state&&r.isExpanded){var D=r.collapse();this.onClose(r.item,r);this._state(r,!1);this._startPaint(D);return D}},_expandNode:function(r){if(r._expandNodeDeferred)return r._expandNodeDeferred;var D=this.model,O=r.item,T=this;r._loadDeferred||(r.markProcessing(),r._loadDeferred=new B,D.getChildren(O,function(U){r.unmarkProcessing();
r.setChildItems(U).then(function(){r._loadDeferred.resolve(U)})},function(U){console.error(T,": error loading "+r.label+" children: ",U);r._loadDeferred.reject(U)}));D=r._loadDeferred.then(a.hitch(this,function(){var U=r.expand();this.onOpen(r.item,r);this._state(r,!0);return U}));this._startPaint(D);return D},focusNode:function(r){for(var D=[],O=this.domNode;O&&O.tagName&&"IFRAME"!==O.tagName.toUpperCase();O=O.parentNode)D.push({domNode:O.contentWindow||O,scrollLeft:O.scrollLeft||0,scrollTop:O.scrollTop||
0});this.focusChild(r);this.defer(function(){for(var T=0,U=D.length;T<U;T++)D[T].domNode.scrollLeft=D[T].scrollLeft,D[T].domNode.scrollTop=D[T].scrollTop},0)},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(r){var D=this.model.getIdentity(r);if(D=this._itemNodesMap[D]){var O=this.getLabel(r),T=this.getTooltip(r);v.forEach(D,function(U){U.set({item:r,label:O,tooltip:T});U._updateItemClasses(r)})}},_onItemChildrenChange:function(r,D){r=this.model.getIdentity(r);
(r=this._itemNodesMap[r])&&v.forEach(r,function(O){O.setChildItems(D)})},_onItemDelete:function(r){r=this.model.getIdentity(r);var D=this._itemNodesMap[r];D&&(v.forEach(D,function(O){this.dndController.removeTreeNode(O);var T=O.getParent();T&&T.removeChild(O);this.lastFocusedChild&&!c.isDescendant(this.lastFocusedChild.domNode,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!c.isDescendant(this.focusedChild.domNode,this.domNode)&&this.focus();O.destroyRecursive()},this),delete this._itemNodesMap[r])},
_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var r=L(this.cookieName);r&&v.forEach(r.split(","),function(D){this._openedNodes[D]=!0},this)}},_state:function(r,D){if(!this.persist)return!1;var O=v.map(r.getTreePath(),function(T){return this.model.getIdentity(T)},this).join("/");if(1===arguments.length)return this._openedNodes[O];D?this._openedNodes[O]=!0:delete this._openedNodes[O];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&this.cookieName){var r=
[],D;for(D in this._openedNodes)r.push(D);L(this.cookieName,r.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!a.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(r){r&&e.setMarginBox(this.domNode,r);this._nodePixelIndent=e.position(this.tree.indentDetector).w||
this._nodePixelIndent;this.expandChildrenDeferred.then(a.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},_outstandingPaintOperations:0,_startPaint:function(r){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var D=a.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&!this._adjustWidthsTimer&&this._started&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});
l(r,D,D)},_adjustWidths:function(){this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);this.containerNode.style.width="auto";this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%"},_createTreeNode:function(r){return new G(r)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});p("dojo-bidi")&&M.extend({_setTextDirAttr:function(r){r&&this.textDir!=r&&(this._set("textDir",
r),this.rootNode.set("textDir",r))}});M.PathError=n("TreePathError");M._TreeNode=G;return M})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(v,x,L,H){return L("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(B){H.mixin(this,B);this.connects=[];B=this.store;if(!B.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");
B.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([x.after(B,"onNew",H.hitch(this,"onNewItem"),!0),x.after(B,"onDelete",H.hitch(this,"onDeleteItem"),!0),x.after(B,"onSet",H.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var B;B=this.connects.pop();)B.remove()},getRoot:function(B,b){this.root?B(this.root):this.store.fetch({query:this.query,onComplete:H.hitch(this,function(c){if(1!=c.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+c.length+
" items, but must return exactly one");this.root=c[0];B(this.root)}),onError:b})},mayHaveChildren:function(B){return v.some(this.childrenAttrs,function(b){return this.store.hasAttribute(B,b)},this)},getChildren:function(B,b,c){var d=this.store;if(d.isItemLoaded(B)){for(var e=[],f=0;f<this.childrenAttrs.length;f++){var n=d.getValues(B,this.childrenAttrs[f]);e=e.concat(n)}var h=0;this.deferItemLoadingUntilExpand||v.forEach(e,function(A){d.isItemLoaded(A)||h++});0==h?b(e):v.forEach(e,function(A,y){d.isItemLoaded(A)||
d.loadItem({item:A,onItem:function(a){e[y]=a;0==--h&&b(e)},onError:c})})}else{var p=H.hitch(this,arguments.callee);d.loadItem({item:B,onItem:function(A){p(A,b,c)},onError:c})}},isItem:function(B){return this.store.isItem(B)},fetchItemByIdentity:function(B){this.store.fetchItemByIdentity(B)},getIdentity:function(B){return this.store.getIdentity(B)},getLabel:function(B){return this.labelAttr?this.store.getValue(B,this.labelAttr):this.store.getLabel(B)},newItem:function(B,b,c){var d={parent:b,attribute:this.childrenAttrs[0]},
e;this.newItemIdAttr&&B[this.newItemIdAttr]?this.fetchItemByIdentity({identity:B[this.newItemIdAttr],scope:this,onItem:function(f){f?this.pasteItem(f,null,b,!0,c):(e=this.store.newItem(B,d))&&void 0!=c&&this.pasteItem(e,b,b,!1,c)}}):(e=this.store.newItem(B,d))&&void 0!=c&&this.pasteItem(e,b,b,!1,c)},pasteItem:function(B,b,c,d,e){var f=this.store,n=this.childrenAttrs[0];b&&v.forEach(this.childrenAttrs,function(p){if(f.containsValue(b,p,B)){if(!d){var A=v.filter(f.getValues(b,p),function(y){return y!=
B});f.setValues(b,p,A)}n=p}});if(c)if("number"==typeof e){var h=f.getValues(c,n).slice();h.splice(e,0,B);f.setValues(c,n,h)}else f.setValues(c,n,f.getValues(c,n).concat(B))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(B,b){b&&this.getChildren(b.item,H.hitch(this,function(c){this.onChildrenChange(b.item,c)}))},onDeleteItem:function(B){this.onDelete(B)},onSetItem:function(B,b){if(-1!=v.indexOf(this.childrenAttrs,b))this.getChildren(B,H.hitch(this,function(c){this.onChildrenChange(B,
c)}));else this.onChange(B)}})})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(v,x,L,H,B){return x("dijit.tree.ForestStoreModel",B,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(b){this.root={store:this,root:!0,id:b.rootId,label:b.rootLabel,children:b.rootChildren}},mayHaveChildren:function(b){return b===this.root||this.inherited(arguments)},getChildren:function(b,c,d){b===
this.root?this.root.children?c(this.root.children):this.store.fetch({query:this.query,onComplete:H.hitch(this,function(e){this.root.children=e;c(e)}),onError:d}):this.inherited(arguments)},isItem:function(b){return b===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(b){if(b.identity==this.root.id){var c=b.scope||L.global;b.onItem&&b.onItem.call(c,this.root)}else this.inherited(arguments)},getIdentity:function(b){return b===this.root?this.root.id:this.inherited(arguments)},getLabel:function(b){return b===
this.root?this.root.label:this.inherited(arguments)},newItem:function(b,c,d){return c===this.root?(this.onNewRootItem(b),this.store.newItem(b)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(b,c,d,e,f){if(c===this.root&&!e)this.onLeaveRoot(b);this.inherited(arguments,[b,c===this.root?null:c,d===this.root?null:d,e,f]);if(d===this.root)this.onAddToRoot(b)},onAddToRoot:function(b){console.log(this,": item ",b," added to root")},onLeaveRoot:function(b){console.log(this,": item ",
b," removed from root")},_requeryTop:function(){var b=this.root.children||[];this.store.fetch({query:this.query,onComplete:H.hitch(this,function(c){this.root.children=c;if(b.length!=c.length||v.some(b,function(d,e){return c[e]!=d}))this.onChildrenChange(this.root,c)})})},onNewItem:function(b,c){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(b){-1!=v.indexOf(this.root.children,b)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(b,c,d,e){this._requeryTop();this.inherited(arguments)}})})},
"dijit/tree/_dndSelector":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/dnd/common dojo/dom dojo/mouse dojo/on dojo/touch ../a11yclick ./_dndContainer".split(" "),function(v,x,L,H,B,b,c,d,e,f,n){return x("dijit.tree._dndSelector",n,{constructor:function(){this.selection={};this.anchor=null;this.events.push(d(this.tree.domNode,e.press,H.hitch(this,"onMouseDown")),d(this.tree.domNode,e.release,H.hitch(this,"onMouseUp")),d(this.tree.domNode,e.move,H.hitch(this,
"onMouseMove")),d(this.tree.domNode,f.press,H.hitch(this,"onClickPress")),d(this.tree.domNode,f.release,H.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var h=[],p=this.selection,A;for(A in p)h.push(p[A]);return h},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(h,p){this.setSelection(this.getSelectedTreeNodes().concat([h]));p&&(this.anchor=h);return h},removeTreeNode:function(h){var p=
v.filter(this.getSelectedTreeNodes(),function(A){return!b.isDescendant(A.domNode,h.domNode)});this.setSelection(p);return h},isTreeNodeSelected:function(h){return h.id&&!!this.selection[h.id]},setSelection:function(h){var p=this.getSelectedTreeNodes();v.forEach(this._setDifference(p,h),H.hitch(this,function(A){A.setSelected(!1);this.anchor==A&&delete this.anchor;delete this.selection[A.id]}));v.forEach(this._setDifference(h,p),H.hitch(this,function(A){A.setSelected(!0);this.selection[A.id]=A}));this._updateSelectionProperties()},
_setDifference:function(h,p){v.forEach(p,function(A){A.__exclude__=!0});h=v.filter(h,function(A){return!A.__exclude__});v.forEach(p,function(A){delete A.__exclude__});return h},_updateSelectionProperties:function(){var h=this.getSelectedTreeNodes(),p=[],A=[];v.forEach(h,function(y){var a=y.getTreePath();A.push(y);p.push(a)},this);h=v.map(A,function(y){return y.item});this.tree._set("paths",p);this.tree._set("path",p[0]||[]);this.tree._set("selectedNodes",A);this.tree._set("selectedNode",A[0]||null);
this.tree._set("selectedItems",h);this.tree._set("selectedItem",h[0]||null)},onClickPress:function(h){if(!(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(h.target,this.current))){"mousedown"==h.type&&c.isLeft(h)&&h.preventDefault();var p="keydown"==h.type?this.tree.focusedChild:this.current;if(p){var A=B.getCopyKeyState(h),y=p.id;this.singular||h.shiftKey||!this.selection[y]?(this._doDeselect=!1,this.userSelect(p,A,h.shiftKey)):this._doDeselect=!0}}},onClickRelease:function(h){this._doDeselect&&
(this._doDeselect=!1,this.userSelect("keyup"==h.type?this.tree.focusedChild:this.current,B.getCopyKeyState(h),h.shiftKey))},onMouseMove:function(){this._doDeselect=!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(h,p){if(h===p)return 0;if("sourceIndex"in document.documentElement)return h.sourceIndex-p.sourceIndex;if("compareDocumentPosition"in document.documentElement)return h.compareDocumentPosition(p)&2?1:-1;if(document.createRange){var A=doc.createRange();A.setStartBefore(h);
h=doc.createRange();h.setStartBefore(p);return A.compareBoundaryPoints(A.END_TO_END,h)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");},userSelect:function(h,p,A){if(this.singular)this.anchor==h&&p?this.selectNone():(this.setSelection([h]),this.anchor=h);else if(A&&this.anchor){p=this._compareNodes(this.anchor.rowNode,h.rowNode);A=this.anchor;0>p?p=A:(p=h,h=A);for(A=[];p!=h;)A.push(p),p=this.tree._getNext(p);A.push(h);this.setSelection(A)}else this.selection[h.id]&&
p?this.removeTreeNode(h):p?this.addTreeNode(h,!0):(this.setSelection([h]),this.anchor=h)},getItem:function(h){return{data:this.selection[h],type:["treeNode"]}},forInSelectedItems:function(h,p){p=p||L.global;for(var A in this.selection)h.call(p,this.getItem(A),A,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(v,x,L,H,B,b){return x("dijit.tree._dndContainer",null,{constructor:function(c,d){this.tree=
c;this.node=c.domNode;H.mixin(this,d);this.containerState="";L.add(this.node,"dojoDndContainer");this.events=[B(this.node,b.enter,H.hitch(this,"onOverEvent")),B(this.node,b.leave,H.hitch(this,"onOutEvent")),v.after(this.tree,"_onNodeMouseEnter",H.hitch(this,"onMouseOver"),!0),v.after(this.tree,"_onNodeMouseLeave",H.hitch(this,"onMouseOut"),!0),B(this.node,"dragstart, selectstart",function(e){e.preventDefault()})]},destroy:function(){for(var c;c=this.events.pop();)c.remove();this.node=this.parent=
null},onMouseOver:function(c){this.current=c},onMouseOut:function(){this.current=null},_changeState:function(c,d){var e="dojoDnd"+c;c=c.toLowerCase()+"State";L.replace(this.node,e+d,e+this[c]);this[c]=d},_addItemClass:function(c,d){L.add(c,"dojoDndItem"+d)},_removeItemClass:function(c,d){L.remove(c,"dojoDndItem"+d)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"jimu/dijit/QueryableLayerChooserFromMap":function(){define(["dojo/_base/lang",
"dojo/_base/html","dojo/_base/declare","./LayerChooserFromMap"],function(v,x,L,H){return L([H],{baseClass:"jimu-queryable-layer-chooser-from-map",declaredClass:"jimu.dijit.QueryableLayerChooserFromMap",showImageLayer:!0,mustSupportStatistics:!1,ignoreVirtualLayer:!1,postMixInProperties:function(){this.inherited(arguments);this.filter=this.showImageLayer?H.createQueryableLayerFilter(this.mustSupportStatistics):H.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,this.mustSupportStatistics);
this.ignoreVirtualLayer&&(this.filter=H.andCombineFilters([this.filter,v.hitch(this,this._ignoreVirtualLayerFilter)]))},_ignoreVirtualLayerFilter:function(B){return B.getLayerType().then(function(b){return!("ArcGISDynamicMapServiceLayer"===b||"ArcGISTiledMapServiceLayer"===b||"GroupLayer"===b)})},postCreate:function(){this.inherited(arguments);x.addClass(this.domNode,"jimu-basic-layer-chooser-from-map")},getHandledItem:function(B){var b=this.inherited(arguments),c=B&&B.layerInfo;c=c&&c.layerObject;
b.url=c&&c.url||"";return b}})})},"widgets/DataAggregation/setting/EditFields":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/on dojo/Evented dojo/dom-construct dojo/query dijit/form/TextBox dijit/_TemplatedMixin dijit/registry jimu/BaseWidgetSetting jimu/dijit/SimpleTable jimu/dijit/Popup ./LookupList".split(" "),function(v,x,L,H,B,b,c,d,e,f,n,h,p,A){return v([n,e,B],{baseClass:"jimu-widget-setting-fields-critical-facilities",templateString:'\x3cdiv\x3e\x3cdiv data-dojo-attach-point\x3d"fieldsTable"\x3e\x3c/div\x3e\x3c/div\x3e',
_layerInfo:null,isRecognizedValues:null,type:"",addressFields:null,postCreate:function(){this.inherited(arguments);this.nls=x.mixin(this.nls,window.jimuNls.common);this._initFieldsTable();"fieldInfos"===this.type?(this.popupTitle=this.nls.configureFields,this._setFieldsTable(this._layerInfo.fieldInfos)):this._setAddressFieldsTable(this.addressFields)},popupEditPage:function(){var y=new p({titleLabel:this.popupTitle,width:this.disableDuplicateOption?640:800,maxHeight:600,autoHeight:!0,content:this,
buttons:[{label:this.nls.ok,onClick:x.hitch(this,function(){this._resetFieldInfos();y.close();this.emit("edit-fields-popup-ok")})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],onClick:x.hitch(this,function(){y.close();this.emit("edit-fields-popup-cancel")})}],onClose:x.hitch(this,function(){this.emit("edit-fields-popup-close")})})},_initFieldsTable:function(){var y=[{name:"visible",title:this.nls.display,type:"checkbox","class":"display",width:"100px",hidden:"undefined"===typeof this.disableDisplayOption?
!1:this.disableDisplayOption,onChange:x.hitch(this,this._visibleChange)},{name:"fieldName",title:this.nls.name,type:"text",width:"190px"},{name:"label",title:this.nls.editpageAlias,type:"extension",hidden:!1,width:"190px",create:x.hitch(this,this._createTextBox),setValue:x.hitch(this,this._setTextValue),getValue:x.hitch(this,this._getTextValue)},{name:"actions",title:this.nls.actions,type:"actions",actions:["up","down","edit"],"class":"actions",width:"90px"},{name:"duplicate",title:this.nls.duplicate,
type:"checkbox","class":"display",width:"170px",hidden:"undefined"===typeof this.disableDuplicateOption?!1:this.disableDuplicateOption},{name:"type",title:"",type:"text",editable:!0,hidden:!0},{name:"isRecognizedValues",title:"",type:"extension",hidden:!0,create:x.hitch(this,this._create),setValue:x.hitch(this,this._setValue),getValue:x.hitch(this,this._getValue)}];this._fieldsTable=new h({fields:y,selectable:!1,autoHeight:!0,style:{height:"300px",maxHeight:"300px"}});this._fieldsTable.placeAt(this.fieldsTable);
this._fieldsTable.startup();this.own(H(this._fieldsTable,"actions-edit",x.hitch(this,this._onEditFieldsClick)))},_visibleChange:function(y,a){(y=this._getCheckboxByClassName(".duplicate",y))&&y.setStatus(a.getValue())},_createTextBox:function(y){var a=new d({style:{height:"85%",width:"100%","margin-top":"-4px"}});y.labelBox=a;b.place(a.domNode,y)},_setTextValue:function(y,a){y.labelBox.set("value",a)},_getTextValue:function(y){return y.labelBox.get("value")},_setValue:function(y,a){y._isRecognizedValues=
a},_getValue:function(y){return y._isRecognizedValues},_setFieldsTable:function(y){var a=["esriFieldTypeOID","esriFieldTypeGlobalID"];L.forEach(y,function(k){if(k.type&&-1===a.indexOf(k.type)){var z=[k.fieldName];k.fieldName!==k.label&&z.push(k.label);(k=this._fieldsTable.addRow({fieldName:k.fieldName,label:k.label,visible:k.visible,type:k.type,duplicate:k.duplicate,isRecognizedValues:k.isRecognizedValues||z}))&&k.tr&&(z=this._getCheckboxByClassName(".visible",k.tr))&&this._visibleChange(k.tr,z)}},
this)},_getCheckboxByClassName:function(y,a){if((y=c(y,a))&&y.hasOwnProperty("length")&&0<y.length)return f.byNode(c(".jimu-checkbox",y[0])[0])},_setAddressFieldsTable:function(y){L.forEach(y,function(a){var k=navigator.language.toLowerCase();if(a.hasOwnProperty("fieldName")&&a.hasOwnProperty("isRecognizedValues"))a=this._fieldsTable.addRow(a);else{var z=a.localizedNames&&a.hasOwnProperty(k);a=this._fieldsTable.addRow({fieldName:z?a.localizedNames[k]:a.name,label:z?a.localizedNames[k]:a.alias,visible:a.hasOwnProperty("visible")?
a.visible:!1,type:"STRING",duplicate:a.hasOwnProperty("duplicate")?a.duplicate:!0,isRecognizedValues:this._getIsRecognizedValues(a)})}a&&a.tr&&(k=this._getCheckboxByClassName(".visible",a.tr))&&this._visibleChange(a.tr,k)},this)},_getIsRecognizedValues:function(y){var a=navigator.language.toLowerCase(),k=y.recognizedNames&&y.recognizedNames.hasOwnProperty(a),z=y.isRecognizedValues;return z?z:k?y.recognizedNames[a]:[y.name]},_onIsRecognizedListChanged:function(y){var a=this._fieldsTable.getRowData(y);
a.isRecognizedValues=this.isRecognizedValues;this._fieldsTable.editRow(y,a)},_resetFieldInfos:function(){var y=[],a=this._fieldsTable.getData();L.forEach(a,function(k){y.push({fieldName:k.fieldName,label:""!==k.label?k.label:k.fieldName,visible:k.visible,type:k.type,duplicate:k.duplicate,isRecognizedValues:k.isRecognizedValues})});"fieldInfos"===this.type?this._layerInfo.fieldInfos=y:this.fieldInfos=y},_onEditFieldsClick:function(y){var a=this._fieldsTable.getRowData(y);y=new A({nls:this.nls,row:y,
rowData:a});var k=new p({width:400,autoHeight:!0,content:y,titleLabel:this.nls.lookupList+": "+a.fieldName,buttons:[{label:this.nls.ok,onClick:x.hitch(this,function(){var z=k.content.sourceList.getData();this.isRecognizedValues=[];L.forEach(z,x.hitch(this,function(K){-1===this.isRecognizedValues.indexOf(K.name)&&K.name!==this.nls.newNamePlaceholder&&this.isRecognizedValues.push(K.name)}));this._onIsRecognizedListChanged(k.content.row);k.close()})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],
onClick:x.hitch(this,function(){k.close()})}],onClose:x.hitch(this,function(){})})}})})},"widgets/DataAggregation/setting/LookupList":function(){define("dojo/_base/declare dijit/_WidgetsInTemplateMixin jimu/BaseWidget dojo/Evented jimu/dijit/SimpleTable dojo/dom-style dojo/dom-construct dojo/_base/lang dojo/_base/array dijit/form/TextBox".split(" "),function(v,x,L,H,B,b,c,d,e,f){return v([L,x,H],{templateString:'\x3cdiv style\x3d"width: 100%; height: 100%;"\x3e\x3cdiv class\x3d"hintText"\x3e\x3cp\x3e${nls.isRecognized}\x3c/p\x3e\x3c/div\x3e\x3cdiv class\x3d"is-recognized-add-button" role\x3d"button" data-dojo-attach-event\x3d"click:addRow"\x3e\x3cdiv class\x3d"button"\x3e\x3cspan class\x3d"button-text"\x3e${nls.add}\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"is-recognized-source-list jimu-float-leading"\x3e\x3cdiv class\x3d"source-list-table" data-dojo-attach-point\x3d"sourceList"/\x3e\x3c/div\x3e\x3c/div\x3e',
baseClass:"jimu-widget-setting-critical-facilities",row:null,values:[],isRecognizedValues:void 0,constructor:function(n){this.nls=n.nls;this.row=n.row;this.fieldName=n.rowData.fieldName;this.label=n.rowData.label;this.isRecognizedValues=n.rowData.isRecognizedValues},postMixInProperties:function(){this.inherited(arguments);this.nls.common=window.jimuNls.common},postCreate:function(){this.inherited(arguments);this._initList();this.isRecognizedValues&&this.isRecognizedValues.hasOwnProperty("length")?
e.forEach(this.isRecognizedValues,d.hitch(this,function(n){this.addRow(n)})):(this.addRow(this.fieldName),this.fieldName!==this.label&&this.addRow(this.label))},addRow:function(n){(n=this.sourceList.addRow({name:n instanceof MouseEvent?this.nls.newNamePlaceholder:n}))&&n.success||console.error("add row failed ",n)},_initList:function(){this.sourceList=new B({autoHeight:!1,selectable:!0,fields:[{name:"name",title:this.nls.name,type:"extension",hidden:!1,create:d.hitch(this,this._createTextBox),setValue:d.hitch(this,
this._setTextValue),getValue:d.hitch(this,this._getTextValue)},{name:"actions",title:"",width:"70px",type:"actions",actions:["up","down","delete"]}]},this.sourceList);b.set(this.sourceList.domNode,"height","100%");this.sourceList.startup()},_createTextBox:function(n){var h=new f({style:{height:"85%",width:"100%","margin-top":"-4px"}});n.labelBox=h;c.place(h.domNode,n);h.focus()},_setTextValue:function(n,h){n.labelBox.set("value",h)},_getTextValue:function(n){return n.labelBox.get("value")}})})},"widgets/DataAggregation/setting/ChooseLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/on dojo/text!./ChooseLayer.html dijit/_TemplatedMixin jimu/BaseWidgetSetting jimu/dijit/Popup jimu/dijit/LayerChooserFromMapWithDropbox dojo/Evented".split(" "),
function(v,x,L,H,B,b,c,d,e,f){return v([c,f,b],{baseClass:"jimu-widget-critical-facilities-setting-chooseLayer",templateString:B,layerSelector:null,chooseFromLayerPopup:null,postCreate:function(){this.inherited(arguments);this._createPopUp()},_addLayerSelectors:function(){this.layerSelector=new e({layerChooser:this.layerChooserFromMap});this.layerSelector.placeAt(this.layerSelectorDiv);this.layerSelector.startup();0<this.layerSelector.layerChooser.getAllItems().length&&this.layerSelector.setSelectedLayer(this.layerSelector.setSelectedLayer(this.layerSelector.layerChooser.getAllItems()[0].layerInfo.layerObject))},
_createPopUp:function(){this._addLayerSelectors();this.chooseFromLayerPopup=new d({titleLabel:this.nls.addTargetLayersLabel,width:500,maxHeight:300,autoHeight:!0,"class":this.baseClass,content:this,buttons:[{label:this.nls.ok,onClick:x.hitch(this,function(){this.emit("layerSelected",this.layerSelector.getSelectedItem().layerInfo);this.chooseFromLayerPopup.close()})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],onClick:x.hitch(this,function(){this.chooseFromLayerPopup.close()})}]})}})})},
"widgets/DataAggregation/setting/LocatorSourceSetting":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/on dojo/dom-class dojo/Evented dojo/Deferred dojo/query dojo/dom-style dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin jimu/portalUrlUtils jimu/dijit/Message jimu/dijit/_GeocodeServiceChooserContent jimu/dijit/Popup jimu/dijit/LoadingShelter jimu/dijit/CheckBox esri/request esri/lang ./EditFields jimu/utils dojo/text!./LocatorSourceSetting.html dijit/form/ValidationTextBox dijit/form/NumberTextBox".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R){return v([n,h,p,c],{baseClass:"jimu-widget-search-locator-source-setting",tr:null,nls:null,config:null,singleLineFieldName:null,templateString:R,parent:null,_locatorDefinition:null,_esriLocatorRegExp:/http(s)?:\/\/geocode(.){0,3}\.arcgis.com\/arcgis\/rest\/services\/World\/GeocodeServer/g,serviceChooserContent:null,geocoderPopup:null,addressFields:null,_clickSet:!1,postCreate:function(){this.inherited(arguments);this.exampleHint=this.nls.locatorExample+
": http://\x26lt;myServerName\x26gt;/arcgis/rest/services/World/GeocodeServer";this.multiEnabled=this.singleEnabled=!1;this.enableSingleField=this._initCheckBox(this.enableSingleField,this.nls.enableSingleField,this.editSingleFields);this.enableMultiField=this._initCheckBox(this.enableMultiField,this.nls.enableMultiField,this.editMultiFields);this.own(B(this.editSingleFields,"click",x.hitch(this,this._editFields,"single")));this.own(B(this.editMultiFields,"click",x.hitch(this,this._editFields,"multi")));
this._setMessageNodeContent(this.exampleHint);this.config=this.config?this.config:{};this.setConfig(this.config)},_initCheckBox:function(I,P,w){I=new K({checked:!1,label:P},I);this._toggleNode(w,!1);this.own(B(I,"change",x.hitch(this,function(){var u=I.getValue();switch(I.label){case this.nls.enableSingleField:this.singleEnabled=u;this.tr&&(this.tr.singleEnabled=u);break;case this.nls.enableMultiField:this.multiEnabled=u,this.tr&&(this.tr.multiEnabled=u)}this._toggleNode(w,u);this.parent.validateAddressOptions()})));
return I},setRelatedTr:function(I){this.tr=I;this._setDefaultRowOptions()},_setDefaultRowOptions:function(){this.tr.singleEnabled=this.singleEnabled;this.tr.multiEnabled=this.multiEnabled;this.tr.addressFields=this.addressFields;this.tr.noFieldsNode=this.noFields;this.parent.validateAddressOptions()},getRelatedTr:function(){return this.tr},setDefinition:function(I){this._locatorDefinition=I||{}},getDefinition:function(){return this._locatorDefinition},setConfig:function(I){if("[object Object]"===
Object.prototype.toString.call(I)){var P=I.url;P&&(this.config=I,"undefined"!==typeof this.config.singleEnabled&&(this.singleEnabled=this.config.singleEnabled),this.enableSingleField.setValue(this.singleEnabled),"undefined"!==typeof this.config.multiEnabled&&(this.multiEnabled=this.config.multiEnabled),this.enableMultiField.setValue(this.multiEnabled),"undefined"!==typeof this.config.addressFields&&(this.addressFields=this.config.addressFields),"undefined"!==typeof this.config.singleLineFieldName&&
(this.singleLineFieldName=this.config.singleLineFieldName),"undefined"!==typeof this.config.singleAddressFields&&this.config.singleAddressFields.hasOwnProperty("length")&&0<this.config.singleAddressFields.length&&(this.singleLineField=this.config.singleAddressFields[0]),"undefined"!==typeof this.config.singleAddressFields&&(this.singleAddressFields=this.config.singleAddressFields),this.shelter||(this.shelter=new z({hidden:!0}),this.shelter.placeAt(this.detailsSection)),this.shelter.show(),this._locatorDefinition.url!==
P?this._getDefinitionFromRemote(P).then(x.hitch(this,function(w){P&&w&&"error"!==w.type?(this._locatorDefinition=w,this._locatorDefinition.url=P,this._setSourceItems(),this._setAddressFields(P,this.config),this._setMessageNodeContent(this.exampleHint),this._updateNameText(!1)):P&&w&&"error"===w.type&&(this._setSourceItems(),this._disableSourceItems(),this._updateNameText(!0),this._setMessageNodeContent(t.substitute({URL:w.url},x.clone(this.nls.invalidUrlTip)),!0));this.shelter.hide()})):(this._setSourceItems(),
this._setMessageNodeContent(this.exampleHint),this.shelter.hide()))}},_updateNameText:function(I){if(this.tr){var P=e(".normal-text-div",this.tr)[0];P&&(P.title=I?this.nls.locatorError:P.textContent,f.set(P,"color",I?"red":""));this.tr.isDisabled=I}},isValidConfig:function(){var I=this.getConfig();return I.url&&I.name&&I.singleLineFieldName&&(this.enableSingleField.checked||this.enableMultiField.checked||this.enableXYField.checked)&&I.isValidMultiFieldOptions?!0:!1},showValidationTip:function(){this._showValidationErrorTip(this.locatorUrl);
this._showValidationErrorTip(this.locatorName)},getConfig:function(){return{url:this.locatorUrl.get("value"),name:J.stripHTML(this.locatorName.get("value")),singleEnabled:this.singleEnabled,multiEnabled:this.multiEnabled,singleLineFieldName:this.singleLineFieldName,addressFields:this.addressFields,singleAddressFields:this.singleAddressFields,countryCode:J.stripHTML(this.countryCode.get("value")),minCandidateScore:parseInt(J.stripHTML(this.minCandidateScore.get("value").toString()),10),type:"locator",
isValidMultiFieldOptions:this.multiEnabled?!b.contains(this.noFields,"display-block"):!0}},_editFields:function(I){switch(I){case "single":I=e(".jimu-state-disabled",this.enableSingleField.domNode);this.singleEnabled&&0===I.length&&this._editSingleAddressFieldsTableValues(this.singleAddressFields);break;case "multi":I=e(".jimu-state-disabled",this.enableMultiField.domNode),this.multiEnabled&&0===I.length&&this._editMultiAddressFieldsTableValues()}},_editSingleAddressFieldsTableValues:function(I){if(this.singleLineField){var P=
new F({nls:this.nls,type:"locatorFields",addressFields:I||[this.singleLineField],popupTitle:this.nls.configureSingleFields,disableDisplayOption:!0,disableDuplicateOption:!0});this.own(B(P,"edit-fields-popup-ok",x.hitch(this,function(){this.singleAddressFields=P.fieldInfos;this.tr.singleAddressFields=P.fieldInfos;this.parent.validateAddressOptions()})));P.popupEditPage()}},_editMultiAddressFieldsTableValues:function(){var I=new F({nls:this.nls,type:"locatorFields",addressFields:this.addressFields,
popupTitle:this.nls.configureMultiFields,disableDisplayOption:!1,disableDuplicateOption:!0});this.own(B(I,"edit-fields-popup-ok",x.hitch(this,function(){this.addressFields=I.fieldInfos;this.tr.addressFields=I.fieldInfos;this.parent.validateAddressOptions()})));I.popupEditPage()},_onLocatorNameBlur:function(){this.locatorName.set("value",J.stripHTML(this.locatorName.get("value")))},_onCountryCodeBlur:function(){this.countryCode.set("value",J.stripHTML(this.countryCode.get("value")))},_onMinCandidateScoreBlur:function(){var I=
parseInt(J.stripHTML(this.minCandidateScore.get("value").toString()),10);this.minCandidateScore.set("value",I)},_disableSourceItems:function(){this.locatorName.set("disabled",!0);this.countryCode.set("disabled",!0);this.minCandidateScore.set("disabled",!0);this._toggleSourceFields([this.enableSingleField.domNode,this.enableMultiField.domNode],[".checkbox",".label"],!0);this._toggleNode(this.editSingleFields,!1);this._toggleNode(this.editMultiFields,!1)},_toggleSourceFields:function(I,P,w){L.forEach(I,
function(u){L.forEach(P,function(Q){Q=e(Q,u)[0];w&&(H.addClass(Q,"jimu-state-disabled"),H.addClass(Q,"pointer-events-none"))})})},_enableSourceItems:function(){this.locatorName.set("disabled",!1);this.countryCode.set("disabled",!1);this.minCandidateScore.set("disabled",!1);this.enableSingleField.set("disabled",!1);this.enableMultiField.set("disabled",!1)},_setSourceItems:function(){var I=this.config;I.url&&(this.locatorUrl.set("value",I.url),this._processCountryCodeRow(I.url),this._processMinCandidateScoreRow(I.url),
this._setAddressFields(I.url,this.config));I.name&&this.locatorName.set("value",J.stripHTML(I.name));I.singleLineFieldName&&(this.singleLineFieldName=I.singleLineFieldName);I.countryCode&&this.countryCode.set("value",J.stripHTML(I.countryCode));I.minCandidateScore&&this.minCandidateScore.set("value",parseInt(J.stripHTML(I.minCandidateScore.toString()),10));this._enableSourceItems()},_setAddressFields:function(I,P){if(I||P)P&&P.addressFields&&P.singleAddressFields?(this.addressFields=P.addressFields,
this.singleLineFieldName=P.singleLineFieldName,this.singleLineField=P.singleAddressFields[0],this.singleAddressFields=P.singleAddressFields,this.parent.validateAddressOptions()):l({url:I,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(x.hitch(this,function(w){w&&w.addressFields&&(this.addressFields=w.addressFields,L.forEach(this.addressFields,x.hitch(this,function(u){u.isRecognizedValues=this._getIsRecognizedValues(u)})));w&&w.singleLineAddressField&&w.singleLineAddressField.name&&
(this.singleLineField=w.singleLineAddressField,this.singleLineFieldName=this.singleLineField.name,this.singleAddressFields=[this.singleLineField],this.singleLineField.isRecognizedValues=this._getIsRecognizedValues(this.singleLineField))}),x.hitch(this,function(w){console.error(w)}))},_getIsRecognizedValues:function(I){var P=navigator.language.toLowerCase(),w=I.recognizedNames&&I.recognizedNames.hasOwnProperty(P),u=I.isRecognizedValues;return u?u:w?I.recognizedNames[P]:[I.name]},_isEsriLocator:function(I){this._esriLocatorRegExp.lastIndex=
0;return this._esriLocatorRegExp.test(I)},_getDefinitionFromRemote:function(I){var P=new d;if(this._isEsriLocator(I))P.resolve({singleLineAddressField:{name:"SingleLine",fieldName:"SingleLine",type:"esriFieldTypeString",alias:"Single Line Input",label:"Single Line Input",required:!1,length:200,localizedNames:{},recognizedNames:{}},capabilities:"Geocode,ReverseGeocode,Suggest"});else{var w=l({url:I,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});this.own(w);w.then(x.hitch(this,function(u){P.resolve(u)}),
x.hitch(this,function(u){console.error(u);P.resolve({type:"error",url:this._getRequestUrl(I)})}))}return P.promise},_setMessageNodeContent:function(I,P){H.empty(this.messageNode);I.nodeType||(I=H.toDom(I));H.place(I,this.messageNode);P?H.addClass(this.messageNode,"error-message"):H.removeClass(this.messageNode,"error-message")},_getRequestUrl:function(I){var P=window.location.protocol;return"http:"===P?A.setHttpProtocol(I):"https:"===P?A.setHttpsProtocol(I):I},_onSetLocatorUrlClick:function(){this._clickSet=
!0;this._openServiceChooser()},_openLocatorChooser:function(){this._clickSet=!1;this._openServiceChooser()},_openServiceChooser:function(){this.serviceChooserContent=new a({url:this.locatorUrl.get("value")||""});this.shelter=new z({hidden:!0});this.geocoderPopup=new k({titleLabel:this.nls.setGeocoderURL,autoHeight:!0,content:this.serviceChooserContent.domNode,container:window.jimuConfig.layoutId,width:640});this.shelter.placeAt(this.geocoderPopup.domNode);H.setStyle(this.serviceChooserContent.domNode,
"width","580px");H.addClass(this.serviceChooserContent.domNode,"override-geocode-service-chooser-content");this.serviceChooserContent.own(B(this.serviceChooserContent,"validate-click",x.hitch(this,function(){H.removeClass(this.serviceChooserContent.domNode,"override-geocode-service-chooser-content")})));this.serviceChooserContent.own(B(this.serviceChooserContent,"ok",x.hitch(this,"_onSelectLocatorUrlOk")));this.serviceChooserContent.own(B(this.serviceChooserContent,"cancel",x.hitch(this,"_onSelectLocatorUrlCancel")))},
_onSelectLocatorUrlOk:function(I){if(I&&I[0]&&I[0].url&&this.domNode){this.shelter.show();var P=I[0].url;l({url:P,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(x.hitch(this,function(w){this.shelter.hide();if(w&&w.singleLineAddressField&&w.singleLineAddressField.name){this._enableSourceItems();this.locatorUrl.set("value",P);if(!this.locatorName.get("value")){if("string"!==typeof P)return"geocoder";var u=P.split("/");this.locatorName.set("value",u[u.length-2]||"geocoder")}this.singleLineFieldName=
w.singleLineAddressField.name;this.singleLineField=w.singleLineAddressField;this._processCountryCodeRow(P);this._processMinCandidateScoreRow(P);this._locatorDefinition=w;this._locatorDefinition.url=P;this._setAddressFields(P,this.config);this._clickSet?this.emit("reselect-locator-url-ok",this.getConfig()):this.emit("select-locator-url-ok",this.getConfig());this.geocoderPopup&&(this.geocoderPopup.close(),this.geocoderPopup=null);this._setMessageNodeContent(this.exampleHint)}else new y({message:this.nls.locatorWarning})}),
x.hitch(this,function(w){console.error(w);this.shelter.hide();new y({message:t.substitute({URL:this._getRequestUrl(P)},x.clone(this.nls.invalidUrlTip))})}))}},_onSelectLocatorUrlCancel:function(){this.geocoderPopup&&(this.geocoderPopup.close(),this.geocoderPopup=null,this.emit("select-locator-url-cancel"))},_toggleNode:function(I,P){I&&(H.removeClass(I,P?"edit-fields-disabled":"edit-fields"),H.addClass(I,P?"edit-fields":"edit-fields-disabled"))},_processCountryCodeRow:function(I){this._isEsriLocator(I)?
(this.countryCode.set("value",""),H.removeClass(this.countryCodeRow,"hide-country-code-row")):H.addClass(this.countryCodeRow,"hide-country-code-row")},_processMinCandidateScoreRow:function(I){this._isEsriLocator(I)?(this.minCandidateScore.set("value",""),H.removeClass(this.minCandidateScoreRow,"hide-country-code-row")):H.addClass(this.minCandidateScoreRow,"hide-country-code-row")},_showValidationErrorTip:function(I){if(!I.validate()&&I.domNode&&I.focusNode){var P=I.get("disabled");P&&I.set("disabled",
!1);I.focusNode.focus();setTimeout(x.hitch(this,function(){I.focusNode.blur();P&&I.set("disabled",!0);I=null}),100)}}})})},"jimu/dijit/_GeocodeServiceChooserContent":function(){define(["dojo/_base/declare","./_BasicServiceChooserContent","./GeocodeServiceBrowser"],function(v,x,L){return v([x],{baseClass:"jimu-geocode-service-chooser-content",_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/folder","http://myserver/arcgis/rest/services/myservice/GeocodeServer"],
_createServiceBrowser:function(H){return new L(H)}})})},"jimu/dijit/_BasicServiceChooserContent":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/_BasicServiceChooserContent.html dojo/Evented dojo/Deferred dojo/_base/html dojo/_base/array dojo/_base/lang dojo/on dojo/aspect dojo/promise/all jimu/dijit/URLInput jimu/dijit/LoadingIndicator".split(" "),function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y){return v([x,L,H,b],{templateString:B,
_examples:["http://myserver/arcgis/rest/services","http://myserver/arcgis/rest/services/folder","http://myserver/arcgis/rest/services/myservice/servicetype"],multiple:!1,url:"",getSelectedItems:function(){return this.serviceBrowser.getSelectedItems()},postMixInProperties:function(){this.nls=f.mixin({},window.jimuNls.common);this.nls=f.mixin(this.nls,window.jimuNls.basicServiceChooser)},postCreate:function(){this.inherited(arguments);d.addClass(this.domNode,"jimu-basic-service-chooser-content");this.multiple=
!!this.multiple;this._initSelf();this.exampleTd.innerHTML=this.exampleTd.innerHTML},setUrl:function(a){var k=new c;(this.url=a)&&"string"===typeof this.url?(this.urlInput.set("value",this.url),k=this._onBtnValidateClick()):k.reject();return k},focusInput:function(){this.urlInput.focus()},_initSelf:function(){this._examples&&0<this._examples.length?e.forEach(this._examples,f.hitch(this,function(k){d.create("div",{innerHTML:k,"class":"example-url"},this.exampleTd)})):d.setStyle(this.exampleTr,"display",
"none");var a={multiple:this.multiple,_onTreeClick:f.hitch(this,this._onTreeClick)};this.serviceBrowser=this._createServiceBrowser(a);this.serviceBrowser.placeAt(this.serviceBrowserContainer);this.serviceBrowser.startup();this.own(h.after(this.urlInput,"validator",f.hitch(this,this._afterUrlValidate)));this.url&&"string"===typeof this.url&&this.urlInput.set("value",this.url);this.own(n(this.serviceBrowser,"error",f.hitch(this,this._onServiceBrowserError)))},_createServiceBrowser:function(a){},_validateUrl:function(a){a=
a.replace(/\/*$/g,"");if((a=a.match(/\/rest\/services\/*(.*)/gi))&&0<a.length)if(a=a[0].replace(/\/rest\/services\/*/,"")){var k=a.split("/");if(1===k.length)return!0;if(2===k.length)return this.serviceBrowser.isServiceTypeSupported(k[1]);if(3<=k.length)return a=this.serviceBrowser.isServiceTypeSupported(k[1]),k=this.serviceBrowser.isServiceTypeSupported(k[2]),a||k}else return!0;else return!1},_afterUrlValidate:function(a){a&&(a=this.urlInput.get("value"),a=this._validateUrl(a));a?d.removeClass(this.btnValidate,
"jimu-state-disabled"):d.addClass(this.btnValidate,"jimu-state-disabled");return a},_onServiceBrowserError:function(a){this._showErrorMessage(a)},_showErrorMessage:function(a){a&&"string"===typeof a?(this.errorNode.innerHTML=a,d.addClass(this.errorSection,"visible")):d.removeClass(this.errorSection,"visible")},_clearErrorMessage:function(){this.errorNode.innerHTML="";d.removeClass(this.errorSection,"visible")},_onBtnValidateClick:function(){this._clearErrorMessage();var a=new c;if(this.urlInput.validate()){var k=
this.urlInput.get("value");this.serviceBrowser.setUrl(k).then(f.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();a.resolve()}),f.hitch(this,function(){this.domNode&&this._checkSelectedItemsNumber();a.reject()}));this.emit("validate-click")}else a.reject();return a},_checkSelectedItemsNumber:function(){0<this.getSelectedItems().length?d.removeClass(this.btnOk,"jimu-state-disabled"):d.addClass(this.btnOk,"jimu-state-disabled")},_onTreeClick:function(){this._checkSelectedItemsNumber()},
_onBtnOkClick:function(){var a=this.getSelectedItems();0<a.length&&this.emit("ok",a)},_onBtnCancelClick:function(){this.emit("cancel")}})})},"jimu/dijit/GeocodeServiceBrowser":function(){define(["dojo/_base/declare","./_BasicServiceBrowser","dojo/_base/lang","dojo/_base/array","jimu/serviceBrowserRuleUtils"],function(v,x,L,H,B){return v([x],{baseClass:"jimu-geocode-service-browser",declaredClass:"jimu.dijit.GeocodeServiceBrowser",url:"",multiple:!1,postMixInProperties:function(){this.inherited(arguments);
this.rule=B.getGeocodeServiceBrowserRule()},getSelectedItems:function(){var b=this.inherited(arguments);return b=H.map(b,L.hitch(this,function(c){return{name:c.name,url:c.url}}))}})})},"jimu/dijit/_BasicServiceBrowser":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/Evented dojo/_base/lang dojo/_base/html dojo/_base/array dojo/Deferred dojo/promise/all dojo/store/Memory dojo/store/Observable dijit/tree/ObjectStoreModel jimu/utils jimu/dijit/_Tree jimu/dijit/LoadingIndicator".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A,y){return v([x,L,H,B],{templateString:'\x3cdiv style\x3d"width:100%;"\x3e\x3cdiv data-dojo-attach-point\x3d"shelter"  data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d"hidden:true"\x3e\x3c/div\x3e\x3c/div\x3e',_store:null,_id:0,_currentUrl:"",_treeClass:"service-browser-tree",_def:null,url:"",multiple:!1,rule:null,postMixInProperties:function(){this.nls=window.jimuNls.basicServiceBrowser},postCreate:function(){this.inherited(arguments);c.addClass(this.domNode,
"jimu-basic-service-browser");this.multiple=!!this.multiple;this._createTree();this.url&&"string"===typeof this.url&&this.setUrl(this.url)},reset:function(){this.url="";this._clear()},getSelectedItems:function(){return this.tree.getSelectedItems()},setUrl:function(a){this._def&&(this._def.isFulfilled()||this._def.cancel(),this._def=null);this._def=new e;a&&"string"===typeof a&&a.replace(/\/*$/g,"")||this._def.reject();a=a.replace(/\/*$/g,"");a=b.trim(a);var k=a.match(/^http(s?):\/\//gi);k&&0<k.length||
(a="http://"+a);if(!(0>=a.search(/\/rest\/services/i))&&(this._clear(),this._currentUrl=a))return a=this._getRootItem(),a=A.isStringEndWith(this._currentUrl,"rest/services")?this._searchBaseServiceUrl(this._currentUrl,a):this._isUrlContainsServiceType(this._currentUrl)?this._searchServiceUrl(this._currentUrl,a):this._searchFolderServiceUrl(this._currentUrl,a),this.shelter.show(),a.then(b.hitch(this,function(z){this.domNode&&this.shelter.hide();var K=this.tree.getAllLeafTreeNodeWidgets();1===K.length&&
K[0].select();this._def.resolve(z)}),b.hitch(this,function(z){this.domNode&&this.shelter.hide();this._showRequestError();this._def.reject(z)})),this._def;this._def.reject()},_getItem:function(a){return this.rule.getItem(a)},_getSubItemUrls:function(a){return this.rule.getSubItemUrls(a)},_getSubItems:function(a){var k=new e;this._getSubItemUrls(a).then(b.hitch(this,function(z){z=d.map(z,b.hitch(this,function(K){return this._getItem(K)}));f(z).then(b.hitch(this,function(K){K=d.filter(K,b.hitch(this,
function(l){return l&&"object"===typeof l}));k.resolve(K)}),b.hitch(this,function(K){k.reject(K)}))}),b.hitch(this,function(z){k.reject(z)}));return k},_selectFirstLeafTreeNodeWidget:function(){var a=this.tree.getAllLeafTreeNodeWidgets();1===a.length&&a[0].select()},isLeafItem:function(a){return 0<=this.rule.leafTypes.indexOf(a.type)},isServiceTypeSupported:function(a){return this.rule.isServiceTypeSupported(a)},_getStringEndWith:function(a,k){var z="",K=a.indexOf(k);0<=K&&(z=a.slice(0,K+k.length));
return z},_isUrlContainsServiceType:function(a){return this.rule.isUrlContainsServiceType(a)},_getBaseServiceUrl:function(){return this._getStringEndWith(this._currentUrl,"rest/services")},_getServiceName:function(a){var k="";a=a.split("/");return k=a[a.length-1]},_searchBaseServiceUrl:function(a,k){var z=new e;this._getRestInfo(a).then(b.hitch(this,function(K){if(this.domNode){var l=[];d.map(K.folders,b.hitch(this,function(t){var F={name:t,type:"folder",url:a+"/"+t,parent:k.id};this._addItem(F);
var J=new e;this._doSearchFolderServiceUrl(F.url,F.id).then(b.hitch(this,function(R){0<R.length?d.forEach(R,b.hitch(this,function(I){I.parent=F.id;this._addItem(I)})):this._removeItem(F.id);J.resolve()}),b.hitch(this,function(R){J.reject(R)}));l.push(J);return J}));d.forEach(K.services,b.hitch(this,function(t){if(this.isServiceTypeSupported(t.type)){t=a+"/"+t.name+"/"+t.type;var F=new e;this.rule.getItem(t).then(b.hitch(this,function(J){J&&(J.parent=k.id,this._addItem(J));F.resolve()}),b.hitch(this,
function(J){console.error(J);F.reject(J)}));l.push(F)}}));f(l).then(b.hitch(this,function(){this.domNode&&z.resolve()}),b.hitch(this,function(t){console.error(t);this.domNode&&z.reject(t)}))}}),b.hitch(this,function(K){console.error(K);this.domNode&&z.reject({errorCode:"NETWORK_ERROR",error:K})}));return z},_searchFolderServiceUrl:function(a,k){var z=new e;this._doSearchFolderServiceUrl(a,k).then(b.hitch(this,function(K){this.domNode&&(d.forEach(K,b.hitch(this,function(l){l.parent=k.id;this._addItem(l)})),
z.resolve())}),b.hitch(this,function(K){console.error(K);this.domNode&&z.reject({errorCode:"NETWORK_ERROR",error:K})}));return z},_doSearchFolderServiceUrl:function(a){var k=new e,z=this._getBaseServiceUrl();this._getRestInfo(a).then(b.hitch(this,function(K){K=K.services;var l=[];K&&0<K.length&&d.forEach(K,b.hitch(this,function(t){this.isServiceTypeSupported(t.type)&&(t=this.rule.getItem(z+"/"+t.name+"/"+t.type),l.push(t))}));f(l).then(b.hitch(this,function(t){t=d.filter(t,b.hitch(this,function(F){return F}));
k.resolve(t)}),b.hitch(this,function(t){console.error(t);k.reject(t)}))}),b.hitch(this,function(K){console.error(K);k.reject(K)}));return k},_searchServiceUrl:function(a,k){var z=new e;this._getSubItems(a).then(b.hitch(this,function(K){K&&0<K.length?(d.forEach(K,b.hitch(this,function(l){l.parent=k.id;this._addItem(l)})),z.resolve()):this._getItem(a).then(b.hitch(this,function(l){l&&(l.parent=k.id,this._addItem(l));z.resolve()}),b.hitch(this,function(l){z.reject(l)}))}),b.hitch(this,function(K){z.reject(K)}));
return z},_getRestInfo:function(a){var k=new e;this.rule.getRestInfo(a).then(b.hitch(this,function(z){this.domNode&&k.resolve(z)}),b.hitch(this,function(z){this.domNode&&k.reject(z)}));return k},_clear:function(){var a=this._store.query({parent:"root"});d.forEach(a,b.hitch(this,function(k){k&&"root"!==k.id&&this._store.remove(k.id)}))},_showRequestError:function(){this.emit("error",this.nls.invalidUrlTip)},_addItem:function(a){this._id++;a.id=this._id.toString();this._store.add(a);return a},_removeItem:function(a){this._store.remove(a)},
_getRootItem:function(){return{id:"root",name:"Services Root",type:"root"}},_createTree:function(){var a=this._getRootItem();a=new n({data:[a],getChildren:function(k){return this.query({parent:k.id})}});this._store=new h(a);a=new p({store:this._store,query:{id:"root"},mayHaveChildren:b.hitch(this,this._mayHaveChildren)});this.tree=new y({multiple:this.multiple,model:a,showRoot:!1,style:{width:"100%"},isLeafItem:b.hitch(this,this.isLeafItem),onOpen:b.hitch(this,function(k,z){this._onTreeOpen(k,z);
this.emit("tree-open",k,z)}),onClick:b.hitch(this,function(k,z,K){this._onTreeClick(k,z,K);this.emit("tree-click",k,z,K)}),getIconStyle:b.hitch(this,function(k,z){var K=null;if(!k)return null;var l={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},t=window.location.protocol+"//"+window.location.host+require.toUrl("jimu"),F=this._getIconImageName(k,z);F||("folder"===k.type?F=z?"folder_open_default.png":"folder_close_default.png":this.isServiceTypeSupported(k.type)&&
(F=z?"folder_open_default.png":"folder_close_default.png"));F&&(l.backgroundImage="url("+t+"/css/images/"+F+")",K=l);return K})});c.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.domNode)},_getIconImageName:function(a,k){var z="";"function"===typeof this.rule.getIconImageName&&(z=this.rule.getIconImageName(a,k));return z},_mayHaveChildren:function(a){return"root"===a.type?!0:!this.isLeafItem(a)},_onTreeOpen:function(a,k){"root"===a.id||0<this._store.query({parent:a.id}).length||
a.checking||a.checked||(a.checking=!0,this._getSubItems(a.url).then(b.hitch(this,function(z){d.forEach(z,b.hitch(this,function(K){K.parent=a.id;this._addItem(K)}));a.checking=!1;a.checked=!0}),b.hitch(this,function(z){console.error(z);a.checking=!1;a.checked=!0})))},_onTreeClick:function(a,k,z){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.inherited(arguments)}})})},"jimu/serviceBrowserRuleUtils":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/Deferred",
"jimu/utils","jimu/ServiceBrowserRule"],function(v,x,L,H,B){var b={combineRules:function(c){var d=new B;x.forEach(c,function(e){x.forEach(e.leafTypes,function(f){0>d.leafTypes.indexOf(f)&&d.leafTypes.push(f)});x.forEach(e.serviceTypes,function(f){0>d.serviceTypes.indexOf(f)&&d.serviceTypes.push(f)})});d.getMatchedRule=function(e){var f=null;x.some(c,function(n){return n.isUrlContainsServiceType(e)?(f=n,!0):!1});return f};d.getItem=function(e){var f=null;return f=(f=d.getMatchedRule(e))?f.getItem(e):
d.defaultGetItem(e)};d.getSubItemUrls=function(e){var f=null;return f=(f=d.getMatchedRule(e))?f.getSubItemUrls(e):d.defaultGetSubItemUrls(e)};d.getIconImageName=function(e,f){var n="";if(e.url){var h=d.getMatchedRule(e.url);h&&"function"===typeof h.getIconImageName&&(n=h.getIconImageName(e,f))}return n};return d},getFeaturelayerServiceBrowserRule:function(c,d,e){c=v.clone(c);var f=["point","polyline","polygon"];v.isArrayLike(c)&&0<c.length?(c=x.filter(c,function(n){return 0<=f.indexOf(n)}),0===c.length&&
(c=f)):c=f;return b._getFeaturelayerServiceBrowserRule(c,d,e)},_getFeaturelayerServiceBrowserRule:function(c,d,e){return new B({types:c,leafTypes:["Feature Layer","Table"],serviceTypes:["MapServer","FeatureServer"],_groupLayerType:"Group Layer",_featureLayerType:"Feature Layer",_tableType:"Table",getItem:function(f){var n=new L;this.isUrlEndWithServiceType(f,this.serviceTypes)?n=this.defaultGetItem(f):this.getRestInfo(f).then(v.hitch(this,function(h){h=this._getItemByLayerDefinition(f,h);n.resolve(h)}),
v.hitch(this,function(h){n.reject(h)}));return n},getSubItemUrls:function(f){var n=new L;return n=this.isUrlEndWithServiceType(f)?this._getSubUrlsByServiceUrl(f):this._getSubUrlsByGroupUrl(f)},getIconImageName:function(f,n){var h="";"MapServer"===f.type||"FeatureServer"===f.type?h=n?"mapserver_open.png":"mapserver_close.png":f.type===this._groupLayerType?h=n?"group_layer2.png":"group_layer1.png":f.type===this._featureLayerType?(f=H.getTypeByGeometryType(f.definition&&f.definition.geometryType),"point"===
f?h="point_layer1.png":"polyline"===f?h="line_layer1.png":"polygon"===f&&(h="polygon_layer1.png")):f.type===this._tableType?h="table.png":"root"===f.type&&this._currentUrl&&x.some(this.serviceTypes,v.hitch(this,function(p){return H.isStringEndWith(this._currentUrl,"/"+p)}))&&(h=n?"mapserver_open.png":"mapserver_close.png");return h},_getSubUrlsByServiceUrl:function(f){var n=new L;this.getRestInfo(f).then(v.hitch(this,function(h){var p=[];x.forEach(h.layers,v.hitch(this,function(A){0<=A.parentLayerId||
p.push(f+"/"+A.id)}));e&&x.forEach(h.tables,v.hitch(this,function(A){0<=A.parentLayerId||p.push(f+"/"+A.id)}));n.resolve(p)}),v.hitch(this,function(h){n.reject(h)}));return n},_getSubUrlsByGroupUrl:function(f){var n=new L;this.getRestInfo(f).then(v.hitch(this,function(h){var p=[];if(h.type===this._groupLayerType){var A=this._getServiceUrlByLayerUrl(f);p=x.map(h.subLayers||[],v.hitch(this,function(y){return A+"/"+y.id}))}n.resolve(p)}),v.hitch(this,function(h){n.reject(h)}));return n},_getItemByLayerDefinition:function(f,
n){var h=null,p=n.type;if(p===this._groupLayerType)h={name:n.name,type:p,url:f,definition:n};else if(p===this._featureLayerType||p===this._tableType){var A=!1;p===this._featureLayerType?A=this._validateEsriGeometryType(n.geometryType):p===this._tableType&&(A=!0);A&&(A=!1,(A=d?H.isFeaturelayerUrlSupportQuery(f,n.capabilities):!0)&&(h={name:n.name,type:p,url:f,definition:n}))}return h},_validateEsriGeometryType:function(f){f=H.getTypeByGeometryType(f);return 0<=this.types.indexOf(f)},_getServiceUrlByLayerUrl:function(f){for(var n=
"",h=0;h<this.serviceTypes.length;h++){var p=this.serviceTypes[h].toLowerCase(),A=f.toLowerCase().lastIndexOf("/"+p+"/");if(0<=A){n=f.slice(0,A+p.length+1);break}}return n}})},getGeocodeServiceBrowserRule:function(){return new B({leafTypes:["GeocodeServer"],serviceTypes:["GeocodeServer"]})},getGpServiceBrowserRule:function(){return new B({leafTypes:["GPTask"],serviceTypes:["GPServer"],getItem:function(c){var d=new L;this.isUrlEndWithServiceType(c)?d=this.defaultGetItem(c):this.getRestInfo(c).then(v.hitch(this,
function(e){d.resolve({name:e.displayName||e.name,type:"GPTask",url:c,definition:e})}),v.hitch(this,function(e){d.reject(e)}));return d},getSubItemUrls:function(c){var d=new L;this.isUrlEndWithServiceType(c)?this.getRestInfo(c).then(v.hitch(this,function(e){e=x.map(e.tasks||[],v.hitch(this,function(f){return c+"/"+f}));d.resolve(e)}),v.hitch(this,function(e){d.reject(e)})):d.resolve([]);return d},getIconImageName:function(c,d){d="";"GPServer"===c.type?d="toolbox.png":"GPTask"===c.type&&(d="tool.png");
return d}})},getImageServiceBrowserRule:function(c){return new B({leafTypes:["ImageServer"],serviceTypes:["ImageServer"],getItem:function(d){var e=new L;this.isUrlEndWithServiceType(d)?this.defaultGetItem(d).then(v.hitch(this,function(f){c?H.isImageServiceSupportQuery(f.definition.capabilities)?e.resolve(f):e.resolve(null):e.resolve(f)}),v.hitch(this,function(f){e.reject(f)})):e.resolve(null);return e},getIconImageName:function(d,e){e="";"ImageServer"===d.type&&(e="image_layer.png");return e}})},
getQueryableServiceBrowserRule:function(){var c=b.getFeaturelayerServiceBrowserRule(["point","polyline","polygon"],!0,!0),d=b.getImageServiceBrowserRule(!0);return b.combineRules([c,d])}};return b})},"jimu/ServiceBrowserRule":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred jimu/utils esri/request esri/IdentityManager".split(" "),function(v,x,L,H,B,b,c){return v([],{leafTypes:null,serviceTypes:null,_restInfoCache:{},constructor:function(d){x.mixin(this,d);x.isArrayLike(this.leafTypes)||
(this.leafTypes=[]);x.isArrayLike(this.serviceTypes)||(this.serviceTypes=[])},getItem:function(d){return this.defaultGetItem(d)},getSubItemUrls:function(d){return this.defaultGetSubItemUrls(d)},getIconImageName:function(d,e){return""},defaultGetItem:function(d){var e=new H;d=d.replace(/\/*$/g,"");if(this.isUrlEndWithServiceType(d)){var f=d.split("/"),n=f[f.length-1],h=f[f.length-2];this.getRestInfo(d).then(x.hitch(this,function(p){e.resolve({name:h,type:n,url:d,definition:p})}),x.hitch(this,function(p){console.error(p);
e.reject({errorCode:"NETWORK_ERROR",error:p})}))}else e.resolve(null);return e},defaultGetSubItemUrls:function(d){d=new H;d.resolve([]);return d},getRestInfo:function(d){var e=new H;d=d.replace(/\/*$/g,"");var f=this._restInfoCache[d];if(f)e.resolve(f);else{f={url:d,content:{f:"json"},handleAs:"json",callbackParamName:"callback",timeout:2E4};var n=c.findCredential(d);n&&n.token&&(f.content.token=n.token);b(f).then(x.hitch(this,function(h){this._restInfoCache[d]=h;e.resolve(h)}),function(h){e.reject(h)})}return e},
isServiceTypeSupported:function(d){d=d.toLowerCase();return L.some(this.serviceTypes,x.hitch(this,function(e){return e.toLowerCase()===d}))},isUrlEndWithServiceType:function(d){return L.some(this.serviceTypes,x.hitch(this,function(e){return B.isStringEndWith(d,"/"+e)}))},isUrlContainsServiceType:function(d){d=d.toLowerCase();return L.some(this.serviceTypes,x.hitch(this,function(e){e=e.toLowerCase();return 0<=d.indexOf("/"+e)}))}})})},"jimu/dijit/SymbolPicker":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dojo/Evented dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dijit/TooltipDialog dijit/popup dijit/registry jimu/dijit/SymbolChooser jimu/symbolUtils".split(" "),
function(v,x,L,H,B,b,c,d,e,f,n,h,p,A){return v([x,L,H],{baseClass:"jimu-symbol-picker",declaredClass:"jimu.dijit.SymbolPicker",templateString:'\x3cdiv\x3e\x3cdiv data-dojo-attach-point\x3d"symbolNode" class\x3d"symbol-node jimu-float-leading"\x3e\x3c/div\x3e\x3cdiv class\x3d"separator jimu-float-leading"\x3e\x3c/div\x3e\x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8 jimu-float-leading"\x3e\x3c/div\x3e\x3c/div\x3e',tooltipDialog:null,_isTooltipDialogOpened:!1,symbol:null,type:null,cropImage:!1,
customZIndex:null,postCreate:function(){this.inherited(arguments);this._createTooltipDialog();this._hideTooltipDialog();var y=this.symbolChooser.getSymbol();y&&this._drawSymbol(y)},destroy:function(){this._hideTooltipDialog();this.symbolChooser&&this.symbolChooser.destroy();this.symbolChooser=null;this.inherited(arguments)},_createTooltipDialog:function(){var y=b.create("div");this.tooltipDialog=new f({content:y});this.symbolChooser=new p({cropImage:this.cropImage,customZIndex:this.customZIndex,symbol:this.symbol,
type:this.type});this.symbolChooser.placeAt(y);this.symbolChooser.startup();this.own(d(this.symbolChooser,"change",B.hitch(this,function(a){this._drawSymbol(a);this.emit("change",a)})));this.own(d(this.domNode,"click",B.hitch(this,function(a){a.stopPropagation();a.preventDefault();this._isTooltipDialogOpened?this._hideTooltipDialog():this._showTooltipDialog()})));this.own(d(document.body,"click",B.hitch(this,function(a){var k=a.target||a.srcElement;a=this._getColorPickers();if(!(0<a.length&&c.some(a,
function(l){return l.isPartOfPopup(k)})))if(a=this.tooltipDialog.domNode,a=k===a||b.isDescendant(k,a),this.cropImage&&this.symbolChooser._isCustomImageOptionSelected()){var z=this.symbolChooser.imageChooser,K=z.msgPopupOpen;z.cropPopupOpen||K||a||this._hideTooltipDialog();z.cropPopup&&z.cropPopup.domNode||(z.cropPopupOpen=!1);z.msgPopup&&z.msgPopup.domNode||(z.msgPopupOpen=!1)}else a||this._hideTooltipDialog()})));this.own(d(this.symbolChooser,"resize",B.hitch(this,function(){this._isTooltipDialogOpened&&
(this._hideTooltipDialog(),this._showTooltipDialog())})))},_getColorPickers:function(){var y=e(".jimu-color-picker",this.symbolChooser.domNode);return c.map(y,B.hitch(this,function(a){return h.byNode(a)}))},reset:function(){this.symbol=this.type=null;b.empty(this.symbolNode);this.symbolChooser.reset()},showBySymbol:function(y){this.reset();y&&(this._drawSymbol(y),this.symbolChooser.showBySymbol(y))},showByType:function(y){this.reset();this.symbolChooser.showByType(y);(y=this.symbolChooser.getSymbol())&&
this._drawSymbol(y)},getSymbol:function(){return this.symbolChooser.getSymbol()},_drawSymbol:function(y){b.empty(this.symbolNode);y&&(y=A.createSymbolNode(y,{width:16,height:16}))&&b.place(y,this.symbolNode)},_showTooltipDialog:function(){this.tooltipDialog&&(n.open({parent:this.getParent(),popup:this.tooltipDialog,around:this.domNode}),this._isTooltipDialogOpened=!0)},_hideTooltipDialog:function(){this.tooltipDialog&&(n.close(this.tooltipDialog),this._isTooltipDialogOpened=!1)}})})},"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,x,L,H,B,b){var c=null,d=v([L,B],{baseClass:"jimu-editor-xss-filter",declaredClass:"jimu.dijit.EditorXssFilter",sanitizer:null,xss:null,whiteList:{},graphicsWhiteList:{},postCreate:function(){this.whiteList=this._getWhiteList();this.sanitizer=new b({whiteList:this.whiteList,safeAttrValue:H.hitch(this,function(e,f,n,h){return"style"===f?this.xss.friendlyAttrValue(n).replace(/"/g,"'"):"img"===e&&"src"===f?this.xss.escapeAttrValue(n):this.xss.safeAttrValue(e,f,n,h)}),onTag:H.hitch(this,function(e,
f,n){if(n.isWhite&&this._isInWhiteList(e,this.graphicsWhiteList))return f}),onIgnoreTagAttr:H.hitch(this,function(e,f,n,h){if("data-"===f.substr(0,5))return f+'\x3d"'+this.xss.escapeAttrValue(n)+'"'}),onIgnoreTag:H.hitch(this,function(e,f,n){if("o:"===e.substr(0,2)||"!--[if"===e||"!--[endif]--"===e)return f})},!0);this.xss=this.sanitizer.xss},sanitize:function(e){return this.sanitizer.sanitize(e)},_getWhiteList:function(){var e="title height width class style font-family id align text-align".split(" "),
f={div:e,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,span:e,p:e,s:e,strong:e,em:e,u:e,ol:e,ul:e,li:e,a:["href","target"].concat(e),img:["src","alt","border"].concat(e),blockquote:e,font:["face","size","color"].concat(e),pre:e,code:e,b:e,i:e,wbr:e,video:"autoplay controls loop muted poster preload".split(" ").concat(e),audio:["autoplay","controls","loop","muted","preload"].concat(e),source:["media","src","type"].concat(e),table:["cellpadding","cellspacing","border"].concat(e),tbody:[].concat(e),tr:["valign"].concat(e),
td:["valign","colspan","rowspan","nowrap"].concat(e),th:["valign","colspan","rowspan","nowrap"].concat(e),hr:e,html:e,title:e,link:["rel","href"],style:["type"].concat(e),body:e};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:e};return this._extendObjectOfArrays([f,{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(e){var f={};x.forEach(e,function(n){var h=Object.keys(n);x.forEach(h,function(p){Array.isArray(n[p])&&Array.isArray(f[p])?f[p]=f[p].concat(n[p]):f[p]=n[p]},this)},this);return f},_isInWhiteList:function(e,f){f=Object.keys(f);var n=!1;x.forEach(f,function(h){e===h&&(n=!0)},this);return n}});d.getInstance=function(){null===c&&(c=new d);return c};return d})},
"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,x,L,H,B,b,c,d,e,f,n,h,p){var A=L("dijit._editor.plugins.LinkDialog",n,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:h,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=b.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(a){v("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),b.hitch(this,function(k,z,K){var l=this;this.tag="insertImage"==this.command?"img":"a";k=b.delegate(k.getLocalization("dijit","common",this.lang),k.getLocalization("dijit._editor",
"LinkDialog",this.lang));var t=this.dropDown=this.button.dropDown=new z({title:k[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:b.hitch(this,"setValue"),onOpen:function(){l._onOpenDialog();z.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(b.hitch(l,"_onCloseDialog"),0)}});k.urlRegExp=this.urlRegExp;k.id=K.getUniqueId(this.editor.id);this._uniqueId=k.id;this._setContent(t.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
f.substitute(this.linkDialogTemplate,k));t.startup();this._urlInput=K.byId(this._uniqueId+"_urlInput");this._textInput=K.byId(this._uniqueId+"_textInput");this._setButton=K.byId(this._uniqueId+"_setButton");this.own(K.byId(this._uniqueId+"_cancelButton").on("click",b.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",b.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",b.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=b.hitch(this,function(){var F=this._urlInput.get("value");return this._urlRegExp.test(F)||this._emailRegExp.test(F)});this.own(c(t.domNode,"keydown",b.hitch(this,b.hitch(this,function(F){!F||F.keyCode!=B.ENTER||F.shiftKey||F.metaKey||F.ctrlKey||F.altKey||this._setButton.get("disabled")||(t.onExecute(),t.execute(t.get("value")))}))));a()}))},_checkAndFixInput:function(){var a=this,k=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var z=k,K=!1,l=!1;z&&1<z.length&&(z=b.trim(z),0!==z.indexOf("mailto:")&&(0<z.indexOf("/")?-1===z.indexOf("://")&&"/"!==z.charAt(0)&&z.indexOf("./")&&0!==z.indexOf("../")&&a._hostRxp.test(z)&&(K=!0):a._userAtRxp.test(z)&&(l=!0)));K&&a._urlInput.set("value","http://"+z);l&&a._urlInput.set("value","mailto:"+z);a._setButton.set("disabled",!a._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(b.hitch(this,
function(){this.own(c(this.editor.editNode,"mouseup",b.hitch(this,"_onMouseUp")));this.own(c(this.editor.editNode,"dblclick",b.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(a){this.dropDown.set({parserScope:"dojo",content:a})},_checkValues:function(a){a&&a.urlInput&&(a.urlInput=a.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&a&&a.textInput&&("function"===typeof this.linkFilter?a.textInput=this.linkFilter(a.textInput):
x.forEach(this.linkFilter,function(k){a.textInput=a.textInput.replace(k[0],k[1])}));return a},_createlinkEnabledImpl:function(){return!0},setValue:function(a){this._onCloseDialog();if(9>d("ie")){var k=p.getSelection(this.editor.window).getRangeAt(0).endContainer;3===k.nodeType&&(k=k.parentNode);k&&k.nodeName&&k.nodeName.toLowerCase()!==this.tag&&(k=this.editor.selection.getSelectedElement(this.tag));k&&k.nodeName&&k.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(k),
this.editor.execCommand("unlink"))}a=this._checkValues(a);this.editor.execCommand("inserthtml",f.substitute(this.htmlTemplate,a));e("a",this.editor.document).forEach(function(z){z.innerHTML||H.has(z,"name")||z.parentNode.removeChild(z)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(a){if(a&&a.tagName.toLowerCase()===this.tag){var k=a.getAttribute("_djrealurl")||a.getAttribute("href");var z=a.getAttribute("target")||"_self";var K=a.textContent||
a.innerText;this.editor.selection.selectElement(a,!0)}else K=this.editor.selection.getSelectedText();return{urlInput:k||"",textInput:K||"",targetSelect:z||""}},_onOpenDialog:function(){if(d("ie")){var a=p.getSelection(this.editor.window);if(a.rangeCount){var k=a.getRangeAt(0);var z=k.endContainer;3===z.nodeType&&(z=z.parentNode);z&&z.nodeName&&z.nodeName.toLowerCase()!==this.tag&&(z=this.editor.selection.getSelectedElement(this.tag));if(!z||z.nodeName&&z.nodeName.toLowerCase()!==this.tag)(a=this.editor.selection.getAncestorElement(this.tag))&&
a.nodeName&&a.nodeName.toLowerCase()==this.tag?(z=a,this.editor.selection.selectElement(z)):k.startContainer===k.endContainer&&(a=k.startContainer.firstChild)&&a.nodeName&&a.nodeName.toLowerCase()==this.tag&&(z=a,this.editor.selection.selectElement(z))}}else z=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(z))},_onDblClick:function(a){if(a&&a.target&&(a=a.target,(a.tagName?a.tagName.toLowerCase():
"")===this.tag&&H.get(a,"href"))){var k=this.editor;this.editor.selection.selectElement(a);k.onDisplayChanged();k._updateTimer&&(k._updateTimer.remove(),delete k._updateTimer);k.onNormalizedDisplayChanged();var z=this.button;setTimeout(function(){z.set("disabled",!1);z.loadAndOpenDropDown().then(function(){z.dropDown.focus&&z.dropDown.focus()})},10)}},_onMouseUp:function(){if(d("ff")){var a=this.editor.selection.getAncestorElement(this.tag);if(a){var k=p.getSelection(this.editor.window).getRangeAt(0);
if(k.collapsed&&a.childNodes.length){var z=k.cloneRange();z.selectNodeContents(a.childNodes[a.childNodes.length-1]);z.setStart(a.childNodes[0],0);1!==k.compareBoundaryPoints(z.START_TO_START,z)?k.setStartBefore(a):-1!==k.compareBoundaryPoints(z.END_TO_START,z)&&k.setStartAfter(a)}}}}}),y=L("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(a){if(a&&a.tagName.toLowerCase()===this.tag){var k=a.getAttribute("_djrealurl")||a.getAttribute("src");var z=a.getAttribute("alt");this.editor.selection.selectElement(a,!0)}else z=this.editor.selection.getSelectedText();return{urlInput:k||"",textInput:z||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);
this.editor.onLoadDeferred.then(b.hitch(this,function(){this.own(c(this.editor.editNode,"mousedown",b.hitch(this,"_selectTag")))}))},_selectTag:function(a){a&&a.target&&(a=a.target,(a.tagName?a.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(a))},_checkValues:function(a){a&&a.urlInput&&(a.urlInput=a.urlInput.replace(/"/g,"\x26quot;"));a&&a.textInput&&(a.textInput=a.textInput.replace(/"/g,"\x26quot;"));return a},_onDblClick:function(a){if(a&&a.target&&(a=a.target,(a.tagName?
a.tagName.toLowerCase():"")===this.tag&&H.get(a,"src"))){var k=this.editor;this.editor.selection.selectElement(a);k.onDisplayChanged();k._updateTimer&&(k._updateTimer.remove(),delete k._updateTimer);k.onNormalizedDisplayChanged();var z=this.button;setTimeout(function(){z.set("disabled",!1);z.loadAndOpenDropDown().then(function(){z.dropDown.focus&&z.dropDown.focus()})},10)}}});n.registry.createLink=function(a){var k={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in a?a.allowUnsafeHtml:!1};
"linkFilter"in a&&(k.linkFilter=a.linkFilter);return new A(k)};n.registry.insertImage=function(){return new y({command:"insertImage"})};A.ImgLinkDialog=y;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,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z){var K=L("dijit._editor.plugins.ViewSource",y,{stripScripts:!0,stripComments:!0,stripIFrames:!0,stripEventHandlers:!0,readOnly:!1,_fsPlugin:null,toggle:function(){h("webkit")&&(this._vsFocused=!0);this.button.set("checked",!this.button.get("checked"))},_initButton:function(){var l=d.getLocalization("dijit._editor","commands"),t=this.editor;this.button=new a({label:l.viewSource,ownerDocument:t.ownerDocument,dir:t.dir,lang:t.lang,showLabel:!1,iconClass:this.iconClassPrefix+
" "+this.iconClassPrefix+"ViewSource",tabIndex:"-1",onChange:f.hitch(this,"_showSource")});this.button.set("readOnly",!1)},setEditor:function(l){this.editor=l;this._initButton();this.removeValueFilterHandles();this._setValueFilterHandle=x.before(this.editor,"setValue",f.hitch(this,function(t){return[this._filter(t)]}));this._getValueFilterHandle=x.after(this.editor,"getValue",f.hitch(this,function(t){return this._filter(t)}));this.editor.addKeyHandler(e.F12,!0,!0,f.hitch(this,function(t){this.button.focus();
this.toggle();t.stopPropagation();t.preventDefault();setTimeout(f.hitch(this,function(){this.editor.focused&&this.editor.focus()}),100)}))},_showSource:function(l){var t=this.editor,F=t._plugins;this._sourceShown=l;var J=this;try{this.sourceArea||this._createSourceView();if(l)t._sourceQueryCommandEnabled=t.queryCommandEnabled,t.queryCommandEnabled=function(I){return"viewsource"===I.toLowerCase()},this.editor.onDisplayChanged(),v.forEach(F,function(I){!I||I instanceof K||!I.isInstanceOf(y)||I.set("disabled",
!0)}),this._fsPlugin&&(this._fsPlugin._getAltViewNode=function(){return J.sourceArea}),this.sourceArea.value=t.get("value"),this.sourceArea.style.height=t.iframe.style.height,this.sourceArea.style.width=t.iframe.style.width,t.iframe.parentNode.style.position="relative",c.set(t.iframe,{position:"absolute",top:0,visibility:"hidden"}),c.set(this.sourceArea,{display:"block"}),this._resizeHandle=n(window,"resize",f.hitch(this,function(){var I=p.getBox(t.ownerDocument);"_prevW"in this&&"_prevH"in this&&
I.w===this._prevW&&I.h===this._prevH||(this._prevW=I.w,this._prevH=I.h,this._resizer&&(clearTimeout(this._resizer),delete this._resizer),this._resizer=setTimeout(f.hitch(this,function(){delete this._resizer;this._resize()}),10))})),setTimeout(f.hitch(this,this._resize),100),this.editor.onNormalizedDisplayChanged(),this.editor.__oldGetValue=this.editor.getValue,this.editor.getValue=f.hitch(this,function(){var I=this.sourceArea.value;return I=this._filter(I)}),this._setListener=x.after(this.editor,
"setValue",f.hitch(this,function(I){this.sourceArea.value=I||""}),!0);else{if(!t._sourceQueryCommandEnabled)return;this._setListener.remove();delete this._setListener;this._resizeHandle.remove();delete this._resizeHandle;this.editor.__oldGetValue&&(this.editor.getValue=this.editor.__oldGetValue,delete this.editor.__oldGetValue);t.queryCommandEnabled=t._sourceQueryCommandEnabled;if(!this._readOnly){var R=this.sourceArea.value;t.beginEditing();t.set("value",R);t.endEditing()}v.forEach(F,function(I){I&&
I.isInstanceOf(y)&&I.set("disabled",!1)});c.set(this.sourceArea,"display","none");c.set(t.iframe,{position:"relative",visibility:"visible"});delete t._sourceQueryCommandEnabled;this.editor.onDisplayChanged()}setTimeout(f.hitch(this,function(){var I=t.domNode.parentNode;I&&(I=z.getEnclosingWidget(I))&&I.resize&&I.resize();t.resize()}),300)}catch(I){console.log(I)}},updateState:function(){this.button.set("disabled",this.get("disabled"))},_resize:function(){var l=this.editor,t=l.getHeaderHeight(),F=
l.getFooterHeight(),J=b.position(l.domNode),R=b.getPadBorderExtents(l.iframe.parentNode),I=b.getMarginExtents(l.iframe.parentNode),P=b.getPadBorderExtents(l.domNode),w=J.w-P.w;J=J.h-(t+P.h+F);this._fsPlugin&&this._fsPlugin.isFullscreen&&(l=p.getBox(l.ownerDocument),w=l.w-P.w,J=l.h-(t+P.h+F));b.setMarginBox(this.sourceArea,{w:Math.round(w-(R.w+I.w)),h:Math.round(J-(R.h+I.h))})},_createSourceView:function(){var l=this.editor,t=l._plugins;this.sourceArea=B.create("textarea");this.readOnly&&(H.set(this.sourceArea,
"readOnly",!0),this._readOnly=!0);c.set(this.sourceArea,{padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});H.set(this.sourceArea,"aria-label",this.editor.id);B.place(this.sourceArea,l.iframe,"before");h("ie")&&l.iframe.parentNode.lastChild!==l.iframe&&c.set(l.iframe.parentNode.lastChild,{width:"0px",height:"0px",padding:"0px",margin:"0px",borderWidth:"0px",borderStyle:"none"});l._viewsource_oldFocus=l.focus;var F=this;l.focus=function(){if(F._sourceShown)F.setSourceAreaCaret();else try{this._vsFocused?
(delete this._vsFocused,A.focus(l.editNode)):l._viewsource_oldFocus()}catch(I){console.log("ViewSource focus code error: "+I)}};var J,R;for(J=0;J<t.length;J++)if((R=t[J])&&("dijit._editor.plugins.FullScreen"===R.declaredClass||R.declaredClass===k._scopeName+"._editor.plugins.FullScreen")){this._fsPlugin=R;break}this._fsPlugin&&(this._fsPlugin._viewsource_getAltViewNode=this._fsPlugin._getAltViewNode,this._fsPlugin._getAltViewNode=function(){return F._sourceShown?F.sourceArea:this._viewsource_getAltViewNode()});
this.own(n(this.sourceArea,"keydown",f.hitch(this,function(I){this._sourceShown&&I.keyCode==e.F12&&I.ctrlKey&&I.shiftKey&&(this.button.focus(),this.button.set("checked",!1),setTimeout(f.hitch(this,function(){l.focus()}),100),I.stopPropagation(),I.preventDefault())})))},_stripScripts:function(l){l&&(l=l.replace(/<\s*script[^>]*>((.|\s)*?)<\\?\/\s*script\s*>/ig,""),l=l.replace(/<\s*script\b([^<>]|\s)*>?/ig,""),l=l.replace(/<[^>]*=(\s|)*[("|')]javascript:[^$1][(\s|.)]*[$1][^>]*>/ig,""));return l},_stripComments:function(l){l&&
(l=l.replace(/\x3c!--(.|\s){1,}?--\x3e/g,""));return l},_stripIFrames:function(l){l&&(l=l.replace(/<\s*iframe[^>]*>((.|\s)*?)<\\?\/\s*iframe\s*>/ig,""));return l},_stripEventHandlers:function(l){if(l){var t=l.match(/<[a-z]+?\b(.*?on.*?(['"]).*?\2.*?)+>/gim);if(t)for(var F=0,J=t.length;F<J;F++){var R=t[F],I=R.replace(/\s+on[a-z]*\s*=\s*(['"])(.*?)\1/igm,"");l=l.replace(R,I)}}return l},_filter:function(l){l&&(this.stripScripts&&(l=this._stripScripts(l)),this.stripComments&&(l=this._stripComments(l)),
this.stripIFrames&&(l=this._stripIFrames(l)),this.stripEventHandlers&&(l=this._stripEventHandlers(l)));return l},removeValueFilterHandles:function(){this._setValueFilterHandle&&(this._setValueFilterHandle.remove(),delete this._setValueFilterHandle);this._getValueFilterHandle&&(this._getValueFilterHandle.remove(),delete this._getValueFilterHandle)},setSourceAreaCaret:function(){var l=this.sourceArea;A.focus(l);this._sourceShown&&!this.readOnly&&(l.setSelectionRange?l.setSelectionRange(0,0):this.sourceArea.createTextRange&&
(l=l.createTextRange(),l.collapse(!0),l.moveStart("character",-99999),l.moveStart("character",0),l.moveEnd("character",0),l.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)}});y.registry.viewSource=y.registry.viewsource=function(l){return new K({readOnly:"readOnly"in
l?l.readOnly:!1,stripComments:"stripComments"in l?l.stripComments:!0,stripScripts:"stripScripts"in l?l.stripScripts:!0,stripIFrames:"stripIFrames"in l?l.stripIFrames:!0,stripEventHandlers:"stripEventHandlers"in l?l.stripEventHandlers:!0})};return K})},"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,x,L,H,B,b,c,d,e,f,n,h,p,A,y){v=L("dijit._editor.plugins._FontDropDown",[f,n,h],{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=B.getLocalization("dijit._editor","FontChoice");this.label=this.strings[this.command];this.id=e.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.selectId=this.id+"_select";this.inherited(arguments)},postCreate:function(){this.select.set("store",new d({idProperty:"value",data:x.map(this.values,function(l){var t=this.strings[l]||l;return{label:this.getLabel(l,t),name:t,value:l}},this)}));this.select.set("value",
"",!1);this.disabled=this.select.get("disabled")},_setValueAttr:function(l,t){t=!1!==t;this.select.set("value",0>x.indexOf(this.values,l)?"":l,t);t||(this.select._lastValueReported=null)},_getValueAttr:function(){return this.select.get("value")},focus:function(){this.select.focus()},_setDisabledAttr:function(l){this._set("disabled",l);this.select.set("disabled",l)}});var a=L("dijit._editor.plugins._FontNameDropDown",v,{generic:!1,command:"fontName",comboClass:"dijitFontNameCombo",postMixInProperties:function(){this.values||
(this.values=this.generic?["serif","sans-serif","monospace","cursive","fantasy"]:["Arial","Times New Roman","Comic Sans MS","Courier New"]);this.inherited(arguments)},getLabel:function(l,t){return this.plainText?t:"\x3cdiv style\x3d'font-family: "+l+"'\x3e"+t+"\x3c/div\x3e"},_normalizeFontName:function(l){var t=this.values;if(!l||!t)return l;var F=l.split(",");if(1<F.length)for(var J=0,R=F.length;J<R;J++){var I=c.trim(F[J]);if(-1<x.indexOf(t,I))return I}return l},_setValueAttr:function(l,t){t=!1!==
t;l=this._normalizeFontName(l);this.generic&&(l={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"}[l]||l);this.inherited(arguments,[l,t])}}),k=L("dijit._editor.plugins._FontSizeDropDown",v,{command:"fontSize",comboClass:"dijitFontSizeCombo",values:[1,2,3,4,5,6,7],getLabel:function(l,
t){return this.plainText?t:"\x3cfont size\x3d"+l+"'\x3e"+t+"\x3c/font\x3e"},_setValueAttr:function(l,t){t=!1!==t;l.indexOf&&-1!=l.indexOf("px")&&(l={10:1,13:2,16:3,18:4,24:5,32:6,48:7}[parseInt(l,10)]||l);this.inherited(arguments,[l,t])}}),z=L("dijit._editor.plugins._FormatBlockDropDown",v,{command:"formatBlock",comboClass:"dijitFormatBlockCombo",values:"noFormat p h1 h2 h3 pre".split(" "),postCreate:function(){this.inherited(arguments);this.set("value","noFormat",!1)},getLabel:function(l,t){return this.plainText||
"noFormat"==l?t:"\x3c"+l+"\x3e"+t+"\x3c/"+l+"\x3e"},_execCommand:function(l,t,F){if("noFormat"===F){var J;if((t=y.getSelection(l.window))&&0<t.rangeCount&&(F=t.getRangeAt(0),F)){t=F.startContainer;for(J=F.endContainer;t&&t!==l.editNode&&t!==l.document.body&&1!==t.nodeType;)t=t.parentNode;for(;J&&J!==l.editNode&&J!==l.document.body&&1!==J.nodeType;)J=J.parentNode;var R=b.hitch(this,function(u,Q){if(u.childNodes&&u.childNodes.length){var S;for(S=0;S<u.childNodes.length;S++){var g=u.childNodes[S];if(1==
g.nodeType&&l.selection.inSelection(g)){var q=g.tagName?g.tagName.toLowerCase():"";-1!==x.indexOf(this.values,q)&&Q.push(g);R(g,Q)}}}});F=b.hitch(this,function(u){if(u&&u.length){for(l.beginEditing();u.length;)this._removeFormat(l,u.pop());l.endEditing()}});var I=[];if(t==J){for(J=t;J&&J!==l.editNode&&J!==l.document.body;){if(1==J.nodeType){var P=J.tagName?J.tagName.toLowerCase():"";if(-1!==x.indexOf(this.values,P)){var w=J;break}}J=J.parentNode}R(t,I);w&&(I=[w].concat(I))}else for(J=t;l.selection.inSelection(J);)1==
J.nodeType&&(P=J.tagName?J.tagName.toLowerCase():"",-1!==x.indexOf(this.values,P)&&I.push(J),R(J,I)),J=J.nextSibling;F(I);l.onDisplayChanged()}}else l.execCommand(t,F)},_removeFormat:function(l,t){if(l.customUndo){for(;t.firstChild;)H.place(t.firstChild,t,"before");t.parentNode.removeChild(t)}else{l.selection.selectElementChildren(t);var F=l.selection.getSelectedHtml();l.selection.selectElement(t);l.execCommand("inserthtml",F||"")}}}),K=L("dijit._editor.plugins.FontChoice",A,{useDefaultCommand:!1,
_initButton:function(){var l={fontName:a,fontSize:k,formatBlock:z}[this.command],t=this.params;this.params.custom&&(t.values=this.params.custom);var F=this.editor;this.button=new l(b.delegate({dir:F.dir,lang:F.lang},t));this.own(this.button.select.on("change",b.hitch(this,function(J){this.editor.focused&&this.editor.focus();"fontName"==this.command&&-1!=J.indexOf(" ")&&(J="'"+J+"'");this.button._execCommand?this.button._execCommand(this.editor,this.command,J):this.editor.execCommand(this.command,
J)})))},updateState:function(){var l=this.editor,t=this.command;if(l&&l.isLoaded&&t.length&&this.button){var F=this.get("disabled");this.button.set("disabled",F);if(!F){try{var J=l.queryCommandValue(t)||""}catch(I){J=""}(F=b.isString(J)&&(J.match(/'([^']*)'/)||J.match(/"([^"]*)"/)))&&(J=F[1]);"fontSize"!==t||J||(J=3);if("formatBlock"===t)if(J&&"p"!=J)0>x.indexOf(this.button.values,J)&&(J="noFormat");else{J=null;if((t=y.getSelection(this.editor.window))&&0<t.rangeCount&&(t=t.getRangeAt(0)))var R=t.endContainer;
for(;R&&R!==l.editNode&&R!==l.document;){if((t=R.tagName?R.tagName.toLowerCase():"")&&-1<x.indexOf(this.button.values,t)){J=t;break}R=R.parentNode}J||(J="noFormat")}J!==this.button.get("value")&&this.button.set("value",J,!1)}}}});x.forEach(["fontName","fontSize","formatBlock"],function(l){A.registry[l]=function(t){return new K({command:l,plainText:t.plainText})}});K._FontDropDown=v;K._FontNameDropDown=a;K._FontSizeDropDown=k;K._FormatBlockDropDown=z;return K})},"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,x,L,H){var B=v.declare("dojox.editor.plugins.Preview",H,{useDefaultCommand:!1,styles:"",stylesheets:null,iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Preview");this.button=new x.form.Button({label:this._nlsResources.preview,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Preview",tabIndex:"-1",onClick:v.hitch(this,"_preview")})},setEditor:function(b){this.editor=b;this._initButton()},
updateState:function(){this.button.set("disabled",this.get("disabled"))},_preview:function(){try{var b=this.editor.get("value"),c="\t\t\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html; charset\x3dUTF-8'\x3e\n",d;if(this.stylesheets)for(d=0;d<this.stylesheets.length;d++)c+="\t\t\x3clink rel\x3d'stylesheet' type\x3d'text/css' href\x3d'"+this.stylesheets[d]+"'\x3e\n";this.styles&&(c+="\t\t\x3cstyle\x3e"+this.styles+"\x3c/style\x3e\n");b="\x3chtml\x3e\n\t\x3chead\x3e\n"+c+"\t\x3c/head\x3e\n\t\x3cbody\x3e\n"+
b+"\n\t\x3c/body\x3e\n\x3c/html\x3e";var e=window.open("javascript: ''",this._nlsResources.preview,"status\x3d1,menubar\x3d0,location\x3d0,toolbar\x3d0");e.document.open();e.document.write(b);e.document.close()}catch(f){console.warn(f)}}});v.subscribe(x._scopeName+".Editor.getPlugin",null,function(b){b.plugin||"preview"!==b.args.name.toLowerCase()||(b.plugin=new B({styles:"styles"in b.args?b.args.styles:"",stylesheets:"stylesheets"in b.args?b.args.stylesheets:null}))});return B})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),
function(v,x,L,H,B,b){var c=L("dijit._editor.plugins.TextColor",B,{buttonClass:b,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;this.inherited(arguments);var d=this;this.button.loadDropDown=function(e){function f(n){d.button.dropDown=new n({dir:d.editor.dir,ownerDocument:d.editor.ownerDocument,value:d.value,onChange:function(h){d.editor.execCommand(d.command,h)},onExecute:function(){d.editor.execCommand(d.command,this.get("value"))}});e()}"string"==
typeof d.colorPicker?v([d.colorPicker],f):f(d.colorPicker)}},updateState:function(){var d=this.editor,e=this.command;if(d&&d.isLoaded&&e.length){if(this.button){var f=this.get("disabled");this.button.set("disabled",f);if(f)return;try{var n=d.queryCommandValue(e)||""}catch(h){n=""}}""==n&&(n="#000000");"transparent"==n&&(n="#ffffff");"string"==typeof n?-1<n.indexOf("rgb")&&(n=x.fromRgb(n).toHex()):(n=((n&255)<<16|n&65280|(n&16711680)>>>16).toString(16),n="#000000".slice(0,7-n.length)+n);this.value=
n;(d=this.button.dropDown)&&d.get&&n!==d.get("value")&&d.set("value",n,!1)}}});B.registry.foreColor=function(d){return new c(d)};B.registry.hiliteColor=function(d){return new c(d)};return c})},"dojox/editor/plugins/ToolbarLineBreak":function(){define("dojo dijit dojox dijit/_Widget dijit/_TemplatedMixin dijit/_editor/_Plugin dojo/_base/declare".split(" "),function(v,x,L,H,B,b,c){var d=c("dojox.editor.plugins.ToolbarLineBreak",[H,B],{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(x._scopeName+".Editor.getPlugin",null,function(e){if(!e.plugin){var f=e.args.name.toLowerCase();if("||"===f||"toolbarlinebreak"===f)e.plugin=new b({button:new d,setEditor:function(n){this.editor=n}})}});return d})},"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,x,L,H,B,b,c,d,e,f,n,h,p,A,y){v.experimental("dojox.editor.plugins.FindReplace");var a=v.declare("dojox.editor.plugins._FindReplaceCloseBox",[b,c,e],{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=x.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.btnId=this.id+"_close";this.inherited(arguments)},startup:function(){this.connect(this.button,"onClick","onClick")},onClick:function(){}}),k=v.declare("dojox.editor.plugins._FindReplaceTextBox",[b,c,e],{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=x.getUniqueId(this.declaredClass.replace(/\./g,"_"));this.textId=this.id+"_text";this.inherited(arguments)},postCreate:function(){this.textBox.set("value","");this.disabled=this.textBox.get("disabled");this.connect(this.textBox,"onChange","onChange");v.attr(this.textBox.textbox,"formnovalidate","true")},_setValueAttr:function(t){this.value=t;this.textBox.set("value",t)},focus:function(){this.textBox.focus()},_setDisabledAttr:function(t){this.disabled=t;this.textBox.set("disabled",
t)},onChange:function(t){this.value=t},_onKeyPress:function(t){var F=0,J=0;!t.target||t.ctrlKey||t.altKey||t.shiftKey||(t.keyCode==v.keys.LEFT_ARROW?(F=t.target.selectionStart,J=t.target.selectionEnd,F<J&&(x.selectInputText(t.target,F,F),v.stopEvent(t))):t.keyCode==v.keys.RIGHT_ARROW&&(F=t.target.selectionStart,J=t.target.selectionEnd,F<J&&(x.selectInputText(t.target,J,J),v.stopEvent(t))))}}),z=v.declare("dojox.editor.plugins._FindReplaceCheckBox",[b,c,e],{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=x.getUniqueId(this.declaredClass.replace(/\./g,
"_"));this.checkId=this.id+"_check";this.inherited(arguments)},postCreate:function(){this.checkBox.set("checked",!1);this.disabled=this.checkBox.get("disabled");this.checkBox.isFocusable=function(){return!1}},_setValueAttr:function(t){this.checkBox.set("value",t)},_getValueAttr:function(){return this.checkBox.get("value")},focus:function(){this.checkBox.focus()},_setDisabledAttr:function(t){this.disabled=t;this.checkBox.set("disabled",t)}}),K=v.declare("dojox.editor.plugins._FindReplaceToolbar",n,
{postCreate:function(){this.connectKeyNavHandlers([],[]);this.connect(this.containerNode,"onclick","_onToolbarEvent");this.connect(this.containerNode,"onkeydown","_onToolbarEvent");v.addClass(this.domNode,"dijitToolbar")},addChild:function(t,F){x._KeyNavContainer.superclass.addChild.apply(this,arguments)},_onToolbarEvent:function(t){t.stopPropagation()}}),l=v.declare("dojox.editor.plugins.FindReplace",[y],{buttonClass:x.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 x.form.ToggleButton({label:this._strings.findReplace,showLabel:!1,iconClass:this.iconClassPrefix+" dijitEditorIconFindString",tabIndex:"-1",onChange:v.hitch(this,
"_toggleFindReplace")});v.isOpera&&this.button.set("disabled",!0);this.connect(this.button,"set",v.hitch(this,function(t,F){"disabled"===t&&this._toggleFindReplace(!F&&this._displayed,!0,!0)}))},setEditor:function(t){this.editor=t;this._initButton()},toggle:function(){this.button.set("checked",!this.button.get("checked"))},_toggleFindReplace:function(t,F,J){var R=v.marginBox(this.editor.domNode);t&&!v.isOpera?(v.style(this._frToolbar.domNode,"display","block"),this._populateFindField(),F||(this._displayed=
!0)):(v.style(this._frToolbar.domNode,"display","none"),F||(this._displayed=!1),J||this.editor.focus());this.editor.resize({h:R.h})},_populateFindField:function(){var t=this.editor._sCall("getSelectedText",[null]);this._findField&&this._findField.textBox&&(t&&this._findField.textBox.set("value",t),this._findField.textBox.focus(),x.selectInputText(this._findField.textBox.focusNode))},setToolbar:function(t){this.inherited(arguments);if(!v.isOpera){var F=this._frToolbar=new K;v.style(F.domNode,"display",
"none");v.place(F.domNode,t.domNode,"after");F.startup();this._closeBox=new a;F.addChild(this._closeBox);this._findField=new k({label:this._strings.findLabel,tooltip:this._strings.findTooltip});F.addChild(this._findField);this._replaceField=new k({label:this._strings.replaceLabel,tooltip:this._strings.replaceTooltip});F.addChild(this._replaceField);F.addChild(new L.editor.plugins.ToolbarLineBreak);this._findButton=new x.form.Button({label:this._strings.findButton,showLabel:!0,iconClass:this.iconClassPrefix+
" dijitEditorIconFind"});this._findButton.titleNode.title=this._strings.findButtonTooltip;F.addChild(this._findButton);this._replaceButton=new x.form.Button({label:this._strings.replaceButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplace"});this._replaceButton.titleNode.title=this._strings.replaceButtonTooltip;F.addChild(this._replaceButton);this._replaceAllButton=new x.form.Button({label:this._strings.replaceAllButton,showLabel:!0,iconClass:this.iconClassPrefix+" dijitEditorIconReplaceAll"});
this._replaceAllButton.titleNode.title=this._strings.replaceAllButtonTooltip;F.addChild(this._replaceAllButton);this._caseSensitive=new z({label:this._strings.matchCase,tooltip:this._strings.matchCaseTooltip});F.addChild(this._caseSensitive);this._backwards=new z({label:this._strings.backwards,tooltip:this._strings.backwardsTooltip});F.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 x.TooltipDialog;this._promDialog.startup();this._promDialog.set("content","")}},_checkButtons:function(){this._findField.get("value")?
(this._findButton.set("disabled",!1),this._replaceButton.set("disabled",!1),this._replaceAllButton.set("disabled",!1)):(this._findButton.set("disabled",!0),this._replaceButton.set("disabled",!0),this._replaceAllButton.set("disabled",!0))},_onFindKeyDown:function(t){t.keyCode==v.keys.ENTER&&(this._find(),v.stopEvent(t))},_onReplaceKeyDown:function(t){t.keyCode==v.keys.ENTER&&(this._replace()||this._replace(),v.stopEvent(t))},_find:function(t){var F=this._findField.get("value")||"";if(F){var J=this._caseSensitive.get("value"),
R=this._backwards.get("value");F=this._findText(F,J,R);!F&&t&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextFind})),x.popup.open({popup:this._promDialog,around:this._findButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;x.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return F}return!1},_replace:function(t){var F=
!1,J=this.editor;J.focus();var R=this._findField.get("value")||"",I=this._replaceField.get("value")||"";if(R){var P=this._caseSensitive.get("value"),w=this._backwards.get("value"),u=J._sCall("getSelectedText",[null]);v.isMoz&&(R=v.trim(R),u=v.trim(u));R=this._filterRegexp(R,!P);u&&R.test(u)&&(J.execCommand("inserthtml",I),F=!0,w&&(this._findText(I,P,w),J._sCall("collapse",[!0])));!this._find(!1)&&t&&(this._promDialog.set("content",v.string.substitute(this._strings.eofDialogText,{0:this._strings.eofDialogTextReplace})),
x.popup.open({popup:this._promDialog,around:this._replaceButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;x.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this.editor.focus()}),0));return F}return null},_replaceAll:function(t){var F=0;this._backwards.get("value")?this.editor.placeCursorAtEnd():this.editor.placeCursorAtStart();this._replace(!1)&&F++;var J=v.hitch(this,function(){this._replace(!1)?
(F++,setTimeout(J,10)):t&&(this._promDialog.set("content",v.string.substitute(this._strings.replaceDialogText,{0:""+F})),x.popup.open({popup:this._promDialog,around:this._replaceAllButton.domNode}),this._promDialogTimeout=setTimeout(v.hitch(this,function(){clearTimeout(this._promDialogTimeout);this._promDialogTimeout=null;x.popup.close(this._promDialog)}),3E3),setTimeout(v.hitch(this,function(){this._findField.focus();this._findField.textBox.focusNode.select()}),0))});J()},_findText:function(t,F,
J){var R=this.editor,I=R.window,P=!1;if(t)if(I.find)P=I.find(t,F,J,!1,!1,!1,!1);else{var w=R.document;if(w.selection||I.getSelection)if(this.editor.focus(),R=w.body.createTextRange(),P=R.duplicate(),I.getSelection().getRangeAt(0),(w=w.selection?w.selection.createRange():null)?J?R.setEndPoint("EndToStart",w):R.setEndPoint("StartToEnd",w):this._bookmark&&(I=I.getSelection().toString(),R.moveToBookmark(this._bookmark),R.text!=I?(R=P.duplicate(),this._bookmark=null):(J?P.setEndPoint("EndToStart",R):P.setEndPoint("StartToEnd",
R),R=P.duplicate())),F=F?4:0,J&&(F|=1),P=R.findText(t,R.text.length,F))R.select(),this._bookmark=R.getBookmark()}return P},_filterRegexp:function(t,F){for(var J="",R=null,I=0;I<t.length;I++)switch(R=t.charAt(I),R){case "\\":J+=R;I++;J+=t.charAt(I);break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":J+="\\";default:J+=R}J="^"+J+"$";return F?new RegExp(J,"mi"):new RegExp(J,"m")},updateState:function(){this.button.set("disabled",this.get("disabled"))},
destroy:function(){this.inherited(arguments);this._promDialogTimeout&&(clearTimeout(this._promDialogTimeout),this._promDialogTimeout=null,x.popup.close(this._promDialog));this._frToolbar&&(this._frToolbar.destroyRecursive(),this._frToolbar=null);this._promDialog&&(this._promDialog.destroyRecursive(),this._promDialog=null)}});l._FindReplaceCloseBox=a;l._FindReplaceTextBox=k;l._FindReplaceCheckBox=z;l._FindReplaceToolbar=K;v.subscribe(x._scopeName+".Editor.getPlugin",null,function(t){t.plugin||"findreplace"!==
t.args.name.toLowerCase()||(t.plugin=new l({}))});return l})},"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,x,L,H){var B=v.declare("dojox.editor.plugins.PasteFromWord",
H,{iconClassPrefix:"dijitAdditionalEditorIcon",width:"400px",height:"300px",_template:"\x3cdiv class\x3d'dijitPasteFromWordEmbeddedRTE'\x3e\x3cdiv style\x3d'width: ${width}; padding-top: 5px; padding-bottom: 5px;'\x3e${instructions}\x3c/div\x3e\x3cdiv id\x3d'${uId}_rte' style\x3d'width: ${width}; height: ${height}'\x3e\x3c/div\x3e\x3ctable style\x3d'width: ${width}' tabindex\x3d'-1'\x3e\x3ctbody\x3e\x3ctr\x3e\x3ctd align\x3d'center'\x3e\x3cbutton type\x3d'button' dojoType\x3d'dijit.form.Button' id\x3d'${uId}_paste'\x3e${paste}\x3c/button\x3e\x26nbsp;\x3cbutton type\x3d'button' dojoType\x3d'dijit.form.Button' id\x3d'${uId}_cancel'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e\x3c/div\x3e",
_filters:[{regexp:/(<meta\s*[^>]*\s*>)|(<\s*link\s* href="file:[^>]*\s*>)|(<\/?\s*\w+:[^>]*\s*>)/gi,handler:""},{regexp:/(?:<style([^>]*)>([\s\S]*?)<\/style>|<link\s+(?=[^>]*rel=['"]?stylesheet)([^>]*?href=(['"])([^>]*?)\4[^>\/]*)\/?>)/gi,handler:""},{regexp:/(class="Mso[^"]*")|(\x3c!--(.|\s){1,}?--\x3e)/gi,handler:""},{regexp:/(<p[^>]*>\s*(&nbsp;|\u00A0)*\s*<\/p[^>]*>)|(<p[^>]*>\s*<font[^>]*>\s*(&nbsp;|\u00A0)*\s*<\/\s*font\s*>\s<\/p[^>]*>)/ig,handler:""},{regexp:/(style="[^"]*mso-[^;][^"]*")|(style="margin:\s*[^;"]*;")/gi,
handler:""},{regexp:/(<\s*script[^>]*>((.|\s)*?)<\\?\/\s*script\s*>)|(<\s*script\b([^<>]|\s)*>?)|(<[^>]*=(\s|)*[("|')]javascript:[^$1][(\s|.)]*[$1][^>]*>)/ig,handler:""},{regexp:/<(\/?)o:p[^>]*>/gi,handler:""}],_initButton:function(){this._filters=this._filters.slice(0);var b=v.i18n.getLocalization("dojox.editor.plugins","PasteFromWord");v.mixin(b,v.i18n.getLocalization("dijit","common"));v.mixin(b,v.i18n.getLocalization("dijit._editor","commands"));this.button=new x.form.Button({label:b.pasteFromWord,
showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"PasteFromWord",tabIndex:"-1",onClick:v.hitch(this,"_openDialog")});this._uId=x.getUniqueId(this.editor.id);b.uId=this._uId;b.width=this.width||"400px";b.height=this.height||"300px";this._dialog=(new x.Dialog({title:b.pasteFromWord})).placeAt(v.body());this._dialog.set("content",v.string.substitute(this._template,b));v.style(v.byId(this._uId+"_rte"),"opacity",.001);this.connect(x.byId(this._uId+"_paste"),"onClick","_paste");this.connect(x.byId(this._uId+
"_cancel"),"onClick","_cancel");this.connect(this._dialog,"onHide","_clearDialog")},updateState:function(){this.button.set("disabled",this.get("disabled"))},setEditor:function(b){this.editor=b;this._initButton()},_openDialog:function(){this._dialog.show();this._rte||setTimeout(v.hitch(this,function(){this._rte=new x._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 b=L.html.format.prettyPrint(this._rte.get("value"));this._dialog.hide();var c;for(c=0;c<this._filters.length;c++){var d=this._filters[c];b=b.replace(d.regexp,d.handler)}b=L.html.format.prettyPrint(b);this.editor.focus();this.editor.execCommand("inserthtml",b)},_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(x._scopeName+".Editor.getPlugin",null,function(b){b.plugin||"pastefromword"!==b.args.name.toLowerCase()||(b.plugin=new B({width:"width"in b.args?b.args.width:"400px",height:"height"in b.args?b.args.width:"300px"}))});return B})},"dojox/html/format":function(){define(["dojo/_base/kernel","./entities","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,x,L,H,B){var b=v.getObject("dojox.html.format",!0);b.prettyPrint=
function(c,d,e,f,n){var h=[],p=0,A=[],y="\t",a="",k=[],z,K=/[=]([^"']+?)(\s|>)/g,l=/style=("[^"]*"|'[^']*'|\S*)/gi,t=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;if(d&&0<d&&10>d)for(y="",z=0;z<d;z++)y+=" ";d=H.doc.createElement("div");d.innerHTML=c;var F=x.encode,J=x.decode,R=d.ownerDocument.createElement("div"),I=function(q){q=q.cloneNode(!1);R.appendChild(q);q=R.innerHTML;R.innerHTML="";return q},P=function(){var q;for(q=0;q<p;q++)h.push(y)},w=function(){h.push("\n")},u=function(q){var E;q=q.split("\n");for(E=
0;E<q.length;E++)q[E]=v.trim(q[E]);q=q.join(" ");q=v.trim(q);if(""!==q){var N=[];if(e&&0<e){var m="";for(E=0;E<p;E++)m+=y;E=m.length;m=e;for(e>E&&(m-=E);q;)if(q.length>e){for(E=m;0<E&&" "!==q.charAt(E);E--);if(!E)for(E=m;E<q.length&&" "!==q.charAt(E);E++);var C=q.substring(0,E);C=v.trim(C);q=v.trim(q.substring(E==q.length?q.length:E+1,q.length));if(C){var G="";for(E=0;E<p;E++)G+=y;C=G+C+"\n"}N.push(C)}else{G="";for(E=0;E<p;E++)G+=y;q=G+q+"\n";N.push(q);q=null}return N.join("")}G="";for(E=0;E<p;E++)G+=
y;return G+q+"\n"}return""},Q=function(q){if(q){var E=q;E&&(E=E.replace(/&quot;/gi,'"'),E=E.replace(/&gt;/gi,"\x3e"),E=E.replace(/&lt;/gi,"\x3c"),E=E.replace(/&amp;/gi,"\x26"));var N;q=0;var m=E.split("\n"),C=[];for(E=0;E<m.length;E++){var G=m[E],M=-1<G.indexOf("\n");if(G=v.trim(G)){M=q;for(N=0;N<G.length;N++){var r=G.charAt(N);"{"===r?q++:"}"===r&&(q--,M=q)}r="";for(N=0;N<p+M;N++)r+=y;C.push(r+G+"\n")}else M&&0===E&&C.push("\n")}q=C.join("")}return q},S=function(q){var E=q.nodeName.toLowerCase(),
N=v.trim(I(q));q=N.substring(0,N.indexOf("\x3e")+1);q=q.replace(K,'\x3d"$1"$2');q=q.replace(l,function(C){var G=C.substring(0,6);C=C.substring(6,C.length);var M=C.charAt(0);C=v.trim(C.substring(1,C.length-1));C=C.split(";");var r=[];L.forEach(C,function(O){if(O=v.trim(O))O=O.substring(0,O.indexOf(":")).toLowerCase()+O.substring(O.indexOf(":"),O.length),r.push(O)});r=r.sort();C=r.join("; ");var D=v.trim(C);return D&&";"!==D?G+M+(C+";")+M:""});var m=[];q=q.replace(t,function(C){m.push(v.trim(C));return""});
m=m.sort();q="\x3c"+E;m.length&&(q+=" "+m.join(" "));-1!=N.indexOf("\x3c/")?(A.push(E),q+="\x3e"):(q=n?q+" /\x3e":q+"\x3e",A.push(!1));a:switch(E){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":E=!0;break a;default:E=!1}k.push(E);a&&!E&&(h.push(u(a)),a="");E?a+=q:(P(),h.push(q),w(),p++)},g=function(q){var E=q.childNodes;if(E){var N;for(N=0;N<E.length;N++){var m=E[N];if(1===
m.nodeType){var C=v.trim(m.tagName.toLowerCase());B("ie")&&m.parentNode!=q||C&&"/"===C.charAt(0)||(S(m),"script"===C?h.push(Q(m.innerHTML)):"pre"===C?(m=m.innerHTML,B("mozilla")&&(m=m.replace("\x3cbr\x3e","\n"),m=m.replace("\x3cpre\x3e",""),m=m.replace("\x3c/pre\x3e","")),"\n"!==m.charAt(m.length-1)&&(m+="\n"),h.push(m)):g(m),m=k.pop(),a&&!m&&(h.push(u(a)),a=""),(C=A.pop())?(C="\x3c/"+C+"\x3e",m?a+=C:(p--,P(),h.push(C),w())):p--)}else 3===m.nodeType||4===m.nodeType?a+=F(m.nodeValue,f):8===m.nodeType&&
(m=J(m.nodeValue,f),P(),h.push("\x3c!--"),w(),p++,h.push(u(m)),p--,P(),h.push("--\x3e"),w())}}};g(d);a&&(h.push(u(a)),a="");return h.join("")};return b})},"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,x,L,H){var B=v.declare("dojox.editor.plugins.InsertAnchor",H,{htmlTemplate:'\x3ca name\x3d"${anchorInput}" class\x3d"dijitEditorPluginInsertAnchorStyle"\x3e${textInput}\x3c/a\x3e',iconClassPrefix:"dijitAdditionalEditorIcon",_template:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_anchorInput'\x3e${anchor}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_anchorInput' name\x3d'anchorInput' intermediateChanges\x3d'true'\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' intermediateChanges\x3d'true'\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton dojoType\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton dojoType\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${cancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
_initButton:function(){var b=this,c=v.i18n.getLocalization("dojox.editor.plugins","InsertAnchor",this.lang),d=this.dropDown=new x.TooltipDialog({title:c.title,execute:v.hitch(this,"setValue"),onOpen:function(){b._onOpenDialog();x.TooltipDialog.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(v.hitch(b,"_onCloseDialog"),0)}});this.button=new x.form.DropDownButton({label:c.insertAnchor,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"InsertAnchor",tabIndex:"-1",
dropDown:this.dropDown});c.id=x.getUniqueId(this.editor.id);this._uniqueId=c.id;this.dropDown.set("content",d.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+v.string.substitute(this._template,c));d.startup();this._anchorInput=x.byId(this._uniqueId+"_anchorInput");this._textInput=x.byId(this._uniqueId+"_textInput");this._setButton=x.byId(this._uniqueId+"_setButton");this.connect(x.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(b){this.editor=b;this._initButton()},_checkInput:function(){var b=!0;this._anchorInput.isValid()&&
(b=!1);this._setButton.set("disabled",b)},_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 b=v.moduleUrl(L._scopeName,"editor/plugins/resources").toString();if(!b.match(/^https?:\/\//i)&&!b.match(/^file:\/\//i)){var c="/"===b.charAt(0)?v.doc.location.protocol+"//"+v.doc.location.host:this._calcBaseUrl(v.global.location.href);
"/"!==c[c.length-1]&&"/"!==b.charAt(0)&&(c+="/");b=c+b}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,b)},_applyStyles:function(){if(!this._styled)try{this._styled=!0;var b=this.editor.document,c=this.getAnchorStyle();if(v.isIE)b.createStyleSheet("").cssText=
c;else{var d=b.createElement("style");d.appendChild(b.createTextNode(c));b.getElementsByTagName("head")[0].appendChild(d)}}catch(e){}},_calcBaseUrl:function(b){var c=null;null!==b&&(c=b.indexOf("?"),-1!=c&&(b=b.substring(0,c)),c=b.lastIndexOf("/"),c=0<c&&c<b.length?b.substring(0,c):b);return c},_checkValues:function(b){b&&(b.anchorInput&&(b.anchorInput=b.anchorInput.replace(/"/g,"\x26quot;")),b.textInput||(b.textInput="\x26nbsp;"));return b},setValue:function(b){this._onCloseDialog();if(!this.editor.window.getSelection){var c=
x.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"]));c&&c.nodeName&&"a"===c.nodeName.toLowerCase()&&this.editor.queryCommandEnabled("unlink")&&(this.editor._sCall("selectElementChildren",[c]),this.editor.execCommand("unlink"))}b=this._checkValues(b);this.editor.execCommand("inserthtml",v.string.substitute(this.htmlTemplate,b))},_onCloseDialog:function(){this.editor.focus()},
_getCurrentValues:function(b){if(b&&"a"===b.tagName.toLowerCase()&&v.attr(b,"name")){var c=v.attr(b,"name");var d=b.textContent||b.innerText;this.editor._sCall("selectElement",[b,!0])}else d=this.editor._sCall("getSelectedText");return{anchorInput:c||"",textInput:d||""}},_onOpenDialog:function(){if(this.editor.window.getSelection)var b=this.editor._sCall("getAncestorElement",["a"]);else b=x.range.getSelection(this.editor.window).getRangeAt(0).endContainer,3===b.nodeType&&(b=b.parentNode),b&&b.nodeName&&
"a"!==b.nodeName.toLowerCase()&&(b=this.editor._sCall("getSelectedElement",["a"]));this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(b))},_onDblClick:function(b){b&&b.target&&(b=b.target,"a"===(b.tagName?b.tagName.toLowerCase():"")&&v.attr(b,"name")&&(this.editor.onDisplayChanged(),this.editor._sCall("selectElement",[b]),setTimeout(v.hitch(this,function(){this.button.set("disabled",!1);this.button.openDropDown();this.button.dropDown.focus&&this.button.dropDown.focus()}),
10)))},_preDomFilter:function(b){v.query("a[name]:not([href])",this.editor.editNode).addClass("dijitEditorPluginInsertAnchorStyle")},_postDomFilter:function(b){b&&v.query("a[name]:not([href])",b).removeClass("dijitEditorPluginInsertAnchorStyle");return b}});v.subscribe(x._scopeName+".Editor.getPlugin",null,function(b){if(!b.plugin){var c=b.args.name;c&&(c=c.toLowerCase());"insertanchor"===c&&(b.plugin=new B)}});return B})},"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,x,L,H){var B=v.declare("dojox.editor.plugins.Blockquote",H,{iconClassPrefix:"dijitAdditionalEditorIcon",_initButton:function(){this._nlsResources=v.i18n.getLocalization("dojox.editor.plugins","Blockquote");this.button=new x.form.ToggleButton({label:this._nlsResources.blockquote,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Blockquote",tabIndex:"-1",onClick:v.hitch(this,"_toggleQuote")})},setEditor:function(b){this.editor=b;this._initButton();this.connect(this.editor,
"onNormalizedDisplayChanged","updateState");b.customUndo=!0},_toggleQuote:function(b){try{var c=this.editor;c.focus();var d=this.button.get("checked"),e=x.range.getSelection(c.window),f,n,h,p;e&&0<e.rangeCount&&(f=e.getRangeAt(0));if(f){c.beginEditing();if(d)if(f.startContainer===f.endContainer){if(this._isRootInline(f.startContainer)){for(h=f.startContainer;h&&h.parentNode!==c.editNode;)h=h.parentNode;for(;h&&h.previousSibling&&(this._isTextElement(h)||1===h.nodeType&&this._isInlineFormat(this._getTagName(h)));)h=
h.previousSibling;h&&1===h.nodeType&&!this._isInlineFormat(this._getTagName(h))&&(h=h.nextSibling);if(h){var A=c.document.createElement("blockquote");v.place(A,h,"after");A.appendChild(h);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 y=f.startContainer;(this._isTextElement(y)||this._isInlineFormat(this._getTagName(y))||"li"===this._getTagName(y))&&y!==c.editNode&&y!==c.document.body;)y=y.parentNode;
y!==c.editNode&&y!==y.ownerDocument.documentElement&&(A=c.document.createElement("blockquote"),v.place(A,y,"after"),A.appendChild(y))}A&&(c._sCall("selectElementChildren",[A]),c._sCall("collapse",[!0]))}else{var a;h=f.startContainer;for(p=f.endContainer;h&&this._isTextElement(h)&&h.parentNode!==c.editNode;)h=h.parentNode;for(a=h;a.nextSibling&&c._sCall("inSelection",[a]);)a=a.nextSibling;p=a;if(p===c.editNode||p===c.document.body){A=c.document.createElement("blockquote");v.place(A,h,"after");var k=
this._getTagName(h);if(this._isTextElement(h)||this._isInlineFormat(k))for(c=h;c&&(this._isTextElement(c)||1===c.nodeType&&this._isInlineFormat(this._getTagName(c)));)A.appendChild(c),c=A.nextSibling;else A.appendChild(h);return}p=p.nextSibling;for(a=h;a&&a!==p;){if(1===a.nodeType){if(k=this._getTagName(a),"br"!==k){if(!window.getSelection&&"p"===k&&this._isEmpty(a)){a=a.nextSibling;continue}this._isInlineFormat(k)?A||(A=c.document.createElement("blockquote"),v.place(A,a,"after")):(A&&this._isEmpty(A)&&
A.parentNode.removeChild(A),A=c.document.createElement("blockquote"),v.place(A,a,"after"));A.appendChild(a);a=A}}else this._isTextElement(a)&&(A||(A=c.document.createElement("blockquote"),v.place(A,a,"after")),A.appendChild(a),a=A);a=a.nextSibling}A&&(this._isEmpty(A)?A.parentNode.removeChild(A):(c._sCall("selectElementChildren",[A]),c._sCall("collapse",[!0])),A=null)}else if(A=!1,f.startContainer===f.endContainer){for(n=f.endContainer;n&&n!==c.editNode&&n!==c.document.body;){if("blockquote"===(n.tagName?
n.tagName.toLowerCase():"")){A=!0;break}n=n.parentNode}if(A){for(var z;n.firstChild;)z=n.firstChild,v.place(z,n,"before");n.parentNode.removeChild(n);z&&(c._sCall("selectElementChildren",[z]),c._sCall("collapse",[!0]))}}else{h=f.startContainer;for(p=f.endContainer;h&&this._isTextElement(h)&&h.parentNode!==c.editNode;)h=h.parentNode;for(f=[];h&&h.nextSibling&&c._sCall("inSelection",[h]);)h.parentNode&&"blockquote"===this._getTagName(h.parentNode)&&(h=h.parentNode),f.push(h),h=h.nextSibling;for(var K=
this._findBlockQuotes(f);K.length;){var l=K.pop();if(l.parentNode){for(;l.firstChild;)v.place(l.firstChild,l,"before");l.parentNode.removeChild(l)}}}c.endEditing()}c.onNormalizedDisplayChanged()}catch(t){}},updateState:function(){var b=this.editor,c=this.get("disabled");if(b&&b.isLoaded&&this.button&&(this.button.set("disabled",c),!c)){c=!1;var d=x.range.getSelection(b.window);if(d&&0<d.rangeCount&&(d=d.getRangeAt(0)))var e=d.endContainer;for(;e&&e!==b.editNode&&e!==b.document;){if("blockquote"===
(e.tagName?e.tagName.toLowerCase():"")){c=!0;break}e=e.parentNode}this.button.set("checked",c)}},_findBlockQuotes:function(b){var c=[];if(b){var d;for(d=0;d<b.length;d++){var e=b[d];1===e.nodeType&&("blockquote"===this._getTagName(e)&&c.push(e),e.childNodes&&0<e.childNodes.length&&(c=c.concat(this._findBlockQuotes(e.childNodes))))}}return c},_getTagName:function(b){var c="";b&&1===b.nodeType&&(c=b.tagName?b.tagName.toLowerCase():"");return c},_isRootInline:function(b){var c=this.editor;if(this._isTextElement(b)&&
b.parentNode===c.editNode||1===b.nodeType&&this._isInlineFormat(b)&&b.parentNode===c.editNode)return!0;if(this._isTextElement(b)&&this._isInlineFormat(this._getTagName(b.parentNode))){for(b=b.parentNode;b&&b!==c.editNode&&this._isInlineFormat(this._getTagName(b));)b=b.parentNode;if(b===c.editNode)return!0}return!1},_isTextElement:function(b){return b&&3===b.nodeType||4===b.nodeType?!0:!1},_isEmpty:function(b){if(b.childNodes){var c=!0,d;for(d=0;d<b.childNodes.length;d++){var e=b.childNodes[d];if(1===
e.nodeType){if("p"!==this._getTagName(e)||v.trim(e.innerHTML)){c=!1;break}}else if(this._isTextElement(e)){if((e=v.trim(e.nodeValue))&&"\x26nbsp;"!==e&&"\u00a0"!==e){c=!1;break}}else{c=!1;break}}return c}return!0},_isInlineFormat:function(b){switch(b){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(x._scopeName+".Editor.getPlugin",
null,function(b){b.plugin||"blockquote"!==b.args.name.toLowerCase()||(b.plugin=new B({}))});return B})},"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,x,L,H){v.experimental("dojox.editor.plugins.UploadImage");var B=v.declare("dojox.editor.plugins.UploadImage",H,{tempImageUrl:"",iconClassPrefix:"editorIcon",useDefaultCommand:!1,uploadUrl:"",button:null,
label:"Upload",setToolbar:function(b){this.button.destroy();this.createFileInput();b.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 b=v.create("span",{innerHTML:"."},document.body);v.style(b,{width:"40px",height:"20px",paddingLeft:"8px",paddingRight:"8px"});this.button=
new L.form.FileUploader({isDebug:!0,uploadUrl:this.uploadUrl,uploadOnChange:!0,selectMultipleFiles:!1,baseClass:"dojoxEditorUploadNorm",hoverClass:"dojoxEditorUploadHover",activeClass:"dojoxEditorUploadActive",disabledClass:"dojoxEditorUploadDisabled"},b);this.connect(this.button,"onChange","insertTempImage");this.connect(this.button,"onComplete","onComplete")},onComplete:function(b,c,d){b=b[0];c=v.byId(this.currentImageId,this.editor.document);d=this.downloadPath?this.downloadPath+b.name:b.file;
c.src=d;v.attr(c,"_djrealurl",d);b.width&&(c.width=b.width,c.height=b.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(x._scopeName+".Editor.getPlugin",null,function(b){if(!b.plugin)switch(b.args.name){case "uploadImage":b.plugin=new B({url:b.args.url})}});return B})},"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,x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R,I,P){v.deprecated("dojox.form.FileUploader","Use dojox.form.Uploader","2.0");return x("dojox.form.FileUploader",[t,F,J],{swfPath:a.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=(R.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 w="createFlashUploader";else this.uploaderType="html",w="createHtmlUploader";this[w]();this.fileListId&&this.connect(e.byId(this.fileListId),"click",function(u){u=u.target.parentNode.parentNode.parentNode;u.id&&-1<u.id.indexOf("file_")&&
this.removeFile(u.id.split("file_")[1])});l.addOnUnload(this,this.destroy)},getHiddenNode:function(w){if(!w)return null;var u=null;for(w=w.parentNode;w&&"body"!=w.tagName.toLowerCase();){if("none"==f.get(w,"display")){u=w;break}w=w.parentNode}return u},getButtonStyle:function(){var w=this.srcNodeRef;(this._hiddenNode=this.getHiddenNode(w))&&f.set(this._hiddenNode,"display","block");if(!w&&this.button&&this.button.domNode){var u=!0;w=this.button.domNode.className+" dijitButtonNode";var Q=this.getText(d(".dijitButtonText",
this.button.domNode)[0]);this.srcNodeRef=w=A.place('\x3cbutton id\x3d"'+this.button.id+'" class\x3d"'+w+'"\x3e'+Q+"\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&&(w=this.button);h.get(w,"class")&&(this.baseClass+=" "+h.get(w,"class"));h.set(w,"class",this.baseClass);this.norm=this.getStyle(w);this.width=
this.norm.w;this.height=this.norm.h;"flash"==this.uploaderType?(this.over=this.getTempNodeStyle(w,this.baseClass+" "+this.hoverClass,u),this.down=this.getTempNodeStyle(w,this.baseClass+" "+this.activeClass,u),this.dsbl=this.getTempNodeStyle(w,this.baseClass+" "+this.disabledClass,u),this.fhtml={cn:this.getText(w),nr:this.norm,ov:this.over,dn:this.down,ds:this.dsbl}):(this.fhtml={cn:this.getText(w),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(){f.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&&f.set(this.domNode,"lineHeight",this.norm.lh+"px");this.showProgress?(this.progTextNode.innerHTML=this.progressMessage,
f.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"}),f.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);
f.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(u){if("flash"==this.uploaderType){this.insideNode=this.insideNode.parentNode.removeChild(this.insideNode);b.body().appendChild(this.insideNode);this.insideNode.innerHTML=this.fhtml.cn;var w=B.connect(this,"onReady",this,function(){B.disconnect(w);this.insideNode=
this.insideNode.parentNode.removeChild(this.insideNode);this.domNode.appendChild(this.insideNode)})}else this.insideNode.appendChild(document.createTextNode(this.fhtml.cn))}this._hiddenNode&&f.set(this._hiddenNode,"display","none")},onChange:function(w){},onProgress:function(w){},onComplete:function(w){},onCancel:function(){},onError:function(w){},onReady:function(w){},onLoad:function(w){},submit:function(w){w=w?y.toObject(w):null;this.upload(w);return!1},upload:function(w){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 u=k.byId(this.progressWidgetId).domNode;"none"==f.get(u,"display")&&(this.restoreProgDisplay="none",f.set(u,"display","block"));"hidden"==f.get(u,"visibility")&&(this.restoreProgDisplay="hidden",f.set(u,"visibility","visible"))}w&&!w.target&&(this.postData=w);this.log("upload type:",this.uploaderType," - postData:",this.postData);for(w=0;w<this.fileList.length;w++)u=
this.fileList[w],u.bytesLoaded=0,u.bytesTotal=u.size||1E5,u.percent=0;"flash"==this.uploaderType?this.uploadFlash():this.uploadHTML();return!1},removeFile:function(w,u){var Q;for(Q=0;Q<this.fileList.length;Q++)if(this.fileList[Q].name==w){u||this.fileList.splice(Q,1);break}"flash"==this.uploaderType?this.flashMovie.removeFile(w):u||(A.destroy(this.fileInputs[Q]),this.fileInputs.splice(Q,1),this._renumberInputs());this.fileListId&&A.destroy("file_"+w)},destroy:function(){"flash"!=this.uploaderType||
this.flashMovie?(H.forEach(this._subs,B.unsubscribe,dojo),H.forEach(this._cons,B.disconnect,dojo),this.scrollConnect&&B.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(B.connect(this,"onLoad",this,"destroy"))},_displayProgress:function(w){!0===w?("flash"==this.uploaderType?f.set(this.insideNode,"top","-2500px"):f.set(this.insideNode,"display",
"none"),f.set(this.progNode,"display","")):!1===w?(f.set(this.insideNode,{display:"",top:"0"}),f.set(this.progNode,"display","none")):f.set(this.progNode,"width",w*this.fhtml.nr.w+"px")},_animateProgress:function(){this._displayProgress(!0);var w=!1,u=B.connect(this,"_complete",function(){B.disconnect(u);w=!0}),Q=0,S=setInterval(L.hitch(this,function(){Q+=5;Q>this.fhtml.nr.w&&(Q=0,w=!0);this._displayProgress(Q/this.fhtml.nr.w);w&&(clearInterval(S),setTimeout(L.hitch(this,function(){this._displayProgress(!1)}),
500))}),50)},_error:function(w){"string"==typeof w&&(w=Error(w));this.onError(w)},_addToFileList:function(){if(this.fileListId){var w="";H.forEach(this.fileList,function(u){w+='\x3ctable id\x3d"file_'+u.name+'" class\x3d"fileToUpload"\x3e\x3ctr\x3e\x3ctd class\x3d"fileToUploadClose"\x3e\x3c/td\x3e\x3ctd class\x3d"fileToUploadName"\x3e'+u.name+'\x3c/td\x3e\x3ctd class\x3d"fileToUploadSize"\x3e'+(u.size?Math.ceil(.001*u.size)+"kb":"")+"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"},this);e.byId(this.fileListId).innerHTML=
w}},_change:function(w){c("ie")&&H.forEach(w,function(u){u.name=u.name.split("\\")[u.name.split("\\").length-1]});this.selectMultipleFiles?this.fileList=this.fileList.concat(w):(this.fileList[0]&&this.removeFile(this.fileList[0].name,!0),this.fileList=w);this._addToFileList();this.onChange(w);this.uploadOnChange?("html"==this.uploaderType&&this._buildFileInput(),this.upload()):"html"==this.uploaderType&&this.selectMultipleFiles&&(this._buildFileInput(),this._connectInput())},_complete:function(w){w=
L.isArray(w)?w:[w];H.forEach(w,function(u){u.ERROR&&this._error(u.ERROR)},this);H.forEach(this.fileList,function(u){u.bytesLoaded=1;u.bytesTotal=1;u.percent=100;this._progress(u)},this);H.forEach(this.fileList,function(u){this.removeFile(u.name,!0)},this);this.onComplete(w);this.fileList=[];this._resetHTML();this.set("disabled",!1);this.restoreProgDisplay&&setTimeout(L.hitch(this,function(){f.set(k.byId(this.progressWidgetId).domNode,"none"==this.restoreProgDisplay?"display":"visibility",this.restoreProgDisplay)}),
500)},_progress:function(w){for(var u=0,Q=0,S=0;S<this.fileList.length;S++){var g=this.fileList[S];g.name==w.name&&(g.bytesLoaded=w.bytesLoaded,g.bytesTotal=w.bytesTotal,g.percent=Math.ceil(g.bytesLoaded/g.bytesTotal*100),this.log(g.name,"percent:",g.percent));Q+=Math.ceil(.001*g.bytesLoaded);u+=Math.ceil(.001*g.bytesTotal)}w=Math.ceil(Q/u*100);this.progressWidgetId&&k.byId(this.progressWidgetId).update({progress:w+"%"});this.showProgress&&this._displayProgress(.01*w);this.onProgress(this.fileList)},
_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(w){if(this._disabled!=w){if("flash"==this.uploaderType){if(!this.flashReady){var u=B.connect(this,"onLoad",this,function(){B.disconnect(u);this._setDisabledAttr(w)});return}this._disabled=w;this.flashMovie.doDisable(w)}else this._disabled=w,f.set(this._fileInput,"display",this._disabled?"none":"");p.toggle(this.domNode,this.disabledClass,w)}},_onFlashBlur:function(){this.flashMovie.blur();if(!this.nextFocusObject&&this.tabIndex)for(var w=
d("[tabIndex]"),u=0;u<w.length;u++)if(w[u].tabIndex>=Number(this.tabIndex)+1){this.nextFocusObject=w[u];break}this.nextFocusObject.focus()},_disconnect:function(){H.forEach(this._cons,B.disconnect,dojo)},uploadHTML:function(){this.selectMultipleFiles&&A.destroy(this._fileInput);this._setHtmlPostData();this.showProgress&&this._animateProgress();z.send({url:this.uploadUrl.toString(),form:this._formNode,handleAs:"json",error:L.hitch(this,function(w){this._error("HTML Upload Error:"+w.message)}),load:L.hitch(this,
function(w,u,Q){this._complete(w)})})},createHtmlUploader:function(){this._buildForm();this._setFormStyle();this._buildFileInput();this._connectInput();this._styleContent();f.set(this.insideNode,"visibility","visible");this.onReady()},_connectInput:function(){this._disconnect();this._cons.push(B.connect(this._fileInput,"mouseover",this,function(w){p.add(this.domNode,this.hoverClass);this.onMouseOver(w)}));this._cons.push(B.connect(this._fileInput,"mouseout",this,function(w){setTimeout(L.hitch(this,
function(){p.remove(this.domNode,this.activeClass);p.remove(this.domNode,this.hoverClass);this.onMouseOut(w);this._checkHtmlCancel("off")}),0)}));this._cons.push(B.connect(this._fileInput,"mousedown",this,function(w){p.add(this.domNode,this.activeClass);p.remove(this.domNode,this.hoverClass);this.onMouseDown(w)}));this._cons.push(B.connect(this._fileInput,"mouseup",this,function(w){p.remove(this.domNode,this.activeClass);this.onMouseUp(w);this.onClick(w);this._checkHtmlCancel("up")}));this._cons.push(B.connect(this._fileInput,
"change",this,function(){this._checkHtmlCancel("change");var w=this._fileInput.value;w?this._change([{name:w,type:"",size:0}]):this._change([])}));0<=this.tabIndex&&h.set(this.domNode,"tabIndex",this.tabIndex)},_checkHtmlCancel:function(w){"change"==w&&(this.dialogIsOpen=!1);"up"==w&&(this.dialogIsOpen=!0);if("off"==w){if(this.dialogIsOpen)this.onCancel();this.dialogIsOpen=!1}},_styleContent:function(){var w=this.fhtml.nr;f.set(this.insideNode,{width:w.w+"px",height:"middle"==w.va?w.h+"px":"auto",
textAlign:w.ta,paddingTop:w.p[0]+"px",paddingRight:w.p[1]+"px",paddingBottom:w.p[2]+"px",paddingLeft:w.p[3]+"px"});try{f.set(this.insideNode,"lineHeight","inherit")}catch(u){}},_resetHTML:function(){"html"==this.uploaderType&&this._formNode&&(this.fileInputs=[],d("*",this._formNode).forEach(function(w){A.destroy(w)}),this.fileCount=0,this._buildFileInput(),this._connectInput())},_buildForm:function(){this._formNode||(9>c("ie")||c("ie")&&c("quirks")?(this._formNode=document.createElement('\x3cform enctype\x3d"multipart/form-data" method\x3d"post"\x3e'),
this._formNode.encoding="multipart/form-data",this._formNode.id=k.getUniqueId("FileUploaderForm"),this.domNode.appendChild(this._formNode)):this._formNode=A.create("form",{enctype:"multipart/form-data",method:"post",id:k.getUniqueId("FileUploaderForm")},this.domNode))},_buildFileInput:function(){this._fileInput&&(this._disconnect(),this._fileInput.id+=this.fileCount,f.set(this._fileInput,"display","none"));this._fileInput=document.createElement("input");this.fileInputs.push(this._fileInput);var w=
this.htmlFieldName;this.selectMultipleFiles&&(w+=this.fileCount,this.fileCount++);h.set(this._fileInput,{id:this.id,name:w,type:"file"});p.add(this._fileInput,"dijitFileInputReal");this._formNode.appendChild(this._fileInput);w=n.getMarginBox(this._fileInput);f.set(this._fileInput,{position:"relative",left:this.fhtml.nr.w-w.w+"px",opacity:0})},_renumberInputs:function(){if(this.selectMultipleFiles){var w;this.fileCount=0;H.forEach(this.fileInputs,function(u){w=this.htmlFieldName+this.fileCount;this.fileCount++;
h.set(u,"name",w)},this)}},_setFormStyle:function(){P.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");f.set(this.domNode,{overflow:"hidden",position:"relative"});f.set(this.insideNode,"position","absolute")},_setHtmlPostData:function(){if(this.postData)for(var w in this.postData)A.create("input",{type:"hidden",name:w,value:this.postData[w]},this._formNode)},uploadFlash:function(){try{if(this.showProgress){this._displayProgress(!0);
var w=B.connect(this,"_complete",this,function(){B.disconnect(w);this._displayProgress(!1)})}var u={},Q;for(Q in this.postData)u[Q]=this.postData[Q];this.flashMovie.doUpload(u)}catch(S){this._error("FileUploader - Sorry, the SWF failed to initialize."+S)}},createFlashUploader:function(){if(this.uploadUrl=this.uploadUrl.toString())if(0>this.uploadUrl.toLowerCase().indexOf("http")&&0!=this.uploadUrl.indexOf("/")){var w=window.location.href.split("/");w.pop();w=w.join("/")+"/";this.uploadUrl=w+this.uploadUrl;
this.log("SWF Fixed - Relative loc:",w," abs loc:",this.uploadUrl)}else this.log("SWF URL unmodified:",this.uploadUrl);else console.warn("Warning: no uploadUrl provided.");w={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:I.serialize("fh",this.fhtml),fileMask:I.serialize("fm",this.fileMask),noReturnCheck:this.skipServerCheck,serverTimeout:this.serverTimeout},params:{scale:"noscale",wmode:"opaque",allowScriptAccess:"always",allowNetworking:"all"}};this.flashObject=new R(w,this.insideNode);this.flashObject.onError=L.hitch(function(u){this._error("Flash Error: "+u)});this.flashObject.onReady=L.hitch(this,function(){f.set(this.insideNode,"visibility","visible");
this.log("FileUploader flash object ready");this.onReady(this)});this.flashObject.onLoad=L.hitch(this,function(u){this.flashMovie=u;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&&h.set(this.domNode,"tabIndex",this.tabIndex)},_doSub:function(w,u){this._subs.push(B.subscribe(this.id+w,this,u))},urlencode:function(w){return w&&"none"!=w?w.replace(/:/g,"||").replace(/\./g,"^^").replace("url(","").replace(")","").replace(/'/g,"").replace(/"/g,""):!1},isButton:function(w){w=w.tagName.toLowerCase();
return"button"==w||"input"==w},getTextStyle:function(w){var u={};u.ff=f.get(w,"fontFamily");if(u.ff){u.ff=u.ff.replace(", ",",");u.ff=u.ff.replace(/"|'/g,"");u.ff="sans-serif"==u.ff?"Arial":u.ff;u.fw=f.get(w,"fontWeight");u.fi=f.get(w,"fontStyle");u.fs=parseInt(f.get(w,"fontSize"),10);if(-1<f.get(w,"fontSize").indexOf("%"))for(var Q=w;Q.tagName;){if(-1==f.get(Q,"fontSize").indexOf("%")){u.fs=parseInt(f.get(Q,"fontSize"),10);break}"body"==Q.tagName.toLowerCase()&&(u.fs=.16*parseInt(f.get(Q,"fontSize"),
10));Q=Q.parentNode}u.fc=(new K(f.get(w,"color"))).toHex();u.fc=parseInt(u.fc.substring(1,Infinity),16)}u.lh=f.get(w,"lineHeight");u.ta=f.get(w,"textAlign");u.ta="start"!=u.ta&&u.ta?u.ta:"left";u.va=this.isButton(w)?"middle":u.lh==u.h?"middle":f.get(w,"verticalAlign");return u},getText:function(w){w=L.trim(w.innerHTML);-1<w.indexOf("\x3c")&&(w=escape(w));return w},getStyle:function(w){var u={},Q=n.getContentBox(w),S=n.getPadExtents(w);u.p=[S.t,S.w-S.l,S.h-S.t,S.l];u.w=Q.w+S.w;u.h=Q.h+S.h;u.d=f.get(w,
"display");Q=new K(f.get(w,"backgroundColor"));u.bc=0==Q.a?"#ffffff":Q.toHex();u.bc=parseInt(u.bc.substring(1,Infinity),16);if(Q=this.urlencode(f.get(w,"backgroundImage")))u.bi={url:Q,rp:f.get(w,"backgroundRepeat"),pos:escape(f.get(w,"backgroundPosition"))},u.bi.pos||(Q=f.get(w,"backgroundPositionX"),S=f.get(w,"backgroundPositionY"),u.bi.pos=escape(("left"==Q?"0%":"right"==Q?"100%":Q)+" "+("top"==S?"0%":"bottom"==S?"100%":S)));return L.mixin(u,this.getTextStyle(w))},getTempNodeStyle:function(w,u,
Q){if(Q){Q=A.place("\x3c"+w.tagName+"\x3e\x3cspan\x3e"+w.innerHTML+"\x3c/span\x3e\x3c/"+w.tagName+"\x3e",w.parentNode);var S=Q.firstChild;p.add(S,w.className);p.add(Q,u);w=this.getStyle(S)}else Q=A.place("\x3c"+w.tagName+"\x3e"+w.innerHTML+"\x3c/"+w.tagName+"\x3e",w.parentNode),p.add(Q,w.className),p.add(Q,u),Q.id=w.id,w=this.getStyle(Q);A.destroy(Q);return w}})})},"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,x,L,H,B,b,c,d,e,f,n,h,p){L.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");b=p._iframeName;b=b.substring(0,b.lastIndexOf("_"));var A=H.delegate(p,{create:function(){return A._frame=p.create.apply(p,arguments)},get:null,post:null,send:function(y){var a=B._ioSetArgs(y,function(F){t&&t.cancel()},function(F){var J=null;F=F.ioArgs;try{var R=F.handleAs;"xml"===R||"html"===R?J=t.response.data:(J=t.response.text,"json"===R?J=x.fromJson(J):"javascript"===R&&(J=L.eval(J)))}catch(I){J=
I}return J},function(F,J){J.ioArgs._hasError=!0;return F}),k=a.ioArgs,z="GET",K=d.byId(y.form);y.method&&"POST"===y.method.toUpperCase()&&K&&(z="POST");y={method:z,handleAs:"json"===y.handleAs||"javascript"===y.handleAs?"text":y.handleAs,form:y.form,query:K?null:y.content,data:K?y.content:null,timeout:y.timeout,ioArgs:k};y.method&&(y.method=y.method.toUpperCase());if(v.ioPublish&&L.publish&&!1!==k.args.ioPublish)var l=h.after(p,"_notifyStart",function(F){F.options.ioArgs===k&&(l.remove(),B._ioNotifyStart(a))},
!0);var t=p(k.url,y,!0);k._callNext=t._callNext;t.then(function(){a.resolve(a)}).otherwise(function(F){a.ioArgs.error=F;a.reject(F)});return a},_iframeOnload:c.global[b+"_onload"]});H.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,x,L,H,B,b,c,d,e){function f(a){a=v.delegate(h,a);if(!("path"in a))return console.error("dojox.embed.Flash(ctor):: no path reference to a Flash movie was provided."),
null;"id"in a||(a.id="dojox-embed-flash-"+n++);return a}var n=0,h={expressInstall:!1,width:320,height:240,swLiveConnect:"true",allowScriptAccess:"sameDomain",allowNetworking:"all",style:null,redirect:null};if(B("ie")){var p=function(a){a=f(a);if(!a)return null;var k,z=a.path;if(a.vars){var K=[];for(k in a.vars)K.push(encodeURIComponent(k)+"\x3d"+encodeURIComponent(a.vars[k]));a.params.FlashVars=K.join("\x26");delete a.vars}z='\x3cobject id\x3d"'+e.escape(String(a.id))+'" classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width\x3d"'+
e.escape(String(a.width))+'" height\x3d"'+e.escape(String(a.height))+'"'+(a.style?' style\x3d"'+e.escape(String(a.style))+'"':"")+'\x3e\x3cparam name\x3d"movie" value\x3d"'+e.escape(String(z))+'" /\x3e';if(a.params)for(k in a.params)z+='\x3cparam name\x3d"'+e.escape(k)+'" value\x3d"'+e.escape(String(a.params[k]))+'" /\x3e';return{id:a.id,markup:z+"\x3c/object\x3e"}};var A=function(){for(var a=10,k=null;!k&&7<a;)try{k=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a--)}catch(z){}return k?(a=k.GetVariable("$version").split(" ")[1].split(","),
{major:null!=a[0]?parseInt(a[0]):0,minor:null!=a[1]?parseInt(a[1]):0,rev:null!=a[2]?parseInt(a[2]):0}):{major:0,minor:0,rev:0}}();x.addOnWindowUnload(function(){console.warn("***************UNLOAD");var a=function(){};H("object").reverse().style("display","none").forEach(function(k){for(var z in k)if("FlashVars"!=z&&"function"==typeof k[z])try{k[z]=a}catch(K){}})})}else p=function(a){a=f(a);if(!a)return null;var k,z=a.path;if(a.vars){var K=[];for(k in a.vars)K.push(encodeURIComponent(k)+"\x3d"+encodeURIComponent(a.vars[k]));
a.params.flashVars=K.join("\x26");delete a.vars}z='\x3cembed type\x3d"application/x-shockwave-flash" src\x3d"'+e.escape(String(z))+'" id\x3d"'+e.escape(String(a.id))+'" width\x3d"'+e.escape(String(a.width))+'" height\x3d"'+e.escape(String(a.height))+'"'+(a.style?' style\x3d"'+e.escape(String(a.style))+'" ':"")+'pluginspage\x3d"'+window.location.protocol+'//www.adobe.com/go/getflashplayer" ';if(a.params)for(k in a.params)z+=" "+e.escape(k)+'\x3d"'+e.escape(String(a.params[k]))+'"';return{id:a.id,markup:z+
" /\x3e"}},A=function(){var a=navigator.plugins["Shockwave Flash"];return a&&a.description?(a=a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."),{major:null!=a[0]?parseInt(a[0]):0,minor:null!=a[1]?parseInt(a[1]):0,rev:null!=a[2]?parseInt(a[2]):0}):{major:0,minor:0,rev:0}}();var y=function(a,k){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=a.minimumVersion||9;this.domNode=this.movie=this.id=null;k&&(k=b.byId(k));setTimeout(v.hitch(this,function(){if(a.expressInstall||this.available&&this.available>=this.minimumVersion)if(a&&k)this.init(a,k);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(y,{onReady:function(a){},onLoad:function(a){},onError:function(a){},_onload:function(){clearInterval(this._poller);delete this._poller;delete this._pollCount;delete this._pollMax;this.onLoad(this.movie)},init:function(a,k){this.destroy();k=b.byId(k||this.domNode);if(!k)throw Error("dojox.embed.Flash: no domNode reference has been passed.");var z=0;this._poller=null;this._pollCount=0;this._pollMax=15;this.pollTime=100;y.initialized&&(this.id=y.place(a,k),this.domNode=k,setTimeout(v.hitch(this,
function(){this.movie=this.byId(this.id,a.doc);this.onReady(this.movie);this._poller=setInterval(v.hitch(this,function(){try{z=this.movie.PercentLoaded()}catch(K){console.warn("this.movie.PercentLoaded() failed",K,this.movie)}if(100==z)this._onload();else if(0==z&&this._pollCount++>this._pollMax)throw clearInterval(this._poller),Error("Building SWF failed.");}),this.pollTime)}),1))},_destroy:function(){try{this.domNode.removeChild(this.movie)}catch(a){}this.id=this.movie=this.domNode=null},destroy:function(){if(this.movie){var a=
v.delegate({id:!0,movie:!0,domNode:!0,onReady:!0,onLoad:!0}),k;for(k in this)a[k]||delete this[k];this._poller?c(this,"Load",this,"_destroy"):this._destroy()}},byId:function(a,k){k=k||document;return k.embeds[a]?k.embeds[a]:k[a]?k[a]:window[a]?window[a]:document[a]?document[a]:null}});v.mixin(y,{minSupported:8,available:A.major,supported:A.major>=A.required,minimumRequired:A.required,version:A,initialized:!1,onInitialize:function(){y.initialized=!0},__ie_markup__:function(a){return p(a)},proxy:function(a,
k){L.forEach(k instanceof Array?k:[k],function(z){this[z]=v.hitch(this,function(){return function(){return eval(this.movie.CallFunction('\x3cinvoke name\x3d"'+z+'" returntype\x3d"javascript"\x3e\x3carguments\x3e'+L.map(arguments,function(K){return __flash__toXML(K)}).join("")+"\x3c/arguments\x3e\x3c/invoke\x3e"))}.apply(this,arguments||[])})},a)}});y.place=function(a,k){a=p(a);k=b.byId(k);k||(k=d.doc.createElement("div"),k.id=a.id+"-container",d.body().appendChild(k));return a?(k.innerHTML=a.markup,
a.id):null};y.onInitialize();v.setObject("dojox.embed.Flash",y);return y})},"dojox/embed/flashVars":function(){define(["dojo"],function(v){v.deprecated("dojox.embed.flashVars","Will be removed in 2.0","2.0");var x={serialize:function(L,H){var B=function(e){"string"==typeof e&&(e=e.replace(/;/g,"_sc_"),e=e.replace(/\./g,"_pr_"),e=e.replace(/:/g,"_cl_"));return e},b=dojox.embed.flashVars.serialize,c="";if(v.isArray(H)){for(var d=0;d<H.length;d++)c+=b(L+"."+d,B(H[d]))+";";return c.replace(/;{2,}/g,";")}if(v.isObject(H)){for(d in H)c+=
b(L+"."+d,B(H[d]))+";";return c.replace(/;{2,}/g,";")}return L+":"+H}};v.setObject("dojox.embed.flashVars",x);return x})},"dojox/html/styles":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(v,x,L,H){var B=v.getObject("dojox.html",!0),b={},c={},d=[];B.insertCssRule=function(e,f,n){n=B.getDynamicStyleSheet(n);var h=e+" {"+f+"}";console.log("insertRule:",h);H("ie")?(n.cssText+=h,console.log("ss.cssText:",n.cssText)):n.sheet?n.sheet.insertRule(h,
n._indicies.length):n.appendChild(L.doc.createTextNode(h));n._indicies.push(e+" "+f);return e};B.removeCssRule=function(e,f,n){var h=-1,p,A;for(p in b)if(!n||n===p){var y=b[p];for(A=0;A<y._indicies.length;A++)if(e+" "+f===y._indicies[A]){h=A;break}if(-1<h)break}if(!y)return console.warn("No dynamic style sheet has been created from which to remove a rule."),!1;if(-1===h)return console.warn("The css rule was not found and could not be removed."),!1;y._indicies.splice(h,1);H("ie")?y.removeRule(h):y.sheet&&
y.sheet.deleteRule(h);return!0};B.modifyCssRule=function(e,f,n){};B.getStyleSheet=function(e){if(b[e||"default"])return b[e||"default"];if(!e)return!1;var f=B.getStyleSheets();if(f[e])return B.getStyleSheets()[e];for(var n in f)if(f[n].href&&-1<f[n].href.indexOf(e))return f[n];return!1};B.getDynamicStyleSheet=function(e){e||(e="default");b[e]||(L.doc.createStyleSheet?(b[e]=L.doc.createStyleSheet(),9>H("ie")&&(b[e].title=e)):(b[e]=L.doc.createElement("style"),b[e].setAttribute("type","text/css"),L.doc.getElementsByTagName("head")[0].appendChild(b[e]),
console.log(e," ss created: ",b[e].sheet)),b[e]._indicies=[]);return b[e]};B.enableStyleSheet=function(e){if(e=B.getStyleSheet(e))e.sheet?e.sheet.disabled=!1:e.disabled=!1};B.disableStyleSheet=function(e){if(e=B.getStyleSheet(e))e.sheet?e.sheet.disabled=!0:e.disabled=!0};B.activeStyleSheet=function(e){var f=B.getToggledStyleSheets(),n;if(1===arguments.length)x.forEach(f,function(h){h.disabled=h.title===e?!1:!0});else for(n=0;n<f.length;n++)if(!1===f[n].disabled)return f[n];return!0};B.getPreferredStyleSheet=
function(){};B.getToggledStyleSheets=function(){var e;if(!d.length){var f=B.getStyleSheets();for(e in f)f[e].title&&d.push(f[e])}return d};B.getStyleSheets=function(){if(c.collected)return c;x.forEach(L.doc.styleSheets,function(e){var f=e.sheet?e.sheet:e;e=f.title||f.href;if(H("ie"))-1===f.cssText.indexOf("#default#VML")&&(f.href?c[e]=f:f.imports.length?x.forEach(f.imports,function(n){c[n.title||n.href]=n}):c[e]=f);else{c[e]=f;c[e].id=f.ownerNode.id;e=[];try{e=f[f.cssRules?"cssRules":"rules"]}catch(n){console.warn("Reading css rules from stylesheet "+
f.href+" is forbidden due to same-origin policy. See http://www.w3.org/TR/CSP/#cascading-style-sheet-css-parsing",f)}x.forEach(e,function(n){n.href&&(c[n.href]=n.styleSheet,c[n.href].id=f.ownerNode.id)})}});c.collected=!0;return c};return B})},"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,x,L,H,B,b,c){v.experimental("dojox.editor.plugins.ChooseImage");
var d=v.declare("dojox.editor.plugins.ChooseImage",L,{iconClassPrefix:"editorIcon",useDefaultCommand:!1,_initButton:function(){this.createFileInput();this.command="chooseImage";var e=c.getLocalization("dijit._editor","commands");this.button=new x.form.Button({label:e.insertImage,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"UploadImage",tabIndex:"-1",onClick:b.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 e=this.get("disabled");this.button.set("disabled",this.get("disabled"));!0===e?(B.addClass(this.button,"dijitButtonDisabled"),this.imageChooser.disableChooseImage()):(B.removeClass(this.button,"dijitButtonDisabled"),this.imageChooser.enableChooseImage())},createFileInput:function(){var e=v.create("span",{innerHTML:"."},document.body);this.imageChooser=new H({showSelfImg:!1,cropImage:!1,format:[H.GIF,H.JPEG,H.PNG]},e);this.connect(this.imageChooser,
"onImageChange","insertTempImage")},_chooseImage:function(){B.setStyle(this.imageChooser.domNode,"display","none");this.imageChooser.triggerImgUpload()},onComplete:function(e){e=e[0];var f=v.byId(this.currentImageId,this.editor.document);var n=this.downloadPath?this.downloadPath+e.name:e.file;f.src=n;v.attr(f,"_djrealurl",n);e.width&&(f.width=e.width,f.height=e.height)},insertTempImage:function(e,f){f=f&&f.fileName?'alt\x3d"'+f.fileName+'"':"";this.currentImageId="img_"+(new Date).getTime();this.editor.execCommand("inserthtml",
'\x3cimg id\x3d"'+this.currentImageId+'" src\x3d"'+e+'" '+f+"/\x3e")},destroy:function(){this.imageChooser&&this.imageChooser.destroy();this.inherited(arguments)}});v.subscribe(x._scopeName+".Editor.getPlugin",null,function(e){if(!e.plugin)switch(e.args.name){case "chooseImage":e.plugin=new d({url:e.args.url})}});L.registry.chooseImage=function(e){return new d(e)};return d})},"jimu/dijit/EditorTextColor":function(){define("require dojo dijit dojo/_base/declare dijit/_editor/_Plugin dijit/form/DropDownButton".split(" "),
function(v,x,L,H,B,b){x.experimental("dijit.editor.plugins.EditorTextColor");var c=H("dijit.editor.plugins.EditorTextColor",B,{buttonClass:b,colorPicker:"jimu/dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command="editorTextColor";this.hackCommand="foreColor";this.inherited(arguments);var d="",e=!1;this.params.custom&&(this.params.custom.recordUID&&(d=this.params.custom.recordUID),this.params.custom.forceAttr&&(e=this.params.custom.forceAttr));var f=this;this.button.set("iconClass",
this.iconClassPrefix+" "+this.iconClassPrefix+"ForeColor");this.button.set("title",this.getLabel(this.hackCommand));this.button.loadDropDown=function(n){function h(p){f.button.dropDown=new p({dir:f.editor.dir,ownerDocument:f.editor.ownerDocument,value:f.value,appearance:{showTransparent:!1,showColorPalette:!0,showCoustom:!0,showColorPickerApply:!1,showCoustomRecord:!0},recordUID:d,onChange:function(A){f.editor.execCommand("useCSS",e);f.editor.execCommand("styleWithCSS",!e);f.editor.execCommand(f.hackCommand,
A)},onClose:function(){f.button.closeDropDown()}});n()}"string"===typeof f.colorPicker?v([f.colorPicker],h):h(f.colorPicker)}},updateState:function(){var d=this.editor,e=this.hackCommand;if(d&&d.isLoaded&&e.length){if(this.button){var f=this.get("disabled");this.button.set("disabled",f);if(f)return;try{var n=d.queryCommandValue(e)||""}catch(h){n=""}}""===n?n="#000000":"transparent"===n&&(n="rgba(0, 0, 0, 0)");this.value=n;(d=this.button.dropDown)&&d.getColor&&n!==d.getColor()&&(d.refreshRecords(),
d.setColor(n))}}});x.subscribe(L._scopeName+".Editor.getPlugin",null,function(d){if(!d.plugin)switch(d.args.name){case "editorTextColor":d.plugin=new c}});return c})},"jimu/dijit/EditorBackgroundColor":function(){define("require dojo dijit dojo/_base/declare dijit/_editor/_Plugin dijit/form/DropDownButton".split(" "),function(v,x,L,H,B,b){x.experimental("dijit.editor.plugins.EditorBackgroundColor");var c=H("dijit.editor.plugins.EditorBackgroundColor",B,{buttonClass:b,colorPicker:"jimu/dijit/ColorPalette",
useDefaultCommand:!1,_initButton:function(){this.command="editorBackgroundColor";this.hackCommand="hiliteColor";this.inherited(arguments);var d="";this.params.custom&&this.params.custom.recordUID&&(d=this.params.custom.recordUID);var e=this;this.button.set("iconClass",this.iconClassPrefix+" "+this.iconClassPrefix+"HiliteColor");this.button.set("title",this.getLabel(this.hackCommand));this.button.loadDropDown=function(f){function n(h){e.button.dropDown=new h({dir:e.editor.dir,ownerDocument:e.editor.ownerDocument,
value:e.value,appearance:{showTransparent:!0,showColorPalette:!0,showCoustom:!0,showColorPickerOK:!0,showColorPickerApply:!1,showCoustomRecord:!0},recordUID:d,onChange:function(p){e.editor.execCommand("useCSS",!1);e.editor.execCommand("styleWithCSS",!0);e.editor.execCommand(e.hackCommand,p)},onExecute:function(){e.editor.execCommand(e.hackCommand,this.get("value"))},onClose:function(){e.button.closeDropDown()}});f()}"string"===typeof e.colorPicker?v([e.colorPicker],n):n(e.colorPicker)}},updateState:function(){var d=
this.editor,e=this.hackCommand;if(d&&d.isLoaded&&e.length){if(this.button){var f=this.get("disabled");this.button.set("disabled",f);if(f)return;try{var n=d.queryCommandValue(e)||""}catch(h){n=""}}""===n?n="#000000":"transparent"===n&&(n="rgba(0, 0, 0, 0)");this.value=n;(d=this.button.dropDown)&&d.getColor&&n!==d.getColor()&&(d.refreshRecords(),d.setColor(n))}}});x.subscribe(L._scopeName+".Editor.getPlugin",null,function(d){if(!d.plugin)switch(d.args.name){case "editorBackgroundColor":d.plugin=new c}});
return c})},"widgets/DataAggregation/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:jimu/dijit/templates/LayerChooserFromMapWithDropbox.html":'\x3cdiv\x3e\r\n\x3ctable role\x3d"listbox" aria-haspopup\x3d"true" data-dojo-attach-point\x3d"dropDownBtn" data-dojo-attach-event\x3d"onclick: _onDropDownClick,onkeydown: _onDropDownKeydown"\r\n  tabindex\x3d"0" title\x3d"${nls.customSelectLayer}" aria-label\x3d"${nls.customSelectLayer}"\x3e\r\n    \x3ccaption class\x3d"screen-readers-only-no-position"\x3e${nls.customSelectLayer}\x3c/caption\x3e\r\n    \x3ccolgroup\x3e\r\n      \x3ccol width\x3d"10px"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"30px"\x3e\x3c/col\x3e\r\n    \x3c/colgroup\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"layer-name jimu-ellipsis" data-dojo-attach-point\x3d"layerNameNode"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"drop-select jimu-float-trailing" data-dojo-attach-point\x3d"dropArrowNode"\x3e\r\n            \x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/_TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"contentNode" class\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem" tabindex\x3d"-1" aria-selected\x3d"false"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation" style\x3d"display: none;"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:dijit/templates/TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"contentNode"\r\n\t\t\tclass\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem"\r\n\t\t\t\t   tabindex\x3d"-1" aria-selected\x3d"false" id\x3d"${id}_label"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\r\n\t\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation"\r\n\t\t style\x3d"display: none;" aria-labelledby\x3d"${id}_label"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:dijit/templates/Tree.html":'\x3cdiv role\x3d"tree"\x3e\r\n\t\x3cdiv class\x3d"dijitInline dijitTreeIndent" style\x3d"position: absolute; top: -9999px" data-dojo-attach-point\x3d"indentDetector"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point\x3d"rootLoadingIndicator"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeContainer" role\x3d"presentation"\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:widgets/DataAggregation/setting/ChooseLayer.html":'\x3cdiv  style\x3d"height:40px"\x3e\r\n    \x3cdiv style\x3d"width:100%" data-dojo-attach-point\x3d"layerSelectorDiv"\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:jimu/dijit/templates/_BasicServiceChooserContent.html":'\x3cdiv\x3e\r\n\t\x3cdiv class\x3d"content-section"\x3e\r\n\t\t\x3ctable class\x3d"layout"\x3e\r\n\t\t\t\x3ccolgroup\x3e\r\n\t\t\t\t\x3ccol width\x3d"80px" align\x3d"right"\x3e\x3c/col\x3e\r\n\t\t\t\t\x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n\t\t\t\t\x3ccol width\x3d"170px"\x3e\x3c/col\x3e\r\n\t\t\t\x3c/colgroup\x3e\r\n\t\t\t\x3ctbody\x3e\r\n\t\t\t\t\x3ctr\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"first-td"\x3e\r\n\t\t\t\t\t\t\x3cspan\x3eURL:\x3c/span\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\x3cdiv data-dojo-attach-point\x3d"urlInput" data-dojo-type\x3d"jimu/dijit/URLInput" style\x3d"width:100%;"\x3e\x3c/div\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd\x3e\r\n\t\t\t\t\t\t\x3cdiv class\x3d"jimu-btn jimu-state-disabled validate-btn jimu-float-trailing" data-dojo-attach-point\x3d"btnValidate" data-dojo-attach-event\x3d"onclick:_onBtnValidateClick"\x3e${nls.validate}\x3c/div\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\t\x3ctr data-dojo-attach-point\x3d"exampleTr" class\x3d"example-tr"\x3e\r\n\t\t\t\t\t\x3ctd class\x3d"first-td" style\x3d"padding-top:5px;"\x3e\r\n\t\t\t\t\t\t\x3cspan title\x3d"${nls.example}:"\x3e${nls.example}:\x3c/span\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\t\x3ctd data-dojo-attach-point\x3d"exampleTd" colspan\x3d"2" style\x3d"padding-top:5px;font-style:italic;color:#ccc;"\x3e\r\n\t\t\t\t\t\x3c/td\x3e\r\n\t\t\t\t\x3c/tr\x3e\r\n\t\t\t\x3c/tbody\x3e\r\n\t\t\x3c/table\x3e\r\n\t\t\x3cdiv class\x3d"service-browser-container" data-dojo-attach-point\x3d"serviceBrowserContainer"\x3e\r\n\t\t\t\x3cdiv class\x3d"error-section" data-dojo-attach-point\x3d"errorSection"\x3e\r\n\t\t\t\t\x3cspan class\x3d"jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\r\n\t\t\t\t\x3cspan class\x3d"error-message" data-dojo-attach-point\x3d"errorNode"\x3e\x3c/span\x3e\r\n\t\t\t\x3c/div\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv class\x3d"operations"\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn jimu-float-trailing cancel jimu-btn-vacation" data-dojo-attach-event\x3d"onclick:_onBtnCancelClick"\x3e${nls.cancel}\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d"jimu-btn jimu-float-trailing jimu-state-disabled ok" data-dojo-attach-point\x3d"btnOk" data-dojo-attach-event\x3d"onclick:_onBtnOkClick"\x3e${nls.ok}\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"loading" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/DataAggregation/setting/LocatorSourceSetting.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"source-url-section"\x3e\r\n    \x3ctable class\x3d"source-table" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\r\n            \x3cspan class\x3d"source-label"\x3e${nls.locatorUrl}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"locatorUrl" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d"required:true,trim:true,disabled:true,style:{width:\'100%\'}"\x3e\x3c/div\x3e\r\n          \x3c/td\x3e\r\n          \x3ctd class\x3d"third"\x3e\r\n            \x3cspan title\x3d"${nls.set}" class\x3d"jimu-btn" data-dojo-attach-event\x3d"click:_onSetLocatorUrlClick"\x3e${nls.set}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cspan data-dojo-attach-point\x3d"messageNode" class\x3d"tip"\x3e\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n      \x3c/tbody\x3e\r\n    \x3c/table\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv class\x3d"source-details-section" data-dojo-attach-point\x3d"detailsSection"\x3e\r\n    \x3ctable class\x3d"source-table" cellspacing\x3d"0"\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.locatorName}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-attach-point\x3d"locatorName" data-dojo-attach-event\x3d"Blur: _onLocatorNameBlur"\r\n                   placeHolder\x3d"${nls.locatorName}"\r\n                   required\x3d"true" data-dojo-props\x3d\'style:{width:"100%"}\' /\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n        \x3ctr class\x3d"hide-country-code-row country-code-row" data-dojo-attach-point\x3d"countryCodeRow"\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.countryCode}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/TextBox" data-dojo-attach-point\x3d"countryCode"\r\n              data-dojo-attach-event\x3d"Blur:_onCountryCodeBlur" placeHolder\x3d"${nls.eg} USA,CHN"\r\n              data-dojo-props\x3d\'style:{width:"97%"}\' /\x3e\r\n            \x3ca class\x3d"jimu-float-trailing" target\x3d"_blank"\r\n              href\x3d"https://developers.arcgis.com/rest/geocode/api-reference/geocode-coverage.htm"\r\n              style\x3d"line-height:30px;"\x3e${nls.questionMark}\x3c/a\x3e\r\n            \x3cspan class\x3d"tip"\x3e${nls.countryCodeHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n\r\n        \x3ctr class\x3d"hide-country-code-row country-code-row" data-dojo-attach-point\x3d"minCandidateScoreRow"\x3e\r\n          \x3ctd class\x3d"first"\x3e${nls.minCandidateScore}\x3c/td\x3e\r\n          \x3ctd class\x3d"second"\x3e\r\n            \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" data-dojo-attach-point\x3d"minCandidateScore"\r\n                   data-dojo-attach-event\x3d"Blur:_onMinCandidateScoreBlur"\r\n                   placeHolder\x3d"${nls.eg} 90" data-dojo-props\x3d"style:{width:\'97%\'}, constraints:{min:0,max:100}, invalidMessage:\'${nls.requiresInteger0100}\'"/\x3e\r\n            \x3cspan class\x3d"tip"\x3e${nls.minCandidateScoreHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n      \x3c/tbody\x3e\r\n    \x3c/table\x3e  \r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv class\x3d"source-fields-section"\x3e\r\n    \x3ctable class\x3d"fields-table" cellspacing\x3d"0"\x3e\r\n      \x3ccolgroup\x3e\r\n        \x3ccol width\x3d"55%"\x3e\x3c/col\x3e\r\n        \x3ccol width\x3d"45%"\x3e\x3c/col\x3e\r\n      \x3c/colgroup\x3e\r\n      \x3ctbody\x3e\r\n        \x3ctr\x3e\r\n\r\n          \x3ctd colspan\x3d"1"\x3e\r\n            \x3cdiv\x3e\r\n              \x3cdiv class\x3d"field-option-label" data-dojo-attach-point\x3d"enableSingleField"\x3e\x3c/div\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"editSingleFields" class\x3d"edit-fields" title\x3d"${nls.configureSingleFields}"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n\r\n          \x3ctd colspan\x3d"1"\x3e\r\n            \x3cdiv\x3e\r\n              \x3cdiv class\x3d"source-edit-fields field-option-label" data-dojo-attach-point\x3d"enableMultiField" title\x3d"${nls.configureMultiFields}"\x3e\x3c/div\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"editMultiFields" class\x3d"edit-fields"\x3e\x3c/div\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"noFields" class\x3d"display-none no-fields-alert" title\x3d"${nls.noFields}"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n          \x3c/td\x3e\r\n\r\n        \x3c/tr\x3e\r\n        \x3ctr\x3e\r\n          \x3ctd colspan\x3d"1"\x3e\r\n            \x3cspan class\x3d"tip"\x3e${nls.singleFieldHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n\r\n          \x3ctd colspan\x3d"1"\x3e\r\n            \x3cspan class\x3d"tip"\x3e${nls.multiFieldHint}\x3c/span\x3e\r\n          \x3c/td\x3e\r\n        \x3c/tr\x3e\r\n      \x3c/tbody\x3e\r\n    \x3c/table\x3e\r\n  \x3c/div\x3e\r\n\r\n\x3c/div\x3e',
"url:widgets/DataAggregation/setting/Setting.html":'\x3cdiv class\x3d"main-settings"\x3e\r\n  \x3cdiv class\x3d"main-section"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"tabDiv" class\x3d"esriCTFullHeight"\x3e\r\n      \x3c!-- Target layer tab --\x3e\r\n      \x3cdiv class\x3d"esriCTTargetLayerTab" data-dojo-attach-point\x3d"targetLayerTabNode" class\x3d"esriCTFullHeight"\x3e\r\n        \x3cdiv class\x3d"esriCTAddTargetLayerButton" data-dojo-attach-point\x3d"btnAddTargetLayerNode" role\x3d"button"\x3e\r\n          \x3cdiv\x3e\r\n            \x3cspan\x3e${nls.addTargetLayersLabel}\x3c/span\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!--\x3dLayer Options--\x3e\r\n        \x3cdiv class\x3d"esriCTLayerListNode" data-dojo-attach-point\x3d"layerListNode"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTNoValidLayerWarning esriCTHidden" data-dojo-attach-point\x3d"noValidLayerWarningNode"\x3e\r\n          ${nls.needsEditablePointLayers}\x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3c!-- Location Settings tab --\x3e\r\n      \x3cdiv class\x3d"esriCTLocationSettingsTab" data-dojo-attach-point\x3d"locationSettingsTabNode" class\x3d"esriCTFullHeight"\x3e\r\n        \x3c!--Geocode Options--\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"geocodeTabNode"\x3e\r\n          \x3cdiv class\x3d"geocode-node"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"locatorOptions" style\x3d"display:block;"\x3e\r\n              \x3cdiv class\x3d"add-button" role\x3d"button" data-dojo-attach-event\x3d"click:_onAddClick"\x3e\r\n                \x3cdiv class\x3d"button"\x3e\r\n                  \x3cspan class\x3d"button-text"\x3e${nls.add}\x3c/span\x3e\r\n                \x3c/div\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"sources"\x3e\r\n                \x3cdiv class\x3d"source-list jimu-float-leading"\x3e\r\n                  \x3cdiv class\x3d"source-list-table" data-dojo-attach-point\x3d"sourceList"\x3e\x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"source-setting jimu-float-trailing" data-dojo-attach-point\x3d"sourceSettingNode"\x3e\x3c/div\x3e\r\n                \x3ctable class\x3d"xy-table" cellspacing\x3d"0"\x3e\r\n                  \x3ctbody\x3e\r\n                    \x3ctr\x3e\r\n                      \x3ctd colspan\x3d"1" style\x3d"padding-top:22px;"\x3e\r\n                        \x3cdiv\x3e\r\n                          \x3cdiv class\x3d"field-option-label" data-dojo-attach-point\x3d"enableXYField"\r\n                            title\x3d"${nls.configureXYFields}"\x3e\x3c/div\x3e\r\n                          \x3cdiv data-dojo-attach-point\x3d"editXYFields" class\x3d"edit-fields"\x3e\x3c/div\x3e\r\n                        \x3c/div\x3e\r\n                      \x3c/td\x3e\r\n                    \x3c/tr\x3e\r\n                    \x3ctr\x3e\r\n                      \x3ctd colspan\x3d"1"\x3e\r\n                        \x3cspan class\x3d"tip"\x3e${nls.xyFieldHint}\x3c/span\x3e\r\n                      \x3c/td\x3e\r\n                    \x3c/tr\x3e\r\n                  \x3c/tbody\x3e\r\n                \x3c/table\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\r\n      \x3c!-- General Settings tab --\x3e\r\n      \x3cdiv class\x3d"esriCTGeneralSettingsTab" data-dojo-attach-point\x3d"generalSettingsTabNode" class\x3d"esriCTFullHeight"\x3e\r\n        \x3cdiv class\x3d"edit-description-title esriCTProvideTextLabel" title\x3d"${nls.introductoryText}"\x3e\r\n          ${nls.introductoryText}\x3c/div\x3e\r\n        \x3cdiv class\x3d"edit-description-box"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"editorDescription"\x3e\x3c/div\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/DataAggregation/setting/css/style.css":".jimu-widget-setting-critical-facilities {height: 100%; overflow: hidden; font-size: 15px;}.jimu-widget-setting-critical-facilities .esriCTHidden{display: none;}.jimu-widget-setting-critical-facilities .esriCTEditActionButton{float: right; margin-right: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .esriCTEditActionButton{float: left; margin-left: 10px;}.jimu-widget-setting-critical-facilities .jimu-simple-table .body-section{overflow-y: hidden;}.jimu-widget-setting-critical-facilities .jimu-layer-chooser-from-map-withdropbox {height: 26px;}.jimu-widget-setting-critical-facilities .jimu-symbol-picker{display: block;}.jimu-widget-setting-critical-facilities .main-section {width: 100%; height: 100%; color: #596679; font-size: 14px; overflow-x: auto}.jimu-widget-setting-critical-facilities .instruction {padding-top: 7px; margin-left: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .instruction {padding-top: 7px; margin-right: 10px;}.jimu-widget-setting-critical-facilities .hintText {font-size: 12px; color: #a0acbf; font-style: oblique;}.jimu-widget-setting-critical-facilities .hint-text-large {font-size: 14px; color: #596679;}.jimu-widget-setting-critical-facilities .display-none {display: none;}.jimu-widget-setting-critical-facilities .display-block {display: block;}.jimu-widget-setting-critical-facilities \x3e tbody \x3e tr \x3e .second {width: auto;}.jimu-widget-setting-critical-facilities .dijitArrowButtonContainer {width: 17px;}.jimu-widget-setting-critical-facilities .dijitTextBoxFocused {border-color: #406b9b !important; box-shadow: 0 0 0;}.jimu-widget-setting-critical-facilities .jimu-checkbox .label {cursor: pointer;}.jimu-widget-setting-critical-facilities .layer-list {padding-left: 0px; vertical-align: top;}.jimu-rtl .jimu-widget-setting-critical-facilities .layer-list {padding-right: 0px; vertical-align: top;}.jimu-widget-setting-critical-facilities .padding-left-10 {padding-left: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .padding-left-10 {padding-right: 10px;}.jimu-widget-setting-critical-facilities .pad-left-20 {padding-left: 20px;}.jimu-rtl .jimu-widget-setting-critical-facilities .pad-left-20 {padding-right: 20px;}.jimu-widget-setting-critical-facilities .pad-bottom-20 {padding-bottom: 20px;}.jimu-widget-setting-critical-facilities .jimu-symbol-picker .symbol-node {top: 0px;}.jimu-widget-setting-critical-facilities .layer-fields-edit-error {vertical-align: top;}.jimu-widget-setting-critical-facilities .locator-error {vertical-align: middle;}.jimu-widget-setting-critical-facilities .esriCTFullHeight{height: 100%;}.jimu-widget-setting-critical-facilities .esriCTTargetLayerTab, .jimu-widget-setting-critical-facilities .esriCTLocationSettingsTab,.jimu-widget-setting-critical-facilities .esriCTGeneralSettingsTab{height: calc(100% - 20px);}.jimu-widget-setting-critical-facilities .esriCTAddTargetLayerButton {margin: 8px 0; display: inline-block; position: relative; padding-left: 20px; color: #518dca; background: url(images/add.png) no-repeat left; cursor: pointer;}.jimu-widget-setting-critical-facilities .esriCTDisabledTargetLayerButton {color: #8d8d8d; cursor: default; background: url(images/add-disable.png) no-repeat left;}.jimu-rtl .jimu-widget-setting-critical-facilities .esriCTAddTargetLayerButton {padding-right: 20px; background: url(images/add.png) no-repeat right;}.jimu-rtl .jimu-widget-setting-critical-facilities .esriCTDisabledTargetLayerButton {padding-right: 20px; background: url(images/add-disable.png) no-repeat right;}.jimu-widget-setting-critical-facilities .esriCTProvideTextLabel {margin: 10px 0px 5px 0px;}.jimu-widget-setting-critical-facilities .esriCTNoValidLayerWarning {margin-top: 10px; color: red; font-style: italic;}.jimu-widget-setting-critical-facilities .layer-table {table-layout: fixed; border-collapse: collapse; margin-bottom: 10px;}.jimu-widget-setting-critical-facilities .layer-table \x3e tbody \x3e tr \x3e td {padding: 5px;}.jimu-widget-setting-critical-facilities .layer-table \x3e tbody \x3e tr \x3e td .edit-fields {padding-left: 10px; background-image: url(images/edit_default.png);}.jimu-rtl .jimu-widget-setting-critical-facilities .layer-table \x3e tbody \x3e tr \x3e td .edit-fields {padding-right: 10px; background-image: url(images/edit_default.png);}.jimu-widget-setting-critical-facilities .layer-table \x3e tbody \x3e tr \x3e td .edit-fields:hover {background-image: url(images/edit_hover.png);}.jimu-widget-setting-critical-facilities .layer-table \x3e tbody \x3e tr \x3e td .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default;}.jimu-widget-setting-critical-facilities .search-radius {width: 40%;}.jimu-widget-setting-critical-facilities .dijitSelect {width: 40%; float: right;}.jimu-widget-setting-critical-facilities .esriCTLocationSettingsTab .dijitTextBox,.jimu-widget-setting-critical-facilities .esriCTTargetLayerTab .dijitTextBox {width: 40%;}.jimu-widget-setting-critical-facilities .radiusSelect .dijitSelectLabel {text-align: left; text-overflow: ellipsis; overflow: hidden; max-width: 120px;}.jimu-widget-setting-critical-facilities .symPick {padding-top: 1px; padding-bottom: 1px; border: 0px solid #D7D7D7;}.jimu-widget-setting-critical-facilities .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default;}.jimu-widget-setting-critical-facilities .layer-node {margin-bottom: 30px;}.jimu-widget-setting-critical-facilities .layer-symbol {padding-left: 25px; padding-top: 3px;}.jimu-rtl .jimu-widget-setting-critical-facilities .layer-symbol {padding-right: 25px; padding-top: 3px;}.jimu-widget-setting-critical-facilities .add-button {margin: 8px 0; display: inline-block; position: relative; padding-left: 16px; color: #518dca; background: url(images/add.png) no-repeat left; cursor: pointer;}.jimu-rtl .jimu-widget-setting-critical-facilities .add-button {margin: 8px; margin-left: 0; display: inline-block; position: relative; padding-right: 16px; color: #518dca; background: url(images/add.png) no-repeat right; cursor: pointer;}.jimu-widget-setting-critical-facilities .add-button:hover {background: url(images/add_hover.png) no-repeat left;}.jimu-rtl .jimu-widget-setting-critical-facilities .add-button:hover {background: url(images/add_hover.png) no-repeat right;}.jimu-widget-setting-critical-facilities .sources {height: 100%;}.jimu-widget-setting-critical-facilities .source-list {width: 270px; height: 250px;}.jimu-widget-setting-critical-facilities .source-setting {width: 650px; position: relative; height: 100%; overflow: auto; border-bottom: 1px solid #a0acbf;}.jimu-widget-setting-critical-facilities .source-setting .source-tips {display: none; font-size: 12px; color: #999;}.jimu-widget-setting-critical-facilities .source-setting .source-tips-show{display: block;}.jimu-widget-setting-critical-facilities .source-table{width: 100%;}.jimu-widget-setting-critical-facilities .source-url-section .source-table \x3e tbody \x3e tr:first-child \x3e td {padding-bottom: 5px;}.jimu-widget-setting-critical-facilities .source-url-section .source-table \x3e tbody \x3e tr \x3e .second {width: 455px;}.jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e td{padding-bottom: 10px;}.jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .first{width: auto; text-align: left; padding-right: 10px; white-space: nowrap;}.jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .second{width:550px;}.jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .third{width: 70px; padding-left: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .first{padding-left: 10px; padding-right: 0;}.jimu-rtl .jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .first{text-align: right; padding-left: 10px; padding-right: auto;}.jimu-rtl .jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .third{padding-left: 0; padding-right: 10px;}.jimu-widget-setting-critical-facilities .source-table .jimu-btn{padding: 0; line-height: 30px; width: 60px;}.jimu-widget-setting-critical-facilities .source-table \x3e tbody \x3e tr \x3e .second .tip{font-size: 12px; color: #999; width: 100%; display: inline-block;}.jimu-widget-setting-critical-facilities .source-table .error-message{color: #e84b4b !important;}.jimu-widget-setting-critical-facilities .jimu-basic-service-chooser {width: auto;}.override-geocode-service-chooser-content {width: 580px !important; min-height: 150px !important;}.override-geocode-service-chooser-content .service-browser-container{display: none;}.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .country-code-row td,.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .local-search-row td{padding-bottom: 35px; position: relative;}.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .local-search-row .first{padding-left: 20px;}.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .country-code-row .example,.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .local-search-row .example{position: absolute; top: 35px; left: 0; font-size: 12px; color: #999;}.jimu-rtl .jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .country-code-row .example{left: auto; right: 0;}.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .source-details-section .hide-country-code-row,.jimu-widget-critical-facilities .jimu-widget-setting-critical-facilities .hide-local-search-table {display: none;}.jimu-widget-setting-critical-facilities .xy-table-no-locator {position: relative; padding-left: 34px;}.jimu-widget-setting-critical-facilities .xy-table {width: 650px; position: relative; float: right; margin-bottom: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .xy-table {width: 650px; position: relative; float: left; margin-bottom: 10px;}.jimu-rtl .jimu-widget-setting-critical-facilities .xy-table-no-locator {position: relative; padding-right: 34px;}.jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td \x3e .tip {font-size: 12px; color: #999; display: inline-block;}.jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr {margin: 10px; cursor: default;}.jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td .edit-fields {background-image: url(images/edit_default.png); margin-left: 15px;}.jimu-rtl .jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td .edit-fields {background-image: url(images/edit_default.png); margin-right: 15px;}.jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td .edit-fields:hover {background-image: url(images/edit_hover.png);}.jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default; margin-left: 15px; float: left;}.jimu-rtl .jimu-widget-setting-critical-facilities .xy-table \x3e tbody \x3e tr \x3e td .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default; margin-right: 15px; float: right;}.jimu-widget-setting-critical-facilities .field-option-label {float: left;}.jimu-rtl .jimu-widget-setting-critical-facilities .field-option-label {float: right;}.jimu-widget-setting-critical-facilities .store-table {width: 100%;}.jimu-widget-setting-critical-facilities .store-table \x3e tbody \x3e tr \x3e td \x3e .tip {font-size: 12px; color: #999; width: 100%;}.jimu-widget-setting-critical-facilities .geocode-node {margin: 0px 10px 0px 10px;}.jimu-widget-setting-critical-facilities .no-fields-alert {width: 16px; height: 16px; background-image: url(../../images/warning.png); cursor: default; margin-left: 15px; background-repeat: no-repeat; float: left; background-size: contain;}.jimu-rtl .jimu-widget-setting-critical-facilities .no-fields-alert {width: 16px; height: 16px; background-image: url(../../images/warning.png); cursor: default; margin-right: 15px; background-repeat: no-repeat; float: right; background-size: contain;}.jimu-widget-setting-critical-facilities .pointer-events-none {pointer-events: none;}.jimu-widget-setting-critical-facilities .is-recognized-add-button {margin: 8px 0; display: block; position: relative; padding-left: 16px; color: #518dca; background: url(images/add.png) no-repeat left; cursor: pointer;}.jimu-rtl .jimu-widget-setting-critical-facilities .is-recognized-add-button {margin: 8px 0; display: block; position: relative; padding-right: 16px; color: #518dca; background: url(images/add.png) no-repeat right; cursor: pointer;}.jimu-widget-setting-critical-facilities .is-recognized-add-button:hover {background: url(images/add_hover.png) no-repeat left;}.jimu-rtl .jimu-widget-setting-critical-facilities .is-recognized-add-button:hover {background: url(images/add_hover.png) no-repeat right;}.jimu-widget-setting-critical-facilities .is-recognized-source-list {height: 300px;}.jimu-widget-setting-critical-facilities .is-recognized-source-list {height: 300px;}.jimu-widget-setting-critical-facilities .edit-fields {display: block; width: 18px; height: 16px; background-repeat: no-repeat; cursor: pointer; float: left;}.jimu-rtl .jimu-widget-setting-critical-facilities .edit-fields {display: block; width: 18px; height: 16px; background-repeat: no-repeat; cursor: pointer; float: right;}.jimu-widget-setting-critical-facilities .fields-table {width: 100%; margin-bottom: 10px;}.jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr {margin: 10px; cursor: default;}.jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td .edit-fields {background-image: url(images/edit_default.png); margin-left: 15px;}.jimu-rtl .jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td .edit-fields {background-image: url(images/edit_default.png); margin-right: 15px;}.jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td .edit-fields:hover {background-image: url(images/edit_hover.png);}.jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default; margin-left: 15px; float: left;}.jimu-rtl .jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td .edit-fields-disabled {display: block; width: 18px; height: 16px; background-image: url(images/edit_disabled.png); cursor: default; margin-right: 15px; float: right;}.jimu-widget-setting-critical-facilities .edit-fields-disabled {display: block; width: 18px; height: 16px; background-repeat: no-repeat; cursor: default;}.jimu-widget-setting-critical-facilities .fields-table \x3e tbody \x3e tr \x3e td \x3e .tip {font-size: 12px; color: #999; width: 100%; display: inline-block;}.jimu-widget-setting-critical-facilities .settings-field-set {height: auto; width: 100%; border: 1px solid #a0acbf; border-radius: 5px; font-size: 14px; color: #596679; margin-bottom: 10px; min-width: 0px;}.jimu-widget-setting-critical-facilities .settings-field-set-legend {margin-left: 20px;}.jimu-widget-setting-critical-facilities .dijitSelect .dijitArrowButton {background-color: #ffffff;}.jimu-widget-setting-critical-facilities .dijitSelect {background-color: #ffffff;}.jimu-widget-setting-critical-facilities .dijitSelect .dijitArrowButtonContainer {border: 0px solid #ffffff;}.jimu-widget-setting-critical-facilities .dijitSelect .dijitArrowButtonInner, .jimu-widget-setting-critical-facilities .dijitComboBox .dijitArrowButtonInner .jimu-widget-setting-critical-facilities .dijitButtonContents {border-style: none;}.jimu-widget-setting-critical-facilities .dijitSelect .dijitButtonContents {border-style: none;}.jimu-widget-setting-critical-facilities .dijitSelectFocused .dijitButtonContents {border-style: none;}.jimu-widget-setting-critical-facilities .dijitSelectFocused .dijitArrowButton {background-image: none;}.jimu-widget-setting-critical-facilities .claro .dijitSelectHover {border-color: #aaaaaa; background-color: #ffffff;}.jimu-widget-setting-critical-facilities .dijitValidationTextBoxHover {border-color: #aaaaaa; background-color: #ffffff;}.jimu-widget-setting-critical-facilities .dijitHover {border-color: #aaaaaa; background-color: #ffffff;}.jimu-widget-setting-critical-facilities .dijitTextBox {border-color: #aaaaaa;}.jimu-widget-setting-critical-facilities .jimu-viewstack {overflow: auto; height: calc(100% - 85px);}.jimu-widget-setting-critical-facilities .jimu-tab3 {overflow: hidden; height: 100%;}.jimu-widget-setting-critical-facilities .jimu-symbol-picker {border: none;}.jimu-widget-setting-critical-facilities .jimu-simple-table .body-section {border-left: 1px solid #c5c9cc; border-right: 1px solid #c5c9cc; border-bottom: 1px solid #c5c9cc;}",
"*now":function(v){v(['dojo/i18n!*preload*widgets/DataAggregation/setting/nls/Setting*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/when dojo/query dojo/_base/array dojo/dom-style dojo/dom-construct dojo/dom-class dojo/dom-attr dojo/Deferred dojo/DeferredList dijit/_WidgetsInTemplateMixin dijit/form/Select jimu/dijit/TabContainer3 jimu/BaseWidgetSetting jimu/dijit/SimpleTable jimu/LayerInfos/LayerInfos jimu/dijit/Message jimu/dijit/CheckBox dojo/sniff dijit/Editor jimu/utils jimu/dijit/LayerChooserFromMapWithDropbox esri/symbols/jsonUtils esri/request ../locatorUtils ./EditablePointFeatureLayerChooserFromMap ./EditFields ./ChooseLayer ./LocatorSourceSetting jimu/dijit/SymbolPicker jimu/dijit/EditorXssFilter dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/ViewSource dijit/_editor/plugins/FontChoice dojox/editor/plugins/Preview dijit/_editor/plugins/TextColor dojox/editor/plugins/ToolbarLineBreak dojox/editor/plugins/FindReplace dojox/editor/plugins/PasteFromWord dojox/editor/plugins/InsertAnchor dojox/editor/plugins/Blockquote dojox/editor/plugins/UploadImage jimu/dijit/EditorChooseImage jimu/dijit/EditorTextColor jimu/dijit/EditorBackgroundColor jimu/dijit/CheckBox dojo/domReady!".split(" "),function(v,
x,L,H,B,b,c,d,e,f,n,h,p,A,y,a,k,z,K,l,t,F,J,R,I,P,w,u,Q,S,g,q,E,N){return v([k,A],{baseClass:"jimu-widget-setting-critical-facilities",operLayerInfos:null,jimuLayerInfo:null,jimuLayerObject:null,layerInfo:null,postMixInProperties:function(){this.inherited(arguments);this.nls=x.mixin(this.nls,window.jimuNls.common)},postCreate:function(){this.inherited(arguments);this.editorXssFilter=N.getInstance();this.config&&this.config.sources||(this.config.sources=[]);this._initTabs();this.own(H(this.btnAddTargetLayerNode,
"click",x.hitch(this,this._addTargetBtnClicked)))},startup:function(){this.inherited(arguments);this._initEditorPluginsCSS();this._introductionMessagetEditor=this._initEditor(this.editorDescription);K.getInstance(this.map,this.map.itemInfo).then(x.hitch(this,function(m){this.operLayerInfos=m;this._initUI();u.setMap(this.map);u.setAppConfig(this.appConfig);u.setDefaultXYFields(this.config.defaultXYFields);B(u.getConfigInfo(this.config)).then(x.hitch(this,function(C){this.domNode&&this.setConfig(C)}))}))},
_initUI:function(){this._initLayerOptions();this._initLocationOptions()},_getText:function(m){return m.focusNode.innerHTML},_initTabs:function(){this.tab=new a({tabs:[{title:this.nls.targetLayerTabTitle,content:this.targetLayerTabNode},{title:this.nls.locationSettingsTabTitle,content:this.locationSettingsTabNode},{title:this.nls.generalSettingsTabTitle,content:this.generalSettingsTabNode}],"class":"esriCTFullHeight"});this.own(H(this.tab,"tabChanged",x.hitch(this,function(){this.tab.containerNode.scrollTop=
0})));this.tab.placeAt(this.tabDiv)},_updateAddLayerButtonState:function(){0===(new Q({multiple:!1,showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,createMapResponse:this.map.webMapResponse,skipLayerIds:this._getSelectedLayerIds()})).getAllItems().length?(f.add(this.btnAddTargetLayerNode,"esriCTDisabledTargetLayerButton"),this.layerList&&0===this.layerList.getRows().length&&f.remove(this.noValidLayerWarningNode,"esriCTHidden")):f.remove(this.btnAddTargetLayerNode,"esriCTDisabledTargetLayerButton")},
_addTargetBtnClicked:function(){if(!f.contains(this.btnAddTargetLayerNode,"esriCTDisabledTargetLayerButton")){var m=new Q({multiple:!1,showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,createMapResponse:this.map.webMapResponse,skipLayerIds:this._getSelectedLayerIds()});0===m.getAllItems().length?this._errorMessage(this.nls.needsEditablePointLayers):(m=new g({nls:this.nls,map:this.map,config:{},layerChooserFromMap:m}),this.own(H(m,"layerSelected",x.hitch(this,function(C){var G=this._addLayerRow();
C.getLayerObject().then(x.hitch(this,function(M){G.layerChooserSelect.setSelectedLayer(M);var r=b(".simple-table-cell",G)[0];n.set(r,"innerHTML",M.name);n.set(r,"title",M.name)}));this._updateAddLayerButtonState()}))))}},_getSelectedLayerIds:function(){var m=[];if(this.layerList){var C=this.layerList.getRows();c.forEach(C,x.hitch(this,function(G){G.layerInfo&&G.layerInfo.featureLayer&&G.layerInfo.featureLayer.id&&m.push(G.layerInfo.featureLayer.id)}))}return m},_initLayerOptions:function(){this.layerList=
new z({autoHeight:!0,selectable:!1,fields:[{name:"layer",title:this.nls.layerFieldTitle,width:"40%",type:"empty",editable:!0},{name:"symbol",title:this.nls.tempSymbolTitle,width:"40%",type:"empty",editable:!0},{name:"actions",title:this.nls.layerFields,width:"20%",type:"actions",actions:["up","down","delete","edit"]}]},this.layerList);this.layerList.placeAt(this.layerListNode);this.own(H(this.layerList,"actions-edit",x.hitch(this,function(G){this._onLayerEditFieldsClick(G)})));this.own(H(this.layerList,
"row-delete",x.hitch(this,this._updateAddLayerButtonState)));this.layerList.startup();b(".body-section",this.layerListNode);var m=b("th.simple-table-field",this.layerListNode),C=this.nls;m.forEach(function(G){G.title=G.innerHTML===C.layerFieldTitle?C.layerFieldsHint:C.tempSymbolHint?C.layerOptionHint:G.innerHTML===C.layerFields})},_addLayerRow:function(m){var C=this.layerList.addRow({});if(C.success&&C.tr){var G=C.tr;this._createLayerChooserSelect(G,m);this._initSymbolPicker(G);this._initLayerFieldsEdit(G)}return G},
_createLayerChooserSelect:function(m,C){var G=b(".simple-table-cell",m)[0];var M=new Q({multiple:!1,showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,createMapResponse:this.map.webMapResponse});M.errorTipSection&&M.errorTipSection.style&&d.set(M.errorTipSection,"display","none");M.startup();f.add(G,"layer-select-node");G=new I({layerChooser:M});G.startup();m.layerChooserSelect=G;this.own(H(G,"selection-change",x.hitch(this,function(){this._onLayerChanged(m)})));M=M.getAllItems();0===M.length?
(C=b(".action-item",this.layerList.domNode)[0],this._toggleNode(C,!1,"jimu-state-disabled","jimu-icon-edit"),this._validLayer=!1,this._updateOk(),this._showMessage(this.nls.needsEditablePointLayers)):C&&0<M.length&&M[0].layerInfo&&G.setSelectedLayer(M[0].layerInfo)},_initLayerFieldsEdit:function(m){var C=b(".simple-table-cell",m)[2];d.set(C,"vertical-align","top");d.set(C,"padding-top","7px");C&&(m.editLayerFields=e.create("div",{class:"esriCTErrorNodeContainer"},C),e.create("span",{"class":"jimu-icon jimu-icon-error layer-fields-edit-error esriCTEditActionButton",
title:this.nls.noFields},m.editLayerFields))},_initLocationOptions:function(){this.sourceList=new z({autoHeight:!1,selectable:!0,fields:[{name:"name",title:this.nls.name,width:"auto",type:"text",editable:!1},{name:"error",title:"",type:"extension",width:"30px",hidden:!1,create:x.hitch(this,this._createError),setValue:x.hitch(this,this._setErrorValue),getValue:x.hitch(this,this._getErrorValue)},{name:"actions",title:"",width:"80px",type:"actions",actions:["up","down","delete"]}]},this.sourceList);
L.setStyle(this.sourceList.domNode,"height","100%");this._validLocator=!1;this.sourceList.startup();this.own(H(this.sourceList,"row-select",x.hitch(this,this._onSourceItemSelected)));this.own(H(this.sourceList,"row-delete",x.hitch(this,this._onSourceItemRemoved)));this.xyEnabled=!1;this.enableXYField=this._initCheckBox(this.enableXYField,this.nls.enableXYField,this.editXYFields);this.own(H(this.editXYFields,"click",x.hitch(this,this._onXYEditFieldsClick)))},_createError:function(m){if(m){var C=e.create("span",
{"class":"jimu-icon jimu-icon-error locator-error display-none"},m);m.errorSpan=C}},_setErrorValue:function(m,C){C?f.contains(m.errorSpan,"display-none")&&(m.errorSpan.title=C,f.remove(m.errorSpan,"display-none")):f.add(m.errorSpan,"display-none")},_getErrorValue:function(m){return m.errorSpan&&f.contains(m.errorSpan,"display-none")},_initCheckBox:function(m,C,G){m=new t({checked:!1,label:C},m);this._toggleNode(G,!1,"edit-fields-disabled","edit-fields");this.own(H(m,"change",x.hitch(this,function(){var M=
m.getValue();this.xyEnabled=M;this.validateAddressOptions();this._toggleNode(G,M,"edit-fields-disabled","edit-fields")})));return m},_initSymbolPicker:function(m,C){if(m){var G=new E;var M=b(".simple-table-cell",m)[1];G.placeAt(M);G.startup();f.add(M,"layer-symbol");m.symbolPicker=G}C?G.showBySymbol(P.fromJson(C.symbol)):G.showByType("marker")},_onLayerChanged:function(m){var C=m.layerChooserSelect.getSelectedItem();if(C){this.jimuLayerInfo=C.layerInfo;this.jimuLayerObject=C.layerInfo.layerObject;
C=this._getDefaultLayerInfo(this.jimuLayerObject);var G=this._getLayerInfoFromConfiguration(this.jimuLayerObject);m.layerInfo=G||C;this._validLayer=!0;this._updateOk();this._validateLayerFields(m)}else this._validLayer=!1},addSelect:function(m,C){m.selectControl=new y({options:C,style:"width: 100%;"});m.selectControl.placeAt(m).startup()},_toggleNode:function(m,C,G,M){m&&(L.removeClass(m,C?G:M),L.addClass(m,C?M:G))},_onLayerEditFieldsClick:function(m){if(m.layerInfo){var C=new S({nls:this.nls,_layerInfo:m.layerInfo,
type:"fieldInfos"});this.own(H(C,"edit-fields-popup-ok",x.hitch(this,function(){this._validateLayerFields(m)})));C.popupEditPage()}},_validateLayerFields:function(m){this._validFields=0<this._getVisibleFields(m.layerInfo.fieldInfos).length;this._toggleNode(m.editLayerFields,this._validFields,"display-block","display-none");this._updateOk()},setConfig:function(m){this.config=m;m=m.sources;var C=[];var G=this.config.editorDescription?this.editorXssFilter.sanitize(this.config.editorDescription):this.nls.defaultStartPageInstructions;
this._introductionMessagetEditor.set("value",G);c.forEach(m,x.hitch(this,function(D,O){var T=this.sourceList.addRow({name:D.name||""});T&&T.success?(this._setRowConfig(T.tr,D),0===O&&setTimeout(x.hitch(this,function(){this.sourceList.selectRow(T.tr)}),100),D&&D.url&&C.push(this._verifyURL(D.url))):console.error("add row failed ",T)}));this.validateAddressOptions();(new p(C)).then(x.hitch(this,function(D){if(D)for(var O=0;O<D.length;O++){var T=D[O][1];T&&T.type&&"error"===T.type&&this.sourceList&&
(T=this.sourceList.getRows()[O],T.isDisabled=!0,T=b(".normal-text-div",T)[0],T.title=this.nls.locatorError,d.set(T,"color","red"))}}));(m=this.config.layerSettings)&&m.layerInfo&&m.layerInfo.featureLayer&&(m=[m]);if(m)for(G=0;G<m.length;G++){var M;m[G]&&m[G].layerInfo&&m[G].layerInfo.featureLayer&&(M=this.operLayerInfos.getLayerInfoById(m[G].layerInfo.featureLayer.id));if(M&&M.layerObject&&M.layerObject.isEditable()){var r=this._addLayerRow();M.getLayerObject().then(x.hitch(this,function(D){r.layerChooserSelect.setSelectedLayer(D).then(x.hitch(this,
function(){var O=b(".simple-table-cell",r)[0];n.set(O,"innerHTML",D.name);n.set(O,"title",D.name);this._validLayer=!0;this._updateOk()}))}));r.symbolPicker.showBySymbol(P.fromJson(m[G].symbol));this._validateLayerFields(r)}}this._updateAddLayerButtonState();this.config.defaultXYFields||this._setDefaultXYFields();this.xyEnabled="undefined"!==typeof this.config.xyEnabled?this.config.xyEnabled:!1;this.enableXYField.setValue(this.config.xyEnabled);this._setXYFields(this.defaultXYFields,this.config);this.validateAddressOptions()},
_verifyURL:function(m){var C=new h;w({url:m,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(x.hitch(this,function(G){C.resolve(G)}),x.hitch(this,function(G){console.error(G);C.resolve({type:"error",url:m})}));return C},validateAddressOptions:function(){var m=[],C=this.sourceList.getRows(),G=[],M=[],r=!1,D=!1;c.forEach(C,x.hitch(this,function(O){var T=O.singleEnabled,U=O.multiEnabled&&O.addressFields?this._getVisibleFields(O.addressFields):[];U=O.multiEnabled&&0<U.length;G.push(T);
M.push(U);r=U?U:r;D=T?T:D;m.push(U&&T?!0:U||T);this._toggleNode(O.noFieldsNode,O.multiEnabled?U:!0,"display-block","display-none")}));this._validateMatchingOptions(C,r,M,D,G);C=r||D;this._validAddressOptions=this.xyEnabled&&C?!0:C?!0:this.xyEnabled;this._updateOk()},_validateMatchingOptions:function(m,C,G,M,r){C=!C||G.every(function(O){return!0===O});M=!M||r.every(function(O){return!0===O});var D=C&&M?null:this.nls.optionNotMatch;c.forEach(m,x.hitch(this,function(O){O=b(".error",O)[0];this.sourceList.fields[1].setValue(O,
D)}))},_getVisibleFields:function(m){var C=[];m&&m.filter&&(C=m.filter(function(G){return G.visible}));return C},_getLayerInfoFromConfiguration:function(m){var C=this.config.layerSettings;C&&C.layerInfo&&C.layerInfo.featureLayer&&(C=[C]);if(C)for(var G=0;G<C.length;G++)if(C[G]&&C[G].layerInfo&&C[G].layerInfo.featureLayer&&C[G].layerInfo.featureLayer.id===m.id){var M=C[G].layerInfo;M.fieldInfos=this._getFieldInfos(m,M);break}return M},_getDefaultLayerInfo:function(m){return{featureLayer:{id:m.id,fields:m.fields,
title:m.name,url:m.url},fieldInfos:this._getFieldInfos(m)}},_getDefaultFieldInfos:function(m){for(var C=[],G=0;G<m.fields.length;G++)if(m.fields[G].editable&&m.fields[G].name!==m.globalIdField&&m.fields[G].name!==m.objectIdField){var M=[m.fields[G].name];m.fields[G].alias&&-1===M.indexOf(m.fields[G].alias)&&M.push(m.fields[G].alias);C.push({fieldName:m.fields[G].name,label:m.fields[G].alias||m.fields[G].name,isEditable:m.fields[G].editable,visible:!1,isRecognizedValues:M,type:m.fields[G].type})}return C},
_getWebmapFieldInfos:function(m){var C=[],G=this._getFieldInfosFromWebmap(m.id,this.operLayerInfos);G?(c.forEach(G,function(M){void 0!==M.isEditableOnLayer&&M.isEditableOnLayer&&M.fieldName!==m.globalIdField&&M.fieldName!==m.objectIdField&&C.push({fieldName:M.fieldName,label:M.label,isEditable:M.isEditable,visible:M.visible,type:M.fieldType})}),0===C.length&&(C=null)):C=null;return C},_getFieldInfosFromWebmap:function(m,C){var G=null;(m=C.getLayerInfoByTopLayerId(m))&&(m=m.getPopupInfo())&&m.fieldInfos&&
(G=x.clone(m.fieldInfos));G&&c.forEach(G,function(M){M.format&&M.format.dateFormat&&M.format.dateFormat.toLowerCase()&&0<=M.format.dateFormat.toLowerCase().indexOf("time")&&(M.format.time=!0)});return G},_getFieldInfos:function(m,C){var G=[],M=this._getWebmapFieldInfos(m),r=this._getDefaultFieldInfos(m);r=r?r:M;C&&C.fieldInfos?(c.forEach(C.fieldInfos,function(D){if(!D.hasOwnProperty("isRecognizedValues")){var O=[D.fieldName];D.label&&-1===O.indexOf(D.label)&&O.push(D.label);D.isRecognizedValues=O}if("undefined"===
typeof D.visible)if(M)for(O=0;O<M.length;O++)D.fieldName===M[O].fieldName&&(D.visible=M[O].visible||M[O].isEditable);else D.visible=!0;for(O=0;O<r.length;O++)if(D.fieldName===r[O].fieldName){G.push(D);r[O]._exit=!0;break}}),c.forEach(r,function(D){D._exit||G.push(D)})):G=r;return G},getConfig:function(){var m=this.layerList.getRows();if(0>=m.length)return this._errorMessage(this.nls.noTargetLayerConfiguredErrorMsg,this.nls.targetLayerTabTitle),!1;if(!this._validateFieldSettings())return this._errorMessage(this.nls.noFieldsForTargetLayer,
this.nls.targetLayerTabTitle),!1;this.config.layerSettings=[];c.forEach(m,x.hitch(this,function(G){this.config.layerSettings.push({layerInfo:G.layerInfo,symbol:G.symbolPicker.getSymbol().toJson()})}));this.config.editorDescription=this._getText(this._introductionMessagetEditor);if(this._currentSourceSetting&&this._currentSourceSetting.isValidConfig())this._closeSourceSetting();else return this._errorMessage(this.nls.locationSettingsNotConfigured,this.nls.locationSettingsTabTitle),!1;m=this.sourceList.getRows();
var C=[];c.forEach(m,x.hitch(this,function(G){var M=this._getRowConfig(G);M.isEsriLocator=this._currentSourceSetting._isEsriLocator(M.url);delete M._definition;this._removeRowConfig(G);C.push(M)}));this.config.sources=C;this.config.xyFields=this.xyFields||this.config.defaultXYFields;this.config.xyEnabled=this.xyEnabled;return this.config},_validateFieldSettings:function(){var m;return(m=b(".esriCTErrorNodeContainer.display-block",this.layerListNode))&&0<m.length?!1:!0},_errorMessage:function(m,C){(new l({message:m})).message=
m;this.tab&&C&&this.tab.selectTab(C)},_setDefaultXYFields:function(){this.config.defaultXYFields=[{fieldName:"X",alias:this.nls.xyFieldsLabelX,label:this.nls.xyFieldsLabelX,visible:!0,isRecognizedValues:["X",this.nls.xyFieldsX,this.nls.longitude,this.nls.lon,this.nls.easting],type:"STRING"},{fieldName:"Y",alias:this.nls.xyFieldsLabelY,label:this.nls.xyFieldsLabelY,visible:!0,isRecognizedValues:["Y",this.nls.xyFieldsY,this.nls.latitude,this.nls.lat,this.nls.northing],type:"STRING"}]},_onXYEditFieldsClick:function(){if(this.xyEnabled){var m=
new S({nls:this.nls,type:"locatorFields",addressFields:this.xyFields||this.config.defaultXYFields,popupTitle:this.nls.configureXYFields,disableDisplayOption:!0,disableDuplicateOption:!0});this.own(H(m,"edit-fields-popup-ok",x.hitch(this,function(){this.xyFields=m.fieldInfos})));m.popupEditPage()}},_setXYFields:function(m,C){this.xyFields=C&&C.xyFields&&C.xyFields.hasOwnProperty("length")&&0<C.xyFields.length?C.xyFields:m},_onAddClick:function(){this._createNewLocatorSourceSettingFromMenuItem({},{})},
_createNewLocatorSourceSettingFromMenuItem:function(m,C){var G=new q({nls:this.nls,map:this.map,defaultXYFields:this.config.defaultXYFields,parent:this,enableXYField:this.enableXYField});G.setDefinition(C);G.setConfig({url:m.url||"",name:m.name||"",singleLineFieldName:m.singleLineFieldName||"",countryCode:m.countryCode||"",addressFields:m.addressFields||[],singleAddressFields:m.singleAddressFields||[],xyFields:m.xyFields||[],singleEnabled:m.singleEnabled||!1,multiEnabled:m.multiEnabled||!1,xyEnabled:m.xyEnabled||
!1,minCandidateScore:m.minCandidateScore||90,type:"locator"});G._openLocatorChooser();G.own(H(G,"select-locator-url-ok",x.hitch(this,function(M){(M=this.sourceList.addRow({name:M.name||"New Geocoder"},this.sourceList.getRows().length))&&M.success&&(this._currentSourceSetting&&this._closeSourceSetting(),G.setRelatedTr(M.tr),G.placeAt(this.sourceSettingNode),this.sourceList.selectRow(M.tr),this._currentSourceSetting=G);M=b(".xy-table");0<M.length&&L.removeClass(M[0],"display-none");this._validLocator=
!0;this._updateOk()})));G.own(H(G,"reselect-locator-url-ok",x.hitch(this,function(M){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:M.name})})));G.own(H(G,"select-locator-url-cancel",x.hitch(this,function(){this._currentSourceSetting!==G&&(G.destroy(),G=null)})))},_createNewLocatorSourceSettingFromSourceList:function(m,C,G){this._currentSourceSetting&&this._closeSourceSetting();this._currentSourceSetting=new q({nls:this.nls,map:this.map,defaultXYFields:this.config.defaultXYFields,
parent:this,enableXYField:this.enableXYField});this._currentSourceSetting.setDefinition(C);this._currentSourceSetting.setConfig({url:m.url||"",name:m.name||"",singleLineFieldName:m.singleLineFieldName||"",countryCode:m.countryCode||"",addressFields:m.addressFields,singleAddressFields:m.singleAddressFields,xyFields:m.xyFields,singleEnabled:m.singleEnabled,multiEnabled:m.multiEnabled,xyEnabled:m.xyEnabled,minCandidateScore:m.minCandidateScore||90,type:"locator"});this._currentSourceSetting.setRelatedTr(G);
this._currentSourceSetting.placeAt(this.sourceSettingNode);this._validLocator=!0;this._updateOk();this._currentSourceSetting.own(H(this._currentSourceSetting,"reselect-locator-url-ok",x.hitch(this,function(M){var r=this._currentSourceSetting.getRelatedTr();this.sourceList.editRow(r,{name:M.name});this._validLocator=!0;this._updateOk()})));this.validateAddressOptions()},_onSourceItemRemoved:function(m){this._currentSourceSetting?(this._currentSourceSetting.getRelatedTr()===m&&(this._currentSourceSetting.destroy(),
this._currentSourceSetting=null),m=this.sourceList.getRows(),0<m.length?(this._onSourceItemSelected(m[0]),this.validateAddressOptions()):(this._validLocator=!1,this._updateOk(),this._showMessage(this.nls.requiresLocator),m=b(".xy-table"),0<m.length&&L.addClass(m[0],"display-none"))):(this._validLocator=!1,this._updateOk())},_onSourceItemSelected:function(m){var C=this._getRowConfig(m),G=this._currentSourceSetting&&this._currentSourceSetting.tr;C&&m!==G&&(this._currentSourceSetting&&!this._currentSourceSetting.isValidConfig()?
(this._currentSourceSetting.showValidationTip(),this.sourceList.selectRow(G)):this._createNewLocatorSourceSettingFromSourceList(C,C._definition||{},m))},_setRowConfig:function(m,C){b(m).data("config",x.clone(C));m.singleEnabled=C.singleEnabled;m.addressFields=C.addressFields;m.multiEnabled=C.multiEnabled;this.validateAddressOptions()},_getRowConfig:function(m){return b(m).data("config")[0]},_removeRowConfig:function(m){m.singleEnabled=!1;m.multiEnabled=!1;m.addressFields=[];return b(m).removeData("config")},
_closeSourceSetting:function(){var m=this._currentSourceSetting.getRelatedTr(),C=this._currentSourceSetting.getConfig();C._definition=this._currentSourceSetting.getDefinition();this._setRowConfig(m,C);this.sourceList.editRow(m,{name:C.name});m.isDisabled&&this._currentSourceSetting._updateNameText(!0);this._currentSourceSetting.destroy()},_updateOk:function(){b(".button-container")},_showMessage:function(m){new l({message:m})},destroy:function(){this.emit("before-destroy");this.inherited(arguments)},
_initEditor:function(m){var C=new J({plugins:["bold","italic","underline",R.getEditorTextColor("smartEditor"),R.getEditorBackgroundColor("smartEditor"),"|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent"],extraPlugins:["|","createLink","unlink","pastefromword","|","undo","redo","|","toolbarlinebreak",{name:"dijit._editor.plugins.FontChoice",command:"fontName",custom:"Arial;Comic Sans MS;Courier New;Garamond;Tahoma;Times New Roman;Verdana".split(";")},
"fontSize","formatBlock"],style:"font-family:Verdana;"},m);d.set(C.domNode,{width:"100%",height:"100%"});C.startup();8!==F("ie")?C.resize({w:"100%",h:"100%"}):(m=L.getMarginBox(m),C.resize({w:m.w,h:m.h}));return C},_initEditorPluginsCSS:function(){var m=document.getElementsByTagName("head")[0];var C=window.apiUrl+"dojox/editor/plugins/resources/css/TextColor.css";b('link[href\x3d"'+C+'"]',m)[0]||R.loadStyleLink("editor_plugins_resources_TextColor",C);C=window.apiUrl+"dojox/editor/plugins/resources/editorPlugins.css";
b('link[href\x3d"'+C+'"]',m)[0]||R.loadStyleLink("editor_plugins_resources_editorPlugins",C);C=window.apiUrl+"dojox/editor/plugins/resources/css/PasteFromWord.css";b('link[href\x3d"'+C+'"]',m)[0]||R.loadStyleLink("editor_plugins_resources_PasteFromWord",C)}})});