// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"jimu/dijit/ShareLink":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/_base/lang dojo/_base/array dojo/dom-class dojo/_base/html dojo/on dojo/keys dijit/Tooltip dojo/topic dojo/query jimu/utils jimu/shareUtils dojo/_base/config dojo/cookie dojo/text!./templates/ShareLink.html dojo/string dijit/form/Select dijit/form/NumberTextBox dojo/dom-attr dojo/Deferred esri/request jimu/dijit/FilterParameters esri/symbols/jsonUtils esri/InfoTemplate jimu/LayerInfos/LayerInfos esri/symbols/PictureMarkerSymbol esri/graphic esri/layers/GraphicsLayer jimu/dijit/FeaturelayerChooserFromMap jimu/dijit/LayerChooserFromMapWithDropbox dijit/form/TextBox dijit/form/Textarea dijit/form/RadioButton jimu/dijit/CheckBox dijit/form/SimpleTextarea dijit/form/ValidationTextBox".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C,f,h,p,v,G,Q,x,A,m,q,y,D,L,J,P,K,N,U,S,V,aa,ca){return u([F,I,B],{templateString:x,declaredClass:"jimu.dijit.ShareLink",bitlyUrl:"https://arcg.is/prod/shorten",share:{shareEmailSubject:"",shareTwitterTxt:"",languages:"ar cs da de en el es et fi fr he hr hu it id ja ko lt lv nb nl pl pt-br pt-pt ro ru sk sl sr sv th tr uk vi zh-cn zh-hk zh-tw".split(" "),DEFAULT_MOBILE_LAYOUT:600},_hasZoomLevelMarkerAdded:!1,_hasMapScaleMarkerAdded:!1,_hasAddMarkerMarkerAdded:!1,HAS_INIT_URL:!1,
MAX_LAYER_VISIBILITY_LEN:2048,postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.shareLink;this.nls.symbol=window.jimuNls.common.symbol;this.nls.label=window.jimuNls.common.label;this.nls.WKID=window.jimuNls.common.wkid||"wkid";this.nls.popupTitle=window.jimuNls.shareLink.popupTitle||"Pop-up title";this.nls.zoomLevel=window.jimuNls.shareLink.zoomLevel||"Zoom level";this.nls.asc=window.jimuNls.common.asc;this.nls.desc=window.jimuNls.common.desc;this.share.shareEmailSubject=
this.nls.shareEmailSubject+" ${appTitle} ";this.share.shareTwitterTxt=this.nls.shareEmailSubject+"${appTitle}\n"},postCreate:function(){this.inherited(arguments);this._initUI();this._initMap();this._showSocialMediaLinksByConfig()},constructor:function(a){a&&(this._portalUrl=a.portalUrl,this._isOnline=a.isOnline,this._appTitle=a.appTitle,this._isShowBackBtn=a.isShowBackBtn,this._isShowSocialMediaLinks=a.isShowSocialMediaLinks,this._isSharedToPublic=a.isSharedToPublic,this._isShowFindLocation=a.isShowFindLocation,
this._config=a.config)},startup:function(){this.baseHrefUrl=v.getBaseHrefUrl(this._portalUrl);"undefined"===typeof this.optionSrc&&(this.optionSrc="currentMapExtent");this.updateUrl(null);this._initOptions();this._initOptionsEvent();var a=h(".shareLinkOptionsWrapper",this.domNode);this.own(g(a,"keydown",d.hitch(this,function(l){l.keyCode===r.ESCAPE&&(l.stopPropagation(),this.backBtn.focus())})));this.own(g(this.preview,"keydown",d.hitch(this,function(l){l.shiftKey||l.keyCode!==r.TAB||(l.preventDefault(),
this.backBtn.focus())})))},destroy:function(){this._cleanMarkerStatus();this._mapClickHandler&&(this._mapClickHandler=null);this.inherited(arguments)},onShareToPublicChanged:function(a){this._isSharedToPublic=a;this.updateUrl(null);this._isSharedToPublic?e.add(this.shareTips,"displaynone"):e.remove(this.shareTips,"displaynone")},onCloseContainer:function(){this._cleanMarkerStatus()},updateShareLinkOptionsUI:function(a){a&&"undefined"!==typeof a.isShowFindLocation&&this.findLocationRow&&(!1===a.isShowFindLocation?
e.add(this.findLocationRow,"displaynone"):!0===a.isShowFindLocation&&e.remove(this.findLocationRow,"displaynone"))},_initMap:function(){this.layerInfosObj=N.getInstanceSync();this.own(g(this.layerInfosObj,"layerInfosIsVisibleChanged",d.hitch(this,this._watchLayerChange)));window.isBuilder?(this.own(f.subscribe("app/mapLoaded",d.hitch(this,this._onMapLoaded))),this.own(f.subscribe("app/mapChanged",d.hitch(this,this._onMapLoaded)))):(this.own(f.subscribe("mapLoaded",d.hitch(this,this._onMapLoaded))),
this.own(f.subscribe("mapChanged",d.hitch(this,this._onMapLoaded))));window._widgetManager.map&&(this.map=window._widgetManager.map,this._mapEventUpdateUrls(),this._addGraphicsLayer())},_onMapLoaded:function(a){this.map=a;this._mapEventUpdateUrls();this._addGraphicsLayer()},_mapEventUpdateUrls:function(){this.map&&(this.own(g(this.map,"pan-end",d.hitch(this,function(){this._mapEventHandler("pan-end")}))),this.own(g(this.map,"resize",d.hitch(this,function(){this._mapEventHandler("resize")}))),this.own(g(this.map,
"zoom-end",d.hitch(this,function(){this._mapEventHandler("zoom-end")}))))},_mapEventHandler:function(){this._isShareLinkOptionsShow()&&this.updateUrl()},_showSocialMediaLinksByConfig:function(){this._config&&this._config.socialMedias&&("undefined"!==typeof this._config.socialMedias.email&&!1===this._config.socialMedias.email&&e.add(this.emailShare,"displaynone"),"undefined"!==typeof this._config.socialMedias.facebook&&!1===this._config.socialMedias.facebook&&e.add(this.FacebookShare,"displaynone"),
"undefined"!==typeof this._config.socialMedias.twitter&&!1===this._config.socialMedias.twitter&&e.add(this.TwitterShare,"displaynone"),"undefined"!==typeof this._config.socialMedias.googlePlus&&!1===this._config.socialMedias.googlePlus&&e.add(this.googlePlusShare,"displaynone"))},_initUI:function(){this._isShowBackBtn?(y.set(this.backBtn,"title",window.jimuNls.common.back),this.own(g(this.backBtn,"click",d.hitch(this,this._toggleLinkOptions))),this.own(g(this.backBtn,"keydown",d.hitch(this,function(a){a.keyCode===
r.ENTER||a.keyCode===r.SPACE||a.keyCode===r.ESCAPE?(this._toggleLinkOptions(),this.linkOptions.focus()):a.shiftKey&&a.keyCode===r.TAB&&(a.preventDefault(),this.preview.textbox.focus())})))):e.add(this.backBtn,"displaynone");!1===this._isShowSocialMediaLinks&&e.toggle(this.socialNetworkLinks,"displaynone");!0===this._isSharedToPublic&&e.toggle(this.shareTips,"displaynone");this.own(g(this.linkOptions,"click",d.hitch(this,this._toggleLinkOptions)));this.own(g(this.linkOptions,"keydown",d.hitch(this,
this._toggleLinkOptionsKeydown)));this._setInputsClicktoSelect(this._linkUrlTextBox);p.addTooltipByDomNode(C,this.emailShare,this.nls.shareEmail);p.addTooltipByDomNode(C,this.FacebookShare,this.nls.shareFacebook);p.addTooltipByDomNode(C,this.TwitterShare,this.nls.shareTwitter);p.addTooltipByDomNode(C,this.googlePlusShare,this.nls.shareGooglePlus);this.own(g(this.googlePlusShare,"click",d.hitch(this,this._toGooglePlus)));this.own(g(this.googlePlusShare,"keydown",d.hitch(this,this._toGooglePlusKeyDown)));
this._setInputsClicktoSelect(this._embedCodeTextArea);this.own(g(this.MoreOptionsContainer,"keydown",d.hitch(this,function(a){a.keyCode===r.ESCAPE&&(a.stopPropagation(),this._moreOptionsExpandCollapse(),this.MoreOptions.focus())})));this._sizeOptions=new m({options:[{label:this.nls.smallSize,value:"small",selected:!0},{label:this.nls.mediumSize,value:"medium",selected:!1},{label:this.nls.largeSize,value:"large",selected:!1},{label:this.nls.customSize,value:"custom",selected:!1}],"class":"sizeOptionsSelect"});
this._sizeOptions.placeAt(this.SizeSelect);this.own(g(this._sizeOptions,"change",function(a){switch(a){case "small":this._widthTextBox.set("value",300);this._heightTextBox.set("value",200);e.add(this.CustomSizeContainer,"disable");this._updateEmbedCodeFrameSize();break;case "medium":this._widthTextBox.set("value",800);this._heightTextBox.set("value",600);e.add(this.CustomSizeContainer,"disable");this._updateEmbedCodeFrameSize();break;case "large":this._widthTextBox.set("value",1080);this._heightTextBox.set("value",
720);e.add(this.CustomSizeContainer,"disable");this._updateEmbedCodeFrameSize();break;case "custom":e.remove(this.CustomSizeContainer,"disable")}}.bind(this)));this.own(g(this._sizeOptions,"keydown",function(a){a.shiftKey&&a.keyCode===r.TAB&&(a.preventDefault(),this._moreOptionsExpandCollapse(),this.MoreOptions.focus())}.bind(this)));this._widthTextBox=new q({"class":"sizeTextBox inputsText",value:300,constraints:{pattern:"#",places:0}});this._widthTextBox.placeAt(this.CustomSizeContainer,1);this.own(g(this._widthTextBox,
"change",function(a){200>a?this._widthTextBox.set("value",200>a?200:a):this._updateEmbedCodeFrameSize()}.bind(this)));this._heightTextBox=new q({"class":"sizeTextBox inputsText",value:200,constraints:{pattern:"#",places:0}});this._heightTextBox.placeAt(this.CustomSizeContainer,3);this.own(g(this._heightTextBox,"change",function(a){200>a?this._heightTextBox.set("value",200>a?200:a):this._updateEmbedCodeFrameSize()}.bind(this)));this.own(g(this._heightTextBox,"keydown",function(a){a.shiftKey||a.keyCode!==
r.TAB||(a.preventDefault(),this._moreOptionsExpandCollapse(),this.MoreOptions.focus())}.bind(this)));this.mobileLayout.set("value",this.share.DEFAULT_MOBILE_LAYOUT);this.updateShareLinkOptionsUI({isShowFindLocation:this._isShowFindLocation});this._setInputsClicktoSelect(this.preview)},_setLinkUrl:function(a){this._linkUrlTextBox.set("value",a);n.hasClass(this._linkUrlTextBox.domNode,"dijitFocused")&&this._linkUrlTextBox.textbox.select();y.set(this._linkUrlTextBox.domNode,"data-old",a)},_setEmbedCode:function(a){this._embedCodeTextArea.set("value",
'\x3ciframe width\x3d"'+this._widthTextBox.value+'" height\x3d"'+this._heightTextBox.value+'" frameborder\x3d"0" scrolling\x3d"no" allowfullscreen src\x3d"'+a+'"\x3e\x3c/iframe\x3e');y.set(this._embedCodeTextArea.domNode,"data-old-shortened",a)},_updateEmbedCodeFrameSize:function(a){a=this._embedCodeTextArea.get("value");a=a.replace(/width="[0-9]*"/i,'width\x3d"'+this._widthTextBox.value+'"');a=a.replace(/height="[0-9]*"/i,'height\x3d"'+this._heightTextBox.value+'"');this._embedCodeTextArea.set("value",
a)},_initOptions:function(){var a=[],l=this.map.getLevel();"number"===typeof l&&-1!==l?e.remove(this.chooseCenterWithLevelRow,"displaynone"):e.add(this.chooseCenterWithLevelRow,"displaynone");a=[];this.setlanguage_languages.removeOption(this.setlanguage_languages.getOptions());k.forEach(this.share.languages,function(E){var M={label:E,value:E};M.selected=E===G.locale?!0:!1;a.push(M)});this.setlanguage_languages.addOption(a);l="";try{var t=Q("esri_auth");t&&(l=JSON.parse(t).token)}catch(E){console.log("ShareLink can't parse Auth:"+
E)}l&&this.authtoken.set("value",l);t=new aa({createMapResponse:this.map.webMapResponse,showLayerFromFeatureSet:!1,onlyShowVisible:!1,updateWhenLayerInfosIsShowInMapChanged:!1});e.add(t.domNode,"share-layerChooser-dropbox");this.layerChooserFromMapWithDropbox=new ca({layerChooser:t,customClass:"jimu-shareLink-dropbox-popup"});this.layerChooserFromMapWithDropbox.placeAt(this.queryFeature_layer);this.own(g(this.layerChooserFromMapWithDropbox,"selection-change",d.hitch(this,this._updateQueryFeature_Layer)));
this.queryFeature_valueFilter.filterParams=new J;this.queryFeature_valueFilter.filterParams.placeAt(this.queryFeature_valueFilter);this.own(g(this.queryFeature_valueFilter.filterParams,"change",d.hitch(this,function(){this._updateUrlByQueryFeatures();this.updateUrl()})));"undefined"!==typeof this.map.spatialReference&&"undefined"!==typeof this.map.spatialReference.wkid&&this.addMarker_spatialReference.set("value",this.map.spatialReference.wkid)},_initOptionsEvent:function(){var a=p.has("ie")||p.has("edge")?
"change":"KeyUp",l=h(".shareRadios",this.domNode);this.own(g(l,"click",d.hitch(this,function(t){this.optionSrc=y.get(t.srcElement||t.target,"data-id");this.updateUrl()})));l=h(".shareCheckBoxes",this.domNode);this.own(g(l,"click",d.hitch(this,function(){this.updateUrl()})));this.own(g(this.chooseCenterWithLevel_levels,"change",d.hitch(this,function(){this.updateUrl()})));this.own(g(this.chooseCenterWithScale_scales,"change",d.hitch(this,function(){this.updateUrl()})));this.own(g(this.setlanguage_languages,
"change",d.hitch(this,function(){this.updateUrl()})));this.own(g(this.findLocation_input,a,d.hitch(this,this.updateUrl)));this.own(g(this.queryFeature_field,"change",d.hitch(this,this._updateQueryFeature_Value)));this.own(g(this.mobileLayout,a,d.hitch(this,this.updateUrl)));this.own(g(this.authtoken,a,d.hitch(this,this.updateUrl)));this.own(g(this.addMarker_marker,"click",d.hitch(this,function(t){this._onMarkersClick(t)})));this.own(g(this.addMarker_spatialReference,"change",d.hitch(this,this.updateUrl)));
this.own(g(this.addMarker_title,a,d.hitch(this,this.updateUrl)));this.own(g(this.addMarker_symbolURL,a,d.hitch(this,this.updateUrl)));this.own(g(this.addMarker_label,a,d.hitch(this,this.updateUrl)));this.own(g(this.addMarker_level,"change",d.hitch(this,this.updateUrl)));this.own(g(this.chooseCenterWithLevel_marker,"click",d.hitch(this,function(t){this._onMarkersClick(t)})));this.own(g(this.chooseCenterWithScale_marker,"click",d.hitch(this,function(t){this._onMarkersClick(t)})))},_onMarkersClick:function(a){v.disableWebMapPopup(this.map);
this._unselectMarkerBtn();this._selectMarkerBtn(a);this._hidePopup();this._removeGraphicsLayer();this._mapClickHandler=g.once(this.map,"click",d.hitch(this,this._onMapClick))},_onMapClick:function(a){var l=a.mapPoint;this._addGraphicsLayerMarker(a);"chooseCenterWithLevel"===this.optionSrc?this._hasZoomLevelMarkerAdded=!1:"chooseCenterWithScale"===this.optionSrc?this._hasMapScaleMarkerAdded=!1:"addMarker"===this.optionSrc&&(this._hasAddMarkerMarkerAdded=!1);this._unselectMarkerBtn();this.updateUrl(l);
this._showPopup();v.enableWebMapPopup(this.map)},_hidePopup:function(){f.publish("ShareLink/onHideContainer")},_showPopup:function(){f.publish("ShareLink/onShowContainer")},_updateResUrls:function(a){"currentMapExtent"===this.optionSrc?(a=this.getMapExtent(this.map),this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"extent",a,!0)):"chooseCenterWithLevel"===this.optionSrc?(!1===this._hasZoomLevelMarkerAdded&&(this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"center",this.getMapCenter(this.map,
a),!0),a&&a.x&&a.y&&(this._hasZoomLevelMarkerAdded=!0)),this.resultUrl=v.addQueryParamToUrl(this.resultUrl,"level",this._getMapLevel(),!0)):"chooseCenterWithScale"===this.optionSrc?(!1===this._hasMapScaleMarkerAdded&&(this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"center",this.getMapCenter(this.map,a),!0),a&&a.x&&a.y&&(this._hasMapScaleMarkerAdded=!0)),this.resultUrl=v.addQueryParamToUrl(this.resultUrl,"scale",this._getMapScale(),!0)):"findLocation"===this.optionSrc?(a=this.findLocation_input.get("value"),
this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"find",a,!0)):"queryFeature"===this.optionSrc?this._updateUrlByQueryFeatures():"addMarker"===this.optionSrc&&(!1===this._hasAddMarkerMarkerAdded?(this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"marker",this.getMapCenter(this.map,a,null,this._getWkid()),!0),this.resultUrl+=",",a&&a.x&&a.y&&(this._hasAddMarkerMarkerAdded=!0,this._lastAddMarkerParamObj=a)):(this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"marker",this.getMapCenter(this.map,
this._lastAddMarkerParamObj,null,this._getWkid()),!0),this.resultUrl+=","),this.resultUrl+=encodeURIComponent(this.addMarker_title.get("value")||""),this.resultUrl+=",",this.resultUrl+=encodeURIComponent(this.addMarker_symbolURL.get("value")||""),this.resultUrl+=",",this.resultUrl+=encodeURIComponent(this.addMarker_label.get("value")||""),a=this._getMapLevel(),this.resultUrl="number"===typeof a&&-1!==a?v.addQueryParamToUrl(this.resultUrl,"level",this._getMapLevel(),!0):v.addQueryParamToUrl(this.resultUrl,
"scale",this._getMapScale(),!0));this.resultUrl=v.removeQueryParamFromUrl(this.resultUrl,"mobileBreakPoint",!0);this.resultUrl=v.removeQueryParamFromUrl(this.resultUrl,"locale",!0);this.resultUrl=v.removeQueryParamFromUrl(this.resultUrl,"token",!0);this.resultUrl=v.removeQueryParamFromUrl(this.resultUrl,"layers",!0);this.overwirteMobileLayout.checked&&(this.resultUrl=v.addQueryParamToUrl(this.resultUrl,"mobileBreakPoint",this.mobileLayout.getValue(),!0));this.setlanguage.checked&&(this.resultUrl=
v.addQueryParamToUrl(this.resultUrl,"locale",this.setlanguage_languages.getValue(),!0));this.auth.checked&&(this.resultUrl=v.addQueryParamToUrl(this.resultUrl,"token",this.authtoken.getValue(),!0));if(this.setLayerVisibility.checked){a=this.resultUrl;for(var l=!1,t=["showLayers","hideLayers","showLayersEncoded","hideLayersEncoded"],E,M=0,b=t.length;M<b;M++)if(E=t[M],E=v.addQueryParamToUrl(a,E,this._getLayersVisibility(E),!0),!this._isResultURLTooLong(E,this.resultUrl)){l=!0;this.resultUrl=E;break}l||
(E=t[0],this.resultUrl=v.addQueryParamToUrl(a,E,this._getLayersVisibility(E),!0))}this.cleanUrlLengthWarning();(v.getQueryParamFromUrl(this.resultUrl,"showLayersEncoded")||v.getQueryParamFromUrl(this.resultUrl,"hideLayersEncoded"))&&this.setUrlEncodeWarning();this._isResultURLTooLong(this.resultUrl)&&this.setUrlToolongWarning()},setUrlEncodeWarning:function(){this._setUrlLengthWarning(this.nls.urlEncodedTips)},setUrlToolongWarning:function(){this._setUrlLengthWarning(this.nls.urlTooLongTips)},_setUrlLengthWarning:function(a){n.removeClass(this.urlLengthTips1,
"displaynone");n.removeClass(this.urlLengthTips2,"displaynone");a&&(this.urlLengthTips1.innerHTML=a,this.urlLengthTips2.innerHTML=a)},cleanUrlLengthWarning:function(){n.addClass(this.urlLengthTips1,"displaynone");n.addClass(this.urlLengthTips2,"displaynone");this.urlLengthTips1.innerHTML="";this.urlLengthTips2.innerHTML=""},_isResultURLTooLong:function(a,l){if(!a||!a.length)return!1;var t=0;l&&l.length&&(t=l.length);return a.length>=this.MAX_LAYER_VISIBILITY_LEN-t?!0:!1},_getLayersVisibility:function(a){var l;
(a=this.layerInfosObj.getSimplificationState()[a])&&a.join&&(l=a.join(";"));return l},_updateUrlByQueryFeatures:function(){var a=this._getIdFromLayerChoose()||"",l=this.queryFeature_field.get("value"),t=this._getQueryFeatureFilterValue();this.resultUrl=v.addQueryParamToUrl(this.baseHrefUrl,"query",a,!0);l&&(this.resultUrl+=",",this.resultUrl+=l,t&&(this.resultUrl+=",",this.resultUrl+=t))},_updateQueryFeature_Layer:function(){this._updateUrlByQueryFeatures();this._updateQueryFeature_Field();this._updateQueryFeature_Value();
this.updateUrl()},_updateQueryFeature_Field:function(){var a=this._getFieldsFromLayerChoose(),l=[];this.queryFeature_field.removeOption(this.queryFeature_field.getOptions());k.forEach(a,d.hitch(this,function(t){-1<"esriFieldTypeString esriFieldTypeOID esriFieldTypeSmallInteger esriFieldTypeInteger esriFieldTypeSingle esriFieldTypeDouble".split(" ").indexOf(t.type)&&l.push({label:t.name,value:t.name,type:t.type})}));this.queryFeature_field.addOption(l);this._updateUrlByQueryFeatures();this._updateQueryFeature_Value();
this.updateUrl()},_updateQueryFeature_Value:function(){var a=[];if(""!==this.queryFeature_field.get("value")){for(var l=this.queryFeature_field.options,t=0,E=l.length;t<E;t++){var M=l[t];M.selected&&a.push(M)}this._query(a)}},_updateQueryFeature_Sort:function(){e.contains(this.queryFeature_sortBtn,"ASC")?n.setAttr(this.queryFeature_sortBtn,"title",this.nls.desc):n.setAttr(this.queryFeature_sortBtn,"title",this.nls.asc);e.toggle(this.queryFeature_sortBtn,"DESC");e.toggle(this.queryFeature_sortBtn,
"ASC");this._updateQueryFeature_Value()},_getSortFromBtn:function(a){e.contains(this.queryFeature_sortBtn,"DESC")&&(a+=" DESC");return[a]},_getIdFromLayerChoose:function(){var a=null,l=this.layerChooserFromMapWithDropbox.getSelectedItem();l&&l.layerInfo&&l.layerInfo.id&&(a=l.layerInfo.id);return a},_getFieldsFromLayerChoose:function(){var a=[],l=this.layerChooserFromMapWithDropbox.getSelectedItem();l&&l.layerInfo&&l.layerInfo.layerObject&&l.layerInfo.layerObject.fields&&(a=l.layerInfo.layerObject.fields);
return a},_getUrlFromLayerChoose:function(){var a="",l=this.layerChooserFromMapWithDropbox.getSelectedItem();l&&l.url&&(a=l.url);return a},_updateLinkOptionsUI:function(){h(".optionsMore",this.domNode).style("display","none");h("."+this.optionSrc+"_optionsMore",this.domNode).style("display","block");this.overwirteMobileLayout.checked&&h(".share-options-overwirteMobileLayout_optionsMore",this.domNode).style("display","block");this.setlanguage.checked&&h(".share-options-language_optionsMore",this.domNode).style("display",
"block");this.auth.checked&&h(".share-options-auth_optionsMore",this.domNode).style("display","block")},_fixUrlIfIsOnline:function(a){if(this._isOnline&&this._isSharedToPublic){var l="";l=window.isBuilder?window.top.location.protocol:window.location.protocol;var t=this._getUrlQueryString(a);a=this._getOnlinePublicUrl(a);a=l+"//"+a+"/apps/webappviewer/index.html"+t}return a},updateUrl:function(a){this._updateResUrls(a);this._updateLinkOptionsUI();!0!==this.config.useOrgUrl&&(this.resultUrl=this._fixUrlIfIsOnline(this.resultUrl));
this.preview.set("value",this.resultUrl);null===a&&this._generateShortenUrl();this._updateEmailHref()},_generateShortenUrl:function(){var a=this.preview.get("value");try{this.isUseShortenUrl()?this.shortenUrl(a,this.bitlyUrl).then(d.hitch(this,function(l){this._useShortenUrl(l);this.HAS_INIT_URL=!0}),d.hitch(this,function(l){this._useLengthenUrl(a,l);this.HAS_INIT_URL=!0})):(this._useLengthenUrl(a),this.HAS_INIT_URL=!0)}catch(l){console.error(l),this.HAS_INIT_URL=!0}},_useShortenUrl:function(a){this.shortenedUrl=
a;this._setLinkUrl(a);this._setEmbedCode(a)},_useLengthenUrl:function(a){a=a||"";this._setLinkUrl(a);this._setEmbedCode(a)},_toFacebook:function(){var a="http://www.facebook.com/sharer/sharer.php?u\x3d"+encodeURIComponent(this._linkUrlTextBox.get("value"))+"\x26t\x3d"+encodeURIComponent(p.stripHTML(this.socialNetworkTitle(this._appTitle)));window.open(a,"","toolbar\x3d0,status\x3d0,width\x3d626,height\x3d436")},_toFacebookKeyDown:function(a){a.keyCode===r.ENTER&&this._toFacebook()},_toTwitter:function(){var a=
A.substitute(this.share.shareTwitterTxt,{appTitle:p.stripHTML(this._appTitle)}),l=this._linkUrlTextBox.get("value");window.open("http://twitter.com/home?status\x3d"+encodeURIComponent(a+l+"\n@ArcGISOnline"),"","toolbar\x3d0,status\x3d0,width\x3d626,height\x3d436")},_toTwitterKeyDown:function(a){a.keyCode===r.ENTER&&this._toTwitter()},_updateEmailHref:function(){var a="mailto:?subject\x3d"+A.substitute(this.share.shareEmailSubject,{appTitle:p.stripHTML(this._appTitle)}),l=this.preview.get("value");
a+="\x26body\x3d"+encodeURIComponent(this.nls.shareEmailTxt1)+"%0D%0A%0D%0A"+p.stripHTML(this._appTitle);a+="%0D%0A"+encodeURIComponent(l);a+="%0D%0A%0D%0A"+encodeURIComponent(this.nls.shareEmailTxt2);a+="%0D%0A%0D%0A"+encodeURIComponent(this.nls.shareEmailTxt3);n.setAttr(this.emailShare,"href",a)},_toGooglePlus:function(){var a=this._linkUrlTextBox.get("value");a="http://plus.google.com/share?url\x3d"+encodeURIComponent(a);window.open(a,"","toolbar\x3d0,status\x3d0,width\x3d626,height\x3d436")},
_toGooglePlusKeyDown:function(a){a.keyCode===r.ENTER&&this._toGooglePlus()},_toggleLinkOptions:function(){v.enableWebMapPopup(this.map);var a=h(".shareOptionsWrapper",this.domNode.parentNode||this.domNode.parentElement),l=h(".shareUrlsWrapper",this.domNode),t=h(".shareLinkOptionsWrapper",this.domNode);this._isShareLinkOptionsShow()?(f.publish("ShareLink/onHideLinkOptions"),this._cleanMarkerStatus(),this._generateShortenUrl()):f.publish("ShareLink/onShowLinkOptions");a&&a[0]&&e.toggle(a[0],"displaynone");
e.toggle(l[0],"displaynone");e.toggle(t[0],"displaynone")},_toggleLinkOptionsKeydown:function(a){if(a.keyCode===r.ENTER&&(this._toggleLinkOptions(),this._isShareLinkOptionsShow())){a=h(".shareRadios input",this.shareOptionsRadios);for(var l=0,t=a.length;l<t;l++){var E=a[l];E.checked&&E.focus()}}},_moreOptionsExpandCollapse:function(){e.toggle(this.MoreOptionsContainer,"displaynone");e.toggle(this.MoreOptionsIcon,"rotate")},_moreOptionsExpandCollapseKeyDown:function(a){a.keyCode===r.ENTER&&(this._moreOptionsExpandCollapse(),
n.hasClass(this.MoreOptionsContainer,"displaynone")||this._sizeOptions.focus())},_setInputsClicktoSelect:function(a){y.set(a,"onclick","this.select()");y.set(a,"onmouseup","return false;");y.set(a,"onfocus","this.select()");y.set(a,"onblur","return false;")},isUseShortenUrl:function(){return location.hostname.endWith("esri.com")||location.hostname.endWith("arcgis.com")?!0:!1},shortenUrl:function(a,l){var t=new D;a=v.addQueryParamToUrl(l,"longUrl",a,!0);a=v.addQueryParamToUrl(a,"format","json",!0);
L({url:a,handleAs:"json",callbackParamName:"callback"}).then(d.hitch(this,function(E){E&&200===E.status_code&&E.data&&E.data.url&&0<E.data.url.length?t.resolve(E.data.url):t.reject(E)}),d.hitch(this,function(E){console.log("can't fetch shortenUrl "+E);t.reject(E)}));return t},socialNetworkTitle:function(a){100<a.length&&(a=a.substring(0,97)+"...");return a},getMapExtent:function(a){a=a.extent;var l="";a.spatialReference.wkid?l=a.spatialReference.wkid:!a.spatialReference.wkid&&a.spatialReference.wkt&&
(l="wkt\x3d"+a.spatialReference.wkt);return null!==a?this._roundValue(a.xmin,1E4)+","+this._roundValue(a.ymin,1E4)+","+this._roundValue(a.xmax,1E4)+","+this._roundValue(a.ymax,1E4)+","+l:""},_roundValue:function(a,l){return Math.round(a*l)/l},getMapCenter:function(a,l,t,E){t=t?t:",";var M=null;l&&l.x&&l.y?M=l:a.extent.getCenter()&&(M=a.extent.getCenter());a=E||M.spatialReference.wkid;return null!==M?this._roundValue(M.x,1E4)+t+this._roundValue(M.y,1E4)+t+a:""},_getMapLevel:function(){return this.map.getLevel()},
_getMapScale:function(){return this.map.getScale()},_getWkid:function(){return this.addMarker_spatialReference.get("value")||""},_getQueryedValues:function(a,l){var t=[];k.forEach(l.features,d.hitch(this,function(E){E=E.attributes[a]+"";t.push({label:E,value:E})}));return t},_addGraphicsLayer:function(){window.isBuilder||"undefined"!==typeof this._graphicsLayer||(this.map.getLayer("marker-feature-action-layer")?this._graphicsLayer=this.map.getLayer("marker-feature-action-layer"):(this._graphicsLayer=
new V({id:"marker-feature-action-layer"}),this.map.addLayer(this._graphicsLayer)))},_removeGraphicsLayer:function(){window.isBuilder||"undefined"===typeof this._graphicsLayer||(this.map.infoWindow&&this.map.infoWindow.features&&this.map.infoWindow.features[0]===this._markerGraphic&&this.map.infoWindow.hide(),this._markerGraphic&&this._markerGraphic._textSymbol&&this._graphicsLayer.remove(this._markerGraphic._textSymbol),this._graphicsLayer.remove(this._markerGraphic),this._markerGraphic=null)},_addGraphicsLayerMarker:function(a){if(!window.isBuilder&&
"undefined"!==typeof this._graphicsLayer)if("addMarker"!==this.optionSrc)this._markerGraphic=this._getMarkerGraphic(a.mapPoint),this._graphicsLayer.add(this._markerGraphic);else{var l=new K("",this.addMarker_title.get("value")||""),t=P.fromJson({type:"esriPMS",url:require.toUrl("jimu")+"/images/EsriBluePinCircle26.png",contentType:"image/png"});t.width=26;t.height=26;t.setOffset(0,12);this._markerGraphic=new S(a.mapPoint,t,null,l);this._graphicsLayer.add(this._markerGraphic);if(l=P.fromJson({color:[0,
0,0,255],type:"esriTS",verticalAlignment:"baseline",horizontalAlignment:"left",angle:0,xoffset:0,yoffset:0,rotated:!1,kerning:!0,font:{size:12,style:"normal",weight:"bold",family:"Arial"},text:this.addMarker_label.get("value")||""}))l.xoffset=t.width/2,l.yoffset=t.height/2+t.yoffset,a=new S(a.mapPoint,l),this._graphicsLayer.add(a),this._markerGraphic._textSymbol=a}},_getMarkerGraphic:function(a){var l=new U(require.toUrl("jimu")+"/images/EsriBluePinCircle26.png",26,26);l.setOffset(0,12);return new S(a,
l)},_unselectMarkerBtn:function(){for(var a=h(".markers",this.domNode),l=0,t=a.length;l<t;l++)e.remove(a[l],"selected")},_selectMarkerBtn:function(a){e.add(a.srcElement||a.target,"selected")},_cleanMarkerStatus:function(){this._mapClickHandler&&this._mapClickHandler.remove&&this._mapClickHandler.remove();this._unselectMarkerBtn();this._removeGraphicsLayer()},_isShareLinkOptionsShow:function(){var a=h(".shareLinkOptionsWrapper",this.domNode);return!e.contains(a[0],"displaynone")},_getUrlQueryString:function(a){var l=
"";-1!==a.indexOf("?")&&(l=a.substring(a.indexOf("?")));return l},_getOnlinePublicUrl:function(){var a="www.arcgis.com",l=this._portalUrl;l&&"string"===typeof l&&(-1<l.indexOf("devext.arcgis.com")?a="devext.arcgis.com":-1<l.indexOf("qaext.arcgis.com")&&(a="qaext.arcgis.com"));return a},_watchLayerChange:function(){this.setLayerVisibility.checked&&this.updateUrl()},_query:function(a){if(a&&a[0]){a=a[0];var l=this._getFieldShortType(a),t=this.layerChooserFromMapWithDropbox.getSelectedItem(),E=t.layerInfo.id,
M=t.url,b={logicalOperator:"AND",parts:[{fieldObj:{name:a.value,label:a.label,dateFormat:"",shortType:l,type:a.type},operator:l+"OperatorIs",valueObj:{isValid:!0,type:"unique",value:null},interactiveObj:{prompt:"...",hint:"",cascade:"none"}}],expr:"",displaySQL:""};(a=this.layerInfosObj.getLayerInfoById(E))&&a.getLayerObject().then(d.hitch(this,function(c){var w=d.clone(b);w.wId=this.id+"_"+c.id+"_"+n.getAttr(this.queryFeature_valueFilter,"data-index");this.queryFeature_valueFilter.filterParams.build(M,
c,w,E,this.id);this.queryFeature_valueFilter.expr=this.queryFeature_valueFilter.filterParams.getFilterExpr()}));this._updateUrlByQueryFeatures();this.updateUrl()}},_getFieldShortType:function(a){return"esriFieldTypeString"===a.type?"string":"number"},_getQueryFeatureFilterValue:function(){var a="";this.queryFeature_valueFilter.filterParams.partsObj&&this.queryFeature_valueFilter.filterParams.getValueProviders()[0].getValueObject()&&(a=this.queryFeature_valueFilter.filterParams.getValueProviders()[0].getValueObject().value,
a.toFixed&&(a=a.toString()));return a}})})},"jimu/dijit/FeaturelayerChooserFromMap":function(){define(["dojo/_base/declare","dojo/Deferred","dojo/_base/html","dojo/_base/lang","./LayerChooserFromMap"],function(u,F,I,B,d){return u([d],{baseClass:"jimu-featurelayer-chooser-from-map",declaredClass:"jimu.dijit.FeaturelayerChooserFromMap",types:null,showLayerFromFeatureSet:!1,showTable:!1,onlyShowVisible:!1,ignoredFeaturelayerIds:null,mustSupportStatistics:!1,ignoreVirtualLayer:!1,postMixInProperties:function(){this.inherited(arguments);
this.ignoredFeaturelayerIds||(this.ignoredFeaturelayerIds=[]);this.basicFilter=B.hitch(this,this.basicFilter);this.filter=d.createFeaturelayerFilter(this.types,this.showLayerFromFeatureSet,this.showTable,this.mustSupportStatistics);this.ignoreVirtualLayer&&(this.filter=d.andCombineFilters([this.filter,B.hitch(this,this._ignoreVirtualLayerFilter)]))},postCreate:function(){this.inherited(arguments);I.addClass(this.domNode,"jimu-basic-layer-chooser-from-map")},_ignoreVirtualLayerFilter:function(k){return k.getLayerType().then(function(e){return!("ArcGISDynamicMapServiceLayer"===
e||"ArcGISTiledMapServiceLayer"===e||"GroupLayer"===e)})},basicFilter:function(k){var e=new F;0<=this.ignoredFeaturelayerIds.indexOf(k.id)?e.resolve(!1):this.onlyShowVisible&&"Table"!==k.getLayerType()?e.resolve(k.isShowInMap()):e.resolve(!0);return e},getHandledItem:function(k){var e=this.inherited(arguments),n=k&&k.layerInfo;n=n&&n.layerObject;e.url=n&&n.url||"";return e}})})},"jimu/dijit/LayerChooserFromMap":function(){define("dojo/on dojo/Evented dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/store/Memory dojo/Deferred dojo/store/Observable dijit/tree/ObjectStoreModel dojo/promise/all dojo/_base/lang dojo/_base/html dojo/_base/array jimu/utils jimu/dijit/_Tree jimu/LayerInfos/LayerInfos jimu/dijit/LoadingIndicator".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C,f,h,p,v,G,Q,x){var A=I([B,d,k,F],{templateString:'\x3cdiv style\x3d"width:100%;"\x3e\x3cdiv data-dojo-attach-point\x3d"errorTipSection" class\x3d"error-tip-section"\x3e\x3cspan class\x3d"jimu-icon jimu-icon-error"\x3e\x3c/span\x3e\x3cspan class\x3d"jimu-state-error-text" data-dojo-attach-point\x3d"errTip"\x3e${nls.noLayersTip}\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e',_store:null,_id:0,_treeClass:"layer-chooser-tree",createMapResponse:null,multiple:!1,onlyShowVisible:!1,
updateWhenLayerInfosIsShowInMapChanged:!1,onlyShowWebMapLayers:!1,displayTooltipForTreeNode:!1,onlyFilterCurrentLayerWhenAddItem:!1,postMixInProperties:function(){this.nls=window.jimuNls.basicLayerChooserFromMap},postCreate:function(){this.inherited(arguments);h.addClass(this.domNode,"jimu-basic-layer-chooser-from-map");this.multiple=!!this.multiple;this.shelter=new x({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup();this._createTree();this.basicFilter=f.hitch(this,this.basicFilter);
this.filter=A.andCombineFilters([this.basicFilter,this.filter]);this.createMapResponse&&this.setCreateMapResponse(this.createMapResponse)},basicFilter:function(m){var q=new n;this.onlyShowVisible?q.resolve(m.isShowInMap()):q.resolve(!0);return q},filter:function(m){m=new n;m.resolve(!0);return m},getSelectedItems:function(){var m=this.tree.getSelectedItems();return p.map(m,f.hitch(this,function(q){return this.getHandledItem(q)}))},getAllItems:function(){var m=this.tree.getAllItems(),q=[];p.forEach(m,
f.hitch(this,function(y){"root"!==y.id&&(y=this.getHandledItem(y),q.push(y))}));return q},getHandledItem:function(m){return{name:m.name,layerInfo:m.layerInfo}},_isLeafItem:function(m){return m.isLeaf},setCreateMapResponse:function(m){this.createMapResponse=m;Q.getInstance(this.createMapResponse.map,this.createMapResponse.itemInfo).then(f.hitch(this,function(q){this.layerInfosObj=q;this.own(u(this.layerInfosObj,"layerInfosChanged",f.hitch(this,this._onLayerInfosChanged)));this.updateWhenLayerInfosIsShowInMapChanged&&
this.own(u(this.layerInfosObj,"layerInfosIsShowInMapChanged",f.hitch(this,this._onLayerInfosIsShowInMapChanged)));this._buildTree(this.layerInfosObj)}))},_onLayerInfosChanged:function(m,q){this._buildTree(this.layerInfosObj);this.emit("update")},_onLayerInfosIsShowInMapChanged:function(m){this._buildTree(this.layerInfosObj);this.emit("update")},_buildTree:function(m){this._clear();h.setStyle(this.errorTipSection,"display","block");var q=[];this.onlyShowWebMapLayers?(q=m.getLayerInfoArrayOfWebmap(),
q=q.concat(m.getTableInfoArrayOfWebmap())):(q=m.getLayerInfoArray(),q=q.concat(m.getTableInfoArray()));0!==q.length&&(h.setStyle(this.errorTipSection,"display","none"),p.forEach(q,f.hitch(this,function(y){this._addDirectLayerInfo(y)})))},_addDirectLayerInfo:function(m){m&&m.getLayerObject().then(f.hitch(this,function(){this._addItem("root",m)}),f.hitch(this,function(q){console.error(q)}))},_clear:function(){var m=this._store.query({parent:"root"});p.forEach(m,f.hitch(this,function(q){q&&"root"!==
q.id&&this._store.remove(q.id)}))},_addItem:function(m,q){var y=null,D=q.getLayerType(),L=this.filter(q);C({layerType:D,valid:L}).then(f.hitch(this,function(J){if(J.valid){var P=f.hitch(this,function(S,V){this._id++;y={name:q.title||"",parent:m,layerInfo:q,type:J.layerType,layerClass:q.layerObject.declaredClass,id:this._id.toString(),isLeaf:S,hasChildren:V};this._store.add(y)}),K=q.getSubLayers(),N=0===K.length,U=!0;this.onlyFilterCurrentLayerWhenAddItem?(N&&(U=!1),P(N,U)):N?P(N,!1):(K=p.map(K,f.hitch(this,
function(S){return this.filter(S)})),C(K).then(f.hitch(this,function(S){(S=p.some(S,function(V){return V}))&&P(N,S)})))}}))},_getRootItem:function(){return{id:"root",name:"Map Root",type:"root",isLeaf:!1,hasChildren:!0}},_createTree:function(){var m=this._getRootItem();m=new e({data:[m],getChildren:function(q){return this.query({parent:q.id})}});this._store=new g(m);m=new r({store:this._store,query:{id:"root"},mayHaveChildren:f.hitch(this,this._mayHaveChildren)});this.tree=new G({multiple:this.multiple,
model:m,showRoot:!1,isLeafItem:f.hitch(this,this._isLeafItem),style:{width:"100%"},onOpen:f.hitch(this,function(q,y){"root"!==q.id&&this._onTreeOpen(q,y)}),onClick:f.hitch(this,function(q,y,D){this._onTreeClick(q,y,D);this.emit("tree-click",q,y,D)}),getIconStyle:f.hitch(this,function(q,y){var D=null;if(!q||"root"===q.id)return null;var L={width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundImage:""},J=window.location.protocol+"//"+window.location.host+
require.toUrl("jimu");if(q=this._getIconInfo(q,y).imageName)L.backgroundImage="url("+J+"/css/images/"+q+")",D=L;return D}),getIconClass:f.hitch(this,function(q,y){return this._getIconInfo(q,y).className}),getTooltip:f.hitch(this,function(q){return this.displayTooltipForTreeNode?q.layerInfo.title:""})});h.addClass(this.tree.domNode,this._treeClass);this.tree.placeAt(this.shelter.domNode,"before")},_mayHaveChildren:function(m){return m.hasChildren},_getIconInfo:function(m,q){var y="",D="";"ArcGISDynamicMapServiceLayer"===
m.type||"ArcGISTiledMapServiceLayer"===m.type?q?(y="mapserver_open.png",D="mapservice-layer-icon open"):(y="mapserver_close.png",D="mapservice-layer-icon close"):"GroupLayer"===m.type?q?(y="group_layer2.png",D="group-layer-icon open"):(y="group_layer1.png",D="group-layer-icon close"):"FeatureLayer"===m.type?(m=v.getTypeByGeometryType(m.layerInfo.layerObject.geometryType),"point"===m?(y="point_layer1.png",D="point-layer-icon"):"polyline"===m?(y="line_layer1.png",D="line-layer-icon"):"polygon"===m&&
(y="polygon_layer1.png",D="polygon-layer-icon")):"Table"===m.type?(y="table.png",D="table-icon"):"ArcGISImageServiceLayer"===m.type||"ArcGISImageServiceVectorLayer"===m.type?(y="image_layer.png",D="iamge-layer-icon"):q?(y="mapserver_open.png",D="mapservice-layer-icon open"):(y="mapserver_close.png",D="mapservice-layer-icon close");return{imageName:y,className:D}},_onTreeOpen:function(m,q){if("root"!==m.id){var y=[];q=[];y=m.layerInfo.getSubLayers();m.checked||(this.shelter.show(),q=p.map(y,f.hitch(this,
function(D){return D.getLayerObject()})),C(q).then(f.hitch(this,function(){this.domNode&&(p.forEach(y,f.hitch(this,function(D){this._addItem(m.id,D)})),m.checked=!0,this.shelter.hide())}),f.hitch(this,function(D){console.error(D);this.shelter.hide()})))}},_onTreeClick:function(m,q,y){},destroy:function(){this.shelter&&(this.shelter.destroy(),this.shelter=null);this.tree&&this.tree.destroy();this.inherited(arguments)}});A.createFilterByLayerType=function(m){f.isArrayLike(m)||(m=[]);return function(q){var y=
new n;if(0===m.length)y.resolve(!0);else{var D=[];q.traversal(function(L){D.push(L.getLayerType())});C(D).then(function(L){for(var J=0;J<L.length;J++)for(var P=0;P<m.length;P++)if(L[J]===m[P]){y.resolve(!0);return}y.resolve(!1)},function(L){console.error(L);y.reject(L)})}return y}};A.createFeaturelayerFilter=function(m,q,y,D){var L=["point","polyline","polygon"];m&&0<m.length?(m=p.filter(m,function(J){return 0<=L.indexOf(J)}),0===m.length&&(m=L)):m=L;return function(J){var P=J.getLayerType();J=J.getLayerObject();
return C({layerType:P,layerObject:J}).then(function(K){var N=K.layerType;K=K.layerObject;if("ArcGISDynamicMapServiceLayer"===N||"ArcGISTiledMapServiceLayer"===N||"GroupLayer"===N||"FeatureCollection"===N)return!0;if("FeatureLayer"===N){N=v.getTypeByGeometryType(K.geometryType);N=0<=p.indexOf(m,N);var U=A._shouldPassStatisticsCheck(D,K);return K.url?(K=v.isFeaturelayerUrlSupportQuery(K.url,K.capabilities),N&&K&&U):q&&N}return"Table"===N?(N=v.isFeaturelayerUrlSupportQuery(K.url,K.capabilities),K=A._shouldPassStatisticsCheck(D,
K),y&&N&&K):!1})}};A.createImageServiceLayerFilter=function(m,q){return function(y){var D=y.getLayerType();y=y.getLayerObject();return C({layerType:D,layerObject:y}).then(function(L){var J=L.layerType,P=L.layerObject;return"ArcGISImageServiceLayer"===J||"ArcGISImageServiceVectorLayer"===J?m?v.isImageServiceSupportQuery(L.layerObject.capabilities)?q?A._shouldPassStatisticsCheck(q,P):!0:!1:!0:!1})}};A._shouldPassStatisticsCheck=function(m,q){return m?(m=!1,m=q.advancedQueryCapabilities?!!q.advancedQueryCapabilities.supportsStatistics:
!!q.supportsStatistics):!0};A.createQueryableLayerFilter=function(m){var q=A.createFeaturelayerFilter(["point","polyline","polygon"],!1,!0,m);m=A.createImageServiceLayerFilter(!0,m);return A.orCombineFilters([q,m])};A.andCombineFilters=function(m){return A._combineFilters(m,!0)};A.orCombineFilters=function(m){return A._combineFilters(m,!1)};A._combineFilters=function(m,q){return function(y){var D=new n,L=p.map(m,function(J){return J(y)});C(L).then(function(J){var P=!1;P=q?p.every(J,function(K){return K}):
p.some(J,function(K){return K});D.resolve(P)},function(J){console.error(J);D.reject(J)});return D}};return A})},"dijit/tree/ObjectStoreModel":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/_base/lang dojo/when ../Destroyable".split(" "),function(u,F,I,B,d,k,e){return I("dijit.tree.ObjectStoreModel",e,{store:null,labelAttr:"name",labelType:"text",root:null,query:null,constructor:function(n){d.mixin(this,n);this.childrenCache={}},getRoot:function(n,g){if(this.root)n(this.root);
else{var r=this.store.query(this.query);r.then&&this.own(r);k(r,d.hitch(this,function(C){if(1!=C.length)throw Error("dijit.tree.ObjectStoreModel: root query returned "+C.length+" items, but must return exactly one");this.root=C[0];n(this.root);r.observe&&r.observe(d.hitch(this,function(f){this.onChange(f)}),!0)}),g)}},mayHaveChildren:function(){return!0},getChildren:function(n,g,r){var C=this.store.getIdentity(n);if(this.childrenCache[C])k(this.childrenCache[C],g,r);else{var f=this.childrenCache[C]=
this.store.getChildren(n);f.then&&this.own(f);f.observe&&this.own(f.observe(d.hitch(this,function(h,p,v){this.onChange(h);p!=v&&k(f,d.hitch(this,"onChildrenChange",n))}),!0));k(f,g,r)}},isItem:function(){return!0},getIdentity:function(n){return this.store.getIdentity(n)},getLabel:function(n){return n[this.labelAttr]},newItem:function(n,g,r,C){return this.store.put(n,{parent:g,before:C})},pasteItem:function(n,g,r,C,f,h){var p=new B;if(g===r&&!C&&!h)return p.resolve(!0),p;g&&!C?this.getChildren(g,d.hitch(this,
function(v){v=[].concat(v);var G=u.indexOf(v,n);v.splice(G,1);this.onChildrenChange(g,v);p.resolve(this.store.put(n,{overwrite:!0,parent:r,oldParent:g,before:h,isCopy:!1}))})):p.resolve(this.store.put(n,{overwrite:!0,parent:r,oldParent:g,before:h,isCopy:!0}));return p},onChange:function(){},onChildrenChange:function(){},onDelete:function(){}})})},"jimu/dijit/_Tree":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/_TreeNode.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/_base/event dojo/query dojo/aspect dojo/on dojo/keys dojo/Evented dijit/registry dijit/Tree jimu/utils".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C,f,h,p,v,G){var Q=u([v._TreeNode,h],{templateString:B,declaredClass:"jimu._TreeNode",isLeaf:!1,groupId:"",postCreate:function(){this.inherited(arguments);k.addClass(this.domNode,"jimu-tree-node");this.isLeaf=!!this.isLeaf;this.groupId?(this.checkNode=k.toDom('\x3cinput type\x3d"radio" /\x3e'),this.checkNode.name=this.groupId):this.checkNode=k.toDom('\x3cinput type\x3d"checkbox" /\x3e');k.addClass(this.checkNode,"jimu-tree-check-node");k.place(this.checkNode,this.contentNode,
"first");this.own(C(this.checkNode,"click",d.hitch(this,this._onClick)));this.own(C(this.rowNode,"keydown",d.hitch(this,function(x,A){A.target=x;A.keyCode!==f.ENTER&&A.keyCode!==f.SPACE||this._onClick(A)},this.checkNode)));this.isLeaf?this.groupId?k.setStyle(this.checkNode,"display","none"):k.setStyle(this.checkNode,"display","inline"):k.setStyle(this.checkNode,"display","none");this.isLeaf?k.addClass(this.domNode,"jimu-tree-leaf-node"):k.addClass(this.domNode,"jimu-tree-not-leaf-node")},select:function(){this.isLeaf&&
(this.checkNode.checked=!0,k.addClass(this.domNode,"jimu-tree-selected-leaf-node"))},unselect:function(){this.isLeaf&&(this.checkNode.checked=!1,k.removeClass(this.domNode,"jimu-tree-selected-leaf-node"))},toggleSelect:function(){this.isLeaf&&(this.checkNode.checked?this.unselect():this.select())},_onClick:function(x){(x.target||x.srcElement)===this.checkNode?this.tree._onCheckNodeClick(this,this.checkNode.checked,x):this.tree._onClick(this,x)},_onChange:function(){this.isLeaf&&setTimeout(d.hitch(this,
function(){this.checkNode.checked?this.emit("tn-select",this):this.emit("tn-unselect",this)}),100)},destroy:function(){delete this.tree;this.inherited(arguments)}});return u([v,h],{declaredClass:"jimu._Tree",openOnClick:!0,multiple:!0,uniqueId:"",showRoot:!1,postMixInProperties:function(){this.inherited(arguments);this.uniqueId="tree_"+G.getRandomString()},postCreate:function(){this.inherited(arguments);k.addClass(this.domNode,"jimu-tree");this.own(r.before(this,"onClick",d.hitch(this,this._jimuBeforeClick)));
this.rootLoadingIndicator&&k.setStyle(this.rootLoadingIndicator,"display","none");this.dndController.singular=!0;k.setAttr(this.domNode,"tabindex",0)},removeItem:function(x){this.model.store.remove(x)},getAllItems:function(){var x=this.getAllTreeNodeWidgets();return e.map(x,d.hitch(this,function(A){var m=A.item;m.selected=A.checkNode.checked;return m}))},getSelectedItems:function(){var x=this.getAllTreeNodeWidgets();x=e.filter(x,d.hitch(this,function(A){return A.checkNode.checked}));return e.map(x,
d.hitch(this,function(A){return A.item}))},getFilteredItems:function(x){var A=this.getAllTreeNodeWidgets();A=e.map(A,d.hitch(this,function(m){var q=m.item;q.selected=m.checkNode.checked;return q}));return e.filter(A,d.hitch(this,function(m){return x(m)}))},getTreeNodeByItemId:function(x){for(var A=this._getAllTreeNodeDoms(),m=0;m<A.length;m++){var q=p.byNode(A[m]);if(q.item.id.toString()===x.toString())return q}return null},selectItem:function(x){(x=this.getTreeNodeByItemId(x))&&x.isLeaf&&this.selectNodeWidget(x)},
unselectItem:function(x){(x=this.getTreeNodeByItemId(x))&&x.isLeaf&&x.unselect()},getAllLeafTreeNodeWidgets:function(){var x=this.getAllTreeNodeWidgets();return e.filter(x,d.hitch(this,function(A){return A.isLeaf}))},getAllTreeNodeWidgets:function(){var x=this._getAllTreeNodeDoms();return e.map(x,d.hitch(this,function(A){return p.byNode(A)}))},isLeafItem:function(x){return x&&x.isLeaf},_getAllTreeNodeDoms:function(){return g(".dijitTreeNode",this.domNode)},_createTreeNode:function(x){x.isLeaf=this.isLeafItem(x.item);
this.multiple||(x.groupId=this.uniqueId);return new Q(x)},_onTreeNodeSelect:function(x){this.emit("item-select",{item:x.item,treeNode:x})},_onTreeNodeUnselect:function(x){this.emit("item-unselect",{item:x.item,treeNode:x})},selectNodeWidget:function(x){this.multiple||this.unselectAllLeafNodeWidgets();x.select()},_jimuBeforeClick:function(x,A,m){A.isLeaf&&(k.hasClass(m.target||m.srcElement,"jimu-tree-check-node")||(this.multiple?A.toggleSelect():this.selectNodeWidget(A)));return arguments},_onCheckNodeClick:function(x,
A,m){!this.multiple&&A&&this.unselectAllLeafNodeWidgets();n.stop(m);this.focusNode(x);setTimeout(d.hitch(this,function(){A?this.selectNodeWidget(x):x.unselect();this.onClick(x.item,x,m)}),0)},unselectAllLeafNodeWidgets:function(){var x=this.getAllLeafTreeNodeWidgets();e.forEach(x,d.hitch(this,function(A){A.unselect()}))}})})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C,f,h,p,v,G,Q,x,A,m,q,y,D,L,J,P,K,N,U,S,V,aa,ca,a,l){function t(b){return G.delegate(b.promise||b,{addCallback:function(c){this.then(c)},addErrback:function(c){this.otherwise(c)}})}var E=B("dijit._TreeNode",[J,P,K,N,U],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(b){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=b;this._set("label",b);h("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:V,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&this.labelNode.setAttribute("aria-expanded",this.isExpanded);this.setSelected(!1)},_setIndentAttr:function(b){var c=Math.max(b,0)*this.tree._nodePixelIndent+"px";r.set(this.domNode,
"backgroundPosition",c+" 0px");r.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);u.forEach(this.getChildren(),function(w){w.set("indent",b+1)});this._set("indent",b)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(b){var c=this.tree,w=c.model;c._v10Compat&&b===w.root&&(b=null);this._applyClassAndStyle(b,"icon","Icon");this._applyClassAndStyle(b,"label","Label");this._applyClassAndStyle(b,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(b,c,w){var z="_"+c+"Class";c+="Node";var H=this[z];this[z]=this.tree["get"+w+"Class"](b,this.isExpanded);n.replace(this[c],this[z]||"",H||"");r.set(this[c],this.tree["get"+w+"Style"](b,this.isExpanded)||{})},_updateLayout:function(){var b=this.getParent();b=!b||!b.rowNode||"none"==b.rowNode.style.display;n.toggle(this.domNode,"dijitTreeIsRoot",b);n.toggle(this.domNode,"dijitTreeIsLast",!b&&!this.getNextSibling())},_setExpando:function(b){var c=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];b=b?0:this.isExpandable?this.isExpanded?1:2:3;n.replace(this.expandoNode,c[b],c);this.expandoNodeText.innerHTML=["*","-","+","*"][b]},expand:function(){if(this._expandDeferred)return t(this._expandDeferred);this._collapseDeferred&&(this._collapseDeferred.cancel(),delete this._collapseDeferred);this.isExpanded=!0;this.labelNode.setAttribute("aria-expanded","true");(this.tree.showRoot||this!==this.tree.rootNode)&&
this.containerNode.setAttribute("role","group");n.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","true");var b=f.wipeIn({node:this.containerNode,duration:L.defaultDuration}),c=this._expandDeferred=new d(function(){b.stop()});F.after(b,"onEnd",function(){c.resolve(!0)},!0);b.play();return t(c)},collapse:function(){if(this._collapseDeferred)return t(this._collapseDeferred);
this._expandDeferred&&(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;this.labelNode.setAttribute("aria-expanded","false");this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","false");n.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var b=f.wipeOut({node:this.containerNode,duration:L.defaultDuration}),c=this._collapseDeferred=new d(function(){b.stop()});F.after(b,"onEnd",
function(){c.resolve(!0)},!0);b.play();return t(c)},indent:0,setChildItems:function(b){var c=this.tree,w=c.model,z=[],H=c.focusedChild,X=this.getChildren();u.forEach(X,function(O){K.prototype.removeChild.call(this,O)},this);this.defer(function(){u.forEach(X,function(O){if(!O._destroyed&&!O.getParent()){c.dndController.removeTreeNode(O);(function da(R){var Y=w.getIdentity(R.item),ba=c._itemNodesMap[Y];1==ba.length?delete c._itemNodesMap[Y]:(Y=u.indexOf(ba,R),-1!=Y&&ba.splice(Y,1));u.forEach(R.getChildren(),
da)})(O);if(c.persist){var W=u.map(O.getTreePath(),function(R){return c.model.getIdentity(R)}).join("/"),T;for(T in c._openedNodes)T.substr(0,W.length)==W&&delete c._openedNodes[T];c._saveExpandedNodes()}c.lastFocusedChild&&!e.isDescendant(c.lastFocusedChild.domNode,c.domNode)&&delete c.lastFocusedChild;H&&!e.isDescendant(H.domNode,c.domNode)&&c.focus();O.destroyRecursive()}})});this.state="Loaded";b&&0<b.length?(this.isExpandable=!0,u.forEach(b,function(O){var W=w.getIdentity(O),T=c._itemNodesMap[W];
if(T)for(var Z=0;Z<T.length;Z++)if(T[Z]&&!T[Z].getParent()){var R=T[Z];R.set("indent",this.indent+1);break}R||(R=this.tree._createTreeNode({item:O,tree:c,isExpandable:w.mayHaveChildren(O),label:c.getLabel(O),labelType:c.model&&c.model.labelType||"text",tooltip:c.getTooltip(O),ownerDocument:c.ownerDocument,dir:c.dir,lang:c.lang,textDir:c.textDir,indent:this.indent+1}),T?T.push(R):c._itemNodesMap[W]=[R]);this.addChild(R);(this.tree.autoExpand||this.tree._state(R))&&z.push(c._expandNode(R))},this),u.forEach(this.getChildren(),
function(O){O._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);b=k(z);this.tree._startPaint(b);return t(b)},getTreePath:function(){for(var b=this,c=[];b&&b!==this.tree.rootNode;)c.unshift(b.item),b=b.getParent();c.unshift(this.tree.rootNode.item);return c},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(b){this.inherited(arguments);var c=this.getChildren();0==c.length&&(this.isExpandable=!1,
this.collapse());u.forEach(c,function(w){w._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(b){this.labelNode.setAttribute("aria-selected",b?"true":"false");n.toggle(this.rowNode,"dijitTreeRowSelected",b)},focus:function(){y.focus(this.focusNode)}});h("dojo-bidi")&&E.extend({_setTextDirAttr:function(b){!b||this.textDir==b&&this._created||(this._set("textDir",b),this.applyTextDir(this.labelNode),u.forEach(this.getChildren(),function(c){c.set("textDir",
b)},this))}});var M=B("dijit.Tree",[J,S,P,U],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:aa,persist:!1,autoExpand:!1,dndController:l,dndParams:"onDndDrop itemCreator onDndCancel checkAcceptance checkItemAcceptance dragThreshold betweenThreshold".split(" "),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,
dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(b,c){x.publish(this.id,G.mixin({tree:this,event:b},c||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new d;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var b=this;this.own(Q(this.containerNode,
Q.selector(".dijitTreeNode",A.enter),function(z){b._onNodeMouseEnter(D.byNode(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeNode",A.leave),function(z){b._onNodeMouseLeave(D.byNode(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow",q.press),function(z){b._onNodePress(D.getEnclosingWidget(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow",q),function(z){b._onClick(D.getEnclosingWidget(this),z)}),Q(this.containerNode,Q.selector(".dijitTreeRow","dblclick"),function(z){b._onDblClick(D.getEnclosingWidget(this),
z)}));this.model||this._store2model();this.own(F.after(this.model,"onChange",G.hitch(this,"_onItemChange"),!0),F.after(this.model,"onChildrenChange",G.hitch(this,"_onItemChildrenChange"),!0),F.after(this.model,"onDelete",G.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){G.isString(this.dndController)&&(this.dndController=G.getObject(this.dndController));for(var c={},w=0;w<this.dndParams.length;w++)this[this.dndParams[w]]&&(c[this.dndParams[w]]=this[this.dndParams[w]]);
this.dndController=new this.dndController(this,c)}this._load();this.onLoadDeferred=t(this.pendingCommandsPromise);this.onLoadDeferred.then(G.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;p.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var b={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(b.mayHaveChildren=G.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&
(b.getChildren=G.hitch(this,function(c,w,z){this.getItemChildren(this._v10Compat&&c===this.model.root?null:c,w,z)}));this.model=new a(b);this.showRoot=!!this.label},onLoad:function(){},_load:function(){this.model.getRoot(G.hitch(this,function(b){var c=this.rootNode=this.tree._createTreeNode({item:b,tree:this,isExpandable:!0,label:this.label||this.getLabel(b),labelType:this.model.labelType||"text",textDir:this.textDir,indent:this.showRoot?0:-1});this.showRoot?(this.domNode.setAttribute("aria-multiselectable",
!this.dndController.singular),this.rootLoadingIndicator.style.display="none"):(c.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(c.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(c.containerNode.setAttribute("aria-labelledby",this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),
c.labelNode.setAttribute("role","presentation"),c.labelNode.removeAttribute("aria-selected"),c.containerNode.setAttribute("role","tree"),c.containerNode.setAttribute("aria-expanded","true"),c.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(c.domNode);b=this.model.getIdentity(b);this._itemNodesMap[b]?this._itemNodesMap[b].push(c):this._itemNodesMap[b]=[c];c._updateLayout();this._expandNode(c).then(G.hitch(this,function(){this._destroyed||
(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),G.hitch(this,function(b){console.error(this,": error loading root: ",b)}))},getNodesByItem:function(b){if(!b)return[];b=G.isString(b)?b:this.model.getIdentity(b);return[].concat(this._itemNodesMap[b])},_setSelectedItemAttr:function(b){this.set("selectedItems",[b])},_setSelectedItemsAttr:function(b){var c=this;return this.pendingCommandsPromise=this.pendingCommandsPromise.always(G.hitch(this,function(){var w=
u.map(b,function(H){return!H||G.isString(H)?H:c.model.getIdentity(H)}),z=[];u.forEach(w,function(H){z=z.concat(c._itemNodesMap[H]||[])});this.set("selectedNodes",z)}))},_setPathAttr:function(b){return b.length?t(this.set("paths",[b]).then(function(c){return c[0]})):t(this.set("paths",[]).then(function(c){return c[0]}))},_setPathsAttr:function(b){function c(z,H){var X=z.shift(),O=u.filter(H,function(W){return W.getIdentity()==X})[0];if(O)return z.length?w._expandNode(O).then(function(){return c(z,
O.getChildren())}):O;throw new M.PathError("Could not expand path at "+X);}var w=this;return t(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return k(u.map(b,function(z){z=u.map(z,function(H){return H&&G.isObject(H)?w.model.getIdentity(H):H});if(z.length)return c(z,[w.rootNode]);throw new M.PathError("Empty path");}))}).then(function(z){w.set("selectedNodes",z);return w.paths}))},_setSelectedNodeAttr:function(b){this.set("selectedNodes",[b])},_setSelectedNodesAttr:function(b){this.dndController.setSelection(b)},
expandAll:function(){function b(w){return c._expandNode(w).then(function(){var z=u.filter(w.getChildren()||[],function(H){return H.isExpandable});return k(u.map(z,b))})}var c=this;return t(b(this.rootNode))},collapseAll:function(){function b(w){var z=u.filter(w.getChildren()||[],function(H){return H.isExpandable});z=k(u.map(z,b));return!w.isExpanded||w==c.rootNode&&!c.showRoot?z:z.then(function(){return c._collapseNode(w)})}var c=this;return t(b(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},
getLabel:function(b){return this.model.getLabel(b)},getIconClass:function(b,c){return!b||this.model.mayHaveChildren(b)?c?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(b,c){(b=this._getNext(c))&&b.isTreeNode&&this.focusNode(b)},_onUpArrow:function(b,c){if(b=c.getPreviousSibling())for(c=b;c.isExpandable&&c.isExpanded&&
c.hasChildren();)c=c.getChildren(),c=c[c.length-1];else if(b=c.getParent(),this.showRoot||b!==this.rootNode)c=b;c&&c.isTreeNode&&this.focusNode(c)},_onRightArrow:function(b,c){c.isExpandable&&!c.isExpanded?this._expandNode(c):c.hasChildren()&&(c=c.getChildren()[0])&&c.isTreeNode&&this.focusNode(c)},_onLeftArrow:function(b,c){c.isExpandable&&c.isExpanded?this._collapseNode(c):(b=c.getParent())&&b.isTreeNode&&(this.showRoot||b!==this.rootNode)&&this.focusNode(b)},focusLastChild:function(){var b=this._getLast();
b&&b.isTreeNode&&this.focusNode(b)},_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var b=this.rootNode;b.isExpanded;){var c=b.getChildren();if(!c.length)break;b=c[c.length-1]}return b},_getNext:function(b){if(b.isExpandable&&b.isExpanded&&b.hasChildren())return b.getChildren()[0];for(;b&&b.isTreeNode;){var c=b.getNextSibling();if(c)return c;b=b.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(b,c){return e.isDescendant(b,
c.expandoNode)||e.isDescendant(b,c.expandoNodeText)},_onNodePress:function(b,c){this.focusNode(b)},__click:function(b,c,w,z){var H=this.isExpandoNode(c.target,b);b.isExpandable&&(w||H)?this._onExpandoClick({node:b}):(this._publish("execute",{item:b.item,node:b,evt:c}),this[z](b.item,b,c),this.focusNode(b));c.stopPropagation();c.preventDefault()},_onClick:function(b,c){this.__click(b,c,this.openOnClick,"onClick")},_onDblClick:function(b,c){this.__click(b,c,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(b){b=
b.node;this.focusNode(b);b.isExpanded?this._collapseNode(b):this._expandNode(b)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(b){p.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(b)},_getRootOrFirstNode:function(){p.deprecated(this.declaredClass+"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(b){b._expandNodeDeferred&&
delete b._expandNodeDeferred;if("Loading"!=b.state&&b.isExpanded){var c=b.collapse();this.onClose(b.item,b);this._state(b,!1);this._startPaint(c);return c}},_expandNode:function(b){if(b._expandNodeDeferred)return b._expandNodeDeferred;var c=this.model,w=b.item,z=this;b._loadDeferred||(b.markProcessing(),b._loadDeferred=new d,c.getChildren(w,function(H){b.unmarkProcessing();b.setChildItems(H).then(function(){b._loadDeferred.resolve(H)})},function(H){console.error(z,": error loading "+b.label+" children: ",
H);b._loadDeferred.reject(H)}));c=b._loadDeferred.then(G.hitch(this,function(){var H=b.expand();this.onOpen(b.item,b);this._state(b,!0);return H}));this._startPaint(c);return c},focusNode:function(b){for(var c=[],w=this.domNode;w&&w.tagName&&"IFRAME"!==w.tagName.toUpperCase();w=w.parentNode)c.push({domNode:w.contentWindow||w,scrollLeft:w.scrollLeft||0,scrollTop:w.scrollTop||0});this.focusChild(b);this.defer(function(){for(var z=0,H=c.length;z<H;z++)c[z].domNode.scrollLeft=c[z].scrollLeft,c[z].domNode.scrollTop=
c[z].scrollTop},0)},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(b){var c=this.model.getIdentity(b);if(c=this._itemNodesMap[c]){var w=this.getLabel(b),z=this.getTooltip(b);u.forEach(c,function(H){H.set({item:b,label:w,tooltip:z});H._updateItemClasses(b)})}},_onItemChildrenChange:function(b,c){b=this.model.getIdentity(b);(b=this._itemNodesMap[b])&&u.forEach(b,function(w){w.setChildItems(c)})},_onItemDelete:function(b){b=this.model.getIdentity(b);var c=this._itemNodesMap[b];
c&&(u.forEach(c,function(w){this.dndController.removeTreeNode(w);var z=w.getParent();z&&z.removeChild(w);this.lastFocusedChild&&!e.isDescendant(this.lastFocusedChild.domNode,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!e.isDescendant(this.focusedChild.domNode,this.domNode)&&this.focus();w.destroyRecursive()},this),delete this._itemNodesMap[b])},_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var b=I(this.cookieName);b&&u.forEach(b.split(","),function(c){this._openedNodes[c]=
!0},this)}},_state:function(b,c){if(!this.persist)return!1;var w=u.map(b.getTreePath(),function(z){return this.model.getIdentity(z)},this).join("/");if(1===arguments.length)return this._openedNodes[w];c?this._openedNodes[w]=!0:delete this._openedNodes[w];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&this.cookieName){var b=[],c;for(c in this._openedNodes)b.push(c);I(this.cookieName,b.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),
delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!G.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(b){b&&g.setMarginBox(this.domNode,b);this._nodePixelIndent=g.position(this.tree.indentDetector).w||this._nodePixelIndent;this.expandChildrenDeferred.then(G.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},
_outstandingPaintOperations:0,_startPaint:function(b){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var c=G.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&!this._adjustWidthsTimer&&this._started&&(this._adjustWidthsTimer=this.defer("_adjustWidths"))});m(b,c,c)},_adjustWidths:function(){this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);
this.containerNode.style.width="auto";this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%"},_createTreeNode:function(b){return new E(b)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});h("dojo-bidi")&&M.extend({_setTextDirAttr:function(b){b&&this.textDir!=b&&(this._set("textDir",b),this.rootNode.set("textDir",b))}});M.PathError=C("TreePathError");M._TreeNode=E;return M})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(u,F,I,B){return I("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(d){B.mixin(this,d);this.connects=[];d=this.store;if(!d.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");d.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([F.after(d,
"onNew",B.hitch(this,"onNewItem"),!0),F.after(d,"onDelete",B.hitch(this,"onDeleteItem"),!0),F.after(d,"onSet",B.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var d;d=this.connects.pop();)d.remove()},getRoot:function(d,k){this.root?d(this.root):this.store.fetch({query:this.query,onComplete:B.hitch(this,function(e){if(1!=e.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+e.length+" items, but must return exactly one");this.root=e[0];d(this.root)}),onError:k})},mayHaveChildren:function(d){return u.some(this.childrenAttrs,
function(k){return this.store.hasAttribute(d,k)},this)},getChildren:function(d,k,e){var n=this.store;if(n.isItemLoaded(d)){for(var g=[],r=0;r<this.childrenAttrs.length;r++){var C=n.getValues(d,this.childrenAttrs[r]);g=g.concat(C)}var f=0;this.deferItemLoadingUntilExpand||u.forEach(g,function(p){n.isItemLoaded(p)||f++});0==f?k(g):u.forEach(g,function(p,v){n.isItemLoaded(p)||n.loadItem({item:p,onItem:function(G){g[v]=G;0==--f&&k(g)},onError:e})})}else{var h=B.hitch(this,arguments.callee);n.loadItem({item:d,
onItem:function(p){h(p,k,e)},onError:e})}},isItem:function(d){return this.store.isItem(d)},fetchItemByIdentity:function(d){this.store.fetchItemByIdentity(d)},getIdentity:function(d){return this.store.getIdentity(d)},getLabel:function(d){return this.labelAttr?this.store.getValue(d,this.labelAttr):this.store.getLabel(d)},newItem:function(d,k,e){var n={parent:k,attribute:this.childrenAttrs[0]},g;this.newItemIdAttr&&d[this.newItemIdAttr]?this.fetchItemByIdentity({identity:d[this.newItemIdAttr],scope:this,
onItem:function(r){r?this.pasteItem(r,null,k,!0,e):(g=this.store.newItem(d,n))&&void 0!=e&&this.pasteItem(g,k,k,!1,e)}}):(g=this.store.newItem(d,n))&&void 0!=e&&this.pasteItem(g,k,k,!1,e)},pasteItem:function(d,k,e,n,g){var r=this.store,C=this.childrenAttrs[0];k&&u.forEach(this.childrenAttrs,function(h){if(r.containsValue(k,h,d)){if(!n){var p=u.filter(r.getValues(k,h),function(v){return v!=d});r.setValues(k,h,p)}C=h}});if(e)if("number"==typeof g){var f=r.getValues(e,C).slice();f.splice(g,0,d);r.setValues(e,
C,f)}else r.setValues(e,C,r.getValues(e,C).concat(d))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(d,k){k&&this.getChildren(k.item,B.hitch(this,function(e){this.onChildrenChange(k.item,e)}))},onDeleteItem:function(d){this.onDelete(d)},onSetItem:function(d,k){if(-1!=u.indexOf(this.childrenAttrs,k))this.getChildren(d,B.hitch(this,function(e){this.onChildrenChange(d,e)}));else this.onChange(d)}})})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(u,F,I,B,d){return F("dijit.tree.ForestStoreModel",d,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(k){this.root={store:this,root:!0,id:k.rootId,label:k.rootLabel,children:k.rootChildren}},mayHaveChildren:function(k){return k===this.root||this.inherited(arguments)},getChildren:function(k,e,n){k===this.root?this.root.children?e(this.root.children):this.store.fetch({query:this.query,onComplete:B.hitch(this,
function(g){this.root.children=g;e(g)}),onError:n}):this.inherited(arguments)},isItem:function(k){return k===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(k){if(k.identity==this.root.id){var e=k.scope||I.global;k.onItem&&k.onItem.call(e,this.root)}else this.inherited(arguments)},getIdentity:function(k){return k===this.root?this.root.id:this.inherited(arguments)},getLabel:function(k){return k===this.root?this.root.label:this.inherited(arguments)},newItem:function(k,e,n){return e===
this.root?(this.onNewRootItem(k),this.store.newItem(k)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(k,e,n,g,r){if(e===this.root&&!g)this.onLeaveRoot(k);this.inherited(arguments,[k,e===this.root?null:e,n===this.root?null:n,g,r]);if(n===this.root)this.onAddToRoot(k)},onAddToRoot:function(k){console.log(this,": item ",k," added to root")},onLeaveRoot:function(k){console.log(this,": item ",k," removed from root")},_requeryTop:function(){var k=this.root.children||[];this.store.fetch({query:this.query,
onComplete:B.hitch(this,function(e){this.root.children=e;if(k.length!=e.length||u.some(k,function(n,g){return e[g]!=n}))this.onChildrenChange(this.root,e)})})},onNewItem:function(k,e){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(k){-1!=u.indexOf(this.root.children,k)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(k,e,n,g){this._requeryTop();this.inherited(arguments)}})})},"dijit/tree/_dndSelector":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/dnd/common dojo/dom dojo/mouse dojo/on dojo/touch ../a11yclick ./_dndContainer".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C){return F("dijit.tree._dndSelector",C,{constructor:function(){this.selection={};this.anchor=null;this.events.push(n(this.tree.domNode,g.press,B.hitch(this,"onMouseDown")),n(this.tree.domNode,g.release,B.hitch(this,"onMouseUp")),n(this.tree.domNode,g.move,B.hitch(this,"onMouseMove")),n(this.tree.domNode,r.press,B.hitch(this,"onClickPress")),n(this.tree.domNode,r.release,B.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var f=[],h=this.selection,
p;for(p in h)f.push(h[p]);return f},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(f,h){this.setSelection(this.getSelectedTreeNodes().concat([f]));h&&(this.anchor=f);return f},removeTreeNode:function(f){var h=u.filter(this.getSelectedTreeNodes(),function(p){return!k.isDescendant(p.domNode,f.domNode)});this.setSelection(h);return f},isTreeNodeSelected:function(f){return f.id&&!!this.selection[f.id]},
setSelection:function(f){var h=this.getSelectedTreeNodes();u.forEach(this._setDifference(h,f),B.hitch(this,function(p){p.setSelected(!1);this.anchor==p&&delete this.anchor;delete this.selection[p.id]}));u.forEach(this._setDifference(f,h),B.hitch(this,function(p){p.setSelected(!0);this.selection[p.id]=p}));this._updateSelectionProperties()},_setDifference:function(f,h){u.forEach(h,function(p){p.__exclude__=!0});f=u.filter(f,function(p){return!p.__exclude__});u.forEach(h,function(p){delete p.__exclude__});
return f},_updateSelectionProperties:function(){var f=this.getSelectedTreeNodes(),h=[],p=[];u.forEach(f,function(v){var G=v.getTreePath();p.push(v);h.push(G)},this);f=u.map(p,function(v){return v.item});this.tree._set("paths",h);this.tree._set("path",h[0]||[]);this.tree._set("selectedNodes",p);this.tree._set("selectedNode",p[0]||null);this.tree._set("selectedItems",f);this.tree._set("selectedItem",f[0]||null)},onClickPress:function(f){if(!(this.current&&this.current.isExpandable&&this.tree.isExpandoNode(f.target,
this.current))){"mousedown"==f.type&&e.isLeft(f)&&f.preventDefault();var h="keydown"==f.type?this.tree.focusedChild:this.current;if(h){var p=d.getCopyKeyState(f),v=h.id;this.singular||f.shiftKey||!this.selection[v]?(this._doDeselect=!1,this.userSelect(h,p,f.shiftKey)):this._doDeselect=!0}}},onClickRelease:function(f){this._doDeselect&&(this._doDeselect=!1,this.userSelect("keyup"==f.type?this.tree.focusedChild:this.current,d.getCopyKeyState(f),f.shiftKey))},onMouseMove:function(){this._doDeselect=
!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(f,h){if(f===h)return 0;if("sourceIndex"in document.documentElement)return f.sourceIndex-h.sourceIndex;if("compareDocumentPosition"in document.documentElement)return f.compareDocumentPosition(h)&2?1:-1;if(document.createRange){var p=doc.createRange();p.setStartBefore(f);f=doc.createRange();f.setStartBefore(h);return p.compareBoundaryPoints(p.END_TO_END,f)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");
},userSelect:function(f,h,p){if(this.singular)this.anchor==f&&h?this.selectNone():(this.setSelection([f]),this.anchor=f);else if(p&&this.anchor){h=this._compareNodes(this.anchor.rowNode,f.rowNode);p=this.anchor;0>h?h=p:(h=f,f=p);for(p=[];h!=f;)p.push(h),h=this.tree._getNext(h);p.push(f);this.setSelection(p)}else this.selection[f.id]&&h?this.removeTreeNode(f):h?this.addTreeNode(f,!0):(this.setSelection([f]),this.anchor=f)},getItem:function(f){return{data:this.selection[f],type:["treeNode"]}},forInSelectedItems:function(f,
h){h=h||I.global;for(var p in this.selection)f.call(h,this.getItem(p),p,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(u,F,I,B,d,k){return F("dijit.tree._dndContainer",null,{constructor:function(e,n){this.tree=e;this.node=e.domNode;B.mixin(this,n);this.containerState="";I.add(this.node,"dojoDndContainer");this.events=[d(this.node,k.enter,B.hitch(this,"onOverEvent")),d(this.node,k.leave,
B.hitch(this,"onOutEvent")),u.after(this.tree,"_onNodeMouseEnter",B.hitch(this,"onMouseOver"),!0),u.after(this.tree,"_onNodeMouseLeave",B.hitch(this,"onMouseOut"),!0),d(this.node,"dragstart, selectstart",function(g){g.preventDefault()})]},destroy:function(){for(var e;e=this.events.pop();)e.remove();this.node=this.parent=null},onMouseOver:function(e){this.current=e},onMouseOut:function(){this.current=null},_changeState:function(e,n){var g="dojoDnd"+e;e=e.toLowerCase()+"State";I.replace(this.node,g+
n,g+this[e]);this[e]=n},_addItemClass:function(e,n){I.add(e,"dojoDndItem"+n)},_removeItemClass:function(e,n){I.remove(e,"dojoDndItem"+n)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"jimu/dijit/LayerChooserFromMapWithDropbox":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/on dojo/keys dojo/Evented dojo/Deferred dijit/popup dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/LayerChooserFromMapWithDropbox.html jimu/LayerInfos/LayerInfos".split(" "),
function(u,F,I,B,d,k,e,n,g,r,C,f){return u([g,r,k],{templateString:C,baseClass:"jimu-layer-chooser-from-map-withdropbox",declaredClass:"jimu.dijit.LayerChooserFromMapWithDropbox",_selectedItem:null,_isLayerChooserShow:!1,layerInfosObj:null,layerChooser:null,customClass:"",postMixInProperties:function(){this.inherited(arguments);this.nls=window.jimuNls.queryableLayerSource;this.nls.customSelectLayer=this.label?this.label:this.nls.selectLayer},postCreate:function(){this.inherited(arguments);this.layerInfosObj=
f.getInstanceSync();this.layerChooser.domNode.style.zIndex=1;this.layerChooser.tree.domNode.style.borderTop="0";this.layerChooser.tree.domNode.style.maxHeight="290px";this.own(B(this.layerChooser,"tree-click",F.hitch(this,this._onTreeClick)));this.own(B(this.layerChooser,"update",F.hitch(this,this._onLayerChooserUpdate)));this.own(B(document.body,"click",F.hitch(this,this._onBodyClicked)));this.own(B(document.body,"keydown",F.hitch(this,function(h){h.keyCode===d.ENTER&&this._onBodyClicked(h)})));
this.own(B(this.layerChooser.domNode,"keydown",F.hitch(this,function(h){h.keyCode===d.ESCAPE&&this.hideLayerChooser()})))},destroy:function(){this.hideLayerChooser();this.layerChooser&&this.layerChooser.destroy();this.layerChooser=null;this.inherited(arguments)},getLayerChooser:function(){return this.layerChooser},setSelectedLayer:function(h){var p=new e;if(h){var v=this.layerInfosObj.getLayerOrTableInfoById(h.id);v?this.layerChooser.filter(v).then(F.hitch(this,function(G){G?(this._onSelectNewItem({layerInfo:v,
name:v.title,url:h.url}),p.resolve(!0)):p.resolve(!1)}),F.hitch(this,function(){p.resolve(!1)})):p.resolve(!1)}else this._onSelectNewItem(null),p.resolve(!0);return p},getSelectedItem:function(){return this._selectedItem},getSelectedItems:function(){return[this._selectedItem]},_onBodyClicked:function(h){h=h.target||h.srcElement;h===this.domNode||I.isDescendant(h,this.domNode)||h===this.layerChooser.domNode||I.isDescendant(h,this.layerChooser.domNode)||this.hideLayerChooser()},_onDropDownClick:function(h){h.stopPropagation();
h.preventDefault();this._isLayerChooserShow?this.hideLayerChooser():(this.isActive=!0,this.showLayerChooser())},_onDropDownKeydown:function(h){h.keyCode===d.ENTER&&this._onDropDownClick(h)},_getSelectedItems:function(){return this.layerChooser.getSelectedItems()},showLayerChooser:function(){this.layerChooser.domNode.style.minWidth=this.domNode.clientWidth+2+"px";n.open({parent:this,popup:this.layerChooser,around:this.domNode});var h=this.layerChooser.domNode.parentNode;h&&(I.addClass(h,"jimu-layer-chooser-from-map-withdropbox-popup"),
this.customClass&&I.addClass(h,this.customClass),this.layerChooser.tree.domNode.focus());this._isLayerChooserShow=!0},hideLayerChooser:function(){n.close(this.layerChooser);this._isLayerChooserShow=!1;this.isActive&&(this.dropDownBtn.focus(),this.isActive=!1)},_onLayerChooserUpdate:function(){this._selectedItem&&this.layerChooser.onlyShowVisible&&!this._selectedItem.layerInfo.isShowInMap()&&(this._selectedItem=null,this.emit("selection-change",[]))},_onSelectNewItem:function(h){var p=F.getObject("layerInfo.id",
!1,this._selectedItem)||-1,v=F.getObject("layerInfo.id",!1,h)||-1;p=p!==v;this._selectedItem=h;this.hideLayerChooser();h=F.getObject("layerInfo.title",!1,this._selectedItem)||"";this.layerNameNode.innerHTML=h;I.setAttr(this.layerNameNode,"title",h);h=F.getObject("layerInfo.layerObject",!1,this._selectedItem);p&&this.emit("selection-change",[h])},_onTreeClick:function(){var h=this._getSelectedItems();this._onSelectNewItem(0<h.length?h[0]:null)}})})},"dijit/form/Textarea":function(){define(["dojo/_base/declare",
"dojo/dom-style","./_ExpandingTextAreaMixin","./SimpleTextarea"],function(u,F,I,B){return u("dijit.form.Textarea",[B,I],{baseClass:"dijitTextBox dijitTextArea dijitExpandingTextArea",cols:"",buildRendering:function(){this.inherited(arguments);F.set(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"})}})})},"dijit/form/_ExpandingTextAreaMixin":function(){define("dojo/_base/declare dojo/dom-construct dojo/has dojo/_base/lang dojo/on dojo/_base/window ../Viewport".split(" "),
function(u,F,I,B,d,k,e){I.add("textarea-needs-help-shrinking",function(){var n=k.body(),g=F.create("textarea",{rows:"5",cols:"20",value:" ",style:{zoom:1,fontSize:"12px",height:"96px",overflow:"hidden",visibility:"hidden",position:"absolute",border:"5px solid white",margin:"0",padding:"0",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"}},n,"last"),r=g.scrollHeight>=g.clientHeight;n.removeChild(g);return r});return u("dijit.form._ExpandingTextAreaMixin",
null,{_setValueAttr:function(){this.inherited(arguments);this.resize()},postCreate:function(){this.inherited(arguments);var n=this.textbox;n.style.overflowY="hidden";this.own(d(n,"focus, resize",B.hitch(this,"_resizeLater")))},startup:function(){this.inherited(arguments);this.own(e.on("resize",B.hitch(this,"_resizeLater")));this._resizeLater()},_onInput:function(n){this.inherited(arguments);this.resize()},_estimateHeight:function(){var n=this.textbox;n.rows=(n.value.match(/\n/g)||[]).length+1},_resizeLater:function(){this.defer("resize")},
resize:function(){function n(){var G=!1;""===g.value&&(g.value=" ",G=!0);var Q=g.scrollHeight;G&&(g.value="");return Q}var g=this.textbox;"hidden"==g.style.overflowY&&(g.scrollTop=0);if(!this.busyResizing){this.busyResizing=!0;if(n()||g.offsetHeight){var r=n()+Math.max(g.offsetHeight-g.clientHeight,0),C=r+"px";C!=g.style.height&&(g.style.height=C,g.rows=1);if(I("textarea-needs-help-shrinking")){var f=n(),h=g.style.minHeight,p=4,v=g.scrollTop;g.style.minHeight=C;for(g.style.height="auto";0<r;){g.style.minHeight=
Math.max(r-p,4)+"px";C=n();f-=C;r-=f;if(f<p)break;f=C;p<<=1}g.style.height=r+"px";g.style.minHeight=h;g.scrollTop=v}g.style.overflowY=n()>g.clientHeight?"auto":"hidden";"hidden"==g.style.overflowY&&(g.scrollTop=0)}else this._estimateHeight();this.busyResizing=!1}}})})},"widgets/Share/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/i18n!./nls/strings"],function(){})},"url:jimu/dijit/templates/ShareLink.html":'\x3cdiv class\x3d"shareLink"\x3e\r\n  \x3cdiv class\x3d"shareLinkOptionsWrapper displaynone"\x3e\r\n    \x3cdiv role\x3d"button" data-dojo-attach-point\x3d"backBtn" class\x3d"backBtn" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"linkOptionsTitle"\x3e${nls.linkOptions}\x3c/div\x3e\r\n    \x3cdiv class\x3d"subTitle"\x3e${nls.linkOptionsUrlParameters}\x3c/div\x3e\r\n    \x3cform data-id\x3d"shareOptionsRadios" data-dojo-attach-point\x3d"shareOptionsRadios"\x3e\r\n      \x3cfieldset\x3e\r\n        \x3clegend class\x3d"screen-readers-only"\x3e${nls.linkOptionsUrlParameters}\x3c/legend\x3e\r\n        \x3cdiv class\x3d"optionsRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"currentMapExtent" tabindex\x3d"0" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"currentMapExtent" data-dojo-type\x3d"dijit.form.RadioButton" data-dojo-props\x3d\'checked:true\' checked\x3e\r\n            \x3cdiv class\x3d"labels" data-forid\x3d"currentMapExtent"\x3e${nls.currentMapExtent}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"optionsRow" data-dojo-attach-point\x3d"chooseCenterWithLevelRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"chooseCenterWithLevel" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"chooseCenterWithLevel" data-dojo-type\x3d"dijit.form.RadioButton"\x3e\r\n            \x3cdiv class\x3d"labels" data-forid\x3d"chooseCenterWithLevel"\x3e${nls.chooseCenterWithLevel}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n          \x3cdiv class\x3d"optionsMore chooseCenterWithLevel_optionsMore"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"chooseCenterWithLevel_marker" class\x3d"markers"\x3e\x3c/div\x3e\r\n            \x3cselect data-dojo-attach-point\x3d"chooseCenterWithLevel_levels" class\x3d"shareSelects" style\x3d"display: none !important;" data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"optionsRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"chooseCenterWithScale" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"chooseCenterWithScale" data-dojo-type\x3d"dijit.form.RadioButton"\x3e\r\n            \x3cdiv class\x3d"labels"\x3e${nls.chooseCenterWithScale}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n          \x3cdiv class\x3d"optionsMore chooseCenterWithScale_optionsMore"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"chooseCenterWithScale_marker" class\x3d"markers"\x3e\x3c/div\x3e\r\n            \x3cselect data-dojo-attach-point\x3d"chooseCenterWithScale_scales" class\x3d"shareSelects" style\x3d"display: none !important;" data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"optionsRow" data-dojo-attach-point\x3d"findLocationRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"findLocation" tabindex\x3d"0" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"findLocation" data-dojo-type\x3d"dijit.form.RadioButton"\x3e\r\n            \x3cdiv class\x3d"labels"\x3e${nls.findLocation}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n          \x3cdiv class\x3d"optionsMore findLocation_optionsMore"\x3e\r\n            \x3cdiv class\x3d"moreOptions"\x3e\r\n              \x3cinput data-dojo-attach-point\x3d"findLocation_input" tabindex\x3d"0" data-dojo-type\x3d"dijit.form.TextBox" placeholder\x3d"${nls.findLocation_inputPlaceholder}"\x3e\r\n            \x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"optionsRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"queryFeature" tabindex\x3d"0" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"queryFeature" data-dojo-type\x3d"dijit.form.RadioButton"\x3e\r\n            \x3cdiv class\x3d"labels"\x3e${nls.queryFeature}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n          \x3cdiv class\x3d"optionsMore queryFeature_optionsMore"\x3e\r\n            \x3cdiv class\x3d"moreOptions"\x3e\r\n              \x3cdiv data-dojo-attach-point\x3d"queryFeature_layer" name\x3d"queryFeature_layer" class\x3d"queryFeature_layer"\x3e\x3c/div\x3e\r\n              \x3ctable class\x3d"query-wapper"\x3e\r\n                \x3ctr\x3e\r\n                  \x3ctd class\x3d"t-row"\x3e \x3cselect data-dojo-attach-point\x3d"queryFeature_field" name\x3d"queryFeature_field"\r\n                      data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e \x3c/td\x3e\r\n                  \x3ctd class\x3d"t-row"\x3e \x3cdiv style\x3d"width: 5px;"\x3e\x3c/div\x3e \x3c/td\x3e\r\n                  \x3ctd class\x3d"t-row"\x3e \x3ctable data-dojo-attach-point\x3d"queryFeature_valueFilter" name\x3d"queryFeature_valueFilter"\r\n                      class\x3d"dijitSelect queryFeature_value_filter"\x3e\x3c/table\x3e \x3c/td\x3e\r\n                \x3c/tr\x3e\r\n              \x3c/table\x3e\r\n              \x3c!--\r\n                \x3cselect data-dojo-attach-point\x3d"queryFeature_value" name\x3d"queryFeature_value" data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e\r\n              --\x3e\r\n              \x3c!--\r\n                \x3cdiv role\x3d"button" class\x3d"sort-btn-wapper" tabindex\x3d"0" title\x3d${nls.asc}\x3e\r\n                  \x3cdiv class\x3d"sort-btn ASC" data-dojo-attach-point\x3d"queryFeature_sortBtn"\x3e\x3c/div\x3e\r\n                \x3c/div\x3e\r\n              --\x3e\r\n            \x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"optionsRow"\x3e\r\n          \x3clabel\x3e\r\n            \x3cinput data-dojo-attach-point\x3d"addMarker" class\x3d"shareRadios jimu-float-leading jimu-radio-btn" type\x3d"radio" name\x3d"radios" data-id\x3d"addMarker" data-dojo-type\x3d"dijit.form.RadioButton"\x3e\r\n            \x3cdiv class\x3d"labels"\x3e${nls.addMarker}\x3c/div\x3e\r\n          \x3c/label\x3e\r\n          \x3cdiv class\x3d"optionsMore addMarker_optionsMore"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"addMarker_marker" class\x3d"markers"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"moreOptions addMarker_moreOptions"\x3e\r\n              \x3cdiv class\x3d"moreOptionsRow"\x3e\r\n                \x3clabel\x3e\r\n                  \x3cspan\x3e${nls.WKID}\x3c/span\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"addMarker_spatialReference" tabindex\x3d"0" name\x3d"spatialReference" data-dojo-type\x3d"dijit.form.TextBox"\x3e\r\n                \x3c/label\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"moreOptionsRow"\x3e\r\n                \x3clabel\x3e\r\n                  \x3cspan\x3e${nls.popupTitle}\x3c/span\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"addMarker_title" tabindex\x3d"0" title\x3d"${nls.addMarker_titlePlaceholder}" data-dojo-type\x3d"dijit.form.TextBox" placeholder\x3d"${nls.addMarker_titlePlaceholder}"\x3e\r\n                \x3c/label\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"moreOptionsRow"\x3e\r\n                \x3clabel\x3e\r\n                  \x3cspan\x3e${nls.symbol}\x3c/span\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"addMarker_symbolURL" tabindex\x3d"0" title\x3d"${nls.addMarker_symbolURL}" data-dojo-type\x3d"dijit.form.TextBox" placeholder\x3d"${nls.addMarker_symbolURL}"\x3e\r\n                \x3c/label\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"moreOptionsRow"\x3e\r\n                \x3clabel\x3e\r\n                  \x3cspan\x3e${nls.label}\x3c/span\x3e\r\n                  \x3cinput data-dojo-attach-point\x3d"addMarker_label" tabindex\x3d"0" title\x3d"${nls.addMarker_label}" data-dojo-type\x3d"dijit.form.TextBox" placeholder\x3d"${nls.addMarker_label}"\x3e\r\n                \x3c/label\x3e\r\n              \x3c/div\x3e\r\n              \x3cdiv class\x3d"moreOptionsRow displaynone"\x3e\r\n                \x3clabel\x3e\r\n                  \x3cspan\x3e${nls.zoomLevel}\x3c/span\x3e\r\n                  \x3cdiv class\x3d"table-for-select"\x3e\r\n                    \x3cselect data-dojo-attach-point\x3d"addMarker_level" tabindex\x3d"0" name\x3d"addMarker_level" data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e\r\n                  \x3c/div\x3e\r\n                \x3c/label\x3e\r\n              \x3c/div\x3e\r\n            \x3c/div\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/fieldset\x3e\r\n    \x3c/form\x3e\r\n\r\n    \x3cfieldset\x3e\r\n      \x3cdiv class\x3d"optionsRow shareClearFix"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"overwirteMobileLayout" data-id\x3d"share-options-overwirteMobileLayout" class\x3d"shareCheckBoxes"\r\n          data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-props\x3d\'label:"${nls.overwirteMobileLayout}"\'\x3e\x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"optionsMore share-options-overwirteMobileLayout_optionsMore"\x3e\r\n          \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberTextBox" required\x3d"true"\r\n                 data-dojo-attach-point\x3d"mobileLayout" tabindex\x3d"0" data-dojo-props\x3d\'style:{width:"100px"}, constraints:{min:300}\'/\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"optionsRow shareClearFix"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"setlanguage" data-id\x3d"share-options-language" class\x3d"shareCheckBoxes"\r\n          data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-props\x3d\'label:"${nls.language}"\'\x3e\x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"optionsMore share-options-language_optionsMore"\x3e\r\n          \x3cselect data-dojo-attach-point\x3d"setlanguage_languages" tabindex\x3d"0" title\x3d"${nls.language}" name\x3d"${nls.language}" class\x3d"shareSelects" style\x3d"display:inline-block;" data-dojo-type\x3d"dijit/form/Select"\x3e\x3c/select\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"optionsRow shareClearFix" style\x3d"display: none;"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"auth" data-id\x3d"share-options-auth" class\x3d"shareCheckBoxes jimu-float-leading"\r\n          data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-props\x3d\'label:"${nls.auth}"\'\x3e\x3c/div\x3e\r\n\r\n        \x3cdiv class\x3d"optionsMore share-options-auth_optionsMore"\x3e\r\n          \x3cinput data-dojo-attach-point\x3d"authtoken" data-dojo-type\x3d"dijit/form/ValidationTextBox" data-dojo-props\x3d\'required:true\'/\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"optionsRow shareClearFix"\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"setLayerVisibility" data-id\x3d"share-options-layerVisibility" class\x3d"shareCheckBoxes"\r\n          data-dojo-type\x3d"jimu/dijit/CheckBox" data-dojo-props\x3d\'label:"${nls.layerVisibility}"\'\x3e\x3c/div\x3e\r\n      \x3c/div\x3e\r\n\r\n      \x3cdiv class\x3d"optionsRow shareClearFix url-toolong-tips" data-dojo-attach-point\x3d"urlLengthTips1"\x3e\x3c/div\x3e\r\n\r\n      \x3cdiv class\x3d"optionsRow shareClearFix"\x3e\r\n        \x3clabel\x3e\r\n          \x3cdiv class\x3d"subTitle"\x3e${nls.linkPreview}\x3c/div\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"preview" tabindex\x3d"0" class\x3d"preview inputsText" data-dojo-type\x3d"dijit/form/SimpleTextarea" data-dojo-props\x3d\'required:true,readOnly:true\'\x3e\x3c/div\x3e\r\n        \x3c/label\x3e\r\n      \x3c/div\x3e\r\n    \x3c/fieldset\x3e\r\n  \x3c/div\x3e\r\n\r\n  \x3cdiv class\x3d"shareUrlsWrapper"\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"Text"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"linkShare" data-dojo-attach-point\x3d"LinkShareContainer"\x3e\r\n      \x3clabel\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"LinkText" class\x3d"subTitle linkToApp"\x3e${nls.shareLinkText}\x3c/div\x3e\r\n        \x3cinput data-dojo-attach-point\x3d"_linkUrlTextBox" class\x3d"shareLinkUrl inputsText" data-dojo-type\x3d"dijit/form/TextBox" data-dojo-props\x3d\'required:true,readOnly:true\' tabindex\x3d"0"/\x3e\r\n      \x3c/label\x3e\r\n      \x3cdiv class\x3d"shareClearFix"\x3e\r\n        \x3cspan role\x3d"link" class\x3d"optionsText jimu-float-leading" data-dojo-attach-point\x3d"linkOptions" tabindex\x3d"0" aria-title\x3d"${nls.linkOptions}"\x3e${nls.linkOptions}\x3c/span\x3e\r\n        \x3cdiv class\x3d"shareLinkIcons jimu-float-trailing" data-dojo-attach-point\x3d"socialNetworkLinks"\x3e\r\n          \x3ca role\x3d"link" class\x3d"socialNetworkIcons email" data-dojo-attach-point\x3d"emailShare" title\x3d"${nls.shareEmail}" tabindex\x3d"0"\x3e\x3c/a\x3e\r\n          \x3cdiv role\x3d"link" class\x3d"socialNetworkIcons facebook" data-dojo-attach-event\x3d"click:_toFacebook, keydown:_toFacebookKeyDown" data-dojo-attach-point\x3d"FacebookShare" title\x3d"${nls.shareFacebook}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n          \x3cdiv role\x3d"link" class\x3d"socialNetworkIcons twitter" data-dojo-attach-event\x3d"click:_toTwitter, keydown:_toTwitterKeyDown" data-dojo-attach-point\x3d"TwitterShare" title\x3d"${nls.shareTwitter}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n          \x3cdiv role\x3d"link" class\x3d"socialNetworkIcons googlePlus" data-dojo-attach-point\x3d"googlePlusShare" title\x3d"${nls.shareGooglePlus}" tabindex\x3d"0"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"optionsRow shareClearFix url-toolong-tips" data-dojo-attach-point\x3d"urlLengthTips2"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"embedShare" data-dojo-attach-point\x3d"EmbedShareContainer"\x3e\r\n      \x3clabel\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"embedText" class\x3d"subTitle"\x3e${nls.embed}\x3c/div\x3e\r\n        \x3cinput data-dojo-attach-point\x3d"_embedCodeTextArea" role\x3d"presentation" class\x3d"shareEmbedCode inputsText" data-dojo-type\x3d"dijit/form/SimpleTextarea" data-dojo-props\x3d\'required:true,readOnly:true\'/\x3e\r\n      \x3c/label\x3e\r\n      \x3cdiv role\x3d"link" class\x3d"moreOptions" data-dojo-attach-point\x3d"MoreOptions" data-dojo-attach-event\x3d"click:_moreOptionsExpandCollapse, keydown:_moreOptionsExpandCollapseKeyDown" tabindex\x3d"0"\x3e\r\n        \x3cdiv class\x3d"moreOptionsIcon" data-dojo-attach-point\x3d"MoreOptionsIcon"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"optionsText"\x3e${nls.more}\x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"MoreOptionsContainer" class\x3d"moreOptionsContainer inputsText displaynone"\x3e\r\n        \x3cdiv class\x3d"sizeSelect" data-dojo-attach-point\x3d"SizeSelect"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"customSize disable" data-dojo-attach-point\x3d"CustomSizeContainer"\x3e\r\n          \x3cdiv class\x3d"timesConnector"\x3eX\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"shareTips" data-dojo-attach-point\x3d"shareTips"\x3e\r\n      \x3c!--\x3cdiv class\x3d"infoIcon"\x3e\x3c/div\x3e--\x3e\r\n      \x3cdiv data-dojo-attach-point\x3d"shareTipsText" class\x3d"shareTipsText"\x3e${nls.shareToWebTips}\x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:jimu/dijit/templates/_TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\x3e\r\n\t\t\x3cspan data-dojo-attach-point\x3d"contentNode" class\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem" tabindex\x3d"-1" aria-selected\x3d"false"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\x3e\r\n\t\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation" style\x3d"display: none;"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:dijit/templates/TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\r\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"contentNode"\r\n\t\t\tclass\x3d"dijitTreeContent" role\x3d"presentation"\x3e\r\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem"\r\n\t\t\t\t   tabindex\x3d"-1" aria-selected\x3d"false" id\x3d"${id}_label"\x3e\x3c/span\x3e\r\n\t\t\x3c/span\r\n\t\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation"\r\n\t\t style\x3d"display: none;" aria-labelledby\x3d"${id}_label"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:dijit/templates/Tree.html":'\x3cdiv role\x3d"tree"\x3e\r\n\t\x3cdiv class\x3d"dijitInline dijitTreeIndent" style\x3d"position: absolute; top: -9999px" data-dojo-attach-point\x3d"indentDetector"\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point\x3d"rootLoadingIndicator"\x3e\x3c/div\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeContainer" role\x3d"presentation"\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',"url:jimu/dijit/templates/LayerChooserFromMapWithDropbox.html":'\x3cdiv\x3e\r\n\x3ctable role\x3d"listbox" aria-haspopup\x3d"true" data-dojo-attach-point\x3d"dropDownBtn" data-dojo-attach-event\x3d"onclick: _onDropDownClick,onkeydown: _onDropDownKeydown"\r\n  tabindex\x3d"0" title\x3d"${nls.customSelectLayer}" aria-label\x3d"${nls.customSelectLayer}"\x3e\r\n    \x3ccaption class\x3d"screen-readers-only-no-position"\x3e${nls.customSelectLayer}\x3c/caption\x3e\r\n    \x3ccolgroup\x3e\r\n      \x3ccol width\x3d"10px"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"auto"\x3e\x3c/col\x3e\r\n      \x3ccol width\x3d"30px"\x3e\x3c/col\x3e\r\n    \x3c/colgroup\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd\x3e\x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"layer-name jimu-ellipsis" data-dojo-attach-point\x3d"layerNameNode"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd\x3e\r\n          \x3cdiv class\x3d"drop-select jimu-float-trailing" data-dojo-attach-point\x3d"dropArrowNode"\x3e\r\n            \x3cdiv class\x3d"jimu-icon jimu-icon-down-arrow-8"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/Share/Widget.html":'\x3cdiv style\x3d"width:100%;min-width:230px;min-height:245px;"\x3e\r\n\t\x3cdiv data-dojo-attach-point\x3d"container"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',"*now":function(u){u(['dojo/i18n!*preload*widgets/Share/nls/Widget*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dojo/_base/lang jimu/BaseWidget jimu/portalUrlUtils jimu/shareUtils jimu/dijit/ShareLink jimu/utils jimu/dijit/LoadingIndicator jimu/dijit/Message".split(" "),function(u,F,I,B,d,k,e,n,g){return u([I],{name:"Share",baseClass:"jimu-widget-share share-container",_isShowFindLocation:!0,onOpen:function(){this.widgetManager.activateWidget(this);d.getItemShareInfo(this.appConfig.portalUrl).then(F.hitch(this,function(r){r=d.isSharedToPublic(r);if(this.shareLink&&this.shareLink.onShareToPublicChanged&&
!0===this.shareLink.HAS_INIT_URL)this.shareLink.onShareToPublicChanged(r)}))},onClose:function(){if(this.shareLink)this.shareLink.onCloseContainer()},onDeActive:function(){},_disableWebMapPopup:function(){},_enableWebMapPopup:function(){},postCreate:function(){this.inherited(arguments);this.shelter=new n({hidden:!0});this.shelter.placeAt(this.domNode);this.shelter.startup()},startup:function(){this.inherited(arguments);this.shelter.show();this._isShowFindLocation=this._findSearchWidget(this.appConfig);
d.getItemShareInfo(this.appConfig.portalUrl).then(F.hitch(this,function(r){this.shareLink=new k({portalUrl:this.appConfig.portalUrl,appTitle:this.appConfig.title,isOnline:B.isOnline(e.getAppHref()),isShowSocialMediaLinks:!0,isSharedToPublic:d.isSharedToPublic(r),isShowBackBtn:!0,config:this.config,isShowFindLocation:this._isShowFindLocation});this.shareLink.placeAt(this.container);e.initFirstFocusNode(this.domNode,this.shareLink._linkUrlTextBox.textbox);e.initLastFocusNode(this.domNode,this.shareLink.MoreOptions);
this.openAtStartAysn=!0;e.isAutoFocusFirstNodeWidget(this)&&this.shareLink._linkUrlTextBox.textbox.focus()}),F.hitch(this,function(r){new g({message:r.message})})).always(F.hitch(this,function(){this.shelter.hide()}))},destroy:function(){this.shareLink&&this.shareLink.destroy&&this.shareLink.destroy();this.inherited(arguments)},onAppConfigChanged:function(r){this._isShowFindLocation=this._findSearchWidget(r);this.shareLink&&this.shareLink.updateShareLinkOptionsUI&&this.shareLink.updateShareLinkOptionsUI({isShowFindLocation:this._isShowFindLocation})},
_findSearchWidget:function(r){r=r.getConfigElementsByName("Search");return 0<r.length&&r[0].visible}})});