/*
 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:{"url:esri/dijit/templates/Directions.html":"<div class=\"${options.theme}\" role=\"presentation\">\r\n    <div data-dojo-attach-point=\"_widgetContainer\" class=\"${_widgetContainerClass}\" role=\"presentation\">\r\n        <div class=\"${_stopsContainerClass}\" data-dojo-attach-point=\"_dndNode\" role=\"presentation\">\r\n            <table class=\"${_stopsClass}\" data-dojo-attach-point=\"_dndNode\"></table>\r\n            <div class=\"${_clearClass}\"></div>\r\n            <div class=\"${_stopsButtonContainerClass}\">\r\n                <div role=\"button\" class=\"${_stopsAddDestinationClass}\" data-dojo-attach-point=\"_addDestinationNode\" data-dojo-attach-event=\"ondijitclick:_addStopButton\">${_i18n.widgets.directions.addDestination}</div>\r\n                <div role=\"button\" class=\"${_stopsOptionsButtonClass}\" data-dojo-attach-point=\"_optionsButtonNode\" data-dojo-attach-event=\"ondijitclick:_toggleOptionsMenu\">${_i18n.widgets.directions.showOptions}</div>\r\n            \t<div class=\"${_clearClass}\"></div>\r\n            </div>\r\n            <div role=\"presentation\" class=\"${_stopsOptionsMenuClass}\" data-dojo-attach-point=\"_optionsMenuNode\">\r\n                <div class=\"${_stopsOptionsCheckboxesClass}\">\r\n                    <ul>\r\n                        <li class=\"${_stopsFindOptimalOrderClass}\" data-dojo-attach-point=\"_findOptimalOrderItemNode\"><input data-dojo-attach-event=\"ondijitclick:_toggleCheckbox\" tabindex=\"0\" data-dojo-attach-point=\"_findOptimalOrderNode\" type=\"checkbox\" id=\"${id}_find_optimal_order\" /><label for=\"${id}_find_optimal_order\">${_i18n.widgets.directions.findOptimalOrder}</label></li>\r\n                        <li class=\"${_stopsReturnToStartClass}\" data-dojo-attach-point=\"_returnToStartItemNode\"><input data-dojo-attach-event=\"ondijitclick:_toggleCheckbox\" tabindex=\"0\" data-dojo-attach-point=\"_returnToStartNode\" type=\"checkbox\" id=\"${id}_stopsReturnToStart\" /><label for=\"${id}_stopsReturnToStart\">${_i18n.widgets.directions.returnToStart}</label></li>\r\n                        <li class=\"${_stopsUseTrafficClass}\" data-dojo-attach-point=\"_useTrafficItemNode\"><input data-dojo-attach-event=\"ondijitclick:_toggleCheckbox\" tabindex=\"0\" data-dojo-attach-point=\"_useTrafficNode\" type=\"checkbox\" id=\"${id}_stopsUseTraffic\" /><label for=\"${id}_stopsUseTraffic\">${_i18n.widgets.directions.useTraffic}</label></li>\r\n                    </ul>\r\n                </div>\r\n                <div class=\"${_stopsOptionsUnitsClass}\">\r\n                    <ul>\r\n                        <li><input data-dojo-attach-event=\"ondijitclick:_toggleUnits\" tabindex=\"0\" id=\"${id}_use_miles\" data-dojo-attach-point=\"_useMilesNode\" name=\"${id}_units\" type=\"radio\"><label for=\"${id}_use_miles\">${_i18n.widgets.directions.units.MILES.name}</label></li>\r\n                        <li><input data-dojo-attach-event=\"ondijitclick:_toggleUnits\" tabindex=\"0\" id=\"${id}_use_kilometers\" data-dojo-attach-point=\"_useKilometersNode\" name=\"${id}_units\" type=\"radio\"><label for=\"${id}_use_kilometers\">${_i18n.widgets.directions.units.KILOMETERS.name}</label></li>\r\n                    </ul>\r\n                </div>\r\n                <div class=\"${_clearClass}\"></div>\r\n            </div>\r\n            <div class=\"${_stopsGetDirectionsContainerClass}\">\r\n                <div tabindex=\"0\" role=\"button\" class=\"${_stopsGetDirectionsClass}\" data-dojo-attach-event=\"ondijitclick:_directionsButton\">${_i18n.widgets.directions.getDirections}</div>\r\n                <div tabindex=\"0\" role=\"button\" class=\"${_stopsClearDirectionsClass}\" data-dojo-attach-event=\"ondijitclick:clearDirections\">${_i18n.widgets.directions.clearDirections}</div>\r\n                <div class=\"${_clearClass}\"></div>\r\n            </div>\r\n    \t</div>\r\n    \t<div class=\"${_clearClass}\"></div>\r\n    \t<div data-dojo-attach-point=\"_errorNode\" role=\"presentation\"></div>\r\n    \t<div class=\"${_resultsContainerClass}\" role=\"presentation\">\r\n        \t<div class=\"${_routesContainerClass}\" data-dojo-attach-point=\"_resultsNode\" role=\"presentation\"></div>\r\n    \t</div>\r\n    </div>\r\n</div>"}});define("esri/dijit/Directions",["require","dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/_base/Color","dijit/_WidgetBase","dijit/_OnDijitClickMixin","dijit/_TemplatedMixin","dojo/keys","dojo/has","dojo/on","dojo/mouse","dojo/dom","dojo/dom-geometry","dojo/dom-style","dojo/dom-class","dojo/dom-attr","dojo/query","dojo/number","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/templates/Directions.html","esri/dijit/Geocoder","dojo/dom-construct","dojo/promise/all","dojo/Deferred","dojo/dnd/Source","esri/kernel","esri/graphic","esri/units","esri/InfoTemplate","esri/SpatialReference","esri/layers/ArcGISDynamicMapServiceLayer","esri/geometry/Point","esri/geometry/Extent","esri/geometry/Polyline","esri/geometry/mathUtils","esri/symbols/PictureMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/TextSymbol","esri/symbols/Font","esri/dijit/_EventedWidget","esri/dijit/Popup","esri/tasks/FeatureSet","esri/tasks/RouteTask","esri/tasks/RouteParameters","esri/toolbars/edit","dojo/uacss"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,on,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15,_16,_17,all,_18,_19,_1a,_1b,_1c,_1d,_1e,_1f,_20,_21,_22,_23,_24,_25,_26,_27,_28,_29,_2a,_2b,_2c,_2d){var _2e=_2([_28,_8,_9],{declaredClass:"esri.dijit.Directions",templateString:_15,basePath:_1.toUrl("esri/dijit"),_eventMap:{"load":true,"directions-start":true,"directions-finish":["result"],"directions-clear":true,"segment-select":["graphic"],"segment-highlight":["graphic"]},constructor:function(_2f,_30){var _31=this;_31._setClasses();_31._setTemplates();_31._setPublicDefaults();_4.mixin(_31.options,_2f);_31._setPrivateDefaults();_31._setTrafficDefaults();_31._widgetProperties();_31.set("geocoders",[]);var _32=_31.watch("theme",_31._updateThemeWatch);_31._watchEvents.push(_32);var _33=_31.watch("stops",_31._updateStopsWatch);_31._watchEvents.push(_33);_31.domNode=_30;},startup:function(){var _34=this;_34._setOptions();_34._setStops();_34._dnd=new _19(_34._dndNode,{skipForm:true,withHandles:true});if(_34.options.map){if(_34.options.map.loaded){_34._init();}else{var _35=_34.options.map.on("load",_4.hitch(_34,_34._init));_34._onEvents.push(_35);}}else{_34._init();}},destroy:function(){var _36=this;var i;_36.clearDirections();_36._removeTrafficLayer();if(_36._watchEvents){for(i=0;i<_36._watchEvents.length;i++){_36._watchEvents[i].unwatch();}}if(_36._globalGeocoder){_36._globalGeocoder.destroy();}if(_36._dnd){_36._dnd.destroy();}if(_36.geocoders.length){for(i=0;i<_36.geocoders.length;i++){_36.geocoders[i].destroy();}}if(_36._onEvents){for(i=0;i<_36._onEvents.length;i++){_36._onEvents[i].remove();}}if(_36._geocoderFindEvents){for(i=0;i<_36._geocoderFindEvents.length;i++){_36._geocoderFindEvents[i].remove();}}if(_36._geocoderWatchEvents){for(i=0;i<_36._geocoderWatchEvents.length;i++){_36._geocoderWatchEvents[i].unwatch();}}if(_36._geocoderSelectEvents){for(i=0;i<_36._geocoderSelectEvents.length;i++){_36._geocoderSelectEvents[i].remove();}}if(_36._connectEvents){for(i=0;i<_36._connectEvents.length;i++){_3.disconnect(_36._connectEvents[i]);}}_36._disconnectResults();_17.empty(_36.domNode);_36.inherited(arguments);},clearDirections:function(){var _37=this;_37._routeParams.stops.features=[];_37.set("directions",null);_37._clearStopGraphics();_37._clearRouteGraphics();_37._clearInfoWindow();_37._clearResultsHTML();_37._clearResultError();_37.onDirectionsClear();},reset:function(){var _38=this;_38.clearDirections();_38._removeTrafficLayer();_38._setTrafficDefaults();_38._configureRouteOptions();_38._widgetProperties();_38._setOptions();_38.updateStops(_38.options.stops);},onLoad:function(){},onDirectionsStart:function(){var _39=this;_10.add(_39._widgetContainer,_39._resultsLoadingClass);_39._solveActive=true;},onDirectionsFinish:function(){var _3a=this;_10.remove(_3a._widgetContainer,_3a._resultsLoadingClass);_3a._solveActive=false;},onDirectionsClear:function(){},onSegmentSelect:function(){},onSegmentHighlight:function(){},onAddStops:function(){},onUpdateStops:function(){},onRemoveStops:function(){},removeStops:function(){var _3b=this;_3b._clearResultError();return _3b._removeStops().then(function(_3c){_3b.onRemoveStops(_3c);});},removeStop:function(_3d){var _3e=this;_3e._clearResultError();return _3e._removeStop(_3d).then(function(_3f,i){_3e.onRemoveStops(_3f,i);});},updateStops:function(_40){var _41=this;_41._clearResultError();return _41._updateStops(_40).then(function(_42){_41.onUpdateStops(_42);});},addStops:function(_43,_44){var _45=this;_45._clearResultError();return _45._addStops(_43,_44).then(function(_46,i){_45.onAddStops(_46,i);});},addStop:function(_47,_48){var _49=this;_49._clearResultError();return _49._addStop(_47,_48).then(function(_4a,i){_49.onAddStops(_4a,i);});},updateStop:function(_4b,_4c){var _4d=this;_4d._clearResultError();return _4d._updateStop(_4b,_4c).then(function(_4e,i){_4d.onUpdateStops(_4e,i);});},getDirections:function(){var _4f=this;_4f._clearResultError();_4f._directionsDeferred=new _18();if(_4f._calculateValidStops()>=_4f.get("minStops")){if(!_4f._solveActive){_4f.onDirectionsStart();_4f.clearDirections();_4f._dnd.sync();_4f._sortGeocoders();_4f._getCandidates(_4f.get("stops")).then(function(_50){_4f._stops=_50;_4f._setStops();_4f.onUpdateStops(_4f.get("stops"));var _51=_4f._validateStops(_50);if(_51.error){var _52=_14.widgets.directions.error.locator;var _53=_4f.geocoders[_51.index];if(_53){_52=_14.widgets.directions.error.unknownStop.replace("<name>",_53.get("value"));}_4f._resultError(_52);_4f._directionsDeferred.reject(_52);_4f.onDirectionsFinish(new Error([_52]));}else{_4f._configureRoute();}},function(){_4f.onDirectionsFinish();});}}else{_4f.clearDirections();_4f._resultError(_14.widgets.directions.error.notEnoughStops);_4f._directionsDeferred.reject(_14.widgets.directions.error.notEnoughStops);_4f.onDirectionsFinish(new Error([_14.widgets.directions.error.notEnoughStops]));}return _4f._directionsDeferred;},unhighlightSegment:function(){var _54=this;if(_54.options.map&&_54.options.map.graphics&&_54.options.showSegmentHighlight){_54.options.map.graphics.remove(_54._segmentGraphic);_54._segmentGraphic=null;}},highlightSegment:function(_55){var _56=this;if(typeof _55==="undefined"){_55=0;}var _57=_56.directions.features[_55];var _58=new _22(_57.geometry);var _59;var _5a=_58.getPoint(0,0);var _5b=_58.getPoint(0,1);var _5c=_23.getLength(_5a,_5b);if(!_5c){_58=_5a;_59=_5a;}else{_59=_58.getPoint(0,0);}_56.unhighlightSegment();_56._segmentGraphic=new _1b(_58,_56.options.segmentSymbol,_57.attributes,_56.options.segmentInfoTemplate);if(_56._segmentGraphic&&_56.options.map&&_56.options.map.graphics){if(_56.options.showSegmentHighlight){_56.options.map.graphics.add(_56._segmentGraphic);}}},zoomToSegment:function(_5d){var _5e=this;if(typeof _5d==="undefined"){_5d=0;}if(_5e.options.map){var _5f=_5e.directions.features[_5d];var _60=_5f.geometry;var _61=new _22(_60);var _62=_61.getExtent();var _63=_5e.options.map.setExtent(_62,true);_63.then(function(){_5e._showSegmentPopup(_5f,_5d);});}},centerAtSegmentStart:function(_64){var _65=this;if(typeof _64==="undefined"){_64=0;}if(_65.options.map){var _66=_65.directions.features[_64];var _67=_66.geometry;var _68=_67.getPoint(0,0);var _69=_65.options.map.centerAt(_68);_69.then(function(){_65._showSegmentPopup(_66,_64);});}},zoomToFullRoute:function(){var _6a=this;if(_6a.options.map){_6a._clearInfoWindow();_6a.unhighlightSegment();_6a.options.map.setExtent(_6a.directions.extent,true);}},_updateStops:function(_6b){var _6c=this;var _6d=_6b.length;if(_6b&&_6d){var _6e=[];var i;if(_6d===_6c._stops.length){for(i=0;i<_6d;i++){_6e.push(_6c._updateStop(_6b[i],i));}}else{if(_6d>_6c._stops.length){var _6f=0;for(i=0;i<_6c._stops.length;i++){_6e.push(_6c._updateStop(_6b[i],i));_6f++;}for(i=_6f;i<_6d;i++){_6e.push(_6c._addStop(_6b[i],i));}}else{var _70=_6c._stops.length-_6d;for(i=0;i<_70;i++){_6c._removeStop();}for(i=0;i<_6d;i++){_6e.push(_6c._updateStop(_6b[i],i));}}}if(_6e.length){return all(_6e);}}else{return _6c._removeStops();}},_removeStops:function(){var _71=this;var _72=_4.clone(_71.get("stops"));var def=new _18();if(_71._stops.length){while(_71._stops.length){_71._removeStop();}def.resolve(_71._removeSortIds(_72));}else{def.reject("no stops to remove");}return def;},_removeStop:function(_73){var _74=this;var def=new _18();if(_74._stops.length){if(typeof _73==="undefined"){_73=_74._stops.length-1;}var _75=_4.clone(_74._stops);var _76=_75[_73];var _77=_74._dnd.getAllNodes();var _78=_77[_73];_74.geocoders[_73].destroy();_74.geocoders.splice(_73,1);_74._stops.splice(_73,1);_74._setStops();_74._geocoderSelectEvents[_78.id].remove();_74._geocoderFindEvents[_78.id].remove();_74._geocoderWatchEvents[_78.id].unwatch();_17.destroy(_78);_74._dnd.sync();_74._stopsRemovable();_74._optionsMenu();_74._checkMaxStops();_74._fixIcons();_74._sortGeocoders();def.resolve(_74._removeSortId(_76),_73);}else{def.reject("no stop to remove");}return def;},_removeTrafficLayer:function(){var _79=this;if(_79._trafficLayer&&_79.options.map){_79.options.map.removeLayer(_79._trafficLayer);_79._trafficLayer=false;}},_addStops:function(_7a,_7b){var _7c=this;var i;if(typeof _7b==="undefined"){_7b=_7c._stops.length;}var def=new _18();if(_7a&&_7a.length){_7c._getCandidates(_7a).then(function(e){if(e&&e.length){for(i=0;i<e.length;i++){_7c._insertStop(e[i],_7b+i);}_7c._setStops();def.resolve(_7c._removeSortIds(e));}else{_7c._resultError(_14.widgets.directions.error.noAddresses);def.reject(_14.widgets.directions.error.noAddresses);}});}else{_7c._resultError(_14.widgets.directions.error.noStops);def.reject(_14.widgets.directions.error.noStops);}return def;},_addStop:function(_7d,_7e){var _7f=this;if(typeof _7e==="undefined"){_7e=_7f._stops.length;}var def=new _18();_7f._checkMaxStops();if(!_7f.maxStopsReached){_7f._getCandidate(_7d,_7e).then(function(_80){_7f._insertStop(_80,_7e);_7f._setStops();def.resolve(_7f._removeSortId(_80),_7e);},function(_81){def.reject(_81);});}else{_7f._resultError(_14.widgets.directions.error.maximumStops);def.reject(_14.widgets.directions.error.maximumStops);}return def;},_setTrafficDefaults:function(){},_setPublicDefaults:function(){var _82=this;_82.options={map:null,autoSolve:true,minStops:2,maxStops:20,theme:"simpleDirections",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",directions:null,showReturnToStartOption:true,showUseOptimalRouteOption:true,returnToStart:false,useOptimalRoute:false,routeTaskUrl:location.protocol+"//route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",routeParams:{},stops:["",""],geocoderOptions:{autoComplete:true,autoNavigate:false},stopsInfoTemplate:new _1d("Location",_82._stopTpl),segmentInfoTemplate:new _1d("Route",_82._routeTpl),textSymbolFont:new _27("11px",_27.STYLE_NORMAL,_27.VARIANT_NORMAL,_27.WEIGHT_NORMAL,"Arial, Helvetica, sans-serif"),textSymbolColor:new _6([255,255,255]),textSymbolOffset:{x:0,y:10.875},fromSymbol:new _24({"url":_82.basePath+"/images/Directions/greenPoint.png","height":21.75,"width":15.75,"imageData":"iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MD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vorWwv1JsSVwAJHCHcW2Agsk3rBBZXBihhcn11biTfDixpPik1bEZyj34EVXXzJrUccWwrbZo5+B6ztRpvO1kLjjO5qW3YccZ5JeTAecQxqqV0Q6hM5KVIrNL5a/77yQPUyLbK9qiMv49zFhW6MMnPE0dwxlQ48ckXDNHJOq0C2xByreHtxhPk1sK4DEI5dut7+QWCZCyj9MXKLWmD/gl1Xtfhd6F2CI86dv+XiIrdOpeeCDd0VyW7KGbLptn9p/mrgNsIxwzKN0QO3IvlPgAEA3AQhIZtaN54AAAAASUVORK5CYII=","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),fromSymbolDrag:new _24({"url":_82.basePath+"/images/Directions/greenPointMove.png","height":21.75,"width":15.75,"imageData":"iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJj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H7NU5QCl1MYejn0IbMGKQzeK5vv8zLoOx61OuilEfGaxyltZQmSOvjGikiS/Qd7z5bNrfyMknRaSLnX9ZrE+eY0S1aaxzJDFPfgLumaFbw8Q+1SuKdPkLLrGl6xHUXWt4AcMMu2q9N0eF7UXjpmk0DaP+h3RK93m7sXdCjXhv/gIlzzT4R3YuR7a3MacKYZpMfuth/SeFHQ49FLKMYWXxr9fO/AAMAeko3KTmnLXwAAAAASUVORK5CYII=","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),stopSymbol:new _24({"url":_82.basePath+"/images/Directions/bluePoint.png","height":21.75,"width":15.75,"imageData":"iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIEN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kahEg64ZJLmqtnQONg9qxFxwaGEjMqADBhzlRTBYvCrGBPKs42sPXvyVbyOiuruFpjpUSMU0HahY4gdp+w4dYdw2ONKYAxz3tJa3l3x+lFNq+3CMUMXWFEqXnER2PiNZGTpDkB9JzBTUQpIP+v4W5uYOsqc1UavJEF6MAYPzLmAByx9n3qRgh+6uAmGrqGuSDVK8Zd1ZlbSSWFZ/PGPWguAe4QqG98zi+0VrNyADrIUdzTttOpssYBC+5QZhOspKmjlFMc2YHZY2YxwuINWJal1yRWpPzZhR06D+/XAbLTqu/cJlQyxrIFJWZtL0jV7K7YoblhTgKucGKr5A81Fn1J9Nh9POIwnfbyAd1226xAqP3lgEG1/beznM0h3HOMwXmwWWHE2XzR729RvNtxOhxhW5taW5aDLJx2QSMVief3ty3HkzRU+7Ofo74JsTtS5kf/3QSIwGmQE/Bax+3jjw5P3CLsv9My5K89KXftEtiYfFSp5IJ4zOeBo+w9nije2Pnr+arU5VKVreK5GN75Y0w/Pf0dsj9PV8wjI+xkjA+5tXcv//vlMf+n11Rgvqi0o4mXNtBrREj33xOTEK+e/VFMPPQ5SVymC7a//Nrj8zhmzdnObVnKyNBrPjYoM62RTZDNk0zx3O5tN0PU/5ZFjp6DWkKHJSaBh36Q/ffV+/uvygJbaZM1IiMkVpfpl6o3o1CFrsfPo2tIdt732A9osHEYa+Z3XI1gr+rdjvCrvH4xXBtPfIxvG0aeT31r+GrOhP7888nsl5XF/xkEZDwc7cX02yO6Srcf51uj65z+6dPsWi8Mjv/N6/L4e/TdiPOM4HZmaCJ5F0TiNWqxVE0f977EzO89jBBpFgCKyK+NdyRQqJTARmIN2yPpkm/bfuxe5njzye1zfiX5ZjLNlr8rxFizvk2jMZlTcvnoTCwM8VliWPm7sVoT/BBgAPp8JxKgcaMoAAAAASUVORK5CYII=","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),stopSymbolDrag:new _24({"url":_82.basePath+"/images/Directions/bluePointMove.png","height":21.75,"width":15.75,"imageData":"iVBOR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5plMHrqIvTdcSwCtmNrDREmtbzFFefjLsWQO1PdUDdjInF3jyHpIyRgkspVYIhJdoMyS3sh+1k2SksXkCKWtrTa2Zo/SCVPEQXWI3bnpxHPM8QacoP1WUlIML7yzcFZi7v/kcsI4tUZzWS3hK17BVa7ruIzjQSlisHVvXEESRrYcGb+tTUlX1obsG2L2Iw7huWY/g/dZNH2UB+28+f7aP1Qy3bVmSTvs+61k9DQ7M1KH1cqKcNBUsjlbfwdVvYHuqs3gZLbzbB5Bbr8RWZObDaDGiqpNI1S0RQP/mAddt+yLbx+nZt+Arx0815qhQv7fR0tQ4VSklNyENL4Y29k3i4TROzccfpK73lc8aFvIHP8/8ZSogw4nLysRvz7x+cpT6bw5KQ9p7oSDe0bcuxYPINulePXcDXw2Y02A1YnT9b9/WVfa9dpQU8HMKJQwopW14rvzHmxrXb3tO6d97gPA3TRFkKXrF6YOvLtOjJybxJU6Ss0KzYVjGVLDU6F2onTQXJXHc+Bm/uTF3hXgZbmGpDVlpSRqP+/7oP7HsSlcakHJWUJEjnpb8pTrWWuUR6ErKhee3nVNTY78qGVkQkYj6bRuwQJr32L3O5Dc70kzWPr0F65iR+NO/fyx/TqqaHOJ4Eh6yuVme8LR3DYHGVF8xlBGUa7b+UR45tufVG3yPCWHRtJp3X6/bu3H7H7CUa5lKix4ZJNGbng2Vjkdln7Q+e7FNFqg0ALEll1jv2owhVQIhAWmTXQjU0+Oy5ujuymeNJJu18vWLrL7ZKNWm/9DmblPrBCbMB4+dU7HAmhMsWzYqKYLC/4RYACkZdX+YS9hNAAAAABJRU5ErkJggg==","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),toSymbol:new _24({"url":_82.basePath+"/images/Directions/redPoint.png","height":21.75,"width":15.75,"imageData":"iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAA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rI+Po87ujrZWW+Y7VnkgUPBGV5VlBxhJ3c/rhl73szFu9fm/6Tk7JVHisE0Y9IHmmbebPL8998VgSPW0qgi2Tbmfut/dvD87cPLB7IpoxDpCxjYJC/qeEBcYxxqKMdzJs1BT8udzQp+r8Dhd3naCfO/vl9viDq/ezAa9rMRpBkBydl9kvXa+HRW1GUxZf3Brd2UrxeuqKApdebJkPZM2wvhX2RxCedfK1Wsg/ZAxD791hRV8NnX80QXqxKy4fXe//2Ix/kopFEp80hKJE/bPt0U/rjyS32lqt7GV4S+ywbhz6tGILD5qg1AbyNCRN3IhDrBp9S98vIa1Iz/Y2YxQI8qCu3O//a3TlTSs/pmHTPqPP2LmbuUsST+nFDvP7YV0a9rmyVvWRmqZwmgsQNaNr/fwmP+MgfUVluQarhS/tHwEGAEyHOx7EoDsBAAAAAElFTkSuQmCC","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),toSymbolDrag:new _24({"url":_82.basePath+"/images/Directions/redPointMove.png","height":21.75,"width":15.75,"imageData":"iVBORw0KGgoAAAANSUhEUgAAABUAAAAdCAYAAABFRCf7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYm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BlHiI6mG0fxjtTTLihP9wkF7xyvXxsP9elQJQ1OM63J78CyLj7n9nvJRyZRSjn6NbSqm206yGh/VRFNfIEzrTtSnh1vP2ykpXZBpE/opGha+svJ+s+r7ggu5DkbnIn0BVq7uIabw4414WjhmEoHHrqiURq+0ypTlOZInzaDNON6km47BxA7ds399lvDW1dO+2XoNpXRimjTE5HaRXrSTGvnL7u40O1TzV7ls3rauNOUM2JTP16Mz+EVDDR3sGzG6M7Gp/GPAAMAKMYdXbFXj3QAAAAASUVORK5CYII=","contentType":"image/png","type":"esriPMS"}).setOffset(0,10.875),routeSymbol:new _25().setColor(new _6([0,69,117,1])).setWidth(4),segmentSymbol:new _25().setColor(new _6([0,122,194,1])).setWidth(8),printPage:"",showPrintPage:true,showSegmentPopup:true,showSegmentHighlight:true,centerAtSegmentStart:true,showReverseStopsButton:true,focusOnNewStop:true,dragging:true,canModifyStops:true};},_removeEmptyStops:function(){var _83=this;var i;if(_83._stops.length>_83.get("minStops")){for(i=(_83._stops.length-1);_83._stops.length>_83.get("minStops")&&i>-1;i--){var _84=_83._stops[i];if(!_84||!_84.name){_83.removeStop(i);}}}},_setReverseGeocode:function(_85){var _86=this;if(_85.name&&_85.feature.geometry){var _87={address:_85.name};if(_86._stopGraphics[_86._dragGraphic._index]){_86._stopGraphics[_86._dragGraphic._index].setAttributes(_87);_86._stopGraphics[_86._dragGraphic._index].setGeometry(_85.feature.geometry);}if(_86._textGraphics[_86._dragGraphic._index]){_86._textGraphics[_86._dragGraphic._index].setAttributes(_87);_86._textGraphics[_86._dragGraphic._index].setGeometry(_85.feature.geometry);}if(!_86._moveInProgress){_86._unsetDraggableObject(_86._dragGraphic);}if(_86.geocoders[_86._dragGraphic._index]){_86.geocoders[_86._dragGraphic._index].set("value",_85.name);}_86._stops[_86._dragGraphic._index]=_85;_86._setStops();_86.onUpdateStops(_86.get("stops")[_86._dragGraphic._index],_86._dragGraphic._index);if(_86.get("autoSolve")){_86._directionsDeferred=new _18();_86.set("directions",null);_86._configureRouteOptions();_86._routeTask.solve(_86._routeParams,function(_88){_86._showRoute(_88);},function(_89){_86._routeTaskError(_89);});}}},_insertStop:function(_8a,_8b){var _8c=this;var _8d=_8c._dnd.getAllNodes();var _8e=false,_8f=false;var _90=_8d.length;if(!_8d[_8b]){_8f=false;_8e=false;}else{_8f=_8d[_8b];_8e=true;}var tr=_17.create("tr",{className:_8c._stopClass});var _91=_17.create("td",{className:_8c._stopIconColumnClass},tr);_17.create("div",{className:_8c._stopIconClass+" dojoDndHandle",innerHTML:_8c._getLetter(_90)},_91);var _92=_17.create("td",{className:_8c._esriStopGeocoderColumnClass},tr);var _93=_17.create("div",{},_92);if(_8c.options.canModifyStops){var _94=_17.create("td",{className:_8c._stopIconRemoveColumnClass},tr);_17.create("div",{className:_8c._stopIconRemoveClass,role:"button","data-remove":"true"},_94);}_8c._dnd.insertNodes(false,[tr],_8e,_8f);_8c._stops.splice(_8b,0,_8a);var _95=_4.mixin(_8c.options.geocoderOptions,{value:_8a.name});var _96=new _16(_95,_93);_96[_8c._sortId]=tr.id;_8c.geocoders.splice(_8b,0,_96);_96.startup();var _97=_96.on("select",function(evt){if(evt.result){var _98=_8c._dnd.getAllNodes();var _99=_5.indexOf(_98,tr);_8c._stops[_99]=evt.result;_8c._setStops();_8c.onUpdateStops(_8c.get("stops")[_99],_99);if(_8c.get("autoSolve")){_8c.getDirections().then(function(){_8c.zoomToFullRoute();});}}});_8c._geocoderSelectEvents[tr.id]=_97;var _9a=_96.on("enter-key-select",function(evt){if(evt.result){var _9b=_8c._dnd.getAllNodes();var _9c=_5.indexOf(_9b,tr);_8c._stops[_9c]=evt.result;_8c._setStops();_8c.onUpdateStops(_8c.get("stops")[_9c],_9c);if(_8c.get("autoSolve")){_8c.getDirections().then(function(){_8c.zoomToFullRoute();});}}});_8c._geocoderFindEvents[tr.id]=_9a;var _9d=_96.watch("value",function(_9e,_9f,_a0){var _a1=_8c._dnd.getAllNodes();var _a2=_5.indexOf(_a1,tr);if(_8c._stops[_a2]&&_a0!==_8c._stops[_a2].name){_8c._stops[_a2]={name:_a0};_8c._setStops();_8c.onUpdateStops(_8c.get("stops")[_a2],_a2);}});_8c._geocoderWatchEvents[tr.id]=_9d;_8c._checkMaxStops();_8c._fixIcons();if(_8c._focusOnNewStop){_96.focus();}_8c._stopsRemovable();_8c._optionsMenu();_8c._sortGeocoders();},_validateStops:function(_a3){var i;if(_a3){for(i=0;i<_a3.length;i++){if(!_a3[i]||!_a3[i].feature||!_a3[i].extent){return {error:true,index:i};}}}return {error:false};},_sortStops:function(){var _a4=this;if(_a4._stops.length){_a4._stops.sort(function(a,b){var _a5,_a6;for(var i=0;i<_a4.geocoders.length;i++){var gId=_a4.geocoders[i][_a4._sortId];if(a[_a4._sortId]===gId){_a5=i;}else{if(b[_a4._sortId]===gId){_a6=i;}}}if(_a5>_a6){return 1;}else{if(_a6>_a5){return -1;}else{return 0;}}});_a4._setStops();}},_getCandidate:function(_a7,_a8){var _a9=this;var def=new _18();var _aa=typeof _a7;var _ab={name:""};if(!_a7){def.resolve(_ab);}else{if(_aa==="object"&&_a7.hasOwnProperty("feature")&&_a7.hasOwnProperty("name")){def.resolve(_a7);}else{if(_aa==="object"&&_a7.hasOwnProperty("address")&&_a7.hasOwnProperty("location")){var _ac=_a9._globalGeocoder._hydrateResult(_a7);def.resolve(_ac);}else{if(_aa==="object"&&_a7.hasOwnProperty("name")){_a7=_a7.name;}if(_a9.geocoders[_a8]){_ab.name=_a9.geocoders[_a8].get("value");}_a9._globalGeocoder.find(_a7).then(function(_ad){if(_ad.results&&_ad.results.length){def.resolve(_ad.results[0]);}else{var _ae=_14.widgets.directions.error.locator;_a9._resultError(_ae);def.reject(_ae);}},function(){var _af=_14.widgets.directions.error.locator;_a9._resultError(_af);def.reject(_af);});}}}return def;},_updateStop:function(e,_b0){var _b1=this;var def=new _18();if(_b1._stops.length){if(typeof _b0==="undefined"){_b0=_b1._stops.length-1;}_b1._getCandidate(e,_b0).then(function(_b2){if(_b1.geocoders[_b0]){_b1.geocoders[_b0].set("value",_b2.name);_b1._stops[_b0]=_b2;_b1._setStops();}def.resolve(_b1._removeSortId(_b2));},function(_b3){def.reject(_b3);});}else{def.reject("could not update stop");}return def;},_showRoute:function(_b4){var _b5=this;_b5._clearInfoWindow();_b5._clearResultError();_b5.set("directions",_b4.routeResults[0].directions);var _b6=_b4.routeResults[0].stops;if(_b6&&_b6.length){var _b7=[];var i;_b5._clearStopGraphics();var _b8=_b6.length;if(_b5._startReturn){_b8--;}for(i=0;i<_b8;i++){var _b9=_b6[i];var _ba={extent:new _21({"xmin":_b9.geometry.x-0.25,"ymin":_b9.geometry.y-0.25,"xmax":_b9.geometry.x+0.25,"ymax":_b9.geometry.y+0.25,"spatialReference":_b9.geometry.spatialReference}),feature:_b9,name:_b9.attributes.Name};_b7.push(_ba);}_b5._stops=_b7;for(i=0;i<_b5._stops.length;i++){_b5._updateStop(_b5._stops[i],i);}_b5._setStops();_b5.onUpdateStops(_b5.get("stops"));_b5._setRouteSymbols();}_b5._clearRouteGraphics();_b5.set("mergedRouteGraphic",new _1b(_b5.directions.mergedGeometry,_b5.options.routeSymbol));if(_b5.options.map&&_b5.options.map.graphics){_b5.options.map.graphics.add(_b5.get("mergedRouteGraphic"));var _bb=_b5.get("mergedRouteGraphic").getDojoShape();if(_bb){_bb.moveToBack();}}_b5._addRouteSymbols();var _bc="";if(_b5._resultsNode){_bc+="<div class=\""+_b5._resultsRouteNameClass+"\">";_bc+=_b5.directions.routeName;_bc+="</div>";_bc+="<div class=\""+_b5._clearClass+"\"></div>";if(_b5.directions.totalLength||_b5.directions.totalTime){var _bd=_b5._formatDistance(_b5.directions.totalLength,_14.widgets.directions.units[_b5._getUnits(_b5.get("directionsLengthUnits"))].name);var _be=_b5._formatTime(_b5.directions.totalTime);_bc+="<div class=\""+_b5._resultsSummaryClass+"\">";if(_bd){_bc+=_bd;}if(_bd&&_be){_bc+=" &middot; ";}if(_be){_bc+=_be;}_bc+="</div>";}_bc+="<div class=\""+_b5._clearClass+"\"></div>";_bc+="<div class=\""+_b5._resultsRouteButtonContainerClass+"\">";_bc+="<div tabindex=\"0\" role=\"button\" class=\""+_b5._resultsViewFullRouteClass+"\" data-full-route=\"true\">"+_14.widgets.directions.viewFullRoute+"</div>";if(_b5.options.showPrintPage){_bc+="<div tabindex=\"0\" role=\"button\" title=\""+_14.widgets.directions.print+"\" class=\""+_b5._resultsPrintClass+"\" data-print-directions=\"true\"></div>";}_bc+="<div class=\""+_b5._clearClass+"\"></div>";_bc+="</div>";_bc+="<div class=\""+_b5._routesClass+"\">";_bc+="<table summary=\""+_b5.directions.routeName+"\">";_bc+="<tbody role=\"menu\">";var _bf=0;_5.forEach(_b5.directions.features,function(_c0,i){var _c1=_b5._routeClass;if(_c0.attributes){_c0.attributes.step=(i+1);}if(_c0.attributes.maneuverType){_c1+=" "+_c0.attributes.maneuverType;}if(i===0||_b5._startReturn&&(i+1)===_b5.directions.features.length){_c1+=" "+_b5._routeOriginClass;}else{if(i===(_b5.directions.features.length-1)||((_b5.stops.length-1)===_bf&&(_c0.attributes.maneuverType==="esriDMTStop"||_c0.attributes.maneuverType==="esriDMTDepart"))){_c1+=" "+_b5._routeDestinationClass;}}if(_b5.directions.features.length===(i+1)){_c1+=" "+_b5._routeLastClass;}_bc+="<tr tabindex=\"0\" role=\"menuitem\" class=\""+_c1+" "+_b5._routeZoomClass+"\" data-segment=\""+i+"\">";_bc+="<td class=\""+_b5._routeIconColumnClass+"\">";_bc+="<div class=\""+_b5._routeIconClass+"\">";if(i===0){_bc+=_b5._getLetter(_bf);_bf++;}else{if(_c0.attributes.maneuverType==="esriDMTStop"){if(_b5._startReturn&&(i+1)===_b5.directions.features.length){_bc+=_b5._getLetter(0);}else{_bc+=_b5._getLetter(_bf);}}else{if(_c0.attributes.maneuverType==="esriDMTDepart"){_bc+=_b5._getLetter(_bf);_bf++;}}}_bc+="</div>";_bc+="</td>";_bc+="<td class=\""+_b5._routeTextColumnClass+"\">";_bc+="<div class=\""+_b5._routeInfoClass+"\">";_bc+="<div class=\""+_b5._routeTextClass+"\">";var _c2=_b5.directions.strings[i],j;if(_c2){var _c3=_c0.attributes.text;for(j=0;j<_c2.length;j++){_c3=_b5._boldText(_c3,_c2[j].string);}_c0.attributes.formattedText=_c3;}else{_c0.attributes.formattedText=_c0.attributes.text;}_bc+="<strong>"+_13.format(_c0.attributes.step)+".</strong> "+_c0.attributes.formattedText;_bc+="</div>";var _c4=_b5._formatDistance(_c0.attributes.length,_14.widgets.directions.units[_b5._getUnits(_b5.get("directionsLengthUnits"))].abbr);var _c5=_b5._formatTime(_c0.attributes.time);if(_c4){_bc+="<div class=\""+_b5._routeLengthClass+"\">";_bc+=_c4;if(_c5){_bc+=" "+_c5;}_bc+="</div>";}_bc+="</div>";_bc+="</td>";_bc+="</tr>";});_bc+="</tbody>";_bc+="</table>";_bc+="</div>";if(_b5._resultsNode){_b5._resultsNode.innerHTML=_bc;}_b5._disconnectResults();var _c6=_12("[data-segment]",_b5._resultsNode);if(_c6&&_c6.length){_c6.forEach(function(_c7){var _c8=on(_c7,_c.enter,function(){var i=parseInt(_11.get(this,"data-segment"),10);_b5.highlightSegment(i);_b5.onSegmentHighlight(_b5.directions.features[i]);});_b5._resultEvents.push(_c8);var _c9=on(_c7,"focusin",function(){var i=parseInt(_11.get(this,"data-segment"),10);_b5.highlightSegment(i);_b5.onSegmentHighlight(_b5.directions.features[i]);});_b5._resultEvents.push(_c9);var _ca=on(_c7,"focusout",function(){_b5.unhighlightSegment();});_b5._resultEvents.push(_ca);var _cb=on(_c7,_c.leave,function(){_b5.unhighlightSegment();});_b5._resultEvents.push(_cb);if(_b5.options.centerAtSegmentStart){var _cc=on(_c7,"click, keydown",function(e){if(e.type==="click"||(e.type==="keydown"&&e.keyCode===_a.ENTER)){var i=parseInt(_11.get(this,"data-segment"),10);_b5.centerAtSegmentStart(i);_b5.onSegmentSelect(_b5.directions.features[i]);}});_b5._resultEvents.push(_cc);}});}}_b5.onDirectionsFinish(_b4);_b5._directionsDeferred.resolve(_b4);},_removeSortId:function(_cd){var _ce=this;var _cf=_4.clone(_cd);if(_cf&&_cf.hasOwnProperty(_ce._sortId)){delete _cf[_ce._sortId];}return _cf;},_removeSortIds:function(_d0){var _d1=this;var _d2=[];if(_d0&&_d0.length){_d2=_4.clone(_d0);for(var i=0;i<_d2.length;i++){_d2[i]=_d1._removeSortId(_d2[i]);}}return _d2;},_setStops:function(){var _d3=this;var _d4=[];var i;_d3._ignoreStopsWatch=true;if(_d3._stops&&_d3._stops.length){for(i=0;i<_d3._stops.length;i++){if(_d3._stops[i]){_d3._stops[i][_d3._sortId]=_d3.geocoders[i][_d3._sortId];}}_d4=_d3._removeSortIds(_d3._stops);}_d3.set("stops",_d4);_d3._ignoreStopsWatch=false;},_getCandidates:function(_d5){var _d6=this;var _d7=[];var i;if(_d5&&_d5.length){for(i=0;i<_d5.length;i++){_d7.push(_d6._getCandidate(_d5[i],i));}return all(_d7);}},_clearResultsHTML:function(){var _d8=this;if(_d8._resultsNode){_d8._resultsNode.innerHTML="";}},_showSegmentPopup:function(_d9){var _da=this;if(_d9&&_da.options.showSegmentPopup&&_da.options.map&&_da.options.map.infoWindow){var _db=_d9.geometry;var _dc=_db.getPoint(0,0);var _dd=new _1b(_dc,null,_d9.attributes,_da.options.segmentInfoTemplate);_da.options.map.infoWindow.setFeatures([_dd]);_da.options.map.infoWindow.show(_dc);}},_removeStopButton:function(_de){var _df=this;if(_df._stops.length>_df.get("minStops")){_df.removeStop(_de);}},_updateStopsWatch:function(_e0,_e1,_e2){var _e3=this;if(_e3.loaded&&!_e3._ignoreStopsWatch){_e3.updateStops(_e2);}},_addStopButton:function(){var _e4=this;_e4.addStop();},_sortGeocoders:function(){var _e5=this;var _e6=_e5._dnd.getAllNodes();_e5.geocoders.sort(function(a,b){return _e5._sortGeocodersToNodes(a,b,_e6,_e5._sortId);});_e5._sortStops();},_disconnectResults:function(){var _e7=this,i;if(_e7._resultEvents.length){for(i=0;i<_e7._resultEvents.length;i++){_e7._resultEvents[i].remove();}}},_formatTime:function(_e8){var hr,min,str="";var _e9=Math.round(_e8);hr=Math.floor(_e9/60);min=Math.floor(_e9%60);if(hr){str+=hr+" ";if(hr>1){str+=_14.widgets.directions.time.hours;}else{str+=_14.widgets.directions.time.hour;}}if(hr&&min){str+=" ";}if(min){str+=min+" ";if(min>1){str+=_14.widgets.directions.time.minutes;}else{str+=_14.widgets.directions.time.minute;}}return str;},_formatDistance:function(_ea,_eb){var d=Math.round(_ea*100)/100;if(d===0){return "";}return _13.format(d)+" "+_eb;},_setMoveSymbol:function(_ec){var _ed=this;_ed._moveSymbolSet=true;var _ee=_ed._setStopSymbol(_ec._index,_ed._stopGraphics.length,true);_ec.setSymbol(_ee);},_unsetMoveSymbol:function(_ef){var _f0=this;var _f1=_f0._setStopSymbol(_ef._index,_f0._stopGraphics.length);_ef.setSymbol(_f1);_f0._moveSymbolSet=false;},_removeTextGraphic:function(_f2){var _f3=this;var _f4=_f3._textGraphics[_f2];_f3.options.map.graphics.remove(_f4);},_setDraggableObject:function(_f5){var _f6=this;if(_f5._drag&&_f6.options.map&&_f6.options.map.graphics){_f6._removeTextGraphic(_f5._index);_f6._dragGraphic=_f5;_f6._dragGeometry=_f5.geometry;_f6._edit.activate(_2d.MOVE,_f5);}},_setTextGraphic:function(_f7){var _f8=this;if(_f7._drag&&_f8.options.map&&_f8.options.map.graphics){var _f9=_f8._textGraphics[_f7._index];_f9.setGeometry(_f7.geometry);_f8.options.map.graphics.add(_f9);var _fa=_f9.getDojoShape();if(_fa){_fa.moveToFront();}}},_unsetDraggableObject:function(_fb){var _fc=this;if(_fb._drag){if(_fc._moveSymbolSet){_fc._unsetMoveSymbol(_fb);}_fc._setTextGraphic(_fb);_fc._edit.deactivate();}},_editToolbar:function(){var _fd=this;if(_fd.options.map){_fd._edit=new _2d(_fd.options.map);}},_createGlobalGeocoder:function(){var _fe=this;var def=new _18();if(_fe.options.map){_fe.options.geocoderOptions.map=_fe.options.map;}if(!_fe.options.geocoderOptions.theme){_fe.options.geocoderOptions.theme=_fe.get("theme");}if(!_fe.options.geocoderOptions.autoComplete){_fe.options.geocoderOptions.maxLocations=1;}_fe._globalGeocoder=new _16(_fe.options.geocoderOptions,_17.create("div"));var _ff=_fe._globalGeocoder.on("load",function(){def.resolve();});_fe._onEvents.push(_ff);_fe._globalGeocoder.startup();return def;},_init:function(){var _100=this;_100._createGlobalGeocoder().then(function(){_100._createRouteTask();_100._editToolbar();_100._setEvents();if(!_100.options.canModifyStops){_17.destroy(_100._addDestinationNode);}_100._focusOnNewStop=_100.options.focusOnNewStop;if(_100.options.stops){_100.addStops(_100.options.stops).then(function(){if(_100._focusOnNewStop){_100.geocoders[0].focus();}});}_100.loaded=true;_100.onLoad();});},_calculateValidStops:function(){var _101=this,_102=0,i;var _103=_101._stops;for(i=0;i<_103.length;i++){if(_103[i]&&_103[i].name){_102++;}}return _102;},_setStopSymbol:function(i,_104,move){var _105=this;if(i===0){if(move&&_105.options.fromSymbolDrag){return _105.options.fromSymbolDrag;}return _105.options.fromSymbol;}else{if(i===(_104-1)){if(move&&_105.options.toSymbolDrag){return _105.options.toSymbolDrag;}return _105.options.toSymbol;}else{if(move&&_105.options.stopSymbolDrag){return _105.options.stopSymbolDrag;}return _105.options.stopSymbol;}}},_setRouteSymbols:function(){var _106=this,i;for(i=0;i<_106.stops.length;i++){var stop=_106.stops[i];if(stop&&stop.feature){var _107=_106._setStopSymbol(i,_106.stops.length);var _108=_106._defaultSR;if(_106.options.map){_108=_106.options.map.spatialReference;}var _109=new _20(stop.feature.geometry.x,stop.feature.geometry.y,_108);var _10a=_106._getLetter(i);var _10b=new _26(_10a,_106.options.textSymbolFont,_106.options.textSymbolColor);if(_106.options.textSymbolOffset){_10b.setOffset(_106.options.textSymbolOffset.x,_106.options.textSymbolOffset.y);}var _10c=new _1b(_109,_10b);_10c._textGraphic=true;_10c._index=i;var _10d=new _1b(_109,_107,{address:stop.name},_106.options.stopsInfoTemplate);_10d._drag=true;_10d._index=i;_106._stopGraphics[i]=_10d;_106._textGraphics[i]=_10c;}}},_addRouteSymbols:function(){var _10e=this;var i;if(_10e._stopGraphics.length&&_10e.options.map&&_10e.options.map.graphics){for(i=0;i<_10e._stopGraphics.length;i++){_10e.options.map.graphics.add(_10e._stopGraphics[i]);var _10f=_10e._stopGraphics[i].getDojoShape();if(_10f){_10f.moveToFront();}_10e.options.map.graphics.add(_10e._textGraphics[i]);var _110=_10e._textGraphics[i].getDojoShape();if(_110){_110.moveToFront();}}}},_showTrafficLayer:function(){var _111=this;if(_111.options.map&&!_111._trafficLayer&&_111.options.trafficLayer){_111._trafficLayer=_111.options.map.addLayer(_111.options.trafficLayer);}if(_111._trafficLayer){_111._trafficLayer.show();}},_hideTrafficLayer:function(){var _112=this;if(_112._trafficLayer){_112._trafficLayer.hide();}},_toggleUnits:function(e){var _113=this;if(e.target===_113._useMilesNode){_113.set("directionsLengthUnits",_1c.MILES);}else{if(e.target===_113._useKilometersNode){_113.set("directionsLengthUnits",_1c.KILOMETERS);}}},_toggleCheckbox:function(e){var _114=this;var _115=_11.get(e.target,"checked");if(e.target===_114._findOptimalOrderNode){_114.set("useOptimalRoute",_115);}else{if(e.target===_114._useTrafficNode){_114.set("traffic",_115);}else{if(e.target===_114._returnToStartNode){_114.set("returnToStart",_115);}}}},_configureRouteOptions:function(){var _116=this;_116._routeParams.directionsLengthUnits=_116.get("directionsLengthUnits");_116._routeParams.findBestSequence=_116.get("useOptimalRoute");if(_116._routeParams.findBestSequence){_116._routeParams.returnStops=true;}else{_116._routeParams.returnStops=false;}if(_116.get("traffic")){var now=new Date();var utc=new Date(now.getTime()-(now.getTimezoneOffset()*60*1000));_116._routeParams.startTime=utc;_116._showTrafficLayer();}else{_116._routeParams.startTime=null;_116._hideTrafficLayer();}if(_116.get("returnToStart")&&_116._stopGraphics.length){var _117=new _1b(_116._stopGraphics[0].geometry,null,_116._stopGraphics[0].attributes);var _118=_116._stopGraphics.slice(0);_116._startReturn=_117;_118.push(_117);_116._routeParams.stops.features=_118;}else{_116._startReturn=null;_116._routeParams.stops.features=_116._stopGraphics;}},_configureRoute:function(){var _119=this;_119._setRouteSymbols();_119._configureRouteOptions();_119.set("directions",null);_119._routeTask.solve(_119._routeParams,function(_11a){_119._showRoute(_11a);},function(_11b){_119._routeTaskError(_11b);});},_boldText:function(_11c,_11d){return _11c.replace(new RegExp("(^|\\s)("+_11d+")(\\s|$)","ig"),"$1<strong>$2</strong>$3");},_clearStopGraphics:function(){var _11e=this;var i;if(_11e._stopGraphics.length&&_11e.options.map&&_11e.options.map.graphics){for(i=0;i<_11e._stopGraphics.length;i++){_11e.options.map.graphics.remove(_11e._stopGraphics[i]);_11e.options.map.graphics.remove(_11e._textGraphics[i]);}}_11e._stopGraphics=[];_11e._textGraphics=[];},_clearRouteGraphics:function(){var _11f=this;if(_11f.get("mergedRouteGraphic")&&_11f.options.map&&_11f.options.map.graphics){_11f.options.map.graphics.remove(_11f.get("mergedRouteGraphic"));_11f.set("mergedRouteGraphic",null);}_11f.unhighlightSegment();},_clearInfoWindow:function(){var _120=this;if(_120.options.map&&_120.options.map.infoWindow){_120.options.map.infoWindow.hide();if(_120.options.map.infoWindow.features){_120.options.map.infoWindow.clearFeatures();}}},_getLetter:function(i){var _121=this.options.alphabet;var _122="";if(_121&&_121.length){if(!i){i=0;}if(i>=_121.length){i=_121.length-1;}if(typeof _121==="string"){_122=_121.substr(i,1);}else{if(_121 instanceof Array){_122=_121[i];}}}return _122;},_directionsButton:function(){var _123=this;_123._removeEmptyStops();_123.getDirections().then(function(){_123.zoomToFullRoute();});},_fixIcons:function(){var _124=this,i,_125=_124._dnd.getAllNodes();for(i=0;i<_125.length;i++){var icon=_12("."+_124._stopIconClass,_125[i])[0];if(icon){icon.innerHTML=_124._getLetter(i);}_10.remove(_125[i],_124._stopOriginClass+" "+_124._stopDestinationClass);if(i===0){_10.add(_125[i],_124._stopOriginClass);}else{if(i===(_125.length-1)){_10.add(_125[i],_124._stopDestinationClass);}}}if(_124.options.showReverseStopsButton){var _126=_12("[data-reverse-td]",_124._dndNode)[0];_17.destroy(_126);_17.create("td",{"data-reverse-td":"true",rowspan:_125.length,className:_124._esriStopReverseColumnClass,innerHTML:"<div role=\"button\" class=\""+_124._reverseStopsClass+"\" data-reverse-stops=\"true\" title=\""+_14.widgets.directions.reverseDirections+"\"></div>"},_125[0]);}},_setEvents:function(){var _127=this;var _128=on(_127._dndNode,"[data-reverse-stops]:click, [data-reverse-stops]:keydown",function(e){if(e.type==="click"||(e.type==="keydown"&&e.keyCode===_a.ENTER)){_127._reverseStops();}});_127._onEvents.push(_128);var _129=on(_127._resultsNode,"[data-print-directions]:click, [data-print-directions]:keydown",function(e){if(e.type==="click"||(e.type==="keydown"&&e.keyCode===_a.ENTER)){_127._printDirections();}});_127._onEvents.push(_129);var _12a=on(_127._resultsNode,"[data-full-route]:click, [data-full-route]:keydown",function(e){if(e.type==="click"||(e.type==="keydown"&&e.keyCode===_a.ENTER)){_127.zoomToFullRoute();}});_127._onEvents.push(_12a);var _12b=on(_127._dndNode,"[data-remove]:click, [data-remove]:keydown",function(e){if(e.type==="click"||(e.type==="keydown"&&e.keyCode===_a.ENTER)){var _12c=_12("[data-remove]",_127._dndNode);var _12d=_5.indexOf(_12c,this);_127._removeStopButton(_12d);}});_127._onEvents.push(_12b);var _12e=on(_127._dnd,"Drop",function(){_127._dnd.sync();_127._sortGeocoders();_127._fixIcons();_127.onUpdateStops(_127.get("stops"));if(_127._calculateValidStops()===_127.geocoders.length&&_127._routeParams.stops.features.length){if(_127.get("autoSolve")){_127.getDirections().then(function(){_127.zoomToFullRoute();});}}});_127._onEvents.push(_12e);var _12f=on(_127._dnd,"DndStart",function(){var body=_12("body")[0];_10.add(body,_127._dndDragBodyClass);});_127._onEvents.push(_12f);var _130=on(_127._dnd,"DndDrop, DndCancel",function(){var body=_12("body")[0];_10.remove(body,_127._dndDragBodyClass);});_127._onEvents.push(_130);if(_127.options.map&&_127.options.map.graphics){if(_127.options.dragging){var _131=_127.options.map.graphics.on("mouse-over",function(e){var _132;if(e.graphic._drag){_132=_127._edit.getCurrentState();if(!_132.graphic){_127._setDraggableObject(e.graphic);}if(!_127._moveSymbolSet){_127._setMoveSymbol(e.graphic);}}else{if(e.graphic._textGraphic){_132=_127._edit.getCurrentState();if(_127._stopGraphics[e.graphic._index]){if(!_132.graphic){_127._setDraggableObject(_127._stopGraphics[e.graphic._index]);}if(!_127._moveSymbolSet){_127._setMoveSymbol(_127._stopGraphics[e.graphic._index]);}}}}});_127._onEvents.push(_131);var _133=_127.options.map.graphics.on("mouse-out",function(e){if(!_127._moveInProgress&&e.graphic._drag){_127._unsetDraggableObject(e.graphic);}});_127._onEvents.push(_133);}var _134=_3.connect(_127._edit,"onGraphicClick",function(e){if(_127.options.map&&_127.options.map.infoWindow){_127.options.map.infoWindow.setFeatures([e]);_127.options.map.infoWindow.show(e.geometry);}});_127._connectEvents.push(_134);var _135=_3.connect(_127._edit,"onGraphicFirstMove",function(){_127._moveInProgress=true;});_127._connectEvents.push(_135);var _136=_3.connect(_127._edit,"onGraphicMoveStop",function(_137){_127._moveInProgress=false;_127._unsetDraggableObject(_137);if(_127._dragGeometry!==_137.geometry){_127._currentEditableGraphic=_137;if(_127.get("autoSolve")){_127.onDirectionsStart();_127._clearInfoWindow();_127._clearResultsHTML();}_127._globalGeocoder.find(_137.geometry).then(function(_138){if(_138&&_138.results.length){_127._setReverseGeocode(_138.results[0]);}else{_127._reverseGeocodeError(new Error(_14.widgets.directions.error.locator));}},function(_139){_127._reverseGeocodeError(_139);});}});_127._connectEvents.push(_136);}},_reverseGeocodeError:function(_13a){var _13b=this;_13b.onDirectionsFinish(_13a);var _13c=_14.widgets.directions.error.locator;_13b._resultError(_13c);_13b._clearRouteGraphics();_13b._currentEditableGraphic.setAttributes({error:_13c});var _13d=_13b._currentEditableGraphic._index;_13b._updateStop({name:""},_13d).then(function(resp,i){_13b.onUpdateStops(resp,i);});},_routeTaskError:function(_13e){var _13f=this;var _140=_14.widgets.directions.error.routeTask;_13f._resultError(_140);_13f._directionsDeferred.reject(_13e);_13f.onDirectionsFinish(_13e);},_clearResultError:function(){var _141=this;_141._errors=[];if(_141._errorNode){_141._errorNode.innerHTML="";}},_resultError:function(_142){var _143=this;var html="";_143._errors.push(_142);html+="<div class=\""+_143._routesErrorClass+"\">";if(_143._errors.length){html+="<ul>";for(var i=0;i<_143._errors.length;i++){html+="<li>"+_143._errors[i]+"</li>";}html+="</ul>";}html+="</div>";if(_143._errorNode){_143._errorNode.innerHTML=html;}},_getUnits:function(unit){switch(unit){case _1c.KILOMETERS:return "KILOMETERS";case _1c.METERS:return "METERS";case _1c.NAUTICAL_MILES:return "NAUTICAL_MILES";default:return "MILES";}},_createRouteTask:function(){var _144=this;_144._routeTask=new _2b(_144.options.routeTaskUrl);_144._routeParams=new _2c();var _145={returnRoutes:false};var _146={directionsOutputType:"complete",stops:new _2a(),returnDirections:true,doNotLocateOnRestrictedElements:true};if(_144.options.map){_146.outSpatialReference=_144.options.map.spatialReference;}else{_146.outSpatialReference=_144._defaultSR;}if(_144.options.routeParams){_4.mixin(_144._routeParams,_145,_144.options.routeParams,_146);}_144._configureRouteOptions();},_reverseStops:function(){var _147=this;var _148=_147._dnd.getAllNodes();if(_148.length){_148.reverse();_147._dnd.clearItems();_147._dnd.insertNodes(false,_148);_147._dnd.sync();_147._stopsRemovable();_147._optionsMenu();_147._checkMaxStops();_147._fixIcons();_147._sortGeocoders();_147.onUpdateStops(_147.get("stops"));if(_147.get("autoSolve")){_147.getDirections().then(function(){_147.zoomToFullRoute();});}}},_setTemplates:function(){var _149=this;_149._routeTpl="";_149._routeTpl+="<div class=\"${maneuverType}\">";_149._routeTpl+="<div class=\""+_149._routeIconClass+" "+_149._infoWindowRouteClass+"\">";_149._routeTpl+="<strong>${step}.</strong> ${formattedText}";_149._routeTpl+="</div>";_149._routeTpl+="</div>";_149._stopTpl="${address}${error}";},_setClasses:function(){var _14a=this;_14a._widgetContainerClass="esriDirectionsContainer";_14a._stopsContainerClass="esriStopsContainer";_14a._reverseStopsClass="esriStopsReverse";_14a._addStopsClass="esriStopsAdd";_14a._stopsClass="esriStops";_14a._stopsRemovableClass="esriStopsRemovable";_14a._stopsButtonContainerClass="esriStopsButtons";_14a._stopsOptionsButtonClass="esriStopsOptionsButton";_14a._stopsAddDestinationClass="esriStopsAddDestination";_14a._stopsGetDirectionsContainerClass="esriStopsGetDirectionsContainer";_14a._stopsGetDirectionsClass="esriStopsGetDirections";_14a._stopsClearDirectionsClass="esriStopsClearDirections";_14a._stopsOptionsOptionsEnabledClass="esriStopsOptionsEnabled";_14a._stopsOptionsMenuClass="esriStopsOptionsMenu";_14a._stopsFindOptimalOrderClass="esriFindOptimalOrderOption";_14a._stopsUseTrafficClass="esriUseTrafficOption";_14a._stopsReturnToStartClass="esriReturnToStartOption";_14a._stopsOptionsCheckboxesClass="esriOptionsCheckboxes";_14a._stopsOptionsUnitsClass="esriOptionsUnits";_14a._stopClass="esriStop";_14a._stopOriginClass="esriStopOrigin";_14a._stopDestinationClass="esriStopDestination";_14a._esriStopGeocoderColumnClass="esriStopGeocoderColumn";_14a._esriStopReverseColumnClass="esriStopReverseColumn";_14a._stopIconColumnClass="esriStopIconColumn";_14a._stopIconClass="esriStopIcon";_14a._stopIconRemoveColumnClass="esriStopIconRemoveColumn";_14a._stopIconRemoveClass="esriStopIconRemove";_14a._resultsContainerClass="esriResultsContainer";_14a._resultsLoadingClass="esriResultsLoading";_14a._resultsPrintClass="esriResultsPrint";_14a._resultsSummaryClass="esriResultsSummary";_14a._resultsViewFullRouteClass="esriResultsViewFullRoute";_14a._resultsRouteNameClass="esriResultsRouteName";_14a._resultsRouteButtonContainerClass="esriResultsButtonsContainer";_14a._routesContainerClass="esriRoutesContainer";_14a._routesClass="esriRoutes";_14a._routesErrorClass="esriRoutesError";_14a._routeClass="esriRoute";_14a._routeTextColumnClass="esriRouteTextColumn";_14a._routeTextClass="esriRouteText";_14a._routeLengthClass="esriRouteLength";_14a._routeOriginClass="esriDMTStopOrigin";_14a._routeDestinationClass="esriDMTStopDestination";_14a._routeLastClass="esriDMTStopLast";_14a._routeInfoClass="esriRouteInfo";_14a._routeIconColumnClass="esriRouteIconColumn";_14a._routeIconClass="esriRouteIcon";_14a._infoWindowRouteClass="esriInfoWindowRoute";_14a._routeZoomClass="esriRouteZoom";_14a._esriPrintPageClass="esriPrintPage";_14a._esriPrintBarClass="esriPrintBar";_14a._esriPrintButtonClass="esriPrintButton";_14a._esriCloseButtonClass="esriCloseButton";_14a._esriPrintMainClass="esriPrintMain";_14a._esriPrintHeaderClass="esriPrintHeader";_14a._esriPrintLogoClass="esriPrintLogo";_14a._esriPrintNameClass="esriPrintName";_14a._esriPrintNotesClass="esriPrintNotes";_14a._esriPrintLengthClass="esriPrintLength";_14a._esriPrintDirectionsClass="esriPrintDirections";_14a._esriPrintFooterClass="esriPrintFooter";_14a._esriPrintStopLabelClass="esriPrintStopLabel";_14a._clearClass="esriClear";_14a._dndDragBodyClass="esriDndDragDirection";},_setPrivateDefaults:function(){var _14b=this;_14b._sortId="_dndId";_14b._stops=[];_14b._i18n=_14;_14b._onEvents=[];_14b._connectEvents=[];_14b._watchEvents=[];_14b._geocoderSelectEvents=[];_14b._geocoderFindEvents=[];_14b._geocoderWatchEvents=[];_14b._resultEvents=[];_14b._stopGraphics=[];_14b._textGraphics=[];_14b._errors=[];_14b._defaultSR=new _1e(4326);},_sortGeocodersToNodes:function(a,b,_14c,id){var aId=a[id];var bId=b[id];var aDnd=_d.byId(aId);var bDnd=_d.byId(bId);var _14d=_5.indexOf(_14c,aDnd);var _14e=_5.indexOf(_14c,bDnd);var i;for(i=0;i<_14c.length;i++){if(i===_14d){return -1;}else{if(i===_14e){return 1;}}}},_setOptions:function(){var _14f=this;var _150=_14f.get("optimalRoute")||false;if(_14f._findOptimalOrderNode){_11.set(_14f._findOptimalOrderNode,"checked",_150);}var _151=_14f.get("returnToStart")||false;if(_14f._returnToStartNode){_11.set(_14f._returnToStartNode,"checked",_151);}var _152=_14f.get("traffic")||false;if(_14f._useTrafficNode){_11.set(_14f._useTrafficNode,"checked",_152);}var _153=_14f.get("directionsLengthUnits");switch(_153){case _1c.KILOMETERS:_11.set(_14f._useKilometersNode,"checked",true);_11.set(_14f._useMilesNode,"checked",false);break;case _1c.MILES:_11.set(_14f._useKilometersNode,"checked",false);_11.set(_14f._useMilesNode,"checked",true);break;}},_widgetProperties:function(){var _154=this;_154.set("theme",_154.options.theme);_154.set("showTrafficOption",_154.options.showTrafficOption);_154.set("showReturnToStartOption",_154.options.showReturnToStartOption);_154.set("showUseOptimalRouteOption",_154.options.showUseOptimalRouteOption);_154.set("optimalRoute",_154.options.useOptimalRoute);_154.set("returnToStart",_154.options.returnToStart);_154.set("traffic",_154.options.traffic);_154.set("minStops",_154.options.minStops);_154.set("maxStops",_154.options.maxStops);_154.set("printPage",_154.options.printPage);_154.set("autoSolve",_154.options.autoSolve);var _155=_1c.KILOMETERS;if(_154.options.routeParams.directionsLengthUnits){_155=_154.options.routeParams.directionsLengthUnits;}else{if(_154.options.routeParams.directionsLanguage){_155=_154.options.routeParams.directionsLanguage==="en"?_1c.MILES:_1c.KILOMETERS;}}_154.set("directionsLengthUnits",_155);},_optionsMenu:function(){var _156=this;if(_156._useTrafficItemNode){if(_156.get("showTrafficOption")){_f.set(_156._useTrafficItemNode,"display","block");}else{_f.set(_156._useTrafficItemNode,"display","none");}}if(_156._returnToStartItemNode){if(_156.get("showReturnToStartOption")){_f.set(_156._returnToStartItemNode,"display","block");}else{_f.set(_156._returnToStartItemNode,"display","none");}}if(_156._findOptimalOrderItemNode){if(_156.get("showUseOptimalRouteOption")&&_156._stops.length>=4){_f.set(_156._findOptimalOrderItemNode,"display","block");}else{_f.set(_156._findOptimalOrderItemNode,"display","none");}}if(_156._stops.length>=_156.get("minStops")){_10.add(_156._widgetContainer,_156._stopsOptionsOptionsEnabledClass);}else{_10.remove(_156._widgetContainer,_156._stopsOptionsOptionsEnabledClass);if(_156._optionsMenuNode){var _157=_f.get(_156._optionsMenuNode,"display");if(_157==="block"){_156._toggleOptionsMenu();}}if(_156.loaded){_156._configureRouteOptions();}}},_stopsRemovable:function(){var _158=this;if(_158.geocoders.length>_158.get("minStops")){_10.add(_158._widgetContainer,_158._stopsRemovableClass);}else{_10.remove(_158._widgetContainer,_158._stopsRemovableClass);}},_checkMaxStops:function(){var _159=this;if(_159._stops.length<_159.get("maxStops")){_159._showAddDestination();_159.set("maxStopsReached",false);}else{_159._hideAddDestination();_159.set("maxStopsReached",true);}},_updateThemeWatch:function(attr,_15a,_15b){var _15c=this;if(_15c.loaded){_10.remove(_15c.domNode,_15a);_10.add(_15c.domNode,_15b);}},_toggleOptionsMenu:function(){var _15d=this;if(_15d._optionsMenuNode){var _15e=_f.get(_15d._optionsMenuNode,"display");if(_15e==="block"){_f.set(_15d._optionsMenuNode,"display","none");_15d._optionsButtonNode.innerHTML=_14.widgets.directions.showOptions;}else{_f.set(_15d._optionsMenuNode,"display","block");_15d._optionsButtonNode.innerHTML=_14.widgets.directions.hideOptions;}}},_hideAddDestination:function(){var _15f=this;_10.remove(_15f._widgetContainer,_15f._addStopsClass);},_showAddDestination:function(){var _160=this;_10.add(_160._widgetContainer,_160._addStopsClass);},_getAbsoluteUrl:function(){var url=_1.toUrl("esri/dijit");if(/^https?\:/i.test(url)){return url;}else{if(/^\/\//i.test(url)){return window.location.protocol+url;}else{if(/^\//i.test(url)){return window.location.protocol+"//"+window.location.host+url;}}}},_getManeuverImage:function(_161){var _162=this;if(_161){var _163=_162._getAbsoluteUrl()+"/images/Directions/maneuvers/";var _164=".png";if(_161==="esriDMTStop"||_161==="esriDMTDepart"){return "";}return _163+_161+_164;}return "";},_loadPrintDirections:function(){var _165=this;var _166=_165._getAbsoluteUrl()+"/css/Directions.css";var _167=_165._getAbsoluteUrl()+"/css/DirectionsPrint.css";var dir;if(_e.isBodyLtr()){dir="ltr";}else{dir="rtl";}var _168="";_168+="<!DOCTYPE HTML>";_168+="<html lang=\"en\" class=\""+_165.get("theme")+"\" dir=\""+dir+"\">";_168+="<head>";_168+="<meta charset=\"utf-8\">";_168+="<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">";_168+="<title>"+_165.directions.routeName+"</title>";_168+="<link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\""+_166+"\" />";_168+="<link rel=\"stylesheet\" media=\"print\" type=\"text/css\" href=\""+_167+"\" />";_168+="</head>";_168+="<body class=\""+_165._esriPrintPageClass+"\">";_168+="<div class=\""+_165._esriPrintBarClass+"\">";_168+="<div class=\""+_165._esriCloseButtonClass+"\" title=\""+_14.common.close+"\" onclick=\"window.close();\">"+_14.common.close+"</div>";_168+="<div id=\"printButton\" class=\""+_165._esriPrintButtonClass+"\" title=\""+_14.widgets.directions.print+"\" onclick=\"window.print();\">"+_14.widgets.directions.print+"</div>";_168+="</div>";_168+="<div class=\""+_165._esriPrintMainClass+"\">";_168+="<div class=\""+_165._esriPrintHeaderClass+"\">";_168+="<img class=\""+_165._esriPrintLogoClass+"\" src=\"https://www.arcgis.com/about/graphics/logo-esri.png\" />";_168+="<div class=\""+_165._esriPrintNameClass+"\">"+_165.directions.routeName+"</div>";_168+="<div class=\""+_165._esriPrintLengthClass+"\">"+_165._formatDistance(_165.directions.totalLength,_14.widgets.directions.units[_165._getUnits(_165.get("directionsLengthUnits"))].name)+". "+_165._formatTime(_165.directions.totalTime)+"</div>";_168+="<div id=\"print_helper\"></div>";_168+="<textarea onkeyup=\"document.getElementById('print_helper').innerHTML=this.value;\" id=\"print_area\" class=\""+_165._esriPrintNotesClass+"\" placeholder=\""+_14.widgets.directions.printNotes+"\"></textarea>";_168+="<div class=\""+_165._clearClass+"\"></div>";_168+="</div>";_168+="<div class=\""+_165._esriPrintDirectionsClass+"\">";_168+="<table>";_168+="<tbody>";var _169=0;_5.forEach(_165.directions.features,function(_16a,i){var _16b=_165.directions.strings[i],j;if(_16b){var _16c=_16a.attributes.text;for(j=0;j<_16b.length;j++){_16c=_165._boldText(_16c,_16b[j].string);}_16a.attributes.formattedText=_16c;}else{_16a.attributes.formattedText=_16a.attributes.text;}var _16d="";if(_165.directions.features.length===(i+1)){_16d=_165._routeLastClass;}if(_16a.attributes){_16a.attributes.step=(i+1);}_168+="<tr class=\""+_16d+"\">";_168+="<td class=\""+_165._routeIconColumnClass+"\">";var _16e=_165._getManeuverImage(_16a.attributes.maneuverType);var _16f;if(i===0){_16f=_165._getLetter(_169);_169++;}else{if(_16a.attributes.maneuverType==="esriDMTStop"){_16f=_165._getLetter(_169);}else{if(_16a.attributes.maneuverType==="esriDMTDepart"){_16f=_165._getLetter(_169);_169++;}}}if(_16e){_168+="<img src=\""+_16e+"\" />";}else{if(_16f){_168+="<div class=\""+_165._esriPrintStopLabelClass+"\">";_168+=_16f;_168+="</div>";}}_168+="</td>";_168+="<td class=\""+_165._routeTextColumnClass+"\">";_168+="<div><strong>"+_13.format(_16a.attributes.step)+".</strong> "+_16a.attributes.formattedText+"</div>";_168+="</td>";_168+="<td class=\""+_165._routeTextColumnClass+"\">";_168+="<div class=\""+_165._routeLengthClass+"\">"+_165._formatDistance(_16a.attributes.length,_14.widgets.directions.units[_165._getUnits(_165.get("directionsLengthUnits"))].abbr)+"</div>";_168+="</td>";_168+="</tr>";});_168+="</tbody>";_168+="</table>";_168+="</div>";_168+="<div class=\""+_165._esriPrintFooterClass+"\">";_168+="<p>"+_14.widgets.directions.printDisclaimer+"</p>";_168+="</div>";_168+="</div>";_168+="</body>";_168+="</html>";_165._printWindow.document.open("text/html","replace");_165._printWindow.document.write(_168);_165._printWindow.document.close();},_printDirections:function(){var _170=this;var w=screen.width/2;var h=screen.height/1.5;var left=(screen.width/2)-(w/2);var top=(screen.height/2)-(h/2);var _171="toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width="+w+", height="+h+", top="+top+", left="+left;if(_170.printPage){window.directions=_170.directions;window.open(_170.printPage,"directions_widget_print",_171,true);}else{_170._printWindow=window.open("","directions_widget_print",_171,true);_170._loadPrintDirections();}}});if(_b("extend-esri")){_4.setObject("dijit.Directions",_2e,_1a);}return _2e;});