// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.7/esri/copyright.txt for details. //>>built require({cache:{"esri/identity/IdentityManagerDialog":function(){define("dojo/_base/kernel ../core/declare dojo/Deferred dojo/_base/lang dojo/dom-attr dojo/keys dijit/registry dijit/Dialog ../kernel ../core/lang ../core/Error ../core/domUtils ./Credential ./IdentityManagerBase dojo/i18n!./nls/identity dojo/query dijit/form/Button dijit/form/Form dijit/form/ValidationTextBox".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y){return m([w],{declaredClass:"esri.identity.IdentityManager",constructor:function(a){f.mixin(this, a)},_dialogContent:"\x3cdiv data-dojo-type\x3d'dijit.form.Form' data-dojo-props\x3d'\"class\":\"esriIdForm\"'\x3e\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{info}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3ctable style\x3d'width: 100%;'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblUser}\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"text\", \"class\":\"esriIdUser\", required:true, trim:true, style:\"width: 100%;\", autocapitalize:\"none\", autocorrect:\"off\", spellcheck:false' /\x3e\x3c/label\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblPwd}\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"password\", \"class\":\"esriIdPwd\", required:true, style:\"width: 100%;\"' /\x3e\x3c/label\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e", signIn:function(a,b,g){this._nls||(this._nls=y);this._loginDialog||(this._loginDialog=this.dialog=this._createLoginDialog(),this.emit("dialog-create"));var c=this._loginDialog,p=g&&g.error,k=g&&g.token,t=new l(function(){c.onCancel()});if(c.open)return a=new d("identity-manager:busy","BUSY"),t.reject(a),t.promise;v.hide(c.errMsg_);p&&p.details&&403==p.details.httpStatus&&k&&(h.set(c.errMsg_,"innerHTML",this._nls.forbidden),v.show(c.errMsg_));c.dfd_=t;c.serverInfo_=b;c.resUrl_=a;c.admin_=g&&g.isAdmin; h.set(c.resLink_,{title:a,innerHTML:"("+(this.getResourceName(a)||this._nls.lblItem)+")"});h.set(c.serverLink_,{title:b.server,innerHTML:(-1!==b.server.toLowerCase().indexOf("arcgis.com")?"ArcGIS Online":b.server)+" "});c.txtPwd_.set("value","");c.show();return t.promise},_createLoginDialog:function(){var p=this._nls,w=a.substitute(p,this._dialogContent),w=a.substitute({resource:"\x3cspan class\x3d'resLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e",server:"\x3cspan class\x3d'serverLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e"}, w),f=new g({title:p.title,content:w,"class":" esri-widget esriSignInDialog esriIdentityDialog",style:"width: 18em;",esriIdMgr_:this,onShow:function(){this.domNode.classList.add("esriIdentityDialog--visible")},onHide:function(){this.domNode.classList.remove("esriIdentityDialog--visible")},keypressed_:function(a){a.charOrCode===k.ENTER&&this.execute_()},execute_:function(){var d=this.txtUser_.get("value"),c=this.txtPwd_.get("value"),f=this.dfd_,t=this;if(this.form_.validate()&&d&&c){this.btnSubmit_.set("label", p.lblSigning);var k=b.id.findCredential(t.resUrl_,d),w=function(b){t.btnSubmit_.set("label",p.lblOk);t.btnSubmit_.set("disabled",!1);v.hide(t.errMsg_);t.hide();g._DialogLevelManager.hide(t);var c=t.serverInfo_;t.dfd_=t.serverInfo_=t.generateDfd_=t.resUrl_=null;var e,r,C=k,h;b&&(e=b.token,r=a.isDefined(b.expires)?Number(b.expires):null,h=!!b.ssl,C?(C.userId=d,C.token=e,C.expires=r,C.validity=b.validity,C.ssl=h,C.creationTime=(new Date).getTime()):C=new q({userId:d,server:c.server,token:e,expires:r, ssl:h,isAdmin:t.admin_,validity:b.validity}));f.resolve(C)};k&&!k._enqueued?w():(t.btnSubmit_.set("disabled",!0),t.generateDfd_=b.id.generateToken(this.serverInfo_,{username:d,password:c},{isAdmin:this.admin_}).then(w).then(null,function(a){t.btnSubmit_.set("disabled",!1);t.generateDfd_=null;t.btnSubmit_.set("label",p.lblOk);h.set(t.errMsg_,"innerHTML",a&&a.details&&a.details.httpStatus?p.invalidUser:p.noAuthService);v.show(t.errMsg_)}))}},cancel_:function(){f.generateDfd_&&f.generateDfd_.cancel(); var a=f.dfd_,b=f.resUrl_,c=f.serverInfo_;f.btnSubmit_.set("disabled",!1);f.dfd_=f.serverInfo_=f.generateDfd_=f.resUrl_=null;v.hide(f.errMsg_);g._DialogLevelManager.hide(f);f.esriIdMgr_.emit("dialog-cancel",{resourceUrl:b,serverInfo:c});b=new d("identity-manager:user-aborted","ABORTED");a.reject(b)}}),w=f.domNode;f.form_=c.byNode(n.query(".esriIdForm",w)[0]);f.txtUser_=c.byNode(n.query(".esriIdUser",w)[0]);f.txtPwd_=c.byNode(n.query(".esriIdPwd",w)[0]);f.btnSubmit_=c.byNode(n.query(".esriIdSubmit", w)[0]);f.btnCancel_=c.byNode(n.query(".esriIdCancel",w)[0]);f.resLink_=n.query(".resLink",w)[0];f.serverLink_=n.query(".serverLink",w)[0];f.errMsg_=n.query(".esriErrorMsg",w)[0];f.connect(f.txtUser_,"onKeyPress",f.keypressed_);f.connect(f.txtPwd_,"onKeyPress",f.keypressed_);f.connect(f.btnSubmit_,"onClick",f.execute_);f.connect(f.btnCancel_,"onClick",f.onCancel);f.connect(f,"onCancel",f.cancel_);return f}})})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(n, m,l){var f={},h={},k={length:0,add:function(c){if(h[c.id])throw Error("Tried to register widget with id\x3d\x3d"+c.id+" but that id is already registered");h[c.id]=c;this.length++},remove:function(c){h[c]&&(delete h[c],this.length--)},byId:function(c){return"string"==typeof c?h[c]:c},byNode:function(c){return h[c.getAttribute("widgetId")]},toArray:function(){var c=[],g;for(g in h)c.push(h[g]);return c},getUniqueId:function(c){var g;do g=c+"_"+(c in f?++f[c]:f[c]=0);while(h[g]);return"dijit"==l._scopeName? g:l._scopeName+"_"+g},findWidgets:function(c,g){function b(d){for(d=d.firstChild;d;d=d.nextSibling)if(1==d.nodeType){var c=d.getAttribute("widgetId");c?(c=h[c])&&a.push(c):d!==g&&b(d)}}var a=[];b(c);return a},_destroyAll:function(){l._curFocus=null;l._prevFocus=null;l._activeStack=[];n.forEach(k.findWidgets(m.body()),function(c){c._destroyed||(c.destroyRecursive?c.destroyRecursive():c.destroy&&c.destroy())})},getEnclosingWidget:function(c){for(;c;){var g=1==c.nodeType&&c.getAttribute("widgetId"); if(g)return h[g];c=c.parentNode}return null},_hash:h};return l.registry=k})},"dijit/main":function(){define(["dojo/_base/kernel"],function(n){return n.dijit})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/touch dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane ./layout/utils dojo/text!./templates/Dialog.html ./a11yclick dojo/i18n!./nls/common".split(" "), function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p,G,D,x,u,z,t,A,F,H,E,e,r,C,M,O){function I(){}var J=new h;J.resolve(!0);t=f("dijit._DialogBase"+(p("dojo-bidi")?"_NoBidi":""),[F,E,e,H],{templateString:O,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:t.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,draggable:!0,_setDraggableAttr:function(e){this._set("draggable",e)},maxRatio:.9, closable:!0,_setClosableAttr:function(e){this.closeButtonNode.style.display=e?"":"none";this._set("closable",e)},postMixInProperties:function(){var e=d.getLocalization("dijit","common");q.mixin(this,e);this.inherited(arguments)},postCreate:function(){b.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);l.after(this,"onExecute",q.hitch(this,"hide"),!0);l.after(this,"onCancel",q.hitch(this,"hide"),!0);w(this.closeButtonNode, G.press,function(e){e.stopPropagation()});this._modalconnects=[]},onLoad:function(){this.resize();this._position();this.autofocus&&N.isTop(this)&&(this._getFocusItems(),z.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems();z.focus(this._firstFocusItem)},_endDrag:function(){var e=g.position(this.domNode),a=D.getBox(this.ownerDocument);e.y=Math.min(Math.max(e.y,0),a.h-e.h);e.x=Math.min(Math.max(e.x,0),a.w-e.w);this._relativePosition=e;this._position()},_setup:function(){var e= this.domNode;this.titleBar&&this.draggable?(this._moveable=new (6==p("ie")?u:x)(e,{handle:this.titleBar}),l.after(this._moveable,"onMoveStop",q.hitch(this,"_endDrag"),!0)):c.add(e,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":m.map(this["class"].split(/\s/),function(e){return e+"_underlay"}).join(" "),_onKeyDown:q.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this.resize()},_position:function(){if(!c.contains(this.ownerDocumentBody,"dojoMove")){var e= this.domNode,a=D.getBox(this.ownerDocument),r=this._relativePosition,d=g.position(e);b.set(e,{left:Math.floor(a.l+(r?Math.min(r.x,a.w-d.w):(a.w-d.w)/2))+"px",top:Math.floor(a.t+(r?Math.min(r.y,a.h-d.h):(a.h-d.h)/2))+"px"})}},_onKey:function(e){if(e.keyCode==v.TAB){this._getFocusItems();var a=e.target;this._firstFocusItem==this._lastFocusItem?(e.stopPropagation(),e.preventDefault()):a==this._firstFocusItem&&e.shiftKey?(z.focus(this._lastFocusItem),e.stopPropagation(),e.preventDefault()):a!=this._lastFocusItem|| e.shiftKey||(z.focus(this._firstFocusItem),e.stopPropagation(),e.preventDefault())}else this.closable&&e.keyCode==v.ESCAPE&&(this.onCancel(),e.stopPropagation(),e.preventDefault())},show:function(){if(this.open)return J.promise;this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),N.hide(this));var e=D.get(this.ownerDocument);this._modalconnects.push(w(e,"scroll",q.hitch(this,"resize",null)));this._modalconnects.push(w(this.domNode, "keydown",q.hitch(this,"_onKey")));b.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this.resize();this._position();var r;this._fadeInDeferred=new h(q.hitch(this,function(){r.stop();delete this._fadeInDeferred}));this._fadeInDeferred.then(void 0,I);e=this._fadeInDeferred.promise;r=a.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:q.hitch(this,function(){N.show(this,this.underlayAttrs)}),onEnd:q.hitch(this,function(){this.autofocus&&N.isTop(this)&&(this._getFocusItems(), z.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return e},hide:function(){if(!this._alreadyInitialized||!this.open)return J.promise;this._fadeInDeferred&&this._fadeInDeferred.cancel();var e;this._fadeOutDeferred=new h(q.hitch(this,function(){e.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(void 0,I);this._fadeOutDeferred.then(q.hitch(this,"onHide"));var r=this._fadeOutDeferred.promise;e=a.fadeOut({node:this.domNode,duration:this.duration, onEnd:q.hitch(this,function(){this.domNode.style.display="none";N.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();this._scrollConnected&&(this._scrollConnected=!1);for(var d;d=this._modalconnects.pop();)d.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return r},resize:function(e){if("none"!=this.domNode.style.display){this._checkIfSingleChild();if(!e){this._shrunk&&(this._singleChild&&"undefined"!=typeof this._singleChildOriginalStyle&& (this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle),m.forEach([this.domNode,this.containerNode,this.titleBar,this.actionBarNode],function(e){e&&b.set(e,{position:"static",width:"auto",height:"auto"})}),this.domNode.style.position="absolute");var a=D.getBox(this.ownerDocument);a.w*=this.maxRatio;a.h*=this.maxRatio;var r=g.position(this.domNode);r.w>=a.w||r.h>=a.h?(e={w:Math.min(r.w,a.w),h:Math.min(r.h,a.h)},this._shrunk=!0):this._shrunk=!1}if(e){g.setMarginBox(this.domNode, e);a=[];this.titleBar&&a.push({domNode:this.titleBar,region:"top"});this.actionBarNode&&a.push({domNode:this.actionBarNode,region:"bottom"});r={domNode:this.containerNode,region:"center"};a.push(r);var d=M.marginBox2contentBox(this.domNode,e);M.layoutChildren(this.domNode,d,a);this._singleChild?(a=M.marginBox2contentBox(this.containerNode,r),this._singleChild.resize({w:a.w,h:a.h})):(this.containerNode.style.overflow="auto",this._layoutChildren())}else this._layoutChildren();p("touch")||e||this._position()}}, _layoutChildren:function(){m.forEach(this.getChildren(),function(e){e.resize&&e.resize()})},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var e;e=this._modalconnects.pop();)e.remove();N.hide(this);this.inherited(arguments)}});p("dojo-bidi")&&(t=f("dijit._DialogBase",t,{_setTitleAttr:function(e){this._set("title",e);this.titleNode.innerHTML=e;this.applyTextDir(this.titleNode)}, _setTextDirAttr:function(e){this._created&&this.textDir!=e&&(this._set("textDir",e),this.set("title",this.title))}}));var L=f("dijit.Dialog",[C,t],{});L._DialogBase=t;var N=L._DialogLevelManager={_beginZIndex:950,show:function(e,a){B[B.length-1].focus=z.curNode;var d=B[B.length-1].dialog?B[B.length-1].zIndex+2:L._DialogLevelManager._beginZIndex;b.set(e.domNode,"zIndex",d);r.show(a,d-1);B.push({dialog:e,underlayAttrs:a,zIndex:d})},hide:function(e){if(B[B.length-1].dialog==e){B.pop();var a=B[B.length- 1];1==B.length?r.hide():r.show(a.underlayAttrs,a.zIndex-1);if(e.refocus&&(e=a.focus,!a.dialog||e&&k.isDescendant(e,a.dialog.domNode)||(a.dialog._getFocusItems(),e=a.dialog._firstFocusItem),e))try{e.focus()}catch(K){}}else a=m.indexOf(m.map(B,function(e){return e.dialog}),e),-1!=a&&B.splice(a,1)},isTop:function(e){return B[B.length-1].dialog==e}},B=L._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];z.watch("curNode",function(e,a,r){e=B[B.length-1].dialog;if(r&&e&&!e._fadeOutDeferred&&r.ownerDocument== e.ownerDocument){do if(r==e.domNode||c.contains(r,"dijitPopup"))return;while(r=r.parentNode);e.focus()}});p("dijit-legacy-requires")&&y(0,function(){n(["dijit/TooltipDialog"])});return L})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),function(n,m,l,f,h,k,c,g,b,a){function d(a,r,d){return y&&d?function(e,a){return k(e,d,a)}:G?function(d,b){var c=k(d,r,function(a){b.call(this,a);e=(new Date).getTime()}), g=k(d,a,function(a){(!e||(new Date).getTime()>e+1E3)&&b.call(this,a)});return{remove:function(){c.remove();g.remove()}}}:function(e,r){return k(e,a,r)}}function v(e){do if(void 0!==e.dojoClick)return e;while(e=e.parentNode)}function q(e,r,d){if(!g.isRight(e)){var b=v(e.target);if(x=!e.target.disabled&&b&&b.dojoClick)if(z=(u="useTarget"==x)?b:e.target,u&&e.preventDefault(),t=e.changedTouches?e.changedTouches[0].pageX-a.global.pageXOffset:e.clientX,A=e.changedTouches?e.changedTouches[0].pageY-a.global.pageYOffset: e.clientY,F=("object"==typeof x?x.x:"number"==typeof x?x:0)||4,H=("object"==typeof x?x.y:"number"==typeof x?x:0)||4,!D){e=function(e){a.doc.addEventListener(e,function(a){var r=a.target;x&&!a._dojo_click&&(new Date).getTime()<=E+1E3&&("INPUT"!=r.tagName||!f.contains(r,"dijitOffScreen"))&&(a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),"click"==e&&("INPUT"!=r.tagName||"radio"==r.type&&(f.contains(r,"dijitCheckBoxInput")||f.contains(r,"mblRadioButton"))||"checkbox"==r.type&& (f.contains(r,"dijitCheckBoxInput")||f.contains(r,"mblCheckBox")))&&"TEXTAREA"!=r.tagName&&"AUDIO"!=r.tagName&&"VIDEO"!=r.tagName&&a.preventDefault())},!0)};var c=function(e){x=u?l.isDescendant(a.doc.elementFromPoint(e.changedTouches?e.changedTouches[0].pageX-a.global.pageXOffset:e.clientX,e.changedTouches?e.changedTouches[0].pageY-a.global.pageYOffset:e.clientY),z):x&&(e.changedTouches?e.changedTouches[0].target:e.target)==z&&Math.abs((e.changedTouches?e.changedTouches[0].pageX-a.global.pageXOffset: e.clientX)-t)<=F&&Math.abs((e.changedTouches?e.changedTouches[0].pageY-a.global.pageYOffset:e.clientY)-A)<=H};D=!0;a.doc.addEventListener(r,function(e){g.isRight(e)||(c(e),u&&e.preventDefault())},!0);a.doc.addEventListener(d,function(e){if(!g.isRight(e)&&(c(e),x)){var a=function(a){var r=document.createEvent("MouseEvents");r._dojo_click=!0;r.initMouseEvent(a,!0,!0,e.view,e.detail,d.screenX,d.screenY,d.clientX,d.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null);return r};E=(new Date).getTime(); var r=u?z:e.target;"LABEL"===r.tagName&&(r=l.byId(r.getAttribute("for"))||r);var d=e.changedTouches?e.changedTouches[0]:e,b=a("mousedown"),h=a("mouseup"),f=a("click");setTimeout(function(){k.emit(r,"mousedown",b);k.emit(r,"mouseup",h);k.emit(r,"click",f);E=(new Date).getTime()},0)}},!0);e("click");e("mousedown");e("mouseup")}}}var w=5>c("ios"),y=c("pointer-events")||0,p=function(){var e={},a;for(a in{down:1,move:1,up:1,cancel:1,over:1,out:1})e[a]="pointer"+a;return e}(),G=c("touch-events"),D,x,u= !1,z,t,A,F,H,E,e,r;c("touch")&&(y?b(function(){a.doc.addEventListener(p.down,function(e){q(e,p.move,p.up)},!0)}):b(function(){function d(e){var a=h.delegate(e,{bubbles:!0});6<=c("ios")&&(a.touches=e.touches,a.altKey=e.altKey,a.changedTouches=e.changedTouches,a.ctrlKey=e.ctrlKey,a.metaKey=e.metaKey,a.shiftKey=e.shiftKey,a.targetTouches=e.targetTouches);return a}r=a.body();a.doc.addEventListener("touchstart",function(a){e=(new Date).getTime();var d=r;r=a.target;k.emit(d,"dojotouchout",{relatedTarget:r, bubbles:!0});k.emit(r,"dojotouchover",{relatedTarget:d,bubbles:!0});q(a,"touchmove","touchend")},!0);k(a.doc,"touchmove",function(b){e=(new Date).getTime();var c=a.doc.elementFromPoint(b.pageX-(w?0:a.global.pageXOffset),b.pageY-(w?0:a.global.pageYOffset));c&&(r!==c&&(k.emit(r,"dojotouchout",{relatedTarget:c,bubbles:!0}),k.emit(c,"dojotouchover",{relatedTarget:r,bubbles:!0}),r=c),k.emit(c,"dojotouchmove",d(b))||b.preventDefault())});k(a.doc,"touchend",function(r){e=(new Date).getTime();var b=a.doc.elementFromPoint(r.pageX- (w?0:a.global.pageXOffset),r.pageY-(w?0:a.global.pageYOffset))||a.body();k.emit(b,"dojotouchend",d(r))})}));m={press:d("mousedown","touchstart",p.down),move:d("mousemove","dojotouchmove",p.move),release:d("mouseup","dojotouchend",p.up),cancel:d(g.leave,"touchcancel",y?p.cancel:null),over:d("mouseover","dojotouchover",p.over),out:d("mouseout","dojotouchout",p.out),enter:g._eventHandler(d("mouseover","dojotouchover",p.over)),leave:g._eventHandler(d("mouseout","dojotouchout",p.out))};return n.touch= m})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(n,m,l,f,h,k,c){m.add("rtl-adjust-position-for-verticalScrollBar",function(b,a){b=l.body(a);a=c.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},b,"last");var d=c.create("div",{style:{overflow:"hidden",direction:"ltr"}},a,"last"),g=0!=h.position(d).x; a.removeChild(d);b.removeChild(a);return g});m.add("position-fixed-support",function(b,a){b=l.body(a);a=c.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},b,"last");var d=c.create("span",{style:{position:"fixed",left:"0",top:"0"}},a,"last"),g=h.position(d).x!=h.position(a).x;a.removeChild(d);b.removeChild(a);return g});var g={getBox:function(b){b=b||l.doc;var a="BackCompat"==b.compatMode?l.body(b):b.documentElement,d=h.docScroll(b);if(m("touch")){var c=g.get(b);b= c.innerWidth||a.clientWidth;a=c.innerHeight||a.clientHeight}else b=a.clientWidth,a=a.clientHeight;return{l:d.x,t:d.y,w:b,h:a}},get:function(b){if(m("ie")&&g!==document.parentWindow){b.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var a=b._parentWindow;b._parentWindow=null;return a}return b.parentWindow||b.defaultView},scrollIntoView:function(b,a){try{b=f.byId(b);var d=b.ownerDocument||l.doc,c=l.body(d),g=d.documentElement||c.parentNode,w=m("ie")||m("trident"),y=m("webkit"); if(b!=c&&b!=g)if(!(m("mozilla")||w||y||m("opera")||m("trident")||m("edge"))&&"scrollIntoView"in b)b.scrollIntoView(!1);else{var p="BackCompat"==d.compatMode,G=Math.min(c.clientWidth||g.clientWidth,g.clientWidth||c.clientWidth),n=Math.min(c.clientHeight||g.clientHeight,g.clientHeight||c.clientHeight),d=y||p?c:g,x=a||h.position(b),u=b.parentNode;a=function(e){return 6>=w||7==w&&p?!1:m("position-fixed-support")&&"fixed"==k.get(e,"position").toLowerCase()};var z=this,y=function(e,a,r){"BODY"==e.tagName|| "HTML"==e.tagName?z.get(e.ownerDocument).scrollBy(a,r):(a&&(e.scrollLeft+=a),r&&(e.scrollTop+=r))};if(!a(b))for(;u;){u==c&&(u=d);var t=h.position(u),A=a(u),F="rtl"==k.getComputedStyle(u).direction.toLowerCase();if(u==d)t.w=G,t.h=n,d==g&&(w||m("trident"))&&F&&(t.x+=d.offsetWidth-t.w),t.x=0,t.y=0;else{var H=h.getPadBorderExtents(u);t.w-=H.w;t.h-=H.h;t.x+=H.l;t.y+=H.t;var E=u.clientWidth,e=t.w-E;0t.y&&(t.h+=t.y,t.y=0),0>t.x&&(t.w+=t.x,t.x=0),t.y+t.h>n&&(t.h=n-t.y),t.x+t.w>G&&(t.w=G-t.x));var r=x.x-t.x,C=x.y-t.y,M=r+x.w-t.w,O=C+x.h-t.h,I,J;0u.offsetHeight)&&(I=Math[0>r?"max":"min"](r,M),F&&(8==w&&!p||5<=m("trident"))&&(I=-I),J=u.scrollLeft,y(u,I,0),I=u.scrollLeft-J,x.x-=I);0u.offsetHeight)&&(I=Math.ceil(Math[0>C?"max":"min"](C,O)),J=u.scrollTop,y(u,0,I),I=u.scrollTop-J,x.y-=I);u=u!=d&&!A&& u.parentNode}}}catch(L){console.error("scrollIntoView: "+L),b.scrollIntoView(!1)}}};n.setObject("dojo.window",g);return g})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../has ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q){var w,y=function(){},y=function(a,d){"touchAction"in document.body.style?w="touchAction":"msTouchAction"in document.body.style&&(w="msTouchAction"); y=function(a,d){a.style[w]=d};y(a,d)};return m("dojo.dnd.Moveable",[k],{handle:"",delay:0,skip:!1,constructor:function(d,b){this.node=f.byId(d);y(this.node,"none");b||(b={});this.handle=b.handle?f.byId(b.handle):null;this.handle||(this.handle=this.node);this.delay=0this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var d=0;2>d;++d)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(a){this.skip&&d.isFormElement(a)||(a.stopPropagation(),a.preventDefault())},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){b.publish("/dnd/move/start",a);h.add(q.body(),"dojoMove");h.add(this.node, "dojoMoveItem")},onMoveStop:function(a){b.publish("/dnd/move/stop",a);h.remove(q.body(),"dojoMove");h.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,d){this.onMoving(a,d);var b=a.node.style;b.left=d.l+"px";b.top=d.t+"px";this.onMoved(a,d)},onMoving:function(){},onMoved:function(){}})})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(n,m,l,f){var h=l.getObject("dojo.dnd",!0);h.getCopyKeyState=function(h){return h[n("mac")? "metaKey":"ctrlKey"]};h._uniqueId=0;h.getUniqueId=function(){var k;do k=m._scopeName+"Unique"+ ++h._uniqueId;while(f.byId(k));return k};h._empty={};h.isFormElement=function(h){h=h.target;3==h.nodeType&&(h=h.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+h.tagName.toLowerCase()+" ")};return h})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "), function(n,m,l,f,h,k,c,g,b,a,d,v,q){return m("dojo.dnd.Mover",[b],{constructor:function(b,c,g){function h(a){a.preventDefault();a.stopPropagation()}this.node=k.byId(b);this.marginBox={l:c.pageX,t:c.pageY};this.mouseButton=c.button;c=this.host=g;b=b.ownerDocument;this.events=[a(b,d.move,l.hitch(this,"onFirstMove")),a(b,d.move,l.hitch(this,"onMouseMove")),a(b,d.release,l.hitch(this,"onMouseUp")),a(b,"dragstart",h),a(b.body,"selectstart",h)];q.autoScrollStart(b);if(c&&c.onMoveStart)c.onMoveStart(this)}, onMouseMove:function(a){q.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(f("webkit")&&f("mac")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();a.stopPropagation()},onFirstMove:function(a){var b=this.node.style,d,f=this.host;switch(b.position){case "relative":case "absolute":d=Math.round(parseFloat(b.left))||0;b=Math.round(parseFloat(b.top))||0;break; default:b.position="absolute";b=c.getMarginBox(this.node);d=h.doc.body;var k=g.getComputedStyle(d),v=c.getMarginBox(d,k),k=c.getContentBox(d,k);d=b.l-(k.l-v.l);b=b.t-(k.t-v.t)}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=b-this.marginBox.t;if(f&&f.onFirstMove)f.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){n.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "), function(n,m,l,f,h,k){var c={};n.setObject("dojo.dnd.autoscroll",c);c.getViewport=k.getBox;c.V_TRIGGER_AUTOSCROLL=32;c.H_TRIGGER_AUTOSCROLL=32;c.V_AUTOSCROLL_VALUE=16;c.H_AUTOSCROLL_VALUE=16;var g,b=l.doc,a=Infinity,d=Infinity;c.autoScrollStart=function(c){b=c;g=k.getBox(b);c=l.body(b).parentNode;a=Math.max(c.scrollHeight-g.h,0);d=Math.max(c.scrollWidth-g.w,0)};c.autoScroll=function(h){var f=g||k.getBox(b),v=l.body(b).parentNode,m=0,p=0;h.clientX f.w-c.H_TRIGGER_AUTOSCROLL&&(m=Math.min(c.H_AUTOSCROLL_VALUE,d-v.scrollLeft));h.clientYf.h-c.V_TRIGGER_AUTOSCROLL&&(p=Math.min(c.V_AUTOSCROLL_VALUE,a-v.scrollTop));window.scrollBy(m,p)};c._validNodes={div:1,p:1,td:1};c._validOverflow={auto:1,scroll:1};c.autoScrollNodes=function(a){for(var b,d,g,k,v,n=0,x=0,u=a.target;u;){if(1==u.nodeType&&u.tagName.toLowerCase()in c._validNodes){g=h.getComputedStyle(u);v=g.overflowX.toLowerCase()in c._validOverflow; k=g.overflowY.toLowerCase()in c._validOverflow;if(v||k)b=f.getContentBox(u,g),d=f.position(u,!0);if(v){g=Math.min(c.H_TRIGGER_AUTOSCROLL,b.w/2);v=a.pageX-d.x;if(m("webkit")||m("opera"))v+=l.body().scrollLeft;n=0;0b.w-g&&(n=g),u.scrollLeft+=n)}if(k){k=Math.min(c.V_TRIGGER_AUTOSCROLL,b.h/2);g=a.pageY-d.y;if(m("webkit")||m("opera"))g+=l.body().scrollTop;x=0;0b.h-k&&(x=k),u.scrollTop+=x)}if(n||x)return}try{u=u.parentNode}catch(z){u=null}}c.autoScroll(a)}; return c})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(n,m){var l=m.prototype.onMove;return n("dojo.dnd.TimedMoveable",m,{timeout:40,constructor:function(f,h){h||(h={});h.timeout&&"number"==typeof h.timeout&&0<=h.timeout&&(this.timeout=h.timeout)},onMoveStop:function(f){f._timer&&(clearTimeout(f._timer),l.call(this,f,f._leftTop));m.prototype.onMoveStop.apply(this,arguments)},onMove:function(f,h){f._leftTop=h;if(!f._timer){var k=this;f._timer=setTimeout(function(){f._timer= null;l.call(k,f,f._leftTop)},this.timeout)}}})})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p,G){var D,x,u=new (m([v,c],{curNode:null,activeStack:[],constructor:function(){var a=g.hitch(this,function(a){l.isDescendant(this.curNode,a)&&this.set("curNode", null);l.isDescendant(this.prevNode,a)&&this.set("prevNode",null)});n.before(k,"empty",a);n.before(k,"destroy",a)},registerIframe:function(a){return this.registerWin(a.contentWindow,a)},registerWin:function(a,c){var g=this,h=a.document&&a.document.body;if(h){var f=d("pointer-events")?"pointerdown":d("touch-events")?"mousedown, touchstart":"mousedown",e=b(a.document,f,function(e){e&&e.target&&null==e.target.parentNode||g._onTouchNode(c||e.target,"mouse")}),r=b(h,"focusin",function(e){if(e.target.tagName){var a= e.target.tagName.toLowerCase();"#document"!=a&&"body"!=a&&(y.isFocusable(e.target)?g._onFocusNode(c||e.target):g._onTouchNode(c||e.target))}}),k=b(h,"focusout",function(e){g._onBlurNode(c||e.target)});return{remove:function(){e.remove();r.remove();k.remove();h=e=r=k=null}}}},_onBlurNode:function(a){a=(new Date).getTime();a=k("ie")&&"HTML"!==b.scopeName)&&x(b)){var d=u(b);if(0<=d){if(0==d)c||(c=b),h=b;else if(0=n)n=d,p=b}d=a(b);l.get(b,"checked")&& d&&(D[d]=b)}"SELECT"!=b.nodeName.toUpperCase()&&z(b)}};x(b)&&z(b);return{first:d(c),last:d(h),lowest:d(f),highest:d(p)}},getFirstInTabbingOrder:function(b,a){b=g._getTabNavigable(m.byId(b,a));return b.lowest?b.lowest:b.first},getLastInTabbingOrder:function(b,a){b=g._getTabNavigable(m.byId(b,a));return b.last?b.last:b.highest}};h.mixin(c,g);return g})},"dijit/_base/manager":function(){define(["dojo/_base/array","dojo/_base/config","dojo/_base/lang","../registry","../main"],function(n,m,l,f,h){var k= {};n.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(c){k[c]=f[c]});l.mixin(k,{defaultDuration:m.defaultDuration||200});l.mixin(h,k);return h})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q){function w(){} function y(a){return function(b,d,g,f){return b&&"string"==typeof d&&b[d]==w?b.on(d.substring(2).toLowerCase(),c.hitch(g,f)):a.apply(l,arguments)}}n.around(l,"connect",y);k.connect&&n.around(k,"connect",y);n=f("dijit._Widget",[d,v,q],{onClick:w,onDblClick:w,onKeyDown:w,onKeyPress:w,onKeyUp:w,onMouseDown:w,onMouseMove:w,onMouseOut:w,onMouseOver:w,onMouseLeave:w,onMouseEnter:w,onMouseUp:w,constructor:function(a){this._toConnect={};for(var b in a)this[b]===w&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]= a[b],delete a[b])},postCreate:function(){this.inherited(arguments);for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(a,b){return this[this._onMap(a)]===w?l.connect(this.domNode,a.toLowerCase(),this,b):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){k.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,b)},attr:function(a, b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,arguments):this.get(a)},getDescendants:function(){k.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?g("[widgetId]",this.containerNode).map(a.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});h("dijit-legacy-requires")&&b(0,function(){require(["dijit/_base"])});return n})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "), function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p,G,D,x,u,z,t,A){function F(a){return function(e){g[e?"set":"remove"](this.domNode,a,e);this._set(a,e)}}q.add("dijit-legacy-requires",!w.isAsync);q.add("dojo-bidi",!1);q("dijit-legacy-requires")&&G(0,function(){n(["dijit/_base/manager"])});var H={};f=k("dijit._WidgetBase",[D,z],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:F("lang"),dir:"",_setDirAttr:F("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"", baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:f.blankGif||n.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var e=a.prototype,b=a._setterAttrs=[],a=a._onMap={},d;for(d in e.attributeMap)b.push(d);for(d in e)/^on/.test(d)&&(a[d.substring(2).toLowerCase()]=d),/^_set[A-Z](.*)Attr$/.test(d)&&(d=d.charAt(4).toLowerCase()+ d.substr(5,d.length-9),e.attributeMap&&d in e.attributeMap||b.push(d))}},postscript:function(a,e){this.create(a,e)},create:function(a,e){this._introspect();this.srcNodeRef=c.byId(e);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,y.mixin(this,a));this.postMixInProperties();this.id||(this.id=A.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument= this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=u.body(this.ownerDocument);A.add(this);this.buildRendering();var b;this.domNode&&(this._applyAttributes(),(a=this.srcNodeRef)&&a.parentNode&&this.domNode!==a&&(a.parentNode.replaceChild(this.domNode,a),b=!0),this.domNode.setAttribute("widgetId",this.id));this.postCreate();b&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},e;for(e in this.params||{})a[e]=this._get(e);m.forEach(this.constructor._setterAttrs, function(e){if(!(e in a)){var b=this._get(e);b&&this.set(e,b)}},this);for(e in a)this.set(e,a[e])},postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(m.map(a,function(e){return e+"Rtl"})));b.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,m.forEach(this.getChildren(),function(a){a._started|| a._destroyed||!y.isFunction(a.startup)||(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function e(e){e.destroyRecursive?e.destroyRecursive(a):e.destroy&&e.destroy(a)}this._beingDestroyed=!0;this.uninitialize();m.forEach(this._connects,y.hitch(this,"disconnect"));m.forEach(this._supportingWidgets,e);this.domNode&&m.forEach(A.findWidgets(this.domNode,this.containerNode),e);this.destroyRendering(a); A.remove(this.id);this._destroyed=!0},destroyRendering:function(b){this.bgIframe&&(this.bgIframe.destroy(b),delete this.bgIframe);this.domNode&&(b?g.remove(this.domNode,"widgetId"):a.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(b||a.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){m.forEach(this.getChildren(),function(e){e.destroyRecursive&&e.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(a){var e=this.domNode;y.isObject(a)? v.set(e,a):e.style.cssText=e.style.cssText?e.style.cssText+("; "+a):a;this._set("style",a)},_attrToDom:function(a,e,d){d=3<=arguments.length?d:this.attributeMap[a];m.forEach(y.isArray(d)?d:[d],function(d){var r=this[d.node||d||"domNode"];switch(d.type||"attribute"){case "attribute":y.isFunction(e)&&(e=y.hitch(this,e));d=d.attribute?d.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;r.tagName?g.set(r,d,e):r.set(d,e);break;case "innerText":r.innerHTML="";r.appendChild(this.ownerDocument.createTextNode(e)); break;case "innerHTML":r.innerHTML=e;break;case "class":b.replace(r,e,this[a]);break;case "toggleClass":b.toggle(r,d.className||a,e)}},this)},get:function(a){var e=this._getAttrNames(a);return this[e.g]?this[e.g]():this._get(a)},set:function(a,e){if("object"===typeof a){for(var b in a)this.set(b,a[b]);return this}b=this._getAttrNames(a);var d=this[b.s];if(y.isFunction(d))var c=d.apply(this,Array.prototype.slice.call(arguments,1));else{var d=this.focusNode&&!y.isFunction(this.focusNode)?"focusNode": "domNode",g=this[d]&&this[d].tagName,f;if((f=g)&&!(f=H[g])){f=this[d];var h={},k;for(k in f)h[k.toLowerCase()]=!0;f=H[g]=h}k=f;b=a in this.attributeMap?this.attributeMap[a]:b.s in this?this[b.s]:k&&b.l in k&&"function"!=typeof e||/^aria-|^data-|^role$/.test(a)?d:null;null!=b&&this._attrToDom(a,e,b);this._set(a,e)}return c||this},_attrPairNames:{},_getAttrNames:function(a){var e=this._attrPairNames;if(e[a])return e[a];var b=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()}); return e[a]={n:a+"Node",s:"_set"+b+"Attr",g:"_get"+b+"Attr",l:b.toLowerCase()}},_set:function(a,e){var b=this[a];this[a]=e;!this._created||b===e||b!==b&&e!==e||(this._watchCallbacks&&this._watchCallbacks(a,b,e),this.emit("attrmodified-"+a,{detail:{prevValue:b,newValue:e}}))},_get:function(a){return this[a]},emit:function(a,e,b){e=e||{};void 0===e.bubbles&&(e.bubbles=!0);void 0===e.cancelable&&(e.cancelable=!0);e.detail||(e.detail={});e.detail.widget=this;var d,r=this["on"+a];r&&(d=r.apply(this,b? b:[e]));this._started&&!this._beingDestroyed&&p.emit(this.domNode,a.toLowerCase(),e);return d},on:function(a,e){var b=this._onMap(a);return b?l.after(this,b,e,!0):this.own(p(this.domNode,a,e))[0]},_onMap:function(a){var e=this.constructor,b=e._onMap;if(!b){var b=e._onMap={},d;for(d in e.prototype)/^on/.test(d)&&(b[d.replace(/^on/,"").toLowerCase()]=d)}return b["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode? A.findWidgets(this.containerNode):[]},getParent:function(){return A.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,e,b){return this.own(h.connect(a,e,this,b))[0]},disconnect:function(a){a.remove()},subscribe:function(a,e){return this.own(x.subscribe(a,y.hitch(this,e)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():d.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=v.get(this.domNode,"display")}, placeAt:function(b,e){var d=!b.tagName&&A.byId(b);!d||!d.addChild||e&&"number"!==typeof e?(b=d&&"domNode"in d?d.containerNode&&!/after|before|replace/.test(e||"")?d.containerNode:d.domNode:c.byId(b,this.ownerDocument),a.place(this.domNode,b,e),!this._started&&(this.getParent()||{})._started&&this.startup()):d.addChild(this,e);return this},defer:function(a,e){var b=setTimeout(y.hitch(this,function(){b&&(b=null,this._destroyed||y.hitch(this,a)())}),e||0);return{remove:function(){b&&(clearTimeout(b), b=null);return null}}}});q("dojo-bidi")&&f.extend(t);return f})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(n,m,l){return l("dijit.Destroyable",null,{destroy:function(f){this._destroyed=!0},own:function(){var f=["destroyRecursive","destroy","remove"];n.forEach(arguments,function(h){function k(){g.remove();n.forEach(b,function(a){a.remove()})}var c,g=m.before(this,"destroy",function(a){h[c](a)}),b=[];h.then?(c="cancel",h.then(k,k)):n.forEach(f, function(a){"function"===typeof h[a]&&(c||(c=a),b.push(m.after(h,a,k,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(n,m,l,f,h,k){n=f("dijit._OnDijitClickMixin",null,{connect:function(c,g,b){return this.inherited(arguments,[c,"ondijitclick"==g?k:g,b])}});n.a11yclick=k;return n})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(n, m,l,f){function h(c){if((c.keyCode===n.ENTER||c.keyCode===n.SPACE)&&!/input|button|textarea/i.test(c.target.nodeName))for(c=c.target;c;c=c.parentNode)if(c.dojoClick)return!0}var k;l(document,"keydown",function(c){h(c)?(k=c.target,c.preventDefault()):k=null});l(document,"keyup",function(c){h(c)&&c.target==k&&(k=null,l.emit(c.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:c.ctrlKey,shiftKey:c.shiftKey,metaKey:c.metaKey,altKey:c.altKey,_origType:c.type}))});var c=function(c,b){c.dojoClick=!0;return l(c, "click",b)};c.click=c;c.press=function(c,b){var a=l(c,f.press,function(a){("mousedown"!=a.type||m.isLeft(a))&&b(a)}),d=l(c,"keydown",function(a){a.keyCode!==n.ENTER&&a.keyCode!==n.SPACE||b(a)});return{remove:function(){a.remove();d.remove()}}};c.release=function(c,b){var a=l(c,f.release,function(a){("mouseup"!=a.type||m.isLeft(a))&&b(a)}),d=l(c,"keyup",function(a){a.keyCode!==n.ENTER&&a.keyCode!==n.SPACE||b(a)});return{remove:function(){a.remove();d.remove()}}};c.move=f.move;return c})},"dijit/_FocusMixin":function(){define(["./focus", "./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(n,m,l,f){f.extend(m,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return l("dijit._FocusMixin",null,{_focusManager:n})})},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(n,m,l,f,h){var k=h.doc.documentElement;h=f("ie");var c=f("trident"),g=f("opera"),b=Math.floor,a=f("ff"),d=n.boxModel.replace(/-/, ""),g={dj_quirks:0,dj_opera:g,dj_khtml:0,dj_webkit:f("webkit"),dj_safari:f("safari"),dj_chrome:f("chrome"),dj_edge:f("edge"),dj_gecko:f("mozilla"),dj_ios:f("ios"),dj_android:0};h&&(g.dj_ie=!0,g["dj_ie"+b(h)]=!0,g.dj_iequirks=0);c&&(g.dj_trident=!0,g["dj_trident"+b(c)]=!0);a&&(g["dj_ff"+b(a)]=!0);g["dj_"+d]=!0;var v="",q;for(q in g)g[q]&&(v+=q+" ");k.className=m.trim(k.className+" "+v);l(function(){if(!n.isBodyLtr()){var a="dj_rtl dijitRtl "+v.replace(/ /g,"-rtl ");k.className=m.trim(k.className+" "+ a+"dj_rtl dijitRtl "+v.replace(/ /g,"-rtl "))}});return f})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(n,m,l,f){l(function(){m("highcontrast")&&n.add(f.body(),"dijit_a11y")});return m})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),function(n,m,l,f,h,k,c){h.add("highcontrast",function(){var g=c.doc.createElement("div");try{g.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+ (m.blankGif||n.toUrl("./resources/blank.gif"))+'");';c.body().appendChild(g);var b=f.getComputedStyle(g),a=b.backgroundImage;return b.borderTopColor==b.borderRightColor||a&&("none"==a||"url(invalid-url:)"==a)}catch(d){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+d.toString()),!1}finally{8>=h("ie")?g.outerHTML="":c.body().removeChild(g)}});k(function(){h("highcontrast")&&l.add(c.body(),"dj_a11y")});return h})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "), function(n,m,l,f,h,k,c,g){var b=m("dijit._TemplatedMixin",g,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(a){var b=this.declaredClass,g=this;return c.substitute(a,this,function(a,d){"!"==d.charAt(0)&&(a=f.getObject(d.substr(1),!1,g));if("undefined"==typeof a)throw Error(b+" template:"+d);return null==a?"":"!"==d.charAt(0)?a:this._escapeValue(""+a)},this)},_escapeValue:function(a){return a.replace(/["'<>&]/g,function(a){return{"\x26":"\x26amp;", "\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[a]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=n(this.templatePath,{sanitize:!0}));var a=b.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),d;if(f.isString(a)){if(d=l.toDom(this._stringRepl(a),this.ownerDocument),1!=d.nodeType)throw Error("Invalid template: "+a);}else d=a.cloneNode(!0);this.domNode=d}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef); this._rendered=!0},_fillContent:function(a){var b=this.containerNode;if(a&&b)for(;a.hasChildNodes();)b.appendChild(a.firstChild)}});b._templateCache={};b.getCachedTemplate=function(a,d,f){var g=b._templateCache,h=a,k=g[h];if(k){try{if(!k.ownerDocument||k.ownerDocument==(f||document))return k}catch(p){}l.destroy(k)}a=c.trim(a);if(d||a.match(/\$\{([^\}]+)\}/g))return g[h]=a;d=l.toDom(a,f);if(1!=d.nodeType)throw Error("Invalid template: "+a);return g[h]=d};k("ie")&&h(window,"unload",function(){var a= b._templateCache,d;for(d in a){var c=a[d];"object"==typeof c&&l.destroy(c);delete a[d]}});return b})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(n){return n.cache})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(n,m,l,f,h,k,c,g,b){var a=h.delegate(g,{mouseenter:k.enter,mouseleave:k.leave,keypress:l._keypress}),d;l=f("dijit._AttachMixin", null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b= b.nextSibling}},_processTemplateNode:function(a,b,d){var c=!0,f=this.attachScope||this,g=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");if(g)for(var k=g.split(/\s*,\s*/);g=k.shift();)h.isArray(f[g])?f[g].push(a):f[g]=a,c="containerNode"!=g,this._attachPoints.push(g);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event"))for(g=b.split(/\s*,\s*/),k=h.trim;b=g.shift();)if(b){var l=null;-1!=b.indexOf(":")?(l=b.split(":"),b=k(l[0]),l=k(l[1])):b=k(b);l||(l=b);this._attachEvents.push(d(a,b,h.hitch(f, l)))}return c},_attach:function(b,g,f){g=g.replace(/^on/,"").toLowerCase();g="dijitclick"==g?d||(d=n("./a11yclick")):a[g]||g;return c(b,g,f)},_detachTemplateNodes:function(){var a=this.attachScope||this;m.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];m.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});h.extend(b,{dojoAttachEvent:"",dojoAttachPoint:""});return l})}, "dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v){m=m("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);n.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),function(a){this.watch(a,k.hitch(this,"_setStateClass"))}, this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active", !0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(a){b=b.concat(n.map(b,function(b){return b+a}),"dijit"+a)}var b=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var d="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(d);this.state&&a(this.state);this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active? a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var d=this.stateNode||this.domNode,c={};n.forEach(d.className.split(" "),function(a){c[a]=!0});"_stateClasses"in this&&n.forEach(this._stateClasses,function(a){delete c[a]});n.forEach(b,function(a){c[a]=!0});var g=[],f;for(f in c)g.push(f);d.className=g.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,b,d){function c(d){f.toggle(a,b+"Active",d)}if(!this.disabled&&!this.readOnly)switch(d.type){case "mouseover":case "MSPointerOver":case "pointerover":f.toggle(a, b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":f.toggle(a,b+"Hover",!1);c(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":c(!0);break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":c(!1);break;case "focus":case "focusin":f.toggle(a,b+"Focused",!0);break;case "blur":case "focusout":f.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});g(function(){function g(a, b,d){if(!d||!l.isDescendant(d,b))for(;b&&b!=d;b=b.parentNode)if(b._cssState){var c=v.getEnclosingWidget(b);c&&(b==c.domNode?c._cssMouseEvent(a):c._subnodeCssMouseEvent(b,b._cssState,a))}}var f=a.body(),h;c(f,b.over,function(a){g(a,a.target,a.relatedTarget)});c(f,b.out,function(a){g(a,a.target,a.relatedTarget)});c(f,d.press,function(a){h=a.target;g(a,h)});c(f,d.release,function(a){g(a,h);h=null});c(f,"focusin, focusout",function(a){var b=a.target;if(b._cssState&&!b.getAttribute("widgetId")){var d= v.getEnclosingWidget(b);d&&d._subnodeCssMouseEvent(b,b._cssState,a)}})});return m})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),function(n,m,l,f,h,k){return m("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(c){var g=[];n.forEach(c||this.getChildren(),function(b){"value"in b?g.push(b):g=g.concat(this._getDescendantFormWidgets(b.getChildren()))},this);return g},reset:function(){n.forEach(this._getDescendantFormWidgets(), function(c){c.reset&&c.reset()})},validate:function(){var c=!1;return n.every(n.map(this._getDescendantFormWidgets(),function(g){g._hasBeenBlurred=!0;var b=g.disabled||!g.validate||g.validate();b||c||(k.scrollIntoView(g.containerNode||g.domNode),g.focus(),c=!0);return b}),function(c){return c})},setValues:function(c){l.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",c)},_setValueAttr:function(c){var g={};n.forEach(this._getDescendantFormWidgets(), function(a){a.name&&(g[a.name]||(g[a.name]=[])).push(a)});for(var b in g)if(g.hasOwnProperty(b)){var a=g[b],d=f.getObject(b,!1,c);void 0!==d&&(d=[].concat(d),"boolean"==typeof a[0].checked?n.forEach(a,function(a){a.set("value",-1!=n.indexOf(d,a._get("value")))}):a[0].multiple?a[0].set("value",d):n.forEach(a,function(a,b){a.set("value",d[b])}))}},getValues:function(){l.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var c= {};n.forEach(this._getDescendantFormWidgets(),function(g){var b=g.name;if(b&&!g.disabled){var a=g.get("value");"boolean"==typeof g.checked?/Radio/.test(g.declaredClass)?!1!==a?f.setObject(b,a,c):(a=f.getObject(b,!1,c),void 0===a&&f.setObject(b,null,c)):(g=f.getObject(b,!1,c),g||(g=[],f.setObject(b,g,c)),!1!==a&&g.push(a)):(g=f.getObject(b,!1,c),"undefined"!=typeof g?f.isArray(g)?g.push(a):f.setObject(b,[g,a],c):f.setObject(b,a,c))}});return c},isValid:function(){return""==this.state},onValidStateChange:function(){}, _getState:function(){var c=n.map(this._descendants,function(c){return c.get("state")||""});return 0<=n.indexOf(c,"Error")?"Error":0<=n.indexOf(c,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(c){this._descendants=this._getDescendantFormWidgets();n.forEach(this._descendants,function(c){c._started||c.startup()});c||this._onChildChange()},_onChildChange:function(c){c&&"state"!=c&&"disabled"!=c||this._set("state",this._getState());c&&"value"!=c&&"disabled"!=c&& "checked"!=c||(this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;this._set("value",this.get("value"))},10))},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");this.state=this._getState();var c=this;this.own(h(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(g){g.target!=c.domNode&& c._onChildChange(g.type.replace("attrmodified-",""))}));this.watch("state",function(c,b,a){this.onValidStateChange(""==a)})},destroy:function(){this.inherited(arguments)}})})},"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(n,m){return n("dijit._DialogMixin",null,{actionBarTemplate:"",execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var l=m._getTabNavigable(this.domNode); this._firstFocusItem=l.lowest||l.first||this.closeButtonNode||this.domNode;this._lastFocusItem=l.last||l.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v){var q=n("dijit.DialogUnderlay",[g,b],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e", dialogId:"","class":"",_modalConnects:[],_setDialogIdAttr:function(a){f.set(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a;this._set("class",a)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.own(k(this.domNode,"keydown",m.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var a=this.node.style,b=this.domNode.style;b.display="none";var d=c.getBox(this.ownerDocument);b.top= d.t+"px";b.left=d.l+"px";a.width=d.w+"px";a.height=d.h+"px";b.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();this.bgIframe=new a(this.domNode);var b=c.get(this.ownerDocument);this._modalConnects=[d.on("resize",m.hitch(this,"layout")),k(b,"scroll",m.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove(); this.inherited(arguments)},_onKeyDown:function(){}});q.show=function(a,b){var d=q._singleton;!d||d._destroyed?d=v._underlay=q._singleton=new q(a):a&&d.set(a);h.set(d.domNode,"zIndex",b);d.open||d.show()};q.hide=function(){var a=q._singleton;a&&!a._destroyed&&a.hide()};return q})},"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(n,m,l,f,h,k,c,g){g.add("config-bgIframe",(g("ie")||g("trident"))&& !/IEMobile\/10\.0/.test(navigator.userAgent));var b=new function(){var a=[];this.pop=function(){var b;a.length?(b=a.pop(),b.style.display=""):(9>g("ie")?(b=l.dojoBlankHtmlUrl||n.toUrl("dojo/resources/blank.html")||'javascript:""',b=document.createElement("\x3ciframe src\x3d'"+b+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e")):(b=f.create("iframe"),b.src='javascript:""',b.className="dijitBackgroundIframe",b.setAttribute("role", "presentation"),h.set(b,"opacity",.1)),b.tabIndex=-1);return b};this.push=function(b){b.style.display="none";a.push(b)}};m.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(g("config-bgIframe")){var d=this.iframe=b.pop();a.appendChild(d);7>g("ie")?(this.resize(a),this._conn=c(a,"resize",k.hitch(this,"resize",a))):h.set(d,{width:"100%",height:"100%"})}};k.extend(m.BackgroundIframe,{resize:function(a){this.iframe&&h.set(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})}, destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),b.push(this.iframe),delete this.iframe)}});return m.BackgroundIframe})},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(n,m,l,f,h){var k=new n,c;l(function(){var g=h.getBox();k._rlh=m(window,"resize",function(){var a=h.getBox();if(g.h!=a.h||g.w!=a.w)g=a,k.emit("resize")});if(8==f("ie")){var b=screen.deviceXDPI; setInterval(function(){screen.deviceXDPI!=b&&(b=screen.deviceXDPI,k.emit("resize"))},500)}f("ios")&&(m(document,"focusin",function(a){c=a.target}),m(document,"focusout",function(a){c=null}))});k.getEffectiveBox=function(g){g=h.getBox(g);var b=c&&c.tagName&&c.tagName.toLowerCase();f("ios")&&c&&!c.readOnly&&("textarea"==b||"input"==b&&/^(color|email|number|password|search|tel|text|url)$/.test(c.type))&&(g.h*=0==orientation||180==orientation?.66:.4,b=c.getBoundingClientRect(),g.h=Math.max(g.h,b.top+ b.height));return g};return k})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when dojo/i18n!../nls/loading".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p){return b("dijit.layout.ContentPane",[l,f,h],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:n._scopeName, preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(a,b,d){var c= new d(a,b);return!c.href&&c._contentSetter&&c._contentSetter.parseDeferred&&!c._contentSetter.parseDeferred.isFulfilled()?c._contentSetter.parseDeferred.then(function(){return c}):c},create:function(a,b){if(!(a&&a.template||!b||"href"in a||"content"in a)){b=d.byId(b);for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);a=m.delegate(a,{content:c})}this.inherited(arguments,[a,b])},postMixInProperties:function(){this.inherited(arguments);var a=y.getLocalization("dijit", "loading",this.lang);this.loadingMessage=k.substitute(this.loadingMessage,a);this.errorMessage=k.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&g.forEach(this._contentSetter.parseResults,function(a){a._started||a._destroyed||!m.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},_startChildren:function(){g.forEach(this.getChildren(), function(a){a._started||a._destroyed||!m.isFunction(a.startup)||(a.startup(),a._started=!0)});this._contentSetter&&g.forEach(this._contentSetter.parseResults,function(a){a._started||a._destroyed||!m.isFunction(a.startup)||(a.startup(),a._started=!0)},this)},setHref:function(a){n.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(b){this.cancel();this.onLoadDeferred=new a(m.hitch(this,"cancel"));this.onLoadDeferred.then(m.hitch(this, "onLoad"));this._set("href",b);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){n.deprecated("dijit.layout.ContentPane.setContent() is deprecated. Use set('content', ...) instead.","","2.0");this.set("content",a)},_setContentAttr:function(b){this._set("href","");this.cancel();this.onLoadDeferred=new a(m.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(m.hitch(this,"onLoad"));this._setContent(b||"");this._isDownloaded= !1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()}, refresh:function(){this.cancel();this.onLoadDeferred=new a(m.hitch(this,"cancel"));this.onLoadDeferred.then(m.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var a=this,b={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};m.isObject(this.ioArgs)&&m.mixin(b,this.ioArgs);var d=this._xhrDfd=(this.ioMethod||w.get)(b),c;d.then(function(b){c=b;try{return a._isDownloaded=!0,a._setContent(b,!1)}catch(t){a._onError("Content", t)}},function(b){d.canceled||a._onError("Download",b);delete a._xhrDfd;return b}).then(function(){a.onDownloadEnd();delete a._xhrDfd;return c});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(a)}catch(D){console.error("Error "+this.widgetId+" running custom onLoad code: "+D.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(G){console.error("Error "+this.widgetId+" running custom onUnload code: "+ G.message)}},destroyDescendants:function(a){this.isLoaded&&this._onUnloadHandler();var b=this._contentSetter;g.forEach(this.getChildren(),function(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a);b._destroyed=!0});b&&(g.forEach(b.parseResults,function(b){b._destroyed||(b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a),b._destroyed=!0)}),delete b.parseResults);a||q.empty(this.containerNode);delete this._singleChild},_setContent:function(a,b){a=this.preprocessContent(a); this.destroyDescendants();var d=this._contentSetter;d&&d instanceof c._ContentSetter||(d=this._contentSetter=new c._ContentSetter({node:this.containerNode,_onError:m.hitch(this,this._onError),onContentError:m.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=a}catch(A){console.error("Fatal "+this.id+" could not change content due to "+A.message,A)}})}));var g=m.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!a.domNode&&this.parseOnLoad, parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),g=d.set(m.isObject(a)&&a.domNode?a.domNode:a,g),f=this;return p(g&&g.then?g:d.parseDeferred,function(){delete f._contentSetterParams;b||(f._started&&(f._startChildren(),f._scheduleLayout()),f._onLoadHandler(a))})},preprocessContent:function(a){return a},_onError:function(a,b,d){this.onLoadDeferred.reject(b);a=this["on"+a+"Error"].call(this,b);d?console.error(d,b):a&&this._setContent(a, !0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],function(n,m,l,f){return m("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(f, k){var c=this.containerNode;if(0]+>|]*>[\s\S]*?<\/title>)/ig,"")},_emptyNode:k.empty,_setNodeContent:function(a,b){k.empty(a);if(b)if("number"==typeof b&&(b=b.toString()), "string"==typeof b&&(b=k.toDom(b,a.ownerDocument)),!b.nodeType&&m.isArrayLike(b))for(var d=b.length,c=0;c]*>\s*([\s\S]+)\s*<\/body>/im);d&&(a=d[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&& this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(a){return"Error occurred setting content: "+a},onExecError:function(a){return"Error occurred executing scripts: "+a},_mixin:function(a){var b={},c;for(c in a)c in b||(this[c]=a[c])},_parse:function(){var a=this.node;try{var b={};l.forEach(["dir","lang","textDir"],function(a){this[a]&&(b[a]=this[a])},this);var f=this;this.parseDeferred= c.parse({rootNode:a,noStart:!this.startup,inherited:b,scope:this.parserScope}).then(function(a){return f.parseResults=a},function(a){f._onError("Content",a,"Error parsing in _ContentSetter#"+this.id)})}catch(q){this._onError("Content",q,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,d,c){a=this["on"+a+"Error"].call(this,d);c?console.error(c,d):a&&b._setNodeContent(this.node,a,!0)}}),set:function(a,d,c){void 0==d&&(console.warn("dojo.html.set: no cont argument provided, using empty string"), d="");"number"==typeof d&&(d=d.toString());return c?(new b._ContentSetter(m.mixin(c,{content:d,node:a}))).set():b._setNodeContent(a,d,!0)}};m.setObject("dojo.html",b);return b})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p){function G(a){return eval("("+a+")")}function D(a){var b=a._nameCaseMap, d=a.prototype;if(!b||b._extendCntk[0]&&f.setFullYear(k[0]||1970);var c=0,g=k[7]&&k[7].charAt(0);"Z"!=g&&(c=60*(k[8]||0)+(Number(k[9])||0),"-"!=g&&(c*=-1));g&&(c-=f.getTimezoneOffset());c&&f.setTime(f.getTime()+6E4*c)}return f};l.toISOString=function(f,h){var k=function(a){return 10>a?"0"+a:a};h=h||{};var c=[],g=h.zulu?"getUTC":"get",b="";"time"!=h.selector&&(b=f[g+"FullYear"](),b=["0000".substr((b+ "").length)+b,k(f[g+"Month"]()+1),k(f[g+"Date"]())].join("-"));c.push(b);"date"!=h.selector&&(b=[k(f[g+"Hours"]()),k(f[g+"Minutes"]()),k(f[g+"Seconds"]())].join(":"),g=f[g+"Milliseconds"](),h.milliseconds&&(b+="."+(100>g?"0":"")+k(g)),h.zulu?b+="Z":"time"!=h.selector&&(f=f.getTimezoneOffset(),h=Math.abs(f),b+=(0=l("ie")?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight},setScrollable:function(f){if(f=this.getNode(f)){var h=0,c=0,g=0,b=0,a=0,d=0;return[n(f,"touchstart", function(k){h=k.touches[0].screenX;c=k.touches[0].screenY;g=f.scrollWidth;b=f.scrollHeight;a=f.clientWidth;d=f.clientHeight}),n(f,"touchmove",function(k){k.preventDefault();var l=f.firstChild;l instanceof Text&&(l=f.childNodes[1]);var n=l._currentX||0,v=l._currentY||0,n=n+(k.touches[0].screenX-h);0n&&Math.abs(n)+a>g&&(n=-1*(g-a));l._currentX=n;v+=k.touches[0].screenY-c;0v&&Math.abs(v)+d>b&&(v=-1*(b-d));l._currentY=v;m.set(l,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+ n+"px, "+v+"px)"});h=k.touches[0].screenX;c=k.touches[0].screenY})]}}};return f})},"esri/identity/Credential":function(){define(["./IdentityManagerBase"],function(n){return n.Credential})},"esri/identity/IdentityManagerBase":function(){define("../core/declare dojo/_base/config dojo/_base/lang dojo/_base/array dojo/Deferred dojo/_base/url dojo/sniff dojo/cookie dojo/io-query dojo/regexp ../kernel ../config ../core/lang ./ServerInfo ../core/urlUtils ../core/deferredUtils ../core/Accessor ../request ../core/Error ../core/Evented ./OAuthCredential ./OAuthInfo".split(" "), function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p,G,D,x,u,z,t){var A={},F=function(a){var b=(new k(a.owningSystemUrl)).host;a=(new k(a.server)).host;var e=/.+\.arcgis\.com$/i;return e.test(b)&&e.test(a)},H=function(a,b){return!!(F(a)&&b&&f.some(b,function(b){return b.test(a.server)}))},E;n=n(u,{declaredClass:"esri.identity.IdentityManagerBase",constructor:function(){this._portalConfig=l.getObject("esriGeowConfig");this.serverInfos=[];this.oAuthInfos=[];this.credentials=[];this._soReqs=[];this._xoReqs=[];this._portals= [];this._getOAuthHash();window.addEventListener("pageshow",function(a){this._pageShowHandler(a)}.bind(this))},defaultOAuthInfo:null,defaultTokenValidity:60,tokenValidity:null,signInPage:null,useSignInPage:!0,normalizeWebTierAuth:!1,_busy:null,_rejectOnPersistedPageShow:!1,_oAuthHash:null,_gwTokenUrl:"/sharing/generateToken",_agsRest:"/rest/services",_agsPortal:/\/sharing(\/|$)/i,_agsAdmin:/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i,_adminSvcs:/\/admin\/services(\/|$)/i,_agolSuffix:".arcgis.com", _gwDomains:[{regex:/https?:\/\/www\.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/dev\.arcgis\.com/i,tokenServiceUrl:"https://dev.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*dev[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://devext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*qa[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://qaext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"}], _legacyFed:[],_regexSDirUrl:/http.+\/rest\/services\/?/ig,_regexServerType:/(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer|SceneServer)).*/ig,_gwUser:/http.+\/users\/([^\/]+)\/?.*/i,_gwItem:/http.+\/items\/([^\/]+)\/?.*/i,_gwGroup:/http.+\/groups\/([^\/]+)\/?.*/i,_errorCodes:[499,498,403,401],_rePortalTokenSvc:/\/sharing(\/rest)?\/generatetoken/i,_publicUrls:[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i, /\/rest\/info/i],_createDefaultOAuthInfo:!0,_hasTestedIfAppIsOnPortal:!1,registerServers:function(a){var b=this.serverInfos;b?(a=f.filter(a,function(a){return!this.findServerInfo(a.server)},this),this.serverInfos=b.concat(a)):this.serverInfos=a;f.forEach(a,function(a){a.owningSystemUrl&&this._portals.push(a.owningSystemUrl);if(a.hasPortal){this._portals.push(a.server);var b=v.request.corsEnabledServers,e=this._getOrigin(a.tokenServiceUrl);y.canUseXhr(a.server)||b.push(a.server.replace(/^https?:\/\//i, ""));y.canUseXhr(e)||b.push(e.replace(/^https?:\/\//i,""))}},this)},registerOAuthInfos:function(a){var b=this.oAuthInfos;b?(a=f.filter(a,function(a){return!this.findOAuthInfo(a.portalUrl)},this),this.oAuthInfos=b.concat(a)):this.oAuthInfos=a},registerToken:function(a){a=l.mixin({},a);var b=this._sanitizeUrl(a.server),e=this.findServerInfo(b),c=this._isServerRsrc(b),d=!0,f;e||(e=new w,e.server=this._getServerInstanceRoot(b),c?e.hasServer=!0:(e.tokenServiceUrl=this._getTokenSvcUrl(b),e.hasPortal=!0), this.registerServers([e]));(f=this._findCredential(b))?(delete a.server,l.mixin(f,a),d=!1):(f=new E({userId:a.userId,server:e.server,token:a.token,expires:a.expires,ssl:a.ssl,scope:c?"server":"portal"}),f.resources=[b],this.credentials.push(f));f.emitTokenChange(!1);d||f.refreshServerTokens()},toJSON:function(){return q.fixJson({serverInfos:f.map(this.serverInfos,function(a){return a.toJSON()}),oAuthInfos:f.map(this.oAuthInfos,function(a){return a.toJSON()}),credentials:f.map(this.credentials,function(a){return a.toJSON()})})}, initialize:function(a){if(a){l.isString(a)&&(a=JSON.parse(a));var b=a.serverInfos,e=a.oAuthInfos;a=a.credentials;if(b){var c=[];f.forEach(b,function(a){a.server&&a.tokenServiceUrl&&c.push(a.declaredClass?a:new w(a))});c.length&&this.registerServers(c)}if(e){var d=[];f.forEach(e,function(a){a.appId&&d.push(a.declaredClass?a:new t(a))});d.length&&this.registerOAuthInfos(d)}a&&f.forEach(a,function(a){a.server&&a.token&&a.expires&&a.expires>(new Date).getTime()&&(a=a.declaredClass?a:new E(a),a.emitTokenChange(), this.credentials.push(a))},this)}},findServerInfo:function(a){var b;a=this._sanitizeUrl(a);f.some(this.serverInfos,function(e){this._hasSameServerInstance(e.server,a)&&(b=e);return!!b},this);return b},findOAuthInfo:function(a){var b;a=this._sanitizeUrl(a);f.some(this.oAuthInfos,function(e){this._hasSameServerInstance(e.portalUrl,a)&&(b=e);return!!b},this);return b},findCredential:function(a,b){var e,c;a=this._sanitizeUrl(a);c=this._isServerRsrc(a)?"server":"portal";b?f.some(this.credentials,function(d){this._hasSameServerInstance(d.server, a)&&b===d.userId&&d.scope===c&&(e=d);return!!e},this):f.some(this.credentials,function(b){this._hasSameServerInstance(b.server,a)&&-1!==this._getIdenticalSvcIdx(a,b)&&b.scope===c&&(e=b);return!!e},this);return e},getCredential:function(a,b){var e,c,d=!0;q.isDefined(b)&&(l.isObject(b)?(e=!!b.token,c=b.error,d=!1!==b.prompt):e=b);a=this._sanitizeUrl(a);var f=p.makeDeferredCancellingPending(),r=this._isAdminResource(a),h=e&&this._doPortalSignIn(a)?this._getEsriAuthCookie():null;if((e=e?this.findCredential(a): null)&&c&&498===c.code)e.destroy(),h&&h.token===b.token&&g("esri_auth",null,{expires:-1,path:"/",domain:document.domain});else if(h||e)return a=new x("identity-manager:not-authorized","You are currently signed in as: '"+(h&&h.email||e&&e.userId)+"'. You do not have access to this resource: "+a,{error:c}),f.reject(a),f.promise;if(c=this._findCredential(a,b))return f.resolve(c),f.promise;c=this.findServerInfo(a);if(c)!c.hasServer&&this._isServerRsrc(a)&&(c._restInfoPms=this._getTokenSvcUrl(a),c.hasServer= !0);else{h=this._getTokenSvcUrl(a);if(!h)return a=new x("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),f.reject(a),f.promise;c=new w;c.server=this._getServerInstanceRoot(a);l.isString(h)?(c.tokenServiceUrl=h,c.hasPortal=!0):(c._restInfoPms=h,c.hasServer=!0);this.registerServers([c])}d&&c.hasPortal&&void 0===c._selfReq&&!this._findOAuthInfo(a)&&(c._selfReq={owningTenant:b&&b.owningTenant,selfDfd:this._getPortalSelf(c.tokenServiceUrl.replace(this._rePortalTokenSvc, "/sharing/rest/portals/self"),a)});return this._enqueue(a,c,b,f,r)},getResourceName:function(a){return this._isRESTService(a)?a.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(a)&&a.replace(this._gwUser,"$1")||this._gwItem.test(a)&&a.replace(this._gwItem,"$1")||this._gwGroup.test(a)&&a.replace(this._gwGroup,"$1")||""},generateToken:function(a,b,c){var e,f,g,h,r,m,n=this._rePortalTokenSvc.test(a.tokenServiceUrl),p=new k(window.location.href.toLowerCase()),t=this._getEsriAuthCookie(), v,C=!b;h=a.shortLivedTokenValidity;var q;b&&(q=d.id.tokenValidity||h||d.id.defaultTokenValidity,q>h&&0g.expires?(e=f,g.destroy()):(e=g,f.destroy()):e=f.isValid()?f:g,m._oAuthCred=e),e.isValid()?c(new E({userId:e.userId,server:k.server,token:e.token,expires:e.expires,ssl:e.ssl,_oAuthCred:e})):b._oAuthHash&&b._oAuthHash.state.portalUrl=== m.portalUrl?(l=b._oAuthHash,k=new E({userId:l.username,server:k.server,token:l.access_token,expires:(new Date).getTime()+1E3*Number(l.expires_in),ssl:"true"===l.ssl,oAuthState:l.state,_oAuthCred:e}),e.storage=l.persist?window.localStorage:window.sessionStorage,e.token=k.token,e.expires=k.expires,e.userId=k.userId,e.ssl=k.ssl,e.save(),b._oAuthHash=null,c(k)):l?a._pendingDfd=b.oAuthSignIn(a.resUrl_,k,m,a.options_).then(c,d):(k=new x("identity-manager:not-authenticated","User is not signed in."),d(k))): l?b._checkProtocol(a.resUrl_,k,d,a.admin_)&&(l=a.options_,a.admin_&&(l=l||{},l.isAdmin=!0),a._pendingDfd=b.signIn(a.resUrl_,k,l).then(c,d)):(k=new x("identity-manager:not-authenticated","User is not signed in."),d(k))},g=function(){var e=a.sinfo_,g=e.owningSystemUrl,h=a.options_,k,l,m,n;h&&(k=h.token,l=h.error,m=h.prompt);(n=b._findCredential(g,{token:k,resource:a.resUrl_}))||f.some(b.credentials,function(a){this._isIdProvider(g,a.server)&&(n=a);return!!n},b);n?(h=b.findCredential(a.resUrl_,n.userId))? c(h):H(e,b._legacyFed)?(h=n.toJSON(),h.server=e.server,h.resources=null,c(new E(h))):(a._pendingDfd=b.generateToken(b.findServerInfo(n.server),null,{serverUrl:a.resUrl_,token:n.token,ssl:n.ssl})).then(function(b){c(new E({userId:n.userId,server:e.server,token:b.token,expires:q.isDefined(b.expires)?Number(b.expires):null,ssl:!!b.ssl,isAdmin:a.admin_,validity:b.validity}))},d):(b._busy=null,k&&(a.options_.token=null),(a._pendingDfd=b.getCredential(g.replace(/\/?$/,"/sharing"),{resource:a.resUrl_,owningTenant:e.owningTenant, token:k,error:l,prompt:m})).then(function(c){b._enqueue(a.resUrl_,a.sinfo_,a.options_,a,a.admin_)},function(a){d(a)}))};this._errbackFunc=d;var h=a.sinfo_.owningSystemUrl,k=this._isServerRsrc(a.resUrl_),m=a.sinfo_._restInfoPms;m?m.promise.then(function(c){var d=a.sinfo_;d.adminTokenServiceUrl=d._restInfoPms.adminUrl;d._restInfoPms=null;d.tokenServiceUrl=l.getObject("authInfo.tokenServicesUrl",!1,c)||l.getObject("authInfo.tokenServiceUrl",!1,c)||l.getObject("tokenServiceUrl",!1,c);d.shortLivedTokenValidity= l.getObject("authInfo.shortLivedTokenValidity",!1,c);d.currentVersion=c.currentVersion;d.owningTenant=c.owningTenant;(c=d.owningSystemUrl=c.owningSystemUrl)&&b._portals.push(c);k&&c?g():e()},function(){a.sinfo_._restInfoPms=null;var b=new x("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");d(b)}):k&&h?g():a.sinfo_._selfReq?a.sinfo_._selfReq.selfDfd.then(function(c){var d={},e,f,g,h;c&&(e=c.user&&c.user.username,d.username=e,d.allSSL=c.allSSL, f=c.supportsOAuth,g=c.currentVersion,"multitenant"===c.portalMode&&(h=c.customBaseUrl));a.sinfo_.webTierAuth=!!e;return e&&b.normalizeWebTierAuth?b.generateToken(a.sinfo_,null,{ssl:d.allSSL}).always(function(a){d.portalToken=a&&a.token;d.tokenExpiration=a&&a.expires;return d}):!e&&f&&4.4<=parseFloat(g)&&!b._doPortalSignIn(a.resUrl_)?b._generateOAuthInfo({portalUrl:a.sinfo_.server,customBaseUrl:h,owningTenant:a.sinfo_._selfReq.owningTenant}).always(function(){return d}):d}).always(function(b){a.sinfo_._selfReq= null;b?e(b.username,b.allSSL,b.portalToken,b.tokenExpiration):e()}):e()},_generateOAuthInfo:function(a){var b=this,c,d=a.portalUrl,e=a.customBaseUrl,f=a.owningTenant;if(a=!this.defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal){c=window.location.href;var g=c.indexOf("?");-1b&&(b=0);this._refreshTimer=setTimeout(l.hitch(this,this.refreshToken),b>a?b-a:b)}});n.Credential=E;return n})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(n,m){n.cookie=function(l,f,h){var k=document.cookie,c;if(1==arguments.length)c=(c=k.match(new RegExp("(?:^|; )"+m.escapeString(l)+"\x3d([^;]*)")))? decodeURIComponent(c[1]):void 0;else{h=h||{};k=h.expires;if("number"==typeof k){var g=new Date;g.setTime(g.getTime()+864E5*k);k=h.expires=g}k&&k.toUTCString&&(h.expires=k.toUTCString());f=encodeURIComponent(f);var k=l+"\x3d"+f,b;for(b in h)k+="; "+b,g=h[b],!0!==g&&(k+="\x3d"+g);document.cookie=k}return c};n.cookie.isSupported=function(){"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&& this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};return n.cookie})},"esri/identity/ServerInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),function(n,m,l,f,h,k){return function(c){function g(b){b=c.call(this)||this;b.adminTokenServiceUrl=null;b.currentVersion=null;b.hasPortal=null;b.hasServer=null;b.owningSystemUrl=null;b.owningTenant=null;b.server= null;b.shortLivedTokenValidity=null;b.tokenServiceUrl=null;b.webTierAuth=null;return b}l(g,c);f([k.property({json:{write:!0}})],g.prototype,"adminTokenServiceUrl",void 0);f([k.property({json:{write:!0}})],g.prototype,"currentVersion",void 0);f([k.property({json:{write:!0}})],g.prototype,"hasPortal",void 0);f([k.property({json:{write:!0}})],g.prototype,"hasServer",void 0);f([k.property({json:{write:!0}})],g.prototype,"owningSystemUrl",void 0);f([k.property({json:{write:!0}})],g.prototype,"owningTenant", void 0);f([k.property({json:{write:!0}})],g.prototype,"server",void 0);f([k.property({json:{write:!0}})],g.prototype,"shortLivedTokenValidity",void 0);f([k.property({json:{write:!0}})],g.prototype,"tokenServiceUrl",void 0);f([k.property({json:{write:!0}})],g.prototype,"webTierAuth",void 0);return g=f([k.subclass("esri.identity.ServerInfo")],g)}(k.declared(h))})},"esri/identity/OAuthCredential":function(){define(["../core/declare"],function(n){return n(null,{declaredClass:"esri.identity.OAuthCredential", oAuthInfo:null,storage:null,expires:null,ssl:null,token:null,userId:null,constructor:function(m,l){this.oAuthInfo=m;this.storage=l;this._init()},isValid:function(){var m=!1;if(this.oAuthInfo&&this.token&&this.userId){var l=(new Date).getTime();this.expires>l&&(this.expires-l)/1E3>60*this.oAuthInfo.minTimeUntilExpiration&&(m=!0)}return m},save:function(){if(this.storage){var m=this._load(),l=this.oAuthInfo;if(l&&l.authNamespace&&l.portalUrl){var f=m[l.authNamespace];f||(f=m[l.authNamespace]={});f[l.portalUrl]= {expires:this.expires,ssl:this.ssl,token:this.token,userId:this.userId};try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(m))}catch(h){console.log(h)}}}},destroy:function(){var m=this._load(),l=this.oAuthInfo;if(l&&l.authNamespace&&l.portalUrl&&this.storage){var f=m[l.authNamespace];if(f){delete f[l.portalUrl];try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(m))}catch(h){console.log(h)}}}l&&(this.oAuthInfo=l._oAuthCred=null)},_init:function(){var m=this._load(),l=this.oAuthInfo;l&& l.authNamespace&&l.portalUrl&&(m=m[l.authNamespace])&&(m=m[l.portalUrl])&&(this.expires=m.expires,this.ssl=m.ssl,this.token=m.token,this.userId=m.userId)},_load:function(){var m={};if(this.storage){var l=this.storage.getItem("esriJSAPIOAuth");if(l)try{m=JSON.parse(l)}catch(f){console.log(f)}}return m}})})},"esri/identity/OAuthInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators".split(" "), function(n,m,l,f,h,k){return function(c){function g(a){a=c.call(this)||this;a._oAuthCred=null;a.appId=null;a.authNamespace="/";a.expiration=20160;a.forceLogin=!1;a.locale=null;a.minTimeUntilExpiration=30;a.popup=!1;a.popupCallbackUrl="oauth-callback.html";a.popupWindowFeatures="height\x3d490,width\x3d800,resizable,scrollbars,status";a.portalUrl="https://www.arcgis.com";return a}l(g,c);b=g;g.prototype.clone=function(){return b.fromJSON(this.toJSON())};f([k.property({json:{write:!0}})],g.prototype, "appId",void 0);f([k.property({json:{write:!0}})],g.prototype,"authNamespace",void 0);f([k.property({json:{write:!0}})],g.prototype,"expiration",void 0);f([k.property({json:{write:!0}})],g.prototype,"forceLogin",void 0);f([k.property({json:{write:!0}})],g.prototype,"locale",void 0);f([k.property({json:{write:!0}})],g.prototype,"minTimeUntilExpiration",void 0);f([k.property({json:{write:!0}})],g.prototype,"popup",void 0);f([k.property({json:{write:!0}})],g.prototype,"popupCallbackUrl",void 0);f([k.property({json:{write:!0}})], g.prototype,"popupWindowFeatures",void 0);f([k.property({json:{write:!0}})],g.prototype,"portalUrl",void 0);return g=b=f([k.subclass("esri.identity.OAuthInfo")],g);var b}(k.declared(h))})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),function(n,m,l,f,h,k,c,g,b,a){f("dijit-legacy-requires")&&c(0,function(){n(["dijit/form/DropDownButton", "dijit/form/ComboButton","dijit/form/ToggleButton"])});c=m("dijit.form.Button"+(f("dojo-bidi")?"_NoBidi":""),[g,b],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:a,_setValueAttr:"valueNode",_setNameAttr:function(a){this.valueNode&&this.valueNode.setAttribute("name",a)},postCreate:function(){this.inherited(arguments);this._setLabelFromContainer()},_setLabelFromContainer:function(){this.containerNode&&!this.label&&(this.label= k.trim(this.containerNode.innerHTML),this.onLabelSet())},_setShowLabelAttr:function(a){this.containerNode&&l.toggle(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},setLabel:function(a){h.deprecated("dijit.form.Button.setLabel() is deprecated. Use set('label', ...) instead.","","2.0");this.set("label",a)},onLabelSet:function(){this.inherited(arguments);this.showLabel||"title"in this.params||(this.titleNode.title=k.trim(this.containerNode.innerText||this.containerNode.textContent|| ""))}});f("dojo-bidi")&&(c=m("dijit.form.Button",c,{onLabelSet:function(){this.inherited(arguments);this.titleNode.title&&this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(a){this._created&&this.textDir!=a&&(this._set("textDir",a),this._setLabelAttr(this.label))}}));return c})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),function(n, m,l,f,h,k,c,g){m("dijit-legacy-requires")&&f(0,function(){require(["dijit/form/_FormValueWidget"])});return n("dijit.form._FormWidget",[h,c,k,g],{setDisabled:function(b){l.deprecated("setDisabled("+b+") is deprecated. Use set('disabled',"+b+") instead.","","2.0");this.set("disabled",b)},setValue:function(b){l.deprecated("dijit.form._FormWidget:setValue("+b+") is deprecated. Use set('value',"+b+") instead.","","2.0");this.set("value",b)},getValue:function(){l.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.", "","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(n,m,l,f,h,k,c,g,b,a){return m("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode", tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(b){this._set("disabled",b);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?l.set(this.focusNode,"disabled",b):this.focusNode.setAttribute("aria-disabled",b?"true":"false");this.valueNode&&l.set(this.valueNode,"disabled",b);b?(this._set("hovering",!1),this._set("active",!1),b="tabIndex"in this.attributeMap?this.attributeMap.tabIndex: "_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",n.forEach(h.isArray(b)?b:[b],function(b){b=this[b];g("webkit")||a.hasDefaultTabStop(b)?b.setAttribute("tabIndex","-1"):b.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(a){if("mouse"==a&&this.isFocusable())var d=this.own(c(this.focusNode,"focus",function(){k.remove();d.remove()}))[0],f=g("pointer-events")?"pointerup":g("touch-events")?"touchend, mouseup":"mouseup",k=this.own(c(this.ownerDocumentBody, f,h.hitch(this,function(a){k.remove();d.remove();this.focused&&("touchend"==a.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){b.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=f.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(d){}},compare:function(a,b){return"number"==typeof a&&"number"==typeof b?isNaN(a)&&isNaN(b)? 0:a-b:a>b?1:ac("ie")&&this.defer(function(){try{var a=l.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;ac("ie")&&(g.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0=b||48<=b&&57>=b||b==h.SPACE)return;b=!1;for(var g in h)if(h[g]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&& 90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==h.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var l={faux:!0},m;for(m in a)/^(layer[XY]|returnValue|keyLocation)$/.test(m)||(g=a[m],"function"!=typeof g&&"undefined"!=typeof g&&(l[m]=g));k.mixin(l,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){l._wasConsumed=!0;a.preventDefault()}, stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=l;!1===this.onInput(l)&&(l.preventDefault(),l.stopPropagation());if(!l._wasConsumed&&9>=f("ie"))switch(a.keyCode){case h.TAB:case h.ESCAPE:case h.DOWN_ARROW:case h.UP_ARROW:case h.LEFT_ARROW:case h.RIGHT_ARROW:break;default:a.keyCode==h.ENTER&&"textarea"!=this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&c.emit(this.textbox,"input",{bubbles:!0})})}})),c(this.textbox, "input",k.hitch(this,"_onInput")),c(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=k.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled|| (this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=c.once(this.domNode,"mouseup, touchend",k.hitch(this,function(a){this._isTextSelected()||b.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle= null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});f("dojo-bidi")&&(b=m("dijit.form._TextBoxMixin",b,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));b._setSelectionRange=g._setSelectionRange=function(a,b, c){a.setSelectionRange&&a.setSelectionRange(b,c)};b.selectInputText=g.selectInputText=function(a,c,f){a=l.byId(a);isNaN(c)&&(c=0);isNaN(f)&&(f=a.value?a.value.length:0);try{a.focus(),b._setSelectionRange(a,c,f)}catch(q){}};return b})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "), function(n,m,l,f,h,k,c,g,b,a,d,v,q,w,y,p,G,D){function x(){}var u=m("dijit._MasterTooltip",[w,y],{duration:v.defaultDuration,templateString:G,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new p(this.domNode);this.fadeIn=l.fadeIn({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onShow")});this.fadeOut=l.fadeOut({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onHide")})},show:function(a,b,d,f,h,e,k){if(!this.aroundNode||this.aroundNode!== b||this.containerNode.innerHTML!=a)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;h&&this.set("textDir",h);this.containerNode.align=f?"right":"left";var l=q.around(this.domNode,b,d&&d.length?d:z.defaultPosition,!f,g.hitch(this,"orient")),m=l.aroundNodePos;"M"==l.corner.charAt(0)&&"M"==l.aroundCorner.charAt(0)?(this.connectorNode.style.top=m.y+(m.h-this.connectorNode.offsetHeight>>1)-l.y+"px",this.connectorNode.style.left=""):"M"==l.corner.charAt(1)&& "M"==l.aroundCorner.charAt(1)?this.connectorNode.style.left=m.x+(m.w-this.connectorNode.offsetWidth>>1)-l.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");c.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=e||x;this.onMouseLeave=k||x}},orient:function(a,b,c,f,g){this.connectorNode.style.top="";var e=f.h;f=f.w;a.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove", "BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+"-"+c];this.domNode.style.width="auto";var h=k.position(this.domNode);if(d("ie")||d("trident"))h.w+=2;k.setMarginBox(this.domNode,{w:Math.min(Math.max(f,1),h.w)});"B"==c.charAt(0)&&"B"==b.charAt(0)?(a=k.position(a),b=this.connectorNode.offsetHeight, a.h>e?(this.connectorNode.style.top=e-(g.h+b>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(g.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,h.w-f)},_onShow:function(){d("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode= null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=x},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});d("dojo-bidi")&&u.extend({_setAutoTextDir:function(a){this.applyTextDir(a);n.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});D.showTooltip= function(a,b,c,d,f,e,g){c&&(c=n.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));z._masterTT||(D._masterTT=z._masterTT=new u);return z._masterTT.show(a,b,c,d,f,e,g)};D.hideTooltip=function(a){return z._masterTT&&z._masterTT.hide(a)};var z=m("dijit.Tooltip",w,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(c){n.forEach(this._connections||[],function(a){n.forEach(a,function(a){a.remove()})},this);this._connectIds= n.filter(g.isArrayLike(c)?c:c?[c]:[],function(a){return f.byId(a,this.ownerDocument)},this);this._connections=n.map(this._connectIds,function(c){c=f.byId(c,this.ownerDocument);var d=this.selector,h=d?function(b){return a.selector(d,b)}:function(a){return a},k=this;return[a(c,h(b.enter),function(){k._onHover(this)}),a(c,h("focusin"),function(){k._onHover(this)}),a(c,h(b.leave),g.hitch(k,"_onUnHover")),a(c,h("focusout"),g.hitch(k,"set","state","DORMANT"))]},this);this._set("connectId",c)},addTarget:function(a){a= a.id||a;-1==n.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=n.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);h.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;n.forEach(g.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML}, state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"==a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(z.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")}, this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}z.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,g.hitch(this,"set","state","SHOWING"),g.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&a!=this._connectNode&& this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state","HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");n.forEach(this._connections||[],function(a){n.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});z._MasterTooltip=u;z.show= D.showTooltip;z.hide=D.hideTooltip;z.defaultPosition=["after-centered","before-centered"];return z})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(n,m,l,f,h,k,c){function g(a,b,c,f){var d=k.getEffectiveBox(a.ownerDocument);a.parentNode&&"body"==String(a.parentNode.tagName).toLowerCase()||h.body(a.ownerDocument).appendChild(a);var g=null;n.some(b,function(b){var h=b.corner,k=b.pos,l=0,n= {w:{L:d.l+d.w-k.x,R:k.x-d.l,M:d.w}[h.charAt(1)],h:{T:d.t+d.h-k.y,B:k.y-d.t,M:d.h}[h.charAt(0)]},p=a.style;p.left=p.right="auto";c&&(l=c(a,b.aroundCorner,h,n,f),l="undefined"==typeof l?0:l);var q=a.style,w=q.display,v=q.visibility;"none"==q.display&&(q.visibility="hidden",q.display="");p=m.position(a);q.display=w;q.visibility=v;w={L:k.x,R:k.x-p.w,M:Math.max(d.l,Math.min(d.l+d.w,k.x+(p.w>>1))-p.w)}[h.charAt(1)];v={T:k.y,B:k.y-p.h,M:Math.max(d.t,Math.min(d.t+d.h,k.y+(p.h>>1))-p.h)}[h.charAt(0)];k=Math.max(d.l, w);q=Math.max(d.t,v);w=Math.min(d.l+d.w,w+p.w)-k;v=Math.min(d.t+d.h,v+p.h)-q;l+=p.w-w+(p.h-v);if(null==g||l>1)}[a.charAt(1)],y:{T:A,B:A+H,M:A+(H>>1)}[a.charAt(0)]}})}var p;if("string"==typeof b||"offsetWidth"in b||"ownerSVGElement"in b){if(p=m.position(b,!0),/^(above|below)/.test(c[0])){var q= m.getBorderExtents(b),w=b.firstChild?m.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0},v=m.getBorderExtents(a),u=a.firstChild?m.getBorderExtents(a.firstChild):{t:0,l:0,b:0,r:0};p.y+=Math.min(q.t+w.t,v.t+u.t);p.h-=Math.min(q.t+w.t,v.t+u.t)+Math.min(q.b+w.b,v.b+u.b)}}else p=b;if(b.parentNode)for(q="absolute"==l.getComputedStyle(b).position,b=b.parentNode;b&&1==b.nodeType&&"BODY"!=b.nodeName;){w=m.position(b,!0);v=l.getComputedStyle(b);/relative|absolute/.test(v.position)&&(q=!1);if(!q&&/hidden|auto|scroll/.test(v.overflow)){var u= Math.min(p.y+p.h,w.y+w.h),z=Math.min(p.x+p.w,w.x+w.w);p.x=Math.max(p.x,w.x);p.y=Math.max(p.y,w.y);p.h=u-p.y;p.w=z-p.x}"absolute"==v.position&&(q=!0);b=b.parentNode}var t=p.x,A=p.y,F="w"in p?p.w:p.w=p.width,H="h"in p?p.h:(f.deprecated("place.around: dijit/place.__Rectangle: { x:"+t+", y:"+A+", height:"+p.height+", width:"+F+" } has been deprecated. Please use { x:"+t+", y:"+A+", h:"+p.height+", w:"+F+" }","","2.0"),p.h=p.height),E=[];n.forEach(c,function(a){var b=h;switch(a){case "above-centered":d("TM", "BM");break;case "below-centered":d("BM","TM");break;case "after-centered":b=!b;case "before-centered":d(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":d(b?"TL":"TR",b?"TR":"TL");d(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":d(b?"BL":"BR",b?"TL":"TR");d(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":d(b?"TL":"TR",b?"BL":"BR");d(b?"TR":"TL",b?"BR":"BL");break;default:d(a.aroundCorner,a.corner)}});a=g(a,E,k,{w:F,h:H});a.aroundNodePos=p;return a}}})}, "esri/identity/OAuthSignInHandler":function(){define("./Credential ../core/domUtils ../core/lang ../core/Error ../core/urlUtils dijit/Dialog dijit/registry dojo/Deferred dojo/_base/kernel dojo/dom-attr dojo/i18n!./nls/identity dojo/io-query dojo/sniff dijit/form/Button dojo/query".split(" "),function(n,m,l,f,h,k,c,g,b,a,d,v,q){return{_oAuthDfd:null,_oAuthIntervalId:0,_oAuthDialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{oAuthInfo}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e", setOAuthRedirectionHandler:function(a){this._oAuthRedirectFunc=a},oAuthSignIn:function(b,c,f,h){var k=this._oAuthDfd=new g;k.resUrl_=b;k.sinfo_=c;k.oinfo_=f;var l=!h||!1!==h.oAuthPopupConfirmation;if(!f.popup||!l)return this._doOAuthSignIn(b,c,f),k.promise;this._nls||(this._nls=d);this.oAuthDialog||(this.oAuthDialog=this._createOAuthDialog());b=this.oAuthDialog;c=h&&h.error;h=h&&h.token;m.hide(b.errMsg_);c&&c.details&&403==c.details.httpStatus&&h&&(a.set(b.errMsg_,"innerHTML",this._nls.forbidden), m.show(b.errMsg_));b.show();return k.promise},setOAuthResponseHash:function(a){var b=this._oAuthDfd;this._oAuthDfd=null;if(b&&a)if(clearInterval(this._oAuthIntervalId),"#"===a.charAt(0)&&(a=a.substring(1)),a=v.queryToObject(a),a.error){var c="access_denied"===a.error;a=new f(c?"identity-manager:user-aborted":"identity-manager:authentication-failed",c?"ABORTED":"OAuth: "+a.error+" - "+a.error_description);b.reject(a)}else{var c=b.oinfo_._oAuthCred,d=new n({userId:a.username,server:b.sinfo_.server, token:a.access_token,expires:(new Date).getTime()+1E3*Number(a.expires_in),ssl:"true"===a.ssl,_oAuthCred:c});c.storage=a.persist?window.localStorage:window.sessionStorage;c.token=d.token;c.expires=d.expires;c.userId=d.userId;c.ssl=d.ssl;c.save();b.resolve(d)}},_createOAuthDialog:function(){var a=this._nls,d=l.substitute(a,this._oAuthDialogContent),g=new k({title:a.title,content:d,"class":"esri-widget esriOAuthSignInDialog esriIdentityDialog",style:"min-width: 18em;",esriIdMgr_:this,execute_:function(){var a= g.esriIdMgr_._oAuthDfd;g.hide_();g.esriIdMgr_._doOAuthSignIn(a.resUrl_,a.sinfo_,a.oinfo_)},cancel_:function(){var a=g.esriIdMgr_._oAuthDfd;g.esriIdMgr_._oAuthDfd=null;g.hide_();var b=new f("identity-manager:user-aborted","ABORTED");a.reject(b)},hide_:function(){m.hide(g.errMsg_);g.hide();k._DialogLevelManager.hide(g)}}),a=g.domNode;g.btnSubmit_=c.byNode(b.query(".esriIdSubmit",a)[0]);g.btnCancel_=c.byNode(b.query(".esriIdCancel",a)[0]);g.errMsg_=b.query(".esriErrorMsg",a)[0];g.connect(g.btnSubmit_, "onClick",g.execute_);g.connect(g.btnCancel_,"onClick",g.onCancel);g.connect(g,"onCancel",g.cancel_);return g},_doOAuthSignIn:function(a,b,c){var d=this,g={client_id:c.appId,response_type:"token",state:JSON.stringify({portalUrl:c.portalUrl}),expiration:c.expiration,locale:c.locale,redirect_uri:c.popup?h.makeAbsolute(c.popupCallbackUrl):window.location.href.replace(/#.*$/,"")};c.forceLogin&&(g.force_login=!0);var k=c.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",l=k+"?"+v.objectToQuery(g); if(c.popup){var m;7===q("ie")?(m=window.open(c.popupCallbackUrl,"esriJSAPIOAuth",c.popupWindowFeatures),m.location=l):m=window.open(l,"esriJSAPIOAuth",c.popupWindowFeatures);m?(m.focus(),this._oAuthDfd.oAuthWin_=m,this._oAuthIntervalId=setInterval(function(){if(m.closed){clearInterval(d._oAuthIntervalId);var a=d._oAuthDfd;if(a){var b=new f("identity-manager:user-aborted","ABORTED");a.reject(b)}}},500)):(a=new f("identity-manager:popup-blocked","ABORTED"),this._oAuthDfd.reject(a))}else this._rejectOnPersistedPageShow= !0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:g,authorizeUrl:k,resourceUrl:a,serverInfo:b,oAuthInfo:c}):window.location=l}}})},"url:dijit/templates/Dialog.html":'\x3cdiv class\x3d"dijitDialog" role\x3d"dialog" aria-labelledby\x3d"${id}_title"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"titleBar" class\x3d"dijitDialogTitleBar"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"titleNode" class\x3d"dijitDialogTitle" id\x3d"${id}_title"\r\n\t\t\t\trole\x3d"heading" level\x3d"1"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"closeButtonNode" class\x3d"dijitDialogCloseIcon" data-dojo-attach-event\x3d"ondijitclick: onCancel" title\x3d"${buttonCancel}" role\x3d"button" tabindex\x3d"-1"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"closeText" class\x3d"closeText" title\x3d"${buttonCancel}"\x3ex\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"dijitDialogPaneContent"\x3e\x3c/div\x3e\r\n\t${!actionBarTemplate}\r\n\x3c/div\x3e\r\n\r\n', "url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\r\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\r\n/\x3e\x3c/span\x3e\r\n', "url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n', "url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n', "*now":function(n){n(['dojo/i18n!*preload*esri/identity/nls/IdentityManager*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});define(["./IdentityManagerDialog","../kernel","./OAuthSignInHandler","../core/declare"],function(n,m,l,f){n=new n;m.id=f.safeMixin(n,l);return m.id});