/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */
//>>built
require({cache:{"esri/layers/FeatureType":function(){define("esri/layers/FeatureType",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/lang","esri/symbols/jsonUtils","esri/layers/RangeDomain","esri/layers/CodedValueDomain","esri/layers/InheritedDomain","esri/layers/FeatureTemplate"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){var _c=_1(null,{declaredClass:"esri.layers.FeatureType",constructor:function(_d){if(_d&&_2.isObject(_d)){this.id=_d.id;this.name=_d.name;var _e=_d.symbol;if(_e){this.symbol=_7.fromJson(_e);}var _f=_d.domains,_10,i;var _11=this.domains={};for(_10 in _f){if(_f.hasOwnProperty(_10)){var _12=_f[_10];switch(_12.type){case "range":_11[_10]=new _8(_12);break;case "codedValue":_11[_10]=new _9(_12);break;case "inherited":_11[_10]=new _a(_12);break;}}}var _13=_d.templates;if(_13){var _14=this.templates=[];for(i=0;i<_13.length;i++){_14.push(new _b(_13[i]));}}}},toJson:function(){var _15={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _16,_17=this.domains,_18=this.templates,_19=_6.fixJson;if(_17){var _1a=_15.domains={};for(_16 in _17){if(_17.hasOwnProperty(_16)){_1a[_16]=_17[_16]&&_17[_16].toJson();}}_19(_1a);}if(_18){_15.templates=_3.map(_18,function(_1b){return _1b.toJson();});}return _19(_15);}});if(_4("extend-esri")){_2.setObject("layers.FeatureType",_c,_5);}return _c;});},"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n","dijit/form/ComboBoxMixin":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/ComboBoxMixin",["dojo/_base/declare","dojo/_base/Deferred","dojo/_base/kernel","dojo/_base/lang","dojo/store/util/QueryResults","./_AutoCompleterMixin","./_ComboBoxMenu","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(_1c,_1d,_1e,_1f,_20,_21,_22,_23,_24){return _1c("dijit.form.ComboBoxMixin",[_23,_21],{dropDownClass:_22,hasDownArrow:true,templateString:_24,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},_setHasDownArrowAttr:function(val){this._set("hasDownArrow",val);this._buttonNode.style.display=val?"":"none";},_showResultList:function(){this.displayMessage("");this.inherited(arguments);},_setStoreAttr:function(_25){if(!_25.get){_1f.mixin(_25,{_oldAPI:true,get:function(id){var _26=new _1d();this.fetchItemByIdentity({identity:id,onItem:function(_27){_26.resolve(_27);},onError:function(_28){_26.reject(_28);}});return _26.promise;},query:function(_29,_2a){var _2b=new _1d(function(){_2c.abort&&_2c.abort();});_2b.total=new _1d();var _2c=this.fetch(_1f.mixin({query:_29,onBegin:function(_2d){_2b.total.resolve(_2d);},onComplete:function(_2e){_2b.resolve(_2e);},onError:function(_2f){_2b.reject(_2f);}},_2a));return _20(_2b);}});}this._set("store",_25);},postMixInProperties:function(){var _30=this.params.store||this.store;if(_30){this._setStoreAttr(_30);}this.inherited(arguments);if(!this.params.store&&!this.store._oldAPI){var _31=this.declaredClass;_1f.mixin(this.store,{getValue:function(_32,_33){_1e.deprecated(_31+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return _32[_33];},getLabel:function(_34){_1e.deprecated(_31+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return _34.name;},fetch:function(_35){_1e.deprecated(_31+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");var _36=["dojo/data/ObjectStore"];require(_36,_1f.hitch(this,function(_37){new _37({objectStore:this}).fetch(_35);}));}});}}});});},"dijit/form/RangeBoundTextBox":function(){define("dijit/form/RangeBoundTextBox",["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(_38,_39,_3a){var _3b=_38("dijit.form.RangeBoundTextBox",_3a,{rangeMessage:"",rangeCheck:function(_3c,_3d){return ("min" in _3d?(this.compare(_3c,_3d.min)>=0):true)&&("max" in _3d?(this.compare(_3c,_3d.max)<=0):true);},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.get("value");if(val==null){return false;}var _3e=false;if("min" in this.constraints){var min=this.constraints.min;_3e=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min)<0;}if(!_3e&&("max" in this.constraints)){var max=this.constraints.max;_3e=this.compare(val,((typeof max!="number")||max>0)?max:0)>0;}return _3e;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_3f){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_3f));},getErrorMessage:function(_40){var v=this.get("value");if(v!=null&&v!==""&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_40)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=_39.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},applyTextDir:function(){}});return _3b;});},"esri/dijit/editing/tools/Reshape":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","esri/layers/FeatureLayer","esri/tasks/query","esri/toolbars/draw","esri/dijit/editing/tools/ToggleToolBase","esri/kernel"],function(_41,_42,_43,_44,has,_45,_46,_47,_48,_49){var _4a=_41([_48],{declaredClass:"esri.dijit.editing.tools.Reshape",id:"btnFeatureReshape",_enabledIcon:"toolbarIcon reshapeIcon",_disabledIcon:"toolbarIcon reshapeIcon",_drawType:_47.POLYLINE,_enabled:true,_label:"NLS_reshapeLbl",activate:function(){_44.disconnect(this._rConnect);this._rConnect=_44.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd");this.inherited(arguments);},deactivate:function(){this.inherited(arguments);_44.disconnect(this._rConnect);delete this._rConnect;},_onDrawEnd:function(_4b){var _4c=this._settings.layers;var _4d=new _46();_4d.geometry=_4b;var _4e=this._reshapeLayers=_43.filter(_4c,function(_4f){return (_4f.geometryType==="esriGeometryPolygon"||"esriGeometryPolyline");});this._settings.editor._selectionHelper.selectFeatures(_4e,_4d,_45.SELECTION_NEW,_42.hitch(this,"_reshape",_4d));},_reshape:function(_50,_51){var _52=[];var _53=_51;if(_53.length!==1){return;}this._settings.geometryService.reshape(_53[0].geometry,_50.geometry,_42.hitch(this,function(_54){var _55=[_53[0].setGeometry(_54)];this.onApplyEdits([{layer:_53[0].getLayer(),updates:_55}],_42.hitch(this,function(){this._settings.editor._selectionHelper.clearSelection(false);this.onFinished();}));}));}});if(has("extend-esri")){_42.setObject("dijit.editing.tools.Reshape",_4a,_49);}return _4a;});},"esri/dijit/editing/tools/Cut":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dojo/DeferredList","esri/graphicsUtils","esri/graphic","esri/tasks/query","esri/layers/FeatureLayer","esri/toolbars/draw","esri/dijit/editing/Cut","esri/dijit/editing/tools/ToggleToolBase","esri/kernel"],function(_56,_57,_58,_59,has,_5a,_5b,_5c,_5d,_5e,_5f,Cut,_60,_61){var _62=_56([_60],{declaredClass:"esri.dijit.editing.tools.Cut",id:"btnFeatureCut",_enabledIcon:"toolbarIcon cutIcon",_disabledIcon:"toolbarIcon cutIcon",_drawType:_5f.POLYLINE,_enabled:true,_label:"NLS_cutLbl",_cutConnects:[],activate:function(){this._cutConnects.push(_59.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd"));this.inherited(arguments);},deactivate:function(){this.inherited(arguments);_58.forEach(this._cutConnects,_59.disconnect);this._cutConnects=[];this._edits=[];},_onDrawEnd:function(_63){var _64=this._settings.layers;var _65=this._cutLayers=_58.filter(_64,function(_66){return ((_66.geometryType==="esriGeometryPolygon")||(_66.geometryType==="esriGeometryPolyline")&&_66.visible&&_66._isMapAtVisibleScale());});this._cutConnects=this._cutConnects.concat(_58.map(_65,_57.hitch(this,function(_67){return _59.connect(_67,"onEditsComplete",_57.hitch(this,function(_68,_69,_6a){if(this._settings.undoRedoManager){var _6b=this._settings.undoRedoManager;_58.forEach(this._edits,_57.hitch(this,function(_6c){_6b.add(new Cut({featureLayer:_6c.layer,addedGraphics:_6c.adds,preUpdatedGraphics:_6c.preUpdates,postUpdatedGraphics:_6c.updates}));}),this);}this.onFinished();}));})));var _6d=new _5d();_6d.geometry=_63;_58.forEach(_65,function(_6e,idx){this._settings.editor._selectionHelper.selectFeatures([_6e],_6d,_5e.SELECTION_NEW,_57.hitch(this,"_cutFeatures",_6e,_6d));},this);},_cutFeatures:function(_6f,_70,_71){if(!_71||!_71.length){return;}this._edits=[];var _72=[];_72.push(this._settings.geometryService.cut(_5b.getGeometries(_71),_70.geometry,_57.hitch(this,"_cutHandler",_6f,_71)));var _73=new _5a(_72).addCallback(_57.hitch(this,function(){this.onApplyEdits(this._edits);}));},_cutHandler:function(_74,_75,_76){var _77=[];var _78=[];var _79=_58.map(_75,function(_7a){return new _5c(_57.clone(_7a.toJson()));});var _7b;var _7c;_58.forEach(_76.cutIndexes,function(_7d,i){if(_7b!=_7d){_7b=_7d;_78.push(_75[_7d].setGeometry(_76.geometries[i]));}else{_7c=new _5c(_76.geometries[i],null,_57.mixin({},_75[_7d].attributes),null);_7c.attributes[_75[0].getLayer().objectIdField]=null;_77.push(_7c);}},this);this._edits.push({layer:_74,adds:_77,updates:_78,preUpdates:_79});}});if(has("extend-esri")){_57.setObject("dijit.editing.tools.Cut",_62,_61);}return _62;});},"dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_7e,_7f){return _7e("dijit._Contained",null,{_getSibling:function(_80){var _81=this.domNode;do{_81=_81[_80+"Sibling"];}while(_81&&_81.nodeType!=1);return _81&&_7f.byNode(_81);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});});},"esri/toolbars/_Box":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/matrix","esri/kernel","esri/lang","esri/geometry/Point","esri/geometry/Polyline","esri/geometry/webMercatorUtils","esri/geometry/jsonUtils","esri/graphic"],function(_82,_83,_84,_85,has,_86,_87,_88,_89,_8a,_8b,_8c,_8d,_8e,_8f){var BOX=_82(null,{declaredClass:"esri.toolbars._Box",constructor:function(_90,map,_91,_92,_93,_94){this._graphic=_90;this._map=map;this._toolbar=_91;this._scale=_92;this._rotate=_93;this._defaultEventArgs={};this._scaleEvent="Scale";this._rotateEvent="Rotate";this._uniformScaling=_94;var _95=_91._options;this._markerSymbol=_95.boxHandleSymbol;this._lineSymbol=_95.boxLineSymbol;this._moveStartHandler=_83.hitch(this,this._moveStartHandler);this._firstMoveHandler=_83.hitch(this,this._firstMoveHandler);this._moveStopHandler=_83.hitch(this,this._moveStopHandler);this._moveHandler=_83.hitch(this,this._moveHandler);this._init();},destroy:function(){this._cleanUp();this._graphic=this._map=this._toolbar=this._markerSymbol=this._lineSymbol=null;},refresh:function(){this._draw();},suspend:function(){_84.forEach(this._getAllGraphics(),function(g){g.hide();});},resume:function(){_84.forEach(this._getAllGraphics(),function(g){g.show();});this._draw();},_init:function(){this._draw();},_cleanUp:function(){if(this._connects){_84.forEach(this._connects,_85.disconnect);}var _96=this._toolbar._scratchGL;if(this._anchors){_84.forEach(this._anchors,function(_97){_96.remove(_97.graphic);var mov=_97.moveable;if(mov){mov.destroy();}});}if(this._box){_96.remove(this._box);}this._box=this._anchors=this._connects=null;},_draw:function(){if(!this._graphic.getDojoShape()){this._cleanUp();return;}var map=this._map,_98=this._toolbar._scratchGL;var _99=this._getBoxCoords();var _9a=new _8c(map.spatialReference);var _9b=_83.clone(_84.filter(_99,function(pt,_9c){return (_9c!==8&&_9c%2===0);}));if(_9b[0]){_9b.push([_9b[0][0],_9b[0][1]]);}_9a.addPath(_9b);if(this._rotate){_9a.addPath([_99[1],_99[8]]);}if(this._box){this._box.setGeometry(_9a);}else{this._box=new _8f(_9a,this._lineSymbol);_98.add(this._box);}if(this._anchors){_84.forEach(this._anchors,function(_9d,_9e){if(!this._scale){_9e=8;}var _9f=new _8b(_99[_9e],map.spatialReference);_9d.graphic.setGeometry(_9f);var mov=_9d.moveable,_a0=_9d.graphic.getDojoShape();if(_a0){if(!mov){_9d.moveable=this._getMoveable(_9d.graphic,_9e);}else{if(_a0!==mov.shape){mov.destroy();_9d.moveable=this._getMoveable(_9d.graphic,_9e);}}}},this);}else{this._anchors=[];this._connects=[];_84.forEach(_99,function(_a1,_a2){if(!this._scale&&_a2<8){return;}_a1=new _8b(_a1,map.spatialReference);var _a3=new _8f(_a1,this._markerSymbol);_98.add(_a3);this._anchors.push({graphic:_a3,moveable:this._getMoveable(_a3,_a2)});},this);}},_getBoxCoords:function(_a4){var _a5=this._graphic,map=this._map,_a6=this._getTransformedBoundingBox(_a5),_a7=[],pt,_a8,_a9;_84.forEach(_a6,function(_aa,_ab,arr){pt=_aa;_a8=arr[_ab+1];if(!_a8){_a8=arr[0];}_a9={x:(pt.x+_a8.x)/2,y:(pt.y+_a8.y)/2};if(!_a4){pt=map.toMap(pt);_a9=map.toMap(_a9);}_a7.push([pt.x,pt.y]);_a7.push([_a9.x,_a9.y]);});if(this._rotate){var _ac=_83.clone(_a7[1]);_ac=_a4?{x:_ac[0],y:_ac[1]}:map.toScreen({x:_ac[0],y:_ac[1],spatialReference:map.spatialReference});_ac.y-=this._toolbar._options.rotateHandleOffset;if(!_a4){_ac=map.toMap(_ac);}_a7.push([_ac.x,_ac.y]);}return _a7;},_getTransformedBoundingBox:function(_ad){var map=this._map,_ae=_ad.geometry.getExtent(),_af=_ad.geometry.spatialReference,_b0=new _8b(_ae.xmin,_ae.ymax,_af),_b1=new _8b(_ae.xmax,_ae.ymin,_af);_b0=map.toScreen(_b0);_b1=map.toScreen(_b1);return [{x:_b0.x,y:_b0.y},{x:_b1.x,y:_b0.y},{x:_b1.x,y:_b1.y},{x:_b0.x,y:_b1.y}];},_getAllGraphics:function(){var _b2=[this._box];if(this._anchors){_84.forEach(this._anchors,function(_b3){_b2.push(_b3.graphic);});}_b2=_84.filter(_b2,_8a.isDefined);return _b2;},_getMoveable:function(_b4,_b5){var _b6=_b4.getDojoShape();if(!_b6){return;}var _b7=new _87(_b6);_b7._index=_b5;this._connects.push(_85.connect(_b7,"onMoveStart",this._moveStartHandler));this._connects.push(_85.connect(_b7,"onFirstMove",this._firstMoveHandler));this._connects.push(_85.connect(_b7,"onMoveStop",this._moveStopHandler));_b7.onMove=this._moveHandler;var _b8=_b6.getEventSource();if(_b8){_86.set(_b8,"cursor",this._toolbar._cursors["box"+_b5]);}return _b7;},_moveStartHandler:function(_b9){this._toolbar["on"+(_b9.host._index===8?this._rotateEvent:this._scaleEvent)+"Start"](this._graphic);},_firstMoveHandler:function(_ba){var _bb=_ba.host._index,_bc=(this._wrapOffset=_ba.host.shape._wrapOffsets[0]||0),_bd=this._graphic.getLayer()._div.getTransform(),mx=_88,_be,_bf,_c0,_c1=_84.map(this._getBoxCoords(true),function(arr){return {x:arr[0]+_bc,y:arr[1]};});_c0={x:_c1[1].x,y:_c1[3].y};this._centerCoord=mx.multiplyPoint(mx.invert(_bd),_c0);if(_bb===8){_be=mx.multiplyPoint(mx.invert(_bd),_c1[1]);this._startLine=[this._centerCoord,_be];this._moveLine=_83.clone(this._startLine);}else{_be=mx.multiplyPoint(mx.invert(_bd),_c1[_bb]);_bf=mx.multiplyPoint(mx.invert(_bd),_c1[(_bb+4)%8]);this._firstMoverToCenter=Math.sqrt((_be.x-this._centerCoord.x)*(_be.x-this._centerCoord.x)+(_be.y-this._centerCoord.y)*(_be.y-this._centerCoord.y));this._startBox=_bf;this._startBox.width=(_c1[4].x-_c1[0].x);this._startBox.height=(_c1[4].y-_c1[0].y);this._moveBox=_83.clone(this._startBox);this._xfactor=_be.x>_bf.x?1:-1;this._yfactor=_be.y>_bf.y?1:-1;if(_bb===1||_bb===5){this._xfactor=0;}else{if(_bb===3||_bb===7){this._yfactor=0;}}}this._toolbar._beginOperation("BOX");this._toolbar["on"+(_bb===8?this._rotateEvent:this._scaleEvent)+"FirstMove"](this._graphic);},_moveHandler:function(_c2,_c3){var _c4=_c2.host._index,_c5=this._defaultEventArgs,_c6,_c7,tx,pt,_c8,_c9,_ca,_cb=0,_cc=0,_cd,_ce,_cf;_c5.angle=0;_c5.scaleX=1;_c5.scaleY=1;if(_c4===8){_c6=this._startLine;_c7=this._moveLine;pt=_c7[1];pt.x+=_c3.dx;pt.y+=_c3.dy;_c8=this._getAngle(_c6,_c7);tx=_88.rotategAt(_c8,_c6[0]);this._graphic.getDojoShape().setTransform(tx);_c5.transform=tx;_c5.angle=_c8;_c5.around=_c6[0];}else{_c6=this._startBox;_c7=this._moveBox;_c7.width+=(_c3.dx*this._xfactor);_c7.height+=(_c3.dy*this._yfactor);if(this._uniformScaling){_cd=_c7.x+this._xfactor*_c7.width;_ce=_c7.y+this._yfactor*_c7.height;_cf=Math.sqrt((_cd-this._centerCoord.x)*(_cd-this._centerCoord.x)+(_ce-this._centerCoord.y)*(_ce-this._centerCoord.y));_c9=_ca=_cf/this._firstMoverToCenter;_cb=this._xfactor*_c6.width/2;_cc=this._yfactor*_c6.height/2;}else{_c9=_c7.width/_c6.width;_ca=_c7.height/_c6.height;}if(isNaN(_c9)||_c9===Infinity||_c9===-Infinity){_c9=1;}if(isNaN(_ca)||_ca===Infinity||_ca===-Infinity){_ca=1;}tx=_88.scaleAt(_c9,_ca,_c6.x+_cb,_c6.y+_cc);this._graphic.getDojoShape().setTransform(tx);_c5.transform=tx;_c5.scaleX=_c9;_c5.scaleY=_ca;_c5.around={x:_c6.x+_cb,y:_c6.y+_cc};}this._toolbar["on"+(_c4===8?this._rotateEvent:this._scaleEvent)](this._graphic,_c5);},_moveStopHandler:function(_d0){var _d1=this._graphic,_d2=this._toolbar,_d3=_d2._geo?_8d.geographicToWebMercator(_d1.geometry):_d1.geometry,_d4=_d3.spatialReference,_d5=_d1.getDojoShape(),_d6=_d5.getTransform(),_d7=_d1.getLayer()._div.getTransform();_d3=_d3.toJson();this._updateSegments(_d3.paths||_d3.rings,_d6,_d7,_d4);_d5.setTransform(null);_d3=_8e.fromJson(_d3);_d1.setGeometry(_d2._geo?_8d.webMercatorToGeographic(_d3,true):_d3);this._draw();this._startBox=this._moveBox=this._xfactor=this._yfactor=null;this._startLine=this._moveLine=null;_d2._endOperation("BOX");this._defaultEventArgs.transform=_d6;_d2["on"+(_d0.host._index===8?this._rotateEvent:this._scaleEvent)+"Stop"](this._graphic,this._defaultEventArgs);},_updateSegments:function(_d8,_d9,_da,_db){var mx=_88,map=this._map,_dc=this._wrapOffset||0;_84.forEach(_d8,function(_dd){_84.forEach(_dd,function(_de){var _df=map.toScreen({x:_de[0],y:_de[1],spatialReference:_db},true);_df.x+=_dc;_df=mx.multiplyPoint([_da,_d9,mx.invert(_da)],_df);_df.x-=_dc;var _e0=map.toMap(_df);_de[0]=_e0.x;_de[1]=_e0.y;});});},_getAngle:function(_e1,_e2){var _e3=Math.atan2(_e1[0].y-_e1[1].y,_e1[0].x-_e1[1].x)*180/Math.PI,_e4=Math.atan2(_e2[0].y-_e2[1].y,_e2[0].x-_e2[1].x)*180/Math.PI;return _e4-_e3;}});if(has("extend-esri")){_83.setObject("toolbars._Box",BOX,_89);}return BOX;});},"dojox/grid/_View":function(){require({cache:{"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n"}});define("dojox/grid/_View",["dojo","dijit/registry","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/_base/connect","dojo/_base/sniff","dojo/query","dojo/_base/window","dojo/text!./resources/View.html","dojo/dnd/Source","dijit/_Widget","dijit/_TemplatedMixin","dojox/html/metrics","./util","dojo/_base/html","./_Builder","dojo/dnd/Avatar","dojo/dnd/Manager"],function(_e5,_e6,_e7,_e8,_e9,_ea,_eb,has,_ec,win,_ed,_ee,_ef,_f0,_f1,_f2,_f3,_f4,_f5,_f6){var _f7=function(_f8,_f9){return _f8.style.cssText==undefined?_f8.getAttribute("style"):_f8.style.cssText;};var _fa=_e8("dojox.grid._View",[_ef,_f0],{defaultWidth:"18em",viewWidth:"",templateString:_ed,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:_f4._HeaderBuilder,_contentBuilderClass:_f4._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");_f2.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);_f2.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!this.grid.isLeftToRight()){this.headerNodeContainer.style.width="";}},destroy:function(){_f3.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){this._cleanupRowWidgets(this.rowNodes[i]);_f3.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(has("ie")||has("webkit")||has("opera")){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_fb){var vs=(this.structure=_fb);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_fc){if(_fc){_e9.forEach(_ec("[widgetId]",_fc).map(_e6.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_fd,_fe){this._onBeforeRow(_fd,_fe);if(_fd>=0){this._cleanupRowWidgets(this.getRowNode(_fd));}},onAfterRow:function(_ff,_100,_101){this._onAfterRow(_ff,_100,_101);var g=this.grid;_e9.forEach(_ec(".dojoxGridStubNode",_101),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _102=window.parseInt(_f3.attr(n,"cellIdx"),10);var _103=g.getCell(_102);var w=_e6.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}_e5.destroy(n);}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.view=this;this.flexCells=this.flexCells||cell.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _104=this.hasVScrollbar();var _105=_f3.style(this.scrollboxNode,"overflow");if(this.noscroll||!_105||_105=="hidden"){_104=false;}else{if(_105=="scroll"){_104=true;}}return (_104?_f1.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?(h.firstChild.offsetWidth||_f3.style(h.firstChild,"width")):0;},setColumnsWidth:function(_106){this.headerContentNode.firstChild.style.width=_106+"px";if(this.viewWidth){this.viewWidth=_106+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,_f3._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _107=this.grid.layout.cells;var _108=_ea.hitch(this,function(node,_109){!this.grid.isLeftToRight()&&(_109=!_109);var inc=_109?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_107[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_107[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _10a="dojoxGrid_bottomMarker";var _10b="dojoxGrid_topMarker";if(this.bottomMarker){_f3.destroy(this.bottomMarker);}this.bottomMarker=_f3.byId(_10a);if(this.topMarker){_f3.destroy(this.topMarker);}this.topMarker=_f3.byId(_10b);if(!this.bottomMarker){this.bottomMarker=_f3.create("div",{"id":_10a,"class":"dojoxGridColPlaceBottom"},win.body());this._hide(this.bottomMarker);this.topMarker=_f3.create("div",{"id":_10b,"class":"dojoxGridColPlaceTop"},win.body());this._hide(this.topMarker);}this.arrowDim=_f3.contentBox(this.bottomMarker);var _10c=_f3.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new _ee(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:_ea.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(has("ie")<9?1:0)){_ee.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:_ea.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){_ee.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:_ea.hitch(this,function(_10d){var src=this.source;if(src.current==src.targetAnchor&&src.before==_10d){return;}if(src.targetAnchor&&_108(src.targetAnchor,src.before)){src._removeItemClass(_108(src.targetAnchor,src.before),src.before?"After":"Before");}_ee.prototype._markTargetAnchor.call(src,_10d);var _10e=_10d?src.targetAnchor:_108(src.targetAnchor,src.before);var _10f=0;if(!_10e){_10e=src.targetAnchor;_10f=_f3.contentBox(_10e).w+this.arrowDim.w/2+2;}var pos=_f3.position(_10e,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_10f);_f3.style(this.bottomMarker,"visibility","visible");_f3.style(this.topMarker,"visibility","visible");_f3.style(this.bottomMarker,{"left":left+"px","top":(_10c+pos.y)+"px"});_f3.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_108(src.targetAnchor,src.before)){src._addItemClass(_108(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:_ea.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_108(src.targetAnchor,src.before)){src._removeItemClass(_108(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);_ee.prototype._unmarkTargetAnchor.call(src);}),destroy:_ea.hitch(this,function(){_eb.disconnect(this._source_conn);_eb.unsubscribe(this._source_sub);_ee.prototype.destroy.call(this.source);if(this.bottomMarker){_f3.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){_f3.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:_ea.hitch(this,function(){_ee.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=_eb.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=_eb.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(node){_f3.style(node,{top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_110,_111,copy){if(_f6.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _112=this.grid.views.views;var _113=_112[_110.viewIndex];var _114=_112[this.index];if(_114!=_113){_113.convertColPctToFixed();_114.convertColPctToFixed();}},_onDndDrop:function(_115,_116,copy){if(_f6.manager().target!==this.source){if(_f6.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _117=function(n){return n?_f3.attr(n,"idx"):null;};var w=_f3.marginBox(_116[0]).w;if(_115.viewIndex!==this.index){var _118=this.grid.views.views;var _119=_118[_115.viewIndex];var _11a=_118[this.index];if(_119.viewWidth&&_119.viewWidth!="auto"){_119.setColumnsWidth(_119.getColumnsWidth()-w);}if(_11a.viewWidth&&_11a.viewWidth!="auto"){_11a.setColumnsWidth(_11a.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!this.grid.isLeftToRight()&&(stb=!stb);var _11b=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_11b.moveColumn(_115.viewIndex,idx,_117(_116[0]),_117(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}_f2.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_11c){var n=_11c.name||_11c.grid.getCellName(_11c);if(/^\s+$/.test(n)){n="&nbsp;";}var ret=["<div class=\"dojoxGridSortNode"];if(_11c.index!=_11c.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_11c.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_11c.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_11d){var _11e=this._hasHScroll||false;if(this._hasHScroll==undefined||_11d){if(this.noscroll){this._hasHScroll=false;}else{var _11f=_f3.style(this.scrollboxNode,"overflow");if(_11f=="hidden"){this._hasHScroll=false;}else{if(_11f=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_11e!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_120){var _121=this._hasVScroll||false;if(this._hasVScroll==undefined||_120){if(this.noscroll){this._hasVScroll=false;}else{var _122=_f3.style(this.scrollboxNode,"overflow");if(_122=="hidden"){this._hasVScroll=false;}else{if(_122=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_121!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _123=false;this.grid.initialWidth="";var _124=_ec("th",this.headerContentNode);var _125=_e9.map(_124,function(c,vIdx){var w=c.style.width;_f3.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_123=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return _f3.contentBox(c).w;});if(_123){_e9.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _126=cell.view.getHeaderCellNode(cell.index);if(_126&&_f3.hasAttr(_126,"vIdx")){var vIdx=window.parseInt(_f3.attr(_126,"vIdx"));this.setColWidth(idx,_125[vIdx]);_f3.removeAttr(_126,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_127){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var self=this;var _128=function(){var v;for(var i in self.grid.views.views){v=self.grid.views.views[i];if(v!==self&&v.hasHScrollbar()){return true;}}return false;};if(_127||(this.noscroll&&_128())){h-=_f1.getScrollbar().h;}_f2.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_129){var _12a=this.createRowNode(_129);this.buildRow(_129,_12a);return _12a;},createRowNode:function(_12b){var node=document.createElement("div");node.className=this.classTag+"Row";if(this instanceof _e7.grid._RowSelector){_f3.attr(node,"role","presentation");}else{_f3.attr(node,"role","row");if(this.grid.selectionMode!="none"){node.setAttribute("aria-selected","false");}}node[_f2.gridViewTag]=this.id;node[_f2.rowIndexTag]=_12b;this.rowNodes[_12b]=node;return node;},buildRow:function(_12c,_12d){this.buildRowContent(_12c,_12d);this.styleRow(_12c,_12d);},buildRowContent:function(_12e,_12f){_12f.innerHTML=this.content.generateHtml(_12e,_12e);if(this.flexCells&&this.contentWidth){_12f.firstChild.style.width=this.contentWidth;}_f2.fire(this,"onAfterRow",[_12e,this.structure.cells,_12f]);},rowRemoved:function(_130){if(_130>=0){this._cleanupRowWidgets(this.getRowNode(_130));}this.grid.edit.save(this,_130);delete this.rowNodes[_130];},getRowNode:function(_131){return this.rowNodes[_131];},getCellNode:function(_132,_133){var row=this.getRowNode(_132);if(row){return this.content.getCellNode(row,_133);}},getHeaderCellNode:function(_134){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_134);}},styleRow:function(_135,_136){_136._style=_f7(_136);this.styleRowNode(_135,_136);},styleRowNode:function(_137,_138){if(_138){this.doStyleRowNode(_137,_138);}},doStyleRowNode:function(_139,_13a){this.grid.styleRowNode(_139,_13a);},updateRow:function(_13b){var _13c=this.getRowNode(_13b);if(_13c){_13c.style.height="";this.buildRow(_13b,_13c);}return _13c;},updateRowStyles:function(_13d){this.styleRowNode(_13d,this.getRowNode(_13d));},lastTop:0,firstScroll:0,_nativeScroll:false,doscroll:function(_13e){if(has("ff")>=13){this._nativeScroll=true;}var _13f=this.grid.isLeftToRight();if(this.firstScroll<2){if((!_13f&&this.firstScroll==1)||(_13f&&this.firstScroll===0)){var s=_f3.marginBox(this.headerNodeContainer);if(has("ie")){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(has("mozilla")){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_13f?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}this._nativeScroll=false;},setScrollTop:function(_140){this.lastTop=_140;if(!this._nativeScroll){this.scrollboxNode.scrollTop=_140;}return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_141,_142){this.grid.setCellWidth(_141,_142+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var left=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=left;this.headerNode.scrollLeft=left;}});var _143=_e8("dojox.grid._GridAvatar",_f5,{construct:function(){var dd=win.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _144=this.manager.source,node;if(_144.creator){node=_144._normalizedCreator(_144.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _145,_146;if(node.tagName.toLowerCase()=="tr"){_145=dd.createElement("table");_146=dd.createElement("tbody");_146.appendChild(node);_145.appendChild(_146);node=_145;}else{if(node.tagName.toLowerCase()=="th"){_145=dd.createElement("table");_146=dd.createElement("tbody");var r=dd.createElement("tr");_145.cellPadding=_145.cellSpacing="0";r.appendChild(node);_146.appendChild(r);_145.appendChild(_146);node=_145;}}}node.id="";td.appendChild(node);tr.appendChild(img);tr.appendChild(td);_f3.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=_f6.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){_f6.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _147=_f6.manager().makeAvatar;_f6.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!_f3.hasClass(win.body(),"dijit_a11y")){return new _143(this);}return _147.call(_f6.manager());};return _fa;});},"esri/dijit/editing/TemplatePickerItem":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/sniff","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojox/gfx","esri/symbols/jsonUtils","esri/kernel"],function(_148,lang,_149,has,_14a,_14b,_14c,_14d,gfx,_14e,_14f){var TPI=_148([_14c,_14d],{declaredClass:"esri.dijit.editing.TemplatePickerItem",templateString:"<div class='item' style='text-align: center;'>"+"<div class='itemSymbol' dojoAttachPoint='_surfaceNode'></div>"+"<div class='itemLabel'>${label}</div>"+"</div>",startup:function(){if(this._started){return;}this.inherited(arguments);this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);},_draw:function(node,_150,_151,_152,_153){if(!_150){return;}var _154=gfx.createSurface(node,_151,_152);if(has("ie")<9){var _155=_154.getEventSource();_14b.set(_155,"position","relative");_14b.set(_155.parentNode,"position","relative");}var _156=(!this.legendOverride&&this._getDrawingToolShape(_150,_153))||_14e.getShapeDescriptors(_150);var _157;try{_157=_154.createShape(_156.defaultShape).setFill(_156.fill).setStroke(_156.stroke);}catch(e){_154.clear();_154.destroy();return;}var bbox=_157.getBoundingBox(),_158=bbox.width,_159=bbox.height,_15a=-(bbox.x+(_158/2)),_15b=-(bbox.y+(_159/2)),dim=_154.getDimensions(),_15c={dx:_15a+dim.width/2,dy:_15b+dim.height/2};if(_158>_151||_159>_152){var _15d=_158>_159?_158:_159;var _15e=_151<_152?_151:_152;var _15f=(_15e-5)/_15d;lang.mixin(_15c,{xx:_15f,yy:_15f});}_157.applyTransform(_15c);return _154;},_getDrawingToolShape:function(_160,_161){var _162,_163=_161?_161.drawingTool||null:null;switch(_163){case "esriFeatureEditToolArrow":_162={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolLeftArrow":_162={type:"path",path:"M -15,1 L -8,8 L -8,5 L 10,5 L 10,-2 L -8,-2 L -8,-5 L -15,1 E"};break;case "esriFeatureEditToolRightArrow":_162={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolUpArrow":_162={type:"path",path:"M 1,-10 L 8,-3 L 5,-3 L 5,15 L -2,15 L -2,-3 L -5,-3 L 1,-10 E"};break;case "esriFeatureEditToolDownArrow":_162={type:"path",path:"M 1,15 L 8,8 L 5,8 L 5,-10 L -2,-10 L -2,8 L -5,8 L 1,15 E"};break;case "esriFeatureEditToolTriangle":_162={type:"path",path:"M -10,14 L 2,-10 L 14,14 L -10,14 E"};break;case "esriFeatureEditToolRectangle":_162={type:"path",path:"M -10,-10 L 10,-10 L 10,10 L -10,10 L -10,-10 E"};break;case "esriFeatureEditToolCircle":_162={type:"circle",cx:0,cy:0,r:10};break;case "esriFeatureEditToolEllipse":_162={type:"ellipse",cx:0,cy:0,rx:10,ry:5};break;case "esriFeatureEditToolFreehand":if(_160.type==="simplelinesymbol"||_160.type==="cartographiclinesymbol"){_162={type:"path",path:"m -11, -7c-1.5,-3.75 7.25,-9.25 12.5,-7c5.25,2.25 6.75,9.75 3.75,12.75c-3,3 -3.25,2.5 -9.75,5.25c-6.5,2.75 -7.25,14.25 2,15.25c9.25,1 11.75,-4 13.25,-6.75c1.5,-2.75 3.5,-11.75 12,-6.5"};}else{_162={type:"path",path:"M 10,-13 c3.1,0.16667 4.42564,2.09743 2.76923,3.69231c-2.61025,2.87179 -5.61025,5.6718 -6.14358,6.20513c-0.66667,0.93333 -0.46667,1.2 -0.53333,1.93333c-0.00001,0.86666 0.6,1.66667 1.13334,2c1.03077,0.38462 2.8,0.93333 3.38974,1.70769c0.47693,0.42564 0.87693,0.75897 1.41026,1.75897c0.13333,1.06667 -0.46667,2.86667 -1.8,3.8c-0.73333,0.73333 -3.86667,2.66666 -4.86667,3.13333c-0.93333,0.8 -7.4,3.2 -7.6,3.06667c-1.06667,0.46667 -4.73333,1.13334 -5.2,1.26667c-1.6,0.33334 -4.6,0.4 -6.25128,0.05128c-1.41539,-0.18462 -2.34872,-2.31796 -1.41539,-4.45129c0.93333,-1.73333 1.86667,-3.13333 2.64615,-3.85641c1.28718,-1.47692 2.57437,-2.68204 3.88718,-3.54359c0.88718,-1.13845 1.8,-1.33333 2.26666,-2.45641c0.33334,-0.74359 0.37949,-1.7641 0.06667,-2.87692c-0.66666,-1.46666 -1.66666,-1.86666 -2.98975,-2.2c-1.27692,-0.26666 -2.12307,-0.64102 -3.27692,-1.46666c-0.66667,-1.00001 -1.01538,-3.01539 0.73333,-4.06667c1.73333,-1.2 3.6,-1.93333 4.93333,-2.2c1.33333,-0.46667 4.84104,-1.09743 5.84103,-1.23076c1.60001,-0.46667 6.02564,-0.50257 7.29231,-0.56924z"};}break;default:return null;}return {defaultShape:_162,fill:_160.getFill(),stroke:_160.getStroke()};},_repaint:function(_164){if(!_164){this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);return;}if(_164.getStroke&&_164.setStroke){_164.setStroke(_164.getStroke());}if(_164.getFill&&_164.setFill){_164.setFill(_164.getFill());}if(_164.children&&lang.isArray(_164.children)){_149.forEach(_164.children,this._repaint,this);}},destroy:function(){if(this._surface){this._surface.destroy();delete this._surface;}this.inherited(arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.TemplatePickerItem",TPI,_14f);}return TPI;});},"dojo/dnd/Selector":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../dom","../dom-construct","../mouse","../_base/NodeList","../on","../touch","./common","./Container"],function(_165,_166,_167,_168,lang,dom,_169,_16a,_16b,on,_16c,dnd,_16d){var _16e=_166("dojo.dnd.Selector",_16d,{constructor:function(node,_16f){if(!_16f){_16f={};}this.singular=_16f.singular;this.autoSync=_16f.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(on(this.node,_16c.press,lang.hitch(this,"onMouseDown")),on(this.node,_16c.release,lang.hitch(this,"onMouseUp")));},singular:false,getSelectedNodes:function(){var t=new _16b();var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dom.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dom.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dom.byId(i);this.delItem(i);_169.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||_168.global;var s=this.selection,e=dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){_16e.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}_165.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_170,data,_171,_172){var _173=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_173.call(this,item,hint);if(_170){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};_16e.superclass.insertNodes.call(this,data,_171,_172);this._normalizedCreator=_173;return this;},destroy:function(){_16e.superclass.destroy.call(this);this.selection=this.anchor=null;},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(_16a.isLeft(e)){_167.stop(e);}return;}if(!this.singular&&e.shiftKey){if(!dnd.getCopyKeyState(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0,node;for(;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dnd.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dnd.getCopyKeyState(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}_167.stop(e);},onMouseUp:function(){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=on(this.node,_16c.move,lang.hitch(this,"onMouseMove"));},onOutEvent:function(){if(this.onmousemoveEvent){this.onmousemoveEvent.remove();delete this.onmousemoveEvent;}},_removeSelection:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dom.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});return _16e;});},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(_174){return function(_175,_176){switch(typeof _175){default:throw new Error("Can not query with a "+typeof _175);case "object":case "undefined":var _177=_175;_175=function(_178){for(var key in _177){var _179=_177[key];if(_179&&_179.test){if(!_179.test(_178[key],_178)){return false;}}else{if(_179!=_178[key]){return false;}}}return true;};break;case "string":if(!this[_175]){throw new Error("No filter function "+_175+" was found in store");}_175=this[_175];case "function":}function _17a(_17b){var _17c=_174.filter(_17b,_175);var _17d=_176&&_176.sort;if(_17d){_17c.sort(typeof _17d=="function"?_17d:function(a,b){for(var sort,i=0;sort=_17d[i];i++){var _17e=a[sort.attribute];var _17f=b[sort.attribute];if(_17e!=_17f){return !!sort.descending==(_17e==null||_17e>_17f)?-1:1;}}return 0;});}if(_176&&(_176.start||_176.count)){var _180=_17c.length;_17c=_17c.slice(_176.start||0,(_176.start||0)+(_176.count||Infinity));_17c.total=_180;}return _17c;};_17a.matches=_175;return _17a;};});},"esri/dijit/editing/tools/EditingTools":function(){define(["dojo/_base/lang","dojo/has","esri/toolbars/draw","esri/kernel"],function(lang,has,Draw,_181){var _182={point:{id:"esriPointTool",_enabledIcon:"toolbarIcon pointIcon",_disabledIcon:"toolbarIcon pointIconDisabled",_drawType:Draw.POINT,_geomType:"esriGeometryPoint",_label:"NLS_pointLbl"},polyline:{id:"toolDrawFreehandPolyline",_enabledIcon:"toolbarIcon polylineIcon",_disabledIcon:"toolbarIcon polylineIconDisabled",_drawType:Draw.POLYLINE,_geomType:"esriGeometryPolyline",_label:"NLS_polylineLbl"},freehandpolyline:{id:"toolDrawPolyline",_enabledIcon:"toolbarIcon freehandPolylineIcon",_disabledIcon:"toolbarIcon freehandPolylineIcon",_drawType:Draw.FREEHAND_POLYLINE,_geomType:"esriGeometryPolyline",_label:"NLS_freehandPolylineLbl"},polygon:{id:"toolDrawPolygon",_enabledIcon:"toolbarIcon polygonIcon",_disabledIcon:"toolbarIcon polygonIconDisabled",_drawType:Draw.POLYGON,_geomType:"esriGeometryPolygon",_label:"NLS_polygonLbl"},freehandpolygon:{id:"toolDrawFreehandPolygon",_enabledIcon:"toolbarIcon freehandPolygonIcon",_disabledIcon:"toolbarIcon freehandPolygonIconDisabled",_drawType:Draw.FREEHAND_POLYGON,_label:"NLS_freehandPolygonLbl",_geomType:"esriGeometryPolygon"},autocomplete:{id:"btnFeatureAutoComplete",_enabledIcon:"toolbarIcon autoCompleteIcon",_disabledIcon:"toolbarIcon autoCompleteIcon",_drawType:Draw.POLYGON,_label:"NLS_autoCompleteLbl",_geomType:"esriGeometryPolygon"},rectangle:{id:"toolDrawRect",_enabledIcon:"toolbarIcon rectangleIcon",_disabledIcon:"toolbarIcon rectangleIcon",_drawType:Draw.RECTANGLE,_geomType:"esriGeometryPolygon",_label:"NLS_rectangleLbl"},arrow:{id:"toolDrawArrow",_enabledIcon:"toolbarIcon arrowIcon",_disabledIcon:"toolbarIcon arrowIcon",_drawType:Draw.ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowLbl"},uparrow:{id:"toolDrawArrowUp",_enabledIcon:"toolbarIcon arrowUpIcon",_disabledIcon:"toolbarIcon arrowUpIcon",_drawType:Draw.UP_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowUpLbl"},downarrow:{id:"toolDrawDownArrow",_enabledIcon:"toolbarIcon arrowDownIcon",_disabledIcon:"toolbarIcon arrowDownIcon",_drawType:Draw.DOWN_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowDownLbl"},leftarrow:{id:"toolDrawLeftArrow",_enabledIcon:"toolbarIcon arrowLeftIcon",_disabledIcon:"toolbarIcon arrowLeftIcon",_drawType:Draw.LEFT_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowLeftLbl"},rightarrow:{id:"toolDrawRightArrow",_enabledIcon:"toolbarIcon arrowIcon",_disabledIcon:"toolbarIcon arrowIcon",_drawType:Draw.RIGHT_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowRightLbl"},circle:{id:"toolDrawCircle",_enabledIcon:"toolbarIcon circleIcon",_disabledIcon:"toolbarIcon circleIcon",_drawType:Draw.CIRCLE,_geomType:"esriGeometryPolygon",_label:"NLS_circleLbl"},ellipse:{id:"toolDrawEllipse",_enabledIcon:"toolbarIcon ellipseIcon",_disabledIcon:"toolbarIcon ellipseIcon",_drawType:Draw.ELLIPSE,_geomType:"esriGeometryPolygon",_label:"NLS_ellipseLbl"},triangle:{id:"toolDrawTriangle",_enabledIcon:"toolbarIcon triangleIcon",_disabledIcon:"toolbarIcon triangleIcon",_drawType:Draw.TRIANGLE,_geomType:"esriGeometryPolygon",_label:"NLS_triangleLbl"},attributes:{id:"btnAttributes",_enabledIcon:"toolbarIcon attributesIcon",_disabledIcon:"toolbarIcon attributesIcon",_enabled:false,_label:"NLS_attributesLbl"},del:{id:"btnDelete2",_enabledIcon:"toolbarIcon deleteFeatureIcon",_disabledIcon:"toolbarIcon deleteFeatureIcon",_enabled:false,_label:"NLS_deleteLbl"},undo:{id:"btnUndo",_enabledIcon:"dijitEditorIcon dijitEditorIconUndo",_disabledIcon:"dijitEditorIcon dijitEditorIconUndo",_enabled:false,_label:"NLS_undoLbl"},redo:{id:"btnRedo",_enabledIcon:"dijitEditorIcon dijitEditorIconRedo",_disabledIcon:"dijitEditorIcon dijitEditorIconRedo",_enabled:false,_label:"NLS_redoLbl"}};if(has("extend-esri")){lang.setObject("dijit.editing.tools.EditingTools",_182,_181);}return _182;});},"dijit/ProgressBar":function(){require({cache:{"url:dijit/templates/ProgressBar.html":"<div class=\"dijitProgressBar dijitProgressBarEmpty\" role=\"progressbar\"\n\t><div  data-dojo-attach-point=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\" role=\"presentation\"></div\n\t\t><span style=\"visibility:hidden\">&#160;</span\n\t></div\n\t><div data-dojo-attach-point=\"labelNode\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"></div\n\t><img data-dojo-attach-point=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n/></div>\n"}});define("dijit/ProgressBar",["require","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/number","./_Widget","./_TemplatedMixin","dojo/text!./templates/ProgressBar.html"],function(_183,_184,_185,lang,_186,_187,_188,_189){return _184("dijit.ProgressBar",[_187,_188],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,label:"",name:"",templateString:_189,_indeterminateHighContrastImagePath:_183.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);if(!(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();},update:function(_18a){lang.mixin(this,_18a||{});var tip=this.internalProgress,ap=this.domNode;var _18b=1;if(this.indeterminate){ap.removeAttribute("aria-valuenow");}else{if(String(this.progress).indexOf("%")!=-1){_18b=Math.min(parseFloat(this.progress)/100,1);this.progress=_18b*this.maximum;}else{this.progress=Math.min(this.progress,this.maximum);_18b=this.maximum?this.progress/this.maximum:0;}ap.setAttribute("aria-valuenow",this.progress);}ap.setAttribute("aria-describedby",this.labelNode.id);ap.setAttribute("aria-valuemin",0);ap.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(_18b);_185.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);tip.style.width=(_18b*100)+"%";this.onChange();},_setValueAttr:function(v){this._set("value",v);if(v==Infinity){this.update({indeterminate:true});}else{this.update({indeterminate:false,progress:v});}},_setLabelAttr:function(_18c){this._set("label",_18c);this.update();},_setIndeterminateAttr:function(_18d){this.indeterminate=_18d;this.update();},report:function(_18e){return this.label?this.label:(this.indeterminate?"&#160;":_186.format(_18e,{type:"percent",places:this.places,locale:this.lang}));},onChange:function(){}});});},"dijit/Toolbar":function(){define("dijit/Toolbar",["require","dojo/_base/declare","dojo/has","dojo/keys","dojo/ready","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_18f,_190,has,keys,_191,_192,_193,_194){if(has("dijit-legacy-requires")){_191(0,function(){var _195=["dijit/ToolbarSeparator"];_18f(_195);});}return _190("dijit.Toolbar",[_192,_194,_193],{templateString:"<div class=\"dijit\" role=\"toolbar\" tabIndex=\"${tabIndex}\" data-dojo-attach-point=\"containerNode\">"+"</div>",baseClass:"dijitToolbar",postCreate:function(){this.inherited(arguments);this.connectKeyNavHandlers(this.isLeftToRight()?[keys.LEFT_ARROW]:[keys.RIGHT_ARROW],this.isLeftToRight()?[keys.RIGHT_ARROW]:[keys.LEFT_ARROW]);}});});},"esri/dijit/editing/toolbars/Drawing":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dijit/_CssStateMixin","esri/dijit/editing/Util","esri/dijit/editing/toolbars/ToolbarBase","esri/dijit/editing/tools/ButtonToolBase","esri/dijit/editing/tools/Cut","esri/dijit/editing/tools/Union","esri/dijit/editing/tools/Reshape","esri/dijit/editing/tools/Editing","esri/dijit/editing/tools/EditingTools","esri/dijit/editing/tools/Selection","esri/dijit/editing/tools/SelectionTools","esri/kernel"],function(_196,lang,_197,_198,has,_199,_19a,_19b,_19c,Cut,_19d,_19e,_19f,_1a0,_1a1,_1a2,_1a3){var _1a4=_196([_19b,_199],{declaredClass:"esri.dijit.editing.toolbars.Drawing",onShowAttributeInspector:function(){},_activateTool:function(tool,_1a5){this._settings.editor._activeTool=tool;if(tool!=="EDITING"){this._settings.templatePicker.clearSelection();}if(tool!=="ATTRIBUTES"){this._settings.editor._hideAttributeInspector();}if(tool==="CLEAR"){return;}this.inherited(arguments);},_initializeToolbar:function(){var _1a6=this._settings.layers;_197.forEach(_1a6,function(_1a7){this._tbConnects.push(_198.connect(_1a7,"onSelectionComplete",this,"_updateUI"));},this);},activateEditing:function(_1a8,_1a9){this._tools.EDITING._activateTool(_1a8,_1a9.geometryType);this._activeTool=this._tools.EDITING;this._activeTool.setChecked(true);},_updateUI:function(){if(this._settings.undoManager){this._tools.UNDO.set("disabled",this._settings.undoManager.canUndo===false);this._tools.REDO.set("disabled",this._settings.undoManager.canRedo===false);}this._selectedFeatures=_19a.getSelection(this._settings.layers);var _1aa=this._selectedFeatures.length;if(this._tools.DELETE){this._tools.DELETE.set("disabled",_1aa<=0);}if(this._tools.CLEAR){this._tools.CLEAR.set("disabled",_1aa<=0);}if(this._tools.ATTRIBUTES){this._tools.ATTRIBUTES.set("disabled",_1aa<=0);}if(this._tools.UNION){this._tools.UNION.set("disabled",_1aa<2);}},_toolFinished:function(tool){if(tool==="ATTRIBUTES"&&(this._selectedFeatures&&this._selectedFeatures.length)){this.onShowAttributeInspector(this._selectedFeatures[0]);}if(tool==="SELECT"||tool==="CUT"||tool==="RESHAPING"||tool==="EDITING"){this._activeTool.deactivate();this._activeTool.setChecked(false);this._activeTool=null;}if(tool==="DELETE"){this.onDelete();}this._updateUI();},_createTools:function(){this._tools.SELECT=new _1a1({settings:this._settings,onClick:lang.hitch(this,"_activateTool","SELECT",true),onFinished:lang.hitch(this,"_toolFinished","SELECT")});this.addChild(this._tools.SELECT);this._tools.CLEAR=new _19c(lang.mixin(_1a2.selectClear,{settings:this._settings,onClick:lang.hitch(this._settings.editor,"_clearSelection",false)}));this.addChild(this._tools.CLEAR);this._createSeparator();this._tools.ATTRIBUTES=new _19c(lang.mixin(_1a0.attributes,{settings:this._settings,onClick:lang.hitch(this,"_toolFinished","ATTRIBUTES")}));this.addChild(this._tools.ATTRIBUTES);this._createSeparator();this._tools.EDITING=new _19f({settings:this._settings,onClick:lang.hitch(this,"_activateTool","EDITING",true),onApplyEdits:lang.hitch(this,"onApplyEdits"),onFinished:lang.hitch(this,"_toolFinished","EDITING")});this.addChild(this._tools.EDITING);this._tools.DELETE=new _19c(lang.mixin(_1a0.del,{settings:this._settings,onClick:lang.hitch(this,"_toolFinished","DELETE")}));this.addChild(this._tools.DELETE);if(this._settings.toolbarOptions){if(this._settings.toolbarOptions.cutVisible||this._settings.toolbarOptions.mergeVisible||this._settings.toolbarOptions.reshapeVisible){this._createSeparator();}if(this._settings.toolbarOptions.cutVisible){this._tools.CUT=new Cut({settings:this._settings,onFinished:lang.hitch(this,"_toolFinished","CUT"),onClick:lang.hitch(this,"_activateTool","CUT",true),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.CUT);}if(this._settings.toolbarOptions.mergeVisible){this._tools.UNION=new _19d({settings:this._settings,onFinished:lang.hitch(this,"_toolFinished","UNION"),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.UNION);}if(this._settings.toolbarOptions.reshapeVisible){this._tools.RESHAPING=new _19e({settings:this._settings,onClick:lang.hitch(this,"_activateTool","RESHAPING",true),onFinished:lang.hitch(this,"_toolFinished","RESHAPING"),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.RESHAPING);}}if(this._settings.enableUndoRedo){this._createSeparator();this._tools.UNDO=new _19c(lang.mixin(_1a0.undo,{settings:this._settings,onClick:lang.hitch(this,function(){this._tools.UNDO.set("disabled",true);this._tools.REDO.set("disabled",true);this._settings.editor._undo();})}));this.addChild(this._tools.UNDO);this._tools.REDO=new _19c(lang.mixin(_1a0.redo,{settings:this._settings,onClick:lang.hitch(this,function(){this._tools.UNDO.set("disabled",true);this._tools.REDO.set("disabled",true);this._settings.editor._redo();})}));this.addChild(this._tools.REDO);}}});if(has("extend-esri")){lang.setObject("dijit.editing.toolbars.Drawing",_1a4,_1a3);}return _1a4;});},"url:esri/dijit/templates/AttributeInspector.html":"<div class=\"esriAttributeInspector\">\r\n    <div class=\"atiLayerName\" dojoAttachPoint=\"layerName\"></div>\r\n    <div class=\"atiAttributes\" dojoAttachPoint=\"attributeTable\"></div>\r\n    <div dojoAttachPoint=\"attachmentEditor\"></div>\r\n    <div class=\"atiEditorTrackingInfo\" dojoAttachPoint=\"editorTrackingInfoDiv\"></div>\r\n    <div class=\"atiButtons\" dojoAttachPoint=\"editButtons\">\r\n        <button  dojoType=\"dijit.form.Button\" class=\"atiButton atiDeleteButton\"  dojoAttachPoint=\"deleteBtn\" dojoAttachEvent=\"onClick: onDeleteBtn\" showLabel=\"true\" type=\"button\">${NLS_deleteFeature}</button>\r\n        <div class=\"atiNavButtons\" dojoAttachPoint=\"navButtons\">\r\n            <div class=\"atiNavMessage\" dojoAttachPoint=\"navMessage\"></div>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiFirstIcon\" dojoAttachPoint=\"firstFeatureButton\" dojoAttachEvent=\"onClick: onFirstFeature\" showLabel=\"false\" type=\"button\">${NLS_first}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiPrevIcon\" dojoAttachPoint=\"prevFeatureButton\" dojoAttachEvent=\"onClick: onPreviousFeature\" showLabel=\"false\" type=\"button\">${NLS_previous}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiNextIcon\" dojoAttachPoint=\"nextFeatureButton\" dojoAttachEvent=\"onClick: onNextFeature\" showLabel=\"false\" type=\"button\">${NLS_next}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiLastIcon\" dojoAttachPoint=\"lastFeatureButton\" dojoAttachEvent=\"onClick: onLastFeature\" showLabel=\"false\" type=\"button\">${NLS_last}</button>\r\n        </div>\r\n    </div>\r\n</div>\r\n","dojox/grid/DataSelection":function(){define("dojox/grid/DataSelection",["dojo/_base/declare","./_SelectionPreserver","./Selection"],function(_1ab,_1ac,_1ad){return _1ab("dojox.grid.DataSelection",_1ad,{constructor:function(grid){if(grid.keepSelection){this.preserver=new _1ac(this);}},destroy:function(){if(this.preserver){this.preserver.destroy();}},getFirstSelected:function(){var idx=_1ad.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_1ae){var _1af=this.grid.getItemIndex(_1ae);var idx=_1ad.prototype.getNextSelected.call(this,_1af);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _1b0=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_1b0.push(this.grid.getItem(i));}}return _1b0;},addToSelection:function(_1b1){if(this.mode=="none"){return;}var idx=null;if(typeof _1b1=="number"||typeof _1b1=="string"){idx=_1b1;}else{idx=this.grid.getItemIndex(_1b1);}_1ad.prototype.addToSelection.call(this,idx);},deselect:function(_1b2){if(this.mode=="none"){return;}var idx=null;if(typeof _1b2=="number"||typeof _1b2=="string"){idx=_1b2;}else{idx=this.grid.getItemIndex(_1b2);}_1ad.prototype.deselect.call(this,idx);},deselectAll:function(_1b3){var idx=null;if(_1b3||typeof _1b3=="number"){if(typeof _1b3=="number"||typeof _1b3=="string"){idx=_1b3;}else{idx=this.grid.getItemIndex(_1b3);}_1ad.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});});},"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n","dojo/dnd/Manager":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../_base/window","../dom-class","../Evented","../has","../keys","../on","../topic","../touch","./common","./autoscroll","./Avatar"],function(_1b4,_1b5,_1b6,lang,win,_1b7,_1b8,has,keys,on,_1b9,_1ba,dnd,_1bb,_1bc){var _1bd=_1b5("dojo.dnd.Manager",[_1b8],{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:has("touch")?0:16,OFFSET_Y:has("touch")?-64:16,overSource:function(_1be){if(this.avatar){this.target=(_1be&&_1be.targetState!="Disabled")?_1be:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}_1b9.publish("/dnd/source/over",_1be);},outSource:function(_1bf){if(this.avatar){if(this.target==_1bf){this.target=null;this.canDropFlag=false;this.avatar.update();_1b9.publish("/dnd/source/over",null);}}else{_1b9.publish("/dnd/source/over",null);}},startDrag:function(_1c0,_1c1,copy){_1bb.autoScrollStart(win.doc);this.source=_1c0;this.nodes=_1c1;this.copy=Boolean(copy);this.avatar=this.makeAvatar();win.body().appendChild(this.avatar.node);_1b9.publish("/dnd/start",_1c0,_1c1,this.copy);this.events=[on(win.doc,_1ba.move,lang.hitch(this,"onMouseMove")),on(win.doc,_1ba.release,lang.hitch(this,"onMouseUp")),on(win.doc,"keydown",lang.hitch(this,"onKeyDown")),on(win.doc,"keyup",lang.hitch(this,"onKeyUp")),on(win.doc,"dragstart",_1b6.stop),on(win.body(),"selectstart",_1b6.stop)];var c="dojoDnd"+(copy?"Copy":"Move");_1b7.add(win.body(),c);},canDrop:function(flag){var _1c2=Boolean(this.target&&flag);if(this.canDropFlag!=_1c2){this.canDropFlag=_1c2;this.avatar.update();}},stopDrag:function(){_1b7.remove(win.body(),["dojoDndCopy","dojoDndMove"]);_1b4.forEach(this.events,function(_1c3){_1c3.remove();});this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new _1bc(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){_1bb.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}if(has("touch")){e.preventDefault();}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));_1b9.publish("/dnd/drop/before",this.source,this.nodes,copy,this.target,e);_1b9.publish("/dnd/drop",this.source,this.nodes,copy,this.target,e);}else{_1b9.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case keys.ESCAPE:_1b9.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();_1b7.replace(win.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});dnd._manager=null;_1bd.manager=dnd.manager=function(){if(!dnd._manager){dnd._manager=new _1bd();}return dnd._manager;};return _1bd;});},"dojox/grid/_RowSelector":function(){define("dojox/grid/_RowSelector",["dojo/_base/declare","./_View"],function(_1c4,_1c5){return _1c4("dojox.grid._RowSelector",_1c5,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_1c6,_1c7){var w=this.contentWidth||0;_1c7.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode&&this.contentNode.offsetWidth>0){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_1c8,_1c9){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_1c8)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_1c8)){n.push("dojoxGridRowbarSelected");}_1c9.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});});},"dojox/grid/_Layout":function(){define("dojox/grid/_Layout",["dojo/_base/kernel","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-geometry","./cells","./_RowSelector"],function(dojo,_1ca,_1cb,_1cc,lang,_1cd){return _1cb("dojox.grid._Layout",null,{constructor:function(_1ce){this.grid=_1ce;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_1cf,_1d0,_1d1,_1d2,_1d3){var _1d4=this.structure[_1cf].cells[0];var _1d5=this.structure[_1d0].cells[0];var cell=null;var _1d6=0;var _1d7=0;for(var i=0,c;c=_1d4[i];i++){if(c.index==_1d1){_1d6=i;break;}}cell=_1d4.splice(_1d6,1)[0];cell.view=this.grid.views.views[_1d0];for(i=0,c=null;c=_1d5[i];i++){if(c.index==_1d2){_1d7=i;break;}}if(!_1d3){_1d7+=1;}_1d5.splice(_1d7,0,cell);var _1d8=this.grid.getCell(this.grid.getSortIndex());if(_1d8){_1d8._currentlySorted=this.grid.getSortAsc();}this.cells=[];_1d1=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_1d1;this.cells.push(c);if("_currentlySorted" in c){var si=_1d1+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_1d1++;}}}_1cc.forEach(this.cells,function(c){var _1d9=c.markup[2].split(" ");var _1da=parseInt(_1d9[1].substring(5));if(_1da!=c.index){_1d9[1]="idx=\""+c.index+"\"";c.markup[2]=_1d9.join(" ");}});this.grid.setupHeaderMenu();},setColumnVisibility:function(_1db,_1dc){var cell=this.cells[_1db];if(cell.hidden==_1dc){cell.hidden=!_1dc;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=_1cd.getMarginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_1dd,_1de,_1df){var self=this;var _1e0=function(_1e1){var w=0;if(_1e1.colSpan>1){w=0;}else{w=_1e1.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _1e2={grid:this.grid,subrow:_1dd,layoutIndex:_1de,index:this.cells.length};if(_1df&&_1df instanceof _1ca.grid.cells._Base){var _1e3=lang.clone(_1df);_1e2.unitWidth=_1e0(_1e3._props);_1e3=lang.mixin(_1e3,this._defaultCellProps,_1df._props,_1e2);return _1e3;}var _1e4=_1df.type||_1df.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||_1ca.grid.cells.Cell;if(lang.isString(_1e4)){_1e4=lang.getObject(_1e4);}_1e2.unitWidth=_1e0(_1df);return new _1e4(lang.mixin({},this._defaultCellProps,_1df,_1e2));},addRowDef:function(_1e5,_1e6){var _1e7=[];var _1e8=0,_1e9=0,_1ea=true;for(var i=0,def,cell;(def=_1e6[i]);i++){cell=this.addCellDef(_1e5,i,def);_1e7.push(cell);this.cells.push(cell);if(_1ea&&cell.relWidth){_1e8+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_1e9+=window.parseInt(w,10);}else{if(w=="auto"){_1ea=false;}}}}}if(_1e8&&_1ea){_1cc.forEach(_1e7,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_1e8)*(100-_1e9))+"%";}});}return _1e7;},addRowsDef:function(_1eb){var _1ec=[];if(lang.isArray(_1eb)){if(lang.isArray(_1eb[0])){for(var i=0,row;_1eb&&(row=_1eb[i]);i++){_1ec.push(this.addRowDef(i,row));}}else{_1ec.push(this.addRowDef(0,_1eb));}}return _1ec;},addViewDef:function(_1ed){this._defaultCellProps=_1ed.defaultCell||{};if(_1ed.width&&_1ed.width=="auto"){delete _1ed.width;}return lang.mixin({},_1ed,{cells:this.addRowsDef(_1ed.rows||_1ed.cells)});},setStructure:function(_1ee){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:_1ca._scopeName+".grid._RowSelector"};if(lang.isString(this.grid.rowSelector)){var _1ef=this.grid.rowSelector;if(_1ef=="false"){sel=null;}else{if(_1ef!="true"){sel["width"]=_1ef;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _1f0=function(def){return ("name" in def||"field" in def||"get" in def);};var _1f1=function(def){if(lang.isArray(def)){if(lang.isArray(def[0])||_1f0(def[0])){return true;}}return false;};var _1f2=function(def){return (def!==null&&lang.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_1f0(def))));};if(lang.isArray(_1ee)){var _1f3=false;for(var i=0,st;(st=_1ee[i]);i++){if(_1f2(st)){_1f3=true;break;}}if(!_1f3){s.push(this.addViewDef({cells:_1ee}));}else{for(i=0;(st=_1ee[i]);i++){if(_1f1(st)){s.push(this.addViewDef({cells:st}));}else{if(_1f2(st)){s.push(this.addViewDef(st));}}}}}else{if(_1f2(_1ee)){s.push(this.addViewDef(_1ee));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});});},"dijit/Editor":function(){define("dijit/Editor",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/i18n","dojo/dom-attr","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/string","dojo/topic","dojo/_base/window","./_base/focus","./_Container","./Toolbar","./ToolbarSeparator","./layout/_LayoutWidget","./form/ToggleButton","./_editor/_Plugin","./_editor/plugins/EnterKeyHandling","./_editor/html","./_editor/range","./_editor/RichText","./main","dojo/i18n!./_editor/nls/commands"],function(_1f4,_1f5,_1f6,_1f7,i18n,_1f8,_1f9,_1fa,_1fb,_1fc,keys,lang,has,_1fd,_1fe,win,_1ff,_200,_201,_202,_203,_204,_205,_206,html,_207,_208,_209){var _20a=_1f6("dijit.Editor",_208,{plugins:null,extraPlugins:null,constructor:function(){if(!lang.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",_206];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(has("ie")){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postMixInProperties:function(){this.setValueDeferred=new _1f7();this.inherited(arguments);},postCreate:function(){this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);if(lang.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new _201({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang});this.header.appendChild(this.toolbar.domNode);}_1f5.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(true);_1f9.add(this.iframe.parentNode,"dijitEditorIFrameContainer");_1f9.add(this.iframe,"dijitEditorIFrame");_1f8.set(this.iframe,"allowTransparency",true);if(has("webkit")){_1fb.set(this.domNode,"KhtmlUserSelect","none");}this.toolbar.startup();this.onNormalizedDisplayChanged();},destroy:function(){_1f5.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_20b,_20c){var args=lang.isString(_20b)?{name:_20b}:lang.isFunction(_20b)?{ctor:_20b}:_20b;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};if(args.name){if(_205.registry[args.name]){o.plugin=_205.registry[args.name](args);}else{_1fe.publish(_209._scopeName+".Editor.getPlugin",o);}}if(!o.plugin){try{var pc=args.ctor||lang.getObject(args.name)||_1f4(args.name);if(pc){o.plugin=new pc(args);}}catch(e){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}}if(!o.plugin){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}_20b=o.plugin;}if(arguments.length>1){this._plugins[_20c]=_20b;}else{this._plugins.push(_20b);}_20b.setEditor(this);if(lang.isFunction(_20b.setToolbar)){_20b.setToolbar(this.toolbar);}},resize:function(size){if(size){_203.prototype.resize.apply(this,arguments);}},layout:function(){var _20d=(this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+_1fa.getPadBorderExtents(this.iframe.parentNode).h+_1fa.getMarginExtents(this.iframe.parentNode).h));this.editingArea.style.height=_20d+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _20e;var b=this.document.body;var _20f=b.clientWidth;var _210=b.clientHeight;var _211=b.clientLeft;var _212=b.offsetWidth;var _213=b.offsetHeight;var _214=b.offsetLeft;if(/^rtl$/i.test(b.dir||"")){if(_20f<_212&&e.x>_20f&&e.x<_212){_20e=true;}}else{if(e.x<_211&&e.x>_214){_20e=true;}}if(!_20e){if(_210<_213&&e.y>_210&&e.y<_213){_20e=true;}}if(!_20e){delete this._cursorToStart;delete this._savedSelection;if(e.target.tagName=="BODY"){this.defer("placeCursorAtEnd");}this.inherited(arguments);}},onBeforeActivate:function(){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:true,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){this._editTimer.remove();}this._editTimer=this.defer("endEditing",this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r=this.inherited(arguments);if(this.customUndo){this._endEditing();}return r;}},_pasteImpl:function(){return this._clipboardCommand("paste");},_cutImpl:function(){return this._clipboardCommand("cut");},_copyImpl:function(){return this._clipboardCommand("copy");},_clipboardCommand:function(cmd){var r;try{r=this.document.execCommand(cmd,false,null);if(has("webkit")&&!r){throw {code:1011};}}catch(e){if(e.code==1011||(e.code==9&&has("opera"))){var sub=_1fd.substitute,_215={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[has("mac")?"appleKey":"ctrlKey"],[_215[cmd]])]));}r=false;}return r;},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited(arguments);}},_moveToBookmark:function(b){var _216=b.mark;var mark=b.mark;var col=b.isCollapsed;var r,_217,_218,sel;if(mark){if(has("ie")<9){if(lang.isArray(mark)){_216=[];_1f5.forEach(mark,function(n){_216.push(_207.getNode(n,this.editNode));},this);win.withGlobal(this.window,"moveToBookmark",_1ff,[{mark:_216,isCollapsed:col}]);}else{if(mark.startContainer&&mark.endContainer){sel=_207.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_207.create(this.window);_217=_207.getNode(mark.startContainer,this.editNode);_218=_207.getNode(mark.endContainer,this.editNode);if(_217&&_218){r.setStart(_217,mark.startOffset);r.setEnd(_218,mark.endOffset);sel.addRange(r);}}}}}else{sel=_207.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_207.create(this.window);_217=_207.getNode(mark.startContainer,this.editNode);_218=_207.getNode(mark.endContainer,this.editNode);if(_217&&_218){r.setStart(_217,mark.startOffset);r.setEnd(_218,mark.endOffset);sel.addRange(r);}}}}},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._steps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();delete this._undoRedoActive;ret=true;}delete this._undoRedoActive;}return ret;},redo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();ret=true;}delete this._undoRedoActive;}return ret;},endEditing:function(_219){if(this._editTimer){this._editTimer=this._editTimer.remove();}if(this._inEditing){this._endEditing(_219);this._inEditing=false;}},_getBookmark:function(){var b=win.withGlobal(this.window,_1ff.getBookmark);var tmp=[];if(b&&b.mark){var mark=b.mark;if(has("ie")<9){var sel=_207.getSelection(this.window);if(!lang.isArray(mark)){if(sel){var _21a;if(sel.rangeCount){_21a=sel.getRangeAt(0);}if(_21a){b.mark=_21a.cloneRange();}else{b.mark=win.withGlobal(this.window,_1ff.getBookmark);}}}else{_1f5.forEach(b.mark,function(n){tmp.push(_207.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}try{if(b.mark&&b.mark.startContainer){tmp=_207.getIndex(b.mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:b.mark.startOffset,endContainer:b.mark.endContainer===b.mark.startContainer?tmp:_207.getIndex(b.mark.endContainer,this.editNode).o,endOffset:b.mark.endOffset};}}catch(e){b.mark=null;}}return b;},_beginEditing:function(){if(this._steps.length===0){this._steps.push({"text":html.getChildrenHtml(this.editNode),"bookmark":this._getBookmark()});}},_endEditing:function(){var v=html.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!has("ie")&&!this.iframe&&e.keyCode==keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){_1fc.stop(e);this.undo();return;}else{if(k==89||k==121){_1fc.stop(e);this.redo();return;}}}this.inherited(arguments);switch(k){case keys.ENTER:case keys.BACKSPACE:case keys.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");}else{this.beginEditing("paste");}this.defer("endEditing",1);break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<keys.F1||e.keyCode>keys.F15)){this.beginEditing();break;}case keys.ALT:this.endEditing();break;case keys.UP_ARROW:case keys.DOWN_ARROW:case keys.LEFT_ARROW:case keys.RIGHT_ARROW:case keys.HOME:case keys.END:case keys.PAGE_UP:case keys.PAGE_DOWN:this.endEditing(true);break;case keys.CTRL:case keys.SHIFT:case keys.TAB:break;}},_onBlur:function(){this.inherited(arguments);this.endEditing(true);},_saveSelection:function(){try{this._savedSelection=this._getBookmark();}catch(e){}},_restoreSelection:function(){if(this._savedSelection){delete this._cursorToStart;if(win.withGlobal(this.window,"isCollapsed",_1ff)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);},replaceValue:function(html){if(!this.customUndo){this.inherited(arguments);}else{if(this.isClosed){this.setValue(html);}else{this.beginEditing();if(!html){html="&#160;";}this.setValue(html);this.endEditing();}}},_setDisabledAttr:function(_21b){this.setValueDeferred.then(lang.hitch(this,function(){if((!this.disabled&&_21b)||(!this._buttonEnabledPlugins&&_21b)){_1f5.forEach(this._plugins,function(p){p.set("disabled",true);});}else{if(this.disabled&&!_21b){_1f5.forEach(this._plugins,function(p){p.set("disabled",false);});}}}));this.inherited(arguments);},_setStateClass:function(){try{this.inherited(arguments);if(this.document&&this.document.body){_1fb.set(this.document.body,"color",_1fb.get(this.iframe,"color"));}}catch(e){}}});function _21c(args){return new _205({command:args.name});};function _21d(args){return new _205({buttonClass:_204,command:args.name});};lang.mixin(_205.registry,{"undo":_21c,"redo":_21c,"cut":_21c,"copy":_21c,"paste":_21c,"insertOrderedList":_21c,"insertUnorderedList":_21c,"indent":_21c,"outdent":_21c,"justifyCenter":_21c,"justifyFull":_21c,"justifyLeft":_21c,"justifyRight":_21c,"delete":_21c,"selectAll":_21c,"removeFormat":_21c,"unlink":_21c,"insertHorizontalRule":_21c,"bold":_21d,"italic":_21d,"underline":_21d,"strikethrough":_21d,"subscript":_21d,"superscript":_21d,"|":function(){return new _205({setEditor:function(_21e){this.editor=_21e;this.button=new _202({ownerDocument:_21e.ownerDocument});}});}});return _20a;});},"dijit/layout/_LayoutWidget":function(){define("dijit/layout/_LayoutWidget",["dojo/_base/lang","../_Widget","../_Container","../_Contained","../Viewport","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style"],function(lang,_21f,_220,_221,_222,_223,_224,_225,_226){return _223("dijit.layout._LayoutWidget",[_21f,_220,_221],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);_224.add(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this.inherited(arguments);var _227=this.getParent&&this.getParent();if(!(_227&&_227.isLayoutContainer)){this.resize();this.own(_222.on("resize",lang.hitch(this,"resize")));}},resize:function(_228,_229){var node=this.domNode;if(_228){_225.setMarginBox(node,_228);}var mb=_229||{};lang.mixin(mb,_228||{});if(!("h" in mb)||!("w" in mb)){mb=lang.mixin(_225.getMarginBox(node),mb);}var cs=_226.getComputedStyle(node);var me=_225.getMarginExtents(node,cs);var be=_225.getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=_225.getPadExtents(node,cs);this._contentBox={l:_226.toPixelValue(node,cs.paddingLeft),t:_226.toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_22a){var cls=this.baseClass+"-child "+(_22a.baseClass?this.baseClass+"-"+_22a.baseClass:"");_224.add(_22a.domNode,cls);},addChild:function(_22b,_22c){this.inherited(arguments);if(this._started){this._setupChild(_22b);}},removeChild:function(_22d){var cls=this.baseClass+"-child"+(_22d.baseClass?" "+this.baseClass+"-"+_22d.baseClass:"");_224.remove(_22d.domNode,cls);this.inherited(arguments);}});});},"esri/layers/RenderMode":function(){define("esri/layers/RenderMode",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/io/script","esri/kernel"],function(_22e,_22f,lang,_230,has,_231,_232){var _233=_22f(null,{declaredClass:"esri.layers._RenderMode",constructor:function(){this._prefix="jsonp_"+(_22e._scopeName||"dojo")+"IoScript";},initialize:function(map){this.map=map;this._init=true;},startup:function(){},propertyChangeHandler:function(type){},destroy:function(){this._init=false;},drawFeature:function(_234){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _235=this._featureMap[oid];if(_235){_235._count++;}},_decRefCount:function(oid){var _236=this._featureMap[oid];if(_236){_236._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_237){var fmap=this._featureMap,_238=fmap[oid],_239=this.featureLayer;if(!_238){fmap[oid]=_237;_239._add(_237);_237._count=0;}return _238||_237;},_removeFeatureIIf:function(oid){var _23a=this._featureMap[oid],_23b=this.featureLayer;if(_23a){if(_23a._count){return;}delete this._featureMap[oid];_23b._remove(_23a);}return _23a;},_clearIIf:function(){var i,_23c=this.featureLayer,_23d=_23c.graphics,_23e=_23c._selectedFeatures,_23f=_23c.objectIdField;for(i=_23d.length-1;i>=0;i--){var _240=_23d[i];var oid=_240.attributes[_23f];if(oid in _23e){_240._count=1;continue;}_240._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_231[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_231[this._prefix+id];if(dfd){try{dfd.cancel();_231._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_231._validCheck(null);},_toggleVisibility:function(show){var _241=this.featureLayer,_242=_241.graphics,_243=show?"show":"hide",i,len=_242.length;show=show&&_241._ager;for(i=0;i<len;i++){var _244=_242[i];_244[_243]();if(show){_241._repaint(_244);}}},_applyTimeFilter:function(_245){var _246=this.featureLayer;if(!_246.timeInfo||_246.suspended){return;}if(!_245){_246._fireUpdateStart();}var _247=_246._trackManager;if(_247){_247.clearTracks();}var defn=_246.getTimeDefinition(),_248=_246._getOffsettedTE(_246._mapTimeExtent);if(_248){_248=_246._getTimeOverlap(defn,_248);if(_248){var _249=_246._filterByTime(_246.graphics,_248.startTime,_248.endTime);if(_247){_247.addFeatures(_249.match);}_230.forEach(_249.match,function(_24a){var _24b=_24a._shape;if(!_24a.visible){_24a.show();_24b=_24a._shape;_24b&&_24b._moveToFront();}if(_246._ager&&_24b){_246._repaint(_24a);}});_230.forEach(_249.noMatch,function(_24c){if(_24c.visible){_24c.hide();}});}else{this._toggleVisibility(false);}}else{if(_247){_247.addFeatures(_246.graphics);}this._toggleVisibility(true);}if(_247){_247.moveLatestToFront();_247.drawTracks();}if(!_245){_246._fireUpdateEnd();}}});if(has("extend-esri")){lang.setObject("layers._RenderMode",_233,_232);}return _233;});},"dijit/form/_SearchMixin":function(){define("dijit/form/_SearchMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/sniff","dojo/string","dojo/when","../registry"],function(_24d,_24e,_24f,keys,lang,_250,has,_251,when,_252){return _24e("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:true,_abortQuery:function(){if(this.searchTimer){this.searchTimer=this.searchTimer.remove();}if(this._queryDeferHandle){this._queryDeferHandle=this._queryDeferHandle.remove();}if(this._fetchHandle){if(this._fetchHandle.abort){this._cancelingQuery=true;this._fetchHandle.abort();this._cancelingQuery=false;}if(this._fetchHandle.cancel){this._cancelingQuery=true;this._fetchHandle.cancel();this._cancelingQuery=false;}this._fetchHandle=null;}},_processInput:function(evt){if(this.disabled||this.readOnly){return;}var key=evt.charOrCode;if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==keys.SHIFT){return;}var _253=false;this._prev_key_backspace=false;switch(key){case keys.DELETE:case keys.BACKSPACE:this._prev_key_backspace=true;this._maskValidSubsetError=true;_253=true;break;default:_253=typeof key=="string"||key==229;}if(_253){if(!this.store){this.onSearch();}else{this.searchTimer=this.defer("_startSearchFromInput",1);}}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));},_startSearch:function(text){this._abortQuery();var _254=this,_250=lang.clone(this.query),_255={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:true}},qs=_251.substitute(this.queryExpr,[text]),q,_256=function(){var _257=_254._fetchHandle=_254.store.query(_250,_255);if(_254.disabled||_254.readOnly||(q!==_254._lastQuery)){return;}when(_257,function(res){_254._fetchHandle=null;if(!_254.disabled&&!_254.readOnly&&(q===_254._lastQuery)){when(_257.total,function(_258){res.total=_258;var _259=_254.pageSize;if(isNaN(_259)||_259>res.total){_259=res.total;}res.nextPage=function(_25a){_255.direction=_25a=_25a!==false;_255.count=_259;if(_25a){_255.start+=res.length;if(_255.start>=res.total){_255.count=0;}}else{_255.start-=_259;if(_255.start<0){_255.count=Math.max(_259+_255.start,0);_255.start=0;}}if(_255.count<=0){res.length=0;_254.onSearch(res,_250,_255);}else{_256();}};_254.onSearch(res,_250,_255);});}},function(err){_254._fetchHandle=null;if(!_254._cancelingQuery){console.error(_254.declaredClass+" "+err.toString());}});};lang.mixin(_255,this.fetchProperties);if(this.store._oldAPI){q=qs;}else{q=_24d.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=_250[this.searchAttr]=q;this._queryDeferHandle=this.defer(_256,this.searchDelay);},constructor:function(){this.query={};this.fetchProperties={};},postMixInProperties:function(){if(!this.store){var list=this.list;if(list){this.store=_252.byId(list);}}this.inherited(arguments);}});});},"esri/dijit/editing/Cut":function(){define("esri/dijit/editing/Cut",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/OperationBase"],function(_25b,lang,has,_25c,_25d,_25e){var Cut=_25b(_25e,{declaredClass:"esri.dijit.editing.Cut",type:"edit",label:"Cut Features",constructor:function(_25f){var i;_25f=_25f||{};if(!_25f.featureLayer){console.error("In constructor of 'esri.dijit.editing.Cut', featureLayer not provided");return;}this._featureLayer=_25f.featureLayer;if(!_25f.addedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', addedGraphics for cut not provided");return;}this._addedGraphics=_25f.addedGraphics;if(!_25f.preUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', preUpdatedGraphics not provided");return;}this._preUpdatedGraphicsGeometries=[];this._preUpdatedGraphicsAttributes=[];for(i=0;i<_25f.preUpdatedGraphics.length;i++){this._preUpdatedGraphicsGeometries.push(_25f.preUpdatedGraphics[i].geometry.toJson());this._preUpdatedGraphicsAttributes.push(_25f.preUpdatedGraphics[i].attributes);}if(!_25f.postUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', postUpdatedGraphics not provided");return;}this._postUpdatedGraphics=_25f.postUpdatedGraphics;this._postUpdatedGraphicsGeometries=[];this._postUpdatedGraphicsAttributes=[];for(i=0;i<_25f.postUpdatedGraphics.length;i++){this._postUpdatedGraphicsGeometries.push(_25f.postUpdatedGraphics[i].geometry.toJson());this._postUpdatedGraphicsAttributes.push(lang.clone(_25f.postUpdatedGraphics[i].attributes));}},performUndo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_25d.fromJson(this._preUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._preUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,this._addedGraphics);},performRedo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_25d.fromJson(this._postUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._postUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(this._addedGraphics,this._postUpdatedGraphics,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Cut",Cut,_25c);}return Cut;});},"dijit/form/DateTextBox":function(){define("dijit/form/DateTextBox",["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(_260,_261,_262){return _260("dijit.form.DateTextBox",_262,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:_261,_selector:"date",value:new Date("")});});},"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n","dojox/grid/_Grid":function(){require({cache:{"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n"}});define("dojox/grid/_Grid",["dojo/_base/kernel","../main","dojo/_base/declare","./_Events","./_Scroller","./_Layout","./_View","./_ViewManager","./_RowManager","./_FocusManager","./_EditManager","./Selection","./_RowSelector","./util","dijit/_Widget","dijit/_TemplatedMixin","dijit/CheckedMenuItem","dojo/text!./resources/_Grid.html","dojo/string","dojo/_base/array","dojo/_base/lang","dojo/_base/sniff","dojox/html/metrics","dojo/_base/html","dojo/query","dojo/dnd/common","dojo/i18n!dijit/nls/loading"],function(dojo,_263,_264,_265,_266,_267,_268,_269,_26a,_26b,_26c,_26d,_26e,util,_26f,_270,_271,_272,_273,_274,lang,has,_275,html,_276){if(!dojo.isCopyKey){dojo.isCopyKey=dojo.dnd.getCopyKeyState;}var _277=_264("dojox.grid._Grid",[_26f,_270,_265],{templateString:_272,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,summary:"",_setSummaryAttr:"domNode",sortInfo:0,_placeholders:null,_layoutClass:_267,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");_275.initOnFontResize();this.connect(_275,"onFontResize","textSizeChanged");util.funnelEvents(this.domNode,this,"doKeyEvent",util.keyEvents);if(this.selectionMode!="none"){this.domNode.setAttribute("aria-multiselectable",this.selectionMode=="single"?"false":"true");}html.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){html.addClass(this.domNode,this.classTag+"Rtl");}if(this.rowHeight>0){html.addClass(this.viewsNode,this.classTag+"FixedRowHeight");}},postMixInProperties:function(){this.inherited(arguments);var _278=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_273.substitute(this.loadingMessage,_278);this.errorMessage=_273.substitute(this.errorMessage,_278);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){html.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;if(this.scroller){this.scroller.destroy();delete this.scroller;}this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){_274.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_279){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_279){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new _26a(this);this.focus=new _26b(this);this.edit=new _26c(this);},createSelection:function(){this.selection=new _26d(this);},createScroller:function(){this.scroller=new _266();this.scroller.grid=this;this.scroller.renderRow=lang.hitch(this,"renderRow");this.scroller.removeRow=lang.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.update();},onResizeColumn:function(_27a){},createViews:function(){this.views=new _269(this);this.views.createView=lang.hitch(this,"createView");},createView:function(_27b,idx){var c=lang.getObject(_27b);var view=new c({grid:this,index:idx});this.viewsNode.appendChild(view.domNode);this.viewsHeaderNode.appendChild(view.headerNode);this.views.addView(view);html.attr(this.domNode,"align",this.isLeftToRight()?"left":"right");return view;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||_263._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_27c){var s=_27c;if(s&&lang.isString(s)){dojo.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");s=lang.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();this.focus.focusView=null;if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_27d){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(_27d);},getColumnTogglingItems:function(){var _27e,_27f=[];_27e=_274.map(this.layout.cells,function(cell){if(!cell.menuItems){cell.menuItems=[];}var self=this;var item=new _271({label:cell.name,checked:!cell.hidden,_gridCell:cell,onChange:function(_280){if(self.layout.setColumnVisibility(this._gridCell.index,_280)){var _281=this._gridCell.menuItems;if(_281.length>1){_274.forEach(_281,function(item){if(item!==this){item.setAttribute("checked",_280);}},this);}_280=_274.filter(self.layout.cells,function(c){if(c.menuItems.length>1){_274.forEach(c.menuItems,"item.set('disabled', false);");}else{c.menuItems[0].set("disabled",false);}return !c.hidden;});if(_280.length==1){_274.forEach(_280[0].menuItems,"item.set('disabled', true);");}}},destroy:function(){var _282=_274.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_282,1);delete this._gridCell;_271.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);if(!cell.hidden){_27f.push(item);}return item;},this);if(_27f.length==1){_27f[0].set("disabled",true);}return _27e;},_setHeaderMenuAttr:function(menu){if(this._placeholders&&this._placeholders.length){_274.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=menu;if(!menu){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(menu){dojo.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(menu);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){_274.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_283){this.setScrollTop(0);},getItem:function(_284){return null;},showMessage:function(_285){if(_285){this.messagesNode.innerHTML=_285;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_286,_287){this._pendingChangeSize=_286;this._pendingResultSize=_287;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||html._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_288,_289){_288=_288||this._pendingChangeSize;_289=_289||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _28a=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_28a.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_289){_288=_289;}if(!this._autoHeight&&_288){html.marginBox(this.domNode,_288);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=(this._parentContentBoxHeight>0?this._parentContentBoxHeight:html._getContentBox(pn).h);this.domNode.style.height=Math.max(0,h)+"px";}}var _28b=_274.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||html._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_28b&&hh===undefined){hh=this._getHeaderHeight();}}if(_28b){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _28c=(!this.initialWidth&&this.autoWidth);var w=_28c?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_28c){this.domNode.style.width=vw+"px";}},adaptHeight:function(_28d){var t=_28d===undefined?this._getHeaderHeight():_28d;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _28e=0,_28f=0;var _290=_274.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_28e++;}else{_28f++;}return (!has);});if(_28e>0&&_28f>0){_274.forEach(_290,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();html.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var size=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=size;}},renderRow:function(_291,_292){this.views.renderRow(_291,_292,this._skipRowRenormalize);},rowRemoved:function(_293){this.views.rowRemoved(_293);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_294){_294=Number(_294);if(this.updating){this.invalidated[_294]=true;}else{this.views.updateRow(_294);this.scroller.rowHeightChanged(_294);}},updateRows:function(_295,_296){_295=Number(_295);_296=Number(_296);var i;if(this.updating){for(i=0;i<_296;i++){this.invalidated[i+_295]=true;}}else{for(i=0;i<_296;i++){this.views.updateRow(i+_295,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_295);}},updateRowCount:function(_297){if(this.updating){this.invalidated.rowCount=_297;}else{this.rowCount=_297;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_297);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_298){this.views.updateRowStyles(_298);},getRowNode:function(_299){if(this.focus.focusView&&!(this.focus.focusView instanceof _26e)){return this.focus.focusView.rowNodes[_299];}else{for(var i=0,_29a;(_29a=this.views.views[i]);i++){if(!(_29a instanceof _26e)){return _29a.rowNodes[_299];}}}return null;},rowHeightChanged:function(_29b){this.views.renormalizeRow(_29b);this.scroller.rowHeightChanged(_29b);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(has("ie")?100:50),scrollTo:function(_29c){if(!this.fastScroll){this.setScrollTop(_29c);return;}var _29d=Math.abs(this.lastScrollTop-_29c);this.lastScrollTop=_29c;if(_29d>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_29c;this.views.setScrollTop(_29c);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _29e=this;this._pendingScroll=window.setTimeout(function(){delete _29e._pendingScroll;_29e.finishScrollJob();},200);}else{this.setScrollTop(_29c);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_29f){this.scroller.scroll(this.views.setScrollTop(_29f));},scrollToRow:function(_2a0){this.setScrollTop(this.scroller.findScrollTop(_2a0)+1);},styleRowNode:function(_2a1,_2a2){if(_2a2){this.rows.styleRowNode(_2a1,_2a2);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_2a3){return this.layout.cells[_2a3];},setCellWidth:function(_2a4,_2a5){this.getCell(_2a4).unitWidth=_2a5;},getCellName:function(_2a6){return "Cell "+_2a6.index;},canSort:function(_2a7){},sort:function(){},getSortAsc:function(_2a8){_2a8=_2a8==undefined?this.sortInfo:_2a8;return Boolean(_2a8>0);},getSortIndex:function(_2a9){_2a9=_2a9==undefined?this.sortInfo:_2a9;return Math.abs(_2a9)-1;},setSortIndex:function(_2aa,_2ab){var si=_2aa+1;if(_2ab!=undefined){si*=(_2ab?1:-1);}else{if(this.getSortIndex()==_2aa){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_2ac){if(this.canSort(_2ac)){this.sortInfo=_2ac;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_2ad,_2ae){this.onStartEdit(_2ad,_2ae);},doApplyCellEdit:function(_2af,_2b0,_2b1){this.onApplyCellEdit(_2af,_2b0,_2b1);},doCancelEdit:function(_2b2){this.onCancelEdit(_2b2);},doApplyEdit:function(_2b3){this.onApplyEdit(_2b3);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});_277.markupFactory=function(_2b4,node,ctor,_2b5){var _2b6=function(n){var w=html.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_2b4.structure&&node.nodeName.toLowerCase()=="table"){_2b4.structure=_276("> colgroup",node).map(function(cg){var sv=html.attr(cg,"span");var v={noscroll:(html.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(html.hasAttr(cg,"width")){v.width=_2b6(cg);}return v;});if(!_2b4.structure.length){_2b4.structure.push({__span:Infinity,cells:[]});}_276("thead > tr",node).forEach(function(tr,_2b7){var _2b8=0;var _2b9=0;var _2ba;var _2bb=null;_276("> th",tr).map(function(th){if(!_2bb){_2ba=0;_2bb=_2b4.structure[0];}else{if(_2b8>=(_2ba+_2bb.__span)){_2b9++;_2ba+=_2bb.__span;var _2bc=_2bb;_2bb=_2b4.structure[_2b9];}}var cell={name:lang.trim(html.attr(th,"name")||th.innerHTML),colSpan:parseInt(html.attr(th,"colspan")||1,10),type:lang.trim(html.attr(th,"cellType")||""),id:lang.trim(html.attr(th,"id")||"")};_2b8+=cell.colSpan;var _2bd=html.attr(th,"rowspan");if(_2bd){cell.rowSpan=_2bd;}if(html.hasAttr(th,"width")){cell.width=_2b6(th);}if(html.hasAttr(th,"relWidth")){cell.relWidth=window.parseInt(html.attr(th,"relWidth"),10);}if(html.hasAttr(th,"hidden")){cell.hidden=(html.attr(th,"hidden")=="true"||html.attr(th,"hidden")===true);}if(_2b5){_2b5(th,cell);}cell.type=cell.type?lang.getObject(cell.type):_263.grid.cells.Cell;if(cell.type&&cell.type.markupFactory){cell.type.markupFactory(th,cell);}if(!_2bb.cells[_2b7]){_2bb.cells[_2b7]=[];}_2bb.cells[_2b7].push(cell);});});}return new ctor(_2b4,node);};return _277;});},"dojo/_base/query":function(){define(["../query","./NodeList"],function(_2be){return _2be;});},"esri/dijit/editing/Editor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/kernel","dojo/has","dojo/query","dojo/DeferredList","dojo/dom-class","dojo/dom-construct","dijit/_Widget","dijit/_Templated","esri/domUtils","esri/graphicsUtils","esri/geometry/Polyline","esri/geometry/Polygon","esri/graphic","esri/undoManager","esri/tasks/query","esri/layers/FeatureLayer","esri/layers/FeatureTemplate","esri/toolbars/draw","esri/toolbars/edit","esri/dijit/AttributeInspector","esri/dijit/editing/Util","esri/dijit/editing/Add","esri/dijit/editing/Update","esri/dijit/editing/Delete","esri/dijit/editing/toolbars/Drawing","esri/dijit/editing/SelectionHelper","esri/dijit/editing/TemplatePicker","esri/kernel","esri/config","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/editing/templates/Editor.html","dijit/ProgressBar","dojo/NodeList-dom"],function(_2bf,lang,_2c0,_2c1,_2c2,has,_2c3,_2c4,_2c5,_2c6,_2c7,_2c8,_2c9,_2ca,_2cb,_2cc,_2cd,_2ce,_2cf,_2d0,_2d1,Draw,_2d2,_2d3,_2d4,Add,_2d5,_2d6,_2d7,_2d8,_2d9,_2da,_2db,_2dc,_2dd){var _2de=_2bf([_2c7,_2c8],{declaredClass:"esri.dijit.editing.Editor",widgetsInTemplate:true,templateString:_2dd,constructor:function(_2df,_2e0){_2df=_2df||{};if(!_2df.settings){console.error("Editor: please provide 'settings' parameter in the constructor");}if(!_2df.settings.layerInfos){console.error("Editor: please provide 'layerInfos' parameter in the constructor");}this._settings=_2df.settings;this._eConnects=[];},postCreate:function(){this._setDefaultOptions();var _2e1=this._settings.layerInfos;if(_2c0.every(_2e1,function(_2e2){return _2e2.featureLayer.loaded;})){this._initLayers();this._connectEvents();this._createWidgets();}else{var _2e3=_2e1.length;_2c0.forEach(_2e1,function(_2e4){var _2e5=_2e4.featureLayer;if(_2e5.loaded){_2e3--;}else{var _2e6=_2c1.connect(_2e5,"onLoad",this,function(_2e7){_2c1.disconnect(_2e6);_2e6=null;_2e3--;if(!_2e3){this._initLayers();this._connectEvents();this._createWidgets();}});}},this);}this._reset();this._enableMapClickHandler();},stopEditing:function(_2e8){this._updateCurrentFeature(lang.hitch(this,function(){this._clearSelection(false);_2e8&&_2e8();}));},destroy:function(){if(this.drawingToolbar){this.drawingToolbar.destroy();}if(this.attributeInspector){this.attributeInspector.destroy();}if(this.templatePicker){this.templatePicker.destroy();}if(this._selectionHelper){this._selectionHelper.destroy();}if(this._drawToolbar){this._drawToolbar.deactivate();}this._reset();this._disableMapClickHandler();_2c0.forEach(this._eConnects,_2c1.disconnect);_2c1.disconnect(this._dtConnect);_2c1.disconnect(this._templatePickerOnSelectionChangeEvent);this._layer=this._currentGraphic=this._activeType=this._activeTemplate=this._drawingTool=this._drawToolbar=this._editToolbar=this.drawingToolbar=this.attributeInspector=this.templatePicker=this.undoManager=null;if(this._settings.map.infoWindow&&this._settings.map.infoWindow.clearFeatures){this._settings.map.infoWindow.clearFeatures();}this.inherited(arguments);},_setDefaultOptions:function(){this._drawToolbar=this._settings.drawToolbar||new Draw(this._settings.map);this._settings.drawToolbar=this._drawToolbar;this._editToolbar=this._settings.editToolbar||new _2d2(this._settings.map);this._settings.editToolbar=this._editToolbar;this._settings.toolbarVisible=this._settings.toolbarVisible||false;this._settings.toolbarOptions=lang.mixin({reshapeVisible:false,cutVisible:false,mergeVisible:false},this._settings.toolbarOptions);this._settings.createOptions=lang.mixin({polylineDrawTools:[_2de.CREATE_TOOL_POLYLINE],polygonDrawTools:[_2de.CREATE_TOOL_POLYGON],editAttributesImmediately:true},this._settings.createOptions);this._settings.singleSelectionTolerance=this._settings.singleSelectionTolerance||3;this._settings.maxUndoRedoOperations=this._settings.maxUndoRedoOperations||10;this._settings.editor=this;this._usePopup=this._settings.usePopup=this._settings.map.infoWindow._setPagerCallbacks?true:false;this._datePackage=this._settings.datePackage;var _2e9=_2db.defaults;this._settings.geometryService=this._settings.geometryService||_2e9.geometryService;_2e9.geometryService=_2e9.geometryService||this._settings.geometryService;},_initLayers:function(){this._settings.layers=[];this._settings.userIds={};this._settings.createOnlyLayer={};var _2ea=this._settings.layerInfos;_2c0.forEach(_2ea,function(_2eb){if(_2eb.featureLayer&&_2eb.featureLayer.loaded){this._settings.layers.push(_2eb.featureLayer);var _2ec=_2eb.featureLayer.id;if(_2eb.featureLayer.credential){this._settings.userIds[_2ec]=_2eb.featureLayer.credential.userId;}if(_2eb.userId){this._settings.userIds[_2ec]=_2eb.userId;}var _2ed=_2eb.featureLayer.getEditCapabilities();if(_2ed.canCreate&&!_2ed.canUpdate){this._settings.createOnlyLayer[_2ec]=true;}else{this._settings.createOnlyLayer[_2ec]=false;}}},this);},_reset:function(){this._hideAttributeInspector();this._editToolbar.deactivate();this._editVertices=true;this._layer=null;this._currentGraphic=null;this._activeType=null;this._activeTemplate=null;this._drawingTool=null;this._attributeChanged=false;},_saveFeatureOnClient:function(_2ee){var _2ef=this.templatePicker.getSelected();var _2f0;if(_2ef.template){_2f0=_2ef.featureLayer.renderer.getSymbol(_2ef.template.prototype);}else{_2f0=_2ef.symbolInfo.symbol;}var _2f1=_2ef.featureLayer.fields;var att={};_2c0.forEach(_2f1,function(_2f2,idx){att[_2f2.name]=null;});this._tempGraphic=new _2cd(_2ee,_2f0,att,null);var map=this._settings.map;map.graphics.add(this._tempGraphic);var _2f3=this._findCenterPoint(_2ee);this._createAttributeInspector(true);map.infoWindow.setTitle(_2ef.featureLayer?_2ef.featureLayer.name:_2dc.widgets.attributeInspector.NLS_title);this.attributeInspector.showFeature(this._tempGraphic,_2ef.featureLayer);this._showInfoWindow(_2f3,map.getInfoWindowAnchor(_2f3));if(this._settings.createOnlyLayer[_2ef.featureLayer.id]){this._infoWindowHideEvent=_2c1.connect(map.infoWindow,"onHide",this,"_infoWindowHide");}_2c1.disconnect(this._templatePickerOnSelectionChangeEvent);this.templatePicker.clearSelection();this._drawToolbar.deactivate();this._enableMapClickHandler();if(this.drawingToolbar){this.drawingToolbar.deactivate();}this._templatePickerOnSelectionChangeEvent=_2c1.connect(this.templatePicker,"onSelectionChange",lang.hitch(this,"_onCreateFeature"));},_saveAttributesOnClient:function(_2f4,_2f5,_2f6){this._tempGraphic.attributes[_2f5]=(typeof (_2f6)==="number"&&isNaN(_2f6))?null:_2f6;},_infoWindowHide:function(){this._createFeature(this._tempGraphic.geometry,this._tempGraphic.attributes);_2c1.disconnect(this._infoWindowHideEvent);},_createFeature:function(_2f7,_2f8){this._editClickPoint=this._findCenterPoint(_2f7);if(!_2f7.rings){this._applyEdits([{layer:this._layer,adds:[this._createGraphic(_2f7,_2f8)]}]);return;}this._simplify(_2f7,lang.hitch(this,function(_2f9){if(this._drawingTool!==_2d1.TOOL_AUTO_COMPLETE_POLYGON){this._applyEdits([{layer:this._layer,adds:[this._createGraphic(_2f9,_2f8)]}]);}else{this._autoComplete(_2f9,lang.hitch(this,function(_2fa){if(_2fa&&_2fa.length){this._applyEdits([{layer:this._layer,adds:_2c0.map(_2fa,lang.hitch(this,function(_2fb){return this._createGraphic(_2fb,_2f8);}))}]);}}));}}));},_updateCurrentFeature:function(_2fc){var _2fd=this._isModified();if(_2fd){this._updateFeature(_2fd,_2fc);}else{if(_2fc){_2fc(false);}}},_updateFeature:function(_2fe,_2ff){var geom=_2fe.geometry;if(!geom.rings){this._applyEdits([{layer:_2fe.getLayer(),updates:[_2fe]}],_2ff);}else{this._simplify(geom,lang.hitch(this,function(_300){this._applyEdits([{layer:_2fe.getLayer(),updates:[lang.mixin(_2fe,{geometry:_300})]}],_2ff);}));}},_deleteFeature:function(_301,_302){var _303=[];if(!_301){var _304=this._settings.layers;_303=_2c0.map(_2c0.filter(_304,function(_305){return _305.getSelectedFeatures().length>0;}),function(item){return {layer:item,deletes:item.getSelectedFeatures()};});if((!_303||!_303.length)&&this._currentGraphic){_303.push({layer:this._layer,deletes:[this._currentGraphic]});}}else{_303.push({layer:_301.getLayer(),deletes:[_301]});}this._applyEdits(_303,(_302));},_stopEditing:function(_306,adds,_307,_308){_2c9.hide(this.progressBar.domNode);this._undoRedoAdd();var _309;if(_306._isSelOnly===true){if(adds&&adds.length){this.templatePicker.clearSelection();var _30a=new _2cf();_30a.objectIds=[adds[0].objectId];if(!this._settings.createOnlyLayer[_306.id]){this._selectFeatures([_306],_30a,lang.hitch(this,"_onEditFeature"));}else{this._settings.map.graphics.remove(this._tempGraphic);}}}else{_309=this._selectionHelper.findMapService(this._settings.map,_306);if(_309){_309.refresh();}if(adds&&adds.length){this.templatePicker.clearSelection();if(!this._settings.createOnlyLayer[_306.id]){_2d4.findFeatures(adds,_306,lang.hitch(this,"_onEditFeature"));}else{this._settings.map.graphics.remove(this._tempGraphic);}}}if(_308&&_308.length){this._clearSelection(true);if(this._undoRedo){_309=this._selectionHelper.findMapService(_306,this._settings.map);if(_309){_309.refresh();}}}if(this._undoRedo&&_307&&_307.length){_309=this._selectionHelper.findMapService(_306,this._settings.map);if(_309){_309.refresh();}this.attributeInspector.refresh();this._undoRedo=false;}if(this.drawingToolbar){this.drawingToolbar._updateUI();}this._undoRedo=false;},_undoRedoAdd:function(){this._settings._isApplyEditsCall=false;if(!this._settings.undoManager){return;}if(this._activeTool==="CUT"||this._activeTool==="UNION"){return;}var edit=(this._edits&&this._edits.length)?this._edits[0]:null;if(!edit){return;}var adds=edit.adds||[];var _30b=edit.updates||[];var _30c=edit.deletes||[];var _30d={featureLayer:edit.layer};if(adds.length){this.undoManager.add(new Add(lang.mixin(_30d,{addedGraphics:adds})));}else{if(_30c.length){this.undoManager.add(new _2d6(lang.mixin(_30d,{deletedGraphics:_30c})));}else{if(_30b.length){this.undoManager.add(new _2d5(lang.mixin(_30d,{preUpdatedGraphics:[this._preUpdates],postUpdatedGraphics:_30b})));}}}this._edits=null;this._preUpdates=null;},_activateDrawToolbar:function(_30e){this._layer=_30e.featureLayer;this._activeType=_30e.type;this._activeTemplate=_30e.template;this._drawingTool=this._activeTemplate?this._activeTemplate.drawingTool:null;this._drawTool=this._toDrawTool(this._drawingTool,_30e.featureLayer);_2c1.disconnect(this._dtConnect);if(this._settings.createOnlyLayer[_30e.featureLayer.id]){this._dtConnect=_2c1.connect(this._drawToolbar,"onDrawEnd",this,"_saveFeatureOnClient");}else{this._dtConnect=_2c1.connect(this._drawToolbar,"onDrawEnd",this,"_createFeature");}this._editToolbar.deactivate();this._disableMapClickHandler();if(!this.drawingToolbar){this._drawToolbar.activate(this._drawTool);}else{this.drawingToolbar.activateEditing(this._drawTool,this._layer);}},_activateEditToolbar:function(_30f,info){var _310=_30f.getLayer();var _311=_310?_310.geometryType:null;var _312=_2d2.MOVE;if(_311!=="esriGeometryPoint"&&this._isNotesFeature(_30f)===true){_312=_312|_2d2.ROTATE|_2d2.SCALE;this._editVertices=false;}else{if(_311!=="esriGeometryPoint"&&this._editVertices===true){_312=_312|_2d2.ROTATE|_2d2.SCALE;this._editVertices=false;}else{_312=_312|_2d2.EDIT_VERTICES;this._editVertices=true;}}this._attributeChanged=this._isModified();this._preUpdates=new _2cd(lang.clone(_30f.toJson()));var _313=_310.getEditCapabilities({feature:_30f,userId:this._settings.userIds[_310.id]});var _314=_2c0.filter(this._settings.layerInfos,function(item){return item.featureLayer["layerId"]===_310.layerId;})[0];if(_313.canUpdate&&!_314.disableGeometryUpdate&&_310.allowGeometryUpdates){this._editToolbar.activate(_312,_30f);}if(!this._settings.map.infoWindow.isShowing){var _315=(info&&info.screenPoint)||this._findCenterPoint(_30f);this._showInfoWindow(_315,this._settings.map.getInfoWindowAnchor(_315));}},_createGraphic:function(_316,_317){var _318=(this._activeType&&this._activeType.symbol)||this._layer.defaultSymbol;var _319=new _2cd(_316,_318,_317);if(this._activeTemplate||_317){_319.attributes=_317||lang.mixin({},this._activeTemplate.prototype.attributes);}else{_319.attributes=_319.attributes||[];_2c0.forEach(this._layer.fields,function(_31a){_319.attributes[_31a.name]=null;},this);}return _319;},_connectEvents:function(){var _31b=this._settings.layers;_2c0.forEach(_31b,function(item){this._connect(item,"onEditsComplete",lang.hitch(this,"_stopEditing",item));},this);_2c0.forEach(_31b,function(item){this._connect(item,"onBeforeApplyEdits",lang.hitch(this,function(){_2c9.show(this.progressBar.domNode);this._settings._isApplyEditsCall=true;}));},this);this._connect(this._editToolbar,"onGraphicClick",lang.hitch(this,"_activateEditToolbar"));this._connect(this._editToolbar,"onGraphicFirstMove",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onVertexFirstMove",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onScaleStart",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onRotateStart",lang.hitch(this,"_hideAttributeInspector"));},_connect:function(node,evt,func){this._eConnects.push(_2c1.connect(node,evt,func));},_createWidgets:function(){this._selectionHelper=new _2d8(this._settings);this._createTemplatePicker();this._createAttributeInspector();this._createDrawingToolbar();this._createUndoRedoManager();},_createTemplatePicker:function(){if(!this._settings.templatePicker){var _31c=_2c0.filter(this._settings.layers,function(item){return item.getEditCapabilities().canCreate;});this.templatePicker=new _2d9({"class":"esriTemplatePicker",featureLayers:_31c,showTooltip:true,maxLabelLength:this._settings.typesCharacterLimit,columns:"auto",rows:"auto"},this.templatePickerDiv);this.templatePicker.startup();this._settings.templatePicker=this.templatePicker;}else{this.templatePicker=this._settings.templatePicker;_2c9.hide(this.templatePickerDiv);}this._templatePickerOnSelectionChangeEvent=_2c1.connect(this.templatePicker,"onSelectionChange",lang.hitch(this,"_onCreateFeature"));},_createAttributeInspector:function(_31d){if(!this._settings.attributeInspector){this._customAttributeInspector=false;var map=this._settings.map;this.attributeInspector=new _2d3({layerInfos:this._settings.layerInfos,hideNavButtons:this._usePopup,datePackage:this._datePackage},_2c6.create("div"));this.attributeInspector.startup();map.infoWindow.setContent(this.attributeInspector.domNode);map.infoWindow.setTitle(_2dc.widgets.attributeInspector.NLS_title);map.infoWindow.resize(350,375);_2c2.query(".esriAttributeInspector .atiLayerName").style({display:"none"});}else{this._customAttributeInspector=true;this.attributeInspector=this._settings.attributeInspector;}this._connect(this.attributeInspector,"onDelete",lang.hitch(this,"_deleteFeature"));this._connect(this.attributeInspector,"onNext",lang.hitch(this,function(_31e){this._updateCurrentFeature(lang.hitch(this,function(){this._attributeChanged=false;this._onEditFeature(_31e);}));}));if(this._usePopup){this._settings.map.infoWindow._setPagerCallbacks(this.attributeInspector,lang.hitch(this.attributeInspector,"next"),lang.hitch(this.attributeInspector,"previous"));}if(_31d){this._connect(this.attributeInspector,"onAttributeChange",lang.hitch(this,"_saveAttributesOnClient"));}else{this._connect(this.attributeInspector,"onAttributeChange",lang.hitch(this,function(_31f,_320,_321){this._preUpdates=new _2cd(lang.clone(_31f.toJson()));this._currentGraphic.attributes[_320]=(typeof (_321)==="number"&&isNaN(_321))?null:_321;this._updateFeature(this._currentGraphic,null);this._attributeChanged=false;}));}},_createDrawingToolbar:function(){if(this._settings.toolbarVisible===true){this.drawingToolbar=new _2d7({"class":"esriDrawingToolbar",drawToolbar:this._drawToolbar,editToolbar:this._editToolbar,settings:this._settings,onDelete:lang.hitch(this,"_deleteFeature"),onApplyEdits:lang.hitch(this,"_applyEdits"),onShowAttributeInspector:lang.hitch(this,"_onEditFeature")},this.drawingToolbarDiv);}},_createUndoRedoManager:function(){if(!this._settings.enableUndoRedo&&!this._settings.undoManager){return;}this._settings.enableUndoRedo=true;this.undoManager=this._settings.undoManager;if(!this.undoManager){this.undoManager=this._settings.undoManager=new _2ce({maxOperations:this._settings.maxUndoRedoOperations});}this._connect(document,"onkeypress",lang.hitch(this,function(evt){if(evt.metaKey||evt.ctrlKey){if(evt.charOrCode==="z"){this._undo();}if(evt.charOrCode==="y"){this._redo();}}}));},_enableMapClickHandler:function(){this._mapClickHandler=_2c1.connect(this._settings.map,"onClick",lang.hitch(this,function(evt){if(this._drawToolbar._geometryType){return;}if(this._activeTool==="SELECT"){this._activeTool="";return;}this._updateCurrentFeature(lang.hitch(this,function(){this._reset();this._updateSelection(evt);}));}));},_disableMapClickHandler:function(){_2c1.disconnect(this._mapClickHandler);},_onCreateFeature:function(){var _322=this.templatePicker.getSelected();if(_322){this._updateCurrentFeature(lang.hitch(this,function(){if(this._currentGraphic){this._clearSelection(false);}this._reset();this._activateDrawToolbar(_322);}));}else{this._reset();_2c1.disconnect(this._dtConnect);this._drawToolbar.deactivate();this._enableMapClickHandler();if(this.drawingToolbar){this.drawingToolbar.deactivate();}}},_onEditFeature:function(_323,_324){_323=(lang.isArray(_323)?_323[0]:_323)||null;if(!_323){return;}if(!this._customAttributeInspector){_324=_324||this._editClickPoint||this._findCenterPoint(_323);var _325=_323.getLayer();this._settings.map.infoWindow.setTitle(_325?_325.name:_2dc.widgets.attributeInspector.NLS_title);if(this.drawingToolbar||!this._settings.map.infoWindow.isShowing){this._showInfoWindow(_324,this._settings.map.getInfoWindowAnchor(_324));}this._editClickPoint=null;}if(_323===this._currentGraphic){return;}this._editVertices=true;this._layer=_323.getLayer();this._currentGraphic=_323;if(_323.getDojoShape()){_323.getDojoShape().moveToFront();}this._activateEditToolbar(_323);},_applyEdits:function(_326,_327){_326=_326||[];if(_326.length<=0){return;}this._edits=_326;var _328=_2c0.map(_326,function(edit){return edit.layer.applyEdits(edit.adds,edit.updates,edit.deletes);});this._deferredsList=new _2c4(_328).addCallback(lang.hitch(this,function(){_2c9.hide(this.progressBar.domNode);if(_327){_327();}var map=this._settings.map;if(map&&map.infoWindow.reposition&&map.infoWindow.isShowing){map.infoWindow.reposition();}}));},_undo:function(){if(this._settings.undoManager&&!this._settings._isApplyEditsCall){this._editToolbar.deactivate();this._undoRedo=true;this._settings.undoManager.undo();}},_redo:function(){if(this._settings.undoManager&&!this._settings._isApplyEditsCall){this._editToolbar.deactivate();this._undoRedo=true;this._settings.undoManager.redo();}},_simplify:function(_329,_32a){if(_2cc.prototype.isSelfIntersecting(_329)){this._settings.geometryService.simplify([_329],function(_32b){var _32c=(_32b&&_32b.length)?_32b[0]:_32c;if(_32a){_32a(_32c);}});}else{if(_32a){_32a(_329);}}},_autoComplete:function(_32d,_32e){var _32f=this._getLayers("esriGeometryPolygon");var _330=new _2cf();_330.geometry=_32d;_330.returnGeometry=true;this._selectFeatures(_32f,_330,lang.hitch(this,function(_331){if(!_331||_331.length<=0){if(_32e){_32e([_32d]);}}else{this._settings.geometryService.autoComplete(_2ca.getGeometries(_331),this._toPolylines([_330.geometry]),function(_332){if(_32e){_32e(_332);}});}}));},_getLayers:function(_333){var _334=this._settings.layers;return _2c0.filter(_334,function(_335){return _335.geometryType===_333;});},_selectFeatures:function(_336,_337,_338,mode){this._selectionHelper.selectFeatures(_336,_337,mode||_2d0.SELECTION_NEW,_338);},_updateSelection:function(evt){var _339=evt.mapPoint;var _33a=evt.graphic;this._selectionHelper.selectFeaturesByGeometry(this._settings.layers,_339,_2d0.SELECTION_NEW,lang.hitch(this,function(_33b){var _33c=_2c0.some(_33b,lang.hitch(this,function(item){return item==_33a;}));if(_33a&&!_33c){var _33d=_33a.getLayer();if(this._isValidLayer(_33d)){var _33e=new _2cf();_33e.objectIds=[_33a.attributes[_33d.objectIdField]];this._selectionHelper.selectFeatures([_33d],_33e,_2d0.SELECTION_ADD,lang.hitch(this,function(_33f){this._updatePopupButtons(_33f);this._onEditFeature(_33f,_339);}));}else{this._clearSelection();}}else{if(_33b&&_33b.length){this._updatePopupButtons(_33b);this._onEditFeature(_33b,_339);}else{this._clearSelection();}}}));},_updatePopupButtons:function(_340){if(!this._usePopup||!_340){return;}var _341=_340.length;var _342=[this._settings.map.infoWindow._prevFeatureButton,this._settings.map.infoWindow._nextFeatureButton];_2c0.forEach(_342,lang.hitch(this,function(item){(_341>1)?_2c5.remove(item,"hidden"):_2c5.add(item,"hidden");}));},_clearSelection:function(_343){this._selectionHelper.clearSelection(_343||false);this._reset();},_findCenterPoint:function(_344){var _345=_344.geometry||_344;var _346;switch(_345.type){case "point":_346=_345;break;case "polyline":var _347=_345.paths[0].length;_346=_345.getPoint(0,Math.ceil(_347/2));break;case "polygon":var _348=_345.rings.length-1;var _349=_345.rings[_348].length-1;_346=_345.getPoint(_348,_349);break;}return this._settings.map.toScreen(_346);},_hideAttributeInspector:function(){if(!this._customAttributeInspector&&this._settings.map.infoWindow){this._settings.map.infoWindow.hide();}},_toPolylines:function(_34a){var _34b=_2c0.map(_34a,function(_34c){var _34d=new _2cb(_34c.spatialReference);_2c0.forEach(_34c.rings,function(ring){_34d.addPath(ring);});return _34d;});return _34b;},_isNotesFeature:function(_34e){var _34f=_34e.getLayer();var _350=_34f?_34f.types||null:null;if(!_350){return false;}var _351=_34e.attributes[_34f.typeIdField];var _352;_2c0.some(_350,function(type){if(type.id===_351){_352=type.templates;return true;}return false;});if(!_352){return false;}var _353=_352[0]||null;if(!_353){return false;}var _354=this._isShapeTool(_353.drawingTool)||null;return _354?true:false;},_isValidLayer:function(_355){var i;var _356=this._settings.layerInfos;for(i=0;i<_356.length;i++){var _357=_356[i];if(_355.id==_357.layerId){return true;}}return false;},_isShapeTool:function(_358){switch(_358){case _2d1.TOOL_ARROW:return Draw.ARROW;case _2d1.TOOL_LEFT_ARROW:return Draw.LEFT_ARROW;case _2d1.TOOL_RIGHT_ARROW:return Draw.RIGHT_ARROW;case _2d1.TOOL_UP_ARROW:return Draw.UP_ARROW;case _2d1.TOOL_DOWN_ARROW:return Draw.DOWN_ARROW;case _2d1.TOOL_CIRCLE:return Draw.CIRCLE;case _2d1.TOOL_ELLIPSE:return Draw.ELLIPSE;case _2d1.TOOL_TRIANGLE:return Draw.TRIANGLE;case _2d1.TOOL_RECTANGLE:return Draw.RECTANGLE;default:return null;}},_toDrawTool:function(_359,_35a){var _35b=_35a.geometryType;switch(_359){case _2d1.TOOL_POINT:return Draw.POINT;case _2d1.TOOL_ARROW:return Draw.ARROW;case _2d1.TOOL_LEFT_ARROW:return Draw.LEFT_ARROW;case _2d1.TOOL_RIGHT_ARROW:return Draw.RIGHT_ARROW;case _2d1.TOOL_UP_ARROW:return Draw.UP_ARROW;case _2d1.TOOL_DOWN_ARROW:return Draw.DOWN_ARROW;case _2d1.TOOL_CIRCLE:return Draw.CIRCLE;case _2d1.TOOL_ELLIPSE:return Draw.ELLIPSE;case _2d1.TOOL_TRIANGLE:return Draw.TRIANGLE;case _2d1.TOOL_RECTANGLE:return Draw.RECTANGLE;case _2d1.TOOL_LINE:return Draw.POLYLINE;case _2d1.TOOL_POLYGON:return Draw.POLYGON;case _2d1.TOOL_FREEHAND:if(_35b==="esriGeometryPolyline"){return Draw.FREEHAND_POLYLINE;}else{return Draw.FREEHAND_POLYGON;}break;default:var _35c=Draw.POINT;if(_35b==="esriGeometryPolyline"){_35c=Draw.POLYLINE;if(this._settings.createOptions.polylineDrawTools[0]===_2de.CREATE_TOOL_FREEHAND_POLYLINE){_35c=Draw.FREEHAND_POLYLINE;}}else{if(_35b==="esriGeometryPolygon"){_35c=Draw.POLYGON;if(this._settings.createOptions.polygonDrawTools[0]===_2de.CREATE_TOOL_FREEHAND_POLYGON){_35c=Draw.FREEHAND_POLYGON;}}}return _35c;}},_isModified:function(){var _35d=this._editToolbar.getCurrentState();return ((_35d.isModified||this._attributeChanged)&&_35d.graphic)?_35d.graphic:null;},_showInfoWindow:function(_35e,_35f){if(!this._customAttributeInspector){this._settings.map.infoWindow.show(_35e,_35f);}}});lang.mixin(_2de,{CREATE_TOOL_POLYLINE:"polyline",CREATE_TOOL_FREEHAND_POLYLINE:"freehandpolyline",CREATE_TOOL_POLYGON:"polygon",CREATE_TOOL_FREEHAND_POLYGON:"freehandpolygon",CREATE_TOOL_AUTOCOMPLETE:"autocomplete",CREATE_TOOL_RECTANGLE:"rectangle",CREATE_TOOL_TRIANGLE:"triangle",CREATE_TOOL_CIRCLE:"circle",CREATE_TOOL_ELLIPSE:"ellipse",CREATE_TOOL_ARROW:"arrow",CREATE_TOOL_UP_ARROW:"uparrow",CREATE_TOOL_DOWN_ARROW:"downarrow",CREATE_TOOL_RIGHT_ARROW:"rightarrow",CREATE_TOOL_LEFT_ARROW:"leftarrow"});if(has("extend-esri")){lang.setObject("dijit.editing.Editor",_2de,_2da);}return _2de;});},"esri/dijit/editing/toolbars/ToolbarBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dijit/Toolbar","dijit/ToolbarSeparator","esri/kernel","esri/lang"],function(_360,lang,_361,_362,has,_363,_364,_365,_366){var TBB=_360([_363],{declaredClass:"esri.dijit.editing.toolbars.ToolbarBase",_enabled:true,graphicsAdded:function(){},drawEnd:function(){},onApplyEdits:function(){},onDelete:function(){},constructor:function(_367,_368){if(!_367||!_367.settings){return;}this._tools=[];this._tbConnects=[];this._initialize(_367.settings);},postCreate:function(){this._createTools();this.deactivate();},destroy:function(){var tool;var _369=this._tools;for(tool in _369){if(_369.hasOwnProperty(tool)&&_366.isDefined(this._tools[tool])){this._tools[tool].destroy();}}_361.forEach(this._tbConnects,_362.disconnect);this.inherited(arguments);},activate:function(_36a){this._enabled=true;},deactivate:function(){var tool;this._enabled=false;this._layer=null;this._geometryType=null;var _36b=this._tools;for(tool in _36b){if(_36b.hasOwnProperty(tool)){this._tools[tool].deactivate();this._tools[tool].setChecked(false);}}},isEnabled:function(){return this._enabled;},setActiveSymbol:function(_36c){this._activeSymbol=_36c;},_getSymbol:function(){},_createTools:function(){},_initialize:function(_36d){this._settings=_36d;this._toolbar=_36d.drawToolbar;this._editToolbar=_36d.editToolbar;this._initializeToolbar();},_activateTool:function(tool,_36e){if(this._activeTool){this._activeTool.deactivate();}if(_36e===true&&this._activeTool==this._tools[tool]){this._activeTool.setChecked(false);this._activeTool=null;}else{this._activeTool=this._tools[tool];this._activeTool.setChecked(true);this._activeTool.activate(null);}},_createSeparator:function(){this.addChild(new _364());}});if(has("extend-esri")){lang.setObject("dijit.editing.toolbars.ToolbarBase",TBB,_365);}return TBB;});},"esri/dijit/editing/Add":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase"],function(_36f,lang,has,_370,_371){var Add=_36f(_371,{declaredClass:"esri.dijit.editing.Add",type:"edit",label:"Add Features",constructor:function(_372){_372=_372||{};if(!_372.featureLayer){console.error("In constructor of 'esri.dijit.editing.Add', featureLayer is not provided");return;}this._featureLayer=_372.featureLayer;if(!_372.addedGraphics){console.error("In constructor of 'esri.dijit.editing.Add', no graphics provided");return;}this._addedGraphics=_372.addedGraphics;},performUndo:function(){this._featureLayer.applyEdits(null,null,this._addedGraphics);},performRedo:function(){this._featureLayer.applyEdits(this._addedGraphics,null,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Add",Add,_370);}return Add;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(dojo){return dojo.dojox;});},"esri/dijit/editing/Update":function(){define("esri/dijit/editing/Update",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/OperationBase"],function(_373,lang,has,_374,_375,_376){var _377=_373(_376,{declaredClass:"esri.dijit.editing.Update",type:"edit",label:"Update Features",constructor:function(_378){var i;_378=_378||{};if(!_378.featureLayer){console.error("In constructor of 'esri.dijit.editing.Update', featureLayer not provided");return;}this._featureLayer=_378.featureLayer;if(!_378.preUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Update', preUpdatedGraphics not provided");return;}this._preUpdatedGraphicsGeometries=[];this._preUpdatedGraphicsAttributes=[];for(i=0;i<_378.preUpdatedGraphics.length;i++){this._preUpdatedGraphicsGeometries.push(_378.preUpdatedGraphics[i].geometry.toJson());this._preUpdatedGraphicsAttributes.push(_378.preUpdatedGraphics[i].attributes);}if(!_378.postUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Update', postUpdatedGraphics not provided");return;}this._postUpdatedGraphics=_378.postUpdatedGraphics;this._postUpdatedGraphicsGeometries=[];this._postUpdatedGraphicsAttributes=[];for(i=0;i<_378.postUpdatedGraphics.length;i++){this._postUpdatedGraphicsGeometries.push(_378.postUpdatedGraphics[i].geometry.toJson());this._postUpdatedGraphicsAttributes.push(lang.clone(_378.postUpdatedGraphics[i].attributes));}},performUndo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_375.fromJson(this._preUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._preUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,null);},performRedo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_375.fromJson(this._postUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._postUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Update",_377,_374);}return _377;});},"dijit/form/_DateTimeTextBox":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/_DateTimeTextBox",["dojo/date","dojo/date/locale","dojo/date/stamp","dojo/_base/declare","dojo/_base/lang","./RangeBoundTextBox","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(date,_379,_37a,_37b,lang,_37c,_37d,_37e){new Date("X");var _37f=_37b("dijit.form._DateTimeTextBox",[_37c,_37d],{templateString:_37e,hasDownArrow:true,cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},pattern:_379.regexp,datePackage:"",postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},compare:function(val1,val2){var _380=this._isInvalidDate(val1);var _381=this._isInvalidDate(val2);return _380?(_381?0:-1):(_381?1:date.compare(val1,val2,this._selector));},forceWidth:true,format:function(_382,_383){if(!_382){return "";}return this.dateLocaleModule.format(_382,_383);},"parse":function(_384,_385){return this.dateLocaleModule.parse(_384,_385)||(this._isEmpty(_384)?null:undefined);},serialize:function(val,_386){if(val.toGregorian){val=val.toGregorian();}return _37a.toISOString(val,_386);},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_387){this.dateModule=_387.datePackage?lang.getObject(_387.datePackage,false):date;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_387.datePackage?lang.getObject(_387.datePackage+".locale",false):_379;this._set("pattern",this.dateLocaleModule.regexp);this._invalidDate=this.constructor.prototype.value.toString();},buildRendering:function(){this.inherited(arguments);if(!this.hasDownArrow){this._buttonNode.style.display="none";}if(!this.hasDownArrow){this._buttonNode=this.domNode;this.baseClass+=" dijitComboBoxOpenOnClick";}},_setConstraintsAttr:function(_388){_388.selector=this._selector;_388.fullYear=true;var _389=_37a.fromISOString;if(typeof _388.min=="string"){_388.min=_389(_388.min);}if(typeof _388.max=="string"){_388.max=_389(_388.max);}this.inherited(arguments);},_isInvalidDate:function(_38a){return !_38a||isNaN(_38a)||typeof _38a!="object"||_38a.toString()==this._invalidDate;},_setValueAttr:function(_38b,_38c,_38d){if(_38b!==undefined){if(typeof _38b=="string"){_38b=_37a.fromISOString(_38b);}if(this._isInvalidDate(_38b)){_38b=null;}if(_38b instanceof Date&&!(this.dateClassObj instanceof Date)){_38b=new this.dateClassObj(_38b);}}this.inherited(arguments);if(this.value instanceof Date){this.filterString="";}if(this.dropDown){this.dropDown.set("value",_38b,false);}},_set:function(attr,_38e){if(attr=="value"&&this.value instanceof Date&&this.compare(_38e,this.value)==0){return;}this.inherited(arguments);},_setDropDownDefaultValueAttr:function(val){if(this._isInvalidDate(val)){val=new this.dateClassObj();}this.dropDownDefaultValue=val;},openDropDown:function(_38f){if(this.dropDown){this.dropDown.destroy();}var _390=lang.isString(this.popupClass)?lang.getObject(this.popupClass,false):this.popupClass,_391=this,_392=this.get("value");this.dropDown=new _390({onChange:function(_393){_391.set("value",_393,true);},id:this.id+"_popup",dir:_391.dir,lang:_391.lang,value:_392,currentFocus:!this._isInvalidDate(_392)?_392:this.dropDownDefaultValue,constraints:_391.constraints,filterString:_391.filterString,datePackage:_391.params.datePackage,isDisabledDate:function(date){return !_391.rangeCheck(date,_391.constraints);}});this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(_394,_395){this._setValueAttr(this.parse(_394,this.constraints),_395,_394);}});return _37f;});},"esri/layers/FeatureTemplate":function(){define("esri/layers/FeatureTemplate",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/lang","esri/graphic"],function(_396,lang,has,_397,_398,_399){var _39a=_396(null,{declaredClass:"esri.layers.FeatureTemplate",constructor:function(json){if(json&&lang.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _39b=json.prototype;this.prototype=new _399(_39b.geometry,null,_39b.attributes);}},toJson:function(){return _398.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});lang.mixin(_39a,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});if(has("extend-esri")){lang.setObject("layers.FeatureTemplate",_39a,_397);}return _39a;});},"url:dijit/templates/ProgressBar.html":"<div class=\"dijitProgressBar dijitProgressBarEmpty\" role=\"progressbar\"\n\t><div  data-dojo-attach-point=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\" role=\"presentation\"></div\n\t\t><span style=\"visibility:hidden\">&#160;</span\n\t></div\n\t><div data-dojo-attach-point=\"labelNode\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"></div\n\t><img data-dojo-attach-point=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n/></div>\n","dijit/_editor/_Plugin":function(){define("dijit/_editor/_Plugin",["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../form/Button"],function(_39c,_39d,lang,_39e){var _39f=_39d("dijit._editor._Plugin",null,{constructor:function(args){this.params=args||{};lang.mixin(this,this.params);this._connects=[];this._attrPairNames={};},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:_39e,disabled:false,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _3a0=this.getLabel(this.command),_3a1=this.editor,_3a2=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _3a3=lang.mixin({label:_3a0,ownerDocument:_3a1.ownerDocument,dir:_3a1.dir,lang:_3a1.lang,showLabel:false,iconClass:_3a2,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_3a3);}}if(this.get("disabled")&&this.button){this.button.set("disabled",this.get("disabled"));}},destroy:function(){var h;while(h=this._connects.pop()){h.remove();}if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(_39c.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_3a4,_3a5;if(!e||!e.isLoaded||!c.length){return;}var _3a6=this.get("disabled");if(this.button){try{_3a5=!_3a6&&e.queryCommandEnabled(c);if(this.enabled!==_3a5){this.enabled=_3a5;this.button.set("disabled",!_3a5);}if(_3a5){if(typeof this.button.checked=="boolean"){_3a4=e.queryCommandState(c);if(this.checked!==_3a4){this.checked=_3a4;this.button.set("checked",e.queryCommandState(c));}}}}catch(e){console.log(e);}}},setEditor:function(_3a7){this.editor=_3a7;this._initButton();if(this.button&&this.useDefaultCommand){if(this.editor.queryCommandAvailable(this.command)){this.connect(this.button,"onClick",lang.hitch(this.editor,"execCommand",this.command,this.commandArg));}else{this.button.domNode.style.display="none";}}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_3a8){if(this.button){_3a8.addChild(this.button);}},set:function(name,_3a9){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _3aa=this._getAttrNames(name);if(this[_3aa.s]){var _3ab=this[_3aa.s].apply(this,Array.prototype.slice.call(arguments,1));}else{this._set(name,_3a9);}return _3ab||this;},get:function(name){var _3ac=this._getAttrNames(name);return this[_3ac.g]?this[_3ac.g]():this[name];},_setDisabledAttr:function(_3ad){this.disabled=_3ad;this.updateState();},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_3ae){this[name]=_3ae;}});_39f.registry={};return _39f;});},"esri/layers/FeatureEditResult":function(){define("esri/layers/FeatureEditResult",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel"],function(_3af,lang,has,_3b0){var _3b1=_3af(null,{declaredClass:"esri.layers.FeatureEditResult",constructor:function(json){if(json&&lang.isObject(json)){this.objectId=json.objectId;this.success=json.success;if(!json.success){var err=json.error;this.error=new Error();this.error.code=err.code;this.error.message=err.description;}}}});if(has("extend-esri")){lang.setObject("layers.FeatureEditResult",_3b1,_3b0);}return _3b1;});},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../_base/Deferred"],function(_3b2,lang,_3b3){var _3b4=function(_3b5){if(!_3b5){return _3b5;}if(_3b5.then){_3b5=lang.delegate(_3b5);}function _3b6(_3b7){if(!_3b5[_3b7]){_3b5[_3b7]=function(){var args=arguments;return _3b3.when(_3b5,function(_3b8){Array.prototype.unshift.call(args,_3b8);return _3b4(_3b2[_3b7].apply(_3b2,args));});};}};_3b6("forEach");_3b6("filter");_3b6("map");if(!_3b5.total){_3b5.total=_3b3.when(_3b5,function(_3b9){return _3b9.length;});}return _3b5;};lang.setObject("dojo.store.util.QueryResults",_3b4);return _3b4;});},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(lang){var _3ba={};lang.setObject("dojo.data.util.sorter",_3ba);_3ba.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};_3ba.createSortFunction=function(_3bb,_3bc){var _3bd=[];function _3be(attr,dir,comp,s){return function(_3bf,_3c0){var a=s.getValue(_3bf,attr);var b=s.getValue(_3c0,attr);return dir*comp(a,b);};};var _3c1;var map=_3bc.comparatorMap;var bc=_3ba.basicComparator;for(var i=0;i<_3bb.length;i++){_3c1=_3bb[i];var attr=_3c1.attribute;if(attr){var dir=(_3c1.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_3bd.push(_3be(attr,dir,comp,_3bc));}}return function(rowA,rowB){var i=0;while(i<_3bd.length){var ret=_3bd[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};return _3ba;});},"dojox/gfx/Mover":function(){define("dojox/gfx/Mover",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/on","dojo/touch","dojo/_base/event"],function(lang,arr,_3c2,on,_3c3,_3c4){return _3c2("dojox.gfx.Mover",null,{constructor:function(_3c5,e,host){this.shape=_3c5;this.lastX=e.clientX;this.lastY=e.clientY;var h=this.host=host,d=document,_3c6=on(d,_3c3.move,lang.hitch(this,"onFirstMove"));this.events=[on(d,_3c3.move,lang.hitch(this,"onMouseMove")),on(d,_3c3.release,lang.hitch(this,"destroy")),on(d,"dragstart",lang.hitch(_3c4,"stop")),on(d,"selectstart",lang.hitch(_3c4,"stop")),_3c6];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){var x=e.clientX;var y=e.clientY;this.host.onMove(this,{dx:x-this.lastX,dy:y-this.lastY});this.lastX=x;this.lastY=y;_3c4.stop(e);},onFirstMove:function(){this.host.onFirstMove(this);this.events.pop().remove();},destroy:function(){arr.forEach(this.events,function(_3c7){_3c7.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.shape=null;}});});},"dojox/grid/Selection":function(){define("dojox/grid/Selection",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-attr"],function(_3c8,_3c9,lang,_3ca){return _3c8("dojox.grid.Selection",null,{constructor:function(_3cb){this.grid=_3cb;this.selected=[];this.setMode(_3cb.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_3cc){return this.grid.onCanSelect(_3cc);},onCanDeselect:function(_3cd){return this.grid.onCanDeselect(_3cd);},onSelected:function(_3ce){},onDeselected:function(_3cf){},onChanging:function(){},onChanged:function(){},isSelected:function(_3d0){if(this.mode=="none"){return false;}return this.selected[_3d0];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_3d1){if(this.mode=="none"){return -1;}for(var i=_3d1+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _3d2=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_3d2.push(i);}}return _3d2;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_3d3){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_3d3);this.addToSelection(_3d3);}else{this.toggleSelect(_3d3);}},addToSelection:function(_3d4){if(this.mode=="none"){return;}if(lang.isArray(_3d4)){_3c9.forEach(_3d4,this.addToSelection,this);return;}_3d4=Number(_3d4);if(this.selected[_3d4]){this.selectedIndex=_3d4;}else{if(this.onCanSelect(_3d4)!==false){this.selectedIndex=_3d4;var _3d5=this.grid.getRowNode(_3d4);if(_3d5){_3ca.set(_3d5,"aria-selected","true");}this._beginUpdate();this.selected[_3d4]=true;this.onSelected(_3d4);this._endUpdate();}}},deselect:function(_3d6){if(this.mode=="none"){return;}if(lang.isArray(_3d6)){_3c9.forEach(_3d6,this.deselect,this);return;}_3d6=Number(_3d6);if(this.selectedIndex==_3d6){this.selectedIndex=-1;}if(this.selected[_3d6]){if(this.onCanDeselect(_3d6)===false){return;}var _3d7=this.grid.getRowNode(_3d6);if(_3d7){_3ca.set(_3d7,"aria-selected","false");}this._beginUpdate();delete this.selected[_3d6];this.onDeselected(_3d6);this._endUpdate();}},setSelected:function(_3d8,_3d9){this[(_3d9?"addToSelection":"deselect")](_3d8);},toggleSelect:function(_3da){if(lang.isArray(_3da)){_3c9.forEach(_3da,this.toggleSelect,this);return;}this.setSelected(_3da,!this.selected[_3da]);},_range:function(_3db,inTo,func){var s=(_3db>=0?_3db:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_3dc,inTo){this._range(_3dc,inTo,lang.hitch(this,"addToSelection"));},deselectRange:function(_3dd,inTo){this._range(_3dd,inTo,lang.hitch(this,"deselect"));},insert:function(_3de){this.selected.splice(_3de,0,false);if(this.selectedIndex>=_3de){this.selectedIndex++;}},remove:function(_3df){this.selected.splice(_3df,1);if(this.selectedIndex>=_3df){this.selectedIndex--;}},deselectAll:function(_3e0){for(var i in this.selected){if((i!=_3e0)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_3e1,_3e2,_3e3){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_3e1);}else{if(!_3e3||this.rangeStartIndex<0){this.rangeStartIndex=_3e1;}if(!_3e2){this.deselectAll(_3e1);}if(_3e3){this.selectRange(this.rangeStartIndex,_3e1);}else{if(_3e2){this.toggleSelect(_3e1);}else{this.addToSelection(_3e1);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});});},"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n","dojox/grid/_RowManager":function(){define("dojox/grid/_RowManager",["dojo/_base/declare","dojo/_base/lang","dojo/dom-class"],function(_3e4,lang,_3e5){var _3e6=function(_3e7,_3e8){if(_3e7.style.cssText==undefined){_3e7.setAttribute("style",_3e8);}else{_3e7.style.cssText=_3e8;}};return _3e4("dojox.grid._RowManager",null,{constructor:function(_3e9){this.grid=_3e9;},linesToEms:2,overRow:-2,prepareStylingRow:function(_3ea,_3eb){return {index:_3ea,node:_3eb,odd:Boolean(_3ea&1),selected:!!this.grid.selection.isSelected(_3ea),over:this.isOver(_3ea),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_3ec,_3ed){var row=this.prepareStylingRow(_3ec,_3ed);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_3ee){var i=_3ee;i.node.className=i.customClasses;var h=i.node.style.height;_3e6(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_3ef){this.grid.updateRowStyles(_3ef);},setOverRow:function(_3f0){var last=this.overRow;this.overRow=_3f0;if((last!=this.overRow)&&(lang.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_3f1){return (this.overRow==_3f1&&!_3e5.contains(this.grid.domNode,"dojoxGridColumnResizing"));}});});},"esri/dijit/editing/tools/DropDownToolBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dojo/dom-style","dijit/registry","dijit/Menu","dijit/form/ComboButton","esri/dijit/editing/tools/ToolBase","esri/kernel","esri/lang"],function(_3f2,lang,has,_3f3,_3f4,Menu,_3f5,_3f6,_3f7,_3f8){var DDTB=_3f2([_3f5,_3f6],{declaredClass:"esri.dijit.editing.tools.DropDownToolBase",_enabled:false,_checked:false,postCreate:function(){this._tools=[];this._createTools();this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){var tool;var _3f9=this._tools;for(tool in _3f9){if(_3f9.hasOwnProperty(tool)&&_3f8.isDefined(_3f9[tool])){_3f9[tool].destroy();}}this.inherited(arguments);},_createTools:function(){var i;var mnu=new Menu();this.dropDown=mnu;for(i in this._tools){if(this._tools.hasOwnProperty(i)){mnu.addChild(this._tools[i]);}}this._activeTool=mnu.getChildren()[0];this._updateUI();},activate:function(_3fa){this.inherited(arguments);if(!this._activeTool){this._activateDefaultTool();}else{this._activeTool.activate();}},deactivate:function(){this.inherited(arguments);if(this._activeTool){this._activeTool.deactivate();}},enable:function(_3fb){var tool;for(tool in this._tools){if(this._tools.hasOwnProperty(tool)){this._tools[tool].enable(_3fb);}}this.setEnabled(true);this.inherited(arguments);},setChecked:function(_3fc){this._checked=_3fc;this._updateUI();},_onDrawEnd:function(_3fd){},onLayerChange:function(_3fe,type,_3ff){this._activeTool=null;this._activeType=type;this._activeTemplate=_3ff;this._activeLayer=_3fe;},onItemClicked:function(_400,evt){if(this._activeTool){this._activeTool.deactivate();}this._activeTool=_3f4.byId(_400);if(this._checked===false){this._onClick();}else{this._updateUI();if(this._activeTool){this._activeTool.activate();this._activeTool.setChecked(true);}}},_onClick:function(evt){if(this._enabled===false){return;}this._checked=!this._checked;this.inherited(arguments);},_updateUI:function(){this.attr("disabled",!this._enabled);_3f3.set(this.focusNode,{outline:"none"});_3f3.set(this.titleNode,{padding:"0px",border:"none"});if(this._checked){_3f3.set(this.titleNode,{backgroundColor:"#D4DFF2",border:"1px solid #316AC5"});}else{_3f3.set(this.titleNode,{backgroundColor:"",border:""});}if(this._activeTool){this.attr("iconClass",this._checked?this._activeTool._enabledIcon:this._activeTool._disabledIcon);this.attr("label",this._activeTool.label);}}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.DropDownToolBase",DDTB,_3f7);}return DDTB;});},"esri/dijit/editing/AttachmentEditor":function(){define(["require","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","esri/kernel","esri/lang","esri/domUtils","dojo/text!esri/dijit/editing/templates/AttachmentEditor.html","dojo/i18n!esri/nls/jsapi","dojo/NodeList-dom"],function(_401,_402,lang,_403,_404,_405,has,_406,_407,_408,_409,_40a,_40b,_40c,_40d,_40e,_40f){var AE=_402([_409,_40a],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:true,templateString:_40e,basePath:_401.toUrl("esri/dijit/editing")+"/",_listHtml:"<span id='node_${oid}_${attid}'><a href='${href}' target='_blank'>${name}</a>",_deleteBtnHtml:"(<span style='cursor:pointer;color:red;font-weight:bold;' class='deleteAttachment' id='${attid}');'>X</span>)",_endHtml:"<br/></span>",_aeConnects:[],_layerEditingCapChecked:{},_layerEditingCap:{},constructor:function(_410,_411){lang.mixin(this,_40f.widgets.attachmentEditor);},startup:function(){this.inherited(arguments);this._uploadField_connect=_403.connect(this._uploadField,"onchange",this,"_addAttachment");this._uploadFieldFocus_connect=_403.connect(this._uploadField,"onfocus",lang.hitch(this,function(e){_40d.hide(this._attachmentError);}));},destroy:function(){_404.forEach(this._aeConnects,_403.disconnect);_403.disconnect(this._uploadField_connect);_403.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments);},showAttachments:function(_412,_413){var list=this._attachmentList;list.innerHTML=this.NLS_none;this._uploadField.value="";_404.forEach(this.domNode.children,function(_414,idx){_40d.show(_414);});_40d.hide(this._attachmentError);if(!_412){return;}this._featureLayer=_412.getLayer()||_413;if(!this._featureLayer){return;}if(this._featureLayer.declaredClass!=="esri.layers.FeatureLayer"||!this._featureLayer.getEditCapabilities){_40d.hide(this._uploadForm);_404.forEach(this.domNode.children,function(_415,idx){_40d.hide(_415);});return;}this._currentLayerId=this._featureLayer.id;if(!this._layerEditingCapChecked[this._currentLayerId]){this._layerEditingCap[this._currentLayerId]=this._featureLayer.getEditCapabilities();this._layerEditingCapChecked[this._currentLayerId]=true;}this._featureCanUpdate=this._featureLayer.getEditCapabilities({feature:_412}).canUpdate;this._oid=_412.attributes[this._featureLayer.objectIdField];this._getAttachments(_412);},_getAttachments:function(_416){if(!this._featureLayer||!this._featureLayer.queryAttachmentInfos){return;}this._featureLayer.queryAttachmentInfos(this._oid,lang.hitch(this,"_onQueryAttachmentInfosComplete"));},_addAttachment:function(){_40d.hide(this._attachmentError);if(!this._featureLayer||!this._featureLayer.addAttachment){return;}this._featureLayer.addAttachment(this._oid,this._uploadForm,lang.hitch(this,"_onAddAttachmentComplete"),lang.hitch(this,"_onAddAttachmentError"));},_deleteAttachment:function(oid,_417){this._featureLayer.deleteAttachments(oid,[_417],lang.hitch(this,"_onDeleteAttachmentComplete"));},_onQueryAttachmentInfosComplete:function(_418){var _419=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";if((!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate)||(!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate)){_419=this._listHtml+this._endHtml;this._uploadForm.style.display="none";}else{if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_419=this._listHtml+this._endHtml;}}var list=this._attachmentList,_41a=_404.map(_418,lang.hitch(this,function(info){return _40c.substitute({href:info.url,name:info.name,oid:info.objectId,attid:info.id},_419);}));list.innerHTML=_41a.join("")||this.NLS_none;this._updateConnects();},_onAddAttachmentComplete:function(_41b){var _41c=this._uploadField;var _41d=_41c.value;var pos=_41d.lastIndexOf("\\");if(pos>-1){_41d=_41d.substring(pos+1,_41d.length);}_41d=_41d.replace(/\ /g,"_");var list=this._attachmentList,_41e=_407.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var _41f=this._listHtml+this._deleteBtnHtml+this._endHtml;if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_41f=this._listHtml+this._endHtml;}var link=_40c.substitute({href:this._featureLayer._url.path+"/"+_41b.objectId+"/attachments/"+_41b.attachmentId+(_41e?("?"+_41e):""),name:_41d,oid:_41b.objectId,attid:_41b.attachmentId},_41f);list.innerHTML=list.innerHTML==this.NLS_none?link:(list.innerHTML+link);this._updateConnects();_41c.value="";},_onAddAttachmentError:function(_420){if(_420&&_40c.isDefined(_420.code)){var _421,_422=this._attachmentError;if(_420.code===400){_421=this.NLS_fileNotSupported;}else{_421=_420.message||(_420.details&&_420.details.length&&_420.details[0]);}_408.set(_422,"innerHTML",(_421||this.NLS_error));_40d.show(_422);}},_onDeleteAttachmentComplete:function(_423){var _424=_404.every(_423,function(_425){return _425.success;}),list=this._attachmentList;if(_424){_405.query("#node_"+_423[0].objectId+"_"+_423[0].attachmentId).orphan();if(!list.children||!list.children.length){list.innerHTML=this.NLS_none;}}},_updateConnects:function(){_404.forEach(this._aeConnects,_403.disconnect);_405.query(".deleteAttachment").forEach(function(item){this._aeConnects.push(_403.connect(item,"onclick",lang.hitch(this,"_deleteAttachment",this._oid,item.id)));},this);}});if(has("extend-esri")){lang.setObject("dijit.editing.AttachmentEditor",AE,_40b);}return AE;});},"esri/dijit/editing/tools/Union":function(){define("esri/dijit/editing/tools/Union",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/graphicsUtils","esri/graphic","esri/toolbars/draw","esri/dijit/editing/Union","esri/dijit/editing/tools/ButtonToolBase","esri/kernel"],function(_426,lang,_427,has,_428,_429,Draw,_42a,_42b,_42c){var _42d=_426([_42b],{declaredClass:"esri.dijit.editing.tools.Union",id:"btnFeatureUnion",_enabledIcon:"toolbarIcon unionIcon",_disabledIcon:"toolbarIcon unionIcon",_drawType:Draw.POLYLINE,_enabled:true,_label:"NLS_unionLbl",_onClick:function(evt){this._settings.editor._activeTool="UNION";var _42e=this._settings.layers;var _42f=_427.filter(_42e,function(item){return (item.geometryType==="esriGeometryPolygon")&&(item.visible&&item._isMapAtVisibleScale());});var _430=[];var _431=0;_427.forEach(_42f,function(_432,idx){var _433=_432.getSelectedFeatures();if(_433.length>=2){_431++;var _434=_427.map(_433,function(item){return new _429(lang.clone(item.toJson()));});this._settings.geometryService.union(_428.getGeometries(_433),lang.hitch(this,function(_435){var _436=[_433.pop().setGeometry(_435)];_430.push({layer:_432,updates:_436,deletes:_433,preUpdates:_434});_431--;if(_431<=0){this.onApplyEdits(_430,lang.hitch(this,function(){if(this._settings.undoRedoManager){var _437=this._settings.undoRedoManager;_427.forEach(this._edits,lang.hitch(this,function(edit){_437.add(new _42a({featureLayer:edit.layer,addedGraphics:edit.deletes,preUpdatedGraphics:edit.preUpdates,postUpdatedGraphics:edit.updates}));}),this);}this._settings.editor._selectionHelper.clearSelection(false);this.onFinished();}));}}));}},this);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Union",_42d,_42c);}return _42d;});},"dojo/dnd/Avatar":function(){define(["../_base/declare","../_base/window","../dom","../dom-attr","../dom-class","../dom-construct","../hccss","../query"],function(_438,win,dom,_439,_43a,_43b,has,_43c){return _438("dojo.dnd.Avatar",null,{constructor:function(_43d){this.manager=_43d;this.construct();},construct:function(){var a=_43b.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_43e=this.manager.source,node,b=_43b.create("tbody",null,a),tr=_43b.create("tr",null,b),td=_43b.create("td",null,tr),k=Math.min(5,this.manager.nodes.length),i=0;if(has("highcontrast")){_43b.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td);}_43b.create("span",{innerHTML:_43e.generateText?this._generateText():""},td);_439.set(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_43e.creator){node=_43e._normalizedCreator(_43e.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _43f=_43b.create("table"),_440=_43b.create("tbody",null,_43f);_440.appendChild(node);node=_43f;}}node.id="";tr=_43b.create("tr",null,b);td=_43b.create("td",null,tr);td.appendChild(node);_439.set(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_43b.destroy(this.node);this.node=false;},update:function(){_43a.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(has("highcontrast")){var icon=dom.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}_43c(("tr.dojoDndAvatarHeader td span"+(has("highcontrast")?" span":"")),this.node).forEach(function(node){node.innerHTML=this.manager.source.generateText?this._generateText():"";},this);},_generateText:function(){return this.manager.nodes.length.toString();}});});},"esri/dijit/editing/tools/Edit":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/dijit/editing/tools/MenuItemBase","esri/kernel"],function(_441,lang,has,_442,_443){var Edit=_441([_442],{declaredClass:"esri.dijit.editing.tools.Edit",enable:function(_444){this._enabled=_444===this._geomType;this.inherited(arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Edit",Edit,_443);}return Edit;});},"dojox/grid/_Scroller":function(){define("dojox/grid/_Scroller",["dijit/registry","dojo/_base/declare","dojo/_base/lang","./util","dojo/_base/html"],function(_445,_446,lang,util,html){var _447=function(_448){var i=0,n,p=_448.parentNode;while((n=p.childNodes[i++])){if(n==_448){return i-1;}}return -1;};var _449=function(_44a){if(!_44a){return;}dojo.forEach(_445.toArray(),function(w){if(w.domNode&&html.isDescendant(w.domNode,_44a,true)){w.destroy();}});};var _44b=function(_44c){var node=html.byId(_44c);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _44d=function(_44e,_44f){var _450=[];var i=0,n;while((n=_44e.childNodes[i])){i++;if(_44b(n)==_44f){_450.push(n);}}return _450;};var _451=function(_452){return _44d(_452,"div");};return _446("dojox.grid._Scroller",null,{constructor:function(_453){this.setContentNodes(_453);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_454,_455,_456){switch(arguments.length){case 3:this.rowsPerPage=_456;case 2:this.keepRows=_455;case 1:this.rowCount=_454;default:break;}this.defaultPageHeight=(this.grid.rowHeight>0?this.grid.rowHeight:this.defaultRowHeight)*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=lang.hitch(this,"onscroll");}},_getPageCount:function(_457,_458){return _457?(Math.ceil(_457/_458)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_459){this.keepRows=_459;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_45a){this.contentNodes=_45a;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_45b){this.invalidateNodes();this.rowCount=_45b;var _45c=this.pageCount;if(_45c===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_45c){for(var i=_45c-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_45c){this.height+=this.defaultPageHeight*(this.pageCount-_45c-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_45d){return Boolean(this.getDefaultPageNode(_45d));},measurePage:function(_45e){if(this.grid.rowHeight){return ((_45e+1)*this.rowsPerPage>this.rowCount?this.rowCount-_45e*this.rowsPerPage:this.rowsPerPage)*this.grid.rowHeight;}var n=this.getDefaultPageNode(_45e);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_45f,_460){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_45f].style.top=_460+"px";}},repositionPages:function(_461){var _462=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=_462[_461];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_461):0);for(var p=_461+1;p<=last;p++){n=_462[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_463){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_463]);}},preparePage:function(_464,_465){var p=(_465?this.popPage():null);for(var i=0;i<this.colCount;i++){var _466=this.pageNodes[i];var _467=(p===null?this.createPageNode():this.invalidatePageNode(p,_466));_467.pageIndex=_464;_466[_464]=_467;}},renderPage:function(_468){var _469=[];var i,j;for(i=0;i<this.colCount;i++){_469[i]=this.pageNodes[i][_468];}for(i=0,j=_468*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,_469);}},removePage:function(_46a){for(var i=0,j=_46a*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_46b){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_46b,this.pageNodes[i]);if(n){html.destroy(n);}}},pacify:function(_46c){},pacifying:false,pacifyTicks:200,setPacifying:function(_46d){if(this.pacifying!=_46d){this.pacifying=_46d;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _46e=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _46e;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){util.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _46f=(!this._invalidating);if(!_46f){var ah=this.grid.get("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_46f=true;}}if(_46f){this.needPage(this.page,this.pageTop);}var _470=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _471=this.getPageHeight(this.page);this.averageRowHeight=(_471>0&&_470>0)?(_471/_470):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _472=this.pageCount-1;var _473=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_472]=_473;return _473;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_474,_475,_476){if(this.pageExists(_474)){var oh=this.getPageHeight(_474);var h=(this.measurePage(_474));if(h===undefined){h=oh;}this.pageHeights[_474]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.get("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_475)){if(!_476){this.grid.sizeChange();}else{var ns=this.grid.viewsNode.style;ns.height=parseInt(ns.height)+h-oh+"px";this.repositionPages(_474);}}else{this.repositionPages(_474);}}return h;}return 0;},rowHeightChanged:function(_477,_478){this.updatePageHeight(Math.floor(_477/this.rowsPerPage),false,_478);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");html.attr(p,"role","presentation");p.style.position="absolute";p.style[this.grid.isLeftToRight()?"left":"right"]="0";return p;},getPageHeight:function(_479){var ph=this.pageHeights[_479];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_47a){return this.stack.push(_47a);},popPage:function(){return this.stack.shift();},findPage:function(_47b){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=_47b){break;}}this.page=i;this.pageTop=h;},buildPage:function(_47c,_47d,_47e){this.preparePage(_47c,_47d);this.positionPage(_47c,_47e);this.installPage(_47c);this.renderPage(_47c);this.pushPage(_47c);},needPage:function(_47f,_480){var h=this.getPageHeight(_47f),oh=h;if(!this.pageExists(_47f)){this.buildPage(_47f,(!this.grid._autoHeight&&this.keepPages&&(this.stack.length>=this.keepPages)),_480);h=this.updatePageHeight(_47f,true);}else{this.positionPage(_47f,_480);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(_481){this.grid.scrollTop=_481;if(this.colCount){this.startPacify();this.findPage(_481);var h=this.height;var b=this.getScrollBottom(_481);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,_481);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(_482){return (this.windowHeight>=0?_482+this.windowHeight:-1);},processNodeEvent:function(e,_483){var t=e.target;while(t&&(t!=_483)&&t.parentNode&&(t.parentNode.parentNode!=_483)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_483)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_447(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_484,_485){},removeRow:function(_486){},getDefaultPageNode:function(_487){return this.getDefaultNodes()[_487];},positionPageNode:function(_488,_489){},getPageNodePosition:function(_48a){return _48a.offsetTop;},invalidatePageNode:function(_48b,_48c){var p=_48c[_48b];if(p){delete _48c[_48b];this.removePage(_48b,p);_449(p);p.innerHTML="";}return p;},getPageRow:function(_48d){return _48d*this.rowsPerPage;},getLastPageRow:function(_48e){return Math.min(this.rowCount,this.getPageRow(_48e+1))-1;},getFirstVisibleRow:function(_48f,_490,_491){if(!this.pageExists(_48f)){return 0;}var row=this.getPageRow(_48f);var _492=this.getDefaultNodes();var rows=_451(_492[_48f]);for(var i=0,l=rows.length;i<l&&_490<_491;i++,row++){_490+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_493,_494,_495){if(!this.pageExists(_493)){return 0;}var _496=this.getDefaultNodes();var row=this.getLastPageRow(_493);var rows=_451(_496[_493]);for(var i=rows.length-1;i>=0&&_494>_495;i--,row--){_494-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_497){var _498=this.getDefaultNodes();var rows=_451(_498[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_497){this.offset=h-(t-_497);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(_499){var _49a=Math.floor(_499/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_49a;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.page=_49a;this.needPage(_49a,this.pageTop);var _49b=this.getDefaultNodes();var rows=_451(_49b[_49a]);var r=_499-this.rowsPerPage*_49a;for(i=0,l=rows.length;i<l&&i<r;i++){t+=rows[i].offsetHeight;}return t;},dummy:0});});},"dijit/ToolbarSeparator":function(){define("dijit/ToolbarSeparator",["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(_49c,dom,_49d,_49e){return _49c("dijit.ToolbarSeparator",[_49d,_49e],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\" role=\"presentation\"></div>",buildRendering:function(){this.inherited(arguments);dom.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});});},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(lang){var _49f={};lang.setObject("dojo.data.util.filter",_49f);_49f.patternToRegExp=function(_4a0,_4a1){var rxp="^";var c=null;for(var i=0;i<_4a0.length;i++){c=_4a0.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_4a0.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_4a1){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};return _49f;});},"url:esri/dijit/editing/templates/TemplatePicker.html":"<div class=\"templatePicker\">\r\n\r\n  <table dojoType=\"dojox.grid.DataGrid\" noDataMessage=\"${emptyMessage}\" selectionMode=\"none\" autoHeight=\"${_rows}\" autoWidth=\"${_autoWidth}\"\r\n         query=\"{ query: '*' }\" dojoAttachPoint=\"grid\" class=\"grid\">\r\n  </table>\r\n  \r\n</div>","esri/toolbars/_GraphicMover":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/json","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/Mover","dojox/gfx/matrix","esri/kernel","esri/geometry/webMercatorUtils","esri/geometry/ScreenPoint"],function(_4a2,lang,_4a3,_4a4,has,_4a5,_4a6,_4a7,_4a8,_4a9,_4aa,_4ab){var GM=_4a2(null,{declaredClass:"esri.toolbars._GraphicMover",constructor:function(_4ac,map,_4ad){this.graphic=_4ac;this.map=map;this.toolbar=_4ad;this._enableGraphicMover();this._moved=false;},refresh:function(_4ae){var _4af=this.graphic.getDojoShape();if(_4af&&(_4ae||!_4af._hostGraphic)){this._disableGraphicMover();this._enableGraphicMover();}},destroy:function(){this._disableGraphicMover();},hasMoved:function(){return this._moved;},_enableGraphicMover:function(){var _4b0=this.graphic,_4b1=_4b0.getDojoShape();if(_4b1){_4b1._hostGraphic=_4b0;this._moveable=new _4a6(_4b1,{mover:GM.Mover});this._moveStartHandle=_4a3.connect(this._moveable,"onMoveStart",this,this._moveStartHandler);this._firstMoveHandle=_4a3.connect(this._moveable,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_4a3.connect(this._moveable,"onMoving",this,this._movingHandler);this._moveStopHandle=_4a3.connect(this._moveable,"onMoveStop",this,this._moveStopHandler);var node=_4b1.getEventSource();if(node){_4a5.set(node,"cursor",this.toolbar._cursors.move);}}},_disableGraphicMover:function(){var _4b2=this._moveable;if(_4b2){_4a3.disconnect(this._moveStartHandle);_4a3.disconnect(this._firstMoveHandle);_4a3.disconnect(this._movingHandle);_4a3.disconnect(this._moveStopHandle);var _4b3=_4b2.shape;if(_4b3){_4b3._hostGraphic=null;var node=_4b3.getEventSource();if(node){_4a5.set(node,"cursor",null);}}_4b2.destroy();}this._moveable=null;},_moveStartHandler:function(){var _4b4=this.graphic,map=this.map;this._startTx=_4b4.getDojoShape().getTransform();if(this.graphic.geometry.type==="point"){if(map.snappingManager){map.snappingManager._setUpSnapping();}}this.toolbar.onGraphicMoveStart(_4b4);},_firstMoveHandler:function(){this.toolbar._beginOperation("MOVE");this.toolbar.onGraphicFirstMove(this.graphic);},_movingHandler:function(_4b5){this.toolbar.onGraphicMove(this.graphic,_4b5.shape.getTransform());},_moveStopHandler:function(_4b6){var _4b7=this.graphic,_4b8=this.toolbar,map=this.map,mx=_4a8,_4b9=_4b8._geo?_4aa.geographicToWebMercator(_4b7.geometry):_4b7.geometry,type=_4b9.type,_4ba=_4b7.getDojoShape(),tx=_4ba.getTransform();if(_4a4.toJson(tx)!==_4a4.toJson(this._startTx)){this._moved=true;switch(type){case "point":var _4bb=[tx,mx.invert(this._startTx)],_4bc;if(map.snappingManager){_4bc=map.snappingManager._snappingPoint;}_4b9=_4bc||map.toMap(mx.multiplyPoint(_4bb,map.toScreen(_4b9,true)));if(map.snappingManager){map.snappingManager._killOffSnapping();}break;case "polyline":_4b9=this._updatePolyGeometry(_4b9,_4b9.paths,tx);break;case "polygon":_4b9=this._updatePolyGeometry(_4b9,_4b9.rings,tx);break;}_4ba.setTransform(null);_4b7.setGeometry(_4b8._geo?_4aa.webMercatorToGeographic(_4b9,true):_4b9);}else{this._moved=false;}_4b8._endOperation("MOVE");_4b8.onGraphicMoveStop(_4b7,tx);if(!this._moved){var e=_4b6.__e,_4bd=this.map.position,pt=new _4ab(e.pageX-_4bd.x,e.pageY-_4bd.y);_4b8.onGraphicClick(_4b7,{screenPoint:pt,mapPoint:this.map.toMap(pt)});}},_updatePolyGeometry:function(_4be,_4bf,_4c0){var map=this.map,_4c1=_4be.getPoint(0,0),_4c2=map.toMap(map.toScreen(_4c1).offset(_4c0.dx,_4c0.dy)),_4c3=_4c2.x-_4c1.x,_4c4=_4c2.y-_4c1.y,i,j,seg,_4c5;for(i=0;i<_4bf.length;i++){seg=_4bf[i];for(j=0;j<seg.length;j++){_4c5=_4be.getPoint(i,j);_4be.setPoint(i,j,_4c5.offset(_4c3,_4c4));}}return _4be;}});GM.Mover=_4a2(_4a7,{declaredClass:"esri.toolbars._Mover",constructor:function(_4c6,e,host){this.__e=e;}});if(has("extend-esri")){lang.setObject("toolbars._GraphicMover",GM,_4a9);lang.setObject("toolbars._Mover",GM.Mover,_4a9);}return GM;});},"dijit/_editor/html":function(){define("dijit/_editor/html",["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(_4c7,lang,has){var _4c8={};lang.setObject("dijit._editor.html",_4c8);var _4c9=_4c8.escapeXml=function(str,_4ca){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_4ca){str=str.replace(/'/gm,"&#39;");}return str;};_4c8.getNodeHtml=function(node){var _4cb=[];_4c8.getNodeHtmlHelper(node,_4cb);return _4cb.join("");};_4c8.getNodeHtmlHelper=function(node,_4cc){switch(node.nodeType){case 1:var _4cd=node.nodeName.toLowerCase();if(!_4cd||_4cd.charAt(0)=="/"){return "";}_4cc.push("<",_4cd);var _4ce=[],_4cf={};var attr;if(has("dom-attributes-explicit")||has("dom-attributes-specified-flag")){var i=0;while((attr=node.attributes[i++])){var n=attr.name;if(n.substr(0,3)!=="_dj"&&(!has("dom-attributes-specified-flag")||attr.specified)&&!(n in _4cf)){var v=attr.value;if(n=="src"||n=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}if(has("ie")===8&&n==="style"){v=v.replace("HEIGHT:","height:").replace("WIDTH:","width:");}_4ce.push([n,v]);_4cf[n]=v;}}}else{var _4d0=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false);var s=_4d0.outerHTML;var _4d1=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;var _4d2=s.match(_4d1);s=s.substr(0,s.indexOf(">"));_4c7.forEach(_4d2,function(attr){if(attr){var idx=attr.indexOf("=");if(idx>0){var key=attr.substring(0,idx);if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_4ce.push([key,node.getAttribute("_djrealurl")]);return;}}var val,_4d3;switch(key){case "style":val=node.style.cssText.toLowerCase();break;case "class":val=node.className;break;case "width":if(_4cd==="img"){_4d3=/width=(\S+)/i.exec(s);if(_4d3){val=_4d3[1];}break;}case "height":if(_4cd==="img"){_4d3=/height=(\S+)/i.exec(s);if(_4d3){val=_4d3[1];}break;}default:val=node.getAttribute(key);}if(val!=null){_4ce.push([key,val.toString()]);}}}}},this);}_4ce.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((attr=_4ce[j++])){_4cc.push(" ",attr[0],"=\"",(typeof attr[1]==="string"?_4c9(attr[1],true):attr[1]),"\"");}switch(_4cd){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_4cc.push(" />");break;case "script":_4cc.push(">",node.innerHTML,"</",_4cd,">");break;default:_4cc.push(">");if(node.hasChildNodes()){_4c8.getChildrenHtmlHelper(node,_4cc);}_4cc.push("</",_4cd,">");}break;case 4:case 3:_4cc.push(_4c9(node.nodeValue,true));break;case 8:_4cc.push("<!--",_4c9(node.nodeValue,true),"-->");break;default:_4cc.push("<!-- Element not recognized - Type: ",node.nodeType," Name: ",node.nodeName,"-->");}};_4c8.getChildrenHtml=function(node){var _4d4=[];_4c8.getChildrenHtmlHelper(node,_4d4);return _4d4.join("");};_4c8.getChildrenHtmlHelper=function(dom,_4d5){if(!dom){return;}var _4d6=dom["childNodes"]||dom;var _4d7=!has("ie")||_4d6!==dom;var node,i=0;while((node=_4d6[i++])){if(!_4d7||node.parentNode==dom){_4c8.getNodeHtmlHelper(node,_4d5);}}};return _4c8;});},"url:esri/dijit/editing/templates/AttachmentEditor.html":"<div class=\"attachmentEditor\">\r\n    <br />\r\n    <div>\r\n        <b>${NLS_attachments}</b>\r\n        <hr />\r\n        <div dojoAttachPoint=\"_attachmentError\" style='color:red;display:none'></div>\r\n        <br />\r\n        <span dojoAttachPoint='_attachmentList' style='word-wrap: break-word;'></span>\r\n        <br><br>\r\n        <form dojoAttachPoint='_uploadForm'> ${NLS_add}:&nbsp;&nbsp;<input type='file' name='attachment' dojoAttachPoint='_uploadField' /> </form>\r\n    </div>\r\n</div>","dojox/grid/_Events":function(){define("dojox/grid/_Events",["dojo/keys","dojo/dom-class","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff"],function(keys,_4d8,_4d9,_4da,has){return _4d9("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(_4db){var i=_4db;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(_4db);this.edit.styleRow(_4db);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var _4dc;switch(e.keyCode){case keys.ESCAPE:this.edit.cancel();break;case keys.ENTER:if(!this.edit.isEditing()){_4dc=this.focus.getHeaderIndex();if(_4dc>=0){this.setSortIndex(_4dc);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}_4da.stop(e);}if(!e.shiftKey){var _4dd=this.edit.isEditing();this.edit.apply();if(!_4dd){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _4de=this.focus.focusView||this.views.views[0];_4de.content.decorateEvent(e);this.onRowClick(e);_4da.stop(e);}break;case keys.SPACE:if(!this.edit.isEditing()){_4dc=this.focus.getHeaderIndex();if(_4dc>=0){this.setSortIndex(_4dc);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}_4da.stop(e);}break;case keys.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case keys.LEFT_ARROW:case keys.RIGHT_ARROW:if(!this.edit.isEditing()){var _4df=e.keyCode;_4da.stop(e);_4dc=this.focus.getHeaderIndex();if(_4dc>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_4dc,(_4df==keys.LEFT_ARROW?-1:1)*5);}else{var _4e0=(_4df==keys.LEFT_ARROW)?1:-1;if(this.isLeftToRight()){_4e0*=-1;}this.focus.move(0,_4e0);}}break;case keys.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_4da.stop(e);this.focus.move(-1,0);}break;case keys.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_4da.stop(e);this.focus.move(1,0);}break;case keys.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){_4da.stop(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case keys.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){_4da.stop(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){_4d8.add(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){_4d8.remove(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}if(this._click.length>1&&this._click[0]==null){this._click.shift();}this.onRowClick(e);},onCellDblClick:function(e){var _4e1;if(this._click.length>1&&has("ie")){_4e1=this._click[1];}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){_4e1=this._click[0];}else{_4e1=e;}}this.focus.setFocusCell(_4e1.cell,_4e1.rowIndex);this.onRowClick(_4e1);this.edit.setEditCell(_4e1.cell,_4e1.rowIndex);this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_4e2,_4e3){this.edit.cellFocus(_4e2,_4e3);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){_4da.stop(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){_4d8.add(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){_4d8.remove(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){_4da.stop(e);}},onStartEdit:function(_4e4,_4e5){},onApplyCellEdit:function(_4e6,_4e7,_4e8){},onCancelEdit:function(_4e9){},onApplyEdit:function(_4ea){},onCanSelect:function(_4eb){return true;},onCanDeselect:function(_4ec){return true;},onSelected:function(_4ed){this.updateRowStyles(_4ed);},onDeselected:function(_4ee){this.updateRowStyles(_4ee);},onSelectionChanged:function(){}});});},"dijit/_KeyNavContainer":function(){define("dijit/_KeyNavContainer",["dojo/_base/kernel","./_Container","./_FocusMixin","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/event","dojo/dom-attr","dojo/_base/lang"],function(_4ef,_4f0,_4f1,_4f2,keys,_4f3,_4f4,_4f5,lang){return _4f3("dijit._KeyNavContainer",[_4f1,_4f0],{tabIndex:"0",connectKeyNavHandlers:function(_4f6,_4f7){var _4f8=(this._keyNavCodes={});var prev=lang.hitch(this,"focusPrev");var next=lang.hitch(this,"focusNext");_4f2.forEach(_4f6,function(code){_4f8[code]=prev;});_4f2.forEach(_4f7,function(code){_4f8[code]=next;});_4f8[keys.HOME]=lang.hitch(this,"focusFirstChild");_4f8[keys.END]=lang.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){_4ef.deprecated("startupKeyNavChildren() call no longer needed","","2.0");},startup:function(){this.inherited(arguments);_4f2.forEach(this.getChildren(),lang.hitch(this,"_startupChild"));},addChild:function(_4f9,_4fa){this.inherited(arguments);this._startupChild(_4f9);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusLastChild:function(){this.focusChild(this._getLastFocusableChild());},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1));},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),true);},focusChild:function(_4fb,last){if(!_4fb){return;}if(this.focusedChild&&_4fb!==this.focusedChild){this._onChildBlur(this.focusedChild);}_4fb.set("tabIndex",this.tabIndex);_4fb.focus(last?"end":"start");this._set("focusedChild",_4fb);},_startupChild:function(_4fc){_4fc.set("tabIndex","-1");this.connect(_4fc,"_onFocus",function(){_4fc.set("tabIndex",this.tabIndex);});this.connect(_4fc,"_onBlur",function(){_4fc.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode||this.focusedChild){return;}this.focusFirstChild();_4f5.set(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){_4f5.set(this.domNode,"tabIndex",this.tabIndex);}this.focusedChild=null;this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();_4f4.stop(evt);}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1);},_getNextFocusableChild:function(_4fd,dir){if(_4fd){_4fd=this._getSiblingOfChild(_4fd,dir);}var _4fe=this.getChildren();for(var i=0;i<_4fe.length;i++){if(!_4fd){_4fd=_4fe[(dir>0)?0:(_4fe.length-1)];}if(_4fd.isFocusable()){return _4fd;}_4fd=this._getSiblingOfChild(_4fd,dir);}return null;}});});},"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","esri/kernel","esri/lang","esri/domUtils","esri/layers/InheritedDomain","esri/layers/FeatureLayer","dojo/i18n!esri/nls/jsapi","dojo/fx","dojox/gfx","dijit/_Widget","dijit/_Templated","dijit/Editor","dijit/_editor/plugins/LinkDialog","dijit/_editor/plugins/TextColor","esri/dijit/_EventedWidget","esri/dijit/editing/AttachmentEditor","esri/dijit/editing/Util","esri/tasks/query","dijit/form/DateTextBox","dijit/form/TextBox","dijit/form/NumberTextBox","dijit/form/FilteringSelect","dijit/form/NumberSpinner","dijit/form/Button","dijit/form/SimpleTextarea","dijit/Tooltip","dojo/data/ItemFileReadStore","dojox/date/islamic","dojox/date/islamic/Date","dojox/date/islamic/locale","dojo/text!esri/dijit/templates/AttributeInspector.html"],function(_4ff,lang,_500,_501,_502,_503,has,_504,_505,_506,_507,_508,_509,_50a,_50b,fx,gfx,_50c,_50d,_50e,_50f,_510,_511,_512,Util,_513,_514,_515,_516,_517,_518,_519,_51a,_51b,_51c,_51d,_51e,_51f,_520){var ATI=_4ff([_511,_50c,_50d],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:true,templateString:_520,_navMessage:"( ${idx} ${of} ${numFeatures} )",onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_eventMap:{"update":true,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],"next":["feature"],"reset":true,"cancel":true},constructor:function(_521,_522){lang.mixin(this,_50b.widgets.attributeInspector);_521=_521||{};if(!_521.featureLayer&&!_521.layerInfos){console.error("esri.AttributeInspector: please provide correct parameter in the constructor");}this._datePackage=this._getDatePackage(_521);this._layerInfos=_521.layerInfos||[{featureLayer:_521.featureLayer,options:_521.options||[]}];this._aiConnects=[];this._selection=[];this._toolTips=[];this._numFeatures=0;this._featureIdx=0;this._currentLInfo=null;this._currentFeature=null;this._hideNavButtons=_521.hideNavButtons||false;},postCreate:function(){if(_500.every(this._layerInfos,function(_523){return _523.featureLayer.loaded;})){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}else{var _524=this._layerInfos.length;_500.forEach(this._layerInfos,function(_525){var _526=_525.featureLayer;if(_526.loaded){_524--;}else{var _527=_501.connect(_526,"onLoad",this,function(_528){_501.disconnect(_527);_527=null;_524--;if(!_524){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}});}},this);}},destroy:function(){this._destroyAttributeTable();_500.forEach(this._aiConnects,_501.disconnect);delete this._aiConnects;if(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(_529,_52a){if(_52a){this._createOnlyFirstTime=true;}this._updateSelection([_529],_52a);this._updateUI();},onLayerSelectionChange:function(_52b,_52c,_52d){this._createOnlyFirstTime=false;this._featureIdx=(_52d===_50a.SELECTION_NEW)?0:this._featureIdx;this._updateSelection();this._updateUI();},onLayerSelectionClear:function(){if(!this._selection||this._selection.length<=0){return;}this._numFeatures=0;this._featureIdx=0;this._selection=[];this._currentFeature=null;this._currentLInfo=null;this._updateUI();},onLayerEditsComplete:function(_52e,adds,_52f,_530){_530=_530||[];if(_530.length){var _531=this._selection;var _532=_52e.featureLayer.objectIdField;_500.forEach(_530,lang.hitch(this,function(del){_500.some(_531,lang.hitch(this,function(item,idx){if(item.attributes[_532]!==del.objectId){return false;}this._selection.splice(idx,1);return true;}));}));}adds=adds||[];if(adds.length){this._selection=Util.findFeatures(adds,_52e.featureLayer);this._featureIdx=0;}var _533=this._numFeatures=this._selection?this._selection.length:0;if(adds.length){var _534=_533?this._selection[this._featureIdx]:null;if(_534){var _535=_534.getLayer();var _536=_535.getEditCapabilities();if(!(_536.canCreate&&!_536.canUpdate)){this._showFeature(_534);}}}this._updateUI();},onFieldValueChange:function(_537,_538){_538=(typeof _538==="undefined")?null:_538;var _539=_537.field;if(_539.type==="esriFieldTypeDate"){_538=(_538&&_538.getTime)?_538.getTime():(_538&&_538.toGregorian?_538.toGregorian().getTime():_538);}if(this._currentFeature.attributes[_539.name]===_538){return;}var _53a=this._currentLInfo;var _53b=this._currentFeature;var _53c=_539.name;if(_53c===_53a.typeIdField){var type=this._findFirst(_53a.types,"id",_538);var _53d=_53a.fieldInfos;_500.forEach(_53d,function(_53e){_539=_53e.field;if(!_539||_539.name===_53a.typeIdField){return;}var node=_53e.dijit;var _53f=this._setFieldDomain(node,type,_539);if(_53f&&node){this._setValue(node,_53b.attributes[_539.name]+"");if(node.isValid()===false){this._setValue(node,null);}}},this);}this.onAttributeChange(_53b,_53c,_538);},onDeleteBtn:function(evt){this._deleteFeature();},onNextFeature:function(evt){this._onNextFeature(1);},onPreviousFeature:function(evt){this._onNextFeature(-1);},onFirstFeature:function(evt){this._onNextFeature(this._featureIdx*-1);},onLastFeature:function(evt){this._onNextFeature((this._numFeatures-1)-this._featureIdx);},_initLayerInfos:function(){var _540=this._layerInfos;this._editorTrackingInfos={};_500.forEach(_540,this._initLayerInfo,this);},_initLayerInfo:function(_541){var _542=_541.featureLayer,_543,_544;this._userIds={};var _545=_542.id;if(_542.credential){this._userIds[_545]=_542.credential.userId;}if(_541.userId){this._userIds[_545]=_541.userId;}this._connect(_542,"onSelectionComplete",lang.hitch(this,"onLayerSelectionChange",_541));this._connect(_542,"onSelectionClear",lang.hitch(this,"onLayerSelectionClear",_541));this._connect(_542,"onEditsComplete",lang.hitch(this,"onLayerEditsComplete",_541));_541.showAttachments=_542.hasAttachments?(_507.isDefined(_541.showAttachments)?_541.showAttachments:true):false;_541.hideFields=_541.hideFields||[];_541.htmlFields=_541.htmlFields||[];_541.isEditable=_542.isEditable()?(_507.isDefined(_541.isEditable)?_541.isEditable:true):false;_541.typeIdField=_542.typeIdField;_541.layerId=_542.id;_541.types=_542.types;if(_542.globalIdField){_543=this._findFirst(_541.fieldInfos,"fieldName",_542.globalIdField);if(!_543&&!_541.showGlobalID){_541.hideFields.push(_542.globalIdField);}}_544=this._findFirst(_541.fieldInfos,"fieldName",_542.objectIdField);if(!_544&&!_541.showObjectID){_541.hideFields.push(_542.objectIdField);}var _546=this._getFields(_541.featureLayer);if(!_546){return;}var _547=_541.fieldInfos||[];_547=_500.map(_547,function(_548){return lang.mixin({},_548);});if(!_547.length){_546=_500.filter(_546,lang.hitch(this,function(_549){return !this._isInFields(_549.name,_541.hideFields);}));_541.fieldInfos=_500.map(_546,lang.hitch(this,function(_54a){var _54b=(this._isInFields(_54a.name,_541.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return {"fieldName":_54a.name,"field":_54a,"stringFieldOption":_54b};}));}else{_541.fieldInfos=_500.filter(_500.map(_547,lang.hitch(this,function(_54c){var _54d=_54c.stringFieldOption||(this._isInFields(_54c.fieldName,_541.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return lang.mixin(_54c,{"field":this._findFirst(_546,"name",_54c.fieldName),"stringFieldOption":_54d});})),"return item.field;");}if(_541.showGlobalID&&!_543){_547.push(this._findFirst(_546,"name",_542.globalIdField));}if(_541.showObjectID&&!_544){_547.push(this._findFirst(_546,"name",_542.objectIdField));}var _54e=[];if(_542.editFieldsInfo){if(_542.editFieldsInfo.creatorField){_54e.push(_542.editFieldsInfo.creatorField);}if(_542.editFieldsInfo.creationDateField){_54e.push(_542.editFieldsInfo.creationDateField);}if(_542.editFieldsInfo.editorField){_54e.push(_542.editFieldsInfo.editorField);}if(_542.editFieldsInfo.editDateField){_54e.push(_542.editFieldsInfo.editDateField);}}this._editorTrackingInfos[_542.id]=_54e;},_createAttachmentEditor:function(){this._attachmentEditor=null;var _54f=this._layerInfos;var _550=_500.filter(_54f,function(item){return item.showAttachments;});if(!_550||!_550.length){return;}this._attachmentEditor=new _512({"class":"atiAttachmentEditor"},this.attachmentEditor);this._attachmentEditor.startup();},_setCurrentLInfo:function(_551){var _552=this._currentLInfo?this._currentLInfo.featureLayer:null;var _553=_551.featureLayer;if(_552&&_552.id===_553.id&&!_552.ownershipBasedAccessControlForFeatures){var _554=_553.getEditCapabilities();if(!(_554.canCreate&&!_554.canUpdate)){return;}}this._currentLInfo=_551;this._createTable();},_updateSelection:function(_555,_556){this._selection=_555||[];var _557=this._layerInfos;_500.forEach(_557,this._getSelection,this);var _558=this._numFeatures=this._selection.length;var _559=_558?this._selection[this._featureIdx]:null;this._showFeature(_559,_556);},_getSelection:function(_55a){var _55b=_55a.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(_55b);},_updateUI:function(){var _55c=this._numFeatures;var _55d=this._currentLInfo;this.layerName.innerHTML=(!_55d||_55c===0)?this.NLS_noFeaturesSelected:(_55d.featureLayer?_55d.featureLayer.name:"");_504.set(this.attributeTable,"display",_55c?"":"none");_504.set(this.editButtons,"display",_55c?"":"none");_504.set(this.navButtons,"display",(!this._hideNavButtons&&(_55c>1)?"":"none"));this.navMessage.innerHTML=_507.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);if(this._attachmentEditor){_504.set(this._attachmentEditor.domNode,"display",((_55d&&_55d.showAttachments)&&_55c)?"":"none");}var _55e=((_55d&&_55d.showDeleteButton===false)||!this._canDelete)?false:true;_504.set(this.deleteBtn.domNode,"display",_55e?"":"none");if(this.domNode.parentNode&&this.domNode.parentNode.scrollTop>0){this.domNode.parentNode.scrollTop=0;}},_onNextFeature:function(_55f){this._featureIdx+=_55f;if(this._featureIdx<0){this._featureIdx=this._numFeatures-1;}else{if(this._featureIdx>=this._numFeatures){this._featureIdx=0;}}var _560=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(_560);this._updateUI();this.onNext(_560);},_deleteFeature:function(){this.onDelete(this._currentFeature);},_showFeature:function(_561,_562){if(!_561){return;}this._currentFeature=_561;var _563=_562?_562:_561.getLayer();var _564=_563.getEditCapabilities({feature:_561,userId:this._userIds[_563.id]});this._canUpdate=_564.canUpdate;this._canDelete=_564.canDelete;var _565=this._getLInfoFromFeatureLayer(_563);if(!_565){return;}this._setCurrentLInfo(_565);var _566=_561.attributes;var type=this._findFirst(_565.types,"id",_566[_565.typeIdField]);var node,_567=null;var _568=_565.fieldInfos;_500.forEach(_568,function(_569){_567=_569.field;node=_569.dijit||null;if(!node){return;}var _56a=this._setFieldDomain(node,type,_567);var _56b=_566[_567.name];_56b=(_56b&&_56a&&_56a.codedValues&&_56a.codedValues.length)?(_56a.codedValues[_56b]?_56a.codedValues[_56b].name:_56b):_56b;if(!_507.isDefined(_56b)){_56b="";}if(node.declaredClass==="dijit.form.DateTextBox"){_56b=(_56b==="")?null:new Date(_56b);}else{if(node.declaredClass==="dijit.form.FilteringSelect"){node._lastValueReported=null;_56b=_566[_567.name]+"";}}try{this._setValue(node,_56b);if(node.declaredClass==="dijit.form.FilteringSelect"&&node.isValid()===false){this._setValue(node,null);}}catch(error){node.set("displayedValue",this.NLS_errorInvalid,false);}},this);if(this._attachmentEditor&&_565.showAttachments){this._attachmentEditor.showAttachments(this._currentFeature);}var _56c=_563.getEditSummary(_561);if(_56c){this.editorTrackingInfoDiv.innerHTML=_56c;_508.show(this.editorTrackingInfoDiv);}else{_508.hide(this.editorTrackingInfoDiv);}},_setFieldDomain:function(node,type,_56d){if(!node){return null;}var _56e=_56d.domain;if(type&&type.domains){if(type.domains[_56d.name]&&type.domains[_56d.name] instanceof _509===false){_56e=type.domains[_56d.name];}}if(!_56e){return null;}if(_56e.codedValues&&_56e.codedValues.length>0){node.set("store",this._toStore(_500.map(_56e.codedValues,function(item){return {id:item.code+="",name:item.name};})));this._setValue(node,_56e.codedValues[0].code);}else{node.constraints={min:_507.isDefined(_56e.minValue)?_56e.minValue:Number.MIN_VALUE,max:_507.isDefined(_56e.maxValue)?_56e.maxValue:Number.MAX_VALUE};this._setValue(node,node.constraints.min);}return _56e;},_setValue:function(node,_56f){if(!node.set){return;}node._onChangeActive=false;node.set("value",_56f,true);node._onChangeActive=true;},_getFields:function(_570){var _571=_570._getOutFields();if(!_571){return null;}var _572=_570.fields;return (_571=="*")?_572:_500.filter(_500.map(_571,lang.hitch(this,"_findFirst",_572,"name")),_507.isDefined);},_isInFields:function(_573,_574){if(!_573||!_574&&!_574.length){return false;}return _500.some(_574,function(name){return name.toLowerCase()===_573.toLowerCase();});},_findFirst:function(_575,_576,_577){var _578=_500.filter(_575,function(item){return item.hasOwnProperty(_576)&&item[_576]===_577;});return (_578&&_578.length)?_578[0]:null;},_getLInfoFromFeatureLayer:function(_579){var _57a=_579?_579.id:null;return this._findFirst(this._layerInfos,"layerId",_57a);},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=_505.create("table",{cellspacing:"0",cellpadding:"0"},this.attributeTable);var _57b=_505.create("tbody",null,this._attributes);var _57c=this._currentFeature;var _57d=this._currentLInfo;var type=this._findFirst(_57d.types,"id",_57c.attributes[_57d.typeIdField]);var _57e=_57d.fieldInfos;_500.forEach(_57e,lang.hitch(this,"_createField",type,_57b),this);this._createOnlyFirstTime=false;},_createField:function(type,_57f,_580){var _581=this._currentLInfo;var _582=_580.field;if(this._isInFields(_582.name,_581.hideFields)){return;}if(this._isInFields(_582.name,this._editorTrackingInfos[_581.featureLayer.id])){return;}var node=_505.create("tr",null,_57f);var td=_505.create("td",{innerHTML:_580.label||_582.alias||_582.name,"class":"atiLabel"},node);td=_505.create("td",null,node);var _583=null;var _584=false;if(_580.customField){_505.place(_580.customField.domNode||_580.customField,_505.create("div",null,td),"first");_583=_580.customField;}else{if(_581.isEditable===false||_582.editable===false||_580.isEditable===false||_582.type==="esriFieldTypeOID"||_582.type==="esriFieldTypeGlobalID"||(!this._canUpdate&&!this._createOnlyFirstTime)){_584=true;}}if(!_583&&(_581.typeIdField&&_582.name.toLowerCase()==_581.typeIdField.toLowerCase())){_583=this._createTypeField(_582,_580,td);}else{if(!_583){_583=this._createDomainField(_582,_580,type,td);}}if(!_583){switch(_582.type){case "esriFieldTypeString":_583=this._createStringField(_582,_580,td);break;case "esriFieldTypeDate":_583=this._createDateField(_582,_580,td);break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":_583=this._createIntField(_582,_580,td);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":_583=this._createFltField(_582,_580,td);break;default:_583=this._createStringField(_582,_580,td);break;}}if(_580.tooltip&&_580.tooltip.length){this._toolTips.push(new _51b({connectId:[_583.id],label:_580.tooltip}));}_583.onChange=lang.hitch(this,"onFieldValueChange",_580);_583.set("disabled",_584);_580.dijit=_583;},_createTypeField:function(_585,_586,node){return new _517({"class":"atiField",name:_585.alias||_585.name,store:this._toStore(_500.map(this._currentLInfo.types,function(item){return {id:item.id,name:item.name};})),searchAttr:"name"},_505.create("div",null,node));},_createDomainField:function(_587,_588,type,node){var _589=_587.domain;if(type&&type.domains){if(type.domains[_587.name]&&type.domains[_587.name] instanceof _509===false){_589=type.domains[_587.name];}}if(!_589){return null;}if(_589.codedValues){return new _517({"class":"atiField",name:_587.alias||_587.name,searchAttr:"name",required:_587.nullable||false},_505.create("div",null,node));}else{return new _518({"class":"atiField"},_505.create("div",null,node));}},_createStringField:function(_58a,_58b,node){var _58c={"class":"atiField",trim:true,maxLength:_58a.length};if(_58b.stringFieldOption===ATI.STRING_FIELD_OPTION_TEXTAREA){_58c["class"]+=" atiTextAreaField";return new _51a(_58c,_505.create("div",null,node));}else{if(_58b.stringFieldOption===ATI.STRING_FIELD_OPTION_RICHTEXT){_58c["class"]+=" atiRichTextField";_58c.height="100%";_58c.width="100%";_58c.plugins=_58b.richTextPlugins||["bold","italic","underline","foreColor","hiliteColor","|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent","|","createLink"];return new _50e(_58c,_505.create("div",null,node));}else{return new _515(_58c,_505.create("div",null,node));}}},_createDateField:function(_58d,_58e,node){var _58f={"class":"atiField","trim":true};if(this._datePackage){_58f.datePackage=this._datePackage;}return new _514(_58f,_505.create("div",null,node));},_createIntField:function(_590,_591,node){return new _516({"class":"atiField",constraints:{places:0},invalidMessage:this.NLS_validationInt,trim:true},_505.create("div",null,node));},_createFltField:function(_592,_593,node){return new _516({"class":"atiField",trim:true,invalidMessage:this.NLS_validationFlt},_505.create("div",null,node));},_toStore:function(_594){return new _51c({data:{identifier:"id",label:"name",items:_594}});},_connect:function(node,evt,func){this._aiConnects.push(_501.connect(node,evt,func));},_getDatePackage:function(_595){if(_595.datePackage===null){return null;}else{if(_595.datePackage){return _595.datePackage;}else{if(_503.locale==="ar"){return "dojox.date.islamic";}}}return null;},_destroyAttributeTable:function(){var _596=this._layerInfos;_500.forEach(_596,function(_597){var _598=_597.fieldInfos;_500.forEach(_598,function(_599){var _59a=_599.dijit;if(_59a){_59a._onChangeHandle=null;if(_599.customField){return;}if(_59a.destroyRecursive){_59a.destroyRecursive();}else{if(_59a.destroy){_59a.destroy();}}}_599.dijit=null;},this);},this);var _59b=this._toolTips;_500.forEach(_59b,function(item){item.destroy();delete item;});this._toolTips=[];if(this._attributes){_505.destroy(this._attributes);}}});lang.mixin(ATI,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});if(has("extend-esri")){lang.setObject("dijit.AttributeInspector",ATI,_506);}return ATI;});},"dojox/date/islamic/locale":function(){define("dojox/date/islamic/locale",["../..","dojo/_base/lang","dojo/_base/array","dojo/date","dojo/i18n","dojo/regexp","dojo/string","./Date","dojo/i18n!dojo/cldr/nls/islamic"],function(_59c,lang,arr,dd,i18n,_59d,_59e,_59f,_5a0){var _5a1=lang.getObject("date.islamic.locale",true,_59c);function _5a2(_5a3,_5a4,_5a5,_5a6,_5a7){return _5a7.replace(/([a-z])\1*/ig,function(_5a8){var s,pad;var c=_5a8.charAt(0);var l=_5a8.length;var _5a9=["abbr","wide","narrow"];switch(c){case "G":s=_5a4["eraAbbr"][0];break;case "y":s=String(_5a3.getFullYear());break;case "M":var m=_5a3.getMonth();if(l<3){s=m+1;pad=true;}else{var _5aa=["months","format",_5a9[l-3]].join("-");s=_5a4[_5aa][m];}break;case "d":s=_5a3.getDate(true);pad=true;break;case "E":var d=_5a3.getDay();if(l<3){s=d+1;pad=true;}else{var _5ab=["days","format",_5a9[l-3]].join("-");s=_5a4[_5ab][d];}break;case "a":var _5ac=(_5a3.getHours()<12)?"am":"pm";s=_5a4["dayPeriods-format-wide-"+_5ac];break;case "h":case "H":case "K":case "k":var h=_5a3.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_5a3.getMinutes();pad=true;break;case "s":s=_5a3.getSeconds();pad=true;break;case "S":s=Math.round(_5a3.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "z":s=dd.getTimezoneName(_5a3.toGregorian());if(s){break;}l=4;case "Z":var _5ad=_5a3.toGregorian().getTimezoneOffset();var tz=[(_5ad<=0?"+":"-"),_59e.pad(Math.floor(Math.abs(_5ad)/60),2),_59e.pad(Math.abs(_5ad)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+_5a7);}if(pad){s=_59e.pad(s,l);}return s;});};_5a1.format=function(_5ae,_5af){_5af=_5af||{};var _5b0=i18n.normalizeLocale(_5af.locale);var _5b1=_5af.formatLength||"short";var _5b2=_5a1._getIslamicBundle(_5b0);var str=[];var _5b3=lang.hitch(this,_5a2,_5ae,_5b2,_5b0,_5af.fullYear);if(_5af.selector=="year"){var year=_5ae.getFullYear();return year;}if(_5af.selector!="time"){var _5b4=_5af.datePattern||_5b2["dateFormat-"+_5b1];if(_5b4){str.push(_5b5(_5b4,_5b3));}}if(_5af.selector!="date"){var _5b6=_5af.timePattern||_5b2["timeFormat-"+_5b1];if(_5b6){str.push(_5b5(_5b6,_5b3));}}var _5b7=str.join(" ");return _5b7;};_5a1.regexp=function(_5b8){return _5a1._parseInfo(_5b8).regexp;};_5a1._parseInfo=function(_5b9){_5b9=_5b9||{};var _5ba=i18n.normalizeLocale(_5b9.locale);var _5bb=_5a1._getIslamicBundle(_5ba);var _5bc=_5b9.formatLength||"short";var _5bd=_5b9.datePattern||_5bb["dateFormat-"+_5bc];var _5be=_5b9.timePattern||_5bb["timeFormat-"+_5bc];var _5bf;if(_5b9.selector=="date"){_5bf=_5bd;}else{if(_5b9.selector=="time"){_5bf=_5be;}else{_5bf=(typeof (_5be)=="undefined")?_5bd:_5bd+" "+_5be;}}var _5c0=[];var re=_5b5(_5bf,lang.hitch(this,_5c1,_5c0,_5bb,_5b9));return {regexp:re,tokens:_5c0,bundle:_5bb};};_5a1.parse=function(_5c2,_5c3){_5c2=_5c2.replace(/[\u200E\u200F\u202A\u202E]/g,"");if(!_5c3){_5c3={};}var info=_5a1._parseInfo(_5c3);var _5c4=info.tokens,_5a0=info.bundle;var _5c5=info.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");var re=new RegExp("^"+_5c5+"$");var _5c6=re.exec(_5c2);var _5c7=i18n.normalizeLocale(_5c3.locale);if(!_5c6){return null;}var date,_5c8;var _5c9=[1389,0,1,0,0,0,0];var amPm="";var _5ca=0;var _5cb=["abbr","wide","narrow"];var _5cc=arr.every(_5c6,function(v,i){if(!i){return true;}var _5cd=_5c4[i-1];var l=_5cd.length;switch(_5cd.charAt(0)){case "y":_5c9[0]=Number(v);break;case "M":if(l>2){var _5ce=_5a0["months-format-"+_5cb[l-3]].concat();if(!_5c3.strict){v=v.replace(".","").toLowerCase();_5ce=arr.map(_5ce,function(s){return s?s.replace(".","").toLowerCase():s;});}v=arr.indexOf(_5ce,v);if(v==-1){return false;}_5ca=l;}else{v--;}_5c9[1]=Number(v);break;case "D":_5c9[1]=0;case "d":_5c9[2]=Number(v);break;case "a":var am=_5c3.am||_5a0["dayPeriods-format-wide-am"],pm=_5c3.pm||_5a0["dayPeriods-format-wide-pm"];if(!_5c3.strict){var _5cf=/\./g;v=v.replace(_5cf,"").toLowerCase();am=am.replace(_5cf,"").toLowerCase();pm=pm.replace(_5cf,"").toLowerCase();}if(_5c3.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":_5c9[3]=Number(v);break;case "m":_5c9[4]=Number(v);break;case "s":_5c9[5]=Number(v);break;case "S":_5c9[6]=Number(v);}return true;});var _5d0=+_5c9[3];if(amPm==="p"&&_5d0<12){_5c9[3]=_5d0+12;}else{if(amPm==="a"&&_5d0==12){_5c9[3]=0;}}var _5d1=new _59f(_5c9[0],_5c9[1],_5c9[2],_5c9[3],_5c9[4],_5c9[5],_5c9[6]);return _5d1;};function _5b5(_5d2,_5d3,_5d4,_5d5){var _5d6=function(x){return x;};_5d3=_5d3||_5d6;_5d4=_5d4||_5d6;_5d5=_5d5||_5d6;var _5d7=_5d2.match(/(''|[^'])+/g);var _5d8=_5d2.charAt(0)=="'";arr.forEach(_5d7,function(_5d9,i){if(!_5d9){_5d7[i]="";}else{_5d7[i]=(_5d8?_5d4:_5d3)(_5d9);_5d8=!_5d8;}});return _5d5(_5d7.join(""));};function _5c1(_5da,_5db,_5dc,_5dd){_5dd=_59d.escapeString(_5dd);var _5de=i18n.normalizeLocale(_5dc.locale);return _5dd.replace(/([a-z])\1*/ig,function(_5df){var s;var c=_5df.charAt(0);var l=_5df.length;var p2="",p3="";if(_5dc.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d+";break;case "M":s=(l>2)?"\\S+ ?\\S+":p2+"[1-9]|1[0-2]";break;case "d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s=p2+"\\d|[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_5dc.am||_5db["dayPeriods-format-wide-am"],pm=_5dc.pm||_5db["dayPeriods-format-wide-pm"];if(_5dc.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_5da){_5da.push(_5df);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};var _5e0=[];_5a1.addCustomFormats=function(_5e1,_5e2){_5e0.push({pkg:_5e1,name:_5e2});};_5a1._getIslamicBundle=function(_5e3){var _5e4={};arr.forEach(_5e0,function(desc){var _5e5=i18n.getLocalization(desc.pkg,desc.name,_5e3);_5e4=lang.mixin(_5e4,_5e5);},this);return _5e4;};_5a1.addCustomFormats("dojo.cldr","islamic");_5a1.getNames=function(item,type,_5e6,_5e7,date){var _5e8;var _5e9=_5a1._getIslamicBundle(_5e7);var _5ea=[item,_5e6,type];if(_5e6=="standAlone"){var key=_5ea.join("-");_5e8=_5e9[key];if(_5e8[0]==1){_5e8=undefined;}}_5ea[1]="format";return (_5e8||_5e9[_5ea.join("-")]).concat();};_5a1.weekDays=_5a1.getNames("days","wide","format");_5a1.months=_5a1.getNames("months","wide","format");return _5a1;});},"esri/layers/FeatureLayer":function(){define("esri/layers/FeatureLayer",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/_base/Deferred","dojo/date/locale","dojo/sniff","dojo/io-query","dojo/dom-construct","dojo/i18n","esri/kernel","esri/lang","esri/request","esri/deferredUtils","esri/SpatialReference","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/symbols/jsonUtils","esri/renderers/SimpleRenderer","esri/renderers/UniqueValueRenderer","esri/renderers/jsonUtils","esri/tasks/QueryTask","esri/tasks/query","esri/tasks/FeatureSet","esri/geometry/Extent","esri/geometry/jsonUtils","esri/geometry/normalizeUtils","esri/layers/GraphicsLayer","esri/layers/Field","esri/layers/TimeInfo","esri/layers/FeatureType","esri/layers/FeatureTemplate","esri/layers/FeatureEditResult","esri/layers/SnapshotMode","esri/layers/OnDemandMode","esri/layers/SelectionMode","esri/layers/TrackManager","dojo/i18n!esri/nls/jsapi","dojo/has!extend-esri?esri/layers/agscommon"],function(_5eb,_5ec,lang,_5ed,_5ee,_5ef,_5f0,has,ioq,_5f1,i18n,_5f2,_5f3,_5f4,_5f5,_5f6,_5f7,_5f8,_5f9,_5fa,_5fb,_5fc,_5fd,_5fe,_5ff,_600,_601,_602,_603,_604,_605,_606,_607,_608,_609,_60a,_60b,_60c,_60d){var _60e=_5eb(_604,{declaredClass:"esri.layers.FeatureLayer",invalidParams:"query contains one or more unsupported parameters",_eventMap:{"add-attachment-complete":["result"],"before-apply-edits":["adds","updates","deletes"],"delete-attachments-complete":["results"],"edits-complete":["adds","updates","deletes"],"query-attachment-infos-complete":["results"],"query-count-complete":["count"],"query-features-complete":["featureSet"],"query-ids-complete":["objectIds"],"query-related-features-complete":["featureSets"],"selection-complete":["features","method"],"update-end":["error","info"]},constructor:function(url,_60f){this.i18n=i18n.getLocalization("esri","jsapi");this._outFields=_60f&&_60f.outFields;this._loadCallback=_60f&&_60f.loadCallback;var _610=_60f&&_60f._usePatch;this._usePatch=(_610===null||_610===undefined)?true:_610;this._trackIdField=_60f&&_60f.trackIdField;this.objectIdField=_60f&&_60f.objectIdField;this._maxOffset=_60f&&_60f.maxAllowableOffset;this._optEditable=_60f&&_60f.editable;this._optAutoGen=_60f&&_60f.autoGeneralize;this.editSummaryCallback=_60f&&_60f.editSummaryCallback;this.userId=_60f&&_60f.userId;this.userIsAdmin=_60f&&_60f.userIsAdmin;this.useMapTime=(_60f&&_60f.hasOwnProperty("useMapTime"))?(!!_60f.useMapTime):true;this.source=_60f&&_60f.source;this.gdbVersion=_60f&&_60f.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(_5f3.isDefined(_60f&&_60f.mode)?_60f.mode:ctor.MODE_ONDEMAND);switch(mode){case ctor.MODE_SNAPSHOT:this._mode=new _60a(this);this._isSnapshot=true;break;case ctor.MODE_ONDEMAND:this._tileWidth=(_60f&&_60f.tileWidth)||512;this._tileHeight=(_60f&&_60f.tileHeight)||512;this._mode=new _60b(this);var _611=_60f&&_60f.latticeTiling;this.latticeTiling=_611;break;case ctor.MODE_SELECTION:this._mode=new _60c(this);this._isSelOnly=true;break;}this._initLayer=lang.hitch(this,this._initLayer);this._selectHandler=lang.hitch(this,this._selectHandler);this._editable=false;if(lang.isObject(url)&&url.layerDefinition){var json=url;this._collection=true;this.mode=ctor.MODE_SNAPSHOT;this._initLayer(json);return this;}this._task=new _5fe(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _612=this._url.path;this._fserver=false;if(_612.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _613=_60f&&_60f.resourceInfo;if(_613){this._initLayer(_613);}else{if(this.source){var _614={source:this.source.toJson()};this._url.query=lang.mixin(this._url.query,{layer:_5ee.toJson(_614)});}if(this.gdbVersion){this._url.query=lang.mixin(this._url.query,{gdbVersion:this.gdbVersion});}_5f4({url:_612,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}this.registerConnectEvents();},_initLayer:function(_615,io){if(_615||io){this._json=_615;this._findCredential();var ssl=(this.credential&&this.credential.ssl)||(_615&&_615._ssl);if(ssl){this._useSSL();this._task._useSSL();}if(this._collection){this._mode=new _60a(this);this._isSnapshot=true;this._featureSet=_615.featureSet;this._nextId=_615.nextObjectId;_615=_615.layerDefinition;}if(_615.hasOwnProperty("capabilities")){var _616=(this.capabilities=_615.capabilities);if(_616&&_616.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(_5f3.isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=_5ee.toJson(this._json);if(this.isEditable()){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_615.geometryType==="esriGeometryPolyline")||(_615.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_5f3.isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}var _617=_615.effectiveMinScale||_615.minScale,_618=_615.effectiveMaxScale||_615.maxScale;if(!this._hasMin&&_617){this.setMinScale(_617);}if(!this._hasMax&&_618){this.setMaxScale(_618);}this.layerId=_615.id;this.name=_615.name;this.description=_615.description;this.copyright=_615.copyrightText;this.type=_615.type;this.geometryType=_615.geometryType;this.displayField=_615.displayField;this.defaultDefinitionExpression=_615.definitionExpression;this.fullExtent=new _601(_615.extent);this.initialExtent=new _601(this.fullExtent.toJson());if(this.fullExtent.spatialReference){this.spatialReference=new _5f6(this.fullExtent.spatialReference.toJson());}this.defaultVisibility=_615.defaultVisibility;if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_615.indexedFields;this.maxRecordCount=_615.maxRecordCount;this.canModifyLayer=_615.canModifyLayer;this.supportsStatistics=_615.supportsStatistics;this.supportsAdvancedQueries=_615.supportsAdvancedQueries;this.hasLabels=_615.hasLabels;this.canScaleSymbols=_615.canScaleSymbols;this.supportsRollbackOnFailure=_615.supportsRollbackOnFailure;this.syncCanReturnChanges=_615.syncCanReturnChanges;this.isDataVersioned=_615.isDataVersioned;this.editFieldsInfo=_615.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_615.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_615.relationships;this.allowGeometryUpdates=_5f3.isDefined(_615.allowGeometryUpdates)?_615.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _619=(this.fields=[]),_61a=_615.fields,i;for(i=0;i<_61a.length;i++){_619.push(new _605(_61a[i]));}if(!this.objectIdField){this.objectIdField=_615.objectIdField;if(!this.objectIdField){_61a=_615.fields;for(i=0;i<_61a.length;i++){var _61b=_61a[i];if(_61b.type==="esriFieldTypeOID"){this.objectIdField=_61b.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+_5f3.substitute({url:this.url},"objectIdField is not set [url: ${url}]"));}}if(!_5f3.isDefined(this._nextId)){var _61c=this.objectIdField,_61d=-1;if(this._collection&&_61c){var fset=this._featureSet,_61e=fset&&fset.features,il=_61e?_61e.length:0,oid,attr;for(i=0;i<il;i++){attr=_61e[i].attributes;oid=attr&&attr[_61c];if(oid>_61d){_61d=oid;}}}this._nextId=(_61d+1);}this.globalIdField=_615.globalIdField;var _61f=(this.typeIdField=_615.typeIdField),_620;if(_61f){_620=!this._getField(_61f)&&this._getField(_61f,true);if(_620){this.typeIdField=_620.name;}}this.visibilityField=_615.visibilityField;var _621=_615.defaultSymbol;if(_621){this.defaultSymbol=_5fa.fromJson(_621);}var _622=this.types=[],_623=_615.types,_624,_625,_626,_627=this.editFieldsInfo,_628=_627&&_627.creatorField,_629=_627&&_627.editorField,fix=(_628||_629),_62a=[];if(_623){for(i=0;i<_623.length;i++){_624=new _607(_623[i]);_625=_624.templates;if(fix&&_625&&_625.length){_62a=_62a.concat(_625);}_622.push(_624);}}var _62b=_615.templates,_62c,_62d=this.templates=[];if(_62b){for(i=0;i<_62b.length;i++){_62c=new _608(_62b[i]);if(fix){_62a.push(_62c);}_62d.push(_62c);}}for(i=0;i<_62a.length;i++){_626=lang.getObject("prototype.attributes",false,_62a[i]);if(_626){if(_628){delete _626[_628];}if(_629){delete _626[_629];}}}var _62e=_615.timeInfo;if(_62e){this.timeInfo=new _606(_62e);this._startTimeField=_62e.startTimeField;this._endTimeField=_62e.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_62e.trackIdField=this._trackIdField;}else{this._trackIdField=_62e.trackIdField;}}this.hasAttachments=(!this._collection&&_615.hasAttachments)?true:false;this.htmlPopupType=_615.htmlPopupType;var _62f=_615.drawingInfo,_630;if(!this.renderer){if(_62f&&_62f.renderer){_630=_62f.renderer;this.setRenderer(_5fd.fromJson(_630));if(_630.type==="classBreaks"){this.renderer.setMaxInclusive(true);}if(!this._collection){var _631=_630.type,_632=[];_630=this.renderer;switch(_631){case "simple":_632.push(_630.symbol);break;case "uniqueValue":case "classBreaks":_632.push(_630.defaultSymbol);_632=_632.concat(_5ed.map(_630.infos,function(info){return info.symbol;}));break;}_632=_5ed.filter(_632,_5f3.isDefined);var _633=this._url.path+"/images/",_634=this._getToken();_5ed.forEach(_632,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_633+url;}if(_634&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_634);}}});}}else{if(_621){_623=this.types;if(_623.length>0){_630=new _5fc(this.defaultSymbol,this.typeIdField);_5ed.forEach(_623,function(type){_630.addValue(type.id,type.symbol);});}else{_630=new _5fb(this.defaultSymbol);}this.setRenderer(_630);}else{if(!this._isTable){var _635;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_635=new _5f7();break;case "esriGeometryPolyline":_635=new _5f8();break;case "esriGeometryPolygon":_635=new _5f9();break;}this.setRenderer(_635?new _5fb(_635):null);}}}}var _636=(_62f&&_62f.transparency)||0;if(!_5f3.isDefined(this.opacity)&&_636>0){this.opacity=1-(_636/100);}this.version=_615.currentVersion;if(!this.version){var ver;if("capabilities" in _615||"drawingInfo" in _615||"hasAttachments" in _615||"htmlPopupType" in _615||"relationships" in _615||"timeInfo" in _615||"typeIdField" in _615||"types" in _615){ver=10;}else{ver=9.3;}this.version=ver;}if((has("ie")||has("safari"))&&this.isEditable()&&this.version<10.02){this._ts=true;}this.loaded=true;this._fixRendererFields();this._checkFields();this._updateCaps();var _637=function(){this.onLoad(this);var _638=this._loadCallback;if(_638){delete this._loadCallback;_638(this);}};if(this._collection){this._fireUpdateStart();var _639=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new _600(_639));this._fcAdded=true;_637.call(this);}else{this._forceIdentity(_637);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _63a=this.renderer;if(_63a){this._ager=(_63a.declaredClass.indexOf("TemporalRenderer")!==-1&&_63a.observationAger&&_63a.observationRenderer);var _63b=_5ed.filter([_63a,_63a.observationRenderer,_63a.latestObservationRenderer,_63a.trackRenderer],_5f3.isDefined);var _63c=[];_5ed.forEach(_63b,function(rnd){if(!lang.isFunction(rnd.attributeField)){_63c.push(rnd.attributeField);}_63c.push(rnd.attributeField2);_63c.push(rnd.attributeField3);},this);this._rendererFields=_5ed.filter(_63c,_5f3.isDefined);}else{this._ager=false;this._rendererFields=[];}if(this.loaded&&this._rendererFields.length>0){this._fixRendererFields();this._checkFields(this._rendererFields);}if(this.loaded&&this._collection){this._typesDirty=true;}},_setMap:function(map){var div=this.inherited(arguments),mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map){var mode=this._mode;if(mode){mode.suspend();}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}_5ec.disconnect(this._zoomConnect);this._zoomConnect=null;this._toggleTime(false);this.inherited("_unsetMap",arguments);},refresh:function(){var mode=this._mode;if(mode){mode.refresh();}},getOutFields:function(){return _5ed.filter(this._getOutFields(),function(_63d){return (_63d==="*"||!!this._getField(_63d));},this);},setEditable:function(_63e){if(!this._collection){console.log("FeatureLayer:setEditable - this functionality is not yet supported for layer in a feature service");return this;}if(!this.loaded){this._optEditable=_63e;return this;}var _63f=this._editable;this._editable=_63e;this._updateCaps();if(_63f!==_63e){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_640){var _641={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this.isEditable()){return _641;}var _642=_640&&_640.feature,_643=_640&&_640.userId,caps=_5ed.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),lang.trim),_644=_5ed.indexOf(caps,"editing")>-1,_645=_644&&(_5ed.indexOf(caps,"create")>-1),_646=_644&&(_5ed.indexOf(caps,"update")>-1),_647=_644&&(_5ed.indexOf(caps,"delete")>-1),_648=this.ownershipBasedAccessControlForFeatures,_649=this.editFieldsInfo,_64a=_649&&_649.creatorField,_64b=_649&&_649.realm,_64c=_642&&_642.attributes,_64d=(_64c&&_64a)?_64c[_64a]:undefined,_64e,_64f=!!this.userIsAdmin,_650=!_648||_64f||!!(_648.allowOthersToUpdate||_648.allowUpdateToOthers),_651=!_648||_64f||!!(_648.allowOthersToDelete||_648.allowDeleteToOthers);if(_64f||(_644&&!(_645||_646||_647))){_645=_646=_647=true;}_64e={"canCreate":_645,"canUpdate":_646,"canDelete":_647};if(_64d===null){_64e.canUpdate=_646&&_650;_64e.canDelete=_647&&_651;}else{if(_64d===""){return _64e;}else{if(_64d){_643=_643||this.getUserId();if(_643&&_64b){_643=_643+"@"+_64b;}if(_643.toLowerCase()===_64d.toLowerCase()){return _64e;}else{_64e.canUpdate=_646&&_650;_64e.canDelete=_647&&_651;}}}}return _64e;},getUserId:function(){var _652;if(this.loaded){_652=(this.credential&&this.credential.userId)||this.userId||"";}return _652;},setUserIsAdmin:function(_653){this.userIsAdmin=_653;},setEditSummaryCallback:function(_654){this.editSummaryCallback=_654;},getEditSummary:function(_655,_656,_657){_657=_5f3.isDefined(_657)?_657:(new Date()).getTime();var _658="",info=this.getEditInfo(_655,_656,_657),_659=(_656&&_656.callback)||this.editSummaryCallback;if(_659){info=_659(_655,info)||"";}if(lang.isString(info)){_658=info;}else{if(info){var _65a=info.action,_65b=info.userId,_65c=info.timeValue,_65d=0;if(_65a){_65d++;}if(_65b){_65d++;}if(_5f3.isDefined(_65c)){_65d++;}if(_65d>1){_658=(_65a==="edit"?"edit":"create")+(_65b?"User":"")+(_5f3.isDefined(_65c)?info.displayPattern:"");}}_658=_658&&_5f3.substitute(info,this.i18n.layers.FeatureLayer[_658]);}return _658;},getEditInfo:function(_65e,_65f,_660){if(!this.loaded){return;}_660=_5f3.isDefined(_660)?_660:(new Date()).getTime();var _661=(_65f&&_65f.action)||"last",_662=this.editFieldsInfo,_663=_662&&_662.creatorField,_664=_662&&_662.creationDateField,_665=_662&&_662.editorField,_666=_662&&_662.editDateField,_667=_662&&_662.realm,_668=_65e&&_65e.attributes,_669=(_668&&_663)?_668[_663]:undefined,_66a=(_668&&_664)?_668[_664]:null,_66b=(_668&&_665)?_668[_665]:undefined,_66c=(_668&&_666)?_668[_666]:null,_66d=this._getEditData(_669,_66a,_660),_66e=this._getEditData(_66b,_66c,_660),_66f;switch(_661){case "creation":_66f=_66d;break;case "edit":_66f=_66e;break;case "last":_66f=_66e||_66d;break;}if(_66f){_66f.action=(_66f===_66e)?"edit":"creation";}return _66f;},_getEditData:function(_670,_671,_672){var data,_673,_674,_675=60000,_676=3600000,_677=2*_676,_678=24*_676,_679=7*_678;if(_5f3.isDefined(_671)){_673=_672-_671;if(_673<0){_674="Full";}else{if(_673<_675){_674="Seconds";}else{if(_673<(2*_675)){_674="Minute";}else{if(_673<_676){_674="Minutes";}else{if(_673<_677){_674="Hour";}else{if(_673<_678){_674="Hours";}else{if(_673<_679){_674="WeekDay";}else{_674="Full";}}}}}}}}if((_670!==undefined)||_674){data=data||{};data.userId=_670;if(_674){var _67a=_5f0.format,_67b=new Date(_671);data.minutes=Math.floor(_673/_675);data.hours=Math.floor(_673/_676);data.weekDay=_67a(_67b,{datePattern:"EEEE",selector:"date"});data.formattedDate=_67a(_67b,{selector:"date"});data.formattedTime=_67a(_67b,{selector:"time"});data.displayPattern=_674;data.timeValue=_671;}}return data;},isEditable:function(){return !!(this._editable||this.userIsAdmin);},setMaxAllowableOffset:function(_67c){if(!this.isEditable()){this._maxOffset=_67c;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_67d){if(!this.loaded){this._optAutoGen=_67d;}else{if(!this.isEditable()&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_67d;if(_67d){var map=this._map;if(map&&map.loaded){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}else{delete this._maxOffset;}}}return this;},setGDBVersion:function(_67e){if(!this._collection&&(_67e!==this.gdbVersion)&&(_67e||this.gdbVersion)){this.gdbVersion=_67e;this._task.gdbVersion=_67e;this._url.query=lang.mixin(this._url.query,{gdbVersion:_67e});if(this.loaded){this.clearSelection();if(this._map){this.refresh();}}this.onGDBVersionChange();}return this;},setDefinitionExpression:function(expr){this._defnExpr=expr;var mode=this._mode;if(mode){mode.propertyChangeHandler(1);}return this;},getDefinitionExpression:function(){return this._defnExpr;},setTimeDefinition:function(_67f){if(this._isSnapshot){this._timeDefn=_67f;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}else{console.log("FeatureLayer.setTimeDefinition: layer in on-demand or selection mode does not support time definitions. Layer id = "+this.id+", Layer URL = "+this.url);}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_680,_681){this._timeOffset=_680;this._timeOffsetUnits=_681;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}return this;},setUseMapTime:function(use){this.useMapTime=use;this._toggleTime(!this.suspended);var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},selectFeatures:function(_682,_683,_684,_685){_683=_683||this.constructor.SELECTION_NEW;var _686=this._getShallowClone(_682),map=this._map,_687,dfd=_5f5._fixDfd(new _5ef(_5f5._dfdCanceller));_686.outFields=this.getOutFields();_686.returnGeometry=true;if(map){_686.outSpatialReference=new _5f6(map.spatialReference.toJson());}if(!this._applyQueryFilters(_686)){_687={features:[]};this._selectHandler(_687,_683,_684,_685,dfd);return dfd;}var _688=this._canDoClientSideQuery(_686);if(_688){_687={features:this._doQuery(_686,_688)};this._selectHandler(_687,_683,_684,_685,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+this.invalidParams);this._resolve([err],null,_685,dfd,true);return dfd;}var self=this;if(this._ts){_686._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_686);temp.addCallbacks(function(_689){self._selectHandler(_689,_683,_684,_685,dfd);},function(err){self._resolve([err],null,_685,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _68a=this._selectedFeatures,_68b=[],item;for(item in _68a){if(_68a.hasOwnProperty(item)){_68b.push(_68a[item]);}}return _68b;},clearSelection:function(_68c){var _68d=this._selectedFeatures,mode=this._mode,item;for(item in _68d){if(_68d.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_68c){this.onSelectionClear();}return this;},setSelectionSymbol:function(_68e){this._selectionSymbol=_68e;if(_68e){var _68f=this._selectedFeatures,item;for(item in _68f){if(_68f.hasOwnProperty(item)){_68f[item].setSymbol(_68e);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_690,_691,_692,_693,_694){var _695=_694.assembly,dfd=_694.dfd;this._applyNormalized(adds,_695&&_695[0]);this._applyNormalized(_690,_695&&_695[1]);this.onBeforeApplyEdits(adds,_690,_691);var i,_696={},_697=this.objectIdField,_698={f:"json"},_699=false;if(this._collection){var _69a={};_69a.addResults=adds?_5ed.map(adds,function(){_699=true;return {objectId:this._nextId++,success:true};},this):null;_69a.updateResults=_690?_5ed.map(_690,function(_69b){_699=true;var oid=_69b.attributes[_697];_696[oid]=_69b;return {objectId:oid,success:true};},this):null;_69a.deleteResults=_691?_5ed.map(_691,function(_69c){_699=true;return {objectId:_69c.attributes[_697],success:true};},this):null;if(_699){this._editHandler(_69a,adds,_696,_692,_693,dfd);}return;}if(adds&&adds.length>0){_698.adds=this._convertFeaturesToJson(adds,0,1);_699=true;}if(_690&&_690.length>0){for(i=0;i<_690.length;i++){var _69d=_690[i];_696[_69d.attributes[_697]]=_69d;}_698.updates=this._convertFeaturesToJson(_690,0,0,1);_699=true;}if(_691&&_691.length>0){var ids=[];for(i=0;i<_691.length;i++){ids.push(_691[i].attributes[_697]);}_698.deletes=ids.join(",");_699=true;}if(_699){var self=this;return _5f4({url:this._url.path+"/applyEdits",content:lang.mixin(_698,this._url.query),callbackParamName:"callback",load:function(_69e){self._editHandler(_69e,adds,_696,_692,_693,dfd);},error:function(err){self._resolve([err],null,_693,dfd,true);}},{usePost:true});}},queryFeatures:function(_69f,_6a0,_6a1){return this._query("execute","onQueryFeaturesComplete",_69f,_6a0,_6a1);},queryRelatedFeatures:function(_6a2,_6a3,_6a4){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_6a2,_6a3,_6a4);},queryIds:function(_6a5,_6a6,_6a7){return this._query("executeForIds","onQueryIdsComplete",_6a5,_6a6,_6a7);},queryCount:function(_6a8,_6a9,_6aa){return this._query("executeForCount","onQueryCountComplete",_6a8,_6a9,_6aa);},queryAttachmentInfos:function(_6ab,_6ac,_6ad){var url=this._url.path+"/"+_6ab+"/attachments",dfd=new _5ef(_5f5._dfdCanceller),self=this;dfd._pendingDfd=_5f4({url:url,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_6ae){var _6af=_6ae.attachmentInfos,_6b0;_5ed.forEach(_6af,function(info){_6b0=ioq.objectToQuery({gdbVersion:self._url.query&&self._url.query.gdbVersion,layer:self._url.query&&self._url.query.layer,token:self._getToken()});info.url=url+"/"+info.id+(_6b0?("?"+_6b0):"");info.objectId=_6ab;});self._resolve([_6af],"onQueryAttachmentInfosComplete",_6ac,dfd);},error:function(err){self._resolve([err],null,_6ad,dfd,true);}});return dfd;},addAttachment:function(_6b1,_6b2,_6b3,_6b4){return this._sendAttachment("add",_6b1,_6b2,_6b3,_6b4);},updateAttachment:function(_6b5,_6b6,_6b7,_6b8,_6b9){_6b7.appendChild(_5f1.create("input",{type:"hidden",name:"attachmentId",value:_6b6}));return this._sendAttachment("update",_6b5,_6b7,_6b8,_6b9);},deleteAttachments:function(_6ba,_6bb,_6bc,_6bd){var url=this._url.path+"/"+_6ba+"/deleteAttachments",dfd=new _5ef(_5f5._dfdCanceller),self=this,_6be={f:"json",attachmentIds:_6bb.join(",")};dfd._pendingDfd=_5f4({url:url,content:lang.mixin(_6be,this._url.query),callbackParamName:"callback",load:lang.hitch(this,function(_6bf){var _6c0=_6bf.deleteAttachmentResults;_6c0=_5ed.map(_6c0,function(_6c1){var res=new _609(_6c1);res.attachmentId=res.objectId;res.objectId=_6ba;return res;});self._resolve([_6c0],"onDeleteAttachmentsComplete",_6bc,dfd);}),error:function(err){self._resolve([err],null,_6bd,dfd,true);}},{usePost:true});return dfd;},addType:function(_6c2){var _6c3=this.types;if(_6c3){var _6c4=_5ed.some(_6c3,function(type){if(type.id==_6c2.id){return true;}return false;});if(_6c4){return false;}else{_6c3.push(_6c2);}}else{this.types=[_6c2];}this._typesDirty=true;return true;},deleteType:function(_6c5){if(!this._collection){return;}var _6c6=this.types;if(_6c6){var _6c7=-1;_5ed.some(_6c6,function(type,_6c8){if(type.id==_6c5){_6c7=_6c8;return true;}return false;});if(_6c7>-1){this._typesDirty=true;return _6c6.splice(_6c7,1)[0];}}},toJson:function(){var _6c9=this._json,json=lang.isString(_6c9)?_5ee.fromJson(_6c9):lang.clone(_6c9);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _6ca=json.layerDefinition,_6cb=this._collection;if(_6cb&&this._typesDirty){_6ca.types=_5ed.map(this.types||[],function(type){return type.toJson();});var _6cc=this.renderer,_6cd=_6ca.drawingInfo;if(_6cd&&_6cc&&_6cc.declaredClass.indexOf("TemporalRenderer")===-1){_6cd.renderer=_6cc.toJson();}}var _6ce=null;if(!(_6cb&&!this._fcAdded)){_6ce={geometryType:_6ca.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=lang.mixin({},json.featureSet||{},_6ce);if(_6cb){json.nextObjectId=this._nextId;_6ca.capabilities=this.capabilities;}return json;},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},onQueryCountComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},_forceIdentity:function(_6cf){var self=this,path=this._url&&this._url.path;if((this.ownershipBasedAccessControlForFeatures||this.userIsAdmin)&&!this._getToken()&&path&&_5f2.id&&_5f2.id._hasPortalSession()&&_5f2.id._doPortalSignIn(path)){_5f2.id.getCredential(path).then(function(){self._findCredential();_6cf.call(self);},function(){_6cf.call(self);});}else{_6cf.call(this);}},_updateCaps:function(){var _6d0=this._editable,_6d1=lang.trim(this.capabilities||""),_6d2=_5ed.map((_6d1?_6d1.split(","):[]),lang.trim),caps=_5ed.map((_6d1?_6d1.toLowerCase().split(","):[]),lang.trim),_6d3=_5ed.indexOf(caps,"editing"),cap,i,_6d4,_6d5={"Create":_5ed.indexOf(caps,"create"),"Update":_5ed.indexOf(caps,"update"),"Delete":_5ed.indexOf(caps,"delete")};if(_6d0&&_6d3===-1){_6d2.push("Editing");}else{if(!_6d0&&_6d3>-1){_6d4=[_6d3];for(cap in _6d5){if(_6d5[cap]>-1){_6d4.push(_6d5[cap]);}}_6d4.sort();for(i=_6d4.length-1;i>=0;i--){_6d2.splice(_6d4[i],1);}}}this.capabilities=_6d2.join(",");},_counter:{value:0},_getUniqueId:function(){return this._counter.value++;},onSuspend:function(){this.inherited(arguments);this._toggleTime(false);var mode=this._mode;if(mode){mode.suspend();}},onResume:function(evt){this.inherited(arguments);this._toggleTime(true);this._updateMaxOffset();var mode=this._mode,map=this._map,_6d6=this.renderer;if(evt.firstOccurrence){this.clearSelection();if(this.timeInfo){if(this._trackIdField||(_6d6&&(_6d6.latestObservationRenderer||_6d6.trackRenderer))){this._trackManager=new _60d(this);this._trackManager.initialize(map);}}this._zoomConnect=_5ec.connect(map,"onZoomEnd",this,this._updateMaxOffset);}if(mode){evt.firstOccurrence?mode.startup():mode.resume();}},_updateMaxOffset:function(){var map=this._map;if(map&&map.loaded){if(this._autoGeneralize){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}},_toggleTime:function(_6d7){var map=this._map;if(_6d7&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_5ec.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_5ec.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_6d8){this._mapTimeExtent=_6d8;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_6d9){var _6da=this._timeOffset,_6db=this._timeOffsetUnits;return (_6d9&&_6da&&_6db)?_6d9.offset(-1*_6da,_6db):_6d9;},_getTimeOverlap:function(_6dc,_6dd){if(_6dc&&_6dd){return _6dc.intersection(_6dd);}else{return _6dc||_6dd;}},_getTimeFilter:function(_6de){var _6df=this.getTimeDefinition(),_6e0=null,_6e1;if(_6df||_6e0){_6e1=this._getTimeOverlap(_6df,_6e0);if(!_6e1){return [false];}}if(_6de){_6de=_6e1?this._getTimeOverlap(_6de,_6e1):_6de;if(!_6de){return [false];}}else{_6de=_6e1;}return [true,_6de];},_getAttributeFilter:function(_6e2){var _6e3=this.getDefinitionExpression();if(_6e2){_6e2=_6e3?"("+_6e3+") AND ("+_6e2+")":_6e2;}else{_6e2=_6e3;}return _6e2;},_applyQueryFilters:function(_6e4){_6e4.where=this._getAttributeFilter(_6e4.where);_6e4.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _6e5=this._getTimeFilter(_6e4.timeExtent);if(!_6e5[0]){return false;}else{_6e4.timeExtent=_6e5[1];}}return true;},_add:function(_6e6){var _6e7=this._selectionSymbol,attr=_6e6.attributes,_6e8=this.visibilityField;if(_6e7&&this._isSelOnly){_6e6.setSymbol(_6e7);}if(_6e8&&attr&&attr.hasOwnProperty(_6e8)){_6e6[attr[_6e8]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_6e9){var _6ea=[],map=this._map;if(this._isTable||!map){return;}if(_6e9.text||(_6e9.where&&_6e9.where!==this.getDefinitionExpression())){return;}var _6eb=this._isSnapshot,_6ec=this._isSelOnly;var _6ed=_6e9.geometry;if(_6ed){if(!_6ec&&_6e9.spatialRelationship===_5ff.SPATIAL_REL_INTERSECTS&&(_6ed.type==="extent"&&(_6eb||map.extent.contains(_6ed)))){_6ea.push(1);}else{return;}}var ids=_6e9.objectIds;if(ids){if(_6eb){_6ea.push(2);}else{var len=ids.length,mode=this._mode,_6ee=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_6ee++;}}if(_6ee===len){_6ea.push(2);}else{return;}}}if(this.timeInfo){var _6ef=_6e9.timeExtent,_6f0=this._mapTimeExtent;if(_6eb){if(_6ef){_6ea.push(3);}}else{if(_6ec){if(_6ef){return;}}else{if(_6f0){if(_5ed.indexOf(_6ea,2)!==-1){if(_6ef){_6ea.push(3);}}else{return;}}else{if(_6ea.length>0){if(_6ef){_6ea.push(3);}}else{if(_6ef){return;}}}}}}return _6ea.length>0?_6ea:null;},_doQuery:function(_6f1,_6f2,_6f3){var _6f4=[],mode=this._mode,_6f5=this.objectIdField,i,len,_6f6;if(_5ed.indexOf(_6f2,2)!==-1){_6f4=[];var ids=_6f1.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_6f4.push(obj);}}if(_6f4.length===0){return [];}}if(_5ed.indexOf(_6f2,1)!==-1){_6f6=_6f4.length>0?_6f4:this.graphics;len=_6f6.length;var _6f7=_6f1.geometry._normalize(null,true);_6f4=[];for(i=0;i<len;i++){var _6f8=_6f6[i],_6f9=_6f8.geometry;if(_6f9){if(this.normalization&&_6f7.length){if(_6f7[0].intersects(_6f9)||_6f7[1].intersects(_6f9)){_6f4.push(_6f8);}}else{if(_6f7.intersects(_6f9)){_6f4.push(_6f8);}}}}if(_6f4.length===0){return [];}}if(_5ed.indexOf(_6f2,3)!==-1){if(this.timeInfo){_6f6=_6f4.length>0?_6f4:this.graphics;var time=_6f1.timeExtent,_6fa=this._filterByTime(_6f6,time.startTime,time.endTime);_6f4=_6fa.match;}}if(_6f3){return _5ed.map(_6f4,function(obj){return obj.attributes[_6f5];},this);}else{return _6f4;}},_filterByTime:function(_6fb,_6fc,_6fd){var _6fe=this._startTimeField,_6ff=this._endTimeField,_700;if(!this._twoTimeFields){_700=_6fe||_6ff;}var _701=_5f3.isDefined,yea=[],nay=[],i,len=_6fb.length,_702,_703;_6fc=_6fc?_6fc.getTime():-Infinity;_6fd=_6fd?_6fd.getTime():Infinity;if(_700){for(i=0;i<len;i++){_702=_6fb[i];_703=_702.attributes;var time=_703[_700];if(time>=_6fc&&time<=_6fd){yea.push(_702);}else{nay.push(_702);}}}else{for(i=0;i<len;i++){_702=_6fb[i];_703=_702.attributes;var _704=_703[_6fe],end=_703[_6ff];_704=_701(_704)?_704:-Infinity;end=_701(end)?end:Infinity;if((_704>=_6fc&&_704<=_6fd)||(end>=_6fc&&end<=_6fd)||(_6fc>=_704&&_6fd<=end)){yea.push(_702);}else{nay.push(_702);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_705,_706,dfd,_707){if(_705){this[_705].apply(this,args);}if(_706){_706.apply(null,args);}if(dfd){_5f5._resDfd(dfd,args,_707);}},_getShallowClone:function(_708){var _709=new _5ff(),prop;for(prop in _708){if(_708.hasOwnProperty(prop)){_709[prop]=_708[prop];}}return _709;},_query:function(type,_70a,_70b,_70c,_70d){var that=this,map=this._map,dfd=new _5ef(_5f5._dfdCanceller),_70e=_70b;var _70f=function(_710,_711){if(!_711&&type==="execute"&&!that._isTable){var _712=_710.features,mode=that._mode,_713=that.objectIdField,il=_712.length,i;for(i=il-1;i>=0;i--){var oid=_712[i].attributes[_713];var _714=mode._getFeature(oid);if(_714){_712.splice(i,1,_714);}}}that._resolve([_710],_70a,_70c,dfd);};if(type!=="executeRelationshipQuery"){_70e=this._getShallowClone(_70b);_70e.outFields=this.getOutFields();_70e.returnGeometry=_70b.hasOwnProperty("returnGeometry")?_70b.returnGeometry:true;var _715;if(map){_70e.outSpatialReference=new _5f6(map.spatialReference.toJson());}if(!this._applyQueryFilters(_70e)){switch(type){case "execute":_715=new _600({features:[]});break;case "executeForIds":_715=[];break;case "executeForCount":_715=0;break;}_70f(_715,true);return dfd;}var _716=this._canDoClientSideQuery(_70e);if(_716){var _717=this._doQuery(_70e,_716,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_715=new _600();_715.features=_717;break;case "executeForIds":_715=_717;break;case "executeForCount":_715=_717.length;break;}_70f(_715,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+this.invalidParams);this._resolve([err],null,_70d,dfd,true);return dfd;}if(this._ts){_70e._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_70e);temp.addCallbacks(_70f,function(err){that._resolve([err],null,_70d,dfd,true);});return dfd;},_convertFeaturesToJson:function(_718,_719,_71a,_71b){var json=[],_71c=this._selectionSymbol,_71d=this.visibilityField,i,_71e,_71f=this.objectIdField;if(this.loaded&&(_71a||_71b)){_71e=_5ed.filter(this.fields,function(_720){return (_720.editable===false)&&(!_71b||(_720.name!==_71f));});}for(i=0;i<_718.length;i++){var _721=_718[i],_722={},_723=_721.geometry,attr=_721.attributes,_724=_721.symbol;if(_723&&(!_71b||!this.loaded||this.allowGeometryUpdates)){_722.geometry=_723.toJson();}if(_71d){_722.attributes=attr=lang.mixin({},attr);attr[_71d]=_721.visible?1:0;}else{if(attr){_722.attributes=lang.mixin({},attr);}}if(_722.attributes&&_71e&&_71e.length){_5ed.forEach(_71e,function(_725){delete _722.attributes[_725.name];});}if(_724&&(_724!==_71c)){_722.symbol=_724.toJson();}json.push(_722);}return _719?json:_5ee.toJson(json);},_selectHandler:function(_726,_727,_728,_729,dfd){var _72a,ctor=this.constructor;switch(_727){case ctor.SELECTION_NEW:this.clearSelection(true);_72a=true;break;case ctor.SELECTION_ADD:_72a=true;break;case ctor.SELECTION_SUBTRACT:_72a=false;break;}var i,_72b=_726.features,mode=this._mode,_72c=[],_72d=this.objectIdField,_72e,oid;if(_72a){for(i=0;i<_72b.length;i++){_72e=_72b[i];oid=_72e.attributes[_72d];var _72f=mode._addFeatureIIf(oid,_72e);_72c.push(_72f);this._selectFeatureIIf(oid,_72f,mode);}}else{for(i=0;i<_72b.length;i++){_72e=_72b[i];oid=_72e.attributes[_72d];this._unSelectFeatureIIf(oid,mode);var _730=mode._removeFeatureIIf(oid);_72c.push(_730||_72e);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_72c,_727,_726.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_728,dfd);if(_726.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_731,mode){var _732=this._selectedFeatures,_733=_732[oid];if(!_733){mode._incRefCount(oid);_732[oid]=_731;if(!this._isTable){this._setSelectSymbol(_731);}}return _733||_731;},_unSelectFeatureIIf:function(oid,mode){var _734=this._selectedFeatures[oid];if(_734){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_734);}}return _734;},_isSelected:function(_735){},_setSelectSymbol:function(_736){var _737=this._selectionSymbol;if(_737&&!this._isSelOnly){_736.setSymbol(_737);}},_setUnSelectSymbol:function(_738){var _739=this._selectionSymbol;if(_739&&!this._isSelOnly){if(_739===_738.symbol){_738.setSymbol(null,true);}}},_getOutFields:function(){var _73a=_5ed.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_73b,_73c,arr){return !!_73b&&(_5ed.indexOf(arr,_73b)===_73c);});var _73d=lang.clone(this._outFields);if(_73d){if(_5ed.indexOf(_73d,"*")!==-1){return _73d;}_5ed.forEach(_73a,function(_73e){if(_5ed.indexOf(_73d,_73e)===-1){_73d.push(_73e);}});return _73d;}else{return _73a;}},_checkFields:function(_73f){var _740=_73f||this._getOutFields();_5ed.forEach(_740,function(_741){if(_741==="*"){return;}if(!this._getField(_741)){console.debug("esri.layers.FeatureLayer: "+_5f3.substitute({url:this.url,field:_741},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]"));}},this);if(!_73f&&!this._isTable&&!this._fserver&&!this._collection){var _742=_5ed.some(this.fields,function(_743){return (_743&&_743.type==="esriFieldTypeGeometry")?true:false;});if(!_742){console.debug("esri.layers.FeatureLayer: "+_5f3.substitute({url:this.url},"unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information. If you are using a map service layer, features will not have geometry [url: ${url}]"));}}},_fixRendererFields:function(){var _744=this.renderer;if(_744&&this.fields.length>0){var _745=_5ed.filter([_744,_744.observationRenderer,_744.latestObservationRenderer,_744.trackRenderer],_5f3.isDefined);var _746=[];_5ed.forEach(_745,function(rnd){var _747,_748;_748=rnd.attributeField;if(_748&&!lang.isFunction(_748)){_747=!this._getField(_748)&&this._getField(_748,true);if(_747){rnd.attributeField=_747.name;}}_748=rnd.attributeField2;if(_748){_747=!this._getField(_748)&&this._getField(_748,true);if(_747){rnd.attributeField2=_747.name;}}_748=rnd.attributeField3;if(_748){_747=!this._getField(_748)&&this._getField(_748,true);if(_747){rnd.attributeField3=_747.name;}}if(!lang.isFunction(rnd.attributeField)){_746.push(rnd.attributeField);}_746.push(rnd.attributeField2);_746.push(rnd.attributeField3);},this);this._rendererFields=_5ed.filter(_746,_5f3.isDefined);}},_getField:function(_749,_74a){var _74b=this.fields;if(!_74b||_74b.length===0){return null;}var _74c;if(_74a){_749=_749.toLowerCase();}_5ed.some(_74b,function(_74d){var _74e=false;if(_74a){_74e=(_74d&&_74d.name.toLowerCase()===_749)?true:false;}else{_74e=(_74d&&_74d.name===_749)?true:false;}if(_74e){_74c=_74d;}return _74e;});return _74c;},_getDateOpts:function(){if(!this._dtOpts){var _74f=_5ed.map(_5ed.filter(this.fields,function(_750){return !!(_750&&_750.type==="esriFieldTypeDate");}),function(_751){return _751.name;});this._dtOpts={properties:_74f};}return this._dtOpts;},_applyNormalized:function(_752,_753){if(_752&&_753){_5ed.forEach(_752,function(_754,_755){if(_754&&_753[_755]){_754.setGeometry(_753[_755]);}});}},_editHandler:function(_756,adds,_757,_758,_759,dfd){var _75a=_756.addResults,_75b=_756.updateResults,_75c=_756.deleteResults,i,_75d,oid,_75e,attr,_75f=this.objectIdField,mode=this._mode,_760=this._isTable;var _761=this.editFieldsInfo,_762=this.getOutFields()||[],_763=_761&&_761.creatorField,_764=_761&&_761.creationDateField,_765=_761&&_761.editorField,_766=_761&&_761.editDateField,_767=_761&&_761.realm;if(_5ed.indexOf(_762,"*")===-1){if(_763&&_5ed.indexOf(_762,_763)===-1){_763=null;}if(_764&&_5ed.indexOf(_762,_764)===-1){_764=null;}if(_765&&_5ed.indexOf(_762,_765)===-1){_765=null;}if(_766&&_5ed.indexOf(_762,_766)===-1){_766=null;}}var _768=(_764||_766)?(new Date()).getTime():null,_769=(_763||_765)?this.getUserId():undefined;if(_769&&_767){_769=_769+"@"+_767;}if(_75a){for(i=0;i<_75a.length;i++){_75a[i]=new _609(_75a[i]);if(_760){continue;}_75d=_75a[i];if(_75d.success){oid=_75d.objectId;_75e=adds[i];var gl=_75e._graphicsLayer;if(gl&&gl!==this){gl.remove(_75e);}attr=_75e.attributes||{};attr[_75f]=oid;if(_763){attr[_763]=_769;}if(_765){attr[_765]=_769;}if(_764){attr[_764]=_768;}if(_766){attr[_766]=_768;}_75e.setAttributes(attr);if(mode._init){mode.drawFeature(_75e);}}}}if(_75b){for(i=0;i<_75b.length;i++){_75b[i]=new _609(_75b[i]);if(_760){continue;}_75d=_75b[i];if(_75d.success){oid=_75d.objectId;_75e=_757[oid];var _76a=mode._getFeature(oid);if(_76a){if(_76a.geometry!==_75e.geometry){_76a.setGeometry(_602.fromJson(_75e.geometry.toJson()));}this._repaint(_76a,oid);}_75e=_76a||_75e;attr=_75e.attributes||{};if(_765){attr[_765]=_769;}if(_766){attr[_766]=_768;}_75e.setAttributes(attr);}}}if(_75c){var _76b=[];for(i=0;i<_75c.length;i++){_75c[i]=new _609(_75c[i]);if(_760){continue;}_75d=_75c[i];if(_75d.success){oid=_75d.objectId;_75e=mode._getFeature(oid);if(_75e){if(this._unSelectFeatureIIf(oid,mode)){_76b.push(_75e);}_75e._count=0;mode._removeFeatureIIf(oid);}}}if(_76b.length>0){this.onSelectionComplete(_76b,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_75a,_75b,_75c],"onEditsComplete",_758,dfd);},_sendAttachment:function(type,_76c,_76d,_76e,_76f){var _770=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_76c+"/"+_770,self=this;var dfd=_5f4({url:url,form:_76d,content:lang.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_771){var _772=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_773=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_774=new _609(_771[_772]);_774.attachmentId=_774.objectId;_774.objectId=_76c;self._resolve([_774],_773,_76e);return _774;}).addErrback(function(_775){self._resolve([_775],null,_76f,null,true);});return dfd;},_repaint:function(_776,oid,_777){oid=_5f3.isDefined(oid)?oid:_776.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_776.setSymbol(_776.symbol,_777);}},_getKind:function(_778){var _779=this._trackManager;if(_779){return _779.isLatestObservation(_778)?1:0;}return 0;}});lang.mixin(_60e,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});_603._createWrappers(_60e);if(has("extend-esri")){lang.setObject("layers.FeatureLayer",_60e,_5f2);}return _60e;});},"dijit/form/_ListMouseMixin":function(){define("dijit/form/_ListMouseMixin",["dojo/_base/declare","dojo/mouse","dojo/on","dojo/touch","./_ListBase"],function(_77a,_77b,on,_77c,_77d){return _77a("dijit.form._ListMouseMixin",_77d,{postCreate:function(){this.inherited(arguments);this.own(on(this.domNode,_77c.press,function(evt){evt.preventDefault();}));this._listConnect(_77c.press,"_onMouseDown");this._listConnect(_77c.release,"_onMouseUp");this._listConnect(_77b.enter,"_onMouseOver");this._listConnect(_77b.leave,"_onMouseOut");},_onMouseDown:function(evt,_77e){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}this._isDragging=true;this._setSelectedAttr(_77e);},_onMouseUp:function(evt,_77f){this._isDragging=false;var _780=this.selected;var _781=this._hoveredNode;if(_780&&_77f==_780){this.onClick(_780);}else{if(_781&&_77f==_781){this._setSelectedAttr(_781);this.onClick(_781);}}},_onMouseOut:function(evt,_782){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}if(this._isDragging){this._cancelDrag=(new Date()).getTime()+1000;}},_onMouseOver:function(evt,_783){if(this._cancelDrag){var time=(new Date()).getTime();if(time>this._cancelDrag){this._isDragging=false;}this._cancelDrag=null;}this._hoveredNode=_783;this.onHover(_783);if(this._isDragging){this._setSelectedAttr(_783);}}});});},"dojox/gfx/Moveable":function(){define("dojox/gfx/Moveable",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/event","dojo/topic","dojo/touch","dojo/dom-class","dojo/_base/window","./Mover","dojo/mouse"],function(lang,_784,arr,_785,_786,_787,_788,win,_789,_78a){return _784("dojox.gfx.Moveable",null,{constructor:function(_78b,_78c){this.shape=_78b;this.delay=(_78c&&_78c.delay>0)?_78c.delay:0;this.mover=(_78c&&_78c.mover)?_78c.mover:_789;this.leftButtonOnly=_78c&&_78c.leftButtonOnly;this.events=[this.shape.connect(_787.press,lang.hitch(this,"onMouseDown"))];},destroy:function(){arr.forEach(this.events,function(_78d){_78d.remove();});this.events=this.shape=null;},onMouseDown:function(e){if(this.delay){this.events.push(this.shape.connect(_787.move,lang.hitch(this,"onMouseMove")),this.shape.connect(_787.release,lang.hitch(this,"onMouseUp")));this._lastX=e.clientX;this._lastY=e.clientY;}else{if(!this.leftButtonOnly||_78a.isLeft(e)){new this.mover(this.shape,e,this);}}_785.stop(e);},onMouseMove:function(e){var _78e=e.clientX,_78f=e.clientY;if(Math.abs(_78e-this._lastX)>this.delay||Math.abs(_78f-this._lastY)>this.delay){this.onMouseUp(e);new this.mover(this.shape,e,this);}_785.stop(e);},onMouseUp:function(e){this.events.pop().remove();},onMoveStart:function(_790){_786.publish("/gfx/move/start",_790);_788.add(win.body(),"dojoMove");},onMoveStop:function(_791){_786.publish("/gfx/move/stop",_791);_788.remove(win.body(),"dojoMove");},onFirstMove:function(_792){},onMove:function(_793,_794){this.onMoving(_793,_794);this.shape.applyLeftTransform(_794);this.onMoved(_793,_794);},onMoving:function(_795,_796){},onMoved:function(_797,_798){}});});},"dijit/_editor/RichText":function(){define("dijit/_editor/RichText",["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/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/query","dojo/ready","dojo/sniff","dojo/topic","dojo/_base/unload","dojo/_base/url","dojo/_base/window","../_Widget","../_CssStateMixin","./selection","./range","./html","../focus","../main"],function(_799,_79a,_79b,_79c,dom,_79d,_79e,_79f,_7a0,_7a1,_7a2,_7a3,keys,lang,on,_7a4,_7a5,has,_7a6,_7a7,_7a8,win,_7a9,_7aa,_7ab,_7ac,_7ad,_7ae,_7af){var _7b0=_79b("dijit._editor.RichText",[_7a9,_7aa],{constructor:function(_7b1){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};if(_7b1&&lang.isString(_7b1.value)){this.value=_7b1.value;}this.onLoadDeferred=new _79c();},baseClass:"dijitEditor",inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"===this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");}this.contentPreFilters=[lang.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);if(has("mozilla")){this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters);this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters);}if(has("webkit")){this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters);this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters);}if(has("ie")){this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters);this.contentDomPostFilters=[lang.hitch(this,this._stripBreakerNodes)].concat(this.contentDomPostFilters);}this.inherited(arguments);_7a6.publish(_7af._scopeName+"._editor.RichText::init",this);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var exec=lang.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _7b2={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};if(!has("ie")){_7b2.Z=exec("redo");}var key;for(key in _7b2){this.addKeyHandler(key,true,false,_7b2[key]);}},events:["onKeyPress","onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(_7b0._editorCommandsLocalized){this._local2NativeFormatNames=_7b0._local2NativeFormatNames;this._native2LocalFormatNames=_7b0._native2LocalFormatNames;return;}_7b0._editorCommandsLocalized=true;_7b0._local2NativeFormatNames={};_7b0._native2LocalFormatNames={};this._local2NativeFormatNames=_7b0._local2NativeFormatNames;this._native2LocalFormatNames=_7b0._native2LocalFormatNames;var _7b3=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _7b4="",_7b5,i=0;while((_7b5=_7b3[i++])){if(_7b5.charAt(1)!=="l"){_7b4+="<"+_7b5+"><span>content</span></"+_7b5+"><br/>";}else{_7b4+="<"+_7b5+"><li>content</li></"+_7b5+"><br/>";}}var _7b6={position:"absolute",top:"0px",zIndex:10,opacity:0.01};var div=_79f.create("div",{style:_7b6,innerHTML:_7b4});this.ownerDocumentBody.appendChild(div);var _7b7=lang.hitch(this,function(){var node=div.firstChild;while(node){try{this._sCall("selectElement",[node.firstChild]);var _7b8=node.tagName.toLowerCase();this._local2NativeFormatNames[_7b8]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_7b8]]=_7b8;node=node.nextSibling.nextSibling;}catch(e){}}_79f.destroy(div);});this.defer(_7b7);},open:function(_7b9){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new _79c();}if(!this.isClosed){this.close();}_7a6.publish(_7af._scopeName+"._editor.RichText::open",this);if(arguments.length===1&&_7b9.nodeName){this.domNode=_7b9;}var dn=this.domNode;var html;if(lang.isString(this.value)){html=this.value;delete this.value;dn.innerHTML="";}else{if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;html=ta.value;dn=this.domNode=this.ownerDocument.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;_79f.place(dn,ta,"before");var _7ba=lang.hitch(this,function(){_7a1.set(ta,{display:"block",position:"absolute",top:"-1000px"});if(has("ie")){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(has("ie")){this.defer(_7ba,10);}else{_7ba();}if(ta.form){var _7bb=ta.value;this.reset=function(){var _7bc=this.getValue();if(_7bc!==_7bb){this.replaceValue(_7bb);}};on(ta.form,"submit",lang.hitch(this,function(){_79d.set(ta,"disabled",this.disabled);ta.value=this.getValue();}));}}else{html=_7ad.getChildrenHtml(dn);dn.innerHTML="";}}this.value=html;if(dn.nodeName&&dn.nodeName==="LI"){dn.innerHTML=" <br>";}this.header=dn.ownerDocument.createElement("div");dn.appendChild(this.header);this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);this.footer=dn.ownerDocument.createElement("div");dn.appendChild(this.footer);if(!this.name){this.name=this.id+"_AUTOGEN";}if(this.name!==""&&(!_79a["useXDomain"]||_79a["allowXdRichTextSave"])){var _7bd=dom.byId(_7af._scopeName+"._editor.RichText.value");if(_7bd&&_7bd.value!==""){var _7be=_7bd.value.split(this._SEPARATOR),i=0,dat;while((dat=_7be[i++])){var data=dat.split(this._NAME_CONTENT_SEP);if(data[0]===this.name){html=data[1];_7be=_7be.splice(i,1);_7bd.value=_7be.join(this._SEPARATOR);break;}}}if(!_7b0._globalSaveHandler){_7b0._globalSaveHandler={};_7a7.addOnUnload(function(){var id;for(id in _7b0._globalSaveHandler){var f=_7b0._globalSaveHandler[id];if(lang.isFunction(f)){f();}}});}_7b0._globalSaveHandler[this.id]=lang.hitch(this,"_saveContent");}this.isClosed=false;var ifr=(this.editorObject=this.iframe=this.ownerDocument.createElement("iframe"));ifr.id=this.id+"_iframe";ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(has("ie")>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=lang.hitch(this,function(w){this.window=w;this.document=this.window.document;if(has("ie")){this._localizeEditorCommands();}this.onLoad(html);});var src=this._getIframeDocTxt(),s="javascript: '"+src.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(has("safari")<=4){src=ifr.getAttribute("src");if(!src||src.indexOf("javascript")===-1){this.defer(function(){ifr.setAttribute("src",s);});}}if(dn.nodeName==="LI"){dn.lastChild.style.marginTop="-1.2em";}_79e.add(this.domNode,this.baseClass);},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _7bf=_7a1.getComputedStyle(this.domNode);var html="";var _7c0=true;if(has("ie")||has("webkit")||(!this.height&&!has("mozilla"))){html="<div id='dijitEditorBody'></div>";_7c0=false;}else{if(has("mozilla")){this._cursorToStart=true;html="&#160;";}}var font=[_7bf.fontWeight,_7bf.fontSize,_7bf.fontFamily].join(" ");var _7c1=_7bf.lineHeight;if(_7c1.indexOf("px")>=0){_7c1=parseFloat(_7c1)/parseFloat(_7bf.fontSize);}else{if(_7c1.indexOf("em")>=0){_7c1=parseFloat(_7c1);}else{_7c1="normal";}}var _7c2="";var self=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(_7c3){_7c3=_7c3.replace(/^;/ig,"")+";";var s=_7c3.split(":")[0];if(s){s=lang.trim(s);s=s.toLowerCase();var i;var sC="";for(i=0;i<s.length;i++){var c=s.charAt(i);switch(c){case "-":i++;c=s.charAt(i).toUpperCase();default:sC+=c;}}_7a1.set(self.domNode,sC,"");}_7c2+=_7c3+";";});var _7c4=_7a4("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html>\n<head>\n":"<html dir='rtl'>\n<head>\n",(has("mozilla")&&_7c4.length?"<title>"+_7c4[0].innerHTML+"</title>\n":""),"<meta http-equiv='Content-Type' content='text/html'>\n","<style>\n","\tbody,html {\n","\t\tbackground:transparent;\n","\t\tpadding: 1px 0 0 0;\n","\t\tmargin: -1px 0 0 0;\n",((has("webkit"))?"\t\twidth: 100%;\n":""),((has("webkit"))?"\t\theight: 100%;\n":""),"\t}\n","\tbody{\n","\t\ttop:0px;\n","\t\tleft:0px;\n","\t\tright:0px;\n","\t\tfont:",font,";\n",((this.height||has("opera"))?"":"\t\tposition: fixed;\n"),"\t\tmin-height:",this.minHeight,";\n","\t\tline-height:",_7c1,";\n","\t}\n","\tp{ margin: 1em 0; }\n",(!_7c0&&!this.height?"\tbody,html {overflow-y: hidden;}\n":""),"\t#dijitEditorBody{overflow-x: auto; overflow-y:"+(this.height?"auto;":"hidden;")+" outline: 0px;}\n","\tli > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; }\n",(!has("ie")?"\tli{ min-height:1.2em; }\n":""),"</style>\n",this._applyEditingAreaStyleSheets(),"\n","</head>\n<body ",(_7c0?"id='dijitEditorBody' ":""),"onload='frameElement && frameElement._loadFunc(window,document)' ","style='"+_7c2+"'>",html,"</body>\n</html>"].join("");},_applyEditingAreaStyleSheets:function(){var _7c5=[];if(this.styleSheets){_7c5=this.styleSheets.split(";");this.styleSheets="";}_7c5=_7c5.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_7c5[i++])){var _7c6=(new _7a8(win.global.location,url)).toString();this.editingAreaStyleSheets.push(_7c6);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_7c6+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _7a8(win.global.location,url)).toString();}if(_799.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.then(lang.hitch(this,function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _7c7=this.document.createElement("link");_7c7.rel="stylesheet";_7c7.type="text/css";_7c7.href=url;head.appendChild(_7c7);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _7a8(win.global.location,url)).toString();}var _7c8=_799.indexOf(this.editingAreaStyleSheets,url);if(_7c8===-1){return;}delete this.editingAreaStyleSheets[_7c8];_7a4("link:[href=\""+url+"\"]",this.window.document).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_7c9){_7c9=!!_7c9;this._set("disabled",_7c9);if(!this.isLoaded){return;}if(has("ie")||has("webkit")||has("opera")){var _7ca=has("ie")&&(this.isLoaded||!this.focusOnLoad);if(_7ca){this.editNode.unselectable="on";}this.editNode.contentEditable=!_7c9;if(_7ca){this.defer(function(){if(this.editNode){this.editNode.unselectable="off";}});}}else{try{this.document.designMode=(_7c9?"off":"on");}catch(e){return;}if(!_7c9&&this._mozSettingProps){var ps=this._mozSettingProps;var n;for(n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(html){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=_7ae.registerIframe(this.iframe);}if(!has("ie")&&!has("webkit")&&(this.height||has("mozilla"))){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _7cb=this;if(has("ie")){this.tabStop=_79f.create("div",{tabIndex:-1},this.editingArea);this.iframe.onfocus=function(){_7cb.editNode.setActive();};}}this.focusNode=this.editNode;var _7cc=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;_799.forEach(_7cc,function(item){this.connect(ap,item.toLowerCase(),item);},this);this.connect(ap,"onmouseup","onClick");if(has("ie")){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}else{this.connect(this.document,"onmousedown",function(){delete this._cursorToStart;});}if(has("webkit")){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");this.connect(this.document,"onmousedown",function(e){var t=e.target;if(t&&(t===this.document.body||t===this.document)){this.defer("placeCursorAtEnd");}});}if(has("ie")){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.set("disabled",this.disabled);var _7cd=lang.hitch(this,function(){this.setValue(html);if(this.onLoadDeferred){this.onLoadDeferred.resolve(true);}this.onDisplayChanged();if(this.focusOnLoad){_7a5(lang.hitch(this,"defer","focus",this.updateInterval));}this.value=this.getValue(true);});if(this.setValueDeferred){this.setValueDeferred.then(_7cd);}else{_7cd();}},onKeyDown:function(e){if(e.keyCode===keys.TAB&&this.isTabIndent){_7a2.stop(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(has("ie")){if(e.keyCode==keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===keys.BACKSPACE&&this.document.selection.type==="Control"){_7a2.stop(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}if(has("ff")){if(e.keyCode===keys.PAGE_UP||e.keyCode===keys.PAGE_DOWN){if(this.editNode.clientHeight>=this.editNode.scrollHeight){e.preventDefault();}}}return true;},onKeyUp:function(){},setDisabled:function(_7ce){_7a3.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.set("disabled",_7ce);},_setValueAttr:function(_7cf){this.setValue(_7cf);},_setDisableSpellCheckAttr:function(_7d0){if(this.document){_79d.set(this.document.body,"spellcheck",!_7d0);}else{this.onLoadDeferred.then(lang.hitch(this,function(){_79d.set(this.document.body,"spellcheck",!_7d0);}));}this._set("disableSpellCheck",_7d0);},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_7d1=this._keyHandlers[c],args=arguments;if(_7d1&&!e.altKey){_799.some(_7d1,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^(e.ctrlKey||e.metaKey))){if(!h.handler.apply(this,args)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=lang.hitch(this,"onKeyPressed");}this.defer("_onKeyHitch",1);return true;},addKeyHandler:function(key,ctrl,_7d2,_7d3){if(!lang.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_7d2||false,ctrl:ctrl||false,handler:_7d3});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(){if(!this.focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _7d4=this.getValue(true);if(_7d4!==this.value){this.onChange(_7d4);}this._set("value",_7d4);},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.set("disabled",false);}this.inherited(arguments);}},blur:function(){if(!has("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(this.ownerDocumentBody.focus){this.ownerDocumentBody.focus();}}},focus:function(){if(!this.isLoaded){this.focusOnLoad=true;return;}if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes){this.placeCursorAtStart();return;}}if(!has("ie")){_7ae.focus(this.iframe);}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(){if(this._updateTimer){this._updateTimer.remove();}this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(){},_normalizeCommand:function(cmd,_7d5){var _7d6=cmd.toLowerCase();if(_7d6==="formatblock"){if(has("safari")&&_7d5===undefined){_7d6="heading";}}else{if(_7d6==="hilitecolor"&&!has("mozilla")){_7d6="backcolor";}}return _7d6;},_qcaCache:{},queryCommandAvailable:function(_7d7){var ca=this._qcaCache[_7d7];if(ca!==undefined){return ca;}return (this._qcaCache[_7d7]=this._queryCommandAvailable(_7d7));},_queryCommandAvailable:function(_7d8){var ie=1;var _7d9=1<<1;var _7da=1<<2;var _7db=1<<3;function _7dc(_7dd){return {ie:Boolean(_7dd&ie),mozilla:Boolean(_7dd&_7d9),webkit:Boolean(_7dd&_7da),opera:Boolean(_7dd&_7db)};};var _7de=null;switch(_7d8.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":_7de=_7dc(_7d9|ie|_7da|_7db);break;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":_7de=_7dc(_7d9|ie|_7db|_7da);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_7de=_7dc(ie);break;case "cut":case "copy":case "paste":_7de=_7dc(ie|_7d9|_7da|_7db);break;case "inserttable":_7de=_7dc(_7d9|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_7de=_7dc(ie|_7d9);break;default:return false;}return (has("ie")&&_7de.ie)||(has("mozilla")&&_7de.mozilla)||(has("webkit")&&_7de.webkit)||(has("opera")&&_7de.opera);},execCommand:function(_7df,_7e0){var _7e1;this.focus();_7df=this._normalizeCommand(_7df,_7e0);if(_7e0!==undefined){if(_7df==="heading"){throw new Error("unimplemented");}else{if((_7df==="formatblock")&&has("ie")){_7e0="<"+_7e0+">";}}}var _7e2="_"+_7df+"Impl";if(this[_7e2]){_7e1=this[_7e2](_7e0);}else{_7e0=arguments.length>1?_7e0:null;if(_7e0||_7df!=="createlink"){_7e1=this.document.execCommand(_7df,false,_7e0);}}this.onDisplayChanged();return _7e1;},queryCommandEnabled:function(_7e3){if(this.disabled||!this._disabledOK){return false;}_7e3=this._normalizeCommand(_7e3);var _7e4="_"+_7e3+"EnabledImpl";if(this[_7e4]){return this[_7e4](_7e3);}else{return this._browserQueryCommandEnabled(_7e3);}},queryCommandState:function(_7e5){if(this.disabled||!this._disabledOK){return false;}_7e5=this._normalizeCommand(_7e5);try{return this.document.queryCommandState(_7e5);}catch(e){return false;}},queryCommandValue:function(_7e6){if(this.disabled||!this._disabledOK){return false;}var r;_7e6=this._normalizeCommand(_7e6);if(has("ie")&&_7e6==="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_7e6)];}else{if(has("mozilla")&&_7e6==="hilitecolor"){var _7e7;try{_7e7=this.document.queryCommandValue("styleWithCSS");}catch(e){_7e7=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_7e6);this.document.execCommand("styleWithCSS",false,_7e7);}else{r=this.document.queryCommandValue(_7e6);}}return r;},_sCall:function(name,args){return win.withGlobal(this.window,name,_7ab,args);},placeCursorAtStart:function(){this.focus();var _7e8=false;if(has("mozilla")){var _7e9=this.editNode.firstChild;while(_7e9){if(_7e9.nodeType===3){if(_7e9.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_7e8=true;this._sCall("selectElement",[_7e9]);break;}}else{if(_7e9.nodeType===1){_7e8=true;var tg=_7e9.tagName?_7e9.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_7e9]);}else{this._sCall("selectElementChildren",[_7e9]);}break;}}_7e9=_7e9.nextSibling;}}else{_7e8=true;this._sCall("selectElementChildren",[this.editNode]);}if(_7e8){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _7ea=false;if(has("mozilla")){var last=this.editNode.lastChild;while(last){if(last.nodeType===3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_7ea=true;this._sCall("selectElement",[last]);break;}}else{if(last.nodeType===1){_7ea=true;this._sCall("selectElement",[last.lastChild||last]);break;}}last=last.previousSibling;}}else{_7ea=true;this._sCall("selectElementChildren",[this.editNode]);}if(_7ea){this._sCall("collapse",[false]);}},getValue:function(_7eb){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_7eb);},_getValueAttr:function(){return this.getValue(true);},setValue:function(html){if(!this.isLoaded){this.onLoadDeferred.then(lang.hitch(this,function(){this.setValue(html);}));return;}this._cursorToStart=true;if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);var node=this.isClosed?this.domNode:this.editNode;if(html&&has("mozilla")&&html.toLowerCase()==="<p></p>"){html="<p>&#160;</p>";}if(!html&&has("webkit")){html="&#160;";}node.innerHTML=html;this._preDomFilterContent(node);}this.onDisplayChanged();this._set("value",this.getValue(true));},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!has("mozilla")){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(!html){this._cursorToStart=true;html="&#160;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}this._set("value",this.getValue(true));},_preFilterContent:function(html){var ec=html;_799.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;_799.forEach(this.contentDomPreFilters,function(ef){if(ef&&lang.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_7ec){var ec;if(!lang.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_7ec){dom=lang.clone(dom);}_799.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=_7ad.getChildrenHtml(dom);}else{ec=dom;}if(!lang.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}_799.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(){var _7ed=dom.byId(_7af._scopeName+"._editor.RichText.value");if(_7ed){if(_7ed.value){_7ed.value+=this._SEPARATOR;}_7ed.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(true);}},escapeXml:function(str,_7ee){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_7ee){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){_7a3.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",2);return _7ad.getNodeHtml(node);},getNodeChildrenHtml:function(dom){_7a3.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return _7ad.getChildrenHtml(dom);},close:function(save){if(this.isClosed){return;}if(!arguments.length){save=true;}if(save){this._set("value",this.getValue(true));}if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(has("ie")){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){this._iframeRegHandle.remove();delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(has("ie")){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=this.value;_79f.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=this.value;}delete this.iframe;_79e.remove(this.domNode,this.baseClass);this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;},destroy:function(){if(!this.isClosed){this.close(false);}if(this._updateTimer){this._updateTimer.remove();}this.inherited(arguments);if(_7b0._globalSaveHandler){delete _7b0._globalSaveHandler[this.id];}},_removeMozBogus:function(html){return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(html){html=html.replace(/\sclass="webkit-block-placeholder"/gi,"");html=html.replace(/\sclass="apple-style-span"/gi,"");html=html.replace(/<meta charset=\"utf-8\" \/>/gi,"");return html;},_normalizeFontStyle:function(html){return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(html){return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_browserQueryCommandEnabled:function(_7ef){if(!_7ef){return false;}var elem=has("ie")?this.document.selection.createRange():this.document;try{return elem.queryCommandEnabled(_7ef);}catch(e){return false;}},_createlinkEnabledImpl:function(){var _7f0=true;if(has("opera")){var sel=this.window.getSelection();if(sel.isCollapsed){_7f0=true;}else{_7f0=this.document.queryCommandEnabled("createlink");}}else{_7f0=this._browserQueryCommandEnabled("createlink");}return _7f0;},_unlinkEnabledImpl:function(){var _7f1=true;if(has("mozilla")||has("webkit")){_7f1=this._sCall("hasAncestorElement",["a"]);}else{_7f1=this._browserQueryCommandEnabled("unlink");}return _7f1;},_inserttableEnabledImpl:function(){var _7f2=true;if(has("mozilla")||has("webkit")){_7f2=true;}else{_7f2=this._browserQueryCommandEnabled("inserttable");}return _7f2;},_cutEnabledImpl:function(){var _7f3=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_7f3=!!sel;}else{_7f3=this._browserQueryCommandEnabled("cut");}return _7f3;},_copyEnabledImpl:function(){var _7f4=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_7f4=!!sel;}else{_7f4=this._browserQueryCommandEnabled("copy");}return _7f4;},_pasteEnabledImpl:function(){var _7f5=true;if(has("webkit")){return true;}else{_7f5=this._browserQueryCommandEnabled("paste");}return _7f5;},_inserthorizontalruleImpl:function(_7f6){if(has("ie")){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_7f6);},_unlinkImpl:function(_7f7){if((this.queryCommandEnabled("unlink"))&&(has("mozilla")||has("webkit"))){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_7f7);},_hilitecolorImpl:function(_7f8){var _7f9;var _7fa=this._handleTextColorOrProperties("hilitecolor",_7f8);if(!_7fa){if(has("mozilla")){this.document.execCommand("styleWithCSS",false,true);console.log("Executing color command.");_7f9=this.document.execCommand("hilitecolor",false,_7f8);this.document.execCommand("styleWithCSS",false,false);}else{_7f9=this.document.execCommand("hilitecolor",false,_7f8);}}return _7f9;},_backcolorImpl:function(_7fb){if(has("ie")){_7fb=_7fb?_7fb:null;}var _7fc=this._handleTextColorOrProperties("backcolor",_7fb);if(!_7fc){_7fc=this.document.execCommand("backcolor",false,_7fb);}return _7fc;},_forecolorImpl:function(_7fd){if(has("ie")){_7fd=_7fd?_7fd:null;}var _7fe=false;_7fe=this._handleTextColorOrProperties("forecolor",_7fd);if(!_7fe){_7fe=this.document.execCommand("forecolor",false,_7fd);}return _7fe;},_inserthtmlImpl:function(_7ff){_7ff=this._preFilterContent(_7ff);var rv=true;if(has("ie")){var _800=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()==="CONTROL"){var n=_800.item(0);while(_800.length){_800.remove(_800.item(0));}n.outerHTML=_7ff;}else{_800.pasteHTML(_7ff);}_800.select();}else{if(has("mozilla")&&!_7ff.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_7ff);}}return rv;},_boldImpl:function(_801){var _802=false;if(has("ie")){this._adaptIESelection();_802=this._adaptIEFormatAreaAndExec("bold");}if(!_802){_802=this.document.execCommand("bold",false,_801);}return _802;},_italicImpl:function(_803){var _804=false;if(has("ie")){this._adaptIESelection();_804=this._adaptIEFormatAreaAndExec("italic");}if(!_804){_804=this.document.execCommand("italic",false,_803);}return _804;},_underlineImpl:function(_805){var _806=false;if(has("ie")){this._adaptIESelection();_806=this._adaptIEFormatAreaAndExec("underline");}if(!_806){_806=this.document.execCommand("underline",false,_805);}return _806;},_strikethroughImpl:function(_807){var _808=false;if(has("ie")){this._adaptIESelection();_808=this._adaptIEFormatAreaAndExec("strikethrough");}if(!_808){_808=this.document.execCommand("strikethrough",false,_807);}return _808;},_superscriptImpl:function(_809){var _80a=false;if(has("ie")){this._adaptIESelection();_80a=this._adaptIEFormatAreaAndExec("superscript");}if(!_80a){_80a=this.document.execCommand("superscript",false,_809);}return _80a;},_subscriptImpl:function(_80b){var _80c=false;if(has("ie")){this._adaptIESelection();_80c=this._adaptIEFormatAreaAndExec("subscript");}if(!_80c){_80c=this.document.execCommand("subscript",false,_80b);}return _80c;},_fontnameImpl:function(_80d){var _80e;if(has("ie")){_80e=this._handleTextColorOrProperties("fontname",_80d);}if(!_80e){_80e=this.document.execCommand("fontname",false,_80d);}return _80e;},_fontsizeImpl:function(_80f){var _810;if(has("ie")){_810=this._handleTextColorOrProperties("fontsize",_80f);}if(!_810){_810=this.document.execCommand("fontsize",false,_80f);}return _810;},_insertorderedlistImpl:function(_811){var _812=false;if(has("ie")){_812=this._adaptIEList("insertorderedlist",_811);}if(!_812){_812=this.document.execCommand("insertorderedlist",false,_811);}return _812;},_insertunorderedlistImpl:function(_813){var _814=false;if(has("ie")){_814=this._adaptIEList("insertunorderedlist",_813);}if(!_814){_814=this.document.execCommand("insertunorderedlist",false,_813);}return _814;},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header);},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer);},_getNodeChildrenHeight:function(node){var h=0;if(node&&node.childNodes){var i;for(i=0;i<node.childNodes.length;i++){var size=_7a0.position(node.childNodes[i]);h+=size.h;}}return h;},_isNodeEmpty:function(node,_815){if(node.nodeType===1){if(node.childNodes.length>0){return this._isNodeEmpty(node.childNodes[0],_815);}return true;}else{if(node.nodeType===3){return (node.nodeValue.substring(_815)==="");}}return false;},_removeStartingRangeFromRange:function(node,_816){if(node.nextSibling){_816.setStart(node.nextSibling,0);}else{var _817=node.parentNode;while(_817&&_817.nextSibling==null){_817=_817.parentNode;}if(_817){_816.setStart(_817.nextSibling,0);}}return _816;},_adaptIESelection:function(){var _818=_7ac.getSelection(this.window);if(_818&&_818.rangeCount&&!_818.isCollapsed){var _819=_818.getRangeAt(0);var _81a=_819.startContainer;var _81b=_819.startOffset;while(_81a.nodeType===3&&_81b>=_81a.length&&_81a.nextSibling){_81b=_81b-_81a.length;_81a=_81a.nextSibling;}var _81c=null;while(this._isNodeEmpty(_81a,_81b)&&_81a!==_81c){_81c=_81a;_819=this._removeStartingRangeFromRange(_81a,_819);_81a=_819.startContainer;_81b=0;}_818.removeAllRanges();_818.addRange(_819);}},_adaptIEFormatAreaAndExec:function(_81d){var _81e=_7ac.getSelection(this.window);var doc=this.document;var rs,ret,_81f,txt,_820,_821,_822,_823;if(_81d&&_81e&&_81e.isCollapsed){var _824=this.queryCommandValue(_81d);if(_824){var _825=this._tagNamesForCommand(_81d);_81f=_81e.getRangeAt(0);var fs=_81f.startContainer;if(fs.nodeType===3){var _826=_81f.endOffset;if(fs.length<_826){ret=this._adjustNodeAndOffset(rs,_826);fs=ret.node;_826=ret.offset;}}var _827;while(fs&&fs!==this.editNode){var _828=fs.tagName?fs.tagName.toLowerCase():"";if(_799.indexOf(_825,_828)>-1){_827=fs;break;}fs=fs.parentNode;}if(_827){rs=_81f.startContainer;var _829=doc.createElement(_827.tagName);_79f.place(_829,_827,"after");if(rs&&rs.nodeType===3){var _82a,_82b;var _82c=_81f.endOffset;if(rs.length<_82c){ret=this._adjustNodeAndOffset(rs,_82c);rs=ret.node;_82c=ret.offset;}txt=rs.nodeValue;_820=doc.createTextNode(txt.substring(0,_82c));var _82d=txt.substring(_82c,txt.length);if(_82d){_821=doc.createTextNode(_82d);}_79f.place(_820,rs,"before");if(_821){_822=doc.createElement("span");_822.className="ieFormatBreakerSpan";_79f.place(_822,rs,"after");_79f.place(_821,_822,"after");_821=_822;}_79f.destroy(rs);var _82e=_820.parentNode;var _82f=[];var _830;while(_82e!==_827){var tg=_82e.tagName;_830={tagName:tg};_82f.push(_830);var _831=doc.createElement(tg);if(_82e.style){if(_831.style){if(_82e.style.cssText){_831.style.cssText=_82e.style.cssText;_830.cssText=_82e.style.cssText;}}}if(_82e.tagName==="FONT"){if(_82e.color){_831.color=_82e.color;_830.color=_82e.color;}if(_82e.face){_831.face=_82e.face;_830.face=_82e.face;}if(_82e.size){_831.size=_82e.size;_830.size=_82e.size;}}if(_82e.className){_831.className=_82e.className;_830.className=_82e.className;}if(_821){_82a=_821;while(_82a){_82b=_82a.nextSibling;_831.appendChild(_82a);_82a=_82b;}}if(_831.tagName==_82e.tagName){_822=doc.createElement("span");_822.className="ieFormatBreakerSpan";_79f.place(_822,_82e,"after");_79f.place(_831,_822,"after");}else{_79f.place(_831,_82e,"after");}_820=_82e;_821=_831;_82e=_82e.parentNode;}if(_821){_82a=_821;if(_82a.nodeType===1||(_82a.nodeType===3&&_82a.nodeValue)){_829.innerHTML="";}while(_82a){_82b=_82a.nextSibling;_829.appendChild(_82a);_82a=_82b;}}var _832;if(_82f.length){_830=_82f.pop();var _833=doc.createElement(_830.tagName);if(_830.cssText&&_833.style){_833.style.cssText=_830.cssText;}if(_830.className){_833.className=_830.className;}if(_830.tagName==="FONT"){if(_830.color){_833.color=_830.color;}if(_830.face){_833.face=_830.face;}if(_830.size){_833.size=_830.size;}}_79f.place(_833,_829,"before");while(_82f.length){_830=_82f.pop();var _834=doc.createElement(_830.tagName);if(_830.cssText&&_834.style){_834.style.cssText=_830.cssText;}if(_830.className){_834.className=_830.className;}if(_830.tagName==="FONT"){if(_830.color){_834.color=_830.color;}if(_830.face){_834.face=_830.face;}if(_830.size){_834.size=_830.size;}}_833.appendChild(_834);_833=_834;}_823=doc.createTextNode(".");_822.appendChild(_823);_833.appendChild(_823);_832=_7ac.create(this.window);_832.setStart(_823,0);_832.setEnd(_823,_823.length);_81e.removeAllRanges();_81e.addRange(_832);this._sCall("collapse",[false]);_823.parentNode.innerHTML="";}else{_822=doc.createElement("span");_822.className="ieFormatBreakerSpan";_823=doc.createTextNode(".");_822.appendChild(_823);_79f.place(_822,_829,"before");_832=_7ac.create(this.window);_832.setStart(_823,0);_832.setEnd(_823,_823.length);_81e.removeAllRanges();_81e.addRange(_832);this._sCall("collapse",[false]);_823.parentNode.innerHTML="";}if(!_829.firstChild){_79f.destroy(_829);}return true;}}return false;}else{_81f=_81e.getRangeAt(0);rs=_81f.startContainer;if(rs&&rs.nodeType===3){var _826=_81f.startOffset;if(rs.length<_826){ret=this._adjustNodeAndOffset(rs,_826);rs=ret.node;_826=ret.offset;}txt=rs.nodeValue;_820=doc.createTextNode(txt.substring(0,_826));var _82d=txt.substring(_826);if(_82d!==""){_821=doc.createTextNode(txt.substring(_826));}_822=doc.createElement("span");_823=doc.createTextNode(".");_822.appendChild(_823);if(_820.length){_79f.place(_820,rs,"after");}else{_820=rs;}_79f.place(_822,_820,"after");if(_821){_79f.place(_821,_822,"after");}_79f.destroy(rs);var _832=_7ac.create(this.window);_832.setStart(_823,0);_832.setEnd(_823,_823.length);_81e.removeAllRanges();_81e.addRange(_832);doc.execCommand(_81d);_79f.place(_822.firstChild,_822,"before");_79f.destroy(_822);_832.setStart(_823,0);_832.setEnd(_823,_823.length);_81e.removeAllRanges();_81e.addRange(_832);this._sCall("collapse",[false]);_823.parentNode.innerHTML="";return true;}}}else{return false;}},_adaptIEList:function(_835){var _836=_7ac.getSelection(this.window);if(_836.isCollapsed){if(_836.rangeCount&&!this.queryCommandValue(_835)){var _837=_836.getRangeAt(0);var sc=_837.startContainer;if(sc&&sc.nodeType==3){if(!_837.startOffset){var _838="ul";if(_835==="insertorderedlist"){_838="ol";}var list=this.document.createElement(_838);var li=_79f.create("li",null,list);_79f.place(list,sc,"before");li.appendChild(sc);_79f.create("br",null,list,"after");var _839=_7ac.create(this.window);_839.setStart(sc,0);_839.setEnd(sc,sc.length);_836.removeAllRanges();_836.addRange(_839);this._sCall("collapse",[true]);return true;}}}}return false;},_handleTextColorOrProperties:function(_83a,_83b){var _83c=_7ac.getSelection(this.window);var doc=this.document;var rs,ret,_83d,txt,_83e,_83f,_840,_841;_83b=_83b||null;if(_83a&&_83c&&_83c.isCollapsed){if(_83c.rangeCount){_83d=_83c.getRangeAt(0);rs=_83d.startContainer;if(rs&&rs.nodeType===3){var _842=_83d.startOffset;if(rs.length<_842){ret=this._adjustNodeAndOffset(rs,_842);rs=ret.node;_842=ret.offset;}txt=rs.nodeValue;_83e=doc.createTextNode(txt.substring(0,_842));var _843=txt.substring(_842);if(_843!==""){_83f=doc.createTextNode(txt.substring(_842));}_840=doc.createElement("span");_841=doc.createTextNode(".");_840.appendChild(_841);var _844=doc.createElement("span");_840.appendChild(_844);if(_83e.length){_79f.place(_83e,rs,"after");}else{_83e=rs;}_79f.place(_840,_83e,"after");if(_83f){_79f.place(_83f,_840,"after");}_79f.destroy(rs);var _845=_7ac.create(this.window);_845.setStart(_841,0);_845.setEnd(_841,_841.length);_83c.removeAllRanges();_83c.addRange(_845);if(has("webkit")){var _846="color";if(_83a==="hilitecolor"||_83a==="backcolor"){_846="backgroundColor";}_7a1.set(_840,_846,_83b);this._sCall("remove",[]);_79f.destroy(_844);_840.innerHTML="&#160;";this._sCall("selectElement",[_840]);this.focus();}else{this.execCommand(_83a,_83b);_79f.place(_840.firstChild,_840,"before");_79f.destroy(_840);_845.setStart(_841,0);_845.setEnd(_841,_841.length);_83c.removeAllRanges();_83c.addRange(_845);this._sCall("collapse",[false]);_841.parentNode.removeChild(_841);}return true;}}}return false;},_adjustNodeAndOffset:function(node,_847){while(node.length<_847&&node.nextSibling&&node.nextSibling.nodeType===3){_847=_847-node.length;node=node.nextSibling;}return {"node":node,"offset":_847};},_tagNamesForCommand:function(_848){if(_848==="bold"){return ["b","strong"];}else{if(_848==="italic"){return ["i","em"];}else{if(_848==="strikethrough"){return ["s","strike"];}else{if(_848==="superscript"){return ["sup"];}else{if(_848==="subscript"){return ["sub"];}else{if(_848==="underline"){return ["u"];}}}}}}return [];},_stripBreakerNodes:function(node){if(!this.isLoaded){return;}_7a4(".ieFormatBreakerSpan",node).forEach(function(b){while(b.firstChild){_79f.place(b.firstChild,b,"before");}_79f.destroy(b);});return node;}});return _7b0;});},"dojox/html/metrics":function(){define("dojox/html/metrics",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","dojo/ready","dojo/_base/unload","dojo/_base/window","dojo/dom-geometry"],function(_849,lang,has,_84a,_84b,_84c,_84d){var dhm=lang.getObject("dojox.html.metrics",true);var _84e=lang.getObject("dojox");dhm.getFontMeasurements=function(){var _84f={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(has("ie")){_84c.doc.documentElement.style.fontSize="100%";}var div=_84c.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";_84c.body().appendChild(div);for(var p in _84f){ds.fontSize=p;_84f[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}_84c.body().removeChild(div);div=null;return _84f;};var _850=null;dhm.getCachedFontMeasurements=function(_851){if(_851||!_850){_850=dhm.getFontMeasurements();}return _850;};var _852=null,_853={};dhm.getTextBox=function(text,_854,_855){var m,s;if(!_852){m=_852=_84c.doc.createElement("div");var c=_84c.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";_84c.body().appendChild(c);}else{m=_852;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_854){for(var i in _854){if(i in _853){continue;}s[i]=_854[i];}}if(arguments.length>2&&_855){m.className=_855;}m.innerHTML=text;var box=_84d.position(m);box.w=m.parentNode.scrollWidth;return box;};var _856={w:16,h:16};dhm.getScrollbar=function(){return {w:_856.w,h:_856.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_857){var f=dhm._fontResizeNode=_84c.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";fs.display="none";if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[_84e._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[_84e._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");_84c.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};_84b.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(has("ie")&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});_84a(function(){try{var n=_84c.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";_84c.body().appendChild(n);_856.w=n.offsetWidth-n.clientWidth;_856.h=n.offsetHeight-n.clientHeight;_84c.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in _849.config&&!!_849.config.fontSizeWatch){dhm.initOnFontResize();}});return dhm;});},"esri/layers/SelectionMode":function(){define("esri/layers/SelectionMode",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/layers/RenderMode"],function(_858,lang,has,_859,_85a){var _85b=_858([_85a],{declaredClass:"esri.layers._SelectionMode",constructor:function(_85c){this.featureLayer=_85c;this._featureMap={};},propertyChangeHandler:function(type){if(this._init&&type===0){this._applyTimeFilter();}},resume:function(){this.propertyChangeHandler(0);}});if(has("extend-esri")){lang.setObject("layers._SelectionMode",_85b,_859);}return _85b;});},"dojox/grid/_EditManager":function(){define("dojox/grid/_EditManager",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/sniff","./util"],function(lang,_85d,_85e,_85f,has,util){return _85e("dojox.grid._EditManager",null,{constructor:function(_860){this.grid=_860;if(has("ie")){this.connections=[_85f.connect(document.body,"onfocus",lang.hitch(this,"_boomerangFocus"))];}else{this.connections=[_85f.connect(this.grid,"onBlur",this,"apply")];}},info:{},destroy:function(){_85d.forEach(this.connections,_85f.disconnect);},cellFocus:function(_861,_862){if(this.grid.singleClickEdit||this.isEditRow(_862)){this.setEditCell(_861,_862);}else{this.apply();}if(this.isEditing()||(_861&&_861.editable&&_861.alwaysEditing)){this._focusEditor(_861,_862);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(_863){if(_863.index==this.info.rowIndex){_863.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_864,_865){return (this.info.rowIndex===_864)&&(this.info.cell.index==_865);},isEditRow:function(_866){return this.info.rowIndex===_866;},setEditCell:function(_867,_868){if(!this.isEditCell(_868,_867.index)&&this.grid.canEdit&&this.grid.canEdit(_867,_868)){this.start(_867,_868,this.isEditRow(_868)||_867.editable);}},_focusEditor:function(_869,_86a){util.fire(_869,"focus",[_86a]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(has("ie")){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_86b,_86c,_86d){if(!this._isValidInput()){return;}this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_86c)){this.applyRowEdit();this.grid.updateRow(_86c);}if(_86d){this.info={cell:_86b,rowIndex:_86c};this.grid.doStartEdit(_86b,_86c);this.grid.updateRow(_86c);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_86b,_86c);this._doCatchBoomerang();},_editorDo:function(_86e){var c=this.info.cell;if(c&&c.editable){c[_86e](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_86f,_870,_871){if(this.grid.canEdit(_870,_871)){this.grid.doApplyCellEdit(_86f,_871,_870.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()&&this._isValidInput()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_872,_873){var c=this.info.cell;if(this.isEditRow(_872)&&(!_873||c.view==_873)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_874,_875){var c=this.info.cell;if(this.isEditRow(_875)&&c.view==_874&&c.editable){c.restore(this.info.rowIndex);}},_isValidInput:function(){var w=(this.info.cell||{}).widget;if(!w||!w.isValid){return true;}w.focused=true;return w.isValid(true);}});});},"dijit/form/_AutoCompleterMixin":function(){define("dijit/form/_AutoCompleterMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/dom-attr","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/regexp","dojo/sniff","dojo/string","./DataList","../registry","./_TextBoxMixin","./_SearchMixin"],function(_876,_877,_878,_879,keys,lang,_87a,_87b,has,_87c,_87d,_87e,_87f,_880){return _877("dijit.form._AutoCompleterMixin",_880,{item:null,autoComplete:true,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(_881){var pos=0;if(typeof (_881.selectionStart)=="number"){pos=_881.selectionStart;}else{if(has("ie")){var tr=_881.ownerDocument.selection.createRange().duplicate();var ntr=_881.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);pos=String(ntr.text).replace(/\r/g,"").length;}catch(e){}}}return pos;},_setCaretPos:function(_882,_883){_883=parseInt(_883);_87f.selectInputText(_882,_883,_883);},_setDisabledAttr:function(_884){this.inherited(arguments);this.domNode.setAttribute("aria-disabled",_884?"true":"false");},_onKey:function(evt){if(evt.charCode>=32){return;}var key=evt.charCode||evt.keyCode;if(key==keys.ALT||key==keys.CTRL||key==keys.META||key==keys.SHIFT){return;}var pw=this.dropDown;var _885=null;this._abortQuery();this.inherited(arguments);if(evt.altKey||evt.ctrlKey||evt.metaKey){return;}if(this._opened){_885=pw.getHighlightedOption();}switch(key){case keys.PAGE_DOWN:case keys.DOWN_ARROW:case keys.PAGE_UP:case keys.UP_ARROW:if(this._opened){this._announceOption(_885);}_879.stop(evt);break;case keys.ENTER:if(_885){if(_885==pw.nextButton){this._nextSearch(1);_879.stop(evt);break;}else{if(_885==pw.previousButton){this._nextSearch(-1);_879.stop(evt);break;}}_879.stop(evt);}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length);}case keys.TAB:var _886=this.get("displayedValue");if(pw&&(_886==pw._messages["previousMessage"]||_886==pw._messages["nextMessage"])){break;}if(_885){this._selectOption(_885);}case keys.ESCAPE:if(this._opened){this._lastQuery=null;this.closeDropDown();}break;}},_autoCompleteText:function(text){var fn=this.focusNode;_87f.selectInputText(fn,fn.value.length);var _887=this.ignoreCase?"toLowerCase":"substr";if(text[_887](0).indexOf(this.focusNode.value[_887](0))==0){var cpos=this.autoComplete?this._getCaretPos(fn):fn.value.length;if((cpos+1)>fn.value.length){fn.value=text;_87f.selectInputText(fn,cpos);}}else{fn.value=text;_87f.selectInputText(fn);}},_openResultList:function(_888,_889,_88a){var _88b=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();if(!_888.length&&_88a.start==0){this.closeDropDown();return;}this._nextSearch=this.dropDown.onPage=lang.hitch(this,function(_88c){_888.nextPage(_88c!==-1);this.focus();});this.dropDown.createOptions(_888,_88a,lang.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if("direction" in _88a){if(_88a.direction){this.dropDown.highlightFirstOption();}else{if(!_88a.direction){this.dropDown.highlightLastOption();}}if(_88b){this._announceOption(this.dropDown.getHighlightedOption());}}else{if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_889[this.searchAttr].toString())){this._announceOption(this.dropDown.containerNode.firstChild.nextSibling);}}},_showResultList:function(){this.closeDropDown(true);this.openDropDown();this.domNode.setAttribute("aria-expanded","true");},loadDropDown:function(){this._startSearchAll();},isLoaded:function(){return false;},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);this.domNode.setAttribute("aria-expanded","false");this.focusNode.removeAttribute("aria-activedescendant");}},_setBlurValue:function(){var _88d=this.get("displayedValue");var pw=this.dropDown;if(pw&&(_88d==pw._messages["previousMessage"]||_88d==pw._messages["nextMessage"])){this._setValueAttr(this._lastValueReported,true);}else{if(typeof this.item=="undefined"){this.item=null;this.set("displayedValue",_88d);}else{if(this.value!=this._lastValueReported){this._handleOnChange(this.value,true);}this._refreshState();}}},_setItemAttr:function(item,_88e,_88f){var _890="";if(item){if(!_88f){_88f=this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr];}_890=this._getValueField()!=this.searchAttr?this.store.getIdentity(item):_88f;}this.set("value",_890,_88e,_88f,item);},_announceOption:function(node){if(!node){return;}var _891;if(node==this.dropDown.nextButton||node==this.dropDown.previousButton){_891=node.innerHTML;this.item=undefined;this.value="";}else{var item=this.dropDown.items[node.getAttribute("item")];_891=(this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr]).toString();this.set("item",item,false,_891);}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",_878.get(node,"id"));this._autoCompleteText(_891);},_selectOption:function(_892){this.closeDropDown();if(_892){this._announceOption(_892);}this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,true);},_startSearchAll:function(){this._startSearch("");},_startSearchFromInput:function(){this.item=undefined;this.inherited(arguments);},_startSearch:function(key){if(!this.dropDown){var _893=this.id+"_popup",_894=lang.isString(this.dropDownClass)?lang.getObject(this.dropDownClass,false):this.dropDownClass;this.dropDown=new _894({onChange:lang.hitch(this,this._selectOption),id:_893,dir:this.dir,textDir:this.textDir});this.focusNode.removeAttribute("aria-activedescendant");this.textbox.setAttribute("aria-owns",_893);}this._lastInput=key;this.inherited(arguments);},_getValueField:function(){return this.searchAttr;},postMixInProperties:function(){this.inherited(arguments);if(!this.store){var _895=this.srcNodeRef;this.store=new _87d({},_895);if(!("value" in this.params)){var item=(this.item=this.store.fetchSelectedItem());if(item){var _896=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(item,_896):item[_896];}}}},postCreate:function(){var _897=_87a("label[for=\""+this.id+"\"]");if(_897.length){if(!_897[0].id){_897[0].id=this.id+"_label";}this.domNode.setAttribute("aria-labelledby",_897[0].id);}this.inherited(arguments);this.connect(this,"onSearch","_openResultList");},_getMenuLabelFromItem:function(item){var _898=this.labelFunc(item,this.store),_899=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){_898=this.doHighlight(_898,this._lastInput);_899="html";}return {html:_899=="html",label:_898};},doHighlight:function(_89a,find){var _89b=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),i=this.queryExpr.indexOf("${0}");find=_87b.escapeString(find);return this._escapeHtml(_89a.replace(new RegExp((i==0?"^":"")+"("+find+")"+(i==(this.queryExpr.length-4)?"$":""),_89b),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,"<span class=\"dijitComboBoxHighlightMatch\">$1</span>");},_escapeHtml:function(str){str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");return str;},reset:function(){this.item=null;this.inherited(arguments);},labelFunc:function(item,_89c){return (_89c._oldAPI?_89c.getValue(item,this.labelAttr||this.searchAttr):item[this.labelAttr||this.searchAttr]).toString();},_setValueAttr:function(_89d,_89e,_89f,item){this._set("item",item||null);if(_89d==null){_89d="";}this.inherited(arguments);},_setTextDirAttr:function(_8a0){this.inherited(arguments);if(this.dropDown){this.dropDown._set("textDir",_8a0);}}});});},"esri/layers/TrackManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/graphic","esri/geometry/Polyline","esri/layers/GraphicsLayer"],function(_8a1,lang,_8a2,has,_8a3,_8a4,_8a5,_8a6){var _8a7=_8a1(null,{declaredClass:"esri.layers._TrackManager",constructor:function(_8a8){this.layer=_8a8;this.trackMap={};},initialize:function(map){this.map=map;var _8a9=this.layer,_8aa=_8a9.renderer.trackRenderer;if(_8aa&&(_8a9.geometryType==="esriGeometryPoint")){var _8ab=(this.container=new _8a6._GraphicsLayer({id:_8a9.id+"_tracks",_child:true}));_8ab.loaded=true;_8ab.onLoad(_8ab);_8ab._setMap(map,_8a9._div);_8ab.setRenderer(_8aa);}},addFeatures:function(_8ac){var tkid,_8ad=this.trackMap,_8ae=this.layer,_8af=_8ae._trackIdField;_8a2.forEach(_8ac,function(_8b0){var _8b1=_8b0.attributes;tkid=_8b1[_8af];var ary=(_8ad[tkid]=(_8ad[tkid]||[]));ary.push(_8b0);});var _8b2=_8ae._startTimeField,_8b3=_8ae.objectIdField;var _8b4=function(a,b){var _8b5=a.attributes[_8b2],_8b6=b.attributes[_8b2];if(_8b5===_8b6){return (a.attributes[_8b3]<b.attributes[_8b3])?-1:1;}else{return (_8b5<_8b6)?-1:1;}};for(tkid in _8ad){_8ad[tkid].sort(_8b4);}},drawTracks:function(){var _8b7=this.container;if(!_8b7){return;}var _8b8=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_8b9,_8ba=this.layer._trackIdField,_8bb;for(tkid in _8b8){ary=_8b8[tkid];path=[];for(i=ary.length-1;i>=0;i--){_8b9=ary[i].geometry;if(_8b9){path.push([_8b9.x,_8b9.y]);}}_8bb={};_8bb[_8ba]=tkid;if(path.length>0){_8b7.add(new _8a4(new _8a5({paths:[path],spatialReference:sr}),null,_8bb));}}},moveLatestToFront:function(){_8a2.forEach(this.getLatestObservations(),function(_8bc){var _8bd=_8bc._shape;_8bd&&_8bd._moveToFront();this._repaint(_8bc,null,true);},this.layer);},getLatestObservations:function(){var _8be=[];if(!this.layer.renderer.latestObservationRenderer){return _8be;}var _8bf=this.trackMap,tkid;for(tkid in _8bf){var ary=_8bf[tkid];_8be.push(ary[ary.length-1]);}return _8be;},clearTracks:function(){var _8c0=this.getLatestObservations();this.trackMap={};var _8c1=this.container;if(_8c1){_8c1.clear();}_8a2.forEach(_8c0,function(_8c2){this._repaint(_8c2,null,true);},this.layer);},isLatestObservation:function(_8c3){var _8c4=this.layer._trackIdField;var _8c5=this.trackMap[_8c3.attributes[_8c4]];if(_8c5){return (_8c5[_8c5.length-1]===_8c3);}return false;},destroy:function(){var _8c6=this.container;if(_8c6){_8c6.clear();_8c6._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});if(has("extend-esri")){lang.setObject("layers._TrackManager",_8a7,_8a3);}return _8a7;});},"esri/dijit/editing/tools/ToolBase":function(){define("esri/dijit/editing/tools/ToolBase",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","dojo/i18n!esri/nls/jsapi"],function(_8c7,lang,has,_8c8,_8c9){var _8ca=_8c7(null,{declaredClass:"esri.dijit.editing.tools.ToolBase",_enabled:true,showLabel:false,constructor:function(_8cb,_8cc){_8cb=_8cb||{};lang.mixin(this,_8cb);this.label=this._label?_8c9.widgets.editor.tools[this._label]:"";this._settings=_8cb.settings;this._toolbar=_8cb.settings.drawToolbar;this._editToolbar=_8cb.settings.editToolbar;this._initializeTool();},onFinished:function(){},onDrawEnd:function(){},onApplyEdits:function(){},postCreate:function(){this.deactivate();this.inherited(arguments);},destroy:function(){},activate:function(_8cd){if(this._toolbar){this._toolbar.deactivate();}if(this._editToolbar){this._editToolbar.deactivate();}if(!this._enabled){return;}this._checked=true;this._layer=_8cd;if(this._toolbar&&this._drawType){this._toolbar.activate(this._drawType);}},deactivate:function(){if(this._toolbar){this._toolbar.deactivate();}if(this._editToolbar){this._editToolbar.deactivate();}this.setChecked(false);this._updateUI();},setEnabled:function(_8ce){this._enabled=_8ce;this._updateUI();},setChecked:function(_8cf){this._checked=_8cf;},enable:function(_8d0){this._updateUI();},isEnabled:function(){return this._enabled;},getToolName:function(){return this._toolName;},_initializeTool:function(){},_updateUI:function(){this.disabled=!this._enabled;this.attr("iconClass",this._enabled?this._enabledIcon:this._disabledIcon);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.ToolBase",_8ca,_8c8);}return _8ca;});},"esri/dijit/editing/tools/MenuItemBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/MenuItem","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_8d1,lang,has,_8d2,_8d3,_8d4){var MIB=_8d1([_8d2,_8d3],{declaredClass:"esri.dijit.editing.tools.MenuItemBase",destroy:function(){_8d2.prototype.destroy.apply(this,arguments);_8d3.prototype.destroy.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.MenuItemBase",MIB,_8d4);}return MIB;});},"dojox/date/islamic":function(){define("dojox/date/islamic",["..","dojo/_base/lang","dojo/date","./islamic/Date"],function(_8d5,lang,dd,_8d6){var _8d7=lang.getObject("date.islamic",true,_8d5);_8d7.getDaysInMonth=function(_8d8){return _8d8.getDaysInIslamicMonth(_8d8.getMonth(),_8d8.getFullYear());};_8d7.compare=function(_8d9,_8da,_8db){if(_8d9 instanceof _8d6){_8d9=_8d9.toGregorian();}if(_8da instanceof _8d6){_8da=_8da.toGregorian();}return dd.compare.apply(null,arguments);};_8d7.add=function(date,_8dc,_8dd){var _8de=new _8d6(date);switch(_8dc){case "day":_8de.setDate(date.getDate()+_8dd);break;case "weekday":var day=date.getDay();if(((day+_8dd)<5)&&((day+_8dd)>0)){_8de.setDate(date.getDate()+_8dd);}else{var _8df=0,_8e0=0;if(day==5){day=4;_8e0=(_8dd>0)?-1:1;}else{if(day==6){day=4;_8e0=(_8dd>0)?-2:2;}}var add=(_8dd>0)?(5-day-1):-day;var _8e1=_8dd-add;var div=parseInt(_8e1/5);if(_8e1%5!=0){_8df=(_8dd>0)?2:-2;}_8df=_8df+div*7+_8e1%5+add;_8de.setDate(date.getDate()+_8df+_8e0);}break;case "year":_8de.setFullYear(date.getFullYear()+_8dd);break;case "week":_8dd*=7;_8de.setDate(date.getDate()+_8dd);break;case "month":var _8e2=date.getMonth();_8de.setMonth(_8e2+_8dd);break;case "hour":_8de.setHours(date.getHours()+_8dd);break;case "minute":_8de._addMinutes(_8dd);break;case "second":_8de._addSeconds(_8dd);break;case "millisecond":_8de._addMilliseconds(_8dd);break;}return _8de;};_8d7.difference=function(_8e3,_8e4,_8e5){_8e4=_8e4||new _8d6();_8e5=_8e5||"day";var _8e6=_8e4.getFullYear()-_8e3.getFullYear();var _8e7=1;switch(_8e5){case "weekday":var days=Math.round(_8d7.difference(_8e3,_8e4,"day"));var _8e8=parseInt(_8d7.difference(_8e3,_8e4,"week"));var mod=days%7;if(mod==0){days=_8e8*5;}else{var adj=0;var aDay=_8e3.getDay();var bDay=_8e4.getDay();_8e8=parseInt(days/7);mod=days%7;var _8e9=new _8d6(_8e3);_8e9.setDate(_8e9.getDate()+(_8e8*7));var _8ea=_8e9.getDay();if(days>0){switch(true){case aDay==5:adj=-1;break;case aDay==6:adj=0;break;case bDay==5:adj=-1;break;case bDay==6:adj=-2;break;case (_8ea+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==5:adj=0;break;case aDay==6:adj=1;break;case bDay==5:adj=2;break;case bDay==6:adj=1;break;case (_8ea+mod)<0:adj=2;}}}days+=adj;days-=(_8e8*2);}_8e7=days;break;case "year":_8e7=_8e6;break;case "month":var _8eb=(_8e4.toGregorian()>_8e3.toGregorian())?_8e4:_8e3;var _8ec=(_8e4.toGregorian()>_8e3.toGregorian())?_8e3:_8e4;var _8ed=_8eb.getMonth();var _8ee=_8ec.getMonth();if(_8e6==0){_8e7=_8eb.getMonth()-_8ec.getMonth();}else{_8e7=12-_8ee;_8e7+=_8ed;var i=_8ec.getFullYear()+1;var e=_8eb.getFullYear();for(i;i<e;i++){_8e7+=12;}}if(_8e4.toGregorian()<_8e3.toGregorian()){_8e7=-_8e7;}break;case "week":_8e7=parseInt(_8d7.difference(_8e3,_8e4,"day")/7);break;case "day":_8e7/=24;case "hour":_8e7/=60;case "minute":_8e7/=60;case "second":_8e7/=1000;case "millisecond":_8e7*=_8e4.toGregorian().getTime()-_8e3.toGregorian().getTime();}return Math.round(_8e7);};return _8d7;});},"dojo/DeferredList":function(){define(["./_base/kernel","./_base/Deferred","./_base/array"],function(dojo,_8ef,_8f0){dojo.DeferredList=function(list,_8f1,_8f2,_8f3,_8f4){var _8f5=[];_8ef.call(this);var self=this;if(list.length===0&&!_8f1){this.resolve([0,[]]);}var _8f6=0;_8f0.forEach(list,function(item,i){item.then(function(_8f7){if(_8f1){self.resolve([i,_8f7]);}else{_8f8(true,_8f7);}},function(_8f9){if(_8f2){self.reject(_8f9);}else{_8f8(false,_8f9);}if(_8f3){return null;}throw _8f9;});function _8f8(_8fa,_8fb){_8f5[i]=[_8fa,_8fb];_8f6++;if(_8f6===list.length){self.resolve(_8f5);}};});};dojo.DeferredList.prototype=new _8ef();dojo.DeferredList.prototype.gatherResults=function(_8fc){var d=new dojo.DeferredList(_8fc,false,true,false);d.addCallback(function(_8fd){var ret=[];_8f0.forEach(_8fd,function(_8fe){ret.push(_8fe[1]);});return ret;});return d;};return dojo.DeferredList;});},"dijit/CheckedMenuItem":function(){require({cache:{"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n"}});define("dijit/CheckedMenuItem",["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(_8ff,_900,_901,_902){return _8ff("dijit.CheckedMenuItem",_901,{templateString:_902,checked:false,_setCheckedAttr:function(_903){_900.toggle(this.domNode,"dijitCheckedMenuItemChecked",_903);this.domNode.setAttribute("aria-checked",_903?"true":"false");this._set("checked",_903);},iconClass:"",onChange:function(){},_onClick:function(evt){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.onClick(evt);}});});},"dijit/Menu":function(){define("dijit/Menu",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/event","dojo/dom","dojo/dom-attr","dojo/dom-geometry","dojo/dom-style","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window","dojo/window","./popup","./DropDownMenu","dojo/ready"],function(_904,_905,_906,_907,dom,_908,_909,_90a,keys,lang,on,has,win,_90b,pm,_90c,_90d){if(has("dijit-legacy-requires")){_90d(0,function(){var _90e=["dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"];_904(_90e);});}return _906("dijit.Menu",_90c,{constructor:function(){this._bindings=[];},targetNodeIds:[],selector:"",contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(this.ownerDocumentBody);}else{_905.forEach(this.targetNodeIds,this.bindDomNode,this);}this.inherited(arguments);},_iframeContentWindow:function(_90f){return _90b.get(this._iframeContentDocument(_90f))||this._iframeContentDocument(_90f)["__parent__"]||(_90f.name&&win.doc.frames[_90f.name])||null;},_iframeContentDocument:function(_910){return _910.contentDocument||(_910.contentWindow&&_910.contentWindow.document)||(_910.name&&win.doc.frames[_910.name]&&win.doc.frames[_910.name].document)||null;},bindDomNode:function(node){node=dom.byId(node,this.ownerDocument);var cn;if(node.tagName.toLowerCase()=="iframe"){var _911=node,_912=this._iframeContentWindow(_911);cn=win.body(_912.document);}else{cn=(node==win.body(this.ownerDocument)?this.ownerDocument.documentElement:node);}var _913={node:node,iframe:_911};_908.set(node,"_dijitMenu"+this.id,this._bindings.push(_913));var _914=lang.hitch(this,function(cn){var _915=this.selector,_916=_915?function(_917){return on.selector(_915,_917);}:function(_918){return _918;},self=this;return [on(cn,_916(this.leftClickToOpen?"click":"contextmenu"),function(evt){_907.stop(evt);self._scheduleOpen(this,_911,{x:evt.pageX,y:evt.pageY});}),on(cn,_916("keydown"),function(evt){if(evt.shiftKey&&evt.keyCode==keys.F10){_907.stop(evt);self._scheduleOpen(this,_911);}})];});_913.connects=cn?_914(cn):[];if(_911){_913.onloadHandler=lang.hitch(this,function(){var _919=this._iframeContentWindow(_911);cn=win.body(_919.document);_913.connects=_914(cn);});if(_911.addEventListener){_911.addEventListener("load",_913.onloadHandler,false);}else{_911.attachEvent("onload",_913.onloadHandler);}}},unBindDomNode:function(_91a){var node;try{node=dom.byId(_91a,this.ownerDocument);}catch(e){return;}var _91b="_dijitMenu"+this.id;if(node&&_908.has(node,_91b)){var bid=_908.get(node,_91b)-1,b=this._bindings[bid],h;while((h=b.connects.pop())){h.remove();}var _91c=b.iframe;if(_91c){if(_91c.removeEventListener){_91c.removeEventListener("load",b.onloadHandler,false);}else{_91c.detachEvent("onload",b.onloadHandler);}}_908.remove(node,_91b);delete this._bindings[bid];}},_scheduleOpen:function(_91d,_91e,_91f){if(!this._openTimer){this._openTimer=this.defer(function(){delete this._openTimer;this._openMyself({target:_91d,iframe:_91e,coords:_91f});},1);}},_openMyself:function(args){var _920=args.target,_921=args.iframe,_922=args.coords;this.currentTarget=_920;if(_922){if(_921){var ifc=_909.position(_921,true),_923=this._iframeContentWindow(_921),_924=_909.docScroll(_923.document);var cs=_90a.getComputedStyle(_921),tp=_90a.toPixelValue,left=(has("ie")&&has("quirks")?0:tp(_921,cs.paddingLeft))+(has("ie")&&has("quirks")?tp(_921,cs.borderLeftWidth):0),top=(has("ie")&&has("quirks")?0:tp(_921,cs.paddingTop))+(has("ie")&&has("quirks")?tp(_921,cs.borderTopWidth):0);_922.x+=ifc.x+left-_924.x;_922.y+=ifc.y+top-_924.y;}}else{_922=_909.position(_920,true);_922.x+=10;_922.y+=10;}var self=this;var _925=this._focusManager.get("prevNode");var _926=this._focusManager.get("curNode");var _927=!_926||(dom.isDescendant(_926,this.domNode))?_925:_926;function _928(){if(self.refocus&&_927){_927.focus();}pm.close(self);};pm.open({popup:this,x:_922.x,y:_922.y,onExecute:_928,onCancel:_928,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);pm.close(this);};},destroy:function(){_905.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});});},"esri/layers/GridLayout":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/SpatialReference","esri/geometry/Extent","esri/geometry/Polyline"],function(_929,lang,_92a,has,_92b,_92c,_92d,_92e){var _92f=_929(null,{declaredClass:"esri.layers._GridLayout",constructor:function(_930,_931,_932,_933){this.origin=_930;this.cellWidth=_931.width;this.cellHeight=_931.height;this.mapWidth=_932.width;this.mapHeight=_932.height;this.srInfo=_933;},setResolution:function(_934){this._resolution=(_934.xmax-_934.xmin)/this.mapWidth;if(this.srInfo){var _935=Math.round((2*this.srInfo.valid[1])/this._resolution),_936=Math.round(_935/this.cellWidth);this._frameStats=[_936,0,_936-1];}},getCellCoordinates:function(_937){var res=this._resolution,_938=this.origin;return {row:Math.floor((_938.y-_937.y)/(this.cellHeight*res)),col:Math.floor((_937.x-_938.x)/(this.cellWidth*res))};},normalize:function(col){var _939=this._frameStats;if(_939){var _93a=_939[0],m180=_939[1],p180=_939[2];if(col<m180){col=col%_93a;col=col<m180?col+_93a:col;}else{if(col>p180){col=col%_93a;}}}return col;},intersects:function(_93b,_93c){var _93d=this.srInfo;if(_93d){return _92a.some(_93c._getParts(_93d),function(_93e){return _93b.intersects(_93e.extent);});}else{return _93b.intersects(_93c);}},getCellExtent:function(row,col){var res=this._resolution,_93f=this.origin,_940=this.cellWidth,_941=this.cellHeight;return new _92d((col*_940*res)+_93f.x,_93f.y-((row+1)*_941*res),((col+1)*_940*res)+_93f.x,_93f.y-(row*_941*res),new _92c(_93f.spatialReference.toJson()));},getLatticeID:function(_942){var _943=this.getCellCoordinates({x:_942.xmin,y:_942.ymax}),_944=this.getCellCoordinates({x:_942.xmax,y:_942.ymin}),_945=_943.row,_946=_944.row,_947=this.normalize(_943.col),_948=this.normalize(_944.col);return _945+"_"+_946+"_"+_947+"_"+_948;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_949,_94a){var _94b=this.getCellCoordinates({x:_949.xmin,y:_949.ymax}),_94c=this.getCellCoordinates({x:_949.xmax,y:_949.ymin}),_94d=_94b.row,_94e=_94c.row,_94f=_94b.col,_950=_94c.col,_951=[],i,j,nj,_952=[],_953=[],len,xmin,xmax,ymin,ymax,_954=[],_955,_956;for(i=_94d;i<=_94e;i++){for(j=_94f;j<=_950;j++){nj=this.normalize(j);_949=this.getCellExtent(i,nj);_951.push({row:i,col:nj,extent:_949,resolution:this._resolution});if(_94a){_952.push(_949.xmin,_949.xmax);_953.push(_949.ymin,_949.ymax);}}}_94f=this.normalize(_94f);_950=this.normalize(_950);_952.sort(this.sorter);_953.sort(this.sorter);len=_952.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_952[i]===_952[i+1]){_952.splice(i,1);}}}len=_953.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_953[i]===_953[i+1]){_953.splice(i,1);}}}if(_952.length&&_953.length){xmin=_952[0];xmax=_952[_952.length-1];ymin=_953[0];ymax=_953[_953.length-1];len=_952.length;for(i=0;i<len;i++){_954.push([[_952[i],ymax],[_952[i],ymin]]);}len=_953.length;for(i=0;i<len;i++){_954.push([[xmin,_953[i]],[xmax,_953[i]]]);}_955=new _92e({paths:_954,spatialReference:this.origin.spatialReference.toJson()});_956=_94d+"_"+_94e+"_"+_94f+"_"+_950;_951.push({latticeID:_956,lattice:_955,resolution:this._resolution});}return {minRow:_94d,maxRow:_94e,minCol:_94f,maxCol:_950,cells:_951};}});if(has("extend-esri")){lang.setObject("layers._GridLayout",_92f,_92b);}return _92f;});},"dojo/dnd/Container":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../_base/window","../dom","../dom-class","../dom-construct","../Evented","../has","../on","../query","../ready","../touch","./common"],function(_957,_958,_959,_95a,lang,win,dom,_95b,_95c,_95d,has,on,_95e,_95f,_960,dnd){var _961=_958("dojo.dnd.Container",_95d,{skipForm:false,allowNested:false,constructor:function(node,_962){this.node=dom.byId(node);if(!_962){_962={};}this.creator=_962.creator||null;this.skipForm=_962.skipForm;this.parent=_962.dropParent&&dom.byId(_962.dropParent);this.map={};this.current=null;this.containerState="";_95b.add(this.node,"dojoDndContainer");if(!(_962&&_962._skipStartup)){this.startup();}this.events=[on(this.node,_960.over,lang.hitch(this,"onMouseOver")),on(this.node,_960.out,lang.hitch(this,"onMouseOut")),on(this.node,"dragstart",lang.hitch(this,"onSelectStart")),on(this.node,"selectstart",lang.hitch(this,"onSelectStart"))];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||_95a.global;var m=this.map,e=dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return _95e((this.allowNested?"":"> ")+".dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_963,_964){if(!this.parent.firstChild){_964=null;}else{if(_963){if(!_964){_964=this.parent.firstChild;}}else{if(_964){_964=_964.nextSibling;}}}var i,t;if(_964){for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});_964.parentNode.insertBefore(t.node,_964);}}else{for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){_957.forEach(this.events,function(_965){_965.remove();});this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_966,node,Ctor){_966._skipStartup=true;return new Ctor(node,_966);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dnd.isFormElement(e)){_959.stop(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_967){var _968="dojoDnd"+type;var _969=type.toLowerCase()+"State";_95b.replace(this.node,_968+_967,_968+this[_969]);this[_969]=_967;},_addItemClass:function(node,type){_95b.add(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_95b.remove(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _96a=node.parentNode;_96a;node=_96a,_96a=node.parentNode){if((_96a==this.parent||this.allowNested)&&_95b.contains(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!lang.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dnd.getUniqueId();}_95b.add(t.node,"dojoDndItem");return t;}});dnd._createNode=function(tag){if(!tag){return dnd._createSpan;}return function(text){return _95c.create(tag,{innerHTML:text});};};dnd._createTrTd=function(text){var tr=_95c.create("tr");_95c.create("td",{innerHTML:text},tr);return tr;};dnd._createSpan=function(text){return _95c.create("span",{innerHTML:text});};dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?dnd._createTrTd:dnd._createNode(dnd._defaultCreatorNodes[tag]);return function(item,hint){var _96b=item&&lang.isObject(item),data,type,n;if(_96b&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(_96b&&item.data)?item.data:item;type=(_96b&&item.type)?item.type:["text"];n=(hint=="avatar"?dnd._createSpan:c)(String(data));}if(!n.id){n.id=dnd.getUniqueId();}return {node:n,data:data,type:type};};};return _961;});},"dojox/grid/_ViewManager":function(){define("dojox/grid/_ViewManager",["dojo/_base/declare","dojo/_base/sniff","dojo/dom-class"],function(_96c,has,_96d){return _96c("dojox.grid._ViewManager",null,{constructor:function(_96e){this.grid=_96e;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_96f){_96f.idx=this.views.length;this.views.push(_96f);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _970=[];for(var i=0,v;v=this.views[i];i++){_970.push(v.contentNode);}return _970;},forEach:function(_971){for(var i=0,v;v=this.views[i];i++){_971(v,i);}},onEach:function(_972,_973){_973=_973||[];for(var i=0,v;v=this.views[i];i++){if(_972 in v){v[_972].apply(v,_973);}}},normalizeHeaderNodeHeight:function(){var _974=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_974.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_974);},normalizeRowNodeHeights:function(_975){var h=0;var _976=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_975.length<=1){return;}for(var i=0,n;(n=_975[i]);i++){if(!_96d.contains(n,"dojoxGridNonNormalizedCell")){_976[i]=n.firstChild.offsetHeight;h=Math.max(h,_976[i]);}}h=(h>=0?h:0);if((has("mozilla")||has("ie")>8)&&h){h++;}}for(i=0;(n=_975[i]);i++){if(_976[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_977){var _978=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_977));i++){n.firstChild.style.height="";_978.push(n);}this.normalizeRowNodeHeights(_978);},getViewWidth:function(_979){return this.views[_979].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_97a){_97a.headerContentNode.style.height="";});var h=0;this.forEach(function(_97b){h=Math.max(_97b.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_97c){h=Math.max(_97c.domNode.offsetHeight,h);});return h;},findClient:function(_97d){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length,self=this;var c=(w<=0?len:this.findClient());var _97e=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!self.grid.isLeftToRight()){ds.right=l+"px";if(has("ff")<4){hs.right=l+v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}if(!has("webkit")){hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_97e(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_97e(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_97e(v,l);}return l;},renderRow:function(_97f,_980,_981){var _982=[];for(var i=0,v,n,_983;(v=this.views[i])&&(n=_980[i]);i++){_983=v.renderRow(_97f);n.appendChild(_983);_982.push(_983);}if(!_981){this.normalizeRowNodeHeights(_982);}},rowRemoved:function(_984){this.onEach("rowRemoved",[_984]);},updateRow:function(_985,_986){for(var i=0,v;v=this.views[i];i++){v.updateRow(_985);}if(!_986){this.renormalizeRow(_985);}},updateRowStyles:function(_987){this.onEach("updateRowStyles",[_987]);},setScrollTop:function(_988){var top=_988;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_988);if(has("ie")&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});});},"esri/dijit/editing/Union":function(){define("esri/dijit/editing/Union",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase","esri/dijit/editing/Cut"],function(_989,lang,has,_98a,_98b,Cut){var _98c=_989(_98b,{declaredClass:"esri.dijit.editing.Union",type:"edit",label:"Union Features",constructor:function(_98d){_98d=_98d||{};this._cut=new Cut({featureLayer:_98d.featureLayer,addedGraphics:_98d.deletedGraphics,preUpdatedGraphics:_98d.preUpdatedGraphics,postUpdatedGraphics:_98d.postUpdatedGraphics});},performUndo:function(){this._cut.performRedo();},performRedo:function(){this._cut.performUndo();}});if(has("extend-esri")){lang.setObject("dijit.editing.Union",_98c,_98a);}return _98c;});},"dijit/form/NumberTextBox":function(){define("dijit/form/NumberTextBox",["dojo/_base/declare","dojo/_base/lang","dojo/number","./RangeBoundTextBox"],function(_98e,lang,_98f,_990){var _991=_98e("dijit.form.NumberTextBoxMixin",null,{pattern:_98f.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:_98f.format,postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},_setConstraintsAttr:function(_992){var _993=typeof _992.places=="number"?_992.places:0;if(_993){_993++;}if(typeof _992.max!="number"){_992.max=9*Math.pow(10,15-_993);}if(typeof _992.min!="number"){_992.min=-9*Math.pow(10,15-_993);}this.inherited(arguments,[_992]);if(this.focusNode&&this.focusNode.value&&!isNaN(this.value)){this.set("value",this.value);}},_onFocus:function(){if(this.disabled){return;}var val=this.get("value");if(typeof val=="number"&&!isNaN(val)){var _994=this.format(val,this.constraints);if(_994!==undefined){this.textbox.value=_994;}}this.inherited(arguments);},format:function(_995,_996){var _997=String(_995);if(typeof _995!="number"){return _997;}if(isNaN(_995)){return "";}if(!("rangeCheck" in this&&this.rangeCheck(_995,_996))&&_996.exponent!==false&&/\de[-+]?\d/i.test(_997)){return _997;}if(this.editOptions&&this.focused){_996=lang.mixin({},_996,this.editOptions);}return this._formatter(_995,_996);},_parser:_98f.parse,parse:function(_998,_999){var v=this._parser(_998,lang.mixin({},_999,(this.editOptions&&this.focused)?this.editOptions:{}));if(this.editOptions&&this.focused&&isNaN(v)){v=this._parser(_998,_999);}return v;},_getDisplayedValueAttr:function(){var v=this.inherited(arguments);return isNaN(v)?this.textbox.value:v;},filter:function(_99a){return (_99a==null||_99a==="")?NaN:this.inherited(arguments);},serialize:function(_99b,_99c){return (typeof _99b!="number"||isNaN(_99b))?"":this.inherited(arguments);},_setBlurValue:function(){var val=lang.hitch(lang.mixin({},this,{focused:true}),"get")("value");this._setValueAttr(val,true);},_setValueAttr:function(_99d,_99e,_99f){if(_99d!==undefined&&_99f===undefined){_99f=String(_99d);if(typeof _99d=="number"){if(isNaN(_99d)){_99f="";}else{if(("rangeCheck" in this&&this.rangeCheck(_99d,this.constraints))||this.constraints.exponent===false||!/\de[-+]?\d/i.test(_99f)){_99f=undefined;}}}else{if(!_99d){_99f="";_99d=NaN;}else{_99d=undefined;}}}this.inherited(arguments,[_99d,_99e,_99f]);},_getValueAttr:function(){var v=this.inherited(arguments);if(isNaN(v)&&this.textbox.value!==""){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)&&(new RegExp("^"+_98f._realNumberRegexp(lang.mixin({},this.constraints))+"$").test(this.textbox.value))){var n=Number(this.textbox.value);return isNaN(n)?undefined:n;}else{return undefined;}}else{return v;}},isValid:function(_9a0){if(!this.focused||this._isEmpty(this.textbox.value)){return this.inherited(arguments);}else{var v=this.get("value");if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){return true;}else{return this.inherited(arguments);}}else{return false;}}}});var _9a1=_98e("dijit.form.NumberTextBox",[_990,_991],{baseClass:"dijitTextBox dijitNumberTextBox"});_9a1.Mixin=_991;return _9a1;});},"dijit/DropDownMenu":function(){require({cache:{"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n"}});define("dijit/DropDownMenu",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/text!./templates/Menu.html","./_OnDijitClickMixin","./_MenuBase"],function(_9a2,_9a3,keys,_9a4,_9a5,_9a6){return _9a2("dijit.DropDownMenu",[_9a6,_9a5],{templateString:_9a4,baseClass:"dijitMenu",postCreate:function(){this.inherited(arguments);var l=this.isLeftToRight();this._openSubMenuKey=l?keys.RIGHT_ARROW:keys.LEFT_ARROW;this._closeSubMenuKey=l?keys.LEFT_ARROW:keys.RIGHT_ARROW;this.connectKeyNavHandlers([keys.UP_ARROW],[keys.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);_9a3.stop(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{_9a3.stop(evt);}break;}}});});},"dojox/grid/cells":function(){define("dojox/grid/cells",["../main","./cells/_base"],function(_9a7){return _9a7.grid.cells;});},"esri/dijit/editing/tools/Editing":function(){define("esri/dijit/editing/tools/Editing",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/layers/FeatureTemplate","esri/dijit/editing/tools/Edit","esri/dijit/editing/tools/EditingTools","esri/dijit/editing/tools/DropDownToolBase","esri/kernel","esri/lang"],function(_9a8,lang,_9a9,has,_9aa,Edit,_9ab,_9ac,_9ad,_9ae){var _9af=_9a8([_9ac],{declaredClass:"esri.dijit.editing.tools.Editing",_enabled:false,deactivate:function(){if(!this._enabled){return;}this._enabled=false;this.inherited(arguments);this._settings.templatePicker.clearSelection();},onItemClicked:function(_9b0,evt){this.inherited(arguments);if(this._activeTool===this._tools.AUTOCOMPLETE){this._settings.editor._drawingTool=_9aa.TOOL_AUTO_COMPLETE_POLYGON;}},_activateTool:function(_9b1,_9b2){var i;this.enable(_9b2);for(i in this._tools){if(this._tools.hasOwnProperty(i)){this.dropDown.removeChild(this._tools[i]);if(this._tools[i]._enabled===true){this.dropDown.addChild(this._tools[i]);}}}if(this._geometryType!==_9b2||this._activeTool._enabled===false){this._activeTool=this._tools[_9b1.toUpperCase()];}this._geometryType=_9b2;this._activeTool.activate();this._activeTool.setChecked(true);this._updateUI();},_initializeTool:function(_9b3){this.inherited(arguments);this._initializeTools();},_initializeTools:function(){var _9b4=this._settings.layers;var _9b5=this._settings.editor;var _9b6=false,line=false,poly=false;var _9b7=this._toolTypes=[];var _9b8;_9a9.forEach(_9b4,function(_9b9){_9b8=_9b9.geometryType;_9b6=_9b6||_9b8==="esriGeometryPoint";line=line||_9b8==="esriGeometryPolyline";poly=poly||_9b8==="esriGeometryPolygon";_9b7=_9b7.concat(_9a9.map(this._getTemplatesFromLayer(_9b9),lang.hitch(this,function(_9ba){return _9b5._toDrawTool(_9ba.drawingTool,_9b9);})));},this);var _9bb=this._settings.createOptions;if(_9b6){this._toolTypes.push("point");}if(line){this._toolTypes=this._toolTypes.concat(_9bb.polylineDrawTools);}if(poly){this._toolTypes=this._toolTypes.concat(_9bb.polygonDrawTools);}this._toolTypes=this._toUnique(this._toolTypes.concat(_9b7));},_toUnique:function(arr){var test={};return _9a9.filter(arr,function(val){return test[val]?false:(test[val]=true);});},_getTemplatesFromLayer:function(_9bc){var _9bd=_9bc.templates||[];var _9be=_9bc.types;_9a9.forEach(_9be,function(type){_9bd=_9bd.concat(type.templates);});return _9a9.filter(_9bd,_9ae.isDefined);},_createTools:function(){_9a9.forEach(this._toolTypes,this._createTool,this);this.inherited(arguments);},_createTool:function(_9bf){var _9c0=lang.mixin(_9ab[_9bf],{settings:this._settings,onClick:lang.hitch(this,"onItemClicked",_9ab[_9bf].id)});this._tools[_9bf.toUpperCase()]=new Edit(_9c0);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Editing",_9af,_9ad);}return _9af;});},"esri/dijit/editing/tools/ToggleToolBase":function(){define("esri/dijit/editing/tools/ToggleToolBase",["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/form/ToggleButton","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_9c1,lang,has,_9c2,_9c3,_9c4){var TTB=_9c1([_9c2,_9c3],{declaredClass:"esri.dijit.editing.tools.ToggleToolBase",postCreate:function(){this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){_9c2.prototype.destroy.apply(this,arguments);_9c3.prototype.destroy.apply(this,arguments);},setChecked:function(_9c5){_9c2.prototype.setChecked.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.ToggleToolBase",TTB,_9c4);}return TTB;});},"dojox/date/islamic/Date":function(){define("dojox/date/islamic/Date",["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(lang,_9c6,dd){var _9c7=_9c6("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 len=arguments.length;if(!len){this.fromGregorian(new Date());}else{if(len==1){var arg0=arguments[0];if(typeof arg0=="number"){arg0=new Date(arg0);}if(arg0 instanceof Date){this.fromGregorian(arg0);}else{if(arg0==""){this._date=new Date("");}else{this._year=arg0._year;this._month=arg0._month;this._date=arg0._date;this._hours=arg0._hours;this._minutes=arg0._minutes;this._seconds=arg0._seconds;this._milliseconds=arg0._milliseconds;}}}else{if(len>=3){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;}}}},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(date){date=parseInt(date);if(date>0&&date<=this.getDaysInIslamicMonth(this._month,this._year)){this._date=date;}else{var _9c8;if(date>0){for(_9c8=this.getDaysInIslamicMonth(this._month,this._year);date>_9c8;date-=_9c8,_9c8=this.getDaysInIslamicMonth(this._month,this._year)){this._month++;if(this._month>=12){this._year++;this._month-=12;}}this._date=date;}else{for(_9c8=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1);date<=0;_9c8=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1)){this._month--;if(this._month<0){this._year--;this._month+=12;}date+=_9c8;}this._date=date;}}return this;},setFullYear:function(year){this._year=+year;},setMonth:function(_9c9){this._year+=Math.floor(_9c9/12);if(_9c9>0){this._month=Math.floor(_9c9%12);}else{this._month=Math.floor(((_9c9%12)+12)%12);}},setHours:function(){var _9ca=arguments.length;var _9cb=0;if(_9ca>=1){_9cb=parseInt(arguments[0]);}if(_9ca>=2){this._minutes=parseInt(arguments[1]);}if(_9ca>=3){this._seconds=parseInt(arguments[2]);}if(_9ca==4){this._milliseconds=parseInt(arguments[3]);}while(_9cb>=24){this._date++;var _9cc=this.getDaysInIslamicMonth(this._month,this._year);if(this._date>_9cc){this._month++;if(this._month>=12){this._year++;this._month-=12;}this._date-=_9cc;}_9cb-=24;}this._hours=_9cb;},_addMinutes:function(_9cd){_9cd+=this._minutes;this.setMinutes(_9cd);this.setHours(this._hours+parseInt(_9cd/60));return this;},_addSeconds:function(_9ce){_9ce+=this._seconds;this.setSeconds(_9ce);this._addMinutes(parseInt(_9ce/60));return this;},_addMilliseconds:function(_9cf){_9cf+=this._milliseconds;this.setMilliseconds(_9cf);this._addSeconds(parseInt(_9cf/1000));return this;},setMinutes:function(_9d0){this._minutes=_9d0%60;return this;},setSeconds:function(_9d1){this._seconds=_9d1%60;return this;},setMilliseconds:function(_9d2){this._milliseconds=_9d2%1000;return this;},toString:function(){if(isNaN(this._date)){return "Invalidate Date";}else{var x=new Date();x.setHours(this._hours);x.setMinutes(this._minutes);x.setSeconds(this._seconds);x.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+x.toTimeString();}},toGregorian:function(){var _9d3=this._year;var _9d4=this._month;var _9d5=this._date;var _9d6=_9d5+Math.ceil(29.5*_9d4)+(_9d3-1)*354+Math.floor((3+(11*_9d3))/30)+this._ISLAMIC_EPOCH-1;var wjd=Math.floor(_9d6-0.5)+0.5,_9d7=wjd-this._GREGORIAN_EPOCH,_9d8=Math.floor(_9d7/146097),dqc=this._mod(_9d7,146097),cent=Math.floor(dqc/36524),_9d9=this._mod(dqc,36524),quad=Math.floor(_9d9/1461),_9da=this._mod(_9d9,1461),_9db=Math.floor(_9da/365),year=(_9d8*400)+(cent*100)+(quad*4)+_9db;if(!(cent==4||_9db==4)){year++;}var _9dc=this._GREGORIAN_EPOCH+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400);var _9dd=wjd-_9dc;var tjd=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((739/12)+((dd.isLeapYear(new Date(year,3,1))?-1:-2))+1);var _9de=((wjd<tjd)?0:(dd.isLeapYear(new Date(year,3,1))?1:2));var _9df=Math.floor((((_9dd+_9de)*12)+373)/367);var tjd2=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((((367*_9df)-362)/12)+((_9df<=2)?0:(dd.isLeapYear(new Date(year,_9df,1))?-1:-2))+1);var day=(wjd-tjd2)+1;var _9e0=new Date(year,(_9df-1),day,this._hours,this._minutes,this._seconds,this._milliseconds);return _9e0;},fromGregorian:function(_9e1){var date=new Date(_9e1);var _9e2=date.getFullYear(),_9e3=date.getMonth(),gDay=date.getDate();var _9e4=(this._GREGORIAN_EPOCH-1)+(365*(_9e2-1))+Math.floor((_9e2-1)/4)+(-Math.floor((_9e2-1)/100))+Math.floor((_9e2-1)/400)+Math.floor((((367*(_9e3+1))-362)/12)+(((_9e3+1)<=2)?0:(dd.isLeapYear(date)?-1:-2))+gDay);_9e4=Math.floor(_9e4)+0.5;var days=_9e4-this._ISLAMIC_EPOCH;var _9e5=Math.floor((30*days+10646)/10631);var _9e6=Math.ceil((days-29-this._yearStart(_9e5))/29.5);_9e6=Math.min(_9e6,11);var hDay=Math.ceil(days-this._monthStart(_9e5,_9e6))+1;this._date=hDay;this._month=_9e6;this._year=_9e5;this._hours=date.getHours();this._minutes=date.getMinutes();this._seconds=date.getSeconds();this._milliseconds=date.getMilliseconds();this._day=date.getDay();return this;},valueOf:function(){return this.toGregorian().valueOf();},_yearStart:function(year){return (year-1)*354+Math.floor((3+11*year)/30);},_monthStart:function(year,_9e7){return Math.ceil(29.5*_9e7)+(year-1)*354+Math.floor((3+11*year)/30);},_civilLeapYear:function(year){return (14+11*year)%30<11;},getDaysInIslamicMonth:function(_9e8,year){var _9e9=0;_9e9=29+((_9e8+1)%2);if(_9e8==11&&this._civilLeapYear(year)){_9e9++;}return _9e9;},_mod:function(a,b){return a-(b*Math.floor(a/b));}});_9c7.getDaysInIslamicMonth=function(_9ea){return new _9c7().getDaysInIslamicMonth(_9ea.getMonth(),_9ea.getFullYear());};return _9c7;});},"esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel"],function(lang,_9eb,has,_9ec){var util={};util={findFeatures:function(ids,_9ed,_9ee){var _9ef=_9ed.objectIdField;var _9f0=_9ed.graphics;var _9f1=_9eb.filter(_9f0,function(_9f2){return _9eb.some(ids,function(id){return _9f2.attributes[_9ef]===id.objectId;});});if(_9ee){_9ee(_9f1);}else{return _9f1;}},getSelection:function(_9f3){var _9f4=[];_9eb.forEach(_9f3,function(_9f5){var _9f6=_9f5.getSelectedFeatures();_9eb.forEach(_9f6,function(_9f7){_9f4.push(_9f7);});});return _9f4;}};if(has("extend-esri")){lang.setObject("dijit.editing.Util.LayerHelper",util,_9ec);}return util;});},"dojox/grid/util":function(){define("dojox/grid/util",["../main","dojo/_base/lang","dojo/dom"],function(_9f8,lang,dom){var dgu=lang.getObject("grid.util",true,_9f8);dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,args){var fn=ob&&ev&&ob[ev];return fn&&(args?fn.apply(ob,args):ob[ev]());};dgu.setStyleHeightPx=function(_9f9,_9fa){if(_9fa>=0){var s=_9f9.style;var v=_9fa+"px";if(_9f9&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_9fb,_9fc,_9fd,_9fe){var evts=(_9fe?_9fe:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_9fc.connect(_9fb,"on"+evts[i],_9fd);}};dgu.removeNode=function(_9ff){_9ff=dom.byId(_9ff);_9ff&&_9ff.parentNode&&_9ff.parentNode.removeChild(_9ff);return _9ff;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_a00,_a01,_a02){if(_a00.length<=_a01){_a00[_a01]=_a02;}else{_a00.splice(_a01,0,_a02);}};dgu.arrayRemove=function(_a03,_a04){_a03.splice(_a04,1);};dgu.arraySwap=function(_a05,inI,inJ){var _a06=_a05[inI];_a05[inI]=_a05[inJ];_a05[inJ]=_a06;};return dgu;});},"dijit/form/_ListBase":function(){define("dijit/form/_ListBase",["dojo/_base/declare","dojo/on","dojo/window"],function(_a07,on,_a08){return _a07("dijit.form._ListBase",null,{selected:null,_listConnect:function(_a09,_a0a){var self=this;return self.own(on(self.containerNode,on.selector(function(_a0b,_a0c,_a0d){return _a0b.parentNode==_a0d;},_a09),function(evt){evt.preventDefault();self[_a0a](evt,this);}));},selectFirstNode:function(){var _a0e=this.containerNode.firstChild;while(_a0e&&_a0e.style.display=="none"){_a0e=_a0e.nextSibling;}this._setSelectedAttr(_a0e);},selectLastNode:function(){var last=this.containerNode.lastChild;while(last&&last.style.display=="none"){last=last.previousSibling;}this._setSelectedAttr(last);},selectNextNode:function(){var _a0f=this.selected;if(!_a0f){this.selectFirstNode();}else{var next=_a0f.nextSibling;while(next&&next.style.display=="none"){next=next.nextSibling;}if(!next){this.selectFirstNode();}else{this._setSelectedAttr(next);}}},selectPreviousNode:function(){var _a10=this.selected;if(!_a10){this.selectLastNode();}else{var prev=_a10.previousSibling;while(prev&&prev.style.display=="none"){prev=prev.previousSibling;}if(!prev){this.selectLastNode();}else{this._setSelectedAttr(prev);}}},_setSelectedAttr:function(node){if(this.selected!=node){var _a11=this.selected;if(_a11){this.onDeselect(_a11);this.selected=null;}if(node){this.selected=node;_a08.scrollIntoView(node);this.onSelect(node);}}else{if(node){this.onSelect(node);}}}});});},"dojox/grid/DataGrid":function(){define("dojox/grid/DataGrid",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/json","dojo/_base/sniff","dojo/_base/declare","./_Grid","./DataSelection","dojo/_base/html"],function(_a12,_a13,lang,json,has,_a14,_a15,_a16,html){var _a17=_a14("dojox.grid.DataGrid",_a15,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,keepSelection:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},destroy:function(){this.selection.destroy();this.inherited(arguments);},createSelection:function(){this.selection=new _a16(this);},get:function(_a18,_a19){if(_a19&&this.field=="_item"&&!this.fields){return _a19;}else{if(_a19&&this.fields){var ret=[];var s=this.grid.store;_a13.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_a19,f));});return ret;}else{if(!_a19&&typeof _a18==="string"){return this.inherited(arguments);}}}return (!_a19?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_a19:this.grid.store.getValue(_a19,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _a1a=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_a1a=true;}if(!this.updating){this.beginUpdate();_a1a=true;}if(_a1a){var _a1b=this;this._endUpdateDelay=setTimeout(function(){delete _a1b._endUpdateDelay;_a1b.endUpdate();},this.updateDelay);}}},_onSet:function(item,_a1c,_a1d,_a1e){this._checkUpdateStatus();var idx=this.getItemIndex(item);if(idx>-1){this.updateRow(idx);}},_createItem:function(item,_a1f){var idty=this._hasIdentity?this.store.getIdentity(item):json.toJson(this.query)+":idx:"+_a1f+":sort:"+json.toJson(this.getSortProps());var o=this._by_idty[idty]={idty:idty,item:item};return o;},_addItem:function(item,_a20,_a21){this._by_idx[_a20]=this._createItem(item,_a20);if(!_a21){this.updateRow(_a20);}},_onNew:function(item,_a22){this._checkUpdateStatus();var _a23=this.get("rowCount");this._addingItem=true;this.updateRowCount(_a23+1);this._addingItem=false;this._addItem(item,_a23);this.showMessage();},_onDelete:function(item){this._checkUpdateStatus();var idx=this._getItemIndex(item,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}if(this.selection.isSelected(idx)){this.selection.deselect(idx);this.selection.selected.splice(idx,1);}},_onRevert:function(){this._refresh();},setStore:function(_a24,_a25,_a26){if(this._requestsPending(0)){return;}this._setQuery(_a25,_a26);this._setStore(_a24);this._refresh(true);},setQuery:function(_a27,_a28){if(this._requestsPending(0)){return;}this._setQuery(_a27,_a28);this._refresh(true);},setItems:function(_a29){this.items=_a29;this._setStore(this.store);this._refresh(true);},_setQuery:function(_a2a,_a2b){this.query=_a2a;this.queryOptions=_a2b||this.queryOptions;},_setStore:function(_a2c){if(this.store&&this._store_connects){_a13.forEach(this._store_connects,this.disconnect,this);}this.store=_a2c;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(size,req){if(!this.scroller){return;}if(this.rowCount!=size){if(req.isRender){this.scroller.init(size,this.keepRows,this.rowsPerPage);this.rowCount=size;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(size);}}if(!size){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_a2d,req){if(!this.scroller){return;}if(_a2d&&_a2d.length>0){_a13.forEach(_a2d,function(item,idx){this._addItem(item,req.start+idx,true);},this);this.updateRows(req.start,_a2d.length);if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}if(has("ie")){html.setSelectable(this.domNode,this.selectable);}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){console.log(err);delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_a2e,_a2f){_a2e=_a2e||0;if(this.store&&!this._pending_requests[_a2e]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_a2e]=true;try{if(this.items){var _a30=this.items;var _a31=this.store;this.rowsPerPage=_a30.length;var req={start:_a2e,count:this.rowsPerPage,isRender:_a2f};this._onFetchBegin(_a30.length,req);var _a32=0;_a13.forEach(_a30,function(i){if(!_a31.isItemLoaded(i)){_a32++;}});if(_a32===0){this._onFetchComplete(_a30,req);}else{var _a33=function(item){_a32--;if(_a32===0){this._onFetchComplete(_a30,req);}};_a13.forEach(_a30,function(i){if(!_a31.isItemLoaded(i)){_a31.loadItem({item:i,onItem:_a33,scope:this});}},this);}}else{this.store.fetch({start:_a2e,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_a2f,onBegin:lang.hitch(this,"_onFetchBegin"),onComplete:lang.hitch(this,"_onFetchComplete"),onError:lang.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_a2e,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var data=this._by_idx[idx];if(!data||(data&&!data.item)){this._preparePage(idx);return null;}return data.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_a34){if(!_a34&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_a35,_a36){this.query=_a35;if(_a36){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_a37){return this._pending_requests[_a37];},_rowToPage:function(_a38){return (this.rowsPerPage?Math.floor(_a38/this.rowsPerPage):_a38);},_pageToRow:function(_a39){return (this.rowsPerPage?this.rowsPerPage*_a39:_a39);},_preparePage:function(_a3a){if((_a3a<this._bop||_a3a>=this._eop)&&!this._addingItem){var _a3b=this._rowToPage(_a3a);this._needPage(_a3b);this._bop=_a3b*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_a3c){if(!this._pages[_a3c]){this._pages[_a3c]=true;this._requestPage(_a3c);}},_requestPage:function(_a3d){var row=this._pageToRow(_a3d);var _a3e=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_a3e>0){this._requests++;if(!this._requestsPending(row)){setTimeout(lang.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_a3f){return _a3f.field;},_refresh:function(_a40){this._clearData();this._fetch(0,_a40);},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_a41){if(this.store&&this.store.getState){var _a42=this.store.getState(_a41.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_a42[s]){c=" dojoxGridRow-"+s;break;}}_a41.customClasses+=c;}},onStyleRow:function(_a43){this.styleRowState(_a43);this.inherited(arguments);},canEdit:function(_a44,_a45){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _a46={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_a47,_a48){if(!this._cache[_a48]){this._cache[_a48]=this._copyAttr(_a48,_a47.field);}this.onStartEdit(_a47,_a48);},doApplyCellEdit:function(_a49,_a4a,_a4b){this.store.fetchItemByIdentity({identity:this._by_idx[_a4a].idty,onItem:lang.hitch(this,function(item){var _a4c=this.store.getValue(item,_a4b);if(typeof _a4c=="number"){_a49=isNaN(_a49)?_a49:parseFloat(_a49);}else{if(typeof _a4c=="boolean"){_a49=_a49=="true"?true:_a49=="false"?false:_a49;}else{if(_a4c instanceof Date){var _a4d=new Date(_a49);_a49=isNaN(_a4d.getTime())?_a49:_a4d;}}}this.store.setValue(item,_a4b,_a49);this.onApplyCellEdit(_a49,_a4a,_a4b);})});},doCancelEdit:function(_a4e){var _a4f=this._cache[_a4e];if(_a4f){this.updateRow(_a4e);delete this._cache[_a4e];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_a50,_a51){var _a52=this._cache[_a50];this.onApplyEdit(_a50);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=lang.hitch(this,function(_a53){if(_a53.length){_a13.forEach(_a53,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});_a17.cell_markupFactory=function(_a54,node,_a55){var _a56=lang.trim(html.attr(node,"field")||"");if(_a56){_a55.field=_a56;}_a55.field=_a55.field||_a55.name;var _a57=lang.trim(html.attr(node,"fields")||"");if(_a57){_a55.fields=_a57.split(",");}if(_a54){_a54(node,_a55);}};_a17.markupFactory=function(_a58,node,ctor,_a59){return _a15.markupFactory(_a58,node,ctor,lang.partial(_a17.cell_markupFactory,_a59));};return _a17;});},"esri/dijit/editing/SelectionHelper":function(){define("esri/dijit/editing/SelectionHelper",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/has","dojo/DeferredList","esri/geometry/Extent","esri/geometry/Point","esri/geometry/ScreenPoint","esri/layers/FeatureLayer","esri/tasks/query","esri/kernel"],function(_a5a,lang,_a5b,_a5c,has,_a5d,_a5e,_a5f,_a60,_a61,_a62,_a63){var SH=_a5a(null,{declaredClass:"esri.dijit.editing.SelectionHelper",constructor:function(_a64){this._settings=_a64||{};this._sConnects=[];this._mapServiceCount=0;this._map=this._settings.map;this._tolerance=this._settings.singleSelectionTolerance;this._initMapServiceInfos(this._settings.layers);},destroy:function(){var _a65;for(_a65 in this._sConnects){if(this._sConnects.hasOwnProperty(_a65)){_a65.disconnect(this._sConnects[_a65]);}}},selectFeatures:function(_a66,_a67,_a68,_a69){if(_a68===_a61.SELECTION_NEW){this._resetMapServiceInfos();this.getSelection(_a66);}var _a6a=[];_a5c.forEach(_a66,function(_a6b){if(_a6b.visible===true&&_a6b._isMapAtVisibleScale()===true){var _a6c=_a68;if(_a6b._isSelOnly&&_a6c===_a61.SELECTION_NEW){_a6c=_a61.SELECTION_ADD;}_a6a.push(_a6b.selectFeatures(_a67,_a6c));}});var _a6d=new _a5d(_a6a);_a6d.addCallback(lang.hitch(this,function(_a6e){var _a6f=[];_a5c.forEach(_a6e,function(set,idx){_a5c.forEach(set[1],function(_a70){var _a71=_a70.attributes[_a66[idx].objectIdField];_a70=_a66[idx]._mode._getFeature(_a71)||null;if(_a70){_a6f.push(_a70);}},this);},this);if(!this._mapServiceCount){_a69(_a6f);return;}var _a72=_a68===_a61.SELECTION_SUBTRACT;if(_a72){this._resetMapServiceInfos();this._createLayerDefs(this._getLayerInfosFromSelection(_a66));}else{this._createLayerDefs(this._getLayerInfosFromFeatures(_a6f));}this._updateLayerDefs(this._mapServiceInfos,false,!((_a6f&&_a6f.length)||_a72),lang.hitch(this,_a69,_a6f));}));},selectFeaturesByGeometry:function(_a73,_a74,_a75,_a76){var _a77=_a74;if(_a74.declaredClass.indexOf("Extent")!==-1){if(_a74.xmax===_a74.xmin&&_a74.ymax===_a74.ymin){_a77=new _a5f(_a74.xmax,_a74.ymax,_a74.spatialReference);}}_a77=(_a77.declaredClass.indexOf("Point")!==-1)?this._extentFromPoint(_a77):_a77;var _a78=new _a62();_a78.geometry=_a77;this.selectFeatures(_a73,_a78,_a75,_a76);},clearSelection:function(_a79){var _a7a=this._nonSelOnlyLayers;_a5c.forEach(_a7a,function(item){if(item.clearSelection){item.clearSelection();}});if(!this._mapServiceCount){return;}this._resetMapServiceInfos();var _a7b=this._getLayerInfosFromSelection(this._settings.layers);var _a7c=_a5c.some(_a7b,function(item){return item.oids&&item.oids.length;});if(_a7c){this._createLayerDefs(_a7b);this._updateLayerDefs(this._mapServiceInfos,true,_a79||false);}},findMapService:function(_a7d){var map=this._map,_a7e=map.layerIds,_a7f=(_a7d&&_a7d._url)?_a7d._url.path.toLowerCase():"",_a80,_a81,_a82;for(_a81 in _a7e){if(_a7e.hasOwnProperty(_a81)){_a80=map.getLayer(_a7e[_a81]);_a82=_a80._url?_a80._url.path.toLowerCase().replace("mapserver","featureserver"):"";if(_a7f.substr(0,_a82.length)===_a82&&_a80.declaredClass==="esri.layers.ArcGISDynamicMapServiceLayer"){return _a80;}}}},getSelection:function(_a83){var _a84=[];_a5c.forEach(_a83,function(_a85){if(_a85._isSelOnly){_a84.push(this._createLayerInfo(_a85));}},this);_a5c.forEach(_a84,function(_a86){var _a87=this._createMapServiceInfo(this.findMapService(_a86.layer));if(_a87){_a87.layerInfos[_a86.layer.layerId]=_a86;}},this);},_initMapServiceInfos:function(_a88){this._nonSelOnlyLayers=[];this._mapServiceInfos=[];_a5c.forEach(_a88,function(_a89){var _a8a=this.findMapService(_a89);if(_a8a){this._mapServiceCount++;this._createMapServiceInfo(_a8a);if(_a8a){_a8a.setDisableClientCaching(true);}}else{this._nonSelOnlyLayers.push(_a89);}},this);},_createMapServiceInfo:function(_a8b){if(!_a8b){return null;}var _a8c=this._mapServiceInfos;var _a8d=_a8c[_a8b.id];if(!_a8d){_a8d=_a8c[_a8b.id]={mapService:_a8b,layerInfos:[],layerDefs:lang.mixin([],_a8b.layerDefinitions||[]),origLayerDefs:lang.mixin([],_a8b.layerDefinitions||[])};}return _a8d;},_resetMapServiceInfo:function(_a8e){_a5c.forEach(_a8e.layerInfos,this._resetLayerInfo);_a8e.layerDefs=lang.mixin([],_a8e.origLayerDefs||[]);},_resetMapServiceInfos:function(){var _a8f=this._mapServiceInfos,_a90;for(_a90 in _a8f){if(_a8f.hasOwnProperty(_a90)){this._resetMapServiceInfo(_a8f[_a90]);}}},_createLayerInfo:function(_a91,_a92){var _a93=_a91.objectIdField;var _a94=_a92?[]:_a91.getSelectedFeatures();return {layer:_a91,selectedFeatures:_a94||[],oids:_a5c.map(_a94,function(_a95){return _a95.attributes[_a93];})};},_resetLayerInfo:function(_a96){if(!_a96){return;}_a96.selectedFeatures=[];_a96.oids=[];},_updateLayerDefs:function(_a97,_a98,_a99,_a9a){var _a9b;for(_a9b in _a97){if(_a97.hasOwnProperty(_a9b)){var _a9c=_a97[_a9b];var _a9d=_a9c.mapService;var _a9e=_a9c.layerDefs=(_a98?lang.mixin([],_a9c.origLayerDefs||[]):_a9c.layerDefs);if(_a9e){if(!_a99){this._sConnects[_a9d.id]=(_a5b.connect(_a9d,"onUpdateEnd",lang.hitch(this,"_onMapServiceUpdate",_a9c,_a98,_a9a)));}else{if(_a9a){_a9a();}}_a9d.setLayerDefinitions(_a9e,_a99||false);}else{if(_a9a){_a9a();}}}}},_onMapServiceUpdate:function(_a9f,_aa0,_aa1){_a5b.disconnect(this._sConnects[_a9f.mapService.id]);_a5c.forEach(_a9f.layerInfos,function(_aa2){if(_aa0){if(_aa2){_aa2.layer.clearSelection();}}else{var _aa3=new _a62();_aa3.objectIds=_aa2?_aa2.oids:[];if(_aa3.objectIds.length){_aa2.layer.selectFeatures(_aa3,_a61.SELECTION_SUBTRACT);}}},this);if(_aa0){this._resetMapServiceInfo(_a9f);}if(_aa1){_aa1();}},_createLayerDefs:function(_aa4){_a5c.forEach(_aa4,function(_aa5){var _aa6=_aa5.layer;var _aa7=this._createMapServiceInfo(this.findMapService(_aa5.layer));if(!_aa7){return;}var _aa8=_aa7.mapService;var _aa9=_aa7.layerDefs;var _aaa=_aa6.objectIdField;var _aab=_aa6.layerId;var _aac="(\""+_aaa+"\" NOT IN (";var oids=_aa5.oids;if(oids&&oids.length){_a5c.forEach(_aa5.oids,function(oid,idx){oids=true;if(idx){_aac+=",";}_aac+="'"+oid+"'";});_aac+="))";if(_aa9.length&&(_aa9[_aab]&&_aa9[_aab].length)){_aa9[_aab]+=" AND"+_aac;}else{_aa9[_aab]=_aac;}}},this);},_getLayerInfosFromFeatures:function(_aad){var _aae=[];_a5c.forEach(_aad,function(_aaf){var _ab0=_aaf.getLayer();if(_ab0&&_ab0._isSelOnly){if(!_aae[_ab0.id]){_aae[_ab0.id]=this._createLayerInfo(_ab0,true);}_aae[_ab0.id].selectedFeatures.push(_aaf);_aae[_ab0.id].oids.push(_aaf.attributes[_ab0.objectIdField]);}},this);var _ab1=[],_ab2;for(_ab2 in _aae){if(_aae.hasOwnProperty(_ab2)){_ab1.push(_aae[_ab2]);}}return _ab1;},_getLayerInfosFromSelection:function(_ab3){var _ab4=[];_a5c.forEach(_ab3,function(_ab5){if(_ab5._isSelOnly){_ab4.push(this._createLayerInfo(_ab5,false));}},this);return _ab4;},_extentFromPoint:function(_ab6){var _ab7=this._tolerance;var map=this._map;var _ab8=map.toScreen(_ab6);var pnt1=new _a60(_ab8.x-_ab7,_ab8.y+_ab7);var pnt2=new _a60(_ab8.x+_ab7,_ab8.y-_ab7);var _ab9=map.toMap(pnt1);var _aba=map.toMap(pnt2);return new _a5e(_ab9.x,_ab9.y,_aba.x,_aba.y,map.spatialReference);}});if(has("extend-esri")){lang.setObject("dijit.editing.SelectionHelper",SH,_a63);}return SH;});},"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n","dijit/_editor/plugins/LinkDialog":function(){define("dijit/_editor/plugins/LinkDialog",["require","dojo/_base/declare","dojo/dom-attr","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/query","dojo/string","../../_Widget","../_Plugin","../../form/DropDownButton","../range"],function(_abb,_abc,_abd,keys,lang,has,_abe,_abf,_ac0,_ac1,_ac2,_ac3){var _ac4=_abc("dijit._editor.plugins.LinkDialog",_ac1,{buttonClass:_ac2,useDefaultCommand:false,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:"<?(mailto\\:)([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?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_-]*>?",htmlTemplate:"<a href=\"${urlInput}\" _djrealurl=\"${urlInput}\""+" target=\"${targetSelect}\""+">${textInput}</a>",tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' "+"id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_targetSelect'>${target}</label>","</td><td>","<select id='${id}_targetSelect' name='targetSelect' data-dojo-type='dijit.form.Select'>","<option selected='selected' value='_self'>${currentWindow}</option>","<option value='_blank'>${newWindow}</option>","<option value='_top'>${topWindow}</option>","<option value='_parent'>${parentWindow}</option>","</select>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),_initButton:function(){this.inherited(arguments);this.button.loadDropDown=lang.hitch(this,"_loadDropDown");this._connectTagEvents();},_loadDropDown:function(_ac5){_abb(["dojo/i18n","../../TooltipDialog","../../registry","../../form/Button","../../form/Select","../../form/ValidationTextBox","dojo/i18n!../../nls/common","dojo/i18n!../nls/LinkDialog"],lang.hitch(this,function(i18n,_ac6,_ac7){var _ac8=this;this.tag=this.command=="insertImage"?"img":"a";var _ac9=lang.delegate(i18n.getLocalization("dijit","common",this.lang),i18n.getLocalization("dijit._editor","LinkDialog",this.lang));var _aca=(this.dropDown=this.button.dropDown=new _ac6({title:_ac9[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:lang.hitch(this,"setValue"),onOpen:function(){_ac8._onOpenDialog();_ac6.prototype.onOpen.apply(this,arguments);},onCancel:function(){setTimeout(lang.hitch(_ac8,"_onCloseDialog"),0);}}));_ac9.urlRegExp=this.urlRegExp;_ac9.id=_ac7.getUniqueId(this.editor.id);this._uniqueId=_ac9.id;this._setContent(_aca.title+"<div style='border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'></div>"+_abf.substitute(this.linkDialogTemplate,_ac9));_aca.startup();this._urlInput=_ac7.byId(this._uniqueId+"_urlInput");this._textInput=_ac7.byId(this._uniqueId+"_textInput");this._setButton=_ac7.byId(this._uniqueId+"_setButton");this.connect(_ac7.byId(this._uniqueId+"_cancelButton"),"onClick",function(){this.dropDown.onCancel();});if(this._urlInput){this.connect(this._urlInput,"onChange","_checkAndFixInput");}if(this._textInput){this.connect(this._textInput,"onChange","_checkAndFixInput");}this._urlRegExp=new RegExp("^"+this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=lang.hitch(this,function(){var _acb=this._urlInput.get("value");return this._urlRegExp.test(_acb)||this._emailRegExp.test(_acb);});this.connect(_aca.domNode,"onkeypress",function(e){if(e&&e.charOrCode==keys.ENTER&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!this._setButton.get("disabled")){_aca.onExecute();_aca.execute(_aca.get("value"));}}});_ac5();}));},_checkAndFixInput:function(){var self=this;var url=this._urlInput.get("value");var _acc=function(url){var _acd=false;var _ace=false;if(url&&url.length>1){url=lang.trim(url);if(url.indexOf("mailto:")!==0){if(url.indexOf("/")>0){if(url.indexOf("://")===-1){if(url.charAt(0)!=="/"&&url.indexOf("./")&&url.indexOf("../")!==0){if(self._hostRxp.test(url)){_acd=true;}}}}else{if(self._userAtRxp.test(url)){_ace=true;}}}}if(_acd){self._urlInput.set("value","http://"+url);}if(_ace){self._urlInput.set("value","mailto:"+url);}self._setButton.set("disabled",!self._isValid());};if(this._delayedCheck){clearTimeout(this._delayedCheck);this._delayedCheck=null;}this._delayedCheck=setTimeout(function(){_acc(url);},250);},_connectTagEvents:function(){this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"ondblclick",this._onDblClick);}));},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid();},_setContent:function(_acf){this.dropDown.set({parserScope:"dojo",content:_acf});},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}return args;},setValue:function(args){this._onCloseDialog();if(has("ie")<9){var sel=_ac3.getSelection(this.editor.window);var _ad0=sel.getRangeAt(0);var a=_ad0.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(a&&(a.nodeName&&a.nodeName.toLowerCase()===this.tag)){if(this.editor.queryCommandEnabled("unlink")){this.editor._sCall("selectElementChildren",[a]);this.editor.execCommand("unlink");}}}args=this._checkValues(args);this.editor.execCommand("inserthtml",_abf.substitute(this.htmlTemplate,args));_abe("a",this.editor.document).forEach(function(a){if(!a.innerHTML&&!_abd.has(a,"name")){a.parentNode.removeChild(a);}},this);},_onCloseDialog:function(){this.editor.focus();},_getCurrentValues:function(a){var url,text,_ad1;if(a&&a.tagName.toLowerCase()===this.tag){url=a.getAttribute("_djrealurl")||a.getAttribute("href");_ad1=a.getAttribute("target")||"_self";text=a.textContent||a.innerText;this.editor._sCall("selectElement",[a,true]);}else{text=this.editor._sCall("getSelectedText");}return {urlInput:url||"",textInput:text||"",targetSelect:_ad1||""};},_onOpenDialog:function(){var a,b,fc;if(has("ie")){var sel=_ac3.getSelection(this.editor.window);if(sel.rangeCount){var _ad2=sel.getRangeAt(0);a=_ad2.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(!a||(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){b=this.editor._sCall("getAncestorElement",[this.tag]);if(b&&(b.nodeName&&b.nodeName.toLowerCase()==this.tag)){a=b;this.editor._sCall("selectElement",[a]);}else{if(_ad2.startContainer===_ad2.endContainer){fc=_ad2.startContainer.firstChild;if(fc&&(fc.nodeName&&fc.nodeName.toLowerCase()==this.tag)){a=fc;this.editor._sCall("selectElement",[a]);}}}}}}else{a=this.editor._sCall("getAncestorElement",[this.tag]);}this.dropDown.reset();this._setButton.set("disabled",true);this.dropDown.set("value",this._getCurrentValues(a));},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_abd.get(t,"href")){var _ad3=this.editor;this.editor._sCall("selectElement",[t]);_ad3.onDisplayChanged();if(_ad3._updateTimer){_ad3._updateTimer.remove();delete _ad3._updateTimer;}_ad3.onNormalizedDisplayChanged();var _ad4=this.button;setTimeout(function(){_ad4.set("disabled",false);_ad4.loadAndOpenDropDown().then(function(){if(_ad4.dropDown.focus){_ad4.dropDown.focus();}});},10);}}}});var _ad5=_abc("dijit._editor.plugins.ImgLinkDialog",[_ac4],{linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' "+"required='true' id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='false' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","</td><td>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),htmlTemplate:"<img src=\"${urlInput}\" _djrealurl=\"${urlInput}\" alt=\"${textInput}\" />",tag:"img",_getCurrentValues:function(img){var url,text;if(img&&img.tagName.toLowerCase()===this.tag){url=img.getAttribute("_djrealurl")||img.getAttribute("src");text=img.getAttribute("alt");this.editor._sCall("selectElement",[img,true]);}else{text=this.editor._sCall("getSelectedText",[]);}return {urlInput:url||"",textInput:text||""};},_isValid:function(){return this._urlInput.isValid();},_connectTagEvents:function(){this.inherited(arguments);this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"onmousedown",this._selectTag);}));},_selectTag:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag){this.editor._sCall("selectElement",[t]);}}},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}if(args&&args.textInput){args.textInput=args.textInput.replace(/"/g,"&quot;");}return args;},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_abd.get(t,"src")){var _ad6=this.editor;this.editor._sCall("selectElement",[t]);_ad6.onDisplayChanged();if(_ad6._updateTimer){_ad6._updateTimer.remove();delete _ad6._updateTimer;}_ad6.onNormalizedDisplayChanged();var _ad7=this.button;setTimeout(function(){_ad7.set("disabled",false);_ad7.loadAndOpenDropDown().then(function(){if(_ad7.dropDown.focus){_ad7.dropDown.focus();}});},10);}}}});_ac1.registry["createLink"]=function(){return new _ac4({command:"createLink"});};_ac1.registry["insertImage"]=function(){return new _ad5({command:"insertImage"});};_ac4.ImgLinkDialog=_ad5;return _ac4;});},"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(_ad8,_ad9,_ada){var base=null;return _ad8("dojo.store.Memory",base,{constructor:function(_adb){for(var i in _adb){this[i]=_adb[i];}this.setData(this.data||[]);},data:null,idProperty:"id",index:null,queryEngine:_ada,get:function(id){return this.data[this.index[id]];},getIdentity:function(_adc){return _adc[this.idProperty];},put:function(_add,_ade){var data=this.data,_adf=this.index,_ae0=this.idProperty;var id=_add[_ae0]=(_ade&&"id" in _ade)?_ade.id:_ae0 in _add?_add[_ae0]:Math.random();if(id in _adf){if(_ade&&_ade.overwrite===false){throw new Error("Object already exists");}data[_adf[id]]=_add;}else{_adf[id]=data.push(_add)-1;}return id;},add:function(_ae1,_ae2){(_ae2=_ae2||{}).overwrite=false;return this.put(_ae1,_ae2);},remove:function(id){var _ae3=this.index;var data=this.data;if(id in _ae3){data.splice(_ae3[id],1);this.setData(data);return true;}},query:function(_ae4,_ae5){return _ad9(this.queryEngine(_ae4,_ae5)(this.data));},setData:function(data){if(data.items){this.idProperty=data.identifier;data=this.data=data.items;}else{this.data=data;}this.index={};for(var i=0,l=data.length;i<l;i++){this.index[data[i][this.idProperty]]=i;}}});});},"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n","dijit/form/MappedTextBox":function(){define("dijit/form/MappedTextBox",["dojo/_base/declare","dojo/dom-construct","./ValidationTextBox"],function(_ae6,_ae7,_ae8){return _ae6("dijit.form.MappedTextBox",_ae8,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},_setNameAttr:null,serialize:function(val){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.get("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=_ae7.place("<input type='hidden'"+(this.name?" name=\""+this.name.replace(/"/g,"&quot;")+"\"":"")+"/>",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});});},"dijit/form/DataList":function(){define("dijit/form/DataList",["dojo/_base/declare","dojo/dom","dojo/_base/lang","dojo/query","dojo/store/Memory","../registry"],function(_ae9,dom,lang,_aea,_aeb,_aec){function _aed(_aee){return {id:_aee.value,value:_aee.value,name:lang.trim(_aee.innerText||_aee.textContent||"")};};return _ae9("dijit.form.DataList",_aeb,{constructor:function(_aef,_af0){this.domNode=dom.byId(_af0);lang.mixin(this,_aef);if(this.id){_aec.add(this);}this.domNode.style.display="none";this.inherited(arguments,[{data:_aea("option",this.domNode).map(_aed)}]);},destroy:function(){_aec.remove(this.id);},fetchSelectedItem:function(){var _af1=_aea("> option[selected]",this.domNode)[0]||_aea("> option",this.domNode)[0];return _af1&&_aed(_af1);}});});},"dojox/grid/_FocusManager":function(){define("dojox/grid/_FocusManager",["dojo/_base/array","dojo/_base/lang","dojo/_base/declare","dojo/_base/connect","dojo/_base/event","dojo/_base/sniff","dojo/query","./util","dojo/_base/html"],function(_af2,lang,_af3,_af4,_af5,has,_af6,util,html){return _af3("dojox.grid._FocusManager",null,{constructor:function(_af7){this.grid=_af7;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(_af4.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(_af4.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(_af4.connect(this.grid.domNode,"mousedown",this,"_mouseDown"));this._connects.push(_af4.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));this._connects.push(_af4.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(_af4.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(_af4.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(_af4.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(_af4.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){_af2.forEach(this._connects,_af4.disconnect);_af2.forEach(this._headerConnects,_af4.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders();},isFocusCell:function(_af8,_af9){return (this.cell==_af8)&&(this.rowIndex==_af9);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return _af2.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_afa){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){html.toggleClass(n,this.focusClass,_afa);if(_afa){var sl=this.scrollIntoView();try{if(has("webkit")||!this.grid.edit.isEditing()){util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid.focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){html.toggleClass(n,this.focusClass,true);if(this._colHeadNode){this.blurHeader();}util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();}},_initColumnHeaders:function(){_af2.forEach(this._headerConnects,_af4.disconnect);this._headerConnects=[];var _afb=this._findHeaderCells();for(var i=0;i<_afb.length;i++){this._headerConnects.push(_af4.connect(_afb[i],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(_af4.connect(_afb[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _afc=_af6("th",this.grid.viewsHeaderNode);var _afd=[];for(var i=0;i<_afc.length;i++){var _afe=_afc[i];var _aff=html.hasAttr(_afe,"tabIndex");var _b00=html.attr(_afe,"tabIndex");if(_aff&&_b00<0){_afd.push(_afe);}}return _afd;},_setActiveColHeader:function(_b01,_b02,_b03){this.grid.domNode.setAttribute("aria-activedescendant",_b01.id);if(_b03!=null&&_b03>=0&&_b03!=_b02){html.toggleClass(this._findHeaderCells()[_b03],this.focusClass,false);}html.toggleClass(_b01,this.focusClass,true);this._colHeadNode=_b01;this._colHeadFocusIdx=_b02;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_b04){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_b04?_b04:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_b05){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_b05);if(!cell){return;}info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _b06=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_b06){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(has("ie")<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _b07=this.focusView;if(!_b07){for(var i=0,_b08;(_b08=this.grid.views.views[i]);i++){if(_b08.headerNode){_b07=_b08;break;}}}return (_b07&&html.getComputedStyle(_b07.headerNode).display=="none");},colSizeAdjust:function(e,_b09,_b0a){var _b0b=this._findHeaderCells();var view=this.focusView;if(!view||!view.header.tableMap.map){for(var i=0,_b0c;(_b0c=this.grid.views.views[i]);i++){if(_b0c.header.tableMap.map){view=_b0c;break;}}}var _b0d=_b0b[_b09];if(!view||(_b09==_b0b.length-1&&_b09===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_b0d;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _b0e={l:_b0a};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_b0e);view.update();}},styleRow:function(_b0f){return;},setFocusIndex:function(_b10,_b11){this.setFocusCell(this.grid.getCell(_b11),_b10);},setFocusCell:function(_b12,_b13){if(_b12&&!this.isFocusCell(_b12,_b13)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_b12;this.rowIndex=_b13;this._focusifyCellNode(true);}if(has("opera")){setTimeout(lang.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _b14=this.grid.getCell(col);if(!this.isLastFocusCell()&&(!_b14.editable||this.grid.canEdit&&!this.grid.canEdit(_b14,row))){this.cell=_b14;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _b15=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_b15.editable){this.cell=_b15;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_b16,_b17){var _b18=_b17<0?-1:1;if(this.isNavHeader()){var _b19=this._findHeaderCells();var _b1a=currentIdx=_af2.indexOf(_b19,this._colHeadNode);currentIdx+=_b17;while(currentIdx>=0&&currentIdx<_b19.length&&_b19[currentIdx].style.display=="none"){currentIdx+=_b18;}if((currentIdx>=0)&&(currentIdx<_b19.length)){this._setActiveColHeader(_b19[currentIdx],currentIdx,_b1a);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_b16));if(_b16){if(_b16>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_b16<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_b17));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_b18;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}var n=cell.getNode(row);if(!n&&_b16){if((row+_b16)>=0&&(row+_b16)<=rc){this.move(_b16>0?++_b16:--_b16,_b17);}return;}else{if((!n||html.style(n,"display")==="none")&&_b17){if((col+_b17)>=0&&(col+_b17)<=cc){this.move(_b16,_b17>0?++_b17:--_b17);}return;}}this.setFocusIndex(row,col);if(_b16){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){_af5.stop(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();_af5.stop(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){html.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _b1b=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();_af5.stop(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){_af5.stop(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_b1c){this.tabbingOut=true;_b1c.focus();},focusGridView:function(){util.fire(this.focusView,"focus");},focusGrid:function(_b1d){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _b1e=true;var _b1f=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_b1f){var _b20=0;var cell=this.grid.getCell(_b20);if(cell.hidden){_b20=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_b20);}else{if(this.cell&&!_b1f){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_b1e=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _b1e;},focusHeader:function(){var _b21=this._findHeaderCells();var _b22=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_b21[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_b21.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_b21[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_b22);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){html.removeClass(this._colHeadNode,this.focusClass);html.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _b23=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_b23);this._contextMenuBindNode=_b23;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){_af5.stop(e);return;}if(this._clickFocus){return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;_af5.stop(e);},doBlur:function(e){_af5.stop(e);},doContextMenu:function(e){if(!this.headerMenu){_af5.stop(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;_af5.stop(e);},doLastNodeBlur:function(e){_af5.stop(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,html.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());_af5.stop(e);},doColHeaderBlur:function(e){html.toggleClass(e.target,this.focusClass,false);},_mouseDown:function(e){this._clickFocus=dojo.some(this.grid.views.views,function(v){return v.scrollboxNode===e.target;});},_mouseUp:function(e){this._clickFocus=false;}});});},"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n","esri/layers/SnapshotMode":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/SpatialReference","esri/tasks/query","esri/layers/RenderMode"],function(_b24,lang,has,_b25,_b26,_b27,_b28){var _b29=_b24([_b28],{declaredClass:"esri.layers._SnapshotMode",constructor:function(_b2a){this.featureLayer=_b2a;this._featureMap={};this._drawFeatures=lang.hitch(this,this._drawFeatures);this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},startup:function(){if(this.featureLayer._collection){this._applyTimeFilter();}else{this._fetchAll();}},propertyChangeHandler:function(type){if(this._init){if(type){if(this.featureLayer._collection){console.log("FeatureLayer: layer created by value (from a feature collection) does not support definition expressions and time definitions. Layer id = "+this.featureLayer.id);}else{this._fetchAll();}}else{this._applyTimeFilter();}}},drawFeature:function(_b2b){var _b2c=this.featureLayer,_b2d=_b2c.objectIdField,oid=_b2b.attributes[_b2d];this._addFeatureIIf(oid,_b2b);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _b2e=this.featureLayer;if(_b2e._collection){_b2e._fireUpdateStart();_b2e._refresh(true);_b2e._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_b2f){var id="_"+_b2f.name+_b2f.layerId+_b2f._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _b30=this.featureLayer;if(_b30._collection){return;}_b30._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_b31=this.featureLayer,_b32=_b31.getDefinitionExpression();var _b33=new _b27();_b33.outFields=_b31.getOutFields();_b33.where=_b32||"1=1";_b33.returnGeometry=true;_b33.outSpatialReference=new _b26(map.spatialReference.toJson());_b33.timeExtent=_b31.getTimeDefinition();_b33.maxAllowableOffset=_b31._maxOffset;if(_b31._ts){_b33._ts=(new Date()).getTime();}var _b34;if(_b31._usePatch){_b34=this._getRequestId(_b31);this._cancelPendingRequest(null,_b34);}_b31._task.execute(_b33,this._drawFeatures,this._queryErrorHandler,_b34);},_drawFeatures:function(_b35){this._purgeRequests();var _b36=_b35.features,_b37=this.featureLayer,_b38=_b37.objectIdField,i,len=_b36.length,_b39,oid;for(i=0;i<len;i++){_b39=_b36[i];oid=_b39.attributes[_b38];this._addFeatureIIf(oid,_b39);this._incRefCount(oid);}this._applyTimeFilter(true);_b37._fireUpdateEnd(null,_b35.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_b35.exceededTransferLimit){_b37.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _b3a=this.featureLayer;_b3a._errorHandler(err);_b3a._fireUpdateEnd(err);}});if(has("extend-esri")){lang.setObject("layers._SnapshotMode",_b29,_b25);}return _b29;});},"dijit/form/_Spinner":function(){require({cache:{"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n"}});define("dijit/form/_Spinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/mouse","../typematic","./RangeBoundTextBox","dojo/text!./templates/Spinner.html","./_TextBoxMixin"],function(_b3b,_b3c,keys,lang,has,_b3d,_b3e,_b3f,_b40,_b41){return _b3b("dijit.form._Spinner",_b3f,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:_b40,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{"upArrowNode":"dijitUpArrowButton","downArrowNode":"dijitDownArrowButton"},adjust:function(val){return val;},_arrowPressed:function(_b42,_b43,_b44){if(this.disabled||this.readOnly){return;}this._setValueAttr(this.adjust(this.get("value"),_b43*_b44),false);_b41.selectInputText(this.textbox,this.textbox.value.length);},_arrowReleased:function(){this._wheelTimer=null;},_typematicCallback:function(_b45,node,evt){var inc=this.smallDelta;if(node==this.textbox){var key=evt.charOrCode;inc=(key==keys.PAGE_UP||key==keys.PAGE_DOWN)?this.largeDelta:this.smallDelta;node=(key==keys.UP_ARROW||key==keys.PAGE_UP)?this.upArrowNode:this.downArrowNode;}if(_b45==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1,inc);}},_wheelTimer:null,_mouseWheeled:function(evt){_b3c.stop(evt);var _b46=evt.wheelDelta/120;if(Math.floor(_b46)!=_b46){_b46=evt.wheelDelta>0?1:-1;}var _b47=evt.detail?(evt.detail*-1):_b46;if(_b47!==0){var node=this[(_b47>0?"upArrowNode":"downArrowNode")];this._arrowPressed(node,_b47,this.smallDelta);if(this._wheelTimer){this._wheelTimer.remove();}this._wheelTimer=this.defer(function(){this._arrowReleased(node);},50);}},_setConstraintsAttr:function(_b48){this.inherited(arguments);if(this.focusNode){if(this.constraints.min!==undefined){this.focusNode.setAttribute("aria-valuemin",this.constraints.min);}else{this.focusNode.removeAttribute("aria-valuemin");}if(this.constraints.max!==undefined){this.focusNode.setAttribute("aria-valuemax",this.constraints.max);}else{this.focusNode.removeAttribute("aria-valuemax");}}},_setValueAttr:function(_b49,_b4a){this.focusNode.setAttribute("aria-valuenow",_b49);this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,_b3d.wheel,"_mouseWheeled");this.own(_b3e.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b3e.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b3e.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b3e.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));}});});},"dijit/MenuItem":function(){require({cache:{"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"}});define("dijit/MenuItem",["dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/kernel","dojo/sniff","./_Widget","./_TemplatedMixin","./_Contained","./_CssStateMixin","dojo/text!./templates/MenuItem.html"],function(_b4b,dom,_b4c,_b4d,_b4e,has,_b4f,_b50,_b51,_b52,_b53){return _b4b("dijit.MenuItem",[_b4f,_b50,_b51,_b52],{templateString:_b53,baseClass:"dijitMenuItem",label:"",_setLabelAttr:function(val){this.containerNode.innerHTML=val;this._set("label",val);if(this.textDir==="auto"){this.applyTextDir(this.focusNode,this.label);}},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:false,_fillContent:function(_b54){if(_b54&&!("label" in this.params)){this.set("label",_b54.innerHTML);}},buildRendering:function(){this.inherited(arguments);var _b55=this.id+"_text";_b4c.set(this.containerNode,"id",_b55);if(this.accelKeyNode){_b4c.set(this.accelKeyNode,"id",this.id+"_accel");_b55+=" "+this.id+"_accel";}this.domNode.setAttribute("aria-labelledby",_b55);dom.setSelectable(this.domNode,false);},onClick:function(){},focus:function(){try{if(has("ie")==8){this.containerNode.focus();}this.focusNode.focus();}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_b56){_b4d.toggle(this.domNode,"dijitMenuItemSelected",_b56);},setLabel:function(_b57){_b4e.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_b57);},setDisabled:function(_b58){_b4e.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_b58);},_setDisabledAttr:function(_b59){this.focusNode.setAttribute("aria-disabled",_b59?"true":"false");this._set("disabled",_b59);},_setAccelKeyAttr:function(_b5a){this.accelKeyNode.style.display=_b5a?"":"none";this.accelKeyNode.innerHTML=_b5a;_b4c.set(this.containerNode,"colSpan",_b5a?"1":"2");this._set("accelKey",_b5a);},_setTextDirAttr:function(_b5b){if(!this._created||this.textDir!=_b5b){this._set("textDir",_b5b);this.applyTextDir(this.focusNode,this.label);}}});});},"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n","dijit/form/NumberSpinner":function(){define("dijit/form/NumberSpinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","./_Spinner","./NumberTextBox"],function(_b5c,_b5d,keys,_b5e,_b5f){return _b5c("dijit.form.NumberSpinner",[_b5e,_b5f.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(val,_b60){var tc=this.constraints,v=isNaN(val),_b61=!isNaN(tc.max),_b62=!isNaN(tc.min);if(v&&_b60!=0){val=(_b60>0)?_b62?tc.min:_b61?tc.max:0:_b61?this.constraints.max:_b62?tc.min:0;}var _b63=val+_b60;if(v||isNaN(_b63)){return val;}if(_b61&&(_b63>tc.max)){_b63=tc.max;}if(_b62&&(_b63<tc.min)){_b63=tc.min;}return _b63;},_onKeyPress:function(e){if((e.charOrCode==keys.HOME||e.charOrCode==keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.get("value")!="undefined"){var _b64=this.constraints[(e.charOrCode==keys.HOME?"min":"max")];if(typeof _b64=="number"){this._setValueAttr(_b64,false);}_b5d.stop(e);}}});});},"dijit/form/FilteringSelect":function(){define("dijit/form/FilteringSelect",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/lang","dojo/when","./MappedTextBox","./ComboBoxMixin"],function(_b65,_b66,lang,when,_b67,_b68){return _b66("dijit.form.FilteringSelect",[_b67,_b68],{required:true,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened;},isValid:function(){return !!this.item||(!this.required&&this.get("displayedValue")=="");},_refreshState:function(){if(!this.searchTimer){this.inherited(arguments);}},_callbackSetLabel:function(_b69,_b6a,_b6b,_b6c){if((_b6a&&_b6a[this.searchAttr]!==this._lastQuery)||(!_b6a&&_b69.length&&this.store.getIdentity(_b69[0])!=this._lastQuery)){return;}if(!_b69.length){this.set("value","",_b6c||(_b6c===undefined&&!this.focused),this.textbox.value,null);}else{this.set("item",_b69[0],_b6c);}},_openResultList:function(_b6d,_b6e,_b6f){if(_b6e[this.searchAttr]!==this._lastQuery){return;}this.inherited(arguments);if(this.item===undefined){this.validate(true);}},_getValueAttr:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValueAttr:function(_b70,_b71,_b72,item){if(!this._onChangeActive){_b71=null;}if(item===undefined){if(_b70===null||_b70===""){_b70="";if(!lang.isString(_b72)){this._setDisplayedValueAttr(_b72||"",_b71);return;}}var self=this;this._lastQuery=_b70;when(this.store.get(_b70),function(item){self._callbackSetLabel(item?[item]:[],undefined,undefined,_b71);});}else{this.valueNode.value=_b70;this.inherited(arguments);}},_setItemAttr:function(item,_b73,_b74){this.inherited(arguments);this._lastDisplayedValue=this.textbox.value;},_getDisplayQueryString:function(text){return text.replace(/([\\\*\?])/g,"\\$1");},_setDisplayedValueAttr:function(_b75,_b76){if(_b75==null){_b75="";}if(!this._created){if(!("displayedValue" in this.params)){return;}_b76=false;}if(this.store){this.closeDropDown();var _b77=lang.clone(this.query);var qs=this._getDisplayQueryString(_b75),q;if(this.store._oldAPI){q=qs;}else{q=_b65.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=_b77[this.searchAttr]=q;this.textbox.value=_b75;this._lastDisplayedValue=_b75;this._set("displayedValue",_b75);var _b78=this;var _b79={ignoreCase:this.ignoreCase,deep:true};lang.mixin(_b79,this.fetchProperties);this._fetchHandle=this.store.query(_b77,_b79);when(this._fetchHandle,function(_b7a){_b78._fetchHandle=null;_b78._callbackSetLabel(_b7a||[],_b77,_b79,_b76);},function(err){_b78._fetchHandle=null;if(!_b78._cancelingQuery){console.error("dijit.form.FilteringSelect: "+err.toString());}});}},undo:function(){this.set("displayedValue",this._lastDisplayedValue);}});});},"dijit/form/SimpleTextarea":function(){define("dijit/form/SimpleTextarea",["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(_b7b,_b7c,has,_b7d){return _b7b("dijit.form.SimpleTextarea",_b7d,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"<textarea ${!nameAttrSetting} data-dojo-attach-point='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef){this.value=this.srcNodeRef.value;}this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);if(has("ie")&&this.cols){_b7c.add(this.textbox,"dijitTextAreaCols");}},filter:function(_b7e){if(_b7e){_b7e=_b7e.replace(/\r/g,"");}return this.inherited(arguments);},_onInput:function(e){if(this.maxLength){var _b7f=parseInt(this.maxLength);var _b80=this.textbox.value.replace(/\r/g,"");var _b81=_b80.length-_b7f;if(_b81>0){var _b82=this.textbox;if(_b82.selectionStart){var pos=_b82.selectionStart;var cr=0;if(has("opera")){cr=(this.textbox.value.substring(0,pos).match(/\r/g)||[]).length;}this.textbox.value=_b80.substring(0,pos-_b81-cr)+_b80.substring(pos-cr);_b82.setSelectionRange(pos-_b81,pos-_b81);}else{if(this.ownerDocument.selection){_b82.focus();var _b83=this.ownerDocument.selection.createRange();_b83.moveStart("character",-_b81);_b83.text="";_b83.select();}}}}this.inherited(arguments);}});});},"esri/dijit/editing/tools/Selection":function(){define("esri/dijit/editing/tools/Selection",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/Color","dojo/has","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/dijit/editing/tools/Edit","esri/dijit/editing/tools/SelectionTools","esri/dijit/editing/tools/DropDownToolBase","esri/kernel"],function(_b84,lang,_b85,_b86,_b87,has,_b88,_b89,_b8a,Edit,_b8b,_b8c,_b8d){var _b8e=_b84([_b8c],{declaredClass:"esri.dijit.editing.tools.Selection",_enabled:true,activate:function(){this.inherited(arguments);this._sConnect=_b86.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd");},deactivate:function(){this.inherited(arguments);_b86.disconnect(this._sConnect);delete this._sConnect;},_initializeTool:function(){this._createSymbols();this._initializeLayers();this._toolTypes=["select","selectadd","selectremove"];},_onDrawEnd:function(_b8f){this.inherited(arguments);this._settings.editor._hideAttributeInspector();var _b90=this._settings.layers;this._selectMethod=this._activeTool._selectMethod;this._settings.editor._selectionHelper.selectFeaturesByGeometry(_b90,_b8f,this._selectMethod,lang.hitch(this,"onFinished"));},_createSymbols:function(){this._pointSelectionSymbol=new _b88(_b88.STYLE_CIRCLE,10,new _b89(_b89.STYLE_SOLID,new _b87([0,0,0]),1),new _b87([255,0,0,0.5]));this._polylineSelectionSymbol=new _b89(_b89.STYLE_SOLID,new _b87([0,200,255]),2);this._polygonSelectionSymbol=new _b8a(_b8a.STYLE_SOLID,new _b89(_b89.STYLE_SOLID,new _b87([0,0,0]),1),new _b87([0,200,255,0.5]));},_initializeLayers:function(){var _b91=this._settings.layers;_b85.forEach(_b91,this._setSelectionSymbol,this);},_setSelectionSymbol:function(_b92){var _b93=null;switch(_b92.geometryType){case "esriGeometryPoint":_b93=this._pointSelectionSymbol;break;case "esriGeometryPolyline":_b93=this._polylineSelectionSymbol;break;case "esriGeometryPolygon":_b93=this._polygonSelectionSymbol;break;}_b92.setSelectionSymbol(_b92._selectionSymbol||_b93);},_createTools:function(){_b85.forEach(this._toolTypes,this._createTool,this);this.inherited(arguments);},_createTool:function(_b94){var _b95=lang.mixin(_b8b[_b94],{settings:this._settings,onClick:lang.hitch(this,"onItemClicked",_b8b[_b94].id)});this._tools[_b94.toUpperCase()]=new Edit(_b95);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Selection",_b8e,_b8d);}return _b8e;});},"dijit/_editor/plugins/TextColor":function(){define("dijit/_editor/plugins/TextColor",["require","dojo/colors","dojo/_base/declare","dojo/_base/lang","../_Plugin","../../form/DropDownButton"],function(_b96,_b97,_b98,lang,_b99,_b9a){var _b9b=_b98("dijit._editor.plugins.TextColor",_b99,{buttonClass:_b9a,useDefaultCommand:false,_initButton:function(){this.inherited(arguments);var self=this;this.button.loadDropDown=function(_b9c){_b96(["../../ColorPalette"],lang.hitch(this,function(_b9d){this.dropDown=new _b9d({dir:self.editor.dir,ownerDocument:self.editor.ownerDocument,value:self.value,onChange:function(_b9e){self.editor.execCommand(self.command,_b9e);}});_b9c();}));};},updateState:function(){var _b9f=this.editor;var _ba0=this.command;if(!_b9f||!_b9f.isLoaded||!_ba0.length){return;}if(this.button){var _ba1=this.get("disabled");this.button.set("disabled",_ba1);if(_ba1){return;}var _ba2;try{_ba2=_b9f.queryCommandValue(_ba0)||"";}catch(e){_ba2="";}}if(_ba2==""){_ba2="#000000";}if(_ba2=="transparent"){_ba2="#ffffff";}if(typeof _ba2=="string"){if(_ba2.indexOf("rgb")>-1){_ba2=_b97.fromRgb(_ba2).toHex();}}else{_ba2=((_ba2&255)<<16)|(_ba2&65280)|((_ba2&16711680)>>>16);_ba2=_ba2.toString(16);_ba2="#000000".slice(0,7-_ba2.length)+_ba2;}this.value=_ba2;var _ba3=this.button.dropDown;if(_ba3&&_ba2!==_ba3.get("value")){_ba3.set("value",_ba2,false);}}});_b99.registry["foreColor"]=function(){return new _b9b({command:"foreColor"});};_b99.registry["hiliteColor"]=function(){return new _b9b({command:"hiliteColor"});};return _b9b;});},"esri/dijit/editing/Delete":function(){define("esri/dijit/editing/Delete",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase","esri/dijit/editing/Add"],function(_ba4,lang,has,_ba5,_ba6,Add){var _ba7=_ba4(_ba6,{declaredClass:"esri.dijit.editing.Delete",type:"edit",label:"Delete Features",constructor:function(_ba8){_ba8=_ba8||{};this._add=new Add({featureLayer:_ba8.featureLayer,addedGraphics:_ba8.deletedGraphics});},performUndo:function(){this._add.performRedo();},performRedo:function(){this._add.performUndo();}});if(has("extend-esri")){lang.setObject("dijit.editing.Delete",_ba7,_ba5);}return _ba7;});},"dijit/_MenuBase":function(){define("dijit/_MenuBase",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/lang","dojo/mouse","dojo/on","dojo/window","./a11yclick","./popup","./registry","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_ba9,_baa,dom,_bab,_bac,lang,_bad,on,_bae,_baf,pm,_bb0,_bb1,_bb2,_bb3){return _baa("dijit._MenuBase",[_bb1,_bb3,_bb2],{parentMenu:null,popupDelay:500,autoFocus:false,childSelector:function(node){var _bb4=_bb0.byNode(node);return node.parentNode==this.containerNode&&_bb4&&_bb4.focus;},postCreate:function(){var self=this,_bb5=typeof this.childSelector=="string"?this.childSelector:lang.hitch(this,"childSelector");this.own(on(this.containerNode,on.selector(_bb5,_bad.enter),function(){self.onItemHover(_bb0.byNode(this));}),on(this.containerNode,on.selector(_bb5,_bad.leave),function(){self.onItemUnhover(_bb0.byNode(this));}),on(this.containerNode,on.selector(_bb5,_baf),function(evt){self.onItemClick(_bb0.byNode(this),evt);evt.stopPropagation();evt.preventDefault();}));this.inherited(arguments);},onExecute:function(){},onCancel:function(){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.onItemClick(this.focusedChild,evt);}else{var _bb6=this._getTopMenu();if(_bb6&&_bb6._isMenuBar){_bb6.focusNext();}}},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _bb7=this.currentPopup.parentMenu;if(_bb7.focusedChild){_bb7.focusedChild._setSelected(false);}_bb7.focusedChild=this.currentPopup.from_item;_bb7.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=this.defer("_openPopup",this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;item._set("hovering",true);},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _bb8=item.popup;if(_bb8){this._stopPendingCloseTimer(_bb8);_bb8._pendingClose_timer=this.defer(function(){_bb8._pendingClose_timer=null;if(_bb8.parentMenu){_bb8.parentMenu.currentPopup=null;}pm.close(_bb8);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}item._set("hovering",false);},_stopPopupTimer:function(){if(this.hover_timer){this.hover_timer=this.hover_timer.remove();}},_stopPendingCloseTimer:function(_bb9){if(_bb9._pendingClose_timer){_bb9._pendingClose_timer=_bb9._pendingClose_timer.remove();}},_stopFocusTimer:function(){if(this._focus_timer){this._focus_timer=this._focus_timer.remove();}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.disabled){return false;}if(item.popup){this._openPopup(evt.type=="keypress");}else{this.onExecute();item._onClick?item._onClick(evt):item.onClick(evt);}},_openPopup:function(_bba){this._stopPopupTimer();var _bbb=this.focusedChild;if(!_bbb){return;}var _bbc=_bbb.popup;if(!_bbc.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);pm.close(this.currentPopup);}_bbc.parentMenu=this;_bbc.from_item=_bbb;var self=this;pm.open({parent:this,popup:_bbc,around:_bbb.domNode,orient:this._orient||["after","before"],onCancel:function(){self.focusChild(_bbb);self._cleanUp();_bbb._setSelected(true);self.focusedChild=_bbb;},onExecute:lang.hitch(this,"_cleanUp")});this.currentPopup=_bbc;_bbc.connect(_bbc.domNode,"onmouseenter",lang.hitch(self,"_onPopupHover"));}if(_bba&&_bbc.focus){_bbc._focus_timer=this.defer(lang.hitch(_bbc,function(){this._focus_timer=null;this.focus();}));}},_markActive:function(){this.isActive=true;_bac.replace(this.domNode,"dijitMenuActive","dijitMenuPassive");},onOpen:function(){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;_bac.replace(this.domNode,"dijitMenuPassive","dijitMenuActive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){if(_ba9.indexOf(this._focusManager.activeStack,this.id)>=0){_bab.set(this.focusedChild.focusNode,"tabIndex",this.tabIndex);this.focusedChild.focusNode.focus();}pm.close(this.currentPopup);this.currentPopup=null;}if(this.focusedChild){this.focusedChild._setSelected(false);this.onItemUnhover(this.focusedChild);this.focusedChild=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this.onItemUnhover(this._hoveredChild);}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});});},"dijit/_editor/selection":function(){define("dijit/_editor/selection",["dojo/dom","dojo/_base/lang","dojo/sniff","dojo/_base/window","../main"],function(dom,lang,has,win,_bbd){var _bbe={getType:function(){if(win.doc.getSelection){var _bbf="text";var oSel;try{oSel=win.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _bc0=oSel.getRangeAt(0);if((_bc0.startContainer==_bc0.endContainer)&&((_bc0.endOffset-_bc0.startOffset)==1)&&(_bc0.startContainer.nodeType!=3)){_bbf="control";}}return _bbf;}else{return win.doc.selection.type.toLowerCase();}},getSelectedText:function(){if(win.doc.getSelection){var _bc1=win.global.getSelection();return _bc1?_bc1.toString():"";}else{if(_bbd._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().text;}},getSelectedHtml:function(){if(win.doc.getSelection){var _bc2=win.global.getSelection();if(_bc2&&_bc2.rangeCount){var i;var html="";for(i=0;i<_bc2.rangeCount;i++){var frag=_bc2.getRangeAt(i).cloneContents();var div=win.doc.createElement("div");div.appendChild(frag);html+=div.innerHTML;}return html;}return null;}else{if(_bbd._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().htmlText;}},getSelectedElement:function(){if(_bbd._editor.selection.getType()=="control"){if(win.doc.getSelection){var _bc3=win.global.getSelection();return _bc3.anchorNode.childNodes[_bc3.anchorOffset];}else{var _bc4=win.doc.selection.createRange();if(_bc4&&_bc4.item){return win.doc.selection.createRange().item(0);}}}return null;},getParentElement:function(){if(_bbd._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(win.doc.getSelection){var _bc5=win.global.getSelection();if(_bc5){var node=_bc5.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}else{var r=win.doc.selection.createRange();r.collapse(true);return r.parentElement();}}return null;},hasAncestorElement:function(_bc6){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_bc7){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _bc8=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _bc9=String(tags[i]).toLowerCase();if(_bc8==_bc9){return _bc9;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},collapse:function(_bca){if(win.doc.getSelection){var _bcb=win.global.getSelection();if(_bcb.removeAllRanges){if(_bca){_bcb.collapseToStart();}else{_bcb.collapseToEnd();}}else{_bcb.collapse(_bca);}}else{var _bcc=win.doc.selection.createRange();_bcc.collapse(_bca);_bcc.select();}},remove:function(){var sel=win.doc.selection;if(win.doc.getSelection){sel=win.global.getSelection();sel.deleteFromDocument();return sel;}else{if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}},selectElementChildren:function(_bcd,_bce){var doc=win.doc;var _bcf;_bcd=dom.byId(_bcd);if(win.doc.getSelection){var _bd0=win.global.getSelection();if(has("opera")){if(_bd0.rangeCount){_bcf=_bd0.getRangeAt(0);}else{_bcf=doc.createRange();}_bcf.setStart(_bcd,0);_bcf.setEnd(_bcd,(_bcd.nodeType==3)?_bcd.length:_bcd.childNodes.length);_bd0.addRange(_bcf);}else{_bd0.selectAllChildren(_bcd);}}else{_bcf=_bcd.ownerDocument.body.createTextRange();_bcf.moveToElementText(_bcd);if(!_bce){try{_bcf.select();}catch(e){}}}},selectElement:function(_bd1,_bd2){var _bd3;_bd1=dom.byId(_bd1);var doc=_bd1.ownerDocument;var _bd4=win.global;if(doc.getSelection){var _bd5=_bd4.getSelection();_bd3=doc.createRange();if(_bd5.removeAllRanges){if(has("opera")){if(_bd5.getRangeAt(0)){_bd3=_bd5.getRangeAt(0);}}_bd3.selectNode(_bd1);_bd5.removeAllRanges();_bd5.addRange(_bd3);}}else{try{var tg=_bd1.tagName?_bd1.tagName.toLowerCase():"";if(tg==="img"||tg==="table"){_bd3=win.body(doc).createControlRange();}else{_bd3=win.body(doc).createRange();}_bd3.addElement(_bd1);if(!_bd2){_bd3.select();}}catch(e){this.selectElementChildren(_bd1,_bd2);}}},inSelection:function(node){if(node){var _bd6;var doc=win.doc;var _bd7;if(win.doc.getSelection){var sel=win.global.getSelection();if(sel&&sel.rangeCount>0){_bd7=sel.getRangeAt(0);}if(_bd7&&_bd7.compareBoundaryPoints&&doc.createRange){try{_bd6=doc.createRange();_bd6.setStart(node,0);if(_bd7.compareBoundaryPoints(_bd7.START_TO_END,_bd6)===1){return true;}}catch(e){}}}else{_bd7=doc.selection.createRange();try{_bd6=node.ownerDocument.body.createControlRange();if(_bd6){_bd6.addElement(node);}}catch(e1){try{_bd6=node.ownerDocument.body.createTextRange();_bd6.moveToElementText(node);}catch(e2){}}if(_bd7&&_bd6){if(_bd7.compareEndPoints("EndToStart",_bd6)===1){return true;}}}}return false;}};lang.setObject("dijit._editor.selection",_bbe);return _bbe;});},"esri/dijit/editing/tools/SelectionTools":function(){define(["dojo/_base/lang","dojo/has","esri/layers/FeatureLayer","esri/toolbars/draw","esri/kernel"],function(lang,has,_bd8,Draw,_bd9){var _bda={select:{id:"btnNewSelection",_enabledIcon:"toolbarIcon newSelectionIcon",_disabledIcon:"toolbarIcon newSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_bd8.SELECTION_NEW,_label:"NLS_selectionNewLbl"},selectadd:{id:"btnAddToSelection",_enabledIcon:"toolbarIcon addToSelectionIcon",_disabledIcon:"toolbarIcon addToSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_bd8.SELECTION_ADD,_label:"NLS_selectionAddLbl"},selectremove:{id:"btnSubtractFromSelection",_enabledIcon:"toolbarIcon removeFromSelectionIcon",_disabledIcon:"toolbarIcon removeFromSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_bd8.SELECTION_SUBTRACT,_label:"NLS_selectionRemoveLbl"},selectClear:{id:"btnClearSelection",_enabledIcon:"toolbarIcon clearSelectionIcon",_disabledIcon:"toolbarIcon clearSelectionIcon",_enabled:false,_label:"NLS_selectionClearLbl"}};if(has("extend-esri")){lang.setObject("dijit.editing.tools.SelectionTools",_bda,_bd9);}return _bda;});},"esri/dijit/editing/tools/ButtonToolBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/form/Button","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_bdb,lang,has,_bdc,_bdd,_bde){var BTB=_bdb([_bdc,_bdd],{declaredClass:"esri.dijit.editing.tools.ButtonToolBase",postCreate:function(){this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){_bdc.prototype.destroy.apply(this,arguments);_bdd.prototype.destroy.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.ButtonToolBase",BTB,_bde);}return BTB;});},"esri/dijit/editing/TemplatePicker":function(){define(["require","dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/html","dojo/_base/array","dojo/_base/json","dojo/_base/kernel","dojo/has","dojo/query","dojo/sniff","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojo/data/ItemFileReadStore","dojox/grid/DataGrid","dojox/gfx","esri/layers/FeatureLayer","esri/symbols/PictureMarkerSymbol","esri/dijit/editing/TemplatePickerItem","esri/kernel","esri/lang","esri/request","esri/dijit/_EventedWidget","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/editing/templates/TemplatePicker.html"],function(_bdf,_be0,lang,_be1,html,_be2,_be3,_be4,has,_be5,_be6,_be7,_be8,_be9,_bea,_beb,_bec,_bed,_bee,gfx,_bef,_bf0,_bf1,_bf2,_bf3,_bf4,_bf5,_bf6,_bf7){var TP=_be0([_bf5,_beb,_bec],{declaredClass:"esri.dijit.editing.TemplatePicker",widgetsInTemplate:true,templateString:_bf7,basePath:_bdf.toUrl("esri/dijit/editing")+"/",featureLayers:null,items:null,grouping:true,showTooltip:false,maxLabelLength:0,rows:4,_rows:0,columns:3,surfaceWidth:30,surfaceHeight:30,emptyMessage:"",useLegend:true,legendCache:{},_uniqueId:{id:0},_assumedCellWidth:90,_initialAutoWidth:300,_initialAutoHeight:200,_ieTimer:150,constructor:function(_bf8,_bf9){_bf8=_bf8||{};if(!_bf8.items&&!_bf8.featureLayers){console.error("TemplatePicker: please provide 'featureLayers' or 'items' parameter in the constructor");}this._dojo14x=(_be4.version.minor>=4);this._itemWidgets={};if(_bf8.featureLayers&&_bf8.featureLayers.length){this._flChanged=1;}this._nls=_bf6.widgets.templatePicker;this.emptyMessage=_bf8.emptyMessage||(this._nls&&this._nls.creationDisabled)||"";},postMixInProperties:function(){this.inherited(arguments);this._preprocess();},startup:function(){this.inherited(arguments);if(this.rows==="auto"&&this.columns==="auto"){var box=_be9.getContentBox(this.domNode);if(!box.w){this.domNode.style.width=this._initialAutoWidth+"px";}if(!box.h){this.domNode.style.height=this._initialAutoHeight+"px";}box=_be9.getContentBox(this.domNode);this._columns=Math.floor(box.w/this._assumedCellWidth)||1;}this._applyGridPatches();this._setGridLayout();_be1.connect(this.grid,"onRowClick",this,this._rowClicked);this._setGridData();this._toggleTooltip();if(has("ie")<9){this._repaintItems=lang.hitch(this,this._repaintItems);setTimeout(this._repaintItems,this._ieTimer);}},destroy:function(){this.showTooltip=false;this._toggleTooltip();this._clearLegendInfo();this.featureLayers=this.items=this.grid=this._flItems=this._itItems=this._groupRowIndices=this._selectedCell=this._selectedInfo=this._selectedItem=null;this.inherited(arguments);},getSelected:function(){return this._selectedCell?this._selectedItem:null;},clearSelection:function(){var _bfa=this._selectedCell,info=this._selectedInfo;if(_bfa){this._rowClicked({cellNode:_bfa,rowIndex:info.selRow,cellIndex:info.selCol});}},update:function(_bfb){var _bfc=(this.rows==="auto"&&this.columns==="auto"&&_bfb)?true:false,grid=this.grid,box;if(_bfc){var _bfd=this.domNode,id=_bfd.id,_bfe,item=_be4.query("#"+id+".templatePicker div.item")[0];box=_be9.getContentBox(_bfd);item=item&&item.parentNode;if(item){_bfe=html.coords(item).w;}else{_bfe=this._assumedCellWidth;}this._columns=Math.floor((box.w-grid.views.views[0].getScrollbarWidth())/_bfe);this._columns=this._columns||1;}var _bff=this._rows;this._preprocess();var _c00=this._rows;this._setGridLayout();this._setGridData();if(_c00!==_bff){grid.set("autoHeight",this._rows,false);}if(_bfc){grid._resize({w:box.w,h:box.h});grid.viewsHeaderNode.style.display="none";}else{grid.update();}this._toggleTooltip();var self=this,_c01=this.getSelected();if(_c01){grid.store.fetch({onComplete:function(its){var _c02=self._locate(_c01,self._selectedInfo,its);var _c03=_c02&&grid.views.views[0].getCellNode(_c02[0],_c02[1]);if(_c03){self._rowClicked({cellNode:_c03,rowIndex:_c02[0],cellIndex:_c02[1]},true);}}});}if(has("ie")<9){setTimeout(this._repaintItems,this._ieTimer);}var _c04=this.featureLayers,_c05=this.items;if((!_c04||!_c04.length)&&(!_c05||!_c05.length)&&grid&&this.emptyMessage){grid.showMessage(this.emptyMessage);}},_eventMap:{"selection-change":true},onSelectionChange:function(){},_setUseLegendAttr:function(use){var _c06=this.useLegend;if(!this._started||_c06!==use){if(use){this._flChanged=1;}else{this._clearLegendInfo();}}this.useLegend=use;},_setFeatureLayersAttr:function(_c07){var _c08=this.featureLayers;if(!this._started||_c08!==_c07){this._flChanged=1;}this.featureLayers=_c07;},_adjustRowsCols:function(_c09){if(this.rows==="auto"&&this.columns==="auto"){if(!this._started){this._rows=false;this._columns=null;this._autoWidth=false;}return;}var len=0;this._rows=this.rows;this._columns=this.columns;if(this.rows==="auto"){if(this.featureLayers){if(this.grouping){len=_c09.length;_be2.forEach(_c09,function(_c0a){len+=Math.ceil(_c0a.length/this.columns);},this);}else{_be2.forEach(_c09,function(_c0b){len+=_c0b.length;},this);len=Math.ceil(len/this.columns);}}else{len=Math.ceil(_c09.length/this.columns);}this._rows=len;}else{if(this.columns==="auto"){if(this.featureLayers){if(this.grouping){len=3;}else{_be2.forEach(_c09,function(_c0c){len+=_c0c.length;},this);len=Math.ceil(len/this.rows);}}else{len=Math.ceil(_c09.length/this.rows);}this._columns=len;}}},_preprocess:function(){if(this.items){this.grouping=false;}this._autoWidth=false;if(this.rows==="auto"||this.columns==="auto"){this._autoWidth=true;}var _c0d;if(this.featureLayers){if(this.useLegend&&this._flChanged){this._legendIndices=[];this._loadingIndices=[];this._legendSymbols={};this._ignoreLegends();this._loadingLegends=[];clearTimeout(this._legendTimer);this._legendTimer=null;this._processSelectionLayers();this._flChanged=0;}if(_be2.every(this.featureLayers,function(_c0e){return _c0e.loaded;})){_c0d=this._flItems=this._getItemsFromLayers(this.featureLayers);this._adjustRowsCols(_c0d);}else{var _c0f=this.featureLayers.length;var _c10=[];_be2.forEach(this.featureLayers,function(_c11){if(_c11.loaded){_c0f--;_c10.push(_c11);}else{var _c12=_be1.connect(_c11,"onLoad",this,function(_c13){_be1.disconnect(_c12);_c12=null;_c0f--;_c10.push(_c13);if(!_c0f){_c0d=this._flItems=this._getItemsFromLayers(_c10);this._adjustRowsCols(_c0d);this.update();}});}},this);}}else{_c0d=this._itItems=this._getItemsFromItems(this.items);this._adjustRowsCols(_c0d);}},_processSelectionLayers:function(){var map,_c14,info,_c15,key,_c16,_c17,_c18={};_be2.forEach(this.featureLayers,function(_c19,idx){if(_c19.mode===_bef.MODE_SELECTION&&_c19._map&&_c19.url&&_c19._params.drawMode&&!_c19.source){_c14=lang.trim(_c19._url.path).replace(/\/(MapServer|FeatureServer).*/ig,"/MapServer").replace(/^https?:\/\//ig,"").toLowerCase();info=(_c18[_c14]=_c18[_c14]||{});_c15=(info.featureLayers=info.featureLayers||{});_c16=(info.indices=info.indices||[]);_c15[idx]=_c19;_c16.push(idx);map=_c19._map;}});if(map){_be2.forEach(map.layerIds,function(_c1a){_c1a=map.getLayer(_c1a);if(_c1a&&_c1a.url&&(_c1a.getImageUrl||_c1a.getTileUrl)&&_c1a.loaded&&_c1a.version>=10.1){_c14=lang.trim(_c1a._url.path).replace(/(\/MapServer).*/ig,"$1");key=_c14.replace(/^https?:\/\//ig,"").toLowerCase();if(_c18[key]&&(!_c18[key].mapServiceUrl)){info=_c18[key];info.mapServiceUrl=_c14;info.mapServiceLayer=_c1a;this._legendIndices=this._legendIndices.concat(info.indices);_c17=this._fetchLegend({pickerInstance:this,info:info},key);if(_c17.then){this._loadingIndices=this._loadingIndices.concat(info.indices);this._loadingLegends.push(_c17);}else{this._processLegendResponse(_c17,info);}}}},this);}},_fetchLegend:function(_c1b,key){var _c1c=TP.prototype,_c1d=_c1c.legendCache[key];if(!_c1d){_c1d=(_c1c.legendCache[key]=_bf4({url:_c1b.info.mapServiceUrl+"/legend",content:{f:"json"},callbackParamName:"callback"}));_c1d._contexts=[_c1b];_c1d.addBoth(function(_c1e){if(_c1d.canceled){return;}_c1c.legendCache[key]=_c1e;var _c1f=_c1d._contexts;_c1d._contexts=null;_be2.forEach(_c1f,function(ctxt){var _c20=ctxt.pickerInstance,info=ctxt.info,_c21;if(_c20._destroyed){return;}_be2.forEach(info.indices,function(idx){_c21=_be2.indexOf(_c20._loadingIndices,idx);if(_c21>-1){_c20._loadingIndices.splice(_c21,1);}});_c21=_be2.indexOf(_c20._loadingLegends,_c1d);if(_c21>-1){_c20._loadingLegends.splice(_c21,1);}_c20._processLegendResponse(_c1e,info);});});}else{if(_c1d.then){_c1d._contexts.push(_c1b);}}return _c1d;},_clearLegendInfo:function(){clearTimeout(this._legendTimer);this._ignoreLegends();this._legendIndices=this._loadingIndices=this._legendSymbols=this._loadingLegends=this._legendTimer=null;},_ignoreLegends:function(){if(this._loadingLegends){_be2.forEach(this._loadingLegends,function(_c22){var _c23=-1;_be2.some(_c22._contexts,function(ctxt,idx){if(ctxt.pickerInstance===this){_c23=idx;}return (_c23>-1);},this);if(_c23>-1){_c22._contexts.splice(_c23,1);}},this);}},_processLegendResponse:function(_c24,info){if(_c24&&!(_c24 instanceof Error)){_be2.forEach(info.indices,function(idx){var _c25=info.featureLayers[idx].layerId,i,_c26=info.mapServiceUrl+"/"+_c25+"/images/",_c27=info.mapServiceLayer._getToken(),_c28,obj,_c29,url;if(this._legendSymbols[idx]){return;}_c28=null;_be2.some(_c24.layers,function(_c2a){if(_c2a.layerId==_c25){_c28=_c2a;}return !!_c28;});if(_c28){obj=(this._legendSymbols[idx]={});_be2.forEach(_c28.legend,function(_c2b){_c29=_c2b.values;if(_c29&&_c29.length){for(i=0;i<_c29.length;i++){obj[_c29[i]]=_c2b;}}else{obj.defaultSymbol=_c2b;}url=_c2b.url;if(url&&!_c2b._fixed){_c2b._fixed=1;if((url.search(/https?\:/)===-1)){_c2b.url=_c26+url;}if(_c27&&_c2b.url.search(/https?\:/)!==-1){_c2b.url+=(((_c2b.url.indexOf("?")>-1)?"&":"?")+"token="+_c27);}}});}},this);}else{var _c2c;_be2.forEach(info.indices,function(idx){_c2c=_be2.indexOf(this._legendIndices,idx);if(_c2c>-1){this._legendIndices.splice(_c2c,1);}},this);}var self=this;if(self._started&&!self._legendTimer){self._legendTimer=setTimeout(function(){clearTimeout(self._legendTimer);self._legendTimer=null;if(!self._destroyed){self.update();}},0);}},_applyGridPatches:function(){var grid=this.grid;var _c2d=grid.adaptWidth,_c2e,i,view;grid.adaptWidth=function(){_c2e=this.views.views;for(i=0;view=_c2e[i];i++){_bea.set(view.headerNode,"display","block");}_c2d.apply(this,arguments);for(i=0;view=_c2e[i];i++){_bea.set(view.headerNode,"display","none");}};if(this._dojo14x){if(this.rows!=="auto"&&this.columns!=="auto"){var _c2f=_be1.connect(grid,"_onFetchComplete",this,function(){_be1.disconnect(_c2f);this.grid.set("autoHeight",this._rows);});}_be1.connect(grid,"_onDelete",this,this._destroyItems);_be1.connect(grid,"_clearData",this,this._destroyItems);_be1.connect(grid,"destroy",this,this._destroyItems);var _c30=grid.focus;if(_c30&&_c30.findAndFocusGridCell){_c30.findAndFocusGridCell=function(){return false;};}}},_setGridLayout:function(){var _c31=function(_c32){return function(_c33,_c34){return this._cellGet(_c32,_c33,_c34);};};var _c35=lang.hitch(this,this._cellFormatter),_c36=[],cols=this._columns,i;for(i=0;i<cols;i++){_c36.push({field:"cell"+i,get:lang.hitch(this,_c31(i)),formatter:_c35});}var _c37={cells:[_c36]};if(this.grouping){var _c38={field:"groupName",colSpan:cols,get:lang.hitch(this,this._cellGetGroup),formatter:lang.hitch(this,this._cellGroupFormatter)};_c37.cells.push([_c38]);}var grid=this.grid,_c39=_bee.prototype.rowsPerPage;grid.set("rowsPerPage",(this._rows>_c39)?this._rows:_c39);grid.set("structure",_c37);},_setGridData:function(){var _c3a=[];if(this.grouping){this._groupRowIndices=[];var _c3b,_c3c,cols=this._columns;_be2.forEach(this._flItems,function(_c3d,idx){_c3a.push({});var _c3e=(idx===0)?0:(_c3b+_c3c+1);this._groupRowIndices.push(_c3e);_c3b=_c3e;_c3c=Math.ceil(_c3d.length/cols);_c3a=_c3a.concat(this._getStoreItems(_c3d));},this);}else{if(this.featureLayers){_be2.forEach(this._flItems,function(_c3f){_c3a=_c3a.concat(_c3f);});_c3a=this._getStoreItems(_c3a);}else{_c3a=this._getStoreItems(this._itItems);}}var _c40=new _bed({data:{items:_c3a}});this.grid.setStore(_c40);},_toggleTooltip:function(){if(this.showTooltip){if(this.tooltip){return;}this.tooltip=_be8.create("div",{"class":"tooltip"},this.domNode);this.tooltip.style.display="none";this.tooltip.style.position="fixed";var grid=this.grid;this._mouseOverConnect=_be1.connect(grid,"onCellMouseOver",this,this._cellMouseOver);this._mouseOutConnect=_be1.connect(grid,"onCellMouseOut",this,this._cellMouseOut);}else{if(this.tooltip){_be1.disconnect(this._mouseOverConnect);_be1.disconnect(this._mouseOutConnect);_be8.destroy(this.tooltip);this.tooltip=null;}}},_rowClicked:function(evt,_c41){var _c42=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_c42,row,col);if(!cell){return;}var _c43=this.grid.store;if(_c43.getValue(cell,"loadingCell")){return;}if(this._selectedCell){_be7.remove(this._selectedCell,"selectedItem");}if(_c42!==this._selectedCell){_be7.add(_c42,"selectedItem");this._selectedCell=_c42;this._selectedItem={featureLayer:_c43.getValue(cell,"layer"),type:_c43.getValue(cell,"type"),template:_c43.getValue(cell,"template"),symbolInfo:_c43.getValue(cell,"symbolInfo"),item:this._getItem(cell)};this._selectedInfo={selRow:row,selCol:col,index1:_c43.getValue(cell,"index1"),index2:_c43.getValue(cell,"index2"),index:_c43.getValue(cell,"index")};}else{this._selectedCell=this._selectedInfo=this._selectedItem=null;}if(!_c41){this.onSelectionChange();}},_locate:function(_c44,info,_c45){var _c46=this.grid.store,cols=new Array(this._columns);var _c47,_c48=info.index1,_c49=info.index2,_c4a=info.index,item=_c44.item;_be2.some(_c45,function(_c4b,_c4c){return _be2.some(cols,function(_c4d,_c4e){var cell=_c46.getValue(_c4b,"cell"+_c4e);if(cell&&(item?(_c4a===_c46.getValue(cell,"index")):(_c48===_c46.getValue(cell,"index1")&&_c49===_c46.getValue(cell,"index2")))){_c47=[_c4c,_c4e];return true;}else{return false;}});});return _c47;},_getCellInfo:function(_c4f,row,col){if(!_c4f){return;}var grid=this.grid;var item=grid.getItem(row);var cell=grid.store.getValue(item,"cell"+col);return cell;},_getItem:function(cell){var _c50=this.items;if(_c50){return _c50[this.grid.store.getValue(cell,"index")];}},_cellMouseOver:function(evt){var _c51=this.tooltip;var _c52=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_c52,row,col);if(_c51&&cell){var _c53=this.grid.store;var _c54=_c53.getValue(cell,"template");var type=_c53.getValue(cell,"type");var _c55=_c53.getValue(cell,"symbolInfo");var _c56=_c53.getValue(cell,"layer");var item=this._getItem(cell);var _c57=(item&&(item.label+(item.description?(": "+item.description):"")))||(_c54&&(_c54.name+(_c54.description?(": "+_c54.description):"")))||(type&&type.name)||(_c55&&(_c55.label+(_c55.description?(": "+_c55.description):"")))||((_c56&&_c56.name+": ")+"Default");_c51.style.display="none";_c51.innerHTML=_c57;var _c58=html.coords(_c52.firstChild);_bea.set(_c51,{left:(_c58.x)+"px",top:(_c58.y+_c58.h+5)+"px"});_c51.style.display="";}},_cellMouseOut:function(){var _c59=this.tooltip;if(_c59){_c59.style.display="none";}},_destroyItems:function(){var _c5a=this._itemWidgets,w;for(w in _c5a){if(!_c5a[w]){continue;}_c5a[w].destroy();delete _c5a[w];}},_repaintItems:function(){var _c5b=this._itemWidgets,w;for(w in _c5b){var _c5c=_c5b[w];if(_c5c){_c5c._repaint(_c5c._surface);}}},_getStoreItems:function(_c5d){var uid=this._uniqueId;_c5d=_be2.map(_c5d,function(item){return lang.mixin({"surfaceId":"tpick-surface-"+(uid.id++)},item);});var len=_c5d.length,_c5e=0,obj={},k=0,prop,_c5f=[],flag=true,cols=this._columns;while(_c5e<len){flag=true;prop="cell"+k;obj[prop]=_c5d[_c5e];_c5e++;k++;if(k%cols===0){flag=false;_c5f.push(obj);obj={};k=0;}}if(flag&&len){_c5f.push(obj);}return _c5f;},_getItemsFromLayers:function(_c60){var _c61=[];_be2.forEach(_c60,function(_c62,_c63){_c61.push(this._getItemsFromLayer(_c62,_c63));},this);return _c61;},_getItemsFromLayer:function(_c64,_c65){var _c66=[];if(this.useLegend&&_be2.indexOf(this._loadingIndices,_c65)>-1){return [{label:(this._nls&&this._nls.loading)||"",symbol:null,layer:_c64,type:null,template:null,index1:_c65,index2:0,loadingCell:1}];}var _c67=[];_c67=_c67.concat(_c64.templates);_be2.forEach(_c64.types,function(_c68){var _c69=_c68.templates;_be2.forEach(_c69,function(_c6a){_c6a._type_=_c68;});_c67=_c67.concat(_c69);});_c67=_be2.filter(_c67,_bf3.isDefined);var _c6b=_c64.renderer;if(_c6b){var _c6c=_c6b.declaredClass.replace("esri.renderer.","");if(_c67.length>0){_be2.forEach(_c67,function(_c6d){var _c6e=_c6d.prototype;if(_c6e){var _c6f=_c6b.getSymbol(_c6e);if(_c6f){var _c70=null,pms,_c71;if(this.useLegend&&_be2.indexOf(this._legendIndices,_c65)>-1){_c71=this._legendSymbols&&this._legendSymbols[_c65];if(_c71){switch(_c6c){case "SimpleRenderer":_c70=_c71.defaultSymbol;break;case "UniqueValueRenderer":_be2.some(_c6b.infos,function(info){if(info.symbol===_c6f){_c70=_c71[info.value];}return !!_c70;});break;case "ClassBreaksRenderer":_be2.some(_c6b.infos,function(info){if(info.symbol===_c6f){_c70=_c71[info.maxValue];}return !!_c70;});break;}}if(_c70){pms=_be3.fromJson(_be3.toJson(_bf0.defaultProps));pms.url=_c70.url;pms.imageData=_c70.imageData;pms.contentType=_c70.contentType;pms.width=_c70.width;pms.height=_c70.height;if(!_bf3.isDefined(pms.width)||!_bf3.isDefined(pms.height)){pms.width=15;pms.height=15;}_c70=new _bf0(pms);}}_c66.push({label:this._trimLabel(_c6d.name),symbol:_c70||_c6f,legendOverride:!!_c70,layer:_c64,type:_c6d._type_,template:_c6d,index1:_c65,index2:_c66.length});}}delete _c6d._type_;},this);}else{var _c72=[];if(_c6c==="TemporalRenderer"){_c6b=_c6b.observationRenderer;if(_c6b){_c6c=_c6b.declaredClass.replace("esri.renderer.","");}}switch(_c6c){case "SimpleRenderer":_c72=[{symbol:_c6b.symbol,label:_c6b.label,description:_c6b.description}];break;case "UniqueValueRenderer":case "ClassBreaksRenderer":_c72=_c6b.infos;break;}_c66=_be2.map(_c72,function(info,idx){return {label:this._trimLabel(info.label),description:info.description,symbolInfo:lang.mixin({constructor:function(){}},info),symbol:info.symbol,layer:_c64,index1:_c65,index2:idx};},this);}}return _c66;},_getItemsFromItems:function(_c73){return _be2.map(_c73,function(item,idx){item=lang.mixin({index:idx},item);item.label=this._trimLabel(item.label);return item;},this);},_trimLabel:function(_c74){var max=this.maxLabelLength;if(max&&_c74){if(_c74.length>max){_c74=_c74.substr(0,max)+"...";}}return _c74||"";},_cellGet:function(_c75,_c76,_c77){if(!_c77){return "";}return this.grid.store.getValue(_c77,"cell"+_c75);},_cellFormatter:function(_c78){if(_c78){var _c79=this._itemWidgets,_c7a=this.grid.store;var sid=_c7a.getValue(_c78,"surfaceId");var w=_c79[sid];if(!w){w=(_c79[sid]=new _bf1({id:sid,label:_c7a.getValue(_c78,"label"),symbol:_c7a.getValue(_c78,"symbol"),legendOverride:_c7a.getValue(_c78,"legendOverride"),surfaceWidth:this.surfaceWidth,surfaceHeight:this.surfaceHeight,template:_c7a.getValue(_c78,"template")}));}return w||"";}else{return "";}},_cellGetGroup:function(_c7b,_c7c){if(!this._groupRowIndices){return "";}var _c7d=_be2.indexOf(this._groupRowIndices,_c7b);if(!_c7c||_c7d===-1){return "";}return (this.featureLayers[_c7d]&&this.featureLayers[_c7d].name)||"";},_cellGroupFormatter:function(_c7e){if(_c7e){return "<div class='groupLabel'>"+_c7e+"</div>";}else{return "";}}});if(has("extend-esri")){lang.setObject("dijit.editing.TemplatePicker",TP,_bf2);}return TP;});},"dojo/data/ItemFileReadStore":function(){define(["../_base/kernel","../_base/lang","../_base/declare","../_base/array","../_base/xhr","../Evented","./util/filter","./util/simpleFetch","../date/stamp"],function(_c7f,lang,_c80,_c81,xhr,_c82,_c83,_c84,_c85){var _c86=_c80("dojo.data.ItemFileReadStore",[_c82],{constructor:function(_c87){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_c87.url;this._ccUrl=_c87.url;this.url=_c87.url;this._jsonData=_c87.data;this.data=null;this._datatypeMap=_c87.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_c88){return _c85.fromISOString(_c88);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_c87.urlPreventCache!==undefined){this.urlPreventCache=_c87.urlPreventCache?true:false;}if(_c87.hierarchical!==undefined){this.hierarchical=_c87.hierarchical?true:false;}if(_c87.clearOnClose){this.clearOnClose=true;}if("failOk" in _c87){this.failOk=_c87.failOk?true:false;}},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error(this.declaredClass+": Invalid item argument.");}},_assertIsAttribute:function(_c89){if(typeof _c89!=="string"){throw new Error(this.declaredClass+": Invalid attribute argument.");}},getValue:function(item,_c8a,_c8b){var _c8c=this.getValues(item,_c8a);return (_c8c.length>0)?_c8c[0]:_c8b;},getValues:function(item,_c8d){this._assertIsItem(item);this._assertIsAttribute(_c8d);return (item[_c8d]||[]).slice(0);},getAttributes:function(item){this._assertIsItem(item);var _c8e=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_c8e.push(key);}}return _c8e;},hasAttribute:function(item,_c8f){this._assertIsItem(item);this._assertIsAttribute(_c8f);return (_c8f in item);},containsValue:function(item,_c90,_c91){var _c92=undefined;if(typeof _c91==="string"){_c92=_c83.patternToRegExp(_c91,false);}return this._containsValue(item,_c90,_c91,_c92);},_containsValue:function(item,_c93,_c94,_c95){return _c81.some(this.getValues(item,_c93),function(_c96){if(_c96!==null&&!lang.isObject(_c96)&&_c95){if(_c96.toString().match(_c95)){return true;}}else{if(_c94===_c96){return true;}}});},isItem:function(_c97){if(_c97&&_c97[this._storeRefPropName]===this){if(this._arrayOfAllItems[_c97[this._itemNumPropName]]===_c97){return true;}}return false;},isItemLoaded:function(_c98){return this.isItem(_c98);},loadItem:function(_c99){this._assertIsItem(_c99.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},filter:function(_c9a,_c9b,_c9c){var _c9d=[],i,key;if(_c9a.query){var _c9e,_c9f=_c9a.queryOptions?_c9a.queryOptions.ignoreCase:false;var _ca0={};for(key in _c9a.query){_c9e=_c9a.query[key];if(typeof _c9e==="string"){_ca0[key]=_c83.patternToRegExp(_c9e,_c9f);}else{if(_c9e instanceof RegExp){_ca0[key]=_c9e;}}}for(i=0;i<_c9b.length;++i){var _ca1=true;var _ca2=_c9b[i];if(_ca2===null){_ca1=false;}else{for(key in _c9a.query){_c9e=_c9a.query[key];if(!this._containsValue(_ca2,key,_c9e,_ca0[key])){_ca1=false;}}}if(_ca1){_c9d.push(_ca2);}}_c9c(_c9d,_c9a);}else{for(i=0;i<_c9b.length;++i){var item=_c9b[i];if(item!==null){_c9d.push(item);}}_c9c(_c9d,_c9a);}},_fetchItems:function(_ca3,_ca4,_ca5){var self=this;if(this._loadFinished){this.filter(_ca3,this._getItemsArray(_ca3.queryOptions),_ca4);}else{if(this._jsonFileUrl!==this._ccUrl){_c7f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_ca3,filter:lang.hitch(self,"filter"),findCallback:lang.hitch(self,_ca4)});}else{this._loadInProgress=true;var _ca6={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _ca7=xhr.get(_ca6);_ca7.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;self.filter(_ca3,self._getItemsArray(_ca3.queryOptions),_ca4);self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_ca5(e,_ca3);}});_ca7.addErrback(function(_ca8){self._loadInProgress=false;_ca5(_ca8,_ca3);});var _ca9=null;if(_ca3.abort){_ca9=_ca3.abort;}_ca3.abort=function(){var df=_ca7;if(df&&df.fired===-1){df.cancel();df=null;}if(_ca9){_ca9.call(_ca3);}};}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;self.filter(_ca3,this._getItemsArray(_ca3.queryOptions),_ca4);}catch(e){_ca5(e,_ca3);}}else{_ca5(new Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),_ca3);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _caa=this._queuedFetches[i],_cab=_caa.args,_cac=_caa.filter,_cad=_caa.findCallback;if(_cac){_cac(_cab,this._getItemsArray(_cab.queryOptions),_cad);}else{this.fetchItemByIdentity(_cab);}}this._queuedFetches=[];}},_getItemsArray:function(_cae){if(_cae&&_cae.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_caf){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){console.debug(this.declaredClass+": WARNING!  Data reload "+" information has not been provided."+"  Please set 'url' or 'data' to the appropriate value before"+" the next fetch");}this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_cb0){var _cb1=false,self=this;function _cb2(_cb3){return (_cb3!==null)&&(typeof _cb3==="object")&&(!lang.isArray(_cb3)||_cb1)&&(!lang.isFunction(_cb3))&&(_cb3.constructor==Object||lang.isArray(_cb3))&&(typeof _cb3._reference==="undefined")&&(typeof _cb3._type==="undefined")&&(typeof _cb3._value==="undefined")&&self.hierarchical;};function _cb4(_cb5){self._arrayOfAllItems.push(_cb5);for(var _cb6 in _cb5){var _cb7=_cb5[_cb6];if(_cb7){if(lang.isArray(_cb7)){var _cb8=_cb7;for(var k=0;k<_cb8.length;++k){var _cb9=_cb8[k];if(_cb2(_cb9)){_cb4(_cb9);}}}else{if(_cb2(_cb7)){_cb4(_cb7);}}}}};this._labelAttr=_cb0.label;var i,item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_cb0.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(lang.isArray(item)){_cb1=true;}_cb4(item);item[this._rootItemPropName]=true;}var _cba={},key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _cbb=item[key];if(_cbb!==null){if(!lang.isArray(_cbb)){item[key]=[_cbb];}}else{item[key]=[null];}}_cba[key]=key;}}while(_cba[this._storeRefPropName]){this._storeRefPropName+="_";}while(_cba[this._itemNumPropName]){this._itemNumPropName+="_";}while(_cba[this._reverseRefMap]){this._reverseRefMap+="_";}var _cbc;var _cbd=_cb0.identifier;if(_cbd){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_cbd;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_cbc=item[_cbd];var _cbe=_cbc[0];if(!Object.hasOwnProperty.call(this._itemsByIdentity,_cbe)){this._itemsByIdentity[_cbe]=item;}else{if(this._jsonFileUrl){throw new Error(this.declaredClass+":  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_cbd+"].  Value collided: ["+_cbe+"]");}else{if(this._jsonData){throw new Error(this.declaredClass+":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_cbd+"].  Value collided: ["+_cbe+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_cbc=item[key];for(var j=0;j<_cbc.length;++j){_cbb=_cbc[j];if(_cbb!==null&&typeof _cbb=="object"){if(("_type" in _cbb)&&("_value" in _cbb)){var type=_cbb._type;var _cbf=this._datatypeMap[type];if(!_cbf){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(lang.isFunction(_cbf)){_cbc[j]=new _cbf(_cbb._value);}else{if(lang.isFunction(_cbf.deserialize)){_cbc[j]=_cbf.deserialize(_cbb._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_cbb._reference){var _cc0=_cbb._reference;if(!lang.isObject(_cc0)){_cbc[j]=this._getItemByIdentity(_cc0);}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _cc1=this._arrayOfAllItems[k],_cc2=true;for(var _cc3 in _cc0){if(_cc1[_cc3]!=_cc0[_cc3]){_cc2=false;}}if(_cc2){_cbc[j]=_cc1;}}}if(this.referenceIntegrity){var _cc4=_cbc[j];if(this.isItem(_cc4)){this._addReferenceToMap(_cc4,item,key);}}}else{if(this.isItem(_cbb)){if(this.referenceIntegrity){this._addReferenceToMap(_cbb,item,key);}}}}}}}},_addReferenceToMap:function(_cc5,_cc6,_cc7){},getIdentity:function(item){var _cc8=this._features["dojo.data.api.Identity"];if(_cc8===Number){return item[this._itemNumPropName];}else{var _cc9=item[_cc8];if(_cc9){return _cc9[0];}}return null;},fetchItemByIdentity:function(_cca){var item,_ccb;if(!this._loadFinished){var self=this;if(this._jsonFileUrl!==this._ccUrl){_c7f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_cca});}else{this._loadInProgress=true;var _ccc={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _ccd=xhr.get(_ccc);_ccd.addCallback(function(data){var _cce=_cca.scope?_cca.scope:_c7f.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;item=self._getItemByIdentity(_cca.identity);if(_cca.onItem){_cca.onItem.call(_cce,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_cca.onError){_cca.onError.call(_cce,error);}}});_ccd.addErrback(function(_ccf){self._loadInProgress=false;if(_cca.onError){var _cd0=_cca.scope?_cca.scope:_c7f.global;_cca.onError.call(_cd0,_ccf);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;item=self._getItemByIdentity(_cca.identity);if(_cca.onItem){_ccb=_cca.scope?_cca.scope:_c7f.global;_cca.onItem.call(_ccb,item);}}}}else{item=this._getItemByIdentity(_cca.identity);if(_cca.onItem){_ccb=_cca.scope?_cca.scope:_c7f.global;_cca.onItem.call(_ccb,item);}}},_getItemByIdentity:function(_cd1){var item=null;if(this._itemsByIdentity){if(Object.hasOwnProperty.call(this._itemsByIdentity,_cd1)){item=this._itemsByIdentity[_cd1];}}else{if(Object.hasOwnProperty.call(this._arrayOfAllItems,_cd1)){item=this._arrayOfAllItems[_cd1];}}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _cd2=this._features["dojo.data.api.Identity"];if(_cd2===Number){return null;}else{return [_cd2];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl!==this._ccUrl){_c7f.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){var _cd3={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};var _cd4=xhr.get(_cd3);_cd4.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error(this.declaredClass+":  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_cd4.addErrback(function(_cd5){throw _cd5;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});lang.extend(_c86,_c84);return _c86;});},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dijit/_editor/plugins/EnterKeyHandling",["dojo/_base/declare","dojo/dom-construct","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/window","dojo/window","../_Plugin","../RichText","../range","../../_base/focus"],function(_cd6,_cd7,_cd8,keys,lang,has,win,_cd9,_cda,_cdb,_cdc,_cdd){return _cd6("dijit._editor.plugins.EnterKeyHandling",_cda,{blockNodeForEnter:"BR",constructor:function(args){if(args){if("blockNodeForEnter" in args){args.blockNodeForEnter=args.blockNodeForEnter.toUpperCase();}lang.mixin(this,args);}},setEditor:function(_cde){if(this.editor===_cde){return;}this.editor=_cde;if(this.blockNodeForEnter=="BR"){this.editor.customUndo=true;_cde.onLoadDeferred.then(lang.hitch(this,function(d){this.connect(_cde.document,"onkeypress",function(e){if(e.charOrCode==keys.ENTER){var ne=lang.mixin({},e);ne.shiftKey=true;if(!this.handleEnterKey(ne)){_cd8.stop(e);}}});if(has("ie")>=9){this.connect(_cde.document,"onpaste",function(e){setTimeout(dojo.hitch(this,function(){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();r.move("character",1);r.select();}),0);});}return d;}));}else{if(this.blockNodeForEnter){var h=lang.hitch(this,this.handleEnterKey);_cde.addKeyHandler(13,0,0,h);_cde.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(){if(this._checkListLater){if(win.withGlobal(this.editor.window,"isCollapsed",_cdd)){var _cdf=this.editor._sCall("getAncestorElement",["LI"]);if(!_cdf){_cdb.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _ce0=this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]);if(_ce0){_ce0.innerHTML=this.bogusHtmlContent;if(has("ie")<=9){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(has("mozilla")){if(_cdf.parentNode.parentNode.nodeName=="LI"){_cdf=_cdf.parentNode.parentNode;}}var fc=_cdf.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_cdf.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _ce1=_cdc.create(this.editor.window);_ce1.setStart(_cdf.firstChild,0);var _ce2=_cdc.getSelection(this.editor.window,true);_ce2.removeAllRanges();_ce2.addRange(_ce1);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&#160;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _ce3,_ce4,_ce5,_ce6,_ce7,_ce8,doc=this.editor.document,br,rs,txt;if(e.shiftKey){var _ce9=this.editor._sCall("getParentElement",[]);var _cea=_cdc.getAncestor(_ce9,this.blockNodes);if(_cea){if(_cea.tagName=="LI"){return true;}_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);if(!_ce4.collapsed){_ce4.deleteContents();_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);}if(_cdc.atBeginningOfContainer(_cea,_ce4.startContainer,_ce4.startOffset)){br=doc.createElement("br");_ce5=_cdc.create(this.editor.window);_cea.insertBefore(br,_cea.firstChild);_ce5.setStartAfter(br);_ce3.removeAllRanges();_ce3.addRange(_ce5);}else{if(_cdc.atEndOfContainer(_cea,_ce4.startContainer,_ce4.startOffset)){_ce5=_cdc.create(this.editor.window);br=doc.createElement("br");_cea.appendChild(br);_cea.appendChild(doc.createTextNode(" "));_ce5.setStart(_cea.lastChild,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);}else{rs=_ce4.startContainer;if(rs&&rs.nodeType==3){txt=rs.nodeValue;_ce6=doc.createTextNode(txt.substring(0,_ce4.startOffset));_ce7=doc.createTextNode(txt.substring(_ce4.startOffset));_ce8=doc.createElement("br");if(_ce7.nodeValue==""&&has("webkit")){_ce7=doc.createTextNode(" ");}_cd7.place(_ce6,rs,"after");_cd7.place(_ce8,_ce6,"after");_cd7.place(_ce7,_ce8,"after");_cd7.destroy(rs);_ce5=_cdc.create(this.editor.window);_ce5.setStart(_ce7,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);return false;}return true;}}}else{_ce3=_cdc.getSelection(this.editor.window);if(_ce3.rangeCount){_ce4=_ce3.getRangeAt(0);if(_ce4&&_ce4.startContainer){if(!_ce4.collapsed){_ce4.deleteContents();_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);}rs=_ce4.startContainer;if(rs&&rs.nodeType==3){var _ceb=false;var _cec=_ce4.startOffset;if(rs.length<_cec){ret=this._adjustNodeAndOffset(rs,_cec);rs=ret.node;_cec=ret.offset;}txt=rs.nodeValue;_ce6=doc.createTextNode(txt.substring(0,_cec));_ce7=doc.createTextNode(txt.substring(_cec));_ce8=doc.createElement("br");if(!_ce7.length){_ce7=doc.createTextNode(" ");_ceb=true;}if(_ce6.length){_cd7.place(_ce6,rs,"after");}else{_ce6=rs;}_cd7.place(_ce8,_ce6,"after");_cd7.place(_ce7,_ce8,"after");_cd7.destroy(rs);_ce5=_cdc.create(this.editor.window);_ce5.setStart(_ce7,0);_ce5.setEnd(_ce7,_ce7.length);_ce3.removeAllRanges();_ce3.addRange(_ce5);if(_ceb&&!has("webkit")){this.editor._sCall("remove",[]);}else{this.editor._sCall("collapse",[true]);}}else{var _ced;if(_ce4.startOffset>=0){_ced=rs.childNodes[_ce4.startOffset];}var _ce8=doc.createElement("br");var _ce7=doc.createTextNode(" ");if(!_ced){rs.appendChild(_ce8);rs.appendChild(_ce7);}else{_cd7.place(_ce8,_ced,"before");_cd7.place(_ce7,_ce8,"after");}_ce5=_cdc.create(this.editor.window);_ce5.setStart(_ce7,0);_ce5.setEnd(_ce7,_ce7.length);_ce3.removeAllRanges();_ce3.addRange(_ce5);this.editor._sCall("collapse",[true]);}}}else{_cdb.prototype.execCommand.call(this.editor,"inserthtml","<br>");}}return false;}var _cee=true;_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);if(!_ce4.collapsed){_ce4.deleteContents();_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);}var _cef=_cdc.getBlockAncestor(_ce4.endContainer,null,this.editor.editNode);var _cf0=_cef.blockNode;if((this._checkListLater=(_cf0&&(_cf0.nodeName=="LI"||_cf0.parentNode.nodeName=="LI")))){if(has("mozilla")){this._pressedEnterInBlock=_cf0;}if(/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(_cf0.innerHTML)){_cf0.innerHTML="";if(has("webkit")){_ce5=_cdc.create(this.editor.window);_ce5.setStart(_cf0,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);}this._checkListLater=false;}return true;}if(!_cef.blockNode||_cef.blockNode===this.editor.editNode){try{_cdb.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_cef={blockNode:this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_cef.blockNode){if(_cef.blockNode!=this.editor.editNode&&(!(_cef.blockNode.textContent||_cef.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_cef.blockNode);return false;}}else{_cef.blockNode=this.editor.editNode;}_ce3=_cdc.getSelection(this.editor.window);_ce4=_ce3.getRangeAt(0);}var _cf1=doc.createElement(this.blockNodeForEnter);_cf1.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_cef.blockNode);var _cf2=_ce4.endOffset;var node=_ce4.endContainer;if(node.length<_cf2){var ret=this._adjustNodeAndOffset(node,_cf2);node=ret.node;_cf2=ret.offset;}if(_cdc.atEndOfContainer(_cef.blockNode,node,_cf2)){if(_cef.blockNode===_cef.blockContainer){_cef.blockNode.appendChild(_cf1);}else{_cd7.place(_cf1,_cef.blockNode,"after");}_cee=false;_ce5=_cdc.create(this.editor.window);_ce5.setStart(_cf1,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);if(this.editor.height){_cd9.scrollIntoView(_cf1);}}else{if(_cdc.atBeginningOfContainer(_cef.blockNode,_ce4.startContainer,_ce4.startOffset)){_cd7.place(_cf1,_cef.blockNode,_cef.blockNode===_cef.blockContainer?"first":"before");if(_cf1.nextSibling&&this.editor.height){_ce5=_cdc.create(this.editor.window);_ce5.setStart(_cf1.nextSibling,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);_cd9.scrollIntoView(_cf1.nextSibling);}_cee=false;}else{if(_cef.blockNode===_cef.blockContainer){_cef.blockNode.appendChild(_cf1);}else{_cd7.place(_cf1,_cef.blockNode,"after");}_cee=false;if(_cef.blockNode.style){if(_cf1.style){if(_cef.blockNode.style.cssText){_cf1.style.cssText=_cef.blockNode.style.cssText;}}}rs=_ce4.startContainer;var _cf3;if(rs&&rs.nodeType==3){var _cf4,_cf5;_cf2=_ce4.endOffset;if(rs.length<_cf2){ret=this._adjustNodeAndOffset(rs,_cf2);rs=ret.node;_cf2=ret.offset;}txt=rs.nodeValue;_ce6=doc.createTextNode(txt.substring(0,_cf2));_ce7=doc.createTextNode(txt.substring(_cf2,txt.length));_cd7.place(_ce6,rs,"before");_cd7.place(_ce7,rs,"after");_cd7.destroy(rs);var _cf6=_ce6.parentNode;while(_cf6!==_cef.blockNode){var tg=_cf6.tagName;var _cf7=doc.createElement(tg);if(_cf6.style){if(_cf7.style){if(_cf6.style.cssText){_cf7.style.cssText=_cf6.style.cssText;}}}if(_cf6.tagName==="FONT"){if(_cf6.color){_cf7.color=_cf6.color;}if(_cf6.face){_cf7.face=_cf6.face;}if(_cf6.size){_cf7.size=_cf6.size;}}_cf4=_ce7;while(_cf4){_cf5=_cf4.nextSibling;_cf7.appendChild(_cf4);_cf4=_cf5;}_cd7.place(_cf7,_cf6,"after");_ce6=_cf6;_ce7=_cf7;_cf6=_cf6.parentNode;}_cf4=_ce7;if(_cf4.nodeType==1||(_cf4.nodeType==3&&_cf4.nodeValue)){_cf1.innerHTML="";}_cf3=_cf4;while(_cf4){_cf5=_cf4.nextSibling;_cf1.appendChild(_cf4);_cf4=_cf5;}}_ce5=_cdc.create(this.editor.window);var _cf8;var _cf9=_cf3;if(this.blockNodeForEnter!=="BR"){while(_cf9){_cf8=_cf9;_cf5=_cf9.firstChild;_cf9=_cf5;}if(_cf8&&_cf8.parentNode){_cf1=_cf8.parentNode;_ce5.setStart(_cf1,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);if(this.editor.height){_cd9.scrollIntoView(_cf1);}if(has("mozilla")){this._pressedEnterInBlock=_cef.blockNode;}}else{_cee=true;}}else{_ce5.setStart(_cf1,0);_ce3.removeAllRanges();_ce3.addRange(_ce5);if(this.editor.height){_cd9.scrollIntoView(_cf1);}if(has("mozilla")){this._pressedEnterInBlock=_cef.blockNode;}}}}return _cee;},_adjustNodeAndOffset:function(node,_cfa){while(node.length<_cfa&&node.nextSibling&&node.nextSibling.nodeType==3){_cfa=_cfa-node.length;node=node.nextSibling;}return {"node":node,"offset":_cfa};},removeTrailingBr:function(_cfb){var para=/P|DIV|LI/i.test(_cfb.tagName)?_cfb:this.editor._sCall("getParentOfType",[_cfb,["P","DIV","LI"]]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){_cd7.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}}});});},"dojox/grid/_SelectionPreserver":function(){define("dojox/grid/_SelectionPreserver",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array"],function(_cfc,_cfd,lang,_cfe){return _cfc("dojox.grid._SelectionPreserver",null,{constructor:function(_cff){this.selection=_cff;var grid=this.grid=_cff.grid;this.reset();this._connects=[_cfd.connect(grid,"_setStore",this,"reset"),_cfd.connect(grid,"_addItem",this,"_reSelectById"),_cfd.connect(_cff,"onSelected",lang.hitch(this,"_selectById",true)),_cfd.connect(_cff,"onDeselected",lang.hitch(this,"_selectById",false)),_cfd.connect(_cff,"deselectAll",this,"reset")];},destroy:function(){this.reset();_cfe.forEach(this._connects,_cfd.disconnect);delete this._connects;},reset:function(){this._selectedById={};},_reSelectById:function(item,_d00){if(item&&this.grid._hasIdentity){this.selection.selected[_d00]=this._selectedById[this.grid.store.getIdentity(item)];}},_selectById:function(_d01,_d02){if(this.selection.mode=="none"||!this.grid._hasIdentity){return;}var item=_d02,g=this.grid;if(typeof _d02=="number"||typeof _d02=="string"){var _d03=g._by_idx[_d02];item=_d03&&_d03.item;}if(item){this._selectedById[g.store.getIdentity(item)]=!!_d01;}return item;}});});},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(lang,_d04,_d05){var _d06={};lang.setObject("dojo.data.util.simpleFetch",_d06);_d06.errorHandler=function(_d07,_d08){if(_d08.onError){var _d09=_d08.scope||_d04.global;_d08.onError.call(_d09,_d07,_d08);}};_d06.fetchHandler=function(_d0a,_d0b){var _d0c=_d0b.abort||null,_d0d=false,_d0e=_d0b.start?_d0b.start:0,_d0f=(_d0b.count&&(_d0b.count!==Infinity))?(_d0e+_d0b.count):_d0a.length;_d0b.abort=function(){_d0d=true;if(_d0c){_d0c.call(_d0b);}};var _d10=_d0b.scope||_d04.global;if(!_d0b.store){_d0b.store=this;}if(_d0b.onBegin){_d0b.onBegin.call(_d10,_d0a.length,_d0b);}if(_d0b.sort){_d0a.sort(_d05.createSortFunction(_d0b.sort,this));}if(_d0b.onItem){for(var i=_d0e;(i<_d0a.length)&&(i<_d0f);++i){var item=_d0a[i];if(!_d0d){_d0b.onItem.call(_d10,item,_d0b);}}}if(_d0b.onComplete&&!_d0d){var _d11=null;if(!_d0b.onItem){_d11=_d0a.slice(_d0e,_d0f);}_d0b.onComplete.call(_d10,_d11,_d0b);}};_d06.fetch=function(_d12){_d12=_d12||{};if(!_d12.store){_d12.store=this;}this._fetchItems(_d12,lang.hitch(this,"fetchHandler"),lang.hitch(this,"errorHandler"));return _d12;};return _d06;});},"dijit/form/_ComboBoxMenuMixin":function(){define("dijit/form/_ComboBoxMenuMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/i18n","dojo/i18n!./nls/ComboBox"],function(_d13,_d14,_d15,i18n){return _d14("dijit.form._ComboBoxMenuMixin",null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=i18n.getLocalization("dijit.form","ComboBox",this.lang);},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];},_setValueAttr:function(_d16){this.value=_d16;this.onChange(_d16);},onClick:function(node){if(node==this.previousButton){this._setSelectedAttr(null);this.onPage(-1);}else{if(node==this.nextButton){this._setSelectedAttr(null);this.onPage(1);}else{this.onChange(node);}}},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null);},_createOption:function(item,_d17){var _d18=this._createMenuItem();var _d19=_d17(item);if(_d19.html){_d18.innerHTML=_d19.label;}else{_d18.appendChild(_d18.ownerDocument.createTextNode(_d19.label));}if(_d18.innerHTML==""){_d18.innerHTML="&#160;";}this.applyTextDir(_d18,(_d18.innerText||_d18.textContent||""));return _d18;},createOptions:function(_d1a,_d1b,_d1c){this.items=_d1a;this.previousButton.style.display=(_d1b.start==0)?"none":"";_d15.set(this.previousButton,"id",this.id+"_prev");_d13.forEach(_d1a,function(item,i){var _d1d=this._createOption(item,_d1c);_d1d.setAttribute("item",i);_d15.set(_d1d,"id",this.id+i);this.nextButton.parentNode.insertBefore(_d1d,this.nextButton);},this);var _d1e=false;if(_d1a.total&&!_d1a.total.then&&_d1a.total!=-1){if((_d1b.start+_d1b.count)<_d1a.total){_d1e=true;}else{if((_d1b.start+_d1b.count)>_d1a.total&&_d1b.count==_d1a.length){_d1e=true;}}}else{if(_d1b.count==_d1a.length){_d1e=true;}}this.nextButton.style.display=_d1e?"":"none";_d15.set(this.nextButton,"id",this.id+"_next");},clearResultList:function(){var _d1f=this.containerNode;while(_d1f.childNodes.length>2){_d1f.removeChild(_d1f.childNodes[_d1f.childNodes.length-2]);}this._setSelectedAttr(null);},highlightFirstOption:function(){this.selectFirstNode();},highlightLastOption:function(){this.selectLastNode();},selectFirstNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.previousButton){this.selectNextNode();}},selectLastNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.nextButton){this.selectPreviousNode();}},getHighlightedOption:function(){return this.selected;}});});},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(dojo,lang,_d20,_d21){var _d22={};lang.setObject("dojo.colors",_d22);var _d23=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=_d20.fromRgb=function(_d24,obj){var m=_d24.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_d21.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _d20.fromArray(a,obj);}return _d20.fromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_d23(m1,m2,H+1/3)*256,_d23(m1,m2,H)*256,_d23(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _d20.fromArray(a,obj);}}return null;};var _d25=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};_d20.prototype.sanitize=function(){var t=this;t.r=Math.round(_d25(t.r,0,255));t.g=Math.round(_d25(t.g,0,255));t.b=Math.round(_d25(t.b,0,255));t.a=_d25(t.a,0,1);return this;};_d22.makeGrey=_d20.makeGrey=function(g,a){return _d20.fromArray([g,g,g,a]);};lang.mixin(_d20.named,{"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"blanchedalmond":[255,235,205],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"oldlace":[253,245,230],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"whitesmoke":[245,245,245],"yellowgreen":[154,205,50]});return _d20;});},"dojox/grid/_Builder":function(){define("dojox/grid/_Builder",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/window","dojo/_base/event","dojo/_base/sniff","dojo/_base/connect","dojo/dnd/Moveable","dojox/html/metrics","./util","dojo/_base/html"],function(_d26,_d27,lang,win,_d28,has,_d29,_d2a,_d2b,util,html){var dg=_d26.grid;var _d2c=function(td){return td.cellIndex>=0?td.cellIndex:_d27.indexOf(td.parentNode.cells,td);};var _d2d=function(tr){return tr.rowIndex>=0?tr.rowIndex:_d27.indexOf(tr.parentNode.childNodes,tr);};var _d2e=function(_d2f,_d30){return _d2f&&((_d2f.rows||0)[_d30]||_d2f.childNodes[_d30]);};var _d31=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _d32=function(_d33,_d34){for(var n=_d33;n&&_d34(n);n=n.parentNode){}return n;};var _d35=function(_d36){var name=_d36.toUpperCase();return function(node){return node.tagName!=name;};};var _d37=util.rowIndexTag;var _d38=util.gridViewTag;var _d39=dg._Builder=lang.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_d3a,_d3b,_d3c,_d3d){var _d3e=[],html;if(_d3d){var _d3f=_d3a.index!=_d3a.grid.getSortIndex()?"":_d3a.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_d3a.id){_d3a.id=this.grid.id+"Hdr"+_d3a.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_d3f,"id=\"",_d3a.id,"\""];}else{var _d40=this.grid.editable&&!_d3a.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_d40];}if(_d3a.colSpan){html.push(" colspan=\"",_d3a.colSpan,"\"");}if(_d3a.rowSpan){html.push(" rowspan=\"",_d3a.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_d3a.classes){html.push(_d3a.classes," ");}if(_d3c){html.push(_d3c," ");}_d3e.push(html.join(""));_d3e.push("");html=["\" idx=\"",_d3a.index,"\" style=\""];if(_d3b&&_d3b[_d3b.length-1]!=";"){_d3b+=";";}html.push(_d3a.styles,_d3b||"",_d3a.hidden?"display:none;":"");if(_d3a.unitWidth){html.push("width:",_d3a.unitWidth,";");}_d3e.push(html.join(""));_d3e.push("");html=["\""];if(_d3a.attrs){html.push(" ",_d3a.attrs);}html.push(">");_d3e.push(html.join(""));_d3e.push("");_d3e.push(_d3d?"</th>":"</td>");return _d3e;},isCellNode:function(_d41){return Boolean(_d41&&_d41!=win.doc&&html.attr(_d41,"idx"));},getCellNodeIndex:function(_d42){return _d42?Number(html.attr(_d42,"idx")):-1;},getCellNode:function(_d43,_d44){for(var i=0,row;((row=_d2e(_d43.firstChild,i))&&row.cells);i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_d44){return cell;}}}return null;},findCellTarget:function(_d45,_d46){var n=_d45;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_d38 in n.offsetParent.parentNode&&n.offsetParent.parentNode[_d38]!=this.view.id))&&(n!=_d46)){n=n.parentNode;}return n!=_d46?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_d47,_d48){var n=_d47;while(n&&(n!=this.domNode)&&(!(_d48 in n)||(_d38 in n&&n[_d38]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_d49){return this.findTarget(_d49,_d37);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&html.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});var _d4a=dg._ContentBuilder=lang.extend(function(view){_d39.call(this,view);},_d39.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _d4b=this.grid.get,_d4c=this.view.structure.cells;for(var j=0,row;(row=_d4c[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_d4b;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_d4d,_d4e){var html=this.getTableArray(),v=this.view,_d4f=v.structure.cells,item=this.grid.getItem(_d4e);util.fire(this.view,"onBeforeRow",[_d4e,_d4f]);for(var j=0,row;(row=_d4f[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_d4e,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_d37];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});var _d50=dg._HeaderBuilder=lang.extend(function(view){this.moveable=null;_d39.call(this,view);},_d39.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_d51,_d52){var html=this.getTableArray(),_d53=this.view.structure.cells;util.fire(this.view,"onBeforeRow",[-1,_d53]);for(var j=0,row;(row=_d53[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_d54;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_d54=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_d54[5]=(_d52!=undefined?_d52:_d51(cell));_d54[3]=cell.customStyles.join(";");_d54[1]=cell.customClasses.join(" ");html.push(_d54.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(has("mozilla")||has("ie")>=9){n=_d32(e.target,_d35("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!this.grid.isLeftToRight()){table=_d32(n,_d35("table"));x-=(table&&table.offsetLeft)||0;}}n=_d32(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=e.cellIndex;e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return (e.cellIndex>0)&&(e.cellX>0&&e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX>0&&e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}html.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));html.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(c){_d28.stop(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){_d28.stop(e);return true;}return false;},colResizeSetup:function(e,_d55){var _d56=html.contentBox(e.sourceView.headerNode);if(_d55){this.lineDiv=document.createElement("div");var vw=html.position(e.sourceView.headerNode,true);var _d57=html.contentBox(e.sourceView.domNode);var l=e.pageX;if(!this.grid.isLeftToRight()&&has("ie")<8){l-=_d2b.getScrollbar().w;}html.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_d57.h+_d56.h)+"px"});html.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;win.body().appendChild(this.lineDiv);}var _d58=[],_d59=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=_d59[i]);i++){_d58.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=this.grid.isLeftToRight()?1:-1;var _d5a=e.grid.views.views;var _d5b=[];for(var j=view.idx+adj,_d5c;(_d5c=_d5a[j]);j=j+adj){_d5b.push({node:_d5c.headerNode,left:window.parseInt(_d5c.headerNode.style.left)});}var _d5d=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:html.contentBox(e.cellNode).w,vw:_d56.w,table:_d5d,tw:html.contentBox(_d5d).w,spanners:_d58,followers:_d5b};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");html.style(this.moverDiv,{position:"absolute",left:0});win.body().appendChild(this.moverDiv);html.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new _d2a(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=lang.hitch(this,"doResizeColumn",drag);_d29.connect(m,"onMoveStop",lang.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;html.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_d5e,_d5f,_d60){var _d61=_d60.l;var data={deltaX:_d61,w:_d5e.w+(this.grid.isLeftToRight()?_d61:-_d61),vw:_d5e.vw+_d61,tw:_d5e.tw+_d61};this.dragRecord={inDrag:_d5e,mover:_d5f,leftTop:_d60};if(data.w>=this.minColWidth){if(!_d5f){this.doResizeNow(_d5e,data);}else{html.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_d62){if(this.dragRecord){var _d63=this.dragRecord.leftTop;var _d64=this.grid.isLeftToRight()?_d63.l:-_d63.l;_d64+=Math.max(_d62.w+_d64,this.minColWidth)-(_d62.w+_d64);if(has("webkit")&&_d62.spanners.length){_d64+=html._getPadBorderExtents(_d62.spanners[0].node).w;}var data={deltaX:_d64,w:_d62.w+_d64,vw:_d62.vw+_d64,tw:_d62.tw+_d64};this.doResizeNow(_d62,data);delete this.dragRecord;}html.destroy(this.lineDiv);html.destroy(this.moverDiv);html.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_d62.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_d62.index);},doResizeNow:function(_d65,data){_d65.view.convertColPctToFixed();if(_d65.view.flexCells&&!_d65.view.testFlexCells()){var t=_d31(_d65.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_d65.spanners[i]);i++){sw=s.width+data.deltaX;if(sw>0){s.node.style.width=sw+"px";_d65.view.setColWidth(s.index,sw);}}if(this.grid.isLeftToRight()||!has("ie")){for(i=0;(f=_d65.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_d65.node.style.width=data.w+"px";_d65.view.setColWidth(_d65.index,data.w);_d65.view.headerNode.style.width=data.vw+"px";_d65.view.setColumnsWidth(data.tw);if(!this.grid.isLeftToRight()){_d65.view.headerNode.scrollLeft=_d65.scrollLeft+data.deltaX;}}});dg._TableMap=lang.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_d66){var _d67=_d66.length;if(!_d67){return;}this.map=[];var row;for(var k=0;(row=_d66[k]);k++){this.map[k]=[];}for(var j=0;(row=_d66[j]);j++){for(var i=0,x=0,cell,_d68,_d69;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_d69=cell.rowSpan||1;_d68=cell.colSpan||1;for(var y=0;y<_d69;y++){for(var s=0;s<_d68;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_d68;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(_d6a,_d6b){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==_d6b&&cell.r==_d6a){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_d6c,_d6d,_d6e){var row=_d6c&&_d6c.rows[_d6d];return row&&row.cells[_d6e];},_findOverlappingNodes:function(_d6f,_d70,_d71){var _d72=[];var m=this.getMapCoords(_d70,_d71);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_d6f,rw.r,rw.c):null);if(n){_d72.push(n);}}return _d72;},findOverlappingNodes:function(_d73){return this._findOverlappingNodes(_d31(_d73),_d2d(_d73.parentNode),_d2c(_d73));}});return {_Builder:_d39,_HeaderBuilder:_d50,_ContentBuilder:_d4a};});},"url:esri/dijit/editing/templates/Editor.html":"<div class=\"esriEditor\">\r\n    <div class=\"esriTemplatePicker\" dojoAttachPoint=\"templatePickerDiv\"></div>\r\n    <div class=\"esriDrawingToolbar\" dojoAttachPoint=\"drawingToolbarDiv\"></div>\r\n    <div class=\"progressBar\" dojoAttachPoint=\"progressBar\" indeterminate=\"true\" dojoType=\"dijit.ProgressBar\" />\r\n</div>","dijit/_editor/range":function(){define("dijit/_editor/range",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","../main"],function(_d74,_d75,lang,win,_d76){_d76.range={};_d76.range.getIndex=function(node,_d77){var ret=[],retR=[];var _d78=node;var _d79,n;while(node!=_d77){var i=0;_d79=node.parentNode;while((n=_d79.childNodes[i++])){if(n===node){--i;break;}}ret.unshift(i);retR.unshift(i-_d79.childNodes.length);node=_d79;}if(ret.length>0&&_d78.nodeType==3){n=_d78.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=_d78.nextSibling;while(n&&n.nodeType==3){retR[retR.length-1]++;n=n.nextSibling;}}return {o:ret,r:retR};};_d76.range.getNode=function(_d7a,_d7b){if(!lang.isArray(_d7a)||_d7a.length==0){return _d7b;}var node=_d7b;_d74.every(_d7a,function(i){if(i>=0&&i<node.childNodes.length){node=node.childNodes[i];}else{node=null;return false;}return true;});return node;};_d76.range.getCommonAncestor=function(n1,n2,root){root=root||n1.ownerDocument.body;var _d7c=function(n){var as=[];while(n){as.unshift(n);if(n!==root){n=n.parentNode;}else{break;}}return as;};var n1as=_d7c(n1);var n2as=_d7c(n2);var m=Math.min(n1as.length,n2as.length);var com=n1as[0];for(var i=1;i<m;i++){if(n1as[i]===n2as[i]){com=n1as[i];}else{break;}}return com;};_d76.range.getAncestor=function(node,_d7d,root){root=root||node.ownerDocument.body;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(_d7d.test(name)){return node;}node=node.parentNode;}return null;};_d76.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;_d76.range.getBlockAncestor=function(node,_d7e,root){root=root||node.ownerDocument.body;_d7e=_d7e||_d76.range.BlockTagNames;var _d7f=null,_d80;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(!_d7f&&_d7e.test(name)){_d7f=node;}if(!_d80&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){_d80=node;}node=node.parentNode;}return {blockNode:_d7f,blockContainer:_d80||node.ownerDocument.body};};_d76.range.atBeginningOfContainer=function(_d81,node,_d82){var _d83=false;var _d84=(_d82==0);if(!_d84&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,_d82))){_d84=true;}}if(_d84){var _d85=node;_d83=true;while(_d85&&_d85!==_d81){if(_d85.previousSibling){_d83=false;break;}_d85=_d85.parentNode;}}return _d83;};_d76.range.atEndOfContainer=function(_d86,node,_d87){var _d88=false;var _d89=(_d87==(node.length||node.childNodes.length));if(!_d89&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(_d87))){_d89=true;}}if(_d89){var _d8a=node;_d88=true;while(_d8a&&_d8a!==_d86){if(_d8a.nextSibling){_d88=false;break;}_d8a=_d8a.parentNode;}}return _d88;};_d76.range.adjacentNoneTextNode=function(_d8b,next){var node=_d8b;var len=(0-_d8b.length)||0;var prop=next?"nextSibling":"previousSibling";while(node){if(node.nodeType!=3){break;}len+=node.length;node=node[prop];}return [node,len];};_d76.range.create=function(win){win=win||window;if(win.getSelection){return win.document.createRange();}else{return new _d76.range.W3CRange();}};_d76.range.getSelection=function(_d8c,_d8d){if(_d8c.getSelection){return _d8c.getSelection();}else{var s=new _d76.range.ie.selection(_d8c);if(!_d8d){s._getCurrentSelection();}return s;}};if(!window.getSelection){_d76.range.ie={cachedSelection:{},selection:function(_d8e){this._ranges=[];this.addRange=function(r,_d8f){this._ranges.push(r);if(!_d8f){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _d90=function(){var r=_d8e.document.selection.createRange();var type=_d8e.document.selection.type.toUpperCase();if(type=="CONTROL"){return new _d76.range.W3CRange(_d76.range.ie.decomposeControlRange(r));}else{return new _d76.range.W3CRange(_d76.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_d90();if(r){this.addRange(r,true);this.isCollapsed=r.collapsed;}else{this.isCollapsed=true;}};},decomposeControlRange:function(_d91){var _d92=_d91.item(0),_d93=_d91.item(_d91.length-1);var _d94=_d92.parentNode,_d95=_d93.parentNode;var _d96=_d76.range.getIndex(_d92,_d94).o[0];var _d97=_d76.range.getIndex(_d93,_d95).o[0]+1;return [_d94,_d96,_d95,_d97];},getEndPoint:function(_d98,end){var _d99=_d98.duplicate();_d99.collapse(!end);var _d9a="EndTo"+(end?"End":"Start");var _d9b=_d99.parentElement();var _d9c,_d9d,_d9e;if(_d9b.childNodes.length>0){_d74.every(_d9b.childNodes,function(node,i){var _d9f;if(node.nodeType!=3){_d99.moveToElementText(node);if(_d99.compareEndPoints(_d9a,_d98)>0){if(_d9e&&_d9e.nodeType==3){_d9c=_d9e;_d9f=true;}else{_d9c=_d9b;_d9d=i;return false;}}else{if(i==_d9b.childNodes.length-1){_d9c=_d9b;_d9d=_d9b.childNodes.length;return false;}}}else{if(i==_d9b.childNodes.length-1){_d9c=node;_d9f=true;}}if(_d9f&&_d9c){var _da0=_d76.range.adjacentNoneTextNode(_d9c)[0];if(_da0){_d9c=_da0.nextSibling;}else{_d9c=_d9b.firstChild;}var _da1=_d76.range.adjacentNoneTextNode(_d9c);_da0=_da1[0];var _da2=_da1[1];if(_da0){_d99.moveToElementText(_da0);_d99.collapse(false);}else{_d99.moveToElementText(_d9b);}_d99.setEndPoint(_d9a,_d98);_d9d=_d99.text.length-_da2;return false;}_d9e=node;return true;});}else{_d9c=_d9b;_d9d=0;}if(!end&&_d9c.nodeType==1&&_d9d==_d9c.childNodes.length){var _da3=_d9c.nextSibling;if(_da3&&_da3.nodeType==3){_d9c=_da3;_d9d=0;}}return [_d9c,_d9d];},setEndPoint:function(_da4,_da5,_da6){var _da7=_da4.duplicate(),node,len;if(_da5.nodeType!=3){if(_da6>0){node=_da5.childNodes[_da6-1];if(node){if(node.nodeType==3){_da5=node;_da6=node.length;}else{if(node.nextSibling&&node.nextSibling.nodeType==3){_da5=node.nextSibling;_da6=0;}else{_da7.moveToElementText(node.nextSibling?node:_da5);var _da8=node.parentNode;var _da9=_da8.insertBefore(node.ownerDocument.createTextNode(" "),node.nextSibling);_da7.collapse(false);_da8.removeChild(_da9);}}}}else{_da7.moveToElementText(_da5);_da7.collapse(true);}}if(_da5.nodeType==3){var _daa=_d76.range.adjacentNoneTextNode(_da5);var _dab=_daa[0];len=_daa[1];if(_dab){_da7.moveToElementText(_dab);_da7.collapse(false);if(_dab.contentEditable!="inherit"){len++;}}else{_da7.moveToElementText(_da5.parentNode);_da7.collapse(true);_da7.move("character",1);_da7.move("character",-1);}_da6+=len;if(_da6>0){if(_da7.move("character",_da6)!=_da6){console.error("Error when moving!");}}}return _da7;},decomposeTextRange:function(_dac){var _dad=_d76.range.ie.getEndPoint(_dac);var _dae=_dad[0],_daf=_dad[1];var _db0=_dad[0],_db1=_dad[1];if(_dac.htmlText.length){if(_dac.htmlText==_dac.text){_db1=_daf+_dac.text.length;}else{_dad=_d76.range.ie.getEndPoint(_dac,true);_db0=_dad[0],_db1=_dad[1];}}return [_dae,_daf,_db0,_db1];},setRange:function(_db2,_db3,_db4,_db5,_db6,_db7){var _db8=_d76.range.ie.setEndPoint(_db2,_db3,_db4);_db2.setEndPoint("StartToStart",_db8);if(!_db7){var end=_d76.range.ie.setEndPoint(_db2,_db5,_db6);}_db2.setEndPoint("EndToEnd",end||_db8);return _db2;}};_d75("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=_d76.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(node,_db9){_db9=parseInt(_db9);if(this.startContainer===node&&this.startOffset==_db9){return;}delete this._cachedBookmark;this.startContainer=node;this.startOffset=_db9;if(!this.endContainer){this.setEnd(node,_db9);}else{this._updateInternal();}},setEnd:function(node,_dba){_dba=parseInt(_dba);if(this.endContainer===node&&this.endOffset==_dba){return;}delete this._cachedBookmark;this.endContainer=node;this.endOffset=_dba;if(!this.startContainer){this.setStart(node,_dba);}else{this._updateInternal();}},setStartAfter:function(node,_dbb){this._setPoint("setStart",node,_dbb,1);},setStartBefore:function(node,_dbc){this._setPoint("setStart",node,_dbc,0);},setEndAfter:function(node,_dbd){this._setPoint("setEnd",node,_dbd,1);},setEndBefore:function(node,_dbe){this._setPoint("setEnd",node,_dbe,0);},_setPoint:function(what,node,_dbf,ext){var _dc0=_d76.range.getIndex(node,node.parentNode).o;this[what](node.parentNode,_dc0.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();_d76.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var s=this.startContainer,r=this._getIERange();if(s.nodeType===3&&!this.startOffset){this.setStartBefore(s);}r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new _d76.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}return _d76.range;});},"dojo/dnd/Source":function(){define(["../_base/array","../_base/connect","../_base/declare","../_base/kernel","../_base/lang","../dom-class","../dom-geometry","../mouse","../ready","../topic","./common","./Selector","./Manager"],function(_dc1,_dc2,_dc3,_dc4,lang,_dc5,_dc6,_dc7,_dc8,_dc9,dnd,_dca,_dcb){if(!_dc4.isAsync){_dc8(0,function(){var _dcc=["dojo/dnd/AutoSource","dojo/dnd/Target"];require(_dcc);});}var _dcd=_dc3("dojo.dnd.Source",_dca,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_dce){lang.mixin(this,lang.mixin({},_dce));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_dc5.add(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_dc5.add(this.node,"dojoDndTarget");}if(this.horizontal){_dc5.add(this.node,"dojoDndHorizontal");}this.topics=[_dc9.subscribe("/dnd/source/over",lang.hitch(this,"onDndSourceOver")),_dc9.subscribe("/dnd/start",lang.hitch(this,"onDndStart")),_dc9.subscribe("/dnd/drop",lang.hitch(this,"onDndDrop")),_dc9.subscribe("/dnd/cancel",lang.hitch(this,"onDndCancel"))];},checkAcceptance:function(_dcf,_dd0){if(this==_dcf){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_dd0.length;++i){var type=_dcf.getItem(_dd0[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_dd1,self){if(_dd1){return true;}if(arguments.length<2){self=this==_dcb.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){_dcd.superclass.destroy.call(this);_dc1.forEach(this.topics,function(t){t.remove();});this.targetAnchor=null;},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}_dcd.superclass.onMouseMove.call(this,e);var m=_dcb.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _dd2=this.getSelectedNodes();if(_dd2.length){m.startDrag(this,_dd2,this.copyState(dnd.getCopyKeyState(e),true));}}}if(this.isDragging){var _dd3=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=_dc6.position(this.current,true);}if(this.horizontal){_dd3=(e.pageX-this.targetBox.x<this.targetBox.w/2)==_dc6.isBodyLtr(this.current.ownerDocument);}else{_dd3=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_dd3!=this.before){this._markTargetAnchor(_dd3);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;_dcd.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;_dcd.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_dd4){if(this!==_dd4){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=_dcb.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_dd5,_dd6,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_dd5?(copy?"Copied":"Moved"):"");}var _dd7=this.accept&&this.checkAcceptance(_dd5,_dd6);this._changeState("Target",_dd7?"":"Disabled");if(this==_dd5){_dcb.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_dd8,_dd9,copy,_dda){if(this==_dda){this.onDrop(_dd8,_dd9,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_ddb,_ddc,copy){if(this!=_ddb){this.onDropExternal(_ddb,_ddc,copy);}else{this.onDropInternal(_ddc,copy);}},onDropExternal:function(_ddd,_dde,copy){var _ddf=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _ddf.call(this,_ddd.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node){var t=_ddd.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node){var t=_ddd.getItem(node.id);_ddd.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_ddd.selectNone();}this.insertNodes(true,_dde,this.before,this.current);if(!copy&&this.creator){_ddd.deleteSelectedNodes();}this._normalizedCreator=_ddf;},onDropInternal:function(_de0,copy){var _de1=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _de1.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_de0,this.before,this.current);this._normalizedCreator=_de1;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){_dcd.superclass.onOverEvent.call(this);_dcb.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){_dcd.superclass.onOutEvent.call(this);_dcb.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_de2){if(this.current==this.targetAnchor&&this.before==_de2){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_de2;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(e.type!="touchstart"&&!_dc7.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(_dc5.contains(node,"dojoDndHandle")){return true;}if(_dc5.contains(node,"dojoDndItem")||_dc5.contains(node,"dojoDndIgnore")){break;}}return false;}});return _dcd;});},"dijit/Calendar":function(){define("dijit/Calendar",["dojo/_base/array","dojo/date","dojo/date/locale","dojo/_base/declare","dojo/dom-attr","dojo/dom-class","dojo/_base/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/sniff","./CalendarLite","./_Widget","./_CssStateMixin","./_TemplatedMixin","./form/DropDownButton"],function(_de3,date,_de4,_de5,_de6,_de7,_de8,_de9,keys,lang,has,_dea,_deb,_dec,_ded,_dee){var _def=_de5("dijit.Calendar",[_dea,_deb,_dec],{cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},setValue:function(_df0){_de9.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",_df0);},_createMonthWidget:function(){return new _def._MonthDropDownButton({id:this.id+"_mddb",tabIndex:-1,onMonthSelect:lang.hitch(this,"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onkeydown","_onKeyDown");this.connect(this.dateRowsNode,"onmouseover","_onDayMouseOver");this.connect(this.dateRowsNode,"onmouseout","_onDayMouseOut");this.connect(this.dateRowsNode,"onmousedown","_onDayMouseDown");this.connect(this.dateRowsNode,"onmouseup","_onDayMouseUp");},_onMonthSelect:function(_df1){var date=new this.dateClassObj(this.currentFocus);date.setDate(1);date.setMonth(_df1);var _df2=this.dateModule.getDaysInMonth(date);var _df3=this.currentFocus.getDate();date.setDate(Math.min(_df3,_df2));this._setCurrentFocusAttr(date);},_onDayMouseOver:function(evt){var node=_de7.contains(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target;if(node&&((node.dijitDateValue&&!_de7.contains(node,"dijitCalendarDisabledDate"))||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){_de7.add(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){return;}var cls="dijitCalendarHoveredDate";if(_de7.contains(this._currentNode,"dijitCalendarActiveDate")){cls+=" dijitCalendarActiveDate";}_de7.remove(this._currentNode,cls);this._currentNode=null;},_onDayMouseDown:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue&&!_de7.contains(node,"dijitCalendarDisabledDate")){_de7.add(node,"dijitCalendarActiveDate");this._currentNode=node;}},_onDayMouseUp:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue){_de7.remove(node,"dijitCalendarActiveDate");}},handleKey:function(evt){var _df4=-1,_df5,_df6=this.currentFocus;switch(evt.keyCode){case keys.RIGHT_ARROW:_df4=1;case keys.LEFT_ARROW:_df5="day";if(!this.isLeftToRight()){_df4*=-1;}break;case keys.DOWN_ARROW:_df4=1;case keys.UP_ARROW:_df5="week";break;case keys.PAGE_DOWN:_df4=1;case keys.PAGE_UP:_df5=evt.ctrlKey||evt.altKey?"year":"month";break;case keys.END:_df6=this.dateModule.add(_df6,"month",1);_df5="day";case keys.HOME:_df6=new this.dateClassObj(_df6);_df6.setDate(1);break;case keys.ENTER:case keys.SPACE:this.set("value",this.currentFocus);break;default:return true;}if(_df5){_df6=this.dateModule.add(_df6,_df5,_df4);}this._setCurrentFocusAttr(_df6);return false;},_onKeyDown:function(evt){if(!this.handleKey(evt)){_de8.stop(evt);}},onValueSelected:function(){},onChange:function(_df7){this.onValueSelected(_df7);},getClassForDate:function(){}});_def._MonthDropDownButton=_de5("dijit.Calendar._MonthDropDownButton",_dee,{onMonthSelect:function(){},postCreate:function(){this.inherited(arguments);this.dropDown=new _def._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect});},_setMonthAttr:function(_df8){var _df9=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_df8);this.dropDown.set("months",_df9);this.containerNode.innerHTML=(has("ie")==6?"":"<div class='dijitSpacer'>"+this.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_df9[_df8.getMonth()]+"</div>";}});_def._MonthDropDown=_de5("dijit.Calendar._MonthDropDown",[_deb,_ded],{months:[],templateString:"<div class='dijitCalendarMonthMenu dijitMenu' "+"data-dojo-attach-event='onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'></div>",_setMonthsAttr:function(_dfa){this.domNode.innerHTML=_de3.map(_dfa,function(_dfb,idx){return _dfb?"<div class='dijitCalendarMonthLabel' month='"+idx+"'>"+_dfb+"</div>":"";}).join("");},_onClick:function(evt){this.onChange(_de6.get(evt.target,"month"));},onChange:function(){},_onMenuHover:function(evt){_de7.toggle(evt.target,"dijitCalendarMonthLabelHover",evt.type=="mouseover");}});return _def;});},"esri/layers/OnDemandMode":function(){define(["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/geometry/Point","esri/tasks/query","esri/layers/RenderMode","esri/layers/GridLayout"],function(_dfc,_dfd,lang,_dfe,has,_dff,_e00,_e01,_e02,_e03){var _e04=_dfc([_e02],{declaredClass:"esri.layers._OnDemandMode",constructor:function(_e05){this.featureLayer=_e05;this._featureMap={};this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},initialize:function(map){this.inherited(arguments);var _e06=this.featureLayer,_e07=_e06._srInfo;this._gridLayer=new _e03(new _e00(_e07?_e07.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_e06._tileWidth,height:_e06._tileHeight},{width:map.width,height:map.height},_e07);this._cellMap={};this._gridLayer.setResolution(map.extent);},startup:function(){this._ioQueue=[];if(!this.featureLayer.suspended){this._zoomHandler();this._enableConnectors();}},propertyChangeHandler:function(type){if(this._init){if(type<2){this._zoomHandler();}else{console.log("FeatureLayer: layer in on-demand mode does not support time definitions. Layer id = "+this.featureLayer.id+", Layer URL = "+this.featureLayer.url);}}},destroy:function(){this._disableConnectors();this.inherited(arguments);},drawFeature:function(_e08){var _e09=this._gridLayer,geom=_e08.geometry,_e0a=[];if(!geom){return;}_e0a=_e09.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _e0b=this._cellMap,i,cell,oid=_e08.attributes[this.featureLayer.objectIdField],_e0c,row,col;for(i=0;i<_e0a.length;i++){cell=_e0a[i];_e0c=cell.latticeID;row=cell.row;col=cell.col;if(_e0c){cell=(_e0b[_e0c]=(_e0b[_e0c]||cell));}else{_e0b[row]=_e0b[row]||{};cell=(_e0b[row][col]=(_e0b[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_e08);this._addFeatureIIf(oid,_e08);this._incRefCount(oid);}},suspend:function(){if(!this._init){return;}this._disableConnectors();},resume:function(){if(!this._init){return;}this._enableConnectors();this._zoomHandler();},refresh:function(){this._zoomHandler();},_enableConnectors:function(){var map=this.map;this._zoomConnect=_dfd.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_dfd.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_dfd.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_dfd.disconnect(this._zoomConnect);_dfd.disconnect(this._panConnect);_dfd.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _e0d=this.featureLayer,map=this.map;if(_e0d.suspended){return;}_e0d._fireUpdateStart();this._clearIIf();var _e0e=_e0d._trackManager;if(_e0e){_e0e.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_e0f,cell){var id="_"+_e0f.name+_e0f.layerId+_e0f._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_e10){this._exceeds=false;var _e11=this.featureLayer,map=this.map,_e12=_e10||map.extent,_e13=this._gridLayer.getCellsInExtent(_e12,_e11.latticeTiling),_e14=_e13.cells;if(!_e11.isEditable()){var _e15=this._cellMap;_e14=_dfe.filter(_e14,function(cell){if(cell.lattice){if(_e15[cell.latticeID]){return false;}}else{if(_e15[cell.row]&&_e15[cell.row][cell.col]){return false;}}return true;});}var _e16=_e11.getOutFields(),_e17=_e11.getDefinitionExpression(),time=_e11._getOffsettedTE(_e11._mapTimeExtent),_e18=_e11._usePatch,_e19=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_e1a,_e1b;this._pending=this._pending||0;for(i=0;i<_e14.length;i++){cell=_e14[i];_e1a=new _e01();_e1a.geometry=cell.extent||cell.lattice;_e1a.outFields=_e16;_e1a.where=_e17;if(_e11.latticeTiling&&cell.extent){_e1a.spatialRelationship=_e01.SPATIAL_REL_CONTAINS;}_e1a.returnGeometry=true;_e1a.timeExtent=time;_e1a.maxAllowableOffset=_e11._maxOffset;if(_e11._ts){_e1a._ts=(new Date()).getTime();}_e1b=null;if(_e18){_e1b=this._getRequestId(_e11,cell);if(this._isPending(_e1b)){continue;}}this._pending++;_e19.push(_e11._task.execute(_e1a,function(){var _e1c=cell;return function(_e1d){func.apply(self,[_e1d,_e1c]);};}.call(this),this._queryErrorHandler,_e1b));}this._removeOldCells(_e12);this._endCheck();},_drawFeatures:function(_e1e,cell){this._exceeds=this._exceeds||_e1e.exceededTransferLimit;this._finalizeIO();var _e1f=this.featureLayer,map=this.map,_e20=map.extent,_e21=cell.extent,row=cell.row,col=cell.col,_e22=_e1f.objectIdField,_e23=_e1e.features,_e24=this._gridLayer,_e25=this._cellMap,i,len,_e26=cell.latticeID,_e27=_e26?_e25[_e26]:(_e25[row]&&_e25[row][col]);if((cell.resolution!=_e24._resolution)||(_e26?(_e26!==_e24.getLatticeID(_e20)):(!_e24.intersects(_e21,_e20)))){if(_e27){this._removeCell(row,col,_e26);}}else{if(_e27){this._updateCell(_e27,_e23);}else{cell.features=_e23;if(_e26){_e25[_e26]=cell;}else{_e25[row]=_e25[row]||{};_e25[row][col]=cell;}len=_e23.length;for(i=0;i<len;i++){var _e28=_e23[i];var oid=_e28.attributes[_e22];this._addFeatureIIf(oid,_e28);this._incRefCount(oid);}}}this._endCheck();},_queryErrorHandler:function(err){this._finalizeIO();this.featureLayer._errorHandler(err);this._endCheck(true);},_finalizeIO:function(){this._purgeRequests();this._pending--;},_endCheck:function(_e29){if(this._pending===0){this._processIOQueue();var _e2a=this.featureLayer,_e2b=_e2a._trackManager;if(_e2b){_e2b.clearTracks();_e2b.addFeatures(_e2a.graphics);if(_e2a._ager){_dfe.forEach(_e2a.graphics,function(_e2c){if(_e2c._shape){_e2a._repaint(_e2c);}});}_e2b.moveLatestToFront();_e2b.drawTracks();}this.featureLayer._fireUpdateEnd(_e29&&new Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_e2a.onQueryLimitExceeded();}}},_processIOQueue:function(_e2d){this._ioQueue=_dfe.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_e2d){_dfe.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_e2e){var _e2f=this._cellMap,_e30=this._gridLayer,_e31,_e32;for(_e31 in _e2f){if(_e2f[_e31]){var row=_e2f[_e31],_e33=row.latticeID,_e34=0,_e35=0;if(_e33){_e34++;if(_e33!==_e30.getLatticeID(_e2e)){this._removeCell(null,null,_e33);_e35++;}}else{for(_e32 in row){if(row[_e32]){_e34++;var _e36=row[_e32].extent;if(!_e30.intersects(_e36,_e2e)){this._removeCell(_e31,_e32);_e35++;}}}}if(_e35===_e34){delete _e2f[_e31];}}}},_updateCell:function(cell,_e37){var _e38=this.featureLayer,_e39=_e38.objectIdField,_e3a=_e38._selectedFeatures,i,len=_e37.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _e3b=_e37[i];var oid=_e3b.attributes[_e39];var _e3c=this._addFeatureIIf(oid,_e3b);if(_e3c===_e3b){this._incRefCount(oid);cell.features.push(_e3c);}else{if(!(oid in _e3a)){_e3c.setGeometry(_e3b.geometry);_e3c.setAttributes(_e3b.attributes);}}}},_removeCell:function(row,col,_e3d){var _e3e=this._cellMap,_e3f=this.featureLayer,_e40=_e3f.objectIdField;var cell=_e3d?_e3e[_e3d]:(_e3e[row]&&_e3e[row][col]);if(cell){if(_e3d){delete _e3e[_e3d];}else{delete _e3e[row][col];}var _e41=cell.features,i;for(i=0;i<_e41.length;i++){var _e42=_e41[i];var oid=_e42.attributes[_e40];this._decRefCount(oid);if(oid in _e3f._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});if(has("extend-esri")){lang.setObject("layers._OnDemandMode",_e04,_dff);}return _e04;});},"dijit/form/_ComboBoxMenu":function(){define("dijit/form/_ComboBoxMenu",["dojo/_base/declare","dojo/dom-class","dojo/dom-style","dojo/keys","../_WidgetBase","../_TemplatedMixin","./_ComboBoxMenuMixin","./_ListMouseMixin"],function(_e43,_e44,_e45,keys,_e46,_e47,_e48,_e49){return _e43("dijit.form._ComboBoxMenu",[_e46,_e47,_e49,_e48],{templateString:"<div class='dijitReset dijitMenu' data-dojo-attach-point='containerNode' style='overflow: auto; overflow-x: hidden;' role='listbox'>"+"<div class='dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point='previousButton' role='option'></div>"+"<div class='dijitMenuItem dijitMenuNextButton' data-dojo-attach-point='nextButton' role='option'></div>"+"</div>",baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);if(!this.isLeftToRight()){_e44.add(this.previousButton,"dijitMenuItemRtl");_e44.add(this.nextButton,"dijitMenuItemRtl");}},_createMenuItem:function(){var item=this.ownerDocument.createElement("div");item.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");item.setAttribute("role","option");return item;},onHover:function(node){_e44.add(node,"dijitMenuItemHover");},onUnhover:function(node){_e44.remove(node,"dijitMenuItemHover");},onSelect:function(node){_e44.add(node,"dijitMenuItemSelected");},onDeselect:function(node){_e44.remove(node,"dijitMenuItemSelected");},_page:function(up){var _e4a=0;var _e4b=this.domNode.scrollTop;var _e4c=_e45.get(this.domNode,"height");if(!this.getHighlightedOption()){this.selectNextNode();}while(_e4a<_e4c){var _e4d=this.getHighlightedOption();if(up){if(!_e4d.previousSibling||_e4d.previousSibling.style.display=="none"){break;}this.selectPreviousNode();}else{if(!_e4d.nextSibling||_e4d.nextSibling.style.display=="none"){break;}this.selectNextNode();}var _e4e=this.domNode.scrollTop;_e4a+=(_e4e-_e4b)*(up?-1:1);_e4b=_e4e;}},handleKey:function(evt){switch(evt.keyCode){case keys.DOWN_ARROW:this.selectNextNode();return false;case keys.PAGE_DOWN:this._page(false);return false;case keys.UP_ARROW:this.selectPreviousNode();return false;case keys.PAGE_UP:this._page(true);return false;default:return true;}}});});},"dojox/grid/cells/_base":function(){define("dojox/grid/cells/_base",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/_base/array","dojo/_base/sniff","dojo/dom","dojo/dom-attr","dojo/dom-construct","dijit/_Widget","../util"],function(dojo,_e4f,lang,_e50,_e51,_e52,has,dom,_e53,_e54,_e55,util){var _e56=_e4f("dojox.grid._DeferredTextWidget",_e55,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(lang.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});var _e57=function(_e58){try{util.fire(_e58,"focus");util.fire(_e58,"select");}catch(e){}};var _e59=function(){setTimeout(lang.hitch.apply(dojo,arguments),0);};var _e5a=_e4f("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_e5b){this._props=_e5b||{};lang.mixin(this,_e5b);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_e5c,_e5d){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_e5c!=this.defaultValue&&f)?f.apply(s,_e5d):_e5c;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new _e56({deferred:v},_e54.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_e5e,_e5f){var f,i=this.grid.edit.info,d=this.get?this.get(_e5e,_e5f):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&(?![a-z0-9]{1,8}\;)/ig,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_e5e&&i.cell==this))){return this.formatEditing(d,_e5e);}else{return this._defaultFormat(d,[d,_e5e,this]);}},formatEditing:function(_e60,_e61){},getNode:function(_e62){return this.view.getCellNode(_e62,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_e63){return (this.getNode(_e63)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&lang.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_e64,_e65){if(this.getNode(_e65)){this.grid.edit.applyCellEdit(_e64,this,_e65);}},cancelEdit:function(_e66){this.grid.doCancelEdit(_e66);},_onEditBlur:function(_e67){if(this.grid.edit.isEditCell(_e67,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_e68,_e69){if(this.commitOnBlur){_e51.connect(_e68,"onblur",function(e){setTimeout(lang.hitch(this,"_onEditBlur",_e69),250);});}},needFormatNode:function(_e6a,_e6b){this._formatPending=true;_e59(this,"_formatNode",_e6a,_e6b);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_e6c,_e6d){if(this._formatPending){this._formatPending=false;if(!has("ie")){dom.setSelectable(this.grid.domNode,true);}this.formatNode(this.getEditNode(_e6d),_e6c,_e6d);}},formatNode:function(_e6e,_e6f,_e70){if(has("ie")){_e59(this,"focus",_e70,_e6e);}else{this.focus(_e70,_e6e);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_e71){return this.getEditNode(_e71)[this._valueProp];},setValue:function(_e72,_e73){var n=this.getEditNode(_e72);if(n){n[this._valueProp]=_e73;}},focus:function(_e74,_e75){_e57(_e75||this.getEditNode(_e74));},save:function(_e76){this.value=this.value||this.getValue(_e76);},restore:function(_e77){this.setValue(_e77,this.value);},_finish:function(_e78){dom.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_e79){this.applyEdit(this.getValue(_e79),_e79);this._finish(_e79);},cancel:function(_e7a){this.cancelEdit(_e7a);this._finish(_e7a);}});_e5a.markupFactory=function(node,_e7b){var _e7c=lang.trim(_e53.get(node,"formatter")||"");if(_e7c){_e7b.formatter=lang.getObject(_e7c)||_e7c;}var get=lang.trim(_e53.get(node,"get")||"");if(get){_e7b.get=lang.getObject(get);}var _e7d=function(attr,cell,_e7e){var _e7f=lang.trim(_e53.get(node,attr)||"");if(_e7f){cell[_e7e||attr]=!(_e7f.toLowerCase()=="false");}};_e7d("sortDesc",_e7b);_e7d("editable",_e7b);_e7d("alwaysEditing",_e7b);_e7d("noresize",_e7b);_e7d("draggable",_e7b);var _e80=lang.trim(_e53.get(node,"loadingText")||_e53.get(node,"defaultValue")||"");if(_e80){_e7b.defaultValue=_e80;}var _e81=function(attr,cell,_e82){var _e83=lang.trim(_e53.get(node,attr)||"")||undefined;if(_e83){cell[_e82||attr]=_e83;}};_e81("styles",_e7b);_e81("headerStyles",_e7b);_e81("cellStyles",_e7b);_e81("classes",_e7b);_e81("headerClasses",_e7b);_e81("cellClasses",_e7b);};var Cell=_e4f("dojox.grid.cells.Cell",_e5a,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_e84,_e85){this.needFormatNode(_e84,_e85);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_e84+"\">";},formatNode:function(_e86,_e87,_e88){this.inherited(arguments);this.registerOnBlur(_e86,_e88);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){_e50.stop(e);}}},_finish:function(_e89){this.inherited(arguments);var n=this.getEditNode(_e89);try{util.fire(n,"blur");}catch(e){}}});Cell.markupFactory=function(node,_e8a){_e5a.markupFactory(node,_e8a);var _e8b=lang.trim(_e53.get(node,"keyFilter")||"");if(_e8b){_e8a.keyFilter=new RegExp(_e8b);}};var _e8c=_e4f("dojox.grid.cells.RowIndex",Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_e8d){return _e8d+1;}});_e8c.markupFactory=function(node,_e8e){Cell.markupFactory(node,_e8e);};var _e8f=_e4f("dojox.grid.cells.Select",Cell,{options:null,values:null,returnIndex:-1,constructor:function(_e90){this.values=this.values||this.options;},formatEditing:function(_e91,_e92){this.needFormatNode(_e91,_e92);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){v=v.replace?v.replace(/&/g,"&amp;").replace(/</g,"&lt;"):v;o=o.replace?o.replace(/&/g,"&amp;").replace(/</g,"&lt;"):o;h.push("<option",(_e91==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},_defaultFormat:function(_e93,_e94){var v=this.inherited(arguments);if(!this.formatter&&this.values&&this.options){var i=_e52.indexOf(this.values,v);if(i>=0){v=this.options[i];}}return v;},getValue:function(_e95){var n=this.getEditNode(_e95);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});_e8f.markupFactory=function(node,cell){Cell.markupFactory(node,cell);var _e96=lang.trim(_e53.get(node,"options")||"");if(_e96){var o=_e96.split(",");if(o[0]!=_e96){cell.options=o;}}var _e97=lang.trim(_e53.get(node,"values")||"");if(_e97){var v=_e97.split(",");if(v[0]!=_e97){cell.values=v;}}};var _e98=_e4f("dojox.grid.cells.AlwaysEdit",Cell,{alwaysEditing:true,_formatNode:function(_e99,_e9a){this.formatNode(this.getEditNode(_e9a),_e99,_e9a);},applyStaticValue:function(_e9b){var e=this.grid.edit;e.applyCellEdit(this.getValue(_e9b),this,_e9b);e.start(this,_e9b,true);}});_e98.markupFactory=function(node,cell){Cell.markupFactory(node,cell);};var Bool=_e4f("dojox.grid.cells.Bool",_e98,{_valueProp:"checked",formatEditing:function(_e9c,_e9d){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_e9c?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});Bool.markupFactory=function(node,cell){_e98.markupFactory(node,cell);};return _e5a;});},"esri/toolbars/edit":function(){define("esri/toolbars/edit",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/_base/Color","dojo/has","esri/kernel","esri/lang","esri/sniff","esri/toolbars/_toolbar","esri/toolbars/_Box","esri/toolbars/_GraphicMover","esri/toolbars/_VertexEditor","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol"],function(_e9e,lang,_e9f,_ea0,_ea1,has,_ea2,_ea3,_ea4,_ea5,Box,_ea6,_ea7,_ea8,_ea9){var EDT=_e9e(_ea5,{declaredClass:"esri.toolbars.Edit",constructor:function(map,_eaa){this._map=map;this._tool=0;if(this._map.loaded){this._scratchGL=map.graphics;}else{var _eab=_e9f.connect(this._map,"onLoad",this,function(){_e9f.disconnect(_eab);_eab=null;this._scratchGL=this._map.graphics;});}var _eac=has("esri-touch")||has("esri-pointer");this._defaultOptions=lang.mixin({vertexSymbol:new _ea8(_ea8.STYLE_CIRCLE,_eac?20:12,new _ea9(_ea9.STYLE_SOLID,new _ea1([0,0,0,0.5]),1),new _ea1([128,128,128])),ghostVertexSymbol:new _ea8(_ea8.STYLE_CIRCLE,_eac?18:10,new _ea9(_ea9.STYLE_SOLID,new _ea1([0,0,0,0.5]),1),new _ea1([255,255,255,0.75])),ghostLineSymbol:new _ea9(_ea9.STYLE_DOT,new _ea1([128,128,128]),2),allowDeleteVertices:true,allowAddVertices:true,rotateHandleOffset:_eac?24:16,boxLineSymbol:new _ea9(_ea9.STYLE_DASH,new _ea1([64,64,64]),1),boxHandleSymbol:new _ea8(_ea8.STYLE_SQUARE,_eac?16:9,new _ea9(_ea9.STYLE_SOLID,new _ea1([0,0,0,0.5]),1),new _ea1([255,255,255,0.75]))},_eaa||{});},activate:function(tool,_ead,_eae){this.deactivate();this._graphic=_ead;this._options=lang.mixin(lang.mixin({},this._defaultOptions),_eae||{});var MOVE=EDT.MOVE,EDIT=EDT.EDIT_VERTICES,_eaf=EDT.SCALE,_eb0=EDT.ROTATE,move=false,edit=false,box=false,map=this._map,_eb1=map.spatialReference,_eb2=_ead.geometry.spatialReference;this._geo=!!(_eb1&&_eb2&&!_eb1.equals(_eb2)&&_eb1.isWebMercator()&&_eb2.wkid===4326);if((tool&MOVE)===MOVE){move=this._enableMove(_ead);}var _eb3=((tool&_eaf)===_eaf),_eb4=((tool&_eb0)===_eb0);if(_eb3||_eb4){box=this._enableBoxEditing(_ead,_eb3,_eb4);}if((tool&EDIT)===EDIT){edit=this._enableVertexEditing(_ead);}if(!(move||edit||box)){throw new Error("[esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.");}this._tool=tool;if(this._tool){this._mapPanEndHandle=_e9f.connect(map,"onPanEnd",this,this._mapPanEndHandler);this._mapExtChgHandle=_e9f.connect(map,"onExtentChange",this,this._mapExtentChangeHandler);this.onActivate(this._tool,_ead);}if(map.snappingManager&&(move||edit)){map.snappingManager._startSelectionLayerQuery();}},deactivate:function(){var tool=this._tool,_eb5=this._graphic;if(!tool){return;}var _eb6=!!this._modified;this._clear();_e9f.disconnect(this._mapPanEndHandle);_e9f.disconnect(this._mapExtChgHandle);this._mapPanEndHandle=this._mapExtChgHandle=null;this._graphic=this._geo=null;this.onDeactivate(tool,_eb5,{isModified:_eb6});if(this._map.snappingManager){this._map.snappingManager._stopSelectionLayerQuery();}},refresh:function(){this._refreshMoveables(true);},getCurrentState:function(){return {tool:this._tool,graphic:this._graphic,isModified:!!this._modified};},onActivate:function(tool,_eb7){},onDeactivate:function(tool,_eb8,info){},onGraphicMoveStart:function(_eb9){},onGraphicFirstMove:function(_eba){this._modified=true;},onGraphicMove:function(_ebb,_ebc){},onGraphicMoveStop:function(_ebd,_ebe){},onGraphicClick:function(_ebf,info){},onVertexMoveStart:function(_ec0,_ec1){},onVertexFirstMove:function(_ec2,_ec3){this._modified=true;},onVertexMove:function(_ec4,_ec5,_ec6){},onVertexMoveStop:function(_ec7,_ec8,_ec9){},onVertexAdd:function(_eca,_ecb){this._modified=true;},onVertexClick:function(_ecc,_ecd){},onVertexMouseOver:function(_ece,_ecf){},onVertexMouseOut:function(_ed0,_ed1){},onVertexDelete:function(_ed2,_ed3){this._modified=true;},onScaleStart:function(_ed4){},onScaleFirstMove:function(_ed5){this._modified=true;},onScale:function(_ed6,info){},onScaleStop:function(_ed7,info){},onRotateStart:function(_ed8){},onRotateFirstMove:function(_ed9){this._modified=true;},onRotate:function(_eda,info){},onRotateStop:function(_edb,info){},_eventMap:{activate:["tool","graphic"],deactivate:["tool","graphic","info"],"graphic-move-start":["graphic"],"graphic-first-move":["graphic"],"graphic-move":["graphic","transform"],"graphic-move-stop":["graphic","transform"],"graphic-click":["graphic","info"],"vertex-move-start":["graphic","vertexinfo"],"vertex-first-move":["graphic","vertexinfo"],"vertex-move":["graphic","vertexinfo","transform"],"vertex-move-stop":["graphic","vertexinfo","transform"],"vertex-add":["graphic","vertexinfo"],"vertex-click":["graphic","vertexinfo"],"vertex-mouse-over":["graphic","vertexinfo"],"vertex-mouse-out":["graphic","vertexinfo"],"vertex-delete":["graphic","vertexinfo"],"scale-start":["graphic"],"scale-first-move":["graphic"],scale:["graphic","info"],"scale-stop":["graphic","info"],"rotate-start":["graphic"],"rotate-first-move":["graphic"],rotate:["graphic","info"],"rotate-stop":["graphic","info"]},_enableMove:function(_edc){var map=this._map,type=_edc.geometry.type;switch(type){case "point":case "polyline":case "polygon":this._graphicMover=new _ea6(_edc,map,this);return true;case "multipoint":break;}return false;},_enableVertexEditing:function(_edd){var map=this._map,type=_edd.geometry.type;switch(type){case "point":break;case "multipoint":case "polyline":case "polygon":this._vertexEditor=_ea7.create(_edd,map,this);return true;}return false;},_enableBoxEditing:function(_ede,_edf,_ee0){var map=this._map,type=_ede.geometry.type;switch(type){case "point":case "multipoint":break;case "polyline":case "polygon":this._boxEditor=new Box(_ede,map,this,_edf,_ee0,this._options.uniformScaling);return true;}return false;},_disableMove:function(){var _ee1=this._graphicMover;if(_ee1){_ee1.destroy();this._graphicMover=null;}},_disableVertexEditing:function(){var _ee2=this._vertexEditor;if(_ee2){_ee2.destroy();this._vertexEditor=null;}},_disableBoxEditing:function(){var box=this._boxEditor;if(box){box.destroy();this._boxEditor=null;}},_clear:function(){this._disableMove();this._disableVertexEditing();this._disableBoxEditing();this._tool=0;this._modified=false;},_mapPanEndHandler:function(){this._refreshMoveables();},_mapExtentChangeHandler:function(e,d,_ee3){if(_ee3){this._refreshMoveables();}},_refreshMoveables:function(_ee4){var _ee5=_ea0.filter([this._graphicMover,this._vertexEditor,this._boxEditor],_ea3.isDefined);_ea0.forEach(_ee5,function(mov){mov.refresh(_ee4);});},_beginOperation:function(_ee6){_ea0.forEach(this._getAffectedTools(_ee6),function(tool){tool.suspend();});},_endOperation:function(_ee7){_ea0.forEach(this._getAffectedTools(_ee7),function(tool){tool.resume();});},_getAffectedTools:function(_ee8){var _ee9=[];switch(_ee8){case "MOVE":_ee9=[this._vertexEditor,this._boxEditor];break;case "VERTICES":_ee9=[this._boxEditor];break;case "BOX":_ee9=[this._vertexEditor];break;}_ee9=_ea0.filter(_ee9,_ea3.isDefined);return _ee9;}});lang.mixin(EDT,{MOVE:1,EDIT_VERTICES:2,SCALE:4,ROTATE:8});if(has("extend-esri")){lang.setObject("toolbars.Edit",EDT,_ea2);}return EDT;});},"esri/toolbars/_VertexMover":function(){define("esri/toolbars/_VertexMover",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/has","dojo/sniff","dojo/dom-style","dojox/gfx/Moveable","esri/kernel","esri/geometry/Point","esri/graphic","esri/geometry/webMercatorUtils"],function(_eea,lang,_eeb,has,_eec,_eed,_eee,_eef,_ef0,_ef1,_ef2){var VM=_eea(null,{declaredClass:"esri.toolbars.VertexMover",constructor:function(_ef3,_ef4,_ef5,_ef6,_ef7,_ef8,_ef9,_efa){this.point=_ef3;this.symbol=_ef4;this.relatedGraphic=_ef5;this.segIndex=_ef6;this.ptIndex=_ef7;this.segLength=_ef8;this.editor=_ef9;this.map=_ef9.map;this._scratchGL=_ef9.toolbar._scratchGL;this._placeholder=_efa||false;this._type=_ef5.geometry.type;this._init();this._enable();},refresh:function(_efb){if(_efb||this._needRefresh()){this._disable();this._enable();}},destroy:function(){this._disable();if(this.graphic){this._scratchGL.remove(this.graphic);}this.point=this.symbol=this.graphic=this.relatedGraphic=this.segIndex=this.ptIndex=this.segLength=this.editor=this.map=this._scratchGL=null;},_init:function(){var _efc=new _ef0(this.point.toJson());var _efd=new _ef1(_efc,this.symbol);switch(this._type){case "multipoint":_efd._shape=this.relatedGraphic.getDojoShape().children[this.ptIndex];break;case "polyline":case "polygon":this._scratchGL.add(_efd);break;}this.graphic=_efd;},_enable:function(){var _efe=this.graphic.getDojoShape();if(_efe){_efe._hasMover=true;this._moveable=this._getMoveable(_efe);var node=_efe.getEventSource();if(node){_eed.set(node,"cursor",this.editor.toolbar._cursors[this._placeholder?"move-gv":"move-v"]);}}},_disable:function(){var _eff=this._moveable;if(_eff){_eeb.disconnect(this._startHandle);_eeb.disconnect(this._firstHandle);_eeb.disconnect(this._movingHandle);_eeb.disconnect(this._stopHandle);var _f00=_eff.shape;if(_f00){var node=_f00.getEventSource();if(node){_eed.set(node,"cursor",null);}}_eff.destroy();this._moveable=null;}},_needRefresh:function(){var _f01=this.graphic.getDojoShape(),need=false;if(_f01){switch(this._type){case "multipoint":var _f02=this.relatedGraphic.getDojoShape();if(_f02){var _f03=_f02.children[this.ptIndex];if(_f01!==_f03){_f01=_f03;this.graphic._shape=_f01;need=true;}}break;case "polyline":case "polygon":need=!_f01._hasMover;break;}}return need;},_getMoveable:function(_f04){var _f05=new _eee(_f04,_eec("mac")&&_eec("ff")&&!has("esri-touch")&&{leftButtonOnly:true});this._startHandle=_eeb.connect(_f05,"onMoveStart",this,this._moveStartHandler);this._firstHandle=_eeb.connect(_f05,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_eeb.connect(_f05,"onMoving",this,this._movingHandler);this._stopHandle=_eeb.connect(_f05,"onMoveStop",this,this._moveStopHandler);return _f05;},_getPtIndex:function(){return this.ptIndex+(this._placeholder?1:0);},_getInfo:function(){return {graphic:this.graphic,isGhost:this._placeholder,segmentIndex:this.segIndex,pointIndex:this._getPtIndex()};},_moveStartHandler:function(_f06){var map=this.map;if(map.snappingManager){map.snappingManager._setUpSnapping();}_f06.shape.moveToFront();this.constructor.onMoveStart(this);this.editor.toolbar.onVertexMoveStart(this.relatedGraphic,this._getInfo());},_firstMoveHandler:function(_f07){var _f08=_f07.shape;var _f09=this._getControlEdges();var _f0a=this._scratchGL._div;var i,_f0b=[],_f0c=_f07.host.shape._wrapOffsets[0]||0;for(i=0;i<_f09.length;i++){var edge=_f09[i];edge.x1+=_f0c;edge.x2+=_f0c;_f0b.push([_f0a.createLine({x1:edge.x1,y1:edge.y1,x2:edge.x2,y2:edge.y2}).setStroke(this.editor._lineStroke),edge.x1,edge.y1,edge.x2,edge.y2]);}_f08._lines=_f0b;_f07.shape.moveToFront();this.constructor.onFirstMove(this);this.editor.toolbar.onVertexFirstMove(this.relatedGraphic,this._getInfo());},_movingHandler:function(_f0d){var _f0e=_f0d.shape,tx=_f0e.getTransform();var i,_f0f=_f0e._lines;for(i=0;i<_f0f.length;i++){var line=_f0f[i];line[0].setShape({x1:line[1]+tx.dx,y1:line[2]+tx.dy,x2:line[3],y2:line[4]});}this.editor.toolbar.onVertexMove(this.relatedGraphic,this._getInfo(),tx);},_moveStopHandler:function(_f10){var _f11=_f10.shape,_f12=this.editor.toolbar,tx=_f11.getTransform(),map=this.map,host=this.graphic,_f13=_f12._geo?_ef2.geographicToWebMercator(host.geometry):host.geometry;var i,_f14=_f11._lines;if(_f14){for(i=0;i<_f14.length;i++){_f14[i][0].removeShape();}_f11._lines=null;}var ph=false,_f15=true,info=this._getInfo();if(tx&&(tx.dx||tx.dy)){if(this._placeholder){this._placeholder=false;ph=true;}}else{_f15=false;}var _f16;if(map.snappingManager){_f16=map.snappingManager._snappingPoint;}var _f17=_f16||map.toMap(map.toScreen(_f13).offset(tx.dx,tx.dy));if(map.snappingManager){map.snappingManager._killOffSnapping();}_f11.setTransform(null);host.setGeometry(_f12._geo?_ef2.webMercatorToGeographic(_f17,true):_f17);this.constructor.onMoveStop(this,tx);_f12.onVertexMoveStop(this.relatedGraphic,info,tx);if(!_f15){_f12.onVertexClick(this.relatedGraphic,info);}if(ph){_f12.onVertexAdd(this.relatedGraphic,this._getInfo());}},_getControlEdges:function(){var map=this.map;var _f18=this.relatedGraphic.geometry;var _f19=this.segIndex,_f1a=this.ptIndex,_f1b=this.segLength;var _f1c=this._scratchGL._div;var _f1d=_f1c.getTransform();var sdx=_f1d.dx,sdy=_f1d.dy;var pt=map.toScreen(this.graphic.geometry);var x=pt.x-sdx,y=pt.y-sdy;var _f1e=[];var _f1f=this.editor._getControlPoints(this,_f18,_f19,_f1a,_f1b);if(_f1f[0]){_f1e.push({x1:x,y1:y,x2:_f1f[0].x-sdx,y2:_f1f[0].y-sdy});}if(_f1f[1]){_f1e.push({x1:x,y1:y,x2:_f1f[1].x-sdx,y2:_f1f[1].y-sdy});}return _f1e;}});if(has("extend-esri")){lang.setObject("toolbars.VertexMover",VM,_eef);}lang.mixin(VM,{onMoveStart:function(){},onFirstMove:function(){},onMoveStop:function(){}});return VM;});},"dijit/CalendarLite":function(){require({cache:{"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"}});define("dijit/CalendarLite",["dojo/_base/array","dojo/_base/declare","dojo/cldr/supplemental","dojo/date","dojo/date/locale","dojo/date/stamp","dojo/dom","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/sniff","dojo/string","./_WidgetBase","./_TemplatedMixin","dojo/text!./templates/Calendar.html","./hccss"],function(_f20,_f21,_f22,date,_f23,_f24,dom,_f25,_f26,lang,has,_f27,_f28,_f29,_f2a){var _f2b=_f21("dijit.CalendarLite",[_f28,_f29],{templateString:_f2a,dowTemplateString:"<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\">${d}</span></th>",dateTemplateString:"<td class=\"dijitReset\" role=\"gridcell\" data-dojo-attach-point=\"dateCells\"><span class=\"dijitCalendarDateLabel\" data-dojo-attach-point=\"dateLabels\"></span></td>",weekTemplateString:"<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">${d}${d}${d}${d}${d}${d}${d}</tr>",value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date(),baseClass:"dijitCalendar",_isValidDate:function(_f2c){return _f2c&&!isNaN(_f2c)&&typeof _f2c=="object"&&_f2c.toString()!=this.constructor.prototype.value.toString();},_getValueAttr:function(){if(this.value&&!isNaN(this.value)){var _f2d=new this.dateClassObj(this.value);_f2d.setHours(0,0,0,0);if(_f2d.getDate()<this.value.getDate()){_f2d=this.dateModule.add(_f2d,"hour",1);}return _f2d;}else{return null;}},_setValueAttr:function(_f2e,_f2f){if(typeof _f2e=="string"){_f2e=_f24.fromISOString(_f2e);}_f2e=this._patchDate(_f2e);if(this._isValidDate(_f2e)&&!this.isDisabledDate(_f2e,this.lang)){this._set("value",_f2e);this.set("currentFocus",_f2e);this._markSelectedDates([_f2e]);if(this._created&&(_f2f||typeof _f2f=="undefined")){this.onChange(this.get("value"));}}else{this._set("value",null);this._markSelectedDates([]);}},_patchDate:function(_f30){if(_f30){_f30=new this.dateClassObj(_f30);_f30.setHours(1,0,0,0);}return _f30;},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(node.ownerDocument.createTextNode(text));},_populateGrid:function(){var _f31=new this.dateClassObj(this.currentFocus);_f31.setDate(1);var _f32=_f31.getDay(),_f33=this.dateModule.getDaysInMonth(_f31),_f34=this.dateModule.getDaysInMonth(this.dateModule.add(_f31,"month",-1)),_f35=new this.dateClassObj(),_f36=_f22.getFirstDayOfWeek(this.lang);if(_f36>_f32){_f36-=7;}this._date2cell={};_f20.forEach(this.dateCells,function(_f37,idx){var i=idx+_f36;var date=new this.dateClassObj(_f31),_f38,_f39="dijitCalendar",adj=0;if(i<_f32){_f38=_f34-_f32+i+1;adj=-1;_f39+="Previous";}else{if(i>=(_f32+_f33)){_f38=i-_f32-_f33+1;adj=1;_f39+="Next";}else{_f38=i-_f32+1;_f39+="Current";}}if(adj){date=this.dateModule.add(date,"month",adj);}date.setDate(_f38);if(!this.dateModule.compare(date,_f35,"date")){_f39="dijitCalendarCurrentDate "+_f39;}if(this.isDisabledDate(date,this.lang)){_f39="dijitCalendarDisabledDate "+_f39;_f37.setAttribute("aria-disabled","true");}else{_f39="dijitCalendarEnabledDate "+_f39;_f37.removeAttribute("aria-disabled");_f37.setAttribute("aria-selected","false");}var _f3a=this.getClassForDate(date,this.lang);if(_f3a){_f39=_f3a+" "+_f39;}_f37.className=_f39+"Month dijitCalendarDateTemplate";var _f3b=date.valueOf();this._date2cell[_f3b]=_f37;_f37.dijitDateValue=_f3b;this._setText(this.dateLabels[idx],date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate());},this);},_populateControls:function(){var _f3c=new this.dateClassObj(this.currentFocus);_f3c.setDate(1);this.monthWidget.set("month",_f3c);var y=_f3c.getFullYear()-1;var d=new this.dateClassObj();_f20.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);},goToToday:function(){this.set("value",new this.dateClassObj());},constructor:function(_f3d){this.dateModule=_f3d.datePackage?lang.getObject(_f3d.datePackage,false):date;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_f3d.datePackage?lang.getObject(_f3d.datePackage+".locale",false):_f23;},_createMonthWidget:function(){return _f2b._MonthWidget({id:this.id+"_mw",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},buildRendering:function(){var d=this.dowTemplateString,_f3e=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),_f3f=_f22.getFirstDayOfWeek(this.lang);this.dayCellsHtml=_f27.substitute([d,d,d,d,d,d,d].join(""),{d:""},function(){return _f3e[_f3f++%7];});var r=_f27.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[r,r,r,r,r,r].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);dom.setSelectable(this.domNode,false);var _f40=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus",_f40,false);},postCreate:function(){this.inherited(arguments);this._connectControls();},_connectControls:function(){var _f41=lang.hitch(this,function(_f42,part,_f43){this.connect(this[_f42],"onclick",function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,part,_f43));});});_f41("incrementMonth","month",1);_f41("decrementMonth","month",-1);_f41("nextYearLabelNode","year",1);_f41("previousYearLabelNode","year",-1);},_setCurrentFocusAttr:function(date,_f44){var _f45=this.currentFocus,_f46=this._getNodeByDate(_f45);date=this._patchDate(date);this._set("currentFocus",date);if(!this._date2cell||this.dateModule.difference(_f45,date,"month")!=0){this._populateGrid();this._populateControls();this._markSelectedDates([this.value]);}var _f47=this._getNodeByDate(date);_f47.setAttribute("tabIndex",this.tabIndex);if(this.focused||_f44){_f47.focus();}if(_f46&&_f46!=_f47){if(has("webkit")){_f46.setAttribute("tabIndex","-1");}else{_f46.removeAttribute("tabIndex");}}},focus:function(){this._setCurrentFocusAttr(this.currentFocus,true);},_onDayClick:function(evt){_f26.stop(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!_f25.contains(node,"dijitCalendarDisabledDate")){this.set("value",node.dijitDateValue);}},_getNodeByDate:function(_f48){_f48=this._patchDate(_f48);return _f48&&this._date2cell?this._date2cell[_f48.valueOf()]:null;},_markSelectedDates:function(_f49){function mark(_f4a,cell){_f25.toggle(cell,"dijitCalendarSelectedDate",_f4a);cell.setAttribute("aria-selected",_f4a?"true":"false");};_f20.forEach(this._selectedCells||[],lang.partial(mark,false));this._selectedCells=_f20.filter(_f20.map(_f49,this._getNodeByDate,this),function(n){return n;});_f20.forEach(this._selectedCells,lang.partial(mark,true));},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});_f2b._MonthWidget=_f21("dijit.CalendarLite._MonthWidget",_f28,{_setMonthAttr:function(_f4b){var _f4c=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,_f4b),_f4d=(has("ie")==6?"":"<div class='dijitSpacer'>"+_f20.map(_f4c,function(s){return "<div>"+s+"</div>";}).join("")+"</div>");this.domNode.innerHTML=_f4d+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_f4c[_f4b.getMonth()]+"</div>";}});return _f2b;});},"esri/toolbars/_VertexEditor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/has","dijit/Menu","dijit/MenuItem","esri/kernel","esri/toolbars/_VertexMover","esri/geometry/Point","esri/geometry/jsonUtils","dojo/i18n!esri/nls/jsapi"],function(_f4e,lang,_f4f,_f50,has,Menu,_f51,_f52,_f53,_f54,_f55,_f56){var GVE=_f4e(null,{declaredClass:"esri.toolbars._GraphicVertexEditor",constructor:function(_f57,map,_f58){this.graphic=_f57;this.map=map;this.toolbar=_f58;var _f59=_f58._options;this._symbol1=_f59.vertexSymbol;this._symbol2=_f59.ghostVertexSymbol;var _f5a=_f59.ghostLineSymbol;this._lineStroke={style:_f5a.style,width:_f5a.width,color:_f5a.color};this._canDel=_f59.allowDeleteVertices;this._canAdd=_f59.allowAddVertices;this._addControllers();},destroy:function(){this._removeControllers();},refresh:function(_f5b){if(_f5b){this._removeControllers();this._addControllers();}else{this._refresh(this._vertexMovers);this._refresh(this._mpVertexMovers);}},suspend:function(){if(!this._suspended){this._removeControllers();}this._suspended=true;},resume:function(){if(this._suspended){this._addControllers();}this._suspended=false;},_addControllers:function(){this._firstMoveHandle=_f4f.connect(_f53,"onFirstMove",this,this._firstMoveHandler);this._moveStopHandle=_f4f.connect(_f53,"onMoveStop",this,this._moveStopHandler);this._vertexMovers=this._add(this._getSegments(this.graphic.geometry),this._symbol1);if(this._canAdd){this._mpVertexMovers=this._add(this._getMidpointSegments(this.graphic.geometry),this._symbol2,true);}var _f5c=this._getGraphicsLayer();this._mouseOverHandle=_f4f.connect(_f5c,"onMouseOver",this,this._mouseOverHandler);this._mouseOutHandle=_f4f.connect(_f5c,"onMouseOut",this,this._mouseOutHandler);if(this._canDel){this._ctxMenu=new Menu({style:"font-size: 12px; margin-left: 5px; margin-top: 5px;"});var _f5d=(this._ctxDelete=new _f51({label:_f56.toolbars.edit.deleteLabel,iconClass:"vertexDeleteIcon",style:"outline: none;"}));this._deleteHandle=_f4f.connect(_f5d,"onClick",this,this._deleteHandler);this._ctxMenu.addChild(_f5d);this._ctxMenu.startup();}},_removeControllers:function(){_f4f.disconnect(this._firstMoveHandle);_f4f.disconnect(this._moveStopHandle);_f4f.disconnect(this._mouseOverHandle);_f4f.disconnect(this._mouseOutHandle);_f4f.disconnect(this._deleteHandle);if(this._ctxMenu){this._ctxDelete=null;this._unbindCtxNode();this._ctxMenu.destroyRecursive();}this._remove(this._vertexMovers);this._remove(this._mpVertexMovers);this._vertexMovers=this._mpVertexMovers=null;},_add:function(_f5e,_f5f,_f60){var i,j,_f61=this.graphic,_f62=[];for(i=0;i<_f5e.length;i++){var _f63=_f5e[i],_f64=[];for(j=0;j<_f63.length;j++){_f64.push(new _f53(_f63[j],_f5f,_f61,i,j,_f63.length,this,_f60));}_f62.push(_f64);}return _f62;},_remove:function(_f65){if(_f65){_f50.forEach(_f65,function(_f66){_f50.forEach(_f66,function(_f67){_f67.destroy();});});}},_refresh:function(_f68){if(_f68){_f50.forEach(_f68,function(_f69){_f50.forEach(_f69,function(_f6a){_f6a.refresh();});});}},_isNew:function(_f6b){return (_f50.indexOf(this._vertexMovers[_f6b.segIndex],_f6b)===-1)?true:false;},_getGraphicsLayer:function(){return this.toolbar._scratchGL;},_deleteHandler:function(evt){var _f6c=this._selectedMover,_f6d=_f6c.ptIndex;this._updateRelatedGraphic(_f6c,_f6c.relatedGraphic,_f6c.graphic.geometry,_f6c.segIndex,_f6c.ptIndex,_f6c.segLength,false,true);if(this._canAdd){this._deleteMidpoints(_f6c);}this._deleteVertex(_f6c);this.toolbar._endOperation("VERTICES");},_mouseOverHandler:function(evt){var _f6e=evt.graphic,_f6f=this._findMover(_f6e);if(_f6f){this.toolbar.onVertexMouseOver(this.graphic,_f6f._getInfo());if(!_f6f._placeholder){this._selectedMover=_f6f;if(this._canDel){this._bindCtxNode(_f6e.getDojoShape().getNode());}}}},_mouseOutHandler:function(evt){var _f70=evt.graphic,_f71=this._findMover(_f70);if(_f71){this.toolbar.onVertexMouseOut(this.graphic,_f71._getInfo());}},_bindCtxNode:function(node){this._unbindCtxNode();this._ctxDelete.set("disabled",(this._selectedMover.segLength<=this.minLength)?true:false);this._ctxMenu.bindDomNode(node);this._bindNode=node;},_unbindCtxNode:function(){var node=this._bindNode;if(node){this._ctxMenu.unBindDomNode(node);}},_findMover:function(_f72){var i,_f73=[],_f74=this._mpVertexMovers;_f50.forEach(this._vertexMovers,function(_f75){_f73=_f73.concat(_f75);});if(_f74){_f50.forEach(_f74,function(_f76){_f73=_f73.concat(_f76);});}for(i=0;i<_f73.length;i++){var _f77=_f73[i];if(_f77.graphic===_f72){return _f77;}}},_firstMoveHandler:function(_f78){if(!this._isNew(_f78)&&this._canAdd){this._hideRelatedMidpoints(_f78);}this.toolbar._beginOperation("VERTICES");},_moveStopHandler:function(_f79,tx){var add=this._isNew(_f79);if(!tx||!tx.dx&&!tx.dy){if(!add&&this._canAdd){this._showRelatedMidpoints(_f79);}return;}this._updateRelatedGraphic(_f79,_f79.relatedGraphic,_f79.graphic.geometry,_f79.segIndex,_f79.ptIndex,_f79.segLength,add);if(this._canAdd){if(add){this._addMidpoints(_f79);}else{this._repositionRelatedMidpoints(_f79);this._showRelatedMidpoints(_f79);}}this.toolbar._endOperation("VERTICES");},_showRelatedMidpoints:function(_f7a){var i,_f7b=this._getAdjacentMidpoints(_f7a.ptIndex,_f7a.segLength),_f7c=this._mpVertexMovers[_f7a.segIndex];for(i=0;i<_f7b.length;i++){var mvr=_f7c[_f7b[i]];mvr.graphic.show();mvr.refresh();}},_hideRelatedMidpoints:function(_f7d){var i,_f7e=this._getAdjacentMidpoints(_f7d.ptIndex,_f7d.segLength),_f7f=this._mpVertexMovers[_f7d.segIndex];for(i=0;i<_f7e.length;i++){_f7f[_f7e[i]].graphic.hide();}},_repositionRelatedMidpoints:function(_f80){var i,_f81=this._getAdjacentMidpoints(_f80.ptIndex,_f80.segLength),_f82=this._mpVertexMovers[_f80.segIndex];for(i=0;i<_f81.length;i++){var _f83=this._getAdjacentVertices(_f81[i],_f80.segLength);var _f84=_f80.relatedGraphic.geometry.getPoint(_f80.segIndex,_f83[0]),_f85=_f80.relatedGraphic.geometry.getPoint(_f80.segIndex,_f83[1]);var _f86=new _f54({x:(_f84.x+_f85.x)/2,y:(_f84.y+_f85.y)/2,spatialReference:_f84.spatialReference.toJson()});_f82[_f81[i]].graphic.setGeometry(_f86);}},_addMidpoints:function(_f87){var _f88=_f87.segIndex,_f89=_f87.ptIndex,_f8a=_f87.segLength;var _f8b=_f89+1;var i,_f8c=_f8a+1;this._mpVertexMovers[_f88].splice(_f89,1);var _f8d=this._vertexMovers[_f88];for(i=0;i<_f8b;i++){_f8d[i].segLength+=1;}for(i=_f8b;i<_f8d.length;i++){_f8d[i].ptIndex+=1;_f8d[i].segLength+=1;}_f87.ptIndex=_f8b;_f87.segLength=_f8d.length+1;_f8d.splice(_f8b,0,_f87);_f87.graphic.setSymbol(this._symbol1);_f8d=this._mpVertexMovers[_f88];for(i=0;i<_f89;i++){_f8d[i].segLength+=1;}for(i=_f89;i<_f8a-1;i++){_f8d[i].ptIndex+=1;_f8d[i].segLength+=1;}var _f8e=this._getAdjacentVertices(_f89,_f8c);var _f8f=this._getAdjacentVertices(_f89+1,_f8c);var _f90,_f91;_f90=_f87.relatedGraphic.geometry.getPoint(_f87.segIndex,_f8e[0]);_f91=_f87.relatedGraphic.geometry.getPoint(_f87.segIndex,_f8e[1]);var _f92=new _f54({x:(_f90.x+_f91.x)/2,y:(_f90.y+_f91.y)/2,spatialReference:_f90.spatialReference.toJson()});_f90=_f87.relatedGraphic.geometry.getPoint(_f87.segIndex,_f8f[0]);_f91=_f87.relatedGraphic.geometry.getPoint(_f87.segIndex,_f8f[1]);var _f93=new _f54({x:(_f90.x+_f91.x)/2,y:(_f90.y+_f91.y)/2,spatialReference:_f90.spatialReference.toJson()});var mvr1=new _f53(_f92,this._symbol2,this.graphic,_f87.segIndex,_f89,_f8c,this,true);var mvr2=new _f53(_f93,this._symbol2,this.graphic,_f87.segIndex,_f89+1,_f8c,this,true);_f8d.splice(_f89,0,mvr1,mvr2);},_deleteVertex:function(_f94){var i,_f95=_f94.segIndex,_f96=_f94.ptIndex;var _f97=this._vertexMovers[_f95];for(i=0;i<_f96;i++){_f97[i].segLength-=1;}for(i=_f96+1;i<_f97.length;i++){var mvr=_f97[i];mvr.ptIndex-=1;mvr.segLength-=1;}_f97.splice(_f96,1);var info=_f94._getInfo();_f94.destroy();this.toolbar.onVertexDelete(this.graphic,info);}});lang.mixin(GVE,{create:function(_f98,map,_f99){var type=_f98.geometry.type;switch(type){case "multipoint":return new GVE.MultipointVertexEditor(_f98,map,_f99);break;case "polyline":return new GVE.PolylineVertexEditor(_f98,map,_f99);break;case "polygon":return new GVE.PolygonVertexEditor(_f98,map,_f99);break;}}});GVE.MultipointVertexEditor=_f4e(GVE,{declaredClass:"esri.toolbars._MultipointVertexEditor",minLength:1,constructor:function(){this._moveStartHandle=_f4f.connect(_f53,"onMoveStart",this,this._moveStartHandler);_f4f.disconnect(this._firstMoveHandle);},destroy:function(){this.inherited(arguments);_f4f.disconnect(this._moveStartHandle);},_getSegments:function(_f9a){var i,_f9b=_f9a.points,_f9c=[],sr=_f9a.spatialReference;for(i=0;i<_f9b.length;i++){var _f9d=_f9b[i];_f9c.push(new _f54({x:_f9d[0],y:_f9d[1],spatialReference:sr.toJson()}));}return [_f9c];},_getMidpointSegments:function(_f9e){return [];},_getControlPoints:function(_f9f,_fa0,_fa1,_fa2,_fa3){return [];},_getGraphicsLayer:function(){return this.graphic._graphicsLayer;},_mouseOverHandler:function(evt){var _fa4=evt.graphic,_fa5=this._findMover(evt);if(_fa5){this.toolbar.onVertexMouseOver(_fa4,_fa5._getInfo());this._selectedMover=_fa5;if(this._canDel){this._bindCtxNode(_fa5.graphic.getDojoShape().getNode());}}},_mouseOutHandler:function(evt){var _fa6=evt.graphic,_fa7=this._findMover(evt);if(_fa7){this.toolbar.onVertexMouseOut(_fa6,_fa7._getInfo());}},_findMover:function(evt){var i,_fa8=[].concat(this._vertexMovers[0]),_fa9=evt.target;for(i=0;i<_fa8.length;i++){var _faa=_fa8[i];if(_faa.graphic.getDojoShape().getNode()===_fa9){return _faa;}}},_moveStartHandler:function(_fab){var geom=_fab.relatedGraphic.geometry,_fac=_fab.ptIndex;var _fad=_fab.segLength-1;var _fae=geom.points;var _faf=_fae.splice(_fac,1);_fae.push(_faf[0]);var j,_fb0=this._vertexMovers[0];for(j=_fad;j>_fac;j--){_fb0[j].ptIndex-=1;}_faf=_fb0.splice(_fac,1);_fb0.push(_faf[0]);_faf[0].ptIndex=_fad;},_moveStopHandler:function(_fb1){this._updateRelatedGraphic(_fb1,_fb1.relatedGraphic,_fb1.graphic.geometry,_fb1.segIndex,_fb1.ptIndex,_fb1.segLength);this.toolbar._endOperation("VERTICES");},_updateRelatedGraphic:function(_fb2,_fb3,_fb4,_fb5,_fb6,_fb7,add,del){var geom=_fb3.geometry;if(del){geom.removePoint(_fb6);}else{geom.setPoint(_fb6,_fb4);}_fb3.setGeometry(geom);},_deleteMidpoints:function(_fb8){}});GVE.PolylineVertexEditor=_f4e(GVE,{declaredClass:"esri.toolbars._PolylineVertexEditor",minLength:2,_getSegments:function(_fb9){var i,j,_fba=_fb9.paths,_fbb=[];for(i=0;i<_fba.length;i++){var path=_fba[i],_fbc=[];for(j=0;j<path.length;j++){_fbc.push(_fb9.getPoint(i,j));}_fbb.push(_fbc);}return _fbb;},_getMidpointSegments:function(_fbd){var i,j,_fbe=_fbd.paths,_fbf=[],sr=_fbd.spatialReference;for(i=0;i<_fbe.length;i++){var path=_fbe[i],_fc0=[];for(j=0;j<path.length-1;j++){var _fc1=_fbd.getPoint(i,j),_fc2=_fbd.getPoint(i,j+1);var midX=(_fc1.x+_fc2.x)/2,midY=(_fc1.y+_fc2.y)/2;var _fc3=new _f54({x:midX,y:midY,spatialReference:sr.toJson()});_fc0.push(_fc3);}_fbf.push(_fc0);}return _fbf;},_getControlPoints:function(_fc4,_fc5,_fc6,_fc7,_fc8){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_fc4)){idx1=_fc7;idx2=_fc7+1;if(idx1>=0){pt1=map.toScreen(_fc5.getPoint(_fc6,idx1));}if(idx2<=_fc8){pt2=map.toScreen(_fc5.getPoint(_fc6,idx2));}}else{idx1=_fc7-1;idx2=_fc7+1;if(idx1>=0){pt1=map.toScreen(_fc5.getPoint(_fc6,idx1));}if(idx2<_fc8){pt2=map.toScreen(_fc5.getPoint(_fc6,idx2));}}return [pt1,pt2];},_getAdjacentMidpoints:function(_fc9,_fca){var _fcb=[];var idx1=_fc9-1;if(idx1>=0){_fcb.push(idx1);}var idx2=_fc9;if(idx2<_fca-1){_fcb.push(idx2);}return _fcb;},_getAdjacentVertices:function(_fcc,_fcd){return [_fcc,_fcc+1];},_deleteMidpoints:function(_fce){var _fcf=_fce.segIndex,_fd0=_fce.ptIndex,_fd1=_fce.segLength;var _fd2=this._mpVertexMovers[_fcf],_fd3=_fd2.length-1;var _fd4=this._getAdjacentMidpoints(_fd0,_fd1).sort();var i,min=_fd4[0];for(i=0;i<min;i++){_fd2[i].segLength-=1;}for(i=min+1;i<_fd2.length;i++){var mvr=_fd2[i];mvr.ptIndex-=1;mvr.segLength-=1;}if(_fd4.length===1){_fd2.splice(min,1)[0].destroy();}else{var _fd5=this._getAdjacentVertices(min,_fd3);var _fd6=_fce.relatedGraphic.geometry.getPoint(_fce.segIndex,_fd5[0]);var _fd7=_fce.relatedGraphic.geometry.getPoint(_fce.segIndex,_fd5[1]);var _fd8=new _f54({x:(_fd6.x+_fd7.x)/2,y:(_fd6.y+_fd7.y)/2,spatialReference:_fd6.spatialReference.toJson()});var mvr1=new _f53(_fd8,this._symbol2,this.graphic,_fce.segIndex,min,_fd3,this,true);var _fd9=_fd2.splice(min,_fd4.length,mvr1);for(i=0;i<_fd9.length;i++){_fd9[i].destroy();}}},_updateRelatedGraphic:function(_fda,_fdb,_fdc,_fdd,_fde,_fdf,add,del){var geom=_fdb.geometry;if(add){geom.insertPoint(_fdd,_fde+1,_f55.fromJson(_fdc.toJson()));}else{if(del){geom.removePoint(_fdd,_fde);}else{geom.setPoint(_fdd,_fde,_f55.fromJson(_fdc.toJson()));}}_fdb.setGeometry(geom);}});GVE.PolygonVertexEditor=_f4e(GVE,{declaredClass:"esri.toolbars._PolygonVertexEditor",minLength:3,_getSegments:function(_fe0){var i,j,_fe1=_fe0.rings,_fe2=[];for(i=0;i<_fe1.length;i++){var ring=_fe1[i],_fe3=[];for(j=0;j<ring.length-1;j++){_fe3.push(_fe0.getPoint(i,j));}_fe2.push(_fe3);}return _fe2;},_getMidpointSegments:function(_fe4){var i,j,_fe5=_fe4.rings,_fe6=[],sr=_fe4.spatialReference;for(i=0;i<_fe5.length;i++){var ring=_fe5[i],_fe7=[];for(j=0;j<ring.length-1;j++){var _fe8=_fe4.getPoint(i,j),_fe9=_fe4.getPoint(i,j+1);var midX=(_fe8.x+_fe9.x)/2,midY=(_fe8.y+_fe9.y)/2;var _fea=new _f54({x:midX,y:midY,spatialReference:sr.toJson()});_fe7.push(_fea);}_fe6.push(_fe7);}return _fe6;},_getControlPoints:function(_feb,_fec,_fed,_fee,_fef){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_feb)){idx1=_fee;idx2=(_fee+1)%_fef;}else{idx1=_fee-1;idx1=idx1<0?(_fef+idx1)%_fef:idx1;idx2=(_fee+1)%_fef;}pt1=map.toScreen(_fec.getPoint(_fed,idx1));pt2=map.toScreen(_fec.getPoint(_fed,idx2));return [pt1,pt2];},_getAdjacentMidpoints:function(_ff0,_ff1){var idx1=_ff0-1;idx1=idx1<0?(_ff1+idx1)%_ff1:idx1;var idx2=_ff0;return [idx1,idx2];},_getAdjacentVertices:function(_ff2,_ff3){return [_ff2,(_ff2+1)%_ff3];},_deleteMidpoints:function(_ff4){var _ff5=_ff4.segIndex,_ff6=_ff4.ptIndex,_ff7=_ff4.segLength;var _ff8=this._mpVertexMovers[_ff5],_ff9=_ff8.length-1,_ffa=this._getAdjacentMidpoints(_ff6,_ff7).sort(),_ffb,_ffc,_ffd,_ffe,i,mvr1,mvr,min=_ffa[0],max=_ffa[_ffa.length-1];if(_ff6===0){_ffb=this._getAdjacentVertices(_ff9-1,_ff9);_ffc=_ff4.relatedGraphic.geometry.getPoint(_ff4.segIndex,_ffb[0]);_ffd=_ff4.relatedGraphic.geometry.getPoint(_ff4.segIndex,_ffb[1]);_ffe=new _f54({x:(_ffc.x+_ffd.x)/2,y:(_ffc.y+_ffd.y)/2,spatialReference:_ffc.spatialReference.toJson()});mvr1=new _f53(_ffe,this._symbol2,this.graphic,_ff4.segIndex,_ff9-1,_ff9,this,true);_ff8.splice(max,1,mvr1)[0].destroy();_ff8.splice(min,1)[0].destroy();for(i=0;i<_ff8.length-1;i++){mvr=_ff8[i];mvr.ptIndex-=1;mvr.segLength-=1;}}else{_ffb=this._getAdjacentVertices(min,_ff9);_ffc=_ff4.relatedGraphic.geometry.getPoint(_ff4.segIndex,_ffb[0]);_ffd=_ff4.relatedGraphic.geometry.getPoint(_ff4.segIndex,_ffb[1]);_ffe=new _f54({x:(_ffc.x+_ffd.x)/2,y:(_ffc.y+_ffd.y)/2,spatialReference:_ffc.spatialReference.toJson()});mvr1=new _f53(_ffe,this._symbol2,this.graphic,_ff4.segIndex,min,_ff9,this,true);var _fff=_ff8.splice(min,_ffa.length,mvr1);for(i=0;i<_fff.length;i++){_fff[i].destroy();}for(i=0;i<min;i++){_ff8[i].segLength-=1;}for(i=min+1;i<_ff8.length;i++){mvr=_ff8[i];mvr.ptIndex-=1;mvr.segLength-=1;}}},_updateRelatedGraphic:function(mover,_1000,_1001,_1002,_1003,_1004,add,del){var geom=_1000.geometry;if(add){geom.insertPoint(_1002,_1003+1,_f55.fromJson(_1001.toJson()));}else{if(del){geom.removePoint(_1002,_1003);if(_1003===0){geom.setPoint(_1002,_1004-1,_f55.fromJson(geom.getPoint(_1002,0).toJson()));}}else{geom.setPoint(_1002,_1003,_f55.fromJson(_1001.toJson()));if(_1003===0){geom.setPoint(_1002,_1004,_f55.fromJson(_1001.toJson()));}}}_1000.setGeometry(geom);}});if(has("extend-esri")){lang.setObject("toolbars._GraphicVertexEditor",GVE,_f52);lang.setObject("toolbars._MultipointVertexEditor",GVE.MultipointVertexEditor,_f52);lang.setObject("toolbars._PolylineVertexEditor",GVE.PolylineVertexEditor,_f52);lang.setObject("toolbars._PolygonVertexEditor",GVE.PolygonVertexEditor,_f52);}return GVE;});},"*now":function(r){r(["dojo/i18n!*preload*esri/dijit/editing/nls/Editor-all*[\"ar\",\"az\",\"ca\",\"cs\",\"da\",\"de-de\",\"el\",\"en-gb\",\"en-us\",\"es-es\",\"fi-fi\",\"fr-fr\",\"he-il\",\"hu\",\"it-it\",\"ja-jp\",\"ko-kr\",\"nl-nl\",\"nb\",\"pl\",\"pt-br\",\"pt-pt\",\"ro\",\"ru\",\"sk\",\"sl\",\"sv\",\"th\",\"tr\",\"zh-tw\",\"zh-cn\",\"ROOT\"]"]);},"*noref":1}});define("esri/dijit/editing/Editor-all",["esri/layers/FeatureLayer","esri/toolbars/_toolbar","esri/toolbars/draw","esri/toolbars/edit","esri/tasks/geometry","esri/dijit/AttributeInspector","esri/dijit/editing/AttachmentEditor","esri/dijit/editing/Editor","esri/dijit/editing/TemplatePicker","esri/dijit/editing/Util","esri/dijit/editing/SelectionHelper"],function(_1005,_1006,Draw,Edit,_1007,_1008,_1009,_100a,_100b,Util,_100c){return {};});