// 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:{"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(T,H,M,L,p,g,e,c,m,u,n,v,w,C,l,d,h,x,B,D,S,K,Q,ia,oa,ja,pa,F,Y,V,a,f,z,I,G,W,R,X,U,ta,ma){var ka=T([Q,x,B],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:!0,templateString:ma,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(q,r){H.mixin(this,l.widgets.attributeInspector);q=q||{};q.featureLayer||q.layerInfos||console.error("esri.AttributeInspector: please provide correct parameter in the constructor");this._datePackage=this._getDatePackage(q);this._layerInfos=q.layerInfos||[{featureLayer:q.featureLayer,options:q.options||[]}];this._layerInfos=M.filter(this._layerInfos,function(E){return!E.disableAttributeUpdate});this._hideNavButtons=q.hideNavButtons||!1},postCreate:function(){if(M.every(this._layerInfos,
function(r){return r.featureLayer.loaded}))this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature();else{var q=this._layerInfos.length;M.forEach(this._layerInfos,function(r){r=r.featureLayer;if(r.loaded)q--;else var E=L.connect(r,"onLoad",this,function(N){L.disconnect(E);E=null;q--;q||(this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature())})},this)}},destroy:function(){this._destroyAttributeTable();M.forEach(this._aiConnects,L.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(q,r){r&&(this._createOnlyFirstTime=!0);
this._updateSelection([q],r);this._updateUI()},onLayerSelectionChange:function(q,r,E){this._createOnlyFirstTime=!1;this._featureIdx=E===C.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(q,r,E,N){},onLayerError:function(q,r,E,N){},onLayerEditsError:function(q,
r,E,N){},onLayerEditsComplete:function(q,r,E,N){N=N||[];if(N.length){var ba=this._selection,na=q.featureLayer.objectIdField;M.forEach(N,H.hitch(this,function(la){M.some(ba,H.hitch(this,function(ea,fa){if(ea.attributes[na]!==la.objectId)return!1;this._selection.splice(fa,1);return!0}))}))}r=r||[];r.length&&(this._selection=oa.findFeatures(r,q.featureLayer),this._featureIdx=0);N=this._numFeatures=(this._selection=oa.sortFeaturesById(this._layerInfos,this._selection))?this._selection.length:0;if(r.length){if(r=
N?this._selection[this._featureIdx]:null)N=r.getLayer().getEditCapabilities(),N.canCreate&&!N.canUpdate||this._showFeature(r);this._updateUI()}E=E||[];if(E.length){var da=this._rollbackInfo;M.forEach(E,function(la){var ea=oa.findFeatures(E,q.featureLayer)[0];if(!la.success&&ea.attributes[q.featureLayer.objectIdField]===la.objectId&&da){var fa=da.field;la=da.graphic.attributes[fa.name];var sa=M.filter(this._currentLInfo.fieldInfos,function(Ca){return Ca.fieldName===fa.name},this)[0].dijit;ea.attributes[fa.name]=
la;"esriFieldTypeDate"===fa.type&&(la=new Date(la));this._setValue(sa,la)}},this)}this._rollbackInfo=null},onFieldValueChange:function(q,r){var E=q.field,N=q.dijit,ba=this._currentFeature,na=this._currentLInfo,da=E.name;q=this._isFieldRequired(E,q);if(""===N.displayedValue||"dijit.form.ValidationTextBox"!==N.declaredClass||N.isValid())if(""!==N.displayedValue&&N.displayedValue!==r&&N.isValid&&!N.isValid())this._setValue(N,ba.attributes[E.name]);else{var la=!("esriFieldTypeInteger"!==E.type&&"esriFieldTypeSmallInteger"!==
E.type&&"esriFieldTypeSingle"!==E.type&&"esriFieldTypeDouble"!==E.type);if(q&&(null===r||""===r||"undefined"===typeof r||la&&isNaN(r))){da=ba.attributes[E.name];if("esriFieldTypeDate"===E.type&&(da=new Date(da),N instanceof Array)){this._setValue(N[0],da);this._setValue(N[1],da);return}this._setValue(N,da)}else{if(la){if(isNaN(r)||""===r)r=null;la&&null!==r&&(r=Number(r))}"esriFieldTypeDate"===E.type&&(N instanceof Array?(r=N[0].getValue(),N=N[1].getValue(),r=r&&N?new Date(r.getFullYear(),r.getMonth(),
r.getDate(),N.getHours(),N.getMinutes(),N.getSeconds(),N.getMilliseconds()):r||N||null):(r=N.getValue(),E.domain&&(r=Number(r))),r=r&&r.getTime?r.getTime():r&&r.toGregorian?r.toGregorian().getTime():r);if(this._currentFeature.attributes[E.name]!==r){if(da===na.typeIdField){var ea=this._findFirst(na.types,"id",r);M.forEach(na.fieldInfos,function(fa){(E=fa.field)&&E.name!==na.typeIdField&&(fa=fa.dijit,this._setFieldDomain(fa,ea,E)&&fa&&(this._setValue(fa,ba.attributes[E.name]+""),!1===fa.isValid()&&
this._setValue(fa,null)))},this)}this.onAttributeChange(ba,da,r)}}}else this._setValue(N,ba.attributes[E.name])},onDeleteBtn:function(q){this._deleteFeature()},onNextFeature:function(q){this._onNextFeature(1)},onPreviousFeature:function(q){this._onNextFeature(-1)},onFirstFeature:function(q){this._onNextFeature(-1*this._featureIdx)},onLastFeature:function(q){this._onNextFeature(this._numFeatures-1-this._featureIdx)},_initLayerInfos:function(){var q=this._layerInfos;this._editorTrackingInfos={};M.forEach(q,
this._initLayerInfo,this)},_initLayerInfo:function(q){var r=q.featureLayer,E;this._userIds={};var N=r.id;r.credential&&(this._userIds[N]=r.credential.userId);q.userId&&(this._userIds[N]=q.userId);this._connect(r,"onSelectionComplete",H.hitch(this,"onLayerSelectionChange",q));this._connect(r,"onSelectionClear",H.hitch(this,"onLayerSelectionClear",q));this._connect(r,"onEditsComplete",H.hitch(this,"onLayerEditsComplete",q));this._connect(r,"error",H.hitch(this,"onLayerError",q));this._connect(r,"onUpdateEnd",
H.hitch(this,"onLayerUpdateEnd",q));q.showAttachments=r.hasAttachments?n.isDefined(q.showAttachments)?q.showAttachments:!0:!1;q.hideFields=q.hideFields||[];q.htmlFields=q.htmlFields||[];q.isEditable=r.isEditable()?n.isDefined(q.isEditable)?q.isEditable:!0:!1;q.typeIdField=r.typeIdField;q.layerId=r.id;q.types=r.types;r.globalIdField&&((E=this._findFirst(q.fieldInfos,"fieldName",r.globalIdField))||q.showGlobalID||q.hideFields.push(r.globalIdField));(N=this._findFirst(q.fieldInfos,"fieldName",r.objectIdField))||
q.showObjectID||q.hideFields.push(r.objectIdField);var ba=this._getFields(q.featureLayer);if(ba){var na=q.fieldInfos||[];na=M.map(na,function(da){return H.mixin({},da)});na.length?q.fieldInfos=M.filter(M.map(na,H.hitch(this,function(da){var la=da.stringFieldOption||(this._isInFields(da.fieldName,q.htmlFields)?ka.STRING_FIELD_OPTION_RICHTEXT:ka.STRING_FIELD_OPTION_TEXTBOX);return H.mixin(da,{field:this._findFirst(ba,"name",da.fieldName),stringFieldOption:la})})),"return item.field;"):(ba=M.filter(ba,
H.hitch(this,function(da){return!this._isInFields(da.name,q.hideFields)})),q.fieldInfos=M.map(ba,H.hitch(this,function(da){var la=this._isInFields(da.name,q.htmlFields)?ka.STRING_FIELD_OPTION_RICHTEXT:ka.STRING_FIELD_OPTION_TEXTBOX;return{fieldName:da.name,field:da,stringFieldOption:la}})));q.showGlobalID&&!E&&na.push(this._findFirst(ba,"name",r.globalIdField));q.showObjectID&&!N&&na.push(this._findFirst(ba,"name",r.objectIdField));E=[];r.editFieldsInfo&&(r.editFieldsInfo.creatorField&&E.push(r.editFieldsInfo.creatorField),
r.editFieldsInfo.creationDateField&&E.push(r.editFieldsInfo.creationDateField),r.editFieldsInfo.editorField&&E.push(r.editFieldsInfo.editorField),r.editFieldsInfo.editDateField&&E.push(r.editFieldsInfo.editDateField));this._editorTrackingInfos[r.id]=E}},_createAttachmentEditor:function(){this._attachmentEditor=null;var q=M.filter(this._layerInfos,function(r){return r.showAttachments});q&&q.length&&(this._attachmentEditor=new ia({"class":this.css.attachmentEditor},this.attachmentEditor),this._attachmentEditor.startup())},
_setCurrentLInfo:function(q){var r=this._currentLInfo?this._currentLInfo.featureLayer:null,E=q.featureLayer;if(r&&r.id===E.id&&!r.ownershipBasedAccessControlForFeatures&&(r=E.getEditCapabilities(),!r.canCreate||r.canUpdate))return;this._currentLInfo=q;this._createTable()},_updateSelection:function(q,r){this._selection=q||[];M.forEach(this._layerInfos,this._getSelection,this);this._selection=oa.sortFeaturesById(this._layerInfos,this._selection);this._numFeatures=this._selection.length;this._showFeature(this._numFeatures?
this._selection[this._featureIdx]:null,r)},_getSelection:function(q){q=q.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(q)},_updateUI:function(){var q=this._numFeatures,r=this._currentLInfo;this.layerName.innerHTML=r&&0!==q?r.featureLayer?r.featureLayer.name:"":this.NLS_noFeaturesSelected;c.set(this.attributeTable,"display",q?"":"none");c.set(this.editButtons,"display",q?"":"none");c.set(this.navButtons,"display",!this._hideNavButtons&&1<q?"":"none");this.navMessage.innerHTML=
n.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);this._attachmentEditor&&c.set(this._attachmentEditor.domNode,"display",r&&r.showAttachments&&q?"":"none");c.set(this.deleteBtn.domNode,"display",r&&!1===r.showDeleteButton||!this._canDelete?"none":"");this.domNode.parentNode&&0<this.domNode.parentNode.scrollTop&&(this.domNode.parentNode.scrollTop=0)},_onNextFeature:function(q){this._featureIdx+=q;0>this._featureIdx?this._featureIdx=this._numFeatures-
1:this._featureIdx>=this._numFeatures&&(this._featureIdx=0);q=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(q);this._updateUI();this.onNext(q)},_deleteFeature:function(){this.onDelete(this._currentFeature)},_showFeature:function(q,r){if(q){this._currentFeature=q;r=r?r:q.getLayer();var E=r.getEditCapabilities({feature:q,userId:this._userIds[r.id]});this._canUpdate=E.canUpdate;this._canDelete=E.canDelete;if(E=this._getLInfoFromFeatureLayer(r)){this._setCurrentLInfo(E);
var N=q.attributes,ba=this._findFirst(E.types,"id",N[E.typeIdField]),na=null;M.forEach(E.fieldInfos,function(da){na=da.field;var la=[];da.dijit&&1<da.dijit.length?M.forEach(da.dijit,function(ea){la.push(ea)}):la.push(da.dijit);M.forEach(la,H.hitch(this,function(ea){if(ea){var fa=this._setFieldDomain(ea,ba,na),sa=N[na.name];sa=sa&&fa&&fa.codedValues&&fa.codedValues.length?fa.codedValues[sa]?fa.codedValues[sa].name:sa:sa;n.isDefined(sa)||(sa="");"dijit.form.DateTextBox"===ea.declaredClass||"dijit.form.TimeTextBox"===
ea.declaredClass?sa=""===sa?null:new Date(sa):"dijit.form.FilteringSelect"===ea.declaredClass&&(ea._lastValueReported=null,sa=N[na.name]+"");try{this._setValue(ea,sa),"dijit.form.FilteringSelect"===ea.declaredClass&&!1===ea.isValid()&&this._setValue(ea,null)}catch(Ca){ea.set("displayedValue",this.NLS_errorInvalid,!1)}}}))},this);this._attachmentEditor&&E.showAttachments&&this._attachmentEditor.showAttachments(this._currentFeature,r);(q=r.getEditSummary(q))?(this.editorTrackingInfoDiv.innerHTML=q,
v.show(this.editorTrackingInfoDiv)):v.hide(this.editorTrackingInfoDiv)}}},_setFieldDomain:function(q,r,E){if(!q)return null;var N=E.domain;r&&r.domains&&r.domains[E.name]&&!1===r.domains[E.name]instanceof w&&(N=r.domains[E.name]);if(!N)return null;N.codedValues&&0<N.codedValues.length?(q.set("store",this._toStore(M.map(N.codedValues,function(ba){return{id:ba.code+"",name:ba.name}}))),this._setValue(q,N.codedValues[0].code+"")):(q.constraints={min:n.isDefined(N.minValue)?N.minValue:Number.MIN_VALUE,
max:n.isDefined(N.maxValue)?N.maxValue:Number.MAX_VALUE},this._setValue(q,q.constraints.min));return N},_setValue:function(q,r){q.set&&(q._onChangeActive=!1,q.set("value",r,!0),q._onChangeActive=!0)},_getFields:function(q){var r=q._getOutFields();if(!r)return null;q=q.fields;return"*"==r?q:M.filter(M.map(r,H.hitch(this,"_findFirst",q,"name")),n.isDefined)},_isInFields:function(q,r){return q&&(r||r.length)?M.some(r,function(E){return E.toLowerCase()===q.toLowerCase()}):!1},_isFieldNullable:function(q,
r){return!(!1===q.nullable||r.field&&!1===r.field.nullable)},_isFieldRequired:function(q,r){return!1!==q.editable&&!1!==r.isEditable&&!this._isFieldNullable(q,r)},_findFirst:function(q,r,E){return(q=M.filter(q,function(N){return N.hasOwnProperty(r)&&N[r]===E}))&&q.length?q[0]:null},_getLInfoFromFeatureLayer:function(q){return this._findFirst(this._layerInfos,"layerId",q?q.id:null)},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=m.create("table",
{cellspacing:"0",cellpadding:"0"},this.attributeTable);var q=m.create("tbody",null,this._attributes),r=this._currentLInfo,E=this._findFirst(r.types,"id",this._currentFeature.attributes[r.typeIdField]);M.forEach(r.fieldInfos,H.hitch(this,"_createField",E,q),this);this._createOnlyFirstTime=!1},_createField:function(q,r,E){var N=this._currentLInfo,ba=E.field;if(!this._isInFields(ba.name,N.hideFields)&&!this._isInFields(ba.name,this._editorTrackingInfos[N.featureLayer.id])){var na=!1,da;r=m.create("tr",
null,r);var la=m.create("td",{innerHTML:E.label||ba.alias||ba.name,"class":this.css.label,"data-fieldname":ba.name},r);this._isFieldRequired(ba,E)&&m.create("span",{"class":this.css.red,innerHTML:" *"},la);r=m.create("td",null,r);if(E.customField){m.place(E.customField.domNode||E.customField,m.create("div",null,r),"first");var ea=E.customField}else if(!1===N.isEditable||!1===ba.editable||!1===E.isEditable||"esriFieldTypeOID"===ba.type||"esriFieldTypeGlobalID"===ba.type||!this._canUpdate&&!this._createOnlyFirstTime)na=
!0;N=N.typeIdField&&ba.name.toLowerCase()==N.typeIdField.toLowerCase();la=!!this._getDomainForField(ba,q);!ea&&N?ea=this._createTypeField(ba,E,r):!ea&&la&&(ea=this._createDomainField(ba,E,q,r));if(!ea)switch(ba.type){case "esriFieldTypeString":ea=this._createStringField(ba,E,r);break;case "esriFieldTypeDate":ea=this._createDateField(ba,E,r);E.format&&E.format.time&&(da=this._createTimeField(ba,E,r));break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":ea=this._createIntField(ba,E,r);
break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":ea=this._createFltField(ba,E,r);break;default:ea=this._createStringField(ba,E,r)}E.tooltip&&E.tooltip.length&&this._toolTips.push(new W({connectId:[ea.id],label:E.tooltip}));ea.onChange=H.hitch(this,"onFieldValueChange",E);ea.set("disabled",na);da?(E.dijit=[ea,da],da.onChange=H.hitch(this,"onFieldValueChange",E),da.set("disabled",na)):E.dijit=ea}},_createTypeField:function(q,r,E){E=m.create("div",null,E);var N=q.domain;return N&&"range"===
N.type&&N.minValue===N.maxValue?new I({"class":this.css.field,trim:!0,maxLength:q.length,name:q.alias||q.name,required:this._isFieldRequired(q,r)},E):new V({"class":this.css.field,name:q.alias||q.name,required:this._isFieldRequired(q,r),store:this._toStore(M.map(this._currentLInfo.types,function(ba){return{id:ba.id,name:ba.name}})),searchAttr:"name"},E)},_getDomainForField:function(q,r){var E=q.domain;(q=q.name)&&r&&r.domains&&r.domains[q]&&!1===r.domains[q]instanceof w&&(E=r.domains[q]);return E||
null},_createDomainField:function(q,r,E,N){E=this._getDomainForField(q,E);N=m.create("div",null,N);return E.codedValues?new V({"class":this.css.field,name:q.alias||q.name,searchAttr:"name",required:this._isFieldRequired(q,r)},N):new a({"class":this.css.field},N)},_createStringField:function(q,r,E){E=m.create("div",null,E);var N={trim:!0,maxLength:q.length,required:this._isFieldRequired(q,r)};if(r.stringFieldOption===ka.STRING_FIELD_OPTION_TEXTAREA)return N["class"]=this.css.field+" "+this.css.textArea,
new z(N,E);if(r.stringFieldOption===ka.STRING_FIELD_OPTION_RICHTEXT)return N["class"]=this.css.field+" "+this.css.richText,N.height="100%",N.width="100%",N.plugins=r.richTextPlugins||this._defaultRichTextPlugins,E=new D(N,E),E.startup(),E;var ba=this;N.validator=function(na,da){this._maskValidSubsetError=!1;this._hasBeenBlurred=!0;return ba._isFieldNullable(q,r)||!(""===na||null===na)};return new I(N,E)},_createTimeField:function(q,r,E){E=m.create("div",null,E);q={"class":this.css.field,trim:!0,required:this._isFieldRequired(q,
r),constraints:{formatLength:"medium"}};this._datePackage&&(q.datePackage=this._datePackage);return new G(q,E)},_createDateField:function(q,r,E){E=m.create("div",null,E);q={"class":this.css.field,trim:!0,required:this._isFieldRequired(q,r)};this._datePackage&&(q.datePackage=this._datePackage);return new pa(q,E)},_createIntField:function(q,r,E){E=m.create("div",null,E);return new Y({"class":this.css.field,constraints:"esriFieldTypeSmallInteger"===q.type?{min:-32768,max:32767,places:0}:{places:0},trim:!0,
invalidMessage:this.NLS_validationInt,required:this._isFieldRequired(q,r)},E)},_createFltField:function(q,r,E){E=m.create("div",null,E);return new Y({"class":this.css.field,constraints:{max:Infinity,min:-Infinity,places:"0,20"},trim:!0,invalidMessage:this.NLS_validationFlt,required:this._isFieldRequired(q,r)},E)},_toStore:function(q){return new R({data:{identifier:"id",label:"name",items:q}})},_connect:function(q,r,E){this._aiConnects.push(L.connect(q,r,E))},_getDatePackage:function(q){return null===
q.datePackage?null:q.datePackage?q.datePackage:"ar"===g.locale?"dojox.date.islamic":null},_destroyAttributeTable:function(){M.forEach(this._layerInfos,function(q){M.forEach(q.fieldInfos,function(r){var E=r.dijit;if(E){E._onChangeHandle=null;if(r.customField)return;E instanceof Array?M.forEach(E,H.hitch(this,function(N){N.destroyRecursive?N.destroyRecursive():N.destroy&&N.destroy();N._onChangeHandle=null})):E.destroyRecursive?E.destroyRecursive():E.destroy&&E.destroy()}r.dijit=null},this)},this);M.forEach(this._toolTips,
function(q){q.destroy()});this._toolTips=[];this._attributes&&m.destroy(this._attributes)}});H.mixin(ka,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});e("extend-esri")&&H.setObject("dijit.AttributeInspector",ka,u);return ka})},"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(T,H,M,L,p,g,e,c,m,u,n,v,w,C,l,d,h,x,B,D,S,K,Q,ia,oa){function ja(F){return new D({command:F.name})}function pa(F){return new D({buttonClass:B,command:F.name})}M=M("dijit.Editor",ia,{plugins:null,extraPlugins:null,constructor:function(){n.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",S]);
this._plugins=[];this._editInterval=1E3*this.editActionInterval;if(v("ie")||v("trident")||v("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new L;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);n.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=p.getLocalization("dijit._editor",
"commands",this.lang);v("webkit")&&m.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new d({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);e.add(this.iframe.parentNode,"dijitEditorIFrameContainer");e.add(this.iframe,"dijitEditorIFrame");g.set(this.iframe,"allowTransparency",
!0);this.toolbar.startup();this.onNormalizedDisplayChanged()},destroy:function(){H.forEach(this._plugins,function(F){F&&F.destroy&&F.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(F,Y){var V=n.isString(F)?{name:F}:n.isFunction(F)?{ctor:F}:F;if(!V.setEditor){var a={args:V,plugin:null,editor:this};V.name&&(D.registry[V.name]?a.plugin=D.registry[V.name](V):C.publish(oa._scopeName+".Editor.getPlugin",a));if(!a.plugin)try{var f=
V.ctor||n.getObject(V.name)||T(V.name);f&&(a.plugin=new f(V))}catch(z){throw Error(this.id+": cannot find plugin ["+V.name+"]");}if(!a.plugin)throw Error(this.id+": cannot find plugin ["+V.name+"]");F=a.plugin}1<arguments.length?this._plugins[Y]=F:this._plugins.push(F);F.setEditor(this);n.isFunction(F.setToolbar)&&F.setToolbar(this.toolbar)},resize:function(F){F&&x.prototype.resize.apply(this,arguments)},layout:function(){var F=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+c.getPadBorderExtents(this.iframe.parentNode).h+
c.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=F+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(F){var Y,V=this.document.body,a=V.clientWidth,f=V.clientHeight,z=V.clientLeft,I=V.offsetWidth,G=V.offsetHeight,W=V.offsetLeft;/^rtl$/i.test(V.dir||"")?a<I&&F.x>a&&F.x<I&&(Y=!0):F.x<z&&F.x>W&&(Y=!0);Y||f<G&&F.y>f&&F.y<G&&(Y=!0);Y||(delete this._cursorToStart,delete this._savedSelection,"BODY"==F.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(F){this.customUndo&&this.endEditing(!0);"BODY"!=F.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(F){this._inEditing||(this._inEditing=!0,this._beginEditing(F));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(F){if(!this.customUndo||
"undo"!=F&&"redo"!=F){this.customUndo&&(this.endEditing(),this._beginEditing());var Y=this.inherited(arguments);this.customUndo&&this._endEditing();return Y}return this[F]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(F){try{var Y=this.document.execCommand(F,!1,null);if(v("webkit")&&!Y)throw{};}catch(V){Y=w.substitute,alert(Y(this.commands.systemShortcut,
[this.commands[F],Y(this.commands[v("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[F]])])),Y=!1}return Y},queryCommandEnabled:function(F){return!this.customUndo||"undo"!=F&&"redo"!=F?this.inherited(arguments):"undo"==F?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(F){var Y=F.mark,V=F.mark;F=F.isCollapsed;var a;if(V)if(9>v("ie")||9===v("ie")&&v("quirks"))if(n.isArray(V))Y=[],H.forEach(V,function(I){Y.push(Q.getNode(I,this.editNode))},this),this.selection.moveToBookmark({mark:Y,
isCollapsed:F});else{if(V.startContainer&&V.endContainer&&(a=Q.getSelection(this.window))&&a.removeAllRanges){a.removeAllRanges();F=Q.create(this.window);var f=Q.getNode(V.startContainer,this.editNode);var z=Q.getNode(V.endContainer,this.editNode);f&&z&&(F.setStart(f,V.startOffset),F.setEnd(z,V.endOffset),a.addRange(F))}}else(a=Q.getSelection(this.window))&&a.removeAllRanges&&(a.removeAllRanges(),F=Q.create(this.window),f=Q.getNode(V.startContainer,this.editNode),z=Q.getNode(V.endContainer,this.editNode),
f&&z&&(F.setStart(f,V.startOffset),F.setEnd(z,V.endOffset),a.addRange(F)))},_changeToStep:function(F,Y){this.setValue(Y.text);(F=Y.bookmark)&&this._moveToBookmark(F)},undo:function(){var F=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var Y=this._steps.pop();Y&&0<this._steps.length&&(this.focus(),this._changeToStep(Y,this._steps[this._steps.length-1]),this._undoedSteps.push(Y),this.onDisplayChanged(),delete this._undoRedoActive,F=!0);delete this._undoRedoActive}return F},
redo:function(){var F=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var Y=this._undoedSteps.pop();Y&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],Y),this._steps.push(Y),this.onDisplayChanged(),F=!0);delete this._undoRedoActive}return F},endEditing:function(F){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(F),this._inEditing=!1)},_getBookmark:function(){var F=this.selection.getBookmark(),
Y=[];if(F&&F.mark){var V=F.mark;if(9>v("ie")||9===v("ie")&&v("quirks")){var a=Q.getSelection(this.window);if(n.isArray(V))H.forEach(F.mark,function(z){Y.push(Q.getIndex(z,this.editNode).o)},this),F.mark=Y;else if(a){var f;a.rangeCount&&(f=a.getRangeAt(0));F.mark=f?f.cloneRange():this.selection.getBookmark()}}try{F.mark&&F.mark.startContainer&&(Y=Q.getIndex(F.mark.startContainer,this.editNode).o,F.mark={startContainer:Y,startOffset:F.mark.startOffset,endContainer:F.mark.endContainer===F.mark.startContainer?
Y:Q.getIndex(F.mark.endContainer,this.editNode).o,endOffset:F.mark.endOffset})}catch(z){F.mark=null}}return F},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:K.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var F=K.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:F,bookmark:this._getBookmark()})},onKeyDown:function(F){v("ie")||this.iframe||F.keyCode!=u.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var Y=
F.keyCode;if(F.ctrlKey&&!F.shiftKey&&!F.altKey){if(90==Y||122==Y){F.stopPropagation();F.preventDefault();this.undo();return}if(89==Y||121==Y){F.stopPropagation();F.preventDefault();this.redo();return}}this.inherited(arguments);switch(Y){case u.ENTER:case u.BACKSPACE:case u.DELETE:this.beginEditing();break;case 88:case 86:if(F.ctrlKey&&!F.altKey&&!F.metaKey){this.endEditing();88==F.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!F.ctrlKey&&!F.altKey&&
!F.metaKey&&(F.keyCode<u.F1||F.keyCode>u.F15)){this.beginEditing();break}case u.ALT:this.endEditing();break;case u.UP_ARROW:case u.DOWN_ARROW:case u.LEFT_ARROW:case u.RIGHT_ARROW:case u.HOME:case u.END:case u.PAGE_UP:case u.PAGE_DOWN:this.endEditing(!0);case u.CTRL:case u.SHIFT:case u.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(F){}},_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(F){this.customUndo?this.isClosed?this.setValue(F):(this.beginEditing(),F||(F="\x26#160;"),this.setValue(F),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(F){this.setValueDeferred.then(n.hitch(this,function(){!this.disabled&&F||!this._buttonEnabledPlugins&&F?
H.forEach(this._plugins,function(Y){Y.set("disabled",!0)}):this.disabled&&!F&&H.forEach(this._plugins,function(Y){Y.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(m.set(this.document.body,"color",m.get(this.iframe,"color")),m.set(this.document.body,"background-color",m.get(this.iframe,"background-color")))}catch(F){}}});n.mixin(D.registry,{undo:ja,redo:ja,cut:ja,copy:ja,paste:ja,insertOrderedList:ja,insertUnorderedList:ja,
indent:ja,outdent:ja,justifyCenter:ja,justifyFull:ja,justifyLeft:ja,justifyRight:ja,"delete":ja,selectAll:ja,removeFormat:ja,unlink:ja,insertHorizontalRule:ja,bold:pa,italic:pa,underline:pa,strikethrough:pa,subscript:pa,superscript:pa,"|":function(){return new D({setEditor:function(F){this.editor=F;this.button=new h({ownerDocument:F.ownerDocument})}})}});return M})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(T,H,M,L,p,g,e,c){M("dijit-legacy-requires")&&p(0,function(){T(["dijit/ToolbarSeparator"])});return H("dijit.Toolbar",[g,c,e],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],
function(T,H,M,L){return T("dijit.ToolbarSeparator",[M,L],{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(T,H,M,L,p){H=H("dijit._editor._Plugin",L,{constructor:function(g){this.params=
g||{};M.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:p,disabled:!1,getLabel:function(g){return this.editor.commands[g]},_initButton:function(){if(this.command.length){var g=this.getLabel(this.command),e=this.editor,c=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(g=M.mixin({label:g,ownerDocument:e.ownerDocument,dir:e.dir,
lang:e.lang,showLabel:!1,iconClass:c,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete g.name,this.button=new this.buttonClass(g))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(g,e,c){this.own(T.connect(g,e,this,c))},updateState:function(){var g=this.editor,e=this.command;if(g&&g.isLoaded&&e.length){var c=this.get("disabled");if(this.button)try{var m=
g._implCommand(e);var u=!c&&(this[m]?this[m](e):g.queryCommandEnabled(e));this.enabled!==u&&(this.enabled=u,this.button.set("disabled",!u));if(u&&"boolean"==typeof this.button.checked){var n=g.queryCommandState(e);this.checked!==n&&(this.checked=n,this.button.set("checked",g.queryCommandState(e)))}}catch(v){console.log(v)}}},setEditor:function(g){this.editor=g;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",M.hitch(this.editor,
"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",M.hitch(this,"updateState")))},setToolbar:function(g){this.button&&g.addChild(this.button)},set:function(g,e){if("object"===typeof g){for(var c in g)this.set(c,g[c]);return this}c=this._getAttrNames(g);if(this[c.s])var m=this[c.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(g,e);return m||this},get:function(g){var e=this._getAttrNames(g);
return this[e.g]?this[e.g]():this[g]},_setDisabledAttr:function(g){this._set("disabled",g);this.updateState()},_getAttrNames:function(g){var e=this._attrPairNames;if(e[g])return e[g];var c=g.charAt(0).toUpperCase()+g.substr(1);return e[g]={s:"_set"+c+"Attr",g:"_get"+c+"Attr"}},_set:function(g,e){this[g]=e}});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(T,H,M,L,p,g,e,c,m,u,n){return T("dijit._editor.plugins.EnterKeyHandling",m,{blockNodeForEnter:"BR",constructor:function(v){v&&("blockNodeForEnter"in v&&(v.blockNodeForEnter=v.blockNodeForEnter.toUpperCase()),L.mixin(this,v))},setEditor:function(v){if(this.editor!==v)if(this.editor=v,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,v.onLoadDeferred.then(L.hitch(this,function(C){this.own(p(v.document,"keydown",L.hitch(this,function(l){if(l.keyCode==M.ENTER){var d=L.mixin({},l);d.shiftKey=
!0;this.handleEnterKey(d)||(l.stopPropagation(),l.preventDefault())}})));9<=g("ie")&&10>=g("ie")&&this.own(p(v.document,"paste",L.hitch(this,function(l){setTimeout(L.hitch(this,function(){var d=this.editor.document.selection.createRange();d.move("character",-1);d.select();d.move("character",1);d.select()}),0)})));return C}));else if(this.blockNodeForEnter){var w=L.hitch(this,"handleEnterKey");v.addKeyHandler(13,0,0,w);v.addKeyHandler(13,0,1,w);this.own(this.editor.on("KeyPressed",L.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var v=this.editor.selection.getAncestorElement("LI");if(v){g("mozilla")&&"LI"==v.parentNode.parentNode.nodeName&&(v=v.parentNode.parentNode);var w=v.firstChild;!w||1!=w.nodeType||"UL"!=w.nodeName&&"OL"!=w.nodeName||(v.insertBefore(w.ownerDocument.createTextNode("\u00a0"),w),w=n.create(this.editor.window),w.setStart(v.firstChild,0),v=n.getSelection(this.editor.window,!0),v.removeAllRanges(),v.addRange(w))}else u.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(v=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(v.innerHTML=this.bogusHtmlContent,9>=g("ie")&&(v=this.editor.document.selection.createRange(),v.move("character",-1),v.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(v){var w,C=this.editor.document,l;if(v.shiftKey){v=this.editor.selection.getParentElement();if(w=n.getAncestor(v,this.blockNodes)){if("LI"==w.tagName)return!0;v=n.getSelection(this.editor.window);var d=v.getRangeAt(0);d.collapsed||(d.deleteContents(),v=n.getSelection(this.editor.window),d=v.getRangeAt(0));if(n.atBeginningOfContainer(w,d.startContainer,d.startOffset)){var h=C.createElement("br");d=n.create(this.editor.window);w.insertBefore(h,
w.firstChild);d.setStartAfter(h);v.removeAllRanges();v.addRange(d)}else if(n.atEndOfContainer(w,d.startContainer,d.startOffset))d=n.create(this.editor.window),h=C.createElement("br"),w.appendChild(h),w.appendChild(C.createTextNode("\u00a0")),d.setStart(w.lastChild,0),v.removeAllRanges(),v.addRange(d);else{if((l=d.startContainer)&&3==l.nodeType){var x=l.nodeValue;var B=C.createTextNode(x.substring(0,d.startOffset));var D=C.createTextNode(x.substring(d.startOffset));w=C.createElement("br");""==D.nodeValue&&
g("webkit")&&(D=C.createTextNode("\u00a0"));H.place(B,l,"after");H.place(w,B,"after");H.place(D,w,"after");H.destroy(l);d=n.create(this.editor.window);d.setStart(D,0);v.removeAllRanges();v.addRange(d);return!1}return!0}}else v=n.getSelection(this.editor.window),v.rangeCount?(d=v.getRangeAt(0))&&d.startContainer&&(d.collapsed||(d.deleteContents(),v=n.getSelection(this.editor.window),d=v.getRangeAt(0)),(l=d.startContainer)&&3==l.nodeType?(w=d.startOffset,l.length<w&&(D=this._adjustNodeAndOffset(l,w),
l=D.node,w=D.offset),x=l.nodeValue,B=C.createTextNode(x.substring(0,w)),D=C.createTextNode(x.substring(w)),w=C.createElement("br"),D.length||(D=C.createTextNode("\u00a0")),B.length?H.place(B,l,"after"):B=l,H.place(w,B,"after"),H.place(D,w,"after"),H.destroy(l)):(0<=d.startOffset&&(h=l.childNodes[d.startOffset]),w=C.createElement("br"),D=C.createTextNode("\u00a0"),h?(H.place(w,h,"before"),H.place(D,w,"after")):(l.appendChild(w),l.appendChild(D))),d=n.create(this.editor.window),d.setStart(D,0),d.setEnd(D,
D.length),v.removeAllRanges(),v.addRange(d),this.editor.selection.collapse(!0)):u.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var S=!0;v=n.getSelection(this.editor.window);d=v.getRangeAt(0);d.collapsed||(d.deleteContents(),v=n.getSelection(this.editor.window),d=v.getRangeAt(0));h=n.getBlockAncestor(d.endContainer,null,this.editor.editNode);var K=h.blockNode;if(this._checkListLater=K&&("LI"==K.nodeName||"LI"==K.parentNode.nodeName))return g("mozilla")&&(this._pressedEnterInBlock=
K),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(K.innerHTML)&&(K.innerHTML="",g("webkit")&&(d=n.create(this.editor.window),d.setStart(K,0),v.removeAllRanges(),v.addRange(d)),this._checkListLater=!1),!0;if(!h.blockNode||h.blockNode===this.editor.editNode){try{u.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(Q){}h={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(h.blockNode){if(h.blockNode!=this.editor.editNode&&!(h.blockNode.textContent||h.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(h.blockNode),!1}else h.blockNode=this.editor.editNode;v=n.getSelection(this.editor.window);d=v.getRangeAt(0)}K=C.createElement(this.blockNodeForEnter);K.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(h.blockNode);D=d.endOffset;S=d.endContainer;S.length<D&&(D=this._adjustNodeAndOffset(S,D),S=
D.node,D=D.offset);if(n.atEndOfContainer(h.blockNode,S,D))h.blockNode===h.blockContainer?h.blockNode.appendChild(K):H.place(K,h.blockNode,"after"),S=!1,d=n.create(this.editor.window),d.setStart(K,0),v.removeAllRanges(),v.addRange(d),this.editor.height&&c.scrollIntoView(K);else if(n.atBeginningOfContainer(h.blockNode,d.startContainer,d.startOffset))H.place(K,h.blockNode,h.blockNode===h.blockContainer?"first":"before"),K.nextSibling&&this.editor.height&&(d=n.create(this.editor.window),d.setStart(K.nextSibling,
0),v.removeAllRanges(),v.addRange(d),c.scrollIntoView(K.nextSibling)),S=!1;else{h.blockNode===h.blockContainer?h.blockNode.appendChild(K):H.place(K,h.blockNode,"after");S=!1;h.blockNode.style&&K.style&&h.blockNode.style.cssText&&(K.style.cssText=h.blockNode.style.cssText);if((l=d.startContainer)&&3==l.nodeType){D=d.endOffset;l.length<D&&(D=this._adjustNodeAndOffset(l,D),l=D.node,D=D.offset);x=l.nodeValue;B=C.createTextNode(x.substring(0,D));D=C.createTextNode(x.substring(D,x.length));H.place(B,l,
"before");H.place(D,l,"after");H.destroy(l);for(d=B.parentNode;d!==h.blockNode;){x=C.createElement(d.tagName);d.style&&x.style&&d.style.cssText&&(x.style.cssText=d.style.cssText);"FONT"===d.tagName&&(d.color&&(x.color=d.color),d.face&&(x.face=d.face),d.size&&(x.size=d.size));for(;D;)l=D.nextSibling,x.appendChild(D),D=l;H.place(x,d,"after");B=d;D=x;d=d.parentNode}if(1==D.nodeType||3==D.nodeType&&D.nodeValue)K.innerHTML="";for(B=D;D;)l=D.nextSibling,K.appendChild(D),D=l}d=n.create(this.editor.window);
C=B;if("BR"!==this.blockNodeForEnter){for(;C;)w=C,C=l=C.firstChild;w&&w.parentNode?(K=w.parentNode,d.setStart(K,0),v.removeAllRanges(),v.addRange(d),this.editor.height&&c.scrollIntoView(K),g("mozilla")&&(this._pressedEnterInBlock=h.blockNode)):S=!0}else d.setStart(K,0),v.removeAllRanges(),v.addRange(d),this.editor.height&&c.scrollIntoView(K),g("mozilla")&&(this._pressedEnterInBlock=h.blockNode)}return S},_adjustNodeAndOffset:function(v,w){for(;v.length<w&&v.nextSibling&&3==v.nextSibling.nodeType;)w-=
v.length,v=v.nextSibling;return{node:v,offset:w}},removeTrailingBr:function(v){if(v=/P|DIV|LI/i.test(v.tagName)?v:this.editor.selection.getParentOfType(v,["P","DIV","LI"]))v.lastChild&&(1<v.childNodes.length&&3==v.lastChild.nodeType&&/^[\s\xAD]*$/.test(v.lastChild.nodeValue)||"BR"==v.lastChild.tagName)&&H.destroy(v.lastChild),v.childNodes.length||(v.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(T,H,M,L,p,g,e,c,m,u,n,v,w,C,l,d,h,x,B,D,S,K,Q,ia,oa,ja,pa,F,Y){var V=M("dijit._editor.RichText",[Q,ia],{constructor:function(a){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};a&&w.isString(a.value)&&(this.value=a.value);this.onLoadDeferred=new L},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=[w.trim,w.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);h("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));h("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(h("ie")||h("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[w.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[w.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);B.publish(Y._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var a=w.hitch(this,function(I,G){return function(){return!this.execCommand(I,G)}}),f={b:a("bold"),i:a("italic"),u:a("underline"),a:a("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:a("formatblock",
"h1"),2:a("formatblock","h2"),3:a("formatblock","h3"),4:a("formatblock","h4"),"\\":a("insertunorderedlist")};h("ie")||(f.Z=a("redo"));for(var z in f)this.addKeyHandler(z,!0,!1,f[z])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(V._editorCommandsLocalized)this._local2NativeFormatNames=V._local2NativeFormatNames,this._native2LocalFormatNames=V._native2LocalFormatNames;else{V._editorCommandsLocalized=!0;V._local2NativeFormatNames={};
V._native2LocalFormatNames={};this._local2NativeFormatNames=V._local2NativeFormatNames;this._native2LocalFormatNames=V._native2LocalFormatNames;for(var a="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),f="",z,I=0;z=a[I++];)f="l"!==z.charAt(1)?f+("\x3c"+z+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+z+"\x3e\x3cbr/\x3e"):f+("\x3c"+z+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+z+"\x3e\x3cbr/\x3e");var G=c.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:f});this.ownerDocumentBody.appendChild(G);
a=w.hitch(this,function(){for(var W=G.firstChild;W;)try{this.selection.selectElement(W.firstChild);var R=W.tagName.toLowerCase();this._local2NativeFormatNames[R]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[R]]=R;W=W.nextSibling.nextSibling}catch(X){}c.destroy(G)});this.defer(a)}},open:function(a){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new L;this.isClosed||this.close();B.publish(Y._scopeName+"._editor.RichText::open",
this);1===arguments.length&&a.nodeName&&(this.domNode=a);var f=this.domNode;if(w.isString(this.value)){var z=this.value;f.innerHTML=""}else if(f.nodeName&&"textarea"==f.nodeName.toLowerCase()){var I=this.textarea=f;this.name=I.name;z=I.value;f=this.domNode=this.ownerDocument.createElement("div");f.setAttribute("widgetId",this.id);I.removeAttribute("widgetId");f.cssText=I.cssText;f.className+=" "+I.className;c.place(f,I,"before");var G=w.hitch(this,function(){u.set(I,{display:"block",position:"absolute",
top:"-1000px"});if(h("ie")){var U=I.style;this.__overflow=U.overflow;U.overflow="hidden"}});h("ie")?this.defer(G,10):G();if(I.form){var W=I.value;this.reset=function(){this.getValue()!==W&&this.replaceValue(W)};C(I.form,"submit",w.hitch(this,function(){g.set(I,"disabled",this.disabled);I.value=this.getValue()}))}}else z=pa.getChildrenHtml(f),f.innerHTML="";this.value=z;f.nodeName&&"LI"===f.nodeName&&(f.innerHTML=" \x3cbr\x3e");this.header=f.ownerDocument.createElement("div");f.appendChild(this.header);
this.editingArea=f.ownerDocument.createElement("div");f.appendChild(this.editingArea);this.footer=f.ownerDocument.createElement("div");f.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!H.useXDomain||H.allowXdRichTextSave)){if((z=p.byId(Y._scopeName+"._editor.RichText.value"))&&""!==z.value){G=z.value.split(this._SEPARATOR);for(var R=0,X;X=G[R++];)if(X=X.split(this._NAME_CONTENT_SEP),X[0]===this.name){this.value=X[1];G=G.splice(R,1);z.value=G.join(this._SEPARATOR);
break}}V._globalSaveHandler||(V._globalSaveHandler={},D.addOnUnload(function(){for(var U in V._globalSaveHandler){var ta=V._globalSaveHandler[U];w.isFunction(ta)&&ta()}}));V._globalSaveHandler[this.id]=w.hitch(this,"_saveContent")}this.isClosed=!1;z=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");z.id=this.id+"_iframe";z.style.border="none";z.style.width="100%";this._layoutMode?z.style.height="100%":7<=h("ie")?(this.height&&(z.style.height=this.height),this.minHeight&&(z.style.minHeight=
this.minHeight)):z.style.height=this.height?this.height:this.minHeight;z.frameBorder=0;z._loadFunc=w.hitch(this,function(U){this.window=U;this.document=U.document;this.selection=new oa.SelectionManager(U);h("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});G=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");G=11>h("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+G+"');document.close()":"javascript: '"+
G+"'";this.editingArea.appendChild(z);z.src=G;"LI"===f.nodeName&&(f.lastChild.style.marginTop="-1.2em");e.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var a=u.getComputedStyle(this.domNode);if(this["aria-label"])var f=this["aria-label"];else{var z=l('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||p.byId(this["aria-labelledby"],this.ownerDocument);z&&(f=z.textContent||z.innerHTML||"")}z="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(f?" aria-label\x3d'"+x.escape(f)+"'":"")+"\x3e\x3c/div\x3e";var I=[a.fontWeight,a.fontSize,a.fontFamily].join(" "),G=a.lineHeight;G=0<=G.indexOf("px")?parseFloat(G)/parseFloat(a.fontSize):0<=G.indexOf("em")?parseFloat(G):"normal";var W="",R=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(X){X=X.replace(/^;/ig,"")+";";var U=X.split(":")[0];if(U){U=w.trim(U);U=U.toLowerCase();var ta,ma="";for(ta=0;ta<U.length;ta++){var ka=U.charAt(ta);switch(ka){case "-":ta++,ka=U.charAt(ta).toUpperCase();
default:ma+=ka}}u.set(R.domNode,ma,"")}W+=X+";"});this.iframe.setAttribute("title",f);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||n.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",f?"\x3ctitle\x3e"+x.escape(f)+"\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:",I,";\n",this.height||h("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",G,";\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",h("ie")||h("trident")||h("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",f?" aria-label\x3d'"+x.escape(f)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+W+"'\x3e",z,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var a=[];this.styleSheets&&(a=this.styleSheets.split(";"),this.styleSheets=
"");a=a.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var f="",z=0,I,G=K.get(this.ownerDocument);I=a[z++];)I=(new S(G.location,I)).toString(),this.editingAreaStyleSheets.push(I),f+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+I+'"/\x3e';return f},addStyleSheet:function(a){var f=a.toString(),z=K.get(this.ownerDocument);if("."===f.charAt(0)||"/"!==f.charAt(0)&&!a.host)f=(new S(z.location,f)).toString();-1<T.indexOf(this.editingAreaStyleSheets,f)||(this.editingAreaStyleSheets.push(f),
this.onLoadDeferred.then(w.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(f);else{var I=this.document.getElementsByTagName("head")[0],G=this.document.createElement("link");G.rel="stylesheet";G.type="text/css";G.href=f;I.appendChild(G)}})))},removeStyleSheet:function(a){var f=a.toString(),z=K.get(this.ownerDocument);if("."===f.charAt(0)||"/"!==f.charAt(0)&&!a.host)f=(new S(z.location,f)).toString();a=T.indexOf(this.editingAreaStyleSheets,f);-1!==a&&(delete this.editingAreaStyleSheets[a],
l('link[href\x3d"'+f+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(a){a=!!a;this._set("disabled",a);if(this.isLoaded){var f=h("ie")&&(this.isLoaded||!this.focusOnLoad);f&&(this.editNode.unselectable="on");this.editNode.contentEditable=!a;this.editNode.tabIndex=a?"-1":this.tabIndex;f&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(h("mozilla")&&!a&&this._mozSettingProps){a=this._mozSettingProps;for(var z in a)if(a.hasOwnProperty(z))try{this.document.execCommand(z,
!1,a[z])}catch(I){}}this._disabledOK=!0}},onLoad:function(a){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=F.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var f=this;this.beforeIframeNode=c.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=c.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){f.editNode.focus()};this.focusNode=
this.editNode;var z=this.events.concat(this.captureEvents),I=this.iframe?this.document:this.editNode;this.own.apply(this,T.map(z,function(G){var W=G.toLowerCase().replace(/^on/,"");return C(I,W,w.hitch(this,G))},this));this.own(C(I,"mouseup",w.hitch(this,"onClick")));h("ie")&&(this.own(C(this.document,"mousedown",w.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);h("webkit")&&(this._webkitListener=this.own(C(this.document,"mouseup",w.hitch(this,"onDisplayChanged")))[0],this.own(C(this.document,
"mousedown",w.hitch(this,function(G){G=G.target;!G||G!==this.document.body&&G!==this.document||this.defer("placeCursorAtEnd")}))));if(h("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(G){}this.isLoaded=!0;this.set("disabled",this.disabled);z=w.hitch(this,function(){this.setValue(a);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&d(w.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(z):z()},onKeyDown:function(a){if(a.keyCode===v.SHIFT||a.keyCode===v.ALT||a.keyCode===v.META||a.keyCode===v.CTRL)return!0;a.keyCode===v.TAB&&this.isTabIndent&&(a.stopPropagation(),a.preventDefault(),this.queryCommandEnabled(a.shiftKey?"outdent":"indent")&&this.execCommand(a.shiftKey?"outdent":"indent"));if(a.keyCode==v.TAB&&!this.isTabIndent&&!a.ctrlKey&&!a.altKey)return a.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>h("ie")&&a.keyCode===v.BACKSPACE&&"Control"===this.document.selection.type&&(a.stopPropagation(),a.preventDefault(),this.execCommand("delete"));h("ff")&&(a.keyCode===v.PAGE_UP||a.keyCode===v.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&a.preventDefault();var f=this._keyHandlers[a.keyCode],z=arguments;f&&!a.altKey&&T.some(f,function(I){if(!(I.shift^a.shiftKey||I.ctrl^(a.ctrlKey||a.metaKey)))return I.handler.apply(this,z)||a.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(a){n.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",a)},_setValueAttr:function(a){this.setValue(a)},_setDisableSpellCheckAttr:function(a){this.document?g.set(this.document.body,"spellcheck",!a):this.onLoadDeferred.then(w.hitch(this,function(){g.set(this.document.body,"spellcheck",!a)}));this._set("disableSpellCheck",a)},addKeyHandler:function(a,f,z,I){"string"==
typeof a&&(a=a.toUpperCase().charCodeAt(0));w.isArray(this._keyHandlers[a])||(this._keyHandlers[a]=[]);this._keyHandlers[a].push({shift:z||!1,ctrl:f||!1,handler:I})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(a){this.onDisplayChanged(a)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(a){(h("ie")||h("trident"))&&this.defer(function(){F.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var f=this.getValue(!0);if(f!==this.value)this.onChange(f);
this._set("value",f)},_onFocus:function(a){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!h("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>h("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(a,f){a=a.toLowerCase();"formatblock"===a?h("safari")&&void 0===f&&(a="heading"):"hilitecolor"!==a||h("mozilla")||(a="backcolor");return a},_implCommand:function(a){return"_"+this._normalizeCommand(a)+"EnabledImpl"},_qcaCache:{},
queryCommandAvailable:function(a){var f=this._qcaCache[a];return void 0!==f?f:this._qcaCache[a]=this._queryCommandAvailable(a)},_queryCommandAvailable:function(a){switch(a.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 h("ie")||h("trident")||h("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!h("webkit");default:return!1}},execCommand:function(a,f){this.focused&&this.focus();a=this._normalizeCommand(a,f);if(void 0!==f){if("heading"===a)throw Error("unimplemented");"formatblock"===
a&&(h("ie")||h("trident"))&&(f="\x3c"+f+"\x3e")}var z="_"+a+"Impl";if(this[z])var I=this[z](f);else if((f=1<arguments.length?f:null)||"createlink"!==a)I=this.document.execCommand(a,!1,f);this.onDisplayChanged();return I},queryCommandEnabled:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);var f=this._implCommand(a);return this[f]?this[f](a):this._browserQueryCommandEnabled(a)},queryCommandState:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);
try{return this.document.queryCommandState(a)}catch(f){return!1}},queryCommandValue:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);if(h("ie")&&"formatblock"===a)a=this._native2LocalFormatNames[this.document.queryCommandValue(a)];else if(h("mozilla")&&"hilitecolor"===a){try{var f=this.document.queryCommandValue("styleWithCSS")}catch(z){f=!1}this.document.execCommand("styleWithCSS",!1,!0);a=this.document.queryCommandValue(a);this.document.execCommand("styleWithCSS",
!1,f)}else a=this.document.queryCommandValue(a);return a},_sCall:function(a,f){return this.selection[a].apply(this.selection,f)},placeCursorAtStart:function(){this.focus();var a=!1;if(h("mozilla"))for(var f=this.editNode.firstChild;f;){if(3===f.nodeType){if(0<f.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(f);break}}else if(1===f.nodeType){a=!0;var z=f.tagName?f.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(z)?this.selection.selectElement(f):
this.selection.selectElementChildren(f);break}f=f.nextSibling}else a=!0,this.selection.selectElementChildren(this.editNode);a&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var a=!1;if(h("mozilla"))for(var f=this.editNode.lastChild;f;){if(3===f.nodeType){if(0<f.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(f);break}}else if(1===f.nodeType){a=!0;this.selection.selectElement(f.lastChild||f);break}f=f.previousSibling}else a=!0,this.selection.selectElementChildren(this.editNode);
a&&this.selection.collapse(!1)},getValue:function(a){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,a):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(a){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){a=this._preFilterContent(a);var f=this.isClosed?this.domNode:this.editNode;f.innerHTML=a;this._preDomFilterContent(f)}else this.textarea.value=a;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(w.hitch(this,function(){this.setValue(a)}))},replaceValue:function(a){this.isClosed?this.setValue(a):this.window&&this.window.getSelection&&!h("mozilla")?this.setValue(a):this.window&&this.window.getSelection?(a=this._preFilterContent(a),this.execCommand("selectall"),this.execCommand("inserthtml",a),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(a);this._set("value",this.getValue(!0))},_preFilterContent:function(a){var f=
a;T.forEach(this.contentPreFilters,function(z){z&&(f=z(f))});return f},_preDomFilterContent:function(a){a=a||this.editNode;T.forEach(this.contentDomPreFilters,function(f){f&&w.isFunction(f)&&f(a)},this)},_postFilterContent:function(a,f){if(w.isString(a))var z=a;else a=a||this.editNode,this.contentDomPostFilters.length&&(f&&(a=w.clone(a)),T.forEach(this.contentDomPostFilters,function(I){a=I(a)})),z=pa.getChildrenHtml(a);w.trim(z.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(z="");T.forEach(this.contentPostFilters,
function(I){z=I(z)});return z},_saveContent:function(){var a=p.byId(Y._scopeName+"._editor.RichText.value");a&&(a.value&&(a.value+=this._SEPARATOR),a.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(a,f){a=a.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");f||(a=a.replace(/'/gm,"\x26#39;"));return a},getNodeHtml:function(a){n.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return pa.getNodeHtml(a)},getNodeChildrenHtml:function(a){n.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return pa.getChildrenHtml(a)},close:function(a){if(!this.isClosed){arguments.length||(a=!0);a&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);h("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var f=this.textarea.style;f.position="";f.left=f.top="";h("ie")&&(f.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;c.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;e.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode;this.window&&this.window._frameElement&&(this.window._frameElement=
null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&this._updateTimer.remove();this.inherited(arguments);V._globalSaveHandler&&delete V._globalSaveHandler[this.id]},_removeMozBogus:function(a){return a.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(a){a=a.replace(/\sclass="webkit-block-placeholder"/gi,"");a=a.replace(/\sclass="apple-style-span"/gi,
"");return a=a.replace(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(a){return a.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(a){return a.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(a){if(!a)return!1;
if(h("ie")||h("trident")||h("edge"))return this.focused&&!this.disabled;var f=9>h("ie")?this.document.selection.createRange():this.document;try{return f.queryCommandEnabled(a)}catch(z){return!1}},_createlinkEnabledImpl:function(){var a=!0;return a=h("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var a=!0;return a=h("mozilla")||h("webkit")||h("ie")||h("trident")||h("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var a=!0;return a=h("mozilla")||h("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var a=!0;h("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("cut");return a},_copyEnabledImpl:function(){var a=!0;h("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("copy");
return a},_pasteEnabledImpl:function(){var a=!0;return h("webkit")?!0:a=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(a){return h("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,a)},_unlinkImpl:function(a){return this.queryCommandEnabled("unlink")&&(h("mozilla")||h("webkit"))?(a=this.selection.getAncestorElement("a"),this.selection.selectElement(a),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,a)},_hilitecolorImpl:function(a){if(!this._handleTextColorOrProperties("hilitecolor",a))if(h("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var f=this.document.execCommand("hilitecolor",!1,a);this.document.execCommand("styleWithCSS",!1,!1)}else f=this.document.execCommand("hilitecolor",!1,a);return f},_backcolorImpl:function(a){h("ie")&&(a=a?a:null);var f=this._handleTextColorOrProperties("backcolor",a);f||(f=this.document.execCommand("backcolor",
!1,a));return f},_forecolorImpl:function(a){h("ie")&&(a=a?a:null);var f=!1;(f=this._handleTextColorOrProperties("forecolor",a))||(f=this.document.execCommand("forecolor",!1,a));return f},_inserthtmlImpl:function(a){a=this._preFilterContent(a);var f=!0;if(9>h("ie")){var z=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var I=z.item(0);z.length;)z.remove(z.item(0));I.outerHTML=a}else z.pasteHTML(a);z.select()}else if(8>h("trident")){var G=ja.getSelection(this.window);
if(G&&G.rangeCount&&G.getRangeAt){z=G.getRangeAt(0);z.deleteContents();var W=c.create("div");W.innerHTML=a;for(I=this.document.createDocumentFragment();a=W.firstChild;)var R=I.appendChild(a);z.insertNode(I);R&&(z=z.cloneRange(),z.setStartAfter(R),z.collapse(!1),G.removeAllRanges(),G.addRange(z))}}else h("mozilla")&&!a.length?this.selection.remove():f=this.document.execCommand("inserthtml",!1,a);return f},_boldImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),f=this._adaptIEFormatAreaAndExec("bold");
f||(f=this.document.execCommand("bold",!1,a));return f},_italicImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),f=this._adaptIEFormatAreaAndExec("italic");f||(f=this.document.execCommand("italic",!1,a));return f},_underlineImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),f=this._adaptIEFormatAreaAndExec("underline");f||(f=this.document.execCommand("underline",!1,a));return f},_strikethroughImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),
f=this._adaptIEFormatAreaAndExec("strikethrough");f||(f=this.document.execCommand("strikethrough",!1,a));return f},_superscriptImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),f=this._adaptIEFormatAreaAndExec("superscript");f||(f=this.document.execCommand("superscript",!1,a));return f},_subscriptImpl:function(a){var f=!1;if(h("ie")||h("trident"))this._adaptIESelection(),f=this._adaptIEFormatAreaAndExec("subscript");f||(f=this.document.execCommand("subscript",!1,a));return f},
_fontnameImpl:function(a){if(h("ie")||h("trident"))var f=this._handleTextColorOrProperties("fontname",a);f||(f=this.document.execCommand("fontname",!1,a));return f},_fontsizeImpl:function(a){if(h("ie")||h("trident"))var f=this._handleTextColorOrProperties("fontsize",a);f||(f=this.document.execCommand("fontsize",!1,a));return f},_insertorderedlistImpl:function(a){var f=!1;if(h("ie")||h("trident")||h("edge"))f=this._adaptIEList("insertorderedlist",a);f||(f=this.document.execCommand("insertorderedlist",
!1,a));return f},_insertunorderedlistImpl:function(a){var f=!1;if(h("ie")||h("trident")||h("edge"))f=this._adaptIEList("insertunorderedlist",a);f||(f=this.document.execCommand("insertunorderedlist",!1,a));return f},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(a){var f=0;if(a&&a.childNodes){var z;for(z=0;z<a.childNodes.length;z++){var I=m.position(a.childNodes[z]);
f+=I.h}}return f},_isNodeEmpty:function(a,f){return 1===a.nodeType?0<a.childNodes.length?this._isNodeEmpty(a.childNodes[0],f):!0:3===a.nodeType?""===a.nodeValue.substring(f):!1},_removeStartingRangeFromRange:function(a,f){if(a.nextSibling)f.setStart(a.nextSibling,0);else{for(a=a.parentNode;a&&null==a.nextSibling;)a=a.parentNode;a&&f.setStart(a.nextSibling,0)}return f},_adaptIESelection:function(){var a=ja.getSelection(this.window);if(a&&a.rangeCount&&!a.isCollapsed){for(var f=a.getRangeAt(0),z=f.startContainer,
I=f.startOffset;3===z.nodeType&&I>=z.length&&z.nextSibling;)I-=z.length,z=z.nextSibling;for(var G=null;this._isNodeEmpty(z,I)&&z!==G;)G=z,f=this._removeStartingRangeFromRange(z,f),z=f.startContainer,I=0;a.removeAllRanges();a.addRange(f)}},_adaptIEFormatAreaAndExec:function(a){var f=ja.getSelection(this.window),z=this.document,I;if(a&&f&&f.isCollapsed){if(this.queryCommandValue(a)){a=this._tagNamesForCommand(a);var G=f.getRangeAt(0);var W=G.startContainer;if(3===W.nodeType){var R=G.endOffset;W.length<
R&&(R=this._adjustNodeAndOffset(X,R),W=R.node,R=R.offset)}for(;W&&W!==this.editNode;){var X=W.tagName?W.tagName.toLowerCase():"";if(-1<T.indexOf(a,X)){var U=W;break}W=W.parentNode}if(U&&(X=G.startContainer,a=z.createElement(U.tagName),c.place(a,U,"after"),X&&3===X.nodeType)){R=G.endOffset;X.length<R&&(R=this._adjustNodeAndOffset(X,R),X=R.node,R=R.offset);W=X.nodeValue;G=z.createTextNode(W.substring(0,R));var ta=W.substring(R,W.length);ta&&(I=z.createTextNode(ta));c.place(G,X,"before");if(I){var ma=
z.createElement("span");ma.className="ieFormatBreakerSpan";c.place(ma,X,"after");c.place(I,ma,"after");I=ma}c.destroy(X);R=G.parentNode;for(X=[];R!==U;){W=R.tagName;G={tagName:W};X.push(G);W=z.createElement(W);R.style&&W.style&&R.style.cssText&&(W.style.cssText=R.style.cssText,G.cssText=R.style.cssText);"FONT"===R.tagName&&(R.color&&(W.color=R.color,G.color=R.color),R.face&&(W.face=R.face,G.face=R.face),R.size&&(W.size=R.size,G.size=R.size));R.className&&(W.className=R.className,G.className=R.className);
if(I)for(;I;)G=I.nextSibling,W.appendChild(I),I=G;W.tagName==R.tagName?(ma=z.createElement("span"),ma.className="ieFormatBreakerSpan",c.place(ma,R,"after"),c.place(W,ma,"after")):c.place(W,R,"after");G=R;I=W;R=R.parentNode}if(I){if(1===I.nodeType||3===I.nodeType&&I.nodeValue)a.innerHTML="";for(;I;)G=I.nextSibling,a.appendChild(I),I=G}if(X.length){G=X.pop();I=z.createElement(G.tagName);G.cssText&&I.style&&(I.style.cssText=G.cssText);G.className&&(I.className=G.className);"FONT"===G.tagName&&(G.color&&
(I.color=G.color),G.face&&(I.face=G.face),G.size&&(I.size=G.size));for(c.place(I,a,"before");X.length;)G=X.pop(),U=z.createElement(G.tagName),G.cssText&&U.style&&(U.style.cssText=G.cssText),G.className&&(U.className=G.className),"FONT"===G.tagName&&(G.color&&(U.color=G.color),G.face&&(U.face=G.face),G.size&&(U.size=G.size)),I.appendChild(U),I=U;U=z.createTextNode(".");ma.appendChild(U);I.appendChild(U)}else ma=z.createElement("span"),ma.className="ieFormatBreakerSpan",U=z.createTextNode("."),ma.appendChild(U),
c.place(ma,a,"before");I=ja.create(this.window);I.setStart(U,0);I.setEnd(U,U.length);f.removeAllRanges();f.addRange(I);this.selection.collapse(!1);U.parentNode.innerHTML="";a.firstChild||c.destroy(a);return!0}return!1}G=f.getRangeAt(0);if((X=G.startContainer)&&3===X.nodeType)return R=G.startOffset,X.length<R&&(R=this._adjustNodeAndOffset(X,R),X=R.node,R=R.offset),W=X.nodeValue,G=z.createTextNode(W.substring(0,R)),ta=W.substring(R),""!==ta&&(I=z.createTextNode(W.substring(R))),ma=z.createElement("span"),
U=z.createTextNode("."),ma.appendChild(U),G.length?c.place(G,X,"after"):G=X,c.place(ma,G,"after"),I&&c.place(I,ma,"after"),c.destroy(X),I=ja.create(this.window),I.setStart(U,0),I.setEnd(U,U.length),f.removeAllRanges(),f.addRange(I),z.execCommand(a),c.place(ma.firstChild,ma,"before"),c.destroy(ma),I.setStart(U,0),I.setEnd(U,U.length),f.removeAllRanges(),f.addRange(I),this.selection.collapse(!1),U.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(a){var f=ja.getSelection(this.window);
if(f.isCollapsed&&f.rangeCount&&!this.queryCommandValue(a)){var z=f.getRangeAt(0),I=z.startContainer;if(I&&3==I.nodeType&&!z.startOffset)return z="ul","insertorderedlist"===a&&(z="ol"),a=this.document.createElement(z),z=c.create("li",null,a),c.place(a,I,"before"),z.appendChild(I),c.create("br",null,a,"after"),a=ja.create(this.window),a.setStart(I,0),a.setEnd(I,I.length),f.removeAllRanges(),f.addRange(a),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(a,f){var z=ja.getSelection(this.window),
I=this.document,G,W;f=f||null;if(a&&z&&z.isCollapsed&&z.rangeCount){var R=z.getRangeAt(0);if((G=R.startContainer)&&3===G.nodeType){var X=R.startOffset;G.length<X&&(R=this._adjustNodeAndOffset(G,X),G=R.node,X=R.offset);var U=G.nodeValue;R=I.createTextNode(U.substring(0,X));""!==U.substring(X)&&(W=I.createTextNode(U.substring(X)));U=I.createElement("span");X=I.createTextNode(".");U.appendChild(X);I=I.createElement("span");U.appendChild(I);R.length?c.place(R,G,"after"):R=G;c.place(U,R,"after");W&&c.place(W,
U,"after");c.destroy(G);G=ja.create(this.window);G.setStart(X,0);G.setEnd(X,X.length);z.removeAllRanges();z.addRange(G);if(h("webkit")){z="color";if("hilitecolor"===a||"backcolor"===a)z="backgroundColor";u.set(U,z,f);this.selection.remove();c.destroy(I);U.innerHTML="\x26#160;";this.selection.selectElement(U);this.focus()}else this.execCommand(a,f),c.place(U.firstChild,U,"before"),c.destroy(U),G.setStart(X,0),G.setEnd(X,X.length),z.removeAllRanges(),z.addRange(G),this.selection.collapse(!1),X.parentNode.removeChild(X);
return!0}}return!1},_adjustNodeAndOffset:function(a,f){for(;a.length<f&&a.nextSibling&&3===a.nextSibling.nodeType;)f-=a.length,a=a.nextSibling;return{node:a,offset:f}},_tagNamesForCommand:function(a){return"bold"===a?["b","strong"]:"italic"===a?["i","em"]:"strikethrough"===a?["s","strike"]:"superscript"===a?["sup"]:"subscript"===a?["sub"]:"underline"===a?["u"]:[]},_stripBreakerNodes:function(a){if(this.isLoaded)return l(".ieFormatBreakerSpan",a).forEach(function(f){for(;f.firstChild;)c.place(f.firstChild,
f,"before");c.destroy(f)}),a},_stripTrailingEmptyNodes:function(a){function f(z){return/^(p|div|br)$/i.test(z.nodeName)&&0==z.children.length&&/^[\s\xA0]*$/.test(z.textContent||z.innerText||"")||3===z.nodeType&&/^[\s\xA0]*$/.test(z.nodeValue)}for(;a.lastChild&&f(a.lastChild);)c.destroy(a.lastChild);return a},_setTextDirAttr:function(a){this._set("textDir",a);this.onLoadDeferred.then(w.hitch(this,function(){this.editNode.dir=a}))}});return V})},"dijit/_editor/range":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/lang"],function(T,H,M){var L={getIndex:function(e,c){for(var m=[],u=[],n=e,v,w;e!=c;){var C=0;for(v=e.parentNode;w=v.childNodes[C++];)if(w===e){--C;break}m.unshift(C);u.unshift(C-v.childNodes.length);e=v}if(0<m.length&&3==n.nodeType){for(w=n.previousSibling;w&&3==w.nodeType;)m[m.length-1]--,w=w.previousSibling;for(w=n.nextSibling;w&&3==w.nodeType;)u[u.length-1]++,w=w.nextSibling}return{o:m,r:u}},getNode:function(e,c){if(!M.isArray(e)||0==e.length)return c;var m=c;
T.every(e,function(u){if(0<=u&&u<m.childNodes.length)m=m.childNodes[u];else return m=null,!1;return!0});return m},getCommonAncestor:function(e,c,m){m=m||e.ownerDocument.body;var u=function(w){for(var C=[];w;)if(C.unshift(w),w!==m)w=w.parentNode;else break;return C};e=u(e);c=u(c);u=Math.min(e.length,c.length);for(var n=e[0],v=1;v<u;v++)if(e[v]===c[v])n=e[v];else break;return n},getAncestor:function(e,c,m){for(m=m||e.ownerDocument.body;e&&e!==m;){var u=e.nodeName.toUpperCase();if(c.test(u))return e;
e=e.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(e,c,m){m=m||e.ownerDocument.body;c=c||L.BlockTagNames;for(var u=null,n;e&&e!==m;){var v=e.nodeName.toUpperCase();!u&&c.test(v)&&(u=e);!n&&/^(?:BODY|TD|TH|CAPTION)$/.test(v)&&(n=e);e=e.parentNode}return{blockNode:u,blockContainer:n||e.ownerDocument.body}},atBeginningOfContainer:function(e,c,m){var u=!1,n=0==m;n||3!=c.nodeType||/^[\s\xA0]+$/.test(c.nodeValue.substr(0,m))&&(n=
!0);if(n)for(u=!0;c&&c!==e;){if(c.previousSibling){u=!1;break}c=c.parentNode}return u},atEndOfContainer:function(e,c,m){var u=!1,n=m==(c.length||c.childNodes.length);n||3!=c.nodeType||/^[\s\xA0]+$/.test(c.nodeValue.substr(m))&&(n=!0);if(n)for(u=!0;c&&c!==e;){if(c.nextSibling){u=!1;break}c=c.parentNode}return u},adjacentNoneTextNode:function(e,c){var m=e;e=0-e.length||0;for(c=c?"nextSibling":"previousSibling";m&&3==m.nodeType;)e+=m.length,m=m[c];return[m,e]},create:function(e){e=e||window;return e.getSelection?
e.document.createRange():new g},getSelection:function(e,c){if(e.getSelection)return e.getSelection();e=new p.selection(e);c||e._getCurrentSelection();return e}};if(!window.getSelection)var p=L.ie={cachedSelection:{},selection:function(e){this._ranges=[];this.addRange=function(c,m){this._ranges.push(c);m||c._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(c){return this._ranges[c]};this._getCurrentSelection=function(){this.removeAllRanges();
var c=e.document.selection.createRange();c="CONTROL"==e.document.selection.type.toUpperCase()?new g(p.decomposeControlRange(c)):new g(p.decomposeTextRange(c));this.addRange(c,!0),this.isCollapsed=c.collapsed}},decomposeControlRange:function(e){var c=e.item(0),m=e.item(e.length-1);e=c.parentNode;var u=m.parentNode;c=L.getIndex(c,e).o[0];m=L.getIndex(m,u).o[0]+1;return[e,c,u,m]},getEndPoint:function(e,c){var m=e.duplicate();m.collapse(!c);var u="EndTo"+(c?"End":"Start"),n=m.parentElement(),v;if(0<n.childNodes.length)T.every(n.childNodes,
function(l,d){if(3!=l.nodeType)if(m.moveToElementText(l),0<m.compareEndPoints(u,e))if(v&&3==v.nodeType){w=v;var h=!0}else return w=n,C=d,!1;else{if(d==n.childNodes.length-1)return w=n,C=n.childNodes.length,!1}else d==n.childNodes.length-1&&(w=l,h=!0);if(h&&w)return w=(l=L.adjacentNoneTextNode(w)[0])?l.nextSibling:n.firstChild,d=L.adjacentNoneTextNode(w),l=d[0],d=d[1],l?(m.moveToElementText(l),m.collapse(!1)):m.moveToElementText(n),m.setEndPoint(u,e),C=m.text.length-d,!1;v=l;return!0});else{var w=
n;var C=0}c||1!=w.nodeType||C!=w.childNodes.length||(c=w.nextSibling)&&3==c.nodeType&&(w=c,C=0);return[w,C]},setEndPoint:function(e,c,m){e=e.duplicate();var u;if(3!=c.nodeType)if(0<m){if(u=c.childNodes[m-1])if(3==u.nodeType)c=u,m=u.length;else if(u.nextSibling&&3==u.nextSibling.nodeType)c=u.nextSibling,m=0;else{e.moveToElementText(u.nextSibling?u:c);var n=u.parentNode;u=n.insertBefore(u.ownerDocument.createTextNode(" "),u.nextSibling);e.collapse(!1);n.removeChild(u)}}else e.moveToElementText(c),e.collapse(!0);
3==c.nodeType&&(u=L.adjacentNoneTextNode(c),n=u[0],u=u[1],n?(e.moveToElementText(n),e.collapse(!1),"inherit"!=n.contentEditable&&u++):(e.moveToElementText(c.parentNode),e.collapse(!0),e.move("character",1),e.move("character",-1)),m+=u,0<m&&e.move("character",m)!=m&&console.error("Error when moving!"));return e},decomposeTextRange:function(e){var c=p.getEndPoint(e),m=c[0],u=c[1],n=c[0];c=c[1];e.htmlText.length&&(e.htmlText==e.text?c=u+e.text.length:(c=p.getEndPoint(e,!0),n=c[0],c=c[1]));return[m,u,
n,c]},setRange:function(e,c,m,u,n,v){c=p.setEndPoint(e,c,m);e.setEndPoint("StartToStart",c);if(!v)var w=p.setEndPoint(e,u,n);e.setEndPoint("EndToEnd",w||c);return e}},g=L.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?L.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(e,c){c=parseInt(c);if(this.startContainer!==e||this.startOffset!=c)delete this._cachedBookmark,this.startContainer=e,this.startOffset=c,this.endContainer?this._updateInternal():this.setEnd(e,c)},setEnd:function(e,c){c=parseInt(c);if(this.endContainer!==e||this.endOffset!=c)delete this._cachedBookmark,
this.endContainer=e,this.endOffset=c,this.startContainer?this._updateInternal():this.setStart(e,c)},setStartAfter:function(e,c){this._setPoint("setStart",e,c,1)},setStartBefore:function(e,c){this._setPoint("setStart",e,c,0)},setEndAfter:function(e,c){this._setPoint("setEnd",e,c,1)},setEndBefore:function(e,c){this._setPoint("setEnd",e,c,0)},_setPoint:function(e,c,m,u){m=L.getIndex(c,c.parentNode).o;this[e](c.parentNode,m.pop()+u)},_getIERange:function(){var e=(this._body||this.endContainer.ownerDocument.body).createTextRange();
p.setRange(e,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return e},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var e=this.startContainer,c=this._getIERange();3!==e.nodeType||this.startOffset||this.setStartBefore(e);c.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var e=new g([this.startContainer,
this.startOffset,this.endContainer,this.endOffset]);e._body=this._body;return e},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});M.setObject("dijit.range",L);return L})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(T,H,M){var L={};H.setObject("dijit._editor.html",L);var p=L.escapeXml=function(g,e){g=g.replace(/&/gm,"\x26amp;").replace(/</gm,
"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");e||(g=g.replace(/'/gm,"\x26#39;"));return g};L.getNodeHtml=function(g){var e=[];L.getNodeHtmlHelper(g,e);return e.join("")};L.getNodeHtmlHelper=function(g,e){switch(g.nodeType){case 1:var c=g.nodeName.toLowerCase();if(!c||"/"==c.charAt(0))return"";e.push("\x3c",c);var m=[],u={},n;if(M("dom-attributes-explicit")||M("dom-attributes-specified-flag"))for(var v=0;n=g.attributes[v++];){var w=n.name;"_dj"===w.substr(0,3)||M("dom-attributes-specified-flag")&&
!n.specified||w in u||(n=n.value,("src"==w||"href"==w)&&g.getAttribute("_djrealurl")&&(n=g.getAttribute("_djrealurl")),8===M("ie")&&"style"===w&&(n=n.replace("HEIGHT:","height:").replace("WIDTH:","width:")),m.push([w,n]),u[w]=n)}else{var C=(/^input$|^img$/i.test(g.nodeName)?g:g.cloneNode(!1)).outerHTML;u=C.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);C=C.substr(0,C.indexOf("\x3e"));T.forEach(u,function(l){if(l){var d=l.indexOf("\x3d");if(0<d&&(l=l.substring(0,d),"_dj"!=l.substr(0,3)))if("src"!=l&&"href"!=
l||!g.getAttribute("_djrealurl")){switch(l){case "style":var h=g.style.cssText.toLowerCase();break;case "class":h=g.className;break;case "width":if("img"===c){(d=/width=(\S+)/i.exec(C))&&(h=d[1]);break}case "height":if("img"===c){(d=/height=(\S+)/i.exec(C))&&(h=d[1]);break}default:h=g.getAttribute(l)}null!=h&&m.push([l,h.toString()])}else m.push([l,g.getAttribute("_djrealurl")])}},this)}m.sort(function(l,d){return l[0]<d[0]?-1:l[0]==d[0]?0:1});for(u=0;n=m[u++];)e.push(" ",n[0],'\x3d"',"string"===
typeof n[1]?p(n[1],!0):n[1],'"');switch(c){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":e.push(" /\x3e");break;case "script":e.push("\x3e",g.innerHTML,"\x3c/",c,"\x3e");break;default:e.push("\x3e"),g.hasChildNodes()&&L.getChildrenHtmlHelper(g,e),e.push("\x3c/",c,"\x3e")}break;case 4:case 3:e.push(p(g.nodeValue,!0));break;case 8:e.push("\x3c!--",p(g.nodeValue,!0),"--\x3e");break;default:e.push("\x3c!-- Element not recognized - Type: ",g.nodeType," Name: ",
g.nodeName,"--\x3e")}};L.getChildrenHtml=function(g){var e=[];L.getChildrenHtmlHelper(g,e);return e.join("")};L.getChildrenHtmlHelper=function(g,e){if(g)for(var c=g.childNodes||g,m=!M("ie")||c!==g,u,n=0;u=c[n++];)m&&u.parentNode!=g||L.getNodeHtmlHelper(u,e)};return L})},"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(T,H,M,L,p,g,e,c,m,u,n,v,w){var C=M("dijit._editor.plugins.LinkDialog",n,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:v,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=g.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(d){T("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),g.hitch(this,function(h,x,B){var D=this;this.tag="insertImage"==this.command?"img":"a";h=g.delegate(h.getLocalization("dijit","common",this.lang),h.getLocalization("dijit._editor",
"LinkDialog",this.lang));var S=this.dropDown=this.button.dropDown=new x({title:h[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:g.hitch(this,"setValue"),onOpen:function(){D._onOpenDialog();x.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(g.hitch(D,"_onCloseDialog"),0)}});h.urlRegExp=this.urlRegExp;h.id=B.getUniqueId(this.editor.id);this._uniqueId=h.id;this._setContent(S.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
u.substitute(this.linkDialogTemplate,h));S.startup();this._urlInput=B.byId(this._uniqueId+"_urlInput");this._textInput=B.byId(this._uniqueId+"_textInput");this._setButton=B.byId(this._uniqueId+"_setButton");this.own(B.byId(this._uniqueId+"_cancelButton").on("click",g.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",g.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",g.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=g.hitch(this,function(){var K=this._urlInput.get("value");return this._urlRegExp.test(K)||this._emailRegExp.test(K)});this.own(e(S.domNode,"keydown",g.hitch(this,g.hitch(this,function(K){!K||K.keyCode!=p.ENTER||K.shiftKey||K.metaKey||K.ctrlKey||K.altKey||this._setButton.get("disabled")||(S.onExecute(),S.execute(S.get("value")))}))));d()}))},_checkAndFixInput:function(){var d=this,h=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var x=h,B=!1,D=!1;x&&1<x.length&&(x=g.trim(x),0!==x.indexOf("mailto:")&&(0<x.indexOf("/")?-1===x.indexOf("://")&&"/"!==x.charAt(0)&&x.indexOf("./")&&0!==x.indexOf("../")&&d._hostRxp.test(x)&&(B=!0):d._userAtRxp.test(x)&&(D=!0)));B&&d._urlInput.set("value","http://"+x);D&&d._urlInput.set("value","mailto:"+x);d._setButton.set("disabled",!d._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(g.hitch(this,
function(){this.own(e(this.editor.editNode,"mouseup",g.hitch(this,"_onMouseUp")));this.own(e(this.editor.editNode,"dblclick",g.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(d){this.dropDown.set({parserScope:"dojo",content:d})},_checkValues:function(d){d&&d.urlInput&&(d.urlInput=d.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&d&&d.textInput&&("function"===typeof this.linkFilter?d.textInput=this.linkFilter(d.textInput):
H.forEach(this.linkFilter,function(h){d.textInput=d.textInput.replace(h[0],h[1])}));return d},_createlinkEnabledImpl:function(){return!0},setValue:function(d){this._onCloseDialog();if(9>c("ie")){var h=w.getSelection(this.editor.window).getRangeAt(0).endContainer;3===h.nodeType&&(h=h.parentNode);h&&h.nodeName&&h.nodeName.toLowerCase()!==this.tag&&(h=this.editor.selection.getSelectedElement(this.tag));h&&h.nodeName&&h.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(h),
this.editor.execCommand("unlink"))}d=this._checkValues(d);this.editor.execCommand("inserthtml",u.substitute(this.htmlTemplate,d));m("a",this.editor.document).forEach(function(x){x.innerHTML||L.has(x,"name")||x.parentNode.removeChild(x)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(d){if(d&&d.tagName.toLowerCase()===this.tag){var h=d.getAttribute("_djrealurl")||d.getAttribute("href");var x=d.getAttribute("target")||"_self";var B=d.textContent||
d.innerText;this.editor.selection.selectElement(d,!0)}else B=this.editor.selection.getSelectedText();return{urlInput:h||"",textInput:B||"",targetSelect:x||""}},_onOpenDialog:function(){if(c("ie")){var d=w.getSelection(this.editor.window);if(d.rangeCount){var h=d.getRangeAt(0);var x=h.endContainer;3===x.nodeType&&(x=x.parentNode);x&&x.nodeName&&x.nodeName.toLowerCase()!==this.tag&&(x=this.editor.selection.getSelectedElement(this.tag));if(!x||x.nodeName&&x.nodeName.toLowerCase()!==this.tag)(d=this.editor.selection.getAncestorElement(this.tag))&&
d.nodeName&&d.nodeName.toLowerCase()==this.tag?(x=d,this.editor.selection.selectElement(x)):h.startContainer===h.endContainer&&(d=h.startContainer.firstChild)&&d.nodeName&&d.nodeName.toLowerCase()==this.tag&&(x=d,this.editor.selection.selectElement(x))}}else x=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(x))},_onDblClick:function(d){if(d&&d.target&&(d=d.target,(d.tagName?d.tagName.toLowerCase():
"")===this.tag&&L.get(d,"href"))){var h=this.editor;this.editor.selection.selectElement(d);h.onDisplayChanged();h._updateTimer&&(h._updateTimer.remove(),delete h._updateTimer);h.onNormalizedDisplayChanged();var x=this.button;setTimeout(function(){x.set("disabled",!1);x.loadAndOpenDropDown().then(function(){x.dropDown.focus&&x.dropDown.focus()})},10)}},_onMouseUp:function(){if(c("ff")){var d=this.editor.selection.getAncestorElement(this.tag);if(d){var h=w.getSelection(this.editor.window).getRangeAt(0);
if(h.collapsed&&d.childNodes.length){var x=h.cloneRange();x.selectNodeContents(d.childNodes[d.childNodes.length-1]);x.setStart(d.childNodes[0],0);1!==h.compareBoundaryPoints(x.START_TO_START,x)?h.setStartBefore(d):-1!==h.compareBoundaryPoints(x.END_TO_START,x)&&h.setStartAfter(d)}}}}}),l=M("dijit._editor.plugins.ImgLinkDialog",[C],{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(d){if(d&&d.tagName.toLowerCase()===this.tag){var h=d.getAttribute("_djrealurl")||d.getAttribute("src");var x=d.getAttribute("alt");this.editor.selection.selectElement(d,!0)}else x=this.editor.selection.getSelectedText();return{urlInput:h||"",textInput:x||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);
this.editor.onLoadDeferred.then(g.hitch(this,function(){this.own(e(this.editor.editNode,"mousedown",g.hitch(this,"_selectTag")))}))},_selectTag:function(d){d&&d.target&&(d=d.target,(d.tagName?d.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(d))},_checkValues:function(d){d&&d.urlInput&&(d.urlInput=d.urlInput.replace(/"/g,"\x26quot;"));d&&d.textInput&&(d.textInput=d.textInput.replace(/"/g,"\x26quot;"));return d},_onDblClick:function(d){if(d&&d.target&&(d=d.target,(d.tagName?
d.tagName.toLowerCase():"")===this.tag&&L.get(d,"src"))){var h=this.editor;this.editor.selection.selectElement(d);h.onDisplayChanged();h._updateTimer&&(h._updateTimer.remove(),delete h._updateTimer);h.onNormalizedDisplayChanged();var x=this.button;setTimeout(function(){x.set("disabled",!1);x.loadAndOpenDropDown().then(function(){x.dropDown.focus&&x.dropDown.focus()})},10)}}});n.registry.createLink=function(d){var h={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in d?d.allowUnsafeHtml:!1};
"linkFilter"in d&&(h.linkFilter=d.linkFilter);return new C(h)};n.registry.insertImage=function(){return new l({command:"insertImage"})};C.ImgLinkDialog=l;return C})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),function(T,H,M,L,p,g){var e=M("dijit._editor.plugins.TextColor",p,{buttonClass:g,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;
this.inherited(arguments);var c=this;this.button.loadDropDown=function(m){function u(n){c.button.dropDown=new n({dir:c.editor.dir,ownerDocument:c.editor.ownerDocument,value:c.value,onChange:function(v){c.editor.execCommand(c.command,v)},onExecute:function(){c.editor.execCommand(c.command,this.get("value"))}});m()}"string"==typeof c.colorPicker?T([c.colorPicker],u):u(c.colorPicker)}},updateState:function(){var c=this.editor,m=this.command;if(c&&c.isLoaded&&m.length){if(this.button){var u=this.get("disabled");
this.button.set("disabled",u);if(u)return;try{var n=c.queryCommandValue(m)||""}catch(v){n=""}}""==n&&(n="#000000");"transparent"==n&&(n="#ffffff");"string"==typeof n?-1<n.indexOf("rgb")&&(n=H.fromRgb(n).toHex()):(n=((n&255)<<16|n&65280|(n&16711680)>>>16).toString(16),n="#000000".slice(0,7-n.length)+n);this.value=n;(c=this.button.dropDown)&&c.get&&n!==c.get("value")&&c.set("value",n,!1)}}});p.registry.foreColor=function(c){return new e(c)};p.registry.hiliteColor=function(c){return new e(c)};return e})},
"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(T,H,M,L,p,g,e,c,m,u,n,v,w,C,l,d,h){T=T([u,n],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:!0,
templateString:d,_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(x,B){H.mixin(this,h.widgets.attachmentEditor)},startup:function(){this.inherited(arguments);
this._uploadField_connect=M.connect(this._uploadField,"onchange",this,function(){0<this._uploadField.value.length&&this._addAttachment()});this._uploadFieldFocus_connect=M.connect(this._uploadField,"onfocus",H.hitch(this,function(x){l.hide(this._attachmentError)}))},destroy:function(){L.forEach(this._aeConnects,M.disconnect);M.disconnect(this._uploadField_connect);M.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments)},showAttachments:function(x,B){this._attachmentList.innerHTML=this.NLS_none;
this._uploadField.value="";L.forEach(this.domNode.children,function(D,S){l.show(D)});l.hide(this._attachmentError);x&&(this._featureLayer=x.getLayer()||B)&&("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:x}).canUpdate,this._oid=x.attributes[this._featureLayer.objectIdField],this._getAttachments(x)):B&&B.getEditCapabilities()||(l.hide(this._uploadForm),L.forEach(this.domNode.children,function(D,S){l.hide(D)})))},_getAttachments:function(x){this._featureLayer&&this._featureLayer.queryAttachmentInfos&&this._featureLayer.queryAttachmentInfos(this._oid,H.hitch(this,"_onQueryAttachmentInfosComplete"))},_addAttachment:function(){l.hide(this._attachmentError);
this._featureLayer&&this._featureLayer.addAttachment?(l.show(this._attachmentProgress),this._featureLayer.addAttachment(this._oid,this._uploadForm,H.hitch(this,"_onAddAttachmentComplete"),H.hitch(this,"_onAddAttachmentError"))):this._tempUpload=this._uploadForm},_chainAttachment:function(x,B){this._tempUpload&&(l.show(this._attachmentProgress),B.addAttachment(x,this._tempUpload,H.hitch(this,"_onAddAttachmentComplete"),H.hitch(this,"_onAddAttachmentError")));this._tempUpload=null},_deleteAttachment:function(x,
B){l.show(this._attachmentProgress);this._featureLayer.deleteAttachments(x,[B],H.hitch(this,"_onDeleteAttachmentComplete"))},_onQueryAttachmentInfosComplete:function(x){var B=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?(B=this._listHtml+this._endHtml,this._uploadForm.style.display=
"none"):this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(B=this._listHtml+this._endHtml);var D=this._attachmentList;x=L.map(x,H.hitch(this,function(S){return C.substitute({href:S.url,name:S.name,oid:S.objectId,attid:S.id},B)}));D.innerHTML=x.join("")||this.NLS_none;this._updateConnects()},_onAddAttachmentComplete:function(x){l.hide(this._attachmentProgress.domNode);var B=this._attachmentList,D=this._uploadField,S=D.value,K=S.lastIndexOf("\\");
-1<K&&(S=S.substring(K+1,S.length));S=S.replace(/ /g,"_");K=c.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var Q=this._listHtml+this._deleteBtnHtml+this._endHtml;this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(Q=this._listHtml+this._endHtml);x=C.substitute({href:this._featureLayer._url.path+"/"+x.objectId+"/attachments/"+x.attachmentId+(K?"?"+K:""),name:S,oid:x.objectId,attid:x.attachmentId},
Q);B.innerHTML=B.innerHTML==this.NLS_none?x:B.innerHTML+x;this._updateConnects();D.value=""},_onAddAttachmentError:function(x){l.hide(this._attachmentProgress.domNode);if(x){var B=this.NLS_error,D=this._attachmentError;C.isDefined(x.code)&&400===x.code&&(B=this.NLS_fileNotSupported);m.set(D,"innerHTML",B);l.show(D)}},_onDeleteAttachmentComplete:function(x){l.hide(this._attachmentProgress.domNode);var B=this._attachmentList;L.every(x,function(D){return D.success})&&(p.query("#node_"+x[0].objectId+
"_"+x[0].attachmentId).orphan(),B.children&&B.children.length||(B.innerHTML=this.NLS_none))},_updateConnects:function(){L.forEach(this._aeConnects,M.disconnect);p.query(".deleteAttachment").forEach(function(x){this._aeConnects.push(M.connect(x,"onclick",H.hitch(this,"_deleteAttachment",this._oid,x.id)))},this)}});g("extend-esri")&&H.setObject("dijit.editing.AttachmentEditor",T,w);return T})},"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(T,H,M,L,p,g,e,c){return H("dijit.ProgressBar",[g,e],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:c,_indeterminateHighContrastImagePath:T.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(m){var u="rtl"==m.toLowerCase();M.toggle(this.domNode,"dijitProgressBarRtl",u);M.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&u);this.inherited(arguments)},update:function(m){L.mixin(this,m||{});m=this.internalProgress;var u=this.domNode,n=1;this.indeterminate?u.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(n=Math.min(parseFloat(this.progress)/100,1),this.progress=n*this.maximum):(this.progress=Math.min(this.progress,
this.maximum),n=this.maximum?this.progress/this.maximum:0),u.setAttribute("aria-valuenow",this.progress));u.setAttribute("aria-labelledby",this.labelNode.id);u.setAttribute("aria-valuemin",0);u.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(n);M.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);M.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());m.style.width=100*n+"%";this.onChange()},_setValueAttr:function(m){this._set("value",
m);Infinity==m?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:m})},_setLabelAttr:function(m){this._set("label",m);this.update()},_setIndeterminateAttr:function(m){this._set("indeterminate",m);this.update()},report:function(m){return this.label?this.label:this.indeterminate?"\x26#160;":p.format(m,{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(T,H,M,L){var p={};p={findFeatures:function(g,e,c){var m=e.objectIdField;e=H.filter(e.graphics,function(u){return H.some(g,function(n){return u.attributes[m]===n.objectId})});if(c)c(e);else return e},getSelection:function(g){var e=[];H.forEach(g,function(c){c=c.getSelectedFeatures();H.forEach(c,function(m){e.push(m)})});return e},sortFeaturesById:function(g,e){var c=H.map(g,function(m){return m.featureLayer});e.sort(function(m,u){var n=m.getLayer(),v=u.getLayer();if(!n)return-1;if(!v)return 1;
var w=H.indexOf(c,n);v=H.indexOf(c,v);w-=v;w||(n=n.objectIdField,w=m.attributes[n]-u.attributes[n]);return w});return e}};M("extend-esri")&&T.setObject("dijit.editing.Util.LayerHelper",p,L);return p})},"dojox/date/islamic":function(){define(["dojox/main","dojo/_base/lang","dojo/date","./islamic/Date"],function(T,H,M,L){var p=H.getObject("date.islamic",!0,T);p.getDaysInMonth=function(g){return g.getDaysInIslamicMonth(g.getMonth(),g.getFullYear())};p.compare=function(g,e,c){g instanceof L&&(g=g.toGregorian());
e instanceof L&&(e=e.toGregorian());return M.compare.apply(null,arguments)};p.add=function(g,e,c){var m=new L(g);switch(e){case "day":m.setDate(g.getDate()+c);break;case "weekday":var u=g.getDay();if(5>u+c&&0<u+c)m.setDate(g.getDate()+c);else{var n=e=0;5==u?(u=4,n=0<c?-1:1):6==u&&(u=4,n=0<c?-2:2);u=0<c?5-u-1:-u;var v=c-u,w=parseInt(v/5);0!=v%5&&(e=0<c?2:-2);e=e+7*w+v%5+u;m.setDate(g.getDate()+e+n)}break;case "year":m.setFullYear(g.getFullYear()+c);break;case "week":c*=7;m.setDate(g.getDate()+c);break;
case "month":g=g.getMonth();m.setMonth(g+c);break;case "hour":m.setHours(g.getHours()+c);break;case "minute":m._addMinutes(c);break;case "second":m._addSeconds(c);break;case "millisecond":m._addMilliseconds(c)}return m};p.difference=function(g,e,c){e=e||new L;c=c||"day";var m=e.getFullYear()-g.getFullYear(),u=1;switch(c){case "weekday":m=Math.round(p.difference(g,e,"day"));u=parseInt(p.difference(g,e,"week"));if(0==m%7)m=5*u;else{c=0;var n=g.getDay(),v=e.getDay();u=parseInt(m/7);e=m%7;g=new L(g);
g.setDate(g.getDate()+7*u);g=g.getDay();if(0<m)switch(!0){case 5==n:c=-1;break;case 6==n:c=0;break;case 5==v:c=-1;break;case 6==v:c=-2;break;case 5<g+e:c=-2}else if(0>m)switch(!0){case 5==n:c=0;break;case 6==n:c=1;break;case 5==v:c=2;break;case 6==v:c=1;break;case 0>g+e:c=2}m=m+c-2*u}u=m;break;case "year":u=m;break;case "month":c=e.toGregorian()>g.toGregorian()?e:g;n=e.toGregorian()>g.toGregorian()?g:e;u=c.getMonth();v=n.getMonth();if(0==m)u=c.getMonth()-n.getMonth();else for(u=12-v+u,m=n.getFullYear()+
1,c=c.getFullYear(),m;m<c;m++)u+=12;e.toGregorian()<g.toGregorian()&&(u=-u);break;case "week":u=parseInt(p.difference(g,e,"day")/7);break;case "day":u/=24;case "hour":u/=60;case "minute":u/=60;case "second":u/=1E3;case "millisecond":u*=e.toGregorian().getTime()-g.toGregorian().getTime()}return Math.round(u)};return p})},"dojox/date/islamic/Date":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(T,H,M){var L=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 p=arguments.length;p?1==p?(p=arguments[0],"number"==typeof p&&(p=new Date(p)),p instanceof Date?this.fromGregorian(p):""==p?this._date=new Date(""):(this._year=p._year,this._month=p._month,this._date=p._date,this._hours=p._hours,this._minutes=p._minutes,this._seconds=p._seconds,this._milliseconds=p._milliseconds)):3<=p&&(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(p){p=parseInt(p);if(!(0<p&&p<=this.getDaysInIslamicMonth(this._month,this._year))){var g;if(0<p)for(g=this.getDaysInIslamicMonth(this._month,this._year);p>g;p-=g,g=this.getDaysInIslamicMonth(this._month,this._year))this._month++,12<=this._month&&(this._year++,this._month-=12);else for(g=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:this._year-1);0>=p;g=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),p+=g}this._date=p;return this},setFullYear:function(p){this._year=+p},setMonth:function(p){this._year+=Math.floor(p/12);this._month=0<p?Math.floor(p%12):Math.floor((p%12+12)%12)},setHours:function(){var p=arguments.length,g=0;1<=p&&(g=parseInt(arguments[0]));2<=p&&(this._minutes=parseInt(arguments[1]));3<=p&&(this._seconds=parseInt(arguments[2]));4==p&&(this._milliseconds=parseInt(arguments[3]));for(;24<=g;)this._date++,p=this.getDaysInIslamicMonth(this._month,
this._year),this._date>p&&(this._month++,12<=this._month&&(this._year++,this._month-=12),this._date-=p),g-=24;this._hours=g},_addMinutes:function(p){p+=this._minutes;this.setMinutes(p);this.setHours(this._hours+parseInt(p/60));return this},_addSeconds:function(p){p+=this._seconds;this.setSeconds(p);this._addMinutes(parseInt(p/60));return this},_addMilliseconds:function(p){p+=this._milliseconds;this.setMilliseconds(p);this._addSeconds(parseInt(p/1E3));return this},setMinutes:function(p){this._minutes=
p%60;return this},setSeconds:function(p){this._seconds=p%60;return this},setMilliseconds:function(p){this._milliseconds=p%1E3;return this},toString:function(){if(isNaN(this._date))return"Invalidate Date";var p=new Date;p.setHours(this._hours);p.setMinutes(this._minutes);p.setSeconds(this._seconds);p.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+p.toTimeString()},toGregorian:function(){var p=this._year;p=Math.floor(this._date+Math.ceil(29.5*this._month)+354*
(p-1)+Math.floor((3+11*p)/30)+this._ISLAMIC_EPOCH-1-.5)+.5;var g=p-this._GREGORIAN_EPOCH,e=Math.floor(g/146097),c=this._mod(g,146097);g=Math.floor(c/36524);var m=this._mod(c,36524);c=Math.floor(m/1461);m=this._mod(m,1461);m=Math.floor(m/365);e=400*e+100*g+4*c+m;4!=g&&4!=m&&e++;g=p-(this._GREGORIAN_EPOCH+365*(e-1)+Math.floor((e-1)/4)-Math.floor((e-1)/100)+Math.floor((e-1)/400));c=this._GREGORIAN_EPOCH-1+365*(e-1)+Math.floor((e-1)/4)-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor(739/12+(M.isLeapYear(new Date(e,
3,1))?-1:-2)+1);c=p<c?0:M.isLeapYear(new Date(e,3,1))?1:2;g=Math.floor((12*(g+c)+373)/367);c=this._GREGORIAN_EPOCH-1+365*(e-1)+Math.floor((e-1)/4)-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*g-362)/12+(2>=g?0:M.isLeapYear(new Date(e,g-1,1))?-1:-2)+1);return new Date(e,g-1,p-c+1,this._hours,this._minutes,this._seconds,this._milliseconds)},fromGregorian:function(p){p=new Date(p);var g=p.getFullYear(),e=p.getMonth(),c=p.getDate();g=this._GREGORIAN_EPOCH-1+365*(g-1)+Math.floor((g-1)/4)+
-Math.floor((g-1)/100)+Math.floor((g-1)/400)+Math.floor((367*(e+1)-362)/12+(2>=e+1?0:M.isLeapYear(p)?-1:-2)+c);g=Math.floor(g)+.5;g-=this._ISLAMIC_EPOCH;e=Math.floor((30*g+10646)/10631);c=Math.ceil((g-29-this._yearStart(e))/29.5);c=Math.min(c,11);this._date=Math.ceil(g-this._monthStart(e,c))+1;this._month=c;this._year=e;this._hours=p.getHours();this._minutes=p.getMinutes();this._seconds=p.getSeconds();this._milliseconds=p.getMilliseconds();this._day=p.getDay();return this},valueOf:function(){return this.toGregorian().valueOf()},
_yearStart:function(p){return 354*(p-1)+Math.floor((3+11*p)/30)},_monthStart:function(p,g){return Math.ceil(29.5*g)+354*(p-1)+Math.floor((3+11*p)/30)},_civilLeapYear:function(p){return 11>(14+11*p)%30},getDaysInIslamicMonth:function(p,g){var e=0;e=29+(p+1)%2;11==p&&this._civilLeapYear(g)&&e++;return e},_mod:function(p,g){return p-g*Math.floor(p/g)}});L.getDaysInIslamicMonth=function(p){return(new L).getDaysInIslamicMonth(p.getMonth(),p.getFullYear())};return L})},"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(T,H,M,L,p,g,e,c,m){function u(l,d,h,x,B){return B.replace(/([a-z])\1*/ig,function(D){var S=D.charAt(0);D=D.length;var K=["abbr","wide","narrow"];switch(S){case "G":var Q=d.eraAbbr[0];break;case "y":Q=String(l.getFullYear());break;case "M":Q=l.getMonth();if(3>D){Q+=1;var ia=!0}else S=["months-format",K[D-3]].join("-"),Q=d[S][Q];break;case "d":Q=l.getDate(!0);ia=!0;break;case "E":Q=l.getDay();3>D?(Q+=1,ia=!0):(S=["days-format",K[D-3]].join("-"),Q=d[S][Q]);break;case "a":Q=12>l.getHours()?"am":
"pm";Q=d["dayPeriods-format-wide-"+Q];break;case "h":case "H":case "K":case "k":ia=l.getHours();switch(S){case "h":Q=ia%12||12;break;case "H":Q=ia;break;case "K":Q=ia%12;break;case "k":Q=ia||24}ia=!0;break;case "m":Q=l.getMinutes();ia=!0;break;case "s":Q=l.getSeconds();ia=!0;break;case "S":Q=Math.round(l.getMilliseconds()*Math.pow(10,D-3));ia=!0;break;case "z":if(Q=L.getTimezoneName(l.toGregorian()))break;D=4;case "Z":Q=l.toGregorian().getTimezoneOffset();Q=[0>=Q?"+":"-",e.pad(Math.floor(Math.abs(Q)/
60),2),e.pad(Math.abs(Q)%60,2)];4==D&&(Q.splice(0,0,"GMT"),Q.splice(3,0,":"));Q=Q.join("");break;default:throw Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+B);}ia&&(Q=e.pad(Q,D));return Q})}function n(l,d,h,x){var B=function(K){return K};d=d||B;h=h||B;x=x||B;var D=l.match(/(''|[^'])+/g),S="'"==l.charAt(0);M.forEach(D,function(K,Q){K?(D[Q]=(S?h:d)(K),S=!S):D[Q]=""});return x(D.join(""))}function v(l,d,h,x){x=g.escapeString(x);p.normalizeLocale(h.locale);return x.replace(/([a-z])\1*/ig,
function(B){var D=B.charAt(0);var S=B.length,K="";h.strict?1<S&&(K="0{"+(S-1)+"}"):K="0?";switch(D){case "y":D="\\d+";break;case "M":D=2<S?"\\S+ ?\\S+":K+"[1-9]|1[0-2]";break;case "d":D="[12]\\d|"+K+"[1-9]|3[01]";break;case "E":D="\\S+";break;case "h":D=K+"[1-9]|1[0-2]";break;case "k":D=K+"\\d|1[01]";break;case "H":D=K+"\\d|1\\d|2[0-3]";break;case "K":D=K+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":D=K+"\\d|[0-5]\\d";break;case "S":D="\\d{"+S+"}";break;case "a":S=h.am||d["dayPeriods-format-wide-am"];
K=h.pm||d["dayPeriods-format-wide-pm"];h.strict?D=S+"|"+K:(D=S+"|"+K,S!=S.toLowerCase()&&(D+="|"+S.toLowerCase()),K!=K.toLowerCase()&&(D+="|"+K.toLowerCase()));break;default:D=".*"}l&&l.push(B);return"("+D+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var w=H.getObject("date.islamic.locale",!0,T);w.format=function(l,d){d=d||{};var h=p.normalizeLocale(d.locale),x=d.formatLength||"short",B=w._getIslamicBundle(h),D=[];h=H.hitch(this,u,l,B,h,d.fullYear);if("year"==d.selector)return l.getFullYear();"time"!=d.selector&&
(l=d.datePattern||B["dateFormat-"+x])&&D.push(n(l,h));"date"!=d.selector&&(d=d.timePattern||B["timeFormat-"+x])&&D.push(n(d,h));return D.join(" ")};w.regexp=function(l){return w._parseInfo(l).regexp};w._parseInfo=function(l){l=l||{};var d=p.normalizeLocale(l.locale);d=w._getIslamicBundle(d);var h=l.formatLength||"short",x=l.datePattern||d["dateFormat-"+h];h=l.timePattern||d["timeFormat-"+h];var B=[];return{regexp:n("date"==l.selector?x:"time"==l.selector?h:"undefined"==typeof h?x:x+" "+h,H.hitch(this,
v,B,d,l)),tokens:B,bundle:d}};w.parse=function(l,d){l=l.replace(/[\u200E\u200F\u202A\u202E]/g,"");d||(d={});var h=w._parseInfo(d),x=h.tokens,B=h.bundle;h=h.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");l=(new RegExp("^"+h+"$")).exec(l);p.normalizeLocale(d.locale);if(!l)return null;var D=[1389,0,1,0,0,0,0],S="",K=["abbr","wide","narrow"];M.every(l,function(Q,ia){if(!ia)return!0;ia=x[ia-1];var oa=ia.length;switch(ia.charAt(0)){case "y":D[0]=Number(Q);break;case "M":if(2<oa){if(ia=B["months-format-"+
K[oa-3]].concat(),d.strict||(Q=Q.replace(".","").toLowerCase(),ia=M.map(ia,function(pa){return pa?pa.replace(".","").toLowerCase():pa})),Q=M.indexOf(ia,Q),-1==Q)return!1}else Q--;D[1]=Number(Q);break;case "D":D[1]=0;case "d":D[2]=Number(Q);break;case "a":ia=d.am||B["dayPeriods-format-wide-am"];oa=d.pm||B["dayPeriods-format-wide-pm"];if(!d.strict){var ja=/\./g;Q=Q.replace(ja,"").toLowerCase();ia=ia.replace(ja,"").toLowerCase();oa=oa.replace(ja,"").toLowerCase()}if(d.strict&&Q!=ia&&Q!=oa)return!1;S=
Q==oa?"p":Q==ia?"a":"";break;case "K":24==Q&&(Q=0);case "h":case "H":case "k":D[3]=Number(Q);break;case "m":D[4]=Number(Q);break;case "s":D[5]=Number(Q);break;case "S":D[6]=Number(Q)}return!0});l=+D[3];"p"===S&&12>l?D[3]=l+12:"a"===S&&12==l&&(D[3]=0);return new c(D[0],D[1],D[2],D[3],D[4],D[5],D[6])};var C=[];w.addCustomFormats=function(l,d){C.push({pkg:l,name:d})};w._getIslamicBundle=function(l){var d={};M.forEach(C,function(h){h=p.getLocalization(h.pkg,h.name,l);d=H.mixin(d,h)},this);return d};w.addCustomFormats("dojo.cldr",
"islamic");w.getNames=function(l,d,h,x,B){x=w._getIslamicBundle(x);l=[l,h,d];if("standAlone"==h){h=l.join("-");var D=x[h];1==D[0]&&(D=void 0)}l[1]="format";return(D||x[l.join("-")]).concat()};w.weekDays=w.getNames("days","wide","format");w.months=w.getNames("months","wide","format");return w})},"dojox/timing":function(){define(["./timing/_base"],function(T){return T})},"dojox/timing/_base":function(){define(["dojo/_base/kernel","dojo/_base/lang"],function(T){T.experimental("dojox.timing");T.getObject("timing",
!0,dojox);dojox.timing.Timer=function(H){this.timer=null;this.isRunning=!1;this.interval=H;this.onStop=this.onStart=null};T.extend(dojox.timing.Timer,{onTick:function(){},setInterval:function(H){this.isRunning&&window.clearInterval(this.timer);this.interval=H;this.isRunning&&(this.timer=window.setInterval(T.hitch(this,"onTick"),this.interval))},start:function(){if("function"==typeof this.onStart)this.onStart();this.isRunning=!0;this.timer=window.setInterval(T.hitch(this,"onTick"),this.interval)},
stop:function(){if("function"==typeof this.onStop)this.onStop();this.isRunning=!1;window.clearInterval(this.timer)}});return dojox.timing})},"widgets/BatchAttributeEditor/customDrawBox":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./customDrawBox.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dojo/keys esri/graphic esri/toolbars/draw esri/symbols/jsonUtils".split(" "),function(T,H,M,L,p,g,e,c,m,u,n,
v,w,C){return T([H,M,L],{templateString:p,baseClass:"custom-draw-box",nls:null,config:null,types:null,pointSymbol:null,polylineSymbol:null,polygonSymbol:null,textSymbol:null,map:null,drawToolBar:null,showClear:!1,postMixInProperties:function(){this.nls=window.jimuNls.drawBox},postCreate:function(){this.inherited(arguments);this._initDefaultSymbols();this._initTypes();var l=u(".draw-item",this.domNode);this.own(l.on("click",g.hitch(this,this._onItemClick)));this.own(l.on("keydown",g.hitch(this,function(d){d.keyCode!==
n.ENTER&&d.keyCode!==n.SPACE||this._onItemClick(d)})));this.own(m(this.btnClear,"click",g.hitch(this,this.clear)));this.own(m(this.btnClear,"keydown",g.hitch(this,function(d){d.keyCode!==n.ENTER&&d.keyCode!==n.SPACE||this.clear()})));this.map&&this.setMap(this.map);e.setStyle(this.btnClear,"display",!0===this.showClear?"block":"none")},disableWebMapPopup:function(){if(this.map&&this.map.webMapResponse){var l=this.map.webMapResponse.clickEventHandle;l&&(l.remove(),this.map.webMapResponse.clickEventHandle=
null)}},enableWebMapPopup:function(){if(this.map&&this.map.webMapResponse){var l=this.map.webMapResponse.clickEventHandle,d=this.map.webMapResponse.clickEventListener;d&&!l&&(this.map.webMapResponse.clickEventHandle=m(this.map,"click",g.hitch(this.map,d)))}},destroy:function(){this.drawToolBar&&this.drawToolBar.deactivate();this.map=this.drawToolBar=null;this.inherited(arguments)},setMap:function(l){l&&(this.map=l,this.drawToolBar=new w(this.map),this.drawToolBar.setMarkerSymbol(this.pointSymbol),
this.drawToolBar.setLineSymbol(this.polylineSymbol),this.drawToolBar.setFillSymbol(this.polygonSymbol),this.own(m(this.drawToolBar,"draw-end",g.hitch(this,this._onDrawEnd))))},setPointSymbol:function(l){this.pointSymbol=l;this.drawToolBar.setMarkerSymbol(this.pointSymbol)},setLineSymbol:function(l){this.polylineSymbol=l;this.drawToolBar.setLineSymbol(l)},setPolygonSymbol:function(l){this.polygonSymbol=l;this.drawToolBar.setFillSymbol(l)},setTextSymbol:function(l){this.textSymbol=l},clear:function(){this.onClear()},
deactivate:function(){this.enableWebMapPopup();this.drawToolBar&&this.drawToolBar.deactivate();u(".draw-item",this.domNode).removeClass("selected")},onIconSelected:function(l,d,h){},onDrawEnd:function(l,d,h){},onClear:function(){},_initDefaultSymbols:function(){var l={style:"esriSMSCircle",color:[0,0,128,128],name:"Circle",outline:{color:[0,0,128,255],width:1},type:"esriSMS",size:18},d={style:"esriSLSSolid",color:[79,129,189,255],width:3,name:"Blue 1",type:"esriSLS"},h={style:"esriSFSSolid",color:[79,
129,189,128],type:"esriSFS",outline:{style:"esriSLSSolid",color:[54,93,141,255],width:1.5,type:"esriSLS"}};this.pointSymbol||(this.pointSymbol=C.fromJson(l));this.polylineSymbol||(this.polylineSymbol=C.fromJson(d));this.polygonSymbol||(this.polygonSymbol=C.fromJson(h))},_initTypes:function(){this.types instanceof Array||(this.types=["point","polyline","polygon"]);var l=u(".draw-item",this.domNode);l.style("display","none");c.forEach(l,g.hitch(this,function(d){var h=d.getAttribute("data-commontype"),
x=d.getAttribute("data-geotype");h=this.config.hasOwnProperty("drawTools")?0<this.config.drawTools.length?0<=c.indexOf(this.config.drawTools,x)?"block":"none":0<=c.indexOf(this.types,h)?"block":"none":0<=c.indexOf(this.types,h)?"block":"none";e.setStyle(d,"display",h)}))},_onItemClick:function(l){l=l.target||l.srcElement;var d=u(".draw-item",this.domNode);if(e.hasClass(l,"selected"))this.deactivate();else{d.removeClass("selected");e.addClass(l,"selected");d=l.getAttribute("data-geotype");var h=l.getAttribute("data-commontype"),
x=w[d];this.disableWebMapPopup();this.drawToolBar.activate(x);this.onIconSelected(l,d,h)}},_onDrawEnd:function(l){var d=u(".draw-item.selected",this.domNode)[0],h=d.getAttribute("data-geotype");d=d.getAttribute("data-commontype");l=l.geometry;var x=l.type,B=null;B="point"===x||"multipoint"===x?this.pointSymbol:"line"===x||"polyline"===x?this.polylineSymbol:this.polygonSymbol;l=new v(l,B,null,null);this.deactivate();this.onDrawEnd(l,h,d)}})})},"widgets/BatchAttributeEditor/layerSyncDetails":function(){define(["dojo/Evented",
"dojo/_base/declare","dojo/_base/lang","dojo/_base/array"],function(T,H,M,L){return H([T],{declaredClass:"layerSyncDetails",layerID:null,numberOfRequest:0,requestComplete:0,totalRecordsToSync:0,recordsSynced:0,recordsErrors:0,deferreds:[],complete:!1,hasError:!1,constructor:function(p){H.safeMixin(this,p)},addDeferred:function(p){p.then(M.hitch(this,function(g,e,c){L.forEach(e,function(m){m&&m.hasOwnProperty("success")&&!1===m.success&&m&&m.hasOwnProperty("error")&&(this.recordsErrors+=1,console.info(m.error))},
this);this.recordsSynced+=e.length;this.requestComplete+=1;this.emit("requestComplete",{layerID:this.layerID,countRequest:e.length,countSoFar:this.recordsSynced,totalToSync:this.totalRecordsToSync,addded:g,removed:c,errors:this.recordsErrors});this.isComplete()&&this.emit("complete",{})}),M.hitch(this,function(g){this.hasError=!0;console.log("error: "+g.message+"\nLayer: "+g.layer.title+"\ndetails: "+g.details);this.requestComplete+=1;this.recordsSynced+=g.chunk.length;this.recordsErrors+=g.chunk.length;
this.emit("requestComplete",{layerID:this.layerID,countRequest:g.chunk.length,countSoFar:this.recordsSynced,totalToSync:this.totalRecordsToSync,addded:null,removed:null,errors:this.recordsErrors});this.isComplete()&&this.emit("complete",{})}));this.deferreds.push(p)},isComplete:function(){return this.complete=this.numberOfRequest===this.requestComplete?!0:!1}})})},"widgets/BatchAttributeEditor/utils":function(){define(["dojo/_base/lang","dojo/_base/array","jimu/utils"],function(T,H,M){return{getFieldInfosFromWebmap:function(L,
p){var g=null,e=p.getLayerInfoByTopLayerId(L);e&&((L=e.getPopupInfo())&&L.fieldInfos?(g=T.clone(L.fieldInfos),e.layerObject&&H.forEach(g,function(c){H.some(e.layerObject.fields,function(m){if(c.fieldName===m.name)return c.type=m.type,!0})})):(g=[],e&&e.layerObject&&H.forEach(e.layerObject.fields,function(c){var m=M.getDefaultPortalFieldInfo(c);m.type=c.type;m.visible=!0;m.isEditable=!0;g.push(m)})));g&&H.forEach(g,function(c){c.format&&c.format.dateFormat&&c.format.dateFormat.toLowerCase()&&0<=c.format.dateFormat.toLowerCase().indexOf("time")&&
(c.format.time=!0)});return g}}})},"widgets/BatchAttributeEditor/PrivilegeUtil":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred jimu/portalUtils jimu/portalUrlUtils jimu/Role esri/kernel ./PortalAnalysis".split(" "),function(T,H,M,L,p,g,e,c){var m=null,u=T([],{userRole:null,userPortalUrl:null,portalAnalysis:null,portalSelf:null,portalUrl:null,constructor:function(n){this.portalUrl=n},_clearLoadedInfo:function(){this.portalUrl=this.portalSelf=this.portalAnalysis=this.userPortalUrl=
this.userRole=null},loadPrivileges:function(n){n&&this.portalUrl!==n&&(this._clearLoadedInfo(),this.portalUrl=n);if(this._privilegeLoaded())return n=new M,n.resolve(!0),n;n=L.getPortal(this.portalUrl);return n.haveSignIn()?this._loadUserInfo(n):this._signIn(n)},_signIn:function(n){return n.loadSelfInfo().then(H.hitch(this,function(v){var w=L.getPortal(v.portalHostname);return null===w?!1:null===w.credential?this._loadUserInfo(w):w.signIn().then(H.hitch(this,function(C){return this._loadUserInfo(w,
C)}),function(){return!1})}),function(){return!1})},_registerOrgCredential:function(n,v){v=p.getStandardPortalUrl(v);n=H.clone(n.toJson());v+="/sharing/rest";n.server=v;n.resources=[v];e.id.registerToken(n)},_loadUserInfo:function(n,v){return n.loadSelfInfo().then(H.hitch(this,function(w){this.userPortalUrl=w.urlKey?w.urlKey+"."+w.customBaseUrl:this.portalUrl;return w&&w.user?(this.userRole=new g({id:w.user.roleId?w.user.roleId:w.user.role,role:w.user.role}),w.user.privileges&&this.userRole.setPrivileges(w.user.privileges),
this.portalSelf=w,v&&this._registerOrgCredential(v,this.userPortalUrl),this.portalAnalysis=new c(this.userRole,this.portalSelf),!0):!1}),function(){return!1})},_privilegeLoaded:function(){return null!==this.portalSelf},getUser:function(){return this._privilegeLoaded()?this.portalSelf.user:null},isAdmin:function(){return this._privilegeLoaded()?this.userRole.isAdmin():!1},getUserPortal:function(){return this._privilegeLoaded()?this.userPortalUrl:null},isPortal:function(){return null!==this.portalSelf&&
!0===this.portalSelf.isPortal},canPerformAnalysis:function(){return null!==this.portalAnalysis&&this.portalAnalysis.canPerformAnalysis()},hasPrivileges:function(n){return null!==this.portalAnalysis&&this.portalAnalysis.hasPrivileges(n)}});u.getInstance=function(n){null===m&&(m=new u(n));return m};return u})},"widgets/BatchAttributeEditor/PortalAnalysis":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","esri/lang"],function(T,H,M,L){return T([],{userRole:null,portalSelf:null,
constructor:function(p,g){this.userRole=p;this.portalSelf=g},canPerformAnalysis:function(){var p=!1;this.userRole&&(this.userRole.isAdmin()||this.userRole.isPublisher())?p=!0:this.userRole&&this.userRole.isCustom()&&(p=this.userRole.canCreateItem()&&this.userRole.canPublishFeatures()&&this.userRole.canUseSpatialAnalysis());this.portalSelf&&this.portalSelf.isPortal&&(p=p&&L.isDefined(this.portalSelf.helperServices.analysis)&&L.isDefined(this.portalSelf.helperServices.analysis.url));return p},hasPrivileges:function(p){return H.isArray(p)?
M.every(p,function(g){return"networkanalysis"===g?this._canPerformNetworkAnalysis():"geoenrichment"===g?this._canPerformGeoEnrichment():"elevation"===g?this._canPerformElevationAnalysis():"drivetimearea"===g?this._canPerformDriveAnalysis():"planroutes"===g?this._canPerformPlanRoutesAnalysis():"od"===g?this._canPerformODAnalysis():!1},this):!0},_canPerformNetworkAnalysis:function(){var p=L.isDefined(this.portalSelf.helperServices.asyncClosestFacility)&&L.isDefined(this.portalSelf.helperServices.asyncServiceArea)&&
L.isDefined(this.portalSelf.helperServices.asyncVRP);return this.canPerformAnalysis()&&p&&this.userRole.canUseNetworkAnalysis()},_canPerformGeoEnrichment:function(){var p=L.isDefined(this.portalSelf.helperServices.geoenrichment);return this.canPerformAnalysis()&&p&&this.userRole.canUseGeoenrichment()},_canPerformElevationAnalysis:function(){var p=L.isDefined(this.portalSelf.helperServices.elevation);return this.canPerformAnalysis()&&p&&this.userRole.canUseElevation()},_canPerformPlanRoutesAnalysis:function(){var p=
L.isDefined(this.portalSelf.helperServices.routingUtilities)&&L.isDefined(this.portalSelf.helperServices.asyncVRP);return this.canPerformAnalysis()&&p&&this.userRole.canUseNetworkAnalysis()},_canPerformODAnalysis:function(){var p=L.isDefined(this.portalSelf.helperServices.routingUtilities)&&L.isDefined(this.portalSelf.helperServices.asyncRoute);return this.canPerformAnalysis()&&p&&this.userRole.canUseNetworkAnalysis()},_canPerformDriveAnalysis:function(){var p=L.isDefined(this.portalSelf.helperServices.routingUtilities)&&
L.isDefined(this.portalSelf.helperServices.asyncServiceArea);return this.canPerformAnalysis()&&p&&this.userRole.canUseNetworkAnalysis()},_canPerformNearestAnalysis:function(){var p=L.isDefined(this.portalSelf.helperServices.routingUtilities)&&L.isDefined(this.portalSelf.helperServices.asyncClosestFacility);return this.canPerformAnalysis()&&p&&this.userRole.canUseNetworkAnalysis()}})})},"widgets/BatchAttributeEditor/filterAppend":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./filterAppend.html dojo/_base/lang dojo/_base/html dojo/_base/array dojo/on dojo/query dojo/keys dojo/dom-style dojo/dom esri/graphic esri/toolbars/draw esri/symbols/jsonUtils".split(" "),
function(T,H,M,L,p,g,e,c,m,u,n,v,w,C,l,d){return T([H,M,L],{templateString:p,baseClass:"filter-append",nls:null,appendChoice:"AND",postMixInProperties:function(){},postCreate:function(){this.inherited(arguments);v.set(this.slAppendChoice.domNode,"font-size","12px");this.slAppendChoice.set("value",this.appendChoice)},getAppendChoice:function(){this.appendChoice=this.slAppendChoice.value},destroy:function(){this.inherited(arguments)}})})},"widgets/BatchAttributeEditor/_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/BatchAttributeEditor/customDrawBox.html":'\x3cdiv style\x3d"position:relative;width:100%;"\x3e\r\n    \x3cdiv class\x3d"draw-items"\x3e\r\n        \x3cdiv title\x3d"${nls.point}" data-geotype\x3d"POINT" data-commontype\x3d"point" class\x3d"draw-item point-icon" data-dojo-attach-point\x3d"toolPoint" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.line}" data-geotype\x3d"LINE" data-commontype\x3d"polyline" class\x3d"draw-item line-icon" data-dojo-attach-point\x3d"toolLine" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.polyline}" data-geotype\x3d"POLYLINE" data-commontype\x3d"polyline" class\x3d"draw-item polyline-icon" data-dojo-attach-point\x3d"toolPolyline" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.freehandPolyline}" data-geotype\x3d"FREEHAND_POLYLINE" data-commontype\x3d"polyline" class\x3d"draw-item freehand-polyline-icon" data-dojo-attach-point\x3d"toolFreehandPolyline" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.extent}" data-geotype\x3d"EXTENT" data-commontype\x3d"polygon" class\x3d"draw-item extent-icon" data-dojo-attach-point\x3d"toolExtent" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.polygon}" data-geotype\x3d"POLYGON" data-commontype\x3d"polygon" class\x3d"draw-item polygon-icon" data-dojo-attach-point\x3d"toolPolygon" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cdiv title\x3d"${nls.freehandPolygon}" data-geotype\x3d"FREEHAND_POLYGON" data-commontype\x3d"polygon" class\x3d"draw-item freehand-polygon-icon" data-dojo-attach-point\x3d"toolFreehandPolygon" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n        \x3cspan class\x3d"drawings-clear jimu-float-trailing" data-dojo-attach-point\x3d"btnClear" tabIndex\x3d0 role\x3d"button"\x3e${nls.clear}\x3c/span\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/BatchAttributeEditor/filterAppend.html":'\x3cdiv style\x3d"position:relative;width:100%;"\x3e\r\n  \x3cdiv style\x3d"font-size:12px;"\x3e${nls.filterAppend}\x3c/div\x3e\r\n  \x3cselect name\x3d"slAppendChoice" id\x3d"slAppendChoice" data-dojo-type\x3d"dijit/form/Select" data-dojo-attach-point\x3d"slAppendChoice"\x3e\r\n    \x3coption value\x3d"AND"\x3e${nls.filterAppendAND}\x3c/option\x3e\r\n    \x3coption value\x3d"OR"\x3e${nls.filterAppendOR}\x3c/option\x3e\r\n  \x3c/select\x3e   \r\n\x3c/div\x3e',
"url:widgets/BatchAttributeEditor/Widget.html":'\r\n\x3cdiv style\x3d"width:100%;height:100%;min-width:270px;min-height:120px;"\x3e\r\n  \x3cdiv class\x3d"loading-indicator hide" data-dojo-attach-point\x3d"loadingImage"\x3e\x3c/div\x3e\r\n  \x3cdiv class\x3d"widget-intro" data-dojo-attach-point\x3d"widgetIntro" tabIndex\x3d0\x3e\x3c/div\x3e\r\n\t\x3cdiv class\x3d"layer-draw-container" data-dojo-attach-point\x3d"layerDrawContainer"\x3e\r\n\t  \x3cdiv class\x3d"widget-layers-table" data-dojo-attach-point\x3d"tableLayerInfos"\x3e\x3c/div\x3e\r\n\t  \x3cdiv data-dojo-attach-point\x3d"tableLayerInfosError" class\x3d"widget-error" style\x3d"display:none"\x3e${nls.noConfiguredLayers}\x3c/div\x3e\r\n\t  \x3cdiv data-dojo-attach-point\x3d"selectionTool" id\x3d"selectionTool" class\x3d"widget-draw-control" tabIndex\x3d0 role\x3d"button"\x3e\x3c/div\x3e\r\n\t  \x3cdiv data-dojo-attach-point\x3d"resultsMessage" class\x3d"widget-results"\x3e\x3c/div\x3e\r\n\t  \x3cdiv class\x3d"jimu-btn clearBtn" data-dojo-attach-point\x3d"btnClear" data-dojo-attach-event\x3d"click:_clearResultsEvent" tabIndex\x3d0 role\x3d"button"\x3e${nls.clear}\x3c/div\x3e\r\n\t  \x3cdiv data-dojo-attach-point\x3d"loading" data-dojo-type\x3d"jimu/dijit/LoadingIndicator" data-dojo-props\x3d\'hidden:true\'\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/BatchAttributeEditor/css/style.css":'.custom-draw-box {overflow-y: hidden;}.custom-draw-box .draw-items {overflow-y: hidden;}.custom-draw-box .draw-items .draw-item {width: 40px; height: 40px; background-repeat: no-repeat; text-align: center; float: left; margin: 7px;}.jimu-rtl .custom-draw-box .draw-items .draw-item {float: right;}.custom-draw-box .draw-item, .custom-draw-box .draw-item:hover {background-color: rgba(255, 255, 255, 0.5) !important;}.custom-draw-box .draw-item:hover {background-color: #CFCFCF !important;}.custom-draw-box .selected {background-color: #CFCFCF !important;}.custom-draw-box .point-icon {background-image: url("images/point.png");}.custom-draw-box .line-icon {background-image: url("images/line.png");}.custom-draw-box .polyline-icon {background-image: url("images/polyline.png");}.custom-draw-box .freehand-polyline-icon {background-image: url("images/freehand_polyline.png");}.custom-draw-box .extent-icon {background-image: url("images/extent.png");}.custom-draw-box .polygon-icon {background-image: url("images/polygon.png");}.custom-draw-box .freehand-polygon-icon {background-image: url("images/freehand_polygon.png");}.custom-draw-box .drawings-clear {text-decoration: underline; cursor: pointer; display: block; margin-top: 7px;}.esriPopup .hidden {display: none !important;}.bae-attCombo {margin-bottom: 1px; margin-top: 1px; margin-left: 1px;}.jimu-widget-edit-infoWindow .esriAttributeInspector {width: 100%;} .jimu-widget-edit-infoWindow .esriAttributeInspector .atiAttributes table {width: 100%;} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitTextBox {width: 100%;} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitInputField {} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitTextBox .dijitInputInner {} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitTextBoxFocused {border-color: #406b9b !important; box-shadow: 0 0 0 #ffffff !important;} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitTextBoxHover {background-color: #ffffff; background-image: none; border-color: #406b9b !important;} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitArrowButton.dijitDownArrowButton.dijitArrowButtonContainer {position: static !important;} .jimu-widget-edit-infoWindow .esriAttributeInspector .atiRichTextField {} .jimu-widget-edit-infoWindow .esriAttributeInspector div.dijitEditorIFrameContainer {height: 78px;} .jimu-widget-edit-infoWindow .esriAttributeInspector .dijitTextBox.dijitTextArea {height: 32px;} .jimu-widget-edit-infoWindow .esriAttributeInspector .atiButton {margin: 0 10px 0 0; float: none; width: auto;}.jimu-rtl .jimu-widget-edit-infoWindow .esriAttributeInspector .atiButton {margin: 0 0 0 45px;}.solutions-widget-batcheditor .widget-draw-control {margin: 10px 0px 0px 0px;}.solutions-widget-batcheditor .hide {display: none;}.solutions-widget-batcheditor .widget-intro {margin: 0px 5px 20px 5px; font-size: 14px; color: #777777; line-height: 150%;}.solutions-widget-batcheditor .widget-error {font-size: 14px; color: #8A0808;}.solutions-widget-batcheditor td.simple-table-td.normal-text-td.syncProcessing {color: mediumorchid;}.solutions-widget-batcheditor td.simple-table-td.normal-text-td.syncComplete {color: #777777;}.solutions-widget-batcheditor td.simple-table-td.normal-text-td.syncSkipped {color: orange;}.solutions-widget-batcheditor .widget-layers-table {margin: 0px -14px 0px -14px; font-size: 12px;} .solutions-widget-batcheditor .widget-layers-table .selectioncount {width: 50px;} .solutions-widget-batcheditor .widget-layers-table .layerLabel {width: 185px; -ms-text-overflow: ellipsis; -o-text-overflow: ellipsis; text-overflow: ellipsis;} .solutions-widget-batcheditor .widget-layers-table .isSelectable {width: 30px; padding-left: 5px; padding-right: 0;}.jimu-rtl .solutions-widget-batcheditor .widget-layers-table .isSelectable {width: 30px; padding-right: 5px !important;}.solutions-widget-batcheditor .widget-layers-table .actions {width: 25px;}.solutions-widget-batcheditor .widget-layers-table .syncStatus {width: auto;}.solutions-widget-batcheditor .widget-layers-table .maxRecordCount {color: #8A0808 !important; font-weight: bold !important;}.solutions-widget-batcheditor .widget-layers-table .errorSelecting {color: #f3a911 !important; font-weight: bold !important;}.solutions-widget-batcheditor .layerInIntro {font-weight: bold; color: #000000;}.solutions-widget-batcheditor .maxRecordInIntro {color: #8A0808; font-weight: bold;}.solutions-widget-batcheditor .loading-indicator {height: 100%; width: 100%; z-index: 500; position: absolute; top: 0; left: 0; overflow: hidden; background: rgba(128, 128, 128, 0.10); background-position: center center; background-image: url(../images/preloader.gif); background-repeat: no-repeat;}.solutions-widget-batcheditor .widget-controls {width: 100%; margin-top: 15px;}.solutions-widget-batcheditor .clearBtn {margin-right: 5px; margin-left: 5px; float: right !important; display: inline-block !important;}.jimu-rtl .solutions-widget-batcheditor .clearBtn {float: left !important;}.solutions-widget-batcheditor .widget-results {font-size: 14px; font-style: italic; color: #777777; margin-left: 10px; margin-right: 10px; margin-bottom: 10px;}.solutions-widget-batcheditor .filtered {color: #000000; font-weight: bold;}.jimu-simple-table .simple-table-title {color: #000000; font-weight: bold; background-color: #E3E3E3;}.jimu-icon-edit {background-image: url(../css/images/edit_gray_normal.png); background-position: 0 0; width: 16px; height: 16px;} .jimu-icon-edit:hover {background-image: url(../css/images/edit_gray_hover.png); background-position: 0 0; width: 16px; height: 16px;}',
"*now":function(T){T(['dojo/i18n!*preload*widgets/BatchAttributeEditor/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 dijit dojo/_base/declare dijit/_WidgetsInTemplateMixin dijit/form/Button dijit/form/TextBox dijit/form/ComboBox dijit/form/Select dijit/form/DateTextBox dijit/form/TimeTextBox dijit/registry dijit/layout/ContentPane dojo/dom dojo/_base/lang dojo/_base/html dojo/on dojo/aspect dojo/dom-construct dojo/_base/array dojo/dom-style dojo/dom-class dojo/query dojo/promise/all dojo/Deferred dojo/string dojo/store/Memory dojo/dom-attr dojo/dnd/Moveable dojo/when dojox/html/entities dojo/date/locale dojo/json dojo/keys jimu/BaseWidget jimu/MapManager jimu/dijit/SimpleTable jimu/dijit/LoadingIndicator jimu/dijit/Filter jimu/FilterManager jimu/dijit/Popup esri/dijit/Popup jimu/utils jimu/LayerInfos/LayerInfos esri esri/graphic esri/InfoTemplate esri/layers/FeatureLayer esri/tasks/FeatureSet esri/dijit/AttributeInspector esri/tasks/query esri/symbols/jsonUtils esri/toolbars/draw esri/geometry/geometryEngine esri/geometry/scaleUtils esri/geometry/Polygon esri/renderers/jsonUtils dojox/timing jimu/dijit/Message jimu/portalUrlUtils ./customDrawBox ./layerSyncDetails ./utils ./PrivilegeUtil ./filterAppend".split(" "),function(T,
H,M,L,p,g,e,c,m,u,n,v,w,C,l,d,h,x,B,D,S,K,Q,ia,oa,ja,pa,F,Y,V,a,f,z,I,G,W,R,X,U,ta,ma,ka,q,r,E,N,ba,na,da,la,ea,fa,sa,Ca,Ka,La,Ma,Da,Ga,Na,Ha,Oa,Pa,Qa){return M([I,L],{baseClass:"solutions-widget-batcheditor",layersTable:null,updateLayers:null,helperLayer:null,helperEditFieldInfo:null,attrInspector:null,toolType:"Area",drawBox:null,selectByLayer:null,searchTextBox:null,mouseClickPos:null,selectQuery:null,timer:null,syncLayers:null,expressionLayers:null,drawnGrph:null,clickList:null,editPopup:null,
filterAppendOperator:[],_jimuLayerInfos:null,_userHasPrivilege:!1,_featureReductionEnabledLayers:[],_layerInfoParamArrayUseForRervertRenderre:[],startup:function(){this.inherited(arguments);this.editPopup=new ma(null,l.create("div",{"class":"jimu-widget-edit-infoWindow"},null,this.map.root))},postCreate:function(){this.inherited(arguments);this.nls=C.mixin(this.nls,window.jimuNls.common);this._setFirstLastNodeOnMainScreen();this.checkValidPermission()},_initSelectLayer:function(){if("Feature"===this.toolType||
"FeatureQuery"===this.toolType)B.some(this.map.itemInfo.itemData.operationalLayers,function(b){if(null!==b.layerObject&&void 0!==b.layerObject&&"Feature Layer"===b.layerObject.type&&b.url&&(this.config.selectByLayer.name===b.name||this.config.selectByLayer.name===b.title)){this.selectByLayer=b;if(this.config.selectByLayer.selectionSymbol){var k=ea.fromJson(this.config.selectByLayer.selectionSymbol);null!==k&&b.layerObject.setSelectionSymbol(k)}return!0}return!1},this),null===this.selectByLayer&&Da({message:oa.substitute(this.nls.errors.layerNotFound,
{0:this.config.selectByLayer.name,1:this.config.selectByLayer.id})})},_setTheme:function(){"BoxTheme"===this.appConfig.theme.name||"DartTheme"===this.appConfig.theme.name?ka.loadStyleLink("dartOverrideCSS",this.folderUrl+"/css/dartTheme.css",null):"LaunchpadTheme"===this.appConfig.theme.name&&ka.loadStyleLink("luanchOverrideCSS",this.folderUrl+"/css/launchPadTheme.css",null)},_configureWidget:function(){fa.addPoint=this.nls.drawBox.addPointToolTip;fa.addShape=this.nls.drawBox.addShapeToolTip;fa.freehand=
this.nls.drawBox.freehandToolTip;fa.start=this.nls.drawBox.startToolTip;r.bundle.toolbars.draw.addPoint=this.nls.drawBox.addPointToolTip;r.bundle.toolbars.draw.addShape=this.nls.drawBox.addShapeToolTip;r.bundle.toolbars.draw.freehand=this.nls.drawBox.freehandToolTip;r.bundle.toolbars.draw.start=this.nls.drawBox.startToolTip;this.existingText={};this.existingText.addPoint=fa.addPoint;this.existingText.addShape=fa.addShape;this.existingText.freehand=fa.freehand;this.existingText.start=fa.start;this.create_drawbox()},
_btnSearchClick:function(){this.loading.show();this._hideInfoWindow();this.mouseClickPos=this.map.extent.getCenter();this._selectInShape(null,this.searchTextBox.get("value"))},_findField:function(b,k){return B.filter(b,function(t){return t.name===k})},_selectInShape:function(b,k){this._clearResults(!0,!1);this.selectByLayer&&null!==this.selectByLayer&&this.selectByLayer.layerObject&&null!==this.selectByLayer.layerObject&&this.clickList.push(d(this.selectByLayer.layerObject,"click",C.hitch(this,function(){this.map.infoWindow.isShowing||
this.map.infoWindow.show(this.mouseClickPos,this.map.getInfoWindowAnchor(this.mouseClickPos))})));var t={},A,y=new la;if(null!==b)if("point"===b.type||"polyline"===b.type){var P=Ca.getUnitValueForSR(this.map.spatialReference);y.geometry=sa.buffer(b,10,P)}else y.geometry="extent"===b.type?Ka.fromExtent(b):b;var J,O=[];B.forEach(this.layersTable.getRows(),function(Z){A=this.layersTable.getRowData(Z);!0===A.isSelectable&&O.push(V.decode(A.label))},this);y.spatialRelationship=la.SPATIAL_REL_INTERSECTS;
B.forEach(this.updateLayers,function(Z){if(0<=O.indexOf(Z.title)||0<=O.indexOf(Z.layerObject.name)){k&&((J=this._findField(Z.layerObject.fields,Z.queryField))?0<J.length?-1<["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeOID"].indexOf(J[0].type)?y.where=Z.queryField.toString()+" \x3d "+k.toString():y.where=Z.queryField.toString()+" \x3d '"+k.toString()+"'":console.log("field not found in layer"):console.log("field not found in layer"));
var ha=new ia;Z.layerObject.visible&&(Z.layerObject.selectFeatures(y,ba.SELECTION_NEW,function(aa){ha.resolve({features:aa})},function(aa){ha.resolve({features:[],error:aa})}),t[Z.id]=ha)}},this);this.isEmptyObject(t)?this.loading.hide():Q(t).then(C.hitch(this,this._layerQueriesComplete))},isEmptyObject:function(b){for(var k in b)if(Object.prototype.hasOwnProperty.call(b,k))return!1;return!0},_selectSearchLayer:function(b){var k=new la;if("point"===b.type||"polyline"===b.type){var t=Ca.getUnitValueForSR(this.map.spatialReference);
k.geometry=sa.buffer(b,10,t)}else k.geometry=b;"FeatureQuery"===this.toolType&&(k.outFields=[this.config.selectByLayer.queryField]);k.spatialRelationship=la.SPATIAL_REL_INTERSECTS;this.selectByLayer.layerObject.selectFeatures(k,ba.SELECTION_NEW).then(C.hitch(this,this._searchByLayerComplete))},_searchByLayerComplete:function(b){0<b.length?"FeatureQuery"===this.toolType?(b=b[0].attributes[this.config.selectByLayer.queryField],null===b?(new Da({message:oa.substitute(this.nls.errors.queryNullID,{0:this.selectByLayer.title})}),
this._hideInfoWindow(),this.loading.hide()):this._selectInShape(null,b)):this._selectInShape(b[0].geometry):(this._hideInfoWindow(),this.loading.hide())},_clearRowHighlight:function(b){var k,t,A;B.forEach(this.layersTable.getRows(),function(y){k=K(".layerLabel",y).shift();t=K(".numSelected",y).shift();A=K(".syncStatus",y).shift();l.removeClass(k,"maxRecordCount");l.removeClass(k,"errorSelecting");l.removeClass(t,"maxRecordCount");l.removeClass(A,"syncComplete");l.removeClass(A,"syncProcessing");l.removeClass(A,
"syncSkipped")},this);!0===b&&(this.resultsMessage.innerHTML="")},_layerQueriesComplete:function(b){var k=[],t,A,y,P,J,O,Z=null;B.forEach(this.layersTable.getRows(),function(ha){t=this.layersTable.getRowData(ha);b.hasOwnProperty(t.ID)&&(Z=b[t.ID],A=Z.features,y=this.map.getLayer(t.ID),k=k.concat(A),P={numSelected:A.length.toString()},this.layersTable.editRow(ha,P),J=K(".layerLabel",ha).shift(),O=K(".numSelected",ha).shift(),0<A.length?A.length>=y.maxRecordCount?(l.addClass(J,"maxRecordCount"),l.addClass(O,
"maxRecordCount")):(l.removeClass(J,"maxRecordCount"),l.removeClass(O,"maxRecordCount")):(l.removeClass(J,"maxRecordCount"),l.removeClass(O,"maxRecordCount")),Z.hasOwnProperty("error")?(console.log("Error selecting data from "+J.innerText.toString().trim()+": "+Z.error.toString()),l.addClass(J,"errorSelecting")):l.removeClass(O,"errorSelecting"),0<A.length&&this.clickList.push(d(y,"click",C.hitch(this,function(){this.map.infoWindow.isShowing||this.map.infoWindow.show(this.mouseClickPos,this.map.getInfoWindowAnchor(this.mouseClickPos))}))))},
this);this._updateSelectionCount(k.length);0<k.length?(this._summarizeFeatureFields(k),this._createAttributeInspector(),this._createQueryParams(),this.helperLayer.selectFeatures(this.selectQuery,ba.SELECTION_NEW,C.hitch(this,this._helperLayerSelectCallback),C.hitch(this,this._errorCallback))):(this._hideInfoWindow(),this.loading.hide())},_onDrawEnd:function(b){this.loading.show();this.drawnGrph=b;this._hideInfoWindow();this.mouseClickPos="esriGeomtryTypePoint"===b.geometryType?b:"extent"===b.geometry.type?
b.geometry.getCenter():"polygon"===b.geometry.type?b.geometry.getCentroid():"polyline"===b.geometry.type?b.geometry.getExtent().getCenter():b.geometry;"Area"===this.toolType?this._selectInShape(b.geometry):"Feature"===this.toolType?this._selectSearchLayer(b.geometry):"FeatureQuery"===this.toolType&&this._selectSearchLayer(b.geometry)},_errorCallback:function(){this.loading.hide()},_helperLayerSelectCallback:function(b){0<b.length?(this._bindEvents(),this.map.infoWindow.isShowing||(this.map.infoWindow.setTitle(this.label),
this.map.infoWindow.setContent(this.attrInspector.domNode),this.map.infoWindow.show(this.mouseClickPos,this.map.getInfoWindowAnchor(this.mouseClickPos)),this._updateTabNodes("attributeInspector"))):this._hideInfoWindow();this.loading.hide()},_clearGraphics:function(){this.drawBox&&this.drawBox.drawLayer&&this.drawBox.drawLayer.clear();B.forEach(this.updateLayers,function(b){null!==b.layerObject&&b.layerObject.clearSelection()});this._hideInfoWindow()},_togglePanelLoadingIcon:function(){l.hasClass(this.loadingImage,
"hide")?l.removeClass(this.loadingImage,"hide"):l.addClass(this.loadingImage,"hide")},_createQueryParams:function(){this.selectQuery=new la;this.selectQuery.objectIds=[1]},loadLayerTable:function(){this.updateLayers=[];var b="",k=!1;B.forEach(this.map.itemInfo.itemData.operationalLayers,function(A){if(null!==A.layerObject&&void 0!==A.layerObject&&"Feature Layer"===A.layerObject.type&&A.url&&!0===A.layerObject.isEditable()){var y=B.filter(this.config.updateLayers,function(J){return V.decode(J.name)===
A.title});if(0<y.length){if(y[0].selectionSymbol){var P=ea.fromJson(y[0].selectionSymbol);A.layerObject.setSelectionSymbol(P)}A.queryField=y[0].queryField;this.updateLayers.push(A);b=A.title;this.layersTable.addRow({isSelectable:!0,label:b,ID:A.layerObject.id,numSelected:"0",selectionSymbol:null});k=!0}}},this);var t=this.layersTable.getRows();B.forEach(t,C.hitch(this,function(A){var y=K(".actions-td .action-item-parent",A);D.set(y[0],"display","block");y=A.childNodes[1];pa.set(y,"tabIndex",0);pa.set(y,
"aria-label",this.nls.filterPopup);this.own(d(y,"keydown",C.hitch(this,function(P){P.keyCode!==z.ENTER&&P.keyCode!==z.SPACE||this._showFilter(A)})));pa.set(A.childNodes[2],"tabIndex",0);pa.set(A.childNodes[3],"tabIndex",0)}));k?D.set(this.tableLayerInfosError,"display","none"):D.set(this.tableLayerInfosError,"display","")},createLayerTable:function(){var b={fields:[{name:"isSelectable",title:"",type:"checkbox","class":"isSelectable",tabIndex:0},{name:"actions",title:'\x3cimg src\x3d"'+this.folderUrl+
'css/images/filter.png" width\x3d16 height\x3d16\x3e',type:"actions",actions:["edit"],"class":"isSelectable",tabIndex:0},{name:"numSelected",title:this.nls.layerTable.numSelected,type:"text","class":"selectioncount"},{name:"label",title:this.nls.layerTable.colLabel,type:"text","class":"layerLabel"},{name:"syncStatus",type:"text",title:this.nls.layerTable.colSyncStatus,"class":"syncStatus"},{name:"ID",type:"text",hidden:!0}],selectable:!1,tabIndex:0};x.empty(this.tableLayerInfos);this.layersTable=
new W(b);this.layersTable.placeAt(this.tableLayerInfos);this.layersTable.startup();K("th.simple-table-field",this.layersTable.domNode).forEach(function(k){0<=k.innerHTML.indexOf("\x3cimg")&&(k.title=this.nls.filterPopup)},this);this.own(d(this.layersTable,"actions-edit",C.hitch(this,function(k){this._showFilter(k)})))},disableWebMapPopup:function(){var b=G.getInstance();b.disableWebMapPopup();this.map.infoWindow.hide();this.map.setInfoWindow(this.editPopup);this._enableMapClickHandler();null===this._mapInfoStorage.resetInfoWindow&&
(this._mapInfoStorage.resetInfoWindow=b.resetInfoWindow,this.own(d(this.map.infoWindow,"show",C.hitch(this,function(){window.appInfo.isRunInMobile&&this.map.infoWindow.maximize()}))));b.resetInfoWindow=C.hitch(this,function(){})},enableWebMapPopup:function(){var b=G.getInstance(),k=b.getMapInfoWindow();this._mapInfoStorage.resetInfoWindow&&(this.map.setInfoWindow(k.bigScreen),b.isMobileInfoWindow=!1,b.resetInfoWindow=C.hitch(b,this._mapInfoStorage.resetInfoWindow),this._mapInfoStorage.resetInfoWindow=
null,b.resetInfoWindow(),this._disableMapClickHandler(),this.editPopup.hide(),b.enableWebMapPopup())},_enableMapClickHandler:function(){},_disableMapClickHandler:function(){},_addHelperLayer:function(){this.helperLayer=this._createHelperLayer()},_createHelperLayer:function(){if(0!==this.updateLayers.length){var b=this.updateLayers[0],k={geometryType:"esriGeometryPoint",features:[{attributes:this._generateHelperLayerAttributes(b)}]};k=new na(k);var t={name:"",fields:this._generateHelperLayerFields(b),
objectIdField:this._generateHelperObjIdField(b),capabilities:"Create,Delete,Query,Update,Uploads,Editing"},A=new ba({layerDefinition:t,featureSet:k},{outFields:["*"],infoTemplate:null,editable:!0});d(A,"load",C.hitch(this,function(){A.setEditable(!0)}));A.originLayer=b.id;this.helperEditFieldInfo=this._generateHelperLayerFieldsInfos(b,t.fields);A._map=this.map;return A}},_processLayerFields:function(b){B.forEach(b,function(k){"esriFieldTypeOID"!==k.type&&(k.addnullable=k.nullable,k.nullable=!0);void 0!==
k.domain&&null!==k.domain&&void 0!==k.domain.type&&null!==k.domain.type&&"range"===k.domain.type&&!1===k.domain.hasOwnProperty("range")&&(k.domain.range=[k.domain.minValue,k.domain.maxValue])});return b},_generateHelperLayerAttributes:function(b){var k={},t=B.map(this.config.commonFields,function(A){return A.name});B.forEach(b.layerObject.fields,function(A){"esriFieldTypeOID"===A.type||A.name===b.layerObject.objectIdField?k[A.name]=1:-1<t.indexOf(A.name)&&(k[A.name]=null)},this);return k},_generateHelperLayerFields:function(b){var k=
[],t=B.map(this.config.commonFields,function(y){return y.name}),A=C.clone(b.layerObject.fields);B.forEach(A,function(y){"esriFieldTypeOID"===y.type||y.name===b.layerObject.objectIdField?(y.typeOrigin=y.type,y.type="esriFieldTypeOID",y.hasOwnProperty("description")&&"string"!==typeof y.description&&(y.description=JSON.stringify(y.description)),k.push(y)):-1<t.indexOf(y.name)&&(y.typeOrigin=y.type,y.type="esriFieldTypeString",y.hasOwnProperty("description")&&"string"!==typeof y.description&&(y.description=
JSON.stringify(y.description)),k.push(y))},this);this._processLayerFields(k);return k},_generateHelperObjIdField:function(b){var k=null;B.forEach(b.layerObject.fields,function(t){t.name===b.layerObject.objectIdField&&(k=t.name)},this);return k},_getDefaultFieldInfos:function(b){return Oa.getFieldInfosFromWebmap(b,this._jimuLayerInfos)},_generateHelperLayerFieldsInfos:function(b,k){var t=[];this.baeFields={};var A=[];B.forEach(k,function(y){A[y.name]=y});k=this._getDefaultFieldInfos(b.id);B.forEach(k,
function(y){A.hasOwnProperty(y.fieldName)&&("OBJECTID"===y.fieldName.toUpperCase()||y.fieldName===b.layerObject.objectIdField?(y.isEditable=!1,y.visible=!1,y.typeOrigin=A[y.fieldName].typeOrigin):(this.baeFields[y.fieldName]=""!==y.label.toString().trim()?y.label:y.fieldName,y.isEditable=!0,y.domain=void 0===A[y.fieldName].domain?null:A[y.fieldName].domain,y.length=void 0===A[y.fieldName].length?null:A[y.fieldName].length,y.addnullable=void 0===A[y.fieldName].addnullable?null:A[y.fieldName].addnullable,
y.visible=!0,y.typeOrigin=A[y.fieldName].typeOrigin,t.push(y)))},this);return t},_bindEvents:function(){this._attTable=K("td.atiLabel",this.attrInspector.domNode);void 0!==this._attTable&&null!==this._attTable&&0<this._attTable.length&&B.forEach(this._attTable,function(b){b=this._getRowInfo(b);var k={};if("dijit.form.FilteringSelect"===b[2].declaredClass){for(var t in this.baeFields)if(this.baeFields.hasOwnProperty(t)&&this.baeFields[t]===b[3]){k.fieldName=t;break}T.connect(b[2],"onChange",C.hitch(this,
this.fieldChanged(k)))}},this)},fieldChanged:function(b){return function(k){""===k&&(b.fieldValue="",this._attrInspectorAttrChange(b))}},_createAttributeInspector:function(){this._changeList={};this.currentLayerInfos=[{featureLayer:this.helperLayer,isEditable:!0,showDeleteButton:!1,fieldInfos:this.helperEditFieldInfo}];try{var b=new da({layerInfos:this.currentLayerInfos,_hideNavButtons:!0},x.create("div"))}catch(y){alert(y.message)}this._saveButton=x.create("div",{id:"attrInspectorSaveBtn","class":"jimu-btn jimu-state-disabled",
tabIndex:0,innerHTML:ka.sanitizeHTML(this.nls.editorPopupSaveBtn)});var k=x.create("div",{id:"popupLoadingIcon","class":"loading hide"});x.place(this._saveButton,b.deleteBtn.domNode,"after");x.place(k,b.deleteBtn.domNode,"after");this.own(d(this._saveButton,"click",C.hitch(this,this._attrInspectorOnSave)));this.own(d(this._saveButton,"keydown",C.hitch(this,function(y){y.keyCode!==z.ENTER&&y.keyCode!==z.SPACE||this._attrInspectorOnSave(y)})));b.on("attribute-change",C.hitch(this,this._attrInspectorAttrChange));
this.attrInspector=b;this.attrInspector.startup();var t=this.attrInspector.domNode.childNodes[3].childNodes,A;this.editPopup.resize(500,251);setTimeout(C.hitch(this,function(){if(0<t.length){var y=t[0].rows;0<y.length&&B.forEach(y,C.hitch(this,function(P,J){var O=P.cells[0],Z=P.cells[1],ha=n.byNode(Z.childNodes[0]),aa=this._currentFeatureValues[O.innerText.trim()];if("undefined"!==typeof ha.store){pa.set(ha,"placeHolder",this.nls.existingValue);A=ha.store;P={};P._0=A._arrayOfAllItems.length;P._RI=
!0;P._S=A._arrayOfAllItems[A._arrayOfAllItems.length-1]._S;P.id=[];P.name=[];aa.addnullable&&!0===aa.addnullable&&(P.id[0]=this.nls.noValue,P.name[0]=this.nls.noValue);A._arrayOfAllItems.push(P);1===aa.values.length&&null!==aa.values[0]&&B.some(A._arrayOfAllItems,function(ra){if(ra.id[0].toString()===aa.values[0].toString())return ha.set("value",A.getIdentity(ra)),!0});ha.set("labelType","html");var ca=[];B.forEach(A._arrayOfAllItems,function(ra){0<=B.indexOf(aa.values,ra.id[0])&&ca.push(ra.name[0])});
ha.set("labelFunc",C.hitch(this,this._formatCombobox(ca)))}else{var ua="",qa=aa.type,ya=[],Ia=null;switch(aa.type){case "esriFieldTypeString":aa.length&&Number(aa.length)&&0<Number(aa.length)&&(Ia=aa.length);break;case "esriFieldTypeDate":qa=aa.format&&null!==aa.format?aa.format.dateFormat&&null!==aa.format.dateFormat?0<=aa.format.dateFormat.toString().toUpperCase().indexOf("TIME")?"DateTime":"Date":"Date":"Date"}var va=null,Ba=!1;B.forEach(aa.values,C.hitch(this,function(ra){var za=null,Aa=null;
if(null!==ra&&"null"!==ra)if("DateTime"===qa)za=new Date(1*ra),Aa=a.format(za,{fullYear:!0}),a.format(za,{fullYear:!0,datePattern:"yyyy-MM-dd, HH:mm:ss a"}),ya.push({name:Aa,id:Aa,value:ra}),null===va&&(va=za);else if("Date"===qa)za=new Date(1*ra),Aa=a.format(za,{selector:"date",fullYear:!0}),a.format(za,{fullYear:!0,datePattern:"yyyy-MM-dd"}),ya.push({name:Aa,id:Aa,value:ra}),null===va&&(va=za);else{var Ja=!1;B.forEach(this.updateLayers,C.hitch(this,function(xa){if(xa.layerObject.id===this.helperLayer.originLayer&&
"undefined"!==typeof xa.layerObject.typeIdField){var Ea=xa.layerObject.typeIdField.toLowerCase();xa.layerObject.infoTemplate._fieldLabels[Ea]===O.innerText&&(Ja=!0,B.forEach(xa.layerObject.types,C.hitch(this,function(wa){wa.id===ra&&(ua=wa.id);ya.some(function(Fa){return Fa.name===wa.name})||ya.push({name:wa.name,id:wa.id,value:wa.id})})))}}));Ja||ya.push({name:ra,id:ra,value:ra})}else Ba=!0,B.forEach(this.updateLayers,C.hitch(this,function(xa){if(xa.layerObject.id===this.helperLayer.originLayer&&
"undefined"!==typeof xa.layerObject.typeIdField){var Ea=xa.layerObject.typeIdField.toLowerCase();xa.layerObject.infoTemplate._fieldLabels[Ea]===O.innerText&&B.forEach(xa.layerObject.types,C.hitch(this,function(wa){wa.id===ra&&(ua=wa.id);ya.some(function(Fa){return Fa.name===wa.name})||ya.push({name:wa.name,id:wa.id,value:wa.id})}))}}))}));aa.addnullable&&!0===aa.addnullable&&ya.push({name:this.nls.noValue,id:this.nls.noValue});"Date"!==qa&&"DateTime"!==qa||ya.push({name:this.nls.newDate,id:this.nls.newDate});
A=new ja({idProperty:"id",data:ya});"DateTime"===qa?"undefined"!==typeof va&&null!==va&&(aa.addnullable&&!0===aa.addnullable?3===A.data.length&&!1===Ba&&(ua=a.format(va,{selector:"date",fullYear:!0}),this._createTimePickerExisting({row:P,textCell:O,date:va})):2===A.data.length&&!1===Ba&&(ua=a.format(va,{selector:"date",fullYear:!0}),this._createTimePickerExisting({row:P,textCell:O,date:va}))):"Date"===qa&&"undefined"!==typeof va&&null!==va&&(aa.addnullable&&!0===aa.addnullable?3>=A.data.length&&!1===
Ba&&(ua=a.format(va,{selector:"date",fullYear:!0})):2===A.data.length&&!1===Ba&&(ua=a.format(va,{selector:"date",fullYear:!0})));J=new e({name:"cbbox"+J,"class":"bae-attCombo",value:ua,store:A,searchAttr:"name",placeHolder:this.nls.existingValue,maxlength:Ia,labelAttr:"name",labelType:"html",labelFunc:C.hitch(this,this._formatCombobox(null))},Z);J.startup();ha=J;"Date"!==qa&&"DateTime"!==qa&&1===aa.values.length&&!1===Ba&&null!==aa.values[0]&&Y(A.query(function(ra,za,Aa){return 0===za}),C.hitch(this,
function(ra){""!==ua?ha.set("value",ua):ha.set("value",A.getIdentity(ra[0]))}));d(J,"change",C.hitch(this,this._comboChange(J,P,O,qa,aa.domain,aa.length)))}}))}},1E3))},_formatCombobox:function(b){return function(k){var t="";k.hasOwnProperty("name")&&("[object Array]"===Object.prototype.toString.call(k.name)?0<k.name.length&&(t=k.name[0]):"object"===typeof k.name?0<k.name&&(t=k.name[0]):t=k.name);return t===this.nls.noValue||t===this.nls.existingValue||t===this.nls.newDate?"\x3cb\x3e\x3ci\x3e"+t+
"\x3c/i\x3e\x3c/b\x3e":0<=B.indexOf(b,t)?"\x3cins\x3e"+t+"\x3c/ins\x3e":t}},isSingle:function(b){return b===b},isGuid:function(b){if(b&&null===b)return!1;"{"===b[0]&&(b=b.substring(1,b.length-1));return/^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/gi.test(b)},isShortInt:function(b){return-32768<=Number(b)&&32767>=Number(b)},_comboChange:function(b,k,t,A,y,P){return function(J){this._showInvalidIndicator(b.domNode,"true");void 0===J||null===J?
J=b.value:b.store&&B.forEach(b.store.data,C.hitch(this,function(qa){qa.name===b.value&&("undefined"!==typeof qa.value?"DateTime"===A||"Date"===A?(J=a.format(new Date(qa.value),{selector:"date",fullYear:!0}),J=new Date(qa.value)):J=qa.value:J=qa.id,"DateTime"===A||"Date"===A?b.set("displayedValue",qa.name):b.set("value",J))}));var O=null,Z=!0;if(J===this.nls.newDate)this._destroyTimePickerExt({row:k}),this._createDatePicker({row:k,evt:J,textCell:t,dataType:A});else{this._destroyDatePicker({row:k});
var ha=this._destroyTimePickerExt({row:k});if("esriFieldTypeGUID"===A){if(J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J)if(!1===this.isGuid(J))Z=!1;else if("{"!==J[0]||"}"!==J[J.length-1])J="{"+J+"}",b.set("value",J,!1)}else if("esriFieldTypeString"===A)J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J&&null!==P&&!1===isNaN(Number(P))&&J.length>Number(P)&&(Z=!1);else if("esriFieldTypeSmallInteger"===A)J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J&&(isNaN(Number(J))?Z=
!1:0!==Number(J)%1?Z=!1:!1===this.isShortInt(J)?Z=!1:y&&null!==y&&"range"===y.type&&(Number(J)>y.maxValue||Number(J)<y.minValue)&&(Z=!1));else if("esriFieldTypeInteger"===A)J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J&&(isNaN(Number(J))?Z=!1:0!==Number(J)%1?Z=!1:y&&null!==y&&"range"===y.type&&(Number(J)>y.maxValue||Number(J)<y.minValue)&&(Z=!1));else if("esriFieldTypeSingle"===A)J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J&&(isNaN(Number(J))?Z=!1:!1===this.isSingle(J)?Z=!1:
y&&null!==y&&"range"===y.type&&(Number(J)>y.maxValue||Number(J)<y.minValue)&&(Z=!1));else if("esriFieldTypeDouble"===A)J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J&&(isNaN(Number(J))?Z=!1:y&&null!==y&&"range"===y.type&&(Number(J)>y.maxValue||Number(J)<y.minValue)&&(Z=!1));else if("DateTime"===A)if(J&&J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J){var aa=!1;null!==b?b.hasOwnProperty("value")?(O=new Date(b.value),aa=!0,b.set("timeVal",O.getTime())):O=new Date(J):O=new Date(J);
"Invalid Date"===O.toString()&&void 0!==b.get("timeVal")&&null!==b.get("timeVal")&&(O=new Date(b.get("timeVal")),b.set("timeVal",null));if("Invalid Date"===O.toString()||!0===isNaN(O))Z=!1,b.set("timeVal",null);else{a.format(O,{selector:"date",fullYear:!0});var ca=new Date(b.get("value"));valueInEpoch=Date.parse(ca);var ua=Date.parse(O);valueInEpoch!==ua&&!1===aa?"Invalid Date"===ca.toString()&&(Z=!1):(ha&&null!==ha&&!1===aa&&(O.setHours(ha.getHours()),O.setMinutes(ha.getMinutes()),O.setSeconds(ha.getSeconds())),
this._getTimePickerExt({row:k,textCell:t,date:O}),valueInEpoch==ua&&!0===aa&&this._setTimePickerExt({row:k},O),J=O.getTime())}}else this._destroyTimePickerExt({row:k});else"Date"===A&&(J&&J!==this.nls.existingValue&&J!==this.nls.noValue&&""!==J?(aa=!1,null!==b?b.hasOwnProperty("value")?(O=new Date(b.value),aa=!0,b.set("timeVal",O.getTime())):O=new Date(J):O=new Date(J),"Invalid Date"===O.toString()&&void 0!==b.get("timeVal")&&null!==b.get("timeVal")&&(O=new Date(b.get("timeVal")),b.set("timeVal",
null)),"Invalid Date"===O.toString()||!0===isNaN(O)?(Z=!1,b.set("timeVal",null)):(ca=new Date(b.get("value")),valueInEpoch=Date.parse(ca),ua=Date.parse(O),valueInEpoch!==ua&&!1===aa?"Invalid Date"===ca.toString()&&(Z=!1):J=O.getTime())):this._destroyTimePickerExt({row:k}),!0===Z&&y&&null!==y&&"range"===y.type&&(O.getTime()>y.maxValue||O.getTime()<y.minValue)&&(Z=!1));this._showInvalidIndicator(b.domNode,Z);this._getComboBoxVal({valid:Z,evt:J,textCell:t,dataType:A,domain:y})}}},_showInvalidIndicator:function(b,
k){!1===k?S.add(b,["dijitTextBoxError","dijitComboBoxError","dijitError","dijitValidationTextBoxError"]):S.remove(b,["dijitTextBoxError","dijitComboBoxError","dijitError","dijitValidationTextBoxError"])},_getRowInfo:function(b){var k=b.parentNode.childNodes[1].childNodes[0],t=null;1<b.parentNode.childNodes[1].childNodes.length&&(t=b.parentNode.childNodes[1].childNodes[1]);var A=b.childNodes[0].data;b=b.parentNode;var y=n.getEnclosingWidget(k);return[k,b,y,A,t]},_createDatePicker:function(b){l.removeClass(this._saveButton,
"jimu-state-disabled");var k=x.create("div",{"class":"newDateCell"});x.place(k,b.row);var t=new Date,A=a.format(t,{selector:"date",fullYear:!0});k=(new m({value:A,placeHolder:this.nls.errors.requiredValue})).placeAt(k);k.startup();k.set("displayedValue",A);this._getComboBoxVal({valid:!0,evt:t,textCell:b.textCell,dataType:b.dataType});"DateTime"===b.dataType&&(this._destroyTimePickerExt({row:b.row}),this._createTimePicker(b));d(k,"change",C.hitch(this,function(y){var P=!0;if(void 0!==y&&null!==y){""===
y&&(y=A);if(y)try{var J=new Date(y);y=J.getTime();J=null}catch(O){console.log(O)}else P=!1;"DateTime"===b.dataType&&(P=null===this._createTimePicker(b)?!1:!0);this._getComboBoxVal({valid:!0,evt:y,textCell:b.textCell,dataType:b.dataType});P?l.removeClass(this._saveButton,"jimu-state-disabled"):l.addClass(this._saveButton,"jimu-state-disabled")}else l.addClass(this._saveButton,"jimu-state-disabled")}))},_createTimePickerExisting:function(b){l.addClass(this._saveButton,"jimu-state-disabled");if("undefined"!==
typeof b.date&&null!==b.date&&"Invalid Date"!==b.date.toString()){if(0<K(".newTimeCellExt",b.row).length)return;var k=x.create("div",{"class":"newTimeCellExt"}),t=a.format(b.date,{selector:"date",fullYear:!0});b.hasOwnProperty("defaultBlank")&&!0===b.defaultBlank&&(t="");x.place(k,b.row);k=(new u({"class":"ee-inputField",constraints:{formatLength:"medium"},value:t,placeHolder:this.nls.errors.requiredValue})).placeAt(k);k.startup();k.set("displayedValue",a.format(b.date,{selector:"time",formatLength:"medium"}));
d(k,"change",C.hitch(this,function(A){null!==A?(l.removeClass(this._saveButton,"jimu-state-disabled"),""===A&&(A=t),this._getComboBoxVal({valid:!0,evt:A,textCell:b.textCell,dataType:"Time"})):l.addClass(this._saveButton,"jimu-state-disabled")}));return k.value}return null},_createTimePicker:function(b){l.addClass(this._saveButton,"jimu-state-disabled");var k=K(".newTimeCell",b.row);if(0<k.length){var t=null;B.forEach(k,function(P){P=K(".dijitReset.dijitInputInner",P);0<P.length&&(t=H.byId(P[0].id).value)});
return t}var A=x.create("div",{"class":"newTimeCell"});k=new Date;var y=k.toLocaleTimeString();x.place(A,b.row);A=(new u({"class":"ee-inputField",constraints:{formatLength:"medium"},value:y,placeHolder:this.nls.errors.requiredValue})).placeAt(A);A.startup();A.set("displayedValue",a.format(k,{selector:"time",formatLength:"medium"}));d(A,"change",C.hitch(this,function(P){null!==P?(l.removeClass(this._saveButton,"jimu-state-disabled"),""===P&&(P=y),this._getComboBoxVal({valid:!0,evt:P,textCell:b.textCell,
dataType:"Time"})):l.addClass(this._saveButton,"jimu-state-disabled")}))},_destroyDatePicker:function(b){var k=K(".newDateCell",b.row);0<k.length&&B.forEach(k,function(t){x.empty(t);x.destroy(t)});k=K(".newTimeCell",b.row);0<k.length&&B.forEach(k,function(t){x.empty(t);x.destroy(t)})},_setTimePickerExt:function(b,k){b=K(".newTimeCellExt",b.row);0<b.length&&B.forEach(b,function(t){t=K(".dijitReset.dijitInputInner",t);0<t.length&&H.byId(t[0].id).set("value",k)});return null},_getTimePickerExt:function(b){var k=
null,t=K(".newTimeCellExt",b.row);0<t.length?B.forEach(t,function(A){A=K(".dijitReset.dijitInputInner",A);0<A.length&&H.byId(A[0].id).value&&null!==H.byId(A[0].id).value&&(k=H.byId(A[0].id).value)}):k=this._createTimePickerExisting(b);return k},_destroyTimePickerExt:function(b){var k=null;b=K(".newTimeCellExt",b.row);0<b.length&&B.forEach(b,function(t){var A=K(".dijitReset.dijitInputInner",t);0<A.length&&H.byId(A[0].id).value&&null!==H.byId(A[0].id).value&&(k=H.byId(A[0].id).value);x.empty(t);x.destroy(t)});
return k},_getComboBoxVal:function(b){if(b.valid){var k={};k.fieldValue=b.evt;k.dataType=b.dataType;B.forEach(this.currentLayerInfos[0].fieldInfos,C.hitch(this,function(t){var A=""!==t.label.toString().trim()?t.label:t.fieldName;if(A===b.textCell.innerHTML||A===b.textCell.innerText)k.fieldName=t.fieldName}));this._attrInspectorAttrChange(k)}else l.addClass(this._saveButton,"jimu-state-disabled")},_attrInspectorAttrChange:function(b){void 0!==b.dataType&&null!==b.dataType||B.some(this.currentLayerInfos[0].fieldInfos,
C.hitch(this,function(t){t.fieldName===b.fieldName&&(b.dataType=t.typeOrigin)}));this._changeList[b.fieldName]=b.fieldValue;0>this.attrInspector.domNode.innerHTML.indexOf("dijitError")?l.removeClass(this._saveButton,"jimu-state-disabled"):l.addClass(this._saveButton,"jimu-state-disabled");B.forEach(this.updateLayers,function(t){B.forEach(t.layerObject.getSelectedFeatures(),function(y){if(b.fieldValue!==this.nls.editorPopupMultipleValues)if("undefined"!==typeof b.dataType)if("Time"===b.dataType){if(b.fieldValue&&
null!==b.fieldValue){var P=new Date((new Date(y.attributes[b.fieldName])).setHours(b.fieldValue.getHours()));P=new Date(P.setMinutes(b.fieldValue.getMinutes()));P=(new Date(P.setSeconds(b.fieldValue.getSeconds()))).getTime();y.attributes[b.fieldName]=P}}else"Date"===b.dataType||"DateTime"===b.dataType||"esriFieldTypeDate"===b.dataType?b.fieldValue&&null!==b.fieldValue&&(b.fieldValue===this.nls.noValue?y.attributes[b.fieldName]=b.fieldValue:(P=new Date(Number(b.fieldValue)),y.attributes[b.fieldName]=
P&&null!==P&&"Invalid Date"!==P.toString()?P.getTime():null)):y.attributes[b.fieldName]=b.fieldValue;else y.attributes[b.fieldName]=b.fieldValue},this);var A=d(t.layerObject,"selection-clear",C.hitch(this,function(){A.remove()}))},this);for(var k in this._changeList)if(this._changeList.hasOwnProperty(k)&&""!==this._changeList[k])return;l.addClass(this._saveButton,"jimu-state-disabled")},_xrange:function(b,k,t){t||(t=1);k||(k=b,b=0);for(var A=[],y=0;b<k;b+=t,y++)A[y]=b;return A},_chunks:function(b,
k){var t=parseInt(1*b.length/k+.5,10),A=[],y;for(y in this._xrange(0,k-1))A.push(b.slice(y*t,y*t+t));A.push(b.slice(k*t-t));return A},_checkValuesTypes:function(b,k){return function(t){if(t.fieldName===k){if("esriFieldTypeDate"===t.typeOrigin){if("string"===typeof b.attributes[k]||b.attributes[k]instanceof String)b.attributes[k]=Number(b.attributes[k])}else if("esriFieldTypeSingle"===t.typeOrigin||"esriFieldTypeInteger"===t.typeOrigin||"esriFieldTypeDouble"===t.typeOrigin||"esriFieldTypeSmallInteger"===
t.typeOrigin)if("string"===typeof b.attributes[k]||b.attributes[k]instanceof String)b.attributes[k]=Number(b.attributes[k]);return!0}}},_attrInspectorOnSave:function(b){if(!l.hasClass(b.target,"jimu-state-disabled"))if(0>this.attrInspector.domNode.innerHTML.indexOf("dijitError")?l.removeClass(b.target,"jimu-state-disabled"):l.addClass(b.target,"jimu-state-disabled"),S.contains(b.target,"jimu-state-disabled"))new Da({message:this.nls.errors.inputValueError}),l.removeClass(b.target,"jimu-state-disabled");
else{this.loading.show();l.addClass(b.target,"jimu-state-disabled");this.map.infoWindow.hide();this.map.infoWindow.highlight=!1;var k;this.syncLayers=[];var t,A=[];B.forEach(this.layersTable.getRows(),function(P){t=this.layersTable.getRowData(P);!0===t.isSelectable?A.push(V.decode(t.label)):(this.layersTable.editRow(P,{syncStatus:this.nls.featuresSkipped}),P=K(".syncStatus",P).shift(),l.removeClass(P,"syncProcessing"),l.removeClass(P,"syncComplete"),l.addClass(P,"syncSkipped"))},this);var y=!1;B.forEach(this.updateLayers,
function(P){if(0<=A.indexOf(P.title)||0<=A.indexOf(P.layerObject.name)){var J=P.layerObject.getSelectedFeatures();if(J&&0<J.length){var O=null;B.forEach(J,C.hitch(this,function(ca){for(O in ca.attributes)ca.attributes.hasOwnProperty(O)&&(this.baeFields.hasOwnProperty(O)?ca.attributes[O]===this.nls.existingValue?delete ca.attributes[O]:!1===this._changeList.hasOwnProperty(O)?delete ca.attributes[O]:""===this._changeList[O]?delete ca.attributes[O]:""===ca.attributes[O]?delete ca.attributes[O]:null===
ca.attributes[O]?delete ca.attributes[O]:ca.attributes[O]===this.nls.noValue&&(ca.attributes[O]=null):P.layerObject.objectIdField!==O&&delete ca.attributes[O]);for(O in ca.attributes)B.some(this.helperEditFieldInfo,this._checkValuesTypes(ca,O))}));y=!0;B.some(this.layersTable.getRows(),function(ca){t=this.layersTable.getRowData(ca);if(t.ID===P.id)return this.layersTable.editRow(ca,{syncStatus:"0 / "+J.length}),ca=K(".syncStatus",ca).shift(),l.removeClass(ca,"syncComplete"),l.removeClass(ca,"syncSkipped"),
l.addClass(ca,"syncProcessing"),!0},this);if(300<J.length){var Z=parseInt(J.length/300,10);0<J.length%300&&(Z+=1);var ha=this._chunks(J,Z);var aa=0;k=new Ha({layerID:P.id,numberOfRequest:Z,totalRecordsToSync:J.length})}else ha=[J],aa=0,k=new Ha({layerID:P.id,numberOfRequest:1,totalRecordsToSync:J.length});d(k,"complete",C.hitch(this,this._syncComplete));d(k,"requestComplete",C.hitch(this,this._requestComplete));this.syncLayers.push(k);this.applyCallback(ha,aa,P,k)}}},this);!1===y&&(this.loading.hide(),
new Da({message:this.nls.errors.noSelectedLayers}))}},applyCallback:function(b,k,t,A){if(0===k){B.forEach(b[k],function(P){delete P.geometry});var y=t.layerObject.applyEdits(null,b[k],null,C.hitch(this,this.applyCallback(b,k+1,t,A)),C.hitch(this,this.applyErrorback(b[k],k,t,A)));A.addDeferred(y)}else return function(P,J,O){b.length>k&&(B.forEach(b[k],function(Z){delete Z.geometry}),y=t.layerObject.applyEdits(null,b[k],null,C.hitch(this,this.applyCallback(b,k+1,t,A)),C.hitch(this,this.applyErrorback(b,
k,t,A))),A.addDeferred(y));return{added:P,updated:J,removed:O}}},applyErrorback:function(b,k,t,A){return function(y){y.layer=t;y.chunk=b[k];k+=1;if(b.length>k){B.forEach(b[k],function(J){delete J.geometry});var P=t.layerObject.applyEdits(null,b[k],null,C.hitch(this,this.applyCallback(b,k+1,t,A)),C.hitch(this,this.applyErrorback(b,k,t,A)));A.addDeferred(P)}return y}},_syncComplete:function(){if(!1===B.some(this.syncLayers,function(A){if(!1===A.isComplete())return!0})){var b=0,k=0,t=0;B.forEach(this.syncLayers,
C.hitch(this,function(A){b+=A.totalRecordsToSync;t+=A.recordsErrors;k=k+A.recordsSynced-A.recordsErrors;B.forEach(this.updateLayers,C.hitch(this,function(y){"undefined"!==typeof y.id&&y.layerObject.refresh()}))}));this._updateUpdatedFeaturesCount(k,b,t);this._clearResults(!1,!0);this.loading.hide()}},_requestComplete:function(b){var k;B.some(this.layersTable.getRows(),function(t){k=this.layersTable.getRowData(t);if(k.ID===b.layerID)return this.layersTable.editRow(t,{syncStatus:b.countSoFar+" / "+
b.totalToSync}),t=K(".syncStatus",t).shift(),b.countSoFar===b.totalToSync?(l.removeClass(t,"syncProcessing"),l.addClass(t,"syncComplete")):(l.removeClass(t,"syncComplete"),l.addClass(t,"syncProcessing")),l.removeClass(t,"syncSkipped"),!0},this)},_hideInfoWindow:function(){this.map.infoWindow.isShowing&&(this.map.infoWindow.hide(),this.map.infoWindow.highlight=!1,this.map.graphics.clear())},_summarizeFeatureFields:function(b){var k=this.helperEditFieldInfo;this._currentFeatureValues=[];B.forEach(k,
function(t){if(t.visible){var A=t.fieldName,y=!1,P=[],J=b[0].attributes[A],O=""!==t.label.toString().trim()?t.label:t.fieldName;this._currentFeatureValues[O]=[];this._currentFeatureValues[O].type=t.typeOrigin;t.format&&(this._currentFeatureValues[O].format=t.format);this._currentFeatureValues[O].domain=t.domain;this._currentFeatureValues[O].length=t.length;this._currentFeatureValues[O].addnullable=t.addnullable;y=0<B.filter(b,function(aa){return aa.attributes[A]!==J}).length;B.forEach(b,function(aa){P.push(aa.attributes[A])});
P.sort();var Z,ha=[];B.forEach(P,C.hitch(this,function(aa){Z!==aa&&(Z=aa,ha.push(aa))}));y?A!==this.helperLayer.objectIdField?(this.helperLayer.graphics[0].attributes[A]="",this._currentFeatureValues[O].values=ha):(this.helperLayer.graphics[0].attributes[A]="",this._currentFeatureValues[O].values=[J]):(this._currentFeatureValues[O].values=[J],this.helperLayer.graphics[0].attributes[A]="")}},this)},_clearResultsEvent:function(){this._clearResults(!0,!0)},_clearResults:function(b,k){null===b&&(b=!0);
B.forEach(this.updateLayers,function(t){t.layerObject.clearSelection()},this);this.selectByLayer&&!0===k&&this.selectByLayer.layerObject&&this.selectByLayer.layerObject.clearSelection();B.forEach(this.clickList,function(t){t.remove()});this.clickList=[];this.layersTable&&(B.forEach(this.layersTable.getRows(),function(t){this.layersTable.editRow(t,{numSelected:"0"})},this),B.forEach(this.layersTable.getRows(),function(t){this.layersTable.editRow(t,{syncStatus:""})},this),this._clearRowHighlight(b));
this._hideInfoWindow()},_updateUpdatedFeaturesCount:function(b,k,t){this.resultsMessage.innerHTML=ka.sanitizeHTML(oa.substitute(this.nls.featuresUpdated,{0:b,1:k}));t&&0<t&&(this.nls.errors.hasOwnProperty("saveError")?this.resultsMessage.innerHTML=ka.sanitizeHTML(this.resultsMessage.innerHTML+'\x3cbr/\x3e \x3cfont color\x3d"red"\x3e'+oa.substitute(this.nls.errors.saveError,{0:t})+"\x3cfont\x3e"):this.resultsMessage.innerHTML=ka.sanitizeHTML(this.resultsMessage.innerHTML+'\x3cbr/\x3e \x3cfont color\x3d"red"\x3e'+
oa.substitute("{0} errors, details in log",{0:t})+"\x3cfont\x3e"));this.timer.stop();this.timer.start()},_updateSelectionCount:function(b){this.resultsMessage.innerHTML=ka.sanitizeHTML(oa.substitute(this.nls.featuresSelected,{0:b}));this.timer.stop();this.timer.start()},_timerComplete:function(){null!==this.resultsMessage&&void 0!==this.resultsMessage&&(this.resultsMessage.innerHTML="");this.timer.stop()},_showFilter:function(b){var k=this.layersTable.getRowData(b),t,A,y;B.forEach(this.updateLayers,
C.hitch(this,function(ca){ca.id===k.ID&&(y=ca,A=ca.resourceInfo,t=ca.url,y.layerObject.getDefinitionExpression()&&y.layerObject.getDefinitionExpression())}));if(0<this.expressionLayers.length){var P=!1;B.forEach(this.expressionLayers,C.hitch(this,function(ca){ca.id===k.ID&&(J=ca,P=!0)}));if(!1===P){this.expressionLayers.push({id:k.ID,expr:"",defaultExp:y.layerObject.getDefinitionExpression()});var J=this.expressionLayers[this.expressionLayers.length-1]}}else this.expressionLayers.push({id:k.ID,expr:"",
defaultExp:y.layerObject.getDefinitionExpression()}),J=this.expressionLayers[0];var O=new X({noFilterTip:this.nls.noFilterTip,style:"width:100%;height:80%;"}),Z=new v({content:O,style:"width:100%;height:100%;"}),ha=new Qa({nls:this.nls,appendChoice:this.filterAppendOperator[y.layerObject.description]?this.filterAppendOperator[y.layerObject.description]:"AND"});(new v({content:ha,style:"width:100%;bottom:0px;"})).placeAt(Z);var aa=new ta({titleLabel:this.nls.filterPopup,width:680,height:485,content:Z,
buttons:[{label:this.nls.ok,onClick:C.hitch(this,function(){var ca=O.toJson();if(ca&&ca.expr){"1\x3d1"===ca.expr?J.defaultExp?(ha.getAppendChoice(),this.filterAppendOperator[y.layerObject.description]=ha.appendChoice,y.layerObject.setDefinitionExpression("("+J.defaultExp+")")):y.layerObject.setDefinitionExpression(ca.expr):J.defaultExp?(ha.getAppendChoice(),this.filterAppendOperator[y.layerObject.description]=ha.appendChoice,y.layerObject.setDefinitionExpression("("+J.defaultExp+") "+this.filterAppendOperator[y.layerObject.description]+
" ("+ca.expr+")")):y.layerObject.setDefinitionExpression(ca.expr);var ua=d(y.layerObject,"update-end",C.hitch(this,function(){0<y.layerObject.getSelectedFeatures().length&&(this._clearResults(!0,!0),C.hitch(this,this._onDrawEnd(this.drawnGrph)),ua.remove())})),qa=K(".layerLabel",b)[0];"1\x3d1"!==ca.expr?S.add(qa,"filtered"):S.remove(qa,"filtered");J.expr=ca;aa.close();aa=null}else new Da({message:this.nls.setFilterTip})})},{label:this.nls.cancel,classNames:["jimu-btn-vacation"]}]});J.expr?O.build({url:t,
partsObj:J.expr,layerDefinition:A,featureLayerId:y.id}):O.build({url:t,partsObj:null,layerDefinition:A,featureLayerId:y.id})},checkClusterStatus:function(b){0<this._featureReductionEnabledLayers.length?B.forEach(this._featureReductionEnabledLayers,C.hitch(this,function(k){1===b.cluster?k.enableFeatureReduction():k.isFeatureReductionActive()&&k.disableFeatureReduction()})):B.some(this.map.itemInfo.itemData.operationalLayers,C.hitch(this,function(k){null!==k.layerObject&&void 0!==k.layerObject&&"function"===
typeof k.layerObject.isFeatureReductionEnabled&&k.layerObject.isFeatureReductionEnabled()&&(1===b.cluster?k.layerObject.enableFeatureReduction():k.layerObject.isFeatureReductionActive()&&k.layerObject.disableFeatureReduction(),this._featureReductionEnabledLayers.push(k.layerObject))}))},_changeToServiceRenderer:function(b){var k=b.renderer,t=k.toJson(),A=f.parse(b._json).drawingInfo.renderer;ka.isEqual(t,A)||(b._layerRenderer=k,this._layerInfoParamArrayUseForRervertRenderre.push(b),b.setRenderer(La.fromJson(A)),
b.redraw())},_revertToLayerRenderer:function(){B.forEach(this._layerInfoParamArrayUseForRervertRenderre,function(b){b._layerRenderer&&(b.setRenderer(b._layerRenderer),b.redraw())},this);this._layerInfoParamArrayUseForRervertRenderre=[]},onOpen:function(){this.checkValidPermission();this._mapInfoStorage={resetInfoWindow:null};this.widgetManager.activateWidget(this);fa.addPoint=this.nls.drawBox.addPointToolTip;fa.addShape=this.nls.drawBox.addShapeToolTip;fa.freehand=this.nls.drawBox.freehandToolTip;
fa.start=this.nls.drawBox.startToolTip;if(void 0===this.dnd||null===this.dnd){var b=K(".title",this.map.infoWindow.domNode)[0];this.dnd=new F(this.map.infoWindow.domNode,{handle:b})}else this.dnd.skip=!1;d(this.dnd,"FirstMove",function(){var k=K(".outerPointer",this.map.infoWindow.domNode)[0];S.add(k,"hidden");k=K(".pointer",this.map.infoWindow.domNode)[0];S.add(k,"hidden")}.bind(this));q.getInstance(this.map,this.map.itemInfo).then(C.hitch(this,function(k){this._jimuLayerInfos=k;0<this.config.updateLayers.length&&
(this.expressionLayers=[],this.clickList=[],this._configureWidget(),this._initSelectLayer(),this.createLayerTable(),this.loadLayerTable(),this._addHelperLayer(),this._createAttributeInspector(),this._createQueryParams(),this._setTheme(),this.timer=new Ma.Timer(2E4),this.own(h.after(this.timer,"onTick",C.hitch(this,this._timerComplete),this)),this._setFirstLastNodeOnMainScreen(),this.handleKeyDownEvents());!0===this.config.toggleLayersOnOpen&&B.forEach(this.updateLayers,function(t){t.layerObject.setVisibility(!0)})}))},
onClose:function(){if(void 0!==this.dnd&&null!==this.dnd){var b=K(".outerPointer",this.map.infoWindow.domNode)[0];"undefined"!==typeof b&&S.remove(b,"hidden");b=K(".pointer",this.map.infoWindow.domNode)[0];"undefined"!==typeof b&&S.remove(b,"hidden");this.dnd.destroy();this.dnd=null}this._clearResults(!0,!0);"undefined"!==typeof this.existingText&&(fa.addPoint=this.existingText.addPoint,fa.addShape=this.existingText.addShape,fa.freehand=this.existingText.freehand,fa.start=this.existingText.start);
this.enableWebMapPopup();!0===this.config.toggleLayersOnOpen&&B.forEach(this.updateLayers,function(k){k.layerObject.setVisibility(!1)});B.forEach(this.updateLayers,C.hitch(this,function(k){B.forEach(this.expressionLayers,C.hitch(this,function(t){t.id===k.id&&k.layerObject.getDefinitionExpression()!==t.defaultExp&&k.layerObject.setDefinitionExpression(t.defaultExp)}))}));this.expressionLayers=[];this.layersTable&&B.forEach(this.layersTable.getRows(),C.hitch(this,function(k){k=K(".layerLabel",k).shift();
S.remove(k,"filtered")}));this.drawBox&&(this.drawBox.destroy(),this.drawBox=null);this.searchTextBox&&(this.searchTextBox.destroy(),this.searchTextBox=null)},onDeActive:function(){this.enableWebMapPopup();this.checkClusterStatus({cluster:1,msg:"onDeActive"})},create_drawbox:function(){var b=null;!0===this.config.selectByShape?(this.toolType="Area",this.widgetIntro.innerHTML=ka.sanitizeHTML(this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.widgetIntroSelectByArea),b=["polygon",
"point"]):!0===this.config.selectByFeature?(this.toolType="Feature",this.widgetIntro.innerHTML=ka.sanitizeHTML(oa.substitute(this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.widgetIntroSelectByFeature,{0:this.config.selectByLayer.name})),b=["point"]):!0===this.config.selectByFeatureQuery?(this.toolType="FeatureQuery",this.widgetIntro.innerHTML=ka.sanitizeHTML(oa.substitute(this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.widgetIntroSelectByFeatureQuery,
{0:this.config.selectByLayer.name,1:this.config.selectByLayer.queryField})),b=["point"]):!0===this.config.selectByQuery?(this.toolType="Query",this.widgetIntro.innerHTML=ka.sanitizeHTML(this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.widgetIntroSelectByQuery)):(this.toolType="Area",this.widgetIntro.innerHTML=ka.sanitizeHTML(this.config.hasOwnProperty("headerText")?this.config.headerText:this.nls.widgetIntroSelectByArea),b=["polygon","point"]);b?null===this.drawBox&&(this.drawBox=
new Na({types:b,showClear:!1,config:this.config}),this.drawBox.placeAt(this.selectionTool),this.drawBox.startup(),this.drawBox.setMap(this.map),this.own(d(this.drawBox,"DrawEnd",C.hitch(this,this._onDrawEnd)))):null===this.searchTextBox&&(this.searchTextBox=new g({name:"queryText",value:"",placeHolder:this.nls.queryInput}),this.searchTextBox.startup(),this.searchTextBox.placeAt(this.selectionTool),b=x.create("div",{innerHTML:ka.sanitizeHTML(this.nls.search)}),x.place(b,this.selectionTool,"after"),
l.addClass(b,"jimu-btn widget-draw-control"),d(b,"click",C.hitch(this,this._btnSearchClick)))},onActive:function(){null===this.drawBox&&this.create_drawbox();this.disableWebMapPopup();this.checkClusterStatus({cluster:0,msg:"onActive"})},destroy:function(){B.forEach(this.clickList,function(b){b.remove()});this._clearGraphics();this.drawBox&&(this.drawBox.destroy(),this.drawBox=null);this.searchTextBox&&(this.searchTextBox.destroy(),this.searchTextBox=null);this.attrInspector&&this.attrInspector.destroy();
this.checkClusterStatus({cluster:1,msg:"dsestroy"});this.timer=this.drawnGrph=this.expressionLayers=this.selectQuery=this.mouseClickPos=this.searchTextBox=this.selectByLayer=this.toolType=this.attrInspector=this.helperEditFieldInfo=this.helperLayer=this.updateLayers=this.layersTable=this.clickList=null;this._featureReductionEnabledLayers=[];this._layerInfoParamArrayUseForRervertRenderre=[];this.inherited(arguments)},checkValidPermission:function(){this.privilegeUtil=Pa.getInstance();var b="BoxTheme"===
this.appConfig.theme.name?1050:1;setTimeout(C.hitch(this,function(){this.privilegeUtil.loadPrivileges(this._getPortalUrl()).then(C.hitch(this,function(k){k?!0===this.privilegeUtil.userRole.canEditFeatures()?this._userHasPrivilege=!0:!0===this.privilegeUtil.userRole.canEditFeaturesFullControl?this._userHasPrivilege=!0:(this._userHasPrivilege=!1,this._noPrivilegeHandler(window.jimuNls.noEditPrivileges)):this._userHasPrivilege=!0}),C.hitch(this,function(){this._userHasPrivilege=!1;this._noPrivilegeHandler(window.jimuNls.noEditPrivileges)}))}),
b)},_noPrivilegeHandler:function(b){this.widgetIntro.innerHTML=ka.sanitizeHTML(b);D.set(this.layerDrawContainer,"display","none")},_getPortalUrl:function(b){return b?Ga.getStandardPortalUrl(b):Ga.getStandardPortalUrl(this.appConfig.portalUrl)},_setFirstLastNodeOnMainScreen:function(){this._setWidgetFirstFocusNode(this.widgetIntro.focusNode,this.btnClear)},_setWidgetFirstFocusNode:function(b,k){ka.initFirstFocusNode(this.domNode,b);ka.initLastFocusNode(this.domNode,k);this.openAtStartAysn=!0;ka.isAutoFocusFirstNodeWidget(this)&&
this.selectionTool.focus()},_updateTabNodes:function(b){if("attributeInspector"===b){b=K(".titleButton.maximize",this.map.infoWindow.domNode);if(0<b.length){b[0].tabIndex=0;var k=b[0];this.own(d(b,"keydown",C.hitch(this,function(t){t.keyCode!==z.ENTER&&t.keyCode!==z.SPACE||d.emit(this.map.infoWindow._maxButton,"click",{bubbles:!0,cancelable:!0})})))}b=K(".titleButton.close",this.map.infoWindow.domNode);0<b.length&&(b[0].tabIndex=0,this.own(d(b,"keydown",C.hitch(this,function(t){t.keyCode!==z.ENTER&&
t.keyCode!==z.SPACE||this.map.infoWindow.hide()}))));b=this._saveButton;this.own(d(this._saveButton,"keydown",C.hitch(this,function(t){t.keyCode===z.TAB&&k.focus()})));this._saveButton.focus()}else k=this.widgetIntro.focusNode,b=this.btnClear,this.selectionTool.focus();this._setWidgetFirstFocusNode(k,b)},handleKeyDownEvents:function(){this.own(d(this.btnClear,"keydown",C.hitch(this,function(b){b.keyCode===z.ENTER||b.keyCode===z.SPACE?this._clearResultsEvent():b.keyCode===z.TAB&&this.widgetIntro.focus()})))}})});