// 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/EditorXssFilter":function(){define("dojo/_base/declare dojo/_base/array dijit/_WidgetBase dojo/_base/lang dojo/Evented libs/arcgis-html-sanitizer/arcgis-html-sanitizer".split(" "),function(M,H,B,O,e,t){var k=null,h=M([B,e],{baseClass:"jimu-editor-xss-filter",declaredClass:"jimu.dijit.EditorXssFilter",sanitizer:null,xss:null,whiteList:{},graphicsWhiteList:{},postCreate:function(){this.whiteList=this._getWhiteList();this.sanitizer=new t({whiteList:this.whiteList,safeAttrValue:O.hitch(this,
function(q,n,w,u){return"style"===n?this.xss.friendlyAttrValue(w).replace(/"/g,"'"):"img"===q&&"src"===n?this.xss.escapeAttrValue(w):this.xss.safeAttrValue(q,n,w,u)}),onTag:O.hitch(this,function(q,n,w){if(w.isWhite&&this._isInWhiteList(q,this.graphicsWhiteList))return n}),onIgnoreTagAttr:O.hitch(this,function(q,n,w,u){if("data-"===n.substr(0,5))return n+'\x3d"'+this.xss.escapeAttrValue(w)+'"'}),onIgnoreTag:O.hitch(this,function(q,n,w){if("o:"===q.substr(0,2)||"!--[if"===q||"!--[endif]--"===q)return n})},
!0);this.xss=this.sanitizer.xss},sanitize:function(q){return this.sanitizer.sanitize(q)},_getWhiteList:function(){var q="title height width class style font-family id align text-align".split(" "),n={div:q,h1:q,h2:q,h3:q,h4:q,h5:q,h6:q,span:q,p:q,s:q,strong:q,em:q,u:q,ol:q,ul:q,li:q,a:["href","target"].concat(q),img:["src","alt","border"].concat(q),blockquote:q,font:["face","size","color"].concat(q),pre:q,code:q,b:q,i:q,wbr:q,video:"autoplay controls loop muted poster preload".split(" ").concat(q),
audio:["autoplay","controls","loop","muted","preload"].concat(q),source:["media","src","type"].concat(q),table:["cellpadding","cellspacing","border"].concat(q),tbody:[].concat(q),tr:["valign"].concat(q),td:["valign","colspan","rowspan","nowrap"].concat(q),th:["valign","colspan","rowspan","nowrap"].concat(q),hr:q,html:q,title:q,link:["rel","href"],style:["type"].concat(q),body:q};this.graphicsWhiteList={animate:[],animateMotion:[],animateTransform:[],circle:[],clipPath:[],"color-profile":[],defs:[],
desc:[],discard:[],ellipse:[],feBlend:[],feColorMatrix:[],feComponentTransfer:[],feComposite:[],feConvolveMatrix:[],feDiffuseLighting:[],feDisplacementMap:[],feDistantLight:[],feDropShadow:[],feFlood:[],feFuncA:[],feFuncB:[],feFuncG:[],feFuncR:[],feGaussianBlur:[],feImage:[],feMerge:[],feMergeNode:[],feMorphology:[],feOffset:[],fePointLight:[],feSpecularLighting:[],feSpotLight:[],feTile:[],feTurbulence:[],filter:[],foreignObject:[],g:[],hatch:[],hatchpath:[],line:[],linearGradient:[],marker:[],mask:[],
mesh:[],meshgradient:[],meshpatch:[],meshrow:[],metadata:[],mpath:[],path:[],pattern:[],polygon:[],polyline:[],radialGradient:[],rect:[],set:[],solidcolor:[],stop:[],svg:[],switch:[],symbol:[],text:[],textPath:[],title:[],tspan:[],use:[],view:[],object:[],canvas:q};return this._extendObjectOfArrays([n,{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],
blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],table:["width","border","align",
"valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:"autoplay controls loop preload src height width".split(" ")},this.graphicsWhiteList])},_extendObjectOfArrays:function(q){var n={};H.forEach(q,function(w){var u=Object.keys(w);H.forEach(u,function(r){Array.isArray(w[r])&&Array.isArray(n[r])?n[r]=n[r].concat(w[r]):
n[r]=w[r]},this)},this);return n},_isInWhiteList:function(q,n){n=Object.keys(n);var w=!1;H.forEach(n,function(u){q===u&&(w=!0)},this);return w}});h.getInstance=function(){null===k&&(k=new h);return k};return h})},"esri/tasks/Geoprocessor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has dojo/io-query ../kernel ../request ../deferredUtils ../geometry/normalizeUtils ./Task ./FeatureSet ./JobInfo ./GPMessage ./LinearUnit ./DataFile ./RasterData ./Date ./ParameterValue ./GPResultImageLayer ../layers/ArcGISDynamicMapServiceLayer ../layers/MapImage".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p,v,R,I,X,T,U){M=M(u,{declaredClass:"esri.tasks.Geoprocessor",_eventMap:{"execute-complete":["results","messages"],"get-result-data-complete":["result"],"get-result-image-complete":["mapImage"],"get-result-image-layer-complete":["layer"],"job-cancel":["jobInfo"],"job-complete":["jobInfo"],"status-update":["jobInfo"]},constructor:function(y){this._jobUpdateHandler=H.hitch(this,this._jobUpdateHandler);this._getJobStatus=H.hitch(this,this._getJobStatus);this._getResultDataHandler=
H.hitch(this,this._getResultDataHandler);this._getResultImageHandler=H.hitch(this,this._getResultImageHandler);this._executeHandler=H.hitch(this,this._executeHandler);this._updateTimers=[];this.registerConnectEvents()},updateDelay:1E3,processSpatialReference:null,outputSpatialReference:null,outSpatialReference:null,setUpdateDelay:function(y){this.updateDelay=y},setProcessSpatialReference:function(y){this.processSpatialReference=y},setOutputSpatialReference:function(y){this._setOutSR(y)},setOutSpatialReference:function(y){this._setOutSR(y)},
__msigns:[{n:"execute",c:3,a:[{i:0,p:["*"]}],e:2,f:1},{n:"submitJob",c:4,a:[{i:0,p:["*"]}],e:3}],_setOutSR:function(y){this.outSpatialReference=this.outputSpatialReference=y},_getOutSR:function(){return this.outSpatialReference||this.outputSpatialReference},_gpEncode:function(y,Z,S){for(var ea in y){var D=y[ea];H.isArray(D)?y[ea]=e.toJson(B.map(D,function(P){return this._gpEncode({item:P},!0).item},this)):D instanceof Date&&(y[ea]=D.getTime())}return this._encode(y,Z,S)},_decode:function(y){var Z=
y.dataType,S=new I(y);if(-1!==B.indexOf(["GPBoolean","GPDouble","GPLong","GPString"],Z))return S;if("GPLinearUnit"===Z)S.value=new f(S.value);else if("GPFeatureRecordSetLayer"===Z||"GPRecordSet"===Z)S.value=new r(S.value);else if("GPDataFile"===Z)S.value=new p(S.value);else if("GPDate"===Z)y=S.value,H.isString(y)?S.value=new R({date:y}):S.value=new Date(y);else if("GPRasterData"===Z||"GPRasterDataLayer"===Z)y=y.value.mapImage,S.value=y?new U(y):new v(S.value);else if(-1!==Z.indexOf("GPMultiValue:")){var ea=
Z.split(":")[1];y=S.value;S.value=B.map(y,function(D){return this._decode({paramName:"_name",dataType:ea,value:D}).value},this)}else console.log(this.declaredClass+" : GP Data type not handled. : "+S.dataType),S=null;return S},submitJob:function(y,Z,S,ea,D){var P=this._getOutSR(),Q=D.assembly;y=this._gpEncode(H.mixin({},this._url.query,{f:"json","env:outSR":P?P.wkid||e.toJson(P.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||e.toJson(this.processSpatialReference.toJson()):
null},y),null,Q&&Q[0]);var d=this._jobUpdateHandler,m=this._errorHandler;return q({url:this._url.path+"/submitJob",content:y,callbackParamName:"callback",load:function(C,L){d(C,L,!1,Z,S,D.dfd)},error:function(C){m(C,ea,D.dfd)}})},_jobUpdateHandler:function(y,Z,S,ea,D,P){var Q=y.jobId;Z=new l(y);this._successHandler([Z],"onStatusUpdate",D,S&&P);if(!S)switch(clearTimeout(this._updateTimers[Q]),this._updateTimers[Q]=null,P&&P.progress(Z),y.jobStatus){case l.STATUS_SUBMITTED:case l.STATUS_EXECUTING:case l.STATUS_WAITING:case l.STATUS_NEW:var d=
this._getJobStatus;this._updateTimers[Q]=setTimeout(function(){d(Q,S,ea,D,P)},this.updateDelay);break;default:this._successHandler([Z],"onJobComplete",ea,P)}},_getJobStatus:function(y,Z,S,ea,D){var P=this._jobUpdateHandler;q({url:this._url.path+"/jobs/"+y,content:H.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:function(Q,d){P(Q,d,Z,S,ea,D)},error:this._errorHandler})},_getResultDataHandler:function(y,Z,S,ea,D){try{var P=this._decode(y);this._successHandler([P],"onGetResultDataComplete",
S,D)}catch(Q){this._errorHandler(Q,ea,D)}},getResultData:function(y,Z,S,ea){var D=this._getResultDataHandler,P=this._errorHandler,Q=new O(n._dfdCanceller);Q._pendingDfd=q({url:this._url.path+"/jobs/"+y+"/results/"+Z,content:H.mixin({},this._url.query,{f:"json",returnType:"data"}),callbackParamName:"callback",load:function(d,m){D(d,m,S,ea,Q)},error:function(d){P(d,ea,Q)}});return Q},checkJobStatus:function(y,Z,S){var ea=this._jobUpdateHandler,D=this._errorHandler,P=new O(n._dfdCanceller);P._pendingDfd=
q({url:this._url.path+"/jobs/"+y,content:H.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:function(Q,d){ea(Q,d,!0,null,Z,P)},error:function(Q){D(Q,S,P)}});return P},cancelJob:function(y,Z,S){var ea=this._errorHandler,D=new O(n._dfdCanceller);D._pendingDfd=q({url:this._url.path+"/jobs/"+y+"/cancel",content:H.mixin({},this._url.query,{f:"json"}),callbackParamName:"callback",load:H.hitch(this,function(P,Q){this._successHandler([P],"onJobCancel",Z,D)}),error:function(P){ea(P,S,
D)}});return D},execute:function(y,Z,S,ea){var D=this._getOutSR(),P=ea.assembly;y=this._gpEncode(H.mixin({},this._url.query,{f:"json","env:outSR":D?D.wkid||e.toJson(D.toJson()):null,"env:processSR":this.processSpatialReference?this.processSpatialReference.wkid||e.toJson(this.processSpatialReference.toJson()):null},y),null,P&&P[0]);var Q=this._executeHandler,d=this._errorHandler;return q({url:this._url.path+"/execute",content:y,callbackParamName:"callback",load:function(m,C){Q(m,C,Z,S,ea.dfd)},error:function(m){d(m,
S,ea.dfd)}})},_executeHandler:function(y,Z,S,ea,D){try{var P=y.results,Q,d=y.messages;var m=0;for(Q=P.length;m<Q;m++)P[m]=this._decode(P[m]);m=0;for(Q=d.length;m<Q;m++)d[m]=new F(d[m]);this._successHandler([P,d],"onExecuteComplete",S,D)}catch(C){this._errorHandler(C,ea,D)}},_getResultImageHandler:function(y,Z,S,ea,D){try{var P=this._decode(y);this._successHandler([P],"onGetResultImageComplete",S,D)}catch(Q){this._errorHandler(Q,ea,D)}},getResultImage:function(y,Z,S,ea,D){var P=this._getResultImageHandler,
Q=this._errorHandler;S=this._gpEncode(H.mixin({},this._url.query,{f:"json"},S.toJson()));var d=new O(n._dfdCanceller);d._pendingDfd=q({url:this._url.path+"/jobs/"+y+"/results/"+Z,content:S,callbackParamName:"callback",load:function(m,C){P(m,C,ea,D,d)},error:function(m){Q(m,D,d)}});return d},cancelJobStatusUpdates:function(y){clearTimeout(this._updateTimers[y]);this._updateTimers[y]=null},getResultImageLayer:function(y,Z,S,ea){if(null==Z){var D=this._url.path.indexOf("/GPServer/");y=this._url.path.substring(0,
D)+"/MapServer/jobs/"+y}else y=this._url.path+"/jobs/"+y+"/results/"+Z;this._url.query&&(y+="?"+k.objectToQuery(this._url.query));Z=null==Z?new T(y,{imageParameters:S}):new X(y,{imageParameters:S},!0);this.onGetResultImageLayerComplete(Z);ea&&ea(Z);return Z},onStatusUpdate:function(){},onJobComplete:function(){},onExecuteComplete:function(){},onGetResultDataComplete:function(){},onGetResultImageComplete:function(){},onGetResultImageLayerComplete:function(){},onJobCancel:function(){}});w._createWrappers(M);
t("extend-esri")&&H.setObject("tasks.Geoprocessor",M,h);return M})},"esri/tasks/JobInfo":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel","./GPMessage"],function(M,H,B,O,e){M=M(null,{declaredClass:"esri.tasks.JobInfo",constructor:function(t){this.messages=[];H.mixin(this,t);t=this.messages;var k,h=t.length;for(k=0;k<h;k++)t[k]=new e(t[k])},jobId:"",jobStatus:""});H.mixin(M,{STATUS_CANCELLED:"esriJobCancelled",STATUS_CANCELLING:"esriJobCancelling",STATUS_DELETED:"esriJobDeleted",
STATUS_DELETING:"esriJobDeleting",STATUS_EXECUTING:"esriJobExecuting",STATUS_FAILED:"esriJobFailed",STATUS_NEW:"esriJobNew",STATUS_SUBMITTED:"esriJobSubmitted",STATUS_SUCCEEDED:"esriJobSucceeded",STATUS_TIMED_OUT:"esriJobTimedOut",STATUS_WAITING:"esriJobWaiting"});B("extend-esri")&&H.setObject("tasks.JobInfo",M,O);return M})},"esri/tasks/GPMessage":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(M,H,B,O){M=M(null,{declaredClass:"esri.tasks.GPMessage",constructor:function(e){H.mixin(this,
e)}});H.mixin(M,{TYPE_INFORMATIVE:"esriJobMessageTypeInformative",TYPE_PROCESS_DEFINITION:"esriJobMessageTypeProcessDefinition",TYPE_PROCESS_START:"esriJobMessageTypeProcessStart",TYPE_PROCESS_STOP:"esriJobMessageTypeProcessStop",TYPE_WARNING:"esriJobMessageTypeWarning",TYPE_ERROR:"esriJobMessageTypeError",TYPE_EMPTY:"esriJobMessageTypeEmpty",TYPE_ABORT:"esriJobMessageTypeAbort"});B("extend-esri")&&H.setObject("tasks.GPMessage",M,O);return M})},"esri/tasks/LinearUnit":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel"],function(M,H,B,O){M=M(null,{declaredClass:"esri.tasks.LinearUnit",constructor:function(e){e&&H.mixin(this,e)},distance:0,units:null,toJson:function(){var e={};this.distance&&(e.distance=this.distance);this.units&&(e.units=this.units);return e}});B("extend-esri")&&H.setObject("tasks.LinearUnit",M,O);return M})},"esri/tasks/DataFile":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(M,H,B,O){M=M(null,{declaredClass:"esri.tasks.DataFile",
constructor:function(e){e&&H.mixin(this,e)},url:null,itemID:null,toJson:function(){var e={};this.url&&(e.url=this.url);this.itemID&&(e.itemID=this.itemID);return e}});B("extend-esri")&&H.setObject("tasks.DataFile",M,O);return M})},"esri/tasks/RasterData":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(M,H,B,O){M=M(null,{declaredClass:"esri.tasks.RasterData",constructor:function(e){e&&H.mixin(this,e)},url:null,format:null,itemID:null,toJson:function(){var e=
{};this.url&&(e.url=this.url);this.format&&(e.format=this.format);this.itemID&&(e.itemID=this.itemID);return e}});B("extend-esri")&&H.setObject("tasks.RasterData",M,O);return M})},"esri/tasks/Date":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/date/locale","dojo/has","../kernel"],function(M,H,B,O,e){M=M(null,{declaredClass:"esri.tasks.Date",constructor:function(t){t&&(t.format&&(this.format=t.format),this.date=B.parse(t.date,{selector:"date",datePattern:this.format}))},date:new Date,
format:"EEE MMM dd HH:mm:ss zzz yyyy",toJson:function(){return{date:B.format(this.date,{selector:"date",datePattern:this.format}),format:this.format}}});O("extend-esri")&&H.setObject("tasks.Date",M,e);return M})},"esri/tasks/ParameterValue":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(M,H,B,O){M=M(null,{declaredClass:"esri.tasks.ParameterValue",constructor:function(e){H.mixin(this,e)}});B("extend-esri")&&H.setObject("tasks.ParameterValue",M,O);return M})},
"esri/tasks/GPResultImageLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has dojo/io-query ../kernel ../layers/ArcGISDynamicMapServiceLayer".split(" "),function(M,H,B,O,e,t,k){M=M(k,{declaredClass:"esri.tasks._GPResultImageLayer",constructor:function(h,q){q&&q.imageParameters&&q.imageParameters.extent&&(this.initialExtent=this.fullExtent=q.imageParameters.extent,this.spatialReference=this.initialExtent.spatialReference);this.getImageUrl=H.hitch(this,this.getImageUrl);
this.loaded=!0;this.onLoad(this)},getImageUrl:function(h,q,n,w){var u=h.spatialReference.wkid;w(this._url.path+"?"+e.objectToQuery(H.mixin(this._params,{f:"image",bbox:B.toJson(h.toJson()),bboxSR:u,imageSR:u,size:q+","+n})))}});O("extend-esri")&&H.setObject("tasks._GPResultImageLayer",M,t);return M})},"dojox/timing":function(){define(["./timing/_base"],function(M){return M})},"dojox/timing/_base":function(){define(["dojo/_base/kernel","dojo/_base/lang"],function(M){M.experimental("dojox.timing");
M.getObject("timing",!0,dojox);dojox.timing.Timer=function(H){this.timer=null;this.isRunning=!1;this.interval=H;this.onStop=this.onStart=null};M.extend(dojox.timing.Timer,{onTick:function(){},setInterval:function(H){this.isRunning&&window.clearInterval(this.timer);this.interval=H;this.isRunning&&(this.timer=window.setInterval(M.hitch(this,"onTick"),this.interval))},start:function(){if("function"==typeof this.onStart)this.onStart();this.isRunning=!0;this.timer=window.setInterval(M.hitch(this,"onTick"),
this.interval)},stop:function(){if("function"==typeof this.onStop)this.onStop();this.isRunning=!1;window.clearInterval(this.timer)}});return dojox.timing})},"esri/dijit/AttributeInspector":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/sniff dojo/_base/kernel dojo/has dojo/dom-style dojo/dom-construct ../kernel ../lang ../domUtils ../layers/InheritedDomain ../layers/FeatureLayer dojo/i18n!../nls/jsapi dojo/fx dojox/gfx dijit/_Widget dijit/_Templated dijit/Editor dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/TextColor ./_EventedWidget ./editing/AttachmentEditor ./editing/Util ../tasks/query dijit/form/DateTextBox dijit/form/TextBox dijit/form/NumberTextBox dijit/form/FilteringSelect dijit/form/NumberSpinner dijit/form/Button dijit/form/SimpleTextarea dijit/form/ValidationTextBox dijit/form/TimeTextBox dijit/Tooltip dojo/data/ItemFileReadStore dojox/date/islamic dojox/date/islamic/Date dojox/date/islamic/locale dojo/text!./templates/AttributeInspector.html".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p,v,R,I,X,T,U,y,Z,S,ea,D,P,Q,d,m,C,L,K,aa,V,ba,G,Y,W){var ta=M([U,v,R],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:!0,templateString:W,onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_navMessage:"( ${idx} ${of} ${numFeatures} )",_currentAttributeFieldName:null,_aiConnects:[],_selection:[],_toolTips:[],_numFeatures:0,_featureIdx:0,_currentLInfo:null,
_currentFeature:null,_rollbackInfo:null,_eventMap:{update:!0,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],next:["feature"],reset:!0,cancel:!0},_defaultRichTextPlugins:"bold italic underline foreColor hiliteColor | justifyLeft justifyCenter justifyRight justifyFull | insertOrderedList insertUnorderedList indent outdent | createLink".split(" "),css:{label:"atiLabel",field:"atiField",textArea:"atiTextAreaField",richText:"atiRichTextField",attachmentEditor:"atiAttachmentEditor",
red:"atiRequiredField"},constructor:function(x,z){H.mixin(this,F.widgets.attributeInspector);x=x||{};x.featureLayer||x.layerInfos||console.error("esri.AttributeInspector: please provide correct parameter in the constructor");this._datePackage=this._getDatePackage(x);this._layerInfos=x.layerInfos||[{featureLayer:x.featureLayer,options:x.options||[]}];this._layerInfos=B.filter(this._layerInfos,function(J){return!J.disableAttributeUpdate});this._hideNavButtons=x.hideNavButtons||!1},postCreate:function(){if(B.every(this._layerInfos,
function(z){return z.featureLayer.loaded}))this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature();else{var x=this._layerInfos.length;B.forEach(this._layerInfos,function(z){z=z.featureLayer;if(z.loaded)x--;else var J=O.connect(z,"onLoad",this,function(N){O.disconnect(J);J=null;x--;x||(this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature())})},this)}},destroy:function(){this._destroyAttributeTable();B.forEach(this._aiConnects,O.disconnect);delete this._aiConnects;
this._attachmentEditor&&(this._attachmentEditor.destroy(),delete this._attachmentEditor);delete this._layerInfos;this._selection=this._currentFeature=this._currentLInfo=this._attributes=this._layerInfos=null;this.inherited(arguments)},refresh:function(){this._updateSelection()},first:function(){this.onFirstFeature()},last:function(){this.onLastFeature()},next:function(){this.onNextFeature()},previous:function(){this.onPreviousFeature()},showFeature:function(x,z){z&&(this._createOnlyFirstTime=!0);
this._updateSelection([x],z);this._updateUI()},onLayerSelectionChange:function(x,z,J){this._createOnlyFirstTime=!1;this._featureIdx=J===l.SELECTION_NEW?0:this._featureIdx;this._updateSelection();this._updateUI()},onLayerSelectionClear:function(){!this._selection||0>=this._selection.length||(this._featureIdx=this._numFeatures=0,this._selection=[],this._currentLInfo=this._currentFeature=null,this._updateUI())},onLayerUpdateEnd:function(x,z,J,N){},onLayerError:function(x,z,J,N){},onLayerEditsError:function(x,
z,J,N){},onLayerEditsComplete:function(x,z,J,N){N=N||[];if(N.length){var ha=this._selection,la=x.featureLayer.objectIdField;B.forEach(N,H.hitch(this,function(na){B.some(ha,H.hitch(this,function(ja,pa){if(ja.attributes[la]!==na.objectId)return!1;this._selection.splice(pa,1);return!0}))}))}z=z||[];z.length&&(this._selection=Z.findFeatures(z,x.featureLayer),this._featureIdx=0);N=this._numFeatures=(this._selection=Z.sortFeaturesById(this._layerInfos,this._selection))?this._selection.length:0;if(z.length){if(z=
N?this._selection[this._featureIdx]:null)N=z.getLayer().getEditCapabilities(),N.canCreate&&!N.canUpdate||this._showFeature(z);this._updateUI()}J=J||[];if(J.length){var ia=this._rollbackInfo;B.forEach(J,function(na){var ja=Z.findFeatures(J,x.featureLayer)[0];if(!na.success&&ja.attributes[x.featureLayer.objectIdField]===na.objectId&&ia){var pa=ia.field;na=ia.graphic.attributes[pa.name];var sa=B.filter(this._currentLInfo.fieldInfos,function(ya){return ya.fieldName===pa.name},this)[0].dijit;ja.attributes[pa.name]=
na;"esriFieldTypeDate"===pa.type&&(na=new Date(na));this._setValue(sa,na)}},this)}this._rollbackInfo=null},onFieldValueChange:function(x,z){var J=x.field,N=x.dijit,ha=this._currentFeature,la=this._currentLInfo,ia=J.name;x=this._isFieldRequired(J,x);if(""===N.displayedValue||"dijit.form.ValidationTextBox"!==N.declaredClass||N.isValid())if(""!==N.displayedValue&&N.displayedValue!==z&&N.isValid&&!N.isValid())this._setValue(N,ha.attributes[J.name]);else{var na=!("esriFieldTypeInteger"!==J.type&&"esriFieldTypeSmallInteger"!==
J.type&&"esriFieldTypeSingle"!==J.type&&"esriFieldTypeDouble"!==J.type);if(x&&(null===z||""===z||"undefined"===typeof z||na&&isNaN(z))){ia=ha.attributes[J.name];if("esriFieldTypeDate"===J.type&&(ia=new Date(ia),N instanceof Array)){this._setValue(N[0],ia);this._setValue(N[1],ia);return}this._setValue(N,ia)}else{if(na){if(isNaN(z)||""===z)z=null;na&&null!==z&&(z=Number(z))}"esriFieldTypeDate"===J.type&&(N instanceof Array?(z=N[0].getValue(),N=N[1].getValue(),z=z&&N?new Date(z.getFullYear(),z.getMonth(),
z.getDate(),N.getHours(),N.getMinutes(),N.getSeconds(),N.getMilliseconds()):z||N||null):(z=N.getValue(),J.domain&&(z=Number(z))),z=z&&z.getTime?z.getTime():z&&z.toGregorian?z.toGregorian().getTime():z);if(this._currentFeature.attributes[J.name]!==z){if(ia===la.typeIdField){var ja=this._findFirst(la.types,"id",z);B.forEach(la.fieldInfos,function(pa){(J=pa.field)&&J.name!==la.typeIdField&&(pa=pa.dijit,this._setFieldDomain(pa,ja,J)&&pa&&(this._setValue(pa,ha.attributes[J.name]+""),!1===pa.isValid()&&
this._setValue(pa,null)))},this)}this.onAttributeChange(ha,ia,z)}}}else this._setValue(N,ha.attributes[J.name])},onDeleteBtn:function(x){this._deleteFeature()},onNextFeature:function(x){this._onNextFeature(1)},onPreviousFeature:function(x){this._onNextFeature(-1)},onFirstFeature:function(x){this._onNextFeature(-1*this._featureIdx)},onLastFeature:function(x){this._onNextFeature(this._numFeatures-1-this._featureIdx)},_initLayerInfos:function(){var x=this._layerInfos;this._editorTrackingInfos={};B.forEach(x,
this._initLayerInfo,this)},_initLayerInfo:function(x){var z=x.featureLayer,J;this._userIds={};var N=z.id;z.credential&&(this._userIds[N]=z.credential.userId);x.userId&&(this._userIds[N]=x.userId);this._connect(z,"onSelectionComplete",H.hitch(this,"onLayerSelectionChange",x));this._connect(z,"onSelectionClear",H.hitch(this,"onLayerSelectionClear",x));this._connect(z,"onEditsComplete",H.hitch(this,"onLayerEditsComplete",x));this._connect(z,"error",H.hitch(this,"onLayerError",x));this._connect(z,"onUpdateEnd",
H.hitch(this,"onLayerUpdateEnd",x));x.showAttachments=z.hasAttachments?w.isDefined(x.showAttachments)?x.showAttachments:!0:!1;x.hideFields=x.hideFields||[];x.htmlFields=x.htmlFields||[];x.isEditable=z.isEditable()?w.isDefined(x.isEditable)?x.isEditable:!0:!1;x.typeIdField=z.typeIdField;x.layerId=z.id;x.types=z.types;z.globalIdField&&((J=this._findFirst(x.fieldInfos,"fieldName",z.globalIdField))||x.showGlobalID||x.hideFields.push(z.globalIdField));(N=this._findFirst(x.fieldInfos,"fieldName",z.objectIdField))||
x.showObjectID||x.hideFields.push(z.objectIdField);var ha=this._getFields(x.featureLayer);if(ha){var la=x.fieldInfos||[];la=B.map(la,function(ia){return H.mixin({},ia)});la.length?x.fieldInfos=B.filter(B.map(la,H.hitch(this,function(ia){var na=ia.stringFieldOption||(this._isInFields(ia.fieldName,x.htmlFields)?ta.STRING_FIELD_OPTION_RICHTEXT:ta.STRING_FIELD_OPTION_TEXTBOX);return H.mixin(ia,{field:this._findFirst(ha,"name",ia.fieldName),stringFieldOption:na})})),"return item.field;"):(ha=B.filter(ha,
H.hitch(this,function(ia){return!this._isInFields(ia.name,x.hideFields)})),x.fieldInfos=B.map(ha,H.hitch(this,function(ia){var na=this._isInFields(ia.name,x.htmlFields)?ta.STRING_FIELD_OPTION_RICHTEXT:ta.STRING_FIELD_OPTION_TEXTBOX;return{fieldName:ia.name,field:ia,stringFieldOption:na}})));x.showGlobalID&&!J&&la.push(this._findFirst(ha,"name",z.globalIdField));x.showObjectID&&!N&&la.push(this._findFirst(ha,"name",z.objectIdField));J=[];z.editFieldsInfo&&(z.editFieldsInfo.creatorField&&J.push(z.editFieldsInfo.creatorField),
z.editFieldsInfo.creationDateField&&J.push(z.editFieldsInfo.creationDateField),z.editFieldsInfo.editorField&&J.push(z.editFieldsInfo.editorField),z.editFieldsInfo.editDateField&&J.push(z.editFieldsInfo.editDateField));this._editorTrackingInfos[z.id]=J}},_createAttachmentEditor:function(){this._attachmentEditor=null;var x=B.filter(this._layerInfos,function(z){return z.showAttachments});x&&x.length&&(this._attachmentEditor=new y({"class":this.css.attachmentEditor},this.attachmentEditor),this._attachmentEditor.startup())},
_setCurrentLInfo:function(x){var z=this._currentLInfo?this._currentLInfo.featureLayer:null,J=x.featureLayer;if(z&&z.id===J.id&&!z.ownershipBasedAccessControlForFeatures&&(z=J.getEditCapabilities(),!z.canCreate||z.canUpdate))return;this._currentLInfo=x;this._createTable()},_updateSelection:function(x,z){this._selection=x||[];B.forEach(this._layerInfos,this._getSelection,this);this._selection=Z.sortFeaturesById(this._layerInfos,this._selection);this._numFeatures=this._selection.length;this._showFeature(this._numFeatures?
this._selection[this._featureIdx]:null,z)},_getSelection:function(x){x=x.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(x)},_updateUI:function(){var x=this._numFeatures,z=this._currentLInfo;this.layerName.innerHTML=z&&0!==x?z.featureLayer?z.featureLayer.name:"":this.NLS_noFeaturesSelected;h.set(this.attributeTable,"display",x?"":"none");h.set(this.editButtons,"display",x?"":"none");h.set(this.navButtons,"display",!this._hideNavButtons&&1<x?"":"none");this.navMessage.innerHTML=
w.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);this._attachmentEditor&&h.set(this._attachmentEditor.domNode,"display",z&&z.showAttachments&&x?"":"none");h.set(this.deleteBtn.domNode,"display",z&&!1===z.showDeleteButton||!this._canDelete?"none":"");this.domNode.parentNode&&0<this.domNode.parentNode.scrollTop&&(this.domNode.parentNode.scrollTop=0)},_onNextFeature:function(x){this._featureIdx+=x;0>this._featureIdx?this._featureIdx=this._numFeatures-
1:this._featureIdx>=this._numFeatures&&(this._featureIdx=0);x=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(x);this._updateUI();this.onNext(x)},_deleteFeature:function(){this.onDelete(this._currentFeature)},_showFeature:function(x,z){if(x){this._currentFeature=x;z=z?z:x.getLayer();var J=z.getEditCapabilities({feature:x,userId:this._userIds[z.id]});this._canUpdate=J.canUpdate;this._canDelete=J.canDelete;if(J=this._getLInfoFromFeatureLayer(z)){this._setCurrentLInfo(J);
var N=x.attributes,ha=this._findFirst(J.types,"id",N[J.typeIdField]),la=null;B.forEach(J.fieldInfos,function(ia){la=ia.field;var na=[];ia.dijit&&1<ia.dijit.length?B.forEach(ia.dijit,function(ja){na.push(ja)}):na.push(ia.dijit);B.forEach(na,H.hitch(this,function(ja){if(ja){var pa=this._setFieldDomain(ja,ha,la),sa=N[la.name];sa=sa&&pa&&pa.codedValues&&pa.codedValues.length?pa.codedValues[sa]?pa.codedValues[sa].name:sa:sa;w.isDefined(sa)||(sa="");"dijit.form.DateTextBox"===ja.declaredClass||"dijit.form.TimeTextBox"===
ja.declaredClass?sa=""===sa?null:new Date(sa):"dijit.form.FilteringSelect"===ja.declaredClass&&(ja._lastValueReported=null,sa=N[la.name]+"");try{this._setValue(ja,sa),"dijit.form.FilteringSelect"===ja.declaredClass&&!1===ja.isValid()&&this._setValue(ja,null)}catch(ya){ja.set("displayedValue",this.NLS_errorInvalid,!1)}}}))},this);this._attachmentEditor&&J.showAttachments&&this._attachmentEditor.showAttachments(this._currentFeature,z);(x=z.getEditSummary(x))?(this.editorTrackingInfoDiv.innerHTML=x,
u.show(this.editorTrackingInfoDiv)):u.hide(this.editorTrackingInfoDiv)}}},_setFieldDomain:function(x,z,J){if(!x)return null;var N=J.domain;z&&z.domains&&z.domains[J.name]&&!1===z.domains[J.name]instanceof r&&(N=z.domains[J.name]);if(!N)return null;N.codedValues&&0<N.codedValues.length?(x.set("store",this._toStore(B.map(N.codedValues,function(ha){return{id:ha.code+"",name:ha.name}}))),this._setValue(x,N.codedValues[0].code+"")):(x.constraints={min:w.isDefined(N.minValue)?N.minValue:Number.MIN_VALUE,
max:w.isDefined(N.maxValue)?N.maxValue:Number.MAX_VALUE},this._setValue(x,x.constraints.min));return N},_setValue:function(x,z){x.set&&(x._onChangeActive=!1,x.set("value",z,!0),x._onChangeActive=!0)},_getFields:function(x){var z=x._getOutFields();if(!z)return null;x=x.fields;return"*"==z?x:B.filter(B.map(z,H.hitch(this,"_findFirst",x,"name")),w.isDefined)},_isInFields:function(x,z){return x&&(z||z.length)?B.some(z,function(J){return J.toLowerCase()===x.toLowerCase()}):!1},_isFieldNullable:function(x,
z){return!(!1===x.nullable||z.field&&!1===z.field.nullable)},_isFieldRequired:function(x,z){return!1!==x.editable&&!1!==z.isEditable&&!this._isFieldNullable(x,z)},_findFirst:function(x,z,J){return(x=B.filter(x,function(N){return N.hasOwnProperty(z)&&N[z]===J}))&&x.length?x[0]:null},_getLInfoFromFeatureLayer:function(x){return this._findFirst(this._layerInfos,"layerId",x?x.id:null)},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=q.create("table",
{cellspacing:"0",cellpadding:"0"},this.attributeTable);var x=q.create("tbody",null,this._attributes),z=this._currentLInfo,J=this._findFirst(z.types,"id",this._currentFeature.attributes[z.typeIdField]);B.forEach(z.fieldInfos,H.hitch(this,"_createField",J,x),this);this._createOnlyFirstTime=!1},_createField:function(x,z,J){var N=this._currentLInfo,ha=J.field;if(!this._isInFields(ha.name,N.hideFields)&&!this._isInFields(ha.name,this._editorTrackingInfos[N.featureLayer.id])){var la=!1,ia;z=q.create("tr",
null,z);var na=q.create("td",{innerHTML:J.label||ha.alias||ha.name,"class":this.css.label,"data-fieldname":ha.name},z);this._isFieldRequired(ha,J)&&q.create("span",{"class":this.css.red,innerHTML:" *"},na);z=q.create("td",null,z);if(J.customField){q.place(J.customField.domNode||J.customField,q.create("div",null,z),"first");var ja=J.customField}else if(!1===N.isEditable||!1===ha.editable||!1===J.isEditable||"esriFieldTypeOID"===ha.type||"esriFieldTypeGlobalID"===ha.type||!this._canUpdate&&!this._createOnlyFirstTime)la=
!0;N=N.typeIdField&&ha.name.toLowerCase()==N.typeIdField.toLowerCase();na=!!this._getDomainForField(ha,x);!ja&&N?ja=this._createTypeField(ha,J,z):!ja&&na&&(ja=this._createDomainField(ha,J,x,z));if(!ja)switch(ha.type){case "esriFieldTypeString":ja=this._createStringField(ha,J,z);break;case "esriFieldTypeDate":ja=this._createDateField(ha,J,z);J.format&&J.format.time&&(ia=this._createTimeField(ha,J,z));break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":ja=this._createIntField(ha,J,z);
break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":ja=this._createFltField(ha,J,z);break;default:ja=this._createStringField(ha,J,z)}J.tooltip&&J.tooltip.length&&this._toolTips.push(new aa({connectId:[ja.id],label:J.tooltip}));ja.onChange=H.hitch(this,"onFieldValueChange",J);ja.set("disabled",la);ia?(J.dijit=[ja,ia],ia.onChange=H.hitch(this,"onFieldValueChange",J),ia.set("disabled",la)):J.dijit=ja}},_createTypeField:function(x,z,J){J=q.create("div",null,J);var N=x.domain;return N&&"range"===
N.type&&N.minValue===N.maxValue?new L({"class":this.css.field,trim:!0,maxLength:x.length,name:x.alias||x.name,required:this._isFieldRequired(x,z)},J):new Q({"class":this.css.field,name:x.alias||x.name,required:this._isFieldRequired(x,z),store:this._toStore(B.map(this._currentLInfo.types,function(ha){return{id:ha.id,name:ha.name}})),searchAttr:"name"},J)},_getDomainForField:function(x,z){var J=x.domain;(x=x.name)&&z&&z.domains&&z.domains[x]&&!1===z.domains[x]instanceof r&&(J=z.domains[x]);return J||
null},_createDomainField:function(x,z,J,N){J=this._getDomainForField(x,J);N=q.create("div",null,N);return J.codedValues?new Q({"class":this.css.field,name:x.alias||x.name,searchAttr:"name",required:this._isFieldRequired(x,z)},N):new d({"class":this.css.field},N)},_createStringField:function(x,z,J){J=q.create("div",null,J);var N={trim:!0,maxLength:x.length,required:this._isFieldRequired(x,z)};if(z.stringFieldOption===ta.STRING_FIELD_OPTION_TEXTAREA)return N["class"]=this.css.field+" "+this.css.textArea,
new C(N,J);if(z.stringFieldOption===ta.STRING_FIELD_OPTION_RICHTEXT)return N["class"]=this.css.field+" "+this.css.richText,N.height="100%",N.width="100%",N.plugins=z.richTextPlugins||this._defaultRichTextPlugins,J=new I(N,J),J.startup(),J;var ha=this;N.validator=function(la,ia){this._maskValidSubsetError=!1;this._hasBeenBlurred=!0;return ha._isFieldNullable(x,z)||!(""===la||null===la)};return new L(N,J)},_createTimeField:function(x,z,J){J=q.create("div",null,J);x={"class":this.css.field,trim:!0,required:this._isFieldRequired(x,
z),constraints:{formatLength:"medium"}};this._datePackage&&(x.datePackage=this._datePackage);return new K(x,J)},_createDateField:function(x,z,J){J=q.create("div",null,J);x={"class":this.css.field,trim:!0,required:this._isFieldRequired(x,z)};this._datePackage&&(x.datePackage=this._datePackage);return new ea(x,J)},_createIntField:function(x,z,J){J=q.create("div",null,J);return new P({"class":this.css.field,constraints:"esriFieldTypeSmallInteger"===x.type?{min:-32768,max:32767,places:0}:{places:0},trim:!0,
invalidMessage:this.NLS_validationInt,required:this._isFieldRequired(x,z)},J)},_createFltField:function(x,z,J){J=q.create("div",null,J);return new P({"class":this.css.field,constraints:{max:Infinity,min:-Infinity,places:"0,20"},trim:!0,invalidMessage:this.NLS_validationFlt,required:this._isFieldRequired(x,z)},J)},_toStore:function(x){return new V({data:{identifier:"id",label:"name",items:x}})},_connect:function(x,z,J){this._aiConnects.push(O.connect(x,z,J))},_getDatePackage:function(x){return null===
x.datePackage?null:x.datePackage?x.datePackage:"ar"===t.locale?"dojox.date.islamic":null},_destroyAttributeTable:function(){B.forEach(this._layerInfos,function(x){B.forEach(x.fieldInfos,function(z){var J=z.dijit;if(J){J._onChangeHandle=null;if(z.customField)return;J instanceof Array?B.forEach(J,H.hitch(this,function(N){N.destroyRecursive?N.destroyRecursive():N.destroy&&N.destroy();N._onChangeHandle=null})):J.destroyRecursive?J.destroyRecursive():J.destroy&&J.destroy()}z.dijit=null},this)},this);B.forEach(this._toolTips,
function(x){x.destroy()});this._toolTips=[];this._attributes&&q.destroy(this._attributes)}});H.mixin(ta,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});k("extend-esri")&&H.setObject("dijit.AttributeInspector",ta,n);return ta})},"dijit/Editor":function(){define("require dojo/_base/array dojo/_base/declare dojo/Deferred dojo/i18n dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/string dojo/topic ./_Container ./Toolbar ./ToolbarSeparator ./layout/_LayoutWidget ./form/ToggleButton ./_editor/_Plugin ./_editor/plugins/EnterKeyHandling ./_editor/html ./_editor/range ./_editor/RichText ./main dojo/i18n!./_editor/nls/commands".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p,v,R,I,X,T,U,y,Z){function S(D){return new I({command:D.name})}function ea(D){return new I({buttonClass:R,command:D.name})}B=B("dijit.Editor",y,{plugins:null,extraPlugins:null,constructor:function(){w.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",X]);this._plugins=
[];this._editInterval=1E3*this.editActionInterval;if(u("ie")||u("trident")||u("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new O;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);w.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=e.getLocalization("dijit._editor",
"commands",this.lang);u("webkit")&&q.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new f({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));H.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);k.add(this.iframe.parentNode,"dijitEditorIFrameContainer");k.add(this.iframe,"dijitEditorIFrame");t.set(this.iframe,"allowTransparency",
!0);this.toolbar.startup();this.onNormalizedDisplayChanged()},destroy:function(){H.forEach(this._plugins,function(D){D&&D.destroy&&D.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(D,P){var Q=w.isString(D)?{name:D}:w.isFunction(D)?{ctor:D}:D;if(!Q.setEditor){var d={args:Q,plugin:null,editor:this};Q.name&&(I.registry[Q.name]?d.plugin=I.registry[Q.name](Q):l.publish(Z._scopeName+".Editor.getPlugin",d));if(!d.plugin)try{var m=
Q.ctor||w.getObject(Q.name)||M(Q.name);m&&(d.plugin=new m(Q))}catch(C){throw Error(this.id+": cannot find plugin ["+Q.name+"]");}if(!d.plugin)throw Error(this.id+": cannot find plugin ["+Q.name+"]");D=d.plugin}1<arguments.length?this._plugins[P]=D:this._plugins.push(D);D.setEditor(this);w.isFunction(D.setToolbar)&&D.setToolbar(this.toolbar)},resize:function(D){D&&v.prototype.resize.apply(this,arguments)},layout:function(){var D=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+h.getPadBorderExtents(this.iframe.parentNode).h+
h.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=D+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(D){var P,Q=this.document.body,d=Q.clientWidth,m=Q.clientHeight,C=Q.clientLeft,L=Q.offsetWidth,K=Q.offsetHeight,aa=Q.offsetLeft;/^rtl$/i.test(Q.dir||"")?d<L&&D.x>d&&D.x<L&&(P=!0):D.x<C&&D.x>aa&&(P=!0);P||m<K&&D.y>m&&D.y<K&&(P=!0);P||(delete this._cursorToStart,delete this._savedSelection,"BODY"==D.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(D){this.customUndo&&this.endEditing(!0);"BODY"!=D.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(D){this._inEditing||(this._inEditing=!0,this._beginEditing(D));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(D){if(!this.customUndo||
"undo"!=D&&"redo"!=D){this.customUndo&&(this.endEditing(),this._beginEditing());var P=this.inherited(arguments);this.customUndo&&this._endEditing();return P}return this[D]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(D){try{var P=this.document.execCommand(D,!1,null);if(u("webkit")&&!P)throw{};}catch(Q){P=r.substitute,alert(P(this.commands.systemShortcut,
[this.commands[D],P(this.commands[u("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[D]])])),P=!1}return P},queryCommandEnabled:function(D){return!this.customUndo||"undo"!=D&&"redo"!=D?this.inherited(arguments):"undo"==D?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(D){var P=D.mark,Q=D.mark;D=D.isCollapsed;var d;if(Q)if(9>u("ie")||9===u("ie")&&u("quirks"))if(w.isArray(Q))P=[],H.forEach(Q,function(L){P.push(U.getNode(L,this.editNode))},this),this.selection.moveToBookmark({mark:P,
isCollapsed:D});else{if(Q.startContainer&&Q.endContainer&&(d=U.getSelection(this.window))&&d.removeAllRanges){d.removeAllRanges();D=U.create(this.window);var m=U.getNode(Q.startContainer,this.editNode);var C=U.getNode(Q.endContainer,this.editNode);m&&C&&(D.setStart(m,Q.startOffset),D.setEnd(C,Q.endOffset),d.addRange(D))}}else(d=U.getSelection(this.window))&&d.removeAllRanges&&(d.removeAllRanges(),D=U.create(this.window),m=U.getNode(Q.startContainer,this.editNode),C=U.getNode(Q.endContainer,this.editNode),
m&&C&&(D.setStart(m,Q.startOffset),D.setEnd(C,Q.endOffset),d.addRange(D)))},_changeToStep:function(D,P){this.setValue(P.text);(D=P.bookmark)&&this._moveToBookmark(D)},undo:function(){var D=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var P=this._steps.pop();P&&0<this._steps.length&&(this.focus(),this._changeToStep(P,this._steps[this._steps.length-1]),this._undoedSteps.push(P),this.onDisplayChanged(),delete this._undoRedoActive,D=!0);delete this._undoRedoActive}return D},
redo:function(){var D=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var P=this._undoedSteps.pop();P&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],P),this._steps.push(P),this.onDisplayChanged(),D=!0);delete this._undoRedoActive}return D},endEditing:function(D){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(D),this._inEditing=!1)},_getBookmark:function(){var D=this.selection.getBookmark(),
P=[];if(D&&D.mark){var Q=D.mark;if(9>u("ie")||9===u("ie")&&u("quirks")){var d=U.getSelection(this.window);if(w.isArray(Q))H.forEach(D.mark,function(C){P.push(U.getIndex(C,this.editNode).o)},this),D.mark=P;else if(d){var m;d.rangeCount&&(m=d.getRangeAt(0));D.mark=m?m.cloneRange():this.selection.getBookmark()}}try{D.mark&&D.mark.startContainer&&(P=U.getIndex(D.mark.startContainer,this.editNode).o,D.mark={startContainer:P,startOffset:D.mark.startOffset,endContainer:D.mark.endContainer===D.mark.startContainer?
P:U.getIndex(D.mark.endContainer,this.editNode).o,endOffset:D.mark.endOffset})}catch(C){D.mark=null}}return D},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:T.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var D=T.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:D,bookmark:this._getBookmark()})},onKeyDown:function(D){u("ie")||this.iframe||D.keyCode!=n.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var P=
D.keyCode;if(D.ctrlKey&&!D.shiftKey&&!D.altKey){if(90==P||122==P){D.stopPropagation();D.preventDefault();this.undo();return}if(89==P||121==P){D.stopPropagation();D.preventDefault();this.redo();return}}this.inherited(arguments);switch(P){case n.ENTER:case n.BACKSPACE:case n.DELETE:this.beginEditing();break;case 88:case 86:if(D.ctrlKey&&!D.altKey&&!D.metaKey){this.endEditing();88==D.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!D.ctrlKey&&!D.altKey&&
!D.metaKey&&(D.keyCode<n.F1||D.keyCode>n.F15)){this.beginEditing();break}case n.ALT:this.endEditing();break;case n.UP_ARROW:case n.DOWN_ARROW:case n.LEFT_ARROW:case n.RIGHT_ARROW:case n.HOME:case n.END:case n.PAGE_UP:case n.PAGE_DOWN:this.endEditing(!0);case n.CTRL:case n.SHIFT:case n.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(D){}},_restoreSelection:function(){this._savedSelection&&
(delete this._cursorToStart,this.selection.isCollapsed()&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(D){this.customUndo?this.isClosed?this.setValue(D):(this.beginEditing(),D||(D="\x26#160;"),this.setValue(D),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(D){this.setValueDeferred.then(w.hitch(this,function(){!this.disabled&&D||!this._buttonEnabledPlugins&&D?
H.forEach(this._plugins,function(P){P.set("disabled",!0)}):this.disabled&&!D&&H.forEach(this._plugins,function(P){P.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(q.set(this.document.body,"color",q.get(this.iframe,"color")),q.set(this.document.body,"background-color",q.get(this.iframe,"background-color")))}catch(D){}}});w.mixin(I.registry,{undo:S,redo:S,cut:S,copy:S,paste:S,insertOrderedList:S,insertUnorderedList:S,
indent:S,outdent:S,justifyCenter:S,justifyFull:S,justifyLeft:S,justifyRight:S,"delete":S,selectAll:S,removeFormat:S,unlink:S,insertHorizontalRule:S,bold:ea,italic:ea,underline:ea,strikethrough:ea,subscript:ea,superscript:ea,"|":function(){return new I({setEditor:function(D){this.editor=D;this.button=new p({ownerDocument:D.ownerDocument})}})}});return B})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(M,H,B,O,e,t,k,h){B("dijit-legacy-requires")&&e(0,function(){M(["dijit/ToolbarSeparator"])});return H("dijit.Toolbar",[t,h,k],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],
function(M,H,B,O){return M("dijit.ToolbarSeparator",[B,O],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);H.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/_editor/_Plugin":function(){define(["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(M,H,B,O,e){H=H("dijit._editor._Plugin",O,{constructor:function(t){this.params=
t||{};B.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:e,disabled:!1,getLabel:function(t){return this.editor.commands[t]},_initButton:function(){if(this.command.length){var t=this.getLabel(this.command),k=this.editor,h=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(t=B.mixin({label:t,ownerDocument:k.ownerDocument,dir:k.dir,
lang:k.lang,showLabel:!1,iconClass:h,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete t.name,this.button=new this.buttonClass(t))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(t,k,h){this.own(M.connect(t,k,this,h))},updateState:function(){var t=this.editor,k=this.command;if(t&&t.isLoaded&&k.length){var h=this.get("disabled");if(this.button)try{var q=
t._implCommand(k);var n=!h&&(this[q]?this[q](k):t.queryCommandEnabled(k));this.enabled!==n&&(this.enabled=n,this.button.set("disabled",!n));if(n&&"boolean"==typeof this.button.checked){var w=t.queryCommandState(k);this.checked!==w&&(this.checked=w,this.button.set("checked",t.queryCommandState(k)))}}catch(u){console.log(u)}}},setEditor:function(t){this.editor=t;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",B.hitch(this.editor,
"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",B.hitch(this,"updateState")))},setToolbar:function(t){this.button&&t.addChild(this.button)},set:function(t,k){if("object"===typeof t){for(var h in t)this.set(h,t[h]);return this}h=this._getAttrNames(t);if(this[h.s])var q=this[h.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(t,k);return q||this},get:function(t){var k=this._getAttrNames(t);
return this[k.g]?this[k.g]():this[t]},_setDisabledAttr:function(t){this._set("disabled",t);this.updateState()},_getAttrNames:function(t){var k=this._attrPairNames;if(k[t])return k[t];var h=t.charAt(0).toUpperCase()+t.substr(1);return k[t]={s:"_set"+h+"Attr",g:"_get"+h+"Attr"}},_set:function(t,k){this[t]=k}});H.registry={};return H})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dojo/_base/declare dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w){return M("dijit._editor.plugins.EnterKeyHandling",q,{blockNodeForEnter:"BR",constructor:function(u){u&&("blockNodeForEnter"in u&&(u.blockNodeForEnter=u.blockNodeForEnter.toUpperCase()),O.mixin(this,u))},setEditor:function(u){if(this.editor!==u)if(this.editor=u,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,u.onLoadDeferred.then(O.hitch(this,function(l){this.own(e(u.document,"keydown",O.hitch(this,function(F){if(F.keyCode==B.ENTER){var f=O.mixin({},F);f.shiftKey=
!0;this.handleEnterKey(f)||(F.stopPropagation(),F.preventDefault())}})));9<=t("ie")&&10>=t("ie")&&this.own(e(u.document,"paste",O.hitch(this,function(F){setTimeout(O.hitch(this,function(){var f=this.editor.document.selection.createRange();f.move("character",-1);f.select();f.move("character",1);f.select()}),0)})));return l}));else if(this.blockNodeForEnter){var r=O.hitch(this,"handleEnterKey");u.addKeyHandler(13,0,0,r);u.addKeyHandler(13,0,1,r);this.own(this.editor.on("KeyPressed",O.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var u=this.editor.selection.getAncestorElement("LI");if(u){t("mozilla")&&"LI"==u.parentNode.parentNode.nodeName&&(u=u.parentNode.parentNode);var r=u.firstChild;!r||1!=r.nodeType||"UL"!=r.nodeName&&"OL"!=r.nodeName||(u.insertBefore(r.ownerDocument.createTextNode("\u00a0"),r),r=w.create(this.editor.window),r.setStart(u.firstChild,0),u=w.getSelection(this.editor.window,!0),u.removeAllRanges(),u.addRange(r))}else n.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(u=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(u.innerHTML=this.bogusHtmlContent,9>=t("ie")&&(u=this.editor.document.selection.createRange(),u.move("character",-1),u.select())):console.error("onKeyPressed: Cannot find the new block node")}this._checkListLater=!1}this._pressedEnterInBlock&&(this._pressedEnterInBlock.previousSibling&&this.removeTrailingBr(this._pressedEnterInBlock.previousSibling),delete this._pressedEnterInBlock)},bogusHtmlContent:"\x26#160;",
blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(u){var r,l=this.editor.document,F;if(u.shiftKey){u=this.editor.selection.getParentElement();if(r=w.getAncestor(u,this.blockNodes)){if("LI"==r.tagName)return!0;u=w.getSelection(this.editor.window);var f=u.getRangeAt(0);f.collapsed||(f.deleteContents(),u=w.getSelection(this.editor.window),f=u.getRangeAt(0));if(w.atBeginningOfContainer(r,f.startContainer,f.startOffset)){var p=l.createElement("br");f=w.create(this.editor.window);r.insertBefore(p,
r.firstChild);f.setStartAfter(p);u.removeAllRanges();u.addRange(f)}else if(w.atEndOfContainer(r,f.startContainer,f.startOffset))f=w.create(this.editor.window),p=l.createElement("br"),r.appendChild(p),r.appendChild(l.createTextNode("\u00a0")),f.setStart(r.lastChild,0),u.removeAllRanges(),u.addRange(f);else{if((F=f.startContainer)&&3==F.nodeType){var v=F.nodeValue;var R=l.createTextNode(v.substring(0,f.startOffset));var I=l.createTextNode(v.substring(f.startOffset));r=l.createElement("br");""==I.nodeValue&&
t("webkit")&&(I=l.createTextNode("\u00a0"));H.place(R,F,"after");H.place(r,R,"after");H.place(I,r,"after");H.destroy(F);f=w.create(this.editor.window);f.setStart(I,0);u.removeAllRanges();u.addRange(f);return!1}return!0}}else u=w.getSelection(this.editor.window),u.rangeCount?(f=u.getRangeAt(0))&&f.startContainer&&(f.collapsed||(f.deleteContents(),u=w.getSelection(this.editor.window),f=u.getRangeAt(0)),(F=f.startContainer)&&3==F.nodeType?(r=f.startOffset,F.length<r&&(I=this._adjustNodeAndOffset(F,r),
F=I.node,r=I.offset),v=F.nodeValue,R=l.createTextNode(v.substring(0,r)),I=l.createTextNode(v.substring(r)),r=l.createElement("br"),I.length||(I=l.createTextNode("\u00a0")),R.length?H.place(R,F,"after"):R=F,H.place(r,R,"after"),H.place(I,r,"after"),H.destroy(F)):(0<=f.startOffset&&(p=F.childNodes[f.startOffset]),r=l.createElement("br"),I=l.createTextNode("\u00a0"),p?(H.place(r,p,"before"),H.place(I,r,"after")):(F.appendChild(r),F.appendChild(I))),f=w.create(this.editor.window),f.setStart(I,0),f.setEnd(I,
I.length),u.removeAllRanges(),u.addRange(f),this.editor.selection.collapse(!0)):n.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var X=!0;u=w.getSelection(this.editor.window);f=u.getRangeAt(0);f.collapsed||(f.deleteContents(),u=w.getSelection(this.editor.window),f=u.getRangeAt(0));p=w.getBlockAncestor(f.endContainer,null,this.editor.editNode);var T=p.blockNode;if(this._checkListLater=T&&("LI"==T.nodeName||"LI"==T.parentNode.nodeName))return t("mozilla")&&(this._pressedEnterInBlock=
T),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(T.innerHTML)&&(T.innerHTML="",t("webkit")&&(f=w.create(this.editor.window),f.setStart(T,0),u.removeAllRanges(),u.addRange(f)),this._checkListLater=!1),!0;if(!p.blockNode||p.blockNode===this.editor.editNode){try{n.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(U){}p={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(p.blockNode){if(p.blockNode!=this.editor.editNode&&!(p.blockNode.textContent||p.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(p.blockNode),!1}else p.blockNode=this.editor.editNode;u=w.getSelection(this.editor.window);f=u.getRangeAt(0)}T=l.createElement(this.blockNodeForEnter);T.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(p.blockNode);I=f.endOffset;X=f.endContainer;X.length<I&&(I=this._adjustNodeAndOffset(X,I),X=
I.node,I=I.offset);if(w.atEndOfContainer(p.blockNode,X,I))p.blockNode===p.blockContainer?p.blockNode.appendChild(T):H.place(T,p.blockNode,"after"),X=!1,f=w.create(this.editor.window),f.setStart(T,0),u.removeAllRanges(),u.addRange(f),this.editor.height&&h.scrollIntoView(T);else if(w.atBeginningOfContainer(p.blockNode,f.startContainer,f.startOffset))H.place(T,p.blockNode,p.blockNode===p.blockContainer?"first":"before"),T.nextSibling&&this.editor.height&&(f=w.create(this.editor.window),f.setStart(T.nextSibling,
0),u.removeAllRanges(),u.addRange(f),h.scrollIntoView(T.nextSibling)),X=!1;else{p.blockNode===p.blockContainer?p.blockNode.appendChild(T):H.place(T,p.blockNode,"after");X=!1;p.blockNode.style&&T.style&&p.blockNode.style.cssText&&(T.style.cssText=p.blockNode.style.cssText);if((F=f.startContainer)&&3==F.nodeType){I=f.endOffset;F.length<I&&(I=this._adjustNodeAndOffset(F,I),F=I.node,I=I.offset);v=F.nodeValue;R=l.createTextNode(v.substring(0,I));I=l.createTextNode(v.substring(I,v.length));H.place(R,F,
"before");H.place(I,F,"after");H.destroy(F);for(f=R.parentNode;f!==p.blockNode;){v=l.createElement(f.tagName);f.style&&v.style&&f.style.cssText&&(v.style.cssText=f.style.cssText);"FONT"===f.tagName&&(f.color&&(v.color=f.color),f.face&&(v.face=f.face),f.size&&(v.size=f.size));for(;I;)F=I.nextSibling,v.appendChild(I),I=F;H.place(v,f,"after");R=f;I=v;f=f.parentNode}if(1==I.nodeType||3==I.nodeType&&I.nodeValue)T.innerHTML="";for(R=I;I;)F=I.nextSibling,T.appendChild(I),I=F}f=w.create(this.editor.window);
l=R;if("BR"!==this.blockNodeForEnter){for(;l;)r=l,l=F=l.firstChild;r&&r.parentNode?(T=r.parentNode,f.setStart(T,0),u.removeAllRanges(),u.addRange(f),this.editor.height&&h.scrollIntoView(T),t("mozilla")&&(this._pressedEnterInBlock=p.blockNode)):X=!0}else f.setStart(T,0),u.removeAllRanges(),u.addRange(f),this.editor.height&&h.scrollIntoView(T),t("mozilla")&&(this._pressedEnterInBlock=p.blockNode)}return X},_adjustNodeAndOffset:function(u,r){for(;u.length<r&&u.nextSibling&&3==u.nextSibling.nodeType;)r-=
u.length,u=u.nextSibling;return{node:u,offset:r}},removeTrailingBr:function(u){if(u=/P|DIV|LI/i.test(u.tagName)?u:this.editor.selection.getParentOfType(u,["P","DIV","LI"]))u.lastChild&&(1<u.childNodes.length&&3==u.lastChild.nodeType&&/^[\s\xAD]*$/.test(u.lastChild.nodeValue)||"BR"==u.lastChild.tagName)&&H.destroy(u.lastChild),u.childNodes.length||(u.innerHTML=this.bogusHtmlContent)}})})},"dijit/_editor/RichText":function(){define("dojo/_base/array dojo/_base/config dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/domReady dojo/sniff dojo/string dojo/topic dojo/_base/unload dojo/_base/url dojo/window ../_Widget ../_CssStateMixin ../selection ./range ./html ../focus ../main".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p,v,R,I,X,T,U,y,Z,S,ea,D,P){var Q=B("dijit._editor.RichText",[U,y],{constructor:function(d){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};d&&r.isString(d.value)&&(this.value=d.value);this.onLoadDeferred=new O},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em",
isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[r.trim,r.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);p("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));p("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(p("ie")||p("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[r.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[r.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);R.publish(P._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var d=r.hitch(this,function(L,K){return function(){return!this.execCommand(L,K)}}),m={b:d("bold"),i:d("italic"),u:d("underline"),a:d("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:d("formatblock",
"h1"),2:d("formatblock","h2"),3:d("formatblock","h3"),4:d("formatblock","h4"),"\\":d("insertunorderedlist")};p("ie")||(m.Z=d("redo"));for(var C in m)this.addKeyHandler(C,!0,!1,m[C])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(Q._editorCommandsLocalized)this._local2NativeFormatNames=Q._local2NativeFormatNames,this._native2LocalFormatNames=Q._native2LocalFormatNames;else{Q._editorCommandsLocalized=!0;Q._local2NativeFormatNames={};
Q._native2LocalFormatNames={};this._local2NativeFormatNames=Q._local2NativeFormatNames;this._native2LocalFormatNames=Q._native2LocalFormatNames;for(var d="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),m="",C,L=0;C=d[L++];)m="l"!==C.charAt(1)?m+("\x3c"+C+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+C+"\x3e\x3cbr/\x3e"):m+("\x3c"+C+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+C+"\x3e\x3cbr/\x3e");var K=h.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:m});this.ownerDocumentBody.appendChild(K);
d=r.hitch(this,function(){for(var aa=K.firstChild;aa;)try{this.selection.selectElement(aa.firstChild);var V=aa.tagName.toLowerCase();this._local2NativeFormatNames[V]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[V]]=V;aa=aa.nextSibling.nextSibling}catch(ba){}h.destroy(K)});this.defer(d)}},open:function(d){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new O;this.isClosed||this.close();R.publish(P._scopeName+"._editor.RichText::open",
this);1===arguments.length&&d.nodeName&&(this.domNode=d);var m=this.domNode;if(r.isString(this.value)){var C=this.value;m.innerHTML=""}else if(m.nodeName&&"textarea"==m.nodeName.toLowerCase()){var L=this.textarea=m;this.name=L.name;C=L.value;m=this.domNode=this.ownerDocument.createElement("div");m.setAttribute("widgetId",this.id);L.removeAttribute("widgetId");m.cssText=L.cssText;m.className+=" "+L.className;h.place(m,L,"before");var K=r.hitch(this,function(){n.set(L,{display:"block",position:"absolute",
top:"-1000px"});if(p("ie")){var G=L.style;this.__overflow=G.overflow;G.overflow="hidden"}});p("ie")?this.defer(K,10):K();if(L.form){var aa=L.value;this.reset=function(){this.getValue()!==aa&&this.replaceValue(aa)};l(L.form,"submit",r.hitch(this,function(){t.set(L,"disabled",this.disabled);L.value=this.getValue()}))}}else C=ea.getChildrenHtml(m),m.innerHTML="";this.value=C;m.nodeName&&"LI"===m.nodeName&&(m.innerHTML=" \x3cbr\x3e");this.header=m.ownerDocument.createElement("div");m.appendChild(this.header);
this.editingArea=m.ownerDocument.createElement("div");m.appendChild(this.editingArea);this.footer=m.ownerDocument.createElement("div");m.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!H.useXDomain||H.allowXdRichTextSave)){if((C=e.byId(P._scopeName+"._editor.RichText.value"))&&""!==C.value){K=C.value.split(this._SEPARATOR);for(var V=0,ba;ba=K[V++];)if(ba=ba.split(this._NAME_CONTENT_SEP),ba[0]===this.name){this.value=ba[1];K=K.splice(V,1);C.value=K.join(this._SEPARATOR);
break}}Q._globalSaveHandler||(Q._globalSaveHandler={},I.addOnUnload(function(){for(var G in Q._globalSaveHandler){var Y=Q._globalSaveHandler[G];r.isFunction(Y)&&Y()}}));Q._globalSaveHandler[this.id]=r.hitch(this,"_saveContent")}this.isClosed=!1;C=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");C.id=this.id+"_iframe";C.style.border="none";C.style.width="100%";this._layoutMode?C.style.height="100%":7<=p("ie")?(this.height&&(C.style.height=this.height),this.minHeight&&(C.style.minHeight=
this.minHeight)):C.style.height=this.height?this.height:this.minHeight;C.frameBorder=0;C._loadFunc=r.hitch(this,function(G){this.window=G;this.document=G.document;this.selection=new Z.SelectionManager(G);p("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});K=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");K=11>p("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+K+"');document.close()":"javascript: '"+
K+"'";this.editingArea.appendChild(C);C.src=K;"LI"===m.nodeName&&(m.lastChild.style.marginTop="-1.2em");k.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var d=n.getComputedStyle(this.domNode);if(this["aria-label"])var m=this["aria-label"];else{var C=F('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||e.byId(this["aria-labelledby"],this.ownerDocument);C&&(m=C.textContent||C.innerHTML||"")}C="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(m?" aria-label\x3d'"+v.escape(m)+"'":"")+"\x3e\x3c/div\x3e";var L=[d.fontWeight,d.fontSize,d.fontFamily].join(" "),K=d.lineHeight;K=0<=K.indexOf("px")?parseFloat(K)/parseFloat(d.fontSize):0<=K.indexOf("em")?parseFloat(K):"normal";var aa="",V=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(ba){ba=ba.replace(/^;/ig,"")+";";var G=ba.split(":")[0];if(G){G=r.trim(G);G=G.toLowerCase();var Y,W="";for(Y=0;Y<G.length;Y++){var ta=G.charAt(Y);switch(ta){case "-":Y++,ta=G.charAt(Y).toUpperCase();
default:W+=ta}}n.set(V.domNode,W,"")}aa+=ba+";"});this.iframe.setAttribute("title",m);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||w.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",m?"\x3ctitle\x3e"+v.escape(m)+"\x3c/title\x3e":"","\x3cstyle\x3e\n\tbody,html {\n\t\tbackground:transparent;\n\t\tpadding: 1px 0 0 0;\n\t\tmargin: -1px 0 0 0;\n\t}\n\tbody,html,#dijitEditorBody { outline: none; }html { height: 100%; width: 100%; overflow: hidden; }\n",
this.height?"\tbody,#dijitEditorBody { height: 100%; width: 100%; overflow: auto; }\n":"\tbody,#dijitEditorBody { min-height: "+this.minHeight+"; width: 100%; overflow-x: auto; overflow-y: hidden; }\n","\tbody{\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\tfont:",L,";\n",this.height||p("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",K,";\n\t}\n\tp{ margin: 1em 0; }\n\tli \x3e ul:-moz-first-node, li \x3e ol:-moz-first-node{ padding-top: 1.2em; }\n",p("ie")||p("trident")||p("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",m?" aria-label\x3d'"+v.escape(m)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+aa+"'\x3e",C,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var d=[];this.styleSheets&&(d=this.styleSheets.split(";"),this.styleSheets=
"");d=d.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var m="",C=0,L,K=T.get(this.ownerDocument);L=d[C++];)L=(new X(K.location,L)).toString(),this.editingAreaStyleSheets.push(L),m+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+L+'"/\x3e';return m},addStyleSheet:function(d){var m=d.toString(),C=T.get(this.ownerDocument);if("."===m.charAt(0)||"/"!==m.charAt(0)&&!d.host)m=(new X(C.location,m)).toString();-1<M.indexOf(this.editingAreaStyleSheets,m)||(this.editingAreaStyleSheets.push(m),
this.onLoadDeferred.then(r.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(m);else{var L=this.document.getElementsByTagName("head")[0],K=this.document.createElement("link");K.rel="stylesheet";K.type="text/css";K.href=m;L.appendChild(K)}})))},removeStyleSheet:function(d){var m=d.toString(),C=T.get(this.ownerDocument);if("."===m.charAt(0)||"/"!==m.charAt(0)&&!d.host)m=(new X(C.location,m)).toString();d=M.indexOf(this.editingAreaStyleSheets,m);-1!==d&&(delete this.editingAreaStyleSheets[d],
F('link[href\x3d"'+m+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(d){d=!!d;this._set("disabled",d);if(this.isLoaded){var m=p("ie")&&(this.isLoaded||!this.focusOnLoad);m&&(this.editNode.unselectable="on");this.editNode.contentEditable=!d;this.editNode.tabIndex=d?"-1":this.tabIndex;m&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(p("mozilla")&&!d&&this._mozSettingProps){d=this._mozSettingProps;for(var C in d)if(d.hasOwnProperty(C))try{this.document.execCommand(C,
!1,d[C])}catch(L){}}this._disabledOK=!0}},onLoad:function(d){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=D.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var m=this;this.beforeIframeNode=h.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=h.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){m.editNode.focus()};this.focusNode=
this.editNode;var C=this.events.concat(this.captureEvents),L=this.iframe?this.document:this.editNode;this.own.apply(this,M.map(C,function(K){var aa=K.toLowerCase().replace(/^on/,"");return l(L,aa,r.hitch(this,K))},this));this.own(l(L,"mouseup",r.hitch(this,"onClick")));p("ie")&&(this.own(l(this.document,"mousedown",r.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);p("webkit")&&(this._webkitListener=this.own(l(this.document,"mouseup",r.hitch(this,"onDisplayChanged")))[0],this.own(l(this.document,
"mousedown",r.hitch(this,function(K){K=K.target;!K||K!==this.document.body&&K!==this.document||this.defer("placeCursorAtEnd")}))));if(p("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(K){}this.isLoaded=!0;this.set("disabled",this.disabled);C=r.hitch(this,function(){this.setValue(d);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&f(r.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(C):C()},onKeyDown:function(d){if(d.keyCode===u.SHIFT||d.keyCode===u.ALT||d.keyCode===u.META||d.keyCode===u.CTRL)return!0;d.keyCode===u.TAB&&this.isTabIndent&&(d.stopPropagation(),d.preventDefault(),this.queryCommandEnabled(d.shiftKey?"outdent":"indent")&&this.execCommand(d.shiftKey?"outdent":"indent"));if(d.keyCode==u.TAB&&!this.isTabIndent&&!d.ctrlKey&&!d.altKey)return d.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>p("ie")&&d.keyCode===u.BACKSPACE&&"Control"===this.document.selection.type&&(d.stopPropagation(),d.preventDefault(),this.execCommand("delete"));p("ff")&&(d.keyCode===u.PAGE_UP||d.keyCode===u.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&d.preventDefault();var m=this._keyHandlers[d.keyCode],C=arguments;m&&!d.altKey&&M.some(m,function(L){if(!(L.shift^d.shiftKey||L.ctrl^(d.ctrlKey||d.metaKey)))return L.handler.apply(this,C)||d.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(d){w.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",d)},_setValueAttr:function(d){this.setValue(d)},_setDisableSpellCheckAttr:function(d){this.document?t.set(this.document.body,"spellcheck",!d):this.onLoadDeferred.then(r.hitch(this,function(){t.set(this.document.body,"spellcheck",!d)}));this._set("disableSpellCheck",d)},addKeyHandler:function(d,m,C,L){"string"==
typeof d&&(d=d.toUpperCase().charCodeAt(0));r.isArray(this._keyHandlers[d])||(this._keyHandlers[d]=[]);this._keyHandlers[d].push({shift:C||!1,ctrl:m||!1,handler:L})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(d){this.onDisplayChanged(d)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(d){(p("ie")||p("trident"))&&this.defer(function(){D.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var m=this.getValue(!0);if(m!==this.value)this.onChange(m);
this._set("value",m)},_onFocus:function(d){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!p("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():this.ownerDocumentBody.focus&&this.ownerDocumentBody.focus()},focus:function(){this.isLoaded?9>p("ie")?this.iframe.fireEvent("onfocus",document.createEventObject()):this.editNode.focus():this.focusOnLoad=!0},updateInterval:200,
_updateTimer:null,onDisplayChanged:function(){this._updateTimer&&this._updateTimer.remove();this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(d,m){d=d.toLowerCase();"formatblock"===d?p("safari")&&void 0===m&&(d="heading"):"hilitecolor"!==d||p("mozilla")||(d="backcolor");return d},_implCommand:function(d){return"_"+this._normalizeCommand(d)+"EnabledImpl"},_qcaCache:{},
queryCommandAvailable:function(d){var m=this._qcaCache[d];return void 0!==m?m:this._qcaCache[d]=this._queryCommandAvailable(d)},_queryCommandAvailable:function(d){switch(d.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":case "cut":case "copy":case "paste":return!0;
case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":return p("ie")||p("trident")||p("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!p("webkit");default:return!1}},execCommand:function(d,m){this.focused&&this.focus();d=this._normalizeCommand(d,m);if(void 0!==m){if("heading"===d)throw Error("unimplemented");"formatblock"===
d&&(p("ie")||p("trident"))&&(m="\x3c"+m+"\x3e")}var C="_"+d+"Impl";if(this[C])var L=this[C](m);else if((m=1<arguments.length?m:null)||"createlink"!==d)L=this.document.execCommand(d,!1,m);this.onDisplayChanged();return L},queryCommandEnabled:function(d){if(this.disabled||!this._disabledOK)return!1;d=this._normalizeCommand(d);var m=this._implCommand(d);return this[m]?this[m](d):this._browserQueryCommandEnabled(d)},queryCommandState:function(d){if(this.disabled||!this._disabledOK)return!1;d=this._normalizeCommand(d);
try{return this.document.queryCommandState(d)}catch(m){return!1}},queryCommandValue:function(d){if(this.disabled||!this._disabledOK)return!1;d=this._normalizeCommand(d);if(p("ie")&&"formatblock"===d)d=this._native2LocalFormatNames[this.document.queryCommandValue(d)];else if(p("mozilla")&&"hilitecolor"===d){try{var m=this.document.queryCommandValue("styleWithCSS")}catch(C){m=!1}this.document.execCommand("styleWithCSS",!1,!0);d=this.document.queryCommandValue(d);this.document.execCommand("styleWithCSS",
!1,m)}else d=this.document.queryCommandValue(d);return d},_sCall:function(d,m){return this.selection[d].apply(this.selection,m)},placeCursorAtStart:function(){this.focus();var d=!1;if(p("mozilla"))for(var m=this.editNode.firstChild;m;){if(3===m.nodeType){if(0<m.nodeValue.replace(/^\s+|\s+$/g,"").length){d=!0;this.selection.selectElement(m);break}}else if(1===m.nodeType){d=!0;var C=m.tagName?m.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(C)?this.selection.selectElement(m):
this.selection.selectElementChildren(m);break}m=m.nextSibling}else d=!0,this.selection.selectElementChildren(this.editNode);d&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var d=!1;if(p("mozilla"))for(var m=this.editNode.lastChild;m;){if(3===m.nodeType){if(0<m.nodeValue.replace(/^\s+|\s+$/g,"").length){d=!0;this.selection.selectElement(m);break}}else if(1===m.nodeType){d=!0;this.selection.selectElement(m.lastChild||m);break}m=m.previousSibling}else d=!0,this.selection.selectElementChildren(this.editNode);
d&&this.selection.collapse(!1)},getValue:function(d){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,d):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(d){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){d=this._preFilterContent(d);var m=this.isClosed?this.domNode:this.editNode;m.innerHTML=d;this._preDomFilterContent(m)}else this.textarea.value=d;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(r.hitch(this,function(){this.setValue(d)}))},replaceValue:function(d){this.isClosed?this.setValue(d):this.window&&this.window.getSelection&&!p("mozilla")?this.setValue(d):this.window&&this.window.getSelection?(d=this._preFilterContent(d),this.execCommand("selectall"),this.execCommand("inserthtml",d),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(d);this._set("value",this.getValue(!0))},_preFilterContent:function(d){var m=
d;M.forEach(this.contentPreFilters,function(C){C&&(m=C(m))});return m},_preDomFilterContent:function(d){d=d||this.editNode;M.forEach(this.contentDomPreFilters,function(m){m&&r.isFunction(m)&&m(d)},this)},_postFilterContent:function(d,m){if(r.isString(d))var C=d;else d=d||this.editNode,this.contentDomPostFilters.length&&(m&&(d=r.clone(d)),M.forEach(this.contentDomPostFilters,function(L){d=L(d)})),C=ea.getChildrenHtml(d);r.trim(C.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(C="");M.forEach(this.contentPostFilters,
function(L){C=L(C)});return C},_saveContent:function(){var d=e.byId(P._scopeName+"._editor.RichText.value");d&&(d.value&&(d.value+=this._SEPARATOR),d.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(d,m){d=d.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");m||(d=d.replace(/'/gm,"\x26#39;"));return d},getNodeHtml:function(d){w.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return ea.getNodeHtml(d)},getNodeChildrenHtml:function(d){w.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return ea.getChildrenHtml(d)},close:function(d){if(!this.isClosed){arguments.length||(d=!0);d&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);p("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var m=this.textarea.style;m.position="";m.left=m.top="";p("ie")&&(m.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;h.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;k.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode;this.window&&this.window._frameElement&&(this.window._frameElement=
null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&this._updateTimer.remove();this.inherited(arguments);Q._globalSaveHandler&&delete Q._globalSaveHandler[this.id]},_removeMozBogus:function(d){return d.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(d){d=d.replace(/\sclass="webkit-block-placeholder"/gi,"");d=d.replace(/\sclass="apple-style-span"/gi,
"");return d=d.replace(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(d){return d.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(d){return d.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2")},_browserQueryCommandEnabled:function(d){if(!d)return!1;
if(p("ie")||p("trident")||p("edge"))return this.focused&&!this.disabled;var m=9>p("ie")?this.document.selection.createRange():this.document;try{return m.queryCommandEnabled(d)}catch(C){return!1}},_createlinkEnabledImpl:function(){var d=!0;return d=p("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var d=!0;return d=p("mozilla")||p("webkit")||p("ie")||p("trident")||p("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var d=!0;return d=p("mozilla")||p("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var d=!0;p("webkit")?((d=this.window.getSelection())&&(d=d.toString()),d=!!d):d=this._browserQueryCommandEnabled("cut");return d},_copyEnabledImpl:function(){var d=!0;p("webkit")?((d=this.window.getSelection())&&(d=d.toString()),d=!!d):d=this._browserQueryCommandEnabled("copy");
return d},_pasteEnabledImpl:function(){var d=!0;return p("webkit")?!0:d=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(d){return p("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,d)},_unlinkImpl:function(d){return this.queryCommandEnabled("unlink")&&(p("mozilla")||p("webkit"))?(d=this.selection.getAncestorElement("a"),this.selection.selectElement(d),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,d)},_hilitecolorImpl:function(d){if(!this._handleTextColorOrProperties("hilitecolor",d))if(p("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var m=this.document.execCommand("hilitecolor",!1,d);this.document.execCommand("styleWithCSS",!1,!1)}else m=this.document.execCommand("hilitecolor",!1,d);return m},_backcolorImpl:function(d){p("ie")&&(d=d?d:null);var m=this._handleTextColorOrProperties("backcolor",d);m||(m=this.document.execCommand("backcolor",
!1,d));return m},_forecolorImpl:function(d){p("ie")&&(d=d?d:null);var m=!1;(m=this._handleTextColorOrProperties("forecolor",d))||(m=this.document.execCommand("forecolor",!1,d));return m},_inserthtmlImpl:function(d){d=this._preFilterContent(d);var m=!0;if(9>p("ie")){var C=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var L=C.item(0);C.length;)C.remove(C.item(0));L.outerHTML=d}else C.pasteHTML(d);C.select()}else if(8>p("trident")){var K=S.getSelection(this.window);
if(K&&K.rangeCount&&K.getRangeAt){C=K.getRangeAt(0);C.deleteContents();var aa=h.create("div");aa.innerHTML=d;for(L=this.document.createDocumentFragment();d=aa.firstChild;)var V=L.appendChild(d);C.insertNode(L);V&&(C=C.cloneRange(),C.setStartAfter(V),C.collapse(!1),K.removeAllRanges(),K.addRange(C))}}else p("mozilla")&&!d.length?this.selection.remove():m=this.document.execCommand("inserthtml",!1,d);return m},_boldImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),m=this._adaptIEFormatAreaAndExec("bold");
m||(m=this.document.execCommand("bold",!1,d));return m},_italicImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),m=this._adaptIEFormatAreaAndExec("italic");m||(m=this.document.execCommand("italic",!1,d));return m},_underlineImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),m=this._adaptIEFormatAreaAndExec("underline");m||(m=this.document.execCommand("underline",!1,d));return m},_strikethroughImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),
m=this._adaptIEFormatAreaAndExec("strikethrough");m||(m=this.document.execCommand("strikethrough",!1,d));return m},_superscriptImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),m=this._adaptIEFormatAreaAndExec("superscript");m||(m=this.document.execCommand("superscript",!1,d));return m},_subscriptImpl:function(d){var m=!1;if(p("ie")||p("trident"))this._adaptIESelection(),m=this._adaptIEFormatAreaAndExec("subscript");m||(m=this.document.execCommand("subscript",!1,d));return m},
_fontnameImpl:function(d){if(p("ie")||p("trident"))var m=this._handleTextColorOrProperties("fontname",d);m||(m=this.document.execCommand("fontname",!1,d));return m},_fontsizeImpl:function(d){if(p("ie")||p("trident"))var m=this._handleTextColorOrProperties("fontsize",d);m||(m=this.document.execCommand("fontsize",!1,d));return m},_insertorderedlistImpl:function(d){var m=!1;if(p("ie")||p("trident")||p("edge"))m=this._adaptIEList("insertorderedlist",d);m||(m=this.document.execCommand("insertorderedlist",
!1,d));return m},_insertunorderedlistImpl:function(d){var m=!1;if(p("ie")||p("trident")||p("edge"))m=this._adaptIEList("insertunorderedlist",d);m||(m=this.document.execCommand("insertunorderedlist",!1,d));return m},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(d){var m=0;if(d&&d.childNodes){var C;for(C=0;C<d.childNodes.length;C++){var L=q.position(d.childNodes[C]);
m+=L.h}}return m},_isNodeEmpty:function(d,m){return 1===d.nodeType?0<d.childNodes.length?this._isNodeEmpty(d.childNodes[0],m):!0:3===d.nodeType?""===d.nodeValue.substring(m):!1},_removeStartingRangeFromRange:function(d,m){if(d.nextSibling)m.setStart(d.nextSibling,0);else{for(d=d.parentNode;d&&null==d.nextSibling;)d=d.parentNode;d&&m.setStart(d.nextSibling,0)}return m},_adaptIESelection:function(){var d=S.getSelection(this.window);if(d&&d.rangeCount&&!d.isCollapsed){for(var m=d.getRangeAt(0),C=m.startContainer,
L=m.startOffset;3===C.nodeType&&L>=C.length&&C.nextSibling;)L-=C.length,C=C.nextSibling;for(var K=null;this._isNodeEmpty(C,L)&&C!==K;)K=C,m=this._removeStartingRangeFromRange(C,m),C=m.startContainer,L=0;d.removeAllRanges();d.addRange(m)}},_adaptIEFormatAreaAndExec:function(d){var m=S.getSelection(this.window),C=this.document,L;if(d&&m&&m.isCollapsed){if(this.queryCommandValue(d)){d=this._tagNamesForCommand(d);var K=m.getRangeAt(0);var aa=K.startContainer;if(3===aa.nodeType){var V=K.endOffset;aa.length<
V&&(V=this._adjustNodeAndOffset(ba,V),aa=V.node,V=V.offset)}for(;aa&&aa!==this.editNode;){var ba=aa.tagName?aa.tagName.toLowerCase():"";if(-1<M.indexOf(d,ba)){var G=aa;break}aa=aa.parentNode}if(G&&(ba=K.startContainer,d=C.createElement(G.tagName),h.place(d,G,"after"),ba&&3===ba.nodeType)){V=K.endOffset;ba.length<V&&(V=this._adjustNodeAndOffset(ba,V),ba=V.node,V=V.offset);aa=ba.nodeValue;K=C.createTextNode(aa.substring(0,V));var Y=aa.substring(V,aa.length);Y&&(L=C.createTextNode(Y));h.place(K,ba,"before");
if(L){var W=C.createElement("span");W.className="ieFormatBreakerSpan";h.place(W,ba,"after");h.place(L,W,"after");L=W}h.destroy(ba);V=K.parentNode;for(ba=[];V!==G;){aa=V.tagName;K={tagName:aa};ba.push(K);aa=C.createElement(aa);V.style&&aa.style&&V.style.cssText&&(aa.style.cssText=V.style.cssText,K.cssText=V.style.cssText);"FONT"===V.tagName&&(V.color&&(aa.color=V.color,K.color=V.color),V.face&&(aa.face=V.face,K.face=V.face),V.size&&(aa.size=V.size,K.size=V.size));V.className&&(aa.className=V.className,
K.className=V.className);if(L)for(;L;)K=L.nextSibling,aa.appendChild(L),L=K;aa.tagName==V.tagName?(W=C.createElement("span"),W.className="ieFormatBreakerSpan",h.place(W,V,"after"),h.place(aa,W,"after")):h.place(aa,V,"after");K=V;L=aa;V=V.parentNode}if(L){if(1===L.nodeType||3===L.nodeType&&L.nodeValue)d.innerHTML="";for(;L;)K=L.nextSibling,d.appendChild(L),L=K}if(ba.length){K=ba.pop();L=C.createElement(K.tagName);K.cssText&&L.style&&(L.style.cssText=K.cssText);K.className&&(L.className=K.className);
"FONT"===K.tagName&&(K.color&&(L.color=K.color),K.face&&(L.face=K.face),K.size&&(L.size=K.size));for(h.place(L,d,"before");ba.length;)K=ba.pop(),G=C.createElement(K.tagName),K.cssText&&G.style&&(G.style.cssText=K.cssText),K.className&&(G.className=K.className),"FONT"===K.tagName&&(K.color&&(G.color=K.color),K.face&&(G.face=K.face),K.size&&(G.size=K.size)),L.appendChild(G),L=G;G=C.createTextNode(".");W.appendChild(G);L.appendChild(G)}else W=C.createElement("span"),W.className="ieFormatBreakerSpan",
G=C.createTextNode("."),W.appendChild(G),h.place(W,d,"before");L=S.create(this.window);L.setStart(G,0);L.setEnd(G,G.length);m.removeAllRanges();m.addRange(L);this.selection.collapse(!1);G.parentNode.innerHTML="";d.firstChild||h.destroy(d);return!0}return!1}K=m.getRangeAt(0);if((ba=K.startContainer)&&3===ba.nodeType)return V=K.startOffset,ba.length<V&&(V=this._adjustNodeAndOffset(ba,V),ba=V.node,V=V.offset),aa=ba.nodeValue,K=C.createTextNode(aa.substring(0,V)),Y=aa.substring(V),""!==Y&&(L=C.createTextNode(aa.substring(V))),
W=C.createElement("span"),G=C.createTextNode("."),W.appendChild(G),K.length?h.place(K,ba,"after"):K=ba,h.place(W,K,"after"),L&&h.place(L,W,"after"),h.destroy(ba),L=S.create(this.window),L.setStart(G,0),L.setEnd(G,G.length),m.removeAllRanges(),m.addRange(L),C.execCommand(d),h.place(W.firstChild,W,"before"),h.destroy(W),L.setStart(G,0),L.setEnd(G,G.length),m.removeAllRanges(),m.addRange(L),this.selection.collapse(!1),G.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(d){var m=S.getSelection(this.window);
if(m.isCollapsed&&m.rangeCount&&!this.queryCommandValue(d)){var C=m.getRangeAt(0),L=C.startContainer;if(L&&3==L.nodeType&&!C.startOffset)return C="ul","insertorderedlist"===d&&(C="ol"),d=this.document.createElement(C),C=h.create("li",null,d),h.place(d,L,"before"),C.appendChild(L),h.create("br",null,d,"after"),d=S.create(this.window),d.setStart(L,0),d.setEnd(L,L.length),m.removeAllRanges(),m.addRange(d),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(d,m){var C=S.getSelection(this.window),
L=this.document,K,aa;m=m||null;if(d&&C&&C.isCollapsed&&C.rangeCount){var V=C.getRangeAt(0);if((K=V.startContainer)&&3===K.nodeType){var ba=V.startOffset;K.length<ba&&(V=this._adjustNodeAndOffset(K,ba),K=V.node,ba=V.offset);var G=K.nodeValue;V=L.createTextNode(G.substring(0,ba));""!==G.substring(ba)&&(aa=L.createTextNode(G.substring(ba)));G=L.createElement("span");ba=L.createTextNode(".");G.appendChild(ba);L=L.createElement("span");G.appendChild(L);V.length?h.place(V,K,"after"):V=K;h.place(G,V,"after");
aa&&h.place(aa,G,"after");h.destroy(K);K=S.create(this.window);K.setStart(ba,0);K.setEnd(ba,ba.length);C.removeAllRanges();C.addRange(K);if(p("webkit")){C="color";if("hilitecolor"===d||"backcolor"===d)C="backgroundColor";n.set(G,C,m);this.selection.remove();h.destroy(L);G.innerHTML="\x26#160;";this.selection.selectElement(G);this.focus()}else this.execCommand(d,m),h.place(G.firstChild,G,"before"),h.destroy(G),K.setStart(ba,0),K.setEnd(ba,ba.length),C.removeAllRanges(),C.addRange(K),this.selection.collapse(!1),
ba.parentNode.removeChild(ba);return!0}}return!1},_adjustNodeAndOffset:function(d,m){for(;d.length<m&&d.nextSibling&&3===d.nextSibling.nodeType;)m-=d.length,d=d.nextSibling;return{node:d,offset:m}},_tagNamesForCommand:function(d){return"bold"===d?["b","strong"]:"italic"===d?["i","em"]:"strikethrough"===d?["s","strike"]:"superscript"===d?["sup"]:"subscript"===d?["sub"]:"underline"===d?["u"]:[]},_stripBreakerNodes:function(d){if(this.isLoaded)return F(".ieFormatBreakerSpan",d).forEach(function(m){for(;m.firstChild;)h.place(m.firstChild,
m,"before");h.destroy(m)}),d},_stripTrailingEmptyNodes:function(d){function m(C){return/^(p|div|br)$/i.test(C.nodeName)&&0==C.children.length&&/^[\s\xA0]*$/.test(C.textContent||C.innerText||"")||3===C.nodeType&&/^[\s\xA0]*$/.test(C.nodeValue)}for(;d.lastChild&&m(d.lastChild);)h.destroy(d.lastChild);return d},_setTextDirAttr:function(d){this._set("textDir",d);this.onLoadDeferred.then(r.hitch(this,function(){this.editNode.dir=d}))}});return Q})},"dijit/_editor/range":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/lang"],function(M,H,B){var O={getIndex:function(k,h){for(var q=[],n=[],w=k,u,r;k!=h;){var l=0;for(u=k.parentNode;r=u.childNodes[l++];)if(r===k){--l;break}q.unshift(l);n.unshift(l-u.childNodes.length);k=u}if(0<q.length&&3==w.nodeType){for(r=w.previousSibling;r&&3==r.nodeType;)q[q.length-1]--,r=r.previousSibling;for(r=w.nextSibling;r&&3==r.nodeType;)n[n.length-1]++,r=r.nextSibling}return{o:q,r:n}},getNode:function(k,h){if(!B.isArray(k)||0==k.length)return h;var q=h;
M.every(k,function(n){if(0<=n&&n<q.childNodes.length)q=q.childNodes[n];else return q=null,!1;return!0});return q},getCommonAncestor:function(k,h,q){q=q||k.ownerDocument.body;var n=function(r){for(var l=[];r;)if(l.unshift(r),r!==q)r=r.parentNode;else break;return l};k=n(k);h=n(h);n=Math.min(k.length,h.length);for(var w=k[0],u=1;u<n;u++)if(k[u]===h[u])w=k[u];else break;return w},getAncestor:function(k,h,q){for(q=q||k.ownerDocument.body;k&&k!==q;){var n=k.nodeName.toUpperCase();if(h.test(n))return k;
k=k.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(k,h,q){q=q||k.ownerDocument.body;h=h||O.BlockTagNames;for(var n=null,w;k&&k!==q;){var u=k.nodeName.toUpperCase();!n&&h.test(u)&&(n=k);!w&&/^(?:BODY|TD|TH|CAPTION)$/.test(u)&&(w=k);k=k.parentNode}return{blockNode:n,blockContainer:w||k.ownerDocument.body}},atBeginningOfContainer:function(k,h,q){var n=!1,w=0==q;w||3!=h.nodeType||/^[\s\xA0]+$/.test(h.nodeValue.substr(0,q))&&(w=
!0);if(w)for(n=!0;h&&h!==k;){if(h.previousSibling){n=!1;break}h=h.parentNode}return n},atEndOfContainer:function(k,h,q){var n=!1,w=q==(h.length||h.childNodes.length);w||3!=h.nodeType||/^[\s\xA0]+$/.test(h.nodeValue.substr(q))&&(w=!0);if(w)for(n=!0;h&&h!==k;){if(h.nextSibling){n=!1;break}h=h.parentNode}return n},adjacentNoneTextNode:function(k,h){var q=k;k=0-k.length||0;for(h=h?"nextSibling":"previousSibling";q&&3==q.nodeType;)k+=q.length,q=q[h];return[q,k]},create:function(k){k=k||window;return k.getSelection?
k.document.createRange():new t},getSelection:function(k,h){if(k.getSelection)return k.getSelection();k=new e.selection(k);h||k._getCurrentSelection();return k}};if(!window.getSelection)var e=O.ie={cachedSelection:{},selection:function(k){this._ranges=[];this.addRange=function(h,q){this._ranges.push(h);q||h._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(h){return this._ranges[h]};this._getCurrentSelection=function(){this.removeAllRanges();
var h=k.document.selection.createRange();h="CONTROL"==k.document.selection.type.toUpperCase()?new t(e.decomposeControlRange(h)):new t(e.decomposeTextRange(h));this.addRange(h,!0),this.isCollapsed=h.collapsed}},decomposeControlRange:function(k){var h=k.item(0),q=k.item(k.length-1);k=h.parentNode;var n=q.parentNode;h=O.getIndex(h,k).o[0];q=O.getIndex(q,n).o[0]+1;return[k,h,n,q]},getEndPoint:function(k,h){var q=k.duplicate();q.collapse(!h);var n="EndTo"+(h?"End":"Start"),w=q.parentElement(),u;if(0<w.childNodes.length)M.every(w.childNodes,
function(F,f){if(3!=F.nodeType)if(q.moveToElementText(F),0<q.compareEndPoints(n,k))if(u&&3==u.nodeType){r=u;var p=!0}else return r=w,l=f,!1;else{if(f==w.childNodes.length-1)return r=w,l=w.childNodes.length,!1}else f==w.childNodes.length-1&&(r=F,p=!0);if(p&&r)return r=(F=O.adjacentNoneTextNode(r)[0])?F.nextSibling:w.firstChild,f=O.adjacentNoneTextNode(r),F=f[0],f=f[1],F?(q.moveToElementText(F),q.collapse(!1)):q.moveToElementText(w),q.setEndPoint(n,k),l=q.text.length-f,!1;u=F;return!0});else{var r=
w;var l=0}h||1!=r.nodeType||l!=r.childNodes.length||(h=r.nextSibling)&&3==h.nodeType&&(r=h,l=0);return[r,l]},setEndPoint:function(k,h,q){k=k.duplicate();var n;if(3!=h.nodeType)if(0<q){if(n=h.childNodes[q-1])if(3==n.nodeType)h=n,q=n.length;else if(n.nextSibling&&3==n.nextSibling.nodeType)h=n.nextSibling,q=0;else{k.moveToElementText(n.nextSibling?n:h);var w=n.parentNode;n=w.insertBefore(n.ownerDocument.createTextNode(" "),n.nextSibling);k.collapse(!1);w.removeChild(n)}}else k.moveToElementText(h),k.collapse(!0);
3==h.nodeType&&(n=O.adjacentNoneTextNode(h),w=n[0],n=n[1],w?(k.moveToElementText(w),k.collapse(!1),"inherit"!=w.contentEditable&&n++):(k.moveToElementText(h.parentNode),k.collapse(!0),k.move("character",1),k.move("character",-1)),q+=n,0<q&&k.move("character",q)!=q&&console.error("Error when moving!"));return k},decomposeTextRange:function(k){var h=e.getEndPoint(k),q=h[0],n=h[1],w=h[0];h=h[1];k.htmlText.length&&(k.htmlText==k.text?h=n+k.text.length:(h=e.getEndPoint(k,!0),w=h[0],h=h[1]));return[q,n,
w,h]},setRange:function(k,h,q,n,w,u){h=e.setEndPoint(k,h,q);k.setEndPoint("StartToStart",h);if(!u)var r=e.setEndPoint(k,n,w);k.setEndPoint("EndToEnd",r||h);return k}},t=O.W3CRange=H(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=
this.startContainer!==this.endContainer?O.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(k,h){h=parseInt(h);if(this.startContainer!==k||this.startOffset!=h)delete this._cachedBookmark,this.startContainer=k,this.startOffset=h,this.endContainer?this._updateInternal():this.setEnd(k,h)},setEnd:function(k,h){h=parseInt(h);if(this.endContainer!==k||this.endOffset!=h)delete this._cachedBookmark,
this.endContainer=k,this.endOffset=h,this.startContainer?this._updateInternal():this.setStart(k,h)},setStartAfter:function(k,h){this._setPoint("setStart",k,h,1)},setStartBefore:function(k,h){this._setPoint("setStart",k,h,0)},setEndAfter:function(k,h){this._setPoint("setEnd",k,h,1)},setEndBefore:function(k,h){this._setPoint("setEnd",k,h,0)},_setPoint:function(k,h,q,n){q=O.getIndex(h,h.parentNode).o;this[k](h.parentNode,q.pop()+n)},_getIERange:function(){var k=(this._body||this.endContainer.ownerDocument.body).createTextRange();
e.setRange(k,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return k},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var k=this.startContainer,h=this._getIERange();3!==k.nodeType||this.startOffset||this.setStartBefore(k);h.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var k=new t([this.startContainer,
this.startOffset,this.endContainer,this.endOffset]);k._body=this._body;return k},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});B.setObject("dijit.range",O);return O})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(M,H,B){var O={};H.setObject("dijit._editor.html",O);var e=O.escapeXml=function(t,k){t=t.replace(/&/gm,"\x26amp;").replace(/</gm,
"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");k||(t=t.replace(/'/gm,"\x26#39;"));return t};O.getNodeHtml=function(t){var k=[];O.getNodeHtmlHelper(t,k);return k.join("")};O.getNodeHtmlHelper=function(t,k){switch(t.nodeType){case 1:var h=t.nodeName.toLowerCase();if(!h||"/"==h.charAt(0))return"";k.push("\x3c",h);var q=[],n={},w;if(B("dom-attributes-explicit")||B("dom-attributes-specified-flag"))for(var u=0;w=t.attributes[u++];){var r=w.name;"_dj"===r.substr(0,3)||B("dom-attributes-specified-flag")&&
!w.specified||r in n||(w=w.value,("src"==r||"href"==r)&&t.getAttribute("_djrealurl")&&(w=t.getAttribute("_djrealurl")),8===B("ie")&&"style"===r&&(w=w.replace("HEIGHT:","height:").replace("WIDTH:","width:")),q.push([r,w]),n[r]=w)}else{var l=(/^input$|^img$/i.test(t.nodeName)?t:t.cloneNode(!1)).outerHTML;n=l.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);l=l.substr(0,l.indexOf("\x3e"));M.forEach(n,function(F){if(F){var f=F.indexOf("\x3d");if(0<f&&(F=F.substring(0,f),"_dj"!=F.substr(0,3)))if("src"!=F&&"href"!=
F||!t.getAttribute("_djrealurl")){switch(F){case "style":var p=t.style.cssText.toLowerCase();break;case "class":p=t.className;break;case "width":if("img"===h){(f=/width=(\S+)/i.exec(l))&&(p=f[1]);break}case "height":if("img"===h){(f=/height=(\S+)/i.exec(l))&&(p=f[1]);break}default:p=t.getAttribute(F)}null!=p&&q.push([F,p.toString()])}else q.push([F,t.getAttribute("_djrealurl")])}},this)}q.sort(function(F,f){return F[0]<f[0]?-1:F[0]==f[0]?0:1});for(n=0;w=q[n++];)k.push(" ",w[0],'\x3d"',"string"===
typeof w[1]?e(w[1],!0):w[1],'"');switch(h){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":k.push(" /\x3e");break;case "script":k.push("\x3e",t.innerHTML,"\x3c/",h,"\x3e");break;default:k.push("\x3e"),t.hasChildNodes()&&O.getChildrenHtmlHelper(t,k),k.push("\x3c/",h,"\x3e")}break;case 4:case 3:k.push(e(t.nodeValue,!0));break;case 8:k.push("\x3c!--",e(t.nodeValue,!0),"--\x3e");break;default:k.push("\x3c!-- Element not recognized - Type: ",t.nodeType," Name: ",
t.nodeName,"--\x3e")}};O.getChildrenHtml=function(t){var k=[];O.getChildrenHtmlHelper(t,k);return k.join("")};O.getChildrenHtmlHelper=function(t,k){if(t)for(var h=t.childNodes||t,q=!B("ie")||h!==t,n,w=0;n=h[w++];)q&&n.parentNode!=t||O.getNodeHtmlHelper(n,k)};return O})},"dijit/_editor/plugins/LinkDialog":function(){define("require dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/query dojo/string ../_Plugin ../../form/DropDownButton ../range".split(" "),
function(M,H,B,O,e,t,k,h,q,n,w,u,r){var l=B("dijit._editor.plugins.LinkDialog",w,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:u,useDefaultCommand:!1,urlRegExp:"((https?|ftps?|file)\\://|./|../|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",
emailRegExp:"\x3c?(mailto\\:)([!#-'*+\\-\\/-9\x3d?A-Z^-~]+[.])*[!#-'*+\\-\\/-9\x3d?A-Z^-~]+@((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*\x3e?",htmlTemplate:'\x3ca href\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" target\x3d"${targetSelect}"\x3e${textInput}\x3c/a\x3e',tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,
linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_targetSelect'\x3e${target}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cselect id\x3d'${id}_targetSelect' name\x3d'targetSelect' data-dojo-type\x3d'dijit.form.Select'\x3e\x3coption selected\x3d'selected' value\x3d'_self'\x3e${currentWindow}\x3c/option\x3e\x3coption value\x3d'_blank'\x3e${newWindow}\x3c/option\x3e\x3coption value\x3d'_top'\x3e${topWindow}\x3c/option\x3e\x3coption value\x3d'_parent'\x3e${parentWindow}\x3c/option\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
_initButton:function(){this.inherited(arguments);this.button.loadDropDown=t.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(f){M("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),t.hitch(this,function(p,v,R){var I=this;this.tag="insertImage"==this.command?"img":"a";p=t.delegate(p.getLocalization("dijit","common",this.lang),p.getLocalization("dijit._editor",
"LinkDialog",this.lang));var X=this.dropDown=this.button.dropDown=new v({title:p[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:t.hitch(this,"setValue"),onOpen:function(){I._onOpenDialog();v.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(t.hitch(I,"_onCloseDialog"),0)}});p.urlRegExp=this.urlRegExp;p.id=R.getUniqueId(this.editor.id);this._uniqueId=p.id;this._setContent(X.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
n.substitute(this.linkDialogTemplate,p));X.startup();this._urlInput=R.byId(this._uniqueId+"_urlInput");this._textInput=R.byId(this._uniqueId+"_textInput");this._setButton=R.byId(this._uniqueId+"_setButton");this.own(R.byId(this._uniqueId+"_cancelButton").on("click",t.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",t.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",t.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=t.hitch(this,function(){var T=this._urlInput.get("value");return this._urlRegExp.test(T)||this._emailRegExp.test(T)});this.own(k(X.domNode,"keydown",t.hitch(this,t.hitch(this,function(T){!T||T.keyCode!=e.ENTER||T.shiftKey||T.metaKey||T.ctrlKey||T.altKey||this._setButton.get("disabled")||(X.onExecute(),X.execute(X.get("value")))}))));f()}))},_checkAndFixInput:function(){var f=this,p=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var v=p,R=!1,I=!1;v&&1<v.length&&(v=t.trim(v),0!==v.indexOf("mailto:")&&(0<v.indexOf("/")?-1===v.indexOf("://")&&"/"!==v.charAt(0)&&v.indexOf("./")&&0!==v.indexOf("../")&&f._hostRxp.test(v)&&(R=!0):f._userAtRxp.test(v)&&(I=!0)));R&&f._urlInput.set("value","http://"+v);I&&f._urlInput.set("value","mailto:"+v);f._setButton.set("disabled",!f._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(t.hitch(this,
function(){this.own(k(this.editor.editNode,"mouseup",t.hitch(this,"_onMouseUp")));this.own(k(this.editor.editNode,"dblclick",t.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(f){this.dropDown.set({parserScope:"dojo",content:f})},_checkValues:function(f){f&&f.urlInput&&(f.urlInput=f.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&f&&f.textInput&&("function"===typeof this.linkFilter?f.textInput=this.linkFilter(f.textInput):
H.forEach(this.linkFilter,function(p){f.textInput=f.textInput.replace(p[0],p[1])}));return f},_createlinkEnabledImpl:function(){return!0},setValue:function(f){this._onCloseDialog();if(9>h("ie")){var p=r.getSelection(this.editor.window).getRangeAt(0).endContainer;3===p.nodeType&&(p=p.parentNode);p&&p.nodeName&&p.nodeName.toLowerCase()!==this.tag&&(p=this.editor.selection.getSelectedElement(this.tag));p&&p.nodeName&&p.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(p),
this.editor.execCommand("unlink"))}f=this._checkValues(f);this.editor.execCommand("inserthtml",n.substitute(this.htmlTemplate,f));q("a",this.editor.document).forEach(function(v){v.innerHTML||O.has(v,"name")||v.parentNode.removeChild(v)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(f){if(f&&f.tagName.toLowerCase()===this.tag){var p=f.getAttribute("_djrealurl")||f.getAttribute("href");var v=f.getAttribute("target")||"_self";var R=f.textContent||
f.innerText;this.editor.selection.selectElement(f,!0)}else R=this.editor.selection.getSelectedText();return{urlInput:p||"",textInput:R||"",targetSelect:v||""}},_onOpenDialog:function(){if(h("ie")){var f=r.getSelection(this.editor.window);if(f.rangeCount){var p=f.getRangeAt(0);var v=p.endContainer;3===v.nodeType&&(v=v.parentNode);v&&v.nodeName&&v.nodeName.toLowerCase()!==this.tag&&(v=this.editor.selection.getSelectedElement(this.tag));if(!v||v.nodeName&&v.nodeName.toLowerCase()!==this.tag)(f=this.editor.selection.getAncestorElement(this.tag))&&
f.nodeName&&f.nodeName.toLowerCase()==this.tag?(v=f,this.editor.selection.selectElement(v)):p.startContainer===p.endContainer&&(f=p.startContainer.firstChild)&&f.nodeName&&f.nodeName.toLowerCase()==this.tag&&(v=f,this.editor.selection.selectElement(v))}}else v=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(v))},_onDblClick:function(f){if(f&&f.target&&(f=f.target,(f.tagName?f.tagName.toLowerCase():
"")===this.tag&&O.get(f,"href"))){var p=this.editor;this.editor.selection.selectElement(f);p.onDisplayChanged();p._updateTimer&&(p._updateTimer.remove(),delete p._updateTimer);p.onNormalizedDisplayChanged();var v=this.button;setTimeout(function(){v.set("disabled",!1);v.loadAndOpenDropDown().then(function(){v.dropDown.focus&&v.dropDown.focus()})},10)}},_onMouseUp:function(){if(h("ff")){var f=this.editor.selection.getAncestorElement(this.tag);if(f){var p=r.getSelection(this.editor.window).getRangeAt(0);
if(p.collapsed&&f.childNodes.length){var v=p.cloneRange();v.selectNodeContents(f.childNodes[f.childNodes.length-1]);v.setStart(f.childNodes[0],0);1!==p.compareBoundaryPoints(v.START_TO_START,v)?p.setStartBefore(f):-1!==p.compareBoundaryPoints(v.END_TO_START,v)&&p.setStartAfter(f)}}}}}),F=B("dijit._editor.plugins.ImgLinkDialog",[l],{linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' regExp\x3d'${urlRegExp}' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'false' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
htmlTemplate:'\x3cimg src\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" alt\x3d"${textInput}" /\x3e',tag:"img",_getCurrentValues:function(f){if(f&&f.tagName.toLowerCase()===this.tag){var p=f.getAttribute("_djrealurl")||f.getAttribute("src");var v=f.getAttribute("alt");this.editor.selection.selectElement(f,!0)}else v=this.editor.selection.getSelectedText();return{urlInput:p||"",textInput:v||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);
this.editor.onLoadDeferred.then(t.hitch(this,function(){this.own(k(this.editor.editNode,"mousedown",t.hitch(this,"_selectTag")))}))},_selectTag:function(f){f&&f.target&&(f=f.target,(f.tagName?f.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(f))},_checkValues:function(f){f&&f.urlInput&&(f.urlInput=f.urlInput.replace(/"/g,"\x26quot;"));f&&f.textInput&&(f.textInput=f.textInput.replace(/"/g,"\x26quot;"));return f},_onDblClick:function(f){if(f&&f.target&&(f=f.target,(f.tagName?
f.tagName.toLowerCase():"")===this.tag&&O.get(f,"src"))){var p=this.editor;this.editor.selection.selectElement(f);p.onDisplayChanged();p._updateTimer&&(p._updateTimer.remove(),delete p._updateTimer);p.onNormalizedDisplayChanged();var v=this.button;setTimeout(function(){v.set("disabled",!1);v.loadAndOpenDropDown().then(function(){v.dropDown.focus&&v.dropDown.focus()})},10)}}});w.registry.createLink=function(f){var p={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in f?f.allowUnsafeHtml:!1};
"linkFilter"in f&&(p.linkFilter=f.linkFilter);return new l(p)};w.registry.insertImage=function(){return new F({command:"insertImage"})};l.ImgLinkDialog=F;return l})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),function(M,H,B,O,e,t){var k=B("dijit._editor.plugins.TextColor",e,{buttonClass:t,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;
this.inherited(arguments);var h=this;this.button.loadDropDown=function(q){function n(w){h.button.dropDown=new w({dir:h.editor.dir,ownerDocument:h.editor.ownerDocument,value:h.value,onChange:function(u){h.editor.execCommand(h.command,u)},onExecute:function(){h.editor.execCommand(h.command,this.get("value"))}});q()}"string"==typeof h.colorPicker?M([h.colorPicker],n):n(h.colorPicker)}},updateState:function(){var h=this.editor,q=this.command;if(h&&h.isLoaded&&q.length){if(this.button){var n=this.get("disabled");
this.button.set("disabled",n);if(n)return;try{var w=h.queryCommandValue(q)||""}catch(u){w=""}}""==w&&(w="#000000");"transparent"==w&&(w="#ffffff");"string"==typeof w?-1<w.indexOf("rgb")&&(w=H.fromRgb(w).toHex()):(w=((w&255)<<16|w&65280|(w&16711680)>>>16).toString(16),w="#000000".slice(0,7-w.length)+w);this.value=w;(h=this.button.dropDown)&&h.get&&w!==h.get("value")&&h.set("value",w,!1)}}});e.registry.foreColor=function(h){return new k(h)};e.registry.hiliteColor=function(h){return new k(h)};return k})},
"esri/dijit/editing/AttachmentEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/array dojo/_base/kernel dojo/has dojo/query dojo/io-query dojo/dom-attr dijit/_Widget dijit/_Templated dijit/ProgressBar ../../kernel ../../lang ../../domUtils dojo/text!./templates/AttachmentEditor.html dojo/i18n!../../nls/jsapi dojo/NodeList-dom".split(" "),function(M,H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p){M=M([n,w],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:!0,
templateString:f,_listHtml:"\x3cspan id\x3d'node_${oid}_${attid}' style\x3d'display: flex;'\x3e\x3ca href\x3d'${href}' target\x3d'_blank'\x3e${name}\x3c/a\x3e",_deleteBtnHtml:"\x3cspan style\x3d'cursor:pointer;color:red;font-weight:bold;padding:0 2px;' class\x3d'deleteAttachment' id\x3d'${attid}');'\x3eX\x3c/span\x3e",_endHtml:"\x3cbr/\x3e\x3c/span\x3e",_aeConnects:[],_layerEditingCapChecked:{},_layerEditingCap:{},constructor:function(v,R){H.mixin(this,p.widgets.attachmentEditor)},startup:function(){this.inherited(arguments);
this._uploadField_connect=B.connect(this._uploadField,"onchange",this,function(){0<this._uploadField.value.length&&this._addAttachment()});this._uploadFieldFocus_connect=B.connect(this._uploadField,"onfocus",H.hitch(this,function(v){F.hide(this._attachmentError)}))},destroy:function(){O.forEach(this._aeConnects,B.disconnect);B.disconnect(this._uploadField_connect);B.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments)},showAttachments:function(v,R){this._attachmentList.innerHTML=this.NLS_none;
this._uploadField.value="";O.forEach(this.domNode.children,function(I,X){F.show(I)});F.hide(this._attachmentError);v&&(this._featureLayer=v.getLayer()||R)&&("esri.layers.FeatureLayer"===this._featureLayer.declaredClass&&this._featureLayer.getEditCapabilities?(this._currentLayerId=this._featureLayer.id,this._layerEditingCapChecked[this._currentLayerId]||(this._layerEditingCap[this._currentLayerId]=this._featureLayer.getEditCapabilities(),this._layerEditingCapChecked[this._currentLayerId]=!0),this._featureCanUpdate=
this._featureLayer.getEditCapabilities({feature:v}).canUpdate,this._oid=v.attributes[this._featureLayer.objectIdField],this._getAttachments(v)):R&&R.getEditCapabilities()||(F.hide(this._uploadForm),O.forEach(this.domNode.children,function(I,X){F.hide(I)})))},_getAttachments:function(v){this._featureLayer&&this._featureLayer.queryAttachmentInfos&&this._featureLayer.queryAttachmentInfos(this._oid,H.hitch(this,"_onQueryAttachmentInfosComplete"))},_addAttachment:function(){F.hide(this._attachmentError);
this._featureLayer&&this._featureLayer.addAttachment?(F.show(this._attachmentProgress),this._featureLayer.addAttachment(this._oid,this._uploadForm,H.hitch(this,"_onAddAttachmentComplete"),H.hitch(this,"_onAddAttachmentError"))):this._tempUpload=this._uploadForm},_chainAttachment:function(v,R){this._tempUpload&&(F.show(this._attachmentProgress),R.addAttachment(v,this._tempUpload,H.hitch(this,"_onAddAttachmentComplete"),H.hitch(this,"_onAddAttachmentError")));this._tempUpload=null},_deleteAttachment:function(v,
R){F.show(this._attachmentProgress);this._featureLayer.deleteAttachments(v,[R],H.hitch(this,"_onDeleteAttachmentComplete"))},_onQueryAttachmentInfosComplete:function(v){var R=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate||!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate?(R=this._listHtml+this._endHtml,this._uploadForm.style.display=
"none"):this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(R=this._listHtml+this._endHtml);var I=this._attachmentList;v=O.map(v,H.hitch(this,function(X){return l.substitute({href:X.url,name:X.name,oid:X.objectId,attid:X.id},R)}));I.innerHTML=v.join("")||this.NLS_none;this._updateConnects()},_onAddAttachmentComplete:function(v){F.hide(this._attachmentProgress.domNode);var R=this._attachmentList,I=this._uploadField,X=I.value,T=X.lastIndexOf("\\");
-1<T&&(X=X.substring(T+1,X.length));X=X.replace(/ /g,"_");T=h.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var U=this._listHtml+this._deleteBtnHtml+this._endHtml;this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(U=this._listHtml+this._endHtml);v=l.substitute({href:this._featureLayer._url.path+"/"+v.objectId+"/attachments/"+v.attachmentId+(T?"?"+T:""),name:X,oid:v.objectId,attid:v.attachmentId},
U);R.innerHTML=R.innerHTML==this.NLS_none?v:R.innerHTML+v;this._updateConnects();I.value=""},_onAddAttachmentError:function(v){F.hide(this._attachmentProgress.domNode);if(v){var R=this.NLS_error,I=this._attachmentError;l.isDefined(v.code)&&400===v.code&&(R=this.NLS_fileNotSupported);q.set(I,"innerHTML",R);F.show(I)}},_onDeleteAttachmentComplete:function(v){F.hide(this._attachmentProgress.domNode);var R=this._attachmentList;O.every(v,function(I){return I.success})&&(e.query("#node_"+v[0].objectId+
"_"+v[0].attachmentId).orphan(),R.children&&R.children.length||(R.innerHTML=this.NLS_none))},_updateConnects:function(){O.forEach(this._aeConnects,B.disconnect);e.query(".deleteAttachment").forEach(function(v){this._aeConnects.push(B.connect(v,"onclick",H.hitch(this,"_deleteAttachment",this._oid,v.id)))},this)}});t("extend-esri")&&H.setObject("dijit.editing.AttachmentEditor",M,r);return M})},"dijit/ProgressBar":function(){define("require dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/number ./_Widget ./_TemplatedMixin dojo/text!./templates/ProgressBar.html".split(" "),
function(M,H,B,O,e,t,k,h){return H("dijit.ProgressBar",[t,k],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:h,_indeterminateHighContrastImagePath:M.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);this.params&&"value"in this.params||(this.value=this.indeterminate?Infinity:this.progress)},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
this.update()},_setDirAttr:function(q){var n="rtl"==q.toLowerCase();B.toggle(this.domNode,"dijitProgressBarRtl",n);B.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&n);this.inherited(arguments)},update:function(q){O.mixin(this,q||{});q=this.internalProgress;var n=this.domNode,w=1;this.indeterminate?n.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(w=Math.min(parseFloat(this.progress)/100,1),this.progress=w*this.maximum):(this.progress=Math.min(this.progress,
this.maximum),w=this.maximum?this.progress/this.maximum:0),n.setAttribute("aria-valuenow",this.progress));n.setAttribute("aria-labelledby",this.labelNode.id);n.setAttribute("aria-valuemin",0);n.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(w);B.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);B.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());q.style.width=100*w+"%";this.onChange()},_setValueAttr:function(q){this._set("value",
q);Infinity==q?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:q})},_setLabelAttr:function(q){this._set("label",q);this.update()},_setIndeterminateAttr:function(q){this._set("indeterminate",q);this.update()},report:function(q){return this.label?this.label:this.indeterminate?"\x26#160;":e.format(q,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}})})},"esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","../../kernel"],
function(M,H,B,O){var e={};e={findFeatures:function(t,k,h){var q=k.objectIdField;k=H.filter(k.graphics,function(n){return H.some(t,function(w){return n.attributes[q]===w.objectId})});if(h)h(k);else return k},getSelection:function(t){var k=[];H.forEach(t,function(h){h=h.getSelectedFeatures();H.forEach(h,function(q){k.push(q)})});return k},sortFeaturesById:function(t,k){var h=H.map(t,function(q){return q.featureLayer});k.sort(function(q,n){var w=q.getLayer(),u=n.getLayer();if(!w)return-1;if(!u)return 1;
var r=H.indexOf(h,w);u=H.indexOf(h,u);r-=u;r||(w=w.objectIdField,r=q.attributes[w]-n.attributes[w]);return r});return k}};B("extend-esri")&&M.setObject("dijit.editing.Util.LayerHelper",e,O);return e})},"dojox/date/islamic":function(){define(["dojox/main","dojo/_base/lang","dojo/date","./islamic/Date"],function(M,H,B,O){var e=H.getObject("date.islamic",!0,M);e.getDaysInMonth=function(t){return t.getDaysInIslamicMonth(t.getMonth(),t.getFullYear())};e.compare=function(t,k,h){t instanceof O&&(t=t.toGregorian());
k instanceof O&&(k=k.toGregorian());return B.compare.apply(null,arguments)};e.add=function(t,k,h){var q=new O(t);switch(k){case "day":q.setDate(t.getDate()+h);break;case "weekday":var n=t.getDay();if(5>n+h&&0<n+h)q.setDate(t.getDate()+h);else{var w=k=0;5==n?(n=4,w=0<h?-1:1):6==n&&(n=4,w=0<h?-2:2);n=0<h?5-n-1:-n;var u=h-n,r=parseInt(u/5);0!=u%5&&(k=0<h?2:-2);k=k+7*r+u%5+n;q.setDate(t.getDate()+k+w)}break;case "year":q.setFullYear(t.getFullYear()+h);break;case "week":h*=7;q.setDate(t.getDate()+h);break;
case "month":t=t.getMonth();q.setMonth(t+h);break;case "hour":q.setHours(t.getHours()+h);break;case "minute":q._addMinutes(h);break;case "second":q._addSeconds(h);break;case "millisecond":q._addMilliseconds(h)}return q};e.difference=function(t,k,h){k=k||new O;h=h||"day";var q=k.getFullYear()-t.getFullYear(),n=1;switch(h){case "weekday":q=Math.round(e.difference(t,k,"day"));n=parseInt(e.difference(t,k,"week"));if(0==q%7)q=5*n;else{h=0;var w=t.getDay(),u=k.getDay();n=parseInt(q/7);k=q%7;t=new O(t);
t.setDate(t.getDate()+7*n);t=t.getDay();if(0<q)switch(!0){case 5==w:h=-1;break;case 6==w:h=0;break;case 5==u:h=-1;break;case 6==u:h=-2;break;case 5<t+k:h=-2}else if(0>q)switch(!0){case 5==w:h=0;break;case 6==w:h=1;break;case 5==u:h=2;break;case 6==u:h=1;break;case 0>t+k:h=2}q=q+h-2*n}n=q;break;case "year":n=q;break;case "month":h=k.toGregorian()>t.toGregorian()?k:t;w=k.toGregorian()>t.toGregorian()?t:k;n=h.getMonth();u=w.getMonth();if(0==q)n=h.getMonth()-w.getMonth();else for(n=12-u+n,q=w.getFullYear()+
1,h=h.getFullYear(),q;q<h;q++)n+=12;k.toGregorian()<t.toGregorian()&&(n=-n);break;case "week":n=parseInt(e.difference(t,k,"day")/7);break;case "day":n/=24;case "hour":n/=60;case "minute":n/=60;case "second":n/=1E3;case "millisecond":n*=k.toGregorian().getTime()-t.toGregorian().getTime()}return Math.round(n)};return e})},"dojox/date/islamic/Date":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(M,H,B){var O=H("dojox.date.islamic.Date",null,{_date:0,_month:0,_year:0,_hours:0,
_minutes:0,_seconds:0,_milliseconds:0,_day:0,_GREGORIAN_EPOCH:1721425.5,_ISLAMIC_EPOCH:1948439.5,constructor:function(){var e=arguments.length;e?1==e?(e=arguments[0],"number"==typeof e&&(e=new Date(e)),e instanceof Date?this.fromGregorian(e):""==e?this._date=new Date(""):(this._year=e._year,this._month=e._month,this._date=e._date,this._hours=e._hours,this._minutes=e._minutes,this._seconds=e._seconds,this._milliseconds=e._milliseconds)):3<=e&&(this._year+=arguments[0],this._month+=arguments[1],this._date+=
arguments[2],this._hours+=arguments[3]||0,this._minutes+=arguments[4]||0,this._seconds+=arguments[5]||0,this._milliseconds+=arguments[6]||0):this.fromGregorian(new Date)},getDate:function(){return this._date},getMonth:function(){return this._month},getFullYear:function(){return this._year},getDay:function(){return this.toGregorian().getDay()},getHours:function(){return this._hours},getMinutes:function(){return this._minutes},getSeconds:function(){return this._seconds},getMilliseconds:function(){return this._milliseconds},
setDate:function(e){e=parseInt(e);if(!(0<e&&e<=this.getDaysInIslamicMonth(this._month,this._year))){var t;if(0<e)for(t=this.getDaysInIslamicMonth(this._month,this._year);e>t;e-=t,t=this.getDaysInIslamicMonth(this._month,this._year))this._month++,12<=this._month&&(this._year++,this._month-=12);else for(t=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:this._year-1);0>=e;t=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:
this._year-1))this._month--,0>this._month&&(this._year--,this._month+=12),e+=t}this._date=e;return this},setFullYear:function(e){this._year=+e},setMonth:function(e){this._year+=Math.floor(e/12);this._month=0<e?Math.floor(e%12):Math.floor((e%12+12)%12)},setHours:function(){var e=arguments.length,t=0;1<=e&&(t=parseInt(arguments[0]));2<=e&&(this._minutes=parseInt(arguments[1]));3<=e&&(this._seconds=parseInt(arguments[2]));4==e&&(this._milliseconds=parseInt(arguments[3]));for(;24<=t;)this._date++,e=this.getDaysInIslamicMonth(this._month,
this._year),this._date>e&&(this._month++,12<=this._month&&(this._year++,this._month-=12),this._date-=e),t-=24;this._hours=t},_addMinutes:function(e){e+=this._minutes;this.setMinutes(e);this.setHours(this._hours+parseInt(e/60));return this},_addSeconds:function(e){e+=this._seconds;this.setSeconds(e);this._addMinutes(parseInt(e/60));return this},_addMilliseconds:function(e){e+=this._milliseconds;this.setMilliseconds(e);this._addSeconds(parseInt(e/1E3));return this},setMinutes:function(e){this._minutes=
e%60;return this},setSeconds:function(e){this._seconds=e%60;return this},setMilliseconds:function(e){this._milliseconds=e%1E3;return this},toString:function(){if(isNaN(this._date))return"Invalidate Date";var e=new Date;e.setHours(this._hours);e.setMinutes(this._minutes);e.setSeconds(this._seconds);e.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+e.toTimeString()},toGregorian:function(){var e=this._year;e=Math.floor(this._date+Math.ceil(29.5*this._month)+354*
(e-1)+Math.floor((3+11*e)/30)+this._ISLAMIC_EPOCH-1-.5)+.5;var t=e-this._GREGORIAN_EPOCH,k=Math.floor(t/146097),h=this._mod(t,146097);t=Math.floor(h/36524);var q=this._mod(h,36524);h=Math.floor(q/1461);q=this._mod(q,1461);q=Math.floor(q/365);k=400*k+100*t+4*h+q;4!=t&&4!=q&&k++;t=e-(this._GREGORIAN_EPOCH+365*(k-1)+Math.floor((k-1)/4)-Math.floor((k-1)/100)+Math.floor((k-1)/400));h=this._GREGORIAN_EPOCH-1+365*(k-1)+Math.floor((k-1)/4)-Math.floor((k-1)/100)+Math.floor((k-1)/400)+Math.floor(739/12+(B.isLeapYear(new Date(k,
3,1))?-1:-2)+1);h=e<h?0:B.isLeapYear(new Date(k,3,1))?1:2;t=Math.floor((12*(t+h)+373)/367);h=this._GREGORIAN_EPOCH-1+365*(k-1)+Math.floor((k-1)/4)-Math.floor((k-1)/100)+Math.floor((k-1)/400)+Math.floor((367*t-362)/12+(2>=t?0:B.isLeapYear(new Date(k,t-1,1))?-1:-2)+1);return new Date(k,t-1,e-h+1,this._hours,this._minutes,this._seconds,this._milliseconds)},fromGregorian:function(e){e=new Date(e);var t=e.getFullYear(),k=e.getMonth(),h=e.getDate();t=this._GREGORIAN_EPOCH-1+365*(t-1)+Math.floor((t-1)/4)+
-Math.floor((t-1)/100)+Math.floor((t-1)/400)+Math.floor((367*(k+1)-362)/12+(2>=k+1?0:B.isLeapYear(e)?-1:-2)+h);t=Math.floor(t)+.5;t-=this._ISLAMIC_EPOCH;k=Math.floor((30*t+10646)/10631);h=Math.ceil((t-29-this._yearStart(k))/29.5);h=Math.min(h,11);this._date=Math.ceil(t-this._monthStart(k,h))+1;this._month=h;this._year=k;this._hours=e.getHours();this._minutes=e.getMinutes();this._seconds=e.getSeconds();this._milliseconds=e.getMilliseconds();this._day=e.getDay();return this},valueOf:function(){return this.toGregorian().valueOf()},
_yearStart:function(e){return 354*(e-1)+Math.floor((3+11*e)/30)},_monthStart:function(e,t){return Math.ceil(29.5*t)+354*(e-1)+Math.floor((3+11*e)/30)},_civilLeapYear:function(e){return 11>(14+11*e)%30},getDaysInIslamicMonth:function(e,t){var k=0;k=29+(e+1)%2;11==e&&this._civilLeapYear(t)&&k++;return k},_mod:function(e,t){return e-t*Math.floor(e/t)}});O.getDaysInIslamicMonth=function(e){return(new O).getDaysInIslamicMonth(e.getMonth(),e.getFullYear())};return O})},"dojox/date/islamic/locale":function(){define("dojox/main dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./Date dojo/i18n!dojo/cldr/nls/islamic".split(" "),
function(M,H,B,O,e,t,k,h,q){function n(F,f,p,v,R){return R.replace(/([a-z])\1*/ig,function(I){var X=I.charAt(0);I=I.length;var T=["abbr","wide","narrow"];switch(X){case "G":var U=f.eraAbbr[0];break;case "y":U=String(F.getFullYear());break;case "M":U=F.getMonth();if(3>I){U+=1;var y=!0}else X=["months-format",T[I-3]].join("-"),U=f[X][U];break;case "d":U=F.getDate(!0);y=!0;break;case "E":U=F.getDay();3>I?(U+=1,y=!0):(X=["days-format",T[I-3]].join("-"),U=f[X][U]);break;case "a":U=12>F.getHours()?"am":
"pm";U=f["dayPeriods-format-wide-"+U];break;case "h":case "H":case "K":case "k":y=F.getHours();switch(X){case "h":U=y%12||12;break;case "H":U=y;break;case "K":U=y%12;break;case "k":U=y||24}y=!0;break;case "m":U=F.getMinutes();y=!0;break;case "s":U=F.getSeconds();y=!0;break;case "S":U=Math.round(F.getMilliseconds()*Math.pow(10,I-3));y=!0;break;case "z":if(U=O.getTimezoneName(F.toGregorian()))break;I=4;case "Z":U=F.toGregorian().getTimezoneOffset();U=[0>=U?"+":"-",k.pad(Math.floor(Math.abs(U)/60),2),
k.pad(Math.abs(U)%60,2)];4==I&&(U.splice(0,0,"GMT"),U.splice(3,0,":"));U=U.join("");break;default:throw Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+R);}y&&(U=k.pad(U,I));return U})}function w(F,f,p,v){var R=function(T){return T};f=f||R;p=p||R;v=v||R;var I=F.match(/(''|[^'])+/g),X="'"==F.charAt(0);B.forEach(I,function(T,U){T?(I[U]=(X?p:f)(T),X=!X):I[U]=""});return v(I.join(""))}function u(F,f,p,v){v=t.escapeString(v);e.normalizeLocale(p.locale);return v.replace(/([a-z])\1*/ig,
function(R){var I=R.charAt(0);var X=R.length,T="";p.strict?1<X&&(T="0{"+(X-1)+"}"):T="0?";switch(I){case "y":I="\\d+";break;case "M":I=2<X?"\\S+ ?\\S+":T+"[1-9]|1[0-2]";break;case "d":I="[12]\\d|"+T+"[1-9]|3[01]";break;case "E":I="\\S+";break;case "h":I=T+"[1-9]|1[0-2]";break;case "k":I=T+"\\d|1[01]";break;case "H":I=T+"\\d|1\\d|2[0-3]";break;case "K":I=T+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":I=T+"\\d|[0-5]\\d";break;case "S":I="\\d{"+X+"}";break;case "a":X=p.am||f["dayPeriods-format-wide-am"];
T=p.pm||f["dayPeriods-format-wide-pm"];p.strict?I=X+"|"+T:(I=X+"|"+T,X!=X.toLowerCase()&&(I+="|"+X.toLowerCase()),T!=T.toLowerCase()&&(I+="|"+T.toLowerCase()));break;default:I=".*"}F&&F.push(R);return"("+I+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var r=H.getObject("date.islamic.locale",!0,M);r.format=function(F,f){f=f||{};var p=e.normalizeLocale(f.locale),v=f.formatLength||"short",R=r._getIslamicBundle(p),I=[];p=H.hitch(this,n,F,R,p,f.fullYear);if("year"==f.selector)return F.getFullYear();"time"!=f.selector&&
(F=f.datePattern||R["dateFormat-"+v])&&I.push(w(F,p));"date"!=f.selector&&(f=f.timePattern||R["timeFormat-"+v])&&I.push(w(f,p));return I.join(" ")};r.regexp=function(F){return r._parseInfo(F).regexp};r._parseInfo=function(F){F=F||{};var f=e.normalizeLocale(F.locale);f=r._getIslamicBundle(f);var p=F.formatLength||"short",v=F.datePattern||f["dateFormat-"+p];p=F.timePattern||f["timeFormat-"+p];var R=[];return{regexp:w("date"==F.selector?v:"time"==F.selector?p:"undefined"==typeof p?v:v+" "+p,H.hitch(this,
u,R,f,F)),tokens:R,bundle:f}};r.parse=function(F,f){F=F.replace(/[\u200E\u200F\u202A\u202E]/g,"");f||(f={});var p=r._parseInfo(f),v=p.tokens,R=p.bundle;p=p.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");F=(new RegExp("^"+p+"$")).exec(F);e.normalizeLocale(f.locale);if(!F)return null;var I=[1389,0,1,0,0,0,0],X="",T=["abbr","wide","narrow"];B.every(F,function(U,y){if(!y)return!0;y=v[y-1];var Z=y.length;switch(y.charAt(0)){case "y":I[0]=Number(U);break;case "M":if(2<Z){if(y=R["months-format-"+T[Z-3]].concat(),
f.strict||(U=U.replace(".","").toLowerCase(),y=B.map(y,function(ea){return ea?ea.replace(".","").toLowerCase():ea})),U=B.indexOf(y,U),-1==U)return!1}else U--;I[1]=Number(U);break;case "D":I[1]=0;case "d":I[2]=Number(U);break;case "a":y=f.am||R["dayPeriods-format-wide-am"];Z=f.pm||R["dayPeriods-format-wide-pm"];if(!f.strict){var S=/\./g;U=U.replace(S,"").toLowerCase();y=y.replace(S,"").toLowerCase();Z=Z.replace(S,"").toLowerCase()}if(f.strict&&U!=y&&U!=Z)return!1;X=U==Z?"p":U==y?"a":"";break;case "K":24==
U&&(U=0);case "h":case "H":case "k":I[3]=Number(U);break;case "m":I[4]=Number(U);break;case "s":I[5]=Number(U);break;case "S":I[6]=Number(U)}return!0});F=+I[3];"p"===X&&12>F?I[3]=F+12:"a"===X&&12==F&&(I[3]=0);return new h(I[0],I[1],I[2],I[3],I[4],I[5],I[6])};var l=[];r.addCustomFormats=function(F,f){l.push({pkg:F,name:f})};r._getIslamicBundle=function(F){var f={};B.forEach(l,function(p){p=e.getLocalization(p.pkg,p.name,F);f=H.mixin(f,p)},this);return f};r.addCustomFormats("dojo.cldr","islamic");r.getNames=
function(F,f,p,v,R){v=r._getIslamicBundle(v);F=[F,p,f];if("standAlone"==p){p=F.join("-");var I=v[p];1==I[0]&&(I=void 0)}F[1]="format";return(I||v[F.join("-")]).concat()};r.weekDays=r.getNames("days","wide","format");r.months=r.getNames("months","wide","format");return r})},"widgets/NetworkTrace/highlightSymbolUtils":function(){define("dojo/_base/lang dojo/_base/array esri/geometry/Point esri/geometry/Polygon esri/geometry/Polyline esri/graphic esri/symbols/SimpleMarkerSymbol esri/symbols/SimpleLineSymbol esri/symbols/SimpleFillSymbol esri/Color".split(" "),
function(M,H,B,O,e,t,k,h,q,n){var w={getHighLightSymbol:function(u,r){switch(u.geometry.type){case "point":return w._getPointSymbol(u,r);case "polyline":return w._getPolyLineSymbol(u,r);case "polygon":return w._getPolygonSymbol(u,r)}},_getSizeInfo:function(u){var r=null;u.renderer.visualVariables&&H.forEach(u.renderer.visualVariables,M.hitch(this,function(l){"sizeInfo"===l.type&&(r=l)}));return r},_getPointSymbol:function(u,r){var l,F;var f=!1;var p=new k(k.STYLE_SQUARE,null,new h(h.STYLE_SOLID,new n([0,
255,255,1]),3));p.setColor(null);p.size=30;if(r&&r.renderer)if(r.renderer.symbol)f=!0,p=w._updatePointSymbolProperties(p,r.renderer.symbol);else if(r.renderer.infos&&0<r.renderer.infos.length){for(F=0;F<r.renderer.infos.length;F++){r.typeIdField?l=u.attributes[r.typeIdField]:r.renderer.attributeField&&(l=u.attributes[r.renderer.attributeField]);var v=r.renderer.infos[F].value;void 0!==l&&null!==l&&""!==l&&void 0!==v&&null!==v&&""!==v&&l.toString()===v.toString()&&(f=!0,p=w._updatePointSymbolProperties(p,
r.renderer.infos[F].symbol))}!f&&r.renderer.defaultSymbol&&(f=!0,p=w._updatePointSymbolProperties(p,r.renderer.defaultSymbol))}r&&r.graphics&&0<r.graphics.length&&r._getSymbol(u)&&((l=u.getShape())&&l.shape?l.shape.hasOwnProperty("r")?(f=!0,p.size=2*l.shape.r+10):l.shape.hasOwnProperty("width")&&(f=!0,r.renderer&&r.renderer.infos&&0<r.renderer.infos.length&&(p=w._updatePointSymbolProperties(p,r.renderer.infos[0].symbol)),p.size=l.shape.width+10):r.renderer.visualVariables&&(f=r._getRenderer(u),l=
w._getSizeInfo(r))&&(r=f.getSize(u,{sizeInfo:l,shape:r._getSymbol(u),resolution:r&&r.getResolutionInMeters&&r.getResolutionInMeters()}),null!==r&&(p.size=r+10)));r=new B(u.geometry.x,u.geometry.y,u.geometry.spatialReference);return new t(r,p,u.attributes)},_updatePointSymbolProperties:function(u,r){if(r.hasOwnProperty("height")&&r.hasOwnProperty("width")){var l=r.height;var F=r.width;l=(l>F?l:F)+10;u.size=l}r.hasOwnProperty("size")&&(!l||l<r.size)&&(u.size=r.size+10);r.hasOwnProperty("xoffset")&&
(u.xoffset=r.xoffset);r.hasOwnProperty("yoffset")&&(u.yoffset=r.yoffset);return u},_getPolyLineSymbol:function(u,r){var l,F;var f=5;if(r&&r.renderer)if(r.renderer.symbol&&r.renderer.symbol.hasOwnProperty("width"))f=r.renderer.symbol.width;else if(r.renderer.infos&&0<r.renderer.infos.length)for(F=0;F<r.renderer.infos.length;F++){r.typeIdField?l=u.attributes[r.typeIdField]:r.renderer.attributeField&&(l=u.attributes[r.renderer.attributeField]);var p=r.renderer.infos[F].value;void 0!==l&&null!==l&&""!==
l&&void 0!==p&&null!==p&&""!==p&&l.toString()===p.toString()&&r.renderer.infos[F].symbol.hasOwnProperty("width")&&(f=r.renderer.infos[F].symbol.width)}else r.renderer.defaultSymbol&&r.renderer.defaultSymbol.hasOwnProperty("width")&&(f=r.renderer.defaultSymbol.width);r=new h(h.STYLE_SOLID,new n([0,255,255,1]),f);f=new e(u.geometry.spatialReference);u.geometry.paths&&0<u.geometry.paths.length&&f.addPath(u.geometry.paths[0]);return new t(f,r,u.attributes)},_getPolygonSymbol:function(u){var r=new q(q.STYLE_SOLID,
new h(h.STYLE_SOLID,new n([0,255,255,1]),4),new n([0,0,0,0]));var l=new O(u.geometry.spatialReference);u.geometry.rings&&(l.rings=M.clone(u.geometry.rings));return new t(l,r,u.attributes)}};return w})},"widgets/NetworkTrace/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:dijit/templates/ProgressBar.html":'\x3cdiv class\x3d"dijitProgressBar dijitProgressBarEmpty" role\x3d"progressbar"\r\n\t\x3e\x3cdiv  data-dojo-attach-point\x3d"internalProgress" class\x3d"dijitProgressBarFull"\r\n\t\t\x3e\x3cdiv class\x3d"dijitProgressBarTile" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\x3e\x3cspan style\x3d"visibility:hidden"\x3e\x26#160;\x3c/span\r\n\t\x3e\x3c/div\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"labelNode" class\x3d"dijitProgressBarLabel" id\x3d"${id}_label"\x3e\x3c/div\r\n\t\x3e\x3cspan data-dojo-attach-point\x3d"indeterminateHighContrastImage"\r\n\t\t   class\x3d"dijitInline dijitProgressBarIndeterminateHighContrastImage"\x3e\x3c/span\r\n\x3e\x3c/div\x3e\r\n',
"url:esri/dijit/editing/templates/AttachmentEditor.html":"\x3cdiv class\x3d\"attachmentEditor\"\x3e\r\n    \x3cbr /\x3e\r\n    \x3cdiv\x3e\r\n        \x3cb\x3e${NLS_attachments}\x3c/b\x3e\r\n        \x3chr /\x3e\r\n        \x3cdiv dojoAttachPoint\x3d\"_attachmentError\" style\x3d'color:red;display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e\r\n        \x3cspan dojoAttachPoint\x3d'_attachmentList' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e\r\n        \x3cbr\x3e\x3cbr\x3e\r\n        \x3cdiv data-dojo-type\x3d\"dijit/ProgressBar\" dojoAttachPoint\x3d\"_attachmentProgress\" indeterminate\x3d\"true\" style\x3d'display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e        \r\n        \x3cform dojoAttachPoint\x3d'_uploadForm'\x3e ${NLS_add}:\x26nbsp;\x26nbsp;\x3cinput type\x3d'file' name\x3d'attachment' dojoAttachPoint\x3d'_uploadField' /\x3e \x3c/form\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e",
"url:esri/dijit/templates/AttributeInspector.html":'\x3cdiv class\x3d"esriAttributeInspector"\x3e\r\n    \x3cdiv class\x3d"atiLayerName" dojoAttachPoint\x3d"layerName"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiAttributes" dojoAttachPoint\x3d"attributeTable"\x3e\x3c/div\x3e\r\n    \x3cdiv dojoAttachPoint\x3d"attachmentEditor"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiEditorTrackingInfo" dojoAttachPoint\x3d"editorTrackingInfoDiv"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiButtons" dojoAttachPoint\x3d"editButtons"\x3e\r\n        \x3cbutton  dojoType\x3d"dijit.form.Button" class\x3d"atiButton atiDeleteButton"  dojoAttachPoint\x3d"deleteBtn" dojoAttachEvent\x3d"onClick: onDeleteBtn" showLabel\x3d"true" type\x3d"button"\x3e${NLS_deleteFeature}\x3c/button\x3e\r\n        \x3cdiv class\x3d"atiNavButtons" dojoAttachPoint\x3d"navButtons"\x3e\r\n            \x3cdiv class\x3d"atiNavMessage" dojoAttachPoint\x3d"navMessage"\x3e\x3c/div\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiFirstIcon" dojoAttachPoint\x3d"firstFeatureButton" dojoAttachEvent\x3d"onClick: onFirstFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_first}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiPrevIcon" dojoAttachPoint\x3d"prevFeatureButton" dojoAttachEvent\x3d"onClick: onPreviousFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_previous}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiNextIcon" dojoAttachPoint\x3d"nextFeatureButton" dojoAttachEvent\x3d"onClick: onNextFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_next}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiLastIcon" dojoAttachPoint\x3d"lastFeatureButton" dojoAttachEvent\x3d"onClick: onLastFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_last}\x3c/button\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/NetworkTrace/Widget.html":'\x3cdiv\x3e\r\n    \x3cdiv class\x3d"item esriCTMainParentContainer"\x3e\r\n        \x3cdiv class\x3d"content esriCTMainParentContentContainer" data-dojo-attach-point\x3d"mainParentContentContainer"\x3e\r\n            \x3c!-- Loading indicator starts --\x3e\r\n            \x3cdiv class\x3d"runIconidle" data-dojo-attach-point\x3d"loadingIcon"\x3e\x3c/div\x3e\r\n            \x3c!-- Loading indicator ends --\x3e\r\n            \x3c!-- New Or Load Project starts --\x3e\r\n            \x3cdiv class\x3d"esriCTLoadProjectParentContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"loadProjectParentContainer"\x3e\r\n                \x3cdiv class\x3d"esriCTLoadProjectDropDownContainer" data-dojo-attach-point\x3d"loadProjectDropdownContainer"\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTDisableEditProjectBtn" title\x3d"${nls.editProjectAttributesToolTip}"\r\n                    data-dojo-attach-event\x3d"onclick:_editProjectAttributes"\r\n                    data-dojo-attach-point\x3d"editProjectAttributes" role\x3d"button" tabindex\x3d"-1"\r\n                    aria-label\x3d"${nls.editProjectAttributesToolTip}"\x3e\x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- New Or Load Project ends --\x3e\r\n            \x3c!-- Tab starts --\x3e\r\n            \x3cdiv class\x3d"esriCTInputOutputTabParentContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"inputOutputTabParentContainer"\x3e\r\n                \x3cdiv class\x3d"esriCTTabParentContainer" data-dojo-attach-point\x3d"tabContainerNetworkTrace"\x3e\r\n                    \x3c!-- Input tab main container starts --\x3e\r\n                    \x3cdiv class\x3d"esriCTInputParentMainContainer" data-dojo-attach-point\x3d"inputTabPanel"\x3e\r\n                        \x3c!-- Input tab summary text container starts --\x3e\r\n                        \x3cdiv class\x3d"esriCTClearBoth esriCTHidden" data-dojo-attach-point\x3d"inputTabSummaryTextContainer" role\x3d"presentation" tabindex\x3d"0"\x3e\r\n                        \x3c/div\x3e\r\n                        \x3c!-- Input tab summary text container ends --\x3e\r\n                        \x3c!-- Trace panel starts --\x3e\r\n                        \x3cdiv class\x3d"tracePanel" data-dojo-attach-point\x3d"tracePanel"\x3e\r\n                            \x3cdiv class\x3d"traceControls"\x3e\r\n                                \x3c!-- Flag icon starts --\x3e\r\n                                \x3cdiv class\x3d"btnFlagStyle" data-dojo-attach-point\x3d"flagIconMainContainer"\x3e\r\n                                    \x3c!-- aria-label added at runtime as it needs to fetched from config --\x3e\r\n                                    \x3cdiv class\x3d"flagbutton esriCTHidden" data-dojo-attach-point\x3d"btnFlag"\r\n                                        aria-pressed\x3d"false" role\x3d"button" tabindex\x3d"0"\r\n                                        data-dojo-attach-event\x3d"onclick:_onFlagButtonClick"\x3e\r\n                                    \x3c/div\x3e\r\n                                    \x3clabel class\x3d"flagLabel" data-dojo-attach-point\x3d"flagLabel" for\x3d"btnFlag"\x3e\r\n                                    \x3c/label\x3e\r\n                                \x3c/div\x3e\r\n                                \x3c!-- Flag icon ends --\x3e\r\n                                \x3c!-- Barrier icon starts --\x3e\r\n                                \x3cdiv class\x3d"btnBarrierStyle" data-dojo-attach-point\x3d"barrierIconMainContainer"\x3e\r\n                                    \x3c!-- aria-label added at runtime as it needs to fetched from config --\x3e\r\n                                    \x3cdiv class\x3d"barrierButton esriCTHidden" data-dojo-attach-point\x3d"btnBarrier"\r\n                                        aria-pressed\x3d"false" role\x3d"button" tabindex\x3d"0"\r\n                                        data-dojo-attach-event\x3d"onclick:_onBarrierButtonClick"\x3e\r\n                                    \x3c/div\x3e\r\n                                    \x3clabel class\x3d"barrierLabel" data-dojo-attach-point\x3d"barrierLabel" for\x3d"btnBarrier"\x3e\r\n                                    \x3c/label\x3e\r\n                                \x3c/div\x3e\r\n                                \x3c!-- Barrier icon ends --\x3e\r\n                            \x3c/div\x3e\r\n                            \x3cdiv class\x3d"traceButtons"\x3e\r\n                                \x3cdiv class\x3d"esriCTRunButtonContainer"\x3e\r\n                                    \x3cdiv class\x3d"jimu-btn jimu-state-disabled esriCTBtnRunTrace"\r\n                                        data-dojo-attach-point\x3d"btnTrace" role\x3d"button" tabindex\x3d"-1"\r\n                                        aria-label\x3d"${nls.defaultValueForRunButton}" type\x3d"submit" disabled\r\n                                        data-dojo-attach-event\x3d"onclick:_onTraceButtonClick"\x3e\r\n                                        ${nls.defaultValueForRunButton}\r\n                                    \x3c/div\x3e\r\n                                \x3c/div\x3e\r\n                                \x3cdiv class\x3d"esriCTClearButtonContainer"\x3e\r\n                                    \x3cdiv class\x3d"jimu-btn esriCTBtnClear" data-dojo-attach-point\x3d"btnClear" type\x3d"submit"\r\n                                        role\x3d"button" tabindex\x3d"0" aria-label\x3d"${nls.clearButtonValue}"\r\n                                        data-dojo-attach-event\x3d"onclick:_onClearButtonClick"\x3e\r\n                                        ${nls.clearButtonValue}\r\n                                    \x3c/div\x3e\r\n                                \x3c/div\x3e\r\n                            \x3c/div\x3e\r\n                        \x3c/div\x3e\r\n                        \x3c!-- Trace panel ends --\x3e\r\n                        \x3c!-- Input, Barrier \x26 Skip Location on main page starts --\x3e\r\n                        \x3cdiv class\x3d"esriCTFlagBarrierSkipLocationMainPage"\r\n                            data-dojo-attach-point\x3d"flagBarrierSkipLocationMainPageContainer"\x3e\r\n                            \x3c!-- Input text --\x3e\r\n                            \x3cdiv class\x3d"esriCTInputLocationTab esriCTHidden" data-dojo-attach-point\x3d"inputLocTab"\r\n                                data-dojo-attach-event\x3d"onclick:_onInputLocTabClick" role\x3d"button" tabindex\x3d"0"\r\n                                aria-label\x3d"${nls.lblInputLocHeader}"\x3e\r\n                                \x3cdiv class\x3d"esriCTlblLoc" data-dojo-attach-point\x3d"lblInputLoc"\x3e\r\n                                    ${nls.lblInputLocHeader}\x3c/div\x3e\r\n                                \x3cdiv class\x3d"esriCTTabRightimg" data-dojo-attach-point\x3d"inputLocRightCaretIcon"\x3e\r\n                                \x3c/div\x3e\r\n                            \x3c/div\x3e\r\n                            \x3c!-- Barrier text --\x3e\r\n                            \x3cdiv class\x3d"esriCTBarrierLocationTab esriCTHidden" data-dojo-attach-point\x3d"barrierLocTab"\r\n                                data-dojo-attach-event\x3d"onclick:_onBarrierLocTabClick" role\x3d"button" tabindex\x3d"0"\r\n                                aria-label\x3d"${nls.lblBlockLocHeader}"\x3e\r\n                                \x3cdiv class\x3d"esriCTlblLoc" data-dojo-attach-point\x3d"lblBlockLoc"\x3e\r\n                                    ${nls.lblBlockLocHeader}\x3c/div\x3e\r\n                                \x3cdiv class\x3d"esriCTTabRightimg"\x3e\r\n                                \x3c/div\x3e\r\n                            \x3c/div\x3e\r\n                            \x3c!-- Skip Location text --\x3e\r\n                            \x3cdiv class\x3d"esriCTSkipLocationTab esriCTHidden" data-dojo-attach-point\x3d"skipLocationTab"\r\n                                data-dojo-attach-event\x3d"onclick:_onSkipLocationTabClick" role\x3d"button" tabindex\x3d"0"\r\n                                aria-label\x3d"${nls.lblSkipLocHeader}"\x3e\r\n                                \x3cdiv class\x3d"esriCTlblLoc" data-dojo-attach-point\x3d"lblSkipLoc"\x3e\r\n                                    ${nls.lblSkipLocHeader}\x3c/div\x3e\r\n                                \x3cdiv class\x3d"esriCTTabRightimg"\x3e\r\n                                \x3c/div\x3e\r\n                            \x3c/div\x3e\r\n                        \x3c/div\x3e\r\n                        \x3c!-- Input, Barrier \x26 Skip Location on main page ends --\x3e\r\n                    \x3c/div\x3e\r\n                    \x3c!-- Input tab main container starts --\x3e\r\n                    \x3c!-- Output tab main container starts --\x3e\r\n                    \x3cdiv class\x3d"esriCTOutputParentMainContainer esriCTHidden" data-dojo-attach-point\x3d"outputTab"\x3e\r\n                        \x3cdiv class\x3d"esriCTLayerInformationContainer esriCTHidden"\r\n                            data-dojo-attach-point\x3d"resultLayersInformationContainer" role\x3d"presentation" tabindex\x3d"0"\x3e\r\n                        \x3c/div\x3e\r\n                        \x3cdiv class\x3d"esriCTResultsLayerNamesContainer esriCTHidden"\r\n                            data-dojo-attach-point\x3d"resultsLayerNamesContainer"\x3e\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3c!-- Output tab main container ends --\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Tab ends --\x3e\r\n            \x3cdiv class\x3d"esriCTResultsLayerFeaturesContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"layerFeaturesContainer"\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Edit project starts --\x3e\r\n            \x3cdiv class\x3d"esriCTEditProjectAttributeContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"editAttributeContainer"\x3e\r\n                \x3c!-- Attribute Inspector --\x3e\r\n                \x3cdiv class\x3d"esriCTAttributeInspectorContainer" data-dojo-attach-point\x3d"attributeInspectorContainer"\x3e\r\n                \x3c/div\x3e\r\n                \x3c!-- Ok \x26 Cancel button --\x3e\r\n                \x3cdiv class\x3d"esriCTEditProjectOkAndCancelBtnParentContainer"\x3e\r\n                    \x3cdiv class\x3d"esriCTEditProjectAttributeOkButtonContainer"\x3e\r\n                        \x3cdiv class\x3d"jimu-btn esriCTEditProjectAttributeOkButton"\r\n                            data-dojo-attach-point\x3d"editProjectAttributeOkButtonNode"\r\n                            data-dojo-attach-event\x3d"onClick:_onOkButtonClick" role\x3d"button" tabindex\x3d"0"\r\n                            aria-label\x3d"${nls.ok}"\x3e\r\n                            ${nls.ok}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriCTEditProjectAttributeCancelButtonContainer"\x3e\r\n                        \x3cdiv class\x3d"jimu-btn esriCTEditProjectAttributeCancelButton"\r\n                            data-dojo-attach-event\x3d"onClick:_hideAttributeInspector"\r\n                            data-dojo-attach-point\x3d"editProjectAttributeCancelButtonNode" role\x3d"button" tabindex\x3d"0"\r\n                            aria-label\x3d"${nls.cancel}"\x3e\r\n                            ${nls.cancel}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Input --\x3e\r\n            \x3cdiv class\x3d"esriCTFlagsList esriCTHidden" data-dojo-attach-point\x3d"inputLocDiv"\x3e\r\n                \x3cdiv class\x3d"esriCTBackButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"esriCTFlagsListBackButton"\x3e\r\n                        \x3cdiv class\x3d"esriCTFlagsBackText" data-dojo-attach-point\x3d"inputBackClick" role\x3d"button"\r\n                            tabindex\x3d"0" aria-label\x3d"${nls.backButtonValue}"\x3e\r\n                            \x26lt;${nls.backButtonValue}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriCTFlagsCountText" data-dojo-attach-point\x3d"flagCountLabel"\x3e\r\n                        ${nls.lblBlockLocHeader}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTFlagsContent" data-dojo-attach-point\x3d"flagLocContent"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Barrier --\x3e\r\n            \x3cdiv class\x3d"esriCTBarrierLocationList esriCTHidden" data-dojo-attach-point\x3d"barrierLocDiv"\x3e\r\n                \x3cdiv class\x3d"esriCTBackButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"esriCTBarrierListBackButton"\x3e\r\n                        \x3cdiv class\x3d"esriCTBarrierBackText" data-dojo-attach-point\x3d"barrierBackClick" role\x3d"button"\r\n                            tabindex\x3d"0" aria-label\x3d"${nls.backButtonValue}"\x3e\r\n                            \x26lt;${nls.backButtonValue}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriCTBarrierCountText" data-dojo-attach-point\x3d"barrierCountLabel"\x3e\r\n                        ${nls.lblBlockLocHeader}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTBarrierContent" data-dojo-attach-point\x3d"barrierLocContent"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Skip Location --\x3e\r\n            \x3cdiv class\x3d"esriCTSkipLocationList esriCTHidden" data-dojo-attach-point\x3d"skipLocDiv"\x3e\r\n                \x3cdiv class\x3d"esriCTBackButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"esriCTSkipLocationListBackButton"\x3e\r\n                        \x3cdiv class\x3d"esriCTSkipLocationBackText" data-dojo-attach-point\x3d"skipLocationBackClick"\r\n                            role\x3d"button" tabindex\x3d"0" aria-label\x3d"${nls.backButtonValue}"\x3e\r\n                            \x26lt;${nls.backButtonValue}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriCTSkipLocationsCountText" data-dojo-attach-point\x3d"skipLocationCountLabel"\x3e\r\n                        ${nls.lblSkipLocHeader}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTRemoveSkipAllLocationParentContainer"\r\n                    data-dojo-attach-point\x3d"removeSkipAllLocationParentContainer"\x3e\r\n                    \x3cdiv class\x3d"jimu-btn esriCTRemoveSkipLocationButton" data-dojo-attach-point\x3d"removeSkipAllButton"\r\n                        data-dojo-attach-event\x3d"onclick:_onRemoveSkipAllButtonClick" role\x3d"button" tabindex\x3d"0"\r\n                        aria-label\x3d"${nls.removeAllSkipLocationLabel}"\x3e\r\n                        ${nls.removeAllSkipLocationLabel}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTSkipContent" data-dojo-attach-point\x3d"skipLocationsListContainer"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Export to CSV form starts --\x3e\r\n            \x3cdiv class\x3d"esriCTExportToCSVFormParentContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"exportToCSVFormParentContainer"\x3e\r\n                \x3c!-- Export to CSV form --\x3e\r\n                \x3cdiv class\x3d"esriCTBackButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"esriCTExportBackButton"\x3e\r\n                        \x3cdiv class\x3d"esriCTExportBackText" data-dojo-attach-point\x3d"exportBackNode"\r\n                            data-dojo-attach-event\x3d"onClick:_onExportToCSVFormBackBtnClick" role\x3d"button" tabindex\x3d"0"\r\n                            aria-label\x3d"${nls.backButtonValue}"\x3e\r\n                            \x26lt;${nls.backButtonValue}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                    \x3cdiv class\x3d"esriCTExportToCsvText"\x3e\r\n                        ${nls.exportToCSVText}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3c!-- Export to CSV form --\x3e\r\n                \x3cdiv class\x3d"esriCTExportToCSVFormContainer" data-dojo-attach-point\x3d"exportToCSVFormContainer"\x3e\x3c/div\x3e\r\n                \x3c!-- Export OK button button --\x3e\r\n                \x3cdiv class\x3d"esriCTExportToCsvOkBtnParentContainer esriCTTextCenter"\x3e\r\n                    \x3cdiv class\x3d"esriCTExportToCsvOkButtonContainer esriCTExportToCSVOkBtnCenterContainer"\x3e\r\n                        \x3cdiv class\x3d"jimu-btn esriCTExportToCSVOkBtn"\r\n                            data-dojo-attach-event\x3d"onClick:_onExportToCSVFormOkBtnClick"\r\n                            data-dojo-attach-point\x3d"exportToCsvFileMainButton" role\x3d"button" tabindex\x3d"0"\r\n                            aria-label\x3d"${nls.ok}"\x3e\r\n                            ${nls.ok}\r\n                        \x3c/div\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Export to CSV form ends --\x3e\r\n            \x3c!-- Save project, Export to CSV starts --\x3e\r\n            \x3cdiv class\x3d"esriCTSaveAndExportParentContainer esriCTHidden"\r\n                data-dojo-attach-point\x3d"saveAndExportParentContainer"\x3e\r\n                \x3cdiv class\x3d"esriCTSaveButtonContainer esriCTHidden" data-dojo-attach-point\x3d"saveButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"jimu-btn jimu-state-disabled esriCTProjectSaveButton"\r\n                        data-dojo-attach-point\x3d"projectSaveButton"\r\n                        data-dojo-attach-event\x3d"onClick:_onProjectSaveButtonClick" role\x3d"button" tabindex\x3d"0"\r\n                        aria-label\x3d"${nls.saveButtonLabel}"\x3e\r\n                        ${nls.saveButtonLabel}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTExportButtonContainer esriCTHidden" data-dojo-attach-point\x3d"exportButtonContainer"\x3e\r\n                    \x3cdiv class\x3d"jimu-btn jimu-state-disabled esriCTExportToCSVBtn"\r\n                        data-dojo-attach-event\x3d"onClick:_onExportToLayerButtonClick"\r\n                        data-dojo-attach-point\x3d"exportToCsvMainScreenButton" role\x3d"button" tabindex\x3d"0"\r\n                        aria-label\x3d"${nls.exportToCSVText}"\x3e\r\n                        ${nls.exportToCSVText}\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Save project, Export to CSV ends --\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTHidden" data-dojo-attach-point\x3d"errorNode"\x3e\r\n            ${nls.gpServiceNotAccessible}\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"supports-508-node lastFocusNode" tabindex\x3d"0" data-dojo-attach-point\x3d"supports508Node"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/NetworkTrace/css/style.css":'.jimu-widget-NetworkTrace .flagbutton{float: left; cursor: pointer; width: 40px; height: 40px; background-repeat: no-repeat; background-image: url("../images/add-flags.png"); background-size: 40px 40px;}.jimu-widget-NetworkTrace .barrierButton{float: left; cursor: pointer; width: 40px; height: 40px; background-repeat: no-repeat; background-image: url("../images/add-barriers.png"); background-size: 40px 40px;}.jimu-widget-NetworkTrace .flagButtonselected{float: left; cursor: pointer; width: 40px; height: 40px; background-repeat: no-repeat; background-image: url("../images/add-flags-select.png"); background-color: #858585; background-size: 40px 40px;}.jimu-widget-NetworkTrace .barrierButtonselected{float: left; cursor: pointer; width: 40px; height: 40px; background-repeat: no-repeat; background-image: url("../images/add-barriers-select.png"); background-color: #858585; background-size: 40px 40px;}.jimu-widget-NetworkTrace .traceControl{float: left; width: 100%;}.jimu-widget-NetworkTrace .btnFlagStyle{width: 100%; float: left; margin-bottom: 5px; height: 40px;}.jimu-rtl .jimu-widget-NetworkTrace .btnFlagStyle{padding: 2px 2px 0px 0px;}.jimu-widget-NetworkTrace .btnBarrierStyle{width: 100%; float: left; margin-bottom: 5px; height: 40px;}.jimu-rtl .jimu-widget-NetworkTrace .btnBarrierStyle{padding: 2px 2px 0px 0px;}.jimu-widget-NetworkTrace .flagLabel{float: left; padding: 13px 0px 13px 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 85%;}.jimu-widget-NetworkTrace .barrierLabel{float: left; padding: 13px 0px 13px 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 85%;}.jimu-widget-NetworkTrace .traceButtons{width: 100%; clear: both;}.resultItemButton{padding: 0; width: 20px; height: 20px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; cursor: pointer; outline: none; background-position: center center; background-repeat: no-repeat; background-size: 20px 20px; border: 0; margin-right: 5px; float: left;}.resultItemLabel{width: calc(100% - 30px); cursor: pointer; font-size: 14px; color: #3e3e3e; font-family: Avenir LT 35 Light; float: left; word-break: break-word; min-height: 19px;}.resultItemSubDiv{clear: both; width: 100%; overflow: hidden; padding: 10px 0px 10px 0px;}.jimu-widget-NetworkTrace .resultItemButtonSkipIcon{background-image: url("../images/skip.png"); background-color: #666666; border-radius:2px;}.jimu-widget-NetworkTrace .alreadySkippedLocation{background-color: #ebdd22; cursor: default;}.jimu-widget-NetworkTrace .runIconidle{display: none;}.boxPanel{top: 140px !important;}.jimu-widget-NetworkTrace .runIconProcessing{position: absolute; z-index: 999; background-image: url(../images/loading.gif); background-position: center; background-repeat: no-repeat; background-size: 40px; height: 100%; width: 100%;}.jimu-widget-NetworkTrace .traceControlDisabledDiv{pointer-events: none;}.claro .dijitTitlePaneContentInner{padding: 0px;}.dijitButtonNode{border: 0px solid gray;}.dijitValidationTextBoxError input.dijitValidationInner, .dijitSelect input, .dijitTextBox input.dijitArrowButtonInner{height: 28px !important;}.dijitTimeTextBox{width: 12em !important;}.dijitDateTextBox{width: 12em !important;}.dijitArrowNode{float: right;}.claro .dijitTitlePaneTitleOpen, .claro .dijitTitlePaneTitleFixedOpen{background-color: #E9EEF4; color: Black;}.dijitTitlePane{background-color: #fff;}.claro .dijitTitlePaneTitle{background-color: #efefef; background-image: none; background-repeat: repeat-x; border-left: none; border-right: none; border-bottom: none; border-top: 1px solid #b5bcc7; color: #494949; min-height: 17px; padding: 7px 15px;}.claro .dijitTitlePaneContentOuter{border-left: none; border-right: none; border-bottom: none; border-top: 1px solid #b5bcc7;}.dijitheadPaneTitle{background-image: none; background-repeat: repeat-x; border-left: none; border-right: none; border-bottom: none; border-top: 1px solid #e5e5e5; color: #494949; min-height: 17px;}.jimu-widget-NetworkTrace .dijitheadPanelIcons{float: right;}.claro .dijitTitlePaneTitleFocus{outline: none;}.jimu-widget-NetworkTrace .esriCTHidden{display: none;}.claro .dijitSelect, .claro .dijitTextBox{width: 144px;}.attrResultInfoTable{border-collapse: collapse;}.attrResultInfoTable td.attrName{color: #888888; padding-right: 5px;}.attrResultInfoTable td{padding: 2px; padding-bottom: 5px;}.attrHeader{font-weight: bold;}.attrSeparator{border: none; border-top: 1px solid #333333; margin-top: 6px; margin-bottom: 6px;}.resultItem{border-bottom: 1px solid #f5f5f5;}.jimu-widget-NetworkTrace .esriCTInputLocationTab,.jimu-widget-NetworkTrace .esriCTBarrierLocationTab,.jimu-widget-NetworkTrace .esriCTSkipLocationTab {color: #3e3e3e; cursor: pointer; font-size: 14px; font-family: Avenir LT 35 Light; height: 42px;}.jimu-widget-NetworkTrace .esriCTTabRightimg{margin: 10px auto; position: relative; float: right; width: 14px; height: 14px; background-repeat: no-repeat; background-image: url("../images/right-arrow.png"); background-size: 14px 14px;}.jimu-widget-NetworkTrace .esriCTBarrierLocationTab,.jimu-widget-NetworkTrace .esriCTSkipLocationTab {border-top: none;}.jimu-widget-NetworkTrace .esriCTResultContainer{background-color: #FFFFFF; width: 100%; height: 100%; z-index: 998; clear: both;}.jimu-widget-NetworkTrace .esriCTResultContainerHeader{width: 100%; height: 40px; border-bottom: 1px solid #B5BCC9; color: #3e3e3e; font-weight: bold; font-size: 14px;}.jimu-widget-NetworkTrace .esriCTResultContainerBack{position: relative; float: left; margin: 10px 0px 10px 0px; cursor: pointer;}.jimu-widget-NetworkTrace .esriCTResultContainerBack:hover,.jimu-widget-NetworkTrace .esriCTExportBackText:hover,.jimu-widget-NetworkTrace .esriCTSkipLocationBackText:hover,.jimu-widget-NetworkTrace .esriCTFlagsBackText:hover,.jimu-widget-NetworkTrace .esriCTBarrierBackText:hover {text-decoration: underline;}.jimu-widget-NetworkTrace .esriCTResultContainerLbl{position: relative; float: right; margin: 10px 10px 10px 0px; max-width: 75%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}.jimu-widget-NetworkTrace .esriCTFlagsBarriersSkipLocationsMainDiv{width: 100%; padding: 10px 5px 10px 5px; float: left; box-sizing: border-box; border-bottom: 1px solid #f5f5f5; height: 40px;}.jimu-widget-NetworkTrace .esriCTFlagsBarriersSkipLocationsLabelContainer{float: left; cursor: pointer; font-size: 14px; color: #3e3e3e; font-family: Avenir LT 35 Light; width: calc(100% - 16px); word-break: break-word;}.jimu-widget-NetworkTrace .esriCTInputFlagCloseDiv,.jimu-widget-NetworkTrace .esriCTRemoveSkipLocationIcon {background-image: url(../images/delete.png); background-repeat: no-repeat; background-position: center; background-size: 16px; position: relative; float: right; padding: 0px 0px 0px 10px; width: 16px; height: 16px; cursor: pointer;}.jimu-widget-NetworkTrace .esriCTlblLoc{margin: 10px auto; position: relative; float: left; width: 90%;}.jimu-widget-NetworkTrace .esriCTLayerNameContainer{float: left; width: 100%; cursor: pointer; padding: 10px 0;}.jimu-widget-NetworkTrace .esriCTLayerName{float: left; width: calc(100% - 34px); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color: #3e3e3e; font-size: 14px; font-family: Avenir LT 35 Light; padding-left: 5px;}.jimu-widget-NetworkTrace .esriCTRightCaretIcon{float: right; width: 14px; height: 14px; color: #3e3e3e; font-size: 14px; font-family: Avenir LT 35 Light; background-repeat: no-repeat; background-image: url("../images/right-arrow.png"); background-size: 14px 14px;}.jimu-widget-NetworkTrace .esriCTResultsLayerFeaturesContainer{clear: both; width: 100%; height: 100%;}.claro .dijitSelect .dijitArrowButtonInner, .claro .dijitComboBox .dijitArrowButtonInner{border: none !important;}.esriCTDartBackgroudColor{background-color: transparent !important;}.jimu-widget-NetworkTrace .traceControls{float: left; width: 100%;}.esriCTDisableScroll{overflow-y: hidden !important;}.claro .dijitTextBoxIE9{background-color: rgba(0, 0, 0, 0.25) !important;}.claro .dijitDateTextBox .dijitArrowButtonIE9::before{content: inherit !important;}.claro .dijitComboBox .dijitButtonNodeIE9{background-image: none !important; background-repeat: no-repeat; background-color: rgba(0, 0, 0, 0.25) !important;}.claro .dijitTextBoxFocusedIE9 .dijitInputContainer{background-color: rgba(0, 0, 0, 0.5) !important;}.claro .dijitDateTextBox .dijitArrowButtonBlankContent::before{content: none !important;}.jimu-popup .content-static{margin: 15px 30px 0 !important; padding-top: 5px !important;}.jimu-widget-NetworkTrace .esriCTSkipAllLocationParentContainer {width: 100%; overflow: hidden; clear: both;}.jimu-widget-NetworkTrace .esriCTSkipLocationButton {margin: 5px auto; display: table; float: none;}.jimu-widget-NetworkTrace .esriCTRemoveSkipLocationButton {margin: 10px auto; display: table; float: none;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTRightCaretIcon {float: right; transform: rotateY(180deg);}.jimu-rtl .jimu-widget-NetworkTrace .esriCTLayerName {float: right; padding-left: 0px; padding-right: 5px;}.jimu-rtl .jimu-widget-NetworkTrace .resultItemButton {float: right; margin-right: 0px; margin-left: 5px;}.jimu-rtl .jimu-widget-NetworkTrace .resultItemLabel {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTTabRightimg {float: left; transform: rotateY(180deg);}.jimu-rtl .jimu-widget-NetworkTrace .esriCTlblLoc {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTFlagsBarriersSkipLocationsLabelContainer {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTRemoveSkipLocationIcon {float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTResultContainerLbl {float: left; margin: 10px 0px 10px 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTResultContainerBack {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTInputFlagCloseDiv {float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTBtnRunTrace {margin-right: 0px; margin-left: 20px; float: right;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTBtnClear {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .flagbutton {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .flagLabel {float: right; padding: 13px 10px 13px 0px;}.jimu-rtl .jimu-widget-NetworkTrace .barrierLabel {float: right; padding: 13px 10px 13px 0px;}.jimu-rtl .jimu-widget-NetworkTrace .barrierButton {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .flagButtonselected {float: right;}.jimu-rtl .jimu-widget-NetworkTrace .barrierButtonselected {float: right;}.jimu-widget-NetworkTrace .esriCTLoadProjectDropDownContainer {width: calc(100% - 30px); float: left; padding-right: 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTLoadProjectDropDownContainer {float: right; padding-right: 0px; padding-left: 10px;}.jimu-widget-NetworkTrace .esriCTLoadProjectDropDown {width: 100%;}.jimu-widget-NetworkTrace .esriCTEditProjectBtn{height: 30px; width: 30px; background-repeat: no-repeat; background-position: center center; background-image: url("../images/edit-project-attributes.png"); cursor: pointer; float: left;}.DartTheme .jimu-widget-NetworkTrace .esriCTEditProjectBtn {background-image: url("../images/edit-project-attributes-dart-theme.png");}.jimu-widget-NetworkTrace .esriCTDisableEditProjectBtn{height: 30px; width: 30px; background-repeat: no-repeat; background-position: center center; background-image: url("../images/edit-project-attributes-disable.png"); cursor: default; pointer-events: none; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTEditProjectBtn,.jimu-rtl .jimu-widget-NetworkTrace .esriCTDisableEditProjectBtn {float: right;}.jimu-widget-NetworkTrace .esriCTMainParentContainer,.jimu-widget-NetworkTrace .esriCTMainParentContentContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTTextCenter {text-align: center;}.jimu-widget-NetworkTrace .esriCTSaveButtonContainer {width: 50%; float: left; padding: 2px 10px 2px 2px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTSaveButtonContainer {float: right; padding-right: 0px; padding-left: 10px;}.jimu-widget-NetworkTrace .esriCTSaveButtonCenterContainer {float: none; display: inline-block;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTSaveButtonCenterContainer {float: none; display: inline-block;}.jimu-widget-NetworkTrace .esriCTExportToCsvOkButtonContainer {width: 50%; float: left; padding: 2px 10px 2px 2px;}.jimu-widget-NetworkTrace .esriCTEditProjectAttributeOkButtonContainer {width: 50%; float: left; padding: 2px 10px 2px 2px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTEditProjectAttributeOkButtonContainer {float: right; padding-right: 0px; padding-left: 10px;}.jimu-widget-NetworkTrace .esriCTExportToCSVOkBtnCenterContainer {float: none; display: inline-block;}.jimu-widget-NetworkTrace .esriCTExportButtonContainer {width: 50%; float: left; padding: 2px 2px 2px 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportButtonContainer {float: right; padding-left: 0px; padding-right: 10px;}.jimu-widget-NetworkTrace .esriCTExportButtonCenterContainer {float: none; display: inline-block;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportButtonCenterContainer {float: none; display: inline-block;}.jimu-widget-NetworkTrace .esriCTEditProjectAttributeCancelButtonContainer {width: 50%; float: left; padding: 2px 2px 2px 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTEditProjectAttributeCancelButtonContainer {float: right; padding-left: 0px; padding-right: 10px;}.jimu-widget-NetworkTrace .esriCTRunButtonContainer {width: 50%; float: left; padding-right: 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTRunButtonContainer {float: right; padding-right: 0px; padding-left: 10px;}.jimu-widget-NetworkTrace .esriCTClearButtonContainer {width: 50%; float: left; padding-left: 10px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTClearButtonContainer {float: right; padding-left: 0px; padding-right: 10px;}.jimu-widget-NetworkTrace .esriCTProjectSaveButton {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTExportToCSVOkBtn {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTEditProjectAttributeOkButton {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTExportToCSVBtn {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTEditProjectAttributeCancelButton {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTBtnRunTrace {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTBtnClear {margin: 0px; width: 100%;}.jimu-widget-NetworkTrace .esriCTCheckboxParentContainer {float: left; margin-left: 2px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTCheckboxParentContainer {float: right; margin-left: 0; margin-right: 2px;}.jimu-widget-NetworkTrace .esriCTEditProjectAttributeContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTExportToCSVFormParentContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTExportToCSVFormContainer {width: 100%; height: calc(100% - 73px); overflow: auto;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorWidgetContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer {width: 100%; height: calc(100% - 35px); overflow: auto;}.jimu-widget-NetworkTrace .atiButton,.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .atiLayerName{display: none;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .atiButtons{display: none;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer td {display: block; clear: both; height: auto; width: 100%; float: left;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer table {width: 100%;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .atiField {width: 100%;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .atiLabel {margin-top: 6px !important; margin-bottom: 3px !important;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .dijitTextBox {width: 100% !important;}.jimu-widget-NetworkTrace .esriCTAttributeInspectorContainer .dijitTextArea {width: 100% !important; min-height: 70px; resize: vertical; overflow: auto; font-family: inherit; line-height: 20px !important; font-size: 14px;}.jimu-widget-NetworkTrace .atiAttributes {height: 100%; padding-right: 2px;}.jimu-rtl .jimu-widget-NetworkTrace .atiAttributes {padding-right: 0px; padding-left: 2px;}.jimu-widget-NetworkTrace .esriCTSaveAsPopupContainer,.jimu-widget-NetworkTrace .esriCTSaveProjectPopupContainer{width: 100%; overflow: hidden;}.jimu-widget-NetworkTrace .esriCTprojectNameTextBoxContainer {width: 70%; float: right;}.jimu-widget-NetworkTrace .esriCTProjectNameLabel {width: 30%; float: left; padding: 5px 10px; word-break: break-word; font-size: 14px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTProjectNameLabel {float: right;}.jimu-widget-NetworkTrace .esriCTExportToCsvParentNode {width: 100%; clear: both; padding-top: 10px; padding-bottom: 10px; overflow: hidden; padding-left: 18px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportToCsvParentNode {padding-left: 0px; padding-right: 18px;}.jimu-widget-NetworkTrace .esriCTExportToCsvSelectAll {padding-left: 3px; padding-right: 0px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportToCsvSelectAll {padding-left: 0px; padding-right: 3px;}.jimu-widget-NetworkTrace .esriCTBackButtonContainer {width: 100%; clear: both; overflow: hidden; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid #B5BCC9; color: #3e3e3e; font-weight: bold; font-size: 14px; padding-left: 2px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTBackButtonContainer {padding-right: 2px;}.jimu-widget-NetworkTrace .esriCTExportBackButton {width: 50%; text-align: left; float: left; padding-left: 3px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportBackButton {text-align: right; float: right; padding-right: 3px;}.jimu-widget-NetworkTrace .esriCTSkipLocationListBackButton {width: 50%; text-align: left; float: left; padding-left: 2px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTSkipLocationListBackButton {text-align: right; float: right; padding-right: 2px;}.jimu-widget-NetworkTrace .esriCTBarrierListBackButton {width: 50%; text-align: left; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTBarrierListBackButton {text-align: right; float: right;}.jimu-widget-NetworkTrace .esriCTFlagsListBackButton {width: 50%; text-align: left; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTFlagsListBackButton {text-align: right; float: right;}.jimu-widget-NetworkTrace .esriCTExportBackText {cursor: pointer; width: fit-content;}.jimu-widget-NetworkTrace .esriCTSkipLocationBackText {cursor: pointer; width: fit-content;}.jimu-widget-NetworkTrace .esriCTBarrierBackText {cursor: pointer; width: fit-content;}.jimu-widget-NetworkTrace .esriCTFlagsBackText {cursor: pointer; width: fit-content;}.jimu-widget-NetworkTrace .esriCTExportToCsvText {width: 50%; text-align: right; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTExportToCsvText {text-align: left; float: right;}.jimu-widget-NetworkTrace .esriCTSkipLocationsCountText {width: 50%; text-align: right; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTSkipLocationsCountText {text-align: left; float: right;}.jimu-widget-NetworkTrace .esriCTBarrierCountText {width: 50%; text-align: right; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTBarrierCountText {text-align: left; float: right;}.jimu-widget-NetworkTrace .esriCTFlagsCountText {width: 50%; text-align: right; float: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTFlagsCountText {text-align: left; float: right;}.jimu-widget-NetworkTrace .esriCTSkipLocationList {width: 100%; height: 100%; clear: both;}.jimu-widget-NetworkTrace .esriCTBarrierLocationList {width: 100%; height: 100%; clear: both;}.jimu-widget-NetworkTrace .esriCTFlagsList {width: 100%; height: 100%; clear: both;}.jimu-widget-NetworkTrace .esriCTRemoveSkipAllLocationParentContainer {width: 100%; overflow: hidden; clear: both; border-bottom: 1px solid #f5f5f5;}.jimu-widget-NetworkTrace .esriCTLoadProjectParentContainer {width: 100%; overflow: hidden; clear: both; padding: 3px 2px 2px 0px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTLoadProjectParentContainer {padding: 3px 0px 2px 2px;}.jimu-widget-NetworkTrace .esriCTInputOutputTabParentContainer {width: 100%; height: 100%; clear: both;}.jimu-widget-NetworkTrace .esriCTSaveAndExportParentContainer {width: 100%; overflow: hidden; clear: both; position: absolute; bottom: 0;}.jimu-widget-NetworkTrace .esriCTEditProjectOkAndCancelBtnParentContainer {width: 100%; overflow: hidden; clear: both; position: absolute; bottom: 0;}.jimu-widget-NetworkTrace .esriCTExportToCsvOkBtnParentContainer {width: 100%; overflow: hidden; clear: both; position: absolute; bottom: 0;}.jimu-widget-NetworkTrace .esriCTTabParentContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTTabContainer {width: 100%; height: 100%;}.jimu-widget-NetworkTrace .esriCTInputParentMainContainer {width: 100%; height: 100%; clear: both;}.jimu-widget-NetworkTrace .esriCTInputParentMainContainerMobileMode {max-height: 135px; overflow: auto;}.jimu-widget-NetworkTrace .tracePanel{width: 100%; height: 135px; clear: both; padding-bottom: 10px;}.jimu-widget-NetworkTrace .esriCTFlagBarrierSkipLocationMainPage{clear: both; width: 100%; height: calc(100% - 135px); background-color: #FFFFFF; border-top: 1px solid #e5e5e5; overflow: auto; padding: 2px;}.jimu-widget-NetworkTrace .esriCTFlagBarrierSkipLocationMainPageMobileMode {min-height: 112px;}.jimu-widget-NetworkTrace .esriCTOutputParentMainContainer{width: 100%; height: 100%; clear: both; overflow: auto;}.jimu-widget-NetworkTrace .esriCTLayerInformationContainer{clear: both; width: calc(100% - 4px); margin: 2px; padding: 5px 0px 5px 0px; color: #3e3e3e; font-size: 14px; font-family: Avenir LT 35 Light; border-bottom: 1px solid #B5BCC9;}.jimu-widget-NetworkTrace .esriCTResultsLayerNamesContainer{clear: both; width: 100%; background-color: #fff; margin: 2px 0;}.jimu-widget-NetworkTrace .esriCTFlagsContent{clear: both; width: 100%; height: calc(100% - 38px); overflow: auto;}.jimu-widget-NetworkTrace .esriCTBarrierContent{clear: both; width: 100%; height: calc(100% - 38px); overflow: auto;}.jimu-widget-NetworkTrace .esriCTSkipContent{clear: both; width: 100%; height: calc(100% - 94px); overflow: auto; padding-top: 2px;}.jimu-widget-NetworkTrace .esriCTFeaturesListParentContainer{clear: both; width: 100%; height: 100%; overflow: auto; padding: 2px 0;}.jimu-widget-NetworkTrace .esriCTTabLineHeight {line-height: 28px !important;}.jimu-widget-NetworkTrace .esriCTResultLayerNameParent{margin-left: 20px; width: calc(100% - 22px); height: 18px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTResultLayerNameParent{margin-left: 0px; margin-right: 20px;}.jimu-widget-NetworkTrace .esriCTHighlightedGraphic {background-color: #E2F0FB;}.dart-panel .jimu-widget-NetworkTrace .esriCTHighlightedGraphic {background-color: #000000;}.esriCT-feature-action-skip-icon {background-image: url("../images/skip.png"); height: 16px; width: 16px; background-color: rgb(102, 102, 102); background-size: 16px; background-repeat: no-repeat;}.esriCT-feature-action-skip-icon:hover {background-color: rgb(0, 0, 0);}.esriCT-feature-action-unskip-icon {background-image: url("../images/unskip.png"); height: 16px; width: 16px; background-color: rgb(240, 205, 8); background-size: 16px; background-repeat: no-repeat;}.jimu-widget-NetworkTrace .esriCTLoadProjectDropDownContainer .dijitSelectLabel {text-overflow: ellipsis; overflow: hidden; white-space: nowrap; text-align: left;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTLoadProjectDropDownContainer .dijitSelectLabel {text-align: right;}.jimu-widget-NetworkTrace .esriCTInputTabSummaryTextContainer {max-height: 49px; overflow: auto; width: 100%; padding-top: 5px; padding-bottom: 5px;}.jimu-rtl .jimu-widget-NetworkTrace .esriCTInputTabSummaryTextContainer {text-align: right;}',
"*now":function(M){M(['dojo/i18n!*preload*widgets/NetworkTrace/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 jimu/BaseWidget dojo/on jimu/dijit/EditorXssFilter dojo/_base/lang dojo/window esri/graphic esri/geometry/Point esri/tasks/Geoprocessor dojo/_base/array esri/layers/GraphicsLayer esri/renderers/SimpleRenderer esri/toolbars/draw dojo/dom-class esri/tasks/FeatureSet dojo/dom-construct dojox/timing dojo/query dojo/promise/all dojo/Deferred esri/InfoTemplate dijit/registry dojo/date/locale dojo/dom-attr dojo/string jimu/PanelManager dojo/dom-style esri/symbols/jsonUtils jimu/dijit/Message jimu/dijit/CheckBox esri/dijit/AttributeInspector esri/geometry/geometryEngine esri/layers/FeatureLayer esri/request esri/tasks/query jimu/dijit/TabContainer dojo/dom dojo/has dojo/keys dijit/focus jimu/utils esri/urlUtils jimu/exportUtils jimu/CSVUtils jimu/dijit/formSelect dojo/dom-style dijit/form/ValidationTextBox jimu/dijit/Popup esri/tasks/QueryTask esri/tasks/GeometryService esri/tasks/ProjectParameters esri/SpatialReference dojo/DeferredList jimu/LayerInfos/LayerInfos esri/geometry/Polygon esri/graphicsUtils esri/lang ./highlightSymbolUtils dojo/sniff".split(" "),function(M,
H,B,O,e,t,k,h,q,n,w,u,r,l,F,f,p,v,R,I,X,T,U,y,Z,S,ea,D,P,Q,d,m,C,L,K,aa,V,ba,G,Y,W,ta,x,z,J,N,ha,la,ia,na,ja,pa,sa,ya,Ca,za,Aa,Ba){return M([H],{baseClass:"jimu-widget-NetworkTrace",viewPortSize:null,panelManager:null,wManager:null,flagBtnClicked:!1,barrierBtnClicked:!1,gp:null,gpInputDetails:null,toolbar:null,overExtent:null,resultsCnt:null,resultLayers:null,animatedLayer:null,computedPanelStyle:null,mainContainer:null,tooltipDialog:null,IsIE:null,IsSafari:null,IsOpera:null,errorLayerArray:[],savedFeatureObjectId:null,
_flagID:null,_barrierID:null,_inputFlag:null,_inputBlock:null,_flagCount:null,_barrierCount:null,_tabContainer:null,_outputResultCount:0,_outputResultArr:[],_inputSkip:0,_skipLocationCount:0,_skippedLocations:{},_skipAllLocationButtonClicked:!1,_isSaveAndExportHidden:!1,_exportToCSVLayerArray:[],_layerInfosObj:!1,_projectLayerInfo:null,_projectAttributeGraphic:null,_isAttributeChanged:!1,_loadProjectDropdown:null,_flagGraphicsLayer:null,_barrierGraphicsLayer:null,_skipLocationGraphicsLayer:null,_allProjectLoadedInputs:[],
_loadProjectDropdownEvtHandle:null,_fetchedFeaturesDetails:null,_gpServiceOutputParameter:null,_loadProjectDetailsObj:{},_saveAsNewProject:!1,_currentSelectedProjectGuid:null,_pointLayerFields:{},_polygonLayerFields:{},_isWidgetLoadedInProjectMode:!1,_updateExistingProject:!1,_gpServiceOutputParameterObj:{},_widgetTopNode:null,_clonedProjectPolygonLayerObject:null,_currentFeatureDetails:null,_aiConnects:[],_selection:[],_toolTips:[],_isRunButtonClicked:!1,_originalTemplateAttributes:null,_isWidgetStartup:null,
_clickEventHandlerArr:[],_lastDefinitionExpression:null,editorXssFilter:null,startup:function(){this.inherited(arguments);this.editorXssFilter=O.getInstance();this._initializeData();this._isWidgetStartup=!0;this._fetchLastDefinitionExpression();this.fetchData();this._validateConfigParams()&&this._getLayerInfos();this.handleKeyDownEvents()},handleKeyDownEvents:function(){this.own(B(this.btnFlag,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onFlagButtonClick()})));
this.own(B(this.btnBarrier,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onBarrierButtonClick()})));this.own(B(this.btnClear,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onClearButtonClick()})));this.own(B(this.btnTrace,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onTraceButtonClick()})));this.own(B(this.inputLocTab,"keydown",e.hitch(this,function(a){if(a.keyCode===G.ENTER||a.keyCode===
G.SPACE)this._onInputLocTabClick(),Y.focus(this.btnFlag),Y.focus(this.inputBackClick)})));this.own(B(this.inputBackClick,"keydown",e.hitch(this,function(a){if(a.keyCode===G.ENTER||a.keyCode===G.SPACE)this._clearSelectionOnBackBtnClk(),this._hideFlagsList(!0),Y.focus(this.inputLocTab)})));this.own(B(this.barrierLocTab,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onBarrierLocTabClick()})));this.own(B(this.barrierBackClick,"keydown",e.hitch(this,function(a){if(a.keyCode===
G.ENTER||a.keyCode===G.SPACE)this._clearSelectionOnBackBtnClk(),this._hideBarrierList(!0),Y.focus(this.barrierLocTab)})));this.own(B(this.skipLocationTab,"keydown",e.hitch(this,function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onSkipLocationTabClick()})));this.own(B(this.skipLocationBackClick,"keydown",e.hitch(this,function(a){if(a.keyCode===G.ENTER||a.keyCode===G.SPACE)this._clearSelectionOnBackBtnClk(),this._hideSkipLocationList(!0),Y.focus(this.skipLocationTab)})));this.own(B(this.editProjectAttributes,
"keydown",e.hitch(this,this._onEditProjectAttributesKeyPress)));this.own(B(this.projectSaveButton,"keydown",e.hitch(this,this._onProjectSaveButtonKeyPress)));this.own(B(this.exportToCsvMainScreenButton,"keydown",e.hitch(this,this._onExportToLayerButtonKeyPress)));this.own(B(this.exportBackNode,"keydown",e.hitch(this,this._onExportToCSVFormBackBtnKeyPress)));this.own(B(this.editProjectAttributeCancelButtonNode,"keydown",e.hitch(this,this._hideAttributeInspectorKeyPress)));this.own(B(this.editProjectAttributeOkButtonNode,
"keydown",e.hitch(this,this._onOkButtonKeyPress)));this.own(B(this.exportToCsvFileMainButton,"keydown",e.hitch(this,this._onExportToCSVFormOkBtnKeyPress)));this.own(B(this.removeSkipAllButton,"keydown",e.hitch(this,this._onRemoveSkipAllButtonKeyPress)))},postCreate:function(){W.initLastFocusNode(this.domNode,this.supports508Node);this.own(B(this.supports508Node,"focus",e.hitch(this,this._lastNodeFocused)))},postMixInProperties:function(){this.nls=e.mixin(this.nls,window.jimuNls.common)},_fetchWidgetTopNode:function(){if(this.domNode.parentNode)var a=
this.domNode.parentNode;if(a.parentNode)var b=a.parentNode;if(b.parentNode)var c=b.parentNode;c&&(this._widgetTopNode=c)},_loadWidget:function(){var a;this._fetchWidgetTopNode();this._showLoadingIcon(!0);this._setInputTabSummaryText();this._addMobileStyles();this._displayMainScreen();this._createLoadProjectDetailsObj();this._addLoadProjectDropdown();this._initializingJimuTabContainer();this._getFieldAliasFromGPService();this.IsOpera=!!window.opera||0<=navigator.userAgent.indexOf(" OPR/");this.IsSafari=
0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor");this.IsIE=!!document.documentMode||!1;this._clickEventHandlerArr.push(this.own(B.pausable(this.map,"click",e.hitch(this,this._mapClickHandler))));this.gp=new q(this.config.geoprocessing.url);B(this.gp,"error",e.hitch(this,this._onSubmitJobError));B(this.gp,"job-complete",e.hitch(this,this._onSubmitJobComplete));this.gp.setOutSpatialReference(this.map.spatialReference);this._createResultPanels();this._createGraphic();this._createHighlightingGraphicLayer();
this.viewPortSize=t.getBox();this.panelManager=S.getInstance();this._enhanceTabThemeStyle();this._enhanceDartThemeStyle();this._setTheme();if(a=this.domNode)this._reStyleWidgetContainer(a),ea.set(a,{"z-index":101,width:"100%",height:"100%"});this._setFirstLastNodeOnMainScreen()},onAppConfigChanged:function(a,b,c){"styleChange"===b&&this._setTheme(c)},_reStyleWidgetContainer:function(a){ea.set(a.parentNode,{padding:"5px"})},_initializeData:function(){this.wManager=this.panelManager=this.viewPortSize=
null;this.barrierBtnClicked=this.flagBtnClicked=!1;this.IsOpera=this.IsSafari=this.IsIE=this.tooltipDialog=this.mainContainer=this.computedPanelStyle=this.animatedLayer=this.resultLayers=this.resultsCnt=this.overExtent=this.toolbar=this.gpInputDetails=this.gp=null;this.errorLayerArray=[];this._tabContainer=this._barrierCount=this._flagCount=this._inputBlock=this._inputFlag=this._barrierID=this._flagID=this.savedFeatureObjectId=null;this._outputResultCount=0;this._outputResultArr=[];this._skipLocationCount=
this._inputSkip=0;this._skippedLocations={};this._skipAllLocationButtonClicked=!1;this._exportToCSVLayerArray=[];this._projectAttributeGraphic=this._projectLayerInfo=null;this._isAttributeChanged=!1;this._skipLocationGraphicsLayer=this._barrierGraphicsLayer=this._flagGraphicsLayer=this._loadProjectDropdown=null;this._allProjectLoadedInputs=[];this._gpServiceOutputParameter=this._fetchedFeaturesDetails=this._loadProjectDropdownEvtHandle=null;this._loadProjectDetailsObj={};this._saveAsNewProject=!1;
this._currentSelectedProjectGuid=null;this._pointLayerFields={};this._polygonLayerFields={};this._updateExistingProject=this._isWidgetLoadedInProjectMode=!1;this._gpServiceOutputParameterObj={};this._currentFeatureDetails=this._clonedProjectPolygonLayerObject=this._widgetTopNode=null;this._aiConnects=[];this._selection=[];this._toolTips=[];this._isRunButtonClicked=!1;this._isWidgetStartup=this._originalTemplateAttributes=null;this._clickEventHandlerArr=[];this._lastDefinitionExpression=null},_initializingJimuTabContainer:function(){this._tabContainer=
new aa({"class":"esriCTTabContainer",tabs:[{title:this.nls.inputTabTitle,content:this.inputTabPanel,selected:!0},{title:this.nls.outputTabTitle,content:this.outputTab,selected:!1}]},this.tabContainerNetworkTrace);this.own(B(this._tabContainer,"tabChanged",e.hitch(this,function(a){a===this.nls.inputTabTitle?(this._setFirstLastNodeOnMainScreen(),l.contains(this.inputTabSummaryTextContainer,"esriCTHidden")?Y.focus(this.btnFlag):Y.focus(this.inputTabSummaryTextContainer)):this._setFirstLastNodeOnOutputScreen()})));
this._tabContainer.startup();this._tabContainer.controlNodes[0]&&l.add(this._tabContainer.controlNodes[0],"esriCTTabLineHeight");this._tabContainer.controlNodes[1]&&l.add(this._tabContainer.controlNodes[1],"esriCTTabLineHeight")},_setTheme:function(a){var b;if("DartTheme"===this.appConfig.theme.name)W.loadStyleLink("dartOverrideCSS",this.folderUrl+"/css/dartTheme.css",null);else if(b=document.getElementById("dartOverrideCSS"))b.disabled=!0;"TabTheme"===this.appConfig.theme.name&&W.loadStyleLink("tabOverrideCSS",
this.folderUrl+"/css/tabTheme.css",null);if("DashboardTheme"===this.appConfig.theme.name){if(W.loadStyleLink(this.baseClass+"dashboardOverrideCSS",this.folderUrl+"/css/dashboardTheme.css",null),this.appConfig.theme.styles&&0<this.appConfig.theme.styles.length)if("light"===this.appConfig.theme.styles[0]||"light"===a)if(a&&"light"!==a){if(b=document.getElementById(this.baseClass+"dashboardOverrideLightCSS"))b.disabled=!0}else W.loadStyleLink(this.baseClass+"dashboardOverrideLightCSS",this.folderUrl+
"/css/dashboardThemeLight.css",null);else if(b=document.getElementById(this.baseClass+"dashboardOverrideLightCSS"))b.disabled=!0}else{if(b=document.getElementById(this.baseClass+"dashboardOverrideCSS"))b.disabled=!0;if(b=document.getElementById(this.baseClass+"dashboardOverrideLightCSS"))b.disabled=!0}},destroy:function(){this._clearResults();this._removeAllGraphicLayers();this.inherited(arguments)},onOpen:function(){this._addGraphicLayersBackToMap()},onClose:function(){this._clearResults()},resize:function(){var a=
{};a.node=this.inputOutputTabParentContainer;a.considerSaveAndExport=!0;a.considerLoadProject=!0;this._resetHeight(a);a={};a.node=this.inputLocDiv;a.considerSaveAndExport=!0;this._resetHeight(a);a={};a.node=this.barrierLocDiv;a.considerSaveAndExport=!0;this._resetHeight(a);a={};a.node=this.skipLocDiv;a.considerSaveAndExport=!0;this._resetHeight(a);a={};a.node=this.flagBarrierSkipLocationMainPageContainer;a.resetFlagBarrierSkipLocationMainPage=!0;this._resetHeight(a);a=v(".esriCTFeaturesListParentContainer",
this._widgetTopNode);n.forEach(a,e.hitch(this,function(b){var c=v(".esriCTSkipAllLocationParentContainer",b.parentNode);var g={};g.node=b;g.considerSaveAndExport=!1;g.considerLoadProject=!1;g.considerSkipAll=!0;g.skipAllButton=c;this._resetHeight(g)}))},_addGraphicLayersBackToMap:function(){for(var a in this.resultLayers)this.map.addLayer(this.resultLayers[a]);this.animatedLayer&&this.map.addLayer(this.animatedLayer);for(var b in this.gpInputDetails)this.map.addLayer(this.gpInputDetails[b])},_validateConfigParams:function(){if(this.config.hasOwnProperty("geoprocessing"))if(this.config.geoprocessing.hasOwnProperty("url")&&
this.config.geoprocessing.hasOwnProperty("inputs")&&this.config.geoprocessing.hasOwnProperty("outputs"))if(0<this.config.geoprocessing.inputs.length&&0<this.config.geoprocessing.outputs.length&&""!==this.config.geoprocessing.url)var a=!0;else this._errorMessage(this.nls.configError),a=!1;else this._errorMessage(this.nls.configError),a=!1;else this._errorMessage(this.nls.configError),a=!1;this.appConfig.geometryService?this.geometryService=new na(this.appConfig.geometryService):(a=!1,this._errorMessage(this.nls.geometryServiceURLNotFoundMSG));
return a},_onFlagButtonClick:function(){l.contains(this.btnFlag,"traceControlDisabledDiv")||(this.flagBtnClicked?this._disableFlagTool():(this.flagBtnClicked=!0,l.remove(this.btnFlag,"flagbutton"),l.add(this.btnFlag,"flagButtonselected"),y.set(this.btnFlag,"aria-pressed","true"),null===this.toolbar&&(this.toolbar=new r(this.map),this.toolbar.activate(r.POINT)),this.barrierBtnClicked&&(this.barrierBtnClicked=!1,l.remove(this.btnBarrier,"barrierButtonselected"),l.add(this.btnBarrier,"barrierButton"),
y.set(this.btnBarrier,"aria-pressed","false")),this.disableWebMapPopup()))},_onBarrierButtonClick:function(){l.contains(this.btnBarrier,"traceControlDisabledDiv")||(this.barrierBtnClicked?this._disableBarrierTool():(this.barrierBtnClicked=!0,l.remove(this.btnBarrier,"barrierButton"),l.add(this.btnBarrier,"barrierButtonselected"),y.set(this.btnBarrier,"aria-pressed","true"),null===this.toolbar&&(this.toolbar=new r(this.map),this.toolbar.activate(r.POINT)),this.flagBtnClicked&&(this.flagBtnClicked=
!1,l.remove(this.btnFlag,"flagButtonselected"),l.add(this.btnFlag,"flagbutton"),y.set(this.btnFlag,"aria-pressed","false")),this.disableWebMapPopup()))},_showLoadingIcon:function(a){var b;(b=v(".jimu-widget-frame.jimu-container",this._widgetTopNode)[0])||(b=v(".jimu-container",this._widgetTopNode)[0]);a?(l.remove(this.loadingIcon,"runIconidle"),l.add(this.loadingIcon,"runIconProcessing"),"undefined"!==typeof b&&l.add(b,"esriCTDisableScroll")):(l.remove(this.loadingIcon,"runIconProcessing"),l.add(this.loadingIcon,
"runIconidle"),"undefined"!==typeof b&&l.remove(b,"esriCTDisableScroll"))},_onTraceButtonClick:function(){l.contains(this.btnTrace,"jimu-state-disabled")||(this._showLoadingIcon(!0),this._isRunButtonClicked=!0,this._executeTracePreRequisites(!0))},_exportToCSVComplete:function(a,b){z._download(b+".csv",a.csvdata)},_replaceDoubleQuotesInString:function(a){var b;(b=a)&&(b=a.toString().replace(/"/g,'""'));return b},_createCSVContent:function(a,b){var c;var g=new I;var E=[];var A;var ca=b+",\r\n";if(a&&
a.features&&0<a.features.length){for(A in a.features[0].attributes)if(a.features[0].attributes.hasOwnProperty(A))for(b=0;b<a.fields.length;b++)a.fields[b].name===A&&E.push(a.fields[b].alias);ca+=E.join(",")+"\r\n";n.forEach(a.features,function(da){E=[];var fa;if(null!==da.attributes)for(fa in da.attributes)da.attributes.hasOwnProperty(fa)&&E.push('"'+this._replaceDoubleQuotesInString(da.attributes[fa])+'"');c=E.join(",");ca+=c+"\r\n"},this);ca+="\r\n\r\n"}else n.forEach(a.fields,function(da){E.push(da.alias)},
this),ca+=E.join(",")+"\r\n";g.resolve({csvdata:ca,orgResults:a});return g},_formatDate:function(a){if(""!==a&&null!==a){if(!isNaN(a)&&0>Number(a)){var b=new Date(0);b.setUTCSeconds(a/1E3)}else b=new Date(a);return a=U.format(b,{datePattern:"yyyy-MM-dd",selector:"date"})}return""},_destroyWidget:function(a){var b=T.findWidgets(a);f.empty(a);n.forEach(b,function(c){c.destroyRecursive(!0)})},enableWebMapPopup:function(){this.map&&this.map.setInfoWindowOnClick(!0)},disableWebMapPopup:function(){this.map&&
this.map.setInfoWindowOnClick(!1)},_mapClickHandler:function(a){if(this.map&&this.map.snappingManager){var b=this.map.snappingManager.getSnappingPoint(a.screenPoint);b.then(e.hitch(this,function(c){c&&(a.mapPoint=c);this._onMapClick(a.mapPoint)}))}else this._onMapClick(a.mapPoint)},_onMapClick:function(a){if(this.flagBtnClicked||this.barrierBtnClicked){if(this.flagBtnClicked){var b="Flag";l.remove(this.btnTrace,"jimu-state-disabled");y.set(this.btnTrace,"tabindex",0);this.btnTrace.disabled=!1;this._flagID++;
var c=this._flagID;this._addInputLocation(new k(a,null,{ObjID:c},null),b)}this.barrierBtnClicked&&(b="Barrier",this._barrierID++,c=this._barrierID,this._addBarrierLocation(new k(a,null,{ObjID:c},null),b));n.some(this.gpInputDetails,function(g){if(g.type===b)return g.add(new k(a,null,{ObjID:c},null)),!0})}},_createGraphicFromJSON:function(a){return D.fromJson(a)},_createGraphic:function(){this.gpInputDetails=[];var a,b,c;v(".btnBarrierStyle",this.tracePanel);n.forEach(this.config.geoprocessing.inputs,
function(g){a=new w;a.id=g.paramName+this.id;a.type=g.type;a.paramName=g.paramName;b=this._createGraphicFromJSON(g.symbol);c=new u(b);a.setRenderer(c);this.gpInputDetails.push(a);if("Flag"===g.type){l.remove(this.btnFlag,"esriCTHidden");this._flagGraphicsLayer=a;if(""!==g.toolTip||null!==g.toolTip)this.btnFlag.title=g.toolTip;this.flagLabel.innerHTML=W.sanitizeHTML(g.displayName);y.set(this.btnFlag,"aria-label",g.displayName+" "+this.btnFlag.title)}if("Barrier"===g.type){l.remove(this.btnBarrier,
"esriCTHidden");this._barrierGraphicsLayer=a;if(""!==g.toolTip||null!==g.toolTip)this.btnBarrier.title=g.toolTip;this.barrierLabel.innerHTML=W.sanitizeHTML(g.displayName);y.set(this.btnBarrier,"aria-label",g.displayName+" "+this.btnBarrier.title)}"Skip"===g.type&&(this._skipLocationGraphicsLayer=a)},this);this.map.addLayers(this.gpInputDetails)},_createResultPanels:function(){var a,b,c;this.resultLayers=[];f.empty(this.resultLayersInformationContainer);n.forEach(this.config.geoprocessing.outputs,
function(g){b=a=null;c=new w;isNaN(g.MinScale)&&isNaN(g.MaxScale)?(c.minScale=Number(g.MinScale.replace(",","")),c.maxScale=Number(g.MaxScale.replace(",",""))):(c.minScale=g.MinScale,c.maxScale=g.MaxScale);g.hasOwnProperty("visibility")&&(null!==g.visibility?g.visibility?c.setVisibility(!0):c.setVisibility(!1):c.setVisibility(!0));c.id=g.paramName+this.id;null!==g.symbol&&(a=this._createGraphicFromJSON(g.symbol),b=new u(a),c.setRenderer(b));this.map.addLayer(c);g.layer=c;0<this.config.geoprocessing.outputs.length&&
this._createLayerResultPanel(g);"Result"===g.type&&this.resultLayers.push(c)},this)},_createLayerResultPanel:function(a){var b=!0;v(".esriCTResultContainerBack",this._widgetTopNode);var c=f.create("div",{"class":"esriCTLayerNameContainer",LayerName:a.paramName,"aria-label":a.panelText+" "+a.toolTip,tabindex:"0",role:"button"});var g=f.create("div",{"class":"esriCTCheckboxParentContainer"},c);var E=f.create("div",{"class":"esriCTCheckboxContainer"},g);a.hasOwnProperty("visibility")&&(b=a.visibility);
g=new Q({checked:b,"aria-label":a.panelText+" "+a.toolTip},E);this._updateLayerVisibilty(a.paramName,b);y.set(g.domNode,"tabindex",2);y.set(g.domNode,"aria-label",a.panelText+" "+a.toolTip);this.own(B(g,"change",e.hitch(this,function(da){this._updateLayerVisibilty(a.paramName,da)})));var A=f.create("div",{"class":"esriCTResultLayerNameParent",title:a.panelText+" "+a.toolTip,"aria-label":a.panelText+" "+a.toolTip,tabindex:"2",role:"button"},c);b=f.create("div",{"class":"esriCTLayerName",innerHTML:W.sanitizeHTML(a.panelText),
title:a.toolTip},A);y.set(b,"layernamedetails",a.paramName+this.id);f.create("div",{"class":"esriCTRightCaretIcon"},A);this.own(B(A,"keydown",e.hitch(this,function(da){da.keyCode===G.ENTER||da.keyCode===G.SPACE?(this._clickOnLayerLabel(a.paramName),Y.focus(ca)):da.keyCode===G.ESCAPE?(da.stopPropagation(),da.preventDefault(),Y.focus(c)):da.keyCode===G.TAB&&(da.stopPropagation(),da.preventDefault(),Y.focus(E))})));this.own(B(E,"keydown",e.hitch(this,function(da){da.keyCode===G.ESCAPE?(da.stopPropagation(),
da.preventDefault(),Y.focus(c)):da.keyCode===G.TAB&&da.shiftKey&&(da.stopPropagation(),da.preventDefault(),Y.focus(A))})));this.own(B(c,"keydown",e.hitch(this,function(da){da.keyCode!==G.ENTER&&da.keyCode!==G.SPACE||Y.focus(E)})));this.resultsLayerNamesContainer.appendChild(c);b=f.create("div",{"class":"esriCTResultContainer esriCTHidden",title:""});y.set(b,"resultcontainer",a.paramName+this.id);g=f.create("div",{"class":"esriCTResultContainerHeader",resultType:a.paramName,title:""},b);var ca=f.create("div",
{"class":"esriCTResultContainerBack",resultType:a.paramName,innerHTML:W.sanitizeHTML("\x26lt;"+this.nls.backButtonValue),title:"",role:"button",tabindex:0,"aria-label":this.nls.backButtonValue},g);this.own(B(ca,"keydown",e.hitch(this,function(da){if(da.keyCode===G.ENTER||da.keyCode===G.SPACE)this._clickContentOfResultBackButton(a.paramName),Y.focus(A)})));g=f.create("div",{"class":"esriCTResultContainerLbl",title:""},g);y.set(g,"resultcontainerlabel",a.paramName+this.id);g=f.create("div",{"class":"esriCTFeaturesListParentContainer",
title:""},b);y.set(g,"resultcontainerdata",a.paramName+this.id);this.layerFeaturesContainer.appendChild(b);this._displayFeatureOnLayerClick(a.paramName,A,ca)},_updateLayerVisibilty:function(a,b){(a=this.map.getLayer(a+this.id))&&a.setVisibility(b)},_displayFeatureOnLayerClick:function(a,b,c){this._clickEventHandlerArr.push(this.own(B.pausable(b,"click",e.hitch(this,function(){this._clickOnLayerLabel(a)}))));this._clickEventHandlerArr.push(this.own(B.pausable(c,"click",e.hitch(this,function(){this._clickContentOfResultBackButton(a)}))))},
_clickContentOfResultBackButton:function(a){this._clearSelectionOnBackBtnClk();a=this._getResultContainerObject(a);l.remove(this.saveAndExportParentContainer,"esriCTHidden");this._hideOutputFeatureList(a)},_clickOnLayerLabel:function(a){if(0!==this._getResultContainerDataObject(a).children.length){var b=this._getResultContainerObject(a);this._displayOutputFeatureList(b);l.add(this.saveAndExportParentContainer,"esriCTHidden");if((a=v(".esriCTFeaturesListParentContainer",b))&&0<a.length){b=v(".esriCTSkipAllLocationParentContainer",
b);var c={};c.node=a[0];c.considerSaveAndExport=!1;c.considerLoadProject=!1;c.considerSkipAll=!0;c.skipAllButton=b;this._resetHeight(c)}}},_onClearButtonClick:function(){var a;this._showLoadingIcon(!0);this._currentSelectedProjectGuid&&(a=e.clone(this._currentSelectedProjectGuid));this._clearResults();this._isWidgetLoadedInProjectMode&&a&&"newproject"!==a&&setTimeout(e.hitch(this,function(){this._reloadCurrentProjectOnClear=!0;this._loadProjectDropdown.set("value",a);this._setProjectDropdownNameWidth();
this._hideOutputPanel()}),200);this._showLoadingIcon(!1)},_clearResults:function(a){var b;this._hideFlagsOnMainScreen();this._hideBarriersOnMainScreen();this._hideSkipLocationsOnMainScreen(!0);this._hideOutputPanel();this._hideAllOutputResultContainer();this._hideAttributeInspector();l.add(this.layerFeaturesContainer,"esriCTHidden");l.add(this.exportToCSVFormParentContainer,"esriCTHidden");f.empty(this.flagLocContent);f.empty(this.barrierLocContent);f.empty(this.skipLocationsListContainer);f.empty(this.resultLayersInformationContainer);
var c=v(".esriCTFeaturesListParentContainer",this._widgetTopNode);for(b=0;b<c.length;b++)f.empty(c[b]);this._inputFlag=this._inputBlock=this._inputSkip=this._flagCount=this._barrierCount=this._skipLocationCount=this._flagID=this._barrierID=0;this._resetInputs();this._resetResults();null!==this.toolbar&&(this.toolbar.deactivate(),this.toolbar=null);this.flagBtnClicked&&(this.flagBtnClicked=!1,l.remove(this.btnFlag,"flagButtonselected"),l.add(this.btnFlag,"flagbutton"));this.barrierBtnClicked&&(this.barrierBtnClicked=
!1,l.remove(this.btnBarrier,"barrierButtonselected"),l.add(this.btnBarrier,"barrierButton"));-1<this.btnFlag.className.indexOf("traceControlDisabledDiv")&&l.remove(this.btnFlag,"traceControlDisabledDiv");-1<this.btnBarrier.className.indexOf("traceControlDisabledDiv")&&l.remove(this.btnBarrier,"traceControlDisabledDiv");this.btnFlag.disabled=!1;this.btnBarrier.disabled=!1;l.add(this.btnTrace,"jimu-state-disabled");y.set(this.btnTrace,"tabindex",-1);this.btnTrace.disabled=!0;a||(this._loadProjectDropdown.set("value",
"newproject"),this._setProjectDropdownNameWidth());this._skippedLocations={};this._allProjectLoadedInputs=[];l.add(this.exportToCsvMainScreenButton,"jimu-state-disabled");y.set(this.exportToCsvMainScreenButton,"tabindex",-1);this._disableProjectSaveButton();a=v(".esriCTSkipAllLocationParentContainer",this.layerFeaturesContainer);n.forEach(a,e.hitch(this,function(g){f.destroy(g)}));this.map&&this.map.infoWindow&&this.map.infoWindow.hide();this._displayEntireMainScreen();this.animatedLayer.clear();
this._isRunButtonClicked=!1},_removeAllGraphicLayers:function(){this._removeInputGraphics();this._removeResultGraphics()},_removeResultGraphics:function(){n.forEach(this.resultLayers,e.hitch(this,function(a){this.map.removeLayer(a)}));this.animatedLayer&&this.map.removeLayer(this.animatedLayer)},_removeInputGraphics:function(){n.forEach(this.gpInputDetails,e.hitch(this,function(a){this.map.removeLayer(a)}))},_GPExecute:function(){var a={},b;null!==this.toolbar&&(this.toolbar.deactivate(),this.toolbar=
null);l.add(this.btnTrace,"jimu-state-disabled");y.set(this.btnTrace,"tabindex",-1);this.btnTrace.disabled=!0;l.add(this.btnFlag,"traceControlDisabledDiv");l.add(this.btnBarrier,"traceControlDisabledDiv");this.btnFlag.disabled=!0;this.btnBarrier.disabled=!0;this.flagBtnClicked&&(this.flagBtnClicked=!1,l.remove(this.btnFlag,"flagButtonselected"),l.add(this.btnFlag,"flagbutton"));this.barrierBtnClicked&&(this.barrierBtnClicked=!1,l.remove(this.btnBarrier,"barrierButtonselected"),l.add(this.btnBarrier,
"barrierButton"));var c=!1;n.forEach(this.gpInputDetails,function(g){b=new F;b.features=g.graphics;"Flag"===g.type&&(null===g.graphics&&(c=!0),0===g.graphics.length&&(c=!0));0<g.graphics.length&&(a[g.paramName]=b)});if(c)return this._isRunButtonClicked=!1;this.gp.submitJob(a)},_onSubmitJobComplete:function(a){this._jobID=a.jobInfo.jobId;if("esriJobFailed"===a.jobInfo.jobStatus)l.remove(this.btnFlag,"traceControlDisabledDiv"),l.remove(this.btnBarrier,"traceControlDisabledDiv"),this.btnFlag.disabled=
!1,this.btnBarrier.disabled=!1,this._showLoadingIcon(!1),this._errorMessage(this.nls.GPExecutionFailed);else try{this._resetResults(),this._resetSubmitJobDetails(),n.forEach(this.config.geoprocessing.outputs,function(b){this._verifyParams(a,b.paramName)&&this._processGPResults(a,b.paramName)},this)}catch(b){this._clearResults(),this._showLoadingIcon(!1),this._errorMessage(b.message)}},_onGetResultDataComplete:function(a){var b=!1;n.forEach(this.config.geoprocessing.outputs,e.hitch(this,function(c){a.paramName===
c.paramName&&(c.results=a.value,this._populateResultsToggle(c))}));this.btnFlag.disabled=!1;this.btnBarrier.disabled=!1;this.btnTrace.disabled=!1;n.some(this.config.geoprocessing.inputs,function(c){if(c&&c.paramName&&this.map.getLayer(c.paramName+this.id)&&0<this.map.getLayer(c.paramName+this.id).graphics.length)return b=!0},this);b?(l.remove(this.btnTrace,"jimu-state-disabled"),y.set(this.btnTrace,"tabindex",0)):(l.add(this.btnTrace,"jimu-state-disabled"),y.set(this.btnTrace,"tabindex",-1));l.remove(this.btnFlag,
"traceControlDisabledDiv");l.remove(this.btnBarrier,"traceControlDisabledDiv")},_verifyParams:function(a,b){var c;if(a&&a.jobInfo&&a.jobInfo.results)for(c in a.jobInfo.results)if(a.jobInfo.results.hasOwnProperty(c)&&b===c)return!0;return!1},_processGPResults:function(a,b){this.gp.getResultData(a.jobInfo.jobId,b).then(e.hitch(this,function(c){this._showGPResults(c)}))},_onSubmitJobError:function(){this._clearResults();this._showLoadingIcon(!1)},_populateResultsToggle:function(a){var b="",c="",g,E,
A,ca,da;var fa={Count:0,SkipCount:0};var oa=this._getResultContainerDataObject(a.paramName);this.config&&this.config.geoprocessing&&this.config.geoprocessing.inputs&&0<this.config.geoprocessing.inputs.length&&n.forEach(this.config.geoprocessing.inputs,function(ka){"Skip"!==ka.type||""===ka.toolTip&&null===ka.toolTip||(b=ka.toolTip)});var va=a.bypassDetails.IDField||this._getResultItemObjectID(a);a.bypassDetails.skipable&&(this._addSkipAllLocationButton(oa),this.config.skipableLayers||(this.config.skipableLayers=
[]),0>this.config.skipableLayers.indexOf(a.layer.id)&&this.config.skipableLayers.push(a.layer.id));a.layer.oid=va;n.forEach(a.results.features,e.hitch(this,function(ka){var wa;g=ka.attributes[va]||"";c="";A=null;a.bypassDetails.skipable&&null!==this._skipLocationGraphicsLayer&&null===A&&(A=new k(ka.geometry,null,ka.attributes,null),A.GPParam=a.paramName);this._formatDateAttributes(a,ka);ca=new k(ka.geometry,null,ka.attributes,null);a.layer.add(ca);da=f.create("div",{"class":"resultItem"},oa);ka.controlDetails=
{skipGraphic:A,bypassDetails:a.bypassDetails,selectionGraphic:ca};var ra=f.create("div",{"class":"resultItemSubDiv",tabindex:"0"},da);if(a.bypassDetails.skipable){var ua=null;E=a.paramName+g+"BtnByPass";ka.controlDetails.bypassBtnClass=E;ua=f.create("div",{"class":"resultItemButtonSkipIcon resultItemButton",title:b,"aria-label":b,role:"button",tabindex:"2"},ra);y.set(ua,"layerid",a.layer.id);y.set(ua,"oid",g);(wa=this._checkSkipLocationXY(A))&&wa.isFeatureSkipped&&(y.set(ua,"skippedFeatureUniqueId",
wa.skippedFeatureUniqueId),l.add(ua,"alreadySkippedLocation"));l.add(ua,E);fa.Count+=1;ka.controlDetails.selectionGraphic.bypassed=!1;this._clickEventHandlerArr.push(this.own(B.pausable(ua,"click",e.hitch(this,function(){this._onSkipLocationIconClick(ka,!0,ua)}))))}else ka.controlDetails.selectionGraphic.bypassed=!1,fa.Count+=1;c=this._getZoomToText(a,ka);c=""===c.trim()?"null":c.trim();var xa=f.create("div",{"class":"resultItemLabel",innerHTML:this.editorXssFilter.sanitize(c),"aria-label":c,role:"button"},
ra);a.bypassDetails.skipable?(y.set(ra,"tabindex","0"),y.set(ra,"role","group"),y.set(ra,"aria-label",c),y.set(xa,"tabindex","2"),this.own(B(xa,"keydown",e.hitch(this,function(qa){qa.keyCode===G.ENTER||qa.keyCode===G.SPACE?xa.click():qa.keyCode===G.ESCAPE?(qa.stopPropagation(),qa.preventDefault(),Y.focus(ra)):qa.keyCode===G.TAB&&(qa.stopPropagation(),qa.preventDefault(),Y.focus(ua))}))),this.own(B(ua,"keydown",e.hitch(this,function(qa){qa.keyCode===G.ENTER||qa.keyCode===G.SPACE?ua.click():qa.keyCode===
G.ESCAPE?(qa.stopPropagation(),qa.preventDefault(),Y.focus(ra)):qa.keyCode===G.TAB&&qa.shiftKey&&(qa.stopPropagation(),qa.preventDefault(),Y.focus(xa))})))):(y.set(ra,"tabindex","0"),y.set(ra,"role","button"),y.set(ra,"aria-label",c));this.own(B(ra,"keydown",e.hitch(this,function(qa){if(qa.keyCode===G.ENTER||qa.keyCode===G.SPACE)a.bypassDetails.skipable?Y.focus(ua):xa.click()})));this._clickEventHandlerArr.push(this.own(B.pausable(xa,"click",e.hitch(this,function(qa){this.map&&this.map.infoWindow&&
this.map.infoWindow.hide();this._zoomToBtn(ka,qa)}))));ka.controlDetails.selectionGraphic.resultItem=ka;this._setResultInfoTemplate(ca,a,b,ka)}));if("Result"===a.type){var ma=this._getLayerNameObject(a);y.set(ma.parentElement.parentElement,"aria-label",a.panelText+" ("+(fa.Count+fa.SkipCount)+")");y.set(ma.parentElement.parentElement.firstElementChild.firstElementChild,"aria-label",a.panelText+" ("+(fa.Count+fa.SkipCount)+")");y.set(ma.parentElement,"aria-label",a.panelText+" ("+(fa.Count+fa.SkipCount)+
")");y.set(ma,"innerHTML",W.sanitizeHTML(a.panelText+" ("+(fa.Count+fa.SkipCount)+")"));ma=this._getResultContainerLabelObject(a);y.set(ma,"innerHTML",W.sanitizeHTML(a.panelText+" ("+(fa.Count+fa.SkipCount)+")"))}ma={};ma.outputLayer=a;ma.outputLayerResultCount=fa;this._outputResultArr.push(ma);this._outputResultCount++;this._outputResultCount===this.config.geoprocessing.outputs.length&&this._convertSummaryExpressionIntoValue()},_convertSummaryExpressionIntoValue:function(){var a=null;a=this.config.summaryExpression.summaryExpressionTrimmedValue;
a=this._convertExpressionRelatedToInputParameter(a);(a=this._convertExpressionRelatedToOutputParameter(a))&&""!==a&&(this.resultLayersInformationContainer.innerHTML=this.editorXssFilter.sanitize(a),y.set(this.resultLayersInformationContainer,"aria-label",W.stripHTML(a)),null!==this.resultLayersInformationContainer.innerHTML&&void 0!==this.resultLayersInformationContainer.innerHTML&&""!==this.resultLayersInformationContainer.innerHTML&&l.remove(this.resultLayersInformationContainer,"esriCTHidden"))},
_convertExpressionRelatedToInputParameter:function(a){var b,c;for(b=0;b<this.config.summaryExpression.summaryExpressionValueArr.length;b++){var g=this.config.summaryExpression.summaryExpressionValueArr[b].trimmedValue.split(":");for(c=0;c<this.gpInputDetails.length;c++)if(g[0]===this.gpInputDetails[c].paramName){var E=new RegExp("{"+this.config.summaryExpression.summaryExpressionValueArr[b].trimmedValue+"}","g");var A=this.gpInputDetails[c].graphics.length;a=a.replace(E,A)}}return a},_convertExpressionRelatedToOutputParameter:function(a){var b,
c;var g="";for(b=0;b<this.config.summaryExpression.summaryExpressionValueArr.length;b++){var E=this.config.summaryExpression.summaryExpressionValueArr[b].trimmedValue.split(":");if(2===E.length)for(c=0;c<this._outputResultArr.length;c++){if(E[0]===this._outputResultArr[c].outputLayer.paramName){var A=new RegExp("{"+this.config.summaryExpression.summaryExpressionValueArr[b].trimmedValue+"}","g");E[1]===this.config.summaryExpression.summaryExpressionNLS.outputOperatorCountOption?g=this._outputResultArr[c].outputLayerResultCount.Count:
E[1]===this.config.summaryExpression.summaryExpressionNLS.outputOperatorSkipCountOption&&(g=this._outputResultArr[c].outputLayerResultCount.SkipCount);a=a.replace(A,g)}}else if(3===E.length)for(c=0;c<this._outputResultArr.length;c++)E[0]===this._outputResultArr[c].outputLayer.paramName&&(A=new RegExp("{"+this.config.summaryExpression.summaryExpressionValueArr[b].trimmedValue+"}","g"),E[2]===this.config.summaryExpression.summaryExpressionNLS.fieldOperatorSumOption&&this._outputResultArr[c].outputLayer.results.features&&
(g=this._getSumValueOfField(this._outputResultArr[c].outputLayer.results.features,E[1])),E[2]===this.config.summaryExpression.summaryExpressionNLS.fieldOperatorMinOption&&this._outputResultArr[c].outputLayer.results.features&&(g=this._getMinValueOfField(this._outputResultArr[c].outputLayer.results.features,E[1])),E[2]===this.config.summaryExpression.summaryExpressionNLS.fieldOperatorMaxOption&&this._outputResultArr[c].outputLayer.results.features&&(g=this._getMaxValueOfField(this._outputResultArr[c].outputLayer.results.features,
E[1])),E[2]===this.config.summaryExpression.summaryExpressionNLS.fieldOperatorMeanOption&&this._outputResultArr[c].outputLayer.results.features&&(g=this._getMeanValueOfField(this._outputResultArr[c].outputLayer.results.features,E[1])),a=a.replace(A,g))}return a},_getSumValueOfField:function(a,b){var c;var g=[];for(c=0;c<a.length;c++)null!==a[c].attributes[b]&&""!==a[c].attributes[b]&&void 0!==a[c].attributes[b]&&g.push(a[c].attributes[b]);return 0<g.length?(a=this._getSummationOfArr(g),2<this._decimalPlaces(a)&&
(a=a.toFixed(2)),a):0},_decimalPlaces:function(a){return(a=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(a[1]?a[1].length:0)-(a[2]?+a[2]:0)):0},_getSummationOfArr:function(a){var b=0,c;for(c in a)b+=a[c];return b},_getMinValueOfField:function(a,b){var c;var g=[];for(c=0;c<a.length;c++)null!==a[c].attributes[b]&&""!==a[c].attributes[b]&&void 0!==a[c].attributes[b]&&g.push(a[c].attributes[b]);return 0<g.length?(a=Math.min.apply(Math,g),2<this._decimalPlaces(a)&&(a=a.toFixed(2)),a):0},
_getMaxValueOfField:function(a,b){var c;var g=[];for(c=0;c<a.length;c++)null!==a[c].attributes[b]&&""!==a[c].attributes[b]&&void 0!==a[c].attributes[b]&&g.push(a[c].attributes[b]);return 0<g.length?(a=Math.max.apply(Math,g),2<this._decimalPlaces(a)&&(a=a.toFixed(2)),a):0},_getMeanValueOfField:function(a,b){var c;var g=[];for(c=0;c<a.length;c++)null!==a[c].attributes[b]&&""!==a[c].attributes[b]&&void 0!==a[c].attributes[b]&&g.push(a[c].attributes[b]);return 0<g.length?(a=this._getSummationOfArr(g),
g=a/g.length,2<this._decimalPlaces(g)&&(g=g.toFixed(2)),g):0},_formatDateAttributes:function(a,b){var c;if(a.results&&a.results.fields)for(c=0;c<a.results.fields.length;c++)"esriFieldTypeDate"===a.results.fields[c].type&&(b.attributes[a.results.fields[c].name]=b.attributes[a.results.fields[c].name]?this._formatDate(b.attributes[a.results.fields[c].name]):"")},_getResultItemObjectID:function(a){for(var b in a.results.fields)if(a.results.fields.hasOwnProperty(b)&&"esriFieldTypeOID"===a.results.fields[b].type)return a.results.fields[b].name},
_createGPServiceOutputParameterObj:function(){n.forEach(this._gpServiceOutputParameter,e.hitch(this,function(a){a.hasOwnProperty("name")&&(this._gpServiceOutputParameterObj[a.name]={},a.defaultValue&&a.defaultValue.fields&&n.forEach(a.defaultValue.fields,e.hitch(this,function(b){this._gpServiceOutputParameterObj[a.name][b.name]=b.type})))}))},_getFieldAliasFromGPService:function(a){var b=[],c,g=[];var E={url:this.config.geoprocessing.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback",
timeout:2E4};this._showLoadingIcon(!0);L(E).then(e.hitch(this,function(A){b=A.parameters;for(c=0;c<b.length;c++)"esriGPParameterDirectionOutput"===b[c].direction&&g.push(b[c]);this._gpServiceOutputParameter=g;this._createGPServiceOutputParameterObj();a?this._GPExecute():this._loadWidgetInProjectMode()}),e.hitch(this,function(){this._showLoadingIcon(!1);l.add(this.mainParentContentContainer,"esriCTHidden");l.remove(this.errorNode,"esriCTHidden")}))},_resetInputOutputTabParentContainer:function(){var a=
{};a.node=this.inputOutputTabParentContainer;a.considerSaveAndExport=!0;a.considerLoadProject=!0;a.considerInputSummaryText=!0;this._resetHeight(a)},_getFieldNameColValue:function(a,b){for(var c=0;c<b.length;c++)if(a===b[c].name)return a=b[c].alias&&""!==b[c].alias?b[c].alias:b[c].name;return a},_setResultInfoTemplate:function(a,b,c,g){var E,A,ca=[];var da=new X;var fa=b.panelText;da.setTitle("\x26nbsp;");var oa=f.create("div",{"class":"attrMainSection"});f.create("div",{"class":"attrHeader",innerHTML:W.sanitizeHTML(fa)},
oa);f.create("div",{"class":"attrSeparator"},oa);fa=f.create("div",null,oa);fa=f.create("table",{"class":"attrResultInfoTable"},fa);if(this._gpServiceOutputParameter)for(A=0;A<this._gpServiceOutputParameter.length;A++)this._gpServiceOutputParameter[A].name===b.paramName&&(ca=this._gpServiceOutputParameter[A].defaultValue.fields);if(b.saveToLayer)var va=this._layerInfosObj.getLayerInfoById(b.saveToLayer).layerObject;A=f.create("tbody",{},fa);for(E in a.attributes)if(a.attributes.hasOwnProperty(E)){var ma=
a.attributes[E];fa=f.create("tr",{},A);var ka=f.create("td",{innerHTML:W.sanitizeHTML(this._getFieldNameColValue(E,ca)),"class":"attrName"},fa);va&&((ka=va.getField(E))&&ka.domain&&"codedValue"===ka.domain.type&&(ma=this._getCodedValue(ka.domain,ma)),ka&&"esriFieldTypeDate"===ka.type&&n.some(va.infoTemplate.info.fieldInfos,e.hitch(this,function(ra){if(ra.fieldName===E)return ma=W.localizeDateByFieldInfo(ma,ra),!0})));f.create("td",{innerHTML:void 0!==ma&&null!==ma?ma:"","class":"attrValue"},fa)}if(b.bypassDetails.skipable){fa=
f.create("tr",{},A);ka=f.create("td",{"class":"attrName",colSpan:2},fa);var wa=f.create("div",{"class":"resultItemButtonSkipIcon resultItemButton infoPopupSKipIcon",style:{display:"none"},title:c},ka);(b=this._checkSkipLocationXY(g.controlDetails.skipGraphic))&&b.isFeatureSkipped&&(y.set(wa,"skippedFeatureUniqueId",b.skippedFeatureUniqueId),l.add(wa,"alreadySkippedLocation"));l.add(wa,g.controlDetails.bypassBtnClass);this._clickEventHandlerArr.push(this.own(B.pausable(wa,"click",e.hitch(this,function(){this._onSkipLocationIconClick(g,
!0,wa)}))))}da.setContent(oa);a.setInfoTemplate(da)},_getCodedValue:function(a,b){if(a&&a.codedValues){for(var c=0,g=a.codedValues.length;c<g;c++){var E=a.codedValues[c];if(Aa.isDefined(b)&&e.exists("code",E)&&b.toString()===E.code.toString())return E.name}return b}return b||null},_zoomToBtn:function(a,b){a=a.controlDetails.selectionGraphic;this._highlightSelection(a,a.getLayer(),b.currentTarget.parentNode.parentNode)},_highlightSelection:function(a,b,c){var g;l.contains(c,"esriCTHighlightedGraphic")?
(l.remove(c,"esriCTHighlightedGraphic"),this.animatedLayer.clear()):(this.map.setExtent(za.graphicsExtent([a]).expand(1.5)),(g=v(".esriCTHighlightedGraphic",this._widgetTopNode))&&0<g.length&&l.remove(g[0],"esriCTHighlightedGraphic"),this.animatedLayer.clear(),l.add(c,"esriCTHighlightedGraphic"),a=Ba.getHighLightSymbol(a,b),this.animatedLayer.add(a))},_createHighlightingGraphicLayer:function(){this.animatedLayer=new w;this.map.addLayer(this.animatedLayer)},_resetResults:function(){this.map.graphics.clear();
n.forEach(this.config.geoprocessing.outputs,function(a){a.layer&&a.layer.clear()},this)},_resetInputs:function(){n.forEach(this.gpInputDetails,function(a){a.clear()},this)},_errorMessage:function(a){(new P({message:a})).message=a},_onInputLocTabClick:function(){this._displayFlagsList();this._clickEventHandlerArr.push(this.own(B.pausable(this.inputBackClick,"click",e.hitch(this,function(){this._clearSelectionOnBackBtnClk();this._hideFlagsList(!0);Y.focus(this.inputLocTab)}))));var a={};a.node=this.inputLocDiv;
a.considerSaveAndExport=!0;this._resetHeight(a)},_onBarrierLocTabClick:function(){this._displayBarrierList();this._clickEventHandlerArr.push(this.own(B.pausable(this.barrierBackClick,"click",e.hitch(this,function(){this._clearSelectionOnBackBtnClk();this._hideBarrierList(!0);Y.focus(this.barrierLocTab)}))));var a={};a.node=this.barrierLocDiv;a.considerSaveAndExport=!0;this._resetHeight(a)},_addInputLocation:function(a,b){this._flagCount++;this._inputFlag++;this._hideFlagsList(!0);this._hideAllOutputResultContainer();
this._hideAttributeInspector();this._hideExportToCSVForm();this._hideSkipLocationList();this._hideBarrierList();l.add(this.layerFeaturesContainer,"esriCTHidden");this._displayFlagsOnMainScreen();y.set(this.lblInputLoc,"innerHTML",W.sanitizeHTML(this.nls.lblInputLocTab+" ("+this._flagCount+")"));y.set(this.flagCountLabel,"innerHTML",W.sanitizeHTML(this.nls.lblInputLocTab+" ("+this._flagCount+")"));y.set(this.inputLocTab,"aria-label",W.sanitizeHTML(this.nls.lblInputLocTab+" ("+this._flagCount+")"));
var c=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsMainDiv","aria-label":this.nls.lblInputLocation+this._inputFlag,tabindex:"0",role:"button"});y.set(c,"Graphic",JSON.stringify(a));y.set(c,"LayerType",b);var g=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsLabelContainer",innerHTML:W.sanitizeHTML(this.nls.lblInputLocation+this._inputFlag),"aria-label":W.sanitizeHTML(this.nls.lblInputLocation+this._inputFlag),tabindex:"2",role:"button"},c);var E=f.create("div",{"class":"esriCTInputFlagCloseDiv",
"aria-label":this.nls.closeButtonLabel+"  "+this.nls.lblInputLocation+this._inputFlag,tabindex:"2",role:"button"},c);f.place(c,this.flagLocContent);this.own(B(c,"keydown",e.hitch(this,function(A){A.keyCode!==G.ENTER&&A.keyCode!==G.SPACE||Y.focus(g)})));this._clickEventHandlerArr.push(this.own(B.pausable(E,"click",e.hitch(this,function(A){this._removeSelectedLocation(A)}))));this.own(B(E,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?this._removeSelectedLocation(A):A.keyCode===
G.ESCAPE?(A.stopPropagation(),A.preventDefault(),Y.focus(c)):A.keyCode===G.TAB&&(A.stopPropagation(),A.preventDefault(),Y.focus(g))})));this._clickEventHandlerArr.push(this.own(B.pausable(g,"click",e.hitch(this,function(A){this.map&&this.map.infoWindow&&this.map.infoWindow.hide();this._onClickHighlightLocations(A)}))));this.own(B(g,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?(this.map&&this.map.infoWindow&&this.map.infoWindow.hide(),this._onClickHighlightLocations(A)):
A.keyCode===G.TAB&&A.shiftKey?(A.stopPropagation(),A.preventDefault(),Y.focus(E)):A.keyCode===G.ESCAPE&&(A.stopPropagation(),A.preventDefault(),Y.focus(c))})))},_removeSelectedLocation:function(a){l.contains(a.currentTarget.parentNode,"esriCTHighlightedGraphic")&&this.animatedLayer.clear();this._onClickCloseRemoveGraphics(a);this._flagCount--;y.set(this.lblInputLoc,"innerHTML",W.sanitizeHTML(this.nls.lblInputLocTab+" ("+this._flagCount+")"));y.set(this.flagCountLabel,"innerHTML",W.sanitizeHTML(this.nls.lblInputLocTab+
" ("+this._flagCount+")"));y.set(this.inputLocTab,"aria-label",W.sanitizeHTML(this.nls.lblInputLocTab+" ("+this._flagCount+")"));0===this.flagLocContent.children.length?(l.add(this.btnTrace,"jimu-state-disabled"),y.set(this.btnTrace,"tabindex",-1),this.btnTrace.disabled=!0,this._hideFlagsList(!0),this._hideFlagsOnMainScreen()):Y.focus(v(".esriCTFlagsBarriersSkipLocationsMainDiv",this.flagLocContent)[0])},_addBarrierLocation:function(a,b){this._barrierCount++;this._inputBlock++;this._hideBarrierList(!0);
this._hideAllOutputResultContainer();this._hideAttributeInspector();this._hideExportToCSVForm();this._hideSkipLocationList();this._hideFlagsList();l.add(this.layerFeaturesContainer,"esriCTHidden");this._displayBarriersOnMainScreen();y.set(this.lblBlockLoc,"innerHTML",W.sanitizeHTML(this.nls.lblBlockLocTab+" ("+this._barrierCount+")"));y.set(this.barrierCountLabel,"innerHTML",W.sanitizeHTML(this.nls.lblBlockLocTab+" ("+this._barrierCount+")"));y.set(this.barrierLocTab,"aria-label",W.sanitizeHTML(this.nls.lblBlockLocTab+
" ("+this._barrierCount+")"));var c=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsMainDiv","aria-label":this.nls.lblBlockLocation+this._inputBlock,tabindex:"0",role:"button"});y.set(c,"Graphic",JSON.stringify(a));y.set(c,"LayerType",b);var g=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsLabelContainer",innerHTML:W.sanitizeHTML(this.nls.lblBlockLocation+this._inputBlock),"aria-label":W.sanitizeHTML(this.nls.lblBlockLocation+this._inputBlock),tabindex:"2",role:"button"},c);var E=
f.create("div",{"class":"esriCTInputFlagCloseDiv","aria-label":this.nls.closeButtonLabel+"  "+this.nls.lblBlockLocation+this._inputBlock,tabindex:"2",role:"button"},c);f.place(c,this.barrierLocContent);this.own(B(c,"keydown",e.hitch(this,function(A){A.keyCode!==G.ENTER&&A.keyCode!==G.SPACE||Y.focus(g)})));this._clickEventHandlerArr.push(this.own(B.pausable(E,"click",e.hitch(this,this._onBlockCloseDivClicked))));this.own(B(E,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?
this._onBlockCloseDivClicked(A):A.keyCode===G.ESCAPE?(A.stopPropagation(),A.preventDefault(),Y.focus(c)):A.keyCode===G.TAB&&(A.stopPropagation(),A.preventDefault(),Y.focus(g))})));this._clickEventHandlerArr.push(this.own(B.pausable(g,"click",e.hitch(this,function(A){this.map&&this.map.infoWindow&&this.map.infoWindow.hide();this._onClickHighlightLocations(A)}))));this.own(B(g,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?(this.map&&this.map.infoWindow&&this.map.infoWindow.hide(),
this._onClickHighlightLocations(A)):A.keyCode===G.TAB&&A.shiftKey?(A.stopPropagation(),A.preventDefault(),Y.focus(E)):A.keyCode===G.ESCAPE&&(A.stopPropagation(),A.preventDefault(),Y.focus(c))})))},_onBlockCloseDivClicked:function(a){l.contains(a.currentTarget.parentNode,"esriCTHighlightedGraphic")&&this.animatedLayer.clear();this._onClickCloseRemoveGraphics(a);this._barrierCount--;y.set(this.lblBlockLoc,"innerHTML",W.sanitizeHTML(this.nls.lblBlockLocTab+" ("+this._barrierCount+")"));y.set(this.barrierCountLabel,
"innerHTML",W.sanitizeHTML(this.nls.lblBlockLocTab+" ("+this._barrierCount+")"));y.set(this.barrierLocTab,"aria-label",W.sanitizeHTML(this.nls.lblBlockLocTab+" ("+this._barrierCount+")"));0===this.barrierLocContent.children.length?(this._hideBarrierList(!0),this._hideBarriersOnMainScreen()):Y.focus(v(".esriCTFlagsBarriersSkipLocationsMainDiv",this.barrierLocContent)[0])},_onClickCloseRemoveGraphics:function(a,b){if("Skip"===b){b=y.get(a.currentTarget.parentNode,"skippedFeatureUniqueId");var c=this._skippedLocations[b];
this._skipLocationGraphicsLayer.remove(c);f.destroy(a.currentTarget.parentNode);this._updateSkipLocation();v("[skippedFeatureUniqueId\x3d'"+b+"']",this._widgetTopNode).removeClass("alreadySkippedLocation");delete this._skippedLocations[b]}else{c=JSON.parse(y.get(a.currentTarget.parentNode,"Graphic"));var g=y.get(a.currentTarget.parentNode,"LayerType");n.some(this.gpInputDetails,function(E){E.type===g&&n.some(E.graphics,function(A){if(A.attributes.ObjID===c.attributes.ObjID)return E.remove(A),!0})});
f.destroy(a.currentTarget.parentNode)}},_onClickHighlightLocations:function(a){var b=y.get(a.currentTarget.parentNode,"LayerType");if("Skip"===b){var c=this._skippedLocations[y.get(a.currentTarget.parentNode,"skippedFeatureUniqueId")];this._highlightSelection(c,c.getLayer(),a.currentTarget.parentNode)}else(c=JSON.parse(y.get(a.currentTarget.parentNode,"Graphic")))&&n.some(this.gpInputDetails,e.hitch(this,function(g){g.type===b&&n.some(g.graphics,e.hitch(this,function(E){if(E.attributes.ObjID===c.attributes.ObjID)return this._highlightSelection(E,
E.getLayer(),a.currentTarget.parentNode),!0}))}))},_enhanceTabThemeStyle:function(){var a;(a=v(".jimu-widget-NetworkTrace .tracePanel",this._widgetTopNode)[0])&&("TabTheme"===this.appConfig.theme.name?l.add(a,"esriCTTabThemePaddding"):l.remove(a,"esriCTTabThemePaddding"))},_enhanceDartThemeStyle:function(){if("DartTheme"===this.appConfig.theme.name&&(this._setDartInlineStyle(),9===ba("ie"))){var a=v(".jimu-widget-frame.jimu-container",this._widgetTopNode)[0];l.add(a,"esriCTDartBackgroudColor")}},
_setDartInlineStyle:function(){var a,b=[];b.push(v(".esriCTFlagBarrierSkipLocationMainPage",this._widgetTopNode));b.push(v(".esriCTInputBarrierLoc",this._widgetTopNode));b.push(v(".tracePanel",this._widgetTopNode));b.push(v(".esriCTResultsLayerNamesContainer",this._widgetTopNode));b.push(v(".esriCTResultContainer",this._widgetTopNode));b.push(v(".esriCTLayerInformationContainer",this._widgetTopNode));for(a=0;a<b.length;a++)this._setInlineStyle(b[a])},_setInlineStyle:function(a){var b;for(b=0;b<a.length;b++)y.set(a[b],
"style","background-color: transparent !important; padding-right: 0px; padding-left: 0px;")},_enhanceLaunchpadThemeStyle:function(){var a;if("LaunchpadTheme"===this.appConfig.theme.name){var b=v(".claro .dijitComboBox\x3ediv.dijitArrowButton.dijitDownArrowButton",this._widgetTopNode);for(a=0;a<b.length;a++)y.set(b[a],"style","height: 30px !important")}},_addFocusClassOnTextBoxClick:function(a){var b,c,g;l.add(a,"dijitTextBoxIE9");this._clickEventHandlerArr.push(this.own(B.pausable(a,"click",e.hitch(this,
function(){b=v(".dijitTextBoxFocusedIE9",this._widgetTopNode);c=v(".dijitTextBoxFocused",this._widgetTopNode)[0];for(g=0;g<b.length;g++)l.remove(b[g],"dijitTextBoxFocusedIE9");l.add(c,"dijitTextBoxFocusedIE9")}))))},_addFocusClassOnDateChange:function(a){var b,c,g;B(a,"change",e.hitch(this,function(){b=v(".dijitTextBoxFocusedIE9",this._widgetTopNode);c=v(".dijitTextBoxFocused",this._widgetTopNode)[0];for(g=0;g<b.length;g++)l.remove(b[g],"dijitTextBoxFocusedIE9");l.add(c,"dijitTextBoxFocusedIE9")}))},
_addClassOnFocus:function(a){var b,c,g;B(a,"focus",e.hitch(this,function(){b=v(".dijitTextBoxFocusedIE9",this._widgetTopNode);c=v(".dijitTextBoxFocused",this._widgetTopNode)[0];for(g=0;g<b.length;g++)l.remove(b[g],"dijitTextBoxFocusedIE9");l.add(c,"dijitTextBoxFocusedIE9")}))},_onRemoveSkipAllButtonClick:function(){var a=v(".esriCTRemoveSkipLocationIcon",this.skipLocationsListContainer);a&&0<a.length&&n.forEach(a,e.hitch(this,function(b){b.click()}))},_onRemoveSkipAllButtonKeyPress:function(a){a.keyCode!==
G.ENTER&&a.keyCode!==G.SPACE||this._onRemoveSkipAllButtonClick()},_checkSkipLocationXY:function(a){var b=!1;for(var c in this._skippedLocations)if(this._skippedLocations.hasOwnProperty(c)&&a.geometry.x===this._skippedLocations[c].geometry.x&&a.geometry.y===this._skippedLocations[c].geometry.y){b=!0;var g=c;break}return{isFeatureSkipped:b,skippedFeatureUniqueId:g}},_onSkipLocationTabClick:function(){this._displaySkipLocationList();this._clickEventHandlerArr.push(this.own(B.pausable(this.skipLocationBackClick,
"click",e.hitch(this,function(){this._clearSelectionOnBackBtnClk();this._hideSkipLocationList(!0);Y.focus(this.skipLocationTab)}))));var a={};a.node=this.skipLocDiv;a.considerSaveAndExport=!0;this._resetHeight(a)},_addSkipLocation:function(a,b){this._displaySkipLocationsOnMainScreen();y.set(this.lblSkipLoc,"innerHTML",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+")"));y.set(this.skipLocationCountLabel,"innerHTML",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+
")"));y.set(this.skipLocationTab,"aria-label",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+")"));var c=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsMainDiv","aria-label":this.nls.lblSkipLocation+this._inputSkip,tabindex:"0",role:"button"});y.set(c,"LayerType",a);y.set(c,"skippedFeatureUniqueId",b);var g=f.create("div",{"class":"esriCTFlagsBarriersSkipLocationsLabelContainer",innerHTML:W.sanitizeHTML(this.nls.lblSkipLocation+this._inputSkip),"aria-label":W.sanitizeHTML(this.nls.lblSkipLocation+
this._inputSkip),tabindex:"2",role:"button"},c);var E=f.create("div",{"class":"esriCTRemoveSkipLocationIcon","aria-label":W.sanitizeHTML(this.nls.closeButtonLabel+"  "+this.nls.lblSkipLocation+this._inputSkip),tabindex:"2",role:"button"},c);f.place(c,this.skipLocationsListContainer);this.own(B(c,"keydown",e.hitch(this,function(A){A.keyCode!==G.ENTER&&A.keyCode!==G.SPACE||Y.focus(g)})));this._clickEventHandlerArr.push(this.own(B.pausable(E,"click",e.hitch(this,function(A){l.contains(A.currentTarget.parentNode,
"esriCTHighlightedGraphic")&&this.animatedLayer.clear();this._onClickCloseRemoveGraphics(A,"Skip")}))));this.own(B(E,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?(l.contains(A.currentTarget.parentNode,"esriCTHighlightedGraphic")&&this.animatedLayer.clear(),this._onClickCloseRemoveGraphics(A,"Skip")):A.keyCode===G.ESCAPE?(A.stopPropagation(),A.preventDefault(),Y.focus(c)):A.keyCode===G.TAB&&(A.stopPropagation(),A.preventDefault(),Y.focus(g))})));this._clickEventHandlerArr.push(this.own(B.pausable(g,
"click",e.hitch(this,function(A){this.map&&this.map.infoWindow&&this.map.infoWindow.hide();this._onClickHighlightLocations(A)}))));this.own(B(g,"keydown",e.hitch(this,function(A){A.keyCode===G.ENTER||A.keyCode===G.SPACE?(this.map&&this.map.infoWindow&&this.map.infoWindow.hide(),this._onClickHighlightLocations(A)):A.keyCode===G.TAB&&A.shiftKey?(A.stopPropagation(),A.preventDefault(),Y.focus(E)):A.keyCode===G.ESCAPE&&(A.stopPropagation(),A.preventDefault(),Y.focus(c))})))},_updateSkipLocation:function(){this._skipLocationCount--;
y.set(this.lblSkipLoc,"innerHTML",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+")"));y.set(this.skipLocationCountLabel,"innerHTML",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+")"));y.set(this.skipLocationTab,"aria-label",W.sanitizeHTML(this.nls.lblSkipLocTab+" ("+this._skipLocationCount+")"));if(0===this.skipLocationsListContainer.children.length){var a=!1;this._tabContainer&&this._tabContainer.viewStack.getSelectedLabel()===this.nls.inputTabTitle&&(a=
!0);this._hideSkipLocationList(a);this._hideSkipLocationsOnMainScreen(a)}else Y.focus(v(".esriCTFlagsBarriersSkipLocationsMainDiv",this.skipLocationsListContainer)[0])},_addSkipAllLocationButton:function(a){var b;(b=v(".esriCTSkipAllLocationParentContainer",a.parentNode))&&0<b.length&&f.destroy(b[0]);b=f.create("div",{"class":"esriCTSkipAllLocationParentContainer"});f.place(b,a,"before");var c=f.create("div",{innerHTML:W.sanitizeHTML(this.nls.skipAllLocationButtonLabel),"aria-label":W.sanitizeHTML(this.nls.skipAllLocationButtonLabel),
role:"button",tabindex:"0","class":"jimu-btn esriCTSkipLocationButton"},b);this._clickEventHandlerArr.push(this.own(B.pausable(c,"click",e.hitch(this,function(g){var E=v(".resultItemButtonSkipIcon",g.currentTarget.parentNode.parentNode),A=new la({titleLabel:this.nls.skipAllLocationButtonLabel,width:420,maxHeight:200,autoHeight:!0,content:this.nls.confirmSkipAllLocationsMessage,"class":this.baseClass,buttons:[{label:this.nls.yes,onClick:e.hitch(this,function(){this._skipAllLocationButtonClicked=!0;
n.forEach(E,e.hitch(this,function(ca){l.contains(ca,"alreadySkippedLocation")||ca.click()}));this._skipAllLocationButtonClicked=!1;A.close()})},{label:this.nls.no,classNames:["jimu-btn-vacation"],onClick:e.hitch(this,function(){A.close()})}]})}))));this.own(B(c,"keydown",e.hitch(this,function(g){g.keyCode!==G.ENTER&&g.keyCode!==G.SPACE||c.click()})))},_fetchUrlParameters:function(){var a,b;var c=[];var g=ta.urlToObject(document.location.href);this._removeDuplicateParamEntries(g);if(g.query)if(g.query.hasOwnProperty("project")){var E=
this._loadProjectDropdown.getOptions();n.some(E,e.hitch(this,function(A){if(A.value===g.query.project||A.label===g.query.project)b=A,a=!0}));a?(this._loadProjectDropdown.set("value",b.value),this._setProjectDropdownNameWidth()):this._errorMessage(this.nls.projectNotFoundErr)}else g.query.hasOwnProperty("wkid")&&(E=g.query.wkid,E=parseInt(E,10),this.map.spatialReference&&this.map.spatialReference.wkid&&this.map.spatialReference.wkid===E&&(E=null)),g.query.hasOwnProperty("flags")&&c.push(this._placeUrlInputs(g.query.flags,
"flags",E)),g.query.hasOwnProperty("barriers")&&c.push(this._placeUrlInputs(g.query.barriers,"barriers",E)),(new sa(c)).then(e.hitch(this,function(){this._runTrace(g)}));else this._showLoadingIcon(!1)},_removeDuplicateParamEntries:function(a){a.query&&(a.query.hasOwnProperty("flags")&&Array.isArray(a.query.flags)&&1<a.query.flags.length&&delete a.query.flags,a.query.hasOwnProperty("barriers")&&Array.isArray(a.query.barriers)&&1<a.query.barriers.length&&delete a.query.barriers,a.query.hasOwnProperty("project")&&
Array.isArray(a.query.project)&&1<a.query.project.length&&delete a.query.project,a.query.hasOwnProperty("runTrace")&&Array.isArray(a.query.runTrace)&&1<a.query.runTrace.length&&delete a.query.runTrace)},_placeUrlInputs:function(a,b,c){var g=new I,E=!1;var A=/(\[-?[0-9]*\.?[0-9]*,[0-9]*\.?[0-9]*\])/gi;if(/^\[(\[-?[0-9]*\.?[0-9]*,[0-9]*\.?[0-9]*\],?)*\]$/gi.test(a))E=!0;else if(A=a.match(A))a="["+A.toString()+"]",E=!0;if(E){var ca=JSON.parse(a);if(c){var da=[];n.forEach(ca,function(fa){da.push(new h(fa[0],
fa[1],new pa(parseInt(c,10))))});a=new ja;a.geometries=da;a.outSR=this.map.spatialReference;this.geometryService.project(a,e.hitch(this,function(fa){var oa=[];n.forEach(fa,function(va){oa.push([va.x,va.y])});this._addInputsOnMap(oa,b);g.resolve(!0)}))}else setTimeout(e.hitch(this,function(){this._addInputsOnMap(ca,b);g.resolve(!0)}),100)}return g.promise},_addInputsOnMap:function(a,b){"flags"===b?this._onFlagButtonClick():"barriers"===b&&this._onBarrierButtonClick();n.forEach(a,e.hitch(this,function(c){if("skip_locations"===
b){var g={controlDetails:{}};g.controlDetails.selectionGraphic={};g.controlDetails.selectionGraphic.infoTemplate={};g.controlDetails.selectionGraphic.infoTemplate.content="";g.controlDetails.selectionGraphic.bypassed="";g.controlDetails.skipGraphic=c;this._onSkipLocationIconClick(g,!1)}else c=new h(c[0],c[1],this.map.spatialReference),this._onMapClick(c)}));"flags"===b?this._onFlagButtonClick():"barriers"===b&&this._onBarrierButtonClick()},_runTrace:function(a){a.query.hasOwnProperty("runTrace")&&
"true"===a.query.runTrace&&this._onTraceButtonClick()},_addLoadProjectDropdown:function(){this._loadProjectDropdown=new J({"class":"esriCTLoadProjectDropDown","aria-label":this.nls.selectProject});this._loadProjectDropdown.placeAt(this.loadProjectDropdownContainer);this._loadProjectDropdownEvtHandle=B.pausable(this._loadProjectDropdown,"change",e.hitch(this,function(a){this._setProjectDropdownNameWidth();this._currentSelectedProjectGuid=a;"newproject"!==a?this._loadExistingProject(a):(l.remove(this.editProjectAttributes,
"esriCTEditProjectBtn"),l.add(this.editProjectAttributes,"esriCTDisableEditProjectBtn"),y.set(this.editProjectAttributes,"tabindex",-1),this._clearResults(!0))}));this._loadProjectDropdown.startup();this._addDefaultOptionInDropdown();this._loadProjectDropdown.set("value","newproject");this._setProjectDropdownNameWidth()},_loadExistingProject:function(a){this._showLoadingIcon(!0);l.remove(this.editProjectAttributes,"esriCTDisableEditProjectBtn");l.add(this.editProjectAttributes,"esriCTEditProjectBtn");
y.set(this.editProjectAttributes,"tabindex",0);this._clearResults(!0);this._loadProjectData(a)},_displaySaveAndExportButton:function(){var a;n.some(this.config.geoprocessing.outputs,e.hitch(this,function(b){b.exportToCSV&&(a=!0,this._exportToCSVLayerArray.push({paramName:b.paramName,displayName:b.panelText}))}));this._isWidgetLoadedInProjectMode&&l.remove(this.saveButtonContainer,"esriCTHidden");a&&l.remove(this.exportButtonContainer,"esriCTHidden");this._isWidgetLoadedInProjectMode&&!a&&(l.add(this.saveAndExportParentContainer,
"esriCTTextCenter"),l.add(this.saveButtonContainer,"esriCTSaveButtonCenterContainer"));!this._isWidgetLoadedInProjectMode&&a&&(l.add(this.saveAndExportParentContainer,"esriCTTextCenter"),l.add(this.exportButtonContainer,"esriCTExportButtonCenterContainer"));this._isWidgetLoadedInProjectMode||a||(this._isSaveAndExportHidden=!0)},_resetHeight:function(a){var b=a.node;var c=a.considerSaveAndExport;var g=a.considerLoadProject;var E=a.considerSkipAll;var A=a.skipAllButton;var ca=a.resetFlagBarrierSkipLocationMainPage;
var da=a.resetHeightOutputPanel;a=a.considerInputSummaryText;ca?(E=N.getComputedStyle(this.inputTabPanel).height,E=parseFloat(E),N.set(b,"height",E-135+"px")):da?(E=N.getComputedStyle(this.inputOutputTabParentContainer).height,E=parseFloat(E),N.set(b,"height",E-30+"px")):(ca=N.getComputedStyle(this.mainParentContentContainer).height,ca=parseFloat(ca),c&&(c=N.getComputedStyle(this.saveAndExportParentContainer).height,c=parseFloat(c),ca-=c),g&&(g=N.getComputedStyle(this.loadProjectParentContainer).height,
g=parseFloat(g),"NaN"!==g.toString()&&(ca-=g)),E&&(A&&0<A.length&&(E=N.getComputedStyle(A[0]).height,E=parseFloat(E),ca-=E),ca-=40),""!==a&&null!==a&&void 0!==a&&(E=N.getComputedStyle(this.inputTabSummaryTextContainer).height,E=parseFloat(E),"NaN"!==E.toString()&&(ca-=E)),N.set(b,"height",ca+"px"))},_createNewProjectPopup:function(){var a=f.create("div",{className:"esriCTSaveAsPopupContainer"});f.create("div",{innerHTML:W.sanitizeHTML(this.nls.projectNameLabel),className:"esriCTProjectNameLabel"},
a);var b=f.create("div",{className:"esriCTprojectNameTextBoxContainer"},a);var c=new ha({required:!0,style:{width:"100%"},trim:!0});c.placeAt(b);c.startup();var g=new la({titleLabel:this.nls.saveProjectPopupTitle,width:420,maxHeight:200,autoHeight:!0,content:a,"class":this.baseClass,buttons:[{label:this.nls.save,onClick:e.hitch(this,function(){""===c.value||null===c.value||void 0===c.value?this._setErrorMessage(c,this.nls.enterProjectNameMessage):(this._showLoadingIcon(!0),this._saveAsNewProject=
!0,this._checkExistingProjectNames(c.value,c,g))})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],onClick:e.hitch(this,function(){this._saveAsNewProject=!1;g.close()})}],onClose:e.hitch(this,function(){})})},_checkExistingProjectNames:function(a,b,c,g,E){var A;if(A=this.map.getLayer(this.config.projectSettings.polygonLayerId)){A=new ia(A.url);var ca=new K;ca.outFields=[this._polygonLayerFields.name];ca.where="1\x3d1";ca.returnGeometry=!1;ca.outSpatialReference=this.map.spatialReference;
A.execute(ca).then(e.hitch(this,function(da){var fa=!1;n.some(da.features,e.hitch(this,function(oa){oa.attributes[this._polygonLayerFields.name]===a&&(fa=!0)}));fa&&!E?(c?this._setErrorMessage(b,this.nls.projectNameExistsMessage):this._errorMessage(this.nls.projectNameExistsMessage),this._showLoadingIcon(!1)):(da=a.length,da=parseInt(da,10),da>this._polygonLayerFields.nameFieldLength?(c?this._setErrorMessage(b,this.nls.projectLengthErrorMessage+" "+this._polygonLayerFields.nameFieldLength):this._errorMessage(this.nls.projectLengthErrorMessage+
" "+this._polygonLayerFields.nameFieldLength),this._showLoadingIcon(!1)):(c&&c.close(),g?(this._isAttributeChanged=!0,this._updateExistingProjectAttributes()):this._saveOutagePolygon(a)))}),e.hitch(this,function(){this._saveAsNewProject=!1;c?this._setErrorMessage(b,this.nls.fetchingProjectNamesErrorMessage):this._errorMessage(this.nls.fetchingProjectNamesErrorMessage);this._showLoadingIcon(!1)}))}},_setErrorMessage:function(a,b){a.focus();a.set("state","Error");a.set("message",b);a.isValid()},_saveOutagePolygon:function(a){var b=
null;var c=this.map.getLayer(this.config.projectSettings.outputParamName+this.id);var g=this.map.getLayer(this.config.projectSettings.polygonLayerId);var E={};E[this._polygonLayerFields.name]=a;c&&0<c.graphics.length&&c.graphics[0].geometry&&(b=c.graphics[0].geometry);b="newproject"===this._loadProjectDropdown.getValue()||this._saveAsNewProject?new k(b,null,this._currentFeatureDetails.attributes,null):new k(b,null,E,null);g.applyEdits([b],null,null,e.hitch(this,function(A){A&&A[0]&&A[0].success?(this._loadProjectDropdownEvtHandle.pause(),
this.addProjectDropdownOpt(A,a),setTimeout(e.hitch(this,function(){this._loadProjectDropdownEvtHandle.resume();this._saveFlagsBarriersAndSkipLocations()}),0)):(this._saveAsNewProject=!1,this._showLoadingIcon(!1),this._errorMessage(this.nls.creatingNewProjectErrorMessage+" "+A[0].error.message))}),e.hitch(this,function(){this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.creatingNewProjectErrorMessage)}))},addProjectDropdownOpt:function(a,b){var c=a[0].globalId;this._currentSelectedProjectGuid=
c;this._loadProjectDropdown.addOption({value:c,label:b,objectId:a[0].objectId})},_loadProject:function(a,b){var c;if(c=this.map.getLayer(this.config.projectSettings.polygonLayerId)){var g=c.getDefinitionExpression();if(""===g||null===g||void 0===g)g="1\x3d1";var E=new ia(c.url);var A=new K;A.outFields=["*"];A.where=g;A.returnGeometry=!1;A.outSpatialReference=this.map.spatialReference;E.execute(A).then(e.hitch(this,function(ca){n.forEach(ca.features,e.hitch(this,function(fa){this._loadProjectDropdown.addOption({value:fa.attributes[c.globalIdField],
label:fa.attributes[this._polygonLayerFields.name],objectId:fa.attributes[c.objectIdField]})}));if(a){var da=this._loadProjectDropdown.getOptions(b);da?(this._loadProjectDropdown.set("value",b),this._setProjectDropdownNameWidth()):(this._loadProjectDropdown.set("value","newproject"),this._setProjectDropdownNameWidth(),l.remove(this.editProjectAttributes,"esriCTEditProjectBtn"),l.add(this.editProjectAttributes,"esriCTDisableEditProjectBtn"));setTimeout(e.hitch(this,function(){this._loadProjectDropdownEvtHandle.resume();
this._resumeAllClickEvents();da||(this._clearResults(),this._errorMessage(this.nls.filteredProjectLoadMessage));this._loadProjectDropdown.set("disabled",!1);this._showLoadingIcon(!1)}),0)}else this._setProjectDropdownNameWidth(),this._fetchUrlParameters()}),e.hitch(this,function(){a&&(this._loadProjectDropdownEvtHandle.resume(),this._resumeAllClickEvents(),this._loadProjectDropdown.set("disabled",!1));this._showLoadingIcon(!1);this._errorMessage(this.nls.projectNameFetchingErr)}))}},_onProjectSaveButtonClick:function(){l.contains(this.projectSaveButton,
"jimu-state-disabled")||("newproject"===this._currentSelectedProjectGuid?(this._showLoadingIcon(!0),this._displayAttributeInspector(),this._addGraphicToLocalLayer()):this._createEditProjectPopup())},_onProjectSaveButtonKeyPress:function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onProjectSaveButtonClick()},_isProjectFiltered:function(){var a;if(a=this.map.getLayer(this.config.projectSettings.polygonLayerId)){var b=a.getDefinitionExpression();if(""===b||null===b||void 0===b)b="1\x3d1";var c=
new ia(a.url);var g=new K;g.outFields=["*"];g.where=b;g.returnGeometry=!1;g.outSpatialReference=this.map.spatialReference;c.execute(g).then(e.hitch(this,function(E){var A=!0,ca=this._loadProjectDropdown.getValue();n.forEach(E.features,e.hitch(this,function(da){ca.toLowerCase()===da.attributes[a.globalIdField].toLowerCase()&&(A=!1)}));A?(this._showLoadingIcon(!1),this._errorMessage(this.nls.filteredProjectMessage)):(this._displayAttributeInspector(),this._loadAttributeInspector())}),e.hitch(this,function(){this._showLoadingIcon(!1);
this._errorMessage(this.nls.filteredProjectError)}))}},_editProjectAttributes:function(){this._showLoadingIcon(!0);this._isProjectFiltered()},_onEditProjectAttributesKeyPress:function(a){if(a.keyCode===G.ENTER||a.keyCode===G.SPACE)this._showLoadingIcon(!0),this._isProjectFiltered()},_isValidProjectAttributes:function(){var a=!0;this._attributeInspector&&this._attributeInspector._layerInfos&&this._attributeInspector._layerInfos[0].fieldInfos&&n.some(this._attributeInspector._layerInfos[0].fieldInfos,
function(b){if(b&&b.dijit&&b.dijit.isValid&&!b.dijit.isValid())return b.dijit.focus(),a=!1,!0},this);return a},_onOkButtonClick:function(){if("newproject"===this._currentSelectedProjectGuid||this._saveAsNewProject){this._showLoadingIcon(!0);var a=this._getProjectNameTextBox();a=a.value;""===a||null===a||void 0===a?(this._errorMessage(this.nls.enterProjectNameMessage),this._showLoadingIcon(!1)):(this._saveAsNewProject=!0,this._checkExistingProjectNames(a,null,null))}else if(this._showLoadingIcon(!0),
this._isValidProjectAttributes())if(a=this._getProjectNameTextBox(),a=a.value,""===a||null===a||void 0===a)this._errorMessage(this.nls.enterProjectNameMessage),this._showLoadingIcon(!1);else{var b=this._loadProjectDropdown.getValue();b=this._loadProjectDropdown.getOptions(b);var c=!1;a===b.label&&(c=!0);this._checkExistingProjectNames(a,null,null,!0,c)}else this._showLoadingIcon(!1)},_onOkButtonKeyPress:function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onOkButtonClick()},_updateExistingProjectAttributes:function(){this._isAttributeChanged?
(this._showLoadingIcon(!0),this._isAttributeChanged=!1,this._updateProjectAttributes()):this._hideAttributeInspector()},_hideAttributeInspector:function(){this._clearAttributeInspectorData();l.add(this.editAttributeContainer,"esriCTHidden");this._displayEntireMainScreen()},_hideAttributeInspectorKeyPress:function(a){if(a.keyCode===G.ENTER||a.keyCode===G.SPACE)this._clearAttributeInspectorData(),l.add(this.editAttributeContainer,"esriCTHidden"),this._displayEntireMainScreen()},_clearAttributeInspectorData:function(){this._attributeInspector&&
(this._attributeInspector.layerInfos&&n.forEach(this._attributeInspector.layerInfos,function(a){a=a.featureLayer;a.clearSelection();a.refresh()}),this._attributeInspector.destroy())},_loadAttributeInspector:function(){var a;var b=this._createFieldInfos();f.empty(this.attributeInspectorContainer);var c=this.map.getLayer(this.config.projectSettings.polygonLayerId);this._attributeInspector=new (M([d],{constructor:function(){this._aiConnects=[];this._selection=[];this._toolTips=[]}}))({layerInfos:[{featureLayer:c,
showAttachments:!1,isEditable:!0,fieldInfos:b}]},f.create("div"));this._attributeInspector.on("attribute-change",e.hitch(this,function(E){this._isAttributeChanged=!0;this._projectAttributeGraphic.attributes[E.fieldName]=E.fieldValue}));this.attributeInspectorContainer.appendChild(this._attributeInspector.domNode);b=new K;var g=Date.now();b.where=c.globalIdField+"\x3d'"+this._loadProjectDropdown.getValue()+"' AND "+g+" \x3d "+g;b.outFields=["*"];c.selectFeatures(b,C.SELECTION_NEW,e.hitch(this,function(E){this._projectAttributeGraphic=
E[0];a=this._attributeInspector.attributeTable.childNodes[0];y.set(a,"cellspacing","5");y.set(a,"cellpadding","5");this._add508SupportToATI();this._showLoadingIcon(!1)}),e.hitch(this,function(){this._showLoadingIcon(!1);this._errorMessage(this.nls.projectAttributeLoadingErr)}))},_add508SupportToATI:function(){var a;this._attributeInspector&&this._attributeInspector.domNode&&(a=v("td.atiLabel",this._attributeInspector.domNode))&&n.forEach(a,e.hitch(this,function(c){var g=this._getAttrInspectorRowInfo(c);
g&&(g[0].set("aria-label",g[1]),b||g[0].disabled||(b=g[0].focusNode),1<c.parentNode.childNodes[1].childNodes.length&&(c=c.parentNode.childNodes[1].childNodes[1],c=T.getEnclosingWidget(c),c.set("aria-label",g[1])))}));if(!b)var b=this.editProjectAttributeOkButtonNode;this._setWidgetFirstFocusNode(b);this._currentLastNode=this.editProjectAttributeCancelButtonNode;Y.focus(b)},_getAttrInspectorRowInfo:function(a){try{if(a&&a.parentNode){var b=a.parentNode.childNodes[1].childNodes[0];return[T.getEnclosingWidget(b),
a.childNodes[0].data,b]}return null}catch(c){return console.log(c),null}},_updateProjectAttributes:function(){this.map.getLayer(this.config.projectSettings.polygonLayerId).applyEdits(null,[this._projectAttributeGraphic],null,e.hitch(this,function(a,b,c){b&&b[0]&&b[0].success?(this._loadProjectDropdownEvtHandle.pause(),a=this._currentSelectedProjectGuid,b=this._loadProjectDropdown.getOptions(a),c=b.objectId,this._loadProjectDropdown.removeOption(b),this._loadProjectDropdown.addOption({label:this._projectAttributeGraphic.attributes[this._polygonLayerFields.name],
value:a,objectId:c}),this._loadProjectDropdown.set("value",a),this._setProjectDropdownNameWidth(),setTimeout(e.hitch(this,function(){this._loadProjectDropdownEvtHandle.resume();this._hideAttributeInspector();this._showLoadingIcon(!1);this._errorMessage(this.nls.attributeUpdatedMsg)}),0)):(this._showLoadingIcon(!1),this._errorMessage(this.nls.projectAttributeUpdatingErr+" "+b[0].error.message))}),e.hitch(this,function(){this._showLoadingIcon(!1);this._errorMessage(this.nls.projectAttributeUpdatingErr)}))},
_createFieldsDetailsObject:function(){var a={};n.forEach(this._projectLayerInfo.layerObject.fields,e.hitch(this,function(b){a[b.name]=b.type}));return a},_createFieldInfos:function(){this._projectLayerInfo=this._layerInfosObj.getLayerInfoById(this.config.projectSettings.polygonLayerId);var a=this._createFieldsDetailsObject();var b=this._getFieldInfosFromLayer(this._projectLayerInfo);this._projectLayerInfo.controlPopupInfo&&this._projectLayerInfo.controlPopupInfo.enablePopup&&this._projectLayerInfo.controlPopupInfo.infoTemplate&&
(b=e.clone(this._projectLayerInfo.controlPopupInfo.infoTemplate.info.fieldInfos));var c=[];n.forEach(b,e.hitch(this,function(g){if(g.visible&&a[g.fieldName]&&"esriFieldTypeRaster"!==a[g.fieldName]&&"esriFieldTypeBlob"!==a[g.fieldName]||g.fieldName===this._polygonLayerFields.name)g.fieldName===this._polygonLayerFields.name&&(g.nullable=!1,g.visible=!0),g.format&&g.format.dateFormat&&g.format.dateFormat.toLowerCase()&&0<=g.format.dateFormat.toLowerCase().indexOf("time")&&(g.format.time=!0),c.push(g)}));
return c},mergeFirstToLast:function(){for(var a={},b=arguments.length-1,c;0<=b;b--)for(c in arguments[b])arguments[b].hasOwnProperty(c)&&(a[c]=arguments[b][c]);return a},_getFieldInfosFromLayer:function(a){var b=[];a&&a.layerObject&&n.forEach(a.layerObject.fields,function(c){var g=W.getDefaultPortalFieldInfo(c);g=this.mergeFirstToLast(g,c);g.format&&g.format.dateFormat&&g.format.dateFormat.toLowerCase()&&0<=g.format.dateFormat.toLowerCase().indexOf("time")&&(g.format.time=!0);g.visible=!0;g.fieldName===
this._polygonLayerFields.name&&(c.nullable=!1);b.push(g)},this);return b},_getLayerInfos:function(){ya.getInstance(this.map,this.map.webMapResponse.itemInfo).then(e.hitch(this,function(a){this._layerInfosObj=a;this.config.projectSettings&&this.config.projectSettings.polygonLayerId&&this.config.projectSettings.pointLayerId&&(this._getPointLayerFields(),this._getPolygonLayerFields());this._loadWidget()}))},_createLoadProjectDetailsObj:function(){this._loadProjectDetailsObj={};n.forEach(this.config.geoprocessing.outputs,
e.hitch(this,function(a){this.config.projectSettings&&a.paramName===this.config.projectSettings.outputParamName&&!a.saveToLayer&&this.config.projectSettings.polygonLayerId&&(a.saveToLayer=this.config.projectSettings.polygonLayerId);a.saveToLayer&&this.map.getLayer(a.saveToLayer)&&(this._loadProjectDetailsObj[a.paramName]={layerID:a.saveToLayer,guidfield:a.guidField,parameternamefield:a.parameternameField})}))},_loadProjectData:function(a){this._queryOutagePolygon(a)},_loadOutagePolygon:function(a){var b=
this.map.getLayer(this.config.projectSettings.outputParamName+this.id);b&&b.add(a)},_queryOutagePolygon:function(a){var b=this.map.getLayer(this.config.projectSettings.polygonLayerId);var c=new ia(b.url);var g=new K;g.outFields=["*"];g.where=b.globalIdField+"\x3d'"+a+"'";g.returnGeometry=!0;g.outSpatialReference=this.map.spatialReference;c.execute(g).then(e.hitch(this,function(E){E&&0<E.features.length&&(E=new k(E.features[0].geometry,null,E.features[0].attributes,null),this._loadOutagePolygon(E));
this._queryFlagsBarriersAndSkipLocation(a)}),e.hitch(this,function(){this._showLoadingIcon(!1);this._errorMessage(this.nls.fetchingOutagePolygonMessage)}))},_queryFlagsBarriersAndSkipLocation:function(a){var b=this.map.getLayer(this.config.projectSettings.pointLayerId);var c=new ia(b.url);b=new K;b.outFields=["*"];b.where="projectid\x3d'"+a+"'";b.returnGeometry=!0;b.outSpatialReference=this.map.spatialReference;c.execute(b).then(e.hitch(this,function(g){this._allProjectLoadedInputs=g.features;this._segregateInputs(g.features)}),
e.hitch(this,function(){this._showLoadingIcon(!1);this._errorMessage(this.nls.loadingProjectDetailsErrorMessage)}))},_segregateInputs:function(a){var b=[];var c=[];var g=[];a&&0<a.length&&this._pointLayerFields&&this._pointLayerFields.inputType&&n.forEach(a,e.hitch(this,function(E){switch(E.attributes[this._pointLayerFields.inputType]){case "Flag":b.push([E.geometry.x,E.geometry.y]);break;case "Barrier":c.push([E.geometry.x,E.geometry.y]);break;case "Skip":g.push(E)}}));this._addInputsOnMap(b,"flags");
this._addInputsOnMap(c,"barriers");this._addInputsOnMap(g,"skip_locations");this._fetchFeatures()},_onSkipLocationIconClick:function(a,b,c){if(null!==this._skipLocationGraphicsLayer){if(c)if(l.contains(c,"alreadySkippedLocation")){l.remove(c,"alreadySkippedLocation");var g=!0}else l.add(c,"alreadySkippedLocation"),g=!1;b=this._checkSkipLocationXY(a.controlDetails.skipGraphic);b.isFeatureSkipped?g?(a=v("[skippedFeatureUniqueId\x3d'"+b.skippedFeatureUniqueId+"']",this.skipLocationsListContainer),v(".esriCTRemoveSkipLocationIcon",
a[0])[0].click()):(c&&y.set(c,"skippedFeatureUniqueId",b.skippedFeatureUniqueId),this._skipAllLocationButtonClicked||this._errorMessage(this.nls.locationAlreadySkippedMessage)):(this._skipLocationCount++,this._inputSkip++,g=this._inputSkip,this._skippedLocations[g]=a.controlDetails.skipGraphic,this._addSkipLocation("Skip",g),this._skipLocationGraphicsLayer.add(a.controlDetails.skipGraphic),a.controlDetails.selectionGraphic.bypassed=!0,c&&y.set(c,"skippedFeatureUniqueId",this._inputSkip))}},_deleteExistingInputs:function(){this.map.getLayer(this.config.projectSettings.pointLayerId).applyEdits(null,
null,this._allProjectLoadedInputs,e.hitch(this,function(){this._saveFlagsBarriersAndSkipLocations()}),e.hitch(this,function(){this._updateExistingProject=this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.deletingExistingPolygonErr)}))},_getPolygonLayerFields:function(){var a,b=0;this._polygonLayerFields={name:"",projectId:""};(a=this._layerInfosObj.getLayerInfoById(this.config.projectSettings.polygonLayerId))&&a.layerObject&&n.some(a.layerObject.fields,function(c){"name"===
c.name.toLowerCase()&&(this._polygonLayerFields.name=c.name,this._polygonLayerFields.nameFieldLength=c.length,b++);"esriFieldTypeGlobalID"===c.type&&(this._polygonLayerFields.projectId=c.name,b++);if(2===b)return!0},this)},_getPointLayerFields:function(){var a,b=0;this._pointLayerFields={inputType:"",projectId:""};(a=this._layerInfosObj.getLayerInfoById(this.config.projectSettings.pointLayerId))&&a.layerObject&&n.some(a.layerObject.fields,function(c){var g=c.name.toLowerCase();"inputtype"===g&&(this._pointLayerFields.inputType=
c.name,b++);"projectid"===g&&(this._pointLayerFields.projectId=c.name,b++);if(2===b)return!0},this)},_createInputLocations:function(a,b){var c=[];n.forEach(a,e.hitch(this,function(g){var E={};E[this._pointLayerFields.projectId]=this._currentSelectedProjectGuid;E[this._pointLayerFields.inputType]=b;g=new k(g.geometry,null,E,null);c.push(g)}));return c},_saveFlagsBarriersAndSkipLocations:function(){var a=[];var b=[];var c=[];var g=[];this._flagGraphicsLayer&&(a=this._createInputLocations(this._flagGraphicsLayer.graphics,
"Flag"));this._barrierGraphicsLayer&&(b=this._createInputLocations(this._barrierGraphicsLayer.graphics,"Barrier"));this._skipLocationGraphicsLayer&&(c=this._createInputLocations(this._skipLocationGraphicsLayer.graphics,"Skip"));g=g.concat(a,b,c);a=this.map.getLayer(this.config.projectSettings.pointLayerId);var E=a.objectIdField;a.applyEdits(g,null,null,e.hitch(this,function(A,ca,da){this._allProjectLoadedInputs=[];n.forEach(A,e.hitch(this,function(fa){if(fa.success){var oa={};oa[E]=fa.objectId;fa=
new k(null,null,oa,null);this._allProjectLoadedInputs.push(fa)}}));this._saveAsNewProject?this._addProjectFeatures():this._deleteExistingProjectFeatures()}),e.hitch(this,function(){this._updateExistingProject=this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.savingProjectDetailsErr)}))},_updateOutagePolygon:function(){var a=null;var b=this.map.getLayer(this.config.projectSettings.polygonLayerId),c=b.objectIdField,g=this._loadProjectDropdown.getOptions(this._currentSelectedProjectGuid).objectId,
E={};E[c]=g;c=this.map.getLayer(this.config.projectSettings.outputParamName+this.id);0<c.graphics.length&&c.graphics[0].geometry&&(a=c.graphics[0].geometry);null!==a&&void 0!==a&&""!==a?(a=new k(a,null,E,null),b.applyEdits(null,[a],null,e.hitch(this,function(A,ca,da){0<ca.length&&ca[0].success?this._deleteExistingInputs():(this._updateExistingProject=this._saveAsNewProject=!1,this._showLoadingIcon(!1),this._errorMessage(this.nls.updatingOutagePolygonErr))}),e.hitch(this,function(){this._updateExistingProject=
this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.updatingOutagePolygonErr)}))):this._deleteExistingInputs()},_deleteExistingProjectFeatures:function(){var a={},b;for(b in this._loadProjectDetailsObj){var c=!0;this.config.projectSettings&&this.config.projectSettings.outputParamName&&this.config.projectSettings.polygonLayerId&&b===this.config.projectSettings.outputParamName&&this._loadProjectDetailsObj[b].layerID===this.config.projectSettings.polygonLayerId&&(c=!1);c&&
(c=this._fetchedFeaturesDetails[b].features,0<c.length&&(a[b]=this._deleteFeaturesDeferred(b)))}R(a).then(e.hitch(this,function(){this._addProjectFeatures()}),e.hitch(this,function(){this._updateExistingProject=this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.deletingExistingProjectFeaturesErr)}))},_deleteFeaturesDeferred:function(a){var b=this.map.getLayer(this._loadProjectDetailsObj[a].layerID);a=this._fetchedFeaturesDetails[a].features;var c=[];var g=b.objectIdField;
n.forEach(a,e.hitch(this,function(E){var A={};A[g]=E.attributes[g];E=new k(null,null,A,null);c.push(E)}));return b.applyEdits(null,null,c).promise},_addProjectFeatures:function(){var a={},b;for(b in this._loadProjectDetailsObj){var c=!0;this.config.projectSettings&&this.config.projectSettings.outputParamName&&this.config.projectSettings.polygonLayerId&&b===this.config.projectSettings.outputParamName&&this._loadProjectDetailsObj[b].layerID===this.config.projectSettings.polygonLayerId&&(c=!1);var g=
this.map.getLayer(b+this.id);c&&g&&0<g.graphics.length&&(a[b]=this._addFeaturesDeferred(b))}R(a).then(e.hitch(this,function(){this._saveAsNewProject?(this._clearResults(),this._loadProjectDropdown.set("value",this._currentSelectedProjectGuid),this._setProjectDropdownNameWidth()):this._updateExistingProject?this._loadExistingProject(this._currentSelectedProjectGuid):(this._updateExistingProject=this._saveAsNewProject=!1,this._showLoadingIcon(!1))}),e.hitch(this,function(){this._updateExistingProject=
this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.addingProjectFeaturesErr)}))},_addFeaturesDeferred:function(a){var b={};var c={};var g=[];var E=this._currentSelectedProjectGuid;var A=this.map.getLayer(a+this.id);var ca=this.map.getLayer(this._loadProjectDetailsObj[a].layerID);n.forEach(ca.fields,e.hitch(this,function(oa){b[oa.name.toLowerCase()]={type:oa.type,name:oa.name}}));var da=this._gpServiceOutputParameterObj[a],fa;for(fa in da)c[fa.toLowerCase()]={type:da[fa],
name:fa};n.forEach(A.graphics,e.hitch(this,function(oa){var va={},ma;for(ma in oa.attributes){var ka,wa,ra;var ua=ra=wa=ka=null;c.hasOwnProperty(ma.toLowerCase())&&(ka=c[ma.toLowerCase()].name,wa=c[ma.toLowerCase()].type);b.hasOwnProperty(ma.toLowerCase())&&(ra=b[ma.toLowerCase()].name,ua=b[ma.toLowerCase()].type);ka&&ra&&wa===ua&&oa.attributes[ma]&&""!==oa.attributes[ma].toString()&&(va[ra]=oa.attributes[ma])}va[this._loadProjectDetailsObj[a].guidfield]=E;va[this._loadProjectDetailsObj[a].parameternamefield]=
a;oa=new k(oa.geometry,null,va,null);g.push(oa)}));return ca.applyEdits(g,null,null).promise},_queryLayerDeferred:function(a){var b=this._currentSelectedProjectGuid;var c=this.map.getLayer(this._loadProjectDetailsObj[a].layerID);var g=new ia(c.url);c=new K;c.outFields=["*"];this.config.projectSettings&&this.config.projectSettings.outputParamName&&this.config.projectSettings.polygonLayerId&&a===this.config.projectSettings.outputParamName&&this._loadProjectDetailsObj[a].layerID===this.config.projectSettings.polygonLayerId?
c.where=this._polygonLayerFields.projectId+"\x3d'"+b+"'":this._loadProjectDetailsObj[a].guidfield&&this._loadProjectDetailsObj[a].parameternamefield&&(c.where=this._loadProjectDetailsObj[a].guidfield+"\x3d'"+b+"' and "+this._loadProjectDetailsObj[a].parameternamefield+"\x3d'"+a+"'");if(""===c.where||null===c.where||void 0===c.where)c.where="1!\x3d1";c.returnGeometry=!0;c.outSpatialReference=this.map.spatialReference;return g.execute(c).promise},_fetchFeatures:function(){this._executeTracePreRequisites(!1);
var a={},b;for(b in this._loadProjectDetailsObj)a[b]=this._queryLayerDeferred(b);R(a).then(e.hitch(this,function(c){this._fetchedFeaturesDetails=c;this._resetSubmitJobDetails();for(var g in c){var E=c[g].features;g===this.config.projectSettings.outputParamName&&E&&0<E.length&&!E[0].geometry&&(E=[]);this._createGPResultObj(g,E,c[g].geometryType)}n.forEach(this.config.geoprocessing.outputs,e.hitch(this,function(A,ca){c.hasOwnProperty(A.paramName)?this.config.geoprocessing.outputs[ca].results=c[A.paramName]:
(this._createGPResultObj(A.paramName,[],"esriGeometryPoint"),this.config.geoprocessing.outputs[ca].results=[])}));this._zoomToProject();this._saveAsNewProject?this._saveAsNewProject=!1:this._updateExistingProject&&(this._updateExistingProject=!1);this._showLoadingIcon(!1)}),e.hitch(this,function(){this._showLoadingIcon(!1);this._errorMessage(this.nls.loadingProjectFeaturesErr)}))},_createGPResultObj:function(a,b,c){var g={};g.paramName=a;g.value={};g.value.features=b;g.value.geometryType=c;this._showGPResults(g)},
_executeTracePreRequisites:function(a){var b;this._outputResultArr=[];this._outputResultCount=0;this.savedFeatureObjectId=this.overviewFeature=null;f.empty(this.resultLayersInformationContainer);var c=v(".esriCTFeaturesListParentContainer",this._widgetTopNode);for(b=0;b<c.length;b++)f.empty(c[b]);this.enableWebMapPopup();a&&(this._gpServiceOutputParameter?this._GPExecute():this._getFieldAliasFromGPService(!0))},_resetSubmitJobDetails:function(){this.overExtent=null;this.resultsCnt=0;this.outputStrings=
{}},_showGPResults:function(a){this._onGetResultDataComplete(a);this.resultsCnt++;this.resultsCnt===this.config.geoprocessing.outputs.length&&(this.config.autoZoomAfterTrace&&this._zoomToProject(),l.remove(this.exportToCsvMainScreenButton,"jimu-state-disabled"),y.set(this.exportToCsvMainScreenButton,"tabindex",0),this._showLoadingIcon(!1),this._isRunButtonClicked&&(this._isRunButtonClicked=!1,this._enableProjectSaveButton()),this._displayOutputPanel(!0))},_zoomToProject:function(){var a=[];var b=
[];n.forEach(this.config.geoprocessing.inputs,function(c){c&&c.paramName&&this.map.getLayer(c.paramName+this.id)&&(a=a.concat(this.map.getLayer(c.paramName+this.id).graphics))},this);n.forEach(this.config.geoprocessing.outputs,function(c){c&&c.paramName&&this.map.getLayer(c.paramName+this.id)&&(a=a.concat(this.map.getLayer(c.paramName+this.id).graphics))},this);0<a.length&&(n.forEach(a,e.hitch(this,function(c){c.geometry&&b.push(c)})),0<b.length&&this.map.setExtent(za.graphicsExtent(b).expand(1.5)))},
_createEditProjectPopup:function(){var a=this._loadProjectDropdown.getOptions(this._currentSelectedProjectGuid).label;var b=f.create("div",{className:"esriCTSaveProjectPopupContainer"});a=Aa.substitute({loadProjectDropdownlabel:a},this.nls.saveChangesMsg);f.create("div",{innerHTML:W.sanitizeHTML(a),"aria-label":W.stripHTML(a),style:{margin:"2px"},role:"presentation",tabindex:0},b);var c=new la({titleLabel:this.nls.saveProjectPopupTitle,width:500,maxHeight:200,autoHeight:!0,content:b,"class":this.baseClass,
buttons:[{label:this.nls.save,onClick:e.hitch(this,function(){this._saveAsNewProject=!1;this._updateExistingProject=!0;this._showLoadingIcon(!0);this._updateOutagePolygon();c.close()})},{label:this.nls.saveAsLabel,onClick:e.hitch(this,function(){this._showLoadingIcon(!0);this._saveAsNewProject=!0;c.close();this._displayAttributeInspector();this._addGraphicToLocalLayer()})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],onClick:e.hitch(this,function(){this._updateExistingProject=this._saveAsNewProject=
!1;c.close()})}],onClose:e.hitch(this,function(){})})},_onExportToCSVFormOkBtnClick:function(){if(!l.contains(this.exportToCsvFileMainButton,"jimu-state-disabled")){var a=[];this._showLoadingIcon(!0);n.forEach(this._exportToCSVLayerArray,e.hitch(this,function(b){b.checkbox.getValue()&&a.push(b.paramName)}));this._downloadCSV(a)}},_onExportToCSVFormOkBtnKeyPress:function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onExportToCSVFormOkBtnClick()},_onExportToCSVFormBackBtnClick:function(){this._hideExportToCSVForm();
this.resize()},_onExportToCSVFormBackBtnKeyPress:function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onExportToCSVFormBackBtnClick()},_hideExportToCSVForm:function(){l.add(this.exportToCSVFormParentContainer,"esriCTHidden");this._displayMainScreen()},_onExportToLayerButtonClick:function(){l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||(l.remove(this.exportToCsvFileMainButton,"jimu-state-disabled"),y.set(this.exportToCsvFileMainButton,"tabindex",0),this._clearSelectionOnBackBtnClk(),
this._hideEntireMainScreen(),this._hideFlagsList(!1),this._hideBarrierList(!1),this._hideSkipLocationList(!1),l.remove(this.exportToCSVFormParentContainer,"esriCTHidden"),f.empty(this.exportToCSVFormContainer),this._displayExportToCSVParamList())},_onExportToLayerButtonKeyPress:function(a){a.keyCode!==G.ENTER&&a.keyCode!==G.SPACE||this._onExportToLayerButtonClick();Y.focus(this.exportBackNode)},_downloadCSV:function(a){n.forEach(a,e.hitch(this,function(b){var c=[];n.forEach(this.config.geoprocessing.outputs,
e.hitch(this,function(g){b===g.paramName&&g.results&&c.push(this._createCSVContent(g.results,g.paramName).promise)}));R(c).then(e.hitch(this,function(g){if(0!==g.length){var E;n.forEach(g,function(A){E=A.csvdata.split(",");e.hitch(this,this._exportToCSVComplete(A,E[0],A.orgResults))},this)}}),e.hitch(this,function(g){this._errorMessage(g)}))}));this._showLoadingIcon(!1);this._errorMessage(this.nls.exportToCSVSuccess)},_displayExportToCSVParamList:function(){this._createExportToCSVRow(this.nls.exportSelectAllCheckBoxLabel,
!0);n.forEach(this._exportToCSVLayerArray,e.hitch(this,function(a){this._createExportToCSVRow(a)}));Y.focus(this.exportBackNode);this._setFirstLastNodeOnExportToCSVParamList()},_createExportToCSVRow:function(a,b){var c=W.detectUserAgent();var g=c.browser.firefox||c.browser.safari?!1:!0;var E=f.create("div",{"class":"esriCTExportToCsvParentNode"},this.exportToCSVFormContainer);b?(l.add(E,"esriCTExportToCsvSelectAll"),c=a,g||(l.add(E,"esriCTHidden"),l.add(this.exportToCsvFileMainButton,"jimu-state-disabled"),
y.set(this.exportToCsvFileMainButton,"tabindex",-1))):c=a.displayName;E=f.create("div",{"class":"esriCTCheckBoxParentNode"},E);var A=new Q({checked:g,label:c},E);b?this._exportToCSVSelectAllCheckbox=A:a.checkbox=A;this.own(B(A,"change",e.hitch(this,function(ca){b?this._selectAllExportCheckBox(ca,!0):g||(this._selectAllExportCheckBox(!1,!0),ca?A.check(!0):A.uncheck(!0));this._maintainSelectAllState()})))},_selectAllExportCheckBox:function(a,b){n.forEach(this._exportToCSVLayerArray,e.hitch(this,function(c){a?
c.checkbox.check(b):c.checkbox.uncheck(b)}))},_maintainSelectAllState:function(){var a=!0;var b=!1;n.forEach(this._exportToCSVLayerArray,e.hitch(this,function(c){c.checkbox.getValue()||(a=!1);c.checkbox.getValue()&&(b=!0)}));b?(l.remove(this.exportToCsvFileMainButton,"jimu-state-disabled"),y.set(this.exportToCsvFileMainButton,"tabindex",0)):(l.add(this.exportToCsvFileMainButton,"jimu-state-disabled"),y.set(this.exportToCsvFileMainButton,"tabindex",-1));a?this._exportToCSVSelectAllCheckbox.check(!0):
this._exportToCSVSelectAllCheckbox.uncheck(!0);this._setFirstLastNodeOnExportToCSVParamList()},_displayFlagsOnMainScreen:function(){l.remove(this.inputOutputTabParentContainer,"esriCTHidden");l.remove(this.inputLocTab,"esriCTHidden");this._setFirstLastNodeOnMainScreen()},_hideFlagsOnMainScreen:function(){l.add(this.inputLocTab,"esriCTHidden");this._disableProjectSaveButton();this._setFirstLastNodeOnMainScreen()},_displayBarriersOnMainScreen:function(){l.remove(this.inputOutputTabParentContainer,"esriCTHidden");
l.remove(this.barrierLocTab,"esriCTHidden");this._setFirstLastNodeOnMainScreen()},_hideBarriersOnMainScreen:function(){l.add(this.barrierLocTab,"esriCTHidden");this._disableProjectSaveButton();this._setFirstLastNodeOnMainScreen()},_displaySkipLocationsOnMainScreen:function(){l.remove(this.skipLocationTab,"esriCTHidden")},_hideSkipLocationsOnMainScreen:function(a){l.add(this.skipLocationTab,"esriCTHidden");a&&this._setFirstLastNodeOnMainScreen();this._disableProjectSaveButton()},_setWidgetFirstFocusNode:function(a){this._firstNodeEventHandler&&
this._firstNodeEventHandler.remove();this._firstNodeEventHandler=this.own(B(a,"keydown",e.hitch(this,"_firstNodeKeyDown")))[0];W.initFirstFocusNode(this.domNode,a)},_firstNodeKeyDown:function(a){a.keyCode===G.TAB&&a.shiftKey&&(this._backToLastNodeFlag=!0)},_lastNodeFocused:function(){if(this._backToLastNodeFlag){var a=this._currentLastNode;a&&Y.focus(a);this._backToLastNodeFlag=!1}else W.focusFirstFocusNode(this.domNode)},_setFirstLastNodeOnMainScreen:function(){if(this._isWidgetLoadedInProjectMode){var a=
this._loadProjectDropdown.focusNode;this._loadProjectDropdown.focus()}else a=this.btnFlag,Y.focus(a);this._setWidgetFirstFocusNode(a);!this.exportToCsvMainScreenButton||l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||l.contains(this.exportButtonContainer,"esriCTHidden")?!this.projectSaveButton||l.contains(this.projectSaveButton,"jimu-state-disabled")||l.contains(this.saveButtonContainer,"esriCTHidden")?this.skipLocationTab&&!l.contains(this.skipLocationTab,"esriCTHidden")?this._currentLastNode=
this.skipLocationTab:this.barrierLocTab&&!l.contains(this.barrierLocTab,"esriCTHidden")?this._currentLastNode=this.barrierLocTab:this.inputLocTab&&!l.contains(this.inputLocTab,"esriCTHidden")?this._currentLastNode=this.inputLocTab:this._currentLastNode=this.btnClear:this._currentLastNode=this.projectSaveButton:this._currentLastNode=this.exportToCsvMainScreenButton},_setFirstLastNodeOnFlagListScreen:function(){var a=this.inputBackClick;this._setWidgetFirstFocusNode(a);Y.focus(a);!this.exportToCsvMainScreenButton||
l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||l.contains(this.exportButtonContainer,"esriCTHidden")?!this.projectSaveButton||l.contains(this.projectSaveButton,"jimu-state-disabled")||l.contains(this.saveButtonContainer,"esriCTHidden")?(a=v(".esriCTFlagsBarriersSkipLocationsMainDiv",this.flagLocContent))&&0<a.length&&(this._currentLastNode=a[a.length-1]):this._currentLastNode=this.projectSaveButton:this._currentLastNode=this.exportToCsvMainScreenButton},_setFirstLastNodeOnBarrierListScreen:function(){var a=
this.barrierBackClick;this._setWidgetFirstFocusNode(a);Y.focus(a);!this.exportToCsvMainScreenButton||l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||l.contains(this.exportButtonContainer,"esriCTHidden")?!this.projectSaveButton||l.contains(this.projectSaveButton,"jimu-state-disabled")||l.contains(this.saveButtonContainer,"esriCTHidden")?(a=v(".esriCTFlagsBarriersSkipLocationsMainDiv",this.barrierLocContent))&&0<a.length&&(this._currentLastNode=a[a.length-1]):this._currentLastNode=
this.projectSaveButton:this._currentLastNode=this.exportToCsvMainScreenButton},_setFirstLastNodeOnSkipListScreen:function(){var a=this.skipLocationBackClick;this._setWidgetFirstFocusNode(a);Y.focus(a);!this.exportToCsvMainScreenButton||l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||l.contains(this.exportButtonContainer,"esriCTHidden")?!this.projectSaveButton||l.contains(this.projectSaveButton,"jimu-state-disabled")||l.contains(this.saveButtonContainer,"esriCTHidden")?(a=v(".esriCTFlagsBarriersSkipLocationsMainDiv",
this.skipLocationsListContainer))&&0<a.length&&(this._currentLastNode=a[a.length-1]):this._currentLastNode=this.projectSaveButton:this._currentLastNode=this.exportToCsvMainScreenButton},_setFirstLastNodeOnExportToCSVParamList:function(){this._setWidgetFirstFocusNode(this.exportBackNode);if(this.exportToCsvFileMainButton&&!l.contains(this.exportToCsvFileMainButton,"jimu-state-disabled"))this._currentLastNode=this.exportToCsvFileMainButton;else{var a=v(".jimu-checkbox",this.exportToCSVFormContainer);
this._currentLastNode=a[a.length-1]}},_setFirstLastNodeOnOutputScreen:function(){var a=v(".esriCTLayerNameContainer",this.resultsLayerNamesContainer);var b=this._isWidgetLoadedInProjectMode?this._loadProjectDropdown.focusNode:l.contains(this.resultLayersInformationContainer,"esriCTHidden")?0<a.length&&!l.contains(this.resultsLayerNamesContainer,"esriCTHidden")?a[0]:this.supports508Node:this.resultLayersInformationContainer;this._setWidgetFirstFocusNode(b);l.contains(this.resultLayersInformationContainer,
"esriCTHidden")?Y.focus(a[0]):Y.focus(this.resultLayersInformationContainer);!this.exportToCsvMainScreenButton||l.contains(this.exportToCsvMainScreenButton,"jimu-state-disabled")||l.contains(this.exportButtonContainer,"esriCTHidden")?!this.projectSaveButton||l.contains(this.projectSaveButton,"jimu-state-disabled")||l.contains(this.saveButtonContainer,"esriCTHidden")?0<a.length&&!l.contains(this.resultsLayerNamesContainer,"esriCTHidden")?this._currentLastNode=a[a.length-1]:this._currentLastNode=this.supports508Node:
this._currentLastNode=this.projectSaveButton:this._currentLastNode=this.exportToCsvMainScreenButton},_setFirstLastNodeOnOutputResultScreen:function(a){var b=v(".esriCTResultContainerBack",a)[0];this._setWidgetFirstFocusNode(b);Y.focus(b);(a=v(".resultItemSubDiv",a))&&0<a.length&&(this._currentLastNode=a[a.length-1])},_displayFlagsList:function(){this._hideMainScreen();l.remove(this.inputLocDiv,"esriCTHidden");this._setFirstLastNodeOnFlagListScreen()},_hideFlagsList:function(a){l.add(this.inputLocDiv,
"esriCTHidden");a&&this._displayMainScreen()},_displayBarrierList:function(){this._hideMainScreen();l.remove(this.barrierLocDiv,"esriCTHidden");this._setFirstLastNodeOnBarrierListScreen()},_hideBarrierList:function(a){l.add(this.barrierLocDiv,"esriCTHidden");a&&this._displayMainScreen()},_displaySkipLocationList:function(){this._hideMainScreen();l.remove(this.skipLocDiv,"esriCTHidden");this._setFirstLastNodeOnSkipListScreen()},_hideSkipLocationList:function(a){l.add(this.skipLocDiv,"esriCTHidden");
a&&this._displayMainScreen()},_displayEntireMainScreen:function(){this._displayMainScreen();l.remove(this.saveAndExportParentContainer,"esriCTHidden");this._setProjectDropdownNameWidth()},_hideEntireMainScreen:function(){this._hideMainScreen();l.add(this.saveAndExportParentContainer,"esriCTHidden")},_displayMainScreen:function(){this._isWidgetLoadedInProjectMode&&l.remove(this.loadProjectParentContainer,"esriCTHidden");l.remove(this.inputOutputTabParentContainer,"esriCTHidden");l.remove(this.saveAndExportParentContainer,
"esriCTHidden");this._tabContainer&&(this._tabContainer.viewStack.getSelectedLabel()===this.nls.inputTabTitle?this._setFirstLastNodeOnMainScreen():this._setFirstLastNodeOnOutputScreen())},_hideMainScreen:function(){l.add(this.loadProjectParentContainer,"esriCTHidden");l.add(this.inputOutputTabParentContainer,"esriCTHidden")},_displayOutputPanel:function(){this._reloadCurrentProjectOnClear||this._tabContainer.selectTab(this.nls.outputTabTitle);this._reloadCurrentProjectOnClear=!1;l.remove(this.outputTab,
"esriCTHidden");l.remove(this.resultsLayerNamesContainer,"esriCTHidden");if("TabTheme"===this.appConfig.theme.name){var a={};a.node=this.outputTab;a.resetHeightOutputPanel=!0;this._resetHeight(a)}this._setFirstLastNodeOnOutputScreen()},_hideOutputPanel:function(){this._tabContainer&&this._tabContainer.selectTab(this.nls.inputTabTitle);l.add(this.outputTab,"esriCTHidden");l.add(this.resultsLayerNamesContainer,"esriCTHidden")},_displayOutputFeatureList:function(a){this._hideMainScreen();l.remove(this.layerFeaturesContainer,
"esriCTHidden");l.remove(a,"esriCTHidden");this._setFirstLastNodeOnOutputResultScreen(a)},_hideOutputFeatureList:function(a){l.add(a,"esriCTHidden");l.add(this.layerFeaturesContainer,"esriCTHidden");this._displayMainScreen()},_disableProjectSaveButton:function(){l.contains(this.inputLocTab,"esriCTHidden")&&l.contains(this.barrierLocTab,"esriCTHidden")&&l.contains(this.skipLocationTab,"esriCTHidden")&&(l.add(this.projectSaveButton,"jimu-state-disabled"),y.set(this.projectSaveButton,"tabindex",-1))},
_enableProjectSaveButton:function(){l.remove(this.projectSaveButton,"jimu-state-disabled");y.set(this.projectSaveButton,"tabindex",0)},_hideAllOutputResultContainer:function(){var a=v(".esriCTResultContainer",this.layerFeaturesContainer);n.forEach(a,e.hitch(this,function(b){l.add(b,"esriCTHidden")}))},onNormalize:function(){setTimeout(e.hitch(this,function(){this._addMobileStyles()}),10)},onMinimize:function(){setTimeout(e.hitch(this,function(){this._removeMobileStyles()}),10)},onMaximize:function(){setTimeout(e.hitch(this,
function(){this._removeMobileStyles()}),10)},_addMobileStyles:function(){window.appInfo.isRunInMobile&&"normal"===this.windowState&&(l.add(this.inputTabPanel,"esriCTInputParentMainContainerMobileMode"),l.add(this.flagBarrierSkipLocationMainPageContainer,"esriCTFlagBarrierSkipLocationMainPageMobileMode"),this._resetInputOutputTabParentContainer())},_removeMobileStyles:function(){window.appInfo.isRunInMobile||l.remove(this.flagBarrierSkipLocationMainPageContainer,"esriCTFlagBarrierSkipLocationMainPageMobileMode");
l.remove(this.inputTabPanel,"esriCTInputParentMainContainerMobileMode");window.appInfo.isRunInMobile&&this._resetInputOutputTabParentContainer()},_getLayerNameObject:function(a){return(a=v("div[layernamedetails\x3d'"+(a.paramName+this.id)+"']",this.resultsLayerNamesContainer))&&0<a.length?a[0]:null},_getResultContainerLabelObject:function(a){return(a=v("div[resultcontainerlabel\x3d'"+(a.paramName+this.id)+"']",this.layerFeaturesContainer))&&0<a.length?a[0]:null},_getResultContainerDataObject:function(a){return(a=
v("div[resultcontainerdata\x3d'"+(a+this.id)+"']",this.layerFeaturesContainer))&&0<a.length?a[0]:null},_getResultContainerObject:function(a){return(a=v("div[resultcontainer\x3d'"+(a+this.id)+"']",this.layerFeaturesContainer))&&0<a.length?a[0]:null},_addGraphicToLocalLayer:function(){var a,b,c,g;this._clearAttributeInspectorData();this._removeClonedProjectPolygonLayer();this._clearProjectPolygonLayerFromMap();var E=this.map.getLayer(this.config.projectSettings.polygonLayerId);this._clonedProjectPolygonLayerObject=
this._cloneProjectPolygonLayer(E);var A=this.own(B(this._clonedProjectPolygonLayerObject,"load",e.hitch(this,function(){A&&A[0]&&A[0].remove();a=this._layerInfosObj.getLayerInfoById(this._clonedProjectPolygonLayerObject.originalLayerId);a.featureLayer=this._clonedProjectPolygonLayerObject;this._createAttributeInspector();b=a.layerObject.hasOwnProperty("templates")&&0<a.layerObject.templates.length&&a.layerObject.templates[0].hasOwnProperty("prototype")&&a.layerObject.templates[0].prototype.hasOwnProperty("attributes")?
a.layerObject.templates[0].prototype.attributes:a.layerObject.hasOwnProperty("types")&&0<a.layerObject.types.length&&a.layerObject.types[0].hasOwnProperty("templates")&&0<a.layerObject.types[0].templates.length&&a.layerObject.types[0].templates[0].hasOwnProperty("prototype")&&a.layerObject.types[0].templates[0].prototype.hasOwnProperty("attributes")?a.layerObject.types[0].templates[0].prototype.attributes:null;null===this._originalTemplateAttributes||""===this._originalTemplateAttributes||void 0===
this._originalTemplateAttributes?(this._originalTemplateAttributes=e.clone(b),this.publishData({networkTraceOriginalTemplateAttributes:this._originalTemplateAttributes})):b=e.clone(this._originalTemplateAttributes);c=new k(null,null,b,null);c.preEditAttrs=JSON.parse(JSON.stringify(c.attributes));this._clonedProjectPolygonLayerObject.applyEdits([c],null,null,e.hitch(this,function(ca){g=new K;g.objectIds=[ca[0].objectId];this._clonedProjectPolygonLayerObject.selectFeatures(g,C.SELECTION_NEW,e.hitch(this,
function(){this._currentFeatureDetails=c;this._add508SupportToATI();this._showLoadingIcon(!1)}),e.hitch(this,function(){this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.selectingFeatureInClonedLayerError)}))}),e.hitch(this,function(){this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.addingFeatureInClonedLayerError)}))}),e.hitch(this,function(){this._saveAsNewProject=!1;this._showLoadingIcon(!1);this._errorMessage(this.nls.loadingClonedLayerErrorMessage)})))},
_removeClonedProjectPolygonLayer:function(){this._clonedProjectPolygonLayerObject&&null!==this._clonedProjectPolygonLayerObject&&(this._clonedProjectPolygonLayerObject.clearSelection(),this._clonedProjectPolygonLayerObject.clear(),this.map.removeLayer(this._clonedProjectPolygonLayerObject),this._clonedProjectPolygonLayerObject=null)},_clearProjectPolygonLayerFromMap:function(){var a=this.map.getLayer(this.config.projectSettings.polygonLayerId);a&&(a.clearSelection(),a.refresh())},_cloneProjectPolygonLayer:function(a){var b=
W.getFeatureLayerDefinition(a);this._mandateNameField(b);this._filterFields(b);b.id="clonedProjectLayer"+this.id;b.name=a.name+this.id;b={layerDefinition:b};var c=a.fields.map(function(g){return g.name});b=new C(b,{outFields:c});b.visible=!0;b.renderer=a.renderer;b.originalLayerId=a.id;b._wabProperties={isTemporaryLayer:!0};this.map.addLayer(b);return b},_processLayerFields:function(a){n.forEach(a,function(b){void 0!==b.domain&&null!==b.domain&&void 0!==b.domain.type&&null!==b.domain.type&&"range"===
b.domain.type&&!1===b.domain.hasOwnProperty("range")&&(b.domain.range=[b.domain.minValue,b.domain.maxValue])});return a},_createAttributeInspector:function(){var a=this._createFieldInfos();f.empty(this.attributeInspectorContainer);this._attributeInspector=new (M([d],{constructor:function(){this._aiConnects=[];this._selection=[];this._toolTips=[]}}))({layerInfos:[{featureLayer:this._clonedProjectPolygonLayerObject,fieldInfos:a}]},f.create("div",{"class":"esriCTAttributeInspectorWidgetContainer"}));
this.own(B(this._attributeInspector,"attribute-change",e.hitch(this,function(b){this._currentFeatureDetails&&(this._currentFeatureDetails.attributes[b.fieldName]=b.fieldValue)})));this._attributeInspector.startup();this.attributeInspectorContainer.appendChild(this._attributeInspector.domNode)},_displayAttributeInspector:function(){this._hideEntireMainScreen();this._hideFlagsList(!1);this._hideBarrierList(!1);this._hideSkipLocationList(!1);l.remove(this.editAttributeContainer,"esriCTHidden")},_getProjectNameTextBox:function(){var a,
b;this._attributeInspector&&this._attributeInspector.domNode&&(a=v("td[data-fieldname\x3d'"+this._polygonLayerFields.name+"']",this._attributeInspector.domNode))&&a[0]&&a[0].parentNode&&(a=a[0].parentNode,a.childNodes&&a.childNodes[1]&&a.childNodes[1].childNodes&&a.childNodes[1].childNodes[0]&&(a=a.childNodes[1].childNodes[0],(a=y.get(a,"widgetid"))&&(b=dijit.byId(a))));return b},_clearSelectionOnBackBtnClk:function(){var a;this.animatedLayer.clear();(a=v(".esriCTHighlightedGraphic",this._widgetTopNode))&&
0<a.length&&l.remove(a[0],"esriCTHighlightedGraphic")},_getZoomToText:function(a,b){var c=e.clone(a.displayText);b=e.clone(b.attributes);a={};for(var g in b)b.hasOwnProperty(g)&&(a[g.toLowerCase()]=b[g]);g=c.match(/({.*?})/ig);n.forEach(g,e.hitch(this,function(E){c=c.replace(E,E.toLowerCase())}));c=e.replace(c,a);return c=c.replace(/undefined/gi,null)},onReceiveData:function(a,b,c,g){c.hasOwnProperty("networkTraceOriginalTemplateAttributes")&&(this._originalTemplateAttributes=c.networkTraceOriginalTemplateAttributes)},
_loadWidgetInProjectMode:function(){this._showLoadingIcon(!0);this.config.projectSettings&&this.config.projectSettings.polygonLayerId&&this.config.projectSettings.pointLayerId&&this.config.projectSettings.outputParamName?this._layerInfosObj.getLayerInfoById(this.config.projectSettings.polygonLayerId)&&this._layerInfosObj.getLayerInfoById(this.config.projectSettings.pointLayerId)?(l.remove(this.loadProjectParentContainer,"esriCTHidden"),this._isWidgetLoadedInProjectMode=!0,this._setFirstLastNodeOnMainScreen(),
this._displaySaveAndExportButton(),this._resetInputOutputTabParentContainer(),this._loadProject()):(this._displaySaveAndExportButton(),this._resetInputOutputTabParentContainer(),this._fetchUrlParameters(),this._errorMessage(this.nls.projectLayersNotFound)):(this._displaySaveAndExportButton(),this._resetInputOutputTabParentContainer(),this._fetchUrlParameters());this._showLoadingIcon(!1)},_filterFields:function(a){var b=this._createFieldInfos(),c=[];n.forEach(b,e.hitch(this,function(g){n.forEach(a.fields,
e.hitch(this,function(E){E.hasOwnProperty("name")&&g.hasOwnProperty("fieldName")&&E.name===g.fieldName&&c.push(E)}))}));a.fields=c},_mandateNameField:function(a){n.forEach(a.fields,e.hitch(this,function(b,c){b.name===this._polygonLayerFields.name&&(a.fields[c].nullable=!1)}));return a},onDeActive:function(){this._disableFlagTool();this._disableBarrierTool();this._disconnectAllAttributeInspectorEvents();this._loadProjectDropdown.set("disabled",!0)},_disableFlagTool:function(){this.enableWebMapPopup();
this.flagBtnClicked=!1;l.remove(this.btnFlag,"flagButtonselected");l.add(this.btnFlag,"flagbutton");y.set(this.btnFlag,"aria-pressed","false");null!==this.toolbar&&(this.toolbar.deactivate(),this.toolbar=null)},_disableBarrierTool:function(){this.enableWebMapPopup();this.barrierBtnClicked=!1;l.remove(this.btnBarrier,"barrierButtonselected");l.add(this.btnBarrier,"barrierButton");y.set(this.btnBarrier,"aria-pressed","false");null!==this.toolbar&&(this.toolbar.deactivate(),this.toolbar=null)},_disconnectAllAttributeInspectorEvents:function(){this._attributeInspector&&
this._attributeInspector._aiConnects&&n.forEach(this._attributeInspector._aiConnects,e.hitch(this,function(a){a.remove()}))},_addDefaultOptionInDropdown:function(){this._loadProjectDropdown.addOption({value:"newproject",label:this.nls.newProjectOptionText})},onActive:function(){this._showLoadingIcon(!0);var a=this.map.getLayer(this.config.projectSettings.polygonLayerId);a?this._isWidgetStartup?(this._isWidgetStartup=!1,a=a.getDefinitionExpression(),this._lastDefinitionExpression!==a?this._refreshProjectNames():
(this._loadProjectDropdown.set("disabled",!1),this._showLoadingIcon(!1))):this._refreshProjectNames():(this._loadProjectDropdown.set("disabled",!1),this._showLoadingIcon(!1))},_pauseAllClickEvents:function(){n.forEach(this._clickEventHandlerArr,e.hitch(this,function(a){0<a.length&&a[0].pause()}))},_resumeAllClickEvents:function(){n.forEach(this._clickEventHandlerArr,e.hitch(this,function(a){0<a.length&&a[0].resume()}))},_fetchLastDefinitionExpression:function(){var a=this.map.getLayer(this.config.projectSettings.polygonLayerId);
a&&(this._lastDefinitionExpression=a.getDefinitionExpression())},_refreshProjectNames:function(){this._pauseAllClickEvents();var a=this._loadProjectDropdown.getValue();this._loadProjectDropdown.closeDropDown();this._loadProjectDropdown.set("disabled",!0);this._loadProjectDropdownEvtHandle.pause();this._loadProjectDropdown.removeOption(this._loadProjectDropdown.getOptions());this._addDefaultOptionInDropdown();this._loadProject(!0,a)},unSkipFromTrace:function(a,b){(a=v("[layerid\x3d"+b.id+"][oid\x3d"+
a[0].attributes[b.oid]+"]",this.domNode))&&0<a.length&&(a=a[0]);l.contains(a,"alreadySkippedLocation")?(a.click(),this._errorMessage(this.nls.removedFromSkipLocations)):this._errorMessage(this.nls.alreadyRemovedFromSkipLocations)},skipFromTrace:function(a,b){(a=v("[layerid\x3d"+b.id+"][oid\x3d"+a[0].attributes[b.oid]+"]",this.domNode))&&0<a.length&&(a=a[0]);l.contains(a,"alreadySkippedLocation")?this._errorMessage(this.nls.locationAlreadySkippedMessage):(a.click(),this._errorMessage(this.nls.locationSkipped))},
_setProjectDropdownNameWidth:function(){if(""!==this.loadProjectDropdownContainer&&null!==this.loadProjectDropdownContainer&&void 0!==this.loadProjectDropdownContainer){var a=N.getComputedStyle(this.loadProjectDropdownContainer);if(""!==a&&null!==a&&void 0!==a){a=parseFloat(a.width);a-=56;var b=v(".dijitSelectLabel",this.loadProjectDropdownContainer);""!==b&&null!==b&&void 0!==b&&0<b.length&&(N.set(b[0],"width",a+"px"),this._setProjectDropdownTooltip(b[0]))}}},_setProjectDropdownTooltip:function(a){var b=
y.get(a,"innerHTML");y.set(a,"title",b)},_setInputTabSummaryText:function(){""!==this.inputTabSummaryTextContainer&&null!==this.inputTabSummaryTextContainer&&void 0!==this.inputTabSummaryTextContainer&&this.config.hasOwnProperty("inputSummaryText")&&""!==this.config.inputSummaryText&&null!==this.config.inputSummaryText&&void 0!==this.config.inputSummaryText&&(l.add(this.inputTabSummaryTextContainer,"esriCTInputTabSummaryTextContainer"),l.remove(this.inputTabSummaryTextContainer,"esriCTHidden"),y.set(this.inputTabSummaryTextContainer,
"innerHTML",this.editorXssFilter.sanitize(this.config.inputSummaryText)),y.set(this.inputTabSummaryTextContainer,"aria-label",W.stripHTML(this.config.inputSummaryText)))}})});