/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){_1.loadInit(function(){var _4=_1.getObject("dojox.gfx",true),sl,_5,_6;while(!_4.renderer){if(_1.config.forceGfxRenderer){_3.gfx.renderer=_1.config.forceGfxRenderer;break;}var _7=(typeof _1.config.gfxRenderer=="string"?_1.config.gfxRenderer:"svg,vml,canvas,silverlight").split(",");for(var i=0;i<_7.length;++i){switch(_7[i]){case "svg":if("SVGAngle" in _1.global){_3.gfx.renderer="svg";}break;case "vml":if(_1.isIE){_3.gfx.renderer="vml";}break;case "silverlight":try{if(_1.isIE){sl=new ActiveXObject("AgControl.AgControl");if(sl&&sl.IsVersionSupported("1.0")){_5=true;}}else{if(navigator.plugins["Silverlight Plug-In"]){_5=true;}}}catch(e){_5=false;}finally{sl=null;}if(_5){_3.gfx.renderer="silverlight";}break;case "canvas":if(_1.global.CanvasRenderingContext2D){_3.gfx.renderer="canvas";}break;}if(_4.renderer){break;}}break;}if(_1.config.isDebug){console.log("gfx renderer = "+_4.renderer);}if(_4[_4.renderer]){_4.switchTo(_4.renderer);}else{_4.loadAndSwitch=_4.renderer;_1["require"]("dojox.gfx."+_4.renderer);}});return {depends:[["provide","dijit._base.manager"],["provide","dojox.gfx._base"],["provide","esri.WKIDUnitConversion"],["provide","esri.geometry.utils"],["provide","esri.geometry"],["provide","dojo.io.script"],["provide","esri.symbol"],["provide","esri.graphic"],["provide","esri.utils"],["provide","dojo.fx.Toggler"],["provide","dojo.fx"],["provide","esri.fx"],["provide","dojox.gfx.matrix"],["provide","esri.layers.layer"],["provide","dojox.gfx"],["provide","dojo.date"],["provide","esri.renderer"],["provide","esri.layers.graphics"],["provide","esri._coremap"],["provide","esri.touchcontainer"],["provide","dojox.xml.parser"],["provide","esri.layers.dynamic"],["provide","esri.layers.agscommon"],["provide","esri._time"],["provide","esri.layers.agsdynamic"],["provide","dojox.collections._base"],["provide","dojox.collections.ArrayList"],["provide","esri.layers.tiled"],["provide","esri.layers.agstiled"],["provide","esri.map"],["provide","esri.InfoWindowBase"],["provide","esri.dijit.InfoWindowLite"],["i18n._preloadLocalizations","esri.nls.jsapi",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]]],defineResource:function(_8,_9,_a){if(!_8._hasResource["dijit._base.manager"]){_8._hasResource["dijit._base.manager"]=true;_8.provide("dijit._base.manager");_8.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_b){if(this._hash[_b.id]){throw new Error("Tried to register widget with id=="+_b.id+" but that id is already registered");}this._hash[_b.id]=_b;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_c,_d){_d=_d||_8.global;var i=0,id;for(id in this._hash){_c.call(_d,this._hash[id],i++,this._hash);}return this;},filter:function(_e,_f){_f=_f||_8.global;var res=new _9.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_e.call(_f,w,i++,this._hash)){res.add(w);}}return res;},byId:function(id){return this._hash[id];},byClass:function(cls){var res=new _9.WidgetSet(),id,_10;for(id in this._hash){_10=this._hash[id];if(_10.declaredClass==cls){res.add(_10);}}return res;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_11,_12){return _8.map(this.toArray(),_11,_12);},every:function(_13,_14){_14=_14||_8.global;var x=0,i;for(i in this._hash){if(!_13.call(_14,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_15,_16){_16=_16||_8.global;var x=0,i;for(i in this._hash){if(_15.call(_16,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){_9.registry=new _9.WidgetSet();var _17=_9.registry._hash,_18=_8.attr,_19=_8.hasAttr,_1a=_8.style;_9.byId=function(id){return typeof id=="string"?_17[id]:id;};var _1b={};_9.getUniqueId=function(_1c){var id;do{id=_1c+"_"+(_1c in _1b?++_1b[_1c]:_1b[_1c]=0);}while(_17[id]);return _9._scopeName=="dijit"?id:_9._scopeName+"_"+id;};_9.findWidgets=function(_1d){var _1e=[];function _1f(_20){for(var _21=_20.firstChild;_21;_21=_21.nextSibling){if(_21.nodeType==1){var _22=_21.getAttribute("widgetId");if(_22){var _23=_17[_22];if(_23){_1e.push(_23);}}else{_1f(_21);}}}};_1f(_1d);return _1e;};_9._destroyAll=function(){_9._curFocus=null;_9._prevFocus=null;_9._activeStack=[];_8.forEach(_9.findWidgets(_8.body()),function(_24){if(!_24._destroyed){if(_24.destroyRecursive){_24.destroyRecursive();}else{if(_24.destroy){_24.destroy();}}}});};if(_8.isIE){_8.addOnWindowUnload(function(){_9._destroyAll();});}_9.byNode=function(_25){return _17[_25.getAttribute("widgetId")];};_9.getEnclosingWidget=function(_26){while(_26){var id=_26.getAttribute&&_26.getAttribute("widgetId");if(id){return _17[id];}_26=_26.parentNode;}return null;};var _27=(_9._isElementShown=function(_28){var s=_1a(_28);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_18(_28,"type")!="hidden");});_9.hasDefaultTabStop=function(_29){switch(_29.nodeName.toLowerCase()){case "a":return _19(_29,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _2a;try{var _2b=_29.contentDocument;if("designMode" in _2b&&_2b.designMode=="on"){return true;}_2a=_2b.body;}catch(e1){try{_2a=_29.contentWindow.document.body;}catch(e2){return false;}}return _2a.contentEditable=="true"||(_2a.firstChild&&_2a.firstChild.contentEditable=="true");default:return _29.contentEditable=="true";}};var _2c=(_9.isTabNavigable=function(_2d){if(_18(_2d,"disabled")){return false;}else{if(_19(_2d,"tabIndex")){return _18(_2d,"tabIndex")>=0;}else{return _9.hasDefaultTabStop(_2d);}}});_9._getTabNavigable=function(_2e){var _2f,_30,_31,_32,_33,_34,_35={};function _36(_37){return _37&&_37.tagName.toLowerCase()=="input"&&_37.type&&_37.type.toLowerCase()=="radio"&&_37.name&&_37.name.toLowerCase();};var _38=function(_39){_8.query("> *",_39).forEach(function(_3a){if((_8.isIE&&_3a.scopeName!=="HTML")||!_27(_3a)){return;}if(_2c(_3a)){var _3b=_18(_3a,"tabIndex");if(!_19(_3a,"tabIndex")||_3b==0){if(!_2f){_2f=_3a;}_30=_3a;}else{if(_3b>0){if(!_31||_3b<_32){_32=_3b;_31=_3a;}if(!_33||_3b>=_34){_34=_3b;_33=_3a;}}}var rn=_36(_3a);if(_8.attr(_3a,"checked")&&rn){_35[rn]=_3a;}}if(_3a.nodeName.toUpperCase()!="SELECT"){_38(_3a);}});};if(_27(_2e)){_38(_2e);}function rs(_3c){return _35[_36(_3c)]||_3c;};return {first:rs(_2f),last:rs(_30),lowest:rs(_31),highest:rs(_33)};};_9.getFirstInTabbingOrder=function(_3d){var _3e=_9._getTabNavigable(_8.byId(_3d));return _3e.lowest?_3e.lowest:_3e.first;};_9.getLastInTabbingOrder=function(_3f){var _40=_9._getTabNavigable(_8.byId(_3f));return _40.last?_40.last:_40.highest;};_9.defaultDuration=_8.config["defaultDuration"]||200;})();}if(!_8._hasResource["dojox.gfx._base"]){_8._hasResource["dojox.gfx._base"]=true;_8.provide("dojox.gfx._base");(function(){var g=_a.gfx,b=g._base;g._hasClass=function(_41,_42){var cls=_41.getAttribute("className");return cls&&(" "+cls+" ").indexOf(" "+_42+" ")>=0;};g._addClass=function(_43,_44){var cls=_43.getAttribute("className")||"";if(!cls||(" "+cls+" ").indexOf(" "+_44+" ")<0){_43.setAttribute("className",cls+(cls?" ":"")+_44);}};g._removeClass=function(_45,_46){var cls=_45.getAttribute("className");if(cls){_45.setAttribute("className",cls.replace(new RegExp("(^|\\s+)"+_46+"(\\s+|$)"),"$1$2"));}};b._getFontMeasurements=function(){var _47={"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(_8.isIE){_8.doc.documentElement.style.fontSize="100%";}var div=_8.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},_8.body());for(var p in _47){div.style.fontSize=p;_47[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}_8.body().removeChild(div);return _47;};var _48=null;b._getCachedFontMeasurements=function(_49){if(_49||!_48){_48=b._getFontMeasurements();}return _48;};var _4a=null,_4b={};b._getTextBox=function(_4c,_4d,_4e){var m,s,al=arguments.length;if(!_4a){_4a=_8.create("div",{style:{position:"absolute",top:"-10000px",left:"0"}},_8.body());}m=_4a;m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(al>1&&_4d){for(var i in _4d){if(i in _4b){continue;}s[i]=_4d[i];}}if(al>2&&_4e){m.className=_4e;}m.innerHTML=_4c;if(m["getBoundingClientRect"]){var bcr=m.getBoundingClientRect();return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};}else{return _8.marginBox(m);}};var _4f=0;b._getUniqueId=function(){var id;do{id=_8._scopeName+"Unique"+(++_4f);}while(_8.byId(id));return id;};})();_8.mixin(_a.gfx,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){var _50={};return function(_51){var t=_50[_51];if(t){return new t();}t=_50[_51]=new Function;t.prototype=_a.gfx["default"+_51];return new t();};})(),normalizeColor:function(_52){return (_52 instanceof _8.Color)?_52:new _8.Color(_52);},normalizeParameters:function(_53,_54){if(_54){var _55={};for(var x in _53){if(x in _54&&!(x in _55)){_53[x]=_54[x];}}}return _53;},makeParameters:function(_56,_57){if(!_57){return _8.delegate(_56);}var _58={};for(var i in _56){if(!(i in _58)){_58[i]=_8.clone((i in _57)?_57[i]:_56[i]);}}return _58;},formatNumber:function(x,_59){var val=x.toString();if(val.indexOf("e")>=0){val=x.toFixed(4);}else{var _5a=val.indexOf(".");if(_5a>=0&&val.length-_5a>5){val=x.toFixed(4);}}if(x<0){return val;}return _59?" "+val:val;},makeFontString:function(_5b){return _5b.style+" "+_5b.variant+" "+_5b.weight+" "+_5b.size+" "+_5b.family;},splitFontString:function(str){var _5c=_a.gfx.getDefault("Font");var t=str.split(/\s+/);do{if(t.length<5){break;}_5c.style=t[0];_5c.variant=t[1];_5c.weight=t[2];var i=t[3].indexOf("/");_5c.size=i<0?t[3]:t[3].substring(0,i);var j=4;if(i<0){if(t[4]=="/"){j=6;}else{if(t[4].charAt(0)=="/"){j=5;}}}if(j<t.length){_5c.family=t.slice(j).join(" ");}}while(false);return _5c;},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return _a.gfx._base._getCachedFontMeasurements()["12pt"]/12;},pt2px:function(len){return len*_a.gfx.px_in_pt();},px2pt:function(len){return len/_a.gfx.px_in_pt();},normalizedLength:function(len){if(len.length==0){return 0;}if(len.length>2){var _5d=_a.gfx.px_in_pt();var val=parseFloat(len);switch(len.slice(-2)){case "px":return val;case "pt":return val*_5d;case "in":return val*72*_5d;case "pc":return val*12*_5d;case "mm":return val*_a.gfx.mm_in_pt*_5d;case "cm":return val*_a.gfx.cm_in_pt*_5d;}}return parseFloat(len);},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){return a&&b&&a==b;},switchTo:function(_5e){var ns=_a.gfx[_5e];if(ns){_8.forEach(["Group","Rect","Ellipse","Circle","Line","Polyline","Image","Text","Path","TextPath","Surface","createSurface"],function(_5f){_a.gfx[_5f]=ns[_5f];});}}});}if(!_8._hasResource["esri.WKIDUnitConversion"]){_8._hasResource["esri.WKIDUnitConversion"]=true;_8.provide("esri.WKIDUnitConversion");esri.WKIDUnitConversion={values:[1,0.2011661949,0.3047997101815088,0.3048006096012192,0.3048,0.304797265,0.9143985307444408,20.11678249437587,0.9143984146160287,20.11676512155263,0.3047994715386762,0.91439523,50000,150000],2000:0,2001:0,2002:0,2003:0,2004:0,2005:0,2006:0,2007:0,2008:0,2009:0,2010:0,2011:0,2012:0,2013:0,2014:0,2015:0,2016:0,2017:0,2018:0,2019:0,2020:0,2021:0,2022:0,2023:0,2024:0,2025:0,2026:0,2027:0,2028:0,2029:0,2030:0,2031:0,2032:0,2033:0,2034:0,2035:0,2036:0,2037:0,2038:0,2039:0,2040:0,2041:0,2042:0,2043:0,2044:0,2045:0,2056:0,2057:0,2058:0,2059:0,2060:0,2061:0,2062:0,2063:0,2064:0,2065:0,2066:1,2067:0,2068:0,2069:0,2070:0,2071:0,2072:0,2073:0,2074:0,2075:0,2076:0,2077:0,2078:0,2079:0,2080:0,2081:0,2082:0,2083:0,2084:0,2085:0,2086:0,2087:0,2088:0,2089:0,2090:0,2091:0,2092:0,2093:0,2094:0,2095:0,2096:0,2097:0,2098:0,2099:0,2100:0,2101:0,2102:0,2103:0,2104:0,2105:0,2106:0,2107:0,2108:0,2109:0,2110:0,2111:0,2112:0,2113:0,2114:0,2115:0,2116:0,2117:0,2118:0,2119:0,2120:0,2121:0,2122:0,2123:0,2124:0,2125:0,2126:0,2127:0,2128:0,2129:0,2130:0,2131:0,2132:0,2133:0,2134:0,2135:0,2136:2,2137:0,2138:0,2139:0,2140:0,2141:0,2142:0,2143:0,2144:0,2145:0,2146:0,2147:0,2148:0,2149:0,2150:0,2151:0,2152:0,2153:0,2154:0,2155:3,2157:0,2158:0,2159:2,2160:2,2161:0,2162:0,2163:0,2164:0,2165:0,2166:0,2167:0,2168:0,2169:0,2170:0,2172:0,2173:0,2174:0,2175:0,2176:0,2177:0,2178:0,2179:0,2180:0,2181:0,2182:0,2183:0,2184:0,2185:0,2186:0,2187:0,2188:0,2189:0,2190:0,2192:0,2193:0,2195:0,2196:0,2197:0,2198:0,2200:0,2201:0,2202:0,2203:0,2204:3,2205:0,2206:0,2207:0,2208:0,2209:0,2210:0,2211:0,2212:0,2213:0,2214:0,2215:0,2216:0,2217:0,2219:0,2220:0,2222:4,2223:4,2224:4,2225:3,2226:3,2227:3,2228:3,2229:3,2230:3,2231:3,2232:3,2233:3,2234:3,2235:3,2236:3,2237:3,2238:3,2239:3,2240:3,2241:3,2242:3,2243:3,2244:3,2245:3,2246:3,2247:3,2248:3,2249:3,2250:3,2251:4,2252:4,2253:4,2254:3,2255:3,2256:4,2257:3,2258:3,2259:3,2260:3,2261:3,2262:3,2263:3,2264:3,2265:4,2266:4,2267:3,2268:3,2269:4,2270:4,2271:3,2272:3,2273:4,2274:3,2275:3,2276:3,2277:3,2278:3,2279:3,2280:4,2281:4,2282:4,2283:3,2284:3,2285:3,2286:3,2287:3,2288:3,2289:3,2290:0,2291:0,2292:0,2294:0,2295:0,2308:0,2309:0,2310:0,2311:0,2312:0,2313:0,2314:5,2315:0,2316:0,2317:0,2318:0,2319:0,2320:0,2321:0,2322:0,2323:0,2324:0,2325:0,2326:0,2327:0,2328:0,2329:0,2330:0,2331:0,2332:0,2333:0,2334:0,2335:0,2336:0,2337:0,2338:0,2339:0,2340:0,2341:0,2342:0,2343:0,2344:0,2345:0,2346:0,2347:0,2348:0,2349:0,2350:0,2351:0,2352:0,2353:0,2354:0,2355:0,2356:0,2357:0,2358:0,2359:0,2360:0,2361:0,2362:0,2363:0,2364:0,2365:0,2366:0,2367:0,2368:0,2369:0,2370:0,2371:0,2372:0,2373:0,2374:0,2375:0,2376:0,2377:0,2378:0,2379:0,2380:0,2381:0,2382:0,2383:0,2384:0,2385:0,2386:0,2387:0,2388:0,2389:0,2390:0,2391:0,2392:0,2393:0,2394:0,2395:0,2396:0,2397:0,2398:0,2399:0,2400:0,2401:0,2402:0,2403:0,2404:0,2405:0,2406:0,2407:0,2408:0,2409:0,2410:0,2411:0,2412:0,2413:0,2414:0,2415:0,2416:0,2417:0,2418:0,2419:0,2420:0,2421:0,2422:0,2423:0,2424:0,2425:0,2426:0,2427:0,2428:0,2429:0,2430:0,2431:0,2432:0,2433:0,2434:0,2435:0,2436:0,2437:0,2438:0,2439:0,2440:0,2441:0,2442:0,2443:0,2444:0,2445:0,2446:0,2447:0,2448:0,2449:0,2450:0,2451:0,2452:0,2453:0,2454:0,2455:0,2456:0,2457:0,2458:0,2459:0,2460:0,2461:0,2462:0,2523:0,2524:0,2525:0,2526:0,2527:0,2528:0,2529:0,2530:0,2531:0,2532:0,2533:0,2534:0,2535:0,2536:0,2537:0,2538:0,2539:0,2540:0,2541:0,2542:0,2543:0,2544:0,2545:0,2546:0,2547:0,2548:0,2549:0,2550:0,2551:0,2552:0,2553:0,2554:0,2555:0,2556:0,2557:0,2558:0,2559:0,2560:0,2561:0,2562:0,2563:0,2564:0,2565:0,2566:0,2567:0,2568:0,2569:0,2570:0,2571:0,2572:0,2573:0,2574:0,2575:0,2576:0,2577:0,2578:0,2579:0,2580:0,2581:0,2582:0,2583:0,2584:0,2585:0,2586:0,2587:0,2588:0,2589:0,2590:0,2591:0,2592:0,2593:0,2594:0,2595:0,2596:0,2597:0,2598:0,2599:0,2600:0,2601:0,2602:0,2603:0,2604:0,2605:0,2606:0,2607:0,2608:0,2609:0,2610:0,2611:0,2612:0,2613:0,2614:0,2615:0,2616:0,2617:0,2618:0,2619:0,2620:0,2621:0,2622:0,2623:0,2624:0,2625:0,2626:0,2627:0,2628:0,2629:0,2630:0,2631:0,2632:0,2633:0,2634:0,2635:0,2636:0,2637:0,2638:0,2639:0,2640:0,2641:0,2642:0,2643:0,2644:0,2645:0,2646:0,2647:0,2648:0,2649:0,2650:0,2651:0,2652:0,2653:0,2654:0,2655:0,2656:0,2657:0,2658:0,2659:0,2660:0,2661:0,2662:0,2663:0,2664:0,2665:0,2666:0,2667:0,2668:0,2669:0,2670:0,2671:0,2672:0,2673:0,2674:0,2675:0,2676:0,2677:0,2678:0,2679:0,2680:0,2681:0,2682:0,2683:0,2684:0,2685:0,2686:0,2687:0,2688:0,2689:0,2690:0,2691:0,2692:0,2693:0,2694:0,2695:0,2696:0,2697:0,2698:0,2699:0,2700:0,2701:0,2702:0,2703:0,2704:0,2705:0,2706:0,2707:0,2708:0,2709:0,2710:0,2711:0,2712:0,2713:0,2714:0,2715:0,2716:0,2717:0,2718:0,2719:0,2720:0,2721:0,2722:0,2723:0,2724:0,2725:0,2726:0,2727:0,2728:0,2729:0,2730:0,2731:0,2732:0,2733:0,2734:0,2735:0,2736:0,2737:0,2738:0,2739:0,2740:0,2741:0,2742:0,2743:0,2744:0,2745:0,2746:0,2747:0,2748:0,2749:0,2750:0,2751:0,2752:0,2753:0,2754:0,2755:0,2756:0,2757:0,2758:0,2759:0,2760:0,2761:0,2762:0,2763:0,2764:0,2765:0,2766:0,2767:0,2768:0,2769:0,2770:0,2771:0,2772:0,2773:0,2774:0,2775:0,2776:0,2777:0,2778:0,2779:0,2780:0,2781:0,2782:0,2783:0,2784:0,2785:0,2786:0,2787:0,2788:0,2789:0,2790:0,2791:0,2792:0,2793:0,2794:0,2795:0,2796:0,2797:0,2798:0,2799:0,2800:0,2801:0,2802:0,2803:0,2804:0,2805:0,2806:0,2807:0,2808:0,2809:0,2810:0,2811:0,2812:0,2813:0,2814:0,2815:0,2816:0,2817:0,2818:0,2819:0,2820:0,2821:0,2822:0,2823:0,2824:0,2825:0,2826:0,2827:0,2828:0,2829:0,2830:0,2831:0,2832:0,2833:0,2834:0,2835:0,2836:0,2837:0,2838:0,2839:0,2840:0,2841:0,2842:0,2843:0,2844:0,2845:0,2846:0,2847:0,2848:0,2849:0,2850:0,2851:0,2852:0,2853:0,2854:0,2855:0,2856:0,2857:0,2858:0,2859:0,2860:0,2861:0,2862:0,2863:0,2864:0,2865:0,2866:0,2867:4,2868:4,2869:4,2870:3,2871:3,2872:3,2873:3,2874:3,2875:3,2876:3,2877:3,2878:3,2879:3,2880:3,2881:3,2882:3,2883:3,2884:3,2885:3,2886:3,2887:3,2888:3,2891:3,2892:3,2893:3,2894:3,2895:3,2896:4,2897:4,2898:4,2899:3,2900:3,2901:4,2902:3,2903:3,2904:3,2905:3,2906:3,2907:3,2908:3,2909:4,2910:4,2911:3,2912:3,2913:4,2914:4,2915:3,2916:3,2917:3,2918:3,2919:3,2920:3,2921:4,2922:4,2923:4,2924:3,2925:3,2926:3,2927:3,2928:3,2929:3,2930:3,2931:0,2932:0,2933:0,2935:0,2936:0,2937:0,2938:0,2939:0,2940:0,2941:0,2942:0,2943:0,2944:0,2945:0,2946:0,2947:0,2948:0,2949:0,2950:0,2951:0,2952:0,2953:0,2954:0,2955:0,2956:0,2957:0,2958:0,2959:0,2960:0,2961:0,2962:0,2964:3,2965:3,2966:3,2967:3,2968:3,2969:0,2970:0,2971:0,2972:0,2973:0,2975:0,2976:0,2977:0,2978:0,2979:0,2980:0,2981:0,2982:0,2984:0,2985:0,2986:0,2987:0,2988:0,2989:0,2991:0,2992:4,2993:0,2994:4,2995:0,2996:0,2997:0,2998:0,2999:0,3000:0,3001:0,3002:0,3003:0,3004:0,3005:0,3006:0,3007:0,3008:0,3009:0,3010:0,3011:0,3012:0,3013:0,3014:0,3015:0,3016:0,3017:0,3018:0,3019:0,3020:0,3021:0,3022:0,3023:0,3024:0,3025:0,3026:0,3027:0,3028:0,3029:0,3030:0,3031:0,3032:0,3033:0,3034:0,3035:0,3036:0,3037:0,3054:0,3055:0,3056:0,3057:0,3058:0,3059:0,3060:0,3061:0,3062:0,3063:0,3064:0,3065:0,3066:0,3067:0,3068:0,3069:0,3070:0,3071:0,3072:0,3073:0,3074:0,3075:0,3076:0,3077:0,3078:0,3079:0,3080:4,3081:0,3082:0,3083:0,3084:0,3085:0,3086:0,3087:0,3088:0,3089:3,3090:0,3091:3,3092:0,3093:0,3094:0,3095:0,3096:0,3097:0,3098:0,3099:0,3100:0,3101:0,3102:3,3106:0,3107:0,3108:0,3109:0,3110:0,3111:0,3112:0,3113:0,3114:0,3115:0,3116:0,3117:0,3118:0,3119:0,3120:0,3121:0,3122:0,3123:0,3124:0,3125:0,3126:0,3127:0,3128:0,3129:0,3130:0,3131:0,3132:0,3133:0,3134:0,3135:0,3136:0,3137:0,3138:0,3141:0,3142:0,3148:0,3149:0,3153:0,3154:0,3155:0,3156:0,3157:0,3158:0,3159:0,3160:0,3161:0,3162:0,3163:0,3164:0,3165:0,3166:0,3169:0,3170:0,3171:0,3172:0,3174:0,3175:0,3176:0,3177:0,3178:0,3179:0,3180:0,3181:0,3182:0,3183:0,3184:0,3185:0,3186:0,3187:0,3188:0,3189:0,3190:0,3191:0,3192:0,3193:0,3194:0,3195:0,3196:0,3197:0,3198:0,3199:0,3200:0,3201:0,3202:0,3203:0,3294:0,3296:0,3297:0,3298:0,3299:0,3300:0,3301:0,3302:0,3303:0,3304:0,3305:0,3306:0,3307:0,3308:0,3309:0,3310:0,3311:0,3312:0,3313:0,3314:0,3315:0,3316:0,3317:0,3318:0,3319:0,3320:0,3321:0,3322:0,3323:0,3324:0,3325:0,3326:0,3327:0,3328:0,3329:0,3330:0,3331:0,3332:0,3333:0,3334:0,3335:0,3336:0,3337:0,3338:0,3339:0,3340:0,3341:0,3342:0,3343:0,3344:0,3345:0,3346:0,3347:0,3348:0,3349:0,3350:0,3351:0,3352:0,3353:0,3354:0,3355:0,3356:0,3357:0,3358:0,3359:3,3360:0,3361:4,3362:0,3363:3,3364:0,3365:3,3366:5,3367:0,3368:0,3369:0,3370:0,3371:0,3372:0,3373:0,3374:0,3375:0,3376:0,3377:0,3378:0,3379:0,3380:0,3381:0,3382:0,3383:0,3384:0,3385:0,3386:0,3387:0,3388:0,3391:0,3392:0,3393:0,3394:0,3395:0,3396:0,3397:0,3398:0,3399:0,3400:0,3401:0,3402:0,3403:0,3404:3,3405:0,3406:0,3407:5,3408:0,3409:0,3410:0,3411:0,3412:0,3413:0,3414:0,3415:0,3416:0,3417:3,3418:3,3419:3,3420:3,3421:3,3422:3,3423:3,3424:3,3425:3,3426:3,3427:3,3428:3,3429:3,3430:3,3431:3,3432:3,3433:3,3434:3,3435:3,3436:3,3437:3,3438:3,3439:0,3440:0,3441:3,3442:3,3443:3,3444:3,3445:3,3446:3,3447:0,3448:0,3449:0,3450:0,3453:3,3456:3,3457:3,3458:3,3459:3,3460:0,3461:0,3462:0,3463:0,3464:0,3560:3,3561:3,3562:3,3563:3,3564:3,3565:3,3566:3,3567:3,3568:3,3569:3,3570:3,3571:0,3572:0,3573:0,3574:0,3575:0,3576:0,3577:0,3578:0,3579:0,3580:0,3581:0,3582:3,3583:0,3584:3,3585:0,3586:3,3587:0,3588:4,3589:0,3590:4,3591:0,3592:0,3593:4,3594:0,3595:0,3596:0,3597:0,3598:3,3599:0,3600:3,3601:0,3602:0,3603:0,3604:0,3605:4,3606:0,3607:0,3608:3,3609:0,3610:3,3611:0,3612:3,3613:0,3614:3,3615:0,3616:3,3617:0,3618:3,3619:0,3620:3,3621:0,3622:3,3623:0,3624:3,3625:0,3626:3,3627:0,3628:3,3629:0,3630:3,3631:0,3632:3,3633:0,3634:4,3635:0,3636:4,3637:0,3638:0,3639:0,3640:3,3641:0,3642:3,3643:0,3644:4,3645:0,3646:4,3647:0,3648:4,3649:0,3650:3,3651:0,3652:3,3653:0,3654:3,3655:0,3656:4,3657:0,3658:3,3659:0,3660:3,3661:0,3662:3,3663:0,3664:3,3665:0,3666:0,3667:0,3668:3,3669:0,3670:3,3671:0,3672:3,3673:0,3674:3,3675:0,3676:4,3677:3,3678:0,3679:4,3680:3,3681:0,3682:4,3683:3,3684:0,3685:0,3686:3,3687:0,3688:3,3689:0,3690:3,3691:0,3692:3,3693:0,3694:0,3695:0,3696:3,3697:0,3698:3,3699:0,3700:3,3701:0,3702:0,3703:0,3704:0,3705:0,3706:0,3707:0,3708:0,3709:0,3710:0,3711:0,3712:0,3713:0,3714:0,3715:0,3716:0,3717:0,3718:0,3719:0,3720:0,3721:0,3722:0,3723:0,3724:0,3725:0,3726:0,3727:0,3728:3,3729:3,3730:3,3731:3,3732:3,3733:3,3734:3,3735:3,3736:3,3737:3,3738:3,3739:3,3753:3,3754:3,3755:3,3756:3,3757:3,3758:3,3759:3,3760:3,3761:0,3762:0,3763:0,3764:0,3765:0,3766:0,3767:0,3768:0,3769:0,3770:0,3771:0,3772:0,3773:0,3775:0,3776:0,3777:0,3779:0,3780:0,3781:0,3783:0,3784:0,3788:0,3789:0,3790:0,3791:0,3793:0,3794:0,3797:0,3798:0,3799:0,3800:0,3801:0,3802:0,3812:0,3814:0,3815:0,3816:0,3832:0,3833:0,3834:0,3835:0,3836:0,3837:0,3838:0,3839:0,3840:0,3841:0,3851:0,3852:0,3857:0,3890:0,3891:0,3892:0,3893:0,3912:0,3920:0,3942:0,3943:0,3944:0,3945:0,3946:0,3947:0,3948:0,3949:0,3950:0,3968:0,3969:0,3670:0,3973:0,3974:0,3975:0,3976:0,3978:0,3979:0,3986:0,3987:0,3988:0,3989:0,3991:3,3992:3,3994:0,3995:0,3996:0,3997:0,20002:0,20003:0,20004:0,20005:0,20006:0,20007:0,20008:0,20009:0,20010:0,20011:0,20012:0,20013:0,20014:0,20015:0,20016:0,20017:0,20018:0,20019:0,20020:0,20021:0,20022:0,20023:0,20024:0,20025:0,20026:0,20027:0,20028:0,20029:0,20030:0,20031:0,20032:0,20062:0,20063:0,20064:0,20065:0,20066:0,20067:0,20068:0,20069:0,20070:0,20071:0,20072:0,20073:0,20074:0,20075:0,20076:0,20077:0,20078:0,20079:0,20080:0,20081:0,20082:0,20083:0,20084:0,20085:0,20086:0,20087:0,20088:0,20089:0,20090:0,20091:0,20092:0,20135:0,20136:0,20137:0,20138:0,20248:0,20249:0,20250:0,20251:0,20252:0,20253:0,20254:0,20255:0,20256:0,20257:0,20258:0,20348:0,20349:0,20350:0,20351:0,20352:0,20353:0,20354:0,20355:0,20356:0,20357:0,20358:0,20436:0,20437:0,20438:0,20439:0,20440:0,20499:0,20538:0,20539:0,20790:0,20822:0,20823:0,20824:0,20934:0,20935:0,20936:0,21035:0,21036:0,21037:0,21095:0,21096:0,21097:0,21148:0,21149:0,21150:0,21291:0,21292:0,21413:0,21414:0,21415:0,21416:0,21417:0,21418:0,21419:0,21420:0,21421:0,21422:0,21423:0,21473:0,21474:0,21475:0,21476:0,21477:0,21478:0,21479:0,21480:0,21481:0,21482:0,21483:0,21500:0,21780:0,21781:0,21817:0,21818:0,21891:0,21892:0,21893:0,21894:0,21896:0,21897:0,21898:0,21899:0,22032:0,22033:0,22091:0,22092:0,22171:0,22172:0,22173:0,22174:0,22175:0,22176:0,22177:0,22181:0,22182:0,22183:0,22184:0,22185:0,22186:0,22187:0,22191:0,22192:0,22193:0,22194:0,22195:0,22196:0,22197:0,22234:0,22235:0,22236:0,22332:0,22391:0,22392:0,22521:0,22522:0,22523:0,22524:0,22525:0,22700:0,22770:0,22780:0,22832:0,22991:0,22992:0,22993:0,22994:0,23028:0,23029:0,23030:0,23031:0,23032:0,23033:0,23034:0,23035:0,23036:0,23037:0,23038:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,23830:0,23831:0,23832:0,23833:0,23834:0,23835:0,23836:0,23837:0,23838:0,23839:0,23840:0,23841:0,23842:0,23843:0,23844:0,23845:0,23846:0,23847:0,23848:0,23849:0,23850:0,23851:0,23852:0,23853:0,23866:0,23867:0,23868:0,23869:0,23870:0,23871:0,23872:0,23877:0,23878:0,23879:0,23880:0,23881:0,23882:0,23883:0,23884:0,23886:0,23887:0,23888:0,23889:0,23890:0,23891:0,23892:0,23893:0,23894:0,23946:0,23947:0,23948:0,24047:0,24048:0,24100:0,24200:0,24305:0,24306:0,24311:0,24312:0,24313:0,24342:0,24343:0,24344:0,24345:0,24346:0,24347:0,24370:6,24371:6,24372:6,24373:6,24374:6,24375:0,24376:0,24377:0,24378:0,24379:0,24380:0,24381:0,24382:6,24383:0,24500:0,24547:0,24548:0,24571:7,24600:0,24718:0,24719:0,24720:0,24721:0,24817:0,24818:0,24819:0,24820:0,24821:0,24877:0,24878:0,24879:0,24880:0,24881:0,24882:0,24891:0,24892:0,24893:0,25000:0,25231:0,25391:0,25392:0,25393:0,25394:0,25395:0,25828:0,25829:0,25830:0,25831:0,25832:0,25833:0,25834:0,25835:0,25836:0,25837:0,25838:0,25884:0,25932:0,26191:0,26192:0,26193:0,26194:0,26195:0,26237:0,26331:0,26332:0,26391:0,26392:0,26393:0,26432:0,26591:0,26592:0,26632:0,26692:0,26701:0,26702:0,26703:0,26704:0,26705:0,26706:0,26707:0,26708:0,26709:0,26710:0,26711:0,26712:0,26713:0,26714:0,26715:0,26716:0,26717:0,26718:0,26719:0,26720:0,26721:0,26722:0,26729:3,26730:3,26731:3,26732:3,26733:3,26734:3,26735:3,26736:3,26737:3,26738:3,26739:3,26740:3,26741:3,26742:3,26743:3,26744:3,26745:3,26746:3,26747:3,26748:3,26749:3,26750:3,26751:3,26752:3,26753:3,26754:3,26755:3,26756:3,26757:3,26758:3,26759:3,26760:3,26761:3,26762:3,26763:3,26764:3,26765:3,26766:3,26767:3,26768:3,26769:3,26770:3,26771:3,26772:3,26773:3,26774:3,26775:3,26776:3,26777:3,26778:3,26779:3,26780:3,26781:3,26782:3,26783:3,26784:3,26785:3,26786:3,26787:3,26788:3,26789:3,26790:3,26791:3,26792:3,26793:3,26794:3,26795:3,26796:3,26797:3,26798:3,26799:3,26801:3,26802:3,26803:3,26811:3,26812:3,26813:3,26901:0,26902:0,26903:0,26904:0,26905:0,26906:0,26907:0,26908:0,26909:0,26910:0,26911:0,26912:0,26913:0,26914:0,26915:0,26916:0,26917:0,26918:0,26919:0,26920:0,26921:0,26922:0,26923:0,26929:0,26930:0,26931:0,26932:0,26933:0,26934:0,26935:0,26936:0,26937:0,26938:0,26939:0,26940:0,26941:0,26942:0,26943:0,26944:0,26945:0,26946:0,26948:0,26949:0,26950:0,26951:0,26952:0,26953:0,26954:0,26955:0,26956:0,26957:0,26958:0,26959:0,26960:0,26961:0,26962:0,26963:0,26964:0,26965:0,26966:0,26967:0,26968:0,26969:0,26970:0,26971:0,26972:0,26973:0,26974:0,26975:0,26976:0,26977:0,26978:0,26979:0,26980:0,26981:0,26982:0,26983:0,26984:0,26985:0,26986:0,26987:0,26988:0,26989:0,26990:0,26991:0,26992:0,26993:0,26994:0,26995:0,26996:0,26997:0,26998:0,27037:0,27038:0,27039:0,27040:0,27120:0,27200:0,27205:0,27206:0,27207:0,27208:0,27209:0,27210:0,27211:0,27212:0,27213:0,27214:0,27215:0,27216:0,27217:0,27218:0,27219:0,27220:0,27221:0,27222:0,27223:0,27224:0,27225:0,27226:0,27227:0,27228:0,27229:0,27230:0,27231:0,27232:0,27258:0,27259:0,27260:0,27291:8,27292:8,27391:0,27392:0,27393:0,27394:0,27395:0,27396:0,27397:0,27398:0,27429:0,27492:0,27500:0,27561:0,27562:0,27563:0,27564:0,27571:0,27572:0,27573:0,27574:0,27581:0,27582:0,27583:0,27584:0,27591:0,27592:0,27593:0,27594:0,27700:0,28191:0,28192:0,28193:0,28232:0,28348:0,28349:0,28350:0,28351:0,28352:0,28353:0,28354:0,28355:0,28356:0,28357:0,28358:0,28402:0,28403:0,28404:0,28405:0,28406:0,28407:0,28408:0,28409:0,28410:0,28411:0,28412:0,28413:0,28414:0,28415:0,28416:0,28417:0,28418:0,28419:0,28420:0,28421:0,28422:0,28423:0,28424:0,28425:0,28426:0,28427:0,28428:0,28429:0,28430:0,28431:0,28432:0,28462:0,28463:0,28464:0,28465:0,28466:0,28467:0,28468:0,28469:0,28470:0,28471:0,28472:0,28473:0,28474:0,28475:0,28476:0,28477:0,28478:0,28479:0,28480:0,28481:0,28482:0,28483:0,28484:0,28485:0,28486:0,28487:0,28488:0,28489:0,28490:0,28491:0,28492:0,28600:0,28991:0,28992:0,29100:0,29101:0,29118:0,29119:0,29120:0,29121:0,29122:0,29168:0,29169:0,29170:0,29171:0,29172:0,29177:0,29178:0,29179:0,29180:0,29181:0,29182:0,29183:0,29184:0,29185:0,29187:0,29188:0,29189:0,29190:0,29191:0,29192:0,29193:0,29194:0,29195:0,29220:0,29221:0,29333:0,29635:0,29636:0,29738:0,29739:0,29849:0,29850:0,29871:9,29872:10,29873:0,29900:0,29901:0,29902:0,29903:0,30161:0,30162:0,30163:0,30164:0,30165:0,30166:0,30167:0,30168:0,30169:0,30170:0,30171:0,30172:0,30173:0,30174:0,30175:0,30176:0,30177:0,30178:0,30179:0,30200:1,30339:0,30340:0,30491:0,30492:0,30493:0,30494:0,30591:0,30592:0,30729:0,30730:0,30731:0,30732:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31251:0,31252:0,31253:0,31254:0,31255:0,31256:0,31257:0,31258:0,31259:0,31265:0,31266:0,31267:0,31268:0,31275:0,31276:0,31277:0,31278:0,31279:0,31281:0,31282:0,31283:0,31284:0,31285:0,31286:0,31287:0,31288:0,31289:0,31290:0,31291:0,31292:0,31293:0,31294:0,31295:0,31296:0,31297:0,31370:0,31461:0,31462:0,31463:0,31464:0,31465:0,31466:0,31467:0,31468:0,31469:0,31491:0,31492:0,31493:0,31494:0,31495:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31901:0,31917:0,31918:0,31919:0,31920:0,31921:0,31922:0,31971:0,31972:0,31973:0,31974:0,31975:0,31976:0,31977:0,31978:0,31979:0,31980:0,31981:0,31982:0,31983:0,31984:0,31985:0,31986:0,31987:0,31988:0,31989:0,31990:0,31991:0,31992:0,31993:0,31994:0,31995:0,31996:0,31997:0,31998:0,31999:0,32000:0,32001:3,32002:3,32003:3,32005:3,32006:3,32007:3,32008:3,32009:3,32010:3,32011:3,32012:3,32013:3,32014:3,32015:3,32016:3,32017:3,32018:3,32019:3,32020:3,32021:3,32022:3,32023:3,32024:3,32025:3,32026:3,32027:3,32028:3,32029:3,32030:3,32031:3,32033:3,32034:3,32035:3,32036:3,32037:3,32038:3,32039:3,32040:3,32041:3,32042:3,32043:3,32044:3,32045:3,32046:3,32047:3,32048:3,32049:3,32050:3,32051:3,32052:3,32053:3,32054:3,32055:3,32056:3,32057:3,32058:3,32059:3,32060:3,32061:0,32062:0,32064:3,32065:3,32066:3,32067:3,32074:3,32075:3,32076:3,32077:3,32081:0,32082:0,32083:0,32084:0,32085:0,32086:0,32098:0,32099:3,32100:0,32104:0,32107:0,32108:0,32109:0,32110:0,32111:0,32112:0,32113:0,32114:0,32115:0,32116:0,32117:0,32118:0,32119:0,32120:0,32121:0,32122:0,32123:0,32124:0,32125:0,32126:0,32127:0,32128:0,32129:0,32130:0,32133:0,32134:0,32135:0,32136:0,32137:0,32138:0,32139:0,32140:0,32141:0,32142:0,32143:0,32144:0,32145:0,32146:0,32147:0,32148:0,32149:0,32150:0,32151:0,32152:0,32153:0,32154:0,32155:0,32156:0,32157:0,32158:0,32161:0,32164:3,32165:3,32166:3,32167:3,32180:0,32181:0,32182:0,32183:0,32184:0,32185:0,32186:0,32187:0,32188:0,32189:0,32190:0,32191:0,32192:0,32193:0,32194:0,32195:0,32196:0,32197:0,32198:0,32199:0,32201:0,32202:0,32203:0,32204:0,32205:0,32206:0,32207:0,32208:0,32209:0,32210:0,32211:0,32212:0,32213:0,32214:0,32215:0,32216:0,32217:0,32218:0,32219:0,32220:0,32221:0,32222:0,32223:0,32224:0,32225:0,32226:0,32227:0,32228:0,32229:0,32230:0,32231:0,32232:0,32233:0,32234:0,32235:0,32236:0,32237:0,32238:0,32239:0,32240:0,32241:0,32242:0,32243:0,32244:0,32245:0,32246:0,32247:0,32248:0,32249:0,32250:0,32251:0,32252:0,32253:0,32254:0,32255:0,32256:0,32257:0,32258:0,32259:0,32260:0,32301:0,32302:0,32303:0,32304:0,32305:0,32306:0,32307:0,32308:0,32309:0,32310:0,32311:0,32312:0,32313:0,32314:0,32315:0,32316:0,32317:0,32318:0,32319:0,32320:0,32321:0,32322:0,32323:0,32324:0,32325:0,32326:0,32327:0,32328:0,32329:0,32330:0,32331:0,32332:0,32333:0,32334:0,32335:0,32336:0,32337:0,32338:0,32339:0,32340:0,32341:0,32342:0,32343:0,32344:0,32345:0,32346:0,32347:0,32348:0,32349:0,32350:0,32351:0,32352:0,32353:0,32354:0,32355:0,32356:0,32357:0,32358:0,32359:0,32360:0,32601:0,32602:0,32603:0,32604:0,32605:0,32606:0,32607:0,32608:0,32609:0,32610:0,32611:0,32612:0,32613:0,32614:0,32615:0,32616:0,32617:0,32618:0,32619:0,32620:0,32621:0,32622:0,32623:0,32624:0,32625:0,32626:0,32627:0,32628:0,32629:0,32630:0,32631:0,32632:0,32633:0,32634:0,32635:0,32636:0,32637:0,32638:0,32639:0,32640:0,32641:0,32642:0,32643:0,32644:0,32645:0,32646:0,32647:0,32648:0,32649:0,32650:0,32651:0,32652:0,32653:0,32654:0,32655:0,32656:0,32657:0,32658:0,32659:0,32660:0,32661:0,32662:0,32664:3,32665:3,32666:3,32667:3,32701:0,32702:0,32703:0,32704:0,32705:0,32706:0,32707:0,32708:0,32709:0,32710:0,32711:0,32712:0,32713:0,32714:0,32715:0,32716:0,32717:0,32718:0,32719:0,32720:0,32721:0,32722:0,32723:0,32724:0,32725:0,32726:0,32727:0,32728:0,32729:0,32730:0,32731:0,32732:0,32733:0,32734:0,32735:0,32736:0,32737:0,32738:0,32739:0,32740:0,32741:0,32742:0,32743:0,32744:0,32745:0,32746:0,32747:0,32748:0,32749:0,32750:0,32751:0,32752:0,32753:0,32754:0,32755:0,32756:0,32757:0,32758:0,32759:0,32760:0,32761:0,32766:0,53001:0,53002:0,53003:0,53004:0,53008:0,53009:0,53010:0,53011:0,53012:0,53013:0,53014:0,53015:0,53016:0,53017:0,53018:0,53019:0,53021:0,53022:0,53023:0,53024:0,53025:0,53026:0,53027:0,53028:0,53029:0,53030:0,53031:0,53032:0,53034:0,53042:0,53043:0,53044:0,53045:0,53046:0,53048:0,53049:0,54001:0,54002:0,54003:0,54004:0,54008:0,54009:0,54010:0,54011:0,54012:0,54013:0,54014:0,54015:0,54016:0,54017:0,54018:0,54019:0,54021:0,54022:0,54023:0,54024:0,54025:0,54026:0,54027:0,54028:0,54029:0,54030:0,54031:0,54032:0,54034:0,54042:0,54043:0,54044:0,54045:0,54046:0,54048:0,54049:0,54050:0,54051:0,54052:0,54053:0,65061:3,65062:3,65161:0,65163:0,102001:0,102002:0,102003:0,102004:0,102005:0,102006:0,102007:0,102008:0,102009:0,102010:0,102011:0,102012:0,102013:0,102014:0,102015:0,102016:0,102017:0,102018:0,102019:0,102020:0,102021:0,102022:0,102023:0,102024:0,102025:0,102026:0,102027:0,102028:0,102029:0,102030:0,102031:0,102032:0,102033:0,102034:0,102035:0,102036:0,102037:0,102038:0,102039:0,102060:0,102061:0,102062:0,102063:0,102064:11,102065:0,102066:0,102067:0,102068:12,102069:13,102070:0,102071:0,102072:0,102073:0,102074:0,102075:0,102076:0,102077:0,102078:0,102079:0,102090:0,102091:0,102092:0,102093:0,102094:0,102095:0,102096:0,102097:0,102098:0,102099:0,102100:0,102101:0,102102:0,102103:0,102104:0,102105:0,102106:0,102107:0,102108:0,102109:0,102110:0,102111:0,102112:0,102113:0,102114:0,102115:0,102116:0,102117:0,102118:3,102119:4,102120:3,102121:3,102122:0,102123:0,102124:0,102125:0,102126:0,102127:0,102128:0,102129:0,102130:0,102131:0,102132:0,102133:0,102134:0,102135:0,102136:0,102137:0,102138:0,102139:0,102140:0,102141:0,102142:0,102143:0,102144:0,102145:0,102146:0,102147:0,102148:0,102149:0,102150:0,102151:0,102152:0,102153:0,102154:0,102155:0,102156:0,102157:0,102158:0,102159:0,102160:0,102161:0,102162:0,102163:0,102164:0,102165:0,102166:0,102167:0,102168:0,102169:0,102170:0,102171:0,102172:0,102173:0,102174:0,102175:0,102176:0,102177:0,102178:0,102179:0,102180:0,102181:0,102182:0,102183:0,102184:0,102185:0,102186:0,102187:0,102188:0,102189:0,102190:0,102191:0,102192:0,102193:0,102194:0,102195:0,102196:0,102197:0,102198:0,102199:0,102200:0,102201:0,102202:0,102203:0,102205:0,102206:0,102207:0,102208:0,102209:0,102210:0,102211:0,102218:0,102219:3,102220:3,102221:0,102222:0,102223:0,102224:0,102225:0,102226:0,102227:0,102228:0,102229:0,102230:0,102231:0,102232:0,102233:0,102234:0,102235:0,102236:0,102237:0,102238:0,102239:0,102240:0,102241:0,102242:0,102243:0,102244:0,102245:0,102246:0,102248:0,102249:0,102250:0,102251:0,102252:0,102253:0,102254:0,102255:0,102256:0,102257:0,102258:0,102259:0,102260:0,102261:0,102262:0,102263:0,102264:0,102265:0,102266:0,102267:0,102268:0,102269:0,102270:0,102271:0,102272:0,102273:0,102274:0,102275:0,102276:0,102277:0,102278:0,102279:0,102280:0,102281:0,102282:0,102283:0,102284:0,102285:0,102286:0,102287:0,102288:0,102289:0,102290:0,102291:0,102292:0,102293:0,102294:0,102295:0,102296:0,102297:0,102298:0,102300:0,102304:0,102307:0,102308:0,102309:0,102310:0,102311:0,102312:0,102313:0,102314:0,102315:0,102316:0,102317:0,102318:0,102320:0,102321:0,102322:0,102323:0,102324:0,102325:0,102326:0,102327:0,102330:0,102334:0,102335:0,102336:0,102337:0,102338:0,102339:0,102340:0,102341:0,102342:0,102343:0,102344:0,102345:0,102346:0,102347:0,102348:0,102349:0,102350:0,102351:0,102352:0,102353:0,102354:0,102355:0,102356:0,102357:0,102358:0,102361:0,102363:0,102421:0,102422:0,102423:0,102424:0,102425:0,102426:0,102427:0,102428:0,102429:0,102430:0,102431:0,102432:0,102433:0,102434:0,102435:0,102436:0,102437:0,102438:0,102440:0,102441:0,102442:0,102443:0,102444:0,102461:3,102462:3,102463:3,102464:3,102465:3,102466:3,102467:3,102468:3,102469:0,102491:0,102492:0,102570:0,102571:0,102572:0,102573:0,102574:0,102575:0,102576:0,102577:0,102578:0,102579:0,102580:0,102581:0,102582:0,102583:0,102584:0,102591:0,102592:0,102601:0,102602:0,102603:0,102604:3,102605:0,102606:0,102607:0,102608:0,102609:0,102629:3,102630:3,102631:3,102632:3,102633:3,102634:3,102635:3,102636:3,102637:3,102638:3,102639:3,102640:3,102641:3,102642:3,102643:3,102644:3,102645:3,102646:3,102648:3,102649:3,102650:3,102651:3,102652:3,102653:3,102654:3,102655:3,102656:3,102657:3,102658:3,102659:3,102660:3,102661:3,102662:3,102663:3,102664:3,102665:3,102666:3,102667:3,102668:3,102669:3,102670:3,102671:3,102672:3,102673:3,102674:3,102675:3,102676:3,102677:3,102678:3,102679:3,102680:3,102681:3,102682:3,102683:3,102684:3,102685:3,102686:3,102687:3,102688:3,102689:3,102690:3,102691:3,102692:3,102693:3,102694:3,102695:3,102696:3,102697:3,102698:3,102700:3,102704:3,102707:3,102708:3,102709:3,102710:3,102711:3,102712:3,102713:3,102714:3,102715:3,102716:3,102717:3,102718:3,102719:3,102720:3,102721:3,102722:3,102723:3,102724:3,102725:3,102726:3,102727:3,102728:3,102729:3,102730:3,102733:3,102734:3,102735:3,102736:3,102737:3,102738:3,102739:3,102740:3,102741:3,102742:3,102743:3,102744:3,102745:3,102746:3,102747:3,102748:3,102749:3,102750:3,102751:3,102752:3,102753:3,102754:3,102755:3,102756:3,102757:3,102758:3,102761:3,102763:3,102766:3,103300:0,103301:0,103302:0,103303:0,103304:0,103305:0,103306:0,103307:0,103308:0,103309:0,103310:0,103311:0,103312:0,103313:0,103314:0,103315:0,103316:0,103317:0,103318:0,103319:0,103320:0,103321:0,103322:0,103323:0,103324:0,103325:0,103326:0,103327:0,103328:0,103329:0,103330:0,103331:0,103332:0,103333:0,103334:0,103335:0,103336:0,103337:0,103338:0,103339:0,103340:0,103341:0,103342:0,103343:0,103344:0,103345:0,103346:0,103347:0,103348:0,103349:0,103350:0,103351:0,103352:0,103353:0,103354:0,103355:0,103356:0,103357:0,103358:0,103359:0,103360:0,103361:0,103362:0,103363:0,103364:0,103365:0,103366:0,103367:0,103368:0,103369:0,103370:0,103371:0,103400:3,103401:3,103402:3,103403:3,103404:3,103405:3,103406:3,103407:3,103408:3,103409:3,103410:3,103411:3,103412:3,103413:3,103414:3,103415:3,103416:3,103417:3,103418:3,103419:3,103420:3,103421:3,103422:3,103423:3,103424:3,103425:3,103426:3,103427:3,103428:3,103429:3,103430:3,103431:3,103432:3,103433:3,103434:3,103435:3,103436:3,103437:3,103438:3,103439:3,103440:3,103441:3,103442:3,103443:3,103444:3,103445:3,103446:3,103447:3,103448:3,103449:3,103450:3,103451:3,103452:3,103453:3,103454:3,103455:3,103456:3,103457:3,103458:3,103459:3,103460:3,103461:3,103462:3,103463:3,103464:3,103465:3,103466:3,103467:3,103468:3,103469:3,103470:3,103471:3,103528:0,103529:0,103530:0,103531:0,103532:0,103533:0,103534:0,103535:0,103536:0,103537:0,103538:0,103584:0,103600:0,103601:0,103602:0,103603:0,103604:0,103605:0,103606:0,103607:0,103608:0,103609:0,103610:0,103611:0,103612:0,103613:0,103614:0,103615:0,103616:0,103617:0,103618:0,103619:0,103620:0,103621:0,103622:0,103623:0,103624:0,103625:0,103626:0,103627:0,103628:0,103629:0,103630:0,103631:0,103632:0,103633:0,103634:0,103635:0,103636:0,103637:0,103638:0,103639:0,103640:0,103641:0,103642:0,103643:0,103644:0,103645:0,103646:0,103647:0,103648:0,103649:0,103650:0,103651:0,103652:0,103653:0,103654:0,103655:0,103656:0,103657:0,103658:0,103659:0,103660:0,103661:0,103662:0,103663:0,103664:0,103665:0,103666:0,103667:0,103668:0,103669:0,103670:0,103671:0,103672:0,103673:0,103674:0,103675:0,103676:0,103677:0,103678:0,103679:0,103680:0,103681:0,103682:0,103683:0,103684:0,103685:0,103686:0,103687:0,103688:0,103689:0,103690:0,103691:0,103692:0,103693:0,103700:3,103701:3,103702:3,103703:3,103704:3,103705:3,103706:3,103707:3,103708:3,103709:3,103710:3,103711:3,103712:3,103713:3,103714:3,103715:3,103716:3,103717:3,103718:3,103719:3,103720:3,103721:3,103722:3,103723:3,103724:3,103725:3,103726:3,103727:3,103728:3,103729:3,103730:3,103731:3,103732:3,103733:3,103734:3,103735:3,103736:3,103737:3,103738:3,103739:3,103740:3,103741:3,103742:3,103743:3,103744:3,103745:3,103746:3,103747:3,103748:3,103749:3,103750:3,103751:3,103752:3,103753:3,103754:3,103755:3,103756:3,103757:3,103758:3,103759:3,103760:3,103761:3,103762:3,103763:3,103764:3,103765:3,103766:3,103767:3,103768:3,103769:3,103770:3,103771:3,103772:3,103773:3,103774:3,103775:3,103776:3,103777:3,103778:3,103779:3,103780:3,103781:3,103782:3,103783:3,103784:3,103785:3,103786:3,103787:3,103788:3,103789:3,103790:3,103791:3,103792:3,103793:3,103800:0,103801:0,103802:0,103803:0,103804:0,103805:0,103806:0,103807:0,103808:0,103809:0,103810:0,103811:0,103812:0,103813:0,103814:0,103815:0,103816:0,103817:0,103818:0,103819:0,103820:0,103821:0,103822:0,103823:0,103824:0,103825:0,103826:0,103827:0,103828:0,103829:0,103830:0,103831:0,103832:0,103833:0,103834:0,103835:0,103836:0,103837:0,103838:0,103839:0,103840:0,103841:0,103842:0,103843:0,103844:0,103845:0,103846:0,103847:0,103848:0,103849:0,103850:0,103851:0,103852:0,103853:0,103854:0,103855:0,103856:0,103857:0,103858:0,103859:0,103860:0,103861:0,103862:0,103863:0,103864:0,103865:0,103866:0,103867:0,103868:0,103869:0,103870:0,103871:0,103900:3,103901:3,103902:3,103903:3,103904:3,103905:3,103906:3,103907:3,103908:3,103909:3,103910:3,103911:3,103912:3,103913:3,103914:3,103915:3,103916:3,103917:3,103918:3,103919:3,103920:3,103921:3,103922:3,103923:3,103924:3,103925:3,103926:3,103927:3,103928:3,103929:3,103930:3,103931:3,103932:3,103933:3,103934:3,103935:3,103936:3,103937:3,103938:3,103939:3,103940:3,103941:3,103942:3,103943:3,103944:3,103945:3,103946:3,103947:3,103948:3,103949:3,103950:3,103951:3,103952:3,103953:3,103954:3,103955:3,103956:3,103957:3,103958:3,103959:3,103960:3,103961:3,103962:3,103963:3,103964:3,103965:3,103966:3,103967:3,103968:3,103969:3,103970:3,103971:3};}if(!_8._hasResource["esri.geometry.utils"]){_8._hasResource["esri.geometry.utils"]=true;_8.provide("esri.geometry.utils");(function(){var EG=esri.geometry;EG.normalizeCentralMeridian=function(_60,_61,_62,_63){var dfd=new _8.Deferred();dfd.addCallbacks(_62,_63);var _64=[],_65=[],_66=_60[0].spatialReference,_67=_66._getInfo(),_68=_66._isWebMercator(),_69=_68?20037508.342788905:180,_6a=_68?-20037508.342788905:-180,_6b=new esri.geometry.Polyline({"paths":[[[_69,_6a],[_69,_69]]]}),_6c=new esri.geometry.Polyline({"paths":[[[_6a,_6a],[_6a,_69]]]}),_6d=0;_8.forEach(_60,function(_6e){var _6f=esri.geometry.fromJson(_8.fromJson(_8.toJson(_6e.toJson()))),_70=_6e.getExtent();if(_6e.type==="point"){_64.push(EG._pointNormalization(_6f,_69,_6a));}else{if(_6e.type==="multipoint"){_6f.points=_8.map(_6f.points,function(_71){return EG._pointNormalization(_71,_69,_6a);});_64.push(_6f);}else{if(_6e.type==="extent"){_64.push(_70._normalize(null,null,_67));}else{var _72=EG._offsetMagnitude(_70.xmin,_6a),_73=_72*(2*_69);_6f=(_73===0)?_6f:EG._updatePolyGeometry(_6f,_73);_70=_70.offset(_73,0);if(_70.intersects(_6b)&&(_70.xmax!==_69)){_6d=(_70.xmax>_6d)?_70.xmax:_6d;_6f=EG._prepareGeometryForCut(_6f,_68);_65.push(_6f);_64.push("cut");}else{if(_70.intersects(_6c)&&(_70.xmin!==_6a)){_6d=(_70.xmax*(2*_69)>_6d)?_70.xmax*(2*_69):_6d;_6f=EG._prepareGeometryForCut(_6f,_68,360);_65.push(_6f);_64.push("cut");}else{_64.push(_6f);}}}}}});var _74=new esri.geometry.Polyline(),_75=EG._offsetMagnitude(_6d,_69),_76=-90,_77=_75;while(_75>0){var _78=-180+(360*_75);_74.addPath([[_78,_76],[_78,_76*-1]]);_76=_76*-1;_75--;}if(_65.length>0&&_77>0){if(_61){_61.cut(_65,_74,function(_79){_65=EG._foldCutResults(_65,_79);var _7a=[];_8.forEach(_64,function(_7b,i){if(_7b==="cut"){var _7c=_65.shift();if((_60[i].rings)&&(_60[i].rings.length>1)&&(_7c.rings.length>=_60[i].rings.length)){_64[i]="simplify";_7a.push(_7c);}else{_64[i]=(_68===true)?EG.geographicToWebMercator(_7c):_7c;}}});if(_7a.length>0){_61.simplify(_7a,function(_7d){_8.forEach(_64,function(_7e,i){if(_7e==="simplify"){_64[i]=(_68===true)?EG.geographicToWebMercator(_7d.shift()):_7d.shift();}});dfd.callback(_64);},function(_7f){dfd.errback(_7f);});}else{dfd.callback(_64);}},function(_80){dfd.errback(_80);});}else{dfd.errback(new Error("esri.geometry.normalizeCentralMeridian: 'geometryService' argument is missing."));}}else{_8.forEach(_64,function(_81,i){if(_81==="cut"){var _82=_65.shift();_64[i]=(_68===true)?EG.geographicToWebMercator(_82):_82;}});dfd.callback(_64);}return dfd;};EG.geodesicDensify=function(_83,_84){var _85=Math.PI/180;var _86=6371008.771515059;if(_84<_86/10000){_84=_86/10000;}if(!(_83 instanceof esri.geometry.Polyline||_83 instanceof esri.geometry.Polygon)){var msg="_geodesicDensify: the input geometry is neither polyline nor polygon";console.error(msg);throw new Error(msg);}var _87=_83 instanceof esri.geometry.Polyline,_88=_87?_83.paths:_83.rings,_89=[],_8a;_8.forEach(_88,function(_8b){_89.push(_8a=[]);_8a.push([_8b[0][0],_8b[0][1]]);var _8c,_8d,_8e,_8f,i,j;_8c=_8b[0][0]*_85;_8d=_8b[0][1]*_85;for(i=0;i<_8b.length-1;i++){_8e=_8b[i+1][0]*_85;_8f=_8b[i+1][1]*_85;var _90=EG._inverseGeodeticSolver(_8d,_8c,_8f,_8e);var _91=_90.azimuth;var _92=_90.geodesicDistance;var _93=_92/_84;if(_93>1){for(j=1;j<=_93-1;j++){var _94=j*_84;var pt=EG._directGeodeticSolver(_8d,_8c,_91,_94);_8a.push([pt.x,pt.y]);}var _95=(_92+Math.floor(_93-1)*_84)/2;var _96=EG._directGeodeticSolver(_8d,_8c,_91,_95);_8a.push([_96.x,_96.y]);}var _97=EG._directGeodeticSolver(_8d,_8c,_91,_92);_8a.push([_97.x,_97.y]);_8c=_97.x*_85;_8d=_97.y*_85;}});if(_87){return new esri.geometry.Polyline({paths:_89,spatialReference:_83.spatialReference});}else{return new esri.geometry.Polygon({rings:_89,spatialReference:_83.spatialReference});}};EG.geodesicLengths=function(_98,_99){var _9a=Math.PI/180;var _9b=[];_8.forEach(_98,function(_9c,idx){var _9d=0;_8.forEach(_9c.paths,function(_9e,idx){var _9f=0;var i,_a0,_a1,_a2,_a3,_a4;for(i=1;i<_9e.length;i++){_a0=_9e[i-1][0]*_9a;_a1=_9e[i][0]*_9a;_a2=_9e[i-1][1]*_9a;_a3=_9e[i][1]*_9a;_a4=EG._inverseGeodeticSolver(_a2,_a0,_a3,_a1);_9f+=_a4.geodesicDistance/1609.344;}_9d+=_9f;});_9d*=EG._unitsDictionary[_99];_9b.push(_9d);});return _9b;};EG.geodesicAreas=function(_a5,_a6){var _a7=[];_8.forEach(_a5,function(_a8,idx){var _a9=EG.geodesicDensify(_a8,10000);_a7.push(_a9);});var _aa=[];var _ab,_ac;_8.forEach(_a7,function(_ad,idx){var _ae=0;_8.forEach(_ad.rings,function(_af,idx){_ab=EG._toEqualAreaPoint(new esri.geometry.Point(_af[0][0],_af[0][1]));_ac=EG._toEqualAreaPoint(new esri.geometry.Point(_af[_af.length-1][0],_af[_af.length-1][1]));var _b0=_ac.x*_ab.y-_ab.x*_ac.y;var i;for(i=0;i<_af.length-1;i++){_ab=EG._toEqualAreaPoint(new esri.geometry.Point(_af[i+1][0],_af[i+1][1]));_ac=EG._toEqualAreaPoint(new esri.geometry.Point(_af[i][0],_af[i][1]));_b0+=_ac.x*_ab.y-_ab.x*_ac.y;}_b0/=4046.87;_ae+=_b0;});_ae*=EG._unitsDictionary[_a6];_aa.push(_ae/(-2));});return _aa;};EG.polygonSelfIntersecting=function(_b1){var i,j,k,m,_b2,_b3,_b4,_b5=_b1.rings.length;for(k=0;k<_b5;k++){for(i=0;i<_b1.rings[k].length-1;i++){_b2=[[_b1.rings[k][i][0],_b1.rings[k][i][1]],[_b1.rings[k][i+1][0],_b1.rings[k][i+1][1]]];for(j=k+1;j<_b5;j++){for(m=0;m<_b1.rings[j].length-1;m++){_b3=[[_b1.rings[j][m][0],_b1.rings[j][m][1]],[_b1.rings[j][m+1][0],_b1.rings[j][m+1][1]]];_b4=esri.geometry._getLineIntersection2(_b2,_b3);if(_b4){if(!((_b4[0]===_b2[0][0]&&_b4[1]===_b2[0][1])||(_b4[0]===_b3[0][0]&&_b4[1]===_b3[0][1])||(_b4[0]===_b2[1][0]&&_b4[1]===_b2[1][1])||(_b4[0]===_b3[1][0]&&_b4[1]===_b3[1][1]))){return true;}}}}}var _b6=_b1.rings[k].length;if(_b6<=4){continue;}for(i=0;i<_b6-3;i++){var _b7=_b6-1;if(i===0){_b7=_b6-2;}_b2=[[_b1.rings[k][i][0],_b1.rings[k][i][1]],[_b1.rings[k][i+1][0],_b1.rings[k][i+1][1]]];for(j=i+2;j<_b7;j++){_b3=[[_b1.rings[k][j][0],_b1.rings[k][j][1]],[_b1.rings[k][j+1][0],_b1.rings[k][j+1][1]]];_b4=esri.geometry._getLineIntersection2(_b2,_b3);if(_b4){if(!((_b4[0]===_b2[0][0]&&_b4[1]===_b2[0][1])||(_b4[0]===_b3[0][0]&&_b4[1]===_b3[0][1])||(_b4[0]===_b2[1][0]&&_b4[1]===_b2[1][1])||(_b4[0]===_b3[1][0]&&_b4[1]===_b3[1][1]))){return true;}}}}}return false;};EG._foldCutResults=function(_b8,_b9){var _ba=-1;_8.forEach(_b9.cutIndexes,function(_bb,i){var _bc=_b9.geometries[i];var _bd=_bc.rings||_bc.paths;_8.forEach(_bd,function(_be,_bf){_8.some(_be,function(_c0){if(_c0[0]<180){return true;}else{var _c1=0,j,jl=_be.length,ptX;for(j=0;j<jl;j++){ptX=_be[j][0];_c1=ptX>_c1?ptX:_c1;}var _c2=EG._offsetMagnitude(_c1,180),_c3=_c2*-360,_c4,_c5=_be.length;for(_c4=0;_c4<_c5;_c4++){var _c6=_bc.getPoint(_bf,_c4);_bc.setPoint(_bf,_c4,_c6.offset(_c3,0));}return true;}});});if(_bb===_ba){if(_bc.rings){_8.forEach(_bc.rings,function(_c7,j){_b8[_bb]=_b8[_bb].addRing(_c7);});}else{_8.forEach(_bc.paths,function(_c8,j){_b8[_bb]=_b8[_bb].addPath(_c8);});}}else{_ba=_bb;_b8[_bb]=_bc;}});return _b8;};EG._prepareGeometryForCut=function(_c9,_ca,_cb){var _cc=1000000;if(_ca){var _cd=EG._straightLineDensify(_c9,_cc);_c9=EG.webMercatorToGeographic(_cd,true);}if(_cb){_c9=EG._updatePolyGeometry(_c9,_cb);}return _c9;};EG._offsetMagnitude=function(_ce,_cf){return Math.ceil((_ce-_cf)/(_cf*2));};EG._pointNormalization=function(_d0,_d1,_d2){var _d3=_d0.x||_d0[0];var _d4;if(_d3>_d1){_d4=EG._offsetMagnitude(_d3,_d1);if(_d0.x){_d0=_d0.offset(_d4*(-2*_d1),0);}else{_d0[0]=_d3+(_d4*(-2*_d1));}}else{if(_d3<_d2){_d4=EG._offsetMagnitude(_d3,_d2);if(_d0.x){_d0=_d0.offset(_d4*(-2*_d2),0);}else{_d0[0]=_d3+(_d4*(-2*_d2));}}}return _d0;};EG._updatePolyGeometry=function(_d5,_d6){var _d7=_d5.paths||_d5.rings,i,j,il=_d7.length,jl;for(i=0;i<il;i++){var _d8=_d7[i];jl=_d8.length;for(j=0;j<jl;j++){var _d9=_d5.getPoint(i,j);_d5.setPoint(i,j,_d9.offset(_d6,0));}}return _d5;};EG._straightLineDensify=function(_da,_db){if(!(_da instanceof esri.geometry.Polyline||_da instanceof esri.geometry.Polygon)){var msg="_straightLineDensify: the input geometry is neither polyline nor polygon";console.error(msg);throw new Error(msg);}var _dc=_da instanceof esri.geometry.Polyline,_dd=_dc?_da.paths:_da.rings,_de=[],_df;_8.forEach(_dd,function(_e0){_de.push(_df=[]);_df.push([_e0[0][0],_e0[0][1]]);var x1,y1,x2,y2;var i,j,_e1,_e2,_e3,_e4,xj,yj;for(i=0;i<_e0.length-1;i++){x1=_e0[i][0];y1=_e0[i][1];x2=_e0[i+1][0];y2=_e0[i+1][1];_e1=Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));_e2=(y2-y1)/_e1;_e3=(x2-x1)/_e1;_e4=_e1/_db;if(_e4>1){for(j=1;j<=_e4-1;j++){var _e5=j*_db;xj=_e3*_e5+x1;yj=_e2*_e5+y1;_df.push([xj,yj]);}var _e6=(_e1+Math.floor(_e4-1)*_db)/2;xj=_e3*_e6+x1;yj=_e2*_e6+y1;_df.push([xj,yj]);}_df.push([x2,y2]);}});if(_dc){return new esri.geometry.Polyline({paths:_de,spatialReference:_da.spatialReference});}else{return new esri.geometry.Polygon({rings:_de,spatialReference:_da.spatialReference});}};EG._unitsDictionary={"esriMiles":1,"esriKilometers":1.609344,"esriFeet":5280,"esriMeters":1609.34,"esriYards":1760,"esriNauticalMiles":0.869,"esriCentimeters":160934,"esriDecimeters":16093.4,"esriInches":63360,"esriMillimeters":1609340,"esriAcres":1,"esriAres":40.4685642,"esriSquareKilometers":0.00404685642,"esriSquareMiles":0.0015625,"esriSquareFeet":43560,"esriSquareMeters":4046.85642,"esriHectares":0.404685642,"esriSquareYards":4840,"esriSquareInches":6272640,"esriSquareMillimeters":4046856420,"esriSquareCentimeters":40468564.2,"esriSquareDecimeters":404685.642};EG._toEqualAreaPoint=function(pt){var _e7=Math.PI/180;var a=6378137;var eSq=0.006694379990197414,e=0.0818191908429643;var _e8=Math.sin(pt.y*_e7);var q=(1-eSq)*((_e8/(1-eSq*(_e8*_e8))-(1/(2*e))*Math.log((1-e*_e8)/(1+e*_e8))));var x=a*pt.x*_e7;var y=a*q*0.5;var _e9=new esri.geometry.Point(x,y);return _e9;};EG._directGeodeticSolver=function(_ea,_eb,_ec,s){var a=6378137,b=6356752.31424518,f=1/298.257223563;var _ed=Math.sin(_ec);var _ee=Math.cos(_ec);var _ef=(1-f)*Math.tan(_ea);var _f0=1/Math.sqrt((1+_ef*_ef)),_f1=_ef*_f0;var _f2=Math.atan2(_ef,_ee);var _f3=_f0*_ed;var _f4=1-_f3*_f3;var uSq=_f4*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var _f5=s/(b*A),_f6=2*Math.PI;var _f7,_f8,_f9;while(Math.abs(_f5-_f6)>1e-12){_f9=Math.cos(2*_f2+_f5);_f7=Math.sin(_f5);_f8=Math.cos(_f5);var _fa=B*_f7*(_f9+B/4*(_f8*(-1+2*_f9*_f9)-B/6*_f9*(-3+4*_f7*_f7)*(-3+4*_f9*_f9)));_f6=_f5;_f5=s/(b*A)+_fa;}var tmp=_f1*_f7-_f0*_f8*_ee;var _fb=Math.atan2(_f1*_f8+_f0*_f7*_ee,(1-f)*Math.sqrt(_f3*_f3+tmp*tmp));var _fc=Math.atan2(_f7*_ed,_f0*_f8-_f1*_f7*_ee);var C=f/16*_f4*(4+f*(4-3*_f4));var L=_fc-(1-C)*f*_f3*(_f5+C*_f7*(_f9+C*_f8*(-1+2*_f9*_f9)));var _fd=_fb/(Math.PI/180);var _fe=(_eb+L)/(Math.PI/180);var pt=new esri.geometry.Point(_fe,_fd,new esri.SpatialReference({wkid:4326}));return pt;};EG._inverseGeodeticSolver=function(_ff,lon1,lat2,lon2){var a=6378137,b=6356752.31424518,f=1/298.257223563;var L=(lon2-lon1);var U1=Math.atan((1-f)*Math.tan(_ff));var U2=Math.atan((1-f)*Math.tan(lat2));var _100=Math.sin(U1),_101=Math.cos(U1);var _102=Math.sin(U2),_103=Math.cos(U2);var _104=L,_105,_106=1000;var _107,_108,_109,_10a,_10b;do{var _10c=Math.sin(_104),_10d=Math.cos(_104);_108=Math.sqrt((_103*_10c)*(_103*_10c)+(_101*_102-_100*_103*_10d)*(_101*_102-_100*_103*_10d));if(_108===0){return 0;}_10a=_100*_102+_101*_103*_10d;_10b=Math.atan2(_108,_10a);var _10e=_101*_103*_10c/_108;_107=1-_10e*_10e;_109=_10a-2*_100*_102/_107;if(isNaN(_109)){_109=0;}var C=f/16*_107*(4+f*(4-3*_107));_105=_104;_104=L+(1-C)*f*_10e*(_10b+C*_108*(_109+C*_10a*(-1+2*_109*_109)));}while(Math.abs(_104-_105)>1e-12&&--_106>0);if(_106===0){var _10f=6371009;var _110=Math.acos(Math.sin(_ff)*Math.sin(lat2)+Math.cos(_ff)*Math.cos(lat2)*Math.cos(lon2-lon1))*_10f;var dLon=lon2-lon1;var y=Math.sin(dLon)*Math.cos(lat2);var x=Math.cos(_ff)*Math.sin(lat2)-Math.sin(_ff)*Math.cos(lat2)*Math.cos(dLon);var brng=Math.atan2(y,x);return {"azimuth":brng,"geodesicDistance":_110};}var uSq=_107*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var _111=B*_108*(_109+B/4*(_10a*(-1+2*_109*_109)-B/6*_109*(-3+4*_108*_108)*(-3+4*_109*_109)));var s=b*A*(_10b-_111);var _112=Math.atan2(_103*Math.sin(_104),_101*_102-_100*_103*Math.cos(_104));var _113=Math.atan2(_101*Math.sin(_104),_101*_102*Math.cos(_104)-_100*_103);var _114={azimuth:_112,geodesicDistance:s,reverseAzimuth:_113};return _114;};}());}if(!_8._hasResource["esri.geometry"]){_8._hasResource["esri.geometry"]=true;_8.provide("esri.geometry");esri.Units={CENTIMETERS:"esriCentimeters",DECIMAL_DEGREES:"esriDecimalDegrees",DEGREE_MINUTE_SECONDS:"esriDegreeMinuteSeconds",DECIMETERS:"esriDecimeters",FEET:"esriFeet",INCHES:"esriInches",KILOMETERS:"esriKilometers",METERS:"esriMeters",MILES:"esriMiles",MILLIMETERS:"esriMillimeters",NAUTICAL_MILES:"esriNauticalMiles",POINTS:"esriPoints",UNKNOWN:"esriUnknownUnits",YARDS:"esriYards",ACRES:"esriAcres",ARES:"esriAres",SQUARE_KILOMETERS:"esriSquareKilometers",SQUARE_MILES:"esriSquareMiles",SQUARE_FEET:"esriSquareFeet",SQUARE_METERS:"esriSquareMeters",HECTARES:"esriHectares",SQUARE_YARDS:"esriSquareYards",SQUARE_INCHES:"esriSquareInches",SQUARE_MILLIMETERS:"esriSquareMillimeters",SQUARE_CENTIMETERS:"esriSquareCentimeters",SQUARE_DECIMETERS:"esriSquareDecimeters"};(function(){var _115="PROJCS[\"WGS_1984_Web_Mercator_Auxiliary_Sphere\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator_Auxiliary_Sphere\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",${Central_Meridian}],PARAMETER[\"Standard_Parallel_1\",0.0],PARAMETER[\"Auxiliary_Sphere_Type\",0.0],UNIT[\"Meter\",1.0]]";var _116=[-20037508.342788905,20037508.342788905];var _117=[-20037508.342787,20037508.342787];_8.declare("esri.SpatialReference",null,{constructor:function(json){if(json){if(_8.isObject(json)){_8.mixin(this,json);}else{if(_8.isString(json)){this.wkt=json;}else{this.wkid=json;}}}},wkid:null,wkt:null,_info:{"102113":{wkTemplate:"PROJCS[\"WGS_1984_Web_Mercator\",GEOGCS[\"GCS_WGS_1984_Major_Auxiliary_Sphere\",DATUM[\"D_WGS_1984_Major_Auxiliary_Sphere\",SPHEROID[\"WGS_1984_Major_Auxiliary_Sphere\",6378137.0,0.0]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",${Central_Meridian}],PARAMETER[\"Standard_Parallel_1\",0.0],UNIT[\"Meter\",1.0]]",valid:_116,origin:_117,dx:0.00001},"102100":{wkTemplate:_115,valid:_116,origin:_117,dx:0.00001},"3857":{wkTemplate:_115,valid:_116,origin:_117,dx:0.00001},"4326":{wkTemplate:"GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",${Central_Meridian}],UNIT[\"Degree\",0.0174532925199433]]",altTemplate:"PROJCS[\"WGS_1984_Plate_Carree\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Plate_Carree\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",${Central_Meridian}],UNIT[\"Degrees\",111319.491]]",valid:[-180,180],origin:[-180,180],dx:0.00001}},_isWebMercator:function(){return _8.indexOf([102113,102100,3857,3785],this.wkid)!==-1;},_isWrappable:function(){return _8.indexOf([102113,102100,3857,3785,4326],this.wkid)!==-1;},_getInfo:function(){return this.wkid?this._info[this.wkid]:null;},toJson:function(){if(this.wkid!==null){return {wkid:this.wkid};}else{if(this.wkt!==null){return {wkt:this.wkt};}}return null;}});}());_8.mixin(esri.geometry,(function(){var _118=6378137,PI=3.141592653589793,_119=57.29577951308232,_11a=0.017453292519943,_11b=Math.floor,log=Math.log,sin=Math.sin,exp=Math.exp,atan=Math.atan;function _11c(rad){return rad*_119;};function _11d(deg){return deg*_11a;};function _11e(lng,lat){var _11f=_11d(lat);return [_11d(lng)*_118,_118/2*log((1+sin(_11f))/(1-sin(_11f)))];};function _120(x,y,_121){var _122=_11c(x/_118);if(_121){return [_122,_11c((PI/2)-(2*atan(exp(-1*y/_118))))];}return [_122-(_11b((_122+180)/360)*360),_11c((PI/2)-(2*atan(exp(-1*y/_118))))];};function _123(geom,func,sr,_124){if(geom instanceof esri.geometry.Point){var pt=func(geom.x,geom.y,_124);return new esri.geometry.Point(pt[0],pt[1],new esri.SpatialReference(sr));}else{if(geom instanceof esri.geometry.Extent){var min=func(geom.xmin,geom.ymin,_124),max=func(geom.xmax,geom.ymax,_124);return new esri.geometry.Extent(min[0],min[1],max[0],max[1],new esri.SpatialReference(sr));}else{if(geom instanceof esri.geometry.Polyline||geom instanceof esri.geometry.Polygon){var _125=geom instanceof esri.geometry.Polyline,_126=_125?geom.paths:geom.rings,_127=[],_128;_8.forEach(_126,function(_129){_127.push(_128=[]);_8.forEach(_129,function(iPt){_128.push(func(iPt[0],iPt[1],_124));});});if(_125){return new esri.geometry.Polyline({paths:_127,spatialReference:sr});}else{return new esri.geometry.Polygon({rings:_127,spatialReference:sr});}}else{if(geom instanceof esri.geometry.Multipoint){var oPts=[];_8.forEach(geom.points,function(iPt){oPts.push(func(iPt[0],iPt[1],_124));});return new esri.geometry.Multipoint({points:oPts,spatialReference:sr});}}}}};var _12a=39.37,_12b=20015077/180,ecd=esri.config.defaults,_12c=esri.WKIDUnitConversion;return {geographicToWebMercator:function(geom){return _123(geom,_11e,{wkid:102100});},webMercatorToGeographic:function(geom,_12d){return _123(geom,_120,{wkid:4326},_12d);},getScale:function(map){var _12e,_12f,wkid,wkt;if(arguments.length>1){_12e=arguments[0];_12f=arguments[1];wkid=arguments[2];}else{_12e=map.extent;_12f=map.width;var sr=map.spatialReference;if(sr){wkid=sr.wkid;wkt=sr.wkt;}}var _130;if(wkid){_130=_12c.values[_12c[wkid]];}else{if(wkt&&(wkt.search(/^PROJCS/i)!==-1)){var _131=/UNIT\[([^\]]+)\]\]$/i.exec(wkt);if(_131&&_131[1]){_130=parseFloat(_131[1].split(",")[1]);}}}return esri.geometry._getScale(_12e,_12f,_130);},_getScale:function(_132,_133,_134){return (_132.getWidth()/_133)*(_134||_12b)*_12a*ecd.screenDPI;},getExtentForScale:function(map,_135){var wkid,wkt,sr=map.spatialReference;if(sr){wkid=sr.wkid;wkt=sr.wkt;}var _136;if(wkid){_136=_12c.values[_12c[wkid]];}else{if(wkt&&(wkt.search(/^PROJCS/i)!==-1)){var _137=/UNIT\[([^\]]+)\]\]$/i.exec(wkt);if(_137&&_137[1]){_136=parseFloat(_137[1].split(",")[1]);}}}return esri.geometry._getExtentForScale(map.extent,map.width,_136,_135,true);},_getExtentForScale:function(_138,_139,wkid,_13a,_13b){var _13c;if(_13b){_13c=wkid;}else{_13c=_12c.values[_12c[wkid]];}return _138.expand(((_13a*_139)/((_13c||_12b)*_12a*ecd.screenDPI))/_138.getWidth());}};}()),{defaultPoint:{type:"point",x:0,y:0},defaultMultipoint:{type:"multipoint",points:null},defaultExtent:{type:"extent",xmin:0,ymin:0,xmax:0,ymax:0},defaultPolyline:{type:"polyline",paths:null},defaultPolygon:{type:"polygon",rings:null},_rectToExtent:function(rect){return new esri.geometry.Extent(parseFloat(rect.x),parseFloat(rect.y)-parseFloat(rect.height),parseFloat(rect.x)+parseFloat(rect.width),parseFloat(rect.y),rect.spatialReference);},_extentToRect:function(_13d){return new esri.geometry.Rect(_13d.xmin,_13d.ymax,_13d.getWidth(),_13d.getHeight(),_13d.spatialReference);},fromJson:function(json){if(json.x!==undefined&&json.y!==undefined){return new esri.geometry.Point(json);}else{if(json.paths!==undefined){return new esri.geometry.Polyline(json);}else{if(json.rings!==undefined){return new esri.geometry.Polygon(json);}else{if(json.points!==undefined){return new esri.geometry.Multipoint(json);}else{if(json.xmin!==undefined&&json.ymin!==undefined&&json.xmax!==undefined&&json.ymax!==undefined){return new esri.geometry.Extent(json);}}}}}},getJsonType:function(_13e){if(_13e instanceof esri.geometry.Point){return "esriGeometryPoint";}else{if(_13e instanceof esri.geometry.Polyline){return "esriGeometryPolyline";}else{if(_13e instanceof esri.geometry.Polygon){return "esriGeometryPolygon";}else{if(_13e instanceof esri.geometry.Extent){return "esriGeometryEnvelope";}else{if(_13e instanceof esri.geometry.Multipoint){return "esriGeometryMultipoint";}}}}}return null;},getGeometryType:function(_13f){if(_13f==="esriGeometryPoint"){return esri.geometry.Point;}else{if(_13f==="esriGeometryPolyline"){return esri.geometry.Polyline;}else{if(_13f==="esriGeometryPolygon"){return esri.geometry.Polygon;}else{if(_13f==="esriGeometryEnvelope"){return esri.geometry.Extent;}else{if(_13f==="esriGeometryMultipoint"){return esri.geometry.Multipoint;}}}}}return null;},isClockwise:function(arr){var area=0,i,il=arr.length,func=_8.isArray(arr[0])?function(p1,p2){return p1[0]*p2[1]-p2[0]*p1[1];}:function(p1,p2){return p1.x*p2.y-p2.x*p1.y;};for(i=0;i<il;i++){area+=func(arr[i],arr[(i+1)%il]);}return (area/2)<=0;},toScreenPoint:function(ext,wd,ht,pt,_140){if(_140){return new esri.geometry.Point((pt.x-ext.xmin)*(wd/ext.getWidth()),(ext.ymax-pt.y)*(ht/ext.getHeight()));}else{return new esri.geometry.Point(Math.round((pt.x-ext.xmin)*(wd/ext.getWidth())),Math.round((ext.ymax-pt.y)*(ht/ext.getHeight())));}},toScreenGeometry:function(ext,wd,ht,g){var x=ext.xmin,y=ext.ymax,rwd=wd/ext.getWidth(),rht=ht/ext.getHeight(),_141=_8.forEach,_142=Math.round;if(g instanceof esri.geometry.Point){return new esri.geometry.Point(_142((g.x-x)*rwd),_142((y-g.y)*rht));}else{if(g instanceof esri.geometry.Multipoint){var mp=new esri.geometry.Multipoint(),mpp=mp.points;_141(g.points,function(pt,i){mpp[i]=[_142((pt[0]-x)*rwd),_142((y-pt[1])*rht)];});return mp;}else{if(g instanceof esri.geometry.Extent){return new esri.geometry.Extent(_142((g.xmin-x)*rwd),_142((y-g.ymin)*rht),_142((g.xmax-x)*rwd),_142((y-g.ymax)*rwd));}else{if(g instanceof esri.geometry.Polyline){var _143=new esri.geometry.Polyline(),_144=_143.paths,_145;_141(g.paths,function(path,i){_145=(_144[i]=[]);_141(path,function(pt,j){_145[j]=[_142((pt[0]-x)*rwd),_142((y-pt[1])*rht)];});});return _143;}else{if(g instanceof esri.geometry.Polygon){var pgon=new esri.geometry.Polygon(),_146=pgon.rings,_147;_141(g.rings,function(ring,i){_147=(_146[i]=[]);_141(ring,function(pt,j){_147[j]=[_142((pt[0]-x)*rwd),_142((y-pt[1])*rht)];});});return pgon;}}}}}},_toScreenPath:(function(){var _148=(function(){if(_8.isIE<9){return function(x,y,rwd,rht,dx,dy,_149){var _14a=[],_14b=Math.round,p,pl=_149.length,path,_14c,_14d,pt,x1,y1,x2,y2;for(p=0;p<pl;p++){path=_149[p];pt=path[0];if((_14d=path.length)>1){pt=path[0];x1=_14b(((pt[0]-x)*rwd)+dx);y1=_14b(((y-pt[1])*rht)+dy);x2=_14b(((path[1][0]-x)*rwd)+dx);y2=_14b(((y-path[1][1])*rht)+dy);_14a.push("M",x1+","+y1,"L",x2+","+y2);for(_14c=2;_14c<_14d;_14c++){pt=path[_14c];x1=_14b(((pt[0]-x)*rwd)+dx);y1=_14b(((y-pt[1])*rht)+dy);_14a.push(x1+","+y1);}}else{x1=_14b(((pt[0]-x)*rwd)+dx);y1=_14b(((y-pt[1])*rht)+dy);_14a.push("M",x1+","+y1);}}return _14a;};}else{return function(x,y,rwd,rht,dx,dy,_14e){var _14f=[],i,j,il,jl,path,pt,_150=Math.round;for(i=0,il=_14e?_14e.length:0;i<il;i++){path=_14e[i];_14f.push("M");for(j=0,jl=path?path.length:0;j<jl;j++){pt=path[j];_14f.push(_150(((pt[0]-x)*rwd)+dx)+","+_150(((y-pt[1])*rht)+dy));}}return _14f;};}}());return function(ext,wd,ht,g,dx,dy){var _151=g instanceof esri.geometry.Polyline;return _148(ext.xmin,ext.ymax,wd/ext.getWidth(),ht/ext.getHeight(),dx,dy,_151?g.paths:g.rings);};}()),toMapPoint:function(ext,wd,ht,pt){return new esri.geometry.Point(ext.xmin+(pt.x/(wd/ext.getWidth())),ext.ymax-(pt.y/(ht/ext.getHeight())),ext.spatialReference);},toMapGeometry:function(ext,wd,ht,g){var x=ext.xmin,y=ext.ymax,sr=ext.spatialReference,rwd=wd/ext.getWidth(),rht=ht/ext.getHeight(),_152=_8.forEach;if(g instanceof esri.geometry.Point){return new esri.geometry.Point(x+(g.x/rwd),y-(g.y/rht),sr);}else{if(g instanceof esri.geometry.Multipoint){var mp=new esri.geometry.Multipoint(sr),mpp=mp.points;_152(g.points,function(pt,i){mpp[i]=[x+(pt[0]/rwd),y-(pt[1]/rht)];});return mp;}else{if(g instanceof esri.geometry.Extent){return new esri.geometry.Extent(x+(g.xmin/rwd),y-(g.ymin/rht),x+(g.xmax/rwd),y-(g.ymax/rht),sr);}else{if(g instanceof esri.geometry.Polyline){var _153=new esri.geometry.Polyline(sr),_154=_153.paths,_155;_152(g.paths,function(path,i){_155=(_154[i]=[]);_152(path,function(pt,j){_155[j]=[x+(pt[0]/rwd),y-(pt[1]/rht)];});});return _153;}else{if(g instanceof esri.geometry.Polygon){var pgon=new esri.geometry.Polygon(sr),_156=pgon.rings,_157;_152(g.rings,function(ring,i){_157=(_156[i]=[]);_152(ring,function(pt,j){_157[j]=[x+(pt[0]/rwd),y-(pt[1]/rht)];});});return pgon;}}}}}},getLength:function(pt1,pt2){var dx=pt2.x-pt1.x,dy=pt2.y-pt1.y;return Math.sqrt(dx*dx+dy*dy);},_getLength:function(pt1,pt2){var dx=pt2[0]-pt1[0],dy=pt2[1]-pt1[1];return Math.sqrt(dx*dx+dy*dy);},getMidpoint:function(pt0,pt1){return esri.geometry.getPointOnLine(pt0,pt1,0.5);},getPointOnLine:function(pt0,pt1,_158){if(pt0 instanceof esri.geometry.Point){return new esri.geometry.Point(pt0.x+_158*(pt1.x-pt0.x),pt0.y+_158*(pt1.y-pt0.y));}else{return [pt0[0]+_158*(pt1[0]-pt0[0]),pt0[1]+_158*(pt1[1]-pt0[1])];}},_equals:function(n1,n2){return Math.abs(n1-n2)<1e-8;},getLineIntersection:function(_159,_15a,_15b,_15c){var pt=esri.geometry._getLineIntersection([_159.x,_159.y],[_15a.x,_15a.y],[_15b.x,_15b.y],[_15c.x,_15c.y]);if(pt){pt=new esri.geometry.Point(pt[0],pt[1]);}return pt;},_getLineIntersection:function(p0,p1,p2,p3){var _15d=10000000000,x,y,a0=esri.geometry._equals(p0[0],p1[0])?_15d:(p0[1]-p1[1])/(p0[0]-p1[0]),a1=esri.geometry._equals(p2[0],p3[0])?_15d:(p2[1]-p3[1])/(p2[0]-p3[0]),b0=p0[1]-a0*p0[0],b1=p2[1]-a1*p2[0];if(esri.geometry._equals(a0,a1)){if(!esri.geometry._equals(b0,b1)){return null;}else{if(esri.geometry._equals(p0[0],p1[0])){if(Math.min(p0[1],p1[1])<Math.max(p2[1],p3[1])||Math.max(p0[1],p1[1])>Math.min(p2[1],p3[1])){y=(p0[1]+p1[1]+p2[1]+p3[1]-Math.min(p0[1],p1[1],p2[1],p3[1])-Math.max(p0[1],p1[1],p2[1],p3[1]))/2;x=(y-b0)/a0;}else{return null;}}else{if(Math.min(p0[0],p1[0])<Math.max(p2[0],p3[0])||Math.max(p0[0],p1[0])>Math.min(p2[0],p3[0])){x=(p0[0]+p1[0]+p2[0]+p3[0]-Math.min(p0[0],p1[0],p2[0],p3[0])-Math.max(p0[0],p1[0],p2[0],p3[0]))/2;y=a0*x+b0;}else{return null;}}return [x,y];}}if(esri.geometry._equals(a0,_15d)){x=p0[0];y=a1*x+b1;}else{if(esri.geometry._equals(a1,_15d)){x=p2[0];y=a0*x+b0;}else{x=-(b0-b1)/(a0-a1);y=a0*x+b0;}}return [x,y];},_getLineIntersection2:function(_15e,_15f){var p1=_15e[0],p2=_15e[1],p3=_15f[0],p4=_15f[1],x1=p1[0],y1=p1[1],x2=p2[0],y2=p2[1],x3=p3[0],y3=p3[1],x4=p4[0],y4=p4[1],x43=x4-x3,x13=x1-x3,x21=x2-x1,y43=y4-y3,y13=y1-y3,y21=y2-y1,_160=(y43*x21)-(x43*y21),ua,ub,px,py;if(_160===0){return false;}ua=((x43*y13)-(y43*x13))/_160;ub=((x21*y13)-(y21*x13))/_160;if(ua>=0&&ua<=1&&ub>=0&&ub<=1){px=x1+(ua*(x2-x1));py=y1+(ua*(y2-y1));return [px,py];}else{return false;}},_pointLineDistance:function(_161,line){var p1=line[0],p2=line[1],x1=p1[0],y1=p1[1],x2=p2[0],y2=p2[1],x3=_161[0],y3=_161[1],x21=x2-x1,y21=y2-y1,x31=x3-x1,y31=y3-y1,sqrt=Math.sqrt,pow=Math.pow,mag=sqrt(pow(x21,2)+pow(y21,2)),u=((x31*x21)+(y31*y21))/(mag*mag),x=x1+u*x21,y=y1+u*y21;return sqrt(pow(x3-x,2)+pow(y3-y,2));}});_8.declare("esri.geometry.Geometry",null,{spatialReference:null,type:null,setSpatialReference:function(sr){this.spatialReference=sr;return this;},getExtent:function(){return null;}});_8.declare("esri.geometry.Point",esri.geometry.Geometry,{constructor:function(x,y,_162){_8.mixin(this,esri.geometry.defaultPoint);if(_8.isArray(x)){this.x=x[0];this.y=x[1];this.spatialReference=y;}else{if(_8.isObject(x)){_8.mixin(this,x);if(this.spatialReference){this.spatialReference=new esri.SpatialReference(this.spatialReference);}}else{this.x=x;this.y=y;this.spatialReference=_162;}}},offset:function(x,y){return new esri.geometry.Point(this.x+x,this.y+y,this.spatialReference);},setX:function(x){this.x=x;return this;},setY:function(y){this.y=y;return this;},update:function(x,y){this.x=x;this.y=y;return this;},normalize:function(){var x=this.x,sr=this.spatialReference;if(sr){var info=sr._getInfo();if(info){var _163=info.valid[0],_164=info.valid[1],_165=2*_164,_166;if(x>_164){_166=Math.ceil(Math.abs(x-_164)/_165);x-=(_166*_165);}else{if(x<_163){_166=Math.ceil(Math.abs(x-_163)/_165);x+=(_166*_165);}}}}return new esri.geometry.Point(x,this.y,sr);},toJson:function(){var json={x:this.x,y:this.y},sr=this.spatialReference;if(sr){json.spatialReference=sr.toJson();}return json;}});_8.declare("esri.geometry.Polyline",esri.geometry.Geometry,{constructor:function(obj){_8.mixin(this,esri.geometry.defaultPolyline);this.paths=[];this._path=0;if(obj){if(obj.paths){_8.mixin(this,obj);}else{this.spatialReference=obj;}this.spatialReference=new esri.SpatialReference(this.spatialReference);}},_extent:null,addPath:function(_167){this._extent=null;this._path=this.paths.length;this.paths[this._path]=[];if(_8.isArray(_167[0])){_8.forEach(_167,this._addPointArr,this);}else{_8.forEach(_167,this._addPoint,this);}return this;},_addPointArr:function(_168){this.paths[this._path].push(_168);},_addPoint:function(_169){this.paths[this._path].push([_169.x,_169.y]);},_insertPoints:function(_16a,_16b){this._extent=null;this._path=_16b;if(!this.paths[this._path]){this.paths[this._path]=[];}_8.forEach(_16a,this._addPoint,this);},_validateInputs:function(_16c,_16d){if((_16c!==null&&_16c!==undefined)&&(_16c<0||_16c>=this.paths.length)){return false;}if((_16d!==null&&_16c!==undefined)&&(_16d<0||_16d>=this.paths[_16c].length)){return false;}return true;},getPoint:function(_16e,_16f){if(this._validateInputs(_16e,_16f)){return new esri.geometry.Point(this.paths[_16e][_16f],this.spatialReference);}},setPoint:function(_170,_171,_172){if(this._validateInputs(_170,_171)){this._extent=null;this.paths[_170][_171]=[_172.x,_172.y];return this;}},insertPoint:function(_173,_174,_175){if(this._validateInputs(_173)&&esri._isDefined(_174)&&(_174>=0&&_174<=this.paths[_173].length)){this._extent=null;this.paths[_173].splice(_174,0,[_175.x,_175.y]);return this;}},removePath:function(_176){if(this._validateInputs(_176,null)){this._extent=null;var arr=this.paths.splice(_176,1)[0],i,il=arr.length,_177=esri.geometry.Point,sr=this.spatialReference;for(i=0;i<il;i++){arr[i]=new _177(arr[i],sr);}return arr;}},removePoint:function(_178,_179){if(this._validateInputs(_178,_179)){this._extent=null;return new esri.geometry.Point(this.paths[_178].splice(_179,1)[0],this.spatialReference);}},getExtent:function(){var _17a;if(this._extent){_17a=new esri.geometry.Extent(this._extent);_17a._partwise=this._partwise;return _17a;}var _17b=this.paths,pal=_17b.length;if(!pal||!_17b[0].length){return;}var path,_17c,x,y,xmax,ymax,pa,pt,ptl,xmin=(xmax=_17b[0][0][0]),ymin=(ymax=_17b[0][0][1]),min=Math.min,max=Math.max,sr=this.spatialReference,_17d=[],_17e,_17f,_180,_181;for(pa=0;pa<pal;pa++){path=_17b[pa];_17e=(_17f=path[0]&&path[0][0]);_180=(_181=path[0]&&path[0][1]);ptl=path.length;for(pt=0;pt<ptl;pt++){_17c=path[pt];x=_17c[0];y=_17c[1];xmin=min(xmin,x);ymin=min(ymin,y);xmax=max(xmax,x);ymax=max(ymax,y);_17e=min(_17e,x);_180=min(_180,y);_17f=max(_17f,x);_181=max(_181,y);}_17d.push(new esri.geometry.Extent({xmin:_17e,ymin:_180,xmax:_17f,ymax:_181,spatialReference:(sr?sr.toJson():null)}));}this._extent={xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax,spatialReference:sr?sr.toJson():null};this._partwise=_17d.length>1?_17d:null;_17a=new esri.geometry.Extent(this._extent);_17a._partwise=this._partwise;return _17a;},toJson:function(){var json={paths:_8.clone(this.paths)},sr=this.spatialReference;if(sr){json.spatialReference=sr.toJson();}return json;}});_8.declare("esri.geometry.Polygon",esri.geometry.Geometry,{constructor:function(obj){_8.mixin(this,esri.geometry.defaultPolygon);this.rings=[];this._ring=0;if(obj){if(obj.rings){_8.mixin(this,obj);}else{this.spatialReference=obj;}this.spatialReference=new esri.SpatialReference(this.spatialReference);}},_extent:null,addRing:function(_182){this._extent=null;this._ring=this.rings.length;this.rings[this._ring]=[];if(_8.isArray(_182[0])){_8.forEach(_182,this._addPointArr,this);}else{_8.forEach(_182,this._addPoint,this);}return this;},_addPointArr:function(_183){this.rings[this._ring].push(_183);},_addPoint:function(_184){this.rings[this._ring].push([_184.x,_184.y]);},_insertPoints:function(_185,_186){this._extent=null;this._ring=_186;if(!this.rings[this._ring]){this.rings[this._ring]=[];}_8.forEach(_185,this._addPoint,this);},_validateInputs:function(_187,_188){if((_187!==null&&_187!==undefined)&&(_187<0||_187>=this.rings.length)){return false;}if((_188!==null&&_187!==undefined)&&(_188<0||_188>=this.rings[_187].length)){return false;}return true;},getPoint:function(_189,_18a){if(this._validateInputs(_189,_18a)){return new esri.geometry.Point(this.rings[_189][_18a],this.spatialReference);}},setPoint:function(_18b,_18c,_18d){if(this._validateInputs(_18b,_18c)){this._extent=null;this.rings[_18b][_18c]=[_18d.x,_18d.y];return this;}},insertPoint:function(_18e,_18f,_190){if(this._validateInputs(_18e)&&esri._isDefined(_18f)&&(_18f>=0&&_18f<=this.rings[_18e].length)){this._extent=null;this.rings[_18e].splice(_18f,0,[_190.x,_190.y]);return this;}},removeRing:function(_191){if(this._validateInputs(_191,null)){this._extent=null;var arr=this.rings.splice(_191,1)[0],i,il=arr.length,_192=esri.geometry.Point,sr=this.spatialReference;for(i=0;i<il;i++){arr[i]=new _192(arr[i],sr);}return arr;}},removePoint:function(_193,_194){if(this._validateInputs(_193,_194)){this._extent=null;return new esri.geometry.Point(this.rings[_193].splice(_194,1)[0],this.spatialReference);}},getExtent:function(){var _195;if(this._extent){_195=new esri.geometry.Extent(this._extent);_195._partwise=this._partwise;return _195;}var _196=this.rings,pal=_196.length;if(!pal||!_196[0].length){return;}var ring,_197,x,y,xmax,ymax,pa,pt,ptl,xmin=(xmax=_196[0][0][0]),ymin=(ymax=_196[0][0][1]),min=Math.min,max=Math.max,sr=this.spatialReference,_198=[],_199,_19a,_19b,_19c;for(pa=0;pa<pal;pa++){ring=_196[pa];_199=(_19a=ring[0]&&ring[0][0]);_19b=(_19c=ring[0]&&ring[0][1]);ptl=ring.length;for(pt=0;pt<ptl;pt++){_197=ring[pt];x=_197[0];y=_197[1];xmin=min(xmin,x);ymin=min(ymin,y);xmax=max(xmax,x);ymax=max(ymax,y);_199=min(_199,x);_19b=min(_19b,y);_19a=max(_19a,x);_19c=max(_19c,y);}_198.push(new esri.geometry.Extent({xmin:_199,ymin:_19b,xmax:_19a,ymax:_19c,spatialReference:(sr?sr.toJson():null)}));}this._extent={xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax,spatialReference:(sr?sr.toJson():null)};this._partwise=_198.length>1?_198:null;_195=new esri.geometry.Extent(this._extent);_195._partwise=this._partwise;return _195;},contains:function(_19d){var _19e=this.rings,ring,_19f=false,pi,pj,_1a0,j,i,pa,pal=_19e.length;for(pa=0;pa<pal;pa++){ring=_19e[pa];_1a0=ring.length;j=0;for(i=0;i<_1a0;i++){j++;if(j===_1a0){j=0;}pi=ring[i];pj=ring[j];if((pi[1]<_19d.y&&pj[1]>=_19d.y||pj[1]<_19d.y&&pi[1]>=_19d.y)&&(pi[0]+(_19d.y-pi[1])/(pj[1]-pi[1])*(pj[0]-pi[0])<_19d.x)){_19f=!_19f;}}}return _19f;},toJson:function(){var json={rings:_8.clone(this.rings)},sr=this.spatialReference;if(sr){json.spatialReference=sr.toJson();}return json;}});_8.declare("esri.geometry.Multipoint",esri.geometry.Geometry,{constructor:function(obj){_8.mixin(this,esri.geometry.defaultMultipoint);this.points=[];if(obj){if(obj.points){_8.mixin(this,obj);}else{this.spatialReference=obj;}this.spatialReference=new esri.SpatialReference(this.spatialReference);}},_extent:null,addPoint:function(_1a1){this._extent=null;if(_8.isArray(_1a1)){this.points.push(_1a1);}else{this.points.push([_1a1.x,_1a1.y]);}return this;},removePoint:function(_1a2){if(this._validateInputs(_1a2)){this._extent=null;return new esri.geometry.Point(this.points.splice(_1a2,1)[0],this.spatialReference);}},getExtent:function(){if(this._extent){return new esri.geometry.Extent(this._extent);}var _1a3=this.points,il=_1a3.length;if(!il){return;}var _1a4=_1a3[0],xmax,ymax,xmin=(xmax=_1a4[0]),ymin=(ymax=_1a4[1]),min=Math.min,max=Math.max,sr=this.spatialReference,x,y,i;for(i=0;i<il;i++){_1a4=_1a3[i];x=_1a4[0];y=_1a4[1];xmin=min(xmin,x);ymin=min(ymin,y);xmax=max(xmax,x);ymax=max(ymax,y);}this._extent={xmin:xmin,ymin:ymin,xmax:xmax,ymax:ymax,spatialReference:sr?sr.toJson():null};return new esri.geometry.Extent(this._extent);},_validateInputs:function(_1a5){if(_1a5===null||_1a5<0||_1a5>=this.points.length){return false;}return true;},getPoint:function(_1a6){if(this._validateInputs(_1a6)){var _1a7=this.points[_1a6];return new esri.geometry.Point(_1a7[0],_1a7[1],this.spatialReference);}},setPoint:function(_1a8,_1a9){if(this._validateInputs(_1a8)){this._extent=null;this.points[_1a8]=[_1a9.x,_1a9.y];return this;}},toJson:function(){var json={points:_8.clone(this.points)},sr=this.spatialReference;if(sr){json.spatialReference=sr.toJson();}return json;}});_8.declare("esri.geometry.Extent",esri.geometry.Geometry,{constructor:function(xmin,ymin,xmax,ymax,_1aa){_8.mixin(this,esri.geometry.defaultExtent);if(_8.isObject(xmin)){_8.mixin(this,xmin);this.spatialReference=new esri.SpatialReference(this.spatialReference);}else{this.update(xmin,ymin,xmax,ymax,_1aa);}},getWidth:function(){return Math.abs(this.xmax-this.xmin);},getHeight:function(){return Math.abs(this.ymax-this.ymin);},getCenter:function(){return new esri.geometry.Point((this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2,this.spatialReference);},centerAt:function(_1ab){var _1ac=this.getCenter(),dx=_1ab.x-_1ac.x,dy=_1ab.y-_1ac.y;return new esri.geometry.Extent(this.xmin+dx,this.ymin+dy,this.xmax+dx,this.ymax+dy,this.spatialReference);},update:function(xmin,ymin,xmax,ymax,_1ad){this.xmin=xmin;this.ymin=ymin;this.xmax=xmax;this.ymax=ymax;this.spatialReference=_1ad;return this;},offset:function(ox,oy){return new esri.geometry.Extent(this.xmin+ox,this.ymin+oy,this.xmax+ox,this.ymax+oy,this.spatialReference);},expand:function(_1ae){var _1af=(1-_1ae)/2,_1b0=this.getWidth()*_1af,_1b1=this.getHeight()*_1af;return new esri.geometry.Extent(this.xmin+_1b0,this.ymin+_1b1,this.xmax-_1b0,this.ymax-_1b1,this.spatialReference);},intersects:function(_1b2){var type=_1b2.type;switch(type){case "point":return this.contains(_1b2);case "multipoint":return this._intersectsMultipoint(_1b2);case "extent":return this._intersectsExtent(_1b2);case "polygon":return this._intersectsPolygon(_1b2);case "polyline":return this._intersectsPolyline(_1b2);}},_intersectsMultipoint:function(_1b3){var len=_1b3.points.length,i;for(i=0;i<len;i++){if(this.contains(_1b3.getPoint(i))){return true;}}return false;},_intersectsExtent:function(_1b4){var xmin,ymin,_1b5,_1b6,_1b7=false;if(this.xmin<=_1b4.xmin){xmin=_1b4.xmin;if(this.xmax<xmin){_1b7=true;}else{_1b5=Math.min(this.xmax,_1b4.xmax)-xmin;}}else{xmin=this.xmin;if(_1b4.xmax<xmin){_1b7=true;}else{_1b5=Math.min(this.xmax,_1b4.xmax)-xmin;}}if(this.ymin<=_1b4.ymin){ymin=_1b4.ymin;if(this.ymax<ymin){_1b7=true;}else{_1b6=Math.min(this.ymax,_1b4.ymax)-ymin;}}else{ymin=this.ymin;if(_1b4.ymax<ymin){_1b7=true;}else{_1b6=Math.min(this.ymax,_1b4.ymax)-ymin;}}if(_1b7){return null;}return new esri.geometry.Extent(xmin,ymin,xmin+_1b5,ymin+_1b6,this.spatialReference);},_intersectsPolygon:function(_1b8){var _1b9=[this.xmin,this.ymax],_1ba=[this.xmax,this.ymax],_1bb=[this.xmin,this.ymin],_1bc=[this.xmax,this.ymin],_1bd=[_1b9,_1ba,_1bb,_1bc],_1be=[[_1bb,_1b9],[_1b9,_1ba],[_1ba,_1bc],[_1bc,_1bb]],i,j,_1bf=_1b8.rings,_1c0=_1bf.length,ring,len,_1c1=new esri.geometry.Point(0,0);len=_1bd.length;for(i=0;i<len;i++){_1c1.update(_1bd[i][0],_1bd[i][1]);if(_1b8.contains(_1c1)){return true;}}var pi,pj;for(i=0;i<_1c0;i++){ring=_1bf[i];len=ring.length;pi=ring[0];_1c1.update(pi[0],pi[1]);if(this.contains(_1c1)){return true;}for(j=1;j<len;j++){pj=ring[j];_1c1.update(pj[0],pj[1]);if(this.contains(_1c1)||this._intersectsLine([pi,pj],_1be)){return true;}pi=pj;}}return false;},_intersectsPolyline:function(_1c2){var _1c3=[[[this.xmin,this.ymin],[this.xmin,this.ymax]],[[this.xmin,this.ymax],[this.xmax,this.ymax]],[[this.xmax,this.ymax],[this.xmax,this.ymin]],[[this.xmax,this.ymin],[this.xmin,this.ymin]]];var i,j,_1c4=_1c2.paths,_1c5=_1c4.length,path,len;var pi,pj,_1c6=new esri.geometry.Point(0,0);for(i=0;i<_1c5;i++){path=_1c4[i];len=path.length;pi=path[0];_1c6.update(pi[0],pi[1]);if(this.contains(_1c6)){return true;}for(j=1;j<len;j++){pj=path[j];_1c6.update(pj[0],pj[1]);if(this.contains(_1c6)||this._intersectsLine([pi,pj],_1c3)){return true;}pi=pj;}}return false;},_intersectsLine:function(line,_1c7){var _1c8=esri.geometry._getLineIntersection2,i,len=_1c7.length;for(i=0;i<len;i++){if(_1c8(line,_1c7[i])){return true;}}return false;},contains:function(_1c9){if(!_1c9){return false;}var type=_1c9.type;switch(type){case "point":return _1c9.x>=this.xmin&&_1c9.x<=this.xmax&&_1c9.y>=this.ymin&&_1c9.y<=this.ymax;case "extent":return this._containsExtent(_1c9);}return false;},_containsExtent:function(_1ca){var xmin=_1ca.xmin,ymin=_1ca.ymin,xmax=_1ca.xmax,ymax=_1ca.ymax,pt1=new esri.geometry.Point(xmin,ymin),pt2=new esri.geometry.Point(xmin,ymax),pt3=new esri.geometry.Point(xmax,ymax),pt4=new esri.geometry.Point(xmax,ymin);if(this.contains(pt1)&&this.contains(pt2)&&this.contains(pt3)&&this.contains(pt4)){return true;}return false;},union:function(_1cb){return new esri.geometry.Extent(Math.min(this.xmin,_1cb.xmin),Math.min(this.ymin,_1cb.ymin),Math.max(this.xmax,_1cb.xmax),Math.max(this.ymax,_1cb.ymax),this.spatialReference);},getExtent:function(){var sr=this.spatialReference;return new esri.geometry.Extent(this.xmin,this.ymin,this.xmax,this.ymax,sr&&new esri.SpatialReference(sr.toJson()));},_shiftCM:function(info){if(!this._shifted){var EG=esri.geometry,_1cc=EG.fromJson(this.toJson()),sr=_1cc.spatialReference;info=info||sr._getInfo();if(info){var _1cd=this._getCM(info);if(_1cd){var _1ce=sr._isWebMercator()?EG.webMercatorToGeographic(_1cd):_1cd;_1cc.xmin-=_1cd.x;_1cc.xmax-=_1cd.x;if(!sr._isWebMercator()){_1ce.x=this._normalizeX(_1ce.x,info).x;}_1cc.spatialReference.wkt=esri.substitute({Central_Meridian:_1ce.x},sr.wkid===4326?info.altTemplate:info.wkTemplate);_1cc.spatialReference.wkid=null;}}this._shifted=_1cc;}return this._shifted;},_getCM:function(info){var _1cf,_1d0=info.valid[0],_1d1=info.valid[1],xmin=this.xmin,xmax=this.xmax;var _1d2=(xmin>=_1d0&&xmin<=_1d1),_1d3=(xmax>=_1d0&&xmax<=_1d1);if(!(_1d2&&_1d3)){_1cf=this.getCenter();}return _1cf;},_normalize:function(_1d4,_1d5,info){var EG=esri.geometry,_1d6=EG.fromJson(this.toJson()),sr=_1d6.spatialReference;if(sr){info=info||sr._getInfo();if(info){var _1d7=_8.map(this._getParts(info),function(part){return part.extent;});if(_1d7.length>2){if(_1d4){return this._shiftCM(info);}else{return _1d6.update(info.valid[0],_1d6.ymin,info.valid[1],_1d6.ymax,sr);}}else{if(_1d7.length===2){if(_1d4){return this._shiftCM(info);}else{return _1d5?_1d7:new EG.Polygon({"rings":_8.map(_1d7,function(_1d8){return [[_1d8.xmin,_1d8.ymin],[_1d8.xmin,_1d8.ymax],[_1d8.xmax,_1d8.ymax],[_1d8.xmax,_1d8.ymin],[_1d8.xmin,_1d8.ymin]];}),"spatialReference":sr});}}else{return _1d7[0]||_1d6;}}}}return _1d6;},_getParts:function(info){if(!this._parts){var xmin=this.xmin,xmax=this.xmax,ymin=this.ymin,ymax=this.ymax,sr=this.spatialReference,_1d9=this.getWidth(),_1da=xmin,_1db=xmax,_1dc=0,_1dd=0,nrml,_1de=[],_1df,_1e0,_1e1;info=info||sr._getInfo();_1df=info.valid[0];_1e0=info.valid[1];nrml=this._normalizeX(xmin,info);xmin=nrml.x;_1dc=nrml.frameId;nrml=this._normalizeX(xmax,info);xmax=nrml.x;_1dd=nrml.frameId;_1e1=(xmin===xmax&&_1d9>0);if(_1d9>(2*_1e0)){var E1=new esri.geometry.Extent(_1da<_1db?xmin:xmax,ymin,_1e0,ymax,sr),E2=new esri.geometry.Extent(_1df,ymin,_1da<_1db?xmax:xmin,ymax,sr),E3=new esri.geometry.Extent(0,ymin,_1e0,ymax,sr),E4=new esri.geometry.Extent(_1df,ymin,0,ymax,sr),k,_1e2=[],_1e3=[];if(E1.contains(E3)){_1e2.push(_1dc);}if(E1.contains(E4)){_1e3.push(_1dc);}if(E2.contains(E3)){_1e2.push(_1dd);}if(E2.contains(E4)){_1e3.push(_1dd);}for(k=_1dc+1;k<_1dd;k++){_1e2.push(k);_1e3.push(k);}_1de.push({extent:E1,frameIds:[_1dc]},{extent:E2,frameIds:[_1dd]},{extent:E3,frameIds:_1e2},{extent:E4,frameIds:_1e3});}else{if((xmin>xmax)||_1e1){_1de.push({extent:new esri.geometry.Extent(xmin,ymin,_1e0,ymax,sr),frameIds:[_1dc]},{extent:new esri.geometry.Extent(_1df,ymin,xmax,ymax,sr),frameIds:[_1dd]});}else{_1de.push({extent:new esri.geometry.Extent(xmin,ymin,xmax,ymax,sr),frameIds:[_1dc]});}}this._parts=_1de;}return this._parts;},_normalizeX:function(x,info){var _1e4=0,_1e5=info.valid[0],_1e6=info.valid[1],_1e7=2*_1e6,_1e8;if(x>_1e6){_1e8=Math.ceil(Math.abs(x-_1e6)/_1e7);x-=(_1e8*_1e7);_1e4=_1e8;}else{if(x<_1e5){_1e8=Math.ceil(Math.abs(x-_1e5)/_1e7);x+=(_1e8*_1e7);_1e4=-_1e8;}}return {x:x,frameId:_1e4};},toJson:function(){var json={xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax},sr=this.spatialReference;if(sr){json.spatialReference=sr.toJson();}return json;}});_8.declare("esri.geometry.Rect",esri.geometry.Geometry,{constructor:function(json,y,_1e9,_1ea,_1eb){_8.mixin(this,_a.gfx.defaultRect);if(_8.isObject(json)){_8.mixin(this,json);this.spatialReference=new esri.SpatialReference(this.spatialReference);}else{this.x=json;this.y=y;this.width=_1e9;this.height=_1ea;this.spatialReference=_1eb;}},getCenter:function(){return new esri.geometry.Point(this.x+this.width/2,this.y+this.height/2,this.spatialReference);},offset:function(ox,oy){return new esri.geometry.Rect(this.x+ox,this.y+oy,this.width,this.height,this.spatialReference);},intersects:function(rect){if((rect.x+rect.width)<=this.x){return false;}if((rect.y+rect.height)<=this.y){return false;}if(rect.y>=(this.y+this.height)){return false;}if(rect.x>=(this.x+this.width)){return false;}return true;},getExtent:function(){return esri.geometry._rectToExtent(this);},update:function(x,y,_1ec,_1ed,_1ee){this.x=x;this.y=y;this.width=_1ec;this.height=_1ed;this.spatialReference=_1ee;return this;}});}if(!_8._hasResource["dojo.io.script"]){_8._hasResource["dojo.io.script"]=true;_8.provide("dojo.io.script");_8.getObject("io",true,_8);(function(){var _1ef=_8.isIE?"onreadystatechange":"load",_1f0=/complete|loaded/;_8.io.script={get:function(args){var dfd=this._makeScriptDeferred(args);var _1f1=dfd.ioArgs;_8._ioAddQueryToUrl(_1f1);_8._ioNotifyStart(dfd);if(this._canAttach(_1f1)){var node=this.attach(_1f1.id,_1f1.url,args.frameDoc,_1f1.args.isAsync);if(!_1f1.jsonp&&!_1f1.args.checkString){var _1f2=_8.connect(node,_1ef,function(evt){if(evt.type=="load"||_1f0.test(node.readyState)){_8.disconnect(_1f2);_1f1.scriptLoaded=evt;}});}}_8._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);return dfd;},attach:function(id,url,_1f3,_1f4){var doc=(_1f3||_8.doc);var _1f5=doc.createElement("script");_1f5.type="text/javascript";_1f5.src=url;_1f5.id=id;_1f5.charset="utf-8";if(_1f4){_1f5.setAttribute("async","async");}return doc.getElementsByTagName("head")[0].appendChild(_1f5);},remove:function(id,_1f6){_8.destroy(_8.byId(id,_1f6));if(this["jsonp_"+id]){delete this["jsonp_"+id];}},_makeScriptDeferred:function(args){var dfd=_8._ioSetArgs(args,this._deferredCancel,this._deferredOk,this._deferredError);var _1f7=dfd.ioArgs;_1f7.id=_8._scopeName+"IoScript"+(args.callbackSuffix||(this._counter++));_1f7.canDelete=false;_1f7.jsonp=args.callbackParamName||args.jsonp;if(_1f7.jsonp){_1f7.query=_1f7.query||"";if(_1f7.query.length>0){_1f7.query+="&";}_1f7.query+=_1f7.jsonp+"="+(args.frameDoc?"parent.":"")+_8._scopeName+".io.script.jsonp_"+_1f7.id+"._jsonpCallback";_1f7.frameDoc=args.frameDoc;_1f7.canDelete=true;dfd._jsonpCallback=this._jsonpCallback;this["jsonp_"+_1f7.id]=dfd;}return dfd;},_deferredCancel:function(dfd){dfd.canceled=true;if(dfd.ioArgs.canDelete){_8.io.script._addDeadScript(dfd.ioArgs);}},_deferredOk:function(dfd){var _1f8=dfd.ioArgs;if(_1f8.canDelete){_8.io.script._addDeadScript(_1f8);}return _1f8.json||_1f8.scriptLoaded||_1f8;},_deferredError:function(_1f9,dfd){if(dfd.ioArgs.canDelete){if(_1f9.dojoType=="timeout"){_8.io.script.remove(dfd.ioArgs.id,dfd.ioArgs.frameDoc);}else{_8.io.script._addDeadScript(dfd.ioArgs);}}console.log("dojo.io.script error",_1f9);return _1f9;},_deadScripts:[],_counter:1,_addDeadScript:function(_1fa){_8.io.script._deadScripts.push({id:_1fa.id,frameDoc:_1fa.frameDoc});_1fa.frameDoc=null;},_validCheck:function(dfd){var _1fb=_8.io.script;var _1fc=_1fb._deadScripts;if(_1fc&&_1fc.length>0){for(var i=0;i<_1fc.length;i++){_1fb.remove(_1fc[i].id,_1fc[i].frameDoc);_1fc[i].frameDoc=null;}_8.io.script._deadScripts=[];}return true;},_ioCheck:function(dfd){var _1fd=dfd.ioArgs;if(_1fd.json||(_1fd.scriptLoaded&&!_1fd.args.checkString)){return true;}var _1fe=_1fd.args.checkString;if(_1fe&&eval("typeof("+_1fe+") != 'undefined'")){return true;}return false;},_resHandle:function(dfd){if(_8.io.script._ioCheck(dfd)){dfd.callback(dfd);}else{dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));}},_canAttach:function(_1ff){return true;},_jsonpCallback:function(json){this.ioArgs.json=json;}};})();}if(!_8._hasResource["esri.symbol"]){_8._hasResource["esri.symbol"]=true;_8.provide("esri.symbol");_8.mixin(esri.symbol,{toDojoColor:function(clr){return clr&&new _8.Color([clr[0],clr[1],clr[2],clr[3]/255]);},toJsonColor:function(clr){return clr&&[clr.r,clr.g,clr.b,Math.round(clr.a*255)];},fromJson:function(json){var type=json.type,_200=null;switch(type.substring(0,"esriXX".length)){case "esriSM":_200=new esri.symbol.SimpleMarkerSymbol(json);break;case "esriPM":_200=new esri.symbol.PictureMarkerSymbol(json);break;case "esriTS":_200=new esri.symbol.TextSymbol(json);break;case "esriSL":if(json.cap!==undefined){_200=new esri.symbol.CartographicLineSymbol(json);}else{_200=new esri.symbol.SimpleLineSymbol(json);}break;case "esriSF":_200=new esri.symbol.SimpleFillSymbol(json);break;case "esriPF":_200=new esri.symbol.PictureFillSymbol(json);break;}return _200;}});_8.declare("esri.symbol.Symbol",null,{color:new _8.Color([0,0,0,1]),type:null,_stroke:null,_fill:null,constructor:function(json){if(json&&_8.isObject(json)){_8.mixin(this,json);if(this.color&&esri._isDefined(this.color[0])){this.color=esri.symbol.toDojoColor(this.color);}var type=this.type;if(type&&type.indexOf("esri")===0){this.type={"esriSMS":"simplemarkersymbol","esriPMS":"picturemarkersymbol","esriSLS":"simplelinesymbol","esriCLS":"cartographiclinesymbol","esriSFS":"simplefillsymbol","esriPFS":"picturefillsymbol","esriTS":"textsymbol"}[type];}}},setColor:function(_201){this.color=_201;return this;},toJson:function(){return {color:esri.symbol.toJsonColor(this.color)};}});_8.declare("esri.symbol.MarkerSymbol",esri.symbol.Symbol,{constructor:function(json){if(json&&_8.isObject(json)){this.size=_a.gfx.pt2px(this.size);this.xoffset=_a.gfx.pt2px(this.xoffset);this.yoffset=_a.gfx.pt2px(this.yoffset);}},setAngle:function(_202){this.angle=_202;return this;},setSize:function(size){this.size=size;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},toJson:function(){var size=_a.gfx.px2pt(this.size);size=isNaN(size)?undefined:size;var xoff=_a.gfx.px2pt(this.xoffset);xoff=isNaN(xoff)?undefined:xoff;var yoff=_a.gfx.px2pt(this.yoffset);yoff=isNaN(yoff)?undefined:yoff;return _8.mixin(this.inherited("toJson",arguments),{size:size,angle:this.angle,xoffset:xoff,yoffset:yoff});},angle:0,xoffset:0,yoffset:0,size:12});_8.declare("esri.symbol.SimpleMarkerSymbol",esri.symbol.MarkerSymbol,{constructor:function(json,size,_203,_204){if(json){if(_8.isString(json)){this.style=json;if(size){this.size=size;}if(_203){this.outline=_203;}if(_204){this.color=_204;}}else{this.style=esri.valueOf(this._styles,this.style);if(json.outline){this.outline=new esri.symbol.SimpleLineSymbol(json.outline);}}}else{_8.mixin(this,esri.symbol.defaultSimpleMarkerSymbol);this.size=_a.gfx.pt2px(this.size);this.outline=new esri.symbol.SimpleLineSymbol(this.outline);this.color=new _8.Color(this.color);}if(!this.style){this.style=esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE;}},type:"simplemarkersymbol",setStyle:function(_205){this.style=_205;return this;},setOutline:function(_206){this.outline=_206;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){return this.color;},_setDim:function(_207,_208,_209){this._targetWidth=_207;this._targetHeight=_208;this._spikeSize=_209;},toJson:function(){var json=_8.mixin(this.inherited("toJson",arguments),{type:"esriSMS",style:this._styles[this.style]}),_20a=this.outline;if(_20a){json.outline=_20a.toJson();}return esri._sanitize(json);},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond"}});_8.mixin(esri.symbol.SimpleMarkerSymbol,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_TARGET:"target"});_8.declare("esri.symbol.PictureMarkerSymbol",esri.symbol.MarkerSymbol,{constructor:function(json,_20b,_20c){if(json){if(_8.isString(json)){this.url=json;if(_20b){this.width=_20b;}if(_20c){this.height=_20c;}}else{this.width=_a.gfx.pt2px(json.width);this.height=_a.gfx.pt2px(json.height);var _20d=json.imageData;if((!esri.vml)&&_20d){var temp=this.url;this.url="data:"+(json.contentType||"image")+";base64,"+_20d;this.imageData=temp;}}}else{_8.mixin(this,esri.symbol.defaultPictureMarkerSymbol);this.width=_a.gfx.pt2px(this.width);this.height=_a.gfx.pt2px(this.height);}},type:"picturemarkersymbol",getStroke:function(){return null;},getFill:function(){return null;},setWidth:function(_20e){this.width=_20e;return this;},setHeight:function(_20f){this.height=_20f;return this;},setUrl:function(url){if(url!==this.url){delete this.imageData;delete this.contentType;}this.url=url;return this;},toJson:function(){var url=this.url,_210=this.imageData;if(url.indexOf("data:")===0){var temp=url;url=_210;var _211=temp.indexOf(";base64,")+8;_210=temp.substr(_211);}url=esri._getAbsoluteUrl(url);var _212=_a.gfx.px2pt(this.width);_212=isNaN(_212)?undefined:_212;var _213=_a.gfx.px2pt(this.height);_213=isNaN(_213)?undefined:_213;var _214=esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriPMS",url:url,imageData:_210,contentType:this.contentType,width:_212,height:_213}));delete _214.color;delete _214.size;return _214;}});_8.declare("esri.symbol.LineSymbol",esri.symbol.Symbol,{constructor:function(json){if(_8.isObject(json)){this.width=_a.gfx.pt2px(this.width);}else{this.width=12;}},setWidth:function(_215){this.width=_215;return this;},toJson:function(){var _216=_a.gfx.px2pt(this.width);_216=isNaN(_216)?undefined:_216;return _8.mixin(this.inherited("toJson",arguments),{width:_216});}});_8.declare("esri.symbol.SimpleLineSymbol",esri.symbol.LineSymbol,{constructor:function(json,_217,_218){if(json){if(_8.isString(json)){this.style=json;if(_217){this.color=_217;}if(_218){this.width=_218;}}else{this.style=esri.valueOf(this._styles,json.style)||esri.symbol.SimpleLineSymbol.STYLE_SOLID;}}else{_8.mixin(this,esri.symbol.defaultSimpleLineSymbol);this.color=new _8.Color(this.color);this.width=_a.gfx.pt2px(this.width);}},type:"simplelinesymbol",setStyle:function(_219){this.style=_219;return this;},getStroke:function(){return (this.style===esri.symbol.SimpleLineSymbol.STYLE_NULL||this.width===0)?null:{color:this.color,style:this.style,width:this.width};},getFill:function(){return null;},toJson:function(){return esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriSLS",style:this._styles[this.style]}));},_styles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot",dashdot:"esriSLSDashDot",longdashdotdot:"esriSLSDashDotDot",none:"esriSLSNull",insideframe:"esriSLSInsideFrame"}});_8.mixin(esri.symbol.SimpleLineSymbol,{STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none"});_8.declare("esri.symbol.CartographicLineSymbol",esri.symbol.SimpleLineSymbol,{constructor:function(json,_21a,_21b,cap,join,_21c){if(json){if(_8.isString(json)){this.style=json;if(_21a){this.color=_21a;}if(_21b!==undefined){this.width=_21b;}if(cap){this.cap=cap;}if(join){this.join=join;}if(_21c!==undefined){this.miterLimit=_21c;}}else{this.cap=esri.valueOf(this._caps,json.cap);this.join=esri.valueOf(this._joins,json.join);this.width=_a.gfx.pt2px(json.width);this.miterLimit=_a.gfx.pt2px(json.miterLimit);}}else{_8.mixin(this,esri.symbol.defaultCartographicLineSymbol);this.color=new _8.Color(this.color);this.width=_a.gfx.pt2px(this.width);this.miterLimit=_a.gfx.pt2px(this.miterLimit);}},type:"cartographiclinesymbol",setCap:function(cap){this.cap=cap;return this;},setJoin:function(join){this.join=join;return this;},setMiterLimit:function(_21d){this.miterLimit=_21d;return this;},getStroke:function(){return _8.mixin(this.inherited("getStroke",arguments),{cap:this.cap,join:(this.join===esri.symbol.CartographicLineSymbol.JOIN_MITER?this.miterLimit:this.join)});},getFill:function(){return null;},toJson:function(){var _21e=_a.gfx.px2pt(this.miterLimit);_21e=isNaN(_21e)?undefined:_21e;return esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriCLS",cap:this._caps[this.cap],join:this._joins[this.join],miterLimit:_21e}));},_caps:{butt:"esriLCSButt",round:"esriLCSRound",square:"esriLCSSquare"},_joins:{miter:"esriLJSMiter",round:"esriLJSRound",bevel:"esriLJSBevel"}});_8.mixin(esri.symbol.CartographicLineSymbol,{STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dashdot",STYLE_DASHDOTDOT:"longdashdotdot",STYLE_NULL:"none",STYLE_INSIDE_FRAME:"insideframe",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"});_8.declare("esri.symbol.FillSymbol",esri.symbol.Symbol,{constructor:function(json){if(json&&_8.isObject(json)&&json.outline){this.outline=new esri.symbol.SimpleLineSymbol(json.outline);}},setOutline:function(_21f){this.outline=_21f;return this;},toJson:function(){var json=this.inherited("toJson",arguments);if(this.outline){json.outline=this.outline.toJson();}return json;}});_8.declare("esri.symbol.SimpleFillSymbol",esri.symbol.FillSymbol,{constructor:function(json,_220,_221){if(json){if(_8.isString(json)){this.style=json;if(_220!==undefined){this.outline=_220;}if(_221!==undefined){this.color=_221;}}else{this.style=esri.valueOf(this._styles,json.style);}}else{_8.mixin(this,esri.symbol.defaultSimpleFillSymbol);this.outline=new esri.symbol.SimpleLineSymbol(this.outline);this.color=new _8.Color(this.color);}var _222=this.style;if(_222!=="solid"&&_222!=="none"){this._src=_8.moduleUrl("esri","../../images/symbol/sfs/"+_222+".png").toString();}},type:"simplefillsymbol",setStyle:function(_223){this.style=_223;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){var _224=this.style;if(_224===esri.symbol.SimpleFillSymbol.STYLE_NULL){return null;}else{if(_224===esri.symbol.SimpleFillSymbol.STYLE_SOLID){return this.color;}else{return _8.mixin(_8.mixin({},_a.gfx.defaultPattern),{src:this._src,width:10,height:10});}}},toJson:function(){return esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriSFS",style:this._styles[this.style]}));},_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical",forwarddiagonal:"esriSFSForwardDiagonal",backwarddiagonal:"esriSFSBackwardDiagonal",cross:"esriSFSCross",diagonalcross:"esriSFSDiagonalCross"}});_8.mixin(esri.symbol.SimpleFillSymbol,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forwarddiagonal",STYLE_BACKWARD_DIAGONAL:"backwarddiagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonalcross",STYLE_FORWARDDIAGONAL:"forwarddiagonal",STYLE_BACKWARDDIAGONAL:"backwarddiagonal",STYLE_DIAGONALCROSS:"diagonalcross"});_8.declare("esri.symbol.PictureFillSymbol",esri.symbol.FillSymbol,{constructor:function(json,_225,_226,_227){if(json){if(_8.isString(json)){this.url=json;if(_225!==undefined){this.outline=_225;}if(_226!==undefined){this.width=_226;}if(_227!==undefined){this.height=_227;}}else{this.xoffset=_a.gfx.pt2px(json.xoffset);this.yoffset=_a.gfx.pt2px(json.yoffset);this.width=_a.gfx.pt2px(json.width);this.height=_a.gfx.pt2px(json.height);var _228=json.imageData;if((!esri.vml)&&_228){var temp=this.url;this.url="data:"+(json.contentType||"image")+";base64,"+_228;this.imageData=temp;}}}else{_8.mixin(this,esri.symbol.defaultPictureFillSymbol);this.width=_a.gfx.pt2px(this.width);this.height=_a.gfx.pt2px(this.height);}},type:"picturefillsymbol",xscale:1,yscale:1,xoffset:0,yoffset:0,setWidth:function(_229){this.width=_229;return this;},setHeight:function(_22a){this.height=_22a;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},setUrl:function(url){if(url!==this.url){delete this.imageData;delete this.contentType;}this.url=url;return this;},setXScale:function(_22b){this.xscale=_22b;return this;},setYScale:function(_22c){this.yscale=_22c;return this;},getStroke:function(){return this.outline&&this.outline.getStroke();},getFill:function(){return _8.mixin({},_a.gfx.defaultPattern,{src:this.url,width:(this.width*this.xscale),height:(this.height*this.yscale),x:this.xoffset,y:this.yoffset});},toJson:function(){var url=this.url,_22d=this.imageData;if(url.indexOf("data:")===0){var temp=url;url=_22d;var _22e=temp.indexOf(";base64,")+8;_22d=temp.substr(_22e);}url=esri._getAbsoluteUrl(url);var _22f=_a.gfx.px2pt(this.width);_22f=isNaN(_22f)?undefined:_22f;var _230=_a.gfx.px2pt(this.height);_230=isNaN(_230)?undefined:_230;var xoff=_a.gfx.px2pt(this.xoffset);xoff=isNaN(xoff)?undefined:xoff;var yoff=_a.gfx.px2pt(this.yoffset);yoff=isNaN(yoff)?undefined:yoff;return esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriPFS",url:url,imageData:_22d,contentType:this.contentType,width:_22f,height:_230,xoffset:xoff,yoffset:yoff,xscale:this.xscale,yscale:this.yscale}));}});_8.declare("esri.symbol.Font",null,{constructor:function(json,_231,_232,_233,_234){if(json){if(_8.isObject(json)){_8.mixin(this,json);}else{this.size=json;if(_231!==undefined){this.style=_231;}if(_232!==undefined){this.variant=_232;}if(_233!==undefined){this.weight=_233;}if(_234!==undefined){this.family=_234;}}}else{_8.mixin(this,_a.gfx.defaultFont);}},setSize:function(size){this.size=size;return this;},setStyle:function(_235){this.style=_235;return this;},setVariant:function(_236){this.variant=_236;return this;},setWeight:function(_237){this.weight=_237;return this;},setFamily:function(_238){this.family=_238;return this;},toJson:function(){return esri._sanitize({size:this.size,style:this.style,variant:this.variant,decoration:this.decoration,weight:this.weight,family:this.family});}});_8.mixin(esri.symbol.Font,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",VARIANT_NORMAL:"normal",VARIANT_SMALLCAPS:"small-caps",WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});_8.declare("esri.symbol.TextSymbol",esri.symbol.Symbol,{constructor:function(json,font,_239){_8.mixin(this,esri.symbol.defaultTextSymbol);this.font=new esri.symbol.Font(this.font);this.color=new _8.Color(this.color);if(json){if(_8.isObject(json)){_8.mixin(this,json);if(this.color&&esri._isDefined(this.color[0])){this.color=esri.symbol.toDojoColor(this.color);}this.type="textsymbol";this.font=new esri.symbol.Font(this.font);this.xoffset=_a.gfx.pt2px(this.xoffset);this.yoffset=_a.gfx.pt2px(this.yoffset);}else{this.text=json;if(font){this.font=font;}if(_239){this.color=_239;}}}},angle:0,xoffset:0,yoffset:0,setFont:function(font){this.font=font;return this;},setAngle:function(_23a){this.angle=_23a;return this;},setOffset:function(x,y){this.xoffset=x;this.yoffset=y;return this;},setAlign:function(_23b){this.align=_23b;return this;},setDecoration:function(_23c){this.decoration=_23c;return this;},setRotated:function(_23d){this.rotated=_23d;return this;},setKerning:function(_23e){this.kerning=_23e;return this;},setText:function(text){this.text=text;return this;},getStroke:function(){return null;},getFill:function(){return this.color;},toJson:function(){var xoff=_a.gfx.px2pt(this.xoffset);xoff=isNaN(xoff)?undefined:xoff;var yoff=_a.gfx.px2pt(this.yoffset);yoff=isNaN(yoff)?undefined:yoff;return esri._sanitize(_8.mixin(this.inherited("toJson",arguments),{type:"esriTS",backgroundColor:this.backgroundColor,borderLineColor:this.borderLineColor,verticalAlignment:this.verticalAlignment,horizontalAlignment:this.horizontalAlignment,rightToLeft:this.rightToLeft,width:this.width,angle:this.angle,xoffset:xoff,yoffset:yoff,text:this.text,align:this.align,decoration:this.decoration,rotated:this.rotated,kerning:this.kerning,font:this.font.toJson()}));}});_8.mixin(esri.symbol.TextSymbol,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});_8.mixin(esri.symbol,{defaultSimpleLineSymbol:{color:[0,0,0,1],style:esri.symbol.SimpleLineSymbol.STYLE_SOLID,width:1},defaultSimpleMarkerSymbol:{style:esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE,color:[255,255,255,0.25],outline:esri.symbol.defaultSimpleLineSymbol,size:12,angle:0,xoffset:0,yoffset:0},defaultPictureMarkerSymbol:{url:"",width:12,height:12,angle:0,xoffset:0,yoffset:0},defaultCartographicLineSymbol:{color:[0,0,0,1],style:esri.symbol.CartographicLineSymbol.STYLE_SOLID,width:1,cap:esri.symbol.CartographicLineSymbol.CAP_BUTT,join:esri.symbol.CartographicLineSymbol.JOIN_MITER,miterLimit:10},defaultSimpleFillSymbol:{style:esri.symbol.SimpleFillSymbol.STYLE_SOLID,color:[0,0,0,0.25],outline:esri.symbol.defaultSimpleLineSymbol},defaultPictureFillSymbol:{xoffset:0,yoffset:0,width:12,height:12},defaultTextSymbol:{color:[0,0,0,1],font:_a.gfx.defaultFont,angle:0,xoffset:0,yoffset:0},getShapeDescriptors:function(_23f){var _240,fill,_241;var type=_23f.type;switch(type){case "simplemarkersymbol":var _242=_23f.style,SMS=esri.symbol.SimpleMarkerSymbol;var size=_23f.size||_a.gfx.pt2px(esri.symbol.defaultSimpleMarkerSymbol.size),cx=0,cy=0,half=size/2;var left=cx-half,_243=cx+half,top=cy-half,_244=cy+half;switch(_242){case SMS.STYLE_CIRCLE:_240={type:"circle",cx:cx,cy:cy,r:half};fill=_23f.getFill();_241=_23f.getStroke();if(_241){_241.style=_241.style||"Solid";}break;case SMS.STYLE_CROSS:_240={type:"path",path:"M "+left+",0 L "+_243+",0 M 0,"+top+" L 0,"+_244+" E"};fill=null;_241=_23f.getStroke();break;case SMS.STYLE_DIAMOND:_240={type:"path",path:"M "+left+",0 L 0,"+top+" L "+_243+",0 L 0,"+_244+" L "+left+",0 E"};fill=_23f.getFill();_241=_23f.getStroke();break;case SMS.STYLE_SQUARE:_240={type:"path",path:"M "+left+","+_244+" L "+left+","+top+" L "+_243+","+top+" L "+_243+","+_244+" L "+left+","+_244+" E"};fill=_23f.getFill();_241=_23f.getStroke();break;case SMS.STYLE_X:_240={type:"path",path:"M "+left+","+_244+" L "+_243+","+top+" M "+left+","+top+" L "+_243+","+_244+" E"};fill=null;_241=_23f.getStroke();break;}break;case "picturemarkersymbol":_240={type:"image",x:0,y:0,width:16,height:16,src:""};_240.x=_240.x-Math.round(_23f.width/2);_240.y=_240.y-Math.round(_23f.height/2);_240.width=_23f.width;_240.height=_23f.height;_240.src=_23f.url;break;case "simplelinesymbol":case "cartographiclinesymbol":_240={type:"path",path:"M -15,0 L 15,0 E"};fill=null;_241=_23f.getStroke();break;case "simplefillsymbol":case "picturefillsymbol":_240={type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 E"};fill=_23f.getFill();_241=_23f.getStroke();break;}return {defaultShape:_240,fill:fill,stroke:_241};}});_8.mixin(esri.symbol.defaultTextSymbol,_a.gfx.defaultText,{type:"textsymbol",align:"middle"});}if(!_8._hasResource["esri.graphic"]){_8._hasResource["esri.graphic"]=true;_8.provide("esri.graphic");_8.declare("esri.Graphic",null,{constructor:function(json,_245,_246,_247){if(json&&!(json instanceof esri.geometry.Geometry)){this.geometry=json.geometry?esri.geometry.fromJson(json.geometry):null;this.symbol=json.symbol?esri.symbol.fromJson(json.symbol):null;this.attributes=json.attributes||null;this.infoTemplate=json.infoTemplate?new esri.InfoTemplate(json.infoTemplate):null;}else{this.geometry=json;this.symbol=_245;this.attributes=_246;this.infoTemplate=_247;}},_shape:null,_graphicsLayer:null,_visible:true,visible:true,getDojoShape:function(){return this._shape;},getLayer:function(){return this._graphicsLayer;},setGeometry:function(_248){this.geometry=_248;var gl=this._graphicsLayer;if(gl){gl._updateExtent(this);gl._draw(this,true);}return this;},setSymbol:function(_249,_24a){var gl=this._graphicsLayer,_24b=this._shape;this.symbol=_249;if(_249){this.symbol._stroke=this.symbol._fill=null;}if(gl){if(_24a){if(_24b){gl._removeShape(this);}gl._draw(this,true);return this;}if(!this.geometry){return this;}var type=this.geometry.type;if(type==="point"||type==="multipoint"){gl._draw(this,true);}else{if(_24b){gl._symbolizeShape(this);}}}return this;},setAttributes:function(_24c){this.attributes=_24c;return this;},setInfoTemplate:function(_24d){this.infoTemplate=_24d;return this;},_getEffInfoTemplate:function(){var _24e=this.getLayer();return this.infoTemplate||(_24e&&_24e.infoTemplate);},getTitle:function(){var _24f=this._getEffInfoTemplate();var _250=_24f&&_24f.title;if(_8.isFunction(_250)){_250=_250.call(_24f,this);}else{if(_8.isString(_250)){var _251=this._graphicsLayer;var func=_251&&_251._getDateOpts;_250=esri.substitute(this.attributes,_250,{first:true,dateFormat:func&&func.call(_251)});}}return _250;},getContent:function(){var _252=this._getEffInfoTemplate();var _253=_252&&_252.content;if(_8.isFunction(_253)){_253=_253.call(_252,this);}else{if(_8.isString(_253)){var _254=this._graphicsLayer;var func=_254&&_254._getDateOpts;_253=esri.substitute(this.attributes,_253,{dateFormat:func&&func.call(_254)});}}return _253;},show:function(){this.visible=this._visible=true;if(this._shape){var _255=this._shape.getEventSource();if(_255){esri.show(_255);}}else{if(this._graphicsLayer){this._graphicsLayer._draw(this,true);}}return this;},hide:function(){this.visible=this._visible=false;var _256=this._shape;if(_256){var _257=_256.getEventSource();if(_257){esri.hide(_257);}else{var _258=this._graphicsLayer;if(_258){_258._removeShape(this);}}}return this;},toJson:function(){var json={};if(this.geometry){json.geometry=this.geometry.toJson();}if(this.attributes){json.attributes=_8.mixin({},this.attributes);}if(this.symbol){json.symbol=this.symbol.toJson();}if(this.infoTemplate){json.infoTemplate=this.infoTemplate.toJson();}return json;}});_8.declare("esri.InfoTemplate",null,{constructor:function(_259,_25a){if(_259&&_8.isObject(_259)&&!_8.isFunction(_259)){_8.mixin(this,_259);}else{this.title=_259||"${*}";this.content=_25a||"${*}";}},setTitle:function(_25b){this.title=_25b;return this;},setContent:function(_25c){this.content=_25c;return this;},toJson:function(){return esri._sanitize({title:this.title,content:this.content});}});}if(!_8._hasResource["esri.utils"]){_8._hasResource["esri.utils"]=true;_8.provide("esri.utils");_8.addOnLoad(function(){esri.bundle=_8.i18n.getLocalization("esri","jsapi");});esri.show=function(node){node.style.display="block";};esri.hide=function(node){node.style.display="none";};esri.toggle=function(node){node.style.display=node.style.display==="none"?"block":"none";};esri.valueOf=function(_25d,_25e){var i;for(i in _25d){if(_25d[i]==_25e){return i;}}return null;};esri.substitute=(function(){var _25f="${*}",_260=["NumberFormat","DateString","DateFormat"];function _261(_262){return esri._isDefined(_262)?_262:"";};function exec(key,data,_263){var _264=_263.match(/([^\(]+)(\([^\)]+\))?/i);var _265=_8.trim(_264[1]);var args=_8.fromJson((_264[2]?_8.trim(_264[2]):"()").replace(/^\(/,"({").replace(/\)$/,"})"));var _266=data[key];if(_8.indexOf(_260,_265)===-1){var ref=_8.getObject(_265);if(_8.isFunction(ref)){_266=ref(_266,key,data);}}else{if(typeof _266==="number"||(typeof _266==="string"&&_266&&!isNaN(Number(_266)))){_266=Number(_266);switch(_265){case "NumberFormat":if(_8.getObject("dojo.number.format")){return _8.number.format(_266,args);}break;case "DateString":var _267=new Date(_266);if(args.local||args.systemLocale){if(args.systemLocale){return _267.toLocaleDateString()+(args.hideTime?"":(" "+_267.toLocaleTimeString()));}else{return _267.toDateString()+(args.hideTime?"":(" "+_267.toTimeString()));}}else{_267=_267.toUTCString();if(args.hideTime){_267=_267.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,"");}return _267;}break;case "DateFormat":if(_8.getObject("dojo.date.locale.format")){return _8.date.locale.format(new Date(_266),args);}break;}}}return _261(_266);};return function(data,_268,_269){var _26a,_26b,_26c;if(esri._isDefined(_269)){if(_8.isObject(_269)){_26a=_269.first;_26b=_269.dateFormat;_26c=_269.numberFormat;}else{_26a=_269;}}if(!_268||_268===_25f){var s=[],val,i;for(i in data){val=data[i];if(_26b&&_8.indexOf(_26b.properties||"",i)!==-1){val=exec(i,data,_26b.formatter||"DateString");}else{if(_26c&&_8.indexOf(_26c.properties||"",i)!==-1){val=exec(i,data,_26c.formatter||"NumberFormat");}}s.push(i+" = "+_261(val)+"<br/>");if(_26a){break;}}return s.join("");}else{return _8.replace(_268,_8.hitch({obj:data},function(_26d,key){var _26e=key.split(":");if(_26e.length>1){key=_26e[0];_26e.shift();return exec(key,this.obj,_26e.join(":"));}else{if(_26b&&_8.indexOf(_26b.properties||"",key)!==-1){return exec(key,this.obj,_26b.formatter||"DateString");}if(_26c&&_8.indexOf(_26c.properties||"",key)!==-1){return exec(key,this.obj,_26c.formatter||"NumberFormat");}}return _261(this.obj[key]);}),/\$\{([^\}]+)\}/g);}};}());esri.documentBox=_8.isIE?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight};esri.urlToObject=function(url){var iq=url.indexOf("?");if(iq===-1){return {path:url,query:null};}else{return {path:url.substring(0,iq),query:_8.queryToObject(url.substring(iq+1))};}};esri._getProxyUrl=function(_26f){var _270=esri.config.defaults.io.proxyUrl,_271,_272,_273;if(!_270){console.log(esri.bundle.io.proxyNotSet);throw new Error(esri.bundle.io.proxyNotSet);}if(_26f&&window.location.href.toLowerCase().indexOf("https:")!==0){_272=_270;if(_272.toLowerCase().indexOf("http")!==0){_272=esri._getAbsoluteUrl(_272);}_272=_272.replace(/^http:/i,"https:");if(esri._canDoXOXHR(_272)){_270=_272;_273=1;}}_271=esri.urlToObject(_270);_271._xo=_273;return _271;};esri._getProxiedUrl=function(url){if(esri.config.defaults.io.alwaysUseProxy){var _274=esri._getProxyUrl(),_275=esri.urlToObject(url);url=_274.path+"?"+_275.path;var _276=_8.objectToQuery(_8.mixin(_274.query||{},_275.query));if(_276){url+=("?"+_276);}}return url;};esri._hasSameOrigin=function(url1,url2,_277){url1=url1.toLowerCase();url2=url2.toLowerCase();var _278=window.location.href.toLowerCase();url1=url1.indexOf("http")===0?new _8._Url(url1):(_278=new _8._Url(_278));url2=url2.indexOf("http")===0?new _8._Url(url2):(_8.isString(_278)?new _8._Url(_278):_278);return ((_277||(url1.scheme===url2.scheme))&&url1.host===url2.host&&url1.port===url2.port);};esri._canDoXOXHR=function(url){var _279=false,_27a=esri._hasSameOrigin,_27b=esri.config.defaults.io.corsEnabledServers,_27c;if(esri._hasCors&&_27b&&_27b.length){_279=_8.some(_27b,function(_27d){_27c=(_8.trim(_27d).toLowerCase().indexOf("http")!==0);return _27a(url,_27c?("http://"+_27d):_27d)||(_27c&&_27a(url,"https://"+_27d));});}return _279;};esri.request=function(req,_27e){var dfd,form=req.form,_27f=form&&_8.some(form.elements,function(el){return el.type==="file";}),_280=(req.url.toLowerCase().indexOf("token=")!==-1||(req.content&&req.content.token)||(_27f&&_8.some(form.elements,function(el){return el.name==="token";})))?1:0;if(req._usrDfd){dfd=req._usrDfd;}else{dfd=new _8.Deferred(esri._dfdCanceller);var ld=req.load,_281=req.error;if(ld){dfd.addCallback(function(_282){var _283=dfd._pendingDfd,_284=_283&&_283.ioArgs,args=_284&&_284.args;return ld.call(args,_282,_284);});}if(_281){dfd.addErrback(function(_285){var _286=dfd._pendingDfd,_287=_286&&_286.ioArgs,args=_287&&_287.args;return _281.call(args,_285,_287);});}}var _288=_27e&&_27e.disableIdentityLookup;if(esri.id&&!_280&&!req._token&&!esri.id._isPublic(req.url)&&!_288&&esri.id.findServerInfo(req.url)){dfd._pendingDfd=esri.id.getCredential(req.url);dfd._pendingDfd.addCallback(function(_289){req._token=_289.token;req._usrDfd=dfd;esri.request(req,_27e);}).addErrback(function(_28a){req._usrDfd=null;dfd.errback(_28a);dfd._pendingDfd=null;});}else{dfd._pendingDfd=esri._request(req,_27e,_27f);if(!dfd._pendingDfd){dfd.ioArgs=dfd._pendingDfd&&dfd._pendingDfd.ioArgs;var err=new Error("Deferred object is missing");err.log=_8.config.isDebug;req._usrDfd=null;dfd.errback(err);dfd._pendingDfd=null;return dfd;}dfd._pendingDfd.addCallback(function(_28b){dfd.ioArgs=dfd._pendingDfd&&dfd._pendingDfd.ioArgs;req._usrDfd=null;dfd.callback(_28b);dfd._pendingDfd=null;}).addErrback(function(_28c){if(esri.id&&_8.indexOf(esri.id._errorCodes,_28c.code)!==-1&&!esri.id._isPublic(req.url)&&!_288){dfd._pendingDfd=esri.id.getCredential(req.url,req._token);dfd._pendingDfd.addCallback(function(_28d){req._token=_28d.token;req._usrDfd=dfd;esri.request(req,_27e);}).addErrback(function(_28e){req._usrDfd=null;dfd.errback(_28e);dfd._pendingDfd=null;});return;}dfd.ioArgs=dfd._pendingDfd&&dfd._pendingDfd.ioArgs;req._usrDfd=null;dfd.errback(_28c);dfd._pendingDfd=null;});}return dfd;};esri._request=function(req,_28f,_290){var _291=false,_292=false;if(esri._isDefined(_28f)){if(_8.isObject(_28f)){_291=!!_28f.useProxy;_292=!!_28f.usePost;}else{_291=!!_28f;}}req=_8.mixin({},req);var _293=req.content,path=req.url,form=_290&&req.form,_294=esri.config.defaults.io;req.load=function(_295){var err;if(_295&&_295.error){err=_8.mixin(new Error(),_295.error);err.log=_8.config.isDebug;}return err||_295;};req.error=function(_296,io){if(io&&io.xhr){io.xhr.abort();}if(!(_296 instanceof Error)){_296=_8.mixin(new Error(),_296);}_296.log=_8.config.isDebug;_294.errorHandler(_296,io);return _296;};if(req._token){req.content=req.content||{};req.content.token=req._token;}var len=0;if(_293&&path){len=_8.objectToQuery(_293).length+path.length+1;}req.timeout=esri._isDefined(req.timeout)?req.timeout:_294.timeout;req.handleAs=req.handleAs||"json";try{var _297,_298,_299=esri._reqPreCallback,_29a,_29b=(_292||_290||len>_294.postLength)?true:false,_29c=(req.handleAs.indexOf("json")!==-1&&req.callbackParamName&&!_290)?true:false,_29d=(_294.alwaysUseProxy||_291||((!_29c||_29b)&&!esri._hasSameOrigin(req.url,window.location.href)&&!(_29a=esri._canDoXOXHR(req.url))))?true:false;if(_290&&!esri._hasFileUpload&&!_29d&&_29a){_29d=true;}if(_29d){_297=esri._getProxyUrl(_8.trim(path).toLowerCase().indexOf("https:")===0);_298=_297.path;if(_297._xo){_29a=true;}if(!_29b&&(_298.length+1+len)>_294.postLength){_29b=true;}req.url=_298+"?"+path;if(_29b){req.content=_8.mixin(_297.query||{},_293);}else{var _29e=_8.objectToQuery(_8.mixin(_297.query||{},_293));if(_29e){req.url+=("?"+_29e);}req.content=null;}}if(_29c&&!_29b){if(!esri._isDefined(req.isAsync)&&_8.isFF<4){req.isAsync=true;}return _8.io.script.get(_299?_299(req):req);}else{var hdrs=req.headers;if(_29a&&(!hdrs||!hdrs.hasOwnProperty("X-Requested-With"))){hdrs=req.headers=(hdrs||{});hdrs["X-Requested-With"]=null;}if(_290){var _29f=req.callbackParamName||"callback.html",_2a0=req.callbackElementName||"textarea",_2a1,_2a2,_2a3,i,il=form.elements.length,el;_293=req.content;if(_293){for(_2a1 in _293){_2a3=_293[_2a1];if(esri._isDefined(_2a3)){_2a2=null;for(i=0;i<il;i++){el=form.elements[i];if(el.name===_2a1){_2a2=el;break;}}if(_2a2){_2a2.value=_2a3;}else{form.appendChild(_8.create("input",{type:"hidden",name:_2a1,value:_2a3}));}}}}if(esri._hasFileUpload){_8.forEach(form.elements,function(el){if(el.name===_29f){form.removeChild(el);}});req.contentType=false;req.postData=new FormData(form);delete req.form;}else{form.enctype="multipart/form-data";if(_8.isIE<9){form.encoding="multipart/form-data";}form.method="post";if(!_8.some(form.elements,function(el){return el.name===_29f;})){form.appendChild(_8.create("input",{type:"hidden",name:_29f,value:_2a0}));}if(path.toLowerCase().indexOf("addattachment")!==-1||path.toLowerCase().indexOf("updateattachment")!==-1){req.url=path+((path.indexOf("?")===-1)?"?":"&")+_29f+"="+_2a0;if(_29d){req.url=_298+"?"+req.url;}}delete req.content;}}req=_299?_299(req):req;if(_29b){if(_290&&!esri._hasFileUpload){return _8.io.iframe.send(req);}else{return _8.rawXhrPost(req);}}else{return _8.xhrGet(req);}}}catch(e){var dfd=new _8.Deferred();dfd.errback(req.error(e));return dfd;}};esri.setRequestPreCallback=function(_2a4){esri._reqPreCallback=_2a4;};esri._getParts=function(arr,obj,cb){return [_8.isString(arr)?arr.split(""):arr,obj||_8.global,_8.isString(cb)?new Function("item","index","array",cb):cb];};esri.filter=function(arr,_2a5,_2a6){var _2a7=esri._getParts(arr,_2a6,_2a5),_2a8={},i;arr=_2a7[0];for(i in arr){if(_2a7[2].call(_2a7[i],arr[i],i,arr)){_2a8[i]=arr[i];}}return _2a8;};esri.TileUtils=(function(){function _2a9(map,ti,_2aa){var wd=map.width,ht=map.height,ew=_2aa.xmax-_2aa.xmin,eh=_2aa.ymax-_2aa.ymin,ed=-1,lods=ti.lods,i,il=lods.length,abs=Math.abs,lod,cl,ced;for(i=0;i<il;i++){cl=lods[i];ced=ew>eh?abs(eh-(ht*cl.resolution)):abs(ew-(wd*cl.resolution));if(ed<0||ced<=ed){lod=cl;ed=ced;}else{break;}}return lod;};function _2ab(map,_2ac,lod){var res=lod.resolution,cx=(_2ac.xmin+_2ac.xmax)/2,cy=(_2ac.ymin+_2ac.ymax)/2,_2ad=(map.width/2)*res,_2ae=(map.height/2)*res;return new esri.geometry.Extent(cx-(_2ad),cy-(_2ae),cx+(_2ad),cy+(_2ae),_2ac.spatialReference);};function _2af(map,ti,_2b0,lod){var res=lod.resolution,tw=ti.width,th=ti.height,to=ti.origin,mv=map.__visibleDelta,_2b1=Math.floor,tmw=tw*res,tmh=th*res,tr=_2b1((to.y-_2b0.y)/tmh),tc=_2b1((_2b0.x-to.x)/tmw),tmox=to.x+(tc*tmw),tmoy=to.y-(tr*tmh),oX=_2b1(Math.abs((_2b0.x-tmox)*tw/tmw))+mv.x,oY=_2b1(Math.abs((_2b0.y-tmoy)*th/tmh))+mv.y;return {point:_2b0,coords:{row:tr,col:tc},offsets:{x:oX,y:oY}};};return {_addFrameInfo:function(_2b2,_2b3){var _2b4,_2b5,_2b6=2*_2b3.origin[1],m180=_2b3.origin[0],_2b7=_2b2.origin.x,_2b8=_2b2.width,_2b9;_8.forEach(_2b2.lods,function(lod){_2b4=Math.round(_2b6/lod.resolution);_2b5=Math.ceil(_2b4/_2b8);_2b9=Math.floor((m180-_2b7)/(_2b8*lod.resolution));if(!lod._frameInfo){lod._frameInfo=[_2b5,_2b9,_2b9+_2b5-1,_2b4];}});},getContainingTileCoords:function(ti,_2ba,lod){var to=ti.origin,res=lod.resolution,tmw=ti.width*res,tmh=ti.height*res,tc=Math.floor((_2ba.x-to.x)/tmw),tr=Math.floor((to.y-_2ba.y)/tmh);return {row:tr,col:tc};},getCandidateTileInfo:function(map,ti,_2bb){var lod=_2a9(map,ti,_2bb),adj=_2ab(map,_2bb,lod),ct=_2af(map,ti,new esri.geometry.Point(adj.xmin,adj.ymax,_2bb.spatialReference),lod);return {tile:ct,lod:lod,extent:adj};},getTileExtent:function(ti,_2bc,row,col){var to=ti.origin,lod=ti.lods[_2bc],res=lod.resolution,tw=ti.width,th=ti.height;return new esri.geometry.Extent(((col*res)*tw)+to.x,to.y-((row+1)*res)*th,(((col+1)*res)*tw)+to.x,to.y-((row*res)*th),ti.spatialReference);}};}());esri.graphicsExtent=function(_2bd){var g=_2bd[0].geometry,_2be=g.getExtent(),ext,i,il=_2bd.length;if(_2be===null){_2be=new esri.geometry.Extent(g.x,g.y,g.x,g.y,g.spatialReference);}for(i=1;i<il;i++){ext=(g=_2bd[i].geometry).getExtent();if(ext===null){ext=new esri.geometry.Extent(g.x,g.y,g.x,g.y,g.spatialReference);}_2be=_2be.union(ext);}if(_2be.getWidth()<=0&&_2be.getHeight()<=0){return null;}return _2be;};esri.getGeometries=function(_2bf){return _8.map(_2bf,function(_2c0){return _2c0.geometry;});};esri._encodeGraphics=function(_2c1,_2c2){var _2c3=[],json,enc,norm;_8.forEach(_2c1,function(g,i){json=g.toJson();enc={};if(json.geometry){norm=_2c2&&_2c2[i];enc.geometry=norm&&norm.toJson()||json.geometry;}if(json.attributes){enc.attributes=json.attributes;}_2c3[i]=enc;});return _2c3;};esri._serializeLayerDefinitions=function(_2c4){var defs=[],_2c5=false,re=/[:;]/;if(_2c4){_8.forEach(_2c4,function(defn,i){if(defn){defs.push([i,defn]);if(!_2c5&&re.test(defn)){_2c5=true;}}});if(defs.length>0){var _2c6;if(_2c5){_2c6={};_8.forEach(defs,function(defn){_2c6[defn[0]]=defn[1];});_2c6=_8.toJson(_2c6);}else{_2c6=[];_8.forEach(defs,function(defn){_2c6.push(defn[0]+":"+defn[1]);});_2c6=_2c6.join(";");}return _2c6;}}return null;};esri._serializeTimeOptions=function(_2c7,ids){if(!_2c7){return;}var _2c8=[];_8.forEach(_2c7,function(_2c9,i){if(_2c9){var json=_2c9.toJson();if(ids&&_8.indexOf(ids,i)!==-1){json.useTime=false;}_2c8.push("\""+i+"\":"+_8.toJson(json));}});if(_2c8.length){return "{"+_2c8.join(",")+"}";}};esri._isDefined=function(_2ca){return (_2ca!==undefined)&&(_2ca!==null);};esri._sanitize=function(obj){var prop;for(prop in obj){if(obj.hasOwnProperty(prop)){if(obj[prop]===undefined){delete obj[prop];}}}return obj;};esri._dfdCanceller=function(dfd){dfd.canceled=true;var _2cb=dfd._pendingDfd;if(dfd.fired===-1&&_2cb&&_2cb.fired===-1){_2cb.cancel();}dfd._pendingDfd=null;};esri._fixDfd=function(dfd){var _2cc=dfd.then;dfd.then=function(_2cd,b,c){if(_2cd){var _2ce=_2cd;_2cd=function(_2cf){if(_2cf&&_2cf._argsArray){return _2ce.apply(null,_2cf);}return _2ce(_2cf);};}return _2cc.call(this,_2cd,b,c);};return dfd;};esri._resDfd=function(dfd,args,_2d0){var _2d1=args.length;if(_2d1===1){if(_2d0){dfd.errback(args[0]);}else{dfd.callback(args[0]);}}else{if(_2d1>1){args._argsArray=true;dfd.callback(args);}else{dfd.callback();}}};esri._createWrappers=function(_2d2){var _2d3=_8.getObject(_2d2+".prototype");_8.forEach(_2d3.__msigns,function(sig){var _2d4=_2d3[sig.n];_2d3[sig.n]=function(){var self=this,_2d5=[],i,_2d6=new _8.Deferred(esri._dfdCanceller);if(sig.f){esri._fixDfd(_2d6);}for(i=0;i<sig.c;i++){_2d5[i]=arguments[i];}var _2d7={dfd:_2d6};_2d5.push(_2d7);var _2d8,_2d9=[],_2da;if(self.normalization&&!self._isTable){_2d8=esri._disassemble(_2d5,sig.a);_8.forEach(_2d8,function(comp){_2d9=_2d9.concat(comp.value);});if(_2d9.length){var sr=_2d9[0].spatialReference;if(sr&&sr._isWrappable()){_2da=esri.geometry.normalizeCentralMeridian(_2d9,esri.config.defaults.geometryService);}}}if(_2da){_2d6._pendingDfd=_2da;_2da.addCallbacks(function(_2db){if(_2d6.canceled){return;}_2d7.assembly=esri._reassemble(_2db,_2d8);_2d6._pendingDfd=_2d4.apply(self,_2d5);},function(err){var _2dc=self.declaredClass;if(_2dc&&_2dc.indexOf("FeatureLayer")!==-1){self._resolve([err],null,_2d5[sig.e],_2d6,true);}else{self._errorHandler(err,_2d5[sig.e],_2d6);}});}else{_2d6._pendingDfd=_2d4.apply(self,_2d5);}return _2d6;};});};esri._disassemble=function(_2dd,_2de){var _2df=[];_8.forEach(_2de,function(_2e0){var _2e1=_2e0.i,arg=_2dd[_2e1],_2e2=_2e0.p,prop;if(!_8.isObject(arg)||!arg){return;}if(_2e2){if(_2e2[0]==="*"){for(prop in arg){if(arg.hasOwnProperty(prop)){esri._addToBucket(arg[prop],_2df,_2e1,prop);}}}else{_8.forEach(_2e2,function(prop){esri._addToBucket(_8.getObject(prop,false,arg),_2df,_2e1,prop);});}}else{esri._addToBucket(arg,_2df,_2e1);}});return _2df;};esri._addToBucket=function(_2e3,_2e4,_2e5,_2e6){var flag=false,_2e7;if(_8.isObject(_2e3)&&_2e3){if(_8.isArray(_2e3)){if(_2e3.length){_2e7=_2e3[0]&&_2e3[0].declaredClass;if(_2e7&&_2e7.indexOf("Graphic")!==-1){_2e3=_8.map(_2e3,function(_2e8){return _2e8.geometry;});_2e3=_8.filter(_2e3,esri._isDefined);flag=_2e3.length?true:false;}else{if(_2e7&&_2e7.indexOf("esri.geometry.")!==-1){flag=true;}}}}else{_2e7=_2e3.declaredClass;if(_2e7&&_2e7.indexOf("FeatureSet")!==-1){_2e3=_8.map(_2e3.features||[],function(_2e9){return _2e9.geometry;});_2e3=_8.filter(_2e3,esri._isDefined);flag=_2e3.length?true:false;}else{if(_2e7&&_2e7.indexOf("esri.geometry.")!==-1){flag=true;}}}}if(flag){_2e4.push({index:_2e5,property:_2e6,value:_2e3});}};esri._reassemble=function(_2ea,_2eb){var idx=0,_2ec={};_8.forEach(_2eb,function(comp){var _2ed=comp.index,_2ee=comp.property,_2ef=comp.value,len=_2ef.length||1;var _2f0=_2ea.slice(idx,idx+len);if(!_8.isArray(_2ef)){_2f0=_2f0[0];}idx+=len;delete comp.value;if(_2ee){_2ec[_2ed]=_2ec[_2ed]||{};_2ec[_2ed][_2ee]=_2f0;}else{_2ec[_2ed]=_2f0;}});return _2ec;};esri.setScrollable=function(node){var _2f1=0,_2f2=0,_2f3=0,_2f4=0,_2f5=0,_2f6=0;return [_8.connect(node,"ontouchstart",function(evt){_2f1=evt.touches[0].screenX;_2f2=evt.touches[0].screenY;_2f3=node.scrollWidth;_2f4=node.scrollHeight;_2f5=node.clientWidth;_2f6=node.clientHeight;}),_8.connect(node,"ontouchmove",function(evt){evt.preventDefault();var _2f7=node.firstChild;if(_2f7 instanceof Text){_2f7=node.childNodes[1];}var _2f8=_2f7._currentX||0,_2f9=_2f7._currentY||0;_2f8+=(evt.touches[0].screenX-_2f1);if(_2f8>0){_2f8=0;}else{if(_2f8<0&&(Math.abs(_2f8)+_2f5)>_2f3){_2f8=-1*(_2f3-_2f5);}}_2f7._currentX=_2f8;_2f9+=(evt.touches[0].screenY-_2f2);if(_2f9>0){_2f9=0;}else{if(_2f9<0&&(Math.abs(_2f9)+_2f6)>_2f4){_2f9=-1*(_2f4-_2f6);}}_2f7._currentY=_2f9;_8.style(_2f7,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+_2f8+"px, "+_2f9+"px)"});_2f1=evt.touches[0].screenX;_2f2=evt.touches[0].screenY;})];};esri._getAbsoluteUrl=function(url){if(_8.isString(url)&&url.indexOf("http://")===-1&&url.indexOf("https://")===-1){if(url.indexOf("//")===0){return window.location.protocol+url;}else{if(url.indexOf("/")===0){return window.location.protocol+"//"+window.location.host+url;}else{return esri._appBaseUrl+url;}}}return url;};esri._getDefaultVisibleLayers=function(_2fa){var _2fb=[],i;for(i=0;i<_2fa.length;i++){if(_2fa[i].parentLayerId>=0&&_8.indexOf(_2fb,_2fa[i].parentLayerId)===-1){continue;}if(_2fa[i].defaultVisibility){_2fb.push(_2fa[i].id);}}return _2fb;};esri._getLayersForScale=function(_2fc,_2fd){var _2fe=[];if(_2fc>0&&_2fd){var i;for(i=0;i<_2fd.length;i++){if(_2fd[i].parentLayerId>=0&&_8.indexOf(_2fe,_2fd[i].parentLayerId)===-1){continue;}if(_2fd[i].id>=0){var _2ff=true,_300=_2fd[i].maxScale,_301=_2fd[i].minScale;if(_300>0||_301>0){if(_300>0&&_301>0){_2ff=_300<=_2fc&&_2fc<=_301;}else{if(_300>0){_2ff=_300<=_2fc;}else{if(_301>0){_2ff=_2fc<=_301;}}}}if(_2ff){_2fe.push(_2fd[i].id);}}}}return _2fe;};}if(!_8._hasResource["dojo.fx.Toggler"]){_8._hasResource["dojo.fx.Toggler"]=true;_8.provide("dojo.fx.Toggler");_8.declare("dojo.fx.Toggler",null,{node:null,showFunc:_8.fadeIn,hideFunc:_8.fadeOut,showDuration:200,hideDuration:200,constructor:function(args){var _302=this;_8.mixin(_302,args);_302.node=args.node;_302._showArgs=_8.mixin({},args);_302._showArgs.node=_302.node;_302._showArgs.duration=_302.showDuration;_302.showAnim=_302.showFunc(_302._showArgs);_302._hideArgs=_8.mixin({},args);_302._hideArgs.node=_302.node;_302._hideArgs.duration=_302.hideDuration;_302.hideAnim=_302.hideFunc(_302._hideArgs);_8.connect(_302.showAnim,"beforeBegin",_8.hitch(_302.hideAnim,"stop",true));_8.connect(_302.hideAnim,"beforeBegin",_8.hitch(_302.showAnim,"stop",true));},show:function(_303){return this.showAnim.play(_303||0);},hide:function(_304){return this.hideAnim.play(_304||0);}});}if(!_8._hasResource["dojo.fx"]){_8._hasResource["dojo.fx"]=true;_8.provide("dojo.fx");(function(){var d=_8,_305={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _306=function(_307){this._index=-1;this._animations=_307||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;d.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};d.extend(_306,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){d.disconnect(this._onAnimateCtx);d.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_308,_309){if(!this._current){this._current=this._animations[this._index=0];}if(!_309&&this._current.status()=="playing"){return this;}var _30a=d.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_30b=d.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_30c=d.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);d.disconnect(_30a);d.disconnect(_30b);d.disconnect(_30c);});if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}this._onAnimateCtx=d.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){d.disconnect(this._onEndCtx);}this._onEndCtx=d.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=d.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);d.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_30d,_30e){this.pause();var _30f=this.duration*_30d;this._current=null;d.some(this._animations,function(a){if(a.duration<=_30f){this._current=a;return true;}_30f-=a.duration;return false;});if(this._current){this._current.gotoPercent(_30f/this._current.duration,_30e);}return this;},stop:function(_310){if(this._current){if(_310){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=d.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);d.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){d.disconnect(this._onAnimateCtx);}if(this._onEndCtx){d.disconnect(this._onEndCtx);}}});d.extend(_306,_305);_8.fx.chain=function(_311){return new _306(_311);};var _312=function(_313){this._animations=_313||[];this._connects=[];this._finished=0;this.duration=0;d.forEach(_313,function(a){var _314=a.duration;if(a.delay){_314+=a.delay;}if(this.duration<_314){this.duration=_314;}this._connects.push(d.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new d.Animation({curve:[0,1],duration:this.duration});var self=this;d.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop","onEnd"],function(evt){self._connects.push(d.connect(self._pseudoAnimation,evt,function(){self._fire(evt,arguments);}));});};d.extend(_312,{_doAction:function(_315,args){d.forEach(this._animations,function(a){a[_315].apply(a,args);});return this;},_onEnd:function(){if(++this._finished>this._animations.length){this._fire("onEnd");}},_call:function(_316,args){var t=this._pseudoAnimation;t[_316].apply(t,args);},play:function(_317,_318){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_319,_31a){var ms=this.duration*_319;d.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_31a);});this._call("gotoPercent",arguments);return this;},stop:function(_31b){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){d.forEach(this._connects,_8.disconnect);}});d.extend(_312,_305);_8.fx.combine=function(_31c){return new _312(_31c);};_8.fx.wipeIn=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _31d=d.style(node,"height");return Math.max(_31d,1);}},end:function(){return node.scrollHeight;}}}},args));d.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};_8.fx.wipeOut=function(args){var node=args.node=d.byId(args.node),s=node.style,o;var anim=d.animateProperty(d.mixin({properties:{height:{end:1}}},args));d.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});d.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};_8.fx.slideTo=function(args){var node=args.node=d.byId(args.node),top=null,left=null;var init=(function(n){return function(){var cs=d.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=d.position(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=d.animateProperty(d.mixin({properties:{top:args.top||0,left:args.left||0}},args));d.connect(anim,"beforeBegin",anim,init);return anim;};})();}if(!_8._hasResource["esri.fx"]){_8._hasResource["esri.fx"]=true;_8.provide("esri.fx");esri.fx.animateRange=function(args){var _31e=args.range;return new _8._Animation(_8.mixin({curve:new _8._Line(_31e.start,_31e.end)},args));};esri.fx.resize=function(args){var node=(args.node=_8.byId(args.node)),_31f=args.start,end=args.end;if(!_31f){var mb=_8._getMarginBox(node),pb=_8._getPadBorderExtents(node);_31f=(args.start={left:mb.l+pb.l,top:mb.t+pb.t,width:mb.w-pb.w,height:mb.h-pb.h});}if(!end){var _320=args.anchor?args.anchor:{x:_31f.left,y:_31f.top},size=args.size;end=args.end={left:(_31f.left-((size.width-_31f.width)*(_320.x-_31f.left)/_31f.width)),top:(_31f.top-((size.height-_31f.height)*(_320.y-_31f.top)/_31f.height)),width:size.width,height:size.height};}return _8.animateProperty(_8.mixin({properties:{left:{start:_31f.left,end:end.left},top:{start:_31f.top,end:end.top},width:{start:_31f.width,end:end.width},height:{start:_31f.height,end:end.height}}},args));};esri.fx.slideTo=function(args){var node=(args.node=_8.byId(args.node)),_321=_8.getComputedStyle,top=null,left=null,init=(function(){var _322=node;return function(){var pos=_322.style.position=="absolute"?"absolute":"relative";top=(pos=="absolute"?node.offsetTop:parseInt(_321(node).top)||0);left=(pos=="absolute"?node.offsetLeft:parseInt(_321(node).left)||0);if(pos!="absolute"&&pos!="relative"){var ret=_8.coords(_322,true);top=ret.y;left=ret.x;_322.style.position="absolute";_322.style.top=top+"px";_322.style.left=left+"px";}};})();init();var anim=_8.animateProperty(_8.mixin({properties:{top:{start:top,end:args.top||0},left:{start:left,end:args.left||0}}},args));_8.connect(anim,"beforeBegin",anim,init);return anim;};esri.fx.flash=function(args){args=_8.mixin({end:"#f00",duration:500,count:1},args);args.duration/=args.count*2;var node=_8.byId(args.node),_323=args.start;if(!_323){_323=_8.getComputedStyle(node).backgroundColor;}var end=args.end,_324=args.duration,_325=[],base={node:node,duration:_324};for(var i=0,il=args.count;i<il;i++){_325.push(_8.animateProperty(_8.mixin({properties:{backgroundColor:{start:_323,end:end}}},base)));_325.push(_8.animateProperty(_8.mixin({properties:{backgroundColor:{start:end,end:_323}}},base)));}return _8.fx.chain(_325);};}if(!_8._hasResource["dojox.gfx.matrix"]){_8._hasResource["dojox.gfx.matrix"]=true;_8.provide("dojox.gfx.matrix");(function(){var m=_a.gfx.matrix;var _326={};m._degToRad=function(_327){return _326[_327]||(_326[_327]=(Math.PI*_327/180));};m._radToDeg=function(_328){return _328/Math.PI*180;};m.Matrix2D=function(arg){if(arg){if(typeof arg=="number"){this.xx=this.yy=arg;}else{if(arg instanceof Array){if(arg.length>0){var _329=m.normalize(arg[0]);for(var i=1;i<arg.length;++i){var l=_329,r=_a.gfx.matrix.normalize(arg[i]);_329=new m.Matrix2D();_329.xx=l.xx*r.xx+l.xy*r.yx;_329.xy=l.xx*r.xy+l.xy*r.yy;_329.yx=l.yx*r.xx+l.yy*r.yx;_329.yy=l.yx*r.xy+l.yy*r.yy;_329.dx=l.xx*r.dx+l.xy*r.dy+l.dx;_329.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}_8.mixin(this,_329);}}else{_8.mixin(this,arg);}}}};_8.extend(m.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});_8.mixin(m,{identity:new m.Matrix2D(),flipX:new m.Matrix2D({xx:-1}),flipY:new m.Matrix2D({yy:-1}),flipXY:new m.Matrix2D({xx:-1,yy:-1}),translate:function(a,b){if(arguments.length>1){return new m.Matrix2D({dx:a,dy:b});}return new m.Matrix2D({dx:a.x,dy:a.y});},scale:function(a,b){if(arguments.length>1){return new m.Matrix2D({xx:a,yy:b});}if(typeof a=="number"){return new m.Matrix2D({xx:a,yy:a});}return new m.Matrix2D({xx:a.x,yy:a.y});},rotate:function(_32a){var c=Math.cos(_32a);var s=Math.sin(_32a);return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});},rotateg:function(_32b){return m.rotate(m._degToRad(_32b));},skewX:function(_32c){return new m.Matrix2D({xy:Math.tan(_32c)});},skewXg:function(_32d){return m.skewX(m._degToRad(_32d));},skewY:function(_32e){return new m.Matrix2D({yx:Math.tan(_32e)});},skewYg:function(_32f){return m.skewY(m._degToRad(_32f));},reflect:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});},project:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});},normalize:function(_330){return (_330 instanceof m.Matrix2D)?_330:new m.Matrix2D(_330);},clone:function(_331){var obj=new m.Matrix2D();for(var i in _331){if(typeof (_331[i])=="number"&&typeof (obj[i])=="number"&&obj[i]!=_331[i]){obj[i]=_331[i];}}return obj;},invert:function(_332){var M=m.normalize(_332),D=M.xx*M.yy-M.xy*M.yx,M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});return M;},_multiplyPoint:function(_333,x,y){return {x:_333.xx*x+_333.xy*y+_333.dx,y:_333.yx*x+_333.yy*y+_333.dy};},multiplyPoint:function(_334,a,b){var M=m.normalize(_334);if(typeof a=="number"&&typeof b=="number"){return m._multiplyPoint(M,a,b);}return m._multiplyPoint(M,a.x,a.y);},multiply:function(_335){var M=m.normalize(_335);for(var i=1;i<arguments.length;++i){var l=M,r=m.normalize(arguments[i]);M=new m.Matrix2D();M.xx=l.xx*r.xx+l.xy*r.yx;M.xy=l.xx*r.xy+l.xy*r.yy;M.yx=l.yx*r.xx+l.yy*r.yx;M.yy=l.yx*r.xy+l.yy*r.yy;M.dx=l.xx*r.dx+l.xy*r.dy+l.dx;M.dy=l.yx*r.dx+l.yy*r.dy+l.dy;}return M;},_sandwich:function(_336,x,y){return m.multiply(m.translate(x,y),_336,m.translate(-x,-y));},scaleAt:function(a,b,c,d){switch(arguments.length){case 4:return m._sandwich(m.scale(a,b),c,d);case 3:if(typeof c=="number"){return m._sandwich(m.scale(a),b,c);}return m._sandwich(m.scale(a,b),c.x,c.y);}return m._sandwich(m.scale(a),b.x,b.y);},rotateAt:function(_337,a,b){if(arguments.length>2){return m._sandwich(m.rotate(_337),a,b);}return m._sandwich(m.rotate(_337),a.x,a.y);},rotategAt:function(_338,a,b){if(arguments.length>2){return m._sandwich(m.rotateg(_338),a,b);}return m._sandwich(m.rotateg(_338),a.x,a.y);},skewXAt:function(_339,a,b){if(arguments.length>2){return m._sandwich(m.skewX(_339),a,b);}return m._sandwich(m.skewX(_339),a.x,a.y);},skewXgAt:function(_33a,a,b){if(arguments.length>2){return m._sandwich(m.skewXg(_33a),a,b);}return m._sandwich(m.skewXg(_33a),a.x,a.y);},skewYAt:function(_33b,a,b){if(arguments.length>2){return m._sandwich(m.skewY(_33b),a,b);}return m._sandwich(m.skewY(_33b),a.x,a.y);},skewYgAt:function(_33c,a,b){if(arguments.length>2){return m._sandwich(m.skewYg(_33c),a,b);}return m._sandwich(m.skewYg(_33c),a.x,a.y);}});})();_a.gfx.Matrix2D=_a.gfx.matrix.Matrix2D;}if(!_8._hasResource["esri.layers.layer"]){_8._hasResource["esri.layers.layer"]=true;_8.provide("esri.layers.layer");_8.declare("esri.layers.Layer",null,{constructor:function(url,_33d){if(url&&_8.isString(url)){this._url=esri.urlToObject(this.url=url);}else{this.url=(this._url=null);_33d=_33d||url;if(_33d&&_33d.layerDefinition){_33d=null;}}this._map=this._div=null;this.normalization=true;if(_33d){if(_33d.id){this.id=_33d.id;}if(_33d.visible===false){this.visible=false;}if(_33d.opacity!==undefined){this.opacity=_33d.opacity;}}this._errorHandler=_8.hitch(this,this._errorHandler);},id:null,visible:true,loaded:false,_errorHandler:function(err){this.onError(err);},_setMap:function(map,_33e,_33f,lod){},_unsetMap:function(map,_340){},_cleanUp:function(){this._map=this._div=null;},_fireUpdateStart:function(){if(this.updating){return;}this.updating=true;this.onUpdateStart();if(this._map){this._map._incr();}},_fireUpdateEnd:function(_341,info){this.updating=false;this.onUpdateEnd(_341,info);if(this._map){this._map._decr();}},_getToken:function(){var url=this._url,crd=this.credential;return (url&&url.query&&url.query.token)||(crd&&crd.token)||undefined;},_findCredential:function(){this.credential=esri.id&&this._url&&esri.id.findCredential(this._url.path);},refresh:function(){},show:function(){this.setVisibility(true);},hide:function(){this.setVisibility(false);},getResourceInfo:function(){var info=this.resourceInfo;return _8.isString(info)?_8.fromJson(info):_8.clone(info);},setNormalization:function(_342){this.normalization=_342;},setVisibility:function(v){if(this.visible!==v){this.visible=v;this.onVisibilityChange(this.visible);}},onLoad:function(){},onVisibilityChange:function(){},onUpdate:function(){},onUpdateStart:function(){},onUpdateEnd:function(){},onError:function(){}});}if(!_8._hasResource["dojox.gfx"]){_8._hasResource["dojox.gfx"]=true;_8.provide("dojox.gfx");}if(!_8._hasResource["dojo.date"]){_8._hasResource["dojo.date"]=true;_8.provide("dojo.date");_8.getObject("date",true,_8);_8.date.getDaysInMonth=function(_343){var _344=_343.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_344==1&&_8.date.isLeapYear(_343)){return 29;}return days[_344];};_8.date.isLeapYear=function(_345){var year=_345.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};_8.date.getTimezoneName=function(_346){var str=_346.toString();var tz="";var _347;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_347=str.match(pat))){tz=_347[1];}else{str=_346.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_347=str.match(pat))){tz=_347[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};_8.date.compare=function(_348,_349,_34a){_348=new Date(+_348);_349=new Date(+(_349||new Date()));if(_34a=="date"){_348.setHours(0,0,0,0);_349.setHours(0,0,0,0);}else{if(_34a=="time"){_348.setFullYear(0,0,0);_349.setFullYear(0,0,0);}}if(_348>_349){return 1;}if(_348<_349){return -1;}return 0;};_8.date.add=function(date,_34b,_34c){var sum=new Date(+date);var _34d=false;var _34e="Date";switch(_34b){case "day":break;case "weekday":var days,_34f;var mod=_34c%5;if(!mod){days=(_34c>0)?5:-5;_34f=(_34c>0)?((_34c-5)/5):((_34c+5)/5);}else{days=mod;_34f=parseInt(_34c/5);}var strt=date.getDay();var adj=0;if(strt==6&&_34c>0){adj=1;}else{if(strt==0&&_34c<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_34c>0)?2:-2;}_34c=(7*_34f)+days+adj;break;case "year":_34e="FullYear";_34d=true;break;case "week":_34c*=7;break;case "quarter":_34c*=3;case "month":_34d=true;_34e="Month";break;default:_34e="UTC"+_34b.charAt(0).toUpperCase()+_34b.substring(1)+"s";}if(_34e){sum["set"+_34e](sum["get"+_34e]()+_34c);}if(_34d&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};_8.date.difference=function(_350,_351,_352){_351=_351||new Date();_352=_352||"day";var _353=_351.getFullYear()-_350.getFullYear();var _354=1;switch(_352){case "quarter":var m1=_350.getMonth();var m2=_351.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_353*4);_354=q2-q1;break;case "weekday":var days=Math.round(_8.date.difference(_350,_351,"day"));var _355=parseInt(_8.date.difference(_350,_351,"week"));var mod=days%7;if(mod==0){days=_355*5;}else{var adj=0;var aDay=_350.getDay();var bDay=_351.getDay();_355=parseInt(days/7);mod=days%7;var _356=new Date(_350);_356.setDate(_356.getDate()+(_355*7));var _357=_356.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_357+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_357+mod)<0:adj=2;}}}days+=adj;days-=(_355*2);}_354=days;break;case "year":_354=_353;break;case "month":_354=(_351.getMonth()-_350.getMonth())+(_353*12);break;case "week":_354=parseInt(_8.date.difference(_350,_351,"day")/7);break;case "day":_354/=24;case "hour":_354/=60;case "minute":_354/=60;case "second":_354/=1000;case "millisecond":_354*=_351.getTime()-_350.getTime();}return Math.round(_354);};}if(!_8._hasResource["esri.renderer"]){_8._hasResource["esri.renderer"]=true;_8.provide("esri.renderer");esri.renderer.fromJson=function(json){var type=json.type||"",_358;switch(type){case "simple":_358=new esri.renderer.SimpleRenderer(json);break;case "uniqueValue":_358=new esri.renderer.UniqueValueRenderer(json);break;case "classBreaks":_358=new esri.renderer.ClassBreaksRenderer(json);break;}return _358;};_8.declare("esri.renderer.Renderer",null,{constructor:function(){this.getSymbol=_8.hitch(this,this.getSymbol);},getSymbol:function(_359){},toJson:function(){}});_8.declare("esri.renderer.SimpleRenderer",esri.renderer.Renderer,{constructor:function(sym){var _35a=sym.declaredClass;if(_35a&&(_35a.indexOf("esri.symbol")!==-1)){this.symbol=sym;}else{var json=sym,sym=json.symbol;if(sym){this.symbol=esri.symbol.fromJson(sym);}this.label=json.label;this.description=json.description;}},getSymbol:function(_35b){return this.symbol;},toJson:function(){return esri._sanitize({type:"simple",label:this.label,description:this.description,symbol:this.symbol&&this.symbol.toJson()});}});_8.declare("esri.renderer.UniqueValueRenderer",esri.renderer.Renderer,{constructor:function(sym,attr,_35c,_35d,_35e){this.values=[];this._values=[];this.infos=[];var _35f=sym.declaredClass;if(_35f&&(_35f.indexOf("esri.symbol")!==-1)){this.defaultSymbol=sym;this.attributeField=attr;this.attributeField2=_35c;this.attributeField3=_35d;this.fieldDelimiter=_35e;}else{var json=sym,sym=json.defaultSymbol;if(sym){this.defaultSymbol=esri.symbol.fromJson(sym);}this.attributeField=json.field1;this.attributeField2=json.field2;this.attributeField3=json.field3;this.fieldDelimiter=json.fieldDelimiter;this.defaultLabel=json.defaultLabel;_8.forEach(json.uniqueValueInfos,this._addValueInfo,this);}this._multi=(this.attributeField2)?true:false;},addValue:function(_360,_361){var info=_8.isObject(_360)?_360:{value:_360,symbol:_361};this._addValueInfo(info);},removeValue:function(_362){var i=_8.indexOf(this.values,_362);if(i===-1){return;}this.values.splice(i,1);delete this._values[_362];this.infos.splice(i,1);},getSymbol:function(_363){if(this._multi){var _364=_363.attributes,_365=this.attributeField,_366=this.attributeField2,_367=this.attributeField3;var _368=[];if(_365){_368.push(_364[_365]);}if(_366){_368.push(_364[_366]);}if(_367){_368.push(_364[_367]);}return this._values[_368.join(this.fieldDelimiter||"")]||this.defaultSymbol;}else{return this._values[_363.attributes[this.attributeField]]||this.defaultSymbol;}},_addValueInfo:function(info){var _369=info.value;this.values.push(_369);this.infos.push(info);var _36a=info.symbol;if(_36a){if(!_36a.declaredClass){info.symbol=esri.symbol.fromJson(_36a);}}this._values[_369]=info.symbol;},toJson:function(){var _36b=esri._sanitize;return _36b({type:"uniqueValue",field1:this.attributeField,field2:this.attributeField2,field3:this.attributeField3,fieldDelimiter:this.fieldDelimiter,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.toJson(),defaultLabel:this.defaultLabel,uniqueValueInfos:_8.map(this.infos||[],function(info){info=_8.mixin({},info);info.symbol=info.symbol&&info.symbol.toJson();info.value=info.value+"";return _36b(info);})});}});_8.declare("esri.renderer.ClassBreaksRenderer",esri.renderer.Renderer,{constructor:function(sym,attr){this.breaks=[];this._symbols=[];this.infos=[];var _36c=sym.declaredClass;if(_36c&&(_36c.indexOf("esri.symbol")!==-1)){this.defaultSymbol=sym;this.attributeField=attr;}else{var json=sym;this.attributeField=json.field;var min=json.minValue,_36d=json.classBreakInfos;if(_36d&&_36d[0]&&esri._isDefined(_36d[0].classMaxValue)){_8.forEach(_36d,function(info){var _36e=info.classMaxValue;info.minValue=min;info.maxValue=_36e;min=_36e;},this);}_8.forEach(_36d,this._addBreakInfo,this);}},addBreak:function(min,max,_36f){var info=_8.isObject(min)?min:{minValue:min,maxValue:max,symbol:_36f};this._addBreakInfo(info);},removeBreak:function(min,max){var _370,_371=this.breaks,i,il=_371.length,_372=this._symbols;for(i=0;i<il;i++){_370=_371[i];if(_370[0]==min&&_370[1]==max){_371.splice(i,1);delete _372[min+"-"+max];this.infos.splice(i,1);break;}}},getSymbol:function(_373){var val=parseFloat(_373.attributes[this.attributeField]),rs=this.breaks,i,il=rs.length,_374=this._symbols,_375,incl=this.isMaxInclusive;for(i=0;i<il;i++){_375=rs[i];if(_375[0]<=val&&(incl?(val<=_375[1]):(val<_375[1]))){return _374[_375[0]+"-"+_375[1]];}}return this.defaultSymbol;},_setMaxInclusiveness:function(_376){this.isMaxInclusive=_376;},_addBreakInfo:function(info){var min=info.minValue,max=info.maxValue;this.breaks.push([min,max]);this.infos.push(info);var _377=info.symbol;if(_377){if(!_377.declaredClass){info.symbol=esri.symbol.fromJson(_377);}}this._symbols[min+"-"+max]=info.symbol;},toJson:function(){var _378=this.infos||[],_379=esri._sanitize;var _37a=_378[0]&&_378[0].minValue;return _379({type:"classBreaks",field:this.attributeField,minValue:(_37a===-Infinity)?-Number.MAX_VALUE:_37a,classBreakInfos:_8.map(_378,function(info){info=_8.mixin({},info);info.symbol=info.symbol&&info.symbol.toJson();info.classMaxValue=(info.maxValue===Infinity)?Number.MAX_VALUE:info.maxValue;delete info.minValue;delete info.maxValue;return _379(info);})});}});_8.declare("esri.renderer.TemporalRenderer",esri.renderer.Renderer,{constructor:function(_37b,_37c,_37d,_37e){this.observationRenderer=_37b;this.latestObservationRenderer=_37c;this.trackRenderer=_37d;this.observationAger=_37e;},getSymbol:function(_37f){var _380=_37f.getLayer();var kind=_380._getKind(_37f);var _381=(kind===0)?this.observationRenderer:(this.latestObservationRenderer||this.observationRenderer);var _382=(_381&&_381.getSymbol(_37f));var ager=this.observationAger;if(_380.timeInfo&&_380._map.timeExtent&&(_381===this.observationRenderer)&&ager&&_382){_382=ager.getAgedSymbol(_382,_37f);}return _382;}});_8.declare("esri.renderer.SymbolAger",null,{getAgedSymbol:function(_383,_384){},_setSymbolSize:function(_385,size){switch(_385.type){case "simplemarkersymbol":_385.setSize(size);break;case "picturemarkersymbol":_385.setWidth(size);_385.setHeight(size);break;case "simplelinesymbol":case "cartographiclinesymbol":_385.setWidth(size);break;case "simplefillsymbol":case "picturefillsymbol":if(_385.outline){_385.outline.setWidth(size);}break;}}});_8.declare("esri.renderer.TimeClassBreaksAger",esri.renderer.SymbolAger,{constructor:function(_386,_387){this.infos=_386;this.timeUnits=_387||"day";_386.sort(function(a,b){if(a.minAge<b.minAge){return -1;}if(a.minAge>b.minAge){return 1;}return 0;});},getAgedSymbol:function(_388,_389){var _38a=_389.getLayer(),_38b=_389.attributes,_38c=esri._isDefined;_388=esri.symbol.fromJson(_388.toJson());var _38d=_38a._map.timeExtent;var _38e=_38d.endTime;if(!_38e){return _388;}var _38f=new Date(_38b[_38a._startTimeField]);var diff=_8.date.difference(_38f,_38e,this.timeUnits);_8.some(this.infos,function(info){if(diff>=info.minAge&&diff<=info.maxAge){var _390=info.color,size=info.size,_391=info.alpha;if(_390){_388.setColor(_390);}if(_38c(size)){this._setSymbolSize(_388,size);}if(_38c(_391)&&_388.color){_388.color.a=_391;}return true;}},this);return _388;}});_8.mixin(esri.renderer.TimeClassBreaksAger,{UNIT_DAYS:"day",UNIT_HOURS:"hour",UNIT_MILLISECONDS:"millisecond",UNIT_MINUTES:"minute",UNIT_MONTHS:"month",UNIT_SECONDS:"second",UNIT_WEEKS:"week",UNIT_YEARS:"year"});_8.declare("esri.renderer.TimeRampAger",esri.renderer.SymbolAger,{constructor:function(_392,_393,_394){this.colorRange=_392;this.sizeRange=_393;this.alphaRange=_394;},getAgedSymbol:function(_395,_396){var _397=_396.getLayer(),_398=_396.attributes;_395=esri.symbol.fromJson(_395.toJson());var _399=_397._map.timeExtent;var _39a=_399.startTime,_39b=_399.endTime;if(!_39a||!_39b){return _395;}_39a=_39a.getTime();_39b=_39b.getTime();var _39c=new Date(_398[_397._startTimeField]);_39c=_39c.getTime();if(_39c<_39a){_39c=_39a;}var _39d=(_39b===_39a)?1:(_39c-_39a)/(_39b-_39a);var _39e=this.sizeRange,_39f,_3a0;if(_39e){var from=_39e[0],to=_39e[1];_3a0=Math.abs(to-from)*_39d;this._setSymbolSize(_395,(from<to)?(from+_3a0):(from-_3a0));}_39e=this.colorRange;if(_39e){var _3a1=_39e[0],_3a2=_39e[1],_3a3=Math.round;_39f=new _8.Color();var _3a4=_3a1.r,toR=_3a2.r;_3a0=Math.abs(toR-_3a4)*_39d;_39f.r=_3a3((_3a4<toR)?(_3a4+_3a0):(_3a4-_3a0));var _3a5=_3a1.g,toG=_3a2.g;_3a0=Math.abs(toG-_3a5)*_39d;_39f.g=_3a3((_3a5<toG)?(_3a5+_3a0):(_3a5-_3a0));var _3a6=_3a1.b,toB=_3a2.b;_3a0=Math.abs(toB-_3a6)*_39d;_39f.b=_3a3((_3a6<toB)?(_3a6+_3a0):(_3a6-_3a0));var _3a7=_3a1.a,toA=_3a2.a;_3a0=Math.abs(toA-_3a7)*_39d;_39f.a=(_3a7<toA)?(_3a7+_3a0):(_3a7-_3a0);_395.setColor(_39f);}_39f=_395.color;_39e=this.alphaRange;if(_39e&&_39f){var _3a8=_39e[0],_3a9=_39e[1];_3a0=Math.abs(_3a9-_3a8)*_39d;_39f.a=(_3a8<_3a9)?(_3a8+_3a0):(_3a8-_3a0);}return _395;}});}if(!_8._hasResource["esri.layers.graphics"]){_8._hasResource["esri.layers.graphics"]=true;_8.provide("esri.layers.graphics");if(_a.gfx.renderer==="vml"){esri.vml=true;_8.addOnLoad(function(){_8.declare("esri.gfx.Path",_a.gfx.Path,{setShape:function(_3aa){this.rawNode.path.v=(this.vmlPath=_3aa);return this;}});esri.gfx.Path.nodeType="shape";var _3ab=_a.gfx.Shape||_a.gfx.vml.Shape,_3ac=_3ab.prototype.setStroke;_3ab.prototype.setStroke=function(){var _3ad=_3ac.apply(this,arguments);var node=this.rawNode,_3ae=node&&node.stroke,_3af=this.getParent();if(_3ae&&_3af){var op=esri._isDefined(_3af._esriIeOpacity)?_3af._esriIeOpacity:1;_3ae.opacity*=op;}return _3ad;};var _3b0=_3ab.prototype.setFill;_3ab.prototype.setFill=function(){var _3b1=_3b0.apply(this,arguments);var node=this.rawNode,fill=node&&node.fill,_3b2=this.getParent();if(fill&&_3b2){var op=esri._isDefined(_3b2._esriIeOpacity)?_3b2._esriIeOpacity:1;if(fill.type==="tile"){_8.style(node,"opacity",op);}else{fill.opacity*=op;}}return _3b1;};});}_8.declare("esri.layers._GraphicsContainer",null,{_setMap:function(map,_3b3){var es,_3b4=(this._connects=[]);this._map=map;if(_a.gfx.renderer==="canvas"){es=_8.create("div",{style:"overflow: visible; position: absolute;"},_3b3);this._surface={getEventSource:function(){return es;}};_3b4.push(_8.connect(es,"onmousedown",this,this._canvasDownHandler));_3b4.push(_8.connect(es,"onmouseup",this,this._canvasUpHandler));_3b4.push(_8.connect(es,"onclick",this,this._canvasClickHandler));esri.layers._GraphicsLayer.prototype._canvas=true;}else{var _3b5=(this._surface=_a.gfx.createSurface(_3b3,map.width,map.height));es=_3b5.getEventSource();_8.style((es=esri.vml?es.parentNode:es),{overflow:"visible",position:"absolute"});}_3b4.push(_8.connect(map,"onResize",this,"_onResizeHandler"));return es;},_onResizeHandler:function(_3b6,_3b7,_3b8){var es=this._surface.getEventSource(),map=this._map,_3b9;if(esri.vml){_8.style((es=es.parentNode),{width:_3b7+"px",height:_3b8+"px",clip:"rect(0px "+_3b7+"px "+_3b8+"px 0px)"});}_8.attr(es,"width",_3b7);_8.attr(es,"height",_3b8);if(!this._surface.declaredClass){_8.forEach(es.childNodes,function(_3ba){_8.attr(_3ba,"width",_3b7);_8.attr(_3ba,"height",_3b8);});}if(map.loaded){if(!map.graphics._suspended){map.graphics._resized=true;}_8.forEach(map.graphicsLayerIds,function(_3bb){_3b9=map.getLayer(_3bb);if(!_3b9._suspended){_3b9._resized=true;}});}},_cleanUp:function(){_8.forEach(this._connects,_8.disconnect,_8);this._map=this._surface=null;},_processEvent:function(evt){var map=this._map;evt.screenPoint=new esri.geometry.Point(evt.pageX-map.position.x,evt.pageY-map.position.y);evt.mapPoint=map.toMap(evt.screenPoint);},_canvasDownHandler:function(evt){this._processEvent(evt);this._downPt=evt.screenPoint.x+","+evt.screenPoint.y;},_canvasUpHandler:function(evt){this._processEvent(evt);this._upPt=evt.screenPoint.x+","+evt.screenPoint.y;},_tolerance:15,_canvasClickHandler:function(evt){if(!this._downPt||!this._upPt||this._downPt!==this._upPt){return;}this._processEvent(evt);var map=this._map;var _3bc=_8.map(map.graphicsLayerIds,function(id){return map.getLayer(id);});_3bc.push(map.graphics);_3bc.reverse();_3bc=_8.filter(_3bc,function(_3bd){return _3bd.loaded&&_3bd._mouseEvents&&_3bd.visible&&(!esri._isDefined(_3bd.opacity)||_3bd.opacity>0);});var _3be=evt.screenPoint,geo=esri.geometry,_3bf=this._tolerance;var xmin=_3be.x-_3bf,ymin=_3be.y+_3bf;var xmax=_3be.x+_3bf,ymax=_3be.y-_3bf;var _3c0=new geo.Extent(xmin,ymax,xmax,ymin);var _3c1=map.toMap(new geo.Point(xmin,ymin));var _3c2=map.toMap(new geo.Point(xmax,ymax));var _3c3=new geo.Extent(_3c1.x,_3c1.y,_3c2.x,_3c2.y);var _3c4,_3c5=esri.isTouchEnabled;_8.some(_3bc,function(_3c6){var _3c7=_8.filter(_3c6.graphics,function(_3c8){var _3c9=_3c8.getDojoShape();if(!_3c8.visible||!_3c9){return false;}var bbox=_3c9.getTransformedBoundingBox();if(bbox){var _3ca=new geo.Extent(bbox[0].x,bbox[0].y,bbox[2].x,bbox[2].y);return _3c5?_3ca.intersects(_3c0):_3ca.contains(_3be);}else{return _8.some(_3c9.children||[],function(_3cb){bbox=_3cb.getTransformedBoundingBox();var _3cc=new geo.Extent(bbox[0].x,bbox[0].y,bbox[2].x,bbox[2].y);return _3c5?_3cc.intersects(_3c0):_3cc.contains(_3be);});}});if(_3c7.length>0){var _3cd;_8.some(_3c7,function(_3ce){if(_3ce.geometry&&_3c3.intersects(_3ce.geometry)){_3cd=_3ce;return true;}return false;});if(_3cd){_3c4=_3cd;return true;}}return false;});if(_3c4){var _3cf=_3c4.getLayer();if(_3cf){evt.graphic=_3c4;_3cf.onClick(evt);}}}});_8.declare("esri.layers._GraphicsLayer",esri.layers.Layer,{constructor:function(_3d0){if(_3d0&&(_8.isString(_3d0)||(_8.isObject(_3d0)&&_3d0.layerDefinition))){_3d0=arguments[1];}this._params=_8.mixin({displayOnPan:true,drawMode:true},_3d0||{});this.infoTemplate=_3d0&&_3d0.infoTemplate;this.graphics=[];this._init=false;this._suspended=false;this._draw=_8.hitch(this,this._draw);this._refresh=_8.hitch(this,this._refresh);},setDrawMode:function(_3d1){this._params.drawMode=_3d1;},renderer:null,_setMap:function(map,_3d2){this._map=map;var _3d3=map.spatialReference;this._wrap=map.wrapAround180;this._srInfo=_3d3._getInfo();if(!this._canvas){this._div=_3d2.createGroup();}else{_3d2=_a.gfx.createSurface(_3d2.getEventSource(),map.width,map.height);_8.style(_3d2.rawNode,"position","absolute");this._div=_3d2.createGroup();this._div.getEventSource=function(){return _3d2.rawNode;};this._renderProto=this._div.constructor.prototype._render;this._div._render=_8.hitch(this,this._canvasRender);}this._div.getEventSource().id=this.id+"_layer";this._enableAllConnectors();this._updateStatus();if(!this._suspended&&map.extent&&map.loaded===true){this._onExtentChangeHandler(map.extent,null,null,null);}var op=this.opacity;if(esri._isDefined(op)&&op<1){this.setOpacity(op,true);}return this._div;},_unsetMap:function(map,_3d4){_8.forEach(this.graphics,function(g){g._shape=null;});if(!this._canvas){this._div.clear();_3d4.remove(this._div);_8.destroy(this._div.getEventSource());}else{_3d4=this._div.getParent();_3d4._parent={};_8.destroy(_3d4.rawNode);_3d4.destroy();}this._map=this._div=null;this._init=false;this._disableAllConnectors();},_onZoomStartHandler:function(){esri.hide(this._div.getEventSource());},_onExtentChangeHandler:function(_3d5,_3d6,_3d7,lod){if(_3d7||!this._init){var _3d8=this._map.__visibleRect,_3d9=this._div;this._init=true;this._refresh(true);_3d9.setTransform(_a.gfx.matrix.translate({x:_3d8.x,y:_3d8.y}));if(this._renderProto&&_3d9.surface.pendingRender){this._dirty=true;}else{if(this.visible){esri.show(_3d9.getEventSource());}}}else{if(this._resized){this._refresh(false);this._resized=false;}}if(this.graphics.length>0){this.onUpdate();}},_canvasRender:function(){var _3da=this._div;if(this._dirty){delete this._dirty;if(this.visible){esri.show(_3da.getEventSource());}}return this._renderProto.apply(_3da,arguments);},_refresh:function(_3db){var gs=this.graphics,il=gs.length,i,_3dc=this._draw;for(i=0;i<il;i++){_3dc(gs[i],_3db);}},refresh:function(){this._refresh(true);},_onPanHandler:function(_3dd,_3de){this._panDx=_3de.x;this._panDy=_3de.y;var _3df=this._map.__visibleRect;this._div.setTransform(_a.gfx.matrix.translate({x:_3df.x+_3de.x,y:_3df.y+_3de.y}));},_onPanEndUpdateHandler:function(_3e0,_3e1){if(!this._params._child&&(_3e1.x!==this._panDx||_3e1.y!==this._panDy)){var _3e2=this._map.__visibleRect;this._div.setTransform(_a.gfx.matrix.translate({x:_3e2.x,y:_3e2.y}));}this._refresh(false);if(this.graphics.length){this.onUpdate();}},_onPanStartHandler:function(){esri.hide(this._div.getEventSource());},_onPanEndHandler:function(){var _3e3=this._map.__visibleRect,_3e4=this._div;_3e4.setTransform(_a.gfx.matrix.translate({x:_3e3.x,y:_3e3.y}));this._refresh(false);if(this._renderProto&&_3e4.surface.pendingRender){this._dirty=true;}else{esri.show(_3e4.getEventSource());}if(this.graphics.length){this.onUpdate();}},_getDesiredStatus:function(){return this.visible;},_updateStatus:function(){if(this._getDesiredStatus()){if(this._suspended){this._resume();}}else{if(!this._suspended){this._suspend();}}},_suspend:function(){this._suspended=true;esri.hide(this._div.getEventSource());this._disableDrawConnectors();},_resume:function(){var _3e5=this._div;this._suspended=false;this._enableDrawConnectors();var _3e6=this._map.__visibleRect;_3e5.setTransform(_a.gfx.matrix.translate({x:_3e6.x,y:_3e6.y}));this._refresh(true);if(this._renderProto&&_3e5.surface.pendingRender){this._dirty=true;}else{esri.show(_3e5.getEventSource());}},_enableAllConnectors:function(){this._disableAllConnectors();this._onVisibilityChangeHandler_connect=_8.connect(this,"onVisibilityChange",this,this._updateStatus);this._enableDrawConnectors();},_disableAllConnectors:function(){this._disableDrawConnectors();_8.disconnect(this._onVisibilityChangeHandler_connect);},_enableDrawConnectors:function(){var map=this._map,dc=_8.connect;this._disableDrawConnectors();if(this._params.displayOnPan){if(!this._params._child){this._onPanHandler_connect=dc(map,"onPan",this,"_onPanHandler");}this._onPanEndHandler_connect=dc(map,"onPanEnd",this,"_onPanEndUpdateHandler");}else{this._onPanStartHandler_connect=dc(map,"onPanStart",this,"_onPanStartHandler");this._onPanEndHandler_connect=dc(map,"onPanEnd",this,"_onPanEndHandler");}this._onZoomStartHandler_connect=dc(map,"onZoomStart",this,"_onZoomStartHandler");this._onExtentChangeHandler_connect=dc(map,"onExtentChange",this,"_onExtentChangeHandler");},_disableDrawConnectors:function(){var dd=_8.disconnect;dd(this._onExtentChangeHandler_connect);dd(this._onZoomStartHandler_connect);dd(this._onPanHandler_connect);dd(this._onPanStartHandler_connect);dd(this._onPanEndHandler_connect);},_updateExtent:function(_3e7){var geom=_3e7.geometry,eg=esri.geometry;if(!geom){_3e7._extent=null;return;}var _3e8=(_3e7._extent=geom.getExtent());if(!_3e8){var x,y;if(geom instanceof eg.Point){x=geom.x;y=geom.y;}else{if(geom instanceof eg.Multipoint){x=geom.points[0][0];y=geom.points[0][1];}else{_3e7._extent=null;return;}}_3e7._extent=new eg.Extent(x,y,x,y,geom.spatialReference);}},_intersects:function(map,_3e9,_3ea){if(this._wrap&&!_3ea){var _3eb=[],_3ec=map._getFrameWidth(),info=this._srInfo,_3ed,_3ee=map._clip?map._getAvailExtent():map.extent,_3ef=_3ee._getParts(info),g,m,f,gl,ml,fl,_3f0,_3f1,_3f2=[],_3f3=_3e9._partwise;if(_3f3&&_3f3.length){_3ed=[];for(g=0,gl=_3f3.length;g<gl;g++){_3ed=_3ed.concat(_3f3[g]._getParts(info));}}else{_3ed=_3e9._getParts(info);}for(g=0,gl=_3ed.length;g<gl;g++){_3f0=_3ed[g];for(m=0,ml=_3ef.length;m<ml;m++){_3f1=_3ef[m];if(_3f1.extent.intersects(_3f0.extent)){for(f=0,fl=_3f0.frameIds.length;f<fl;f++){_3eb.push((_3f1.frameIds[0]-_3f0.frameIds[f])*_3ec);}}}}for(g=0,gl=_3eb.length;g<gl;g++){f=_3eb[g];if(_8.indexOf(_3eb,f)===g){_3f2.push(f);}}return (_3f2.length)?_3f2:null;}else{return map.extent.intersects(_3e9)?[0]:null;}},_draw:function(_3f4,_3f5){if(!this._params.drawMode||!this._map){return;}try{var _3f6=_3f4._extent,_3f7;if(_3f4.visible&&_3f6&&(_3f7=this._intersects(this._map,_3f6,_3f4.geometry._originOnly))){if(!_3f4.getDojoShape()||_3f5||_3f7){var type=_3f4.geometry.type;if(type==="point"){this._drawMarker(_3f4,_3f7);this._symbolizeMarker(_3f4);}else{if(type==="multipoint"){this._drawMarkers(_3f4,_3f7);this._symbolizeMarkers(_3f4);}else{this._drawShape(_3f4,_3f7);this._symbolizeShape(_3f4);}}}}else{if(_3f4.getDojoShape()){this._removeShape(_3f4);}}}catch(err){this._errorHandler(err,_3f4);}},_removeShape:function(_3f8){var _3f9=_3f8.getDojoShape();_3f9.removeShape();_3f8._shape=null;},_drawShape:function(_3fa,_3fb){var _3fc=_3fa.geometry,type=_3fc.type,map=this._map,me=map.extent,mw=map.width,mh=map.height,eg=esri.geometry,_3fd=map.__visibleRect,_3fe=[],i,il;if(type==="rect"||type==="extent"){var rect;if(type==="extent"){rect=eg.toScreenGeometry(me,mw,mh,_3fc);rect={x:rect.xmin-_3fd.x+_3fb[0],y:rect.ymax-_3fd.y,width:rect.getWidth(),height:rect.getHeight()};}else{var xy=eg.toScreenPoint(me,mw,mh,_3fc),wh=eg.toScreenPoint(me,mw,mh,{x:_3fc.x+_3fc.width,y:_3fc.y+_3fc.height});rect={x:xy.x-_3fd.x+_3fb[0],y:xy.y-_3fd.y,width:wh.x-xy.x,height:xy.y-wh.y};}if(rect.width===0){rect.width=1;}if(rect.height===0){rect.height=1;}_3fa._shape=this._drawRect(this._div,_3fa.getDojoShape(),rect);}else{if(type==="polyline"||type==="polygon"){for(i=0,il=_3fb.length;i<il;i++){_3fe=_3fe.concat(eg._toScreenPath(me,mw,mh,_3fc,-_3fd.x+_3fb[i],-_3fd.y));}_3fa._shape=this._drawPath(this._div,_3fa.getDojoShape(),_3fe);if(this._rendererLimits){if(type==="polyline"){this._clipPolyline(_3fa._shape,_3fc);}else{this._clipPolygon(_3fa._shape,_3fc);}}}}},_drawRect:function(_3ff,_400,rect){return _400?_400.setShape(rect):_3ff.createRect(rect);},_drawImage:function(_401,_402,_403){return _402?_402.setShape(_403):_401.createImage(_403);},_drawCircle:function(_404,_405,_406){return _405?_405.setShape(_406):_404.createCircle(_406);},_drawPath:(function(){if(esri.vml){return function(_407,_408,path){if(_408){return _408.setShape(path.join(" "));}else{var p=_407.createObject(esri.gfx.Path,path.join(" "));_407._overrideSize(p.getEventSource());return p;}};}else{return function(_409,_40a,path){return _40a?_40a.setShape(path.join(" ")):_409.createPath(path.join(" "));};}}()),_drawText:function(_40b,_40c,text){return _40c?_40c.setShape(text):_40b.createText(text);},_getSymbol:function(_40d){return _40d.symbol||(this.renderer?this.renderer.getSymbol(_40d):null)||null;},_symbolizeShape:function(_40e){var _40f=this._getSymbol(_40e);var _410=_40f._stroke,fill=_40f._fill;if(_410===null||fill===null){_410=_40f.getStroke();fill=_40f.getFill();}_40e.getDojoShape().setStroke(_410).setFill(fill);_40f._stroke=_410;_40f._fill=fill;},_smsToPath:(function(){if(esri.vml){return function(SMS,_411,x,y,xMh,xPh,yMh,yPh,_412){switch(_411){case SMS.STYLE_SQUARE:return ["M",xMh+","+yMh,"L",xPh+","+yMh,xPh+","+yPh,xMh+","+yPh,"X","E"];case SMS.STYLE_CROSS:return ["M",x+","+yMh,"L",x+","+yPh,"M",xMh+","+y,"L",xPh+","+y,"E"];case SMS.STYLE_X:return ["M",xMh+","+yMh,"L",xPh+","+yPh,"M",xMh+","+yPh,"L",xPh+","+yMh,"E"];case SMS.STYLE_DIAMOND:return ["M",x+","+yMh,"L",xPh+","+y,x+","+yPh,xMh+","+y,"X","E"];case SMS.STYLE_TARGET:return ["M",xMh+","+yMh,"L",xPh+","+yMh,xPh+","+yPh,xMh+","+yPh,xMh+","+yMh,"M",(xMh-_412)+","+y,"L",xMh+","+y,"M",x+","+(yMh-_412),"L",x+","+yMh,"M",(xPh+_412)+","+y,"L",xPh+","+y,"M",x+","+(yPh+_412),"L",x+","+yPh,"E"];}};}else{return function(SMS,_413,x,y,xMh,xPh,yMh,yPh,_414){switch(_413){case SMS.STYLE_SQUARE:return ["M",xMh+","+yMh,xPh+","+yMh,xPh+","+yPh,xMh+","+yPh,"Z"];case SMS.STYLE_CROSS:return ["M",x+","+yMh,x+","+yPh,"M",xMh+","+y,xPh+","+y];case SMS.STYLE_X:return ["M",xMh+","+yMh,xPh+","+yPh,"M",xMh+","+yPh,xPh+","+yMh];case SMS.STYLE_DIAMOND:return ["M",x+","+yMh,xPh+","+y,x+","+yPh,xMh+","+y,"Z"];case SMS.STYLE_TARGET:return ["M",xMh+","+yMh,xPh+","+yMh,xPh+","+yPh,xMh+","+yPh,xMh+","+yMh,"M",(xMh-_414)+","+y,xMh+","+y,"M",x+","+(yMh-_414),x+","+yMh,"M",(xPh+_414)+","+y,xPh+","+y,"M",x+","+(yPh+_414),x+","+yPh];}};}}()),_pathStyles:{"square":1,"cross":1,"x":1,"diamond":1,"target":1},_typeMaps:{"picturemarkersymbol":"image","textsymbol":"text"},_isInvalidShape:function(_415,_416){var _417=_416&&_416.shape&&_416.shape.type,_418=_415&&_415.type,_419=_415&&_415.style;if(!_419){if(_418){_419=this._typeMaps[_418];}}else{if(this._pathStyles[_419]){_419="path";}}if(_417&&_419&&(_417!==_419)){return true;}},_drawPoint:function(_41a,_41b,_41c,_41d,_41e){var type=_41c.type,map=this._map,_41f=map.__visibleRect,_420=esri.geometry.toScreenPoint(map.extent,map.width,map.height,_41b).offset(-_41f.x+_41e[0],-_41f.y),px=_420.x,py=_420.y,_421;if(this._isInvalidShape(_41c,_41d)){_41d.removeShape();_41d=null;}if(type==="simplemarkersymbol"){var _422=_41c.style,half=_41c.size/2,_423=Math.round,SMS=esri.symbol.SimpleMarkerSymbol;switch(_422){case SMS.STYLE_SQUARE:case SMS.STYLE_CROSS:case SMS.STYLE_X:case SMS.STYLE_DIAMOND:_421=this._drawPath(_41a,_41d,this._smsToPath(SMS,_422,px,py,_423(px-half),_423(px+half),_423(py-half),_423(py+half)));break;case SMS.STYLE_TARGET:var _424=_41c._targetWidth/2,_425=_41c._targetHeight/2;_421=this._drawPath(_41a,_41d,this._smsToPath(SMS,_422,px,py,_423(px-_424),_423(px+_424),_423(py-_425),_423(py+_425),_41c._spikeSize));break;default:_421=this._drawCircle(_41a,_41d,{cx:px,cy:py,r:half});}}else{if(type==="picturemarkersymbol"){var w=_41c.width,h=_41c.height;_421=this._drawImage(_41a,_41d,{x:px-(w/2),y:py-(h/2),width:w,height:h,src:_41c.url});}else{if(type==="textsymbol"){_421=this._drawText(_41a,_41d,{type:"text",text:_41c.text,x:px,y:py,align:_41c.align,decoration:_41c.decoration,rotated:_41c.rotated,kerning:_41c.kerning});}}}_421.setTransform(_a.gfx.matrix.multiply(_a.gfx.matrix.translate(_41c.xoffset,-_41c.yoffset),_a.gfx.matrix.rotategAt(_41c.angle,_420)));_421._wrapOffsets=_41e;return _421;},_symbolizePoint:function(_426,_427){var type=_427.type;if(type==="picturemarkersymbol"){return;}var _428=_427._stroke,fill=_427._fill;if(type==="textsymbol"){_426.setFont(_427.font).setFill(_427.getFill());}else{if(_428===null||fill===null){_428=_427.getStroke();fill=_427.getFill();}if(type==="simplemarkersymbol"){_426.setFill(fill).setStroke(_428);}_427._stroke=_428;_427._fill=fill;}},_drawMarker:function(_429,_42a){_429._shape=this._drawPoint(this._div,_429.geometry,this._getSymbol(_429),_429.getDojoShape(),_42a);},_symbolizeMarker:function(_42b){this._symbolizePoint(_42b.getDojoShape(),this._getSymbol(_42b));},_drawMarkers:function(_42c,_42d){var _42e=_42c.geometry,_42f=_42e.points,_430=this._getSymbol(_42c),_431=_42c.getDojoShape()||this._div.createGroup(),_432,i,il=_42f.length,temp=[],idx=0,j,jl=_42d?_42d.length:0;if(_431.children[0]&&this._isInvalidShape(_430,_431.children[0])){_431.clear();}for(i=0;i<il;i++){_432=_42f[i];for(j=0;j<jl;j++){temp[0]=_42d[j];this._drawPoint(_431,{x:_432[0],y:_432[1]},_430,_431.children[idx++],temp);}}var _433=_431.children.length;if(il*_42d.length<_433){for(i=_433-1;i>=il*_42d.length;i--){_431.children[i].removeShape();}}_42c._shape=_431;},_symbolizeMarkers:function(_434){var _435=this._getSymbol(_434),_436=_434.getDojoShape(),_437=_436.children,i,il=_437.length;for(i=0;i<il;i++){this._symbolizePoint(_437[i],_435);}},_errorHandler:function(err,_438){var msg=esri.bundle.layers.graphics.drawingError;if(_438){err.message=msg+"(geometry:"+(_438.geometry?_438.geometry.declaredClass:null)+", symbol:"+(_438.symbol?_438.symbol.declaredClass:null)+"): "+err.message;}else{err.message=msg+"(null): "+err.message;}this.inherited(arguments);},_rendererLimits:(function(){var _439,_43a,_43b;if(_8.isFF){_439=16125;_43a=-32250;_43b=32250;}else{if(_8.isIE<9){_439=100000;_43a=-100000;_43b=100000;}else{if(_8.isChrome&&_8.isChrome<6){_439=8150;_43a=-10000;_43b=10000;}}}if(_439){var _43c,_43d;_43c=[-_439,-_439,_439,_439];_43d=[[[-_439,-_439],[_439,-_439]],[[_439,-_439],[_439,_439]],[[_439,_439],[-_439,_439]],[[-_439,_439],[-_439,-_439]]];return {clipLimit:_439,rangeMin:_43a,rangeMax:_43b,clipBBox:_43c,clipSegments:_43d};}}()),_clipPolyline:function(_43e,_43f){var _440=this._getCorners(_43e,_43f);var _441=_440.tl,_442=_440.br;var _443=this._rendererLimits;var _444=_443.rangeMin,_445=_443.rangeMax,_446=_443.clipBBox,_447=_443.clipSegments;var _448=this._isPointWithinRange,_449=this._isPointWithinBBox,_44a=this._getClipperIntersection,_44b=this._getPlaneIndex;if(!_448(_441,_444,_445)||!_448(_442,_444,_445)){if(esri.vml){this._createSegments(_43e);}var _44c=[];_8.forEach(_43e.segments,function(_44d){var _44e=_44d.args,len=_44e.length,_44f=[],i;for(i=0;i<len;i+=2){var pt1=[_44e[i],_44e[i+1]];var pt2=[_44e[i+2],_44e[i+3]];var _450=_449(pt1,_446);var _451=_449(pt2,_446);if(_450^_451){var _452=_44a([pt1,pt2],_447);if(_452){if(!_450){_44f.push(_452[1],pt2);}else{if(i){_44f.push(_452[1]);}else{_44f.push(pt1,_452[1]);}_44c.push(_44f);_44f=[];}}}else{if(_450){if(i){_44f.push(pt2);}else{_44f.push(pt1,pt2);}}else{var _453=_44b(pt1,_446);var _454=_44b(pt2,_446);if(_453===-1||_454===-1||_453===_454){continue;}var _455=_44a([pt1,pt2],_447,true);if(_455.length>0){if(!_455[_453]){_453=_455[_453[0]]?_453[0]:_453[1];}if(!_455[_454]){_454=_455[_454[0]]?_454[0]:_454[1];}var _456=_455[_453],_457=_455[_454];if(_456){_44f.push(_456);}if(_457){_44f.push(_457);_44c.push(_44f);_44f=[];}}}}}_44c.push(_44f);});_43e.setShape(this._getPathStringFromPaths(_44c));}},_clipPolygon:function(_458,_459){var _45a=this._getCorners(_458,_459);var _45b=_45a.tl,_45c=_45a.br;var _45d=this._rendererLimits;var _45e=_45d.clipLimit,_45f=_45d.rangeMin,_460=_45d.rangeMax,_461=_45d.clipBBox,_462=_45d.clipSegments;var _463=this._isPointWithinRange,_464=this._isPointWithinBBox,_465=this._getClipperIntersection,_466=this._getPlaneIndex,_467=esri.geometry._pointLineDistance;if(!_463(_45b,_45f,_460)||!_463(_45c,_45f,_460)){if(esri.vml){this._createSegments(_458);}var _468=_8.map(_458.segments,function(_469){var _46a=_469.args,len=_46a.length,_46b=[],_46c=[],i;for(i=0;i<len;i+=2){var pt1=[_46a[i],_46a[i+1]];var pt2=[_46a[i+2],_46a[i+3]];if(i===(len-2)){_46b.push(pt1);break;}var _46d=_464(pt1,_461);var _46e=_464(pt2,_461);_46b.push(pt1);if(_46d^_46e){var _46f=_465([pt1,pt2],_462);if(_46f){var _470=_46f[1];_470[_46d?"inOut":"outIn"]=true;_46b.push(_470);_46c.push([_46d?"INOUT":"OUTIN",_46b.length-1,_46f[0]]);}}else{if(!_46d){var _471=_466(pt1,_461);var _472=_466(pt2,_461);if(_471===-1||_472===-1||_471===_472){continue;}var _46f=_465([pt1,pt2],_462,true);if(_46f.length>0){if(!_46f[_471]){_471=_46f[_471[0]]?_471[0]:_471[1];}if(!_46f[_472]){_472=_46f[_472[0]]?_472[0]:_472[1];}var _473=_46f[_471],_474=_46f[_472];if(_473){_473.outIn=true;_46b.push(_473);_46c.push(["OUTIN",_46b.length-1,_471]);}if(_474){_474.inOut=true;_46b.push(_474);_46c.push(["INOUT",_46b.length-1,_472]);}}else{if(_8.isArray(_471)&&_8.isArray(_472)){var _475=_471.concat(_472);_475.sort();if(_475.join("")==="0123"){var _476=[];if((_471[0]+_471[1])===3){_476.push([_45e,-_45e],[-_45e,_45e]);}else{_476.push([-_45e,-_45e],[_45e,_45e]);}var d1=_467(_476[0],[pt1,pt2]);var d2=_467(_476[1],[pt1,pt2]);_46b.push((d1<d2)?_476[0]:_476[1]);}}}}}}var xmin=_461[0],ymin=_461[1],xmax=_461[2],ymax=_461[3];_8.forEach(_46b,function(_477){if(_477[0]<xmin){if(_477[1]>=ymin&&_477[1]<=ymax){_477[0]=xmin;}else{_477[0]=xmin;_477[1]=_477[1]<ymin?ymin:ymax;}}});_8.forEach(_46b,function(_478){if(_478[1]<ymin){if(_478[0]>=xmin&&_478[0]<=xmax){_478[1]=ymin;}else{_478[1]=ymin;_478[0]=_478[0]<xmin?xmin:xmax;}}});_8.forEach(_46b,function(_479){if(_479[0]>xmax){if(_479[1]>=ymin&&_479[1]<=ymax){_479[0]=xmax;}else{_479[0]=xmax;_479[1]=_479[1]<ymin?ymin:ymax;}}});_8.forEach(_46b,function(_47a){if(_47a[1]>ymax){if(_47a[0]>=xmin&&_47a[0]<=xmax){_47a[1]=ymax;}else{_47a[1]=ymax;_47a[0]=_47a[0]<xmin?xmin:xmax;}}});var k=0,len=_46c.length;if(len>0){do{var curr=_46c[k];var next=_46c[(k+1)%len];if(curr[2]===next[2]&&curr[0]==="INOUT"&&next[0]==="OUTIN"){var _47b=curr[1],end=next[1],u;if(_47b<end){for(u=_47b+1;u<end;u++){_46b[u][2]=true;}}else{if(_47b>end){for(u=_47b+1;u<_46b.length;u++){_46b[u][2]=true;}for(u=0;u<end;u++){_46b[u][2]=true;}}}}k=(k+1)%len;}while(k!==0);}var _47c=_46b[0],last=_46b[_46b.length-1];if(_47c[2]){last[2]=true;_8.some(_46c,function(data){if(data[1]===1){_46b.splice(_46b.length-1,0,_8.clone(_46b[1]));return true;}return false;});}_46b=_8.filter(_46b,function(_47d){return _47d[2]?false:true;});for(k=0;k<_46b.length-1;k++){var now=_46b[k];var next=_46b[k+1];if(!next||(now[0]!==next[0])||(now[1]!==next[1])){continue;}if(next.outIn){now.outIn=true;}else{if(next.inOut){now.inOut=true;}}_46b.splice(k+1,1);}var abs=Math.abs,_47e=[];for(k=0;k<_46b.length-1;k++){var curr=_46b[k],cx=curr[0],cy=curr[1];var x1=(abs(cx)===_45e);var y1=(abs(cy)===_45e);var next=_46b[k+1],nx=next[0],ny=next[1];var x2=(abs(nx)===_45e);var y2=(abs(ny)===_45e);if(x1&&y2){_47e.push([k+1,[cx,ny]]);}else{if(y1&&x2){_47e.push([k+1,[nx,cy]]);}}}for(k=_47e.length-1;k>=0;k--){var data=_47e[k];var prev=_46b[data[0]-1];var now=_46b[data[0]];if(prev.outIn||prev.inOut||now.outIn||now.inOut){continue;}_46b.splice(data[0],0,data[1]);}var _47c=_46b[0],last=_46b[_46b.length-1];if(_47c[0]!==last[0]||_47c[1]!==last[1]){_46b.push(_47c);}return _46b;});_458.setShape(this._getPathStringFromPaths(_468));}},_getCorners:function(_47f,_480){if(esri.vml){var map=this._map;var _481=_480.getExtent();var _482=map.toScreen(new esri.geometry.Point(_481.xmin,_481.ymax));var _483=map.toScreen(new esri.geometry.Point(_481.xmax,_481.ymin));return {tl:_482,br:_483};}else{var _484=_47f.getTransformedBoundingBox();return {tl:_484[0],br:_484[2]};}},_createSegments:function(_485){_485.shape.path=_485.vmlPath;_485.segmented=false;_485._confirmSegmented();var _486=_485.segments;if(_486.length>1){_485.segments=_8.filter(_486,function(_487,idx,arr){var next=arr[idx+1];if(_487.action==="M"&&next&&next.action==="L"){_487.args=_487.args.concat(next.args);return true;}return false;});}},_getPathStringFromPaths:function(_488){if(esri.vml){_488=_8.map(_488,function(path){var _489=_8.map(path,function(_48a,idx){return (idx===1?"l ":"")+_48a.join(",");});return "m "+_489.join(" ");});_488.push("e");}else{_488=_8.map(_488,function(path){var _48b=_8.map(path,function(_48c){return _48c.join(",");});return "M "+_48b.join(" ");});}return _488.join(" ");},_isPointWithinBBox:function(_48d,bbox){var left=bbox[0],top=bbox[1];var _48e=bbox[2],_48f=bbox[3];var x=_48d[0],y=_48d[1];if(x>left&&x<_48e&&y>top&&y<_48f){return true;}else{return false;}},_isPointWithinRange:function(_490,_491,_492){var x=_490.x,y=_490.y;if(x<_491||y<_491||x>_492||y>_492){return false;}else{return true;}},_getClipperIntersection:function(line,_493,_494){var i,_495=esri.geometry._getLineIntersection2,_496=Math.round,data={length:0};for(i=0;i<4;i++){var _497=_495(line,_493[i]);if(_497){_497[0]=_496(_497[0]);_497[1]=_496(_497[1]);if(!_494){return [i,_497];}else{data[i]=_497;data.length++;}}}return _494?data:null;},_getPlaneIndex:function(_498,_499){var px=_498[0],py=_498[1],xmin=_499[0],ymin=_499[1],xmax=_499[2],ymax=_499[3];if(px<=xmin){if((py>=ymin)&&(py<=ymax)){return 3;}else{return (py<ymin)?[0,3]:[2,3];}}if(py<=ymin){if((px>=xmin)&&(px<=xmax)){return 0;}else{return (px<xmin)?[3,0]:[1,0];}}if(px>=xmax){if((py>=ymin)&&(py<=ymax)){return 1;}else{return (py<ymin)?[0,1]:[2,1];}}if(py>=ymax){if((px>=xmin)&&(px<=xmax)){return 2;}else{return (px<xmin)?[3,2]:[1,2];}}return -1;},onGraphicAdd:function(){},onGraphicRemove:function(){},onGraphicsClear:function(){},onOpacityChange:function(){},setInfoTemplate:function(_49a){this.infoTemplate=_49a;},add:function(_49b){var _49c=arguments[1];if(_49b._graphicsLayer===this){return _49b;}if(!_49c){this.graphics.push(_49b);}_49b._graphicsLayer=this;this._updateExtent(_49b);this._draw(_49b);if(!_49c){this.onGraphicAdd(_49b);}return _49b;},remove:function(_49d){if(!arguments[1]){var _49e=this.graphics,i;if((i=_8.indexOf(_49e,_49d))===-1){return null;}_49d=this.graphics.splice(i,1)[0];}if(_49d.getDojoShape()){this._removeShape(_49d);}_49d._shape=_49d._graphicsLayer=null;this.onGraphicRemove(_49d);return _49d;},clear:function(){var _49f=arguments[1],g=this.graphics;while(g.length>0){this.remove(g[0]);}if(!_49f){this.onGraphicsClear();}},setOpacity:function(op,_4a0){if(_4a0||this.opacity!=op){var div=this._div;if(div){if(esri.vml){_8.forEach(this.graphics,function(_4a1){var _4a2=_4a1._shape;var node=_4a2&&_4a2.getNode();if(node){var _4a3=_4a2.strokeStyle,_4a4=node.stroke;if(_4a3&&_4a4){_4a4.opacity=_4a3.color.a*op;}var _4a5=_4a2.fillStyle,fill=node.fill;if(_4a5&&fill){if(fill.type==="tile"){_8.style(node,"opacity",op);}else{fill.opacity=_4a5.a*op;}}}});div._esriIeOpacity=op;}else{if(this._canvas){_8.style(div.getEventSource(),"opacity",op);}else{div.getEventSource().setAttribute("opacity",op);}}}this.opacity=op;if(!_4a0){this.onOpacityChange(op);}}},setRenderer:function(ren){this.renderer=ren;}});_8.declare("esri.layers.GraphicsLayer",esri.layers._GraphicsLayer,{constructor:function(){this.enableMouseEvents=_8.hitch(this,this.enableMouseEvents);this.disableMouseEvents=_8.hitch(this,this.disableMouseEvents);this._processEvent=_8.hitch(this,this._processEvent);this._initLayer();},_initLayer:function(){this.loaded=true;this.onLoad(this);},_setMap:function(){var d=this.inherited("_setMap",arguments);this.enableMouseEvents();return d;},_unsetMap:function(){this.disableMouseEvents();this.inherited("_unsetMap",arguments);},_processEvent:function(evt){var _4a6=this._map,g=this.graphics,gl=g.length;evt.screenPoint=new esri.geometry.Point(evt.pageX-_4a6.position.x,evt.pageY-_4a6.position.y);evt.mapPoint=_4a6.toMap(evt.screenPoint);var i,es,gr,ds,_4a7=evt.target,_4a8=_4a7.parentNode;for(i=0;i<gl;i++){gr=g[i];ds=gr.getDojoShape();if(ds){es=ds.getEventSource();if(es===_4a7||es===_4a8){evt.graphic=gr;return evt;}}}},_onMouseOverHandler:function(evt){if(this._processEvent(evt)){this.onMouseOver(evt);}},_onMouseMoveHandler:function(evt){if(this._processEvent(evt)){this.onMouseMove(evt);}},_onMouseDragHandler:function(evt){if(this._processEvent(evt)){this.onMouseDrag(evt);}},_onMouseOutHandler:function(evt){if(this._processEvent(evt)){this.onMouseOut(evt);}},_onMouseDownHandler:function(evt){this._downGr=this._downPt=null;if(this._processEvent(evt)){_8.disconnect(this._onmousemove_connect);_8.disconnect(this._onmousedrag_connect);this._onmousedrag_connect=_8.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseDragHandler");this._downGr=evt.graphic;this._downPt=evt.screenPoint.x+","+evt.screenPoint.y;this.onMouseDown(evt);}},_onMouseUpHandler:function(evt){this._upGr=this._upPt=null;if(this._processEvent(evt)){_8.disconnect(this._onmousedrag_connect);_8.disconnect(this._onmousemove_connect);this._onmousemove_connect=_8.connect(this._div.getEventSource(),"onmousemove",this,"_onMouseMoveHandler");this._upGr=evt.graphic;this._upPt=evt.screenPoint.x+","+evt.screenPoint.y;this.onMouseUp(evt);}},_onClickHandler:function(evt){if(this._processEvent(evt)){var _4a9=this._downGr,upGr=this._upGr;if(_4a9&&upGr&&_4a9===upGr&&this._downPt===this._upPt){if(_8.isIE<9){esri.layers.GraphicsLayer._clicked=evt.graphic;}this.onClick(evt);}}},_onDblClickHandler:function(evt){if(this._processEvent(evt)){this.onDblClick(evt);}},onMouseOver:function(){},onMouseMove:function(){},onMouseDrag:function(){},onMouseOut:function(){},onMouseDown:function(){},onMouseUp:function(){},onClick:function(){},onDblClick:function(){},enableMouseEvents:function(){if(this._mouseEvents){return;}var dc=_8.connect,gc=this._div.getEventSource();if(_a.gfx.renderer!=="canvas"){this._onmouseover_connect=dc(gc,"onmouseover",this,"_onMouseOverHandler");this._onmousemove_connect=dc(gc,"onmousemove",this,"_onMouseMoveHandler");this._onmouseout_connect=dc(gc,"onmouseout",this,"_onMouseOutHandler");this._onmousedown_connect=dc(gc,"onmousedown",this,"_onMouseDownHandler");this._onmouseup_connect=dc(gc,"onmouseup",this,"_onMouseUpHandler");this._onclick_connect=dc(gc,"onclick",this,"_onClickHandler");this._ondblclick_connect=dc(gc,"ondblclick",this,"_onDblClickHandler");}this._mouseEvents=true;},disableMouseEvents:function(){if(!this._mouseEvents){return;}var ddc=_8.disconnect;ddc(this._onmouseover_connect);ddc(this._onmousemove_connect);ddc(this._onmousedrag_connect);ddc(this._onmouseout_connect);ddc(this._onmousedown_connect);ddc(this._onmouseup_connect);ddc(this._onclick_connect);ddc(this._ondblclick_connect);this._mouseEvents=false;}});}if(!_8._hasResource["esri._coremap"]){_8._hasResource["esri._coremap"]=true;_8.provide("esri._coremap");_8.declare("esri._CoreMap",null,(function(){var _4aa=esri.geometry.toMapPoint,_4ab=esri.geometry.toScreenPoint,dc=_8.connect,ddc=_8.disconnect,dh=_8.hitch,ds=_8.style,iOf=_8.indexOf,_4ac=_8.mixin,_4ad=esri.geometry.Point,_4ae=esri.geometry.Extent,_4af=esri.layers.GraphicsLayer,Rect=esri.geometry.Rect,uid=0,_4b0=esri.config.defaults.map;var _4b1=1000000,_4b2=0.75,_4b3=0.25,_4b4=3,_4b5=20,_4b6=40;function _4b7(_4b8,_4b9){var lods=_4b8.lods;lods.sort(function(l1,l2){if(l1.scale>l2.scale){return -1;}else{if(l1.scale<l2.scale){return 1;}}return 0;});var _4ba=[];lods=_8.filter(lods,function(l){if(iOf(_4ba,l.scale)===-1){_4ba.push(l.scale);return true;}});var pl=(_4b9.lods=[]),l;_8.forEach(lods,function(lod,_4bb){l=(pl[_4bb]=new esri.layers.LOD(lod));l.level=_4bb;});_4b9.tileInfo=new esri.layers.TileInfo(_4ac(_4b8,{lods:pl}));};return {resizeDelay:300,constructor:function(_4bc,_4bd){_4ac(this,{_internalLayerIds:[],_layers:[],_layerDivs:[],_layerSize:0,_clickHandles:[],_connects:[]});_4ac(this,{_zoomAnimDiv:null,_zoomAnim:null,_layersDiv:null,_firstLayerId:null,_delta:null,_gc:null,_cursor:null,_ratioW:1,_ratioH:1,_params:null});_4ac(this,{cursor:null,layerIds:[],graphicsLayerIds:[],graphics:null,loaded:false});_4ac(this,{__panning:false,__zooming:false,__container:null,root:null,__LOD:null,__tileInfo:null,__visibleRect:null,__visibleDelta:null});var cont=(this.container=_8.byId(_4bc));var id=(this.id=_8.attr(cont,"id")||_9.getUniqueId(this.declaredClass));_8.addClass(cont,"map");var box=_8.contentBox(cont),dac=_8.addClass,dcr=_8.create;this.position=new _4ad(0,0);this._reposition();var _4be=(this.width=(box.w||_4b0.width));var _4bf=(this.height=box.h||_4b0.height);if(box.w===0){ds(cont,"width",_4be+"px");}if(box.h===0){ds(cont,"height",_4bf+"px");}var _4c0=(this.root=dcr("div",{id:id+"_root",style:{width:_4be+"px",height:_4bf+"px"}}));dac(_4c0,"container");var _4c1=(this.__container=dcr("div",{id:id+"_container"},_4c0));ds(_4c1,"position","absolute");dac(_4c1,"container");cont.appendChild(_4c0);var _4c2=(this._params=_4ac({slider:true,nav:false,extent:null,layer:null,scales:null,showInfoWindowOnClick:true,displayGraphicsOnPan:true,lods:null,tileInfo:null,wrapAround180:false,fitExtent:false},_4bd||{}));this.wrapAround180=_4c2.wrapAround180;if(esri._isDefined(_4c2.resizeDelay)){this.resizeDelay=_4c2.resizeDelay;}if(_4c2.lods){_4b7({rows:512,cols:512,dpi:96,format:"JPEG",compressionQuality:75,origin:{x:-180,y:90},spatialReference:{wkid:4326},lods:_4c2.lods},_4c2);this.__tileInfo=_4c2.tileInfo;}var ext=(this.extent=_4c2.extent);this.spatialReference=(ext&&ext.spatialReference)?ext.spatialReference:null;this.__visibleRect=new Rect(0,0,_4be,_4bf);this.__visibleDelta=new Rect(0,0,_4be,_4bf);var _4c3=(this._layersDiv=dcr("div",{id:id+"_layers"}));dac(_4c3,"layersDiv");_4c1.appendChild(_4c3);this._zoomAnimDiv=dcr("div",{style:{position:"absolute"}});if(_4c2.infoWindow){this.infoWindow=_4c2.infoWindow;}else{var iw=(this.infoWindow=new esri.dijit.InfoWindow({map:this,title:"",id:id+"_infowindow"},dcr("div",null,_4c0)));iw.startup();iw._ootb=true;ds(iw.domNode,"zIndex",_4b6);}this._zoomStartHandler=dh(this,this._zoomStartHandler);this._zoomingHandler=dh(this,this._zoomingHandler);this._zoomEndHandler=dh(this,this._zoomEndHandler);this._panningHandler=dh(this,this._panningHandler);this._panEndHandler=dh(this,this._panEndHandler);this._endTranslate=dh(this,this._endTranslate);_8.addOnWindowUnload(this,this.destroy);},_cleanUp:function(){var iw=this.infoWindow;if(iw){if(iw._ootb){iw.destroy();}else{iw.unsetMap(this);}delete this.infoWindow;}var cons=this._connects,i;for(i=cons.length-1;i>=0;i--){ddc(cons[i]);delete cons[i];}ddc(this._tsTimeExtentChange_connect);this.setInfoWindowOnClick(false);_8.destroy(this.root);this.root=null;},_addLayer:function(_4c4,_4c5,_4c6){var id=(_4c4.id=_4c4.id||(_4c4 instanceof _4af?_4b0.graphicsLayerNamePrefix:_4b0.layerNamePrefix)+(uid++));this._layers[id]=_4c4;var i;if(_4c5===this.layerIds||_4c5===this.graphicsLayerIds){i=this._layerSize;this._layerSize++;}_4c6=(_4c6===undefined||_4c6<0||_4c6>_4c5.length)?_4c5.length:_4c6;if(i===0){this._firstLayerId=id;}_4c5.splice(_4c6,0,id);var _4c7=dh(this,this._addLayerHandler),self=this,_4c8=this._connects,_4c9=function(){if(_4c4.loaded){_4c7(_4c4);}else{self[id+"_addtoken_load"]=dc(_4c4,"onLoad",self,"_addLayerHandler");self[id+"_addtoken_err"]=dc(_4c4,"onError",self,function(_4ca){_4c7(_4c4,_4ca,_4c5);});}};if(this.loaded||i===0||(_4c4.loaded&&iOf(this.graphicsLayerIds,id)===-1)){_4c9();}else{_4c8.push(dc(this,"onLoad",_4c9));}return _4c4;},_addLayerHandler:function(_4cb,_4cc,_4cd){var id=this.id,_4ce=_4cb.id,_4cf=iOf(_4cb instanceof _4af?this.graphicsLayerIds:this.layerIds,_4ce),_4d0=_4cf,_4d1=false,_4d2=this._params;ddc(this[_4ce+"_addtoken_load"]);ddc(this[_4ce+"_addtoken_err"]);if(_4cc){delete this._layers[_4ce];if(_4cf!==-1){_4cd.splice(_4cf,1);this.onLayerAddResult(_4cb,_4cc);}return;}if(_4cf===-1){_4cf=iOf(this._internalLayerIds,_4ce);_4d0=_4b5+_4cf;_4d1=true;}if(_4cb instanceof _4af){var _4d3=_4cb._setMap(this,this._gc._surface);_4d3.id=id+"_"+_4ce;this._layerDivs[_4ce]=_4d3;this._reorderLayers(this.graphicsLayerIds);if(_4d2.showInfoWindowOnClick){this._clickHandles.push(dc(_4cb,"onClick",this,"_gClickHandler"));}}else{var _4d4=_4cb._setMap(this,this._layersDiv,_4d0,this.__LOD);_4d4.id=id+"_"+_4ce;this._layerDivs[_4ce]=_4d4;this._reorderLayers(this.layerIds);if(!_4d1&&_4cb.declaredClass.indexOf("VETiledLayer")!==-1){this._onBingLayerAdd(_4cb);}}if(_4ce===this._firstLayerId){this.spatialReference=this.spatialReference||_4cb.spatialReference;var _4d5=this.spatialReference;this.wrapAround180=(this.wrapAround180&&_4d5&&_4d5._isWrappable())?true:false;if(_4cb.tileInfo){if(!this.__tileInfo){_4b7(_4ac({},_4cb.tileInfo),_4d2);this.__tileInfo=_4d2.tileInfo;}else{var lods=this.__tileInfo.lods;this.__tileInfo=_4ac({},_4cb.tileInfo);this.__tileInfo.lods=lods;}}if(this.wrapAround180){var _4d6=this.__tileInfo,info=_4d5._getInfo();if(!_4d6||Math.abs(info.origin[0]-_4d6.origin.x)>info.dx){this.wrapAround180=false;}if(this.wrapAround180&&_4d6){esri.TileUtils._addFrameInfo(_4d6,info);}}_4d2.units=_4cb.units;this._gc=new esri.layers._GraphicsContainer();var gc=this._gc._setMap(this,this._layersDiv);gc.id=id+"_gc";this.graphics=new _4af({id:id+"_graphics",displayOnPan:_4d2.displayGraphicsOnPan});this._addLayer(this.graphics,this._internalLayerIds,_4b5);}if(_4cb===this.graphics){if(this.extent){var x=this._fixExtent(this.extent,_4d2.fitExtent);this.extent=x.extent;this.__LOD=x.lod;}var fli=this._firstLayerId;this._firstLayerId=null;this.__setExtent(this.extent||new _4ae(this._layers[fli].initialExtent),null,null,_4d2.fitExtent);this.loaded=true;this.infoWindow.setMap(this);this.onLoad(this);}if(!_4d1){this.onLayerAdd(_4cb);this.onLayerAddResult(_4cb);}ddc(this[_4ce+"_addLayerHandler_connect"]);},_reorderLayers:function(_4d7){var _4d8=this.onLayerReorder,djp=_8.place,_4d9=this._layerDivs,_4da=this._layers,gcES=this._gc?this._gc._surface.getEventSource():null;if(_4d7===this.graphicsLayerIds){_8.forEach(_4d7,function(id,i){var _4db=_4d9[id];if(_4db){djp(_4db.getEventSource(),gcES,i);_4d8(_4da[id],i);}});}else{var g=this.graphics,gId=g?g.id:null,_4dc=this._layersDiv,_4dd;_8.forEach(_4d7,function(id,i){_4dd=_4d9[id];if(id!==gId&&_4dd){djp(_4dd,_4dc,i);_4d8(_4da[id],i);}});if(gcES){gcES=esri.vml?gcES.parentNode:gcES;djp(gcES,gcES.parentNode,_4d7.length);}}this.onLayersReordered([].concat(_4d7));},_zoomStartHandler:function(){this.__zoomStart(this._zoomAnimDiv.startingExtent,this._zoomAnimDiv.anchor);},_zoomingHandler:function(rect){var rl=parseFloat(rect.left),rt=parseFloat(rect.top),_4de=new _4ae(rl,rt-parseFloat(rect.height),rl+parseFloat(rect.width),rt,this.spatialReference),_4df=this.extent.getWidth()/_4de.getWidth();this.__zoom(_4de,_4df,this._zoomAnimDiv.anchor);},_zoomEndHandler:function(){var _4e0=this._zoomAnimDiv,_4e1=_4e0.extent,_4e2=this.extent.getWidth()/_4e1.getWidth();var _4e3=_4e0.anchor,_4e4=_4e0.newLod,_4e5=_4e0.levelChange;_4e0.extent=_4e0.anchor=_4e0.levelChange=_4e0.startingExtent=_4e0.newLod=this._delta=this._zoomAnim=null;this.__zoomEnd(_4e1,_4e2,_4e3,_4e4,_4e5);},_panningHandler:function(_4e6){if(isNaN(parseFloat(_4e6.left))||isNaN(parseFloat(_4e6.top))){var _4e7=Math.round,_4e8=_8.style,node=this._panAnim.node;_4e6.left=(-1*(this._delta.x-_4e7(this.width/2)))+"px";_4e6.top=(-1*(this._delta.y-_4e7(this.height/2)))+"px";_4e8(node,"left",_4e6.left);_4e8(node,"top",_4e6.top);}var d=new _4ad(parseFloat(_4e6.left),parseFloat(_4e6.top)),dm=this.toMap(d);this.onPan(this.extent.offset(dm.x,dm.y),d);},_panEndHandler:function(node){this.__panning=false;var _4e9=Math.round,_4ea=new _4ad(-_4e9(parseFloat(node.style.left)),-_4e9(parseFloat(node.style.top))),dx=_4ea.x,dy=_4ea.y,_4eb=this.__visibleRect,_4ec=this.__visibleDelta;_4eb.x+=-dx;_4eb.y+=-dy;_4ec.x+=-dx;_4ec.y+=-dy;ds(this._zoomAnimDiv,{left:"0px",top:"0px"});var _4ed=this.extent,rw=this._ratioW,rh=this._ratioH;_4ed=(this.extent=new _4ae(_4ed.xmin+(dx/rw),_4ed.ymin-(dy/rh),_4ed.xmax+(dx/rw),_4ed.ymax-(dy/rh),this.spatialReference));_4ea.setX(-_4ea.x);_4ea.setY(-_4ea.y);this._delta=this._panAnim=null;this.onPanEnd(_4ed,_4ea);this.onExtentChange(_4ed,_4ea,false,this.__LOD);},_fixExtent:function(_4ee,fit){var _4ef=this._reshapeExtent(_4ee),_4f0=1+_4b3;while(fit===true&&(_4ef.extent.getWidth()<_4ee.getWidth()||_4ef.extent.getHeight()<_4ee.getHeight())&&_4ef.lod.level>0&&_4f0<=_4b4){_4ef=this._reshapeExtent(_4ee.expand(_4f0));_4f0+=_4b3;}return _4ef;},_getFrameWidth:function(){var _4f1=-1,info=this.spatialReference._getInfo();if(this.__LOD){var _4f2=this.__LOD._frameInfo;if(_4f2){_4f1=_4f2[3];}}else{if(info){_4f1=Math.round((2*info.valid[1])/(this.extent.getWidth()/this.width));}}return _4f1;},_reshapeExtent:function(_4f3){var w=_4f3.getWidth(),h=_4f3.getHeight(),r=w/h,_4f4=this.width/this.height,dw=0,dh=0;if(this.width>this.height){if(w>h){if(_4f4>r){dw=(h*_4f4)-w;}else{dh=(w/_4f4)-h;}}else{if(w<h){dw=(h*_4f4)-w;}else{dw=(h*_4f4)-w;}}}else{if(this.width<this.height){if(w>h){dh=(w/_4f4)-h;}else{if(w<h){if(_4f4>r){dw=(h*_4f4)-w;}else{dh=(w/_4f4)-h;}}else{dh=(w/_4f4)-h;}}}else{if(w<h){dw=h-w;}else{if(w>h){dh=(w/_4f4)-h;}}}}if(dw){_4f3.xmin-=dw/2;_4f3.xmax+=dw/2;}if(dh){_4f3.ymin-=dh/2;_4f3.ymax+=dh/2;}return this._getAdjustedExtent(_4f3);},_getAdjustedExtent:function(_4f5){if(this.__tileInfo){return esri.TileUtils.getCandidateTileInfo(this,this.__tileInfo,_4f5);}else{return {extent:_4f5};}},_fixedPan:function(dx,dy){this._extentUtil(null,{dx:dx,dy:dy});},_gClickHandler:function(evt){var _4f6=evt.graphic,iw=this.infoWindow;if(_4f6._getEffInfoTemplate()&&iw){_8.stopEvent(evt);var _4f7=_4f6.geometry,_4f8=(_4f7&&_4f7.type==="point")?_4f7:evt.mapPoint;iw.setTitle(_4f6.getTitle());iw.setContent(_4f6.getContent());iw.show(_4f8);}},_onBingLayerAdd:function(_4f9){this["__"+_4f9.id+"_vis_connect"]=_8.connect(_4f9,"onVisibilityChange",this,"_toggleBingLogo");this._toggleBingLogo(_4f9.visible);},_onBingLayerRemove:function(_4fa){_8.disconnect(this["__"+_4fa.id+"_vis_connect"]);delete this["__"+_4fa.id+"_vis_connect"];var _4fb=this.layerIds;var _4fc=_8.some(_4fb,function(_4fd){var _4fe=this._layers[_4fd];return _4fe&&_4fe.visible&&_4fe.declaredClass.indexOf("VETiledLayer")!==-1;},this);this._toggleBingLogo(_4fc);},_toggleBingLogo:function(_4ff){if(_4ff&&!this._bingLogo){var _500={left:(this._mapParams&&this._mapParams.nav?"25px":"")};if(_8.isIE===6){_500.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='"+_8.moduleUrl("esri","../../images/map/logo-med.png")+"')";}var _501=this._bingLogo=_8.create("div",{style:_500},this.root);_8.addClass(_501,"bingLogo-lg");}else{if(!_4ff&&this._bingLogo){_8.destroy(this._bingLogo);delete this._bingLogo;}}},__panStart:function(x,y){var _502=this._zoomAnim,_503=this._panAnim;if(_502&&_502._active){_502.stop();_502._fire("onEnd",[_502.node]);}else{if(_503&&_503._active){_503.stop();this._panAnim=null;var rect=_503.curve.getValue(_503._getStep()),rl=Math.round(parseFloat(rect.left)),rt=Math.round(parseFloat(rect.top)),drag=this._dragOrigin;this.__pan(rl,rt);if(drag){drag.x-=rl;drag.y-=rt;}return;}}this.__panning=true;this.onPanStart(this.extent,new _4ad(x,y));},__pan:function(dx,dy){var _504=this.extent,rw=this._ratioW,rh=this._ratioH;this.onPan(new _4ae(_504.xmin-(dx/rw),_504.ymin+(dy/rh),_504.xmax-(dx/rw),_504.ymax+(dy/rh),this.spatialReference),new _4ad(dx,dy));},__panEnd:function(dx,dy){var _505=this.__visibleRect,_506=this.__visibleDelta;_505.x+=dx;_505.y+=dy;_506.x+=dx;_506.y+=dy;var d=new _4ad(dx,dy),_507=this.extent,rw=this._ratioW,rh=this._ratioH;_507=(this.extent=new _4ae(_507.xmin-(dx/rw),_507.ymin+(dy/rh),_507.xmax-(dx/rw),_507.ymax+(dy/rh),this.spatialReference));this.__panning=false;this.onPanEnd(_507,d);this.onExtentChange(_507,d,false,this.__LOD);},__zoomStart:function(_508,_509){this.__zooming=true;this.onZoomStart(_508,1,_509,this.__LOD?this.__LOD.level:null);},__zoom:function(_50a,_50b,_50c){this.onZoom(_50a,_50b,_50c);},__zoomEnd:function(_50d,_50e,_50f,lod,_510){ds(this._layersDiv,{left:"0px",top:"0px"});this._delta=new _4ad(0,0);this.__visibleRect.x=(this.__visibleRect.y=0);_50d=(this.extent=new _4ae(_50d));this.__LOD=lod;this._ratioW=this.width/_50d.getWidth();this._ratioH=this.height/_50d.getHeight();var _511=this._delta;this._delta=null;this.__zooming=false;this.onZoomEnd(_50d,_50e,_50f,lod?lod.level:null);this.onExtentChange(_50d,_511,_510,lod);},_extentUtil:function(zoom,pan,_512,fit,_513){var _514,_515,_516,_517,_518,_519,dx,dy,_51a=this.width,_51b=this.height;if(zoom){_514=zoom.numLevels;_515=zoom.targetLevel;_516=zoom.factor;_517=zoom.mapAnchor;_518=zoom.screenAnchor;_519=zoom.mapCenter;}if(pan){dx=pan.dx;dy=pan.dy;_519=pan.mapCenter;}var _51c=this._panAnim,_51d=this._stopAnim(),_51e=_51d?_51d.divExtent:this.extent,_51f=this.__tileInfo,xmin,ymin,ewd,eht;if(_51c&&_517&&_518){_517=_4aa(this.extent,_51a,_51b,_518);}if(_51d&&_517&&_518){_517=_4aa(_51d.divExtent,_51a,_51b,_518);}if(esri._isDefined(_515)){if(_51f){var _520=this.getNumLevels()-1;if(_515<0){_515=0;}else{if(_515>_520){_515=_520;}}_514=_515-(_51d?_51d.level:this.getLevel());}else{_514=_515>0?-1:1;}}if(_512){}else{if(esri._isDefined(_514)){var size;if(_51f){var _521=_51d?_51d.level:this.getLevel();size=this.__getExtentForLevel(_521+_514,_519,_51e).extent;}else{var temp=_51d?_51d.end:this.extent;size=temp.expand(_514>0?0.5*_514:2*-_514);}if(size){if(_519){_512=size;}else{var _522=_517||_51e.getCenter(),ymax=_51e.ymax-((size.getHeight()-_51e.getHeight())*(_522.y-_51e.ymax)/_51e.getHeight());xmin=_51e.xmin-((size.getWidth()-_51e.getWidth())*(_522.x-_51e.xmin)/_51e.getWidth());_512=new _4ae(xmin,ymax-size.getHeight(),xmin+size.getWidth(),ymax,this.spatialReference);}}}else{if(esri._isDefined(_516)){_512=_51e.expand(_516);}else{if(dx||dy){if(_51d){var end=_51d.end,c1=end.getCenter(),c2=_4ab(end,_51a,_51b,c1);c2.x+=dx;c2.y+=dy;c2=_4aa(end,_51a,_51b,c2);_512=end.offset(c2.x-c1.x,c2.y-c1.y);}else{var _523=new _4ad((_51a/2)+dx,(_51b/2)+dy),_524=_4aa(_51e,_51a,_51b,_523);ewd=_51e.getWidth();eht=_51e.getHeight();xmin=_524.x-(ewd/2);ymin=_524.y-(eht/2);_512=new _4ae(xmin,ymin,xmin+ewd,ymin+eht);}}}}}if(!_512){if(_519){var ext=_51d?_51d.end:_51e;ewd=ext.getWidth();eht=ext.getHeight();xmin=_519.x-(ewd/2);ymin=_519.y-(eht/2);_512=new _4ae(xmin,ymin,xmin+ewd,ymin+eht);}else{if(_51d){_512=_51d.end;}}}if(_512){this.__setExtent(_512,null,_518,fit,_51d,_513);}},__setExtent:function(_525,_526,_527,fit,_528,_529){try{if(this._firstLayerId){this.extent=_525;return;}var _52a=true,ext=_528?_528.divExtent:this.extent,_52b=this._fixExtent(_525,fit||false);_525=_52b.extent;var _52c=_525.getWidth(),_52d=_525.getHeight(),_52e=Math.round;if(ext){var tw=_52e(ext.getWidth()*_4b1),w=_52e(_52c*_4b1),th=_52e(ext.getHeight()*_4b1),h=_52e(_52d*_4b1);_52a=(tw!==w)||(th!==h);}var _52f,end,_530,_531,_532=_528&&_528.rect,_533=_528&&_528.divExtent;if(_4b0.zoomDuration&&_52a&&ext){_533=_533||new _4ae(ext);_532=_532||{left:ext.xmin,top:ext.ymax,width:ext.getWidth(),height:ext.getHeight()};end={left:_525.xmin,top:_525.ymax,width:_52c,height:_52d};_530=_532.width/end.width;_531=_532.height/end.height;var mtl=new _4ad(_525.xmin,_525.ymax),mbl=new _4ad(_525.xmin,_525.ymin),etl=new _4ad(this.extent.xmin,this.extent.ymax),ebl=new _4ad(this.extent.xmin,this.extent.ymin);_52f=esri.geometry.getLineIntersection(etl,mtl,ebl,mbl);if(!_52f&&!_528){_52a=false;}}this._ratioW=this.width/_52c;this._ratioH=this.height/_52d;var _534=this._zoomAnimDiv;if(_52a){ds(this._layersDiv,{left:"0px",top:"0px"});_526=new _4ad(0,0);this.__visibleRect.x=(this.__visibleRect.y=0);if(_532&&end){this._delta=_526;_534.id="_zAD";_534.startingExtent=_533;_534.extent=_525;_534.levelChange=_52a;_534.newLod=_52b.lod;if(_527){_534.anchor=_527;}else{if(!_52f&&_528){_534.anchor=_528.anchor;}else{_534.anchor=_4ab(this.extent,this.width,this.height,_52f);}}this._zoomAnim=esri.fx.resize({node:_534,start:_532,end:end,duration:_4b0.zoomDuration,rate:_4b0.zoomRate,beforeBegin:!_528?this._zoomStartHandler:null,onAnimate:this._zoomingHandler,onEnd:this._zoomEndHandler}).play();this._fireOnScale(this.extent.getWidth()/_525.getWidth(),_534.anchor);}else{this.extent=_525;this.onExtentChange(this.extent,_526,_52a,(this.__LOD=_52b.lod));}}else{if(!this.__panning){if(this.loaded===false||_529){this.extent=_525;this.onExtentChange(this.extent,_526,_52a,(this.__LOD=_52b.lod));}else{this.__panning=true;_532=new Rect(0,0,this.width,this.height,this.spatialReference).getCenter();_532.x=_52e(_532.x);_532.y=_52e(_532.y);this.onPanStart(this.extent,new _4ad(0,0));var _535=(this._delta=this.toScreen(_525.getCenter()));this._panAnim=esri.fx.slideTo({node:_534,left:_532.x-_535.x,top:_532.y-_535.y,duration:_4b0.panDuration,rate:_4b0.panRate,onAnimate:this._panningHandler,onEnd:this._panEndHandler});this._panAnim.play();}}}}catch(e){console.log(e.stack);console.error(e);}},_fireOnScale:function(_536,_537,_538){if(this.navigationMode==="css-transforms"){var vd=this.__visibleDelta;this.onScale(_a.gfx.matrix.scaleAt(_536,{x:-1*((this.width/2)-(_537.x-vd.x)),y:-1*((this.height/2)-(_537.y-vd.y))}),_538);}},_stopAnim:function(){var _539=this._zoomAnim,_53a=this._panAnim;if(_539&&_539._active){_539.stop();var rect=_539.curve.getValue(_539._getStep()),rl=parseFloat(rect.left),rt=parseFloat(rect.top),node=_539.node;return {anchor:node.anchor,start:node.startingExtent,end:node.extent,level:node.newLod&&node.newLod.level,rect:rect,divExtent:new _4ae(rl,rt-parseFloat(rect.height),rl+parseFloat(rect.width),rt,this.spatialReference)};}else{if(_53a&&_53a._active){_53a.stop();_53a._fire("onEnd",[_53a.node]);}}},__getExtentForLevel:function(_53b,_53c,_53d){var ti=this.__tileInfo;_53d=_53d||this.extent;_53c=_53c||_53d.getCenter();if(ti){var lods=ti.lods;if(_53b<0||_53b>=lods.length){return {};}var lod=lods[_53b],_53e=this.width*lod.resolution/2,_53f=this.height*lod.resolution/2;return {extent:new _4ae(_53c.x-_53e,_53c.y-_53f,_53c.x+_53e,_53c.y+_53f,_53c.spatialReference),lod:lod};}else{return {extent:_53d.expand(_53b).centerAt(_53c)};}},__scaleExtent:function(_540,_541,_542){var _543=_542||_540.getCenter();var _544=_540.expand(_541),xmin=_540.xmin-((_544.getWidth()-_540.getWidth())*(_543.x-_540.xmin)/_540.getWidth()),ymax=_540.ymax-((_544.getHeight()-_540.getHeight())*(_543.y-_540.ymax)/_540.getHeight());return new _4ae(xmin,ymax-_544.getHeight(),xmin+_544.getWidth(),ymax,_540.spatialReference);},_jobs:0,_incr:function(){if((++this._jobs)===1){this.updating=true;this.onUpdateStart();}},_decr:function(){var _545=--this._jobs;if(!_545){this.updating=false;this.onUpdateEnd();}else{if(_545<0){this._jobs=0;}}},onUpdateStart:function(){},onUpdateEnd:function(){},onLoad:function(){this._setClipRect();},onUnload:function(){},onExtentChange:function(a,b,_546){if(_546){this._setClipRect();}},onTimeExtentChange:function(){},onLayerAdd:function(){},onLayerAddResult:function(){},onLayersAddResult:function(){},onLayerRemove:function(){},onLayersRemoved:function(){},onLayerReorder:function(){},onLayersReordered:function(){},onPanStart:function(){},onPan:function(){},onPanEnd:function(){},onScale:function(){},onZoomStart:function(){},onZoom:function(){},onZoomEnd:function(){},onResize:function(){this._setClipRect();},onReposition:function(){},destroy:function(){if(!this._destroyed){this.removeAllLayers();this._cleanUp();if(this._gc){this._gc._cleanUp();}this._destroyed=true;this.onUnload(this);}},setCursor:function(_547){ds(this.__container,"cursor",(this.cursor=_547));},setMapCursor:function(c){this.setCursor((this._cursor=c));},resetMapCursor:function(){this.setCursor(this._cursor);},setInfoWindow:function(_548){var iw=this.infoWindow;if(iw){iw.unsetMap(this);}this.infoWindow=_548;if(this.loaded&&_548){_548.setMap(this);}},setInfoWindowOnClick:function(_549){var _54a=this._params;if(_549){if(!_54a.showInfoWindowOnClick){var _54b=[this.graphics].concat(_8.map(this.graphicsLayerIds,this.getLayer,this));_8.map(_54b,function(_54c){if(_54c&&_54c.loaded){this._clickHandles.push(dc(_54c,"onClick",this,"_gClickHandler"));}},this);}}else{_8.forEach(this._clickHandles,ddc);this._clickHandles=[];}_54a.showInfoWindowOnClick=_549;},getInfoWindowAnchor:function(pt){var w2=this.width/2,h2=this.height/2,_54d;if(pt.y<h2){_54d="LOWER";}else{_54d="UPPER";}if(pt.x<w2){return esri.dijit.InfoWindow["ANCHOR_"+_54d+"RIGHT"];}else{return esri.dijit.InfoWindow["ANCHOR_"+_54d+"LEFT"];}},toScreen:function(pt,_54e){return _4ab(this.extent,this.width,this.height,pt,_54e);},toMap:function(pt){return _4aa(this.extent,this.width,this.height,pt);},addLayer:function(_54f,_550){return this._addLayer(_54f,_54f instanceof _4af?this.graphicsLayerIds:this.layerIds,_550);},addLayers:function(_551){var _552=[],_553=_551.length,_554,i,len=_551.length;var _555=function(_556,_557){if(_8.indexOf(_551,_556)!==-1){_553--;_552.push({"layer":_556,"success":!_557,"error":_557});if(!_553){_8.disconnect(_554);this.onLayersAddResult(_552);}}};_554=_8.connect(this,"onLayerAddResult",_555);for(i=0;i<len;i++){this.addLayer(_551[i]);}return this;},removeLayer:function(_558){var id=_558.id,ids=_558 instanceof _4af?this.graphicsLayerIds:this.layerIds,i=iOf(ids,id);if(i>=0){ids.splice(i,1);if(_558 instanceof _4af){ddc(this["_gl_"+_558.id+"_click_connect"]);if(_558.loaded){_558._unsetMap(this,this._gc._surface);}}else{if(_558.loaded){_558._unsetMap(this,this._layersDiv);if(_558.declaredClass.indexOf("VETiledLayer")!==-1){this._onBingLayerRemove(_558);}}}delete this._layers[id];delete this._layerDivs[id];this._reorderLayers(ids);this.onLayerRemove(_558);}},removeAllLayers:function(){var ids=this.layerIds,i;for(i=ids.length-1;i>=0;i--){this.removeLayer(this._layers[ids[i]]);}ids=this.graphicsLayerIds;for(i=ids.length-1;i>=0;i--){this.removeLayer(this._layers[ids[i]]);}this.onLayersRemoved();},reorderLayer:function(_559,_55a){if(_8.isString(_559)){_8.deprecated(this.declaredClass+": "+esri.bundle.map.deprecateReorderLayerString,null,"v2.0");_559=this.getLayer(_559);}var id=_559.id,ids=_559 instanceof _4af?this.graphicsLayerIds:this.layerIds;if(_55a<0){_55a=0;}else{if(_55a>=ids.length){_55a=ids.length-1;}}var i=iOf(ids,id);if(i===-1||i===_55a){return;}ids.splice(i,1);ids.splice(_55a,0,id);this._reorderLayers(ids);},getLayer:function(id){return this._layers[id];},setExtent:function(_55b,fit){_55b=new esri.geometry.Extent(_55b.toJson());var _55c=_55b.getWidth(),_55d=_55b.getHeight();if(_55c===0&&_55d===0){this.centerAt(new esri.geometry.Point({x:_55b.xmin,y:_55b.ymin,spatialReference:_55b.spatialReference&&_55b.spatialReference.toJson()}));}else{this._extentUtil(null,null,_55b,fit);}},centerAt:function(_55e){this._extentUtil(null,{mapCenter:_55e});},centerAndZoom:function(_55f,_560){this._extentUtil({targetLevel:_560,mapCenter:_55f});},getNumLevels:function(){return this.__tileInfo?this.__tileInfo.lods.length:0;},getLevel:function(){return this.__LOD?this.__LOD.level:-1;},setLevel:function(_561){this._extentUtil({targetLevel:_561});},translate:function(dx,dy){dx=dx||0;dy=dy||0;if(!this._txTimer){this._tx=this._ty=0;var _562=this.toScreen(this.extent.getCenter());this.__panStart(_562.x,_562.y);}this._tx+=dx;this._ty+=dy;this.__pan(this._tx,this._ty);clearTimeout(this._txTimer);this._txTimer=setTimeout(this._endTranslate,150);},_endTranslate:function(){clearTimeout(this._txTimer);this._txTimer=null;var dx=this._tx,dy=this._ty;this._tx=this._ty=0;this.__panEnd(dx,dy);},setTimeExtent:function(_563){this.timeExtent=_563;var arg=_563?new esri.TimeExtent(_563.startTime,_563.endTime):null;this.onTimeExtentChange(arg);},setTimeSlider:function(_564){if(this.timeSlider){ddc(this._tsTimeExtentChange_connect);this._tsTimeExtentChange_connect=null;this.timeSlider=null;}if(_564){this.timeSlider=_564;this.setTimeExtent(_564.getCurrentTimeExtent());this._tsTimeExtentChange_connect=dc(_564,"onTimeExtentChange",this,"setTimeExtent");}},resize:function(_565){var self=this,_566=function(){clearTimeout(self._resizeT);self.reposition();self._resize();};clearTimeout(self._resizeT);if(_565===true){_566();}else{self._resizeT=setTimeout(_566,self.resizeDelay);}},_resize:function(){var w=this.width,h=this.height,box=_8.contentBox(this.container);if(w===box.w&&h===box.h){return;}var _567=this._zoomAnim||this._panAnim;if(_567){_567.stop();_567._fire("onEnd",[_567.node]);}ds(this.root,{width:(this.width=box.w)+"px",height:(this.height=box.h)+"px"});var wd=this.width,ht=this.height;this.__visibleRect.update(this.__visibleRect.x,this.__visibleRect.y,wd,ht);this.__visibleDelta.update(this.__visibleDelta.x,this.__visibleDelta.y,wd,ht);var r=esri.geometry._extentToRect(this.extent),ne=(esri.geometry._rectToExtent(new Rect(r.x,r.y,r.width*(wd/w),r.height*(ht/h),this.spatialReference)));this.onResize(ne,wd,ht);this._extentUtil(null,null,ne,null,true);},reposition:function(){this._reposition();this.onReposition(this.position.x,this.position.y);},_reposition:function(){var pos=_8.coords(this.container,true),brdr=_8._getPadBorderExtents(this.container);this.position.update(pos.x+brdr.l,pos.y+brdr.t);},_setClipRect:function(){delete this._clip;var _568=_8.isIE?"rect(auto,auto,auto,auto)":null;if(this.wrapAround180){var _569=this.width,_56a=this.height,_56b=this._getFrameWidth(),diff=_569-_56b;if(diff>0){var left=diff/2;_568="rect(0px,"+(left+_56b)+"px,"+_56a+"px,"+left+"px)";var _56c=this.extent.getWidth(),_56d=_56c*(_56b/_569);this._clip=[(_56c-_56d)/2,_56d];}}ds(this.__container,"clip",_568);},_getAvailExtent:function(){var _56e=this.extent,clip=this._clip;if(clip){if(!_56e._clip){var rect=new esri.geometry._extentToRect(_56e);rect.width=clip[1];rect.x=rect.x+clip[0];_56e._clip=rect.getExtent();}return _56e._clip;}return _56e;},panUp:function(){this._fixedPan(0,this.height*-_4b2);},panUpperRight:function(){this._fixedPan(this.width*_4b2,this.height*-_4b2);},panRight:function(){this._fixedPan(this.width*_4b2,0);},panLowerRight:function(){this._fixedPan(this.width*_4b2,this.height*_4b2);},panDown:function(){this._fixedPan(0,this.height*_4b2);},panLowerLeft:function(){this._fixedPan(this.width*-_4b2,this.height*_4b2);},panLeft:function(){this._fixedPan(this.width*-_4b2,0);},panUpperLeft:function(){this._fixedPan(this.width*-_4b2,this.height*-_4b2);},enableSnapping:function(_56f){if(!_56f){_56f={};}if(_56f.declaredClass==="esri.SnappingManager"){this.snappingManager=_56f;}else{this.snappingManager=new esri.SnappingManager(_8.mixin({map:this},_56f));}return this.snappingManager;},disableSnapping:function(){if(this.snappingManager){this.snappingManager.destroy();}this.snappingManager=null;}};}()));}if(!_8._hasResource["esri.touchcontainer"]){_8._hasResource["esri.touchcontainer"]=true;_8.provide("esri.touchcontainer");_8.declare("esri._MapContainer",esri._CoreMap,(function(){var _570=_8.connect,_571=_8.disconnect,_572=esri.geometry.Point;var _573=300;return {constructor:function(){this._onTouchStart_connect=_570(this.__container,"ontouchstart",this,this._onTouchStartHandler);this._gestureStartConnect=_570(this.__container,"ongesturestart",this,this._onGestureStartHandler);this._connects.push(_570(this.__container,"onmouseover",this,this._onMouseOverHandler));this._connects.push(_570(this.__container,"onmouseout",this,this._onMouseOutHandler));this._connects.push(_570(this.__container,"onmousedown",this,this._onMouseDownHandler));this._connects.push(_570(this.__container,"onmouseup",this,this._onMouseUpHandler));this._connects.push(_570(this.__container,"onclick",this,this._onClickHandler));this._endX=this._endY=0;this._firstTapOn=false;this._processDoubleTap=false;this._processMultiTouchTap=false;this._doubleTapTimeoutObject=false;this._doubleTapTimeout=_8.hitch(this,this._doubleTapTimeout);},_doubleTapTimeout:function(){this._firstTapOn=false;},_cleanUp:function(){var i;for(i=this._connects.length;i>=0;i--){_571(this._connects[i]);delete this._connects[i];}_571(this._onTouchMoveHandler_connect);_571(this._onTouchEndHandler_connect);_571(this._onTouchCancelHandler_connect);this.inherited("_cleanUp",arguments);},__setClickDuration:function(dur){this._clickDuration=dur;},__resetClickDuration:function(){this._clickDuration=_573;},_processEvent:function(evt){if(evt.type.indexOf("touch")!==-1){if(evt.touches.length===2){evt.screenPoints=[new _572(evt.touches.item(0).pageX-this.position.x,evt.touches.item(0).pageY-this.position.y),new _572(evt.touches.item(1).pageX-this.position.x,evt.touches.item(1).pageY-this.position.y)];return evt;}else{if(evt.type==="touchstart"){evt.screenPoint=new _572(evt.targetTouches.item(0).pageX-this.position.x,evt.targetTouches.item(0).pageY-this.position.y);}else{evt.screenPoint=new _572(evt.changedTouches.item(0).pageX-this.position.x,evt.changedTouches.item(0).pageY-this.position.y);}evt.mapPoint=this.extent?this.toMap(evt.screenPoint):new _572();return evt;}}evt.screenPoint=new _572(evt.pageX-this.position.x,evt.pageY-this.position.y);evt.mapPoint=this.extent?this.toMap(evt.screenPoint):new _572();return evt;},_onClickHandler:function(evt){evt=this._processEvent(evt);var dx=Math.abs(this._endX-evt.screenPoint.x);var dy=Math.abs(this._endY-evt.screenPoint.y);if(esri.isBlackBerry){clearTimeout(this._doubleTapTimeoutObject);this._firstTapOn=false;if(!this._tmoved){this.onClick(evt);}}else{if(dx<=1&&dy<=1){var ts=(new Date()).getTime(),_574=this._clkTS&&((ts-this._clkTS)<=400),_575=_574&&Math.abs(this._lastClickX-evt.pageX),_576=_574&&Math.abs(this._lastClickY-evt.pageY);clearTimeout(this._doubleTapTimeoutObject);this._firstTapOn=false;this.onClick(evt);if(esri.isAndroid&&_574&&_575<=15&&_576<=15){this.onDblClick(evt);this._processDoubleTap=false;}}}},_onMouseOverHandler:function(evt){evt=this._processEvent(evt);this.onMouseOver(evt);},_onMouseOutHandler:function(evt){evt=this._processEvent(evt);this.onMouseOut(evt);},_onMouseDownHandler:function(evt){evt=this._processEvent(evt);this.onMouseDown(evt);},_onMouseUpHandler:function(evt){evt=this._processEvent(evt);this.onMouseUp(evt);},_onTouchStartHandler:function(evt){var _577;if(this._firstTapOn){if(esri.isBlackBerry){if(this._lastTouchEvent==="touchend"){this._processDoubleTap=true;clearTimeout(this._doubleTapTimeoutObject);this._firstTapOn=false;_577=1;}}else{this._processDoubleTap=true;clearTimeout(this._doubleTapTimeoutObject);this._firstTapOn=false;}}else{this._firstTapOn=true;this._doubleTapTimeoutObject=setTimeout(this._doubleTapTimeout,400);}this._lastTouchEvent="touchstart";evt=this._processEvent(evt);this._tmoved=false;_571(this._onTouchMoveHandler_connect);_571(this._onTouchEndHandler_connect);_571(this._onTouchCancelHandler_connect);this._onTouchMoveHandler_connect=_570(this.__container,"ontouchmove",this,this._onTouchMoveHandler);this._onTouchEndHandler_connect=_570(this.__container,"ontouchend",this,this._onTouchEndHandler);this._onTouchCancelHandler_connect=_570(this.__container,"ontouchcancel",this,this._onTouchEndHandler);this.onTouchStart(evt);if(_577){this._onTouchEndHandler(evt);}},_onTouchMoveHandler:function(evt){this._tmoved=true;this.onTouchMove(this._processEvent(evt));},_onTouchEndHandler:function(evt){_571(this._onTouchMoveHandler_connect);_571(this._onTouchEndHandler_connect);_571(this._onTouchCancelHandler_connect);this._lastTouchEvent="touchend";evt=this._processEvent(evt);var dx=Math.abs(this._endX-evt.screenPoint.x),dy=Math.abs(this._endY-evt.screenPoint.y);this._endX=evt.screenPoint.x;this._endY=evt.screenPoint.y;this.onTouchEnd(evt);if(this._processDoubleTap){if(dx<=15&&dy<=15){this.onDblClick(evt);}this._processDoubleTap=false;}},_onGestureStartHandler:function(evt){_571(this._onTouchStart_connect);_571(this._gestureStartConnect);_571(this._onTouchMoveHandler_connect);_571(this._onTouchEndHandler_connect);_571(this._onTouchCancelHandler_connect);this._processMultiTouchTap=true;this._onTouchMoveHandler_connect=_570(this.__container,"ontouchmove",this,this._onGestureTouchMoveHandler);this._onTouchEndHandler_connect=_570(this.__container,"ontouchend",this,this._onGestureTouchEndHandler);this._onTouchCancelHandler_connect=_570(this.__container,"ontouchcancel",this,this._onGestureTouchEndHandler);this.onGestureStart(this._processEvent(evt));},_onGestureTouchMoveHandler:function(evt){this._processMultiTouchTap=false;this.onGestureChange(this._processEvent(evt));},_onGestureTouchEndHandler:function(evt){_571(this._onTouchMoveHandler_connect);_571(this._onTouchEndHandler_connect);_571(this._onTouchCancelHandler_connect);this._onTouchStart_connect=_570(this.__container,"ontouchstart",this,this._onTouchStartHandler);this._gestureStartConnect=_570(this.__container,"ongesturestart",this,this._onGestureStartHandler);if(this._processMultiTouchTap){evt.processMultiTouchTap=true;this._processMultiTouchTap=false;}this.onGestureEnd(this._processEvent(evt));},onClick:function(evt){this._clkTS=(new Date()).getTime();this._lastClickX=evt.pageX;this._lastClickY=evt.pageY;},onMouseOver:function(){},onMouseOut:function(){},onMouseDown:function(){},onMouseUp:function(){},onTouchStart:function(){},onTouchMove:function(){},onTouchEnd:function(){},onGestureStart:function(){},onGestureChange:function(){},onGestureEnd:function(){}};}()));}if(!_8._hasResource["dojox.xml.parser"]){_8._hasResource["dojox.xml.parser"]=true;_8.provide("dojox.xml.parser");_a.xml.parser.parse=function(str,_578){var _579=_8.doc;var doc;_578=_578||"text/xml";if(str&&_8.trim(str)&&"DOMParser" in _8.global){var _57a=new DOMParser();doc=_57a.parseFromString(str,_578);var de=doc.documentElement;var _57b="http://www.mozilla.org/newlayout/xml/parsererror.xml";if(de.nodeName=="parsererror"&&de.namespaceURI==_57b){var _57c=de.getElementsByTagNameNS(_57b,"sourcetext")[0];if(_57c){_57c=_57c.firstChild.data;}throw new Error("Error parsing text "+de.firstChild.data+" \n"+_57c);}return doc;}else{if("ActiveXObject" in _8.global){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_8.some(dp,function(p){try{doc=new ActiveXObject(p);}catch(e){return false;}return true;});if(str&&doc){doc.async=false;doc.loadXML(str);var pe=doc.parseError;if(pe.errorCode!==0){throw new Error("Line: "+pe.line+"\n"+"Col: "+pe.linepos+"\n"+"Reason: "+pe.reason+"\n"+"Error Code: "+pe.errorCode+"\n"+"Source: "+pe.srcText);}}if(doc){return doc;}}else{if(_579.implementation&&_579.implementation.createDocument){if(str&&_8.trim(str)&&_579.createElement){var tmp=_579.createElement("xml");tmp.innerHTML=str;var _57d=_579.implementation.createDocument("foo","",null);_8.forEach(tmp.childNodes,function(_57e){_57d.importNode(_57e,true);});return _57d;}else{return _579.implementation.createDocument("","",null);}}}}return null;};_a.xml.parser.textContent=function(node,text){if(arguments.length>1){var _57f=node.ownerDocument||_8.doc;_a.xml.parser.replaceChildren(node,_57f.createTextNode(text));return text;}else{if(node.textContent!==undefined){return node.textContent;}var _580="";if(node){_8.forEach(node.childNodes,function(_581){switch(_581.nodeType){case 1:case 5:_580+=_a.xml.parser.textContent(_581);break;case 3:case 2:case 4:_580+=_581.nodeValue;}});}return _580;}};_a.xml.parser.replaceChildren=function(node,_582){var _583=[];if(_8.isIE){_8.forEach(node.childNodes,function(_584){_583.push(_584);});}_a.xml.parser.removeChildren(node);_8.forEach(_583,_8.destroy);if(!_8.isArray(_582)){node.appendChild(_582);}else{_8.forEach(_582,function(_585){node.appendChild(_585);});}};_a.xml.parser.removeChildren=function(node){var _586=node.childNodes.length;while(node.hasChildNodes()){node.removeChild(node.firstChild);}return _586;};_a.xml.parser.innerXML=function(node){if(node.innerXML){return node.innerXML;}else{if(node.xml){return node.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(node);}}}return null;};}if(!_8._hasResource["esri.layers.dynamic"]){_8._hasResource["esri.layers.dynamic"]=true;_8.provide("esri.layers.dynamic");_8.declare("esri.layers.DynamicMapServiceLayer",esri.layers.Layer,{constructor:function(url,_587){this.useMapTime=(_587&&_587.hasOwnProperty("useMapTime"))?(!!_587.useMapTime):true;var _588=_8.hitch;this._exportMapImageHandler=_588(this,this._exportMapImageHandler);this._imgSrcFunc=_588(this,this._imgSrcFunc);this._divAlphaImageFunc=_588(this,this._divAlphaImageFunc);this._tileLoadHandler=_588(this,this._tileLoadHandler);this._tileErrorHandler=_588(this,this._tileErrorHandler);},opacity:1,isPNG32:false,_setMap:function(map,_589,_58a){this._map=map;var d=(this._div=_8.create("div",null,_589)),_58b=esri._css.names,css={position:"absolute",width:map.width+"px",height:map.height+"px",overflow:"visible",opacity:this.opacity},isIE=_8.isIE,_58c=_8.connect,vd=map.__visibleDelta;if(isIE&&isIE>7){delete css.opacity;}if(map.navigationMode==="css-transforms"){css[_58b.transform]=esri._css.translate(vd.x,vd.y);_8.style(d,css);this._onScaleHandler_connect=_58c(map,"onScale",this,this._onScaleHandler);this._left=vd.x;this._top=vd.y;}else{css.left="0px";css.top="0px";_8.style(d,css);this._onZoomHandler_connect=_58c(map,"onZoom",this,"_onZoomHandler");this._left=this._top=0;}_8.style(d,css);this._onPanHandler_connect=_58c(map,"onPan",this,"_onPanHandler");this._onExtentChangeHandler_connect=_58c(map,"onExtentChange",this,"_onExtentChangeHandler");this._onResizeHandler_connect=_58c(map,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=_58c(this,"onOpacityChange",this,"_opacityChangeHandler");this._visibilityChangeHandler_connect=_58c(this,"onVisibilityChange",this,"_visibilityChangeHandler");this._toggleTime();this._layerIndex=_58a;this._img_loading=null;this._dragOrigin={x:0,y:0};if(!this.visible){this._visibilityChangeHandler(this.visible);}else{if(map.extent&&map.loaded){this._onExtentChangeHandler(map.extent);}}return d;},_unsetMap:function(map,_58d){if(_58d){this._div=_58d.removeChild(this._div);}_8.destroy(this._div);this._map=this._layerIndex=this._div=null;var _58e=_8.disconnect;_58e(this._onPanHandler_connect);_58e(this._onExtentChangeHandler_connect);_58e(this._onZoomHandler_connect);_58e(this._onScaleHandler_connect);_58e(this._onResizeHandler_connect);_58e(this._opacityChangeHandler_connect);_58e(this._visibilityChangeHandler_connect);this._toggleTime();},_onResizeHandler:function(_58f,_590,_591){_8.style(this._div,{width:_590+"px",height:_591+"px"});this._onExtentChangeHandler(_58f);},_visibilityChangeHandler:function(v){var _592=_8.connect,_593=_8.disconnect,map=this._map;this._toggleTime();if(v){this._onExtentChangeHandler(map.extent);this._onPanHandler_connect=_592(map,"onPan",this,"_onPanHandler");this._onExtentChangeHandler_connect=_592(map,"onExtentChange",this,"_onExtentChangeHandler");if(map.navigationMode==="css-transforms"){this._onScaleHandler_connect=_592(map,"onScale",this,this._onScaleHandler);}else{this._onZoomHandler_connect=_592(map,"onZoom",this,"_onZoomHandler");}}else{esri.hide(this._div);_593(this._onPanHandler_connect);_593(this._onExtentChangeHandler_connect);_593(this._onZoomHandler_connect);_593(this._onScaleHandler_connect);}},_toggleTime:function(){var map=this._map;if(this.timeInfo&&this.useMapTime&&map&&this.visible){if(!this._timeConnect){this._timeConnect=_8.connect(map,"onTimeExtentChange",this,this._onTimeExtentChangeHandler);}this._setTime(map.timeExtent);}else{_8.disconnect(this._timeConnect);this._timeConnect=null;this._setTime(null);}},_setTime:function(_594){if(this._params){this._params.time=_594?_594.toJson().join(","):null;}},_onPanHandler:function(_595,_596){this._panDx=_596.x;this._panDy=_596.y;var _597=this._dragOrigin,vd=this._map.__visibleDelta,img=this._img;if(img){if(this._map.navigationMode==="css-transforms"){this._left=vd.x+_596.x;this._top=vd.y+_596.y;_8.style(this._div,esri._css.names.transform,esri._css.translate(this._left,this._top));}else{_8.style(img,{left:(_597.x+_596.x)+"px",top:(_597.y+_596.y)+"px"});}}},_onExtentChangeHandler:function(_598,_599,_59a){if(!this.visible){return;}var _59b=this._map,_59c=this._img,_59d=_59c&&_59c.style,_59e=this._dragOrigin;if(_599&&!_59a&&_59c&&(_599.x!==this._panDx||_599.y!==this._panDy)){if(_59b.navigationMode==="css-transforms"){var vd=_59b.__visibleDelta;this._left=vd.x;this._top=vd.y;_8.style(this._div,esri._css.names.transform,esri._css.translate(this._left,this._top));}else{_8.style(_59c,{left:(_59e.x+_599.x)+"px",top:(_59e.y+_599.y)+"px"});}}if(_59c){_59e.x=parseInt(_59d.left,10);_59e.y=parseInt(_59d.top,10);}else{_59e.x=(_59e.y=0);}if(_59b.navigationMode==="css-transforms"){if(_59a&&_59c){_8.style(_59c,esri._css.names.transition,"none");_59c._multiply=_59c._multiply?_a.gfx.matrix.multiply(_59c._matrix,_59c._multiply):_59c._matrix;}}this._fireUpdateStart();var _59f=this._img_loading;if(_59f){_8.disconnect(_59f._onload_connect);_8.disconnect(_59f._onerror_connect);_8.disconnect(_59f._onabort_connect);_8.destroy(_59f);this._img_loading=null;var _5a0=this._jsonRequest;if(_5a0){try{_5a0.cancel();}catch(e){}this._jsonRequest=null;}}if(this.version>=10&&_59b.wrapAround180){_598=_598._normalize(true);}if(this.isPNG32){var div=(this._img_loading=_8.create("div"));div.id=_59b.id+"_"+this.id+"_"+new Date().getTime();_8.style(div,{position:"absolute",left:"0px",top:"0px",width:_59b.width+"px",height:_59b.height+"px"});var _5a1=div.appendChild(_8.create("div"));_8.style(_5a1,{opacity:0,width:_59b.width+"px",height:_59b.height+"px"});this.getImageUrl(_598,_59b.width,_59b.height,this._divAlphaImageFunc);div=null;}else{var img=(this._img_loading=_8.create("img")),_5a2=esri._css.names,isIE=_8.isIE,css={position:"absolute",width:_59b.width+"px",height:_59b.height+"px"};if(isIE&&isIE>7){css.opacity=this.opacity;}if(_59b.navigationMode==="css-transforms"){css[_5a2.transform]=esri._css.translate(-this._left,-this._top);img._tdx=-this._left;img._tdy=-this._top;css[_5a2.transition]=_5a2.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease";}else{css.left="0px";css.top="0px";}img.id=_59b.id+"_"+this.id+"_"+new Date().getTime();_8.style(img,css);img._onload_connect=_8.connect(img,"onload",this,"_onLoadHandler");img._onerror_connect=_8.connect(img,"onerror",this,"_onErrorHandler");img._onabort_connect=_8.connect(img,"onabort",this,"_onErrorHandler");this._startRect={left:_59e.x,top:_59e.y,width:_59c?parseInt(_59d.width,10):_59b.width,height:_59c?parseInt(_59d.height,10):_59b.height,zoom:(_59d&&_59d.zoom)?parseFloat(_59d.zoom):1};this.getImageUrl(_598,_59b.width,_59b.height,this._imgSrcFunc);img=null;}},_onTimeExtentChangeHandler:function(_5a3){if(!this.visible){return;}this._setTime(_5a3);this.refresh(true);},getImageUrl:function(_5a4,wd,ht,_5a5){},_imgSrcFunc:function(src){this._img_loading.src=src;},_divAlphaImageFunc:function(src){_8.style(this._img_loading,"filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')");this._onLoadHandler({currentTarget:this._img_loading});},_onLoadHandler:function(evt){var img=evt.currentTarget,_5a6=_8.disconnect,_5a7=this._map;_5a6(img._onload_connect);_5a6(img._onerror_connect);_5a6(img._onabort_connect);if(!_5a7||_5a7.__panning||_5a7.__zooming){_8.destroy(img);this._fireUpdateEnd();return;}_a.xml.parser.removeChildren(this._div);this._img=img;this._startRect={left:0,top:0,width:_5a7.width,height:_5a7.height,zoom:1};this._div.appendChild(img);if(this.visible){esri.show(this._div);}img._onload_connect=img._onerror_connect=img._onabort_connect=this._img_loading=null;var _5a8=this._dragOrigin;_5a8.x=(_5a8.y=0);this.onUpdate();this._fireUpdateEnd();},_onErrorHandler:function(evt){var img=evt.currentTarget,_5a9=_8.disconnect;_8.style(img,"visibility","hidden");_5a9(img._onload_connect);_5a9(img._onerror_connect);_5a9(img._onabort_connect);img._onload_connect=img._onerror_connect=img._onabort_connect=null;var _5aa=new Error(esri.bundle.layers.dynamic.imageError+": "+img.src);this.onError(_5aa);this._fireUpdateEnd(_5aa);},setUseMapTime:function(use,_5ab){this.useMapTime=use;this._toggleTime();if(!_5ab){this.refresh(true);}},refresh:function(){if(this._map){this._onExtentChangeHandler(this._map.extent);}},_onScaleHandler:function(mtx,_5ac){var css={},_5ad=esri._css.names,img=this._img;if(!img){return;}_8.style(img,_5ad.transition,_5ac?"none":(_5ad.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease"));img._matrix=mtx;mtx=img._multiply?_a.gfx.matrix.multiply(mtx,img._multiply):mtx;if(img._tdx||img._tdy){mtx=_a.gfx.matrix.multiply(mtx,{"xx":1,"xy":0,"yx":0,"yy":1,"dx":img._tdx,"dy":img._tdy});}css[_5ad.transform]=esri._css.matrix(mtx);_8.style(img,css);},_onZoomHandler:function(_5ae,_5af,_5b0){var _5b1=this._startRect,_5b2=_5b1.width*_5af,_5b3=_5b1.height*_5af,img=this._img,isIE=_8.isIE;if(img){if(isIE&&isIE<8){_8.style(img,{left:(_5b1.left-((_5b2-_5b1.width)*(_5b0.x-_5b1.left)/_5b1.width))+"px",top:(_5b1.top-((_5b3-_5b1.height)*(_5b0.y-_5b1.top)/_5b1.height))+"px",zoom:_5af*_5b1.zoom});}else{_8.style(img,{left:(_5b1.left-((_5b2-_5b1.width)*(_5b0.x-_5b1.left)/_5b1.width))+"px",top:(_5b1.top-((_5b3-_5b1.height)*(_5b0.y-_5b1.top)/_5b1.height))+"px",width:_5b2+"px",height:_5b3+"px"});}}},_exportMapImage:function(url,_5b4,_5b5){var _5b6=this._exportMapImageHandler;_5b4.token=this._getToken();esri.request({url:url,content:_5b4,callbackParamName:"callback",load:function(){_5b6(arguments[0],arguments[1],_5b5);},error:esri.config.defaults.io.errorHandler});},_exportMapImageHandler:function(_5b7,io,_5b8){var _5b9=new esri.layers.MapImage(_5b7);this.onMapImageExport(_5b9);if(_5b8){_5b8(_5b9);}},onMapImageExport:function(){},setOpacity:function(o){if(this.opacity!=o){this.onOpacityChange(this.opacity=o);}},onOpacityChange:function(){},_opacityChangeHandler:function(_5ba){_8.style(this._div,"opacity",_5ba);}});}if(!_8._hasResource["esri.layers.agscommon"]){_8._hasResource["esri.layers.agscommon"]=true;_8.provide("esri.layers.agscommon");_8.declare("esri.layers.ArcGISMapServiceLayer",null,{constructor:function(url,_5bb){this.layerInfos=[];var _5bc=(this._params={}),_5bd=this._url.query?this._url.query.token:null;if(_5bd){_5bc.token=_5bd;}},_load:function(){esri.request({url:this._url.path,content:_8.mixin({f:"json"},this._params),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});},spatialReference:null,initialExtent:null,fullExtent:null,description:null,units:null,_initLayer:function(_5be,io){try{this._findCredential();this.description=_5be.description;this.copyright=_5be.copyrightText;this.spatialReference=new esri.SpatialReference(_5be.spatialReference);this.initialExtent=new esri.geometry.Extent(_5be.initialExtent);this.fullExtent=new esri.geometry.Extent(_5be.fullExtent);this.units=_5be.units;this.maxRecordCount=_5be.maxRecordCount;this.maxImageHeight=_5be.maxImageHeight;this.maxImageWidth=_5be.maxImageWidth;this.supportsDynamicLayers=_5be.supportsDynamicLayers;var _5bf=(this.layerInfos=[]),lyrs=_5be.layers,dvl=(this._defaultVisibleLayers=[]);_8.forEach(lyrs,function(lyr,i){_5bf[i]=new esri.layers.LayerInfo(lyr);if(lyr.defaultVisibility){dvl.push(lyr.id);}});if(!this.visibleLayers){this.visibleLayers=dvl;}this.version=_5be.currentVersion;if(!this.version){var ver;if("capabilities" in _5be||"tables" in _5be){ver=10;}else{if("supportedImageFormatTypes" in _5be){ver=9.31;}else{ver=9.3;}}this.version=ver;}this.capabilities=_5be.capabilities;}catch(e){this._errorHandler(e);}}});_8.declare("esri.layers.LayerInfo",null,{constructor:function(json){_8.mixin(this,json);},toJson:function(){var json={defaultVisibility:this.defaultVisibility,id:this.id,maxScale:this.maxScale,minScale:this.minScale,name:this.name,parentLayerId:this.parentLayerId,subLayerIds:this.subLayerIds};return esri._sanitize(json);}});_8.declare("esri.layers.TimeInfo",null,{constructor:function(json){if(json!==null){_8.mixin(this,json);if(json.exportOptions){this.exportOptions=new esri.layers.LayerTimeOptions(json.exportOptions);}this.timeExtent=new esri.TimeExtent(json.timeExtent);this.timeReference=new esri.layers.TimeReference(json.timeReference);}}});_8.mixin(esri.layers.TimeInfo,{UNIT_CENTURIES:"esriTimeUnitsCenturies",UNIT_DAYS:"esriTimeUnitsDays",UNIT_DECADES:"esriTimeUnitsDecades",UNIT_HOURS:"esriTimeUnitsHours",UNIT_MILLISECONDS:"esriTimeUnitsMilliseconds",UNIT_MINUTES:"esriTimeUnitsMinutes",UNIT_MONTHS:"esriTimeUnitsMonths",UNIT_SECONDS:"esriTimeUnitsSeconds",UNIT_UNKNOWN:"esriTimeUnitsUnknown",UNIT_WEEKS:"esriTimeUnitsWeeks",UNIT_YEARS:"esriTimeUnitsYears"});_8.declare("esri.layers.LayerTimeOptions",null,{constructor:function(json){if(json){_8.mixin(this,json);}},toJson:function(){var json={timeDataCumulative:this.timeDataCumulative,timeOffset:this.timeOffset,timeOffsetUnits:this.timeOffsetUnits,useTime:this.useTime};return esri._sanitize(json);}});_8.declare("esri.layers.TimeReference",null,{constructor:function(json){if(json){_8.mixin(this,json);}}});_8.declare("esri.layers.Field",null,{constructor:function(json){if(json&&_8.isObject(json)){this.name=json.name;this.type=json.type;this.alias=json.alias;this.length=json.length;this.editable=json.editable;this.nullable=json.nullable;var _5c0=json.domain;if(_5c0&&_8.isObject(_5c0)){switch(_5c0.type){case "range":this.domain=new esri.layers.RangeDomain(_5c0);break;case "codedValue":this.domain=new esri.layers.CodedValueDomain(_5c0);break;}}}}});_8.declare("esri.layers.Domain",null,{constructor:function(json){if(json&&_8.isObject(json)){this.name=json.name;this.type=json.type;}},toJson:function(){return esri._sanitize({name:this.name,type:this.type});}});_8.declare("esri.layers.RangeDomain",[esri.layers.Domain],{constructor:function(json){if(json&&_8.isObject(json)){this.minValue=json.range[0];this.maxValue=json.range[1];}},toJson:function(){var json=this.inherited(arguments);json.range=[this.minValue,this.maxValue];return esri._sanitize(json);}});_8.declare("esri.layers.CodedValueDomain",[esri.layers.Domain],{constructor:function(json){if(json&&_8.isObject(json)){this.codedValues=json.codedValues;}},toJson:function(){var json=this.inherited(arguments);json.codedValues=_8.clone(this.codedValues);return esri._sanitize(json);}});_8.declare("esri.layers.InheritedDomain",[esri.layers.Domain],{});_8.declare("esri.layers.LayerSource",null,{type:null,constructor:function(json){if(json){_8.mixin(this,json);}},toJson:function(){}});_8.declare("esri.layers.LayerMapSource",esri.layers.LayerSource,{type:"mapLayer",toJson:function(){var json={type:"mapLayer",mapLayerId:this.mapLayerId,gdbVersion:this.gdbVersion};return esri._sanitize(json);}});_8.declare("esri.layers.LayerDataSource",esri.layers.LayerSource,{type:"dataLayer",toJson:function(){var json={type:"dataLayer",dataSource:this.dataSource&&this.dataSource.toJson()};return esri._sanitize(json);}});_8.declare("esri.layers.DataSource",null,{constructor:function(json){if(json){_8.mixin(this,json);}},toJson:function(){}});_8.declare("esri.layers.TableDataSource",esri.layers.DataSource,{toJson:function(){var json={type:"table",workspaceId:this.workspaceId,dataSourceName:this.dataSourceName,gdbVersion:this.gdbVersion};return esri._sanitize(json);}});_8.declare("esri.layers.QueryDataSource",esri.layers.DataSource,{toJson:function(){var json={type:"queryTable",workspaceId:this.workspaceId,query:this.query,oidFields:this.oidFields&&this.oidFields.join(),spatialReference:this.spatialReference&&this.spatialReference.toJson()};if(this.geometryType){var _5c1;if(this.geometryType.toLowerCase()==="point"){_5c1="esriGeometryPoint";}else{if(this.geometryType.toLowerCase()==="multipoint"){_5c1="esriGeometryMultipoint";}else{if(this.geometryType.toLowerCase()==="polyline"){_5c1="esriGeometryPolyline";}else{if(this.geometryType.toLowerCase()==="polygon"){_5c1="esriGeometryPolygon";}else{_5c1=this.geometryType;}}}}json.geometryType=_5c1;}return esri._sanitize(json);}});_8.declare("esri.layers.JoinDataSource",esri.layers.DataSource,{toJson:function(){var json={type:"joinTable",leftTableSource:this.leftTableSource&&this.leftTableSource.toJson(),rightTableSource:this.rightTableSource&&this.rightTableSource.toJson(),leftTableKey:this.leftTableKey,rightTableKey:this.rightTableKey};var _5c2;if(this.joinType.toLowerCase()==="left-outer-join"){_5c2="esriLeftOuterJoin";}else{if(this.joinType.toLowerCase()==="left-inner-join"){_5c2="esriLeftInnerJoin";}else{_5c2=this.joinType;}}json.joinType=_5c2;return esri._sanitize(json);}});_8.declare("esri.layers.RasterDataSource",esri.layers.DataSource,{toJson:function(){var json={type:"raster",workspaceId:this.workspaceId,dataSourceName:this.dataSourceName};return esri._sanitize(json);}});_8.declare("esri.layers.DynamicLayerInfo",esri.layers.LayerInfo,{defaultVisibility:true,parentLayerId:-1,maxScale:0,minScale:0,constructor:function(json){if(json&&!json.source){var _5c3=new esri.layers.LayerMapSource();_5c3.mapLayerId=this.id;this.source=_5c3;}},toJson:function(){var json=this.inherited(arguments);json.source=this.source&&this.source.toJson();return esri._sanitize(json);}});_8.declare("esri.layers.LayerDrawingOptions",null,{constructor:function(json){if(json){_8.mixin(this,json);}},toJson:function(){var json={renderer:this.renderer&&this.renderer.toJson(),transparency:this.transparency,scaleSymbols:this.scaleSymbols,showLabels:this.showLabels};return esri._sanitize(json);}});}if(!_8._hasResource["esri._time"]){_8._hasResource["esri._time"]=true;_8.provide("esri._time");_8.declare("esri.TimeExtent",null,{constructor:function(json){if(arguments.length>1){this._create(arguments[0],arguments[1]);}else{if(json){if(_8.isArray(json)){var _5c4=json[0],end=json[1];this.startTime=(_5c4===null||_5c4==="null")?null:new Date(_5c4);this.endTime=(end===null||end==="null")?null:new Date(end);}else{if(json instanceof Date){this._create(json,null);}}}}},offset:function(_5c5,_5c6){var _5c7=new esri.TimeExtent();var _5c8=this.startTime,end=this.endTime;if(_5c8){_5c7.startTime=this._getOffsettedDate(_5c8,_5c5,_5c6);}if(end){_5c7.endTime=this._getOffsettedDate(end,_5c5,_5c6);}return _5c7;},intersection:function(_5c9){return this._intersection(this,_5c9);},toJson:function(){var _5ca=[];var _5cb=this.startTime;_5ca.push(_5cb?_5cb.getTime():"null");var end=this.endTime;_5ca.push(end?end.getTime():"null");return _5ca;},_create:function(_5cc,end){this.startTime=_5cc?new Date(_5cc):null;this.endTime=end?new Date(end):null;},_refData:{"esriTimeUnitsMilliseconds":{getter:"getUTCMilliseconds",setter:"setUTCMilliseconds",multiplier:1},"esriTimeUnitsSeconds":{getter:"getUTCSeconds",setter:"setUTCSeconds",multiplier:1},"esriTimeUnitsMinutes":{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},"esriTimeUnitsHours":{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},"esriTimeUnitsDays":{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},"esriTimeUnitsWeeks":{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},"esriTimeUnitsMonths":{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},"esriTimeUnitsYears":{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},"esriTimeUnitsDecades":{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:10},"esriTimeUnitsCenturies":{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:100}},_intersection:function(_5cd,_5ce){if(_5cd&&_5ce){var _5cf=_5cd.startTime,end1=_5cd.endTime;var _5d0=_5ce.startTime,end2=_5ce.endTime;_5cf=_5cf?_5cf.getTime():-Infinity;_5d0=_5d0?_5d0.getTime():-Infinity;end1=end1?end1.getTime():Infinity;end2=end2?end2.getTime():Infinity;var _5d1,end;if(_5d0>=_5cf&&_5d0<=end1){_5d1=_5d0;}else{if(_5cf>=_5d0&&_5cf<=end2){_5d1=_5cf;}}if(end1>=_5d0&&end1<=end2){end=end1;}else{if(end2>=_5cf&&end2<=end1){end=end2;}}if(!isNaN(_5d1)&&!isNaN(end)){var _5d2=new esri.TimeExtent();_5d2.startTime=(_5d1===-Infinity)?null:new Date(_5d1);_5d2.endTime=(end===Infinity)?null:new Date(end);return _5d2;}else{return null;}}else{return null;}},_getOffsettedDate:function(_5d3,_5d4,_5d5){var data=this._refData;var _5d6=new Date(_5d3.getTime());if(_5d4&&_5d5){var data=data[_5d5];_5d6[data.setter](_5d6[data.getter]()+(_5d4*data.multiplier));}return _5d6;}});_8.declare("esri.TimeReference",null,{constructor:function(json){if(json){_8.mixin(this,json);}}});}if(!_8._hasResource["esri.layers.agsdynamic"]){_8._hasResource["esri.layers.agsdynamic"]=true;_8.provide("esri.layers.agsdynamic");_8.declare("esri.layers.ArcGISDynamicMapServiceLayer",[esri.layers.DynamicMapServiceLayer,esri.layers.ArcGISMapServiceLayer],{constructor:function(url,_5d7){var _5d8=_5d7&&_5d7.imageParameters,dh=_8.hitch;if(_5d8){var ldef=_5d8.layerDefinitions;if(ldef){this.setLayerDefinitions(ldef);}if(_5d8.layerOption===esri.layers.ImageParameters.LAYER_OPTION_SHOW){this.visibleLayers=[].concat(_5d8.layerIds);}}this._setIsPNG32=dh(this,this._setIsPNG32);this.dpi=(_5d8&&_5d8.dpi)||96;this.imageFormat=(_5d8&&_5d8.format)||"png8";this.imageTransparency=(_5d8&&_5d8.transparent===false)?false:true;this._setIsPNG32();this.gdbVersion=_5d7&&_5d7.gdbVersion;this._params.gdbVersion=this.gdbVersion;_8.mixin(this._params,this._url.query,{dpi:this.dpi,transparent:this.imageTransparency,format:this.imageFormat},_5d8?_5d8.toJson():{});this.getImageUrl=dh(this,this.getImageUrl);this._initLayer=dh(this,this._initLayer);this._load=dh(this,this._load);this.useMapImage=_5d7?_5d7.useMapImage:false;if(this.useMapImage){this._imageExportHandler=dh(this,this._imageExportHandler);}this._loadCallback=_5d7&&_5d7.loadCallback;var _5d9=_5d7&&_5d7.resourceInfo;if(_5d9){this._initLayer(_5d9);}else{if(arguments[2]===undefined||arguments[2]===false){this._load();}}},disableClientCaching:false,layerDefinitions:null,_initLayer:function(_5da,io){this.inherited(arguments);if(_5da.timeInfo){this.timeInfo=new esri.layers.TimeInfo(_5da.timeInfo);}this.loaded=true;this.onLoad(this);var _5db=this._loadCallback;if(_5db){delete this._loadCallback;_5db(this);}},getImageUrl:function(_5dc,_5dd,_5de,_5df){var path=this._url.path+"/export?",_5e0=this._params,sr=_5dc.spatialReference.wkid||_8.toJson(_5dc.spatialReference.toJson()),_5e1=this._errorHandler;delete _5e0._ts;_8.mixin(_5e0,{bbox:_5dc.xmin+","+_5dc.ymin+","+_5dc.xmax+","+_5dc.ymax,bboxSR:sr,imageSR:sr,size:_5dd+","+_5de},this.disableClientCaching?{_ts:new Date().getTime()}:{});if(_5e0.layerDefs){var defs=_5e0.layerDefs;delete _5e0.layerDefs;_8.mixin(_5e0,{layerDefs:defs});}var _5e2=(_5e0.token=this._getToken()),_5e3=esri._getProxiedUrl(path+_8.objectToQuery(_8.mixin({},_5e0,{f:"image"})));if((_5e3.length>esri.config.defaults.io.postLength)||this.useMapImage){this._jsonRequest=esri.request({url:path,content:_8.mixin(_5e0,{f:"json"}),callbackParamName:"callback",load:function(_5e4,io){var href=_5e4.href;if(_5e2){href+=(href.indexOf("?")===-1?("?token="+_5e2):("&token="+_5e2));}_5df(esri._getProxiedUrl(href));},error:_5e1});}else{_5df(_5e3);}},_setIsPNG32:function(){var _5e5=this.imageFormat.toLowerCase();var isIE=_8.isIE;this.isPNG32=isIE&&isIE===6&&(_5e5==="png32"||_5e5==="png24")&&this.imageTransparency;},_setTime:function(_5e6){var time=(this._params.time=_5e6?_5e6.toJson().join(","):null);if(this.version<10.02&&this.timeInfo){if(!time){var _5e7=this.layerInfos;if(_5e7){var _5e8=this.layerTimeOptions,_5e9=_5e8?_5e8.slice(0):[],ids=[];_8.forEach(_5e7,function(info){if(!info.subLayerIds){ids.push(info.id);}});if(ids.length){_8.forEach(ids,function(id){if(!_5e9[id]){var opt=new esri.layers.LayerTimeOptions();opt.useTime=false;_5e9[id]=opt;}});this._params.layerTimeOptions=esri._serializeTimeOptions(_5e9,ids);}}}else{this._params.layerTimeOptions=esri._serializeTimeOptions(this.layerTimeOptions);}}if(this.version>=10.02&&this.timeInfo){if(!time){this._params.time="null,null";}}},setDPI:function(dpi,_5ea){this.dpi=(this._params.dpi=dpi);if(!_5ea){this.refresh(true);}},setImageFormat:function(_5eb,_5ec){this.imageFormat=(this._params.format=_5eb);this._setIsPNG32();if(!_5ec){this.refresh(true);}},setImageTransparency:function(_5ed,_5ee){this.imageTransparency=(this._params.transparent=_5ed);this._setIsPNG32();if(!_5ee){this.refresh(true);}},setVisibleLayers:function(_5ef,_5f0){this.visibleLayers=_5ef;this._params.layers=esri.layers.ImageParameters.LAYER_OPTION_SHOW+":"+_5ef.join(",");this._updateDynamicLayers();if(!_5f0){this.refresh(true);}},setDefaultVisibleLayers:function(_5f1){this.visibleLayers=this._defaultVisibleLayers;this._params.layers=null;this._updateDynamicLayers();if(!_5f1){this.refresh(true);}},setLayerDefinitions:function(_5f2,_5f3){this.layerDefinitions=_5f2;this._params.layerDefs=esri._serializeLayerDefinitions(_5f2);this._updateDynamicLayers();if(!_5f3){this.refresh(true);}},setDefaultLayerDefinitions:function(_5f4){this.layerDefinitions=this._params.layerDefs=null;this._updateDynamicLayers();if(!_5f4){this.refresh(true);}},setDisableClientCaching:function(_5f5){this.disableClientCaching=_5f5;},setLayerTimeOptions:function(_5f6,_5f7){this.layerTimeOptions=_5f6;this._params.layerTimeOptions=esri._serializeTimeOptions(_5f6);this._updateDynamicLayers();if(!_5f7){this.refresh(true);}},refresh:function(_5f8){if(_5f8){this.inherited(arguments);}else{var dc=this.disableClientCaching;this.disableClientCaching=true;this.inherited(arguments);this.disableClientCaching=dc;}},setLayerDrawingOptions:function(_5f9,_5fa){this.layerDrawingOptions=_5f9;this._updateDynamicLayers();if(!_5fa){this.refresh(true);}},setDynamicLayerInfos:function(_5fb,_5fc){this.dynamicLayerInfos=_5fb;this.visibleLayers=esri._getDefaultVisibleLayers(_5fb);this._updateDynamicLayers();if(!_5fc){this.refresh(true);}},createDynamicLayerInfosFromLayerInfos:function(){var _5fd=[],_5fe,_5ff;_8.forEach(this.layerInfos,function(_600,idx){_5fe=new esri.layers.DynamicLayerInfo(_600.toJson());_5fe.source=new esri.layers.LayerMapSource({mapLayerId:_600.id});_5fd.push(_5fe);});return _5fd;},_onDynamicLayersChange:function(){},_updateDynamicLayers:function(){if((this.dynamicLayerInfos&&this.dynamicLayerInfos.length>0)||(this.layerDrawingOptions&&this.layerDrawingOptions.length>0)){var _601,_602=this.dynamicLayerInfos?this.dynamicLayerInfos:this.layerInfos,_603=[],_604=this._map&&esri.geometry.getScale(this._map),_605=this.visibleLayers,_606=_604?esri._getLayersForScale(_604,_602):_605;_8.forEach(_602,function(info){if(!info.subLayerIds){var _607=info.id;if(_8.indexOf(_605,_607)!==-1&&_8.indexOf(_606,_607)!==-1){var _608={id:_607};if(this.dynamicLayerInfos){_608.source=info.source&&info.source.toJson();}else{_608.source={type:"mapLayer",mapLayerId:_607};}var _609;if(this.layerDefinitions&&this.layerDefinitions[_607]){_609=this.layerDefinitions[_607];}if(_609){_608.definitionExpression=_609;}var _60a;if(this.layerDrawingOptions&&this.layerDrawingOptions[_607]){_60a=this.layerDrawingOptions[_607];}if(_60a){_608.drawingInfo=_60a.toJson();}var _60b;if(this.layerTimeOptions&&this.layerTimeOptions[_607]){_60b=this.layerTimeOptions[_607];}if(_60b){_608.layerTimeOptions=_60b.toJson();}_603.push(_608);}}},this);_601=_8.toJson(_603);if(_601==="[]"){_601="[{}]";}if(!this._params.dynamicLayers||(this._params.dynamicLayers.length!==_601.length||this._params.dynamicLayers!==_601)){this._params.dynamicLayers=_601;this._onDynamicLayersChange(this._params.dynamicLayers);}}else{if(this._params.dynamicLayers){this._params.dynamicLayers=null;this._onDynamicLayersChange(null);}else{this._params.dynamicLayers=null;}}},_onExtentChangeHandler:function(_60c,_60d,_60e){if(_60e){this._updateDynamicLayers();}this.inherited(arguments);},_setMap:function(map,_60f,_610){this._map=map;this._updateDynamicLayers();return this.inherited(arguments);},onGDBVersionChange:function(){},setGDBVersion:function(_611,_612){this.gdbVersion=_611;this._params.gdbVersion=_611;this.onGDBVersionChange();if(!_612){this.refresh(true);}},exportMapImage:function(_613,_614){var m=esri.config.defaults.map,p=_8.mixin({size:m.width+","+m.height},this._params,_613?_613.toJson(this.normalization):{},{f:"json"});delete p._ts;if(p.layerDefs){var defs=p.layerDefs;delete p.layerDefs;_8.mixin(p,{layerDefs:defs});}this._exportMapImage(this._url.path+"/export",p,_614);}});_8.declare("esri.layers.ImageParameters",null,{constructor:function(){this.layerDefinitions=[];this._bundle=_8.i18n.getLocalization("esri","jsapi");},bbox:null,extent:null,width:null,height:null,dpi:null,format:null,imageSpatialReference:null,layerOption:null,layerIds:null,transparent:null,timeExtent:null,layerTimeOptions:null,toJson:function(_615){if(this.bbox){_8.deprecated(this.declaredClass+" : "+this._bundle.layers.imageParameters.deprecateBBox);}var bb=this.bbox||this.extent;bb=bb&&_615&&bb._normalize(true);var _616=this.layerOption,wkid=bb?(bb.spatialReference.wkid||_8.toJson(bb.spatialReference.toJson())):null,_617=this.imageSpatialReference,json={dpi:this.dpi,format:this.format,transparent:this.transparent,size:(this.width!==null&&this.height!==null?this.width+","+this.height:null),bbox:(bb?(bb.xmin+","+bb.ymin+","+bb.xmax+","+bb.ymax):null),bboxSR:wkid,layers:(_616?_616+":"+this.layerIds.join(","):null),imageSR:(_617?(_617.wkid||_8.toJson(_617.toJson())):wkid)};json.layerDefs=esri._serializeLayerDefinitions(this.layerDefinitions);var _618=this.timeExtent;json.time=_618?_618.toJson().join(","):null;json.layerTimeOptions=esri._serializeTimeOptions(this.layerTimeOptions);return esri.filter(json,function(_619){if(_619!==null){return true;}});}});_8.mixin(esri.layers.ImageParameters,{LAYER_OPTION_SHOW:"show",LAYER_OPTION_HIDE:"hide",LAYER_OPTION_INCLUDE:"include",LAYER_OPTION_EXCLUDE:"exclude"});_8.declare("esri.layers.MapImage",null,{constructor:function(json){_8.mixin(this,json);this.extent=new esri.geometry.Extent(this.extent);}});}if(!_8._hasResource["dojox.collections._base"]){_8._hasResource["dojox.collections._base"]=true;_8.provide("dojox.collections._base");_a.collections.DictionaryEntry=function(k,v){this.key=k;this.value=v;this.valueOf=function(){return this.value;};this.toString=function(){return String(this.value);};};_a.collections.Iterator=function(arr){var a=arr;var _61a=0;this.element=a[_61a]||null;this.atEnd=function(){return (_61a>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_61a++];return this.element;};this.map=function(fn,_61b){return _8.map(a,fn,_61b);};this.reset=function(){_61a=0;this.element=a[_61a];};};_a.collections.DictionaryIterator=function(obj){var a=[];var _61c={};for(var p in obj){if(!_61c[p]){a.push(obj[p]);}}var _61d=0;this.element=a[_61d]||null;this.atEnd=function(){return (_61d>=a.length);};this.get=function(){if(this.atEnd()){return null;}this.element=a[_61d++];return this.element;};this.map=function(fn,_61e){return _8.map(a,fn,_61e);};this.reset=function(){_61d=0;this.element=a[_61d];};};}if(!_8._hasResource["dojox.collections.ArrayList"]){_8._hasResource["dojox.collections.ArrayList"]=true;_8.provide("dojox.collections.ArrayList");_a.collections.ArrayList=function(arr){var _61f=[];if(arr){_61f=_61f.concat(arr);}this.count=_61f.length;this.add=function(obj){_61f.push(obj);this.count=_61f.length;};this.addRange=function(a){if(a.getIterator){var e=a.getIterator();while(!e.atEnd()){this.add(e.get());}this.count=_61f.length;}else{for(var i=0;i<a.length;i++){_61f.push(a[i]);}this.count=_61f.length;}};this.clear=function(){_61f.splice(0,_61f.length);this.count=0;};this.clone=function(){return new _a.collections.ArrayList(_61f);};this.contains=function(obj){for(var i=0;i<_61f.length;i++){if(_61f[i]==obj){return true;}}return false;};this.forEach=function(fn,_620){_8.forEach(_61f,fn,_620);};this.getIterator=function(){return new _a.collections.Iterator(_61f);};this.indexOf=function(obj){for(var i=0;i<_61f.length;i++){if(_61f[i]==obj){return i;}}return -1;};this.insert=function(i,obj){_61f.splice(i,0,obj);this.count=_61f.length;};this.item=function(i){return _61f[i];};this.remove=function(obj){var i=this.indexOf(obj);if(i>=0){_61f.splice(i,1);}this.count=_61f.length;};this.removeAt=function(i){_61f.splice(i,1);this.count=_61f.length;};this.reverse=function(){_61f.reverse();};this.sort=function(fn){if(fn){_61f.sort(fn);}else{_61f.sort();}};this.setByIndex=function(i,obj){_61f[i]=obj;this.count=_61f.length;};this.toArray=function(){return [].concat(_61f);};this.toString=function(_621){return _61f.join((_621||","));};};}if(!_8._hasResource["esri.layers.tiled"]){_8._hasResource["esri.layers.tiled"]=true;_8.provide("esri.layers.tiled");_8.declare("esri.layers.TiledMapServiceLayer",esri.layers.Layer,{constructor:function(url,_622){_8.connect(this,"onLoad",this,"_initTiledLayer");this._displayLevels=_622?_622.displayLevels:null;var dh=_8.hitch;this._addImage=dh(this,this._addImage);this._tileLoadHandler=dh(this,this._tileLoadHandler);this._tileErrorHandler=dh(this,this._tileErrorHandler);this._tilePopPop=dh(this,this._tilePopPop);this._cleanUpRemovedImages=dh(this,this._cleanUpRemovedImages);this._fireOnUpdateEvent=dh(this,this._fireOnUpdateEvent);this._transitionEnd=dh(this,this._transitionEnd);},opacity:1,isPNG32:false,_initTiledLayer:function(){var ti=this.tileInfo,lods=ti.lods;this._tileW=ti.width;this._tileH=ti.height;this._normalizedScales=[];var _623=(this.scales=[]),dl=this._displayLevels,fe=this.fullExtent,ul=new esri.geometry.Point(fe.xmin,fe.ymax),lr=new esri.geometry.Point(fe.xmax,fe.ymin),gctc=esri.TileUtils.getContainingTileCoords,_624,lod,i,len=lods.length;for(i=0;i<len;i++){lod=lods[i];_624=gctc(ti,ul,lod);lod.startTileRow=_624.row<0?0:_624.row;lod.startTileCol=_624.col<0?0:_624.col;_624=gctc(ti,lr,lod);lod.endTileRow=_624.row;lod.endTileCol=_624.col;if(!dl||_8.indexOf(dl,lod.level)!==-1){_623[i]=lod.scale;this._normalizedScales[i]=lod.scale/ti.dpi;}}this._patchIE=_8.isIE>=6&&_8.isIE<7&&(this.isPNG32||ti.format==="Mixed");},_setMap:function(map,_625,_626,lod){this._map=map;var d=(this._div=_8.create("div",null,_625));this._layerIndex=_626;var _627=map.__visibleDelta,dc=_8.connect,_628=esri._css.names,css={position:"absolute",width:map.width+"px",height:map.height+"px",overflow:"visible"};if(map.navigationMode==="css-transforms"){css[_628.transform]=esri._css.translate(-_627.x,-_627.y);_8.style(d,css);delete css[_628.transform];css[_628.transition]=_628.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease";_8.style((this._active=_8.create("div",null,d)),css);this._active._remove=0;this._passives=[];this._onScaleHandler_connect=dc(map,"onScale",this,this._onScaleHandler);if(esri.isTouchEnabled){this._standby=[];var self=this,_629=function(){self._noDom=1;};this._onPanStartHandler_connect=dc(map,"onPanStart",_629);this._onZoomStartHandler_connect=dc(map,"onZoomStart",_629);}}else{css.left=-_627.x+"px";css.top=-_627.y+"px";_8.style(d,css);this._onZoomHandler_connect=dc(map,"onZoom",this,"_onZoomHandler");}this._onPanHandler_connect=dc(map,"onPan",this,"_onPanHandler");this._onExtentChangeHandler_connect=dc(map,"onExtentChange",this,"_onExtentChangeHandler");this._onResizeHandler_connect=dc(map,"onResize",this,"_onResizeHandler");this._opacityChangeHandler_connect=dc(this,"onOpacityChange",this,"_opacityChangeHandler");this._visibilityChangeHandler_connect=dc(this,"onVisibilityChange",this,"_visibilityChangeHandler");this._tileIds=[];this._tiles=[];this._tileBounds=[];this._ct=null;this._removeList=new _a.collections.ArrayList();this._loadingList=new _a.collections.ArrayList();var _62a=this.tileInfo,sr=_62a.spatialReference,info=sr._getInfo();this._wrap=map.wrapAround180&&sr._isWrappable()&&Math.abs(info.origin[0]-_62a.origin.x)<=info.dx;if(this._wrap){esri.TileUtils._addFrameInfo(_62a,info);}var _62b=map.extent;if(!this.visible){this._visibilityChangeHandler(this.visible);}if(_62b&&map.loaded){this._onExtentChangeHandler(_62b,null,null,lod);}return d;},_unsetMap:function(map,_62c){if(_62c){this._div=_62c.removeChild(this._div);}_8.destroy(this._div);this._map=this._layerIndex=this._div=this._standby=null;var dd=_8.disconnect;dd(this._onExtentChangeHandler_connect);dd(this._onPanHandler_connect);dd(this._onZoomHandler_connect);dd(this._onScaleHandler_connect);dd(this._onLayerReorderHandler_connect);dd(this._onResizeHandler_connect);dd(this._opacityChangeHandler_connect);dd(this._visibilityChangeHandler_connect);dd(this._onPanStartHandler_connect);dd(this._onZoomStartHandler_connect);},_visibilityChangeHandler:function(v){if(v){esri.show(this._div);var map=this._map;if(map.navigationMode==="css-transforms"){this._onScaleHandler_connect=_8.connect(map,"onScale",this,this._onScaleHandler);}else{this._onZoomHandler_connect=_8.connect(map,"onZoom",this,"_onZoomHandler");}this._onPanHandler_connect=_8.connect(map,"onPan",this,"_onPanHandler");this._onExtentChangeHandler(map.extent,null,true);}else{esri.hide(this._div);_8.disconnect(this._onPanHandler_connect);_8.disconnect(this._onZoomHandler_connect);_8.disconnect(this._onScaleHandler_connect);}},_onResizeHandler:function(_62d,_62e,_62f){var css={width:_62e+"px",height:_62f+"px"},ds=_8.style,i;ds(this._div,css);if(this._map.navigationMode==="css-transforms"){if(this._active){ds(this._active,css);}for(i=this._passives.length-1;i>=0;i--){ds(this._passives[i],css);}}},_onExtentChangeHandler:function(_630,_631,_632,lod){var i,_633=this._standby,img,_634;if(this._map.navigationMode==="css-transforms"){if(_632){for(i=this._passives.length-1;i>=0;i--){_634=this._passives[i];_8.style(_634,esri._css.names.transition,"none");if(_634._marked){this._passives.splice(i,1);if(_634.parentNode){_634.parentNode.removeChild(_634);}_8.destroy(_634);}else{if(_634.childNodes.length>0){_634._multiply=_634._multiply?_a.gfx.matrix.multiply(_634._matrix,_634._multiply):_634._matrix;}}}}this._noDom=0;if(_633&&_633.length){for(i=_633.length-1;i>=0;i--){img=_633[i];_8.style(img,"visibility","visible");this._tilePopPop(img);_633.splice(i,1);}}}var _635=true;this._refreshArgs={extent:_630,lod:lod};if(!this.visible){_635=false;}var map=this._map,_636;if(lod){_636=_8.indexOf(this.scales,lod.scale)===-1;if(this.declaredClass==="esri.layers.WMTSLayer"){var _637=map._params.tileInfo.dpi;var _638=map.width>map.height?map.width:map.height;_636=true;var s1,s2=lod.scale/_637;for(i=0;i<this._normalizedScales.length;i++){s1=this._normalizedScales[i];if(Math.abs((s1-s2)/s1)<(1/_638)){_636=false;break;}}}}else{var _639=map.getLevel(),_63a=(_639!==-1)?map._params.tileInfo.lods[_639].scale:-1;_636=(_8.indexOf(this.scales,_63a)===-1);}if(_635){var dd=_8.disconnect;if(_636){_635=false;esri.hide(this._div);dd(this._onPanHandler_connect);dd(this._onZoomHandler_connect);dd(this._onScaleHandler_connect);}else{this._fireUpdateStart();esri.show(this._div);dd(this._onPanHandler_connect);dd(this._onZoomHandler_connect);dd(this._onScaleHandler_connect);if(map.navigationMode==="css-transforms"){this._onScaleHandler_connect=_8.connect(map,"onScale",this,this._onScaleHandler);}else{this._onZoomHandler_connect=_8.connect(map,"onZoom",this,"_onZoomHandler");}this._onPanHandler_connect=_8.connect(map,"onPan",this,"_onPanHandler");}}this._rrIndex=0;var ct=esri.TileUtils.getCandidateTileInfo(map,this.tileInfo,_630),mv=map.__visibleDelta,id;if(!this._ct||ct.lod.level!==this._ct.lod.level||_632){var _63b=(ct&&this._ct&&ct.lod.level!==this._ct.lod.level);this._ct=ct;var _63c=this._tiles,_63d=this._tileIds,_63e=this._tileBounds,_63f=this._removeList,tile,il=_63d.length;this._cleanUpRemovedImages();for(i=0;i<il;i++){id=_63d[i];tile=_63c[id];_63e[id]=_63d[i]=null;if((map.navigationMode==="css-transforms")&&_63b&&tile.parentNode&&map.fadeOnZoom&&_635){tile._fadeOut=_63b;tile.parentNode._remove++;}_63f.add(tile);}if(_632){this._tileIds=[];this._tiles=[];this._tileBounds=[];}}var mx=mv.x,my=mv.y;if(map.navigationMode==="css-transforms"){var css={};css[esri._css.names.transform]=esri._css.translate(mx,my);_8.style(this._div,css);}else{_8.style(this._div,{left:mx+"px",top:my+"px"});}if(_635&&!_636){this.__coords_dx=mx;this.__coords_dy=my;this._updateImages(new esri.geometry.Rect(0,0,mv.width,mv.height));if(this._loadingList.count===0){this.onUpdate();this._fireUpdateEnd();}else{this._fireOnUpdate=true;}}else{this._cleanUpRemovedImages();}var _640,rect,_641=this._tileW,_642=this._tileH;mv=new esri.geometry.Rect(-mv.x,-mv.y,mv.width,mv.height);for(i=this._tileIds.length-1;i>=0;i--){id=this._tileIds[i];if(id){img=this._tiles[id];_640=_8.coords(img);rect=new esri.geometry.Rect(_640.l,_640.t,_641,_642);if(map.navigationMode==="css-transforms"){rect.x=img._left;rect.y=img._top;}if(mv.intersects(rect)){this._tileBounds[id]=rect;}else{if(this._loadingList.contains(id)){this._tilePopPop(img);}_8.destroy(img);this._tileIds.splice(i,1);delete this._tileBounds[id];delete this._tiles[id];}}else{this._tileIds.splice(i,1);delete this._tileBounds[id];delete this._tiles[id];}}},_onPanHandler:function(_643,_644){var map=this._map,mv=map.__visibleDelta.offset(_644.x,_644.y);this.__coords_dx=this.__coords_dy=0;if(map.navigationMode==="css-transforms"){var css={};css[esri._css.names.transform]=esri._css.translate(mv.x,mv.y);_8.style(this._div,css);if(!esri.isTouchEnabled){this._updateImages({x:-mv.x,y:-mv.y,width:mv.width,height:mv.height});}}else{_8.style(this._div,{left:mv.x+"px",top:mv.y+"px"});this._updateImages({x:-mv.x,y:-mv.y,width:mv.width,height:mv.height});}if(this._loadingList.count>0){this._fireUpdateStart();this._fireOnUpdate=true;}},_onScaleHandler:function(mtx,_645){var i,css={},_646=esri._css.names,map=this._map;for(i=this._passives.length-1;i>=0;i--){var _647=this._passives[i];if(_647.childNodes.length===0){this._passives.splice(i,1);_8.destroy(_647);}else{if(_647.style[_646.transition]==="none"){_8.style(_647,_646.transition,_646.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease");}_8.style(_647,_646.transition,_645?"none":(_646.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease"));_647._matrix=mtx;css[_646.transform]=esri._css.matrix(_647._multiply?_a.gfx.matrix.multiply(mtx,_647._multiply):mtx);_8.style(_647,css);}}if(this._active&&this._active.childNodes.length===0){return;}_8.style(this._active,_646.transition,_645?"none":(_646.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease"));this._active._matrix=mtx;css[_646.transform]=esri._css.matrix(this._active._matrix);_8.style(this._active,css);this._passives.push(this._active);css={position:"absolute",width:map.width+"px",height:map.height+"px",overflow:"visible"};css[_646.transition]=_646.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease";_8.style((this._active=_8.create("div",null,this._div)),css);this._active._remove=0;if(map.fadeOnZoom){_8.place(this._active,this._div,"first");}},_onZoomHandler:function(_648,_649,_64a){var _64b=_8.coords(this._div);_64a=_64a.offset(-_64b.l,-_64b.t);var _64c,_64d=this._tileW*_649,_64e=this._tileH*_649,_64f=this._tileBounds,_650=this._tiles,es=_8.style;var isIE=_8.isIE;if(isIE&&isIE<8){_8.forEach(this._tileIds,function(id){_64c=_64f[id];es(_650[id],{left:(_64c.x-((_64d-_64c.width)*(_64a.x-_64c.x)/_64c.width))+"px",top:(_64c.y-((_64e-_64c.height)*(_64a.y-_64c.y)/_64c.height))+"px",zoom:_649});});}else{_8.forEach(this._tileIds,function(id){_64c=_64f[id];es(_650[id],{left:(_64c.x-((_64d-_64c.width)*(_64a.x-_64c.x)/_64c.width))+"px",top:(_64c.y-((_64e-_64c.height)*(_64a.y-_64c.y)/_64c.height))+"px",width:_64d+"px",height:_64e+"px"});});}},_updateImages:function(rect){var id,_651=this._tileW,_652=this._tileH,_653=this._ct,lod=_653.lod,tile=_653.tile,off=tile.offsets,_654=tile.coords,cr=_654.row,cc=_654.col,_655=lod.level,_656=this.opacity,_657=this._tileIds,_658=this._loadingList,_659=this._addImage,mId=this._map.id,tId=this.id,rx=rect.x,ry=rect.y,str=lod.startTileRow,etr=lod.endTileRow,stc=lod.startTileCol,etc=lod.endTileCol,_65a=_8.indexOf,r,c,mvx=-rect.x,mvy=-rect.y,_65b=off.x-this.__coords_dx,_65c=off.y-this.__coords_dy,vx=((_651-_65b)+mvx),vy=((_652-_65c)+mvy),ceil=Math.ceil,_65d=(vx>0)?(vx%_651):((_651-(Math.abs(vx)%_651))),_65e=(vy>0)?(vy%_652):((_652-(Math.abs(vy)%_652))),_65f=(rx>0)?Math.floor((rx+_65b)/_651):ceil((rx-(_651-_65b))/_651),_660=(ry>0)?Math.floor((ry+_65c)/_652):ceil((ry-(_652-_65c))/_652),_661=_65f+ceil((rect.width-_65d)/_651),_662=_660+ceil((rect.height-_65e)/_652),_663,_664,m180,p180,col,row;if(this._wrap){_663=lod._frameInfo;_664=_663[0];m180=_663[1];p180=_663[2];}for(col=_65f;col<=_661;col++){for(row=_660;row<=_662;row++){r=cr+row;c=cc+col;if(this._wrap){if(c<m180){c=c%_664;c=c<m180?c+_664:c;}else{if(c>p180){c=c%_664;}}}if(r>=str&&r<=etr&&c>=stc&&c<=etc){id=mId+"_"+tId+"_tile_"+_655+"_"+row+"_"+col;if(_65a(_657,id)===-1){_658.add(id);_657.push(id);_659(_655,row,r,col,c,id,_651,_652,_656,tile,off);}}}}},_cleanUpRemovedImages:function(){var list=this._removeList,dd=_8.destroy,i,_665=esri._css.names;list.forEach(function(img){if(!img._fadeOut){img.style.filter="";img.style.zoom=1;dd(img);}});if(this._map.navigationMode==="css-transforms"){for(i=this._passives.length-1;i>=0;i--){var _666=this._passives[i];if(_666.childNodes.length===0){this._passives.splice(i,1);dd(_666);}else{if(this._map.fadeOnZoom&&!_666._marked&&(_666._remove===_666.childNodes.length)){_8.style(_666,_665.transition,"opacity 0.65s");_8.style(_666,"opacity",0);_666._marked=1;if(_8.isIE>=10){_666.addEventListener(_665.endEvent,this._transitionEnd,false);}else{_666._endHandle=_8.connect(_666,_665.endEvent,this._transitionEnd);}}}}}list.clear();},_transitionEnd:function(evt){var _667=evt.target,idx;if(evt.propertyName!=="opacity"){return;}if(_8.isIE>=10){_667.removeEventListener(esri._css.names.endEvent,this._transitionEnd,false);}else{_8.disconnect(_667._endHandle);_667._endHandle=null;}idx=_8.indexOf(this._passives,_667);if(idx>-1){this._passives.splice(idx,1);}if(_667.parentNode){_667.parentNode.removeChild(_667);}_8.destroy(_667);},_addImage:function(_668,row,r,col,c,id,_669,_66a,_66b,tile,_66c){if(this._patchIE){var div=(this._tiles[id]=_8.create("div"));div.id=id;_8.addClass(div,"layerTile");_8.style(div,{left:((_669*col)-_66c.x)+"px",top:((_66a*row)-_66c.y)+"px",width:_669+"px",height:_66a+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.getTileUrl(_668,r,c)+"', sizingMethod='scale')"});if(_66b<1){_8.style(div,"opacity",_66b);}var _66d=div.appendChild(_8.create("div"));_8.style(_66d,{opacity:0,width:_669+"px",height:_66a+"px"});this._div.appendChild(div);div=null;this._loadingList.remove(id);this._fireOnUpdateEvent();}else{var img=(this._tiles[id]=_8.create("img")),dc=_8.connect;img.id=id;_8.addClass(img,"layerTile");var left=(_669*col)-_66c.x,top=(_66a*row)-_66c.y,map=this._map,_66e=esri._css.names,css={width:_669+"px",height:_66a+"px",visibility:"hidden"};if(map.navigationMode==="css-transforms"){css[_66e.transform]=esri._css.translate(left,top);_8.style(img,css);img._left=left;img._top=top;}else{css.left=left+"px";css.top=top+"px";_8.style(img,css);}if(_66b<1){_8.style(img,"opacity",_66b);}img._onload_connect=dc(img,"onload",this,"_tileLoadHandler");img._onerror_connect=dc(img,"onerror",this,"_tileErrorHandler");img._onabort_connect=dc(img,"onabort",this,"_tileErrorHandler");var url=this.getTileUrl(_668,r,c,img);if(url){img.src=url;}if(map.navigationMode==="css-transforms"){this._active.appendChild(img);}else{this._div.appendChild(img);}img=null;}},getTileUrl:function(_66f,row,col){},refresh:function(){var ra=this._refreshArgs;this._onExtentChangeHandler(ra.extent,null,true,ra.lod);},_tilePopPop:function(img){var dd=_8.disconnect;dd(img._onload_connect);dd(img._onerror_connect);dd(img._onabort_connect);img._onload_connect=img._onerror_connect=img._onabort_connect=null;this._loadingList.remove(img.id);this._fireOnUpdateEvent();},_tileLoadHandler:function(evt){var img=evt.currentTarget;if(this._noDom){this._standby.push(img);return;}_8.style(img,"visibility","visible");this._tilePopPop(img);},_tileErrorHandler:function(evt){var img=evt.currentTarget;this.onError(new Error(esri.bundle.layers.tiled.tileError+": "+img.src));_8.style(img,"visibility","hidden");this._tilePopPop(img);},_fireOnUpdateEvent:function(){if(this._loadingList.count===0){this._cleanUpRemovedImages();if(this._fireOnUpdate){this._fireOnUpdate=false;this.onUpdate();this._fireUpdateEnd();}}},setOpacity:function(o){if(this.opacity!=o){this.onOpacityChange(this.opacity=o);}},onOpacityChange:function(){},_opacityChangeHandler:function(_670){var djs=_8.style,i,j,_671;if(this._map.navigationMode==="css-transforms"){if(this._active){_671=this._active.childNodes;for(i=_671.length-1;i>=0;i--){djs(_671[i],"opacity",_670);}}for(i=this._passives.length-1;i>=0;i--){_671=this._passives[i].childNodes;for(j=_671.length-1;j>=0;j--){djs(_671[j],"opacity",_670);}}return;}_671=this._div.childNodes;for(i=_671.length-1;i>=0;i--){djs(_671[i],"opacity",_670);}}});_8.declare("esri.layers.TileInfo",null,{constructor:function(json){this.width=json.cols||json.width;this.height=json.rows||json.height;this.dpi=json.dpi;this.format=json.format;var sr=json.spatialReference,ori=json.origin;if(sr){sr=(this.spatialReference=new esri.SpatialReference(sr.declaredClass?sr.toJson():sr));}if(ori){ori=(this.origin=new esri.geometry.Point(ori.declaredClass?ori.toJson():ori));if(!ori.spatialReference&&sr){ori.setSpatialReference(new esri.SpatialReference(sr.toJson()));}}var lods=(this.lods=[]);_8.forEach(json.lods,function(lod,i){lods[i]=new esri.layers.LOD(lod);});}});_8.declare("esri.layers.LOD",null,{constructor:function(json){_8.mixin(this,json);}});}if(!_8._hasResource["esri.layers.agstiled"]){_8._hasResource["esri.layers.agstiled"]=true;_8.provide("esri.layers.agstiled");_8.declare("esri.layers.ArcGISTiledMapServiceLayer",[esri.layers.TiledMapServiceLayer,esri.layers.ArcGISMapServiceLayer],{constructor:function(url,_672){if(_672){if(_672.roundrobin){_8.deprecated(this.declaredClass+" : "+esri.bundle.layers.agstiled.deprecateRoundrobin);_672.tileServers=_672.roundrobin;}this._setTileServers(_672.tileServers);this._loadCallback=_672.loadCallback;}this._params=_8.mixin({},this._url.query);this._initLayer=_8.hitch(this,this._initLayer);var _673=_672&&_672.resourceInfo;if(_673){this._initLayer(_673);}else{this._load=_8.hitch(this,this._load);this._load();}},_TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_setTileServers:function(list){if(list&&list.length>0){this.tileServers=list;var i,il=list.length;for(i=0;i<il;i++){list[i]=esri.urlToObject(list[i]).path;}}},_initLayer:function(_674,io){this.inherited(arguments);this.resourceInfo=_8.toJson(_674);this.tileInfo=new esri.layers.TileInfo(_674.tileInfo);this.isPNG32=this.tileInfo.format==="PNG24"||this.tileInfo.format==="PNG32";if(_674.timeInfo){this.timeInfo=new esri.layers.TimeInfo(_674.timeInfo);}if(!this.tileServers){var path=this._url.path;if(_674.tileServers){this._setTileServers(_674.tileServers);}else{var _675=(path.search(/^https?\:\/\/server\.arcgisonline\.com/i)!==-1),_676=(path.search(/^https?\:\/\/services\.arcgisonline\.com/i)!==-1);if(_675||_676){this._setTileServers([path,path.replace((_675?/server\.arcgisonline/i:/services\.arcgisonline/i),(_675?"services.arcgisonline":"server.arcgisonline"))]);}}}this.loaded=true;this.onLoad(this);var _677=this._loadCallback;if(_677){delete this._loadCallback;_677(this);}},getTileUrl:function(_678,row,col){var ts=this.tileServers,_679=this._url.query,iurl=(ts?ts[row%ts.length]:this._url.path)+"/tile/"+_678+"/"+row+"/"+col;if(_679){iurl+=("?"+_8.objectToQuery(_679));}var _67a=this._getToken();if(_67a&&(!_679||!_679.token)){iurl+=(iurl.indexOf("?")===-1?"?":"&")+"token="+_67a;}return esri._getProxiedUrl(iurl);}});}if(!_8._hasResource["esri.map"]){_8._hasResource["esri.map"]=true;_8.provide("esri.map");if(esri.isTouchEnabled){}else{_8.declare("esri._MapContainer",esri._CoreMap,(function(){var dc=_8.connect,ddc=_8.disconnect,dh=_8.hitch,_67b=_8.mixin,_67c=_8.isMozilla,_67d=_8.stopEvent,dfe=_8.fixEvent,_67e=esri.geometry.Point;var _67f=navigator.userAgent.indexOf("Macintosh")!==-1?1:3,_680=_8.isChrome<2?360:120,_681=1,_682=1,_683=300;return {constructor:function(_684){_67b(this,{_dragEnd:false,_clickDuration:_683,_downCoords:null,_clickTimer:null,_onKeyDown_connect:null,_onKeyUp_connect:null,_onMouseDragHandler_connect:null});var _685=this.__container,cons=this._connects;cons.push(dc(_685,"onselectstart",function(evt){_67d(evt);return false;}),dc(_685,"ondragstart",function(evt){_67d(evt);return false;}));if(_67c){_8.style(_685,"MozUserSelect","none");}cons.push(dc(_685,"onmouseenter",this,"_onMouseEnterHandler"),dc(_685,"onmouseleave",this,"_onMouseLeaveHandler"),dc(_685,"onmousedown",this,"_onMouseDownHandler"),dc(_685,"onclick",this,"_onClickHandler"),dc(_685,"ondblclick",this,"_onDblClickHandler"));this.enableMouseWheel(false);this._onMouseMoveHandler_connect=dc(_685,"onmousemove",this,"_onMouseMoveHandler");this._onMouseUpHandler_connect=dc(_685,"onmouseup",this,"_onMouseUpHandler");this._processEvent=dh(this,this._processEvent);this._fireClickEvent=dh(this,this._fireClickEvent);},_cleanUp:function(){ddc(this._onMouseMoveHandler_connect);ddc(this._onMouseUpHandler_connect);ddc(this._onMouseDragHandler_connect);ddc(this._scrollHandle);var cons=this._connects,i;for(i=cons.length;i>=0;i--){ddc(cons[i]);delete cons[i];}this.inherited("_cleanUp",arguments);},_processEvent:function(evt){evt=dfe(evt,evt.target);if(evt.type==="DOMMouseScroll"&&_8.isFF<3){evt.screenPoint=new _67e(window.scrollX+evt.screenX-this.position.x,window.scrollY+evt.screenY-this.position.y);}else{evt.screenPoint=new _67e(evt.pageX-this.position.x,evt.pageY-this.position.y);}evt.mapPoint=this.extent?this.toMap(evt.screenPoint):new _67e();return evt;},_onMouseEnterHandler:function(evt){ddc(this._onKeyDown_connect);ddc(this._onKeyUp_connect);this._onKeyDown_connect=dc(document,"onkeydown",this,"_onKeyDownHandler");this._onKeyUp_connect=dc(document,"onkeyup",this,"_onKeyUpHandler");this.onMouseOver(this._processEvent(evt));},_onMouseLeaveHandler:function(evt){ddc(this._onKeyDown_connect);ddc(this._onKeyUp_connect);this.onMouseOut(this._processEvent(evt));},_onMouseMoveHandler:function(evt){if(this._dragEnd){this._dragEnd=false;return;}this.onMouseMove(this._processEvent(evt));},_onMouseDownHandler:function(evt){ddc(this._onMouseMoveHandler_connect);var _686=this.__container;if(_686.setCapture){_686.setCapture(false);}this._onMouseDragHandler_connect=dc(document,"onmousemove",this,"_onMouseDragHandler");evt=this._processEvent(evt);this._downCoords=evt.screenPoint.x+","+evt.screenPoint.y;this.onMouseDown(evt);},_onMouseUpHandler:function(evt){var _687=this.__container;if(_687.releaseCapture){_687.releaseCapture();}evt=this._processEvent(evt);ddc(this._onMouseDragHandler_connect);ddc(this._onMouseMoveHandler_connect);this._onMouseMoveHandler_connect=dc(_687,"onmousemove",this,"_onMouseMoveHandler");this.onMouseUp(evt);},_onMouseDragHandler:function(evt){ddc(this._onMouseDragHandler_connect);this._onMouseDragHandler_connect=dc(document,"onmousemove",this,"_onMouseDraggingHandler");ddc(this._onMouseUpHandler_connect);this._onMouseUpHandler_connect=dc(document,"onmouseup",this,"_onDragMouseUpHandler");this._docLeaveConnect=dc(document,"onmouseout",this,"_onDocMouseOut");this.onMouseDragStart(this._processEvent(evt));},_onDocMouseOut:function(evt){var _688=evt.relatedTarget,_689=evt.relatedTarget&&evt.relatedTarget.nodeName.toLowerCase();if(!_688||(_8.isChrome&&_689==="html")){this._onDragMouseUpHandler(evt);}},_onMouseDraggingHandler:function(evt){this.onMouseDrag(this._processEvent(evt));_8.stopEvent(evt);},_onDragMouseUpHandler:function(evt){var _68a=this.__container;if(_68a.releaseCapture){_68a.releaseCapture();}this._dragEnd=true;evt=this._processEvent(evt);this.onMouseDragEnd(evt);ddc(this._docLeaveConnect);ddc(this._onMouseDragHandler_connect);ddc(this._onMouseUpHandler_connect);this._onMouseMoveHandler_connect=dc(_68a,"onmousemove",this,"_onMouseMoveHandler");this._onMouseUpHandler_connect=dc(_68a,"onmouseup",this,"_onMouseUpHandler");this.onMouseUp(evt);},_onClickHandler:function(evt){evt=this._processEvent(evt);if(this._downCoords!==(evt.screenPoint.x+","+evt.screenPoint.y)){return;}clearTimeout(this._clickTimer);this._clickEvent=_67b({},evt);this._clickTimer=setTimeout(this._fireClickEvent,this._clickDuration);},_fireClickEvent:function(){clearTimeout(this._clickTimer);if(_8.isIE<9){var GL=esri.layers.GraphicsLayer;this._clickEvent.graphic=GL._clicked;delete GL._clicked;}this.onClick(this._clickEvent);},_onDblClickHandler:function(evt){clearTimeout(this._clickTimer);this.onDblClick(this._processEvent(evt));},_onMouseWheelHandler:function(evt){if(this.__canStopSWEvt()){_8.stopEvent(evt);}evt=this._processEvent(evt);var _68b=_8.isIE||_8.isWebKit?evt.wheelDelta/_680:-evt.detail/_67f,_68c=Math.abs(_68b);if(_68c<=_681){_68c=_681;}else{_68c=_682;}evt.value=_68b<0?-_68c:_68c;this.onMouseWheel(evt);},__canStopSWEvt:function(){},_onKeyDownHandler:function(evt){this.onKeyDown(evt);},_onKeyUpHandler:function(evt){this.onKeyUp(evt);},__setClickDuration:function(dur){this._clickDuration=dur;},__resetClickDuration:function(){this._clickDuration=_683;},enableMouseWheel:function(_68d){ddc(this._scrollHandle);this._scrollHandle=dc(this.__container,(_8.isFF||_67c)?(_68d?"MozMousePixelScroll":"DOMMouseScroll"):"onmousewheel",this,this._onMouseWheelHandler);},onMouseOver:function(){},onMouseMove:function(){},onMouseOut:function(){},onMouseDown:function(){},onMouseDragStart:function(){},onMouseDrag:function(){},onMouseDragEnd:function(){},onMouseUp:function(){},onClick:function(){},onDblClick:function(){},onMouseWheel:function(){},onKeyDown:function(){},onKeyUp:function(){}};}()));}_8.declare("esri.Map",esri._MapContainer,(function(){var _68e=30,_68f=100,_690=30,_691=10,_692=1,_693=-1,_694=_8.mouseButtons.LEFT,_695={up:"panUp",right:"panRight",down:"panDown",left:"panLeft"},_696={upperRight:"panUpperRight",lowerRight:"panLowerRight",lowerLeft:"panLowerLeft",upperLeft:"panUpperLeft"};var dc=_8.connect,ddc=_8.disconnect,dcr=_8.create,ds=_8.style,dh=_8.hitch,abs=Math.abs,_697=_8.coords,_698=_8.deprecated,dk=_8.keys,_699=_8.mixin,Rect=esri.geometry.Rect,_69a=esri.geometry.Point,_69b=esri.geometry.Extent;var _69c=[dk.NUMPAD_PLUS,61,dk.NUMPAD_MINUS,dk.UP_ARROW,dk.NUMPAD_8,dk.RIGHT_ARROW,dk.NUMPAD_6,dk.DOWN_ARROW,dk.NUMPAD_2,dk.LEFT_ARROW,dk.NUMPAD_4,dk.PAGE_UP,dk.NUMPAD_9,dk.PAGE_DOWN,dk.NUMPAD_3,dk.END,dk.NUMPAD_1,dk.HOME,dk.NUMPAD_7];return {constructor:function(_69d,_69e){_699(this,{_dragOrigin:null,_slider:null,_navDiv:null,_zoomRect:null,_mapParams:_699({slider:true,nav:false,logo:true,sliderStyle:"default"},_69e||{}),_zoom:0,_keyboardPanDx:0,_keyboardPanDy:0});_699(this,{_onLoadHandler_connect:null,_panHandler_connect:null,_panStartHandler_connect:null,_upPanHandler_connect:null,_dblClickZoomHandler_connect:null,_recenterZoomHandler_connect:null,_recenterHandler_connect:null,_downPanHandler_connect:null,_downZoomHandler_connect:null,_keyNavigatingHandler_connect:null,_keyNavigationEndHandler_connect:null,_scrollZoomHandler_connect:null,_zoomHandler_connect:null,_upZoomHandler_connect:null});_699(this,{isDoubleClickZoom:false,isShiftDoubleClickZoom:false,isClickRecenter:false,isScrollWheelZoom:false,isPan:false,isRubberBandZoom:false,isKeyboardNavigation:false,isPanArrows:false,isZoomSlider:false});if(_8.isFunction(esri._css)){esri._css=esri._css(this._mapParams.force3DTransforms);this.force3DTransforms=this._mapParams.force3DTransforms;}var _69f=(esri._hasTransforms&&esri._hasTransitions);this.navigationMode=this._mapParams.navigationMode||(_69f&&"css-transforms")||"classic";if(this.navigationMode==="css-transforms"&&!_69f){this.navigationMode="classic";}this.fadeOnZoom=esri._isDefined(this._mapParams.fadeOnZoom)?this._mapParams.fadeOnZoom:(this.navigationMode==="css-transforms");if(this.navigationMode!=="css-transforms"){this.fadeOnZoom=false;}this._zoomRect=new esri.Graphic(null,new esri.symbol.SimpleFillSymbol(esri.config.defaults.map.zoomSymbol));this.setMapCursor("default");this.smartNavigation=_69e&&_69e.smartNavigation;if(!esri._isDefined(this.smartNavigation)&&_8.isMac&&!esri.isTouchEnabled&&!(_8.isFF<=3.5)){var _6a0=navigator.userAgent.match(/Mac\s+OS\s+X\s+([\d]+)(\.|\_)([\d]+)\D/i);if(_6a0&&esri._isDefined(_6a0[1])&&esri._isDefined(_6a0[3])){var _6a1=parseInt(_6a0[1],10),_6a2=parseInt(_6a0[3],10);this.smartNavigation=((_6a1>10)||(_6a1===10&&_6a2>=6));}}this._onLoadHandler_connect=dc(this,"onLoad",this,"_onLoadInitNavsHandler");if(this._mapParams.logo){var _6a3={right:(this._mapParams.nav?"25px":"")};if(_8.isIE===6){_6a3.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='"+_8.moduleUrl("esri","../../images/map/logo-med.png")+"')";}var logo=this._ogol=dcr("div",{style:_6a3},this.root);if((this.root.clientWidth*this.root.clientHeight)<250000){_8.addClass(logo,"logo-sm");}else{_8.addClass(logo,"logo-med");}if(!esri.isTouchEnabled){this._ogol_connect=dc(logo,"onclick",this,"_openLogoLink");}}if(esri.isTouchEnabled){this._panInitEvent="onTouchStart";this._zoomInitEvent="onGestureStart";}else{this._panInitEvent="onMouseDown";this._zoomInitEvent="onMouseDown";}},_cleanUp:function(){this.disableMapNavigation();var i;for(i=this._connects.length;i>=0;i--){ddc(this._connects[i]);delete this._connects[i];}ddc(this._slider_connect);ddc(this._ogol_connect);var _6a4=this._slider;if(_6a4&&_6a4.destroy){_6a4.destroy();}var _6a5=this._navDiv;if(_6a5){_8.destroy(_6a5);}this.inherited("_cleanUp",arguments);},_normalizeRect:function(evt){var xy=evt.screenPoint,dx=this._dragOrigin.x,dy=this._dragOrigin.y,rect=new Rect((xy.x<dx?xy.x:dx)-this.__visibleRect.x,(xy.y<dy?xy.y:dy)-this.__visibleRect.y,abs(xy.x-dx),abs(xy.y-dy));if(rect.width===0){rect.width=1;}if(rect.height===0){rect.height=1;}return rect;},_downZoomHandler:function(evt){if(evt.button===_694&&evt.shiftKey&&this.isRubberBandZoom){this._dragOrigin=_699({},evt.screenPoint);this.setCursor("crosshair");this._zoomHandler_connect=dc(this,"onMouseDrag",this,"_zoomHandler");this._upZoomHandler_connect=dc(this,"onMouseUp",this,"_upZoomHandler");if(evt.ctrlKey){this._zoom=_693;}else{this._zoom=_692;}if(_8.isChrome){evt.preventDefault();}}},_zoomHandler:function(evt){var rect=this._normalizeRect(evt).offset(this.__visibleRect.x,this.__visibleRect.y),g=this.graphics,_6a6=this._zoomRect;if(!_6a6.geometry){this.setCursor("crosshair");}if(_6a6.geometry){g.remove(_6a6,true);}var tl=this.toMap(new _69a(rect.x,rect.y)),br=this.toMap(new _69a(rect.x+rect.width,rect.y+rect.height));rect=new Rect(tl.x,tl.y,br.x-tl.x,tl.y-br.y);rect._originOnly=true;_6a6.setGeometry(rect);g.add(_6a6,true);},_upZoomHandler:function(evt){var _6a7=this._zoomRect;ddc(this._zoomHandler_connect);ddc(this._upZoomHandler_connect);if(this._canZoom(this._zoom)&&_6a7.getDojoShape()){this.graphics.remove(_6a7);_6a7.geometry=null;var rect=this._normalizeRect(evt);rect.x+=this.__visibleRect.x;rect.y+=this.__visibleRect.y;var _6a8;if(this._zoom===_693){var _6a9=this.extent.getWidth(),_6aa=(_6a9*this.width)/rect.width,_6ab=(_6aa-_6a9)/2,ext=this.extent;_6a8=new _69b(ext.xmin-_6ab,ext.ymin-_6ab,ext.xmax+_6ab,ext.ymax+_6ab,this.spatialReference);}else{var min=this.toMap({x:rect.x,y:(rect.y+rect.height)}),max=this.toMap({x:(rect.x+rect.width),y:rect.y});_6a8=new _69b(min.x,min.y,max.x,max.y,this.spatialReference);}this._extentUtil(null,null,_6a8);}if(_6a7.getDojoShape()){this.graphics.remove(_6a7,true);}this._zoom=0;this.resetMapCursor();},_downPanHandler:function(evt){if(evt.button===_694&&!evt.shiftKey&&this.isPan){this._dragOrigin=new _69a(0,0);_699(this._dragOrigin,evt.screenPoint);this._panHandler_connect=dc(this,"onMouseDrag",this,"_panHandler");this._panStartHandler_connect=dc(this,"onMouseDragStart",this,"_panStartHandler");this._upPanHandler_connect=dc(this,"onMouseUp",this,"_upPanHandler");if(_8.isChrome){evt.preventDefault();}}},_panStartHandler:function(evt){this.setCursor("move");this.__panStart(evt.screenPoint.x,evt.screenPoint.y);},_panHandler:function(evt){this.__pan(evt.screenPoint.x-this._dragOrigin.x,evt.screenPoint.y-this._dragOrigin.y);},_upPanHandler:function(evt){ddc(this._panHandler_connect);ddc(this._panStartHandler_connect);ddc(this._upPanHandler_connect);if(this.__panning){this.__panEnd(evt.screenPoint.x-this._dragOrigin.x,evt.screenPoint.y-this._dragOrigin.y);this.resetMapCursor();}},_isPanningOrZooming:function(){return this.__panning||this.__zooming;},_recenterHandler:function(evt){if(evt.shiftKey&&!this._isPanningOrZooming()){this.centerAt(evt.mapPoint);}},_recenterZoomHandler:function(evt){if(evt.shiftKey&&!this._isPanningOrZooming()){evt.value=evt.ctrlKey?-1:1;this._scrollZoomHandler(evt,true);}},_dblClickZoomHandler:function(evt){if(!this._isPanningOrZooming()){evt.value=1;this._scrollZoomHandler(evt,true);}},_canZoom:function(_6ac){if(!this.__tileInfo){return true;}var _6ad=this.getLevel(),_6ae=this.getNumLevels();if((_6ad===0&&_6ac<0)||(_6ad===_6ae-1&&_6ac>0)){return false;}return true;},_scrollZoomHandler:function(evt,_6af){if(!_6af){if(this.smartNavigation&&!evt.shiftKey&&!this._isPanningOrZooming()){this.disableScrollWheelZoom();this._setScrollWheelPan(true);this._scrollPanHandler(evt);return;}var _6b0=evt.timeStamp;if(!esri._isDefined(_6b0)||_6b0<=0){_6b0=(new Date()).getTime();}var _6b1=this._ts?(_6b0-this._ts):_6b0;if(_6b1<_68f){return;}this._ts=_6b0;}if(!this._canZoom(evt.value)){return;}this._extentUtil({numLevels:evt.value,mapAnchor:evt.mapPoint,screenAnchor:evt.screenPoint});},_scrollPanHandler:function(evt){if(evt.shiftKey&&!this._isPanningOrZooming()){this._setScrollWheelPan(false);this.enableScrollWheelZoom();this._scrollZoomHandler(evt);return;}var dx=0,dy=0;if(_8.isFF){if(evt.axis===evt.HORIZONTAL_AXIS){dx=-evt.detail;}else{dy=-evt.detail;}}else{dx=evt.wheelDeltaX;dy=evt.wheelDeltaY;}this.translate(dx,dy);},_keyNavigatingHandler:function(evt){var kc=evt.keyCode;if(_8.indexOf(_69c,kc)!==-1){if(kc===dk.NUMPAD_PLUS||kc===61){this._extentUtil({numLevels:1});}else{if(kc===dk.NUMPAD_MINUS){this._extentUtil({numLevels:-1});}else{if(!this.__panning){this.__panStart(0,0);}switch(kc){case dk.UP_ARROW:case dk.NUMPAD_8:this._keyboardPanDy+=_691;break;case dk.RIGHT_ARROW:case dk.NUMPAD_6:this._keyboardPanDx-=_691;break;case dk.DOWN_ARROW:case dk.NUMPAD_2:this._keyboardPanDy-=_691;break;case dk.LEFT_ARROW:case dk.NUMPAD_4:this._keyboardPanDx+=_691;break;case dk.PAGE_UP:case dk.NUMPAD_9:this._keyboardPanDx-=_691;this._keyboardPanDy+=_691;break;case dk.PAGE_DOWN:case dk.NUMPAD_3:this._keyboardPanDx-=_691;this._keyboardPanDy-=_691;break;case dk.END:case dk.NUMPAD_1:this._keyboardPanDx+=_691;this._keyboardPanDy-=_691;break;case dk.HOME:case dk.NUMPAD_7:this._keyboardPanDx+=_691;this._keyboardPanDy+=_691;break;default:return;}this.__pan(this._keyboardPanDx,this._keyboardPanDy);}}_8.stopEvent(evt);}},_keyNavigationEndHandler:function(evt){if(this.__panning&&(evt.keyCode!==dk.SHIFT)){this.__panEnd(this._keyboardPanDx,this._keyboardPanDy);this._keyboardPanDx=this._keyboardPanDy=0;}},_onLoadInitNavsHandler:function(){this.enableMapNavigation();this._createNav();if(this._mapParams.sliderStyle==="small"||!this._createSlider){this._createSimpleSlider();}else{this._createSlider();}ddc(this._onLoadHandler_connect);},_createNav:function(){if(this._mapParams.nav){var div,v,i,_6b2=_8.addClass,id=this.id;this._navDiv=dcr("div",{id:id+"_navdiv"},this.root);_6b2(this._navDiv,"navDiv");var w2=this.width/2,h2=this.height/2,wh;for(i in _695){v=_695[i];div=dcr("div",{id:id+"_pan_"+i},this._navDiv);_6b2(div,"fixedPan "+v);if(i==="up"||i==="down"){wh=parseInt(_697(div).w,10)/2;ds(div,{left:(w2-wh)+"px",zIndex:_68e});}else{wh=parseInt(_697(div).h,10)/2;ds(div,{top:(h2-wh)+"px",zIndex:_68e});}this._connects.push(dc(div,"onclick",dh(this,this[v])));}this._onMapResizeNavHandler_connect=dc(this,"onResize",this,"_onMapResizeNavHandler");for(i in _696){v=_696[i];div=dcr("div",{id:id+"_pan_"+i,style:{zIndex:_68e}},this._navDiv);_6b2(div,"fixedPan "+v);this._connects.push(dc(div,"onclick",dh(this,this[v])));}this.isPanArrows=true;}},_onMapResizeNavHandler:function(_6b3,wd,ht){var id=this.id,w2=wd/2,h2=ht/2,byId=_8.byId,i,div,wh;for(i in _695){div=byId(id+"_pan_"+i);if(i==="up"||i==="down"){wh=parseInt(_697(div).w,10)/2;ds(div,"left",(w2-wh)+"px");}else{wh=parseInt(_697(div).h,10)/2;ds(div,"top",(h2-wh)+"px");}}},_createSimpleSlider:function(){if(this._mapParams.slider){var _6b4=(this._slider=dcr("div",{id:this.id+"_zoom_slider","class":"esriSimpleSlider",style:"z-index: "+_690+";"}));_8.addClass(_6b4,esri.config.defaults.map.slider.width?"esriSimpleSliderHorizontal":"esriSimpleSliderVertical");var _6b5=dcr("div",{"class":"esriSimpleSliderIncrementButton"},_6b4);_6b5.innerHTML="+";var _6b6=dcr("div",{"class":"esriSimpleSliderDecrementButton"},_6b4);_6b6.innerHTML="-";if(_8.isIE<8){_8.addClass(_6b6,"dj_ie67Fix");}this._connects.push(dc(_6b5,"onclick",this,this._simpleSliderChangeHandler));this._connects.push(dc(_6b6,"onclick",this,this._simpleSliderChangeHandler));this.root.appendChild(_6b4);this.isZoomSlider=true;}},_simpleSliderChangeHandler:function(evt){var _6b7=(evt.currentTarget.className.indexOf("IncrementButton")!==-1)?true:false;this._extentUtil({numLevels:_6b7?1:-1});},_openLogoLink:function(evt){window.open(esri.config.defaults.map.logoLink,"_blank");_8.stopEvent(evt);},enableMapNavigation:function(){this.enableDoubleClickZoom();this.enableClickRecenter();this.enablePan();this.enableRubberBandZoom();this.enableKeyboardNavigation();if(this.smartNavigation){this._setScrollWheelPan(true);}else{this.enableScrollWheelZoom();}},disableMapNavigation:function(){this.disableDoubleClickZoom();this.disableClickRecenter();this.disablePan();this.disableRubberBandZoom();this.disableKeyboardNavigation();this.disableScrollWheelZoom();if(this.smartNavigation){this._setScrollWheelPan(false);}},enableDoubleClickZoom:function(){if(!this.isDoubleClickZoom){this._dblClickZoomHandler_connect=dc(this,"onDblClick",this,"_dblClickZoomHandler");this.isDoubleClickZoom=true;}},disableDoubleClickZoom:function(){if(this.isDoubleClickZoom){ddc(this._dblClickZoomHandler_connect);this.isDoubleClickZoom=false;}},enableShiftDoubleClickZoom:function(){if(!this.isShiftDoubleClickZoom){_698(this.declaredClass+": "+esri.bundle.map.deprecateShiftDblClickZoom,null,"v2.0");this._recenterZoomHandler_connect=dc(this,"onDblClick",this,"_recenterZoomHandler");this.isShiftDoubleClickZoom=true;}},disableShiftDoubleClickZoom:function(){if(this.isShiftDoubleClickZoom){_698(this.declaredClass+": "+esri.bundle.map.deprecateShiftDblClickZoom,null,"v2.0");ddc(this._recenterZoomHandler_connect);this.isShiftDoubleClickZoom=false;}},enableClickRecenter:function(){if(!this.isClickRecenter){this._recenterHandler_connect=dc(this,"onClick",this,"_recenterHandler");this.isClickRecenter=true;}},disableClickRecenter:function(){if(this.isClickRecenter){ddc(this._recenterHandler_connect);this.isClickRecenter=false;}},enablePan:function(){if(!this.isPan){this._downPanHandler_connect=dc(this,this._panInitEvent,this,"_downPanHandler");this.isPan=true;}},disablePan:function(){if(this.isPan){ddc(this._downPanHandler_connect);this.isPan=false;}},enableRubberBandZoom:function(){if(!this.isRubberBandZoom){this._downZoomHandler_connect=dc(this,this._zoomInitEvent,this,"_downZoomHandler");this.isRubberBandZoom=true;}},disableRubberBandZoom:function(){if(this.isRubberBandZoom){ddc(this._downZoomHandler_connect);this.isRubberBandZoom=false;}},enableKeyboardNavigation:function(){if(!this.isKeyboardNavigation){this._keyNavigatingHandler_connect=dc(this,"onKeyDown",this,"_keyNavigatingHandler");this._keyNavigationEndHandler_connect=dc(this,"onKeyUp",this,"_keyNavigationEndHandler");this.isKeyboardNavigation=true;}},disableKeyboardNavigation:function(){if(this.isKeyboardNavigation){ddc(this._keyNavigatingHandler_connect);ddc(this._keyNavigationEndHandler_connect);this.isKeyboardNavigation=false;}},enableScrollWheelZoom:function(){if(!this.isScrollWheelZoom){this._scrollZoomHandler_connect=dc(this,"onMouseWheel",this,"_scrollZoomHandler");this.isScrollWheelZoom=true;}},__canStopSWEvt:function(){return this.isScrollWheelZoom||this.isScrollWheelPan;},disableScrollWheelZoom:function(){if(this.isScrollWheelZoom){ddc(this._scrollZoomHandler_connect);this.isScrollWheelZoom=false;}},_setScrollWheelPan:function(_6b8){this.isScrollWheelPan=_6b8;this.enableMouseWheel(_6b8);ddc(this._mwMacHandle);if(_6b8){this._mwMacHandle=dc(this,"onMouseWheel",this,this._scrollPanHandler);}},showPanArrows:function(){if(this._navDiv){esri.show(this._navDiv);this.isPanArrows=true;}},hidePanArrows:function(){if(this._navDiv){esri.hide(this._navDiv);this.isPanArrows=false;}},showZoomSlider:function(){if(this._slider){ds(this._slider.domNode||this._slider,"visibility","visible");this.isZoomSlider=true;}},hideZoomSlider:function(){if(this._slider){ds(this._slider.domNode||this._slider,"visibility","hidden");this.isZoomSlider=false;}}};}()));if(esri.isTouchEnabled){_8.extend(esri.Map,(function(){var dc=_8.connect,ddc=_8.disconnect,_6b9=esri.geometry.Point,_6ba=esri.geometry.getLength,_6bb=esri.TileUtils.getCandidateTileInfo;return {_multiTouchTapZoomHandler:function(evt){if(!this._isPanningOrZooming()){evt.value=-1;this._scrollZoomHandler(evt,true);}},_downPanHandler:function(evt){var _6bc=this._zoomAnim||this._panAnim;if(_6bc&&_6bc._active){_6bc.stop();_6bc._fire("onEnd",[_6bc.node]);}this._dragOrigin=new _6b9(0,0);_8.mixin(this._dragOrigin,evt.screenPoint);ddc(this._panHandler_connect);ddc(this._upPanHandler_connect);this._panHandler_connect=dc(this,"onTouchMove",this,this._panHandler);this._upPanHandler_connect=dc(this,"onTouchEnd",this,this._upPanHandler);},_panHandler:function(evt){evt.preventDefault();if(this.__panning){this._panX=evt.screenPoint.x;this._panY=evt.screenPoint.y;this.__pan(evt.screenPoint.x-this._dragOrigin.x,evt.screenPoint.y-this._dragOrigin.y);}else{this.setCursor("move");this.__panStart(evt.screenPoint.x,evt.screenPoint.y);}},_upPanHandler:function(evt){ddc(this._panHandler_connect);ddc(this._upPanHandler_connect);if(this.__panning){this.__panEnd(evt.screenPoint.x-this._dragOrigin.x,evt.screenPoint.y-this._dragOrigin.y);this.resetMapCursor();}},_downZoomHandler:function(evt){var _6bd=this._zoomAnim||this._panAnim;if(_6bd&&_6bd._active){_6bd.stop();_6bd._fire("onEnd",[_6bd.node]);}else{if(this.__panning){evt.screenPoint=new _6b9(this._panX,this._panY);evt.mapPoint=this.toMap(evt.screenPoint);this._upPanHandler(evt);}}ddc(this._zoomHandler_connect);ddc(this._upZoomHandler_connect);this._zoomHandler_connect=dc(this,"onGestureChange",this,this._zoomHandler);this._upZoomHandler_connect=dc(this,"onGestureEnd",this,this._upZoomHandler);},_zoomHandler:function(evt){if(evt.screenPoints){evt.preventDefault();this.currLength=_6ba(evt.screenPoints[0],evt.screenPoints[1]);if(this.__zooming){var _6be=this.currLength/this._length;this._zoomStartExtent=this.__scaleExtent(this.extent,_6be,this._dragOrigin);this.__zoom(this._zoomStartExtent,_6be,this._dragOrigin);}else{this._dragOrigin=new _6b9((evt.screenPoints[0].x+evt.screenPoints[1].x)/2,(evt.screenPoints[0].y+evt.screenPoints[1].y)/2);this._length=this.currLength;this.__zoomStart(this.extent,this._dragOrigin);}this._fireOnScale(this.currLength/this._length,this._dragOrigin,true);}},_upZoomHandler:function(evt){ddc(this._zoomHandler_connect);ddc(this._upZoomHandler_connect);if(evt.processMultiTouchTap){this._multiTouchTapZoomHandler(evt);evt.preventDefault();}else{if(this.__zooming&&this._zoomAnim===null){var _6bf=this.currLength/this._length,_6c0=this.extent.getWidth();this._zoomAnimAnchor=this.toMap(this._dragOrigin);this._zoomStartExtent=this.__scaleExtent(this.extent,1/_6bf,this._zoomAnimAnchor);if(this.__tileInfo){var ct=_6bb(this,this.__tileInfo,this._zoomStartExtent),_6c1=this.__getExtentForLevel(ct.lod.level,this._zoomAnimAnchor),_6c2=this.getNumLevels()-1,_6c3=_6c1.extent,_6c4=_6c1.lod,_6c5=_6c0/_6c3.getWidth(),_6c6=ct.lod.level;if(_6bf<1){if(_6c5>_6bf){_6c6--;}}else{if(_6c5<_6bf){_6c6++;}}if(_6c6<0){_6c6=0;}else{if(_6c6>_6c2){_6c6=_6c2;}}if(_6c6!==ct.lod.level){_6c1=this.__getExtentForLevel(_6c6,this._zoomAnimAnchor);_6c3=_6c1.extent;_6c4=_6c1.lod;}this._zoomEndExtent=_6c3;this._zoomEndLod=_6c4;this._zoomAnim=esri.fx.animateRange({range:{start:(_6c0/this._zoomStartExtent.getWidth()),end:_6c5},duration:esri.config.defaults.map.zoomDuration,rate:esri.config.defaults.map.zoomRate,onAnimate:_8.hitch(this,"_adjustZoomHandler"),onEnd:_8.hitch(this,"_adjustZoomEndHandler")}).play();this._fireOnScale(this.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin);}else{this._zoomEndExtent=this._zoomStartExtent;this._fireOnScale(this.extent.getWidth()/this._zoomEndExtent.getWidth(),this._dragOrigin);this._adjustZoomEndHandler();}}}},_adjustZoomHandler:function(_6c7){var _6c8=this.__scaleExtent(this.extent,_6c7,this._zoomAnimAnchor);this.__zoom(_6c8,_6c7,this._dragOrigin);},_adjustZoomEndHandler:function(){var _6c9=this.extent.getWidth()/this._zoomEndExtent.getWidth(),_6ca=this.__scaleExtent(this.extent,1/_6c9,this._zoomAnimAnchor);this.__zoomEnd(_6ca,_6c9,this._dragOrigin,this._zoomEndLod,true);this._zoomStartExtent=this._zoomEndExtent=this._zoomEndLod=this._dragOrigin=this._zoomAnim=this._zoomAnimAnchor=null;}};}()));}}if(!_8._hasResource["esri.InfoWindowBase"]){_8._hasResource["esri.InfoWindowBase"]=true;_8.provide("esri.InfoWindowBase");_8.declare("esri.InfoWindowBase",null,{constructor:function(){var _6cb=_8.hitch;this.__set_title=_6cb(this,this.__set_title);this.__err_title=_6cb(this,this.__err_title);this.__set_content=_6cb(this,this.__set_content);this.__err_content=_6cb(this,this.__err_content);},setMap:function(map){this.map=map;},unsetMap:function(map){delete this.map;},setTitle:function(){},setContent:function(){},show:function(){},hide:function(){},resize:function(){},onShow:function(){},onHide:function(){},place:function(_6cc,_6cd){if(esri._isDefined(_6cc)){if(_8.isObject(_6cc)){_8.place(_6cc,_6cd,"only");}else{_6cd.innerHTML=_6cc;}}else{_6cd.innerHTML="";}},startupDijits:function(node){this._processDijits(node);},destroyDijits:function(node){this._processDijits(node,true);},_processDijits:function(node,_6ce){if(node&&node.children.length===1){var _6cf=node.children[0];if(_6cf){var _6d0=_9.byNode(_6cf);var _6d1=_6d0?[_6d0]:_9.findWidgets(_6cf);_8.forEach(_6d1,function(_6d2){if(_6ce){if(_6d2._started&&!_6d2._destroyed){try{if(_6d2.destroyRecursive){_6d2.destroyRecursive();}else{if(_6d2.destroy){_6d2.destroy();}}}catch(ex){console.debug("An error occurred when destroying a widget embedded within InfoWindow: "+ex.message);}}}else{if(!_6d2._started){try{_6d2.startup();}catch(ex2){console.debug("An error occurred when starting a widget embedded within InfoWindow: "+ex2.message);}}}});}}},__registerMapListeners:function(){this.__unregisterMapListeners();var map=this.map;this.__handles=[_8.connect(map,"onPan",this,this.__onMapPan),_8.connect(map,"onZoomStart",this,this.__onMapZmStart),_8.connect(map,"onExtentChange",this,this.__onMapExtChg)];},__unregisterMapListeners:function(){var _6d3=this.__handles;if(_6d3){_8.forEach(_6d3,_8.disconnect,_8);this.__handles=null;}},__onMapPan:function(_6d4,_6d5){this.move(_6d5,true);},__onMapZmStart:function(){this.__mcoords=this.mapCoords||this.map.toMap(new esri.geometry.Point(this.coords));this.hide(null,true);},__onMapExtChg:function(_6d6,_6d7,_6d8){var map=this.map,_6d9=this.mapCoords;if(_6d9){this.show(_6d9,null,true);}else{var _6da;if(_6d8){_6da=map.toScreen(this.__mcoords);}else{_6da=this.coords.offset((_6d7&&_6d7.x)||0,(_6d7&&_6d7.y)||0);}this.show(_6da,null,true);}},__setValue:function(_6db,_6dc){this[_6db].innerHTML="";var dfd="_dfd"+_6db,_6dd=this[dfd];if(_6dd&&_6dd.fired===-1){_6dd.cancel();this[dfd]=null;}if(esri._isDefined(_6dc)){if(_6dc instanceof _8.Deferred){this[dfd]=_6dc;_6dc.addCallbacks(this["__set"+_6db],this["__err"+_6db]);}else{this.__render(_6db,_6dc);}}},__set_title:function(_6de){this._dfd_title=null;this.__render("_title",_6de);},__err_title:function(_6df){this._dfd_title=null;},__set_content:function(_6e0){this._dfd_content=null;this.__render("_content",_6e0);},__err_content:function(_6e1){this._dfd_content=null;},__render:function(_6e2,_6e3){var node=this[_6e2];this.place(_6e3,node);if(this.isShowing){this.startupDijits(node);if(_6e2==="_title"&&this._adjustContentArea){this._adjustContentArea();}}}});}if(!_8._hasResource["esri.dijit.InfoWindowLite"]){_8._hasResource["esri.dijit.InfoWindowLite"]=true;_8.provide("esri.dijit.InfoWindowLite");_8.declare("esri.dijit.InfoWindow",[esri.InfoWindowBase],{constructor:function(_6e4,_6e5){_8.mixin(this,_6e4);var _6e6=(this.domNode=_8.byId(_6e5));_6e6.id=this.id||_9.getUniqueId(this.declaredClass);_8.addClass(_6e6,"simpleInfoWindow");this._title=_8.create("div",{"class":"title"},_6e6);this._content=_8.create("div",{"class":"content"},_6e6);this._close=_8.create("div",{"class":"close"},_6e6);},domNode:null,anchor:"upperright",fixedAnchor:null,coords:null,isShowing:true,width:250,height:150,title:"Info Window",_bufferWidth:10,_bufferHeight:10,startup:function(){this._anchors=[esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT,esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT,esri.dijit.InfoWindow.ANCHOR_LOWERLEFT,esri.dijit.InfoWindow.ANCHOR_UPPERLEFT];this.resize(this.width,this.height);this.hide();this._closeConnect=_8.connect(this._close,"onclick",this,this.hide);},destroy:function(){if(this.isShowing){this.hide();}this.destroyDijits(this._title);this.destroyDijits(this._content);_8.disconnect(this._closeConnect);_8.destroy(this.domNode);this.domNode=this._title=this._content=this._anchors=this._closeConnect=null;},setTitle:function(_6e7){if(!_6e7){_8.addClass(this._title,"empty");}else{_8.removeClass(this._title,"empty");}this.destroyDijits(this._title);this.__setValue("_title",_6e7);return this;},setContent:function(_6e8){if(!_6e8){_8.addClass(this._title,"empty");}else{_8.removeClass(this._title,"empty");}this.destroyDijits(this._content);this.__setValue("_content",_6e8);return this;},setFixedAnchor:function(_6e9){if(_6e9&&_8.indexOf(this._anchors,_6e9)===-1){return;}this.fixedAnchor=_6e9;if(this.isShowing){this.show(this.mapCoords||this.coords,_6e9);}this.onAnchorChange(_6e9);},show:function(_6ea,_6eb){if(!_6ea){return;}if(_6ea.spatialReference){this.mapCoords=_6ea;_6ea=this.coords=this.map.toScreen(_6ea,true);}else{this.mapCoords=null;this.coords=_6ea;}if(!_6eb||_8.indexOf(this._anchors,_6eb)===-1){_6eb=this.map.getInfoWindowAnchor(_6ea);}_6eb=(this.anchor=this.fixedAnchor||_6eb);esri.show(this.domNode);this._adjustContentArea();this._adjustPosition(_6ea,_6eb);this.isShowing=true;if(!arguments[2]){this.onShow();}},hide:function(){esri.hide(this.domNode);this.isShowing=false;if(!arguments[1]){this.onHide();}},move:function(_6ec,_6ed){if(_6ed){_6ec=this.coords.offset(_6ec.x,_6ec.y);}else{this.coords=_6ec;if(this.mapCoords){this.mapCoords=this.map.toMap(_6ec);}}this._adjustPosition(_6ec,this.anchor);},resize:function(_6ee,_6ef){this.width=_6ee;this.height=_6ef;_8.style(this.domNode,{width:_6ee+"px",height:_6ef+"px"});_8.style(this._close,{left:(_6ee-2)+"px",top:"-12px"});this._adjustContentArea();if(this.coords){this._adjustPosition(this.coords,this.anchor);}this.onResize(_6ee,_6ef);},onShow:function(){this.__registerMapListeners();this.startupDijits(this._title);this.startupDijits(this._content);},onHide:function(){this.__unregisterMapListeners();},onResize:function(){},onAnchorChange:function(){},_adjustContentArea:function(){var box=_8.contentBox(this.domNode);var _6f0=_8.coords(this._title);var _6f1=_8.coords(this._content);var _6f2=_8.contentBox(this._content);var diff=_6f1.h-_6f2.h;_8.style(this._content,{height:(box.h-_6f0.h-diff)+"px"});},_adjustPosition:function(_6f3,_6f4){var posX=Math.round(_6f3.x),posY=Math.round(_6f3.y);var _6f5=this._bufferWidth,_6f6=this._bufferHeight;var _6f7=_8.coords(this.domNode);switch(_6f4){case esri.dijit.InfoWindow.ANCHOR_UPPERLEFT:posX-=(_6f7.w+_6f5);posY-=(_6f7.h+_6f6);break;case esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT:posX+=_6f5;posY-=(_6f7.h+_6f6);break;case esri.dijit.InfoWindow.ANCHOR_LOWERRIGHT:posX+=_6f5;posY+=_6f6;break;case esri.dijit.InfoWindow.ANCHOR_LOWERLEFT:posX-=(_6f7.w+_6f5);posY+=_6f6;break;}_8.style(this.domNode,{left:posX+"px",top:posY+"px"});}});_8.mixin(esri.dijit.InfoWindow,{ANCHOR_UPPERRIGHT:"upperright",ANCHOR_LOWERRIGHT:"lowerright",ANCHOR_LOWERLEFT:"lowerleft",ANCHOR_UPPERLEFT:"upperleft"});}}};});
