init.js 1.0 MB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087
  1. // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  2. // See https://js.arcgis.com/4.7/esri/copyright.txt for details.
  3. //>>built
  4. (function(a,f){var p,e=function(){return"undefined"!==typeof w&&"function"!==typeof w?w:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this}(),n=function(){},l=function(d){for(var k in d)return 0;return 1},h={}.toString,c=function(d){return"[object Function]"==h.call(d)},m=function(d){return"[object String]"==h.call(d)},b=function(d){return"[object Array]"==h.call(d)},g=function(d,k){if(d)for(var q=0;q<d.length;)k(d[q++])},t=function(d,k){for(var q in k)d[q]=k[q];return d},u=function(d,
  5. k){return t(Error(d),{src:"dojoLoader",info:k})},v=1,x=function(){return"_"+v++},r=function(d,k,q){return pa(d,k,q,0,r)},w=e,q=w.document,d=q&&q.createElement("DiV"),k=r.has=function(k){return c(y[k])?y[k]=y[k](w,q,d):y[k]},y=k.cache=f.hasCache;c(a)&&(a=a(e));k.add=function(d,q,b,g){(void 0===y[d]||g)&&(y[d]=q);return b&&k(d)};k.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);k("host-webworker")&&(t(f.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,
  6. "dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1,"dojo-guarantee-console":0}),f.loaderPatch={injectUrl:function(d,k){try{importScripts(d),k()}catch(mb){console.info("failed to load resource ("+d+")"),console.error(mb)}}});for(var z in a.has)k.add(z,a.has[z],0,1);r.async=1;var A=k("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");r.eval=function(d,k){return A(d+"\r\n//# sourceURL\x3d"+k)};var C={},B=r.signal=function(d,k){d=C[d];g(d&&d.slice(0),function(d){d.apply(null,
  7. b(k)?k:[k])})};z=r.on=function(d,k){var q=C[d]||(C[d]=[]);q.push(k);return{remove:function(){for(var d=0;d<q.length;d++)if(q[d]===k){q.splice(d,1);break}}}};var D=[],F={},G=[],Y={},aa=r.map={},Z=[],H={},W="",I={},U={},e={},O=0,N=function(d){var k,q,b,g;for(k in U)q=U[k],(b=k.match(/^url\:(.+)/))?I["url:"+Ya(b[1],d)]=q:"*now"==k?g=q:"*noref"!=k&&(b=Va(k,d,!0),I[b.mid]=I["url:"+b.url]=q);g&&g(xa(d));U={}},J=function(d){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return"\\"+d})},L=function(d,
  8. k){k.splice(0,k.length);for(var q in d)k.push([q,d[q],new RegExp("^"+J(q)+"(/|$)"),q.length]);k.sort(function(d,k){return k[3]-d[3]});return k},S=function(d,k){g(d,function(d){k.push([m(d[0])?new RegExp("^"+J(d[0])+"$"):d[0],d[1]])})},T=function(d){var k=d.name;k||(k=d,d={name:k});d=t({main:"main"},d);d.location=d.location?d.location:k;d.packageMap&&(aa[k]=d.packageMap);d.main.indexOf("./")||(d.main=d.main.substring(2));Y[k]=d},ha=[],V=function(d,q,b){for(var c in d){"waitSeconds"==c&&(r.waitms=1E3*
  9. (d[c]||0));"cacheBust"==c&&(W=d[c]?m(d[c])?d[c]:(new Date).getTime()+"":"");if("baseUrl"==c||"combo"==c)r[c]=d[c];d[c]!==y&&(r.rawConfig[c]=d[c],"has"!=c&&k.add("config-"+c,d[c],0,q))}r.baseUrl||(r.baseUrl="./");/\/$/.test(r.baseUrl)||(r.baseUrl+="/");for(c in d.has)k.add(c,d.has[c],0,q);g(d.packages,T);for(var a in d.packagePaths)g(d.packagePaths[a],function(d){var k=a+"/"+d;m(d)&&(d={name:d});d.location=k;T(d)});L(t(aa,d.map),Z);g(Z,function(d){d[1]=L(d[1],[]);"*"==d[0]&&(Z.star=d)});L(t(F,d.paths),
  10. G);S(d.aliases,D);if(q)ha.push({config:d.config});else for(c in d.config)q=Ia(c,b),q.config=t(q.config||{},d.config[c]);d.cache&&(N(),U=d.cache,d.cache["*noref"]&&N());B("config",[d,r.rawConfig])};if(k("dojo-cdn")){var P=q.getElementsByTagName("script");p=0;for(var ca,da,ka,ia;p<P.length;)if(ca=P[p++],(ka=ca.getAttribute("src"))&&(ia=ka.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(da=ia[3]||"",f.baseUrl=f.baseUrl||da,O=ca),ka=ca.getAttribute("data-dojo-config")||ca.getAttribute("djConfig"))e=r.eval("({ "+
  11. ka+" })","data-dojo-config"),O=ca}r.rawConfig={};V(f,1);k("dojo-cdn")&&((Y.dojo.location=da)&&(da+="/"),Y.dijit.location=da+"../dijit/",Y.dojox.location=da+"../dojox/");V(a,1);V(e,1);var qa=function(d){E(function(){g(d.deps,M)})},pa=function(d,k,q,g,c){var a;if(m(d)){if((a=Ia(d,g,!0))&&a.executed)return a.result;throw u("undefinedModule",d);}b(d)||(V(d,0,g),d=k,k=q);if(b(d))if(d.length){q="require*"+x();for(var y,e=[],h=0;h<d.length;)y=d[h++],e.push(Ia(y,g));a=t(za("",q,0,""),{injected:2,deps:e,def:k||
  12. n,require:g?g.require:r,gc:1});H[a.mid]=a;qa(a);var l=ma&&!0;E(function(){K(a,l)});a.executed||ta.push(a);ea()}else k&&k();return c},xa=function(d){if(!d)return r;var k=d.require;k||(k=function(q,b,g){return pa(q,b,g,d,k)},d.require=t(k,r),k.module=d,k.toUrl=function(k){return Ya(k,d)},k.toAbsMid=function(k){return Fa(k,d)});return k},ta=[],ya=[],va={},Ga=function(d){d.injected=1;va[d.mid]=1;d.url&&(va[d.url]=d.pack||1);vb()},Ba=function(d){d.injected=2;delete va[d.mid];d.url&&delete va[d.url];l(va)&&
  13. Za()},La=r.idle=function(){return!ya.length&&l(va)&&!ta.length&&!ma},fa=function(d,k){if(k)for(var q=0;q<k.length;q++)if(k[q][2].test(d))return k[q];return 0},wa=function(d){var k=[],q,b;for(d=d.replace(/\\/g,"/").split("/");d.length;)q=d.shift(),".."==q&&k.length&&".."!=b?(k.pop(),b=k[k.length-1]):"."!=q&&k.push(b=q);return k.join("/")},za=function(d,k,q,b){return{pid:d,mid:k,pack:q,url:b,executed:0,def:0}},hb=function(d,k,q,b,a,m,y,e,t){var h,l,x,w;w=/^\./.test(d);if(/(^\/)|(\:)|(\.js$)/.test(d)||
  14. w&&!k)return za(0,d,0,d);d=wa(w?k.mid+"/../"+d:d);if(/^\./.test(d))throw u("irrationalPath",d);k&&(x=fa(k.mid,m));(x=(x=x||m.star)&&fa(d,x[1]))&&(d=x[1]+d.substring(x[3]));k=(ia=d.match(/^([^\/]+)(\/(.+))?$/))?ia[1]:"";(h=q[k])?d=k+"/"+(l=ia[3]||h.main):k="";var r=0;g(e,function(k){var q=d.match(k[0]);q&&0<q.length&&(r=c(k[1])?d.replace(k[0],k[1]):k[1])});if(r)return hb(r,0,q,b,a,m,y,e,t);if(q=b[d])return t?za(q.pid,q.mid,q.pack,q.url):b[d];b=(x=fa(d,y))?x[1]+d.substring(x[3]):k?("/"===h.location.slice(-1)?
  15. h.location.slice(0,-1):h.location)+"/"+l:d;/(^\/)|(\:)/.test(b)||(b=a+b);return za(k,d,h,wa(b+".js"))},Va=function(d,k,q){return hb(d,k,Y,H,r.baseUrl,q?[]:Z,q?[]:G,q?[]:D)},Ma=function(d,k,q){return d.normalize?d.normalize(k,function(d){return Fa(d,q)}):Fa(k,q)},Ka=0,Ia=function(d,k,q){var b,g;(b=d.match(/^(.+?)\!(.*)$/))?(g=Ia(b[1],k,q),5!==g.executed||g.load||Qa(g),g.load?(b=Ma(g,b[2],k),d=g.mid+"!"+(g.dynamic?++Ka+"!":"")+b):(b=b[2],d=g.mid+"!"+ ++Ka+"!waitingForPlugin"),d={plugin:g,mid:d,req:xa(k),
  16. prid:b}):d=Va(d,k);return H[d.mid]||!q&&(H[d.mid]=d)},Fa=r.toAbsMid=function(d,k){return Va(d,k).mid},Ya=r.toUrl=function(d,k){k=Va(d+"/x",k);var q=k.url;return ja(0===k.pid?d:q.substring(0,q.length-5))},Ja={injected:2,executed:5,def:3,result:3};da=function(d){return H[d]=t({mid:d},Ja)};var Ra=da("require"),Q=da("exports"),Ha=da("module"),ua={},ga=0,Qa=function(d){var k=d.result;d.dynamic=k.dynamic;d.normalize=k.normalize;d.load=k.load;return d},Na=function(d){var k={};g(d.loadQ,function(q){var b=
  17. Ma(d,q.prid,q.req.module),g=d.dynamic?q.mid.replace(/waitingForPlugin$/,b):d.mid+"!"+b,b=t(t({},q),{mid:g,prid:b,injected:0});H[g]&&H[g].injected||na(H[g]=b);k[q.mid]=H[g];Ba(q);delete H[q.mid]});d.loadQ=0;var q=function(d){for(var q=d.deps||[],b=0;b<q.length;b++)(d=k[q[b].mid])&&(q[b]=d)},b;for(b in H)q(H[b]);g(ta,q)},la=function(d){r.trace("loader-finish-exec",[d.mid]);d.executed=5;d.defOrder=ga++;d.loadQ&&(Qa(d),Na(d));for(p=0;p<ta.length;)ta[p]===d?ta.splice(p,1):p++;/^require\*/.test(d.mid)&&
  18. delete H[d.mid]},db=[],K=function(d,k){if(4===d.executed)return r.trace("loader-circular-dependency",[db.concat(d.mid).join("-\x3e")]),!d.def||k?ua:d.cjs&&d.cjs.exports;if(!d.executed){if(!d.def)return ua;var q=d.mid,b=d.deps||[],g,a=[],m=0;for(d.executed=4;g=b[m++];){g=g===Ra?xa(d):g===Q?d.cjs.exports:g===Ha?d.cjs:K(g,k);if(g===ua)return d.executed=0,r.trace("loader-exec-module",["abort",q]),ua;a.push(g)}r.trace("loader-run-factory",[d.mid]);k=d.def;a=c(k)?k.apply(null,a):k;d.result=void 0===a&&
  19. d.cjs?d.cjs.exports:a;la(d)}return d.result},ma=0,E=function(d){try{ma++,d()}catch(tb){throw tb;}finally{ma--}La()&&B("idle",[])},ea=function(){ma||E(function(){for(var d,k,q=0;q<ta.length;)d=ga,k=ta[q],K(k),d!=ga?q=0:q++})},ja="function"==typeof a.fixupUrl?a.fixupUrl:function(d){d+="";return d+(W?(/\?/.test(d)?"\x26":"?")+W:"")};void 0===k("dojo-loader-eval-hint-url")&&k.add("dojo-loader-eval-hint-url",1);var na=function(d){var k=d.plugin;5!==k.executed||k.load||Qa(k);var q=function(k){d.result=
  20. k;Ba(d);la(d);ea()};k.load?k.load(d.prid,d.req,q):k.loadQ?k.loadQ.push(d):(k.loadQ=[d],ta.unshift(k),M(k))},X=0,ba=function(d,q){k("config-stripStrict")&&(d=d.replace(/(["'])use strict\1/g,""));d===X?X.call(null):r.eval(d,k("dojo-loader-eval-hint-url")?q.url:q.mid)},M=function(d){var q=d.mid,b=d.url;if(!(d.executed||d.injected||va[q]||d.url&&(d.pack&&va[d.url]===d.pack||1==va[d.url])))if(Ga(d),d.plugin)na(d);else{var g=function(){Oa(d);if(2!==d.injected){if(k("dojo-enforceDefine")){B("error",u("noDefine",
  21. d));return}Ba(d);t(d,Ja);r.trace("loader-define-nonmodule",[d.url])}ea()};(X=I[q]||I["url:"+d.url])?(r.trace("loader-inject",["cache",d.mid,b]),ba(X,d),g()):(r.trace("loader-inject",["script",d.mid,b]),r.injectUrl(ja(b),g,d))}},nb=function(d,k,q){r.trace("loader-define-module",[d.mid,k]);if(2===d.injected)return B("error",u("multipleDefine",d)),d;t(d,{deps:k,def:q,cjs:{id:d.mid,uri:d.url,exports:d.result={},setExports:function(k){d.cjs.exports=k},config:function(){return d.config}}});for(var b=0;k[b];b++)k[b]=
  22. Ia(k[b],d);Ba(d);c(q)||k.length||(d.result=q,la(d));return d},Oa=function(d,k){for(var q=[],b,c;ya.length;)c=ya.shift(),k&&(c[0]=k.shift()),b=c[0]&&Ia(c[0])||d,q.push([b,c[1],c[2]]);N(d);g(q,function(d){qa(nb.apply(null,d))})},Za=n,vb=n;k("dom");if(k("dom")){var Sa=function(d,k,q,b){d.addEventListener(k,b,!1);return function(){d.removeEventListener(k,b,!1)}},wb=Sa(window,"load","onload",function(){r.pageLoaded=1;try{"complete"!=q.readyState&&(q.readyState="complete")}catch(sb){}wb()}),P=q.getElementsByTagName("script");
  23. for(p=0;!O;)/^dojo/.test((ca=P[p++])&&ca.type)||(O=ca);r.injectUrl=function(d,k,b){b=b.node=q.createElement("script");var g=Sa(b,"load","onreadystatechange",function(d){d=d||window.event;var q=d.target||d.srcElement;if("load"===d.type||/complete|loaded/.test(q.readyState))g(),c(),k&&k()}),c=Sa(b,"error","onerror",function(k){g();c();B("error",u("scriptError",[d,k]))});b.type="text/javascript";b.charset="utf-8";b.src=d;O.parentNode.insertBefore(b,O);return b}}r.log=n;r.trace=n;ca=function(d,k,q){var b=
  24. arguments.length,g=["require","exports","module"],a=[0,d,k];1==b?a=[0,c(d)?g:[],d]:2==b&&m(d)?a=[d,c(k)?g:[],k]:3==b&&(a=[d,k,q]);r.trace("loader-define",a.slice(0,2));(b=a[0]&&Ia(a[0]))&&!va[b.mid]?qa(nb(b,a[1],a[2])):ya.push(a)};ca.amd={vendor:"dojotoolkit.org"};t(t(r,f.loaderPatch),a.loaderPatch);z("error",function(d){try{if(console.error(d),d instanceof Error){for(var k in d)console.log(k+":",d[k]);console.log(".")}}catch(mb){}});t(r,{uid:x,cache:I,packs:Y});w.define||(w.define=ca,w.require=r,
  25. g(ha,function(d){V(d)}),ca=e.deps||a.deps||f.deps,a=e.callback||a.callback||f.callback,r.boot=ca||a?[ca||[],a]:0)})(function(a){return a.dojoConfig||a.djConfig||a.require||{}},{aliases:[[/^webgl-engine/,function(){return"esri/views/3d/webgl-engine"}],[/^engine/,function(){return"esri/views/3d/webgl-engine"}],[/^esri-hydra/,function(){return"esri"}]],async:1,baseUrl:(location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + window.location.host + "/tba-gx/static/arcgis_js_api/library/4.7/dojo",hasCache:{"config-deferredInstrumentation":0,"config-selectorEngine":"lite","config-tlmSiblingOfDojo":1,
  26. "dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,dom:1,"esri-built":1,"esri-featurelayer-webgl":0,"esri-promise-compatibility":1,"esri-promise-compatibility-deprecation-warnings":1,"host-browser":1},map:{globalize:{cldr:"cldrjs/dist/cldr","cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},
  27. {location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",name:"esri"},{location:"../moment",main:"moment",name:"moment"},{location:"../@dojo",name:"@dojo"},{location:"../cldrjs",main:"dist/cldr",name:"cldrjs"},{location:"../globalize",main:"dist/globalize",name:"globalize"},{location:"../maquette",main:"dist/maquette.umd",name:"maquette"},{location:"../maquette-css-transitions",main:"dist/maquette-css-transitions.umd",name:"maquette-css-transitions"},
  28. {location:"../maquette-jsx",main:"dist/maquette-jsx.umd",name:"maquette-jsx"},{location:"../tslib",main:"tslib",name:"tslib"}]});
  29. require({cache:{"dojo/domReady":function(){define(["./global","./has"],function(a,f){function p(b){m.push(b);c&&e()}function e(){if(!b){for(b=!0;m.length;)try{m.shift()(n)}catch(v){console.error(v,"in domReady callback",v.stack)}b=!1;p._onQEmpty()}}var n=document,l={loaded:1,complete:1},h="string"!=typeof n.readyState,c=!!l[n.readyState],m=[],b;p.load=function(b,g,c){p(c)};p._Q=m;p._onQEmpty=function(){};h&&(n.readyState="loading");if(!c){var g=[],t=function(b){b=b||a.event;c||"readystatechange"==
  30. b.type&&!l[n.readyState]||(h&&(n.readyState="complete"),c=1,e())};f=function(b,g){b.addEventListener(g,t,!1);m.push(function(){b.removeEventListener(g,t,!1)})};f(n,"DOMContentLoaded");f(a,"load");"onreadystatechange"in n?f(n,"readystatechange"):h||g.push(function(){return l[n.readyState]});if(g.length){var u=function(){if(!c){for(var b=g.length;b--;)if(g[b]()){t("poller");return}setTimeout(u,30)}};u()}}return p})},"dojo/global":function(){define(function(){return"undefined"!==typeof global&&"function"!==
  31. typeof global?global:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this})},"dojo/has":function(){define(["./global","require","module"],function(a,f,p){var e=f.has||function(){};if(!e("dojo-has-api")){var n=(f="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document)&&document,l=n&&n.createElement("DiV"),h=p.config&&p.config()||{},e=function(c){return"function"==typeof h[c]?h[c]=h[c](a,n,l):h[c]};
  32. e.cache=h;e.add=function(c,a,b,g){("undefined"==typeof h[c]||g)&&(h[c]=a);return b&&e(c)};e.add("host-browser",f);e.add("dom",f)}e("host-browser")&&(e.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),e.add("touch-events","ontouchstart"in document),e.add("pointer-events","pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window),e.add("device-width",screen.availWidth||innerWidth),p=document.createElement("form"),
  33. e.add("dom-attributes-specified-flag",0<p.attributes.length&&40>p.attributes.length));e.clearElement=function(c){c.innerHTML="";return c};e.normalize=function(c,a){var b=c.match(/[\?:]|[^:\?]*/g),g=0,m=function(c){var a=b[g++];if(":"==a)return 0;if("?"==b[g++]){if(!c&&e(a))return m();m(!0);return m(c)}return a||0};return(c=m())&&a(c)};e.load=function(c,a,b){c?a([c],b):b()};return e})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),
  34. function(a){return a})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./has!host-browser?./domReady","./_base/lang"],function(a,f,p,e,n){var l=0,h=[],c=0;f=function(){l=1;a._postLoad=a.config.afterOnLoad=!0;m()};var m=function(){if(!c){for(c=1;l&&(!e||0==e._Q.length)&&(p.idle?p.idle():1)&&h.length;){var b=h.shift();try{b()}catch(u){if(u.info=u.message,p.signal)p.signal("error",u);else throw u;}}c=0}};p.on&&p.on("idle",m);e&&(e._onQEmpty=m);var b=a.ready=a.addOnLoad=function(b,
  35. g,c){var e=n._toArray(arguments);"number"!=typeof b?(c=g,g=b,b=1E3):e.shift();c=c?n.hitch.apply(a,e):function(){g()};c.priority=b;for(e=0;e<h.length&&b>=h[e].priority;e++);h.splice(e,0,c);m()},g=a.config.addOnLoad;if(g)b[n.isArray(g)?"apply":"call"](a,g);e?e(f):f();return b})},"dojo/_base/kernel":function(){define(["../global","../has","./config","require","module"],function(a,f,p,e,n){var l,h={},c={},m={config:p,global:a,dijit:h,dojox:c},h={dojo:["dojo",m],dijit:["dijit",h],dojox:["dojox",c]};n=
  36. e.map&&e.map[n.id.match(/[^\/]+/)[0]];for(l in n)h[l]?h[l][0]=n[l]:h[l]=[n[l],{}];for(l in h)n=h[l],n[1]._scopeName=n[0],p.noGlobals||(a[n[0]]=n[1]);m.scopeMap=h;m.baseUrl=m.config.baseUrl=e.baseUrl;m.isAsync=e.async;m.locale=p.locale;a="$Rev: aaa6750 $".match(/[0-9a-f]{7,}/);m.version={major:1,minor:13,patch:0,flag:"",revision:a?a[0]:NaN,toString:function(){var b=m.version;return b.major+"."+b.minor+"."+b.patch+b.flag+" ("+b.revision+")"}};f("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(m);
  37. m.exit=function(){};f("host-webworker");"undefined"!=typeof console||(console={});a="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var b;for(f=0;b=a[f++];)console[b]?console[b]=Function.prototype.bind.call(console[b],console):function(){var g=b+"";console[g]="log"in console?function(){var b=Array.prototype.slice.call(arguments);b.unshift(g+":");console.log(b.join(" "))}:function(){};console[g]._fake=!0}();m.deprecated=m.experimental=
  38. function(){};m._hasResource={};return m})},"dojo/_base/config":function(){define(["../global","../has","require"],function(a,f,p){a={};p=p.rawConfig;for(var e in p)a[e]=p[e];!a.locale&&"undefined"!=typeof navigator&&(e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(a.locale=e.toLowerCase());return a})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(a,f){var p=function(c,m,b){b||(b=c[0]&&a.scopeMap[c[0]]?
  39. a.scopeMap[c.shift()][1]:a.global);try{for(var g=0;g<c.length;g++){var e=c[g];if(!(e in b))if(m)b[e]={};else return;b=b[e]}return b}catch(u){}},e=Object.prototype.toString,n=function(c,a,b){return(b||[]).concat(Array.prototype.slice.call(c,a||0))},l=/\{([^\}]+)\}/g,h={_extraNames:[],_mixin:function(c,a,b){var g,m,e={};for(g in a)m=a[g],g in c&&(c[g]===m||g in e&&e[g]===m)||(c[g]=b?b(m):m);return c},mixin:function(c,a){c||(c={});for(var b=1,g=arguments.length;b<g;b++)h._mixin(c,arguments[b]);return c},
  40. setObject:function(c,a,b){var g=c.split(".");c=g.pop();return(b=p(g,!0,b))&&c?b[c]=a:void 0},getObject:function(c,a,b){return c?p(c.split("."),a,b):b},exists:function(c,a){return void 0!==h.getObject(c,!1,a)},isString:function(c){return"string"==typeof c||c instanceof String},isArray:Array.isArray||function(c){return"[object Array]"==e.call(c)},isFunction:function(c){return"[object Function]"===e.call(c)},isObject:function(c){return void 0!==c&&(null===c||"object"==typeof c||h.isArray(c)||h.isFunction(c))},
  41. isArrayLike:function(c){return!!c&&!h.isString(c)&&!h.isFunction(c)&&!(c.tagName&&"form"==c.tagName.toLowerCase())&&(h.isArray(c)||isFinite(c.length))},isAlien:function(c){return c&&!h.isFunction(c)&&/\{\s*\[native code\]\s*\}/.test(String(c))},extend:function(c,a){for(var b=1,g=arguments.length;b<g;b++)h._mixin(c.prototype,arguments[b]);return c},_hitchArgs:function(c,m){var b=h._toArray(arguments,2),g=h.isString(m);return function(){var e=h._toArray(arguments),l=g?(c||a.global)[m]:m;return l&&l.apply(c||
  42. this,b.concat(e))}},hitch:function(c,m){if(2<arguments.length)return h._hitchArgs.apply(a,arguments);m||(m=c,c=null);if(h.isString(m)){c=c||a.global;if(!c[m])throw['lang.hitch: scope["',m,'"] is null (scope\x3d"',c,'")'].join("");return function(){return c[m].apply(c,arguments||[])}}return c?function(){return m.apply(c,arguments||[])}:m},delegate:function(){function c(){}return function(a,b){c.prototype=a;a=new c;c.prototype=null;b&&h._mixin(a,b);return a}}(),_toArray:f("ie")?function(){function c(c,
  43. b,g){g=g||[];for(b=b||0;b<c.length;b++)g.push(c[b]);return g}return function(a){return(a.item?c:n).apply(this,arguments)}}():n,partial:function(c){return h.hitch.apply(a,[null].concat(h._toArray(arguments)))},clone:function(c){if(!c||"object"!=typeof c||h.isFunction(c))return c;if(c.nodeType&&"cloneNode"in c)return c.cloneNode(!0);if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp)return new RegExp(c);var a,b,g;if(h.isArray(c))for(a=[],b=0,g=c.length;b<g;++b)b in c&&(a[b]=h.clone(c[b]));
  44. else a=c.constructor?new c.constructor:{};return h._mixin(a,c,h.clone)},trim:String.prototype.trim?function(c){return c.trim()}:function(c){return c.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(c,a,b){return c.replace(b||l,h.isFunction(a)?a:function(b,c){return h.getObject(c,!1,a)})}};h.mixin(a,h);return h})},"dojo/sniff":function(){define(["./has"],function(a){if(a("host-browser")){var f=navigator,p=f.userAgent,f=f.appVersion,e=parseFloat(f);a.add("edge",parseFloat(p.split("Edge/")[1])||
  45. void 0);a.add("webkit",!a("edge")&&parseFloat(p.split("WebKit/")[1])||void 0);a.add("chrome",!a("edge")&&!0&&parseFloat(p.split("Chrome/")[1])||void 0);a.add("safari",0<=f.indexOf("Safari")&&!a("chrome")&&!a("edge")?parseFloat(f.split("Version/")[1]):void 0);a.add("mac",0<=f.indexOf("Macintosh"));if(p.match(/(iPhone|iPod|iPad)/)){var n=RegExp.$1.replace(/P/,"p"),l=p.match(/OS ([\d_]+)/)?RegExp.$1:"1",l=parseFloat(l.replace(/_/,".").replace(/_/g,""));a.add(n,l);a.add("ios",l)}a.add("trident",parseFloat(f.split("Trident/")[1])||
  46. void 0);a("webkit")||(0<=p.indexOf("Opera")&&a.add("opera",9.8<=e?parseFloat(p.split("Version/")[1])||e:e),0<=p.indexOf("Gecko")&&!a("trident")&&!a("edge")&&a.add("mozilla",e),a("mozilla")&&a.add("ff",parseFloat(p.split("Firefox/")[1]||p.split("Minefield/")[1])||void 0),document.all&&!a("opera")&&(p=parseFloat(f.split("MSIE ")[1])||void 0,(f=document.documentMode)&&5!=f&&Math.floor(p)!=f&&(p=f),a.add("ie",p)))}return a})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),
  47. function(a,f,p,e,n,l,h,c){function m(b,g,q,d,k){d=c.hitch(q,d);if(!b||!b.addEventListener&&!b.attachEvent)return e.after(b||a.global,g,d,!0);"string"==typeof g&&"on"==g.substring(0,2)&&(g=g.substring(2));b||(b=a.global);if(!k)switch(g){case "keypress":g=v;break;case "mouseenter":g=l.enter;break;case "mouseleave":g=l.leave}return f(b,g,d,k)}function b(b){b.keyChar=b.charCode?String.fromCharCode(b.charCode):"";b.charOrCode=b.keyChar||b.keyCode}h.add("events-keypress-typed",function(){var b={charCode:0};
  48. try{b=document.createEvent("KeyboardEvent"),(b.initKeyboardEvent||b.initKeyEvent).call(b,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(w){}return 0==b.charCode&&!h("opera")});var g={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},t=h("mac")?"metaKey":"ctrlKey",u=function(g,a){a=c.mixin({},g,a);b(a);a.preventDefault=function(){g.preventDefault()};a.stopPropagation=function(){g.stopPropagation()};return a},v;v=h("events-keypress-typed")?function(b,
  49. c){var q=f(b,"keydown",function(d){var k=d.keyCode,q=13!=k&&32!=k&&(27!=k||!h("ie"))&&(48>k||90<k)&&(96>k||111<k)&&(186>k||192<k)&&(219>k||222<k)&&229!=k;if(q||d.ctrlKey){q=q?0:k;if(d.ctrlKey){if(3==k||13==k)return c.call(d.currentTarget,d);q=95<q&&106>q?q-48:!d.shiftKey&&65<=q&&90>=q?q+32:g[q]||q}k=u(d,{type:"keypress",faux:!0,charCode:q});c.call(d.currentTarget,k);if(h("ie"))try{d.keyCode=k.keyCode}catch(A){}}}),d=f(b,"keypress",function(d){var k=d.charCode;d=u(d,{charCode:32<=k?k:0,faux:!0});return c.call(this,
  50. d)});return{remove:function(){q.remove();d.remove()}}}:h("opera")?function(b,g){return f(b,"keypress",function(q){var d=q.which;3==d&&(d=99);d=32>d&&!q.shiftKey?0:d;q.ctrlKey&&!q.shiftKey&&65<=d&&90>=d&&(d+=32);return g.call(this,u(q,{charCode:d}))})}:function(g,c){return f(g,"keypress",function(q){b(q);return c.call(this,q)})};var x={_keypress:v,connect:function(b,g,q,d,k){var c=arguments,a=[],e=0;a.push("string"==typeof c[0]?null:c[e++],c[e++]);var t=c[e+1];a.push("string"==typeof t||"function"==
  51. typeof t?c[e++]:null,c[e++]);for(t=c.length;e<t;e++)a.push(c[e]);return m.apply(this,a)},disconnect:function(b){b&&b.remove()},subscribe:function(b,g,q){return p.subscribe(b,c.hitch(g,q))},publish:function(b,g){return p.publish.apply(p,[b].concat(g))},connectPublisher:function(b,g,q){var d=function(){x.publish(b,arguments)};return q?x.connect(g,q,d):x.connect(g,d)},isCopyKey:function(b){return b[t]}};x.unsubscribe=x.disconnect;c.mixin(a,x);return x})},"dojo/on":function(){define(["require","./_base/kernel",
  52. "./sniff"],function(a,f,p){function e(b,a,m,e,q){if(e=a.match(/(.*):(.*)/))return a=e[2],e=e[1],h.selector(e,a).call(q,b,m);p("touch")&&c.test(a)&&(m=u(m));if(b.addEventListener){var d=a in g,k=d?g[a]:a;b.addEventListener(k,m,d);return{remove:function(){b.removeEventListener(k,m,d)}}}throw Error("Target must be an event emitter");}function n(){this.cancelable=!1;this.defaultPrevented=!0}function l(){this.bubbles=!1}p("dom")&&p("touch");var h=function(b,g,c,a){return"function"!=typeof b.on||"function"==
  53. typeof g||b.nodeType?h.parse(b,g,c,e,a,this):b.on(g,c)};h.pausable=function(b,g,c,a){var q;b=h(b,g,function(){if(!q)return c.apply(this,arguments)},a);b.pause=function(){q=!0};b.resume=function(){q=!1};return b};h.once=function(b,g,c,a){var q=h(b,g,function(){q.remove();return c.apply(this,arguments)});return q};h.parse=function(b,g,c,a,q,d){var k;if(g.call)return g.call(d,b,c);g instanceof Array?k=g:-1<g.indexOf(",")&&(k=g.split(/\s*,\s*/));if(k){var m=[];g=0;for(var e;e=k[g++];)m.push(h.parse(b,
  54. e,c,a,q,d));m.remove=function(){for(var d=0;d<m.length;d++)m[d].remove()};return m}return a(b,g,c,q,d)};var c=/^touch/;h.matches=function(b,g,c,a,q){q=q&&"function"==typeof q.matches?q:f.query;a=!1!==a;1!=b.nodeType&&(b=b.parentNode);for(;!q.matches(b,g,c);)if(b==c||!1===a||!(b=b.parentNode)||1!=b.nodeType)return!1;return b};h.selector=function(b,g,c){return function(a,q){function d(d){return h.matches(d,b,a,c,k)}var k="function"==typeof b?{matches:b}:this,m=g.bubble;return m?h(a,m(d),q):h(a,g,function(k){var b=
  55. d(k.target);if(b)return k.selectorTarget=b,q.call(b,k)})}};var m=[].slice,b=h.emit=function(b,g,c){var a=m.call(arguments,2),q="on"+g;if("parentNode"in b){var d=a[0]={},k;for(k in c)d[k]=c[k];d.preventDefault=n;d.stopPropagation=l;d.target=b;d.type=g;c=d}do b[q]&&b[q].apply(b,a);while(c&&c.bubbles&&(b=b.parentNode));return c&&c.cancelable&&c},g={};h.emit=function(g,c,a){if(g.dispatchEvent&&document.createEvent){var m=(g.ownerDocument||document).createEvent("HTMLEvents");m.initEvent(c,!!a.bubbles,
  56. !!a.cancelable);for(var q in a)q in m||(m[q]=a[q]);return g.dispatchEvent(m)&&m}return b.apply(h,arguments)};if(p("touch"))var t=window.orientation,u=function(b){return function(g){var c=g.corrected;if(!c){var a=g.type;try{delete g.type}catch(k){}if(g.type){var c={},q;for(q in g)c[q]=g[q];c.preventDefault=function(){g.preventDefault()};c.stopPropagation=function(){g.stopPropagation()}}else c=g,c.type=a;g.corrected=c;if("resize"==a){if(t==window.orientation)return null;t=window.orientation;c.type=
  57. "orientationchange";return b.call(this,c)}"rotation"in c||(c.rotation=0,c.scale=1);if(window.TouchEvent&&g instanceof TouchEvent){var a=c.changedTouches[0],d;for(d in a)delete c[d],c[d]=a[d]}}return b.call(this,c)}};return h})},"dojo/topic":function(){define(["./Evented"],function(a){var f=new a;return{publish:function(a,e){return f.emit.apply(f,arguments)},subscribe:function(a,e){return f.on.apply(f,arguments)}}})},"dojo/Evented":function(){define(["./aspect","./on"],function(a,f){function p(){}
  58. var e=a.after;p.prototype={on:function(a,l){return f.parse(this,a,l,function(a,c){return e(a,"on"+c,l,!0)})},emit:function(a,e){var h=[this];h.push.apply(h,arguments);return f.emit.apply(f,h)}};return p})},"dojo/aspect":function(){define([],function(){function a(a,c,m,b){var g=a[c],e="around"==c,h;if(e){var l=m(function(){return g.advice(this,arguments)});h={remove:function(){l&&(l=a=m=null)},advice:function(b,c){return l?l.apply(b,c):g.advice(b,c)}}}else h={remove:function(){if(h.advice){var b=h.previous,
  59. g=h.next;g||b?(b?b.next=g:a[c]=g,g&&(g.previous=b)):delete a[c];a=m=h.advice=null}},id:a.nextId++,advice:m,receiveArguments:b};if(g&&!e)if("after"==c){for(;g.next&&(g=g.next););g.next=h;h.previous=g}else"before"==c&&(a[c]=h,h.next=g,g.previous=h);else a[c]=h;return h}function f(e){return function(c,m,b,g){var t=c[m],h;t&&t.target==c||(c[m]=h=function(){for(var b=h.nextId,g=arguments,c=h.before;c;)c.advice&&(g=c.advice.apply(this,g)||g),c=c.next;if(h.around)var a=h.around.advice(this,g);for(c=h.after;c&&
  60. c.id<b;){if(c.advice)if(c.receiveArguments)var q=c.advice.apply(this,g),a=q===p?a:q;else a=c.advice.call(this,a,g);c=c.next}return a},t&&(h.around={advice:function(b,g){return t.apply(b,g)}}),h.target=c,h.nextId=h.nextId||0);c=a(h||t,e,b,g);b=null;return c}}var p,e=f("after"),n=f("before"),l=f("around");return{before:n,around:l,after:e}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(a,f,p,e){if(f._fixEvent){var n=f._fixEvent;f._fixEvent=function(a,
  61. h){(a=n(a,h))&&e.normalizeEvent(a);return a}}p={fix:function(a,e){return f._fixEvent?f._fixEvent(a,e):a},stop:function(a){a.preventDefault();a.stopPropagation()}};a.fixEvent=p.fix;a.stopEvent=p.stop;return p})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(a,f,p,e){function n(b,g,c,a,m,e){e=e||"px";b=b.style;isNaN(g)||(b.left=g+e);isNaN(c)||(b.top=c+e);0<=a&&(b.width=a+e);0<=m&&(b.height=m+e)}function l(b){return"button"==b.tagName.toLowerCase()||
  62. "input"==b.tagName.toLowerCase()&&"button"==(b.getAttribute("type")||"").toLowerCase()}function h(b){return"border-box"==c.boxModel||"table"==b.tagName.toLowerCase()||l(b)}var c={boxModel:"content-box"};a("ie")&&(c.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");c.getPadExtents=function(b,g){b=p.byId(b);var c=g||e.getComputedStyle(b),a=e.toPixelValue;g=a(b,c.paddingLeft);var m=a(b,c.paddingTop),h=a(b,c.paddingRight);b=a(b,c.paddingBottom);return{l:g,t:m,r:h,b:b,w:g+h,h:m+b}};
  63. c.getBorderExtents=function(b,g){b=p.byId(b);var c=e.toPixelValue,a=g||e.getComputedStyle(b);g="none"!=a.borderLeftStyle?c(b,a.borderLeftWidth):0;var m="none"!=a.borderTopStyle?c(b,a.borderTopWidth):0,h="none"!=a.borderRightStyle?c(b,a.borderRightWidth):0;b="none"!=a.borderBottomStyle?c(b,a.borderBottomWidth):0;return{l:g,t:m,r:h,b:b,w:g+h,h:m+b}};c.getPadBorderExtents=function(b,g){b=p.byId(b);var a=g||e.getComputedStyle(b);g=c.getPadExtents(b,a);b=c.getBorderExtents(b,a);return{l:g.l+b.l,t:g.t+
  64. b.t,r:g.r+b.r,b:g.b+b.b,w:g.w+b.w,h:g.h+b.h}};c.getMarginExtents=function(b,g){b=p.byId(b);var c=g||e.getComputedStyle(b),a=e.toPixelValue;g=a(b,c.marginLeft);var m=a(b,c.marginTop),h=a(b,c.marginRight);b=a(b,c.marginBottom);return{l:g,t:m,r:h,b:b,w:g+h,h:m+b}};c.getMarginBox=function(b,g){b=p.byId(b);g=g||e.getComputedStyle(b);g=c.getMarginExtents(b,g);var m=b.offsetLeft-g.l,h=b.offsetTop-g.t,l=b.parentNode,x=e.toPixelValue;8==a("ie")&&l&&(l=e.getComputedStyle(l),m-="none"!=l.borderLeftStyle?x(b,
  65. l.borderLeftWidth):0,h-="none"!=l.borderTopStyle?x(b,l.borderTopWidth):0);return{l:m,t:h,w:b.offsetWidth+g.w,h:b.offsetHeight+g.h}};c.getContentBox=function(b,g){b=p.byId(b);var m=g||e.getComputedStyle(b);g=b.clientWidth;var h,l=c.getPadExtents(b,m);h=c.getBorderExtents(b,m);var m=b.offsetLeft+l.l+h.l,x=b.offsetTop+l.t+h.t;g?h=b.clientHeight:(g=b.offsetWidth-h.w,h=b.offsetHeight-h.h);if(8==a("ie")){var n=b.parentNode,w=e.toPixelValue;n&&(n=e.getComputedStyle(n),m-="none"!=n.borderLeftStyle?w(b,n.borderLeftWidth):
  66. 0,x-="none"!=n.borderTopStyle?w(b,n.borderTopWidth):0)}return{l:m,t:x,w:g-l.w,h:h-l.h}};c.setContentSize=function(b,g,a){b=p.byId(b);var m=g.w;g=g.h;h(b)&&(a=c.getPadBorderExtents(b,a),0<=m&&(m+=a.w),0<=g&&(g+=a.h));n(b,NaN,NaN,m,g)};var m={l:0,t:0,w:0,h:0};c.setMarginBox=function(b,g,t){b=p.byId(b);var u=t||e.getComputedStyle(b);t=g.w;var f=g.h,x=h(b)?m:c.getPadBorderExtents(b,u),u=c.getMarginExtents(b,u);if(a("webkit")&&l(b)){var r=b.style;0<=t&&!r.width&&(r.width="4px");0<=f&&!r.height&&(r.height=
  67. "4px")}0<=t&&(t=Math.max(t-x.w-u.w,0));0<=f&&(f=Math.max(f-x.h-u.h,0));n(b,g.l,g.t,t,f)};c.isBodyLtr=function(b){b=b||f.doc;return"ltr"==(f.body(b).dir||b.documentElement.dir||"ltr").toLowerCase()};c.docScroll=function(b){b=b||f.doc;var g=f.doc.parentWindow||f.doc.defaultView;return"pageXOffset"in g?{x:g.pageXOffset,y:g.pageYOffset}:(g=b.documentElement)&&{x:c.fixIeBiDiScrollLeft(g.scrollLeft||0,b),y:g.scrollTop||0}};c.getIeDocumentElementOffset=function(b){return{x:0,y:0}};c.fixIeBiDiScrollLeft=
  68. function(b,g){g=g||f.doc;var m=a("ie");if(m&&!c.isBodyLtr(g)){g=g.documentElement;var e=f.global;6==m&&e.frameElement&&g.scrollHeight>g.clientHeight&&(b+=g.clientLeft);return 8>m?b+g.clientWidth-g.scrollWidth:-b}return b};c.position=function(b,g){b=p.byId(b);f.body(b.ownerDocument);var m=b.getBoundingClientRect(),m={x:m.left,y:m.top,w:m.right-m.left,h:m.bottom-m.top};9>a("ie")&&(m.x-=0,m.y-=0);g&&(b=c.docScroll(b.ownerDocument),m.x+=b.x,m.y+=b.y);return m};c.getMarginSize=function(b,g){b=p.byId(b);
  69. g=c.getMarginExtents(b,g||e.getComputedStyle(b));b=b.getBoundingClientRect();return{w:b.right-b.left+g.w,h:b.bottom-b.top+g.h}};c.normalizeEvent=function(b){"layerX"in b||(b.layerX=b.offsetX,b.layerY=b.offsetY);if(!("pageX"in b)){var g=b.target,g=g&&g.ownerDocument||document,a=g.documentElement;b.pageX=b.clientX+c.fixIeBiDiScrollLeft(a.scrollLeft||0,g);b.pageY=b.clientY+(a.scrollTop||0)}};return c})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(a,f,p){var e={global:a.global,
  70. doc:a.global.document||null,body:function(e){e=e||a.doc;return e.body||e.getElementsByTagName("body")[0]},setContext:function(n,l){a.global=e.global=n;a.doc=e.doc=l},withGlobal:function(n,l,h,c){var m=a.global;try{return a.global=e.global=n,e.withDoc.call(null,n.document,l,h,c)}finally{a.global=e.global=m}},withDoc:function(n,l,h,c){var m=e.doc,b=p("ie"),g,t,u;try{return a.doc=e.doc=n,a.isQuirks=0,p("ie")&&(u=n.parentWindow)&&u.navigator&&(g=parseFloat(u.navigator.appVersion.split("MSIE ")[1])||void 0,
  71. (t=n.documentMode)&&5!=t&&Math.floor(g)!=t&&(g=t),a.isIE=p.add("ie",g,!0,!0)),h&&"string"==typeof l&&(l=h[l]),l.apply(h,c||[])}finally{a.doc=e.doc=m,a.isQuirks=0,a.isIE=p.add("ie",b,!0,!0)}}};f.mixin(a,e);return e})},"dojo/dom":function(){define(["./sniff","./_base/window","./_base/kernel"],function(a,f,p){if(7>=a("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(l){}var e={};a("ie")?e.byId=function(a,e){if("string"!=typeof a)return a;var c=e||f.doc;e=a&&c.getElementById(a);if(!e||
  72. e.attributes.id.value!=a&&e.id!=a){c=c.all[a];if(!c||c.nodeName)c=[c];for(var m=0;e=c[m++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}else return e}:e.byId=function(a,e){return("string"==typeof a?(e||f.doc).getElementById(a):a)||null};p=p.global.document||null;a.add("dom-contains",!(!p||!p.contains));e.isDescendant=a("dom-contains")?function(a,h){return!(!(h=e.byId(h))||!h.contains(e.byId(a)))}:function(a,h){try{for(a=e.byId(a),h=e.byId(h);a;){if(a==h)return!0;a=
  73. a.parentNode}}catch(c){}return!1};a.add("css-user-select",function(a,e,c){if(!c)return!1;a=c.style;e=["Khtml","O","Moz","Webkit"];c=e.length;var m="userSelect";do if("undefined"!==typeof a[m])return m;while(c--&&(m=e[c]+"UserSelect"));return!1});var n=a("css-user-select");e.setSelectable=n?function(a,h){e.byId(a).style[n]=h?"":"none"}:function(a,h){a=e.byId(a);var c=a.getElementsByTagName("*"),m=c.length;if(h)for(a.removeAttribute("unselectable");m--;)c[m].removeAttribute("unselectable");else for(a.setAttribute("unselectable",
  74. "on");m--;)c[m].setAttribute("unselectable","on")};return e})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(a,f,p){function e(b,c,a){c=c.toLowerCase();if("auto"==a){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(a){case 700:return"bold";default:return"normal"}c in g||(g[c]=t.test(c));return g[c]?h(b,a):a}var n,l={};n=a("webkit")?function(b){var g;if(1==b.nodeType){var c=b.ownerDocument.defaultView;g=c.getComputedStyle(b,
  75. null);!g&&b.style&&(b.style.display="",g=c.getComputedStyle(b,null))}return g||{}}:a("ie")&&9>a("ie")?function(b){return 1==b.nodeType&&b.currentStyle?b.currentStyle:{}}:function(b){if(1===b.nodeType){var g=b.ownerDocument.defaultView;return(g.opener?g:p.global.window).getComputedStyle(b,null)}return{}};l.getComputedStyle=n;var h;h=a("ie")?function(b,g){if(!g)return 0;if("medium"==g)return 4;if(g.slice&&"px"==g.slice(-2))return parseFloat(g);var c=b.style,a=b.runtimeStyle,q=c.left,d=a.left;a.left=
  76. b.currentStyle.left;try{c.left=g,g=c.pixelLeft}catch(k){g=0}c.left=q;a.left=d;return g}:function(b,g){return parseFloat(g)||0};l.toPixelValue=h;var c=function(b,g){try{return b.filters.item("DXImageTransform.Microsoft.Alpha")}catch(r){return g?{}:null}},m=9>a("ie")||(a("ie"),0)?function(b){try{return c(b).Opacity/100}catch(x){return 1}}:function(b){return n(b).opacity},b=9>a("ie")||(a("ie"),0)?function(g,a){""===a&&(a=1);var m=100*a;1===a?(g.style.zoom="",c(g)&&(g.style.filter=g.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,
  77. ""))):(g.style.zoom=1,c(g)?c(g,1).Opacity=m:g.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+m+")",c(g,1).Enabled=!0);if("tr"==g.tagName.toLowerCase())for(g=g.firstChild;g;g=g.nextSibling)"td"==g.tagName.toLowerCase()&&b(g,a);return a}:function(b,g){return b.style.opacity=g},g={left:!0,top:!0},t=/margin|padding|width|height|max|min|offset/,u={cssFloat:1,styleFloat:1,"float":1};l.get=function(b,g){var c=f.byId(b),a=arguments.length;if(2==a&&"opacity"==g)return m(c);g=u[g]?"cssFloat"in
  78. c.style?"cssFloat":"styleFloat":g;var q=l.getComputedStyle(c);return 1==a?q:e(c,g,q[g]||c.style[g])};l.set=function(g,c,a){var m=f.byId(g),q=arguments.length,d="opacity"==c;c=u[c]?"cssFloat"in m.style?"cssFloat":"styleFloat":c;if(3==q)return d?b(m,a):m.style[c]=a;for(var k in c)l.set(g,k,c[k]);return l.getComputedStyle(m)};return l})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(a,f,p,e,n){function l(a,c){var m=function(b,g){return f(b,a,function(a){if(c)return c(a,
  79. g);if(!e.isDescendant(a.relatedTarget,b))return g.call(this,a)})};m.bubble=function(b){return l(a,function(g,c){var a=b(g.target),m=g.relatedTarget;if(a&&a!=(m&&1==m.nodeType&&b(m)))return c.call(a,g)})};return m}p={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(a,c){return a.button==c},isLeft:function(a){return 0==a.button},isMiddle:function(a){return 1==a.button},isRight:function(a){return 2==a.button}};a.mouseButtons=p;return{_eventHandler:l,enter:l("mouseover"),leave:l("mouseout"),wheel:"mousewheel",
  80. isLeft:p.isLeft,isMiddle:p.isMiddle,isRight:p.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(a,f,p){if(!p("host-browser"))return p;a._name="browser";f.mixin(a,{isBrowser:!0,isFF:p("ff"),isIE:p("ie"),isKhtml:0,isWebKit:p("webkit"),isMozilla:p("mozilla"),isMoz:p("mozilla"),isOpera:p("opera"),isSafari:p("safari"),isChrome:p("chrome"),isMac:p("mac"),isIos:p("ios"),isAndroid:0,isWii:0,isQuirks:0,isAir:0});return p})},"dojo/keys":function(){define(["./_base/kernel",
  81. "./sniff"],function(a,f){return a.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:f("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,
  82. NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:f("mac")?f("safari")?91:224:17}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(a,f,p){var e=window,n={addOnWindowUnload:function(l,h){a.windowUnloaded||p(e,"unload",a.windowUnloaded=function(){});p(e,"unload",f.hitch(l,
  83. h))},addOnUnload:function(a,h){p(e,"beforeunload",f.hitch(a,h))}};a.addOnWindowUnload=n.addOnWindowUnload;a.addOnUnload=n.addOnUnload;return n})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(a,f,p,e,n,l,h,c){a.byId=f.byId;a.isDescendant=f.isDescendant;a.setSelectable=f.setSelectable;a.getAttr=e.get;a.setAttr=e.set;a.hasAttr=e.has;a.removeAttr=e.remove;a.getNodeProp=e.getNodeProp;a.attr=
  84. function(c,b,g){return 2==arguments.length?e["string"==typeof b?"get":"set"](c,b):e.set(c,b,g)};a.hasClass=l.contains;a.addClass=l.add;a.removeClass=l.remove;a.toggleClass=l.toggle;a.replaceClass=l.replace;a._toDom=a.toDom=h.toDom;a.place=h.place;a.create=h.create;a.empty=function(c){h.empty(c)};a._destroyElement=a.destroy=function(c){h.destroy(c)};a._getPadExtents=a.getPadExtents=c.getPadExtents;a._getBorderExtents=a.getBorderExtents=c.getBorderExtents;a._getPadBorderExtents=a.getPadBorderExtents=
  85. c.getPadBorderExtents;a._getMarginExtents=a.getMarginExtents=c.getMarginExtents;a._getMarginSize=a.getMarginSize=c.getMarginSize;a._getMarginBox=a.getMarginBox=c.getMarginBox;a.setMarginBox=c.setMarginBox;a._getContentBox=a.getContentBox=c.getContentBox;a.setContentSize=c.setContentSize;a._isBodyLtr=a.isBodyLtr=c.isBodyLtr;a._docScroll=a.docScroll=c.docScroll;a._getIeDocumentElementOffset=a.getIeDocumentElementOffset=c.getIeDocumentElementOffset;a._fixIeBiDiScrollLeft=a.fixIeBiDiScrollLeft=c.fixIeBiDiScrollLeft;
  86. a.position=c.position;a.marginBox=function(a,b){return b?c.setMarginBox(a,b):c.getMarginBox(a)};a.contentBox=function(a,b){return b?c.setContentSize(a,b):c.getContentBox(a)};a.coords=function(m,b){a.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");m=f.byId(m);var g=p.getComputedStyle(m),g=c.getMarginBox(m,g);m=c.position(m,b);g.x=m.x;g.y=m.y;return g};a.getProp=n.get;a.setProp=n.set;a.prop=function(c,b,g){return 2==arguments.length?n["string"==typeof b?"get":"set"](c,b):n.set(c,
  87. b,g)};a.getStyle=p.get;a.setStyle=p.set;a.getComputedStyle=p.getComputedStyle;a.__toPixelValue=a.toPixelValue=p.toPixelValue;a.style=function(c,b,g){switch(arguments.length){case 1:return p.get(c);case 2:return p["string"==typeof b?"get":"set"](c,b)}return p.set(c,b,g)};return a})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(a,f,p,e,n,l){function h(b,g){b=b.getAttributeNode&&b.getAttributeNode(g);return!!b&&b.specified}var c={innerHTML:1,
  88. textContent:1,className:1,htmlFor:f("ie"),value:1},m={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};a.has=function(b,g){var a=g.toLowerCase();return c[l.names[a]||g]||h(e.byId(b),m[a]||g)};a.get=function(b,g){b=e.byId(b);var a=g.toLowerCase(),u=l.names[a]||g,n=b[u];if(c[u]&&"undefined"!=typeof n)return n;if("textContent"==u)return l.get(b,u);if("href"!=u&&("boolean"==typeof n||p.isFunction(n)))return n;g=m[a]||g;return h(b,g)?b.getAttribute(g):null};a.set=function(b,g,t){b=
  89. e.byId(b);if(2==arguments.length){for(var h in g)a.set(b,h,g[h]);return b}h=g.toLowerCase();var f=l.names[h]||g,x=c[f];if("style"==f&&"string"!=typeof t)return n.set(b,t),b;if(x||"boolean"==typeof t||p.isFunction(t))return l.set(b,g,t);b.setAttribute(m[h]||g,t);return b};a.remove=function(b,g){e.byId(b).removeAttribute(m[g.toLowerCase()]||g)};a.getNodeProp=function(b,g){b=e.byId(b);var c=g.toLowerCase(),a=l.names[c]||g;if(a in b&&"href"!=a)return b[a];g=m[c]||g;return h(b,g)?b.getAttribute(g):null}})},
  90. "dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(a,f,p,e,n,l,h,c){var m={},b=1,g=f._scopeName+"attrid";a.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};a.get=function(b,g){b=n.byId(b);var c=g.toLowerCase();return b[a.names[c]||g]};a.set=function(t,u,f){t=
  91. n.byId(t);if(2==arguments.length&&"string"!=typeof u){for(var x in u)a.set(t,x,u[x]);return t}x=u.toLowerCase();x=a.names[x]||u;if("style"==x&&"string"!=typeof f)return l.set(t,f),t;if("innerHTML"==x)return p("ie")&&t.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(h.empty(t),t.appendChild(h.toDom(f,t.ownerDocument))):t[x]=f,t;if(e.isFunction(f)){var r=t[g];r||(r=b++,t[g]=r);m[r]||(m[r]={});var w=m[r][x];if(w)c.disconnect(w);else try{delete t[x]}catch(q){}f?
  92. m[r][x]=c.connect(t,x,f):t[x]=null;return t}t[x]=f;return t}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(a,f,p,e,n,l){function h(b,d){var k=d.parentNode;k&&k.insertBefore(b,d)}function c(b){if("innerHTML"in b)try{b.innerHTML="";return}catch(k){}for(var d;d=b.lastChild;)b.removeChild(d)}var m={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table",
  93. "thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},b=/<\s*([\w\:]+)/,g={},t=0,u="__"+f._scopeName+"ToDomId",v;for(v in m)m.hasOwnProperty(v)&&(f=m[v],f.pre="option"==v?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+f.join("\x3e\x3c")+"\x3e",f.post="\x3c/"+f.reverse().join("\x3e\x3c/")+"\x3e");var x;8>=p("ie")&&(x=function(b){b.__dojo_html5_tested="yes";var d=r("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},b.body);1!==
  94. d.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(d){b.createElement(d)});w(d)});a.toDom=function(q,d){d=d||e.doc;var k=d[u];k||(d[u]=k=++t+"",g[k]=d.createElement("div"));8>=p("ie")&&!d.__dojo_html5_tested&&d.body&&x(d);q+="";var c=q.match(b),a=c?c[1].toLowerCase():"",k=g[k];if(c&&m[a])for(c=m[a],k.innerHTML=c.pre+q+c.post,q=c.length;q;--q)k=k.firstChild;else k.innerHTML=
  95. q;if(1==k.childNodes.length)return k.removeChild(k.firstChild);for(q=d.createDocumentFragment();d=k.firstChild;)q.appendChild(d);return q};a.place=function(b,d,k){d=n.byId(d);"string"==typeof b&&(b=/^\s*</.test(b)?a.toDom(b,d.ownerDocument):n.byId(b));if("number"==typeof k){var q=d.childNodes;!q.length||q.length<=k?d.appendChild(b):h(b,q[0>k?0:k])}else switch(k){case "before":h(b,d);break;case "after":k=b;(q=d.parentNode)&&(q.lastChild==d?q.appendChild(k):q.insertBefore(k,d.nextSibling));break;case "replace":d.parentNode.replaceChild(b,
  96. d);break;case "only":a.empty(d);d.appendChild(b);break;case "first":if(d.firstChild){h(b,d.firstChild);break}default:d.appendChild(b)}return b};var r=a.create=function(b,d,k,g){var q=e.doc;k&&(k=n.byId(k),q=k.ownerDocument);"string"==typeof b&&(b=q.createElement(b));d&&l.set(b,d);k&&a.place(b,k,g);return b};a.empty=function(b){c(n.byId(b))};var w=a.destroy=function(b){if(b=n.byId(b)){var d=b;b=b.parentNode;d.firstChild&&c(d);b&&(p("ie")&&b.canHaveChildren&&"removeNode"in d?d.removeNode(!1):b.removeChild(d))}}})},
  97. "dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(a,f,p){function e(c){if("string"==typeof c||c instanceof String){if(c&&!l.test(c))return h[0]=c,h;c=c.split(l);c.length&&!c[0]&&c.shift();c.length&&!c[c.length-1]&&c.pop();return c}return c?f.filter(c,function(b){return b}):[]}var n,l=/\s+/,h=[""],c={};return n={contains:function(c,b){return 0<=(" "+p.byId(c).className+" ").indexOf(" "+b+" ")},add:function(c,b){c=p.byId(c);b=e(b);var g=c.className,a,g=g?" "+g+" ":
  98. " ";a=g.length;for(var m=0,h=b.length,l;m<h;++m)(l=b[m])&&0>g.indexOf(" "+l+" ")&&(g+=l+" ");a<g.length&&(c.className=g.substr(1,g.length-2))},remove:function(c,b){c=p.byId(c);var g;if(void 0!==b){b=e(b);g=" "+c.className+" ";for(var m=0,h=b.length;m<h;++m)g=g.replace(" "+b[m]+" "," ");g=a.trim(g)}else g="";c.className!=g&&(c.className=g)},replace:function(a,b,g){a=p.byId(a);c.className=a.className;n.remove(c,g);n.add(c,b);a.className!==c.className&&(a.className=c.className)},toggle:function(c,b,
  99. g){c=p.byId(c);if(void 0===g){b=e(b);for(var a=0,m=b.length,h;a<m;++a)h=b[a],n[n.contains(c,h)?"remove":"add"](c,h)}else n[g?"add":"remove"](c,b);return g}}})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(a,f,p){function e(b){return h[b]=new Function("item","index","array",b)}function n(b){var c=!b;return function(g,a,m){var t=0,l=g&&g.length||0,n;l&&"string"==typeof g&&(g=g.split(""));"string"==typeof a&&(a=h[a]||e(a));if(m)for(;t<l;++t){if(n=!a.call(m,g[t],t,g),b^
  100. n)return!n}else for(;t<l;++t)if(n=!a(g[t],t,g),b^n)return!n;return c}}function l(b){var g=1,a=0,e=0;b||(g=a=e=-1);return function(h,t,l,n){if(n&&0<g)return m.lastIndexOf(h,t,l);n=h&&h.length||0;var q=b?n+e:a;l===c?l=b?a:n+e:0>l?(l=n+l,0>l&&(l=a)):l=l>=n?n+e:l;for(n&&"string"==typeof h&&(h=h.split(""));l!=q;l+=g)if(h[l]==t)return l;return-1}}var h={},c,m={every:n(!1),some:n(!0),indexOf:l(!0),lastIndexOf:l(!1),forEach:function(b,c,a){var g=0,m=b&&b.length||0;m&&"string"==typeof b&&(b=b.split(""));"string"==
  101. typeof c&&(c=h[c]||e(c));if(a)for(;g<m;++g)c.call(a,b[g],g,b);else for(;g<m;++g)c(b[g],g,b)},map:function(b,c,a,m){var g=0,t=b&&b.length||0;m=new (m||Array)(t);t&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=h[c]||e(c));if(a)for(;g<t;++g)m[g]=c.call(a,b[g],g,b);else for(;g<t;++g)m[g]=c(b[g],g,b);return m},filter:function(b,c,a){var g=0,m=b&&b.length||0,t=[],l;m&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=h[c]||e(c));if(a)for(;g<m;++g)l=b[g],c.call(a,l,g,b)&&t.push(l);
  102. else for(;g<m;++g)l=b[g],c(l,g,b)&&t.push(l);return t},clearCache:function(){h={}}};p.mixin(a,m);return m})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],function(a,f,p){f=f.NodeList;var e=f.prototype;e.connect=f._adaptAsForEach(function(){return a.connect.apply(this,arguments)});e.coords=f._adaptAsMap(a.coords);f.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");
  103. p.forEach(f.events,function(a){var l="on"+a;e[l]=function(a,c){return this.connect(l,a,c)}});return a.NodeList=f})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(a,f,p,e,n,l,h,c){function m(d,k){var b=function(b,c){if("string"==typeof c&&(c=p.byId(c),!c))return new k([]);b="string"==typeof b?d(b,c):b?b.end&&b.on?b:[b]:[];return b.end&&b.on?b:new k(b)};b.matches=d.match||function(d,k,c){return 0<
  104. b.filter([d],k,c).length};b.filter=d.filter||function(d,k,c){return b(k,c).filter(function(k){return-1<n.indexOf(d,k)})};if("function"!=typeof d){var c=d.search;d=function(d,k){return c(k||document,d)}}return b}var b=Array.prototype,g=b.slice,t=b.concat,u=n.forEach,v=function(d,k,b){k=[0].concat(g.call(k,0));b=b||a.global;return function(c){k[0]=c;return d.apply(b,k)}},x=function(d){var k=this instanceof r&&1;"number"==typeof d&&(d=Array(d));var b=d&&"length"in d?d:arguments;if(k||!b.sort){for(var c=
  105. k?this:[],g=c.length=b.length,q=0;q<g;q++)c[q]=b[q];if(k)return c;b=c}l._mixin(b,w);b._NodeListCtor=function(d){return r(d)};return b},r=x,w=r.prototype=[];r._wrap=w._wrap=function(d,k,b){d=new (b||this._NodeListCtor||r)(d);return k?d._stash(k):d};r._adaptAsMap=function(d,k){return function(){return this.map(v(d,arguments,k))}};r._adaptAsForEach=function(d,k){return function(){this.forEach(v(d,arguments,k));return this}};r._adaptAsFilter=function(d,k){return function(){return this.filter(v(d,arguments,
  106. k))}};r._adaptWithCondition=function(d,k,b){return function(){var c=arguments,g=v(d,c,b);if(k.call(b||a.global,c))return this.map(g);this.forEach(g);return this}};u(["slice","splice"],function(d){var k=b[d];w[d]=function(){return this._wrap(k.apply(this,arguments),"slice"==d?this:null)}});u(["indexOf","lastIndexOf","every","some"],function(d){var k=n[d];w[d]=function(){return k.apply(a,[this].concat(g.call(arguments,0)))}});l.extend(x,{constructor:r,_NodeListCtor:r,toString:function(){return this.join(",")},
  107. _stash:function(d){this._parent=d;return this},on:function(d,k){var b=this.map(function(b){return e(b,d,k)});b.remove=function(){for(var d=0;d<b.length;d++)b[d].remove()};return b},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},concat:function(d){var k=g.call(this,0),b=n.map(arguments,function(d){return g.call(d,0)});return this._wrap(t.apply(k,b),this)},map:function(d,k){return this._wrap(n.map(this,d,k),this)},forEach:function(d,k){u(this,d,k);return this},filter:function(d){var k=
  108. arguments,b=this,c=0;if("string"==typeof d){b=q._filterResult(this,k[0]);if(1==k.length)return b._stash(this);c=1}return this._wrap(n.filter(b,k[c],k[c+1]),this)},instantiate:function(d,k){var b=l.isFunction(d)?d:l.getObject(d);k=k||{};return this.forEach(function(d){new b(k,d)})},at:function(){var d=new this._NodeListCtor(0);u(arguments,function(k){0>k&&(k=this.length+k);this[k]&&d.push(this[k])},this);return d._stash(this)}});var q=m(c,x);a.query=m(c,function(d){return x(d)});q.load=function(d,
  109. k,b){h.load(d,k,function(d){b(m(d,x))})};a._filterQueryResult=q._filterResult=function(d,k,b){return new x(q.filter(d,k,b))};a.NodeList=q.NodeList=x;return q})},"dojo/selector/_loader":function(){define(["../has","require"],function(a,f){"undefined"!==typeof document&&document.createElement("div");var p;return{load:function(e,n,l,h){if(h&&h.isBuild)l();else{h=f;e="default"==e?a("config-selectorEngine")||"css3":e;e="css2"==e||"lite"==e?"./lite":"css2.1"==e?"./lite":"css3"==e?"./lite":"acme"==e?"./acme":
  110. (h=n)&&e;if("?"==e.charAt(e.length-1)){e=e.substring(0,e.length-1);var c=!0}if(c&&(a("dom-compliant-qsa")||p))return l(p);h([e],function(c){"./lite"!=e&&(p=c);l(c)})}}}})},"dojo/selector/lite":function(){define(["../has","../_base/kernel"],function(a,f){var p=document.createElement("div"),e=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.msMatchesSelector||p.oMatchesSelector,n=p.querySelectorAll,l=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g,h=function(e,b){var g=b?b.ownerDocument||
  111. b:f.doc||document,m=(n?/^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/:/^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/).exec(e);b=b||g;if(m){var l=(a("ie"),null!==b.parentNode&&9!==b.nodeType&&b.parentNode===g);if(m[2]&&l){var v=f.byId?f.byId(m[2],g):g.getElementById(m[2]);if(!v||m[1]&&m[1]!=v.tagName.toLowerCase())return[];if(b!=g)for(e=v;e!=b;)if(e=e.parentNode,!e)return[];return m[3]?h(m[3],v):[v]}if(m[3]&&b.getElementsByClassName)return b.getElementsByClassName(m[4]);if(m[5])if(v=
  112. b.getElementsByTagName(m[5]),m[4]||m[6])e=(m[4]||"")+m[6];else return v}if(n)return 1===b.nodeType&&"object"!==b.nodeName.toLowerCase()?c(b,e,b.querySelectorAll):b.querySelectorAll(e);v||(v=b.getElementsByTagName("*"));m=[];g=0;for(l=v.length;g<l;g++){var x=v[g];1==x.nodeType&&(void 0)(x,e,b)&&m.push(x)}return m},c=function(c,b,g){var a=c,e=c.getAttribute("id"),m=e||"__dojo__",h=c.parentNode,n=/^\s*[+~]/.test(b);if(n&&!h)return[];e?m=m.replace(/'/g,"\\$\x26"):c.setAttribute("id",m);n&&h&&(c=c.parentNode);
  113. b=b.match(l);for(h=0;h<b.length;h++)b[h]="[id\x3d'"+m+"'] "+b[h];b=b.join(",");try{return g.call(c,b)}finally{e||a.removeAttribute("id")}};h.match=e?function(a,b,g){return g&&9!=g.nodeType?c(g,b,function(b){return e.call(a,b)}):e.call(a,b)}:void 0;return h})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),function(a,f,p,e,n,l,h,c,m){function b(b){return function(c,d,k){return 2==
  114. arguments.length?b["string"==typeof d?"get":"set"](c,d):b.set(c,d,k)}}var g=function(b){return 1==b.length&&"string"==typeof b[0]},t=function(b){var c=b.parentNode;c&&c.removeChild(b)},u=f.NodeList,v=u._adaptWithCondition,x=u._adaptAsForEach,r=u._adaptAsMap;e.extend(u,{_normalize:function(b,c){var d=!0===b.parse;if("string"==typeof b.template){var k=b.templateFunc||a.string&&a.string.substitute;b=k?k(b.template,b):b}k=typeof b;"string"==k||"number"==k?(b=l.toDom(b,c&&c.ownerDocument),b=11==b.nodeType?
  115. e._toArray(b.childNodes):[b]):e.isArrayLike(b)?e.isArray(b)||(b=e._toArray(b)):b=[b];d&&(b._runParse=!0);return b},_cloneNode:function(b){return b.cloneNode(!0)},_place:function(b,c,d,k){if(1==c.nodeType||"only"!=d)for(var g,q=b.length,e=q-1;0<=e;e--){var m=k?this._cloneNode(b[e]):b[e];if(b._runParse&&a.parser&&a.parser.parse)for(g||(g=c.ownerDocument.createElement("div")),g.appendChild(m),a.parser.parse(g),m=g.firstChild;g.firstChild;)g.removeChild(g.firstChild);e==q-1?l.place(m,c,d):c.parentNode.insertBefore(m,
  116. c);c=m}},position:r(h.position),attr:v(b(c),g),style:v(b(m),g),addClass:x(n.add),removeClass:x(n.remove),toggleClass:x(n.toggle),replaceClass:x(n.replace),empty:x(l.empty),removeAttr:x(c.remove),marginBox:r(h.getMarginBox),place:function(b,c){var d=f(b)[0];return this.forEach(function(k){l.place(k,d,c)})},orphan:function(b){return(b?f._filterResult(this,b):this).forEach(t)},adopt:function(b,c){return f(b).place(this[0],c)._stash(this)},query:function(b){if(!b)return this;var c=new u;this.map(function(d){f(b,
  117. d).forEach(function(d){void 0!==d&&c.push(d)})});return c._stash(this)},filter:function(b){var c=arguments,d=this,k=0;if("string"==typeof b){d=f._filterResult(this,c[0]);if(1==c.length)return d._stash(this);k=1}return this._wrap(p.filter(d,c[k],c[k+1]),this)},addContent:function(b,c){b=this._normalize(b,this[0]);for(var d=0,k;k=this[d];d++)b.length?this._place(b,k,c,0<d):l.empty(k);return this}});return u})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),
  118. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r){a._xhrObj=x._create;var w=a.config;a.objectToQuery=e.objectToQuery;a.queryToObject=e.queryToObject;a.fieldToObject=l.fieldToObject;a.formToObject=l.toObject;a.formToQuery=l.toQuery;a.formToJson=l.toJson;a._blockAsync=!1;var q=a._contentHandlers=a.contentHandlers={text:function(d){return d.responseText},json:function(d){return m.fromJson(d.responseText||null)},"json-comment-filtered":function(d){c.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}\x26\x26\nUse djConfig.useCommentedJson\x3dtrue to turn off this message.");
  119. d=d.responseText;var k=d.indexOf("/*"),b=d.lastIndexOf("*/");if(-1==k||-1==b)throw Error("JSON was not comment filtered");return m.fromJson(d.substring(k+2,b))},javascript:function(d){return a.eval(d.responseText)},xml:function(d){var k=d.responseXML;k&&!k.querySelectorAll&&(k=(new DOMParser).parseFromString(d.responseText,"application/xml"));if(f("ie")&&(!k||!k.documentElement)){var b=function(d){return"MSXML"+d+".DOMDocument"},b=["Microsoft.XMLDOM",b(6),b(4),b(3),b(2)];g.some(b,function(b){try{var c=
  120. new ActiveXObject(b);c.async=!1;c.loadXML(d.responseText);k=c}catch(G){return!1}return!0})}return k},"json-comment-optional":function(d){return d.responseText&&/^[^{\[]*\/\*/.test(d.responseText)?q["json-comment-filtered"](d):q.json(d)}};q.arraybuffer=q.blob=q.document=function(d,k){return d.response};a._ioSetArgs=function(d,k,c,g){var q={args:d,url:d.url},m=null;if(d.form){var m=n.byId(d.form),y=m.getAttributeNode("action");q.url=q.url||(y?y.value:a.doc?a.doc.URL:null);m=l.toObject(m)}y={};m&&b.mixin(y,
  121. m);d.content&&b.mixin(y,d.content);d.preventCache&&(y["dojo.preventCache"]=(new Date).valueOf());q.query=e.objectToQuery(y);q.handleAs=d.handleAs||"text";var t=new h(function(d){d.canceled=!0;k&&k(d);var b=d.ioArgs.error;b||(b=Error("request cancelled"),b.dojoType="cancel",d.ioArgs.error=b);return b});t.addCallback(c);var x=d.load;x&&b.isFunction(x)&&t.addCallback(function(k){return x.call(d,k,q)});var u=d.error;u&&b.isFunction(u)&&t.addErrback(function(k){return u.call(d,k,q)});var f=d.handle;f&&
  122. b.isFunction(f)&&t.addBoth(function(k){return f.call(d,k,q)});t.addErrback(function(d){return g(d,t)});w.ioPublish&&a.publish&&!1!==q.args.ioPublish&&(t.addCallbacks(function(d){a.publish("/dojo/io/load",[t,d]);return d},function(d){a.publish("/dojo/io/error",[t,d]);return d}),t.addBoth(function(d){a.publish("/dojo/io/done",[t,d]);return d}));t.ioArgs=q;return t};var d=function(d){d=q[d.ioArgs.handleAs](d.ioArgs.xhr,d.ioArgs);return void 0===d?null:d},k=function(d,k){k.ioArgs.args.failOk||console.error(d);
  123. return d},y=function(d){0>=z&&(z=0,w.ioPublish&&a.publish&&(!d||d&&!1!==d.ioArgs.args.ioPublish)&&a.publish("/dojo/io/stop"))},z=0;u.after(v,"_onAction",function(){--z});u.after(v,"_onInFlight",y);a._ioCancelAll=v.cancelAll;a._ioNotifyStart=function(d){w.ioPublish&&a.publish&&!1!==d.ioArgs.args.ioPublish&&(z||a.publish("/dojo/io/start"),z+=1,a.publish("/dojo/io/send",[d]))};a._ioWatch=function(d,k,c,g){d.ioArgs.options=d.ioArgs.args;b.mixin(d,{response:d.ioArgs,isValid:function(b){return k(d)},isReady:function(k){return c(d)},
  124. handleResponse:function(k){return g(d)}});v(d);y(d)};a._ioAddQueryToUrl=function(d){d.query.length&&(d.url+=(-1==d.url.indexOf("?")?"?":"\x26")+d.query,d.query=null)};a.xhr=function(b,c,g){var q,e=a._ioSetArgs(c,function(d){q&&q.cancel()},d,k),m=e.ioArgs;"postData"in c?m.query=c.postData:"putData"in c?m.query=c.putData:"rawBody"in c?m.query=c.rawBody:(2<arguments.length&&!g||-1==="POST|PUT".indexOf(b.toUpperCase()))&&a._ioAddQueryToUrl(m);var y={method:b,handleAs:{arraybuffer:1,blob:1,document:1}[c.handleAs]?
  125. c.handleAs:"text",responseType:c.responseType,timeout:c.timeout,withCredentials:c.withCredentials,ioArgs:m};"undefined"!==typeof c.headers&&(y.headers=c.headers);"undefined"!==typeof c.contentType&&(y.headers||(y.headers={}),y.headers["Content-Type"]=c.contentType);"undefined"!==typeof m.query&&(y.data=m.query);"undefined"!==typeof c.sync&&(y.sync=c.sync);a._ioNotifyStart(e);try{q=x(m.url,y,!0)}catch(aa){return e.cancel(),e}e.ioArgs.xhr=q.response.xhr;q.then(function(){e.resolve(e)}).otherwise(function(d){m.error=
  126. d;d.response&&(d.status=d.response.status,d.responseText=d.response.text,d.xhr=d.response.xhr);e.reject(d)});return e};a.xhrGet=function(d){return a.xhr("GET",d)};a.rawXhrPost=a.xhrPost=function(d){return a.xhr("POST",d,!0)};a.rawXhrPut=a.xhrPut=function(d){return a.xhr("PUT",d,!0)};a.xhrDelete=function(d){return a.xhr("DELETE",d)};a._isDocumentOk=function(d){return r.checkStatus(d.status)};a._getText=function(d){var k;a.xhrGet({url:d,sync:!0,load:function(d){k=d}});return k};b.mixin(a.xhr,{_xhrObj:a._xhrObj,
  127. fieldToObject:l.fieldToObject,formToObject:l.toObject,objectToQuery:e.objectToQuery,formToQuery:l.toQuery,formToJson:l.toJson,queryToObject:e.queryToObject,contentHandlers:q,_ioSetArgs:a._ioSetArgs,_ioCancelAll:a._ioCancelAll,_ioNotifyStart:a._ioNotifyStart,_ioWatch:a._ioWatch,_ioAddQueryToUrl:a._ioAddQueryToUrl,_isDocumentOk:a._isDocumentOk,_getText:a._getText,get:a.xhrGet,post:a.xhrPost,put:a.xhrPut,del:a.xhrDelete});return a.xhr})},"dojo/io-query":function(){define(["./_base/lang"],function(a){var f=
  128. {};return{objectToQuery:function(p){var e=encodeURIComponent,n=[],l;for(l in p){var h=p[l];if(h!=f[l]){var c=e(l)+"\x3d";if(a.isArray(h))for(var m=0,b=h.length;m<b;++m)n.push(c+e(h[m]));else n.push(c+e(h))}}return n.join("\x26")},queryToObject:function(f){var e=decodeURIComponent;f=f.split("\x26");for(var n={},l,h,c=0,m=f.length;c<m;++c)if(h=f[c],h.length){var b=h.indexOf("\x3d");0>b?(l=e(h),h=""):(l=e(h.slice(0,b)),h=e(h.slice(b+1)));"string"==typeof n[l]&&(n[l]=[n[l]]);a.isArray(n[l])?n[l].push(h):
  129. n[l]=h}return n}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(a,f,p,e){var n={fieldToObject:function(a){var e=null;if(a=f.byId(a)){var c=a.name,m=(a.type||"").toLowerCase();if(c&&m&&!a.disabled)if("radio"==m||"checkbox"==m)a.checked&&(e=a.value);else if(a.multiple)for(e=[],a=[a.firstChild];a.length;)for(c=a.pop();c;c=c.nextSibling)if(1==c.nodeType&&"option"==c.tagName.toLowerCase())c.selected&&e.push(c.value);else{c.nextSibling&&a.push(c.nextSibling);
  130. c.firstChild&&a.push(c.firstChild);break}else e=a.value}return e},toObject:function(e){var h={};e=f.byId(e).elements;for(var c=0,m=e.length;c<m;++c){var b=e[c],g=b.name,t=(b.type||"").toLowerCase();if(g&&t&&0>"file|submit|image|reset|button".indexOf(t)&&!b.disabled){var l=h,v=g,b=n.fieldToObject(b);if(null!==b){var x=l[v];"string"==typeof x?l[v]=[x,b]:a.isArray(x)?x.push(b):l[v]=b}"image"==t&&(h[g+".x"]=h[g+".y"]=h[g].x=h[g].y=0)}}return h},toQuery:function(a){return p.objectToQuery(n.toObject(a))},
  131. toJson:function(a,h){return e.stringify(n.toObject(a),null,h?4:0)}};return n})},"dojo/json":function(){define(["./has"],function(a){return JSON})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(a,f,p,e,n,l,h){var c=function(){},m=Object.freeze||function(){},b=a.Deferred=function(g){function a(d){if(x)throw Error("This deferred has already been resolved");v=d;x=!0;h()}function h(){for(var d;!d&&k;){var b=
  132. k;k=k.next;if(d=b.progress==c)x=!1;var g=q?b.error:b.resolved;n("config-useDeferredInstrumentation")&&q&&f.instrumentRejected&&f.instrumentRejected(v,!!g);if(g)try{var a=g(v);a&&"function"===typeof a.then?a.then(l.hitch(b.deferred,"resolve"),l.hitch(b.deferred,"reject"),l.hitch(b.deferred,"progress")):(g=d&&void 0===a,d&&!g&&(q=a instanceof Error),b.deferred[g&&q?"reject":"resolve"](g?v:a))}catch(F){b.deferred.reject(F)}else q?b.deferred.reject(v):b.deferred.resolve(v)}}var v,x,r,w,q,d,k,y=this.promise=
  133. new p;this.isResolved=y.isResolved=function(){return 0==w};this.isRejected=y.isRejected=function(){return 1==w};this.isFulfilled=y.isFulfilled=function(){return 0<=w};this.isCanceled=y.isCanceled=function(){return r};this.resolve=this.callback=function(d){this.fired=w=0;this.results=[d,null];a(d)};this.reject=this.errback=function(d){q=!0;this.fired=w=1;n("config-useDeferredInstrumentation")&&f.instrumentRejected&&f.instrumentRejected(d,!!k);a(d);this.results=[null,d]};this.progress=function(d){for(var b=
  134. k;b;){var c=b.progress;c&&c(d);b=b.next}};this.addCallbacks=function(d,k){this.then(d,k,c);return this};y.then=this.then=function(g,q,a){var e=a==c?this:new b(y.cancel);g={resolved:g,error:q,progress:a,deferred:e};k?d=d.next=g:k=d=g;x&&h();return e.promise};var z=this;y.cancel=this.cancel=function(){if(!x){var d=g&&g(z);x||(d instanceof Error||(d=new e(d)),d.log=!1,z.reject(d))}r=!0};m(y)};l.extend(b,{addCallback:function(b){return this.addCallbacks(l.hitch.apply(a,arguments))},addErrback:function(b){return this.addCallbacks(null,
  135. l.hitch.apply(a,arguments))},addBoth:function(b){var c=l.hitch.apply(a,arguments);return this.addCallbacks(c,c)},fired:-1});b.when=a.when=h;return b})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./has!config-deferredInstrumentation?./promise/instrumentation"],function(a,f,p,e,n){var l=Object.freeze||function(){},h=function(b,e,m,h,l){a("config-deferredInstrumentation")&&2===e&&g.instrumentRejected&&0===b.length&&g.instrumentRejected(m,!1,
  136. h,l);for(l=0;l<b.length;l++)c(b[l],e,m,h)},c=function(c,e,h,l){var t=c[e],n=c.deferred;if(t)try{var q=t(h);if(0===e)"undefined"!==typeof q&&b(n,e,q);else{if(q&&"function"===typeof q.then){c.cancel=q.cancel;q.then(m(n,1),m(n,2),m(n,0));return}b(n,1,q)}}catch(d){b(n,2,d)}else b(n,e,h);a("config-deferredInstrumentation")&&2===e&&g.instrumentRejected&&g.instrumentRejected(h,!!t,l,n.promise)},m=function(c,g){return function(a){b(c,g,a)}},b=function(b,c,g){if(!b.isCanceled())switch(c){case 0:b.progress(g);
  137. break;case 1:b.resolve(g);break;case 2:b.reject(g)}},g=function(b){var m=this.promise=new e,t=this,n,f,w,q=!1,d=[];a("config-deferredInstrumentation")&&Error.captureStackTrace&&(Error.captureStackTrace(t,g),Error.captureStackTrace(m,g));this.isResolved=m.isResolved=function(){return 1===n};this.isRejected=m.isRejected=function(){return 2===n};this.isFulfilled=m.isFulfilled=function(){return!!n};this.isCanceled=m.isCanceled=function(){return q};this.progress=function(k,b){if(n){if(!0===b)throw Error("This deferred has already been fulfilled.");
  138. return m}h(d,0,k,null,t);return m};this.resolve=function(k,b){if(n){if(!0===b)throw Error("This deferred has already been fulfilled.");return m}h(d,n=1,f=k,null,t);d=null;return m};var k=this.reject=function(b,c){if(n){if(!0===c)throw Error("This deferred has already been fulfilled.");return m}a("config-deferredInstrumentation")&&Error.captureStackTrace&&Error.captureStackTrace(w={},k);h(d,n=2,f=b,w,t);d=null;return m};this.then=m.then=function(k,b,q){var a=[q,k,b];a.cancel=m.cancel;a.deferred=new g(function(d){return a.cancel&&
  139. a.cancel(d)});n&&!d?c(a,n,f,w):d.push(a);return a.deferred.promise};this.cancel=m.cancel=function(d,c){if(!n){b&&(c=b(d),d="undefined"===typeof c?d:c);q=!0;if(!n)return"undefined"===typeof d&&(d=new p),k(d),d;if(2===n&&f===d)return d}else if(!0===c)throw Error("This deferred has already been fulfilled.");};l(m)};g.prototype.toString=function(){return"[object Deferred]"};n&&n(g);return g})},"dojo/errors/CancelError":function(){define(["./create"],function(a){return a("CancelError",null,null,{dojoType:"cancel",
  140. log:!1})})},"dojo/errors/create":function(){define(["../_base/lang"],function(a){return function(f,p,e,n){e=e||Error;var l=function(a){if(e===Error){Error.captureStackTrace&&Error.captureStackTrace(this,l);var c=Error.call(this,a),m;for(m in c)c.hasOwnProperty(m)&&(this[m]=c[m]);this.message=a;this.stack=c.stack}else e.apply(this,arguments);p&&p.apply(this,arguments)};l.prototype=a.delegate(e.prototype,n);l.prototype.name=f;return l.prototype.constructor=l}})},"dojo/promise/Promise":function(){define(["../_base/lang"],
  141. function(a){function f(){throw new TypeError("abstract");}return a.extend(function(){},{then:function(a,e,n){f()},cancel:function(a,e){f()},isResolved:function(){f()},isRejected:function(){f()},isFulfilled:function(){f()},isCanceled:function(){f()},always:function(a){return this.then(a,a)},"catch":function(a){return this.then(null,a)},otherwise:function(a){return this.then(null,a)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},
  142. "dojo/when":function(){define(["./Deferred","./promise/Promise"],function(a,f){return function(p,e,n,l){var h=p&&"function"===typeof p.then,c=h&&p instanceof f;if(!h)return 1<arguments.length?e?e(p):p:(new a).resolve(p);c||(h=new a(p.cancel),p.then(h.resolve,h.reject,h.progress),p=h.promise);return e||n||l?p.then(e,n,l):p}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(a,f){a.fromJson=function(a){return eval("("+a+")")};a._escapeString=f.stringify;a.toJsonIndentStr="\t";a.toJson=
  143. function(p,e){return f.stringify(p,function(a,e){return e&&(a=e.__json__||e.json,"function"==typeof a)?a.call(e):e},e&&a.toJsonIndentStr)};return a})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../has!host-browser?../_base/window: ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(a,f,p,e,n,l){function h(){for(var g=+new Date,a=0,e;a<b.length&&(e=b[a]);a++){var h=e.response,l=h.options;e.isCanceled&&e.isCanceled()||
  144. e.isValid&&!e.isValid(h)?(b.splice(a--,1),c._onAction&&c._onAction()):e.isReady&&e.isReady(h)?(b.splice(a--,1),e.handleResponse(h),c._onAction&&c._onAction()):e.startTime&&e.startTime+(l.timeout||0)<g&&(b.splice(a--,1),e.cancel(new f("Timeout exceeded",h)),c._onAction&&c._onAction())}c._onInFlight&&c._onInFlight(e);b.length||(clearInterval(m),m=null)}function c(c){c.response.options.timeout&&(c.startTime=+new Date);c.isFulfilled()||(b.push(c),m||(m=setInterval(h,50)),c.response.options.sync&&h())}
  145. var m=null,b=[];c.cancelAll=function(){try{e.forEach(b,function(b){try{b.cancel(new p("All requests canceled."))}catch(t){}})}catch(g){}};n&&l&&n.doc.attachEvent&&l(n.global,"unload",function(){c.cancelAll()});return c})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise ../has".split(" "),function(a,f,p,e,n,l,h,c,m){function b(b){return t(b)}function g(b){return void 0!==b.data?b.data:
  146. b.text}a.deepCopy=function(b,c){for(var g in c){var e=b[g],m=c[g];e!==m&&(e&&"object"===typeof e&&m&&"object"===typeof m?m instanceof Date?b[g]=new Date(m):a.deepCopy(e,m):b[g]=m)}return b};a.deepCreate=function(b,c){c=c||{};var g=h.delegate(b),e,m;for(e in b)(m=b[e])&&"object"===typeof m&&(g[e]=a.deepCreate(m,c[e]));return a.deepCopy(g,c)};var t=Object.freeze||function(b){return b};a.deferred=function(m,l,n,r,w,q){var d=new e(function(k){l&&l(d,m);return k&&(k instanceof f||k instanceof p)?k:new p("Request canceled",
  147. m)});d.response=m;d.isValid=n;d.isReady=r;d.handleResponse=w;n=d.then(b).otherwise(function(d){d.response=m;throw d;});a.notify&&n.then(h.hitch(a.notify,"emit","load"),h.hitch(a.notify,"emit","error"));r=n.then(g);w=new c;for(var k in r)r.hasOwnProperty(k)&&(w[k]=r[k]);w.response=n;t(w);q&&d.then(function(k){q.call(d,k)},function(k){q.call(d,m,k)});d.promise=w;d.then=w.then;return d};a.addCommonMethods=function(b,c){l.forEach(c||["GET","POST","PUT","DELETE"],function(c){b[("DELETE"===c?"DEL":c).toLowerCase()]=
  148. function(g,a){a=h.delegate(a||{});a.method=c;return b(g,a)}})};a.parseArgs=function(b,c,g){var a=c.data,e=c.query;!a||g||"object"!==typeof a||a instanceof ArrayBuffer||a instanceof Blob||(c.data=n.objectToQuery(a));e?("object"===typeof e&&(e=n.objectToQuery(e)),c.preventCache&&(e+=(e?"\x26":"")+"request.preventCache\x3d"+ +new Date)):c.preventCache&&(e="request.preventCache\x3d"+ +new Date);b&&e&&(b+=(~b.indexOf("?")?"\x26":"?")+e);return{url:b,options:c,getHeader:function(b){return null}}};a.checkStatus=
  149. function(b){b=b||0;return 200<=b&&300>b||304===b||1223===b||!b}})},"dojo/errors/RequestError":function(){define(["./create"],function(a){return a("RequestError",function(a,p){this.response=p})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(a,f){return a("RequestTimeoutError",null,f,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(a,f,p,e,n){function l(b,c){var g=
  150. b.xhr;b.status=b.xhr.status;try{b.text=g.responseText}catch(k){}"xml"===b.options.handleAs&&(b.data=g.responseXML);var d;if(c)this.reject(c);else{try{p(b)}catch(k){d=k}e.checkStatus(g.status)?d?this.reject(d):this.resolve(b):(c=d?new a("Unable to load "+b.url+" status: "+g.status+" and an error in handleAs: transformation of response",b):new a("Unable to load "+b.url+" status: "+g.status,b),this.reject(c))}}function h(b){return this.xhr.getResponseHeader(b)}function c(r,w,q){var d=w&&w.data&&w.data instanceof
  151. FormData,k=e.parseArgs(r,e.deepCreate(x,w),d);r=k.url;w=k.options;var y=!w.data&&"POST"!==w.method&&"PUT"!==w.method;10>=n("ie")&&(r=r.split("#")[0]);var z,A=e.deferred(k,u,b,g,l,function(){z&&z()}),p=k.xhr=c._create();if(!p)return A.cancel(new a("XHR was not created")),q?A:A.promise;k.getHeader=h;t&&(z=t(p,A,k));var B="undefined"===typeof w.data?null:w.data,D=!w.sync,F=w.method;try{p.open(F,r,D,w.user||v,w.password||v);w.withCredentials&&(p.withCredentials=w.withCredentials);w.handleAs in m&&(p.responseType=
  152. m[w.handleAs]);var G=w.headers;r=d||y?!1:"application/x-www-form-urlencoded";if(G)for(var Y in G)"content-type"===Y.toLowerCase()?r=G[Y]:G[Y]&&p.setRequestHeader(Y,G[Y]);r&&!1!==r&&p.setRequestHeader("Content-Type",r);G&&"X-Requested-With"in G||p.setRequestHeader("X-Requested-With","XMLHttpRequest");e.notify&&e.notify.emit("send",k,A.promise.cancel);p.send(B)}catch(aa){A.reject(aa)}f(A);p=null;return q?A:A.promise}n.add("dojo-force-activex-xhr",function(){return 0});var m={blob:"blob",document:"document",
  153. arraybuffer:"arraybuffer"},b,g,t,u;b=function(b){return!this.isFulfilled()};u=function(b,c){c.xhr.abort()};t=function(b,c,g){function d(d){c.handleResponse(g)}function k(d){d=new a("Unable to load "+g.url+" status: "+d.target.status,g);c.handleResponse(g,d)}function q(d){d.lengthComputable?(g.loaded=d.loaded,g.total=d.total,c.progress(g)):3===g.xhr.readyState&&(g.loaded="loaded"in d?d.loaded:d.position,c.progress(g))}b.addEventListener("load",d,!1);b.addEventListener("error",k,!1);b.addEventListener("progress",
  154. q,!1);return function(){b.removeEventListener("load",d,!1);b.removeEventListener("error",k,!1);b.removeEventListener("progress",q,!1);b=null}};var v,x={data:null,query:null,sync:!1,method:"GET"};c._create=function(){throw Error("XMLHTTP not available");};n("dojo-force-activex-xhr")||(c._create=function(){return new XMLHttpRequest});e.addCommonMethods(c);return c})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../has!dom?../selector/_loader"],function(a,
  155. f,p,e){function n(a){var c=l[a.options.handleAs];a.data=c?c(a):a.data||a.text;return a}p=function(a){return a.xhr.response};var l={javascript:function(a){return f.eval(a.text||"")},json:function(e){return a.parse(e.text||null)},xml:void 0,blob:p,arraybuffer:p,document:p};n.register=function(a,c){l[a]=c};return n})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(a,f,p,e,n,l,h,c,m){var b=p.mixin,g={},t=g._Line=
  156. function(d,k){this.start=d;this.end=k};t.prototype.getValue=function(d){return(this.end-this.start)*d+this.start};var u=g.Animation=function(d){b(this,d);p.isArray(this.curve)&&(this.curve=new t(this.curve[0],this.curve[1]))};u.prototype=new e;p.extend(u,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var d=this._percent,k=this.easing;return k?k(d):d},_fire:function(d,k){k=k||[];if(this[d])if(f.debugAtAllCosts)this[d].apply(this,k);else try{this[d].apply(this,k)}catch(y){console.error("exception in animation handler for:",
  157. d),console.error(y)}return this},play:function(d,k){this._delayTimer&&this._clearTimer();if(k)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);d=d||this.delay;k=p.hitch(this,"_play",k);if(0<d)return this._delayTimer=setTimeout(k,d),this;k();return this},_play:function(d){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);
  158. this._active=!0;this._paused=!1;d=this.curve.getValue(this._getStep());this._percent||(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[d]));this._fire("onPlay",[d]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(d,k){this._stopTimer();this._active=this._paused=!0;this._percent=
  159. d;k&&this.play();return this},stop:function(d){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();d&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var d=(new Date).valueOf(),d=0===this.duration?1:(d-this._startTime)/this.duration;1<=d&&(d=1);this._percent=
  160. d;this.easing&&(d=this.easing(d));this._fire("onAnimate",[this.curve.getValue(d)]);1>this._percent?this._startTimer():(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",[this.node]),!this.repeat&&this._stopTimer())}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var v=0,x=null,r={run:function(){}};
  161. p.extend(u,{_startTimer:function(){this._timer||(this._timer=l.after(r,"run",p.hitch(this,"_cycle"),!0),v++);x||(x=setInterval(p.hitch(r,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,v--);0>=v&&(clearInterval(x),x=null,v=0)}});var w=h("ie")?function(d){var k=d.style;k.width.length||"auto"!=m.get(d,"width")||(k.width="auto")}:function(){};g._fade=function(d){d.node=c.byId(d.node);var k=b({properties:{}},d);d=k.properties.opacity={};d.start="start"in k?
  162. k.start:function(){return+m.get(k.node,"opacity")||0};d.end=k.end;d=g.animateProperty(k);l.after(d,"beforeBegin",p.partial(w,k.node),!0);return d};g.fadeIn=function(d){return g._fade(b({end:1},d))};g.fadeOut=function(d){return g._fade(b({end:0},d))};g._defaultEasing=function(d){return.5+Math.sin((d+1.5)*Math.PI)/2};var q=function(d){this._properties=d;for(var k in d){var b=d[k];b.start instanceof n&&(b.tempColor=new n)}};q.prototype.getValue=function(d){var k={},b;for(b in this._properties){var c=
  163. this._properties[b],g=c.start;g instanceof n?k[b]=n.blendColors(g,c.end,d,c.tempColor).toCss():p.isArray(g)||(k[b]=(c.end-g)*d+g+("opacity"!=b?c.units||"px":0))}return k};g.animateProperty=function(d){var k=d.node=c.byId(d.node);d.easing||(d.easing=a._defaultEasing);d=new u(d);l.after(d,"beforeBegin",p.hitch(d,function(){var d={},c;for(c in this.properties){var g=function(d,k){var b={height:d.offsetHeight,width:d.offsetWidth}[k];if(void 0!==b)return b;b=m.get(d,k);return"opacity"==k?+b:e?b:parseFloat(b)};
  164. if("width"==c||"height"==c)this.node.display="block";var a=this.properties[c];p.isFunction(a)&&(a=a(k));a=d[c]=b({},p.isObject(a)?a:{end:a});p.isFunction(a.start)&&(a.start=a.start(k));p.isFunction(a.end)&&(a.end=a.end(k));var e=0<=c.toLowerCase().indexOf("color");"end"in a?"start"in a||(a.start=g(k,c)):a.end=g(k,c);e?(a.start=new n(a.start),a.end=new n(a.end)):a.start="opacity"==c?+a.start:parseFloat(a.start)}this.curve=new q(d)}),!0);l.after(d,"onAnimate",p.hitch(m,"set",d.node),!0);return d};g.anim=
  165. function(d,k,b,c,q,a){return g.animateProperty({node:d,duration:b||u.prototype.duration,properties:k,easing:c,onEnd:q}).play(a||0)};b(a,g);a._Animation=u;return g})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(a,f,p,e){var n=a.Color=function(a){a&&this.setColor(a)};n.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,
  166. 128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:e.transparentColor||[0,0,0,0]};f.extend(n,{r:255,g:255,b:255,a:1,_set:function(a,e,c,m){this.r=a;this.g=e;this.b=c;this.a=m},setColor:function(a){f.isString(a)?n.fromString(a,this):f.isArray(a)?n.fromArray(a,this):(this._set(a.r,a.g,a.b,a.a),a instanceof n||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,
  167. this.g,this.b,this.a]},toHex:function(){return"#"+p.map(["r","g","b"],function(a){a=this[a].toString(16);return 2>a.length?"0"+a:a},this).join("")},toCss:function(a){var e=this.r+", "+this.g+", "+this.b;return(a?"rgba("+e+", "+this.a:"rgb("+e)+")"},toString:function(){return this.toCss(!0)}});n.blendColors=a.blendColors=function(a,e,c,m){var b=m||new n;p.forEach(["r","g","b","a"],function(g){b[g]=a[g]+(e[g]-a[g])*c;"a"!=g&&(b[g]=Math.round(b[g]))});return b.sanitize()};n.fromRgb=a.colorFromRgb=function(a,
  168. e){return(a=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&n.fromArray(a[1].split(/\s*,\s*/),e)};n.fromHex=a.colorFromHex=function(a,e){var c=e||new n,m=4==a.length?4:8,b=(1<<m)-1;a=Number("0x"+a.substr(1));if(isNaN(a))return null;p.forEach(["b","g","r"],function(g){var e=a&b;a>>=m;c[g]=4==m?17*e:e});c.a=1;return c};n.fromArray=a.colorFromArray=function(a,e){e=e||new n;e._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));isNaN(e.a)&&(e.a=1);return e.sanitize()};n.fromString=a.colorFromString=
  169. function(a,e){var c=n.named[a];return c&&n.fromArray(c,e)||n.fromRgb(a,e)||n.fromHex(a,e)};return n})},"esri/core/request/script":function(){define("require exports dojo/Deferred dojo/text!./iframe.html dojo/request/script ../sniff".split(" "),function(a,f,p,e,n,l){function h(){var b=document.createElement("iframe");b.name="esri_core_jsonp_iframe";b.style.display="none";b.setAttribute("sandbox","allow-scripts");if(!l("ff")&&"srcdoc"in b){var c=l("esri-built")?"dojo/dojo-lite.js":"dojo/dojo.js",d=
  170. a.toUrl(c),c=e.replace("../../../dojo/dojo.js",d),d=d.slice(0,d.lastIndexOf("/")),c=c.replace("../../../dojo/",d);b.srcdoc=c}else c=a.toUrl("./iframe.html"),"http:"===window.location.protocol&&0===c.indexOf("https:")&&(c=c.replace("https:","http:")),b.src=c;document.body.appendChild(b);return b}function c(){var b=new MessageChannel;b.port1.addEventListener("message",m);b.port1.start();return b}function m(b){var c=b.data;if("ready"===c){for(var c=0,d=x;c<d.length;c++)b=d[c],g(b,u);x=null}else if(b=
  171. r[c.id])delete r[c.id],c.isError?b.dfd.reject(Error(c.message)):b.dfd.resolve(c.response)}function b(b,c){b.addEventListener("load",function(){b.contentWindow.postMessage("init","*",[c.port2])})}function g(b,c){r[b.message.id]=b;c.port1.postMessage(b.message)}Object.defineProperty(f,"__esModule",{value:!0});var t,u,v=0,x=[],r={};f.get=function(a,q){if(!l("esri-script-sandbox"))return n.get(a,q);var d=null;q&&(d={jsonp:q.jsonp,preventCache:q.preventCache,query:q.query,timeout:q.timeout});q=new p(function(){if(x){var d=
  172. x.indexOf(k);-1<d&&x.splice(d,1)}else k.message.id in r&&delete r[k.message.id]});var k={dfd:q,message:{id:"id"+(++v+Math.random()),url:a,options:d}};t||(t=h(),u=c(),b(t,u));x?x.push(k):g(k,u);return q.promise}})},"dojo/text":function(){define(["./_base/kernel","require","./has","./has!host-browser?./request"],function(a,f,p,e){var n;p("host-browser")?n=function(b,c,a){e(b,{sync:!!c,headers:{"X-Requested-With":null}}).then(a)}:f.getText?n=f.getText:console.error("dojo/text plugin failed to load because loader does not support getText");
  173. var l={},h=function(b){if(b){b=b.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var c=b.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(b=c[1])}else b="";return b},c={},m={};a.cache=function(b,c,a){var g;"string"==typeof b?/\//.test(b)?(g=b,a=c):g=f.toUrl(b.replace(/\./g,"/")+(c?"/"+c:"")):(g=b+"",a=c);b=void 0!=a&&"string"!=typeof a?a.value:a;a=a&&a.sanitize;if("string"==typeof b)return l[g]=b,a?h(b):b;if(null===b)return delete l[g],null;g in l||n(g,!0,function(b){l[g]=
  174. b});return a?h(l[g]):l[g]};return{dynamic:!0,normalize:function(b,c){b=b.split("!");var g=b[0];return(/^\./.test(g)?c(g):g)+(b[1]?"!"+b[1]:"")},load:function(b,g,a){b=b.split("!");var e=1<b.length,t=b[0],f=g.toUrl(b[0]);b="url:"+f;var r=c,w=function(d){a(e?h(d):d)};t in l?r=l[t]:g.cache&&b in g.cache?r=g.cache[b]:f in l&&(r=l[f]);if(r===c)if(m[f])m[f].push(w);else{var q=m[f]=[w];n(f,!g.async,function(d){l[t]=l[f]=d;for(var k=0;k<q.length;)q[k++](d);delete m[f]})}else w(r)}}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),
  175. function(a,f,p,e,n,l,h,c,m,b,g){function t(d,k){d.canDelete&&w._remove(d.id,k.options.frameDoc,!0)}function u(d){z&&z.length&&(n.forEach(z,function(d){w._remove(d.id,d.frameDoc);d.frameDoc=null}),z=[]);return d.options.jsonp?!d.data:!0}function v(d){return!!this.scriptLoaded}function x(d){return(d=d.options.checkString)&&eval("typeof("+d+') !\x3d\x3d "undefined"')}function r(d,k){if(this.canDelete){var b=this.response.options;z.push({id:this.id,frameDoc:b.ioArgs?b.ioArgs.frameDoc:b.frameDoc});b.ioArgs&&
  176. (b.ioArgs.frameDoc=null);b.frameDoc=null}k?this.reject(k):this.resolve(d)}function w(b,c,g){var a=p.parseArgs(b,p.deepCopy({},c));b=a.url;c=a.options;var e=p.deferred(a,t,u,c.jsonp?null:c.checkString?x:v,r);l.mixin(e,{id:q+d++,canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+c.jsonp+"\x3d")).test(b)||(b+=(~b.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+q+"_callbacks."+e.id),e.canDelete=!0,y[e.id]=function(d){a.data=d;e.handleResponse(a)});p.notify&&p.notify.emit("send",a,e.promise.cancel);
  177. if(!c.canAttach||c.canAttach(e)){var m=w._attach(e.id,b,c.frameDoc,function(d){if(!(d instanceof Error)){var k=Error("Error loading "+(d.target?d.target.src:"script"));k.source=d;d=k}e.reject(d);w._remove(e.id,c.frameDoc,!0)});if(!c.jsonp&&!c.checkString)var n=h(m,"readystatechange",function(d){if("load"===d.type||k.test(m.readyState))n.remove(),e.scriptLoaded=d})}f(e);return g?e:e.promise}var q=a.id.replace(/[\/\.\-]/g,"_"),d=0,k=/complete|loaded/,y=e.global[q+"_callbacks"]={},z=[];w.get=w;w._attach=
  178. function(d,k,b,c){b=b||g.doc;var q=b.createElement("script");if(c)h.once(q,"error",c);q.type="text/javascript";try{q.src=k}catch(G){c&&c(q)}q.id=d;q.async=!0;q.charset="utf-8";return b.getElementsByTagName("head")[0].appendChild(q)};w._remove=function(d,k,b){m.destroy(c.byId(d,k));y[d]&&(b?y[d]=function(){delete y[d]}:delete y[d])};w._callbacksProperty=q+"_callbacks";return w})},"esri/core/sniff":function(){define(["require","exports","dojo/sniff","./global","../views/webgl/context-util"],function(a,
  179. f,p,e,n){function l(){var b={available:!1,version:0,majorPerformanceCaveat:!1,supportsHighPrecisionFragment:!1,supportsVertexShaderSamplers:!1,supportsElementIndexUint:!1},c=document.createElement("canvas");if(!c)return b;var a=n.createContext(c,{failIfMajorPerformanceCaveat:!0},"webgl");!a&&(a=n.createContext(c,{},"webgl"))&&(b.majorPerformanceCaveat=!0);if(!a)return b;c=a.getParameter(a.VERSION);if(!c)return b;if(c=c.match(/^WebGL\s+([\d.]*)/))b.version=parseFloat(c[1]),b.available=.94<=b.version,
  180. c=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT),b.supportsHighPrecisionFragment=c&&0<c.precision,b.supportsVertexShaderSamplers=0<a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),b.supportsElementIndexUint=null!==a.getExtension("OES_element_index_uint");return b}function h(){var b={available:!1,version:0},c=document.createElement("canvas");if(!c)return b;c=n.createContext(c,{},"webgl2");if(!c)return b;b.available=!0;c=c.getParameter(c.VERSION);if(!c)return b;if(c=c.match(/^WebGL\s+([\d.]*)/))b.version=
  181. parseFloat(c[1]);return b}(function(){var b=navigator.userAgent,g=b.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i),b=b.match(/iPhone/i);g&&p.add("esri-mobile",g);b&&p.add("esri-iPhone",b);p.add("esri-phonegap",!!e.cordova);p.add("esri-cors",p("esri-phonegap")||"XMLHttpRequest"in e&&"withCredentials"in new XMLHttpRequest);p.add("esri-canvas-svg-support",function(){return!(p("trident")||p("ie"))});p.add("esri-wasm","WebAssembly"in e);p("host-webworker")||(p.add("esri-workers",
  182. "Worker"in e),p.add("esri-script-sandbox",function(){return"MessageChannel"in e&&"HTMLIFrameElement"in e&&"sandbox"in HTMLIFrameElement.prototype}),p.add("esri-url-encodes-apostrophe",function(){var b=e.document.createElement("a");b.href="?'";return-1<b.href.indexOf("?%27")}),c||(c=l()),p.add("esri-webgl",c.available),p.add("esri-webgl-high-precision-fragment",c.supportsHighPrecisionFragment),p.add("esri-webgl-vertex-shader-samplers",c.supportsVertexShaderSamplers),p.add("esri-webgl-element-index-uint",
  183. c.supportsElementIndexUint),p.add("esri-webgl-major-performance-caveat",c.majorPerformanceCaveat),m||(m=h()),p.add("esri-webgl2",m.available))})();var c=null,m=null;return p})},"esri/core/global":function(){define(["require","exports"],function(a,f){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},"esri/views/webgl/context-util":function(){define(["require","exports"],function(a,f){function p(a,
  184. c,e){void 0===c&&(c={});var b;switch(e){case "webgl":b=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case "webgl2":b=["webgl2"];break;default:b=["webgl","experimental-webgl","webkit-3d","moz-webgl"]}e=null;for(var g=0;g<b.length;g++){var m=b[g];try{e=a.getContext(m,c)}catch(u){}if(e)break}return e}function e(a,c){(a=a.parentNode)&&(a.innerHTML='\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+
  185. c+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}Object.defineProperty(f,"__esModule",{value:!0});f.createContextOrErrorHTML=function(a,c,m){void 0===c&&(c={});if(!window.WebGLRenderingContext)return e(a,n),null;c=p(a,c,m);return c?c:(e(a,l),null)};f.createContext=p;var n='This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e',l='It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'})},
  186. "esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./Basemap ./Ground ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./core/accessorSupport/decorators ./support/basemapUtils ./support/groundUtils ./support/LayersMixin".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){var x=b.getLogger("esri.Map");return function(b){function a(c){c=b.call(this)||this;c.basemap=null;c.ground=new l;c._basemapCache=t.createCache();
  187. return c}p(a,b);Object.defineProperty(a.prototype,"allLayers",{get:function(){return new c({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(b){return b.layers}})},enumerable:!0,configurable:!0});a.prototype.castBasemap=function(b){return t.ensureType(b,this._basemapCache)};a.prototype.castGround=function(b){b=u.ensureType(b);return b?b:(x.error("Map.ground may not be set to null or undefined"),this._get("ground"))};
  188. e([g.property({readOnly:!0})],a.prototype,"allLayers",null);e([g.property({type:n})],a.prototype,"basemap",void 0);e([g.cast("basemap")],a.prototype,"castBasemap",null);e([g.property({type:l})],a.prototype,"ground",void 0);e([g.cast("ground")],a.prototype,"castGround",null);return a=e([g.subclass("esri.Map")],a)}(g.declared(h,m,v))})},"esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(a,f){return function(a,e){a.__bases__=e.__bases__}})},"esri/core/tsSupport/decorateHelper":function(){define([],
  189. function(){return function(a,f,p,e){var n=arguments.length,l=3>n?f:null===e?e=Object.getOwnPropertyDescriptor(f,p):e,h;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)l=Reflect.decorate(a,f,p,e);else for(var c=a.length-1;0<=c;c--)if(h=a[c])l=(3>n?h(l):3<n?h(f,p,l):h(f,p))||l;return 3<n&&l&&Object.defineProperty(f,p,l),l}})},"esri/Basemap":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper dojo/_base/lang ./core/Collection ./core/collectionUtils ./core/Evented ./core/JSONSupport ./core/Loadable ./core/Logger ./core/promiseUtils ./core/urlUtils ./core/accessorSupport/decorators ./layers/Layer ./portal/Portal ./portal/PortalItem ./support/basemapDefinitions".split(" "),
  190. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q){var d=0,k=l.ofType(x),y=g.getLogger("esri.Basemap");return function(b){function c(c){var g=b.call(this)||this;g.id=null;g.portalItem=null;g.thumbnailUrl=null;g.title="Basemap";g.id=Date.now().toString(16)+"-basemap-"+d++;g.baseLayers=new k;g.referenceLayers=new k;var q=function(d){d.parent&&d.parent!==g&&"remove"in d.parent&&d.parent.remove(d);d.parent=g;"elevation"===d.type&&y.error("Layer '"+d.title+", id:"+d.id+"' of type '"+d.type+"' is not supported as a basemap layer and will therefore be ignored.")};
  191. g.baseLayers.on("after-add",function(d){return q(d.item)});g.referenceLayers.on("after-add",function(d){return q(d.item)});g.baseLayers.on("after-remove",function(d){d.item.parent=null});g.referenceLayers.on("after-remove",function(d){d.item.parent=null});return g}p(c,b);g=c;c.prototype.initialize=function(){var d=this;this.when().catch(function(k){y.error("#load()","Failed to load basemap (title: '"+d.title+"', id: '"+d.id+"')",k)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};
  192. c.prototype.normalizeCtorArgs=function(d){d&&"resourceInfo"in d&&(this._set("resourceInfo",d.resourceInfo),d=n.mixin({},d),delete d.resourceInfo);return d};Object.defineProperty(c.prototype,"baseLayers",{set:function(d){this._set("baseLayers",h.referenceSetter(d,this._get("baseLayers"),k))},enumerable:!0,configurable:!0});c.prototype.writeBaseLayers=function(d,k,b,c){var g=[];d&&(c=n.mixin({},c,{layerContainerType:"basemap"}),this.baseLayers.forEach(function(d){if(d.write){var k={};d.write(k,c)&&
  193. g.push(k)}}),this.referenceLayers.forEach(function(d){if(d.write){var k={isReference:!0};d.write(k,c)&&g.push(k)}}));k[b]=g};Object.defineProperty(c.prototype,"referenceLayers",{set:function(d){this._set("referenceLayers",h.referenceSetter(d,this._get("referenceLayers"),k))},enumerable:!0,configurable:!0});c.prototype.writeTitle=function(d,k){k.title=d||"Basemap"};c.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};c.prototype.clone=function(){var d={id:this.id,
  194. title:this.title,portalItem:this.portalItem,resourceInfo:this.resourceInfo,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};this.loaded&&(d.loadStatus="loaded");return new g(d)};c.prototype.read=function(d,k){this.resourceInfo||this._set("resourceInfo",{data:d,context:k});return this.inherited(arguments)};c.prototype.write=function(d,k){d=d||{};k&&k.origin||(k=n.mixin({origin:"web-map"},k));this.inherited(arguments,[d,k]);!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&
  195. (d.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(function(d){d=n.clone(d);d.url&&u.isProtocolRelative(d.url)&&(d.url="https:"+d.url);d.templateUrl&&u.isProtocolRelative(d.templateUrl)&&(d.templateUrl="https:"+d.templateUrl);return d}));return d};c.prototype._loadFromSource=function(){var d=this.resourceInfo,k=this.portalItem;return d?this._loadLayersFromJSON(d.data,d.context?d.context.url:null):k?this._loadFromItem(k):t.resolve(null)};c.prototype._loadLayersFromJSON=function(d,k){var b=this,
  196. c=this.resourceInfo&&this.resourceInfo.context,g=this.portalItem&&this.portalItem.portal||c&&c.portal||null,q=c&&"web-scene"===c.origin?"web-scene":"web-map";return t.create(function(d){return a(["./portal/support/layersCreator"],d)}).then(function(c){var a=[];if(d.baseMapLayers&&Array.isArray(d.baseMapLayers)){var e={context:{origin:q,url:k,portal:g,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},m=c.populateOperationalLayers(b.baseLayers,d.baseMapLayers.filter(function(d){return!d.isReference}),
  197. e);a.push.apply(a,m);c=c.populateOperationalLayers(b.referenceLayers,d.baseMapLayers.filter(function(d){return d.isReference}),e);a.push.apply(a,c)}return t.eachAlways(a)}).then(function(){})};c.prototype._loadFromItem=function(d){var k=this;return d.load().then(function(d){return d.fetchData()}).then(function(b){var c=u.urlToObject(d.itemUrl);k._set("resourceInfo",{data:b.baseMap,context:{origin:"web-map",portal:d.portal||r.getDefault(),url:c}});k.read(k.resourceInfo.data,k.resourceInfo.context);
  198. k.read({title:d.title,thumbnailUrl:d.thumbnailUrl},{origin:"portal-item",portal:d.portal||r.getDefault(),url:c});return k._loadLayersFromJSON(k.resourceInfo.data,c)})};c.fromId=function(d){return(d=q[d])?g.fromJSON(d):null};e([v.property({type:k,json:{write:{ignoreOrigin:!0,target:"baseMapLayers"}}}),v.cast(h.castForReferenceSetter)],c.prototype,"baseLayers",null);e([v.writer("baseLayers")],c.prototype,"writeBaseLayers",null);e([v.property({type:String,json:{origins:{"web-scene":{write:!0}}}})],c.prototype,
  199. "id",void 0);e([v.property({type:w})],c.prototype,"portalItem",void 0);e([v.property({type:k}),v.cast(h.castForReferenceSetter)],c.prototype,"referenceLayers",null);e([v.property({readOnly:!0})],c.prototype,"resourceInfo",void 0);e([v.property()],c.prototype,"thumbnailUrl",void 0);e([v.property({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],c.prototype,"title",void 0);e([v.writer("title")],c.prototype,"writeTitle",null);return c=g=e([v.subclass("esri.Basemap")],c);var g}(v.declared(m,
  200. c,b))})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./Accessor ./ArrayPool ./Evented ./lang ./ObjectPool ./scheduling ./accessorSupport/decorators ./accessorSupport/ensureType".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u){function v(d){return d?d.isInstanceOf&&d.isInstanceOf(B)?!0:!1:!1}function x(d){return d?v(d)?d.toArray():d.length?Array.prototype.slice.apply(d):[]:[]}function r(d){if(d&&d.length)return d[0]}
  201. function w(d,k,b,c){k&&k.forEach(function(k,g,q){d.push(k);w(d,b.call(c,k,g,q),b,c)})}a=function(){function d(){this.target=null;this.defaultPrevented=this.cancellable=!1}d.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};d.prototype.reset=function(d){this.defaultPrevented=!1;this.item=d};return d}();var q=function(){},d=new b(a,!0,function(d){d.item=null;d.target=null}),k=new Set,y=new Set,z=new Set,A=new Map,C=0,B=function(b){function c(d){d=b.call(this,d)||this;
  202. d._boundDispatch=d._dispatchColChange.bind(d);d._chgListeners=[];d._notifications=null;d._timer=null;d.length=0;d._items=[];Object.defineProperty(d,"uid",{value:C++});return d}p(c,b);a=c;c.ofType=function(d){if(!d)return a;if(A.has(d))return A.get(d);var k;if("function"===typeof d)k=d.prototype.declaredClass;else if(d.base)k=d.base.prototype.declaredClass;else for(var b in d.typeMap){var c=d.typeMap[b].prototype.declaredClass;k=k?k+(" | "+c):c}k=a.createSubclass({declaredClass:"esri.core.Collection\x3c"+
  203. k+"\x3e"});b={Type:d,ensureType:"function"===typeof d?u.ensureType(d):u.ensureOneOfType(d)};Object.defineProperty(k.prototype,"itemType",{value:b});A.set(d,k);return k};c.prototype.normalizeCtorArgs=function(d){return d?Array.isArray(d)||v(d)?{items:d}:d:{}};Object.defineProperty(c.prototype,"items",{get:function(){return this._items},set:function(d){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(x(d))),this._emitAfterChanges())},enumerable:!0,configurable:!0});c.prototype.on=
  204. function(d,k){var b;Array.isArray(d)?b=d:-1<d.indexOf(",")&&(b=d.split(/\s*,\s*/));if(b){var c=[];for(d=0;d<b.length;d++)c.push(this.on(b[d],k));c.remove=function(){for(var d=0;d<c.length;d++)c[d].remove()};return c}if("change"===d){var g=this._chgListeners,a={removed:!1,callback:k};g.push(a);this._notifications&&this._notifications.push({listeners:g.slice(),items:this._items.slice(),changes:[]});return{remove:function(){this.remove=q;a.removed=!0;g.splice(g.indexOf(a),1)}}}return n.after(this,"on"+
  205. d,k,!0)};c.prototype.hasEventListener=function(d){return"change"===d?0<this._chgListeners.length:this.inherited(arguments)};c.prototype.add=function(d,k){if(this._emitBeforeChanges())return this;k=this.getNextIndex(k);this._splice(k,0,d);this._emitAfterChanges();return this};c.prototype.addMany=function(d,k){void 0===k&&(k=this._items.length);if(!d||!d.length||this._emitBeforeChanges())return this;k=this.getNextIndex(k);this._splice.apply(this,[k,0].concat(x(d)));this._emitAfterChanges();return this};
  206. c.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges())return[];var d=this._splice(0,this.length)||[];this._emitAfterChanges();return d};c.prototype.clone=function(){return this._createNewInstance({items:this._items.map(m.clone)})};c.prototype.concat=function(){for(var d=[],k=0;k<arguments.length;k++)d[k]=arguments[k];d=d.map(x);return this._createNewInstance({items:(b=this._items).concat.apply(b,d)});var b};c.prototype.drain=function(d,k){if(this.length&&!this._emitBeforeChanges()){for(var b=
  207. this._splice(0,this.length),c=b.length,g=0;g<c;g++)d.call(k,b[g],g,b);this._emitAfterChanges()}};c.prototype.every=function(d,k){return this._items.every(d,k)};c.prototype.filter=function(d,k){var b;b=2===arguments.length?this._items.filter(d,k):this._items.filter(d);return this._createNewInstance({items:b})};c.prototype.find=function(d,k){if("function"!==typeof d)throw new TypeError(d+" is not a function");for(var b=this._items,c=b.length,g=0;g<c;g++){var a=b[g];if(d.call(k,a,g,b))return a}};c.prototype.findIndex=
  208. function(d,k){if("function"!==typeof d)throw new TypeError(d+" is not a function");for(var b=this._items,c=b.length,g=0;g<c;g++)if(d.call(k,b[g],g,b))return g;return-1};c.prototype.flatten=function(d,k){var b=[];w(b,this,d,k);return new a(b)};c.prototype.forEach=function(d,k){for(var b=this._items,c=b.length,g=0;g<c;g++)d.call(k,b[g],g,b)};c.prototype.getItemAt=function(d){return this._items[d]};c.prototype.getNextIndex=function(d){var k=this.length;d=null==d?k:d;0>d?d=0:d>k&&(d=k);return d};c.prototype.includes=
  209. function(d,k){void 0===k&&(k=0);return arguments.length?-1!==this._items.indexOf(d,k):!1};c.prototype.indexOf=function(d,k){void 0===k&&(k=0);return this._items.indexOf(d,k)};c.prototype.join=function(d){void 0===d&&(d=",");return this._items.join(d)};c.prototype.lastIndexOf=function(d,k){void 0===k&&(k=this.length-1);return this._items.lastIndexOf(d,k)};c.prototype.map=function(d,k){d=this._items.map(d,k);return new a({items:d})};c.prototype.reorder=function(d,k){void 0===k&&(k=this.length-1);var b=
  210. this.indexOf(d);if(-1!==b){0>k?k=0:k>=this.length&&(k=this.length-1);if(b!==k){if(this._emitBeforeChanges())return d;this._splice(b,1);this._splice(k,0,d);this._emitAfterChanges()}return d}};c.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var d=r(this._splice(this.length-1,1));this._emitAfterChanges();return d}};c.prototype.push=function(){for(var d=[],k=0;k<arguments.length;k++)d[k]=arguments[k];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[this.length,
  211. 0].concat(d));this._emitAfterChanges();return this.length};c.prototype.reduce=function(d,k){var b=this._items;return 2===arguments.length?b.reduce(d,k):b.reduce(d)};c.prototype.reduceRight=function(d,k){var b=this._items;return 2===arguments.length?b.reduceRight(d,k):b.reduceRight(d)};c.prototype.remove=function(d){return this.removeAt(this.indexOf(d))};c.prototype.removeAt=function(d){if(!(0>d||d>=this.length||this._emitBeforeChanges()))return d=r(this._splice(d,1)),this._emitAfterChanges(),d};c.prototype.removeMany=
  212. function(d){if(!d||!d.length||this._emitBeforeChanges())return[];d=v(d)?d.toArray():d;for(var k=this._items,b=[],c=d.length,g=0;g<c;g++){var a=k.indexOf(d[g]);if(-1<a){for(var q=g+1,e=a+1,m=Math.min(d.length-q,k.length-e),y=0;y<m&&d[q+y]===k[e+y];)y++;q=1+y;(a=this._splice(a,q))&&0<a.length&&b.push.apply(b,a);g+=q-1}}this._emitAfterChanges();return b};c.prototype.reverse=function(){if(this._emitBeforeChanges())return this;var d=this._splice(0,this.length);d&&(d.reverse(),this._splice.apply(this,[0,
  213. 0].concat(d)));this._emitAfterChanges();return this};c.prototype.shift=function(){if(this.length&&!this._emitBeforeChanges()){var d=r(this._splice(0,1));this._emitAfterChanges();return d}};c.prototype.slice=function(d,k){void 0===d&&(d=0);void 0===k&&(k=this.length);return this._createNewInstance({items:this._items.slice(d,k)})};c.prototype.some=function(d,k){return this._items.some(d,k)};c.prototype.sort=function(d){if(!this.length||this._emitBeforeChanges())return this;var k=this._splice(0,this.length);
  214. arguments.length?k.sort(d):k.sort();this._splice.apply(this,[0,0].concat(k));return this};c.prototype.splice=function(d,k){for(var b=[],c=2;c<arguments.length;c++)b[c-2]=arguments[c];if(this._emitBeforeChanges())return[];b=this._splice.apply(this,[d,k].concat(b))||[];this._emitAfterChanges();return b};c.prototype.toArray=function(){return this._items.slice()};c.prototype.toJSON=function(){return this.toArray()};c.prototype.toLocaleString=function(){return this._items.toLocaleString()};c.prototype.toString=
  215. function(){return this._items.toString()};c.prototype.unshift=function(){for(var d=[],k=0;k<arguments.length;k++)d[k]=arguments[k];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[0,0].concat(d));this._emitAfterChanges();return this.length};c.prototype._createNewInstance=function(d){return new this.constructor(d)};c.prototype._splice=function(k,b){for(var c=[],a=2;a<arguments.length;a++)c[a-2]=arguments[a];var a=this._items,q=this.constructor.prototype.itemType,e,m;!this._notifications&&
  216. this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=g.schedule(this._boundDispatch));if(b){m=a.splice(k,b);if(this.hasEventListener("before-remove")){var y=d.acquire();y.target=this;y.cancellable=!0;for(var h=0,t=m.length;h<t;h++)e=m[h],y.reset(e),this.emit("before-remove",y),y.defaultPrevented&&(m.splice(h,1),a.splice(k,0,e),k+=1,--h,--t);d.release(y)}this.length=this._items.length;
  217. if(this.hasEventListener("after-remove")){e=d.acquire();e.target=this;e.cancellable=!1;t=m.length;for(h=0;h<t;h++)e.reset(m[h]),this.emit("after-remove",e);d.release(e)}this._notifyChangeEvent(null,m)}if(c&&c.length){if(q){h=[];for(t=0;t<c.length;t++)e=c[t],y=q.ensureType(e),null==y&&null!=e||h.push(y);c=h}q=this.hasEventListener("before-add");h=this.hasEventListener("after-add");t=k===this.length;if(q||h){e=d.acquire();e.target=this;e.cancellable=!0;y=d.acquire();y.target=this;y.cancellable=!1;for(var l=
  218. 0,n=c;l<n.length;l++){var f=n[l];q?(e.reset(f),this.emit("before-add",e),e.defaultPrevented||(t?a.push(f):a.splice(k++,0,f),this._set("length",a.length),h&&(y.reset(f),this.emit("after-add",y)))):(t?a.push(f):a.splice(k++,0,f),this._set("length",a.length),y.reset(f),this.emit("after-add",y))}d.release(e)}else t?a.push.apply(a,c):a.splice.apply(a,[k,0].concat(c)),this._set("length",a.length);this._notifyChangeEvent(c,null)}return m};c.prototype._emitBeforeChanges=function(){var k=!1;if(this.hasEventListener("before-changes")){var b=
  219. d.acquire();b.target=this;b.cancellable=!0;this.emit("before-changes",b);k=b.defaultPrevented;d.release(b)}return k};c.prototype._emitAfterChanges=function(){if(this.hasEventListener("after-changes")){var k=d.acquire();k.target=this;k.cancellable=!1;this.emit("after-changes",k);d.release(k)}};c.prototype._notifyChangeEvent=function(d,k){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:d,removed:k})};c.prototype._dispatchColChange=function(){this._timer&&
  220. (this._timer.remove(),this._timer=null);if(this._notifications){var d=this._notifications;this._notifications=null;for(var b=function(d){var b=d.changes;k.clear();y.clear();z.clear();for(var g=0;g<b.length;g++){var a=b[g],q=a.added,a=a.removed;if(q)if(0===z.size&&0===y.size)for(var e=0,m=q;e<m.length;e++)q=m[e],k.add(q);else for(e=0,m=q;e<m.length;e++)q=m[e],y.has(q)?(z.add(q),y.delete(q)):z.has(q)||k.add(q);if(a)if(0===z.size&&0===k.size)for(e=0;e<a.length;e++)q=a[e],y.add(q);else for(e=0;e<a.length;e++)q=
  221. a[e],k.has(q)?k.delete(q):(z.delete(q),y.add(q))}var t=h.acquire();k.forEach(function(d){t.push(d)});var l=h.acquire();y.forEach(function(d){l.push(d)});var n=c._items,f=d.items,x=h.acquire();z.forEach(function(d){f.indexOf(d)!==n.indexOf(d)&&x.push(d)});if(d.listeners&&(t.length||l.length||x.length))for(b={target:c,added:t,removed:l,moved:x},g=d.listeners.length,q=0;q<g;q++)a=d.listeners[q],a.removed||a.callback.call(c,b);h.release(t);h.release(l);h.release(x)},c=this,g=0;g<d.length;g++)b(d[g]);
  222. k.clear();y.clear();z.clear()}};c.isCollection=v;e([t.property()],c.prototype,"length",void 0);e([t.property()],c.prototype,"items",null);return c=a=e([t.subclass("esri.core.Collection")],c);var a}(t.declared(l,c));return B})},"esri/core/Accessor":function(){define("./declare ./accessorSupport/Properties ./accessorSupport/get ./accessorSupport/introspection ./accessorSupport/set ./accessorSupport/watch".split(" "),function(a,f,p,e,n,l){f=f.default;a.before(function(c,m){a.hasMixin(c,h)&&e.processPrototype(m)});
  223. a.after(function(c){a.hasMixin(c,h)&&(e.processClass(c),Object.defineProperties(c.prototype,{initialized:{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},destroyed:{get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}}}))});var h=a(null,{declaredClass:"esri.core.Accessor","-chains-":{initialize:"after",destroy:"before"},constructor:function(){if(this.constructor===h)throw Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");
  224. Object.defineProperty(this,"__accessor__",{value:new f(this)});if(0<arguments.length&&this.normalizeCtorArgs){for(var c=[],a=0;a<arguments.length;a++)c.push(arguments[a]);this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,c)}},__accessor__:null,postscript:function(c){var a=this.__accessor__;c=a.ctorArgs||c;var b;null!=this.getDefaults&&(b=this.getDefaults(c||{}),this.set(b));a.initialize();c&&(this.set(c),a.ctorArgs=null);a.constructed();this.initialize()},initialize:function(){},destroy:function(){if(this.destroyed)try{throw Error("instance is already destroyed");
  225. }catch(c){console.warn(c.stack)}else l.removeTarget(this),this.__accessor__.destroy()},get:function(c){return p.get(this,c)},hasOwnProperty:function(c){return this.__accessor__?this.__accessor__.has(c):Object.prototype.hasOwnProperty.call(this,c)},keys:function(){return this.__accessor__?this.__accessor__.keys():[]},set:function(c,a){n.set(this,c,a);return this},watch:function(c,a,b){return l.watch(this,c,a,b)},_clearOverride:function(c){return this.__accessor__.clearOverride(c)},_override:function(c,
  226. a){return this.__accessor__.override(c,a)},_isOverridden:function(c){return this.__accessor__.isOverridden(c)},notifyChange:function(c){this.__accessor__.propertyInvalidated(c)},_get:function(c){return this.__accessor__.internalGet(c)},_set:function(c,a){return this.__accessor__.internalSet(c,a)}});return h})},"esri/core/declare":function(){define(["require","exports","dojo/_base/declare"],function(a,f,p){function e(c,a){c&&!Array.isArray(c)&&"function"!==typeof c&&(a=c,c=null);c=c||[];a=a||{};return n([this].concat(c),
  227. a)}function n(c,a){c&&!Array.isArray(c)&&"function"!==typeof c&&(a=c,c=null);"function"===typeof c?c=[c]:c||(c=[]);a=a||{};var b,g;b=0;for(g=l.length;b<g;b++)l[b](c,a);c=p(c,a);c.createSubclass=e;b=0;for(g=h.length;b<g;b++)h[b](c);return c}var l=[],h=[];(function(c){c.hasMixin=function(c,b){c=Array.isArray(c)?c.reduce(function(b,c){return c._meta?b.concat(c._meta.bases):b},[]):c._meta?c._meta.bases:c;if(!c)return!1;if("string"===typeof b)for(var g=c.length-1;0<=g;g--)if(c[g].prototype.declaredClass===
  228. b)return!0;return-1!==c.indexOf(b)};c.safeMixin=function(c,b){return p.safeMixin(c,b)};c.before=function(c){l.push(c)};c.after=function(c){h.push(c)}})(n||(n={}));return n})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(a,f,p){function e(d,k){throw Error("declare"+(k?" "+k:"")+": "+d);}function n(d,k){for(var b=[],c=[{cls:0,refs:[]}],g={},a=1,q=d.length,m=0,y,h,t,l,n;m<q;++m){(y=d[m])?"[object Function]"!=z.call(y)&&e("mixin #"+m+" is not a callable constructor.",
  229. k):e("mixin #"+m+" is unknown. Did you use dojo.require to pull it in?",k);h=y._meta?y._meta.bases:[y];t=0;for(y=h.length-1;0<=y;--y)l=h[y].prototype,l.hasOwnProperty("declaredClass")||(l.declaredClass="uniqName_"+C++),l=l.declaredClass,g.hasOwnProperty(l)||(g[l]={count:0,refs:[],cls:h[y]},++a),l=g[l],t&&t!==l&&(l.refs.push(t),++t.count),t=l;++t.count;c[0].refs.push(t)}for(;c.length;){t=c.pop();b.push(t.cls);for(--a;n=t.refs,1==n.length;){t=n[0];if(!t||--t.count){t=0;break}b.push(t.cls);--a}if(t)for(m=
  230. 0,q=n.length;m<q;++m)t=n[m],--t.count||c.push(t)}a&&e("can't build consistent linearization",k);y=d[0];b[0]=y?y._meta&&y===b[b.length-y._meta.bases.length]?y._meta.bases.length:1:0;return b}function l(d,k,b,c){var g,a,q,m,h,t,l=this._inherited=this._inherited||{};"string"===typeof d&&(g=d,d=k,k=b,b=c);if("function"===typeof d)q=d,d=k,k=b;else try{q=d.callee}catch(N){if(N instanceof TypeError)e("strict mode inherited() requires the caller function to be passed before arguments",this.declaredClass);
  231. else throw N;}(g=g||q.nom)||e("can't deduce a name to call inherited()",this.declaredClass);b=c=0;m=this.constructor._meta;c=m.bases;t=l.p;if("constructor"!=g){if(l.c!==q&&(t=0,h=c[0],m=h._meta,m.hidden[g]!==q)){(a=m.chains)&&"string"==typeof a[g]&&e("calling chained method with inherited: "+g,this.declaredClass);do if(m=h._meta,a=h.prototype,m&&(a[g]===q&&a.hasOwnProperty(g)||m.hidden[g]===q))break;while(h=c[++t]);t=h?t:-1}if(h=c[++t])if(a=h.prototype,h._meta&&a.hasOwnProperty(g))b=a[g];else{q=y[g];
  232. do if(a=h.prototype,(b=a[g])&&(h._meta?a.hasOwnProperty(g):b!==q))break;while(h=c[++t])}b=h&&b||y[g]}else{if(l.c!==q&&(t=0,(m=c[0]._meta)&&m.ctor!==q)){for((a=m.chains)&&"manual"===a.constructor||e("calling chained constructor with inherited",this.declaredClass);(h=c[++t])&&(!(m=h._meta)||m.ctor!==q););t=h?t:-1}for(;(h=c[++t])&&!(b=(m=h._meta)?m.ctor:h););b=h&&b}l.c=b;l.p=t;if(b)return!0===k?b:b.apply(this,k||d)}function h(d,k,b){return"string"===typeof d?"function"===typeof k?this.__inherited(d,
  233. k,b,!0):this.__inherited(d,k,!0):"function"===typeof d?this.__inherited(d,k,!0):this.__inherited(d,!0)}function c(d,k,b,c){var g=this.getInherited(d,k,b);if(g)return g.apply(this,c||b||k||d)}function m(d){for(var k=this.constructor._meta.bases,b=0,c=k.length;b<c;++b)if(k[b]===d)return!0;return this instanceof d}function b(d,k){for(var b in k)"constructor"!=b&&k.hasOwnProperty(b)&&(d[b]=k[b])}function g(k){d.safeMixin(this.prototype,k);return this}function t(k,b){k instanceof Array||"function"===typeof k||
  234. (b=k,k=void 0);b=b||{};k=k||[];return d([this].concat(k),b)}function u(d,k){return function(){var b=arguments,c=b,g=b[0],a,e;e=d.length;var m;if(!(this instanceof b.callee))return q(b);if(k&&(g&&g.preamble||this.preamble))for(m=Array(d.length),m[0]=b,a=0;;){(g=b[0])&&(g=g.preamble)&&(b=g.apply(this,b)||b);g=d[a].prototype;(g=g.hasOwnProperty("preamble")&&g.preamble)&&(b=g.apply(this,b)||b);if(++a==e)break;m[a]=b}for(a=e-1;0<=a;--a)g=d[a],(g=(e=g._meta)?e.ctor:g)&&g.apply(this,m?m[a]:b);(g=this.postscript)&&
  235. g.apply(this,c)}}function v(d,k){return function(){var b=arguments,c=b,g=b[0];if(!(this instanceof b.callee))return q(b);k&&(g&&(g=g.preamble)&&(c=g.apply(this,c)||c),(g=this.preamble)&&g.apply(this,c));d&&d.apply(this,b);(g=this.postscript)&&g.apply(this,b)}}function x(d){return function(){var k=arguments,b=0,c,g;if(!(this instanceof k.callee))return q(k);for(;c=d[b];++b)if(c=(g=c._meta)?g.ctor:c){c.apply(this,k);break}(c=this.postscript)&&c.apply(this,k)}}function r(d,k,b){return function(){var c,
  236. g,a=0,q=1;b&&(a=k.length-1,q=-1);for(;c=k[a];a+=q)g=c._meta,(c=(g?g.hidden:c.prototype)[d])&&c.apply(this,arguments)}}function w(d){A.prototype=d.prototype;d=new A;A.prototype=null;return d}function q(d){var k=d.callee,b=w(k);k.apply(b,d);return b}function d(c,a,q){"string"!=typeof c&&(q=a,a=c,c="");q=q||{};var A,C,D,G,F,I,U,O=1,N=a;"[object Array]"==z.call(a)?(I=n(a,c),D=I[0],O=I.length-D,a=I[O]):(I=[0],a?"[object Function]"==z.call(a)?(D=a._meta,I=I.concat(D?D.bases:a)):e("base class is not a callable constructor.",
  237. c):null!==a&&e("unknown base class. Did you use dojo.require to pull it in?",c));if(a)for(C=O-1;;--C){A=w(a);if(!C)break;D=I[C];(D._meta?b:k)(A,D.prototype);G=f("csp-restrictions")?function(){}:new Function;G.superclass=a;G.prototype=A;a=A.constructor=G}else A={};d.safeMixin(A,q);D=q.constructor;D!==y.constructor&&(D.nom="constructor",A.constructor=D);for(C=O-1;C;--C)(D=I[C]._meta)&&D.chains&&(U=k(U||{},D.chains));A["-chains-"]&&(U=k(U||{},A["-chains-"]));a&&a.prototype&&a.prototype["-chains-"]&&
  238. (U=k(U||{},a.prototype["-chains-"]));D=!U||!U.hasOwnProperty("constructor");I[0]=G=U&&"manual"===U.constructor?x(I):1==I.length?v(q.constructor,D):u(I,D);G._meta={bases:I,hidden:q,chains:U,parents:N,ctor:q.constructor};G.superclass=a&&a.prototype;G.extend=g;G.createSubclass=t;G.prototype=A;A.constructor=G;A.getInherited=h;A.isInstanceOf=m;A.inherited=B;A.__inherited=l;c&&(A.declaredClass=c,p.setObject(c,G));if(U)for(F in U)A[F]&&"string"==typeof U[F]&&"constructor"!=F&&(D=A[F]=r(F,I,"after"===U[F]),
  239. D.nom=F);return G}var k=p.mixin,y=Object.prototype,z=y.toString,A,C=0;A=f("csp-restrictions")?function(){}:new Function;var B=a.config.isDebug?c:l;a.safeMixin=d.safeMixin=function(d,k){var b,c;for(b in k)c=k[b],c===y[b]&&b in y||"constructor"==b||("[object Function]"==z.call(c)&&(c.nom=b),d[b]=c);return d};return a.declare=d})},"esri/core/accessorSupport/Properties":function(){define("require exports dojo/has ../Logger ./extensions ./PropertyOrigin ./Store".split(" "),function(a,f,p,e,n,l,h){Object.defineProperty(f,
  240. "__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.Properties");a=function(){function c(c){this.host=c;this._origin=l.OriginId.USER;this.ctorArgs=this.cursors=null;this.destroyed=!1;this.dirties={};this.lifecycle=0;this.overridden=null;this.store=new h.default;c=this.host.constructor.__accessorMetadata__;this.metadatas=c.properties;this.autoDestroy=c.autoDestroy}c.prototype.initialize=function(){this.lifecycle=1;n.instanceCreated(this.host,this.metadatas)};c.prototype.constructed=function(){this.lifecycle=
  241. 2};c.prototype.destroy=function(){this.destroyed=!0;var c=this.cursors;if(this.cursors)for(var b=0,g=Object.getOwnPropertyNames(c);b<g.length;b++){var a=g[b],e=c[a];if(e){for(;0<e.length;)e.pop().propertyDestroyed(this,a);c[a]=null}}if(this.autoDestroy)for(a in this.metadatas)(c=this.internalGet(a))&&c&&"function"===typeof c.destroy&&(c.destroy(),this.metadatas[a].nonNullable||this.internalSet(a,null))};Object.defineProperty(c.prototype,"initialized",{get:function(){return 0!==this.lifecycle},enumerable:!0,
  242. configurable:!0});c.prototype.clearOverride=function(c){this.isOverridden(c)&&(this.overridden[c]=!1,this.propertyInvalidated(c))};c.prototype.get=function(c){var b=this.metadatas[c];if(this.store.has(c)&&!this.dirties[c])return this.store.get(c);var g=b.get;return g?(b=g.call(this.host),this.store.set(c,b,l.OriginId.COMPUTED),this.propertyCommitted(c),b):b.value};c.prototype.originOf=function(c){var b=this.store.originOf(c);return void 0===b&&(c=this.metadatas[c])&&c.hasOwnProperty("value")?"defaults":
  243. l.idToName(b)};c.prototype.has=function(c){return this.metadatas[c]?this.store.has(c):!1};c.prototype.internalGet=function(c){if(this.metadatas[c]){var b=this.store;return b.has(c)?b.get(c):this.metadatas[c].value}};c.prototype.internalSet=function(c,b){this.metadatas[c]&&(this.propertyInvalidated(c),this.initialized?this.store.set(c,b,this._origin):this.store.set(c,b,l.OriginId.DEFAULTS),this.propertyCommitted(c))};c.prototype.isOverridden=function(c){return null!=this.overridden&&!0===this.overridden[c]};
  244. c.prototype.keys=function(){return this.store.keys()};c.prototype.override=function(c,b){if(this.metadatas[c]){this.overridden||(this.overridden={});var g=this.metadatas[c];g.nonNullable&&null==b||((g=g.cast)&&(b=g.call(this.host,b)),this.overridden[c]=!0,this.internalSet(c,b))}};c.prototype.set=function(c,b){if(this.metadatas[c]){var g=this.metadatas[c];if(!g.nonNullable||null!=b){var a=g.set;(g=g.cast)&&(b=g.call(this.host,b));a?a.call(this.host,b):this.internalSet(c,b)}}};c.prototype.setDefaultOrigin=
  245. function(c){this._origin=l.nameToId(c)};c.prototype.propertyInvalidated=function(c){var b=this.dirties,g=this.isOverridden(c),a=this.cursors&&this.cursors[c],e=this.metadatas[c].computes;if(a)for(var m=0;m<a.length;m++)a[m].propertyInvalidated(this,c);g||(b[c]=!0);if(e)for(c=0;c<e.length;c++)this.propertyInvalidated(e[c])};c.prototype.propertyCommitted=function(c){var b=this.cursors&&this.cursors[c];this.dirties[c]=!1;if(b)for(var g=0;g<b.length;g++)b[g].propertyCommitted(this,c)};c.prototype.addCursor=
  246. function(c,b){this.cursors||(this.cursors={});var g=this.cursors[c];g||(this.cursors[c]=g=[]);g.push(b)};c.prototype.removeCursor=function(c,b){var g=this.cursors[c];this.cursors[c]&&(g.splice(g.indexOf(b),1),0===g.length&&(this.cursors[c]=null))};return c}();f.default=a})},"esri/core/Logger":function(){define(["require","exports","dojo/has"],function(a,f,p){var e={info:0,warn:1,error:2};a=function(){function a(e){void 0===e&&(e={});this.module=e.module||"";this.writer=e.writer||null;this.level=e.level||
  247. null;null!=e.enabled&&(this.enabled=!!e.enabled);a._loggers[this.module]=this;e=this.module.lastIndexOf(".");-1!==e&&(this.parent=a.getLogger(this.module.slice(0,e)))}a.prototype.log=function(a){for(var e=[],c=1;c<arguments.length;c++)e[c-1]=arguments[c];this._isEnabled()&&this._matchLevel(a)&&(c=this._inheritedWriter())&&c.apply(void 0,[a,this.module].concat(e))};a.prototype.error=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];this.log.apply(this,["error"].concat(a))};a.prototype.warn=
  248. function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];this.log.apply(this,["warn"].concat(a))};a.prototype.info=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];this.log.apply(this,["info"].concat(a))};a.prototype.getLogger=function(e){return a.getLogger(this.module+"."+e)};a.getLogger=function(e){var h=a._loggers[e];h||(h=new a({module:e}));return h};a.prototype._parentWithMember=function(a,e){for(var c=this;c&&null==c[a];)c=c.parent;return c?c[a]:e};a.prototype._inheritedWriter=
  249. function(){return this._parentWithMember("writer",this._consoleWriter)};a.prototype._consoleWriter=function(a,e){for(var c=[],m=2;m<arguments.length;m++)c[m-2]=arguments[m];console[a].apply(console,["["+e+"]"].concat(c))};a.prototype._matchLevel=function(a){return e[this._parentWithMember("level","error")]<=e[a]};a.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};a._loggers={};return a}();a.getLogger("esri").level="warn";return a})},"esri/core/accessorSupport/extensions":function(){define(["require",
  250. "exports","./extensions/aliasedProperty","./extensions/computedProperty","./extensions/serializableProperty"],function(a,f,p,e,n){Object.defineProperty(f,"__esModule",{value:!0});var l=[p.default,e.default,n.default];f.processPrototypeMetadatas=function(a,c){for(var e=Object.getOwnPropertyNames(a),b=0;b<l.length;b++){var g=l[b];if(g.processPrototypePropertyMetadata)for(var h=0,n=e;h<n.length;h++){var f=n[h];g.processPrototypePropertyMetadata(f,a[f],a,c)}}};f.processClassMetadatas=function(a,c){for(var e=
  251. Object.getOwnPropertyNames(a),b=0;b<l.length;b++){var g=l[b];if(g.processClassPropertyMetadata)for(var h=0,n=e;h<n.length;h++){var f=n[h];g.processClassPropertyMetadata(f,a[f],a,c)}}};f.instanceCreated=function(a,c){for(var e=Object.getOwnPropertyNames(c),b=0;b<l.length;b++){var g=l[b];g.instanceCreated&&g.instanceCreated(a,c,e)}}})},"esri/core/accessorSupport/extensions/aliasedProperty":function(){define("require exports dojo/has ../get ../set ../utils ../wire".split(" "),function(a,f,p,e,n,l,h){function c(c,
  252. b,g){var a=l.getProperties(c);return h.wire(c,g.aliasOf,function(){a.propertyInvalidated(b)})}Object.defineProperty(f,"__esModule",{value:!0});f.AliasedPropertyExtension={processClassPropertyMetadata:function(c,b,g,a){var m=b.aliasOf;if(m&&(c=m.split(".")[0],null!=g[c]&&!b.set&&!b.get)){var h;b.get=function(){var b=e.default(this,m);if("function"===typeof b){h||(h=m.split(".").slice(0,-1).join("."));var c=e.default(this,h);c&&(b=b.bind(c))}return b};b.readOnly||(b.set=function(b){return n.default(this,
  253. m,b)})}},instanceCreated:function(a,b,g){for(var e=0;e<g.length;e++){var m=g[e],h=b[m];h.aliasOf&&c(a,m,h)}}};f.default=f.AliasedPropertyExtension})},"esri/core/accessorSupport/get":function(){define(["require","exports","./utils"],function(a,f,p){function e(c,a,b){if(null!=b.getItemAt||Array.isArray(b)){var g=parseInt(c,10);if(!isNaN(g))return Array.isArray(b)?b[g]:b.getItemAt(g)}g=p.getProperties(b);return a?p.isPropertyDeclared(g,c)?g.get(c):b[c]:p.isPropertyDeclared(g,c)?g.internalGet(c):b[c]}
  254. function n(c,a,b,g){if(null==c)return c;if((c=e(a[g],b,c))||!(g<a.length-1))return g===a.length-1?c:n(c,a,b,g+1)}function l(c,a,b,g){void 0===b&&(b=!1);void 0===g&&(g=0);return"string"===typeof a&&-1===a.indexOf(".")?e(a,b,c):n(c,p.pathToArray(a),b,g)}function h(c,a){return l(c,a,!0)}Object.defineProperty(f,"__esModule",{value:!0});f.valueOf=l;f.get=h;f.exists=function(c,a){return void 0!==l(a,c,!0)};f.default=h})},"esri/core/accessorSupport/utils":function(){define(["require","exports","../lang"],
  255. function(a,f,p){function e(c,a){return a?Object.keys(a).reduce(function(b,c){if("value"===c)return b[c]=a[c],b;if(void 0===b[c])return b[c]=p.clone(a[c]),b;var g=b[c],m=a[c];if(g===m)return b;if(Array.isArray(m)||Array.isArray(b))g=g?Array.isArray(g)?b[c]=g.concat():b[c]=[g]:b[c]=[],m&&(Array.isArray(m)||(m=[m]),m.forEach(function(b){-1===g.indexOf(b)&&g.push(b)}));else if(m&&"object"===typeof m)b[c]=e(g,m);else if(!b.hasOwnProperty(c)||a.hasOwnProperty(c))b[c]=m;return b},c||{}):c}function n(c){return Array.isArray(c)?
  256. c:c.split(".")}function l(c){if(Array.isArray(c)||-1<c.indexOf(",")){c=Array.isArray(c)?c:c.split(",");for(var a=0;a<c.length;a++)c[a]=c[a].trim();return 1===c.length?c[0]:c}return c.trim()}function h(c){var a=!1;return function(){a||(a=!0,c())}}Object.defineProperty(f,"__esModule",{value:!0});f.getProperties=function(c){return c?c.__accessor__?c.__accessor__:c.propertyInvalidated?c:null:null};f.isPropertyDeclared=function(c,a){return c&&c.metadatas&&null!=c.metadatas[a]};f.merge=e;f.pathToStringOrArray=
  257. function(c){return c?"string"===typeof c&&-1===c.indexOf(".")?c:n(c):c};f.pathToArray=n;f.splitPath=l;f.parse=function(c,a,b,g){a=l(a);if(Array.isArray(a)){var e=a.map(function(a){return g(c,a.trim(),b)});return{remove:h(function(){return e.forEach(function(b){return b.remove()})})}}return g(c,a.trim(),b)};f.once=h})},"esri/core/lang":function(){define("dojo/_base/array dojo/_base/kernel dojo/_base/lang dojo/date dojo/number dojo/date/locale dojo/i18n!../nls/common".split(" "),function(a,f,p,e,n,
  258. l,h){function c(b){return void 0!==b&&null!==b}function m(b){return c(b)?b:""}function b(b,g,h){var q=h.match(/([^\(]+)(\([^\)]+\))?/i),d=p.trim(q[1]);h=g[b];var q=JSON.parse((q[2]?p.trim(q[2]):"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),k=q.utcOffset;if(-1===a.indexOf(u,d))d=p.getObject(d),p.isFunction(d)&&(h=d(h,b,g,q));else if("number"===typeof h||"string"===typeof h&&h&&!isNaN(Number(h)))switch(h=
  259. Number(h),d){case "NumberFormat":b=p.mixin({},q);g=parseFloat(b.places);if(isNaN(g)||0>g)b.places=Infinity;return n.format(h,b);case "DateString":h=new Date(h);if(q.local||q.systemLocale)return q.systemLocale?h.toLocaleDateString()+(q.hideTime?"":" "+h.toLocaleTimeString()):h.toDateString()+(q.hideTime?"":" "+h.toTimeString());h=h.toUTCString();q.hideTime&&(h=h.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return h;case "DateFormat":return h=new Date(h),c(k)&&(h=e.add(h,"minute",h.getTimezoneOffset()-
  260. k)),l.format(h,q)}return m(h)}function g(b,c){var a;if(c)for(a in b)b.hasOwnProperty(a)&&(void 0===b[a]?delete b[a]:b[a]instanceof Object&&g(b[a],!0));else for(a in b)b.hasOwnProperty(a)&&void 0===b[a]&&delete b[a];return b}function t(b){if(!b||"object"!=typeof b||p.isFunction(b))return b;if(b instanceof Int8Array||b instanceof Uint8Array||b instanceof Uint8ClampedArray||b instanceof Int16Array||b instanceof Int32Array||b instanceof Uint16Array||b instanceof Uint32Array||b instanceof Float32Array||
  261. b instanceof Float64Array||b instanceof Date)return new b.constructor(b);if("function"===typeof b.clone)b=b.clone();else if("function"===typeof b.map&&"function"===typeof b.forEach)b=b.map(t);else{var c={},a,g,d={};for(a in b){g=b[a];var k=!(a in d)||d[a]!==g;if(!(a in c)||c[a]!==g&&k)c[a]=t?t(g):g}b=c}return b}var u=["NumberFormat","DateString","DateFormat"],v=/<\/?[^>]+>/g;return{equals:function(b,c){return b===c||"number"===typeof b&&isNaN(b)&&"number"===typeof c&&isNaN(c)||p.isFunction((b||{}).getTime)&&
  262. p.isFunction((c||{}).getTime)&&b.getTime()==c.getTime()||p.isFunction((b||{}).equals)&&b.equals(c)||p.isFunction((c||{}).equals)&&c.equals(b)||!1},valueOf:function(b,c){for(var a in b)if(b[a]==c)return a;return null},stripTags:function(b){if(b){var c=typeof b;if("string"===c)b=b.replace(v,"");else if("object"===c)for(var a in b)(c=b[a])&&"string"===typeof c&&(c=c.replace(v,"")),b[a]=c}return b},substitute:function(g,e,t){var q,d,k;c(t)&&(p.isObject(t)?(q=t.first,d=t.dateFormat,k=t.numberFormat):q=
  263. t);if(e&&"{*}"!==e)return p.replace(e,p.hitch({obj:g},function(c,g){c=g.split(":");return 1<c.length?(g=c[0],c.shift(),b(g,this.obj,c.join(":"))):d&&-1!==a.indexOf(d.properties||"",g)?b(g,this.obj,d.formatter||"DateString"):k&&-1!==a.indexOf(k.properties||"",g)?b(g,this.obj,k.formatter||"NumberFormat"):m(this.obj[g])}));e=[];var y;e.push('\x3ctable class\x3d"esri-table" summary\x3d"'+h.fieldsSummary+'"\x3e\x3ctbody\x3e');for(y in g)if(t=g[y],d&&-1!==a.indexOf(d.properties||"",y)?t=b(y,g,d.formatter||
  264. "DateString"):k&&-1!==a.indexOf(k.properties||"",y)&&(t=b(y,g,k.formatter||"NumberFormat")),e.push("\x3ctr\x3e\x3cth\x3e"+y+"\x3c/th\x3e\x3ctd\x3e"+m(t)+"\x3c/td\x3e\x3c/tr\x3e"),q)break;e.push("\x3c/tbody\x3e\x3c/table\x3e");return e.join("")},filter:function(b,c,a){c=[p.isString(b)?b.split(""):b,a||f.global,p.isString(c)?new Function("item","index","array",c):c];a={};var g;b=c[0];for(g in b)c[2].call(c[g],b[g],g,b)&&(a[g]=b[g]);return a},startsWith:function(b,c,a){a=a||0;return b.indexOf(c,a)===
  265. a},endsWith:function(b,c,a){if("number"!==typeof a||!isFinite(a)||Math.floor(a)!==a||a>b.length)a=b.length;a-=c.length;b=b.indexOf(c,a);return-1!==b&&b===a},isDefined:c,fixJson:g,clone:t}})},"dojo/date":function(){define(["./has","./_base/lang"],function(a,f){var p={getDaysInMonth:function(a){var e=a.getMonth();return 1==e&&p.isLeapYear(a)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]},isLeapYear:function(a){a=a.getFullYear();return!(a%400)||!(a%4)&&!!(a%100)},getTimezoneName:function(a){var e=a.toString(),
  266. l="",h=e.indexOf("(");if(-1<h)l=e.substring(++h,e.indexOf(")"));else if(h=/([A-Z\/]+) \d{4}$/,e=e.match(h))l=e[1];else if(e=a.toLocaleString(),h=/ ([A-Z\/]+)$/,e=e.match(h))l=e[1];return"AM"==l||"PM"==l?"":l},compare:function(a,n,l){a=new Date(+a);n=new Date(+(n||new Date));"date"==l?(a.setHours(0,0,0,0),n.setHours(0,0,0,0)):"time"==l&&(a.setFullYear(0,0,0),n.setFullYear(0,0,0));return a>n?1:a<n?-1:0},add:function(a,n,l){var e=new Date(+a),c=!1,m="Date";switch(n){case "day":break;case "weekday":var b;
  267. (n=l%5)?b=parseInt(l/5):(n=0<l?5:-5,b=0<l?(l-5)/5:(l+5)/5);var g=a.getDay(),t=0;6==g&&0<l?t=1:0==g&&0>l&&(t=-1);g+=n;if(0==g||6==g)t=0<l?2:-2;l=7*b+n+t;break;case "year":m="FullYear";c=!0;break;case "week":l*=7;break;case "quarter":l*=3;case "month":c=!0;m="Month";break;default:m="UTC"+n.charAt(0).toUpperCase()+n.substring(1)+"s"}if(m)e["set"+m](e["get"+m]()+l);c&&e.getDate()<a.getDate()&&e.setDate(0);return e},difference:function(a,n,l){n=n||new Date;l=l||"day";var e=n.getFullYear()-a.getFullYear(),
  268. c=1;switch(l){case "quarter":a=a.getMonth();n=n.getMonth();c=Math.floor(n/3)+1+4*e-(Math.floor(a/3)+1);break;case "weekday":e=Math.round(p.difference(a,n,"day"));l=parseInt(p.difference(a,n,"week"));if(0==e%7)e=5*l;else{var c=0,m=a.getDay(),b=n.getDay();l=parseInt(e/7);n=e%7;a=new Date(a);a.setDate(a.getDate()+7*l);a=a.getDay();if(0<e)switch(!0){case 6==m:c=-1;break;case 0==m:c=0;break;case 6==b:c=-1;break;case 0==b:c=-2;break;case 5<a+n:c=-2}else if(0>e)switch(!0){case 6==m:c=0;break;case 0==m:c=
  269. 1;break;case 6==b:c=2;break;case 0==b:c=1;break;case 0>a+n:c=2}e=e+c-2*l}c=e;break;case "year":c=e;break;case "month":c=n.getMonth()-a.getMonth()+12*e;break;case "week":c=parseInt(p.difference(a,n,"day")/7);break;case "day":c/=24;case "hour":c/=60;case "minute":c/=60;case "second":c/=1E3;case "millisecond":c*=n.getTime()-a.getTime()}return Math.round(c)}};f.mixin(f.getObject("dojo.date",!0),p);return p})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string",
  270. "./regexp"],function(a,f,p,e,n){var l={};a.setObject("dojo.number",l);l.format=function(c,e){e=a.mixin({},e||{});var b=f.normalizeLocale(e.locale),b=f.getLocalization("dojo.cldr","number",b);e.customs=b;b=e.pattern||b[(e.type||"decimal")+"Format"];return isNaN(c)||Infinity==Math.abs(c)?null:l._applyPattern(c,b,e)};l._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;l._applyPattern=function(c,a,b){b=b||{};var g=b.customs.group,e=b.customs.decimal;a=a.split(";");var m=a[0];a=a[0>c?1:0]||"-"+m;if(-1!=a.indexOf("%"))c*=
  271. 100;else if(-1!=a.indexOf("\u2030"))c*=1E3;else if(-1!=a.indexOf("\u00a4"))g=b.customs.currencyGroup||g,e=b.customs.currencyDecimal||e,a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(c,a,g,q){return(c=b[["symbol","currency","displayName"][g.length-1]]||b.currency||"")?a+c+q:""});else if(-1!=a.indexOf("E"))throw Error("exponential notation not supported");var h=l._numberPatternRE,m=m.match(h);if(!m)throw Error("unable to find a number expression in pattern: "+a);!1===b.fractional&&(b.places=
  272. 0);return a.replace(h,l._formatAbsolute(c,m[0],{decimal:e,group:g,places:b.places,round:b.round}))};l.round=function(c,a,b){b=10/(b||10);return(b*+c).toFixed(a)/b};if(0==(.9).toFixed()){var h=l.round;l.round=function(c,a,b){var g=Math.pow(10,-a||0),e=Math.abs(c);if(!c||e>=g)g=0;else if(e/=g,.5>e||.95<=e)g=0;return h(c,a,b)+(0<c?g:-g)}}l._formatAbsolute=function(c,a,b){b=b||{};!0===b.places&&(b.places=0);Infinity===b.places&&(b.places=6);a=a.split(".");var g="string"==typeof b.places&&b.places.indexOf(","),
  273. m=b.places;g?m=b.places.substring(g+1):0<=m||(m=(a[1]||[]).length);0>b.round||(c=l.round(c,m,b.round));c=String(Math.abs(c)).split(".");var h=c[1]||"";a[1]||b.places?(g&&(b.places=b.places.substring(0,g)),g=void 0!==b.places?b.places:a[1]&&a[1].lastIndexOf("0")+1,g>h.length&&(c[1]=e.pad(h,g,"0",!0)),m<h.length&&(c[1]=h.substr(0,m))):c[1]&&c.pop();m=a[0].replace(",","");g=m.indexOf("0");-1!=g&&(g=m.length-g,g>c[0].length&&(c[0]=e.pad(c[0],g)),-1==m.indexOf("#")&&(c[0]=c[0].substr(c[0].length-g)));
  274. var m=a[0].lastIndexOf(","),n,f;-1!=m&&(n=a[0].length-m-1,a=a[0].substr(0,m),m=a.lastIndexOf(","),-1!=m&&(f=a.length-m-1));a=[];for(m=c[0];m;)g=m.length-n,a.push(0<g?m.substr(g):m),m=0<g?m.slice(0,g):"",f&&(n=f,f=void 0);c[0]=a.reverse().join(b.group||",");return c.join(b.decimal||".")};l.regexp=function(c){return l._parseInfo(c).regexp};l._parseInfo=function(c){c=c||{};var a=f.normalizeLocale(c.locale),a=f.getLocalization("dojo.cldr","number",a),b=c.pattern||a[(c.type||"decimal")+"Format"],g=a.group,
  275. e=a.decimal,h=1;if(-1!=b.indexOf("%"))h/=100;else if(-1!=b.indexOf("\u2030"))h/=1E3;else{var v=-1!=b.indexOf("\u00a4");v&&(g=a.currencyGroup||g,e=a.currencyDecimal||e)}a=b.split(";");1==a.length&&a.push("-"+a[0]);a=n.buildGroupRE(a,function(b){b="(?:"+n.escapeString(b,".")+")";return b.replace(l._numberPatternRE,function(b){var a={signed:!1,separator:c.strict?g:[g,""],fractional:c.fractional,decimal:e,exponent:!1};b=b.split(".");var q=c.places;1==b.length&&1!=h&&(b[1]="###");1==b.length||0===q?a.fractional=
  276. !1:(void 0===q&&(q=c.pattern?b[1].lastIndexOf("0")+1:Infinity),q&&void 0==c.fractional&&(a.fractional=!0),!c.places&&q<b[1].length&&(q+=","+b[1].length),a.places=q);b=b[0].split(",");1<b.length&&(a.groupSize=b.pop().length,1<b.length&&(a.groupSize2=b.pop().length));return"("+l._realNumberRegexp(a)+")"})},!0);v&&(a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(b,a,g,q){b=n.escapeString(c[["symbol","currency","displayName"][g.length-1]]||c.currency||"");if(!b)return"";a=a?"[\\s\\xa0]":"";
  277. q=q?"[\\s\\xa0]":"";return c.strict?a+b+q:(a&&(a+="*"),q&&(q+="*"),"(?:"+a+b+q+")?")}));return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:g,decimal:e,factor:h}};l.parse=function(c,a){a=l._parseInfo(a);c=(new RegExp("^"+a.regexp+"$")).exec(c);if(!c)return NaN;var b=c[1];if(!c[1]){if(!c[2])return NaN;b=c[2];a.factor*=-1}b=b.replace(new RegExp("["+a.group+"\\s\\xa0]","g"),"").replace(a.decimal,".");return b*a.factor};l._realNumberRegexp=function(c){c=c||{};"places"in c||(c.places=Infinity);"string"!=
  278. typeof c.decimal&&(c.decimal=".");"fractional"in c&&!/^0/.test(c.places)||(c.fractional=[!0,!1]);"exponent"in c||(c.exponent=[!0,!1]);"eSigned"in c||(c.eSigned=[!0,!1]);var a=l._integerRegexp(c),b=n.buildGroupRE(c.fractional,function(b){var a="";b&&0!==c.places&&(a="\\"+c.decimal,a=Infinity==c.places?"(?:"+a+"\\d+)?":a+("\\d{"+c.places+"}"));return a},!0),g=n.buildGroupRE(c.exponent,function(b){return b?"([eE]"+l._integerRegexp({signed:c.eSigned})+")":""}),a=a+b;b&&(a="(?:(?:"+a+")|(?:"+b+"))");return a+
  279. g};l._integerRegexp=function(c){c=c||{};"signed"in c||(c.signed=[!0,!1]);"separator"in c?"groupSize"in c||(c.groupSize=3):c.separator="";var a=n.buildGroupRE(c.signed,function(b){return b?"[-+]":""},!0),b=n.buildGroupRE(c.separator,function(b){if(!b)return"(?:\\d+)";b=n.escapeString(b);" "==b?b="\\s":"\u00a0"==b&&(b="\\s\\xa0");var a=c.groupSize,g=c.groupSize2;return g?(b="(?:0|[1-9]\\d{0,"+(g-1)+"}(?:["+b+"]\\d{"+g+"})*["+b+"]\\d{"+a+"})",0<a-g?"(?:"+b+"|(?:0|[1-9]\\d{0,"+(a-1)+"}))":b):"(?:0|[1-9]\\d{0,"+
  280. (a-1)+"}(?:["+b+"]\\d{"+a+"})*)"},!0);return a+b};return l})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./has!host-browser?./_base/xhr ./json module".split(" "),function(a,f,p,e,n,l,h,c,m){p.add("dojo-preload-i18n-Api",1);h=a.i18n={};var b=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,g=function(d,k,b,c){var a=[b+c];k=k.split("-");for(var g="",q=0;q<k.length;q++)if(g+=(g?"-":"")+k[q],!d||d[g])a.push(b+g+"/"+c),a.specificity=g;return a},t={},
  281. u=function(d,k,b){b=b?b.toLowerCase():a.locale;d=d.replace(/\./g,"/");k=k.replace(/\./g,"/");return/root/i.test(b)?d+"/nls/"+k:d+"/nls/"+b+"/"+k},v=a.getL10nName=function(d,k,b){return d=m.id+"!"+u(d,k,b)},x=function(d,k,b,c,a,q){d([k],function(e){var m=l.clone(e.root||e.ROOT),y=g(!e._v1x&&e,a,b,c);d(y,function(){for(var d=1;d<y.length;d++)m=l.mixin(l.clone(m),arguments[d]);t[k+"/"+a]=m;m.$locale=y.specificity;q()})})},r=function(d){var k=n.extraLocale||[],k=l.isArray(k)?k:[k];k.push(d);return k},
  282. w=function(g,q,m){var h=b.exec(g),n=h[1]+"/",f=h[5]||h[4],u=n+f,w=(h=h[5]&&h[4])||a.locale||"",v=u+"/"+w,h=h?[w]:r(w),A=h.length,B=function(){--A||m(l.delegate(t[v]))},w=g.split("*"),C="preload"==w[1];if(p("dojo-preload-i18n-Api")){if(C&&(t[g]||(t[g]=1,y(w[2],c.parse(w[3]),1,q)),m(1)),(w=C)||(d&&k.push([g,q,m]),w=d&&!t[v]),w)return}else if(C){m(1);return}e.forEach(h,function(d){var k=u+"/"+d;p("dojo-preload-i18n-Api")&&z(k);t[k]?B():x(q,u,n,f,d,B)})};p("dojo-preload-i18n-Api");var q=h.normalizeLocale=
  283. function(d){d=d?d.toLowerCase():a.locale;return"root"==d?"ROOT":d},d=0,k=[],y=h._preloadLocalizations=function(b,c,g,m){function y(d,k){m([d],k)}function h(d,k){for(d=d.split("-");d.length;){if(k(d.join("-")))return;d.pop()}k("ROOT")}function n(){for(--d;!d&&k.length;)w.apply(null,k.shift())}function z(k){k=q(k);h(k,function(a){if(0<=e.indexOf(c,a)){var g=b.replace(/\./g,"/")+"_"+a;d++;y(g,function(b){for(var c in b){var g=b[c],q=c.match(/(.+)\/([^\/]+)$/),e;if(q&&(e=q[2],q=q[1]+"/",g._localized)){var y;
  284. if("ROOT"===a){var z=y=g._localized;delete g._localized;z.root=g;t[f.toAbsMid(c)]=z}else y=g._localized,t[f.toAbsMid(q+e+"/"+a)]=g;a!==k&&function(b,c,a,g){var q=[],e=[];h(k,function(d){g[d]&&(q.push(f.toAbsMid(b+d+"/"+c)),e.push(f.toAbsMid(b+c+"/"+d)))});q.length?(d++,m(q,function(){for(var d=q.length-1;0<=d;d--)a=l.mixin(l.clone(a),arguments[d]),t[e[d]]=a;t[f.toAbsMid(b+c+"/"+k)]=l.clone(a);n()})):t[f.toAbsMid(b+c+"/"+k)]=a}(q,e,g,y)}}n()});return!0}return!1})}m=m||f;z();e.forEach(a.config.extraLocale,
  285. z)},z=function(){},z=function(d){for(var k,b=d.split("/"),c=a.global[b[0]],g=1;c&&g<b.length-1;c=c[b[g++]]);c&&((k=c[b[g]])||(k=c[b[g].replace(/-/g,"_")]),k&&(t[d]=k));return k};h.getLocalization=function(d,k,b){var c;d=u(d,k,b);w(d,f,function(d){c=d});return c};return l.mixin(h,{dynamic:!0,normalize:function(d,k){return/^\./.test(d)?k(d):d},load:w,cache:t,getL10nName:v})})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(a,f){var p=/[&<>'"\/]/g,e={"\x26":"\x26amp;","\x3c":"\x26lt;",
  286. "\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},n={};f.setObject("dojo.string",n);n.escape=function(a){return a?a.replace(p,function(a){return e[a]}):""};n.rep=function(a,e){if(0>=e||!a)return"";for(var c=[];;){e&1&&c.push(a);if(!(e>>=1))break;a+=a}return c.join("")};n.pad=function(a,e,c,m){c||(c="0");a=String(a);e=n.rep(c,Math.ceil((e-a.length)/c.length));return m?a+e:e+a};n.substitute=function(e,h,c,m){m=m||a.global;c=c?f.hitch(m,c):function(b){return b};return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,
  287. function(b,a,e){if(""==a)return"$";b=f.getObject(a,!1,h);e&&(b=f.getObject(e,!1,m).call(m,b,a));e=c(b,a);if("undefined"===typeof e)throw Error('string.substitute could not find key "'+a+'" in template');return e.toString()})};n.trim=String.prototype.trim?f.trim:function(a){a=a.replace(/^\s+/,"");for(var e=a.length-1;0<=e;e--)if(/\S/.test(a.charAt(e))){a=a.substring(0,e+1);break}return a};return n})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(a,f){var p={};f.setObject("dojo.regexp",
  288. p);p.escapeString=function(a,n){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(a){return n&&-1!=n.indexOf(a)?a:"\\"+a})};p.buildGroupRE=function(a,n,l){if(!(a instanceof Array))return n(a);for(var e=[],c=0;c<a.length;c++)e.push(n(a[c]));return p.group(e.join("|"),l)};p.group=function(a,n){return"("+(n?"?:":"")+a+")"};return p})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),
  289. function(a,f,p,e,n,l,h,c,m){function b(b,c,d,k){return k.replace(/([a-z])\1*/ig,function(a){var g,q,m=a.charAt(0);a=a.length;var y=["abbr","wide","narrow"];switch(m){case "G":g=c[4>a?"eraAbbr":"eraNames"][0>b.getFullYear()?0:1];break;case "y":g=b.getFullYear();switch(a){case 1:break;case 2:if(!d.fullYear){g=String(g);g=g.substr(g.length-2);break}default:q=!0}break;case "Q":case "q":g=Math.ceil((b.getMonth()+1)/3);q=!0;break;case "M":case "L":g=b.getMonth();3>a?(g+=1,q=!0):(m=["months","L"==m?"standAlone":
  290. "format",y[a-3]].join("-"),g=c[m][g]);break;case "w":g=u._getWeekOfYear(b,0);q=!0;break;case "d":g=b.getDate();q=!0;break;case "D":g=u._getDayOfYear(b);q=!0;break;case "e":case "c":if(g=b.getDay(),2>a){g=(g-e.getFirstDayOfWeek(d.locale)+8)%7;break}case "E":g=b.getDay();3>a?(g+=1,q=!0):(m=["days","c"==m?"standAlone":"format",y[a-3]].join("-"),g=c[m][g]);break;case "a":m=12>b.getHours()?"am":"pm";g=d[m]||c["dayPeriods-format-wide-"+m];break;case "h":case "H":case "K":case "k":q=b.getHours();switch(m){case "h":g=
  291. q%12||12;break;case "H":g=q;break;case "K":g=q%12;break;case "k":g=q||24}q=!0;break;case "m":g=b.getMinutes();q=!0;break;case "s":g=b.getSeconds();q=!0;break;case "S":g=Math.round(b.getMilliseconds()*Math.pow(10,a-3));q=!0;break;case "v":case "z":if(g=u._getZone(b,!0,d))break;a=4;case "Z":m=u._getZone(b,!1,d);m=[0>=m?"+":"-",h.pad(Math.floor(Math.abs(m)/60),2),h.pad(Math.abs(m)%60,2)];4==a&&(m.splice(0,0,"GMT"),m.splice(3,0,":"));g=m.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+
  292. k);}q&&(g=h.pad(g,a));return g})}function g(b,c,d,k){var a=function(d){return d};c=c||a;d=d||a;k=k||a;var g=b.match(/(''|[^'])+/g),q="'"==b.charAt(0);f.forEach(g,function(k,b){k?(g[b]=(q?d:c)(k.replace(/''/g,"'")),q=!q):g[b]=""});return k(g.join(""))}function t(b,c,d,k){k=l.escapeString(k);d.strict||(k=k.replace(" a"," ?a"));return k.replace(/([a-z])\1*/ig,function(k){var a;a=k.charAt(0);var g=k.length,q="",e="";d.strict?(1<g&&(q="0{"+(g-1)+"}"),2<g&&(e="0{"+(g-2)+"}")):(q="0?",e="0{0,2}");switch(a){case "y":a=
  293. "\\d{2,4}";break;case "M":case "L":2<g?(a=c["months-"+("L"==a?"standAlone":"format")+"-"+v[g-3]].slice(0).join("|"),d.strict||(a=a.replace(/\./g,""),a="(?:"+a+")\\.?")):a="1[0-2]|"+q+"[1-9]";break;case "D":a="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+q+"[1-9][0-9]|"+e+"[1-9]";break;case "d":a="3[01]|[12]\\d|"+q+"[1-9]";break;case "w":a="[1-4][0-9]|5[0-3]|"+q+"[1-9]";break;case "E":case "e":case "c":a=".+?";break;case "h":a="1[0-2]|"+q+"[1-9]";break;case "k":a="1[01]|"+q+"\\d";break;case "H":a="1\\d|2[0-3]|"+
  294. q+"\\d";break;case "K":a="1\\d|2[0-4]|"+q+"[1-9]";break;case "m":case "s":a="[0-5]\\d";break;case "S":a="\\d{"+g+"}";break;case "a":g=d.am||c["dayPeriods-format-wide-am"];q=d.pm||c["dayPeriods-format-wide-pm"];a=g+"|"+q;d.strict||(g!=g.toLowerCase()&&(a+="|"+g.toLowerCase()),q!=q.toLowerCase()&&(a+="|"+q.toLowerCase()),-1!=a.indexOf(".")&&(a+="|"+a.replace(/\./g,"")));a=a.replace(/\./g,"\\.");break;default:a=".*"}b&&b.push(k);return"("+a+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var u={};a.setObject(m.id.replace(/\//g,
  295. "."),u);u._getZone=function(b,c,d){return c?p.getTimezoneName(b):b.getTimezoneOffset()};u.format=function(c,q){q=q||{};var d=n.normalizeLocale(q.locale),k=q.formatLength||"short",d=u._getGregorianBundle(d),e=[];c=a.hitch(this,b,c,d,q);if("year"==q.selector)return g(d["dateFormatItem-yyyy"]||"yyyy",c);var m;"date"!=q.selector&&(m=q.timePattern||d["timeFormat-"+k])&&e.push(g(m,c));"time"!=q.selector&&(m=q.datePattern||d["dateFormat-"+k])&&e.push(g(m,c));return 1==e.length?e[0]:d["dateTimeFormat-"+k].replace(/\'/g,
  296. "").replace(/\{(\d+)\}/g,function(d,k){return e[k]})};u.regexp=function(b){return u._parseInfo(b).regexp};u._parseInfo=function(b){b=b||{};var c=n.normalizeLocale(b.locale),c=u._getGregorianBundle(c),d=b.formatLength||"short",k=b.datePattern||c["dateFormat-"+d],e=b.timePattern||c["timeFormat-"+d],d="date"==b.selector?k:"time"==b.selector?e:c["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(d,b){return[e,k][b]}),m=[];return{regexp:g(d,a.hitch(this,t,m,c,b)),tokens:m,bundle:c}};u.parse=function(b,
  297. c){var d=/[\u200E\u200F\u202A\u202E]/g,k=u._parseInfo(c),a=k.tokens,g=k.bundle;b=(new RegExp("^"+k.regexp.replace(d,"")+"$",k.strict?"":"i")).exec(b&&b.replace(d,""));if(!b)return null;var q=["abbr","wide","narrow"],e=[1970,0,1,0,0,0,0],m="";b=f.every(b,function(d,b){if(!b)return!0;var k=a[b-1];b=k.length;k=k.charAt(0);switch(k){case "y":if(2!=b&&c.strict)e[0]=d;else if(100>d)d=Number(d),k=""+(new Date).getFullYear(),b=100*k.substring(0,2),k=Math.min(Number(k.substring(2,4))+20,99),e[0]=d<k?b+d:b-
  298. 100+d;else{if(c.strict)return!1;e[0]=d}break;case "M":case "L":if(2<b){if(b=g["months-"+("L"==k?"standAlone":"format")+"-"+q[b-3]].concat(),c.strict||(d=d.replace(".","").toLowerCase(),b=f.map(b,function(d){return d.replace(".","").toLowerCase()})),d=f.indexOf(b,d),-1==d)return!1}else d--;e[1]=d;break;case "E":case "e":case "c":b=g["days-"+("c"==k?"standAlone":"format")+"-"+q[b-3]].concat();c.strict||(d=d.toLowerCase(),b=f.map(b,function(d){return d.toLowerCase()}));d=f.indexOf(b,d);if(-1==d)return!1;
  299. break;case "D":e[1]=0;case "d":e[2]=d;break;case "a":b=c.am||g["dayPeriods-format-wide-am"];k=c.pm||g["dayPeriods-format-wide-pm"];if(!c.strict){var y=/\./g;d=d.replace(y,"").toLowerCase();b=b.replace(y,"").toLowerCase();k=k.replace(y,"").toLowerCase()}if(c.strict&&d!=b&&d!=k)return!1;m=d==k?"p":d==b?"a":"";break;case "K":24==d&&(d=0);case "h":case "H":case "k":if(23<d)return!1;e[3]=d;break;case "m":e[4]=d;break;case "s":e[5]=d;break;case "S":e[6]=d}return!0});d=+e[3];"p"===m&&12>d?e[3]=d+12:"a"===
  300. m&&12==d&&(e[3]=0);d=new Date(e[0],e[1],e[2],e[3],e[4],e[5],e[6]);c.strict&&d.setFullYear(e[0]);var h=a.join(""),k=-1!=h.indexOf("d"),h=-1!=h.indexOf("M");if(!b||h&&d.getMonth()>e[1]||k&&d.getDate()>e[2])return null;if(h&&d.getMonth()<e[1]||k&&d.getDate()<e[2])d=p.add(d,"hour",1);return d};var v=["abbr","wide","narrow"],x=[],r={};u.addCustomFormats=function(b,c){x.push({pkg:b,name:c});r={}};u._getGregorianBundle=function(b){if(r[b])return r[b];var c={};f.forEach(x,function(d){d=n.getLocalization(d.pkg,
  301. d.name,b);c=a.mixin(c,d)},this);return r[b]=c};u.addCustomFormats(m.id.replace(/\/date\/locale$/,".cldr"),"gregorian");u.getNames=function(b,c,d,k){var a;k=u._getGregorianBundle(k);b=[b,d,c];"standAlone"==d&&(d=b.join("-"),a=k[d],1==a[0]&&(a=void 0));b[1]="format";return(a||k[b.join("-")]).concat()};u.isWeekend=function(b,c){c=e.getWeekend(c);b=(b||new Date).getDay();c.end<c.start&&(c.end+=7,b<c.start&&(b+=7));return b>=c.start&&b<=c.end};u._getDayOfYear=function(b){return p.difference(new Date(b.getFullYear(),
  302. 0,1,b.getHours()),b)+1};u._getWeekOfYear=function(b,c){1==arguments.length&&(c=0);var d=(new Date(b.getFullYear(),0,1)).getDay(),k=(d-c+7)%7,k=Math.floor((u._getDayOfYear(b)+k-1)/7);d==c&&k++;return k};return u})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(a,f){var p={};a.setObject("dojo.cldr.supplemental",p);p.getFirstDayOfWeek=function(a){a={bd:5,mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,
  303. br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[p._region(a)];return void 0===a?1:a};p._region=function(a){a=f.normalizeLocale(a);a=a.split("-");var e=a[1];e?4==e.length&&(e=a[2]):e={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",
  304. bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",
  305. kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",
  306. sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",
  307. bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",
  308. hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",
  309. mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",
  310. ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[a[0]];return e};p.getWeekend=
  311. function(a){var e=p._region(a);a={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[e];e={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[e];void 0===a&&(a=6);void 0===e&&(e=0);return{start:a,end:e}};return p})},"esri/core/accessorSupport/set":function(){define(["require","exports","dojo/has","../Logger","./get"],function(a,f,p,e,n){function l(a,c,e){if(a&&c)if("object"===typeof c){e=0;for(var b=Object.getOwnPropertyNames(c);e<
  312. b.length;e++){var g=b[e];l(a,g,c[g])}}else"_"!==c[0]&&(-1!==c.indexOf(".")?(c=c.split("."),g=c.splice(c.length-1,1)[0],l(n.default(a,c),g,e)):a[c]=e)}Object.defineProperty(f,"__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.set");f.set=l;f.default=l})},"esri/core/accessorSupport/wire":function(){define(["require","exports","./utils"],function(a,f,p){function e(b,a,e){a=p.splitPath(a);if(Array.isArray(a)){for(var g=[],h=0;h<a.length;h++)g.push((new n(a[h],e)).install(b));return new c(g)}b=
  313. (new n(a,e)).install(b);return new m(b)}Object.defineProperty(f,"__esModule",{value:!0});var n=function(){function b(b,c){this.path=b;this.callback=c;this.chain=null;this.path=b;-1<b.indexOf(".")&&(this.chain=p.pathToArray(b));this.callback=c;return this}b.prototype.install=function(b){b=this.chain?new h(this,b):new l(this,b);return b};b.prototype.notify=function(b){this.callback(b,this.path)};return b}(),l=function(){function b(b,c){this.binding=b;this.target=c;p.getProperties(c).addCursor(this.binding.path,
  314. this)}b.prototype.destroy=function(){this.target&&(p.getProperties(this.target).removeCursor(this.binding.path,this),this.target=this.binding=null)};b.prototype.propertyDestroyed=function(b,c){p.getProperties(this.target).removeCursor(c,this)};b.prototype.propertyInvalidated=function(b,c){this.binding&&this.binding.notify(this.target)};b.prototype.propertyCommitted=function(b,c){this.binding&&this.binding.notify(this.target)};return b}(),h=function(){function b(b,c){this.binding=b;this.target=c;this.stack=
  315. [];this.properties=p.getProperties(c);this.stack.push({properties:this.properties,propertyName:b.chain[0]});this.properties.addCursor(b.chain[0],this);this.moveForward();return this}b.prototype.destroy=function(){for(;;){var b=this.stack.pop();if(null==b)break;b.properties.removeCursor(b.propertyName,this)}this.target=this.binding=null};b.prototype.propertyDestroyed=function(b,c){this.moveBackward(b,c)};b.prototype.propertyInvalidated=function(b,c){this.binding&&this.binding.notify(this.target)};
  316. b.prototype.propertyCommitted=function(b,c){this.binding&&(this.moveBackward(b,c),this.moveForward(),this.binding.notify(this.target))};b.prototype.moveBackward=function(b,c){for(var a=this.stack,g=a[a.length-1];g.properties!==b&&g.propertyName!==c;)g.properties.removeCursor(g.propertyName,this),a.pop(),g=a[a.length-1]};b.prototype.moveForward=function(){var b=this.stack,c=b[b.length-1],c=c.properties.internalGet(c.propertyName);(c=p.getProperties(c))&&b.length<this.binding.chain.length&&(b=this.binding.chain[b.length],
  317. this.stack.push({properties:c,propertyName:b}),c.addCursor(b,this),this.moveForward())};return b}(),c=function(){function b(b){this.cursors=b}b.prototype.remove=function(){for(var b=this.cursors;0<b.length;)b.pop().destroy();this.cursors=null};return b}(),m=function(){function b(b){this.cursor=b}b.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return b}();f.create=function(b,a){b=p.splitPath(b);if(Array.isArray(b)){for(var g=[],e=0;e<b.length;e++)g.push(new n(b[e],a));return function(b){for(var a=
  318. [],e=0;e<g.length;e++)a[e]=g[e].install(b);return new c(a)}}var h=new n(b,a);return function(b){return new m(h.install(b))}};f.wire=e;f.default=e})},"esri/core/accessorSupport/extensions/computedProperty":function(){define("require exports dojo/has ../../Logger ../utils ../wire".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.extensions.computedProperty");f.ComputedPropertyExtension={processClassPropertyMetadata:function(a,c,
  319. e,b){c.dependsOn&&(e=void 0,e=c.dependsOn.slice())&&(c.wire=l.create(e,function(b){return n.getProperties(b).propertyInvalidated(a)}))},instanceCreated:function(a,c,e){for(var b=0;b<e.length;b++){var g=c[e[b]];g.wire&&g.wire(a)}}};f.default=f.ComputedPropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/shorthands ./serializableProperty/writer".split(" "),
  320. function(a,f,p,e,n,l){function h(c,a,b){var g=c&&c.json;c&&c.json&&c.json.origins&&b&&(c=c.json.origins[b.origin])&&a in c&&(g=c);return g}Object.defineProperty(f,"__esModule",{value:!0});f.originSpecificReadPropertyDefinition=function(c,a){return h(c,"read",a)};f.originSpecificWritePropertyDefinition=function(c,a){return h(c,"write",a)};f.SerializablePropertyExtension={processPrototypePropertyMetadata:function(c,a,b,g){if(n.process(a)){p.process(a);b=a.type;for(g=0;Array.isArray(b);)b=b[0],g++;if(a.json.origins)for(var m in a.json.origins){var h=
  321. a.json.origins[m];e.create(b,g,c,h);l.create(b,g,c,h)}e.create(b,g,c,a.json);l.create(b,g,c,a.json)}}};f.default=f.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.process=function(a){if(a.json&&a.json.origins){var e=a.json.origins,n={"web-document":["web-scene","web-map"]};a=function(a){if(e[a]){var c=e[a];n[a].forEach(function(a){e[a]=
  322. c});delete e[a]}};for(var l in n)a(l)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports","dojo/_base/lang","./type"],function(a,f,p,e){function n(a,g,e,h){if(1<g)return c(a,g);if(1===g)return m(a);if(b(a)){var t=m(a.prototype.itemType.Type);return function(b,c,d){return(b=t(b,c,d))?new a(b):b}}return l(a)}function l(b){return b.prototype.read?function(c,a,g){return null==c?c:(new b).read(c,g)}:b.fromJSON}function h(b,c,a,g){return 0!==g&&
  323. Array.isArray(c)?c.map(function(c){return h(b,c,a,g-1)}):b(c,null,a)}function c(b,c){b=l(b);var a=h.bind(null,b);return function(b,g,e){if(null==b)return b;b=a(b,e,c);g=c;for(e=b;0<g&&Array.isArray(e);)g--,e=e[0];if(void 0!==e)for(e=0;e<g;e++)b=[b];return b}}function m(b){var c=l(b);return function(b,a,g){return null==b?b:Array.isArray(b)?b.map(function(b){return c(b,null,g)}):[c(b,null,g)]}}function b(b){return e.isCollection(b)?(b=b.prototype.itemType)&&b.Type&&"function"===typeof b.Type?g(b.Type):
  324. !1:!1}function g(c){return!!c&&(!!c.prototype.read||!!c.fromJSON||b(c))}Object.defineProperty(f,"__esModule",{value:!0});f.create=function(b,c,a,e){(!e.read||!e.read.reader&&!1!==e.read.enabled)&&g(b)&&p.setObject("read.reader",n(b,c,a,e),e)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.isCollection=function(a){return!!a&&!!a.prototype.declaredClass&&0===a.prototype.declaredClass.indexOf("esri.core.Collection")}})},
  325. "esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require","exports"],function(a,f){function p(a){"boolean"===typeof a.read?a.read={enabled:a.read}:"function"===typeof a.read?a.read={enabled:!0,reader:a.read}:a.read&&"object"===typeof a.read&&void 0===a.read.enabled&&(a.read.enabled=!0)}function e(a){"boolean"===typeof a.write?a.write={enabled:a.write}:"function"===typeof a.write?a.write={enabled:!0,writer:a.write}:a.write&&"object"===typeof a.write&&void 0===
  326. a.write.enabled&&(a.write.enabled=!0)}Object.defineProperty(f,"__esModule",{value:!0});f.process=function(a){a.json||(a.json={});p(a.json);e(a.json);if(a.json.origins)for(var l in a.json.origins)p(a.json.origins[l]),e(a.json.origins[l]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require","exports","dojo/_base/lang","./type"],function(a,f,p,e){function n(b,c,a,e){p.setObject(a,l(b,e),c)}function l(b,c){return b&&"function"===typeof b.write?b.write({},
  327. c):b&&"function"===typeof b.toJSON?b.toJSON():"number"===typeof b?-Infinity===b?-Number.MAX_VALUE:Infinity===b?Number.MAX_VALUE:isNaN(b)?null:b:b}function h(b,c,a,e){null===b?b=null:b&&"function"===typeof b.map?(b=b.map(function(b){return l(b,e)}),"function"===typeof b.toArray&&(b=b.toArray())):b=[l(b,e)];p.setObject(a,b,c)}function c(b,a,e){return 0!==e&&Array.isArray(b)?b.map(function(b){return c(b,a,e-1)}):l(b,a)}function m(b){return function(a,e,m,h){if(null===a)a=null;else{a=c(a,h,b);h=b;for(var g=
  328. a;0<h&&Array.isArray(g);)h--,g=g[0];if(void 0!==g)for(g=0;g<h;g++)a=[a]}p.setObject(m,a,e)}}Object.defineProperty(f,"__esModule",{value:!0});f.create=function(b,c,a,l){l.write&&!l.write.writer&&!1!==l.write.enabled&&(1===c||e.isCollection(b)?l.write.writer=h:l.write.writer=1<c?m(c):n)}})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require","exports"],function(a,f){function p(a){switch(a){case "defaults":return n.DEFAULTS;case "service":return n.SERVICE;case "portal-item":return n.PORTAL_ITEM;
  329. case "web-scene":return n.WEB_SCENE;case "web-map":return n.WEB_MAP;case "user":return n.USER}}function e(a){switch(a){case n.DEFAULTS:return"defaults";case n.SERVICE:return"service";case n.PORTAL_ITEM:return"portal-item";case n.WEB_SCENE:return"web-scene";case n.WEB_MAP:return"web-map";case n.USER:return"user"}}Object.defineProperty(f,"__esModule",{value:!0});var n;(function(a){a[a.DEFAULTS=0]="DEFAULTS";a[a.COMPUTED=1]="COMPUTED";a[a.SERVICE=2]="SERVICE";a[a.PORTAL_ITEM=3]="PORTAL_ITEM";a[a.WEB_SCENE=
  330. 4]="WEB_SCENE";a[a.WEB_MAP=5]="WEB_MAP";a[a.USER=6]="USER";a[a.NUM=7]="NUM"})(n=f.OriginId||(f.OriginId={}));f.nameToId=p;f.idToName=e;f.readableNameToId=function(a){return p(a)};f.idToReadableName=function(a){return e(a)};f.writableNameToId=function(a){return p(a)};f.idToWritableName=function(a){return e(a)}})},"esri/core/accessorSupport/Store":function(){define(["require","exports","./PropertyOrigin"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});a=function(){function a(){this._values=
  331. {}}a.prototype.get=function(a){return this._values[a]};a.prototype.originOf=function(a){return p.OriginId.USER};a.prototype.keys=function(){return Object.keys(this._values)};a.prototype.set=function(a,e){this._values[a]=e};a.prototype.clear=function(a){delete this._values[a]};a.prototype.has=function(a){return a in this._values};return a}();f.default=a})},"esri/core/accessorSupport/introspection":function(){define("require exports dojo/_base/lang ./ensureType ./extensions ./metadata ./utils ./decorators/cast".split(" "),
  332. function(a,f,p,e,n,l,h,c){Object.defineProperty(f,"__esModule",{value:!0});var m=Object.prototype.hasOwnProperty,b=/^_([a-zA-Z0-9]+)(Getter|Setter|Reader|Writer|Caster)$/,g={Getter:"get",Setter:"set",Reader:"json.read.reader",Writer:"json.write.writer",Caster:"cast"},t=/^_(set|get)([a-zA-Z0-9]+)Attr$/;f.processPrototype=function(c){for(var a=c.declaredClass,f=c.properties||{},u=0,w=Object.getOwnPropertyNames(f);u<w.length;u++){var q=w[u],d=f[q],k=typeof d;null==d?l.setPropertyMetadata(c,q,{value:d}):
  333. Array.isArray(d)?l.setPropertyMetadata(c,q,{type:[d[0]],value:null}):"object"===k?h.getProperties(d)||d instanceof Date?l.setPropertyMetadata(c,q,{type:d.constructor,value:d}):l.setPropertyMetadata(c,q,d):"boolean"===k?l.setPropertyMetadata(c,q,{type:Boolean,value:d}):"string"===k?l.setPropertyMetadata(c,q,{type:String,value:d}):"number"===k?l.setPropertyMetadata(c,q,{type:Number,value:d}):"function"===k&&l.setPropertyMetadata(c,q,{type:d,value:null})}u=0;for(w=Object.getOwnPropertyNames(c);u<w.length;u++){var k=
  334. w[u],d=c[k],f=q=void 0,y=b.exec(k);if(y)q=y[1],f=g[y[2]];else if(y=t.exec(k))q=y[2][0].toLowerCase()+y[2].substr(1),f=y[1].toLowerCase();q&&f&&(q=l.getPropertyMetadata(c,q),p.setObject(f,d,q))}u=0;for(w=Object.getOwnPropertyNames(l.getPropertiesMetadata(c));u<w.length;u++)if(q=w[u],d=l.getPropertyMetadata(c,q),f=d.type,k=d.types,void 0===d.value&&m.call(c,q)&&(d.value=c[q]),!d.cast&&f){q=d;d=0;for(k=f;Array.isArray(k);)k=k[0],d++;f=1===d?e.ensureArray(k):1<d?e.ensureNArray(k,d):e.ensureType(f);q.cast=
  335. f}else!d.cast&&k&&(Array.isArray(k)?d.cast=e.ensureArrayTyped(e.ensureOneOfType(k[0])):d.cast=e.ensureOneOfType(k));n.processPrototypeMetadatas(l.getPropertiesMetadata(c),a);return l.getPropertiesMetadata(c)};f.processClass=function(b){for(var a=b.prototype,g=a.declaredClass,e=b._meta.bases,m={},q=e.length-1;0<=q;q--)h.merge(m,l.getMetadata(e[q].prototype));var d=m.properties;n.processClassMetadatas(d,g);Object.defineProperty(b,"__accessorMetadata__",{value:{properties:d,autoDestroy:!!m.autoDestroy}});
  336. for(var k={},g=function(b){var c=d[b];k[b]={enumerable:!0,configurable:!0,get:function(){return this.__accessor__?this.__accessor__.get(b):c.value},set:function(d){var k=this.__accessor__;if(!k)Object.defineProperty(this,b,{enumerable:!0,configurable:!0,writable:!0,value:d});else if(!Object.isFrozen(this)){if(k.initialized&&c.readOnly)throw new TypeError("[accessor] cannot assign to read-only property '"+b+"' of "+this.declaredClass);if(2===k.lifecycle&&c.constructOnly)throw new TypeError("[accessor] cannot assign to construct-only property '"+
  337. b+"' of "+this.declaredClass);k.set(b,d)}}}},e=0,q=Object.getOwnPropertyNames(d);e<q.length;e++)g(q[e]);Object.defineProperties(b.prototype,k);if(m.parameters)for(b=0,g=Object.getOwnPropertyNames(m.parameters);b<g.length;b++)e=g[b],q=Object.getOwnPropertyDescriptor(a,e)||{value:a[e]},(q=c.autocastMethod(a,e,q))&&Object.defineProperty(a,e,q);return m}})},"esri/core/accessorSupport/ensureType":function(){define(["require","exports","../Logger"],function(a,f,p){function e(d,b){return b.isInstanceOf?
  338. b.isInstanceOf(d):b instanceof d}function n(d){return null==d?d:new Date(d)}function l(d){return null==d?d:!!d}function h(d){return null==d?d:d.toString()}function c(d){return null==d?d:parseFloat(d)}function m(d){return null==d?d:Math.round(parseFloat(d))}function b(d){return d&&d.constructor&&void 0!==d.constructor._meta}function g(d,b){return null!=b&&d&&!e(d,b)}function t(k,c){g(k,c)&&(b(c)?d.error("Accessor#set","Assigning an instance of '"+(c.declaredClass||"unknown")+"' which is not a subclass of '"+
  339. (k&&k.prototype&&k.prototype.declaredClass||"unknown")+"'"):c=new k(c));return c}function u(d){switch(d){case Number:return c;case k:return m;case Boolean:return l;case String:return h;case Date:return n;default:return t.bind(null,d)}}function v(d,b){var k=u(d);return 1===arguments.length?k:k(b)}function x(d,b){return 1===arguments.length?x.bind(null,d):b?Array.isArray(b)?b.map(d):[d(b)]:b}function r(d,b,k){return 0!==b&&Array.isArray(k)?k.map(function(k){return r(d,b-1,k)}):d(k)}function w(d,b,k){if(2===
  340. arguments.length)return w.bind(null,d,b);if(!k)return k;k=r(d,b,k);for(var c=b,a=k;0<c&&Array.isArray(a);)c--,a=a[0];if(void 0!==a)for(a=0;a<c;a++)k=[k];return k}function q(k,c){if(2===arguments.length)return q(k).call(null,c);var a={},e=[],m=[],h;for(h in k.typeMap){var y=k.typeMap[h];a[h]=v(y);e.push(y&&y.prototype&&y.prototype.declaredClass||"unknown");m.push(h)}var t="string"===typeof k.key?function(d){return d[k.key]}:k.key;return function(c){if(k.base&&!g(k.base,c))return c;var q=t(c)||k.defaultKeyValue,
  341. h=a[q];if(!h)return d.error("Accessor#set","Invalid property value, value needs to be one of "+("'"+e.join("', '")+"'")+", or a plain object that can auto-cast (having .type \x3d "+("'"+m.join("', '")+"'")+")"),null;if(!g(k.typeMap[q],c))return c;if("string"!==typeof k.key||b(c))return h(c);var q={},y;for(y in c)y!==k.key&&(q[y]=c[y]);return h(q)}}Object.defineProperty(f,"__esModule",{value:!0});var d=p.getLogger("esri.core.Accessor");f.isInstanceOf=e;f.ensureDate=n;f.ensureBoolean=l;f.ensureString=
  342. h;f.ensureNumber=c;f.ensureInteger=m;f.isClassedType=b;f.requiresType=g;f.ensureClass=t;f.ensureType=v;f.ensureArrayTyped=x;f.ensureArray=function(d,b){return 1===arguments.length?x(v.bind(null,d)):x(v.bind(null,d),b)};f.ensureNArrayTyped=w;f.ensureNArray=function(d,b,k){return 2===arguments.length?w(v.bind(null,d),b):w(v.bind(null,d),b,k)};f.ensureOneOfType=q;var k=function(){return function(){}}();f.Integer=k;f.default=v})},"esri/core/accessorSupport/metadata":function(){define(["require","exports"],
  343. function(a,f){function p(c){return null!=c.__accessorMetadata__}function e(c){return p(c)&&null!=n(c).properties}function n(c){c.__accessorMetadata__||Object.defineProperty(c,"__accessorMetadata__",{value:{},enumerable:!0,configurable:!0,writable:!0});return c.__accessorMetadata__}function l(c){c=n(c);var a=c.properties;a||(a=c.properties={});return a}function h(c,a){var b=n(c);c=b.parameters;c||(c=b.parameters={});b=c[a];b||(b=[],c[a]=b);return b}Object.defineProperty(f,"__esModule",{value:!0});
  344. f.hasMetadata=p;f.hasPropertiesMetadata=e;f.hasPropertyMetadata=function(c,a){return e(c)&&null!=l(c)[a]};f.hasParametersMetadata=function(c,a){return p(c)&&null!=n(c).parameters&&null!=n(c).parameters[a]};f.getMetadata=n;f.getPropertiesMetadata=l;f.getPropertyMetadata=function(c,a){c=l(c);var b=c[a];b||(b=c[a]={});return b};f.setPropertyMetadata=function(c,a,b){l(c)[a]=b};f.getParametersMetadata=h;f.getParameterMetadata=function(c,a,b){var g=h(c,a)[b];g||(h(c,a)[b]=g={index:b});return g}})},"esri/core/accessorSupport/decorators/cast":function(){define(["require",
  345. "exports","../ensureType","../metadata"],function(a,f,p,e){function n(b){var c="_meta"in b?p.ensureType(b):b;return function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];b.push(c);return"number"===typeof b[2]?h.apply(this,b):l.apply(this,b)}}function l(b,c,a,m){e.getPropertyMetadata(b,c).cast=m}function h(b,c,a,m){e.getParameterMetadata(b,c,a).cast=m}function c(b){return function(c,a,m){e.getPropertyMetadata(c,b).cast=c[a]}}Object.defineProperty(f,"__esModule",{value:!0});var m=Object.prototype.toString;
  346. f.autocastMethod=function(b,c,a){if(e.hasParametersMetadata(b,c)){var g=e.getParametersMetadata(b,c).filter(function(b){return null!=b.cast});if(g.length){var m=a.value;a.value=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];for(c=0;c<g.length;c++){var a=g[c];b[a.index]=a.cast(b[a.index])}return m.apply(this,b)};return a}console.warn("Method "+b.declaredClass+"::"+c+" is decorated with @cast but no parameters are decorated")}};f.cast=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=
  347. arguments[a];if(3!==b.length||"string"!==typeof b[1]){if(1===b.length&&"[object Function]"===m.call(b[0]))return n(b[0]);if(1===b.length&&"string"===typeof b[0])return c(b[0])}}})},"esri/core/accessorSupport/watch":function(){define("require exports ../ArrayPool ../lang ../ObjectPool ../scheduling ./get ./utils ./wire".split(" "),function(a,f,p,e,n,l,h,c,m){function b(b){q.has(b)?d.splice(d.indexOf(b),1):q.add(b);d.push(b);k||(k=l.schedule(t))}function g(d){if(!d.removed){var b=d.callback,k=d.path,
  348. c=d.oldValue,a=d.target,g=h.valueOf(a,d.propertyPath,!0);e.equals(c,g)||(d.oldValue=g,b.call(a,g,c,k,a))}}function t(){if(k){k=null;var b=d;d=w.acquire();q.clear();for(var c=w.acquire(),a=0;a<b.length;a++){var e=b[a];g(e);e.removed&&c.push(e)}for(a=0;a<d.length;a++)e=d[a],e.removed&&(c.push(e),q.delete(e),d.splice(a,1),--a);for(a=0;a<c.length;a++)r.pool.release(c[a]);w.release(b);w.release(c);y.forEach(function(d){return d()})}}function u(d,k,a){var g=c.parse(d,k,a,function(d,k,a){var q=h.valueOf(d,
  349. k,!0),e,y=m.wire(d,k,function(d,k){d.__accessor__.destroyed?g.remove():(e||(e=r.pool.acquire(d,k,q,a),q=null),b(e))});return{remove:c.once(function(){y.remove();e&&(e.removed=!0,b(e),e=null);g=y=q=null})}});return g}function v(d,b,k){var a=c.parse(d,b,k,function(d,b,k){var c=h.valueOf(d,b,!0),g=!1;return m.wire(d,b,function(d,b){if(d.__accessor__.destroyed)a.remove();else if(!g){g=!0;var q=h.valueOf(d,b,!0);e.equals(c,q)||k.call(d,q,c,b,d);c=h.valueOf(d,b,!0);g=!1}})});return a}function x(d,b,k,c){void 0===
  350. c&&(c=!1);return!d.__accessor__||d.__accessor__.destroyed?{remove:function(){}}:c?v(d,b,k):u(d,b,k)}Object.defineProperty(f,"__esModule",{value:!0});var r=function(){function d(d,b,k,a){this.target=d;this.path=b;this.oldValue=k;this.callback=a;this.removed=!1;this.propertyPath=c.pathToStringOrArray(b)}d.prototype.release=function(){this.target=this.path=this.propertyPath=this.callback=this.oldValue=null;this.removed=!0};d.pool=new n(d,!0);return d}(),w=new p,q=new Set,d=w.acquire(),k;f.dispatchTarget=
  351. function(b){for(var k=w.copy(d),c=0;c<k.length;c++){var a=k[c];a.target===b&&(g(a),q.delete(a),d.splice(d.indexOf(a),1))}};f.removeTarget=function(b){for(var k=0;k<d.length;k++){var c=d[k];c.target===b&&(c.removed=!0)}};f.dispatch=t;var y=new Set;f.afterDispatch=function(d){y.add(d);return{remove:function(){y.delete(d)}}};f.watch=x;f.isValueInUse=function(b){return d.some(function(d){return d.oldValue===b})};f.default=x})},"esri/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],
  352. function(a,f,p){function e(a){a.length=0}var n=Array.prototype.splice;a=function(){function a(c,a){void 0===c&&(c=50);void 0===a&&(a=50);this._pool=new p(Array,!1,e,a,c)}a.prototype.acquire=function(){return this._pool.acquire()};a.prototype.copy=function(c){var a=this.acquire();c.unshift(0,0);n.apply(a,c);c.splice(0,2);return a};a.prototype.release=function(c){this._pool.release(c)};a.acquire=function(){return l.acquire()};a.copy=function(c){return l.copy(c)};a.release=function(c){return l.release(c)};
  353. return a}();var l=new a(100);return a})},"esri/core/ObjectPool":function(){define(["require","exports"],function(a,f){var p=function(){return function(){}}();return function(){function a(a,e,h,c,m){void 0===c&&(c=1);void 0===m&&(m=0);this.classConstructor=a;this.acquireFunctionOrWithConstructor=e;this.releaseFunction=h;this.growthSize=c;!0===e?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof e&&(this.acquireFunction=e);this._pool=Array(m);this._set=new Set;this._initialSize=
  354. m;for(a=0;a<m;a++)this._pool[a]=new this.classConstructor;this.growthSize=Math.max(c,1)}a.prototype.acquire=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];e=this.classConstructor||p;if(0===this._pool.length)for(var h=this.growthSize,c=0;c<h;c++)this._pool[c]=new e;e=this._pool.shift();this.acquireFunction?this.acquireFunction.apply(this,[e].concat(a)):e&&e.acquire&&"function"===typeof e.acquire&&e.acquire.apply(e,a);this._set.delete(e);return e};a.prototype.release=function(a){a&&
  355. !this._set.has(a)&&(this.releaseFunction?this.releaseFunction(a):a&&a.release&&"function"===typeof a.release&&a.release(),this._pool.push(a),this._set.add(a))};a.prototype.prune=function(){if(!(this._pool.length<=this._initialSize))for(var a;this._initialSize>this._pool.length;)a=this._pool.shift(),this._set.delete(a),a.dispose&&"function"===typeof a.dispose&&a.dispose()};a.prototype._constructorAcquireFunction=function(a){for(var e=[],h=1;h<arguments.length;h++)e[h-1]=arguments[h];(c=this.classConstructor).call.apply(c,
  356. [a].concat(e));var c};return a}()})},"esri/core/scheduling":function(){define(["require","exports","./nextTick","./now","./requestAnimationFrame"],function(a,f,p,e,n){function l(d){void 0===d&&(d=f.now());f.debug.rafId=null;0<w.length&&(f.debug.rafId=h());d=f.now();0>u&&(u=d);var b=d-u;u=d;for(var k=0;k<w.length;k++){var a=w[k];-1!==a.epoch&&(a.dt=b)}for(k=0;k<x.length;k++)for(var b=x[k],g=q[b],e=0;e<g.length;e++)a=g[e],a.paused||a.removed||(0===k&&a.ticks++,-1===a.epoch&&(a.epoch=d),v.time=d,v.deltaTime=
  357. a.dt,v.elapsedFrameTime=f.now()-d,v.spendInTask=d-a.epoch,a.phases[b].call(a,v));c()}function h(){return f.debug.requestNextFrame?f.debug.requestNextFrame(b):b()}function c(){for(var d=0;d<w.length;){var b=w[d];d++;if(b.removed){w.splice(d-1,1);for(var c=0;c<x.length;c++){var a=x[c];if(b.phases[a]){var a=q[a],g=a.indexOf(b);-1!==g&&a.splice(g,1)}}}}}function m(){for(;r.length;){var d=r.shift();d.isActive&&(d.isActive=!1,d.callback())}f.debug.willDispatch=!1}function b(){return n(l)}Object.defineProperty(f,
  358. "__esModule",{value:!0});f.now=e;var g=function(){return function(d){this.phases=d;this.paused=!1;this.pausedAt=0;this.epoch=-1;this.dt=0;this.ticks=-1;this.removed=!1}}(),t=function(){function d(d){this.callback=d;this.isActive=!0}d.prototype.remove=function(){this.isActive=!1};return d}(),u=-1,v={time:0,deltaTime:0,elapsedFrameTime:0,spendInTask:0},x=["prepare","preRender","render","postRender","update"],r=[],w=[],q={prepare:[],preRender:[],render:[],postRender:[],update:[]},d=function(){function d(d){this._task=
  359. d}d.prototype.remove=function(){this._task.removed=!0};d.prototype.pause=function(){this._task.paused||(this._task.paused=!0,this._task.pausedAt=f.now())};d.prototype.resume=function(){this._task.paused&&(this._task.paused=!1,-1!==this._task.epoch&&(this._task.epoch+=f.now()-this._task.pausedAt))};return d}();f.FrameTaskHandle=d;f.debug={frameTasks:w,rafId:null,requestNextFrame:null,willDispatch:!1,clearFrameTasks:function(d){void 0===d&&(d=!1);for(var b=0;b<w.length;b++)w[b].removed=!0;d&&c()},dispatch:m,
  360. frame:l};f.schedule=function(d){d=new t(d);r.push(d);f.debug.willDispatch||(f.debug.willDispatch=!0,p(m));return d};f.addFrameTask=function(b){var c=new g(b);w.push(c);for(var k=0,a=x;k<a.length;k++){var e=a[k];b[e]&&q[e].push(c)}f.debug.rafId||(u=-1,f.debug.rafId=h());return new d(c)};f.requestNextFrame=h})},"esri/core/nextTick":function(){define(["require","exports","./global"],function(a,f,p){function e(){if(p.postMessage&&!p.importScripts){var a=p.onmessage,e=!0;p.onmessage=function(){e=!1};p.postMessage("",
  361. "*");p.onmessage=a;return e}return!1}var n=p.MutationObserver||p.WebKitMutationObserver;return function(){var a;if(p.process&&p.process.nextTick)a=function(b){p.process.nextTick(b)};else if(p.Promise)a=function(b){p.Promise.resolve().then(b)};else if(n){var h=[],c=document.createElement("div");(new n(function(){for(;0<h.length;)h.shift()()})).observe(c,{attributes:!0});a=function(b){h.push(b);c.setAttribute("queueStatus","1")}}else if(e()){var m=[];p.addEventListener("message",function(b){if(b.source===
  362. p&&"esri-nexttick-message"===b.data)for(b.stopPropagation();m.length;)m.shift()()},!0);a=function(b){m.push(b);p.postMessage("esri-nexttick-message","*")}}else a=p.setImmediate?function(b){return p.setImmediate(b)}:function(b){return p.setTimeout(b,0)};return a}()})},"esri/core/now":function(){define(["require","exports","./global"],function(a,f,p){return function(){var a=p.performance||{};if(a.now)return function(){return a.now()};if(a.webkitNow)return function(){return a.webkitNow()};if(a.mozNow)return function(){return a.mozNow()};
  363. if(a.msNow)return function(){return a.msNow()};if(a.oNow)return function(){return a.oNow()};var f;f=a.timing&&a.timing.navigationStart?a.timing.navigationStart:Date.now();return function(){return Date.now()-f}}()})},"esri/core/requestAnimationFrame":function(){define(["require","exports","./global","./now"],function(a,f,p,e){var n=e();a=p.requestAnimationFrame;if(!a){f=["ms","moz","webkit","o"];for(var l=0;l<f.length&&!a;++l)a=p[f[l]+"RequestAnimationFrame"];a||(a=function(a){var c=e(),m=Math.max(0,
  364. 16-(c-n)),b=p.setTimeout(function(){a(e())},m);n=c+m;return b})}return a})},"esri/core/Evented":function(){define(["require","exports","dojo/aspect","dojo/on"],function(a,f,p,e){function n(a,e,c,m){var b;Array.isArray(e)?b=e:-1<e.indexOf(",")&&(b=e.split(/\s*,\s*/));if(b){var g=[];for(e=0;e<b.length;e++)g.push(n(a,b[e],c,m));g.remove=function(){for(var b=0;b<g.length;b++)g[b].remove()};return g}return m(a,e)}return function(){function a(){}a.prototype.emit=function(a,c){if(this.hasEventListener(a))return c=
  365. c||{},c.target||(c.target=this),e.emit(this,a,c)};a.prototype.on=function(a,c){return n(this,a,c,function(a,b){return p.after(a,"on"+b,c,!0)})};a.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return a}()})},"esri/core/accessorSupport/decorators":function(){define("require exports ./decorators/aliasOf ./decorators/autoDestroy ./decorators/cast ./decorators/declared ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer".split(" "),
  366. function(a,f,p,e,n,l,h,c,m,b,g){function t(b){for(var c in b)f.hasOwnProperty(c)||(f[c]=b[c])}Object.defineProperty(f,"__esModule",{value:!0});t(p);t(e);t(n);t(l);t(h);t(c);t(m);t(b);t(g)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","../metadata"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.aliasOf=function(a){return function(e,l){p.getPropertyMetadata(e,l).aliasOf=a}}})},"esri/core/accessorSupport/decorators/autoDestroy":function(){define(["require",
  367. "exports","../metadata"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.autoDestroy=function(){return function(a,f,l){p.getMetadata(a).autoDestroy=!0;return a[f]}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.declared=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];f=function(){return this||{}};f.__bases__=[a].concat(e);return f}})},"esri/core/accessorSupport/decorators/property":function(){define("require exports dojo/has ../../lang ../../Logger ../metadata".split(" "),
  368. function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});n.getLogger("esri.core.accessorSupport.decorators.property");f.property=function(a){void 0===a&&(a={});return function(c,m){var b=c.constructor.prototype;if(b!==Function.prototype){(c=Object.getOwnPropertyDescriptor(c,m))&&(c.get||c.set)?(a=e.clone(a),c.set&&(a.set=c.set),c.get&&(a.get=c.get)):c&&c.hasOwnProperty("value")&&(a=e.clone(a),a.value=c.value);m=l.getPropertyMetadata(b,m);for(var g in a)b=a[g],Array.isArray(b)?m[g]=(m[g]||
  369. []).concat(b):m[g]=b}}};f.propertyJSONMeta=function(a,c,e){a=l.getPropertyMetadata(a.constructor.prototype,e);a.json||(a.json={});a=a.json;void 0!==c&&(a.origins||(a.origins={}),a.origins[c]||(a.origins[c]={}),a=a.origins[c]);return a}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.reader=function(a,l,h){var c,m;void 0===l||Array.isArray(l)?(m=a,h=l,c=[void 0]):
  370. (m=l,c=Array.isArray(a)?a:[a]);return function(b,a,t){var g=b.constructor.prototype;c.forEach(function(c){c=e.propertyJSONMeta(b,c,m);c.read&&"object"!==typeof c.read&&(c.read={});p.setObject("read.reader",g[a],c);h&&(c.read.source=(c.read.source||[]).concat(h))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.shared=function(a){return function(e,f){e[f]=a}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require",
  371. "exports","../../declare","../metadata"],function(a,f,p,e){function n(b,a){b.read&&("function"===typeof b.read?a.push(b.read):"object"===typeof b.read&&b.read.reader&&a.push(b.read.reader))}function l(b,a){b.write&&("function"===typeof b.write?a.push(b.write):"object"===typeof b.write&&b.write.writer&&a.push(b.write.writer))}function h(b){var a=[];b=e.getPropertiesMetadata(b.prototype);if(!b)return a;for(var c in b){var g=b[c];g.cast&&a.push(g.cast);g.copy&&a.push(g.copy);if(g=g.json)if(n(g,a),l(g,
  372. a),g=g.origins)for(var m in g){var h=g[m];n(h,a);l(h,a)}}return a}function c(a){var c={values:{},descriptors:{}},g=["__bases__"],m=e.getPropertiesMetadata(a.prototype),l=h(a);Object.getOwnPropertyNames(a.prototype).filter(function(c){return-1!==g.indexOf(c)||m&&m.hasOwnProperty(c)||!b(Object.getOwnPropertyDescriptor(a.prototype,c))&&-1!==l.indexOf(a.prototype[c])?!1:!0}).forEach(function(g){var e=Object.getOwnPropertyDescriptor(a.prototype,g);b(e)?c.descriptors[g]=e:c.values[g]=a.prototype[g]});return c}
  373. function m(a){var c=Object.getOwnPropertyNames(a),g=Object.getPrototypeOf(a.prototype).constructor,e=Object.getOwnPropertyNames(Function);e.push("__bases__");var m=Object.getOwnPropertyNames(g),h={values:{},descriptors:{}};c.filter(function(b){return-1!==e.indexOf(b)?!1:-1===m.indexOf(b)||g[b]!==a[b]?!0:!1}).forEach(function(c){var g=Object.getOwnPropertyDescriptor(a,c);b(g)?h.descriptors[c]=g:h.values[c]=a[c]});return h}function b(b){return b&&!(!b.get&&!b.set)}Object.defineProperty(f,"__esModule",
  374. {value:!0});f.subclass=function(b){return function(a){var g=c(a),e=m(a);null!=b&&(g.values.declaredClass=b);a=p(a.__bases__,g.values);Object.defineProperties(a.prototype,g.descriptors);for(var h in e.values)a[h]=e.values[h];Object.defineProperties(a,e.descriptors);return a}}})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.writer=function(a,l,h){var c,m;void 0===
  375. l?(m=a,c=[void 0]):"string"!==typeof l?(m=a,c=[void 0],h=l):(m=l,c=Array.isArray(a)?a:[a]);return function(b,a,l){var g=b.constructor.prototype;c.forEach(function(c){c=e.propertyJSONMeta(b,c,m);c.write&&"object"!==typeof c.write&&(c.write={});h&&p.setObject("write.target",h,c);p.setObject("write.writer",g[a],c)})}}})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.referenceSetter=function(a,f,l){void 0===
  376. l&&(l=p);f||(f=new l);f.removeAll();a&&(Array.isArray(a)||a.isInstanceOf&&a.isInstanceOf(p))?f.addMany(a):f.add(a);return f};f.castForReferenceSetter=function(a){return a}})},"esri/core/JSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./declare ./accessorSupport/decorators ./accessorSupport/read ./accessorSupport/write".split(" "),function(a,f,p,e,n,l,h,c,m){function b(b,a){if(!b)return null;if(b.declaredClass)throw Error("JSON object is already hydrated");
  377. var c=new this;c.read(b,a);return c}var g=function(a){function g(){return null!==a&&a.apply(this,arguments)||this}p(g,a);g.prototype.read=function(b,a){c.default(this,b,a);return this};g.prototype.write=function(b,a){return m.default(this,b||{},a)};g.prototype.toJSON=function(b){return this.write(null,b)};g.fromJSON=function(a,c){return b.call(this,a,c)};return g=e([h.subclass("esri.core.JSONSupport")],g)}(h.declared(n));g.prototype.toJSON.isDefaultToJSON=!0;l.after(function(a){l.hasMixin(a,g)&&(a.fromJSON=
  378. b.bind(a))});return g})},"esri/core/accessorSupport/read":function(){define("require exports dojo/_base/lang ./get ./utils ./extensions/serializableProperty".split(" "),function(a,f,p,e,n,l){function h(a,b,g){void 0===g&&(g=c);for(var m=n.getProperties(a),h=m.metadatas,f={},x=0,r=Object.getOwnPropertyNames(b);x<r.length;x++){var w=f,q=h,d=r[x],k=b,y=g,z=l.originSpecificReadPropertyDefinition(q[d],y);z&&(!z.read||!1!==z.read.enabled&&!z.read.source)&&(w[d]=!0);for(var p=0,C=Object.getOwnPropertyNames(q);p<
  379. C.length;p++){var B=C[p],z=l.originSpecificReadPropertyDefinition(q[B],y),D;a:{D=d;var F=k;if(z&&z.read&&!1!==z.read.enabled&&z.read.source)if(z=z.read.source,"string"===typeof z){if(z===D||-1<z.indexOf(".")&&0===z.indexOf(D)&&e.exists(z,F)){D=!0;break a}}else for(var G=0;G<z.length;G++){var Y=z[G];if(Y===D||-1<Y.indexOf(".")&&0===Y.indexOf(D)&&e.exists(Y,F)){D=!0;break a}}D=!1}D&&(w[B]=!0)}}m.setDefaultOrigin(g.origin);r=0;for(w=Object.getOwnPropertyNames(f);r<w.length;r++)x=w[r],d=(q=l.originSpecificReadPropertyDefinition(h[x],
  380. g).read)&&q.source,k=void 0,k=d&&"string"===typeof d?e.valueOf(b,d):b[x],q&&q.reader&&(k=q.reader.call(a,k,b,g)),void 0!==k&&m.set(x,k);b=0;for(h=Object.getOwnPropertyNames(h);b<h.length;b++)x=h[b],f[x]||(r=a,w=m,q=g,d=(d=l.originSpecificReadPropertyDefinition(w.metadatas[x],q))&&d.read&&d.read.default,void 0!==d&&(r="function"===typeof d?d.call(r,x,q):d,void 0!==r&&w.set(x,r)));m.setDefaultOrigin("user")}Object.defineProperty(f,"__esModule",{value:!0});var c={origin:"service"};f.read=h;f.readLoadable=
  381. function(a,b,g,e){void 0===e&&(e=c);b=p.mixin({},e,{messages:[]});g(b);b.messages.forEach(function(b){"warning"!==b.type||a.loaded?e&&e.messages.push(b):a.loadWarnings.push(b)})};f.default=h})},"esri/core/accessorSupport/write":function(){define("require exports ../Error ../Logger ./PropertyOrigin ./utils ./extensions/serializableProperty".split(" "),function(a,f,p,e,n,l,h){function c(a,c,e,m,h,l){if(!m||!m.write)return!1;var g=a.get(e);if(void 0===g)return!1;if(!h&&m.write.overridePolicy){var q=
  382. m.write.overridePolicy.call(a,g,e,l);void 0!==q&&(h=q)}h||(h=m.write);if(!h||!1===h.enabled)return!1;if(null===g){if(h.allowNull)return!0;h.isRequired&&((a=new p("web-document-write:property-required","Missing value for required property '"+e+"' on '"+a.declaredClass+"'",{propertyName:e,target:a}),l)&&l.messages?l.messages.push(a):a&&!l&&b.error(a.name,a.message));return!1}return!h.ignoreOrigin&&l&&l.origin&&c.store.originOf(e)<n.nameToId(l.origin)?!1:!0}function m(b,a,e){if(b&&"function"===typeof b.toJSON&&
  383. (!b.toJSON.isDefaultToJSON||!b.write))return l.merge(a,b.toJSON());var g=l.getProperties(b),m=g.metadatas,f;for(f in m){var t=h.originSpecificWritePropertyDefinition(m[f],e);if(c(b,g,f,t,null,e)){var q=b.get(f),d={};t.write.writer.call(b,q,d,"string"===typeof t.write.target?t.write.target:f,e);t=d;0<Object.keys(t).length&&(a=l.merge(a,t),e&&e.writtenProperties&&e.writtenProperties.push({target:b,propName:f,oldOrigin:n.idToReadableName(g.store.originOf(f)),newOrigin:e.origin}))}}return a}Object.defineProperty(f,
  384. "__esModule",{value:!0});var b=e.getLogger("esri.core.accessorSupport.write");f.willPropertyWrite=function(b,a,e,m){var g=l.getProperties(b),f=h.originSpecificWritePropertyDefinition(g.metadatas[a],m);return f?c(b,g,a,f,e,m):!1};f.write=m;f.default=m})},"esri/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./lang","./Message"],function(a,f,p,e,n){a=function(a){function h(c,e,b){var g=a.call(this,c,e,b)||this;return g instanceof h?g:new h(c,e,b)}p(h,a);h.prototype.toJSON=
  385. function(){return{name:this.name,message:this.message,details:e.clone(this.details),dojoType:this.dojoType}};h.fromJSON=function(a){var c=new h(a.name,a.message,a.details);null!=a.dojoType&&(c.dojoType=a.dojoType);return c};return h}(n);a.prototype.type="error";return a})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,p){a.__proto__=p}||function(a,p){for(var e in p)p.hasOwnProperty(e)&&
  386. (a[e]=p[e])};return function(f,p){function e(){this.constructor=f}a(f,p);f.prototype=null===p?Object.create(p):(e.prototype=p.prototype,new e)}}()})},"esri/core/Message":function(){define(["require","exports","dojo/string"],function(a,f,p){return function(){function a(e,l,h){this instanceof a&&(this.name=e,this.message=l&&p.substitute(l,h,function(a){return null==a?"":a})||"",this.details=h)}a.prototype.toString=function(){return"["+this.name+"]: "+this.message};return a}()})},"esri/core/Loadable":function(){define("./Promise ./Accessor ./Error ./Warning dojo/aspect dojo/_base/lang dojo/Deferred".split(" "),
  387. function(a,f,p,e,n,l,h){return a.createSubclass([f],{declaredClass:"esri.core.Loadable","-chains-":l.mixin(f._meta.chains,{load:"after"}),constructor:function(){this._set("loadWarnings",[]);var a=new h;this.addResolvingPromise(a.promise);n.around(this,"load",function(c){return function(){"not-loaded"===this.loadStatus&&(this.loadStatus="loading",c.apply(this));a&&(a.resolve(),a=null);return this.when()}});this.when(function(a){this.loadStatus="loaded"}.bind(this),function(a){this.loadStatus="failed";
  388. this.loadError=a}.bind(this))},properties:{loaded:{readOnly:!0,dependsOn:["loadStatus"],get:function(){return"loaded"===this.loadStatus}},loadError:null,loadStatus:"not-loaded",loadWarnings:{type:[e],readOnly:!0}},load:function(){},cancelLoad:function(){if(this.isFulfilled())return this;this.loadError=new p("load:cancelled","Cancelled");this._promiseProps.cancel(this.loadError);return this}})})},"esri/core/Promise":function(){define("dojo/_base/lang dojo/promise/all dojo/Deferred dojo/aspect dojo/has dojo/errors/create ./scheduling ./Logger ./declare".split(" "),
  389. function(a,f,p,e,n,l,h,c,m){function b(b,a){g.warn("DEPRECATED: "+b+"()"+(a?" -- use "+a+" instead":""))}n.add("esri-promise-compatibility",!0);n.add("esri-promise-compatibility-deprecation-warnings",!0);var g=c.getLogger("esri.core.Promise"),t=function(b){var a=b._promiseProps;if(!a.resolver.isFulfilled()){var c=a.resolvingPromises,d,k;a.allPromise&&a.allPromise.cancel();var g=new p;for(d=c.length-1;0<=d;d--)k=c[d],k.isCanceled&&k.isCanceled()?c.splice(d,1):k.then(null,null,a.resolver.progress);
  390. k=null;(a.allPromise=f(c.concat([g.promise]))).then(function(){a.resolver.resolve(b);b=a=g=a.allPromise=a.resolvingPromises=null},function(d){a.allPromise=null;if(!d||"cancel"!==d.dojoType){var c=Array.prototype.slice.call(arguments,0);a.resolver.reject(c[0]);b=a=g=a.allPromise=a.resolvingPromises=null}});g&&h.schedule(function(){g&&g.resolve()})}},u=l("CancelError",null,function(b){this.target=b}),v=function(b){return b||new u(this.instance)},x=function(b){this.instance=b;this.canceler=v.bind(this);
  391. this.resolver=new p;this.initialized=!1;this.resolvingPromises=[]};x.prototype={canceler:null,cancel:function(b){if(!this.resolver.isFulfilled()){this.allPromise.cancel();for(var a=this.resolvingPromises.concat(),c=a.length-1;0<=c;c--)a[c].cancel(b);this.resolver.cancel(b)}}};l={declaredClass:"esri.core.Promise",constructor:function(){Object.defineProperty(this,"_promiseProps",{value:new x(this),enumerable:!1,configurable:!1,writable:!0});var b=e.after(this,"postscript",function(a,c){b.remove();b=
  392. null;t(this)},!0)},_promiseProps:null,always:function(a){n("esri-promise-compatibility-deprecation-warnings")&&b("always",".when(callbackOrErrback, callbackOrErrback)");return this.when(a,a)},isResolved:function(){return this._promiseProps.resolver.isResolved()},isRejected:function(){return this._promiseProps.resolver.isRejected()},isFulfilled:function(){return this._promiseProps.resolver.isFulfilled()},otherwise:function(a){n("esri-promise-compatibility-deprecation-warnings")&&b("otherwise",".when().catch(errback)");
  393. return this.when(null,a)},catch:function(b){return this.when(null,b)},when:function(b,a,c){var d=new p(this._promiseProps.canceler);b=d.then(b,a,c);this._promiseProps.resolver.then(d.resolve,d.reject,d.progress);return b},addResolvingPromise:function(b){b&&!this._promiseProps.resolver.isFulfilled()&&(b._promiseProps&&(b=b.when()),this._promiseProps.resolvingPromises.push(b),t(this))}};n("esri-promise-compatibility")||(l=a.mixin(l,{then:function(a,c,g){n("esri-promise-compatibility-deprecation-warnings")&&
  394. b("then",".when(callback, errback)");return this.when(a,c,g)},cancel:function(){n("esri-promise-compatibility-deprecation-warnings")&&b("cancel")},isCanceled:function(){n("esri-promise-compatibility-deprecation-warnings")&&b("isCanceled");return!1},trace:function(){n("esri-promise-compatibility-deprecation-warnings")&&b("trace");return this},traceRejected:function(){n("esri-promise-compatibility-deprecation-warnings")&&b("traceRejected");return this}}));return m(null,l)})},"dojo/promise/all":function(){define(["../_base/array",
  395. "../Deferred","../when"],function(a,f,p){var e=a.some;return function(a){var l,h;a instanceof Array?h=a:a&&"object"===typeof a&&(l=a);var c,m=[];if(l){h=[];for(var b in l)Object.hasOwnProperty.call(l,b)&&(m.push(b),h.push(l[b]));c={}}else h&&(c=[]);if(!h||!h.length)return(new f).resolve(c);var g=new f;g.promise.always(function(){c=m=null});var t=h.length;e(h,function(b,a){l||m.push(a);p(b,function(b){g.isFulfilled()||(c[m[a]]=b,0===--t&&g.resolve(c))},g.reject);return g.isFulfilled()});return g.promise}})},
  396. "esri/core/Warning":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","./Message"],function(a,f,p,e,n){a=function(a){function e(c,m,b){var g=a.call(this,c,m,b)||this;return g instanceof e?g:new e(c,m,b)}p(e,a);return e}(n);a.prototype.type="warning";return a})},"esri/core/promiseUtils":function(){define("require exports dojo/Deferred dojo/when dojo/promise/all ./Error".split(" "),function(a,f,p,e,n,l){function h(a){if(a){if("function"!==typeof a.forEach){var c=
  397. Object.keys(a),b=c.map(function(b){return a[b]});return h(b).then(function(b){var a={};c.forEach(function(c,g){return a[c]=b[g]});return a})}var g=new p,e=[],l=a.length;0===l&&g.resolve(e);a.forEach(function(b){var a={promise:b};e.push(a);b.then(function(b){a.value=b}).catch(function(b){a.error=b}).then(function(){--l;0===l&&g.resolve(e)})});return g.promise}}Object.defineProperty(f,"__esModule",{value:!0});f.all=function(a){return n(a)};f.filter=function(a,e){var b=a.slice();return n(a.map(function(b,
  398. a){return e(b,a)})).then(function(a){return b.filter(function(b,c){return a[c]})})};f.eachAlways=h;f.create=function(a,m){var b=new p(m);a(function(a){void 0===a&&(a=null);return e(a).then(b.resolve)},b.reject);return b.promise};f.reject=function(a){var c=new p;c.reject(a);return c.promise};f.resolve=function(a){void 0===a&&(a=null);var c=new p;c.resolve(a);return c.promise};f.after=function(a,e){void 0===e&&(e=null);var b=0,c=new p(function(){b&&(clearTimeout(b),b=0)}),b=setTimeout(function(){c.resolve(e)},
  399. a);return c.promise};f.timeout=function(a,e,b){var c=0,m=new p(a.cancel);a.then(function(b){m.isFulfilled()||(m.resolve(b),c&&(clearTimeout(c),c=0))});a.catch(function(b){m.isFulfilled()||(m.reject(b),c&&(clearTimeout(c),c=0))});c=setTimeout(function(){var a=b||new l("promiseUtils:timeout","The wrapped promise did not resolve within "+e+" ms");m.reject(a)},e);return m.promise};f.wrapCallback=function(a){var c=!1,b=new p(function(){return c=!0});a(function(a){c||b.resolve(a)});return b.promise};f.isThenable=
  400. function(a){return a&&"function"===typeof a.then};f.when=function(a){return e(a)}})},"esri/core/urlUtils":function(){define("require exports dojo/io-query dojo/_base/lang dojo/_base/url dojo/_base/window ../config ./Error ./lang ./Logger ./sniff".split(" "),function(a,f,p,e,n,l,h,c,m,b,g){function t(d){var b={path:null,query:null},a=new n(d),c=d.indexOf("?");null===a.query?b.path=d:(b.path=d.substring(0,c),b.query=p.queryToObject(a.query));a.fragment&&(b.hash=a.fragment,null===a.query&&(b.path=b.path.substring(0,
  401. b.path.length-(a.fragment.length+1))));return b}function u(b,a){void 0===b&&(b=!1);void 0===a&&(a=!0);var k,g=S.proxyUrl;if("string"===typeof b){if(k=H(b),b=r(b))g=b.proxyUrl}else k=!!b;if(!g)throw L.warn("esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers."),new c("urlutils:proxy-not-set","esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers.");
  402. var q;k&&a&&"https"===f.appUrl.scheme&&(a=I(g),d(a)&&(g=a,q=1));g=t(g);g._xo=q;return g}function v(d){var b=d.indexOf("?");-1!==b?(da.path=d.slice(0,b),da.query=d.slice(b+1)):(da.path=d,da.query=null);return da}function x(d){d=v(d).path;d&&"/"===d[d.length-1]||(d+="/");d=U(d,!0);return d=d.toLowerCase()}function r(d){var b=S.proxyRules;d=x(d);for(var a=0;a<b.length;a++)if(0===d.indexOf(b[a].urlPrefix))return b[a]}function w(d){d=C(d);var b=d.indexOf("/sharing");return 0<b?d.substring(0,b):d.replace(/\/+$/,
  403. "")}function q(d,b,a){void 0===a&&(a=!1);d=J(d);b=J(b);return a||d.scheme===b.scheme?d.host.toLowerCase()===b.host.toLowerCase()&&d.port===b.port:!1}function d(d){return g("esri-phonegap")?!0:g("esri-cors")?null!=k(d):!1}function k(d,b){void 0===b&&(b=!1);"string"===typeof d&&(d=F(d)?J(d):f.appUrl);for(var a=S.corsEnabledServers||[],c=0;c<a.length;c++)for(var k=a[c],g=void 0,g="string"===typeof k?y(k):k.host?y(k.host):[],e=0;e<g.length;e++)if(q(d,g[e]))return b?c:k;return b?-1:null}function y(d){f.corsServersUrlCache[d]||
  404. (Z(d)||aa(d)?f.corsServersUrlCache[d]=[new n(z(d))]:f.corsServersUrlCache[d]=[new n("http://"+d),new n("https://"+d)]);return f.corsServersUrlCache[d]}function z(d,b,a){void 0===b&&(b=f.appBaseUrl);if(aa(d))return a&&a.preserveProtocolRelative?d:"http"===f.appUrl.scheme&&f.appUrl.authority===D(d).slice(2)?"http:"+d:"https:"+d;if(Z(d))return d;a=B;if("/"===d[0]){var c=b.indexOf("//"),c=b.indexOf("/",c+2);b=-1===c?b:b.slice(0,c)}return a(b,d)}function A(d,b,a){void 0===b&&(b=f.appBaseUrl);if(!F(d))return d;
  405. var c=C(d),k=c.toLowerCase();b=C(b).toLowerCase().replace(/\/+$/,"");if((a=a?C(a).toLowerCase().replace(/\/+$/,""):null)&&0!==b.indexOf(a))return d;for(var g=function(d,b,a){a=d.indexOf(b,a);return-1===a?d.length:a},q=g(k,"/",k.indexOf("//")+2),e=-1;k.slice(0,q+1)===b.slice(0,q)+"/";){e=q+1;if(q===k.length)break;q=g(k,"/",q+1)}if(-1===e||a&&e<a.length)return d;d=c.slice(e);c=b.slice(e-1).replace(/[^/]+/g,"").length;if(0<c)for(k=0;k<c;k++)d="../"+d;else d="./"+d;return d}function C(b){b=b.trim();b=
  406. z(b);if(/^https?:\/\//i.test(b)){var a=v(b);b=a.path.replace(/\/{2,}/g,"/");b=b.replace("/","//");a.query&&(b+="?"+a.query)}b="http"===f.appUrl.scheme&&H(b)&&q(f.appBaseUrl,b,!0)&&!d(b)?aa(b)?"http:"+b:b.replace(V,"http:"):b;b=O(b);return b=b.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function B(){for(var d=[],b=0;b<arguments.length;b++)d[b]=arguments[b];if(d&&d.length){b=[];if(F(d[0])){var a=d[0],c=a.indexOf("//");b.push(a.slice(0,c+1));P.test(d[0])&&(b[0]+="/");d[0]=a.slice(c+2)}else"/"===
  407. d[0][0]&&b.push("");d=d.reduce(function(d,b){return b?d.concat(b.split("/")):d},[]);for(a=0;a<d.length;a++)c=d[a],".."===c&&0<b.length?b.pop():!c||"."===c&&0!==b.length||b.push(c);return b.join("/")}}function D(d){if(G(d)||Y(d))return null;var b=d.indexOf("://");if(-1===b&&aa(d))b=2;else if(-1!==b)b+=3;else return null;b=d.indexOf("/",b);return-1===b?d:d.slice(0,b)}function F(d){return aa(d)||Z(d)}function G(d){return"blob:"===d.slice(0,5)}function Y(d){return"data:"===d.slice(0,5)}function aa(d){return d&&
  408. "/"===d[0]&&"/"===d[1]}function Z(d){return T.test(d)}function H(d){return V.test(d)||"https"===f.appUrl.scheme&&aa(d)}function W(d){return ha.test(d)||"http"===f.appUrl.scheme&&aa(d)}function I(d){return aa(d)?"https:"+d:d.replace(ha,"https:")}function U(d,b){void 0===b&&(b=!1);if(aa(d))return d.slice(2);d=d.replace(T,"");b&&1<d.length&&"/"===d[0]&&"/"===d[1]&&(d=d.slice(2));return d}function O(b){var a=h.request.httpsDomains;if(!W(b))return b;var c=b.indexOf("/",7),k;k=-1===c?b:b.slice(0,c);k=k.toLowerCase().slice(7);
  409. if(!("http"!==f.appUrl.scheme||k!==f.appUrl.authority||ca.test(b)&&d(b)))return b;if("https"===f.appUrl.scheme&&k===f.appUrl.authority||a&&a.some(function(d){return k===d||m.endsWith(k,"."+d)}))b=I(b);return b}function N(d,b,a){if(!(b&&a&&d&&F(d)))return d;var c=d.indexOf("//"),k=d.indexOf("/",c+2),g=d.indexOf(":",c+2),k=Math.min(0>k?d.length:k,0>g?d.length:g);if(d.slice(c+2,k).toLowerCase()!==b.toLowerCase())return d;b=d.slice(0,c+2);d=d.slice(k);return""+b+a+d}function J(d){if("string"===typeof d)return new n(z(d));
  410. d.scheme||(d.scheme=f.appUrl.scheme);return d}Object.defineProperty(f,"__esModule",{value:!0});a=l.global;var L=b.getLogger("esri.core.urlUtils"),S=h.request,T=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,ha=/^\s*http:/i,V=/^\s*https:/i,P=/^\s*file:/i,ca=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;f.appUrl=new n(a.location);f.corsServersUrlCache={};f.appBaseUrl=function(){var d=f.appUrl.path,d=d.substring(0,d.lastIndexOf(d.split("/")[d.split("/").length-1]));return""+(f.appUrl.scheme+"://"+f.appUrl.host+
  411. (null!=f.appUrl.port?":"+f.appUrl.port:""))+d}();f.urlToObject=t;f.getProxyUrl=u;f.addProxy=function(d){var b=r(d),a,c;b?(c=v(b.proxyUrl),a=c.path,c=c.query?p.queryToObject(c.query):null):S.forceProxy&&(c=u(),a=c.path,c=c.query);a&&(b=t(d),d=a+"?"+b.path,(a=p.objectToQuery(e.mixin(c||{},b.query)))&&(d=d+"?"+a));return d};var da={path:"",query:""};f.addProxyRule=function(d){d={proxyUrl:d.proxyUrl,urlPrefix:x(d.urlPrefix)};for(var b=S.proxyRules,a=d.urlPrefix,c=b.length,k=0;k<b.length;k++){var g=b[k].urlPrefix;
  412. if(0===a.indexOf(g)){if(a.length===g.length)return-1;c=k;break}0===g.indexOf(a)&&(c=k+1)}b.splice(c,0,d);return c};f.getProxyRule=r;f.hasSamePortal=function(d,b){d=w(d);b=w(b);return U(d)===U(b)};f.hasSameOrigin=q;f.canUseXhr=d;f.getCorsConfig=k;f.makeAbsolute=z;f.makeRelative=A;f.normalize=C;f.join=B;f.getOrigin=D;f.isAbsolute=F;f.isBlobProtocol=G;f.isDataProtocol=Y;var ka=/^data:(.*?)(;base64)?,(.*)$/;f.dataComponents=function(d){return(d=d.match(ka))?{mediaType:d[1],isBase64:!!d[2],data:d[3]}:
  413. null};f.makeData=function(d){return d.isBase64?"data:"+d.mediaType+";base64,"+d.data:"data:"+d.mediaType+","+d.data};f.isProtocolRelative=aa;f.hasProtocol=Z;f.toHTTPS=I;f.removeFile=function(d){var b=0;if(F(d)){var a=d.indexOf("//");-1!==a&&(b=a+2)}a=d.lastIndexOf("/");return a<b?d:d.slice(0,a+1)};f.removeTrailingSlash=function(d){return d.replace(/\/+$/,"")};f.changeDomain=N;f.read=function(d,b){var a=b&&b.url&&b.url.path;d&&a&&(d=z(d,a,{preserveProtocolRelative:!0}));(b=b&&b.portal)&&!b.isPortal&&
  414. b.urlKey&&b.customBaseUrl?(a=b.urlKey+"."+b.customBaseUrl,b=q(f.appUrl,f.appUrl.scheme+"://"+a)?N(d,b.portalHostname,a):N(d,a,b.portalHostname)):b=d;return b};f.write=function(d,b){if(!d)return d;!F(d)&&b&&b.blockedRelativeUrls&&b.blockedRelativeUrls.push(d);var a=z(d);if(b){var c=b.verifyItemRelativeUrls&&b.verifyItemRelativeUrls.rootPath||b.url&&b.url.path;c&&(a=A(a,c,c),a!==d&&b.verifyItemRelativeUrls&&b.verifyItemRelativeUrls.writtenUrls.push(a))}d=a;a=(b=b&&b.portal)&&!b.isPortal&&b.urlKey&&
  415. b.customBaseUrl?N(d,b.urlKey+"."+b.customBaseUrl,b.portalHostname):d;return a};f.writeOperationalLayerUrl=function(d,b){d&&aa(d)&&(d="https:"+d);b.url=d?C(d):d};f.isSVG=function(d){return ia.test(d)};f.removeQueryParameters=function(d,b){d=t(d);var a=Object.keys(d.query||{});0<a.length&&b&&b.warn("removeQueryParameters()","Url query parameters are not supported, the following parameters have been removed: "+a.join(", ")+".");return d.path};var ia=/(^data:image\/svg|\.svg$)/i})},"dojo/_base/url":function(){define(["./kernel"],
  416. function(a){var f=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,p=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,e=function(){for(var a=arguments,l=[a[0]],h=1;h<a.length;h++)if(a[h]){var c=new e(a[h]+""),l=new e(l[0]+"");if(""==c.path&&!c.scheme&&!c.authority&&!c.query)null!=c.fragment&&(l.fragment=c.fragment),c=l;else if(!c.scheme&&(c.scheme=l.scheme,!c.authority&&(c.authority=l.authority,"/"!=c.path.charAt(0)))){for(var l=(l.path.substring(0,l.path.lastIndexOf("/")+
  417. 1)+c.path).split("/"),m=0;m<l.length;m++)"."==l[m]?m==l.length-1?l[m]="":(l.splice(m,1),m--):0<m&&(1!=m||""!=l[0])&&".."==l[m]&&".."!=l[m-1]&&(m==l.length-1?(l.splice(m,1),l[m-1]=""):(l.splice(m-1,2),m-=2));c.path=l.join("/")}l=[];c.scheme&&l.push(c.scheme,":");c.authority&&l.push("//",c.authority);l.push(c.path);c.query&&l.push("?",c.query);c.fragment&&l.push("#",c.fragment)}this.uri=l.join("");a=this.uri.match(f);this.scheme=a[2]||(a[1]?"":null);this.authority=a[4]||(a[3]?"":null);this.path=a[5];
  418. this.query=a[7]||(a[6]?"":null);this.fragment=a[9]||(a[8]?"":null);null!=this.authority&&(a=this.authority.match(p),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null)};e.prototype.toString=function(){return this.uri};return a._Url=e})},"esri/config":function(){define(["require","exports","dojo/_base/window"],function(a,f,p){return{screenDPI:96,geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",
  419. geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{corsDetection:!(p.global&&p.global.cordova),corsDetectionTimeout:15,corsEnabledServers:"basemaps.arcgis.com basemapsbeta.arcgis.com basemapsbetadev.arcgis.com basemapsdev.arcgis.com cdn.arcgis.com cdn-a.arcgis.com cdn-b.arcgis.com demographics1.arcgis.com demographics2.arcgis.com demographics3.arcgis.com demographics4.arcgis.com demographics5.arcgis.com demographics6.arcgis.com dev.arcgis.com devext.arcgis.com elevation3d.arcgis.com elevation3ddev.arcgis.com js.arcgis.com jsdev.arcgis.com jsqa.arcgis.com geocode.arcgis.com geocodedev.arcgis.com geocodeqa.arcgis.com geoenrich.arcgis.com geoenrichdev.arcgis.com geoenrichqa.arcgis.com localvtiles.arcgis.com qaext.arcgis.com server.arcgisonline.com services.arcgis.com services.arcgisonline.com services1.arcgis.com services2.arcgis.com services3.arcgis.com services4.arcgis.com services5.arcgis.com services6.arcgis.com services7.arcgis.com services8.arcgis.com services9.arcgis.com servicesdev.arcgis.com servicesdev1.arcgis.com servicesdev2.arcgis.com servicesdev3.arcgis.com servicesqa.arcgis.com servicesqa1.arcgis.com servicesqa2.arcgis.com servicesqa3.arcgis.com static.arcgis.com staticqa.arcgis.com staticdev.arcgis.com tiles.arcgis.com tiles1.arcgis.com tiles2.arcgis.com tiles3.arcgis.com tiles4.arcgis.com tilesdevext.arcgis.com tilesqa.arcgis.com utility.arcgis.com utility.arcgisonline.com www.arcgis.com".split(" "),
  420. corsStatus:{},forceProxy:!1,maxUrlLength:2E3,maxWorkers:5,proxyRules:[],proxyUrl:null,timeout:6E4,useIdentity:!0,useCors:"with-credentials",httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" ")},useSpatialIndex:!1}})},"esri/layers/Layer":function(){define("require dojo/Deferred ../core/Accessor ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/urlUtils ../core/promiseUtils ../core/Logger ../config ../kernel ../request ../geometry/SpatialReference ../geometry/Extent".split(" "),
  421. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=0,w=b.getLogger("esri.layers.Layer");p=p.createSubclass([n,l,h],{declaredClass:"esri.layers.Layer",properties:{attributionDataUrl:null,credential:{value:null,readOnly:!0,dependsOn:["loaded","parsedUrl"],get:function(){var b=this.loaded&&this.parsedUrl&&t.id&&t.id.findCredential(this.parsedUrl.path)||null;b&&b.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));return b}},fullExtent:new x(-180,-90,180,90,v.WGS84),hasAttributionData:{readOnly:!0,dependsOn:["attributionDataUrl"],
  422. get:function(){return null!=this.attributionDataUrl}},id:{get:function(){return Date.now().toString(16)+"-layer-"+r++}},legendEnabled:!0,listMode:"show",opacity:{value:1,type:Number,cast:function(b){return 0>b?0:1<b?1:b}},parent:null,parsedUrl:{readOnly:!0,dependsOn:["url"],get:function(){var b=this._get("url");return b?c.urlToObject(b):null}},popupEnabled:!0,attributionVisible:!0,spatialReference:v.WGS84,title:null,token:{dependsOn:["credential.token"],get:function(){var b=this.get("parsedUrl.query.token"),
  423. d=this.get("credential.token");return b||d||null},set:function(b){b?this._override("token",b):this._clearOverride("token")}},type:{type:String,readOnly:!0,value:null,json:{read:!1}},url:{value:null},visible:!0},initialize:function(){this.when().catch(function(a){b.getLogger(this.declaredClass).error("#load()","Failed to load layer (title: '"+this.title+"', id: '"+this.id+"')",a)}.bind(this))},createLayerView:function(b){return b?this.importLayerViewModule(b).then(function(d){d.default&&(d=d.default);
  424. return new d({layer:this,view:b})}.bind(this)):m.reject(new e("layerview:module-unavailable","No LayerView module available for layer '${layer.declaredClass}' and view type: '${view.type}'",{view:b,layer:this}))},destroyLayerView:function(b){b.destroy()},fetchAttributionData:function(){var b=this.attributionDataUrl;this.hasAttributionData&&b?b=u(b,{query:{f:"json"},responseType:"json"}).then(function(d){return d.data}):(b=new f,b.reject(new e("layer:no-attribution-data","Layer does not have attribution data")),
  425. b=b.promise);return b},refresh:function(){this.emit("refresh")},importLayerViewModule:function(b){return m.reject(new e("layerview:override-method","Must provide implementation in '${layer.declaredClass}'",{view:b,layer:this}))}});p.fromArcGISServerUrl=function(b){"string"===typeof b&&(b={url:b});var d=m.create(function(d){a(["./support/arcgisLayers"],d)}).then(function(d){return d.fromUrl(b)});d.catch(function(d){w.error("#fromArcGISServerUrl({ url: '"+b.url+"'})","Failed to create layer from arcgis server url",
  426. d)});return d};p.fromPortalItem=function(b){!b||b.portalItem||"object"!==typeof b||b.declaredClass&&"esri.portal.PortalItem"!==b.declaredClass||(b={portalItem:b});var d=m.create(function(d){a(["../portal/support/portalLayers"],d)}).then(function(d){return d.fromItem(b)});d.catch(function(d){var a=b&&b.portalItem;w.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+(a&&a.portal&&a.portal.url||g.portalUrl)+"', id: '"+(a&&a.id||"unset")+"')",d)});return d};return p})},"esri/core/Identifiable":function(){define(["./declare"],
  427. function(a){var f=0;return a(null,{constructor:function(){Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+f++})}})})},"esri/kernel":function(){define(["require","./core/promiseUtils","dojo/main","dojo/has"],function(a,f,p,e){(function(){var a=p.config,l=a.has&&void 0!==a.has["config-deferredInstrumentation"],h=a.has&&void 0!==a.has["config-useDeferredInstrumentation"];void 0!==a.useDeferredInstrumentation||l||h||(e.add("config-deferredInstrumentation",
  428. !1,!0,!0),e.add("config-useDeferredInstrumentation",!1,!0,!0))})();return{version:"4.7",workerMessages:{request:function(e){return f.create(function(e){a(["./request"],e)}).then(function(a){var h=e.options||{};h.responseType="array-buffer";return a(e.url,h)}).then(function(a){return{result:{data:a.data,ssl:a.ssl},transferList:[a.data]}})}}}})},"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color require ./has!host-browser?./_base/browser require".split(" "),
  429. function(a,f,p,e,n,l,h,c){h.isDebug&&p(["./_firebug/firebug"]);return a})},"esri/request":function(){define("require dojo/_base/config dojo/Deferred dojo/_base/lang dojo/_base/url dojo/request dojo/io-query ./config ./core/Error ./core/global ./core/sniff ./core/lang ./core/urlUtils ./core/deferredUtils ./core/promiseUtils dojo/has!host-browser?./core/request/script dojo/has!host-webworker?./core/workers/request".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w){function q(d){var b=h.objectToQuery(d.content);
  430. b&&(d.url+=(-1===d.url.indexOf("?")?"?":"\x26")+b);if(!u.isDataProtocol(d.url)&&2E3<d.url.length)return x.reject(e.mixin(Error(),{message:"When using responseType 'image', URL length cannot exceed 2000 characters."}));var a=new Image;d.allowImageDataAccess&&(a.crossOrigin=d.withCredentials?"use-credentials":"anonymous");var c=!1,k=new p(function(d){c=!0;a.onload=a.onerror=a.onabort=null;a.src=""}),b=function(d){a.onload=a.onerror=a.onabort=null;c||k.reject(Error("Unable to load the resource"))};a.onload=
  431. function(){a.onload=a.onerror=a.onabort=null;c||k.resolve(this)};a.onerror=b;a.onabort=b;a.alt="";a.src=d.url;return k.promise}function d(d){d=new n(d);return(d.host+(d.port?":"+d.port:"")).toLowerCase()}function k(){return I?I:I=x.create(function(d){a(["./identity/IdentityManager"],d)}).then(function(d){W=d})}function y(d,b){var a=!!d.useProxy,c=d.method||"auto",k=t.isDefined(d.crossOrigin)?d.crossOrigin:G.useCors;d=e.mixin({},d);d._ssl&&(d.url=d.url.replace(/^http:/i,"https:"));var m=d.content,
  432. y=d.url;d._token&&(d.content=d.content||{},d.content.token=d._token);var f=0,n;y&&(n=h.objectToQuery(m),f=n.length+y.length+1,g("esri-url-encodes-apostrophe")&&(f=n.replace(/'/g,"%27").length+y.length+1));d.timeout=t.isDefined(d.timeout)?d.timeout:G.timeout;d.handleAs=d.handleAs||"json";try{var x,z,w=k&&u.canUseXhr(d.urlObj)&&!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(d.url),v=u.hasSameOrigin(d.urlObj,u.appUrl)||w,A="post"===c||!!d.body||f>G.maxUrlLength,B=!v&&-1!==d.handleAs.indexOf("json")&&
  433. d.callbackParamName&&!d.body,C=!!u.getProxyRule(d.url)||G.forceProxy||a||("image"!==d.handleAs||d.allowImageDataAccess)&&(!B||A)&&!v;C&&(u.isBlobProtocol(d.url)||u.isDataProtocol(d.url))&&(C=!1);if((g("host-browser")||g("host-webworker"))&&C)if(x=u.getProxyUrl(y,k),z=x.path,x._xo&&(w=!0),!A&&z.length+1+f>G.maxUrlLength&&(A=!0),d.url=z+"?"+y,A)d.content=e.mixin(x.query||{},m);else{var D=h.objectToQuery(e.mixin(x.query||{},m));D&&(d.url+=(-1===y.indexOf("?")?"?":"\x26")+D);d.content=null}if(B&&!A&&
  434. !C&&g("host-browser"))return d=F?F(d):d,d.jsonp=d.callbackParamName,d.query=d.content,r.get(d.url,d);var Z=d.headers;!g("host-browser")&&!g("host-webworker")||Z&&Z.hasOwnProperty("X-Requested-With")||(Z=d.headers=Z||{},Z["X-Requested-With"]=null);if(g("host-browser")&&b){var H=d.content&&d.content.token;H&&(b.set?b.set("token",H):b.append("token",H));d.contentType=!1}if(w&&!d.hasOwnProperty("withCredentials")&&"with-credentials"===G.useCors){var a=C?z:y,Y=u.getCorsConfig(a);if(Y&&Y.hasOwnProperty("withCredentials"))Y.withCredentials&&
  435. (d.withCredentials=!0);else if(W){var I=W.findServerInfo(a);I&&I.webTierAuth&&(d.withCredentials=!0)}}d=F?F(d):d;if("image"===d.handleAs)return q(d);if(A)return d.body?(d.data=b||d.body,d.query=d.content):d.data=d.content,delete d.body,delete d.content,!C&&g("safari")&&(d.url+=(-1===d.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+aa++),l.post(d.url,d);d.query=d.content;delete d.content;return l.get(d.url,d)}catch(Ba){return d=new p,d.reject(Ba),d.promise}}function z(b){var a=G.corsStatus;
  436. try{var c=d(b.url);if(G.corsDetection&&G.useCors&&g("esri-cors")&&b.url&&-1!==b.url.toLowerCase().indexOf("/rest/services")&&!u.hasSameOrigin(b.urlObj,u.appUrl)&&!u.canUseXhr(b.urlObj)){if(a[c])return a[c];var k=new p;a[c]=k.promise;var q=b.url.substring(0,b.url.toLowerCase().indexOf("/rest/")+6)+"info";l.get(q,{query:{f:"json"},handleAs:"json",headers:{"X-Requested-With":null},timeout:1E3*G.corsDetectionTimeout}).then(function(d){d?(u.canUseXhr(b.url)||G.corsEnabledServers.push(c),k.resolve()):k.reject()},
  437. function(d){k.reject()});return k.promise}}catch(S){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}return H}function A(b,a,c,k){function g(b){b._pendingDfd=y(c,n);var a=!!b._pendingDfd.response;(b._pendingDfd.response||b._pendingDfd).then(function(d){if(!a||!d.data)return d;var b=d.getHeader("Content-Type");if(b&&(b=b.toLowerCase(),-1===b.indexOf("text/plain")&&-1===b.indexOf("application/json")))return d;b=d.data;if(b instanceof ArrayBuffer&&750>=b.byteLength)b=
  438. new Blob([b]);else if(!(b instanceof Blob&&750>=b.size))return d;var c=new p,k=new FileReader;k.readAsText(b);k.onloadend=function(){if(!k.error)try{var b=JSON.parse(k.result);b.error&&(Object.isExtensible(d)||(d=e.mixin({},d)),d._jsonData=b)}catch(ya){}c.resolve(d)};return c.promise}).then(function(d){var c=a?d.data:d,g=a?d.getHeader.bind(d):Z;if(c&&(d=a&&d._jsonData||c,d.error||"error"===d.status))throw c=e.mixin(Error(),d.error||d),c.getHeader=g,c;b.resolve({data:c,url:k.url,requestOptions:k.requestOptions,
  439. getHeader:g});b._pendingDfd=null}).catch(function(a){var g,q,e;a&&(g=a.code,q=a.subcode,e=(e=a.messageCode)&&e.toUpperCase());if(a&&403==g&&(4==q||a.message&&-1<a.message.toLowerCase().indexOf("ssl")&&-1===a.message.toLowerCase().indexOf("permission"))){if(!c._ssl){c._ssl=c._sslFromServer=!0;A(b,!0,c,k);return}}else if(a&&415==a.status){if(g=c.url,q=G.corsStatus,e=u.getCorsConfig(g,!0),-1<e&&G.corsEnabledServers.splice(e,1),e=new p,e.reject({log:!!f.isDebug}),q[d(g)]=e.promise,!c._err415){c._err415=
  440. 1;A(b,!0,c,k);return}}else if(h&&"no-prompt"!==c.authMode&&W._errorCodes&&-1!==W._errorCodes.indexOf(g)&&!W._isPublic(c.url)&&(403!=g||Y&&-1===Y.indexOf(e)&&(!t.isDefined(q)||2==q&&c._token))){C(b,c,k,B("request:server",a,k));return}b.reject(B("request:server",a,k));b._pendingDfd=null})}var q=c.body,h=c.useIdentity,l,n=null,x=q instanceof FormData;if(x||q&&q.elements)n=x?q:new FormData(q);var z=!!(-1!==c.url.toLowerCase().indexOf("token\x3d")||c.content&&c.content.token||n&&n.get&&n.get("token")||
  441. q&&q.elements&&q.elements.token);a||(!h||z||c._token||W._isPublic(c.url)||(a=function(d){d&&(c._token=d.token,c._ssl=d.ssl)},"immediate"===c.authMode?l=W.getCredential(c.url).then(a):"no-prompt"===c.authMode?l=W.checkSignInStatus(c.url).then(a).catch(function(){}):a(W.findCredential(c.url))),b.then(function(b){if((/\/sharing\/rest\/accounts\/self/i.test(c.url)||/\/sharing\/rest\/portals\/self/i.test(c.url))&&!z&&!c._token&&b.user&&b.user.username){var a=G.corsEnabledServers,k=u.getCorsConfig(c.url,
  442. !0),g={host:d(c.url),withCredentials:!0};if(-1===k)a.push(g);else{var q=a[k];"object"===typeof q?q.withCredentials=!0:a.splice(k,1,g)}}if(a=c._credential)if(k=(k=W.findServerInfo(a.server))&&k.owningSystemUrl)k=k.replace(/\/?$/,"/sharing"),(a=W.findCredential(k,a.userId))&&-1===W._getIdenticalSvcIdx(k,a)&&a.resources.splice(0,0,k);return b}).always(function(d){delete c._credential;if(d){var b=!!c._ssl;d instanceof m?d.details.ssl=b:d.ssl=b}}));l?l.then(function(){g(b)}).catch(function(d){b.reject(d)}):
  443. g(b);return b.promise}function C(d,b,a,c){d._pendingDfd=W.getCredential(b.url,{error:c,token:b._token});d._pendingDfd.then(function(c){b._token=c.token;b._credential=c;b._ssl=b._sslFromServer||c.ssl;A(d,!0,b,a)}).catch(function(b){d.reject(b);d._pendingDfd=null})}function B(d,b,a){var c="Error",k={url:a.url,requestOptions:a.requestOptions,getHeader:Z};if(b instanceof m)return b.details?(b.details=t.clone(b.details),b.details.url=a.url,b.details.requestOptions=a.requestOptions):b.details=k,b;if(b){var g=
  444. b.response;a=g&&g.getHeader;var g=g&&g.status,q=b.message;a=b.getHeader||a;q&&(c=q);a&&(k.getHeader=a);k.httpStatus=(t.isDefined(b.httpCode)?b.httpCode:b.code)||g;k.subCode=b.subcode;k.messageCode=b.messageCode;k.messages="string"===typeof b.details?[b.details]:b.details}d=new m(d,c,k);b&&"cancel"===b.dojoType&&(d.dojoType="cancel");return d}function D(d,a){if(w&&b.invokeStaticMessage)return w.execute(d,a);var c=e.mixin({},a),q={url:d,requestOptions:e.mixin({},a)};c.content=c.query;delete c.query;
  445. c.preventCache=!!c.cacheBust;delete c.cacheBust;c.handleAs=c.responseType;delete c.responseType;"array-buffer"===c.handleAs&&(c.handleAs="arraybuffer");if("image"===c.handleAs){if(g("host-webworker"))return x.reject(B("request:invalid-parameters",Error("responseType 'image' is not supported in Web Workers or Node environment"),q));c.preventCache&&(c.content=c.content||{},c.content["request.preventCache"]=Date.now());c.method="auto"}else if(u.isDataProtocol(d))return x.reject(B("request:invalid-parameters",
  446. Error("Data URLs are not supported for responseType \x3d "+c.handleAs),q));var m=G.useIdentity;"anonymous"===c.authMode&&(m=!1);c.useIdentity=m;c.url=u.normalize(d);c.urlObj=new n(c.url);var h=v.makeDeferredCancellingPending();z(c).always(function(){if(m&&!W)return k()}).always(function(){A(h,!1,c,q)});return h.promise}var F,G=c.request,Y=["COM_0056","COM_0057"],aa=0,Z=function(){return null},H=(new p).resolve(),W,I;D.setRequestPreCallback=function(d){F=d};return D})},"dojo/request":function(){define(["./request/default!"],
  447. function(a){return a})},"dojo/request/default":function(){define(["exports","require","../has"],function(a,f,p){var e=p("config-requestProvider"),n;if(p("host-browser")||p("host-webworker"))n="./xhr";e||(e=n);a.getPlatformDefaultId=function(){return n};a.load=function(a,h,c,m){f(["platform"==a?n:e],function(b){c(b)})}})},"esri/core/deferredUtils":function(){define(["dojo/Deferred"],function(a){var f={makeDeferredCancellingPending:function(){var p={},e=f._dfdCanceller.bind(null,p),e=new a(e);return p.deferred=
  448. e},_dfdCanceller:function(a){a=a.deferred?a.deferred:a;a.canceled=!0;var e=a._pendingDfd;a.isResolved()||!e||e.isResolved()||e.cancel();a._pendingDfd=null},_fixDfd:function(a){var e=a.then;a.then=function(a,l,h){if(a){var c=a;a=function(a){return a&&a._argsArray?c.apply(null,a):c(a)}}return e.call(this,a,l,h)};return a},_resDfd:function(a,e,f){var l=e.length;1===l?f?a.reject(e[0]):a.resolve(e[0]):1<l?(e._argsArray=!0,a.resolve(e)):a.resolve()}};return f})},"esri/geometry/SpatialReference":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),
  449. function(a,f,p,e,n,l,h,c){a=function(a){function b(b){b=a.call(this)||this;b.latestWkid=null;b.wkid=null;b.wkt=null;return b}p(b,a);g=b;b.fromJSON=function(b){if(!b)return null;if(b.wkid){if(102100===b.wkid)return g.WebMercator;if(4326===b.wkid)return g.WGS84}var a=new g;a.read(b);return a};b.prototype.normalizeCtorArgs=function(b){return b&&"object"===typeof b?b:(a={},a["string"===typeof b?"wkt":"wkid"]=b,a);var a};Object.defineProperty(b.prototype,"isWGS84",{get:function(){return c.isWGS84(this)},
  450. enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWebMercator",{get:function(){return c.isWebMercator(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isGeographic",{get:function(){return c.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWrappable",{get:function(){return c.isWrappable(this)},enumerable:!0,configurable:!0});b.prototype.writeWkt=function(b,a){this.wkid||(a.wkt=b)};b.prototype.clone=function(){if(this===
  451. g.WGS84)return g.WGS84;if(this===g.WebMercator)return g.WebMercator;var b=new g;null!=this.wkid?(b.wkid=this.wkid,null!=this.latestWkid&&(b.latestWkid=this.latestWkid),null!=this.vcsWkid&&(b.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(b.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(b.wkt=this.wkt);return b};b.prototype.equals=function(b){return c.equals(this,b)};b.prototype.toJSON=function(b){return this.write(null,b)};b.GCS_NAD_1927=null;b.WGS84=null;b.WebMercator=null;e([h.property({dependsOn:["wkid"],
  452. readOnly:!0})],b.prototype,"isWGS84",null);e([h.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWebMercator",null);e([h.property({dependsOn:["wkid","wkt"],readOnly:!0})],b.prototype,"isGeographic",null);e([h.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWrappable",null);e([h.property({type:Number,json:{write:!0}})],b.prototype,"latestWkid",void 0);e([h.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?
  453. !0:!1}}}}}}})],b.prototype,"wkid",void 0);e([h.property({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],b.prototype,"wkt",void 0);e([h.writer("wkt"),h.writer("web-scene","wkt")],b.prototype,"writeWkt",null);e([h.property({type:Number,json:{write:!0}})],b.prototype,"vcsWkid",void 0);e([h.property({type:Number,json:{write:!0}})],b.prototype,"latestVcsWkid",void 0);return b=g=e([h.subclass("esri.geometry.SpatialReference")],
  454. b);var g}(h.declared(n));a.prototype.toJSON.isDefaultToJSON=!0;a.GCS_NAD_1927=new a({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'});a.WGS84=new a(4326);a.WGS84.wkt=l.substitute({Central_Meridian:"0.0"},c.getInfo(a.WGS84).wkTemplate);a.WebMercator=new a({wkid:102100,latestWkid:3857});Object.freeze&&(Object.freeze(a.GCS_NAD_1927),Object.freeze(a.WGS84),Object.freeze(a.WebMercator));
  455. return a})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require","exports","./WKIDUnitConversion"],function(a,f,p){function e(a){return a.wkid&&!0===n[a.wkid]}Object.defineProperty(f,"__esModule",{value:!0});var n={102113:!0,102100:!0,3857:!0,3785:!0},l={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0};a=[-2.0037508342788905E7,2.0037508342788905E7];var h=[-2.0037508342787E7,2.0037508342787E7],c={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]]',
  456. valid:a,origin:h,dx:1E-5},102100:{wkTemplate:'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]]',valid:a,origin:h,
  457. dx:1E-5},3785:{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:a,origin:h,dx:1E-5},3857:{wkTemplate:'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]]',
  458. valid:a,origin:h,dx:1E-5},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]]',
  459. valid:[-180,180],origin:[-180,180],dx:1E-5}};f.equals=function(a,b){if(b){if(a===b)return!0;if(null!=a.wkid||null!=b.wkid)return a.wkid===b.wkid||e(a)&&e(b)||null!=b.latestWkid&&a.wkid===b.latestWkid||null!=a.latestWkid&&b.wkid===a.latestWkid;if(a.wkt&&b.wkt)return a.wkt.toUpperCase()===b.wkt.toUpperCase()}return!1};f.getInfo=function(a){return a.wkid?c[a.wkid]:null};f.isGeographic=function(a){return a.wkid?null==p[a.wkid]:a.wkt?!!/^\s*GEOGCS/i.test(a.wkt):!1};f.isWGS84=function(a){return 4326===
  460. a.wkid};f.isWebMercator=e;f.isWrappable=function(a){return a.wkid&&!0===l[a.wkid]}})},"esri/geometry/support/WKIDUnitConversion":function(){define([],function(){var a,f={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),
  461. 2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,
  462. 3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,
  463. 3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,
  464. 3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,
  465. 5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,
  466. 6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,
  467. 6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,
  468. 6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,
  469. 6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,
  470. 7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,
  471. 7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8058:0,8059:0,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,
  472. 8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25E3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,
  473. 26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53034:0,53048:0,53049:0,
  474. 54034:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,
  475. 103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,
  476. 103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,
  477. 103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,
  478. 103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103695:2};for(a=2E3;2045>=a;a++)f[a]=0;for(a=2056;2065>=a;a++)f[a]=0;for(a=2067;2135>=a;a++)f[a]=0;for(a=2137;2154>=a;a++)f[a]=0;for(a=2161;2170>=a;a++)f[a]=0;for(a=2172;2193>=a;a++)f[a]=0;for(a=2195;2198>=a;a++)f[a]=0;for(a=2200;2203>=a;a++)f[a]=0;for(a=2205;2217>=a;a++)f[a]=0;for(a=2222;2224>=a;a++)f[a]=1;for(a=2225;2250>=a;a++)f[a]=2;
  479. for(a=2251;2253>=a;a++)f[a]=1;for(a=2257;2264>=a;a++)f[a]=2;for(a=2274;2279>=a;a++)f[a]=2;for(a=2280;2282>=a;a++)f[a]=1;for(a=2283;2289>=a;a++)f[a]=2;for(a=2290;2292>=a;a++)f[a]=0;for(a=2308;2313>=a;a++)f[a]=0;for(a=2315;2491>=a;a++)f[a]=0;for(a=2494;2866>=a;a++)f[a]=0;for(a=2867;2869>=a;a++)f[a]=1;for(a=2870;2888>=a;a++)f[a]=2;for(a=2891;2895>=a;a++)f[a]=2;for(a=2896;2898>=a;a++)f[a]=1;for(a=2902;2908>=a;a++)f[a]=2;for(a=2915;2920>=a;a++)f[a]=2;for(a=2921;2923>=a;a++)f[a]=1;for(a=2924;2930>=a;a++)f[a]=
  480. 2;for(a=2931;2962>=a;a++)f[a]=0;for(a=2964;2968>=a;a++)f[a]=2;for(a=2969;2973>=a;a++)f[a]=0;for(a=2975;2991>=a;a++)f[a]=0;for(a=2995;3051>=a;a++)f[a]=0;for(a=3054;3079>=a;a++)f[a]=0;for(a=3081;3088>=a;a++)f[a]=0;for(a=3092;3101>=a;a++)f[a]=0;for(a=3106;3138>=a;a++)f[a]=0;for(a=3146;3151>=a;a++)f[a]=0;for(a=3153;3166>=a;a++)f[a]=0;for(a=3168;3172>=a;a++)f[a]=0;for(a=3174;3203>=a;a++)f[a]=0;for(a=3294;3358>=a;a++)f[a]=0;for(a=3367;3403>=a;a++)f[a]=0;for(a=3408;3416>=a;a++)f[a]=0;for(a=3417;3438>=a;a++)f[a]=
  481. 2;for(a=3441;3446>=a;a++)f[a]=2;for(a=3447;3450>=a;a++)f[a]=0;for(a=3451;3459>=a;a++)f[a]=2;for(a=3460;3478>=a;a++)f[a]=0;for(a=3554;3559>=a;a++)f[a]=0;for(a=3560;3570>=a;a++)f[a]=2;for(a=3571;3581>=a;a++)f[a]=0;for(a=3594;3597>=a;a++)f[a]=0;for(a=3601;3604>=a;a++)f[a]=0;for(a=3637;3639>=a;a++)f[a]=0;for(a=3665;3667>=a;a++)f[a]=0;for(a=3693;3695>=a;a++)f[a]=0;for(a=3701;3727>=a;a++)f[a]=0;for(a=3728;3739>=a;a++)f[a]=2;for(a=3740;3751>=a;a++)f[a]=0;for(a=3753;3760>=a;a++)f[a]=2;for(a=3761;3773>=a;a++)f[a]=
  482. 0;for(a=3775;3777>=a;a++)f[a]=0;for(a=3779;3781>=a;a++)f[a]=0;for(a=3783;3785>=a;a++)f[a]=0;for(a=3788;3791>=a;a++)f[a]=0;for(a=3797;3802>=a;a++)f[a]=0;for(a=3814;3816>=a;a++)f[a]=0;for(a=3825;3829>=a;a++)f[a]=0;for(a=3832;3841>=a;a++)f[a]=0;for(a=3844;3852>=a;a++)f[a]=0;for(a=3873;3885>=a;a++)f[a]=0;for(a=3890;3893>=a;a++)f[a]=0;for(a=3907;3912>=a;a++)f[a]=0;for(a=3942;3950>=a;a++)f[a]=0;for(a=3968;3970>=a;a++)f[a]=0;for(a=3973;3976>=a;a++)f[a]=0;for(a=3986;3989>=a;a++)f[a]=0;for(a=3994;3997>=a;a++)f[a]=
  483. 0;for(a=4048;4051>=a;a++)f[a]=0;for(a=4056;4063>=a;a++)f[a]=0;for(a=4093;4096>=a;a++)f[a]=0;for(a=4390;4398>=a;a++)f[a]=0;for(a=4399;4413>=a;a++)f[a]=2;for(a=4418;4433>=a;a++)f[a]=2;for(a=4455;4457>=a;a++)f[a]=2;for(a=4484;4489>=a;a++)f[a]=0;for(a=4491;4554>=a;a++)f[a]=0;for(a=4568;4589>=a;a++)f[a]=0;for(a=4652;4656>=a;a++)f[a]=0;for(a=4766;4800>=a;a++)f[a]=0;for(a=5014;5016>=a;a++)f[a]=0;for(a=5069;5072>=a;a++)f[a]=0;for(a=5105;5130>=a;a++)f[a]=0;for(a=5173;5188>=a;a++)f[a]=0;for(a=5253;5259>=a;a++)f[a]=
  484. 0;for(a=5269;5275>=a;a++)f[a]=0;for(a=5292;5311>=a;a++)f[a]=0;for(a=5329;5331>=a;a++)f[a]=0;for(a=5343;5349>=a;a++)f[a]=0;for(a=5355;5357>=a;a++)f[a]=0;for(a=5387;5389>=a;a++)f[a]=0;for(a=5459;5463>=a;a++)f[a]=0;for(a=5479;5482>=a;a++)f[a]=0;for(a=5518;5520>=a;a++)f[a]=0;for(a=5530;5539>=a;a++)f[a]=0;for(a=5550;5552>=a;a++)f[a]=0;for(a=5562;5583>=a;a++)f[a]=0;for(a=5623;5625>=a;a++)f[a]=2;for(a=5631;5639>=a;a++)f[a]=0;for(a=5649;5653>=a;a++)f[a]=0;for(a=5663;5680>=a;a++)f[a]=0;for(a=5682;5685>=a;a++)f[a]=
  485. 0;for(a=5875;5877>=a;a++)f[a]=0;for(a=5921;5940>=a;a++)f[a]=0;for(a=6050;6125>=a;a++)f[a]=0;for(a=6244;6275>=a;a++)f[a]=0;for(a=6328;6348>=a;a++)f[a]=0;for(a=6350;6356>=a;a++)f[a]=0;for(a=6366;6372>=a;a++)f[a]=0;for(a=6381;6387>=a;a++)f[a]=0;for(a=6393;6404>=a;a++)f[a]=0;for(a=6480;6483>=a;a++)f[a]=0;for(a=6511;6514>=a;a++)f[a]=0;for(a=6579;6581>=a;a++)f[a]=0;for(a=6619;6624>=a;a++)f[a]=0;for(a=6625;6627>=a;a++)f[a]=2;for(a=6628;6632>=a;a++)f[a]=0;for(a=6634;6637>=a;a++)f[a]=0;for(a=6669;6692>=a;a++)f[a]=
  486. 0;for(a=6707;6709>=a;a++)f[a]=0;for(a=6720;6723>=a;a++)f[a]=0;for(a=6732;6738>=a;a++)f[a]=0;for(a=6931;6933>=a;a++)f[a]=0;for(a=6956;6959>=a;a++)f[a]=0;for(a=7005;7007>=a;a++)f[a]=0;for(a=7057;7070>=a;a++)f[a]=2;for(a=7074;7082>=a;a++)f[a]=0;for(a=7109;7118>=a;a++)f[a]=0;for(a=7119;7127>=a;a++)f[a]=1;for(a=7374;7376>=a;a++)f[a]=0;for(a=7528;7586>=a;a++)f[a]=0;for(a=7587;7645>=a;a++)f[a]=2;for(a=7755;7787>=a;a++)f[a]=0;for(a=7791;7795>=a;a++)f[a]=0;for(a=7799;7801>=a;a++)f[a]=0;for(a=7803;7805>=a;a++)f[a]=
  487. 0;for(a=7825;7831>=a;a++)f[a]=0;for(a=7845;7859>=a;a++)f[a]=0;for(a=8013;8032>=a;a++)f[a]=0;for(a=20002;20032>=a;a++)f[a]=0;for(a=20062;20092>=a;a++)f[a]=0;for(a=20135;20138>=a;a++)f[a]=0;for(a=20248;20258>=a;a++)f[a]=0;for(a=20348;20358>=a;a++)f[a]=0;for(a=20436;20440>=a;a++)f[a]=0;for(a=20822;20824>=a;a++)f[a]=0;for(a=20934;20936>=a;a++)f[a]=0;for(a=21035;21037>=a;a++)f[a]=0;for(a=21095;21097>=a;a++)f[a]=0;for(a=21148;21150>=a;a++)f[a]=0;for(a=21413;21423>=a;a++)f[a]=0;for(a=21473;21483>=a;a++)f[a]=
  488. 0;for(a=21780;21782>=a;a++)f[a]=0;for(a=21891;21894>=a;a++)f[a]=0;for(a=21896;21899>=a;a++)f[a]=0;for(a=22171;22177>=a;a++)f[a]=0;for(a=22181;22187>=a;a++)f[a]=0;for(a=22191;22197>=a;a++)f[a]=0;for(a=22234;22236>=a;a++)f[a]=0;for(a=22521;22525>=a;a++)f[a]=0;for(a=22991;22994>=a;a++)f[a]=0;for(a=23028;23038>=a;a++)f[a]=0;for(a=23830;23853>=a;a++)f[a]=0;for(a=23866;23872>=a;a++)f[a]=0;for(a=23877;23884>=a;a++)f[a]=0;for(a=23886;23894>=a;a++)f[a]=0;for(a=23946;23948>=a;a++)f[a]=0;for(a=24311;24313>=
  489. a;a++)f[a]=0;for(a=24342;24347>=a;a++)f[a]=0;for(a=24370;24374>=a;a++)f[a]=10;for(a=24375;24381>=a;a++)f[a]=0;for(a=24718;24721>=a;a++)f[a]=0;for(a=24817;24821>=a;a++)f[a]=0;for(a=24877;24882>=a;a++)f[a]=0;for(a=24891;24893>=a;a++)f[a]=0;for(a=25391;25395>=a;a++)f[a]=0;for(a=25828;25838>=a;a++)f[a]=0;for(a=26191;26195>=a;a++)f[a]=0;for(a=26391;26393>=a;a++)f[a]=0;for(a=26701;26722>=a;a++)f[a]=0;for(a=26729;26799>=a;a++)f[a]=2;for(a=26801;26803>=a;a++)f[a]=2;for(a=26811;26813>=a;a++)f[a]=2;for(a=26847;26870>=
  490. a;a++)f[a]=2;for(a=26891;26899>=a;a++)f[a]=0;for(a=26901;26923>=a;a++)f[a]=0;for(a=26929;26946>=a;a++)f[a]=0;for(a=26948;26998>=a;a++)f[a]=0;for(a=27037;27040>=a;a++)f[a]=0;for(a=27205;27232>=a;a++)f[a]=0;for(a=27258;27260>=a;a++)f[a]=0;for(a=27391;27398>=a;a++)f[a]=0;for(a=27561;27564>=a;a++)f[a]=0;for(a=27571;27574>=a;a++)f[a]=0;for(a=27581;27584>=a;a++)f[a]=0;for(a=27591;27594>=a;a++)f[a]=0;for(a=28191;28193>=a;a++)f[a]=0;for(a=28348;28358>=a;a++)f[a]=0;for(a=28402;28432>=a;a++)f[a]=0;for(a=28462;28492>=
  491. a;a++)f[a]=0;for(a=29118;29122>=a;a++)f[a]=0;for(a=29168;29172>=a;a++)f[a]=0;for(a=29177;29185>=a;a++)f[a]=0;for(a=29187;29195>=a;a++)f[a]=0;for(a=29900;29903>=a;a++)f[a]=0;for(a=30161;30179>=a;a++)f[a]=0;for(a=30491;30494>=a;a++)f[a]=0;for(a=30729;30732>=a;a++)f[a]=0;for(a=31251;31259>=a;a++)f[a]=0;for(a=31265;31268>=a;a++)f[a]=0;for(a=31275;31279>=a;a++)f[a]=0;for(a=31281;31297>=a;a++)f[a]=0;for(a=31461;31469>=a;a++)f[a]=0;for(a=31491;31495>=a;a++)f[a]=0;for(a=31917;31922>=a;a++)f[a]=0;for(a=31965;32E3>=
  492. a;a++)f[a]=0;for(a=32001;32003>=a;a++)f[a]=2;for(a=32005;32031>=a;a++)f[a]=2;for(a=32033;32060>=a;a++)f[a]=2;for(a=32064;32067>=a;a++)f[a]=2;for(a=32074;32077>=a;a++)f[a]=2;for(a=32081;32086>=a;a++)f[a]=0;for(a=32107;32130>=a;a++)f[a]=0;for(a=32133;32158>=a;a++)f[a]=0;for(a=32164;32167>=a;a++)f[a]=2;for(a=32180;32199>=a;a++)f[a]=0;for(a=32201;32260>=a;a++)f[a]=0;for(a=32301;32360>=a;a++)f[a]=0;for(a=32601;32662>=a;a++)f[a]=0;for(a=32664;32667>=a;a++)f[a]=2;for(a=32701;32761>=a;a++)f[a]=0;for(a=53001;53004>=
  493. a;a++)f[a]=0;for(a=53008;53019>=a;a++)f[a]=0;for(a=53021;53032>=a;a++)f[a]=0;for(a=53042;53046>=a;a++)f[a]=0;for(a=53074;53080>=a;a++)f[a]=0;for(a=54001;54004>=a;a++)f[a]=0;for(a=54008;54019>=a;a++)f[a]=0;for(a=54021;54032>=a;a++)f[a]=0;for(a=54042;54046>=a;a++)f[a]=0;for(a=54048;54053>=a;a++)f[a]=0;for(a=54074;54080>=a;a++)f[a]=0;for(a=102001;102040>=a;a++)f[a]=0;for(a=102042;102063>=a;a++)f[a]=0;for(a=102065;102067>=a;a++)f[a]=0;for(a=102070;102117>=a;a++)f[a]=0;for(a=102122;102216>=a;a++)f[a]=
  494. 0;for(a=102221;102377>=a;a++)f[a]=0;for(a=102382;102388>=a;a++)f[a]=0;for(a=102389;102398>=a;a++)f[a]=2;for(a=102399;102444>=a;a++)f[a]=0;for(a=102445;102447>=a;a++)f[a]=2;for(a=102448;102458>=a;a++)f[a]=0;for(a=102459;102468>=a;a++)f[a]=2;for(a=102469;102496>=a;a++)f[a]=0;for(a=102500;102519>=a;a++)f[a]=1;for(a=102520;102524>=a;a++)f[a]=0;for(a=102525;102529>=a;a++)f[a]=2;for(a=102530;102568>=a;a++)f[a]=0;for(a=102570;102588>=a;a++)f[a]=0;for(a=102590;102598>=a;a++)f[a]=0;for(a=102601;102603>=a;a++)f[a]=
  495. 0;for(a=102605;102628>=a;a++)f[a]=0;for(a=102629;102646>=a;a++)f[a]=2;for(a=102648;102700>=a;a++)f[a]=2;for(a=102701;102703>=a;a++)f[a]=0;for(a=102707;102730>=a;a++)f[a]=2;for(a=102733;102758>=a;a++)f[a]=2;for(a=102767;102900>=a;a++)f[a]=0;for(a=102965;102969>=a;a++)f[a]=0;for(a=102971;102973>=a;a++)f[a]=0;for(a=102975;102989>=a;a++)f[a]=0;for(a=102990;102992>=a;a++)f[a]=1;for(a=102997;103002>=a;a++)f[a]=0;for(a=103003;103008>=a;a++)f[a]=2;for(a=103009;103011>=a;a++)f[a]=0;for(a=103012;103014>=a;a++)f[a]=
  496. 2;for(a=103019;103021>=a;a++)f[a]=0;for(a=103022;103024>=a;a++)f[a]=2;for(a=103029;103031>=a;a++)f[a]=0;for(a=103032;103034>=a;a++)f[a]=2;for(a=103065;103068>=a;a++)f[a]=0;for(a=103074;103076>=a;a++)f[a]=0;for(a=103077;103079>=a;a++)f[a]=1;for(a=103080;103082>=a;a++)f[a]=0;for(a=103083;103085>=a;a++)f[a]=2;for(a=103090;103093>=a;a++)f[a]=0;for(a=103097;103099>=a;a++)f[a]=0;for(a=103100;103102>=a;a++)f[a]=2;for(a=103107;103109>=a;a++)f[a]=0;for(a=103110;103112>=a;a++)f[a]=2;for(a=103113;103116>=a;a++)f[a]=
  497. 0;for(a=103117;103120>=a;a++)f[a]=2;for(a=103153;103157>=a;a++)f[a]=0;for(a=103158;103162>=a;a++)f[a]=2;for(a=103163;103165>=a;a++)f[a]=0;for(a=103166;103168>=a;a++)f[a]=1;for(a=103169;103171>=a;a++)f[a]=2;for(a=103186;103188>=a;a++)f[a]=0;for(a=103189;103191>=a;a++)f[a]=2;for(a=103192;103195>=a;a++)f[a]=0;for(a=103196;103199>=a;a++)f[a]=2;for(a=103200;103224>=a;a++)f[a]=0;for(a=103225;103227>=a;a++)f[a]=1;for(a=103232;103237>=a;a++)f[a]=0;for(a=103238;103243>=a;a++)f[a]=2;for(a=103244;103246>=a;a++)f[a]=
  498. 0;for(a=103247;103249>=a;a++)f[a]=2;for(a=103254;103256>=a;a++)f[a]=0;for(a=103257;103259>=a;a++)f[a]=2;for(a=103264;103266>=a;a++)f[a]=0;for(a=103267;103269>=a;a++)f[a]=2;for(a=103300;103375>=a;a++)f[a]=0;for(a=103381;103383>=a;a++)f[a]=0;for(a=103384;103386>=a;a++)f[a]=1;for(a=103387;103389>=a;a++)f[a]=0;for(a=103390;103392>=a;a++)f[a]=2;for(a=103397;103399>=a;a++)f[a]=0;for(a=103400;103471>=a;a++)f[a]=2;for(a=103476;103478>=a;a++)f[a]=0;for(a=103479;103481>=a;a++)f[a]=2;for(a=103486;103488>=a;a++)f[a]=
  499. 0;for(a=103489;103491>=a;a++)f[a]=2;for(a=103492;103495>=a;a++)f[a]=0;for(a=103496;103499>=a;a++)f[a]=2;for(a=103528;103543>=a;a++)f[a]=0;for(a=103544;103548>=a;a++)f[a]=2;for(a=103549;103551>=a;a++)f[a]=0;for(a=103552;103554>=a;a++)f[a]=1;for(a=103555;103557>=a;a++)f[a]=2;for(a=103558;103560>=a;a++)f[a]=0;for(a=103571;103573>=a;a++)f[a]=0;for(a=103574;103576>=a;a++)f[a]=2;for(a=103577;103580>=a;a++)f[a]=0;for(a=103581;103583>=a;a++)f[a]=2;for(a=103600;103694>=a;a++)f[a]=0;for(a=103700;103793>=a;a++)f[a]=
  500. 2;for(a=103794;103871>=a;a++)f[a]=0;for(a=103900;103971>=a;a++)f[a]=2;return f})},"esri/geometry/Extent":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Geometry ./Point ./SpatialReference ./support/contains ./support/intersects ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u){function v(b,a,c){return null==a?c:null==c?a:b(a,c)}a=function(a){function h(){for(var b=
  501. 0;b<arguments.length;b++);b=a.call(this)||this;b.type="extent";b.xmin=0;b.ymin=0;b.mmin=void 0;b.zmin=void 0;b.xmax=0;b.ymax=0;b.mmax=void 0;b.zmax=void 0;return b}p(h,a);f=h;h.prototype.normalizeCtorArgs=function(b,d,a,c,g){return!b||"esri.geometry.SpatialReference"!==b.declaredClass&&null==b.wkid?"object"===typeof b?(b.spatialReference=null!=b.spatialReference?b.spatialReference:m.WGS84,b):{xmin:b,ymin:d,xmax:a,ymax:c,spatialReference:null!=g?g:m.WGS84}:{spatialReference:b,xmin:0,ymin:0,xmax:0,
  502. ymax:0}};Object.defineProperty(h.prototype,"center",{get:function(){var b=new c({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});this.hasZ&&(b.z=.5*(this.zmin+this.zmax));this.hasM&&(b.m=.5*(this.mmin+this.mmax));return b},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"extent",{get:function(){return this.clone()},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"hasM",{get:function(){return null!=this.mmin&&null!=
  503. this.mmax},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"hasZ",{get:function(){return null!=this.zmin&&null!=this.zmax},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"height",{get:function(){return Math.abs(this.ymax-this.ymin)},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"width",{get:function(){return Math.abs(this.xmax-this.xmin)},enumerable:!0,configurable:!0});h.prototype.centerAt=function(b){var d=this.center;return null!=b.z&&this.hasZ?
  504. this.offset(b.x-d.x,b.y-d.y,b.z-d.z):this.offset(b.x-d.x,b.y-d.y)};h.prototype.clone=function(){var b=new f;b.xmin=this.xmin;b.ymin=this.ymin;b.xmax=this.xmax;b.ymax=this.ymax;b.spatialReference=this.spatialReference;null!=this.zmin&&(b.zmin=this.zmin,b.zmax=this.zmax);null!=this.mmin&&(b.mmin=this.mmin,b.mmax=this.mmax);return b};h.prototype.contains=function(a){if(!a)return!1;var d=this.spatialReference,c=a.spatialReference;d&&c&&!d.equals(c)&&u.canProject(d,c)&&(a=d.isWebMercator?u.geographicToWebMercator(a):
  505. u.webMercatorToGeographic(a,!0));return"point"===a.type?b.extentContainsPoint(this,a):"extent"===a.type?b.extentContainsExtent(this,a):!1};h.prototype.equals=function(b){if(!b)return!1;var d=this.spatialReference,a=b.spatialReference;d&&a&&!d.equals(a)&&u.canProject(d,a)&&(b=d.isWebMercator?u.geographicToWebMercator(b):u.webMercatorToGeographic(b,!0));return this.xmin===b.xmin&&this.ymin===b.ymin&&this.zmin===b.zmin&&this.mmin===b.mmin&&this.xmax===b.xmax&&this.ymax===b.ymax&&this.zmax===b.zmax&&
  506. this.mmax===b.mmax};h.prototype.expand=function(b){b=.5*(1-b);var d=this.width*b,a=this.height*b;this.xmin+=d;this.ymin+=a;this.xmax-=d;this.ymax-=a;this.hasZ&&(d=(this.zmax-this.zmin)*b,this.zmin+=d,this.zmax-=d);this.hasM&&(b*=this.mmax-this.mmin,this.mmin+=b,this.mmax-=b);return this};h.prototype.intersects=function(b){if(!b)return!1;var d=this.spatialReference,a=b.spatialReference;d&&a&&!d.equals(a)&&u.canProject(d,a)&&(b=d.isWebMercator?u.geographicToWebMercator(b):u.webMercatorToGeographic(b,
  507. !0));d=g.getExtentIntersector(b.type);return"mesh"!==b.type?d(this,b):d(this,b.extent)};h.prototype.normalize=function(){var b=this._normalize(!1,!0);return Array.isArray(b)?b:[b]};h.prototype.offset=function(b,d,a){this.xmin+=b;this.ymin+=d;this.xmax+=b;this.ymax+=d;null!=a&&(this.zmin+=a,this.zmax+=a);return this};h.prototype.shiftCentralMeridian=function(){return this._normalize(!0)};h.prototype.union=function(b){this.xmin=Math.min(this.xmin,b.xmin);this.ymin=Math.min(this.ymin,b.ymin);this.xmax=
  508. Math.max(this.xmax,b.xmax);this.ymax=Math.max(this.ymax,b.ymax);if(this.hasZ||b.hasZ)this.zmin=v(Math.min,this.zmin,b.zmin),this.zmax=v(Math.max,this.zmax,b.zmax);if(this.hasM||b.hasM)this.mmin=v(Math.min,this.mmin,b.mmin),this.mmax=v(Math.max,this.mmax,b.mmax);return this};h.prototype.intersection=function(b){if(!this.intersects(b))return null;this.xmin=Math.max(this.xmin,b.xmin);this.ymin=Math.max(this.ymin,b.ymin);this.xmax=Math.min(this.xmax,b.xmax);this.ymax=Math.min(this.ymax,b.ymax);if(this.hasZ||
  509. b.hasZ)this.zmin=v(Math.max,this.zmin,b.zmin),this.zmax=v(Math.min,this.zmax,b.zmax);if(this.hasM||b.hasM)this.mmin=v(Math.max,this.mmin,b.mmin),this.mmax=v(Math.min,this.mmax,b.mmax);return this};h.prototype.toJSON=function(b){return this.write(null,b)};h.prototype._shiftCM=function(b){void 0===b&&(b=t.getInfo(this.spatialReference));if(!b||!this.spatialReference)return this;var d=this.spatialReference,a=this._getCM(b);if(a){var c=d.isWebMercator?u.webMercatorToGeographic(a):a;this.xmin-=a.x;this.xmax-=
  510. a.x;d.isWebMercator||(c.x=this._normalizeX(c.x,b).x);this.spatialReference=new m(n.substitute({Central_Meridian:c.x},d.isWGS84?b.altTemplate:b.wkTemplate))}return this};h.prototype._getCM=function(b){var d=null,a=b.valid;b=a[0];var a=a[1],c=this.xmin,g=this.xmax;c>=b&&c<=a&&g>=b&&g<=a||(d=this.center);return d};h.prototype._normalize=function(b,d,a){var c=this.spatialReference;if(!c)return this;a=a||t.getInfo(c);if(!a)return this;var k=this._getParts(a).map(function(d){return d.extent});if(2>k.length)return k[0]||
  511. this;if(2<k.length)return b?this._shiftCM(a):this.set({xmin:a.valid[0],xmax:a.valid[1]});if(b)return this._shiftCM(a);if(d)return k;var g=!0,e=!0;k.forEach(function(d){d.hasZ||(g=!1);d.hasM||(e=!1)});return{rings:k.map(function(d){var b=[[d.xmin,d.ymin],[d.xmin,d.ymax],[d.xmax,d.ymax],[d.xmax,d.ymin],[d.xmin,d.ymin]];if(g)for(var a=(d.zmax-d.zmin)/2,c=0;c<b.length;c++)b[c].push(a);if(e)for(d=(d.mmax-d.mmin)/2,c=0;c<b.length;c++)b[c].push(d);return b}),hasZ:g,hasM:e,spatialReference:c}};h.prototype._getParts=
  512. function(b){var d=this.cache._parts;if(!d){var d=[],a=this.ymin,c=this.ymax,g=this.spatialReference,e=this.width,q=this.xmin,m=this.xmax,h=void 0;b=b||t.getInfo(g);var l=b.valid,n=l[0],x=l[1],h=this._normalizeX(this.xmin,b),u=h.x,l=h.frameId,h=this._normalizeX(this.xmax,b),w=h.x;b=h.frameId;h=u===w&&0<e;if(e>2*x){e=new f(q<m?u:w,a,x,c,g);q=new f(n,a,q<m?w:u,c,g);m=new f(0,a,x,c,g);a=new f(n,a,0,c,g);c=[];g=[];e.contains(m)&&c.push(l);e.contains(a)&&g.push(l);q.contains(m)&&c.push(b);q.contains(a)&&
  513. g.push(b);for(n=l+1;n<b;n++)c.push(n),g.push(n);d.push({extent:e,frameIds:[l]},{extent:q,frameIds:[b]},{extent:m,frameIds:c},{extent:a,frameIds:g})}else u>w||h?d.push({extent:new f(u,a,x,c,g),frameIds:[l]},{extent:new f(n,a,w,c,g),frameIds:[b]}):d.push({extent:new f(u,a,w,c,g),frameIds:[l]});this.cache._parts=d}b=this.hasZ;a=this.hasM;if(b||a)for(l={},b&&(l.zmin=this.zmin,l.zmax=this.zmax),a&&(l.mmin=this.mmin,l.mmax=this.mmax),b=0;b<d.length;b++)d[b].extent.set(l);return d};h.prototype._normalizeX=
  514. function(b,d){var a=d.valid;d=a[0];var c=a[1],a=2*c,g=0;b>c?(d=Math.ceil(Math.abs(b-c)/a),b-=d*a,g=d):b<d&&(d=Math.ceil(Math.abs(b-d)/a),b+=d*a,g=-d);return{x:b,frameId:g}};e([l.property({dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax spatialReference".split(" ")})],h.prototype,"cache",void 0);e([l.property({readOnly:!0,dependsOn:["cache"]})],h.prototype,"center",null);e([l.property({readOnly:!0,dependsOn:["cache"]})],h.prototype,"extent",null);e([l.property({readOnly:!0,dependsOn:["mmin","mmax"],
  515. json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasM",null);e([l.property({readOnly:!0,dependsOn:["zmin","zmax"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasZ",null);e([l.property({readOnly:!0,dependsOn:["ymin","ymax"]})],h.prototype,"height",null);e([l.property({readOnly:!0,dependsOn:["xmin","xmax"]})],h.prototype,"width",null);e([l.property({type:Number,json:{write:!0}})],h.prototype,"xmin",void 0);e([l.property({type:Number,json:{write:!0}})],h.prototype,"ymin",
  516. void 0);e([l.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],h.prototype,"mmin",void 0);e([l.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,"zmin",void 0);e([l.property({type:Number,json:{write:!0}})],h.prototype,"xmax",void 0);e([l.property({type:Number,json:{write:!0}})],h.prototype,"ymax",void 0);e([l.property({type:Number,json:{origins:{"web-scene":{write:!1}},
  517. write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],h.prototype,"mmax",void 0);e([l.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,"zmax",void 0);return h=f=e([l.subclass("esri.geometry.Extent")],h);var f}(l.declared(h));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/Geometry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators ./SpatialReference".split(" "),
  518. function(a,f,p,e,n,l,h){return function(a){function c(){var b=a.call(this)||this;b.type=null;b.extent=null;b.hasM=!1;b.hasZ=!1;b.spatialReference=h.WGS84;return b}p(c,a);Object.defineProperty(c.prototype,"cache",{get:function(){return{}},enumerable:!0,configurable:!0});c.prototype.clone=function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null};c.prototype.clearCache=function(){this.notifyChange("cache")};c.prototype.getCacheValue=function(b){return this.cache[b]};
  519. c.prototype.setCacheValue=function(b,a){this.cache[b]=a};e([l.property()],c.prototype,"type",void 0);e([l.property({readOnly:!0,dependsOn:["spatialReference"]})],c.prototype,"cache",null);e([l.property({readOnly:!0,dependsOn:["spatialReference"]})],c.prototype,"extent",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,"hasM",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,
  520. "hasZ",void 0);e([l.property({type:h,json:{write:!0}})],c.prototype,"spatialReference",void 0);return c=e([l.subclass("esri.geometry.Geometry")],c)}(l.declared(n))})},"esri/geometry/Point":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Logger ../core/accessorSupport/decorators ./Geometry ./SpatialReference ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b){function g(b){return b&&
  521. ("esri.geometry.SpatialReference"===b.declaredClass||null!=b.wkid)}var t=[0,0],u=n.getLogger("esri.geometry.Point");a=function(a){function h(b,c,d,k,g){b=a.call(this)||this;b.x=0;b.y=0;b.z=void 0;b.m=void 0;b.type="point";return b}p(h,a);f=h;h.copy=function(b,a){a.x=b.x;a.y=b.y;a.z=b.z;a.m=b.m;a.spatialReference=Object.isFrozen(b.spatialReference)?b.spatialReference:b.spatialReference.clone()};h.distance=function(b,a){var d=b.x-a.x,c=b.y-a.y;b=b.hasZ&&a.hasZ?b.z-a.z:0;return Math.sqrt(d*d+c*c+b*b)};
  522. h.prototype.normalizeCtorArgs=function(a,e,d,k,m){var q;if(Array.isArray(a))q=a,m=e,a=q[0],e=q[1],d=q[2],k=q[3];else if(a&&"object"===typeof a){if(q=a,a=null!=q.x?q.x:q.longitude,e=null!=q.y?q.y:q.latitude,d=null!=q.z?q.z:q.altitude,k=q.m,(m=q.spatialReference)&&"esri.geometry.SpatialReference"!==m.declaredClass&&(m=new c(m)),null!=q.longitude||null!=q.latitude)null==q.longitude?u.warn(".longitude\x3d","Latitude was defined without longitude"):null==q.latitude?u.warn(".latitude\x3d","Longitude was defined without latitude"):
  523. !q.declaredClass&&m&&m.isWebMercator&&(e=b.lngLatToXY(q.longitude,q.latitude,t),a=e[0],e=e[1])}else g(d)?(m=d,d=null):g(k)&&(m=k,k=null);a={x:a,y:e};null!=m&&(a.spatialReference=m);null!=d&&(a.z=d);null!=k&&(a.m=k);return a};Object.defineProperty(h.prototype,"hasM",{get:function(){return void 0!==this.m},set:function(b){var a=this._get("hasM");b!==a&&(this._set("m",b?0:void 0),this._set("hasM",b))},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"hasZ",{get:function(){return void 0!==
  524. this.z},set:function(b){var a=this._get("hasZ");b!==a&&(this._set("z",b?0:void 0),this._set("hasZ",b))},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"latitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return b.xyToLngLat(this.x,this.y,t)[1];if(a.isWGS84)return this._get("y")}return null},set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("y",b.lngLatToXY(this.x,a,t)[1]):c.isWGS84&&this._set("y",a),this._set("latitude",
  525. a))},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"longitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return b.xyToLngLat(this._get("x"),this._get("y"),t)[0];if(a.isWGS84)return this._get("x")}return null},set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("x",b.lngLatToXY(a,this._get("y"),t)[0]):c.isWGS84&&this._set("x",a),this._set("longitude",a))},enumerable:!0,configurable:!0});h.prototype.clone=function(){var b=
  526. new f;b.x=this.x;b.y=this.y;b.z=this.z;b.m=this.m;b.spatialReference=this.spatialReference;return b};h.prototype.copy=function(b){f.copy(b,this);return this};h.prototype.equals=function(a){if(!a)return!1;var c=this.x,d=this.y,k=this.z,g=this.m,e=this.spatialReference,m=a.z,h=a.m,l=a.x,f=a.y;a=a.spatialReference;if(!e.equals(a))if(e.isWebMercator&&a.isWGS84)f=b.lngLatToXY(l,f),l=f[0],f=f[1],a=e;else if(e.isWGS84&&a.isWebMercator)f=b.xyToLngLat(l,f),l=f[0],f=f[1],a=e;else return!1;return c===l&&d===
  527. f&&k===m&&g===h&&e.wkid===a.wkid};h.prototype.offset=function(b,a,d){this.x+=b;this.y+=a;null!=d&&this.hasZ&&(this.z+=d);return this};h.prototype.normalize=function(){if(!this.spatialReference)return this;var b=m.getInfo(this.spatialReference);if(!b)return this;var a=this.x,d=b.valid,b=d[0],c=d[1],d=2*c;a>c?(b=Math.ceil(Math.abs(a-c)/d),a-=b*d):a<b&&(b=Math.ceil(Math.abs(a-b)/d),a+=b*d);this._set("x",a);return this};h.prototype.distance=function(b){return f.distance(this,b)};h.prototype.toArray=function(){var b=
  528. this.hasZ,a=this.hasM;return b&&a?[this.x,this.y,this.z,this.m]:b?[this.x,this.y,this.z]:a?[this.x,this.y,this.m]:[this.x,this.y]};h.prototype.toJSON=function(b){return this.write(null,b)};e([l.property({dependsOn:["x","y","z","m","spatialReference"]})],h.prototype,"cache",void 0);e([l.property({type:Boolean,dependsOn:["m"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,"hasM",null);e([l.property({type:Boolean,dependsOn:["z"],json:{write:{enabled:!1,overridePolicy:null}}})],h.prototype,
  529. "hasZ",null);e([l.property({type:Number,dependsOn:["y"]})],h.prototype,"latitude",null);e([l.property({type:Number,dependsOn:["x"]})],h.prototype,"longitude",null);e([l.property({type:Number,json:{write:{isRequired:!0}}})],h.prototype,"x",void 0);e([l.property({type:Number,json:{write:!0}})],h.prototype,"y",void 0);e([l.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],h.prototype,"z",void 0);e([l.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],
  530. h.prototype,"m",void 0);return h=f=e([l.subclass("esri.geometry.Point")],h);var f}(l.declared(h));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/webMercatorUtils":function(){define(["require","exports","../SpatialReference","./spatialReferenceUtils"],function(a,f,p,e){function n(b,a,c,e,h){if("point"===b.type&&"point"===h.type)a=a(b.x,b.y,m,0,e),h.x=a[0],h.y=a[1];else if("extent"===b.type&&"extent"===h.type)g=a(b.xmin,b.ymin,m,0,e),h.xmin=g[0],h.ymin=g[1],a=a(b.xmax,b.ymax,
  531. m,0,e),h.xmax=a[0],h.ymax=a[1];else if("polyline"===b.type&&"polyline"===h.type||"polygon"===b.type&&"polygon"===h.type){var g="polyline"===b.type?b.paths:b.rings,l=[],f=void 0;for(b=0;b<g.length;b++){var q=g[b],f=[];l.push(f);for(var d=0;d<q.length;d++)f.push(a(q[d][0],q[d][1],[0,0],0,e)),2<q[d].length&&f[d].push(q[d][2]),3<q[d].length&&f[d].push(q[d][3])}"polyline"===h.type?h.paths=l:h.rings=l}else if("multipoint"===b.type&&"multipoint"===h.type){g=b.points;l=[];for(b=0;b<g.length;b++)l[b]=a(g[b][0],
  532. g[b][1],[0,0],0,e),2<g[b].length&&l[b].push(g[b][2]),3<g[b].length&&l[b].push(g[b][3]);h.points=l}else if("mesh"===b.type&&"mesh"===h.type&&(g=b.vertexAttributes&&b.vertexAttributes.position,l=h.vertexAttributes&&h.vertexAttributes.position,g))for(f=[0,0],b=0;b<g.length;b+=3)a(g[b],g[b+1],f,0,e),l[b]=f[0],l[b+1]=f[1];h.spatialReference=c;return h;var g}function l(b,a){b=b&&(null!=b.wkid||null!=b.wkt?b:b.spatialReference);a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);return b&&a?e.equals(a,
  533. b)?!0:e.isWebMercator(a)&&e.isWGS84(b)||e.isWebMercator(b)&&e.isWGS84(a):!1}function h(b,a,c,e){void 0===c&&(c=[0,0]);void 0===e&&(e=0);89.99999<a?a=89.99999:-89.99999>a&&(a=-89.99999);a*=.017453292519943;c[e]=111319.49079327169*b;c[e+1]=3189068.5*Math.log((1+Math.sin(a))/(1-Math.sin(a)));return c}function c(b,a,c,e,h){void 0===c&&(c=[0,0]);void 0===e&&(e=0);void 0===h&&(h=!1);b=b/6378137*57.29577951308232;c[e]=h?b:b-360*Math.floor((b+180)/360);c[e+1]=57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*
  534. a/6378137)));return c}Object.defineProperty(f,"__esModule",{value:!0});var m=[0,0];f.canProject=l;f.project=function(b,a){var g=b&&b.spatialReference;a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);return l(g,a)?e.equals(g,a)?b.clone():e.isWebMercator(a)?n(b,h,p.WebMercator,!1,b.clone()):e.isWGS84(a)?n(b,c,p.WGS84,!1,b.clone()):null:null};f.lngLatToXY=h;f.xyToLngLat=c;f.geographicToWebMercator=function(b,a,c){void 0===a&&(a=!1);void 0===c&&(c=b.clone());return n(b,h,p.WebMercator,a,c)};f.webMercatorToGeographic=
  535. function(b,a,e){void 0===a&&(a=!1);void 0===e&&(e=b.clone());return n(b,c,p.WGS84,a,e)}})},"esri/geometry/support/contains":function(){define(["require","exports"],function(a,f){function p(a,e,c,m){return e>=a.xmin&&e<=a.xmax&&c>=a.ymin&&c<=a.ymax?null!=m&&a.hasZ?m>=a.zmin&&m<=a.zmax:!0:!1}function e(a,e){if(a=a.rings)if(Array.isArray(a[0][0])){for(var c=!1,h=0,b=a.length;h<b;h++)c=n(c,a[h],e);e=c}else e=n(!1,a,e);else e=!1;return e}function n(a,e,c){var h=c[0];c=c[1];for(var b=0,g=0,f=e.length;g<
  536. f;g++){b++;b===f&&(b=0);var l=e[g],n=l[0],l=l[1],x=e[b],r=x[0],x=x[1];(l<c&&x>=c||x<c&&l>=c)&&n+(c-l)/(x-l)*(r-n)<h&&(a=!a)}return a}Object.defineProperty(f,"__esModule",{value:!0});f.extentContainsPoint=function(a,e){return p(a,e.x,e.y,e.z)};f.extentContainsExtent=function(a,e){var c=e.xmin,m=e.ymin,b=e.zmin,g=e.xmax,h=e.ymax,f=e.zmax;return a.hasZ&&e.hasZ?p(a,c,m,b)&&p(a,c,h,b)&&p(a,g,h,b)&&p(a,g,m,b)&&p(a,c,m,f)&&p(a,c,h,f)&&p(a,g,h,f)&&p(a,g,m,f):p(a,c,m)&&p(a,c,h)&&p(a,g,h)&&p(a,g,m)};f.extentContainsCoords2D=
  537. function(a,e){return p(a,e[0],e[1])};f.extentContainsCoords3D=function(a,e){return p(a,e[0],e[1],e[2])};f.polygonContainsPoint=function(a,h){return e(a,[h.x,h.y])};f.polygonContainsCoords=e})},"esri/geometry/support/intersects":function(){define(["require","exports","./contains"],function(a,f,p){function e(b,d){return p.extentContainsPoint(b,d)}function n(b,d){var a=b.hasZ&&d.hasZ,c;if(b.xmin<=d.xmin){if(c=d.xmin,b.xmax<c)return!1}else if(c=b.xmin,d.xmax<c)return!1;if(b.ymin<=d.ymin){if(c=d.ymin,
  538. b.ymax<c)return!1}else if(c=b.ymin,d.ymax<c)return!1;if(a&&d.hasZ)if(b.zmin<=d.zmin){if(a=d.zmin,b.zmax<a)return!1}else if(a=b.zmin,d.zmax<a)return!1;return!0}function l(b,d){var a=d.hasZ?p.extentContainsCoords3D:p.extentContainsCoords2D,c=0;for(d=d.points;c<d.length;c++)if(a(b,d[c]))return!0;return!1}function h(b,d){g[0]=b.xmin;g[1]=b.ymax;t[0]=b.xmax;t[1]=b.ymax;u[0]=b.xmin;u[1]=b.ymin;v[0]=b.xmax;v[1]=b.ymin;for(var a=0,c=x;a<c.length;a++)if(p.polygonContainsCoords(d,c[a]))return!0;a=0;for(d=d.rings;a<
  539. d.length;a++)if(c=d[a],c.length){var e=c[0];if(p.extentContainsCoords2D(b,e))return!0;for(var q=1;q<c.length;q++){var h=c[q];if(p.extentContainsCoords2D(b,h)||m(e,h,r))return!0;e=h}}return!1}function c(b,d){g[0]=b.xmin;g[1]=b.ymax;t[0]=b.xmax;t[1]=b.ymax;u[0]=b.xmin;u[1]=b.ymin;v[0]=b.xmax;v[1]=b.ymin;d=d.paths;for(var a=0;a<d.length;a++){var c=d[a];if(d.length){var e=c[0];if(p.extentContainsCoords2D(b,e))return!0;for(var q=1;q<c.length;q++){var h=c[q];if(p.extentContainsCoords2D(b,h)||m(e,h,r))return!0;
  540. e=h}}}return!1}function m(a,d,c){for(var k=0;k<c.length;k++)if(b(a,d,c[k][0],c[k][1]))return!0;return!1}function b(b,d,a,c,g){var k=b[0];b=b[1];var e=d[0];d=d[1];var q=a[0],h=a[1];a=c[0]-q;var q=k-q,m=e-k;c=c[1]-h;var h=b-h,y=d-b,f=c*m-a*y;if(0===f)return!1;a=(a*h-c*q)/f;q=(m*h-y*q)/f;return 0<=a&&1>=a&&0<=q&&1>=q?(g&&(g[0]=k+a*(e-k),g[1]=b+a*(d-b)),!0):!1}Object.defineProperty(f,"__esModule",{value:!0});f.extentIntersectsPoint=e;f.extentIntersectsExtent=n;f.extentIntersectsMultipoint=l;var g=[0,
  541. 0],t=[0,0],u=[0,0],v=[0,0],x=[g,t,u,v],r=[[u,g],[g,t],[t,v],[v,u]];f.extentIntersectsPolygon=h;f.extentIntersectsPolyline=c;var w=[0,0];f.isSelfIntersecting=function(a){for(var d=0;d<a.length;d++){for(var c=a[d],g=0;g<c.length-1;g++)for(var e=c[g],q=c[g+1],h=d+1;h<a.length;h++)for(var m=0;m<a[h].length-1;m++){var f=a[h][m],l=a[h][m+1],t=b(e,q,f,l,w);if(t&&!(w[0]===e[0]&&w[1]===e[1]||w[0]===f[0]&&w[1]===f[1]||w[0]===q[0]&&w[1]===q[1]||w[0]===l[0]&&w[1]===l[1]))return!0}m=c.length;if(!(4>=m))for(g=
  542. 0;g<m-3;g++){var n=m-1;0===g&&(n=m-2);e=c[g];q=c[g+1];for(h=g+2;h<n;h++)if(f=c[h],l=c[h+1],(t=b(e,q,f,l,w))&&!(w[0]===e[0]&&w[1]===e[1]||w[0]===f[0]&&w[1]===f[1]||w[0]===q[0]&&w[1]===q[1]||w[0]===l[0]&&w[1]===l[1]))return!0}}return!1};f.segmentIntersects=b;f.getExtentIntersector=function(b){switch(b){case "esriGeometryEnvelope":case "extent":return n;case "esriGeometryMultipoint":case "multipoint":return l;case "esriGeometryPoint":case "point":return e;case "esriGeometryPolygon":case "polygon":return h;
  543. case "esriGeometryPolyline":case "polyline":return c;case "mesh":return n}}})},"esri/portal/Portal":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper dojo/_base/kernel dojo/_base/lang dojo/_base/url dojo/promise/all ../config ../kernel ../request ../core/Error ../core/global ../core/JSONSupport ../core/Loadable ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ./PortalQueryParams ./PortalQueryResult ./PortalUser".split(" "),
  544. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y,z,A,C){var B,D={Bookmark:function(){return q.create(function(d){return a(["./Bookmark"],d)})},Portal:function(){return q.create(function(d){return a(["./Portal"],d)})},PortalFolder:function(){return q.create(function(d){return a(["./PortalFolder"],d)})},PortalGroup:function(){return q.create(function(d){return a(["./PortalGroup"],d)})},PortalItem:function(){return q.create(function(d){return a(["./PortalItem"],d)})},PortalQueryParams:function(){return q.create(function(d){return a(["./PortalQueryParams"],
  545. d)})},PortalQueryResult:function(){return q.create(function(d){return a(["./PortalQueryResult"],d)})},PortalRating:function(){return q.create(function(d){return a(["./PortalRating"],d)})},PortalUser:function(){return q.create(function(d){return a(["./PortalUser"],d)})}};return function(f){function r(d){d=f.call(this)||this;d.access=null;d.allSSL=!1;d.authMode="auto";d.authorizedCrossOriginDomains=null;d.basemapGalleryGroupQuery=null;d.bingKey=null;d.canListApps=!1;d.canListData=!1;d.canListPreProvisionedItems=
  546. !1;d.canProvisionDirectPurchase=!1;d.canSearchPublic=!1;d.canShareBingPublic=!1;d.canSharePublic=!1;d.canSignInArcGIS=!1;d.canSignInIDP=!1;d.colorSetsGroupQuery=null;d.commentsEnabled=!1;d.created=null;d.culture=null;d.customBaseUrl=null;d.defaultBasemap=null;d.defaultExtent=null;d.defaultVectorBasemap=null;d.description=null;d.eueiEnabled=!1;d.featuredGroups=null;d.featuredItemsGroupQuery=null;d.galleryTemplatesGroupQuery=null;d.livingAtlasGroupQuery=null;d.helperServices=null;d.homePageFeaturedContent=
  547. null;d.homePageFeaturedContentCount=null;d.httpPort=null;d.httpsPort=null;d.id=null;d.ipCntryCode=null;d.isPortal=!1;d.layerTemplatesGroupQuery=null;d.maxTokenExpirationMinutes=null;d.modified=null;d.name=null;d.portalHostname=null;d.portalMode=null;d.portalProperties=null;d.region=null;d.rotatorPanels=null;d.showHomePageDescription=!1;d.supportsHostedServices=!1;d.symbolSetsGroupQuery=null;d.templatesGroupQuery=null;d.units=null;d.url=g.portalUrl;d.urlKey=null;d.user=null;d.useStandardizedQuery=
  548. !1;d.useVectorBasemaps=!1;d.vectorBasemapGalleryGroupQuery=null;return d}e(r,f);w=r;r.prototype.normalizeCtorArgs=function(d){return"string"===typeof d?{url:d}:d};r.prototype.destroy=function(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};r.prototype.readAuthorizedCrossOriginDomains=function(b){if(b)for(var a=0;a<b.length;a++){var c=b[a],k=c;d.hasProtocol(k)||(k=d.appUrl.scheme+"://"+k);d.canUseXhr(k)||g.request.corsEnabledServers.push({host:c,
  549. withCredentials:!0})}return b};r.prototype.readDefaultBasemap=function(d){return d?(d=B.fromJSON(d),d.portalItem={portal:this},d):null};r.prototype.readDefaultVectorBasemap=function(d){return d?(d=B.fromJSON(d),d.portalItem={portal:this},d):null};Object.defineProperty(r.prototype,"extraQuery",{get:function(){var d=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!d?" AND orgid:"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"isOrganization",{get:function(){return!!this.access},
  550. enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"restUrl",{get:function(){var d=this.url;if(d)var b=d.indexOf("/sharing"),d=0<b?d.substring(0,b):this.url.replace(/\/+$/,""),d=d+"/sharing/rest";return d},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"thumbnailUrl",{get:function(){var d=this.restUrl,b=this.thumbnail;return d&&b?this._normalizeSSL(d+"/portals/self/resources/"+b):null},enumerable:!0,configurable:!0});r.prototype.readUrlKey=function(d){return d?d.toLowerCase():
  551. d};r.prototype.readUser=function(d){var b=null;d&&(b=C.fromJSON(d),b.portal=this);return b};r.prototype.load=function(){var d=this,b=q.create(function(d){return a(["../Basemap"],d)}).then(function(d){B=d}).then(function(){return d._fetchSelf()}).then(function(b){if(t.id){var a=t.id;d.credential=a.findCredential(d.restUrl);d.credential||d.authMode!==w.AUTH_MODE_AUTO||(d._esriId_credentialCreateHandle=a.on("credential-create",function(){a.findCredential(d.restUrl)&&d._signIn()}))}d.read(b)});this.addResolvingPromise(b);
  552. return this.when()};r.prototype.fetchBasemaps=function(d){var b=new z;b.query=d||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery);b.disableExtraQuery=!0;return this.queryGroups(b).then(function(d){b.num=100;b.query='type:"Web Map" -type:"Web Application"';return d.total?(d=d.results[0],b.sortField=d.sortField||"name",b.sortOrder=d.sortOrder||"desc",d.queryItems(b)):null}).then(function(d){return d&&d.total?d.results.filter(function(d){return"Web Map"===d.type}).map(function(d){return new B({portalItem:d})}):
  553. []})};r.prototype.fetchFeaturedGroups=function(){var d=this.featuredGroups,b=new z;b.num=100;b.sortField="title";if(d&&d.length){for(var a=[],c=0;c<d.length;c++){var k=d[c];a.push('(title:"'+k.title+'" AND owner:'+k.owner+")")}b.query=a.join(" OR ");return this.queryGroups(b).then(function(d){return d.results})}return q.resolve([])};r.getDefault=function(){w._default||(w._default=new w);return w._default};r.prototype.queryGroups=function(d){return this._queryPortal("/community/groups",d,"PortalGroup")};
  554. r.prototype.queryItems=function(d){return this._queryPortal("/search",d,"PortalItem")};r.prototype.queryUsers=function(d){d.sortField||(d.sortField="username");return this._queryPortal("/community/users",d,"PortalUser")};r.prototype.toJSON=function(){throw new v("internal:not-yet-implemented","Portal.toJSON is not yet implemented");};r.prototype._fetchSelf=function(d){void 0===d&&(d=this.authMode);var b=this.restUrl+"/portals/self";d={authMode:d,query:{culture:h.locale}};"auto"===d.authMode&&(d.authMode=
  555. "no-prompt");return this._request(b,d)};r.prototype._queryPortal=function(d,a,c){var k=this,g=function(c){return k._request(k.restUrl+d,a.toRequestOptions(k)).then(function(d){var b=a.clone();b.start=d.nextStart;return new A({nextQueryParams:b,queryParams:a,total:d.total,results:w._resultsToTypedArray(c,{portal:k},d)})}).then(function(d){return b(d.results.map(function(b){return"function"===typeof b.when?b.when():d})).always(function(){return d})})};return c&&D[c]?D[c]().then(function(d){return g(d)}):
  556. g()};r.prototype._signIn=function(){var d=this;if(this.authMode===w.AUTH_MODE_ANONYMOUS)return q.reject(new v("portal:invalid-auth-mode",'Current "authMode"\' is "'+this.authMode+'"'));if("failed"===this.loadStatus)return q.reject(this.loadError);var b=function(b){return q.resolve().then(function(){if("not-loaded"===d.loadStatus)return b||(d.authMode="immediate"),d.load().then(function(){return null});if("loading"===d.loadStatus)return d.load().then(function(){if(d.credential)return null;d.credential=
  557. b;return d._fetchSelf("immediate")});if(d.user&&d.credential===b)return null;d.credential=b;return d._fetchSelf("immediate")}).then(function(b){b&&d.read(b)})};return t.id?t.id.getCredential(this.restUrl).then(function(d){return b(d)}):b(this.credential)};r.prototype._normalizeSSL=function(d){var b=this.allSSL;b||("isSecureContext"in x?b=x.isSecureContext:x.location&&x.location.origin&&(b=0===x.location.origin.indexOf("https:")));if(this.isPortal){var a=new m(d);return-1<this.portalHostname.toLowerCase().indexOf(a.host.toLowerCase())&&
  558. a.port&&"80"!==a.port&&"443"!==a.port?b?"https://"+a.host+(this.httpsPort&&443!==this.httpsPort?":"+this.httpsPort:"")+a.path+"?"+a.query:"http://"+a.host+(this.httpPort&&80!==this.httpPort?":"+this.httpPort:"")+a.path+"?"+a.query:b?d.replace("http:","https:"):d}return b?d.replace("http:","https:"):d};r.prototype._normalizeUrl=function(d){var b=this.credential&&this.credential.token;return this._normalizeSSL(b?d+(-1<d.indexOf("?")?"\x26":"?")+"token\x3d"+b:d)};r.prototype._requestToTypedArray=function(d,
  559. c,k){var g=this,e=function(a){return g._request(d,c).then(function(d){var c=w._resultsToTypedArray(a,{portal:g},d);return b(c.map(function(b){return"function"===typeof b.when?b.when():d})).always(function(){return c})})};return k?q.create(function(d){return a(["./"+k],d)}).then(function(d){return e(d)}):e()};r.prototype._request=function(d,b){var a=this.authMode===w.AUTH_MODE_ANONYMOUS?"anonymous":"auto",c=null,k="auto",g={f:"json"},e="json";b&&(b.authMode&&(a=b.authMode),b.body&&(c=b.body),b.method&&
  560. (k=b.method),b.query&&(g=p({},g,b.query)),b.responseType&&(e=b.responseType));b={authMode:a,body:c,callbackParamName:"callback",method:k,query:g,responseType:e,timeout:0};return u(this._normalizeSSL(d),b).then(function(d){return d.data})};r._resultsToTypedArray=function(d,b,a){if(a){if(a=a.listings||a.notifications||a.userInvitations||a.tags||a.items||a.groups||a.comments||a.provisions||a.results||a.relatedItems||a,d||b)a=a.map(function(a){a=c.mixin(d?d.fromJSON(a):a,b);"function"===typeof a.load&&
  561. a.load();return a})}else a=[];return a};r.AUTH_MODE_ANONYMOUS="anonymous";r.AUTH_MODE_AUTO="auto";r.AUTH_MODE_IMMEDIATE="immediate";n([k.property()],r.prototype,"access",void 0);n([k.property()],r.prototype,"allSSL",void 0);n([k.property()],r.prototype,"authMode",void 0);n([k.property()],r.prototype,"authorizedCrossOriginDomains",void 0);n([k.reader("authorizedCrossOriginDomains")],r.prototype,"readAuthorizedCrossOriginDomains",null);n([k.property()],r.prototype,"basemapGalleryGroupQuery",void 0);
  562. n([k.property()],r.prototype,"bingKey",void 0);n([k.property()],r.prototype,"canListApps",void 0);n([k.property()],r.prototype,"canListData",void 0);n([k.property()],r.prototype,"canListPreProvisionedItems",void 0);n([k.property()],r.prototype,"canProvisionDirectPurchase",void 0);n([k.property()],r.prototype,"canSearchPublic",void 0);n([k.property()],r.prototype,"canShareBingPublic",void 0);n([k.property()],r.prototype,"canSharePublic",void 0);n([k.property()],r.prototype,"canSignInArcGIS",void 0);
  563. n([k.property()],r.prototype,"canSignInIDP",void 0);n([k.property()],r.prototype,"colorSetsGroupQuery",void 0);n([k.property()],r.prototype,"commentsEnabled",void 0);n([k.property({type:Date})],r.prototype,"created",void 0);n([k.property()],r.prototype,"credential",void 0);n([k.property()],r.prototype,"culture",void 0);n([k.property()],r.prototype,"customBaseUrl",void 0);n([k.property()],r.prototype,"defaultBasemap",void 0);n([k.reader("defaultBasemap")],r.prototype,"readDefaultBasemap",null);n([k.property({type:y})],
  564. r.prototype,"defaultExtent",void 0);n([k.property()],r.prototype,"defaultVectorBasemap",void 0);n([k.reader("defaultVectorBasemap")],r.prototype,"readDefaultVectorBasemap",null);n([k.property()],r.prototype,"description",void 0);n([k.property()],r.prototype,"eueiEnabled",void 0);n([k.property({dependsOn:["user","id","canSearchPublic"],readOnly:!0})],r.prototype,"extraQuery",null);n([k.property()],r.prototype,"featuredGroups",void 0);n([k.property()],r.prototype,"featuredItemsGroupQuery",void 0);n([k.property()],
  565. r.prototype,"galleryTemplatesGroupQuery",void 0);n([k.property()],r.prototype,"livingAtlasGroupQuery",void 0);n([k.property()],r.prototype,"helpBase",void 0);n([k.property()],r.prototype,"helperServices",void 0);n([k.property()],r.prototype,"helpMap",void 0);n([k.property()],r.prototype,"homePageFeaturedContent",void 0);n([k.property()],r.prototype,"homePageFeaturedContentCount",void 0);n([k.property()],r.prototype,"httpPort",void 0);n([k.property()],r.prototype,"httpsPort",void 0);n([k.property()],
  566. r.prototype,"id",void 0);n([k.property()],r.prototype,"ipCntryCode",void 0);n([k.property({dependsOn:["access"],readOnly:!0})],r.prototype,"isOrganization",null);n([k.property()],r.prototype,"isPortal",void 0);n([k.property()],r.prototype,"layerTemplatesGroupQuery",void 0);n([k.property()],r.prototype,"maxTokenExpirationMinutes",void 0);n([k.property({type:Date})],r.prototype,"modified",void 0);n([k.property()],r.prototype,"name",void 0);n([k.property()],r.prototype,"portalHostname",void 0);n([k.property()],
  567. r.prototype,"portalMode",void 0);n([k.property()],r.prototype,"portalProperties",void 0);n([k.property()],r.prototype,"region",void 0);n([k.property({dependsOn:["url"],readOnly:!0})],r.prototype,"restUrl",null);n([k.property()],r.prototype,"rotatorPanels",void 0);n([k.property()],r.prototype,"showHomePageDescription",void 0);n([k.property()],r.prototype,"staticImagesUrl",void 0);n([k.property()],r.prototype,"stylesGroupQuery",void 0);n([k.property()],r.prototype,"supportsHostedServices",void 0);n([k.property()],
  568. r.prototype,"symbolSetsGroupQuery",void 0);n([k.property()],r.prototype,"templatesGroupQuery",void 0);n([k.property()],r.prototype,"thumbnail",void 0);n([k.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],r.prototype,"thumbnailUrl",null);n([k.property()],r.prototype,"units",void 0);n([k.property()],r.prototype,"url",void 0);n([k.property()],r.prototype,"urlKey",void 0);n([k.reader("urlKey")],r.prototype,"readUrlKey",null);n([k.property()],r.prototype,"user",void 0);n([k.reader("user")],
  569. r.prototype,"readUser",null);n([k.property()],r.prototype,"useStandardizedQuery",void 0);n([k.property()],r.prototype,"useVectorBasemaps",void 0);n([k.property()],r.prototype,"vectorBasemapGalleryGroupQuery",void 0);n([l(1,k.cast(z))],r.prototype,"_queryPortal",null);return r=w=n([k.subclass("esri.portal.Portal")],r);var w}(k.declared(r,w))})},"esri/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(a){for(var f,p=1,e=arguments.length;p<e;p++){f=arguments[p];
  570. for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(a[n]=f[n])}return a}})},"esri/core/tsSupport/paramHelper":function(){define([],function(){return function(a,f){return function(p,e){f(p,e,a)}}})},"esri/portal/PortalQueryParams":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/Accessor ../core/kebabDictionary ../core/accessorSupport/decorators ../geometry/Extent ../geometry/SpatialReference ../geometry/support/webMercatorUtils".split(" "),
  571. function(a,f,p,e,n,l,h,c,m,b,g){var t=h({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});return function(a){function h(b){b=a.call(this)||this;b.disableExtraQuery=!1;b.extent=null;b.num=10;b.query=null;b.sortField=null;b.start=1;return b}p(h,a);f=h;Object.defineProperty(h.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(b){"asc"!==b&&"desc"!==b||this._set("sortOrder",b)},enumerable:!0,configurable:!0});h.prototype.clone=
  572. function(){return new f({disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})};h.prototype.toRequestOptions=function(a,c){var e;if(this.extent){var d=g.project(this.extent,b.WGS84);d&&(e=d.xmin+","+d.ymin+","+d.xmax+","+d.ymax)}d=this.query;!this.disableExtraQuery&&a.extraQuery&&(d="("+d+")"+a.extraQuery);a={bbox:e,q:d,num:this.num,sortField:null,sortOrder:null,start:this.start};
  573. this.sortField&&(a.sortField=t.toJSON(this.sortField),a.sortOrder=this.sortOrder);return{query:n.mixin(c,a)}};e([c.property()],h.prototype,"disableExtraQuery",void 0);e([c.property({type:m})],h.prototype,"extent",void 0);e([c.property()],h.prototype,"num",void 0);e([c.property()],h.prototype,"query",void 0);e([c.property()],h.prototype,"sortField",void 0);e([c.property()],h.prototype,"sortOrder",null);e([c.property()],h.prototype,"start",void 0);return h=f=e([c.subclass("esri.portal.PortalQueryParams")],
  574. h);var f}(c.declared(l))})},"esri/core/kebabDictionary":function(){define(["require","exports"],function(a,f){return function(a,e){void 0===e&&(e={});var f=e.ignoreUnknown||!1,l={},h;for(h in a)l[a[h]]=h;var c=function(b){return l.hasOwnProperty(b)?l[b]:f?void 0:b},m=function(b){return a.hasOwnProperty(b)?a[b]:f?void 0:b};return{toJSON:c,fromJSON:m,read:function(b){return m(b)},write:function(b,a,e){b=c(b);void 0!==b&&(a[e]=b)}}}})},"esri/portal/PortalQueryResult":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),
  575. function(a,f,p,e,n,l){return function(a){function c(c){c=a.call(this)||this;c.nextQueryParams=null;c.queryParams=null;c.results=null;c.total=null;return c}p(c,a);e([l.property()],c.prototype,"nextQueryParams",void 0);e([l.property()],c.prototype,"queryParams",void 0);e([l.property()],c.prototype,"results",void 0);e([l.property()],c.prototype,"total",void 0);return c=e([l.subclass("esri.portal.PortalQueryResult")],c)}(l.declared(n))})},"esri/portal/PortalUser":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/promise/all ../core/Error ../core/JSONSupport ../core/promiseUtils ../core/accessorSupport/decorators ./PortalFolder ./PortalGroup".split(" "),
  576. function(a,f,p,e,n,l,h,c,m,b,g){return function(h){function f(){var b=h.call(this)||this;b.access=null;b.created=null;b.culture=null;b.description=null;b.email=null;b.fullName=null;b.modified=null;b.orgId=null;b.portal=null;b.preferredView=null;b.privileges=null;b.region=null;b.role=null;b.roleId=null;b.units=null;b.username=null;b.userType=null;return b}p(f,h);Object.defineProperty(f.prototype,"thumbnailUrl",{get:function(){var b=this.url,a=this.thumbnail;return b&&a?this.portal._normalizeUrl(b+
  577. "/info/"+a+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"userContentUrl",{get:function(){var b=this.get("portal.restUrl");return b?b+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"url",{get:function(){var b=this.get("portal.restUrl");return b?b+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});f.prototype.addItem=function(b){var a=this,c=b&&b.item,g=b&&b.data;b=b&&b.folder;var e=
  578. {method:"post"};c&&(e.query=c._getPostQuery(),null!=g&&("string"===typeof g?e.query.text=g:"object"===typeof g&&(e.query.text=JSON.stringify(g))));g=this.userContentUrl;b&&(g+="/"+b.id);return this.portal._request(g+"/addItem",e).then(function(d){c.id=d.id;c.portal=a.portal;return c.loaded?c._reload():c.load()})};f.prototype.deleteItem=function(b){var a=this.userContentUrl;b.ownerFolder&&(a+="/"+b.ownerFolder);return this.portal._request(a+("/items/"+b.id+"/delete"),{method:"post"}).then(function(){b.id=
  579. null;b.portal=null})};f.prototype.fetchFolders=function(){var a=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(c){return c&&c.folders?c.folders.map(function(c){c=b.fromJSON(c);c.portal=a.portal;return c}):[]})};f.prototype.fetchGroups=function(){var b=this;return this.portal._request(this.url).then(function(a){return a&&a.groups?a.groups.map(function(a){a=g.fromJSON(a);a.portal=b.portal;return a}):[]})};f.prototype.fetchItems=function(b){var g=this;b||(b={});var e=
  580. this.userContentUrl;b.folder&&(e+="/"+b.folder.id);var h;return c.create(function(b){return a(["./PortalItem"],b)}).then(function(a){h=a;return g.portal._request(e,{query:{folders:!1,num:b.num||10,start:b.start||1}})}).then(function(b){var d;return b&&b.items?(d=b.items.map(function(d){d=h.fromJSON(d);d.portal=g.portal;return d}),n(d.map(function(d){return d.load()})).always(function(){return{items:d,nextStart:b.nextStart,total:b.total}})):{items:[],nextStart:-1,total:0}})};f.prototype.getThumbnailUrl=
  581. function(b){var a=this.thumbnailUrl;a&&b&&(a+="\x26w\x3d"+b);return a};f.prototype.queryFavorites=function(b){return this.favGroupId?(this._favGroup||(this._favGroup=new g({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(b)):c.reject(new l("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};f.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};e([m.property()],f.prototype,"access",
  582. void 0);e([m.property({type:Date})],f.prototype,"created",void 0);e([m.property()],f.prototype,"culture",void 0);e([m.property()],f.prototype,"description",void 0);e([m.property()],f.prototype,"email",void 0);e([m.property()],f.prototype,"favGroupId",void 0);e([m.property()],f.prototype,"fullName",void 0);e([m.property({type:Date})],f.prototype,"modified",void 0);e([m.property()],f.prototype,"orgId",void 0);e([m.property()],f.prototype,"portal",void 0);e([m.property()],f.prototype,"preferredView",
  583. void 0);e([m.property()],f.prototype,"privileges",void 0);e([m.property()],f.prototype,"region",void 0);e([m.property()],f.prototype,"role",void 0);e([m.property()],f.prototype,"roleId",void 0);e([m.property()],f.prototype,"thumbnail",void 0);e([m.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],f.prototype,"thumbnailUrl",null);e([m.property()],f.prototype,"units",void 0);e([m.property({dependsOn:["portal.restUrl"],readOnly:!0})],f.prototype,"userContentUrl",null);
  584. e([m.property({dependsOn:["portal.restUrl"],readOnly:!0})],f.prototype,"url",null);e([m.property()],f.prototype,"username",void 0);e([m.property()],f.prototype,"userType",void 0);return f=e([m.subclass("esri.portal.PortalUser")],f)}(m.declared(h))})},"esri/portal/PortalFolder":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l,h){return function(a){function c(b){b=
  585. a.call(this)||this;b.created=null;b.id=null;b.portal=null;b.title=null;b.username=null;return b}p(c,a);Object.defineProperty(c.prototype,"url",{get:function(){var b=this.get("portal.restUrl");return b?b+"/content/users/"+this.username+"/"+this.id:null},enumerable:!0,configurable:!0});c.prototype.toJSON=function(){throw new n("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};e([h.property({type:Date})],c.prototype,"created",void 0);e([h.property()],c.prototype,"id",void 0);
  586. e([h.property()],c.prototype,"portal",void 0);e([h.property()],c.prototype,"title",void 0);e([h.property({dependsOn:["portal.restUrl"],readOnly:!0})],c.prototype,"url",null);e([h.property()],c.prototype,"username",void 0);return c=e([h.subclass("esri.portal.PortalFolder")],c)}(h.declared(l))})},"esri/portal/PortalGroup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators ./PortalQueryParams".split(" "),
  587. function(a,f,p,e,n,l,h,c,m){return function(b){function a(a){a=b.call(this)||this;a.access=null;a.created=null;a.description=null;a.id=null;a.isInvitationOnly=!1;a.modified=null;a.owner=null;a.portal=null;a.snippet=null;a.sortField=null;a.sortOrder=null;a.tags=null;a.title=null;return a}p(a,b);Object.defineProperty(a.prototype,"thumbnailUrl",{get:function(){var b=this.url,a=this.thumbnail;return b&&a?this.portal._normalizeUrl(b+"/info/"+a+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  588. "url",{get:function(){var b=this.get("portal.restUrl");return b?b+"/community/groups/"+this.id:null},enumerable:!0,configurable:!0});a.prototype.fetchMembers=function(){return this.portal._request(this.url+"/users")};a.prototype.getThumbnailUrl=function(b){var a=this.thumbnailUrl;a&&b&&(a+="\x26w\x3d"+b);return a};a.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};a.prototype.queryItems=function(b){b=b?b.clone():new m;b.query="group:"+
  589. this.id+(b.query?" "+b.query:"");return this.portal.queryItems(b)};e([c.property()],a.prototype,"access",void 0);e([c.property({type:Date})],a.prototype,"created",void 0);e([c.property()],a.prototype,"description",void 0);e([c.property()],a.prototype,"id",void 0);e([c.property()],a.prototype,"isInvitationOnly",void 0);e([c.property({type:Date})],a.prototype,"modified",void 0);e([c.property()],a.prototype,"owner",void 0);e([c.property()],a.prototype,"portal",void 0);e([c.property()],a.prototype,"snippet",
  590. void 0);e([c.property()],a.prototype,"sortField",void 0);e([c.property()],a.prototype,"sortOrder",void 0);e([c.property()],a.prototype,"tags",void 0);e([c.property()],a.prototype,"thumbnail",void 0);e([c.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],a.prototype,"thumbnailUrl",null);e([c.property()],a.prototype,"title",void 0);e([c.property({dependsOn:["portal.restUrl"],readOnly:!0})],a.prototype,"url",null);e([n(0,c.cast(m))],a.prototype,"queryItems",null);return a=
  591. e([c.subclass("esri.portal.PortalGroup")],a)}(c.declared(h))})},"esri/portal/PortalItem":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Error ../core/JSONSupport ../core/lang ../core/Loadable ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ./Portal ./PortalRating".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){return function(c){function f(b){b=c.call(this)||this;b.access=null;b.accessInformation=
  592. null;b.appProxies=null;b.avgRating=null;b.created=null;b.culture=null;b.description=null;b.extent=null;b.id=null;b.itemControl=null;b.licenseInfo=null;b.modified=null;b.name=null;b.numComments=null;b.numRatings=null;b.numViews=null;b.owner=null;b.portal=null;b.size=null;b.snippet=null;b.tags=null;b.title=null;b.type=null;b.typeKeywords=null;b.url=null;return b}p(f,c);l=f;Object.defineProperty(f.prototype,"displayName",{get:function(){var b=this.type,d=this.typeKeywords||[],a=b;"Feature Service"===
  593. b||"Feature Collection"===b?a=-1<d.indexOf("Table")?"Table":-1<d.indexOf("Route Layer")?"Route Layer":-1<d.indexOf("Markup")?"Markup":"Feature Layer":"Image Service"===b?a=-1<d.indexOf("Elevation 3D Layer")?"Elevation Layer":"Imagery Layer":"Scene Service"===b?a="Scene Layer":"Scene Package"===b?a="Scene Layer Package":"Stream Service"===b?a="Feature Layer":"Geoprocessing Service"===b&&this.portal&&this.portal.isPortal?a=-1<d.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===
  594. b?a="Locator":"Microsoft Powerpoint"===b?a="Microsoft PowerPoint":"GeoJson"===b?a="GeoJSON":"Globe Service"===b?a="Globe Layer":"Vector Tile Service"===b?a="Tile Layer":"netCDF"===b?a="NetCDF":"Map Service"===b?a=-1===d.indexOf("Spatiotemporal")&&(-1<d.indexOf("Hosted Service")||-1<d.indexOf("Tiled"))?"Tile Layer":"Map Image Layer":b&&-1<b.toLowerCase().indexOf("add in")?a=b.replace(/(add in)/ig,"Add-In"):"datastore catalog service"===b&&(a="Big Data File Share");return a},enumerable:!0,configurable:!0});
  595. f.prototype.readExtent=function(b){return b&&b.length?new t(b[0][0],b[0][1],b[1][0],b[1][1]):null};Object.defineProperty(f.prototype,"iconUrl",{get:function(){var b=this.type&&this.type.toLowerCase()||"",d=this.typeKeywords||[],c=!1,g=!1,e=!1,h=!1,m=!1;0<b.indexOf("service")||"feature collection"===b||"kml"===b||"wms"===b||"wmts"===b||"wfs"===b?(c=-1<d.indexOf("Hosted Service"),"feature service"===b||"feature collection"===b||"kml"===b||"wfs"===b?(g=-1<d.indexOf("Table"),e=-1<d.indexOf("Route Layer"),
  596. h=-1<d.indexOf("Markup"),b=(m=-1!==d.indexOf("Spatiotemporal"))&&g?"spatiotemporaltable":g?"table":e?"routelayer":h?"markup":m?"spatiotemporal":c?"featureshosted":"features"):b="map service"===b||"wms"===b||"wmts"===b?c||-1<d.indexOf("Tiled")||"wmts"===b?"maptiles":"mapimages":"scene service"===b?-1<d.indexOf("Line")?"sceneweblayerline":-1<d.indexOf("3DObject")?"sceneweblayermultipatch":-1<d.indexOf("Point")?"sceneweblayerpoint":-1<d.indexOf("IntegratedMesh")?"sceneweblayermesh":-1<d.indexOf("PointCloud")?
  597. "sceneweblayerpointcloud":-1<d.indexOf("Polygon")?"sceneweblayerpolygon":"sceneweblayer":"image service"===b?-1<d.indexOf("Elevation 3D Layer")?"elevationlayer":"imagery":"stream service"===b?"streamlayer":"vector tile service"===b?"vectortile":"datastore catalog service"===b?"datastorecollection":"geocoding service"===b?"geocodeservice":"geoprocessing service"===b?-1<d.indexOf("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"layers"):b="web map"===b||"cityengine web scene"===b?"maps":
  598. "web scene"===b?-1<d.indexOf("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===b||"mobile application"===b||"application"===b||"operation view"===b||"desktop application"===b?"apps":"map document"===b||"map package"===b||"published map"===b||"scene document"===b||"globe document"===b||"basemap package"===b||"mobile basemap package"===b||"mobile map package"===b||"project package"===b||"project template"===b||"pro map"===b||"layout"===b||"layer"===b&&-1<d.indexOf("ArcGIS Pro")||
  599. "explorer map"===b&&d.indexOf("Explorer Document")?"mapsgray":"service definition"===b||"csv"===b||"shapefile"===b||"cad drawing"===b||"geojson"===b||"360 vr experience"===b||"netCDF"===b?"datafiles":"explorer add in"===b||"desktop add in"===b||"windows viewer add in"===b||"windows viewer configuration"===b?"appsgray":"arcgis pro add in"===b||"arcgis pro configuration"===b?"addindesktop":"rule package"===b||"file geodatabase"===b||"sqlite geodatabase"===b||"csv collection"===b||"kml collection"===
  600. b||"windows mobile package"===b||"map template"===b||"desktop application template"===b||"arcpad package"===b||"code sample"===b||"form"===b||"document link"===b||"operations dashboard add in"===b||"rules package"===b||"image"===b||"workflow manager package"===b||"explorer map"===b&&-1<d.indexOf("Explorer Mapping Application")||-1<d.indexOf("Document")?"datafilesgray":"network analysis service"===b||"geoprocessing service"===b||"geodata service"===b||"geometry service"===b||"geoprocessing package"===
  601. b||"locator package"===b||"geoprocessing sample"===b||"workflow manager service"===b?"toolsgray":"layer"===b||"layer package"===b||"explorer layer"===b?"layersgray":"scene package"===b?"scenepackage":"tile package"===b?"tilepackage":"task file"===b?"taskfile":"report template"===b?"report-template":"statistical data collection"===b?"statisticaldatacollection":"insights workbook"===b?"workbook":"insights model"===b?"insightsmodel":"insights page"===b?"insightspage":"hub initiative"===b?"hubinitiative":
  602. "hubpage"===b?"hubpage":"hub site application"===b?"hubsite":"relational database connection"===b?"relationaldatabaseconnection":"big data file share"===b?"datastorecollection":"image collection"===b?"imagecollection":"style"===b?"style":"desktop style"===b?"desktopstyle":"dashboard"===b?"dashboard":"raster function template"===b?"rasterprocessingtemplate":"vector tile package"===b?"vectortilepackage":"ortho mapping project"===b?"orthomappingproject":"ortho mapping template"===b?"orthomappingtemplate":
  603. "maps";return b?a.toUrl("../images/portal/"+b+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service;WMTS;WMS".split(";").indexOf(this.type)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"itemUrl",{get:function(){var b=this.get("portal.restUrl");return b?b+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});
  604. Object.defineProperty(f.prototype,"thumbnailUrl",{get:function(){var b=this.itemUrl,d=this.thumbnail;return b&&d?this.portal._normalizeUrl(b+"/info/"+d+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"userItemUrl",{get:function(){var b=this.get("portal.restUrl");if(!b)return null;var d=this.owner||this.get("portal.user.username");return d?b+"/content/users/"+(this.ownerFolder?d+"/"+this.ownerFolder:d)+"/items/"+this.id:null},enumerable:!0,configurable:!0});f.prototype.load=
  605. function(){var b=this;this.portal||(this.portal=u.getDefault());var d=this.portal.load().then(function(){return b.resourceInfo?b.resourceInfo:b.id&&b.itemUrl?b.portal._request(b.itemUrl):{}}).then(function(d){b.resourceInfo=d;b.read(d)});this.addResolvingPromise(d);return this.when()};f.prototype.addRating=function(b){var d={method:"post",query:{}};b instanceof v&&(b=b.rating);isNaN(b)||"number"!==typeof b||(d.query.rating=b);return this.portal._request(this.itemUrl+"/addRating",d).then(function(){return new v({rating:b,
  606. created:new Date})})};f.prototype.deleteRating=function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};f.prototype.fetchData=function(b){void 0===b&&(b="json");return this.portal._request(this.itemUrl+"/data",{responseType:b})};f.prototype.fetchRating=function(){return this.portal._request(this.itemUrl+"/rating").then(function(b){return null!=b.rating?(b.created=new Date(b.created),new v(b)):null})};f.prototype.fetchRelatedItems=function(b){return this.portal._requestToTypedArray(this.itemUrl+
  607. "/relatedItems",{query:b},"PortalItem")};f.prototype.getThumbnailUrl=function(b){var d=this.thumbnailUrl;d&&b&&(d+="\x26w\x3d"+b);return d};f.prototype.update=function(b){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var a=b&&b.data,c={method:"post"};c.query=d._getPostQuery();for(var g in c.query)null===c.query[g]&&(c.query[g]="");c.query.clearEmptyFields=!0;null!=a&&("string"===typeof a?c.query.text=a:"object"===typeof a&&(c.query.text=JSON.stringify(a)));
  608. return d.portal._request(d.userItemUrl+"/update",c).then(function(){return d._reload()})}):m.reject(new n("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};f.prototype.updateThumbnail=function(a){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var c=a.thumbnail,g={method:"post"};if("string"===typeof c)b.isDataProtocol(c)?g.query={data:c}:g.query={url:b.makeAbsolute(c)};else{var e=new FormData;e.append("file",c);g.body=
  609. e}return d.portal._request(d.userItemUrl+"/updateThumbnail",g).then(function(){return d._reload()})}):m.reject(new n("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};f.prototype.toJSON=function(){var b=this.extent,b={created:this.created&&this.created.getTime(),description:this.description,extent:b&&[[b.xmin,b.ymin],[b.xmax,b.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,
  610. tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return h.fixJson(b)};f.fromJSON=function(b){if(!b)return null;if(b.declaredClass)throw Error("JSON object is already hydrated");return new l({resourceInfo:b})};f.prototype._reload=function(){var b=this;return this.portal._request(this.itemUrl,{query:{_ts:(new Date).getTime()}}).then(function(d){b.resourceInfo=d;b.read(d);return b})};f.prototype._getPostQuery=function(){var b=this.toJSON(),
  611. d;for(d in b)"tags"===d&&null!==b[d]&&(b[d]=b[d].join(", ")),"typeKeywords"===d&&null!==b[d]&&(b[d]=b[d].join(", "));return b};e([g.property()],f.prototype,"access",void 0);e([g.property()],f.prototype,"accessInformation",void 0);e([g.property()],f.prototype,"appProxies",void 0);e([g.property()],f.prototype,"avgRating",void 0);e([g.property({type:Date})],f.prototype,"created",void 0);e([g.property()],f.prototype,"culture",void 0);e([g.property()],f.prototype,"description",void 0);e([g.property({dependsOn:["type",
  612. "typeKeywords"],readOnly:!0})],f.prototype,"displayName",null);e([g.property({type:t})],f.prototype,"extent",void 0);e([g.reader("extent")],f.prototype,"readExtent",null);e([g.property({dependsOn:["type","typeKeywords"],readOnly:!0})],f.prototype,"iconUrl",null);e([g.property()],f.prototype,"id",void 0);e([g.property({dependsOn:["type"],readOnly:!0})],f.prototype,"isLayer",null);e([g.property()],f.prototype,"itemControl",void 0);e([g.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],f.prototype,
  613. "itemUrl",null);e([g.property()],f.prototype,"licenseInfo",void 0);e([g.property({type:Date})],f.prototype,"modified",void 0);e([g.property()],f.prototype,"name",void 0);e([g.property()],f.prototype,"numComments",void 0);e([g.property()],f.prototype,"numRatings",void 0);e([g.property()],f.prototype,"numViews",void 0);e([g.property()],f.prototype,"owner",void 0);e([g.property()],f.prototype,"ownerFolder",void 0);e([g.property({type:u})],f.prototype,"portal",void 0);e([g.property()],f.prototype,"resourceInfo",
  614. void 0);e([g.property()],f.prototype,"size",void 0);e([g.property()],f.prototype,"snippet",void 0);e([g.property()],f.prototype,"tags",void 0);e([g.property()],f.prototype,"thumbnail",void 0);e([g.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],f.prototype,"thumbnailUrl",null);e([g.property()],f.prototype,"title",void 0);e([g.property()],f.prototype,"type",void 0);e([g.property()],f.prototype,"typeKeywords",void 0);e([g.property()],f.prototype,"url",void 0);e([g.property({dependsOn:["portal.restUrl",
  615. "portal.user.username","owner","ownerFolder","id"],readOnly:!0})],f.prototype,"userItemUrl",null);return f=l=e([g.subclass("esri.portal.PortalItem")],f);var l}(g.declared(l,c))})},"esri/portal/PortalRating":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){return function(a){function c(c){c=a.call(this)||this;c.created=null;c.rating=null;return c}p(c,a);e([l.property()],
  616. c.prototype,"created",void 0);e([l.property()],c.prototype,"rating",void 0);return c=e([l.subclass("esri.portal.PortalRating")],c)}(l.declared(n))})},"esri/support/basemapDefinitions":function(){define(["require","exports","dojo/i18n!../nls/basemaps"],function(a,f,p){return{streets:{id:"streets",title:p.streets,thumbnailUrl:a.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",
  617. title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",title:p.satellite,thumbnailUrl:a.toUrl("../images/basemap/satellite.jpg"),baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",title:p.hybrid,thumbnailUrl:a.toUrl("../images/basemap/hybrid.jpg"),baseMapLayers:[{id:"hybrid-base-layer",
  618. url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",title:p.terrain,thumbnailUrl:a.toUrl("../images/basemap/terrain.jpg"),
  619. baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",
  620. title:p.topo,thumbnailUrl:a.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",title:p.gray,thumbnailUrl:a.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",
  621. title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",title:p["dark-gray"],thumbnailUrl:a.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",
  622. layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",title:p.oceans,thumbnailUrl:a.toUrl("../images/basemap/oceans.jpg"),baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",
  623. layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",title:p["national-geographic"],thumbnailUrl:a.toUrl("../images/basemap/national-geographic.jpg"),baseMapLayers:[{id:"national-geographic-base-layer",
  624. url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",title:p.osm,thumbnailUrl:a.toUrl("../images/basemap/osm.jpg"),baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",title:p["dark-gray"],thumbnailUrl:a.toUrl("../images/basemap/dark-gray.jpg"),
  625. baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/c11ce4f7801740b2905eb03ddc963ac8/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Dark Gray",visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",title:p.gray,thumbnailUrl:a.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/8a2cba3b0ebf4140b7c0dc5ee149549a/resources/styles/root.json",layerType:"VectorTileLayer",
  626. title:"World Light Gray",visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",title:p.streets,thumbnailUrl:a.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",title:p.topo,thumbnailUrl:a.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-vector-base-layer",
  627. styleUrl:"//www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",title:p["streets-night-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-night.jpg"),baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",
  628. title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",title:p["streets-relief-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-relief.jpg"),baseMapLayers:[{id:"streets-relief-vector-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Streets Relief Base",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-reference-layer",
  629. styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief Reference",layerType:"VectorTileLayer",showLegend:!1,visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",title:p["streets-navigation-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-navigation.jpg"),baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",
  630. layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/Ground":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper dojo/_base/lang ./core/Collection ./core/collectionUtils ./core/Error ./core/JSONSupport ./core/Loadable ./core/Logger ./core/promiseUtils ./core/accessorSupport/decorators ./layers/Layer ./layers/support/types".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=l.ofType(v),w=g.getLogger("esri.Ground");
  631. return function(b){function d(d){var a=b.call(this)||this;a.layers=new r;a.layers.on("after-add",function(d){d=d.item;d.parent&&d.parent!==a&&"remove"in d.parent&&d.parent.remove(d);d.parent=a;x.isOfType(d,["elevation","base-elevation"])||w.error("Layer '"+d.title+", id:"+d.id+"' of type '"+d.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});a.layers.on("after-remove",function(d){d.item.parent=null});return a}p(d,b);k=d;d.prototype.initialize=
  632. function(){this.when().catch(function(d){w.error("#load()","Failed to load ground",d)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};d.prototype.normalizeCtorArgs=function(d){d&&"resourceInfo"in d&&(this._set("resourceInfo",d.resourceInfo),d=n.mixin({},d),delete d.resourceInfo);return d};Object.defineProperty(d.prototype,"layers",{set:function(d){this._set("layers",h.referenceSetter(d,this._get("layers"),r))},enumerable:!0,configurable:!0});d.prototype.writeLayers=
  633. function(d,b,a,k){var g=[];d&&(k=n.mixin({},k,{layerContainerType:"ground"}),d.forEach(function(d){if(d.write){var b={};d.write(b,k)&&g.push(b)}else k&&k.messages&&k.messages.push(new c("layer:unsupported","Layers ("+d.title+", "+d.id+") of type '"+d.declaredClass+"' cannot be persisted in the ground",{layer:d}))}));b.layers=g};d.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};d.prototype.queryElevation=function(d,b){var c=this;return t.create(function(d){return a(["./layers/support/ElevationQuery"],
  634. d)}).then(function(a){a=new a.ElevationQuery;var k=c.layers.filter(function(d){return"elevation"===d.type}).toArray();return a.queryAll(k,d,b)})};d.prototype.createElevationSampler=function(d,b){var c=this;return t.create(function(d){return a(["./layers/support/ElevationQuery"],d)}).then(function(a){a=new a.ElevationQuery;var k=c.layers.filter(function(d){return"elevation"===d.type}).toArray();return a.createSamplerAll(k,d,b)})};d.prototype.clone=function(){var d={resourceInfo:this.resourceInfo,layers:this.layers.slice()};
  635. this.loaded&&(d.loadStatus="loaded");return new k(d)};d.prototype.read=function(d,b){this.resourceInfo||this._set("resourceInfo",{data:d,context:b});return this.inherited(arguments)};d.prototype._loadFromSource=function(){var d=this.resourceInfo;return d?this._loadLayersFromJSON(d.data,d.context):t.resolve(null)};d.prototype._loadLayersFromJSON=function(d,b){var c=this,k=b&&b.origin||"web-scene",g=b&&b.portal||null,e=b&&b.url||null;return t.create(function(d){return a(["./portal/support/layersCreator"],
  636. d)}).then(function(b){var a=[];d.layers&&Array.isArray(d.layers)&&a.push.apply(a,b.populateOperationalLayers(c.layers,d.layers,{context:{origin:k,url:e,portal:g,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"}));return t.eachAlways(a)}).then(function(){})};e([u.property({type:r,json:{read:!1}}),u.cast(h.castForReferenceSetter)],d.prototype,"layers",null);e([u.writer("layers")],d.prototype,"writeLayers",null);e([u.property({readOnly:!0})],d.prototype,"resourceInfo",
  637. void 0);return d=k=e([u.subclass("esri.Ground")],d);var k}(u.declared(m,b))})},"esri/layers/support/types":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.isOfType=function(a,e){a=a.constructor._meta;if(!a||!a.bases)return!1;a=a.bases;var f=Array.isArray(e);return a.some(function(a){a=a.__accessorMetadata__;if(!a)return!1;a=a.properties;if(!a||!a.type||!a.type.value)return!1;a=a.type.value;return f?-1!==e.indexOf(a):a===e})}})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Collection ./Handles ./accessorSupport/decorators".split(" "),
  638. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this)||this;b._handles=new l;b.root=null;b.refresh=b.refresh.bind(b);b.updateCollections=b.updateCollections.bind(b);return b}p(c,a);c.prototype.initialize=function(){var b=this;this._handles.add(this.rootCollectionNames.map(function(a){return b.watch("root."+a,b.updateCollections,!0)}));this.updateCollections()};c.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};c.prototype.updateCollections=
  639. function(){var b=this;this._collections=this.rootCollectionNames.map(function(a){return b.get("root."+a)}).filter(function(b){return null!=b});this.refresh()};c.prototype.refresh=function(){var b=this._handles;b.remove("collections");this.removeAll();for(var a=this._collections.slice(),c=0,e=this._collections;c<e.length;c++)this._processCollection(a,this,e[c]);for(c=0;c<a.length;c++)b.add(a[c].on("after-changes",this.refresh),"collections")};c.prototype._createNewInstance=function(b){return new n(b)};
  640. c.prototype._processCollection=function(b,a,c){var g=this;c&&(b.push(c),c.forEach(function(c){c&&(a.push(c),g._processCollection(b,a,g.getChildrenFunction(c)))}))};e([h.property()],c.prototype,"rootCollectionNames",void 0);e([h.property()],c.prototype,"root",void 0);e([h.property()],c.prototype,"getChildrenFunction",void 0);return c=e([h.subclass("esri.core.CollectionFlattener")],c)}(h.declared(n))})},"esri/core/Handles":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Accessor ./Collection ./accessorSupport/decorators".split(" "),
  641. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this)||this;b._groups=new Map;return b}p(c,a);c.prototype.destroy=function(){this.removeAll()};Object.defineProperty(c.prototype,"size",{get:function(){var b=0;this._groups.forEach(function(a){b+=a.length});return b},enumerable:!0,configurable:!0});c.prototype.add=function(b,a){if(!this._isHandle(b)&&!Array.isArray(b)&&!l.isCollection(b))return this;var c=this._getOrCreateGroup(a);Array.isArray(b)||l.isCollection(b)?b.forEach(function(b){return c.push(b)}):
  642. c.push(b);this.notifyChange("size");return this};c.prototype.has=function(b){return this._groups.has(this._ensureGroupKey(b))};c.prototype.remove=function(b){if(Array.isArray(b)||l.isCollection(b))return b.forEach(this.remove,this),this;if(!this.has(b))return this;for(var a=this._getGroup(b),c=0;c<a.length;c++)a[c].remove();this._deleteGroup(b);this.notifyChange("size");return this};c.prototype.removeAll=function(){this._groups.forEach(function(b){for(var a=0;a<b.length;a++)b[a].remove()});this._groups.clear();
  643. this.notifyChange("size");return this};c.prototype._isHandle=function(b){return b&&!!b.remove};c.prototype._getOrCreateGroup=function(b){if(this.has(b))return this._getGroup(b);var a=[];this._groups.set(this._ensureGroupKey(b),a);return a};c.prototype._getGroup=function(b){return this._groups.get(this._ensureGroupKey(b))};c.prototype._deleteGroup=function(b){return this._groups.delete(this._ensureGroupKey(b))};c.prototype._ensureGroupKey=function(b){return b||"_default_"};e([h.property({readOnly:!0})],
  644. c.prototype,"size",null);return c=e([h.subclass("esri.core.Handles")],c)}(h.declared(n))})},"esri/support/basemapUtils":function(){define("require exports ../Basemap ../core/Collection ../core/Logger ../core/urlUtils ../core/accessorSupport/ensureType ./basemapDefinitions".split(" "),function(a,f,p,e,n,l,h,c){function m(b,a){var k;if("string"===typeof b){if(!(b in c))return a=Object.keys(c).map(function(d){return'"'+d+'"'}).join(", "),d.warn("Unable to find basemap definition for: "+b+". Try one of these: "+
  645. a),null;a&&(k=a[b]);k||(k=p.fromId(b),a&&(a[b]=k))}else k=h.default(p,b);return k}function b(d,b){return d.map(function(d){return b.find(function(b){var a=u(d);b=u(b);return a.type===b.type&&a.url===b.url})||d})}function g(d){return d?!d.loaded&&d.resourceInfo?v(d.resourceInfo.data):{baseLayers:t(d.baseLayers),referenceLayers:t(d.referenceLayers)}:null}function t(d){return(e.isCollection(d)?d.toArray():d).map(u)}function u(d){return{type:d.type,url:q(d.urlTemplate||d.url||d.styleUrl)}}function v(d){return d?
  646. {baseLayers:x(d.baseMapLayers.filter(function(d){return!d.isReference})),referenceLayers:x(d.baseMapLayers.filter(function(d){return d.isReference}))}:null}function x(d){return d.map(function(d){var b;switch(d.layerType){case "VectorTileLayer":b="vector-tile";break;case "ArcGISTiledMapServiceLayer":b="tile";break;default:b="unknown"}return{type:b,url:q(d.templateUrl||d.urlTemplate||d.styleUrl||d.url)}})}function r(d,b,a){return null!=d!==(null!=b)?"not-equal":d?w(d.baseLayers,b.baseLayers)?w(d.referenceLayers,
  647. b.referenceLayers)?"equal":a.mustMatchReferences?"not-equal":"base-layers-equal":"not-equal":"equal"}function w(d,b){return d.length!==b.length?!1:!d.some(function(d){return!b.some(function(b){return d.type===b.type&&d.url===b.url})})}function q(d){return d?l.normalize(d).replace(/^\s*https?:/i,"").toLowerCase():""}Object.defineProperty(f,"__esModule",{value:!0});var d=n.getLogger("esri.support.basemapUtils");f.createCache=function(){return{}};f.ensureType=m;f.clonePreservingTiledLayers=function(d,
  648. a){void 0===a&&(a=null);d=m(d);if(!d)return null;var c=new p({id:d.id,title:d.title,baseLayers:d.baseLayers.slice(),referenceLayers:d.referenceLayers.slice()});a&&(c.baseLayers=b(c.baseLayers,a.baseLayers),c.referenceLayers=b(c.referenceLayers,a.referenceLayers));c.load();c.portalItem=d.portalItem;return c};f.getWellKnownBasemapId=function(d){var b=null;d=g(d);for(var a in c){var k=v(c[a]),k=r(d,k,{mustMatchReferences:!1});if("equal"===k){b=a;break}else"base-layers-equal"===k&&(b=a)}return b};f.contentEquals=
  649. function(d,b){if(d===b)return!0;d=g(d);b=g(b);return"equal"===r(d,b,{mustMatchReferences:!0})}})},"esri/support/groundUtils":function(){define("require exports ../Ground ../core/Logger ../core/accessorSupport/ensureType ../layers/ElevationLayer".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});var h=e.getLogger("esri.support.groundUtils");f.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"}};
  650. f.ensureType=function(a){var c;"string"===typeof a?a in f.groundElevationLayers?(a=f.groundElevationLayers[a],a=new l({id:a.id,url:a.url}),c=new p({layers:[a]})):h.warn("Unable to find ground definition for: "+a+'. Try "world-elevation"'):c=n.default(p,a);return c}})},"esri/layers/ElevationLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/kernel dojo/_base/lang ../request ../core/Error ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/HeightModelInfo ./TiledLayer ./mixins/ArcGISCachedService ./mixins/ArcGISMapService ./mixins/OperationalLayer ./mixins/PortalLayer ./support/rasterFormats/LercCodec".split(" "),
  651. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q){return function(d){function k(b){b=d.call(this)||this;b.heightModelInfo=null;b.type="elevation";b.url=null;b.opacity=1;b.operationalLayerType="ArcGISTiledElevationServiceLayer";return b}p(k,d);k.prototype.normalizeCtorArgs=function(d,b){return"string"===typeof d?l.mixin({},{url:d},b):d};Object.defineProperty(k.prototype,"minScale",{get:function(){},set:function(d){n.deprecated(this.declaredClass+".minScale support has been removed.","","4.5")},enumerable:!0,
  652. configurable:!0});Object.defineProperty(k.prototype,"maxScale",{get:function(){},set:function(d){n.deprecated(this.declaredClass+".maxScale support has been removed.","","4.5")},enumerable:!0,configurable:!0});k.prototype.load=function(){var d=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:function(d){for(var b=0;b<d.typeKeywords.length;b++)if("elevation 3d layer"===d.typeKeywords[b].toLowerCase())return!0;throw new c("portal:invalid-layer-item-type",
  653. "Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"});}}).always(function(){return d._fetchImageService()}));return this.when()};k.prototype.fetchTile=function(d,b,a,c){var k=this;void 0===c&&(c=0);return this.load().then(function(){return k._fetchTileAvailability(d,b,a)}).then(function(){var c=k.getTileUrl(d,b,a);return h(c,{responseType:"array-buffer",failOk:!0})}).then(function(d){d=q.decode(d.data,{noDataValue:c,
  654. returnFileInfo:!0});return{values:d.pixelData,width:d.width,height:d.height,maxZError:d.fileInfo.maxZError,noDataValue:d.noDataValue}})};k.prototype.queryElevation=function(d,b){var c=this;return m.create(function(d){return a(["./support/ElevationQuery"],d)}).then(function(a){return(new a.ElevationQuery).query(c,d,b)})};k.prototype.createElevationSampler=function(d,b){var c=this;return m.create(function(d){return a(["./support/ElevationQuery"],d)}).then(function(a){return(new a.ElevationQuery).createSampler(c,
  655. d,b)})};k.prototype.importLayerViewModule=function(d){switch(d.type){case "2d":return m.reject(new c("elevation-layer:view-not-supported","ElevationLayer is only supported in 3D"));case "3d":return m.create(function(d){return a(["../views/3d/layers/ElevationLayerView3D"],d)})}};k.prototype._fetchTileAvailability=function(d,b,a){return this.tilemapCache?this.tilemapCache.fetchAvailability(d,b,a):m.resolve("unknown")};k.prototype._fetchImageService=function(){var d=this;return m.resolve().then(function(){if(d.resourceInfo)return d.resourceInfo;
  656. var b={query:l.mixin({f:"json"},d.parsedUrl.query),responseType:"json",callbackParamName:"callback"};return h(d.parsedUrl.path,b)}).then(function(b){b.ssl&&(d.url=d.url.replace(/^http:/i,"https:"));d.read(b.data,{origin:"service",url:d.parsedUrl})})};e([g.property({readOnly:!0,type:t})],k.prototype,"heightModelInfo",void 0);e([g.property({json:{read:!1,write:!1}})],k.prototype,"minScale",null);e([g.property({json:{read:!1,write:!1}})],k.prototype,"maxScale",null);e([g.property()],k.prototype,"resourceInfo",
  657. void 0);e([g.property({json:{read:!1},value:"elevation",readOnly:!0})],k.prototype,"type",void 0);e([g.property({json:{origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writer:b.writeOperationalLayerUrl}}}}})],k.prototype,"url",void 0);e([g.property({json:{read:!1,write:!1}})],k.prototype,"opacity",void 0);e([g.property()],k.prototype,"operationalLayerType",void 0);return k=e([g.subclass("esri.layers.ElevationLayer")],k)}(g.declared(u,x,v,r,w))})},"esri/geometry/HeightModelInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/JSONSupport ../core/kebabDictionary ../core/Warning ../core/accessorSupport/decorators ./support/scaleUtils".split(" "),
  658. function(a,f,p,e,n,l,h,c,m,b){function g(b,a){return new c("height-unit:unsupported","Height unit of value '"+b+"' is not supported",a)}function t(b,a){return new c("height-model:unsupported","Height model of value '"+b+"' is not supported",a)}var u=h({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"},{ignoreUnknown:!0}),v=h({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links",
  659. "sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"},{ignoreUnknown:!0});return function(a){function c(b){b=a.call(this)||this;b.heightModel="gravity-related-height";b.heightUnit="meters";b.vertCRS=
  660. null;return b}p(c,a);h=c;c.prototype.writeHeightModel=function(b,d,a){return u.write(b,d,a)};c.prototype.readHeightModel=function(b,d,a){if(d=u.read(b))return d;a&&a.messages&&a.messages.push(t(b,{context:a}));return null};c.prototype.readHeightUnit=function(b,d,a){if(d=v.read(b))return d;a&&a.messages&&a.messages.push(g(b,{context:a}));return null};c.prototype.readHeightUnitService=function(a,d,c){if(d=b.unitFromRESTJSON(a)||v.read(a))return d;c&&c.messages&&c.messages.push(g(a,{context:c}));return null};
  661. c.prototype.readVertCRS=function(b,d){return d.vertCRS||d.ellipsoid||d.geoid};c.prototype.clone=function(){return new h({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};c.prototype.equals=function(b){return b?this===b?!0:this.heightModel===b.heightModel&&this.heightUnit===b.heightUnit&&this.vertCRS===b.vertCRS:!1};c.deriveUnitFromSR=function(a,d){d=b.getVerticalUnitStringForSR(d);return new h({heightModel:a.heightModel,heightUnit:d,vertCRS:a.vertCRS})};c.prototype.write=
  662. function(b,d){d=n.mixin({},{origin:"web-scene"},d);return this.inherited(arguments,[b,d])};c.fromJSON=function(b){if(!b)return null;var d=new h;d.read(b,{origin:"web-scene"});return d};e([m.property({type:String,constructOnly:!0})],c.prototype,"heightModel",void 0);e([m.writer("web-scene","heightModel")],c.prototype,"writeHeightModel",null);e([m.reader(["web-scene","service"],"heightModel")],c.prototype,"readHeightModel",null);e([m.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:v.write}}}})],
  663. c.prototype,"heightUnit",void 0);e([m.reader("web-scene","heightUnit")],c.prototype,"readHeightUnit",null);e([m.reader("service","heightUnit")],c.prototype,"readHeightUnitService",null);e([m.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],c.prototype,"vertCRS",void 0);e([m.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],c.prototype,"readVertCRS",null);return c=h=e([m.subclass("esri.geometry.HeightModelInfo")],c);var h}(m.declared(l))})},"esri/geometry/support/scaleUtils":function(){define(["require",
  664. "exports","../../config","../../core/kebabDictionary","./WKIDUnitConversion"],function(a,f,p,e,n){function l(b){return v.fromJSON(b.toLowerCase())||null}function h(b){return c(b)||g}function c(b){var a,c,g;b&&("object"===typeof b?(a=b.wkid,c=b.wkt):"number"===typeof b?a=b:"string"===typeof b&&(c=b));a?g=u.values[u[a]]:c&&-1!==c.search(/^PROJCS/i)&&(b=t.exec(c))&&b[1]&&(g=parseFloat(b[1].split(",")[1]));return g}function m(b){var a,c,g;b&&("object"===typeof b?(a=b.wkid,c=b.wkt):"number"===typeof b?
  665. a=b:"string"===typeof b&&(c=b));a?g=u.units[u[a]]:c&&-1!==c.search(/^PROJCS/i)&&(b=t.exec(c))&&b[1]&&(g=(b=/[\\"\\']{1}([^\\"\\']+)/.exec(b[1]))&&b[1]);return g?l(g):null}function b(b,a){a=h(a);return b/(39.37*a*p.screenDPI)}Object.defineProperty(f,"__esModule",{value:!0});var g=20015077/180,t=/UNIT\[([^\]]+)\]\]$/i,u=n,v=e({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",
  666. chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"},{ignoreUnknown:!0});f.unitFromRESTJSON=l;f.unitToRESTJSON=function(b){return v.toJSON(b)||null};f.getMetersPerVerticalUnitForSR=function(b){b=h(b);return 1E5<b?1:b};f.getVerticalUnitStringForSR=function(b){return 1E5<
  667. h(b)?"meters":m(b)};f.getMetersPerUnitForSR=h;f.getMetersPerUnit=c;f.getUnitString=m;f.getScale=function(b,a){a=a||b.extent;b=b.width;var e=c(a&&a.spatialReference);return a&&b?a.width/b*(e||g)*39.37*p.screenDPI:0};f.getResolutionForScale=b;f.getExtentForScale=function(a,c){var g=a.extent;a=a.width;c=b(c,g.spatialReference);return g.clone().expand(c*a/g.width)}})},"esri/layers/TiledLayer":function(){define(["require","../request","../core/promiseUtils","./Layer","./support/TileInfo"],function(a,f,
  668. p,e,n){return e.createSubclass({properties:{attributionDataUrl:null,tileInfo:n},getTileUrl:function(a,e,c){},fetchTile:function(a,e,c,m){a=this.getTileUrl(a,e,c);e={responseType:"image",allowImageDataAccess:m&&m.allowImageDataAccess||!1};m&&m.timestamp&&(e.query={_ts:m.timestamp});return"string"===typeof a?f(a,e).then(function(b){return b.data}):a.then(function(b){return f(b,{responseType:"image"})}).then(function(b){return b.data})},importLayerViewModule:function(e){switch(e.type){case "2d":return p.create(function(e){a(["../views/2d/layers/TiledLayerView2D"],
  669. e)});case "3d":return p.create(function(e){a(["../views/3d/layers/TileLayerView3D"],e)})}}})})},"esri/layers/support/TileInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../geometry ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ../../geometry/support/scaleUtils ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ./LOD".split(" "),
  670. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){var x=c({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc"});return function(a){function c(d){d=a.call(this)||this;d.dpi=96;d.format=null;d.origin=null;d.minScale=0;d.maxScale=0;d.size=null;d.spatialReference=null;return d}p(c,a);q=c;c.create=function(d){void 0===d&&(d={size:256,spatialReference:l.SpatialReference.WebMercator});
  671. var b=d.resolutionFactor||1,a=d.scales,c=d.size||256;d=d.spatialReference||l.SpatialReference.WebMercator;var e=t.getInfo(d),e=e?new l.Point(e.origin[0],e.origin[1],d):new l.Point(0,0,d),h=1/(39.37*g.getMetersPerUnitForSR(d)*96),m=[];if(a)for(var f=0;f<a.length;f++){var n=a[f],x=n*h;m.push({level:f,scale:n,resolution:x})}else for(n=t.isGeographic(d)?512/c*1.47748799285417E8:256/c*5.91657527591555E8,a=Math.ceil(24/b),m.push({level:0,scale:n,resolution:n*h}),f=1;f<a;f++)n/=Math.pow(2,b),x=n*h,m.push({level:f,
  672. scale:n,resolution:x});return new q({dpi:96,lods:m,origin:e,size:c,spatialReference:d})};Object.defineProperty(c.prototype,"isWrappable",{get:function(){var d=this.spatialReference,b=this.origin;if(d&&b){var a=t.getInfo(d);return d.isWrappable&&Math.abs(a.origin[0]-b.x)<=a.dx}return!1},enumerable:!0,configurable:!0});c.prototype.readOrigin=function(d,b){return l.Point.fromJSON(n.mixin({spatialReference:b.spatialReference},d))};Object.defineProperty(c.prototype,"lods",{set:function(d){var b=this,a=
  673. 0,c=0,g=[];this._levelToLOD={};d&&(a=-Infinity,c=Infinity,d.forEach(function(d){g.push(d.scale);a=d.scale>a?d.scale:a;c=d.scale<c?d.scale:c;b._levelToLOD[d.level]=d}));this._set("scales",g);this._set("minScale",a);this._set("maxScale",c);this._set("lods",d);this._initializeUpsampleLevels()},enumerable:!0,configurable:!0});c.prototype.readSize=function(d,b){return[b.cols,b.rows]};c.prototype.writeSize=function(d,b){b.cols=d[0];b.rows=d[0]};c.prototype.zoomToScale=function(d){var b=this.scales;if(0>=
  674. d)return b[0];if(d>=b.length)return b[b.length-1];var a=Math.round(d);return b[a]+(a-d)*(b[Math.round(d-.5)]-b[a])};c.prototype.scaleToZoom=function(d){for(var b=this.scales,a=b.length-1,c=0;c<a;c++){var g=b[c],e=b[c+1];if(g<=d)break;if(e===d)return c+1;if(g>d&&e<d)return c+1-(d-e)/(g-e)}return c};c.prototype.snapScale=function(d,b){void 0===b&&(b=.95);d=this.scaleToZoom(d);return d%Math.floor(d)>=b?this.zoomToScale(Math.ceil(d)):this.zoomToScale(Math.floor(d))};c.prototype.tileAt=function(d,b,a,
  675. c){var k=this.lodAt(d);if(!k)return null;var g;if("number"===typeof b)g=b,b=a;else{if(b.spatialReference.equals(this.spatialReference))g=b.x,b=b.y;else{c=u.project(b,this.spatialReference);if(!c)return null;g=c.x;b=c.y}c=a}a=k.resolution*this.size[0];k=k.resolution*this.size[1];c||(c={id:null,level:0,row:0,col:0,extent:[0,0,0,0]});c.level=d;c.row=Math.floor((this.origin.y-b)/k+.001);c.col=Math.floor((g-this.origin.x)/a+.001);this.updateTileInfo(c);return c};c.prototype.updateTileInfo=function(d){var b=
  676. this.lodAt(d.level),a=b.resolution*this.size[0],b=b.resolution*this.size[1];d.id=d.level+"/"+d.row+"/"+d.col;d.extent||(d.extent=[0,0,0,0]);d.extent[0]=this.origin.x+d.col*a;d.extent[1]=this.origin.y-(d.row+1)*b;d.extent[2]=d.extent[0]+a;d.extent[3]=d.extent[1]+b};c.prototype.upsampleTile=function(d){var b=this._upsampleLevels[d.level];if(!b||-1===b.parentLevel)return!1;d.level=b.parentLevel;d.row=Math.floor(d.row/b.factor+.001);d.col=Math.floor(d.col/b.factor+.001);this.updateTileInfo(d);return!0};
  677. c.prototype.getTileBounds=function(d,b){var a=this.lodAt(b.level).resolution,c=a*this.size[0],a=a*this.size[1];d[0]=this.origin.x+b.col*c;d[1]=this.origin.y-(b.row+1)*a;d[2]=d[0]+c;d[3]=d[1]+a;return d};c.prototype.lodAt=function(d){return this._levelToLOD&&this._levelToLOD[d]||null};c.prototype.clone=function(){return q.fromJSON(this.write({}))};c.prototype._initializeUpsampleLevels=function(){var d=this.lods;this._upsampleLevels=[];for(var b=null,a=0;a<d.length;a++){var c=d[a];this._upsampleLevels[c.level]=
  678. {parentLevel:b?b.level:-1,factor:b?b.resolution/c.resolution:0};b=c}};e([m.property({type:Number,json:{write:!0}})],c.prototype,"compressionQuality",void 0);e([m.property({type:Number,json:{write:!0}})],c.prototype,"dpi",void 0);e([m.property({type:String,json:{read:x.read,write:x.write}})],c.prototype,"format",void 0);e([m.property({readOnly:!0,dependsOn:["spatialReference","origin"]})],c.prototype,"isWrappable",null);e([m.property({type:l.Point,json:{write:!0}})],c.prototype,"origin",void 0);e([m.reader("origin")],
  679. c.prototype,"readOrigin",null);e([m.property({type:[v],value:null,json:{write:!0}})],c.prototype,"lods",null);e([m.property({readOnly:!0})],c.prototype,"minScale",void 0);e([m.property({readOnly:!0})],c.prototype,"maxScale",void 0);e([m.property({readOnly:!0})],c.prototype,"scales",void 0);e([m.property({cast:function(b){return Array.isArray(b)?b:"number"===typeof b?[b,b]:[256,256]}})],c.prototype,"size",void 0);e([m.reader("size",["rows","cols"])],c.prototype,"readSize",null);e([m.writer("size",
  680. {cols:{type:b.Integer},rows:{type:b.Integer}})],c.prototype,"writeSize",null);e([m.property({type:l.SpatialReference,json:{write:!0}})],c.prototype,"spatialReference",void 0);return c=q=e([m.subclass("esri.layers.support.TileInfo")],c);var q}(m.declared(h))})},"esri/geometry":function(){define("require exports ./geometry/Extent ./geometry/Geometry ./geometry/Mesh ./geometry/Multipoint ./geometry/Point ./geometry/Polygon ./geometry/Polyline ./geometry/ScreenPoint ./geometry/SpatialReference ./geometry/support/jsonUtils".split(" "),
  681. function(a,f,p,e,n,l,h,c,m,b,g,t){Object.defineProperty(f,"__esModule",{value:!0});f.Extent=p;f.BaseGeometry=e;f.Mesh=n;f.Multipoint=l;f.Point=h;f.Polygon=c;f.Polyline=m;f.ScreenPoint=b;f.SpatialReference=g;f.isGeometry=function(b){return b instanceof f.BaseGeometry};f.fromJSON=t.fromJSON;f.typeMap={point:f.Point,extent:f.Extent,polyline:f.Polyline,polygon:f.Polygon,multipoint:f.Multipoint,mesh:f.Mesh}})},"esri/geometry/Mesh":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/lang ../core/Logger ../core/accessorSupport/decorators ./Extent ./Geometry ./support/MeshComponent ./support/MeshVertexAttributes ./support/triangulationUtils ./support/meshUtils/centerAt ./support/meshUtils/offset ./support/meshUtils/primitives ./support/meshUtils/rotate".split(" "),
  682. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w){var q=h.getLogger("esri.geometry.Mesh"),d=[1,0,0],k=[0,1,0],y=[0,0,1],z=[0,0,0],A=[0,0,0,0],C=[0,0,0,0],B=[0,0,0,0];return function(b){function a(d){d=b.call(this)||this;d.components=null;d.hasZ=!0;d.hasM=!1;d.vertexAttributes=null;d.type="mesh";return d}p(a,b);h=a;Object.defineProperty(a.prototype,"extent",{get:function(){var b=this.spatialReference,d=this.vertexAttributes&&this.vertexAttributes.position;if(!d||0===d.length||this.components&&0===this.components.length)return new m({xmin:0,
  683. ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:b});b={xmin:Infinity,xmax:-Infinity,ymin:Infinity,ymax:-Infinity,zmin:Infinity,zmax:-Infinity,spatialReference:b};if(!this.components)return new m(this.extendExtent(b,d,null));for(var a=0,c=this.components;a<c.length;a++){var k=c[a];if(k.faces)this.extendExtent(b,d,k.faces);else{this.extendExtent(b,d,null);break}}return new m(b)},enumerable:!0,configurable:!0});a.prototype.addComponent=function(b){this.components||(this.components=[]);this.components.push(b);
  684. this.clearCache()};a.prototype.removeComponent=function(b){if(this.components&&(b=this.components.indexOf(b),-1!==b)){this.components=this.components.splice(b,1);return}q.error("removeComponent()","Provided component is not part of the list of components")};a.prototype.rotate=function(b,a,c,g){w.axisAngleFrom(d,b/180*Math.PI,A);w.axisAngleFrom(k,a/180*Math.PI,C);w.axisAngleFrom(y,c/180*Math.PI,B);w.axisAngleMultiply(A,C,A);w.axisAngleMultiply(A,B,A);w.rotate(this,A,g);return this};a.prototype.offset=
  685. function(b,d,a,c){z[0]=b;z[1]=d;z[2]=a;x.offset(this,z,c);return this};a.prototype.centerAt=function(b,d){v.centerAt(this,b,d);return this};a.prototype.clone=function(){return new h({components:l.clone(this.components),spatialReference:this.spatialReference,vertexAttributes:l.clone(this.vertexAttributes)})};a.prototype.vertexAttributesChanged=function(){this.clearCache()};a.prototype.toJSON=function(b){return this.write({},b)};a.prototype.forEachVertex=function(b,d,a){if(d)for(k=0;k<d.length;k++){var c=
  686. 3*d[k];a(b[c+0],b[c+1],b[c+2])}else for(var k=0;k<b.length;k+=3)a(b[k+0],b[k+1],b[k+2])};a.prototype.extendExtent=function(b,d,a){this.forEachVertex(d,a,function(d,a,c){b.xmin=Math.min(b.xmin,d);b.xmax=Math.max(b.xmax,d);b.ymin=Math.min(b.ymin,a);b.ymax=Math.max(b.ymax,a);b.zmin=Math.min(b.zmin,c);b.zmax=Math.max(b.zmax,c)});return b};a.createBox=function(b,d){b=r.convertUnitGeometry(r.createUnitSizeBox(),b,d);if(d&&d.imageFace&&"all"!==d.imageFace){var a=b.components[0],c=a.faces,k=r.boxFaceOrder[d.imageFace],
  687. e=6*k;d=new Uint32Array(6);for(var q=new Uint32Array(c.length-6),h=0,m=0,f=0;f<c.length;f++)f>=e&&f<e+6?d[h++]=c[f]:q[m++]=c[f];c=new Float32Array(b.vertexAttributes.uv);k*=8;e=[0,1,1,1,1,0,0,0];for(f=0;f<e.length;f++)c[k+f]=e[f];b.vertexAttributes.uv=c;b.components=[new g({faces:d,material:a.material}),new g({faces:q})]}return b};a.createSphere=function(b,d){return r.convertUnitGeometry(r.createUnitSizeSphere(d&&d.densificationFactor||0),b,d)};a.createCylinder=function(b,d){return r.convertUnitGeometry(r.createUnitSizeCylinder(d&&
  688. d.densificationFactor||0),b,d)};a.createPlane=function(b,d){return r.convertUnitGeometry(r.createUnitSizePlane(d&&d.facing||"up"),b,d)};a.createFromPolygon=function(b,d){var a=u.triangulate(b);return new h({vertexAttributes:{position:a.position},components:[{faces:a.faces,shading:"flat",material:d&&d.material||null}],spatialReference:b.spatialReference})};e([c.property({dependsOn:["vertexAttributes","vertexAttributes.position","components"],json:{read:!1}})],a.prototype,"cache",void 0);e([c.property({type:[g]})],
  689. a.prototype,"components",void 0);e([c.property({dependsOn:["cache"],readOnly:!0,json:{read:!1}})],a.prototype,"extent",null);e([c.property({readOnly:!0,json:{read:!1,write:!1}})],a.prototype,"hasZ",void 0);e([c.property({readOnly:!0,json:{read:!1,write:!1}})],a.prototype,"hasM",void 0);e([c.property({type:t.MeshVertexAttributes,json:{write:!0}})],a.prototype,"vertexAttributes",void 0);e([n(0,c.cast(g))],a.prototype,"addComponent",null);return a=h=e([c.subclass("esri.geometry.Mesh")],a);var h}(c.declared(b))})},
  690. "esri/geometry/support/MeshComponent":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators ./MeshMaterial ./MeshVertexAttributes".split(" "),function(a,f,p,e,n,l,h,c,m,b){var g=h.getLogger("esri.geometry.support.MeshComponent");return function(a){function h(b){b=a.call(this)||this;b.faces=null;b.material=null;b.shading="source";return b}p(h,a);f=h;
  691. h.prototype.castFaces=function(a){return b.castArray(a,Uint32Array,[Uint16Array],{loggerTag:".faces\x3d",stride:3},g)};h.prototype.clone=function(){return new f({faces:l.clone(this.faces),shading:this.shading,material:l.clone(this.material)})};e([c.property({json:{write:!0}})],h.prototype,"faces",void 0);e([c.cast("faces")],h.prototype,"castFaces",null);e([c.property({type:m.MeshMaterial,json:{write:!0}})],h.prototype,"material",void 0);e([c.property({type:String,json:{write:!0}})],h.prototype,"shading",
  692. void 0);return h=f=e([c.subclass("esri.geometry.support.MeshComponent")],h);var f}(c.declared(n))})},"esri/geometry/support/MeshMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./ImageMeshColor ./MeshColor ./ValueMeshColor".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){Object.defineProperty(f,"__esModule",
  693. {value:!0});var u={base:g.default,key:"type",defaultKeyValue:"value",typeMap:{value:t,image:b}};a=function(a){function g(b){b=a.call(this)||this;b.color=null;return b}p(g,a);f=g;g.prototype.castColor=function(a){return a?"string"===typeof a?v.test(a)||n.named[a]?new t({value:a}):new b({url:a}):Array.isArray(a)?new t({value:a}):a instanceof HTMLImageElement?new b({url:a.src}):a instanceof HTMLCanvasElement?new b({url:a.toDataURL()}):m.ensureOneOfType(u,a):a};g.prototype.readColor=function(a,d,c){if(a)switch(a.type){case "image":return new b(a);
  694. case "value":return new t(a)}};g.prototype.clone=function(){return new f({color:h.clone(this.color)})};e([c.property({types:u,json:{write:!0}})],g.prototype,"color",void 0);e([c.cast("color")],g.prototype,"castColor",null);e([c.reader("color")],g.prototype,"readColor",null);return g=f=e([c.subclass("esri.geometry.support.MeshResources")],g);var f}(c.declared(l));f.MeshMaterial=a;var v=/^\s*(#|rgba?\()/;f.default=a})},"esri/Color":function(){define(["./core/declare","./core/accessorSupport/ensureType",
  695. "dojo/colors"],function(a,f,p){function e(a){return Math.max(0,Math.min(f.ensureInteger(a),255))}var n=a([p],{declaredClass:"esri.Color",toJSON:function(){return[e(this.r),e(this.g),e(this.b),1<this.a?this.a:e(255*this.a)]},clone:function(){return new n(this.toRgba())}});n.toJSON=function(a){return a&&[e(a.r),e(a.g),e(a.b),1<a.a?a.a:e(255*a.a)]};n.fromJSON=function(a){return a&&new n([a[0],a[1],a[2],a[3]/255])};n.toUnitRGB=function(a){return[a.r/255,a.g/255,a.b/255]};n.toUnitRGBA=function(a){return[a.r/
  696. 255,a.g/255,a.b/255,null!=a.a?a.a:1]};var l="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(a=0;a<l.length;a++)n[l[a]]=p[l[a]];n.named.rebeccapurple=[102,51,153];return n})},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(a,f,p,e){var n={};f.setObject("dojo.colors",n);var l=function(a,e,b){0>b&&++b;1<b&&--b;var c=6*b;return 1>c?a+(e-a)*c:1>2*b?e:2>3*b?a+(e-a)*(2/3-b)*6:a};a.colorFromRgb=p.fromRgb=function(a,h){var b=
  697. a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(b){a=b[2].split(/\s*,\s*/);var c=a.length,b=b[1];if("rgb"==b&&3==c||"rgba"==b&&4==c)return b=a[0],"%"==b.charAt(b.length-1)?(b=e.map(a,function(b){return 2.56*parseFloat(b)}),4==c&&(b[3]=a[3]),p.fromArray(b,h)):p.fromArray(a,h);if("hsl"==b&&3==c||"hsla"==b&&4==c){var b=(parseFloat(a[0])%360+360)%360/360,m=parseFloat(a[1])/100,f=parseFloat(a[2])/100,m=.5>=f?f*(m+1):f+m-f*m,f=2*f-m,b=[256*l(f,m,b+1/3),256*l(f,m,b),256*l(f,m,b-1/3),1];4==
  698. c&&(b[3]=a[3]);return p.fromArray(b,h)}}return null};var h=function(a,e,b){a=Number(a);return isNaN(a)?b:a<e?e:a>b?b:a};p.prototype.sanitize=function(){this.r=Math.round(h(this.r,0,255));this.g=Math.round(h(this.g,0,255));this.b=Math.round(h(this.b,0,255));this.a=h(this.a,0,1);return this};n.makeGrey=p.makeGrey=function(a,e){return p.fromArray([a,a,a,e])};f.mixin(p.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,
  699. 228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,
  700. 140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],
  701. greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,
  702. 178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,
  703. 255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,
  704. 128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return p})},"esri/geometry/support/ImageMeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Identifiable ../../core/accessorSupport/decorators ./MeshColor".split(" "),
  705. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this)||this;b.type="image";b.url=null;return b}p(c,a);b=c;c.prototype.clone=function(){return new b({url:this.url})};e([l.property()],c.prototype,"type",void 0);e([l.property({type:String,json:{write:{enabled:!0,isRequired:!0}}})],c.prototype,"url",void 0);return c=b=e([l.subclass("esri.geometry.support.ImageMeshColor")],c);var b}(l.declared(h.default,n))})},"esri/geometry/support/MeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),
  706. function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(c){return a.call(this)||this}p(c,a);c.prototype.clone=function(){throw Error("not implemented");};e([l.property({readOnly:!0,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0,enabled:!0}}})],c.prototype,"type",void 0);return c=e([l.subclass("esri.geometry.support.MeshColor")],c)}(l.declared(n));f.MeshColor=a;f.default=a})},"esri/geometry/support/ValueMeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/accessorSupport/decorators ./MeshColor".split(" "),
  707. function(a,f,p,e,n,l,h,c){return function(a){function b(b){b=a.call(this)||this;b.type="value";b.value=null;return b}p(b,a);c=b;b.prototype.clone=function(){return new c({value:l.clone(this.value)})};e([h.property()],b.prototype,"type",void 0);e([h.property({type:n})],b.prototype,"value",void 0);return b=c=e([h.subclass("esri.geometry.support.ValueMeshColor")],b);var c}(h.declared(c.default))})},"esri/geometry/support/MeshVertexAttributes":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators".split(" "),
  708. function(a,f,p,e,n,l,h,c){function m(b,a,c,g){var e=a.loggerTag;a=a.stride;return 0!==b.length%a?(g.error(e,"Invalid array length, expected a multiple of "+a),new c([])):b}function b(b,a,c,g,e){if(!b)return b;if(b instanceof a)return m(b,g,a,e);for(var h=0;h<c.length;h++)if(b instanceof c[h])return m(new a(b),g,a,e);if(Array.isArray(b))return m(new a(b),g,a,e);c=c.map(function(b){return"'"+b.name+"'"});e.error("Failed to set property, expected one of "+c+", but got "+b.constructor.name);return new a([])}
  709. Object.defineProperty(f,"__esModule",{value:!0});var g=h.getLogger("esri.geometry.support.MeshVertexAttributes");a=function(a){function h(b){b=a.call(this)||this;b.position=null;b.uv=null;b.normal=null;return b}p(h,a);m=h;h.prototype.castPosition=function(a){a&&a instanceof Float32Array&&g.warn(".position\x3d","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array");return b(a,Float64Array,[Float32Array],{loggerTag:".position\x3d",
  710. stride:3},g)};h.prototype.castUv=function(a){return b(a,Float32Array,[Float64Array],{loggerTag:".uv\x3d",stride:2},g)};h.prototype.castNormal=function(a){return b(a,Float32Array,[Float64Array],{loggerTag:".normal\x3d",stride:3},g)};h.prototype.clone=function(){return new m({position:l.clone(this.position),uv:l.clone(this.uv),normal:l.clone(this.normal)})};e([c.property({json:{write:!0}})],h.prototype,"position",void 0);e([c.cast("position")],h.prototype,"castPosition",null);e([c.property({json:{write:!0}})],
  711. h.prototype,"uv",void 0);e([c.cast("uv")],h.prototype,"castUv",null);e([c.property({json:{write:!0}})],h.prototype,"normal",void 0);e([c.cast("normal")],h.prototype,"castNormal",null);return h=m=e([c.subclass("esri.geometry.support.MeshVertexAttributes")],h);var m}(c.declared(n));f.MeshVertexAttributes=a;f.castArray=b;f.default=a})},"esri/geometry/support/triangulationUtils":function(){define(["require","exports","../../core/libs/earcut/earcut","./coordsUtils"],function(a,f,p,e){function n(a,e,b){if(1===
  712. a.length)return a[0];e=new Float64Array(e);b=new Uint32Array(b);for(var c=0,h=0,m=0;m<a.length;m++){for(var f=a[m],l=0;l<f.position.length;l++)e[c++]=f.position[l];for(l=0;l<f.faces.length;l++)b[h++]=f.faces[l]}return{position:e,faces:b}}function l(a,m){for(var b=a.length,c=Array(b),f=Array(b),l=Array(b),n=0,x=0,r=0,p=0,q=0;q<b;++q)p+=a[q].length;for(var p=new Float64Array(3*p),d=0,k=b-1;0<=k;k--){var y=a[k];if(e.isClockwise(y,!1,!1)||1===b){for(var z=y.length,q=0;q<n;++q)z+=c[q].length;q={index:d,
  713. pathLengths:Array(n+1),count:z,holeIndices:Array(n)};q.pathLengths[0]=y.length;0<y.length&&(l[r++]={index:d,count:y.length});d=h(y,0,p,d,y.length,m);for(y=0;y<n;++y)z=c[y],q.holeIndices[y]=d,q.pathLengths[y+1]=z.length,0<z.length&&(l[r++]={index:d,count:z.length}),d=h(z,0,p,d,z.length,m);n=0;0<q.count&&(f[x++]=q)}else c[n++]=y}for(y=0;y<n;++y)z=c[y],0<z.length&&(l[r++]={index:d,count:z.length}),d=h(z,0,p,d,z.length,m);x<b&&(f.length=x);r<b&&(l.length=r);return{position:p,polygons:f,outlines:l}}function h(a,
  714. e,b,g,h,f){g*=3;for(var c=0;c<h;++c){var m=a[e++];b[g++]=m[0];b[g++]=m[1];b[g++]=f?m[2]:0}return g/3}Object.defineProperty(f,"__esModule",{value:!0});f.triangulate=function(a){var c=l(a.rings,a.hasZ),b=[],g=0,e=0;a=function(a){var h=a.index,m=new Float64Array(c.position.buffer,3*h*c.position.BYTES_PER_ELEMENT,3*a.count);a=a.holeIndices.map(function(b){return b-h});a=new Uint32Array(p(m,a,3));b.push({position:m,faces:a});g+=m.length;e+=a.length};for(var h=0,f=c.polygons;h<f.length;h++)a(f[h]);return n(b,
  715. g,e)};f.pathsToTriangulationInfo=l})},"esri/core/libs/earcut/earcut":function(){define([],function(){function a(b,d,a){a=a||2;k=b.length/a+(d?2*d.length:0);y=!1;var c=d&&d.length,g=c?d[0]*a:b.length,q=f(b,0,g,a,!0),n=[];if(!q)return n;var t,u,z,r;if(c)a:{var v=a,c=[],w,A,C;r=0;for(w=d.length;r<w;r++)A=d[r]*v,C=r<w-1?d[r+1]*v:b.length,A=f(b,A,C,v,!1),A===A.next&&(A.steiner=!0),c.push(m(A));c.sort(l);for(r=0;r<c.length;r++){if(!q){q=null;break a}d=c[r];v=q;if(v=h(d,v))d=x(v,d),p(d,d.next);q=p(q,q.next)}}if(y)return n;
  716. if(b.length>80*a){t=z=b[0];u=c=b[1];for(v=a;v<g;v+=a)r=b[v],d=b[v+1],r<t&&(t=r),d<u&&(u=d),r>z&&(z=r),d>c&&(c=d);z=Math.max(z-t,c-u)}e(q,n,a,t,u,z);return n}function f(b,a,c,k,g){var e;if(g===0<d(b,a,c,k))for(g=a;g<c;g+=k)e=r(g,b[g],b[g+1],e);else for(g=c-k;g>=a;g-=k)e=r(g,b[g],b[g+1],e);e&&t(e,e.next)&&(w(e),e=e.next);return e}function p(b,d){if(!b)return b;d||(d=b);var a,c=0,e=k*k/2;do{a=!1;if(b.steiner||!t(b,b.next)&&0!==g(b.prev,b,b.next))b=b.next;else{w(b);b=d=b.prev;if(b===b.next)return null;
  717. a=!0}if(c++>e)return y=!0,null}while(a||b!==d);return d}function e(d,a,k,q,h,m,f){if(d){if(!f&&m){var l=d,r=l;do null===r.z&&(r.z=c(r.x,r.y,q,h,m)),r.prevZ=r.prev,r=r.nextZ=r.next;while(r!==l);r.prevZ.nextZ=null;r.prevZ=null;var l=r,z,A,B,C,D,F,G=1;do{r=l;B=l=null;for(C=0;r;){C++;A=r;for(z=D=0;z<G&&(D++,A=A.nextZ,A);z++);for(F=G;0<D||0<F&&A;)0===D?(z=A,A=A.nextZ,F--):0!==F&&A?r.z<=A.z?(z=r,r=r.nextZ,D--):(z=A,A=A.nextZ,F--):(z=r,r=r.nextZ,D--),B?B.nextZ=z:l=z,z.prevZ=B,B=z;r=A}B.nextZ=null;G*=2}while(1<
  718. C)}for(l=d;d.prev!==d.next;){r=d.prev;A=d.next;if(m)a:{B=d;F=q;var J=h,L=m;C=B.prev;D=B;G=B.next;if(0<=g(C,D,G))B=!1;else{var S=C.x>D.x?C.x>G.x?C.x:G.x:D.x>G.x?D.x:G.x,T=C.y>D.y?C.y>G.y?C.y:G.y:D.y>G.y?D.y:G.y;z=c(C.x<D.x?C.x<G.x?C.x:G.x:D.x<G.x?D.x:G.x,C.y<D.y?C.y<G.y?C.y:G.y:D.y<G.y?D.y:G.y,F,J,L);F=c(S,T,F,J,L);for(J=B.nextZ;J&&J.z<=F;){if(J!==B.prev&&J!==B.next&&b(C.x,C.y,D.x,D.y,G.x,G.y,J.x,J.y)&&0<=g(J.prev,J,J.next)){B=!1;break a}J=J.nextZ}for(J=B.prevZ;J&&J.z>=z;){if(J!==B.prev&&J!==B.next&&
  719. b(C.x,C.y,D.x,D.y,G.x,G.y,J.x,J.y)&&0<=g(J.prev,J,J.next)){B=!1;break a}J=J.prevZ}B=!0}}else B=n(d);if(B)a.push(r.i/k),a.push(d.i/k),a.push(A.i/k),w(d),l=d=A.next;else{if(y)break;d=A;if(d===l){if(!f)e(p(d),a,k,q,h,m,1);else if(1===f){f=a;l=k;r=d;do A=r.prev,B=r.next.next,!t(A,B)&&u(A,r,r.next,B)&&v(A,B)&&v(B,A)&&(f.push(A.i/l),f.push(r.i/l),f.push(B.i/l),w(r),w(r.next),r=d=B),r=r.next;while(r!==d);d=r;e(d,a,k,q,h,m,2)}else if(2===f)a:{f=d;do{for(l=f.next.next;l!==f.prev;){if(r=f.i!==l.i){r=f;A=l;
  720. B=void 0;if(B=r.next.i!==A.i&&r.prev.i!==A.i){B=void 0;b:{B=r;do{if(B.i!==r.i&&B.next.i!==r.i&&B.i!==A.i&&B.next.i!==A.i&&u(B,B.next,r,A)){B=!0;break b}B=B.next}while(B!==r);B=!1}B=!B}C=void 0;if(C=B&&v(r,A)&&v(A,r)){B=r;C=!1;D=(r.x+A.x)/2;A=(r.y+A.y)/2;do B.y>A!==B.next.y>A&&D<(B.next.x-B.x)*(A-B.y)/(B.next.y-B.y)+B.x&&(C=!C),B=B.next;while(B!==r)}r=C}if(r){d=x(f,l);f=p(f,f.next);d=p(d,d.next);e(f,a,k,q,h,m);e(d,a,k,q,h,m);break a}l=l.next}f=f.next}while(f!==d)}break}}}}}function n(d){var a=d.prev,
  721. c=d.next;if(0<=g(a,d,c))return!1;for(var e=d.next.next,q=0;e!==d.prev;){if(b(a.x,a.y,d.x,d.y,c.x,c.y,e.x,e.y)&&0<=g(e.prev,e,e.next))return!1;e=e.next;if(q++>k)return y=!0,!1}return!0}function l(b,d){return b.x-d.x}function h(d,a){var c=a,k=d.x,g=d.y,e=-Infinity,q;do{if(!c)return null;if(g<=c.y&&g>=c.next.y){var h=c.x+(g-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(h<=k&&h>e){e=h;if(h===k){if(g===c.y)return c;if(g===c.next.y)return c.next}q=c.x<c.next.x?c:c.next}}c=c.next}while(c!==a);if(!q)return null;
  722. if(k===e)return q.prev;a=q;for(var h=q.x,m=q.y,f=Infinity,l,c=q.next;c!==a;)k>=c.x&&c.x>=h&&b(g<m?k:e,g,h,m,g<m?e:k,g,c.x,c.y)&&(l=Math.abs(g-c.y)/(k-c.x),(l<f||l===f&&c.x>q.x)&&v(c,d)&&(q=c,f=l)),c=c.next;return q}function c(b,d,a,c,k){b=32767*(b-a)/k;d=32767*(d-c)/k;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;d=(d|d<<8)&16711935;d=(d|d<<4)&252645135;d=(d|d<<2)&858993459;return(b|b<<1)&1431655765|((d|d<<1)&1431655765)<<1}function m(b){var d=b,a=b;do d.x<a.x&&(a=d),d=d.next;while(d!==
  723. b);return a}function b(b,d,a,c,k,g,e,q){return 0<=(k-e)*(d-q)-(b-e)*(g-q)&&0<=(b-e)*(c-q)-(a-e)*(d-q)&&0<=(a-e)*(g-q)-(k-e)*(c-q)}function g(b,d,a){return(d.y-b.y)*(a.x-d.x)-(d.x-b.x)*(a.y-d.y)}function t(b,d){return b.x===d.x&&b.y===d.y}function u(b,d,a,c){return t(b,d)&&t(a,c)||t(b,c)&&t(a,d)?!0:0<g(b,d,a)!==0<g(b,d,c)&&0<g(a,c,b)!==0<g(a,c,d)}function v(b,d){return 0>g(b.prev,b,b.next)?0<=g(b,d,b.next)&&0<=g(b,b.prev,d):0>g(b,d,b.prev)||0>g(b,b.next,d)}function x(b,d){var a=new q(b.i,b.x,b.y),
  724. c=new q(d.i,d.x,d.y),k=b.next,g=d.prev;b.next=d;d.prev=b;a.next=k;k.prev=a;c.next=a;a.prev=c;g.next=c;c.prev=g;return c}function r(b,d,a,c){b=new q(b,d,a);c?(b.next=c.next,b.prev=c,c.next.prev=b,c.next=b):(b.prev=b,b.next=b);return b}function w(b){b.next.prev=b.prev;b.prev.next=b.next;b.prevZ&&(b.prevZ.nextZ=b.nextZ);b.nextZ&&(b.nextZ.prevZ=b.prevZ)}function q(b,d,a){this.i=b;this.x=d;this.y=a;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function d(b,d,a,c){for(var k=0,g=
  725. a-c;d<a;d+=c)k+=(b[g]-b[d])*(b[d+1]+b[g+1]),g=d;return k}var k,y;a.deviation=function(b,a,c,k){var g=a&&a.length,e=Math.abs(d(b,0,g?a[0]*c:b.length,c));if(g)for(var g=0,q=a.length;g<q;g++)e-=Math.abs(d(b,a[g]*c,g<q-1?a[g+1]*c:b.length,c));for(g=a=0;g<k.length;g+=3){var q=k[g]*c,h=k[g+1]*c,m=k[g+2]*c;a+=Math.abs((b[q]-b[m])*(b[h+1]-b[q+1])-(b[q]-b[h])*(b[m+1]-b[q+1]))}return 0===e&&0===a?0:Math.abs((a-e)/e)};a.flatten=function(b){for(var d=b[0][0].length,a={vertices:[],holes:[],dimensions:d},c=0,k=
  726. 0;k<b.length;k++){for(var g=0;g<b[k].length;g++)for(var e=0;e<d;e++)a.vertices.push(b[k][g][e]);0<k&&(c+=b[k-1].length,a.holes.push(c))}return a};return a})},"esri/geometry/support/coordsUtils":function(){define(["require","exports"],function(a,f){function p(a,e){var h=e[0]-a[0],c=e[1]-a[1];return 2<a.length&&2<e.length?(a=a[2]-e[2],Math.sqrt(h*h+c*c+a*a)):Math.sqrt(h*h+c*c)}function e(a,e,h){var c=a[0]+h*(e[0]-a[0]),m=a[1]+h*(e[1]-a[1]);return 2<a.length&&2<e.length?[c,m,a[2]+h*(e[2]-a[2])]:[c,m]}
  727. Object.defineProperty(f,"__esModule",{value:!0});f.geometryToCoordinates=function(a){if(!a)return null;if(Array.isArray(a))return a;var e=a.hasZ,h=a.hasM;if("point"===a.type)return h&&e?[a.x,a.y,a.z,a.m]:e?[a.x,a.y,a.z]:h?[a.x,a.y,a.m]:[a.x,a.y];if("polygon"===a.type)return a.rings.slice(0);if("polyline"===a.type)return a.paths.slice(0);if("multipoint"===a.type)return a.points.slice(0);if("extent"===a.type){a=a.clone().normalize();if(!a)return null;var c=!1,m=!1;a.forEach(function(b){b.hasZ&&(c=!0);
  728. b.hasM&&(m=!0)});return a.map(function(b){var a=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];if(c&&b.hasZ)for(var e=.5*(b.zmax-b.zmin),h=0;h<a.length;h++)a[h].push(e);if(m&&b.hasM)for(b=.5*(b.mmax-b.mmin),h=0;h<a.length;h++)a[h].push(b);return a})}return null};f.getLength=p;f.getMidpoint=function(a,f){return e(a,f,.5)};f.getPathLength=function(a){for(var e=a.length,h=0,c=0;c<e-1;++c)h+=p(a[c],a[c+1]);return h};f.getPointOnPath=function(a,f){if(0>=f)return a[0];
  729. for(var h=a.length,c=0,m=0;m<h-1;++m){var b=p(a[m],a[m+1]);if(f-c<b)return e(a[m],a[m+1],(f-c)/b);c+=b}return a[h-1]};f.isClockwise=function(a,e,h){for(var c=a.length,m=0,b=0,g=0,f=0;f<c;f++){var l=a[f],n=a[(f+1)%c],x=2,m=m+(l[0]*n[1]-n[0]*l[1]);2<l.length&&2<n.length&&h&&(b+=l[0]*n[2]-n[0]*l[2],x=3);l.length>x&&n.length>x&&e&&(g+=l[0]*n[x]-n[0]*l[x])}return 0>=m&&0>=b&&0>=g}})},"esri/geometry/support/meshUtils/centerAt":function(){define("require exports ../../../core/Logger ./projection ../../../views/3d/lib/glMatrix ../../../views/3d/support/projectionUtils".split(" "),
  730. function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});var h=p.getLogger("esri.geometry.support.meshUtils.centerAt");f.centerAt=function(a,f,p){if(a.vertexAttributes&&a.vertexAttributes.position){var t=a.spatialReference,r=p&&p.origin||a.extent.center;if(t.isWGS84||t.isWebMercator&&(!p||!1!==p.geographic)){p=a.spatialReference;var t=m,u=c;if(l.pointToVector(f,u,l.SphericalECEFSpatialReference)){l.pointToVector(r,t,l.SphericalECEFSpatialReference)||l.pointToVector(a.extent.center,t,
  731. l.SphericalECEFSpatialReference);r=a.vertexAttributes.position;f=a.vertexAttributes.normal;var q=new Float64Array(r.length),d=new Float32Array(f?f.length:0);e.projectToECEF(r,p,q);f&&e.projectNormalToECEF(f,r,q,p,d);l.computeLinearTransformation(l.SphericalECEFSpatialReference,t,b,l.SphericalECEFSpatialReference);l.computeLinearTransformation(l.SphericalECEFSpatialReference,u,g,l.SphericalECEFSpatialReference);n.mat4d.inverse(b);n.mat4d.multiply(g,b,g);e.transformBufferInPlace(q,g);n.mat4d.inverse(g);
  732. n.mat4d.transpose(g);f&&e.transformBufferInPlace(d,g,!0);e.projectFromECEF(q,r,p);f&&e.projectNormalFromECEF(d,r,q,p,f);a.clearCache()}else h.error("Failed to project centerAt location (wkid:"+f.spatialReference.wkid+") to ECEF")}else if(p=m,t=c,l.pointToVector(f,t,a.spatialReference)){l.pointToVector(r,p,a.spatialReference)||(f=a.extent.center,p[0]=f.x,p[1]=f.y,p[2]=f.z,h.error("Failed to project specified origin (wkid:"+r.spatialReference.wkid+") to mesh spatial reference (wkid:"+a.spatialReference.wkid+
  733. "). Using mesh extent.center instead"));if(r=a.vertexAttributes.position)for(f=0;f<r.length;f+=3)for(u=0;3>u;u++)r[f+u]+=t[u]-p[u];a.clearCache()}else h.error("Failed to project centerAt location (wkid:"+f.spatialReference.wkid+") to mesh spatial reference (wkid:"+a.spatialReference.wkid+")")}};var c=n.vec3d.create(),m=n.vec3d.create(),b=n.mat4d.create(),g=n.mat4d.create()})},"esri/geometry/support/meshUtils/projection":function(){define(["require","exports","../../../core/Logger","../../../views/3d/lib/glMatrix",
  734. "../../../views/3d/support/projectionUtils"],function(a,f,p,e,n){function l(a,h,f,l,r,p){if(h){r=r.isWGS84;for(var q=0;q<h.length;q+=3){for(var d=0;3>d;d++)c[d]=l[q+d],m[d]=h[q+d];n.computeLinearTransformation(n.SphericalECEFSpatialReference,c,b,n.SphericalECEFSpatialReference);e.mat4d.toMat3(b,g);r?e.mat3d.multiplyVec3(g,m):(d=n.webMercator.y2lat(f[q+1]),d=Math.cos(d),0===a&&(d=1/d),g[0]*=d,g[1]*=d,g[2]*=d,g[3]*=d,g[4]*=d,g[5]*=d,1===a&&e.mat3d.transpose(g),e.mat3d.multiplyVec3(g,m),e.vec3d.normalize(m));
  735. for(d=0;3>d;d++)p[q+d]=m[d]}return p}}Object.defineProperty(f,"__esModule",{value:!0});var h=p.getLogger("esri.geometry.support.meshUtils.normalProjection");f.projectNormalToECEF=function(b,a,c,g,e){return g.isWebMercator||g.isWGS84?l(0,b,a,c,g,e):(h.error("Cannot convert PCS spatial reference buffer to ECEF"),e)};f.projectNormalFromECEF=function(b,a,c,g,e){return g.isWebMercator||g.isWGS84?l(1,b,a,c,g,e):(h.error("Cannot convert to PCS spatial reference buffer from ECEF"),e)};f.projectToECEF=function(b,
  736. a,c){n.bufferToBuffer(b,a,0,c,n.SphericalECEFSpatialReference,0,b.length/3);return c};f.projectFromECEF=function(b,a,c){n.bufferToBuffer(b,n.SphericalECEFSpatialReference,0,a,c,0,b.length/3);return a};f.transformBufferInPlace=function(b,a,g){void 0===g&&(g=!1);if(b)for(var h=0;h<b.length;h+=3){for(var m=0;3>m;m++)c[m]=b[h+m];e.mat4d.multiplyVec3(a,c);g&&e.vec3d.normalize(c);for(m=0;3>m;m++)b[h+m]=c[m]}};var c=e.vec3d.create(),m=e.vec3d.create(),b=e.mat4d.create(),g=e.mat3d.create()})},"esri/views/3d/lib/glMatrix":function(){define([],
  737. function(){var a={};(function(a,p){p(a,!0);p(a,!1)})(a,function(a,p){var e={};(function(){if("undefined"!=typeof Float32Array){var b=new Float32Array(1),a=new Int32Array(b.buffer);e.invsqrt=function(d){b[0]=d;a[0]=1597463007-(a[0]>>1);var c=b[0];return c*(1.5-.5*d*c*c)}}else e.invsqrt=function(b){return 1/Math.sqrt(b)}})();var f=Array;"undefined"!=typeof Float32Array&&(f=p?Float32Array:Array);var l={create:function(b){var d=new f(3);b?(d[0]=b[0],d[1]=b[1],d[2]=b[2]):d[0]=d[1]=d[2]=0;return d},createFrom:function(b,
  738. a,c){var d=new f(3);d[0]=b;d[1]=a;d[2]=c;return d},set:function(b,a){a[0]=b[0];a[1]=b[1];a[2]=b[2];return a},set3:function(b,a,c,g){g[0]=b;g[1]=a;g[2]=c;return g},add:function(b,a,c){if(!c||b===c)return b[0]+=a[0],b[1]+=a[1],b[2]+=a[2],b;c[0]=b[0]+a[0];c[1]=b[1]+a[1];c[2]=b[2]+a[2];return c},subtract:function(b,a,c){if(!c||b===c)return b[0]-=a[0],b[1]-=a[1],b[2]-=a[2],b;c[0]=b[0]-a[0];c[1]=b[1]-a[1];c[2]=b[2]-a[2];return c},multiply:function(b,a,c){if(!c||b===c)return b[0]*=a[0],b[1]*=a[1],b[2]*=
  739. a[2],b;c[0]=b[0]*a[0];c[1]=b[1]*a[1];c[2]=b[2]*a[2];return c},max:function(b,a,c){c[0]=Math.max(b[0],a[0]);c[1]=Math.max(b[1],a[1]);c[2]=Math.max(b[2],a[2]);return c},min:function(b,a,c){c[0]=Math.min(b[0],a[0]);c[1]=Math.min(b[1],a[1]);c[2]=Math.min(b[2],a[2]);return c},negate:function(b,a){a||(a=b);a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];return a},scale:function(b,a,c){if(!c||b===c)return b[0]*=a,b[1]*=a,b[2]*=a,b;c[0]=b[0]*a;c[1]=b[1]*a;c[2]=b[2]*a;return c},normalize:function(b,a){a||(a=b);var d=b[0],
  740. c=b[1];b=b[2];var k=Math.sqrt(d*d+c*c+b*b);if(!k)return a[0]=0,a[1]=0,a[2]=0,a;if(1===k)return a[0]=d,a[1]=c,a[2]=b,a;k=1/k;a[0]=d*k;a[1]=c*k;a[2]=b*k;return a},cross:function(b,a,c){c||(c=b);var d=b[0],k=b[1];b=b[2];var g=a[0],e=a[1];a=a[2];c[0]=k*a-b*e;c[1]=b*g-d*a;c[2]=d*e-k*g;return c},length:function(b){var d=b[0],a=b[1];b=b[2];return Math.sqrt(d*d+a*a+b*b)},length2:function(b){var d=b[0],a=b[1];b=b[2];return d*d+a*a+b*b},dot:function(b,a){return b[0]*a[0]+b[1]*a[1]+b[2]*a[2]},direction:function(b,
  741. a,c){c||(c=b);var d=b[0]-a[0],k=b[1]-a[1];b=b[2]-a[2];a=Math.sqrt(d*d+k*k+b*b);if(!a)return c[0]=0,c[1]=0,c[2]=0,c;a=1/a;c[0]=d*a;c[1]=k*a;c[2]=b*a;return c},lerp:function(b,a,c,g){g||(g=b);g[0]=b[0]+c*(a[0]-b[0]);g[1]=b[1]+c*(a[1]-b[1]);g[2]=b[2]+c*(a[2]-b[2]);return g},dist:function(b,a){var d=a[0]-b[0],c=a[1]-b[1];b=a[2]-b[2];return Math.sqrt(d*d+c*c+b*b)},dist2:function(b,a){var d=a[0]-b[0],c=a[1]-b[1];b=a[2]-b[2];return d*d+c*c+b*b}},h=null,c=new f(4);l.unproject=function(b,a,g,e,q){q||(q=b);
  742. h||(h=x.create());var d=h;c[0]=2*(b[0]-e[0])/e[2]-1;c[1]=2*(b[1]-e[1])/e[3]-1;c[2]=2*b[2]-1;c[3]=1;x.multiply(g,a,d);if(!x.inverse(d))return null;x.multiplyVec4(d,c);if(0===c[3])return null;q[0]=c[0]/c[3];q[1]=c[1]/c[3];q[2]=c[2]/c[3];return q};var m=l.createFrom(1,0,0),b=l.createFrom(0,1,0),g=l.createFrom(0,0,1);l.rotationTo=function(a,c,e){e||(e=r.create());var d=l.dot(a,c),k=l.create();if(1<=d)r.set(w,e);else if(-.999999>d)l.cross(m,a,k),1E-6>k.length&&l.cross(b,a,k),1E-6>k.length&&l.cross(g,a,
  743. k),l.normalize(k),r.fromAxisAngle(k,Math.PI,e);else{var d=Math.sqrt(2*(1+d)),q=1/d;l.cross(a,c,k);e[0]=k[0]*q;e[1]=k[1]*q;e[2]=k[2]*q;e[3]=.5*d;r.normalize(e)}1<e[3]?e[3]=1:-1>e[3]&&(e[3]=-1);return e};var t=l.create(),u=l.create();l.project=function(b,a,c,g){g||(g=b);l.direction(a,c,t);l.subtract(b,a,u);b=l.dot(t,u);l.scale(t,b,g);l.add(g,a,g)};l.str=function(b){return"["+b[0]+", "+b[1]+", "+b[2]+"]"};var v={create:function(b){var a=new f(9);b?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4],a[5]=
  744. b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8]):a[0]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=0;return a},createFrom:function(b,a,c,g,e,q,h,m,l){var d=new f(9);d[0]=b;d[1]=a;d[2]=c;d[3]=g;d[4]=e;d[5]=q;d[6]=h;d[7]=m;d[8]=l;return d},determinant:function(b){var a=b[3],d=b[4],c=b[5],g=b[6],e=b[7],q=b[8];return b[0]*(q*d-c*e)+b[1]*(-q*a+c*g)+b[2]*(e*a-d*g)},inverse:function(b,a){var d=b[0],c=b[1],k=b[2],g=b[3],e=b[4],q=b[5],h=b[6],m=b[7];b=b[8];var f=b*e-q*m,l=-b*g+q*h,n=m*g-e*h,t=d*f+c*l+k*n;if(!t)return null;t=
  745. 1/t;a||(a=v.create());a[0]=f*t;a[1]=(-b*c+k*m)*t;a[2]=(q*c-k*e)*t;a[3]=l*t;a[4]=(b*d-k*h)*t;a[5]=(-q*d+k*g)*t;a[6]=n*t;a[7]=(-m*d+c*h)*t;a[8]=(e*d-c*g)*t;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],k=b[1],g=b[2],e=b[3],q=b[4],h=b[5],m=b[6],f=b[7];b=b[8];var l=a[0],y=a[1],n=a[2],t=a[3],x=a[4],r=a[5],p=a[6],u=a[7];a=a[8];c[0]=l*d+y*e+n*m;c[1]=l*k+y*q+n*f;c[2]=l*g+y*h+n*b;c[3]=t*d+x*e+r*m;c[4]=t*k+x*q+r*f;c[5]=t*g+x*h+r*b;c[6]=p*d+u*e+a*m;c[7]=p*k+u*q+a*f;c[8]=p*g+u*h+a*b;return c},add:function(b,
  746. a,c){c||(c=b);c[0]=b[0]+a[0];c[1]=b[1]+a[1];c[2]=b[2]+a[2];c[3]=b[3]+a[3];c[4]=b[4]+a[4];c[5]=b[5]+a[5];c[6]=b[6]+a[6];c[7]=b[7]+a[7];c[8]=b[8]+a[8];return c},subtract:function(b,a,c){c||(c=b);c[0]=b[0]-a[0];c[1]=b[1]-a[1];c[2]=b[2]-a[2];c[3]=b[3]-a[3];c[4]=b[4]-a[4];c[5]=b[5]-a[5];c[6]=b[6]-a[6];c[7]=b[7]-a[7];c[8]=b[8]-a[8];return c},multiplyVec2:function(b,a,c){c||(c=a);var d=a[0];a=a[1];c[0]=d*b[0]+a*b[3]+b[6];c[1]=d*b[1]+a*b[4]+b[7];return c},multiplyVec3:function(b,a,c){c||(c=a);var d=a[0],
  747. k=a[1];a=a[2];c[0]=d*b[0]+k*b[3]+a*b[6];c[1]=d*b[1]+k*b[4]+a*b[7];c[2]=d*b[2]+k*b[5]+a*b[8];return c},set:function(b,a){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];return a},identity:function(b){b||(b=v.create());b[0]=1;b[1]=0;b[2]=0;b[3]=0;b[4]=1;b[5]=0;b[6]=0;b[7]=0;b[8]=1;return b},transpose:function(b,a){if(!a||b===a){a=b[1];var d=b[2],c=b[5];b[1]=b[3];b[2]=b[6];b[3]=a;b[5]=b[7];b[6]=d;b[7]=c;return b}a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];
  748. a[5]=b[7];a[6]=b[2];a[7]=b[5];a[8]=b[8];return a},toMat4:function(b,a){a||(a=x.create());a[15]=1;a[14]=0;a[13]=0;a[12]=0;a[11]=0;a[10]=b[8];a[9]=b[7];a[8]=b[6];a[7]=0;a[6]=b[5];a[5]=b[4];a[4]=b[3];a[3]=0;a[2]=b[2];a[1]=b[1];a[0]=b[0];return a},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+", "+b[4]+", "+b[5]+", "+b[6]+", "+b[7]+", "+b[8]+"]"}},x={create:function(b){var a=new f(16);4===arguments.length?(a[0]=arguments[0],a[1]=arguments[1],a[2]=arguments[2],a[3]=arguments[3],a[4]=arguments[4],
  749. a[5]=arguments[5],a[6]=arguments[6],a[7]=arguments[7],a[8]=arguments[8],a[9]=arguments[9],a[10]=arguments[10],a[11]=arguments[11],a[12]=arguments[12],a[13]=arguments[13],a[14]=arguments[14],a[15]=arguments[15]):b&&(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3],a[4]=b[4],a[5]=b[5],a[6]=b[6],a[7]=b[7],a[8]=b[8],a[9]=b[9],a[10]=b[10],a[11]=b[11],a[12]=b[12],a[13]=b[13],a[14]=b[14],a[15]=b[15]);return a},createFrom:function(b,a,c,g,e,q,h,m,l,n,t,x,r,p,u,w){var d=new f(16);d[0]=b;d[1]=a;d[2]=c;d[3]=g;d[4]=e;
  750. d[5]=q;d[6]=h;d[7]=m;d[8]=l;d[9]=n;d[10]=t;d[11]=x;d[12]=r;d[13]=p;d[14]=u;d[15]=w;return d},createFromMatrixRowMajor:function(b){var a=new f(16);a[0]=b[0];a[4]=b[1];a[8]=b[2];a[12]=b[3];a[1]=b[4];a[5]=b[5];a[9]=b[6];a[13]=b[7];a[2]=b[8];a[6]=b[9];a[10]=b[10];a[14]=b[11];a[3]=b[12];a[7]=b[13];a[11]=b[14];a[15]=b[15];return a},createFromMatrix:function(b){var a=new f(16);a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=
  751. b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];return a},set:function(b,a){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15];return a},setRowMajor:function(b,a){a[0]=b[0];a[4]=b[1];a[8]=b[2];a[12]=b[3];a[1]=b[4];a[5]=b[5];a[9]=b[6];a[13]=b[7];a[2]=b[8];a[6]=b[9];a[10]=b[10];a[14]=b[11];a[3]=b[12];a[7]=b[13];a[11]=b[14];a[15]=b[15];return a},identity:function(b){b||(b=x.create());b[0]=
  752. 1;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=1;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},transpose:function(b,a){if(!a||b===a){a=b[1];var d=b[2],c=b[3],k=b[6],g=b[7],e=b[11];b[1]=b[4];b[2]=b[8];b[3]=b[12];b[4]=a;b[6]=b[9];b[7]=b[13];b[8]=d;b[9]=k;b[11]=b[14];b[12]=c;b[13]=g;b[14]=e;return b}a[0]=b[0];a[1]=b[4];a[2]=b[8];a[3]=b[12];a[4]=b[1];a[5]=b[5];a[6]=b[9];a[7]=b[13];a[8]=b[2];a[9]=b[6];a[10]=b[10];a[11]=b[14];a[12]=b[3];a[13]=b[7];a[14]=b[11];a[15]=b[15];return a},
  753. determinant:function(b){var a=b[0],d=b[1],c=b[2],g=b[3],e=b[4],q=b[5],h=b[6],m=b[7],f=b[8],l=b[9],n=b[10],t=b[11],x=b[12],r=b[13],p=b[14];b=b[15];return x*l*h*g-f*r*h*g-x*q*n*g+e*r*n*g+f*q*p*g-e*l*p*g-x*l*c*m+f*r*c*m+x*d*n*m-a*r*n*m-f*d*p*m+a*l*p*m+x*q*c*t-e*r*c*t-x*d*h*t+a*r*h*t+e*d*p*t-a*q*p*t-f*q*c*b+e*l*c*b+f*d*h*b-a*l*h*b-e*d*n*b+a*q*n*b},inverse:function(b,a){a||(a=b);var d=b[0],c=b[1],k=b[2],g=b[3],e=b[4],q=b[5],h=b[6],m=b[7],f=b[8],l=b[9],n=b[10],t=b[11],x=b[12],r=b[13],p=b[14];b=b[15];var u=
  754. d*q-c*e,w=d*h-k*e,v=d*m-g*e,L=c*h-k*q,S=c*m-g*q,T=k*m-g*h,ha=f*r-l*x,V=f*p-n*x,P=f*b-t*x,ca=l*p-n*r,da=l*b-t*r,ka=n*b-t*p,ia=u*ka-w*da+v*ca+L*P-S*V+T*ha;if(!ia)return null;ia=1/ia;a[0]=(q*ka-h*da+m*ca)*ia;a[1]=(-c*ka+k*da-g*ca)*ia;a[2]=(r*T-p*S+b*L)*ia;a[3]=(-l*T+n*S-t*L)*ia;a[4]=(-e*ka+h*P-m*V)*ia;a[5]=(d*ka-k*P+g*V)*ia;a[6]=(-x*T+p*v-b*w)*ia;a[7]=(f*T-n*v+t*w)*ia;a[8]=(e*da-q*P+m*ha)*ia;a[9]=(-d*da+c*P-g*ha)*ia;a[10]=(x*S-r*v+b*u)*ia;a[11]=(-f*S+l*v-t*u)*ia;a[12]=(-e*ca+q*V-h*ha)*ia;a[13]=(d*ca-
  755. c*V+k*ha)*ia;a[14]=(-x*L+r*w-p*u)*ia;a[15]=(f*L-l*w+n*u)*ia;return a},toRotationMat:function(b,a){a||(a=x.create());a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},toMat3:function(b,a){a||(a=v.create());a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[4];a[4]=b[5];a[5]=b[6];a[6]=b[8];a[7]=b[9];a[8]=b[10];return a},toInverseMat3:function(b,a){var d=b[0],c=b[1],g=b[2],k=b[4],e=b[5],q=b[6],h=b[8],
  756. m=b[9];b=b[10];var f=b*e-q*m,l=-b*k+q*h,n=m*k-e*h,t=d*f+c*l+g*n;if(!t)return null;t=1/t;a||(a=v.create());a[0]=f*t;a[1]=(-b*c+g*m)*t;a[2]=(q*c-g*e)*t;a[3]=l*t;a[4]=(b*d-g*h)*t;a[5]=(-q*d+g*k)*t;a[6]=n*t;a[7]=(-m*d+c*h)*t;a[8]=(e*d-c*k)*t;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],g=b[1],k=b[2],e=b[3],q=b[4],h=b[5],m=b[6],f=b[7],l=b[8],n=b[9],t=b[10],y=b[11],x=b[12],r=b[13],p=b[14];b=b[15];var u=a[0],w=a[1],v=a[2],S=a[3],T=a[4],ha=a[5],V=a[6],P=a[7],ca=a[8],da=a[9],ka=a[10],ia=a[11],qa=
  757. a[12],pa=a[13],xa=a[14];a=a[15];c[0]=u*d+w*q+v*l+S*x;c[1]=u*g+w*h+v*n+S*r;c[2]=u*k+w*m+v*t+S*p;c[3]=u*e+w*f+v*y+S*b;c[4]=T*d+ha*q+V*l+P*x;c[5]=T*g+ha*h+V*n+P*r;c[6]=T*k+ha*m+V*t+P*p;c[7]=T*e+ha*f+V*y+P*b;c[8]=ca*d+da*q+ka*l+ia*x;c[9]=ca*g+da*h+ka*n+ia*r;c[10]=ca*k+da*m+ka*t+ia*p;c[11]=ca*e+da*f+ka*y+ia*b;c[12]=qa*d+pa*q+xa*l+a*x;c[13]=qa*g+pa*h+xa*n+a*r;c[14]=qa*k+pa*m+xa*t+a*p;c[15]=qa*e+pa*f+xa*y+a*b;return c},multiplyVec3:function(b,a,c){c||(c=a);var d=a[0],g=a[1];a=a[2];c[0]=b[0]*d+b[4]*g+b[8]*
  758. a+b[12];c[1]=b[1]*d+b[5]*g+b[9]*a+b[13];c[2]=b[2]*d+b[6]*g+b[10]*a+b[14];return c},multiplyVec4:function(b,a,c){c||(c=a);var d=a[0],g=a[1],k=a[2];a=a[3];c[0]=b[0]*d+b[4]*g+b[8]*k+b[12]*a;c[1]=b[1]*d+b[5]*g+b[9]*k+b[13]*a;c[2]=b[2]*d+b[6]*g+b[10]*k+b[14]*a;c[3]=b[3]*d+b[7]*g+b[11]*k+b[15]*a;return c},translate:function(b,a,c){var d=a[0],g=a[1];a=a[2];var k,e,q,h,m,f,l,n,t,y,x,r;if(!c||b===c)return b[12]=b[0]*d+b[4]*g+b[8]*a+b[12],b[13]=b[1]*d+b[5]*g+b[9]*a+b[13],b[14]=b[2]*d+b[6]*g+b[10]*a+b[14],b[15]=
  759. b[3]*d+b[7]*g+b[11]*a+b[15],b;k=b[0];e=b[1];q=b[2];h=b[3];m=b[4];f=b[5];l=b[6];n=b[7];t=b[8];y=b[9];x=b[10];r=b[11];c[0]=k;c[1]=e;c[2]=q;c[3]=h;c[4]=m;c[5]=f;c[6]=l;c[7]=n;c[8]=t;c[9]=y;c[10]=x;c[11]=r;c[12]=k*d+m*g+t*a+b[12];c[13]=e*d+f*g+y*a+b[13];c[14]=q*d+l*g+x*a+b[14];c[15]=h*d+n*g+r*a+b[15];return c},scale:function(b,a,c){var d=a[0],g=a[1];a=a[2];if(!c||b===c)return b[0]*=d,b[1]*=d,b[2]*=d,b[3]*=d,b[4]*=g,b[5]*=g,b[6]*=g,b[7]*=g,b[8]*=a,b[9]*=a,b[10]*=a,b[11]*=a,b;c[0]=b[0]*d;c[1]=b[1]*d;c[2]=
  760. b[2]*d;c[3]=b[3]*d;c[4]=b[4]*g;c[5]=b[5]*g;c[6]=b[6]*g;c[7]=b[7]*g;c[8]=b[8]*a;c[9]=b[9]*a;c[10]=b[10]*a;c[11]=b[11]*a;c[12]=b[12];c[13]=b[13];c[14]=b[14];c[15]=b[15];return c},maxScale:function(b){return Math.max(Math.max(Math.sqrt(b[0]*b[0]+b[4]*b[4]+b[8]*b[8]),Math.sqrt(b[1]*b[1]+b[5]*b[5]+b[9]*b[9])),Math.sqrt(b[2]*b[2]+b[6]*b[6]+b[10]*b[10]))},rotate:function(b,a,c,g){var d=c[0],k=c[1];c=c[2];var e=Math.sqrt(d*d+k*k+c*c),q,h,m,f,l,n,t,y,x,r,p,u,w,v,z,T,ha,V,P,ca;if(!e)return null;1!==e&&(e=1/
  761. e,d*=e,k*=e,c*=e);q=Math.sin(a);h=Math.cos(a);m=1-h;a=b[0];e=b[1];f=b[2];l=b[3];n=b[4];t=b[5];y=b[6];x=b[7];r=b[8];p=b[9];u=b[10];w=b[11];v=d*d*m+h;z=k*d*m+c*q;T=c*d*m-k*q;ha=d*k*m-c*q;V=k*k*m+h;P=c*k*m+d*q;ca=d*c*m+k*q;d=k*c*m-d*q;k=c*c*m+h;g?b!==g&&(g[12]=b[12],g[13]=b[13],g[14]=b[14],g[15]=b[15]):g=b;g[0]=a*v+n*z+r*T;g[1]=e*v+t*z+p*T;g[2]=f*v+y*z+u*T;g[3]=l*v+x*z+w*T;g[4]=a*ha+n*V+r*P;g[5]=e*ha+t*V+p*P;g[6]=f*ha+y*V+u*P;g[7]=l*ha+x*V+w*P;g[8]=a*ca+n*d+r*k;g[9]=e*ca+t*d+p*k;g[10]=f*ca+y*d+u*k;g[11]=
  762. l*ca+x*d+w*k;return g},rotateX:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var g=b[4],k=b[5],e=b[6],q=b[7],h=b[8],m=b[9],f=b[10],l=b[11];c?b!==c&&(c[0]=b[0],c[1]=b[1],c[2]=b[2],c[3]=b[3],c[12]=b[12],c[13]=b[13],c[14]=b[14],c[15]=b[15]):c=b;c[4]=g*a+h*d;c[5]=k*a+m*d;c[6]=e*a+f*d;c[7]=q*a+l*d;c[8]=g*-d+h*a;c[9]=k*-d+m*a;c[10]=e*-d+f*a;c[11]=q*-d+l*a;return c},rotateY:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var g=b[0],k=b[1],e=b[2],q=b[3],h=b[8],m=b[9],f=b[10],l=b[11];c?b!==c&&(c[4]=b[4],
  763. c[5]=b[5],c[6]=b[6],c[7]=b[7],c[12]=b[12],c[13]=b[13],c[14]=b[14],c[15]=b[15]):c=b;c[0]=g*a+h*-d;c[1]=k*a+m*-d;c[2]=e*a+f*-d;c[3]=q*a+l*-d;c[8]=g*d+h*a;c[9]=k*d+m*a;c[10]=e*d+f*a;c[11]=q*d+l*a;return c},rotateZ:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var g=b[0],k=b[1],e=b[2],q=b[3],h=b[4],m=b[5],f=b[6],l=b[7];c?b!==c&&(c[8]=b[8],c[9]=b[9],c[10]=b[10],c[11]=b[11],c[12]=b[12],c[13]=b[13],c[14]=b[14],c[15]=b[15]):c=b;c[0]=g*a+h*d;c[1]=k*a+m*d;c[2]=e*a+f*d;c[3]=q*a+l*d;c[4]=g*-d+h*a;c[5]=k*-d+
  764. m*a;c[6]=e*-d+f*a;c[7]=q*-d+l*a;return c},frustum:function(b,a,c,g,e,q,h){h||(h=x.create());var d=a-b,k=g-c,m=q-e;h[0]=2*e/d;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2*e/k;h[6]=0;h[7]=0;h[8]=(a+b)/d;h[9]=(g+c)/k;h[10]=-(q+e)/m;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(q*e*2)/m;h[15]=0;return h},perspective:function(b,a,c,g,e){b=c*Math.tan(b*Math.PI/360);a*=b;return x.frustum(-a,a,-b,b,c,g,e)},ortho:function(b,a,c,g,e,q,h){h||(h=x.create());var d=a-b,k=g-c,m=q-e;h[0]=2/d;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2/k;h[6]=0;
  765. h[7]=0;h[8]=0;h[9]=0;h[10]=-2/m;h[11]=0;h[12]=-(b+a)/d;h[13]=-(g+c)/k;h[14]=-(q+e)/m;h[15]=1;return h},lookAt:function(b,a,c,g){g||(g=x.create());var d,k,e,q,h,m,f,l,n=b[0],t=b[1];b=b[2];e=c[0];q=c[1];k=c[2];f=a[0];c=a[1];d=a[2];if(n===f&&t===c&&b===d)return x.identity(g);a=n-f;c=t-c;f=b-d;l=1/Math.sqrt(a*a+c*c+f*f);a*=l;c*=l;f*=l;d=q*f-k*c;k=k*a-e*f;e=e*c-q*a;(l=Math.sqrt(d*d+k*k+e*e))?(l=1/l,d*=l,k*=l,e*=l):e=k=d=0;q=c*e-f*k;h=f*d-a*e;m=a*k-c*d;(l=Math.sqrt(q*q+h*h+m*m))?(l=1/l,q*=l,h*=l,m*=l):
  766. m=h=q=0;g[0]=d;g[1]=q;g[2]=a;g[3]=0;g[4]=k;g[5]=h;g[6]=c;g[7]=0;g[8]=e;g[9]=m;g[10]=f;g[11]=0;g[12]=-(d*n+k*t+e*b);g[13]=-(q*n+h*t+m*b);g[14]=-(a*n+c*t+f*b);g[15]=1;return g},fromRotationTranslation:function(b,a,c){c||(c=x.create());var d=b[0],g=b[1],k=b[2],e=b[3],q=d+d,h=g+g,m=k+k;b=d*q;var f=d*h,d=d*m,l=g*h,g=g*m,k=k*m,q=e*q,h=e*h,e=e*m;c[0]=1-(l+k);c[1]=f+e;c[2]=d-h;c[3]=0;c[4]=f-e;c[5]=1-(b+k);c[6]=g+q;c[7]=0;c[8]=d+h;c[9]=g-q;c[10]=1-(b+l);c[11]=0;c[12]=a[0];c[13]=a[1];c[14]=a[2];c[15]=1;return c},
  767. str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+", "+b[4]+", "+b[5]+", "+b[6]+", "+b[7]+", "+b[8]+", "+b[9]+", "+b[10]+", "+b[11]+", "+b[12]+", "+b[13]+", "+b[14]+", "+b[15]+"]"}},r={create:function(b){var a=new f(4);b?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a[0]=a[1]=a[2]=a[3]=0;return a},createFrom:function(b,a,c,g){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=g;return d},set:function(b,a){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a},identity:function(b){b||(b=r.create());b[0]=0;
  768. b[1]=0;b[2]=0;b[3]=1;return b}},w=r.identity();r.calculateW=function(b,a){var d=b[0],c=b[1],g=b[2];if(!a||b===a)return b[3]=-Math.sqrt(Math.abs(1-d*d-c*c-g*g)),b;a[0]=d;a[1]=c;a[2]=g;a[3]=-Math.sqrt(Math.abs(1-d*d-c*c-g*g));return a};r.dot=function(b,a){return b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3]};r.inverse=function(b,a){var d=b[0],c=b[1],g=b[2],k=b[3],d=(d=d*d+c*c+g*g+k*k)?1/d:0;if(!a||b===a)return b[0]*=-d,b[1]*=-d,b[2]*=-d,b[3]*=d,b;a[0]=-b[0]*d;a[1]=-b[1]*d;a[2]=-b[2]*d;a[3]=b[3]*d;return a};
  769. r.conjugate=function(b,a){if(!a||b===a)return b[0]*=-1,b[1]*=-1,b[2]*=-1,b;a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];a[3]=b[3];return a};r.length=function(b){var a=b[0],d=b[1],c=b[2];b=b[3];return Math.sqrt(a*a+d*d+c*c+b*b)};r.normalize=function(b,a){a||(a=b);var d=b[0],c=b[1],g=b[2];b=b[3];var e=Math.sqrt(d*d+c*c+g*g+b*b);if(0===e)return a[0]=0,a[1]=0,a[2]=0,a[3]=0,a;e=1/e;a[0]=d*e;a[1]=c*e;a[2]=g*e;a[3]=b*e;return a};r.add=function(b,a,c){if(!c||b===c)return b[0]+=a[0],b[1]+=a[1],b[2]+=a[2],b[3]+=a[3],b;
  770. c[0]=b[0]+a[0];c[1]=b[1]+a[1];c[2]=b[2]+a[2];c[3]=b[3]+a[3];return c};r.multiply=function(b,a,c){c||(c=b);var d=b[0],g=b[1],e=b[2];b=b[3];var k=a[0],q=a[1],h=a[2];a=a[3];c[0]=d*a+b*k+g*h-e*q;c[1]=g*a+b*q+e*k-d*h;c[2]=e*a+b*h+d*q-g*k;c[3]=b*a-d*k-g*q-e*h;return c};r.multiplyVec3=function(b,a,c){c||(c=a);var d=a[0],g=a[1],e=a[2];a=b[0];var k=b[1],q=b[2];b=b[3];var h=b*d+k*e-q*g,m=b*g+q*d-a*e,f=b*e+a*g-k*d,d=-a*d-k*g-q*e;c[0]=h*b+d*-a+m*-q-f*-k;c[1]=m*b+d*-k+f*-a-h*-q;c[2]=f*b+d*-q+h*-k-m*-a;return c};
  771. r.scale=function(b,a,c){if(!c||b===c)return b[0]*=a,b[1]*=a,b[2]*=a,b[3]*=a,b;c[0]=b[0]*a;c[1]=b[1]*a;c[2]=b[2]*a;c[3]=b[3]*a;return c};r.toMat3=function(b,a){a||(a=v.create());var c=b[0],d=b[1],g=b[2],e=b[3],k=c+c,q=d+d,h=g+g;b=c*k;var m=c*q,c=c*h,f=d*q,d=d*h,g=g*h,k=e*k,q=e*q,e=e*h;a[0]=1-(f+g);a[1]=m+e;a[2]=c-q;a[3]=m-e;a[4]=1-(b+g);a[5]=d+k;a[6]=c+q;a[7]=d-k;a[8]=1-(b+f);return a};r.toMat4=function(b,a){a||(a=x.create());var c=b[0],d=b[1],g=b[2],e=b[3],k=c+c,q=d+d,h=g+g;b=c*k;var m=c*q,c=c*h,
  772. f=d*q,d=d*h,g=g*h,k=e*k,q=e*q,e=e*h;a[0]=1-(f+g);a[1]=m+e;a[2]=c-q;a[3]=0;a[4]=m-e;a[5]=1-(b+g);a[6]=d+k;a[7]=0;a[8]=c+q;a[9]=d-k;a[10]=1-(b+f);a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};r.slerp=function(b,a,c,g){g||(g=b);var d=b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3],e,k;if(1<=Math.abs(d))return g!==b&&(g[0]=b[0],g[1]=b[1],g[2]=b[2],g[3]=b[3]),g;e=Math.acos(d);k=Math.sqrt(1-d*d);if(.001>Math.abs(k))return g[0]=.5*b[0]+.5*a[0],g[1]=.5*b[1]+.5*a[1],g[2]=.5*b[2]+.5*a[2],g[3]=.5*b[3]+.5*a[3],g;
  773. d=Math.sin((1-c)*e)/k;c=Math.sin(c*e)/k;g[0]=b[0]*d+a[0]*c;g[1]=b[1]*d+a[1]*c;g[2]=b[2]*d+a[2]*c;g[3]=b[3]*d+a[3]*c;return g};r.fromRotationMatrix=function(b,a){a||(a=r.create());var c=b[0]+b[4]+b[8],d;if(0<c)d=Math.sqrt(c+1),a[3]=.5*d,d=.5/d,a[0]=(b[7]-b[5])*d,a[1]=(b[2]-b[6])*d,a[2]=(b[3]-b[1])*d;else{d=r.fromRotationMatrix.s_iNext=r.fromRotationMatrix.s_iNext||[1,2,0];c=0;b[4]>b[0]&&(c=1);b[8]>b[3*c+c]&&(c=2);var g=d[c],e=d[g];d=Math.sqrt(b[3*c+c]-b[3*g+g]-b[3*e+e]+1);a[c]=.5*d;d=.5/d;a[3]=(b[3*
  774. e+g]-b[3*g+e])*d;a[g]=(b[3*g+c]+b[3*c+g])*d;a[e]=(b[3*e+c]+b[3*c+e])*d}return a};v.toQuat4=r.fromRotationMatrix;(function(){var b=v.create();r.fromAxes=function(a,c,d,g){b[0]=c[0];b[3]=c[1];b[6]=c[2];b[1]=d[0];b[4]=d[1];b[7]=d[2];b[2]=a[0];b[5]=a[1];b[8]=a[2];return r.fromRotationMatrix(b,g)}})();r.identity=function(b){b||(b=r.create());b[0]=0;b[1]=0;b[2]=0;b[3]=1;return b};r.fromAngleAxis=function(b,a,c){c||(c=r.create());b*=.5;var d=Math.sin(b);c[3]=Math.cos(b);c[0]=d*a[0];c[1]=d*a[1];c[2]=d*a[2];
  775. return c};r.toAngleAxis=function(b,a){a||(a=b);var c=b[0]*b[0]+b[1]*b[1]+b[2]*b[2];0<c?(a[3]=2*Math.acos(b[3]),c=e.invsqrt(c),a[0]=b[0]*c,a[1]=b[1]*c,a[2]=b[2]*c):(a[3]=0,a[0]=1,a[1]=0,a[2]=0);return a};r.str=function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"};var q={create:function(b){var a=new f(4);b?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a[0]=a[1]=a[2]=a[3]=0;return a},createFrom:function(b,a,c,g){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=g;return d},set:function(b,a){a[0]=b[0];a[1]=
  776. b[1];a[2]=b[2];a[3]=b[3];return a},identity:function(b){b||(b=q.create());b[0]=1;b[1]=0;b[2]=0;b[3]=1;return b},transpose:function(b,a){if(!a||b===a)return a=b[1],b[1]=b[2],b[2]=a,b;a[0]=b[0];a[1]=b[2];a[2]=b[1];a[3]=b[3];return a},determinant:function(b){return b[0]*b[3]-b[2]*b[1]},inverse:function(b,a){a||(a=b);var c=b[0],d=b[1],g=b[2];b=b[3];var e=c*b-g*d;if(!e)return null;e=1/e;a[0]=b*e;a[1]=-d*e;a[2]=-g*e;a[3]=c*e;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],g=b[1],e=b[2];b=b[3];c[0]=
  777. d*a[0]+g*a[2];c[1]=d*a[1]+g*a[3];c[2]=e*a[0]+b*a[2];c[3]=e*a[1]+b*a[3];return c},rotate:function(b,a,c){c||(c=b);var d=b[0],g=b[1],e=b[2];b=b[3];var k=Math.sin(a);a=Math.cos(a);c[0]=d*a+g*k;c[1]=d*-k+g*a;c[2]=e*a+b*k;c[3]=e*-k+b*a;return c},multiplyVec2:function(b,a,c){c||(c=a);var d=a[0];a=a[1];c[0]=d*b[0]+a*b[1];c[1]=d*b[2]+a*b[3];return c},scale:function(b,a,c){c||(c=b);var d=b[1],g=b[2],e=b[3],k=a[0];a=a[1];c[0]=b[0]*k;c[1]=d*a;c[2]=g*k;c[3]=e*a;return c},str:function(b){return"["+b[0]+", "+b[1]+
  778. ", "+b[2]+", "+b[3]+"]"}};p=p?"":"d";a["glMath"+p]=e;a["vec2"+p]={create:function(b){var a=new f(2);b?(a[0]=b[0],a[1]=b[1]):(a[0]=0,a[1]=0);return a},createFrom:function(b,a){var c=new f(2);c[0]=b;c[1]=a;return c},add:function(b,a,c){c||(c=a);c[0]=b[0]+a[0];c[1]=b[1]+a[1];return c},subtract:function(b,a,c){c||(c=a);c[0]=b[0]-a[0];c[1]=b[1]-a[1];return c},multiply:function(b,a,c){c||(c=a);c[0]=b[0]*a[0];c[1]=b[1]*a[1];return c},divide:function(b,a,c){c||(c=a);c[0]=b[0]/a[0];c[1]=b[1]/a[1];return c},
  779. scale:function(b,a,c){c||(c=b);c[0]=b[0]*a;c[1]=b[1]*a;return c},dist:function(b,a){var c=a[0]-b[0];b=a[1]-b[1];return Math.sqrt(c*c+b*b)},dist2:function(b,a){var c=a[0]-b[0];b=a[1]-b[1];return c*c+b*b},set:function(b,a){a[0]=b[0];a[1]=b[1];return a},set2:function(b,a,c){c[0]=b;c[1]=a;return c},negate:function(b,a){a||(a=b);a[0]=-b[0];a[1]=-b[1];return a},normalize:function(b,a){a||(a=b);var c=b[0]*b[0]+b[1]*b[1];0<c?(c=Math.sqrt(c),a[0]=b[0]/c,a[1]=b[1]/c):a[0]=a[1]=0;return a},cross:function(b,
  780. a,c){b=b[0]*a[1]-b[1]*a[0];if(!c)return b;c[0]=c[1]=0;c[2]=b;return c},length:function(b){var a=b[0];b=b[1];return Math.sqrt(a*a+b*b)},dot:function(b,a){return b[0]*a[0]+b[1]*a[1]},direction:function(b,a,c){c||(c=b);var d=b[0]-a[0];b=b[1]-a[1];a=d*d+b*b;if(!a)return c[0]=0,c[1]=0,c[2]=0,c;a=1/Math.sqrt(a);c[0]=d*a;c[1]=b*a;return c},lerp:function(b,a,c,g){g||(g=b);g[0]=b[0]+c*(a[0]-b[0]);g[1]=b[1]+c*(a[1]-b[1]);return g},str:function(b){return"["+b[0]+", "+b[1]+"]"}};a["vec3"+p]=l;a["vec4"+p]={create:function(b){var a=
  781. new f(4);b?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):(a[0]=0,a[1]=0,a[2]=0,a[3]=0);return a},createFrom:function(b,a,c,g){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=g;return d},add:function(b,a,c){c||(c=a);c[0]=b[0]+a[0];c[1]=b[1]+a[1];c[2]=b[2]+a[2];c[3]=b[3]+a[3];return c},subtract:function(b,a,c){c||(c=a);c[0]=b[0]-a[0];c[1]=b[1]-a[1];c[2]=b[2]-a[2];c[3]=b[3]-a[3];return c},multiply:function(b,a,c){c||(c=a);c[0]=b[0]*a[0];c[1]=b[1]*a[1];c[2]=b[2]*a[2];c[3]=b[3]*a[3];return c},divide:function(b,a,
  782. c){c||(c=a);c[0]=b[0]/a[0];c[1]=b[1]/a[1];c[2]=b[2]/a[2];c[3]=b[3]/a[3];return c},scale:function(b,a,c){c||(c=b);c[0]=b[0]*a;c[1]=b[1]*a;c[2]=b[2]*a;c[3]=b[3]*a;return c},dot:function(b,a){return b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3]},set:function(b,a){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a},set4:function(b,a,c,g,e){e[0]=b;e[1]=a;e[2]=c;e[3]=g;return e},negate:function(b,a){a||(a=b);a[0]=-b[0];a[1]=-b[1];a[2]=-b[2];a[3]=-b[3];return a},lerp:function(b,a,c,g){g||(g=b);g[0]=b[0]+c*(a[0]-
  783. b[0]);g[1]=b[1]+c*(a[1]-b[1]);g[2]=b[2]+c*(a[2]-b[2]);g[3]=b[3]+c*(a[3]-b[3]);return g},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"}};a["mat2"+p]=q;a["mat3"+p]=v;a["mat4"+p]=x;a["quat4"+p]=r});return a})},"esri/views/3d/support/projectionUtils":function(){define("require exports ../../../geometry/Point ../../../geometry/SpatialReference ../lib/glMatrix ./earthUtils ./mathUtils ../webgl-engine/lib/BufferVectorMath".split(" "),function(a,f,p,e,n,l,h,c){function m(a,c,d,g){2===a.length?
  784. (D[0]=a[0],D[1]=a[1],D[2]=0,a=D):a===d&&(n.vec3d.set(a,D),a=D);return b(a,c,0,d,g,0,1)}function b(b,a,c,e,h,m,f){void 0===f&&(f=1);r!==a&&(w=g(a),r=a);q!==h&&(d=g(h),q=h);f=c+3*f;if(w!==d||w===x.UNKNOWN&&!a.equals(h))if(w>x.UNKNOWN&&d>x.UNKNOWN)if(d!==x.WGS84)if(a=k[d],w!==x.WGS84)for(h=y[w];c<f;c+=3,m+=3)h(b,c,F,0),a(F,0,e,m);else for(;c<f;c+=3,m+=3)a(b,c,e,m);else for(h=y[w];c<f;c+=3,m+=3)h(b,c,e,m);else return!1;else if(e!==b||c!==m)for(;c<f;c++,m++)e[m]=b[c];return!0}function g(b){return b.wkt===
  785. f.SphericalECEFSpatialReference.wkt?x.SPHERICAL_ECEF:b.isWGS84?x.WGS84:b.isWebMercator?x.WEBMERC:b.wkt===f.WGS84ECEFSpatialReference.wkt?x.WGS84_ECEF:x.UNKNOWN}function t(b,a,c,d){c[d++]=b[a++];c[d++]=b[a++];c[d]=b[a]}function u(b,a,c,d){var g=.4999999*Math.PI,g=h.clamp(z*b[a+1],-g,g),g=Math.sin(g);c[d++]=z*b[a]*C;c[d++]=C/2*Math.log((1+g)/(1-g));c[d]=b[a+2]}function v(b,a,c,d){var g=C+b[a+2],e=z*b[a+1];b=z*b[a];a=Math.cos(e);c[d++]=Math.cos(b)*a*g;c[d++]=Math.sin(b)*a*g;c[d]=Math.sin(e)*g}Object.defineProperty(f,
  786. "__esModule",{value:!0});f.SphericalECEFSpatialReference=new e({wkt:'GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",\' + earthUtils.earthRadius + \',0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n]'});f.WGS84ECEFSpatialReference=new e({wkt:'GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",6378137,298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]'});
  787. var x;(function(b){b[b.UNKNOWN=0]="UNKNOWN";b[b.SPHERICAL_ECEF=1]="SPHERICAL_ECEF";b[b.WGS84=2]="WGS84";b[b.WEBMERC=3]="WEBMERC";b[b.WGS84_ECEF=4]="WGS84_ECEF"})(x||(x={}));var r,w,q,d;f.vectorToVector=m;f.pointToVector=function(a,c,d){D[0]=a.x;D[1]=a.y;var g=a.z;D[2]=void 0!==g?g:0;return b(D,a.spatialReference,0,c,d,0,1)};f.vectorToPoint=function(a,c,d,g){"esri.geometry.SpatialReference"===d.declaredClass?(g=d,d=new p({spatialReference:g})):g=g||d.spatialReference;return b(a,c,0,D,g,0,1)?(d.x=D[0],
  788. d.y=D[1],d.z=D[2],d.spatialReference=g,d):null};f.xyzToVector=function(a,c,d,g,e,k){D[0]=a;D[1]=c;D[2]=d;return b(D,g,0,e,k,0,1)};f.bufferToBuffer=b;f.computeLinearTransformation=function(b,a,c,d){var e=g(b),k=g(d);if(e===k&&k!==x.SPHERICAL_ECEF&&(e!==x.UNKNOWN||b.equals(d)))return n.mat4d.identity(c),n.mat4d.translate(c,a),!0;if(k===x.SPHERICAL_ECEF){if(b=y[e])return b(a,0,F,0),v(F,0,G,0),d=z*F[0],b=z*F[1],a=Math.sin(d),d=Math.cos(d),e=Math.sin(b),b=Math.cos(b),c[0]=-a,c[4]=-e*d,c[8]=b*d,c[12]=G[0],
  789. c[1]=d,c[5]=-e*a,c[9]=b*a,c[13]=G[1],c[2]=0,c[6]=b,c[10]=e,c[14]=G[2],c[3]=0,c[7]=0,c[11]=0,c[15]=1,!0}else if(k===x.WEBMERC&&(e===x.WGS84||e===x.SPHERICAL_ECEF))return y[e](a,0,F,0),a=z*F[1],u(F,0,G,0),n.mat4d.identity(c),n.mat4d.translate(c,G),a=1/Math.cos(a),n.mat4d.scale(c,[a,a,1]),!0;return!1};f.transformDirection=function(b,a,c,d,g){n.vec3d.set(b,Y);n.vec3d.add(b,a,aa);m(Y,c,Y,g);m(aa,c,aa,g);n.vec3d.subtract(aa,Y,d);n.vec3d.normalize(d)};f.mbsToMbs=function(b,a,c,d){var e=g(a),k=g(d);if(e===
  790. k&&(e!==x.UNKNOWN||a.equals(d)))return c[0]=b[0],c[1]=b[1],c[2]=b[2],c[3]=b[3],!0;if(k===x.SPHERICAL_ECEF){if(a=y[e])return a(b,0,F,0),v(F,0,c,0),c[3]=b[3],!0}else if(k===x.WEBMERC&&(e===x.WGS84||e===x.SPHERICAL_ECEF))return y[e](b,0,F,0),a=Math.abs(z*F[1])+Math.asin(b[3]/(C+b[2])),u(F,0,c,0),c[3]=a>.9999*Math.PI?Number.MAX_VALUE:1/Math.cos(a)*b[3],!0;return!1};f.extentToBoundingBox=function(a,c,d){if(null==a)return!1;var g;D[0]=null!=a.xmin?a.xmin:0;D[1]=null!=a.ymin?a.ymin:0;D[2]=null!=a.zmin?a.zmin:
  791. 0;g=b(D,a.spatialReference,0,c,d,0,1);D[0]=null!=a.xmax?a.xmax:0;D[1]=null!=a.ymax?a.ymax:0;D[2]=null!=a.zmax?a.zmax:0;g=g&&b(D,a.spatialReference,0,c,d,3,1);null==a.xmin&&(c[0]=-Infinity);null==a.ymin&&(c[1]=-Infinity);null==a.zmin&&(c[2]=-Infinity);null==a.xmax&&(c[3]=Infinity);null==a.ymax&&(c[4]=Infinity);null==a.zmax&&(c[5]=Infinity);return g};f.extentToBoundingRect=function(a,c,d){if(null==a)return!1;var g;D[0]=null!=a.xmin?a.xmin:0;D[1]=null!=a.ymin?a.ymin:0;D[2]=null!=a.zmin?a.zmin:0;g=b(D,
  792. a.spatialReference,0,D,d,0,1);c[0]=D[0];c[1]=D[1];D[0]=null!=a.xmax?a.xmax:0;D[1]=null!=a.ymax?a.ymax:0;D[2]=null!=a.zmax?a.zmax:0;g=g&&b(D,a.spatialReference,0,D,d,0,1);c[2]=D[0];c[3]=D[1];null==a.xmin&&(c[0]=-Infinity);null==a.ymin&&(c[1]=-Infinity);null==a.xmax&&(c[2]=Infinity);null==a.ymax&&(c[3]=Infinity);return g};(function(b){b.x2lon=function(b){return b/C};b.y2lat=function(b){return Math.PI/2-2*Math.atan(Math.exp(-1*b/C))};b.lon2x=function(b){return b*C};b.lat2y=function(b){b=Math.sin(b);
  793. return C/2*Math.log((1+b)/(1-b))}})(f.webMercator||(f.webMercator={}));var k=[void 0,v,t,u,function(b,a,c,d){var g=B,e=z*b[a],k=z*b[a+1];b=b[a+2];a=Math.sin(k);var k=Math.cos(k),q=g.a/Math.sqrt(1-g.e2*a*a);c[d++]=(q+b)*k*Math.cos(e);c[d++]=(q+b)*k*Math.sin(e);c[d++]=(q*(1-g.e2)+b)*a}],y=[void 0,function(b,a,d,g){var e=c.Vec3Compact.length(b,a),k=h.asin(b[a+2]/e);b=(0<b[a+1]?1:-1)*h.acos(b[a]/(Math.cos(k)*e));d[g++]=A*b;d[g++]=A*k;d[g]=e-C},t,function(b,a,c,d){c[d++]=A*(b[a++]/C);c[d++]=A*(Math.PI/
  794. 2-2*Math.atan(Math.exp(-1*b[a++]/C)));c[d]=b[a]},function(b,a,c,d){var g=B,e=b[a],k=b[a+1];b=b[a+2];var q,h,m,f,l,n;a=Math.abs(b);q=e*e+k*k;h=Math.sqrt(q);m=q+b*b;f=Math.sqrt(m);e=Math.atan2(k,e);l=b*b/m;m=q/m;k=g.a2/f;q=g.a3-g.a4/f;.3<m?(l=a/f*(1+m*(g.a1+k+l*q)/f),f=Math.asin(l),k=l*l,m=Math.sqrt(1-k)):(m=h/f*(1-l*(g.a5-k-m*q)/f),f=Math.acos(m),k=1-m*m,l=Math.sqrt(k));n=1-g.e2*k;k=g.a/Math.sqrt(n);g=g.a6*k;k=h-k*m;q=a-g*l;a=m*k+l*q;h=m*q-l*k;g=h/(g/n+a);f+=g;0>b&&(f=-f);c[d++]=A*e;c[d++]=A*f;c[d]=
  795. a+h*g/2}],z=h.deg2rad(1),A=h.rad2deg(1),C=l.earthRadius,B={a:6378137,e2:.006694379990137799,a1:42697.67270715754,a2:1.8230912546075456E9,a3:142.91722289812412,a4:4.557728136518864E9,a5:42840.589930055656,a6:.9933056200098622},D=n.vec3d.create(),F=n.vec3d.create(),G=n.vec3d.create(),Y=n.vec3d.create(),aa=n.vec3d.create()})},"esri/views/3d/support/earthUtils":function(){define("require exports ../../../geometry/Point ../../../geometry/SpatialReference ../../../geometry/support/webMercatorUtils ./mathUtils".split(" "),
  796. function(a,f,p,e,n,l){function h(b,a,c,g){var e,h;b instanceof p&&a instanceof p&&(c=a.longitude,g=a.latitude,h=b.latitude,e=b.longitude);b=l.deg2rad(h);g=l.deg2rad(g);e=l.deg2rad(e);a=l.deg2rad(c);c=Math.sin((b-g)/2);e=Math.sin((e-a)/2);c=2*l.asin(Math.sqrt(c*c+Math.cos(b)*Math.cos(g)*e*e))*f.earthRadius;return Math.round(1E4*c)/1E4}function c(b,a,c){b=c/f.earthRadius;a=l.deg2rad(a);b=Math.sin(b/2);a=Math.cos(a);a=2*l.asin(Math.sqrt(b*b/(a*a)));return l.rad2deg(a)}function m(b,a,c){return l.rad2deg(c/
  797. f.earthRadius)}function b(b,a){b/=15;a||(b=Math.round(b));return b}Object.defineProperty(f,"__esModule",{value:!0});f.wgs84Radius=6378137;f.wgs84InverseFlattening=298.257223563;f.wgs84Flattening=1/f.wgs84InverseFlattening;f.wgs84PolarRadius=f.wgs84Radius*(1-f.wgs84Flattening);f.wgs84Eccentricity=.0818191908426215;f.earthRadius=f.wgs84Radius;f.halfEarthCircumference=Math.PI*f.earthRadius;f.earthCircumference=2*f.halfEarthCircumference;f.metersPerDegree=f.halfEarthCircumference/180;var g=new p(0,0,
  798. e.WGS84);f.getGreatCircleDistance=h;f.getGreatCircleSpanAt=function(b,a,c){var g=a.spatialReference,e=new p(a.x,b.y,g),m=new p(c.x,b.y,g);a=new p(b.x,a.y,g);b=new p(b.x,c.y,g);return{lon:h(e,m),lat:h(a,b)}};f.getLonDeltaForDistance=c;f.getLatDeltaForDistance=m;f.getLatLonDeltaForDistance=function(b,a,g){return{lat:m(b,a,g),lon:c(b,a,g)}};f.getMaxCameraAltitude=function(b){b=l.deg2rad(b/2);return(1-Math.sin(b))*f.earthRadius/Math.sin(b)};f.getViewExtentDistance=function(b,a){a=l.deg2rad(a/2);return 2*
  799. l.acos((Math.pow(b+f.earthRadius,2)+Math.pow(f.earthRadius,2)-Math.pow((b+f.earthRadius)*Math.cos(a)-Math.sqrt(Math.pow(Math.cos(a)*(b+f.earthRadius),2)-b*b-2*b*f.earthRadius),2))/(2*(b+f.earthRadius)*f.earthRadius))*f.earthRadius};f.computeCarthesianDistance=function(b,a){function c(b){var a=l.deg2rad(b.latitude),c=l.deg2rad(b.longitude),g=Math.cos(a);b=f.earthRadius+(b.z||0);return[Math.cos(c)*g*b,Math.sin(a)*b,-Math.sin(c)*g*b]}b=c(b);a=c(a);a=[a[0]-b[0],a[1]-b[1],a[2]-b[2]];return Math.sqrt(a[0]*
  800. a[0]+a[1]*a[1]+a[2]*a[2])};f.longitudeToTimezone=b;f.positionToTimezone=function(a,c){a.spatialReference.wkid!==e.WGS84.wkid?n.webMercatorToGeographic(a,!1,g):(g.x=a.x,g.y=a.y);g.z=a.z;c||(c={hours:0,minutes:0,seconds:0});c.hours=b(g.x,!0);a=c.hours%1;c.hours-=a;c.minutes=60*a;a=c.minutes%1;c.minutes-=a;c.seconds=Math.round(60*a);return c}})},"esri/views/3d/support/mathUtils":function(){define(["require","exports","../lib/glMatrix"],function(a,f,p){function e(b){return Math.asin(1<b?1:-1>b?-1:b)}
  801. function n(b){return Math.acos(1<b?1:-1>b?-1:b)}function l(b,a,c){return b<a?a:b>c?c:b}function h(b){for(var a in b){var c=b[a];c instanceof Function&&(b[a]=c.bind(b))}return b}Object.defineProperty(f,"__esModule",{value:!0});f.deg2rad=function(b){return b*Math.PI/180};f.rad2deg=function(b){return 180*b/Math.PI};f.asin=e;f.acos=n;f.sign=Math.sign||function(b){return+(0<b)-+(0>b)||+b};f.log2=Math.log2||function(b){return Math.log(b)/Math.LN2};f.fovx2fovy=function(b,a,c){return 2*Math.atan(c*Math.tan(.5*
  802. b)/a)};f.fovy2fovx=function(b,a,c){return 2*Math.atan(a*Math.tan(.5*b)/c)};f.makeOrthonormal=function(b,a,c){c=c||b;var g=p.vec3d.dot(b,a);p.vec3d.set3(b[0]-g*a[0],b[1]-g*a[1],b[2]-g*a[2],c);p.vec3d.normalize(c)};f.tangentFrame=function(b,a,c){Math.abs(b[0])>Math.abs(b[1])?p.vec3d.set3(0,1,0,a):p.vec3d.set3(1,0,0,a);p.vec3d.cross(b,a,c);p.vec3d.normalize(a);p.vec3d.cross(c,b,a);p.vec3d.normalize(c)};f.cartesianToSpherical=function(b,a){var c=p.vec3d.length(b),g=e(b[2]/c);p.vec3d.set3(c,g,Math.atan2(b[1]/
  803. c,b[0]/c),a)};f.sphericalToCartesian=function(b,a){var c=b[0],g=b[1];b=b[2];var e=Math.cos(g);p.vec3d.set3(c*e*Math.cos(b),c*e*Math.sin(b),c*Math.sin(g),a)};f.lerp=function(b,a,c){return b+(a-b)*c};f.bilerp=function(b,a,c,e,h,m){b+=(a-b)*h;return b+(c+(e-c)*h-b)*m};f.slerp=function(a,c,e,h){void 0===h&&(h=a);var g=p.vec3d.length(a),f=p.vec3d.length(c),l=p.vec3d.dot(a,c)/(g*f);if(.9999999999999999>l){var l=Math.acos(l),q=((1-e)*g+e*f)/Math.sin(l),f=q/f*Math.sin(e*l);p.vec3d.scale(a,q/g*Math.sin((1-
  804. e)*l),m);p.vec3d.scale(c,f,b);return p.vec3d.add(m,b,h)}return p.vec3d.lerp(a,c,e,h)};f.angle=function(a,e,h){a=p.vec3d.normalize(a,m);e=p.vec3d.normalize(e,b);var g=n(p.vec3d.dot(a,e));return h&&(a=p.vec3d.cross(a,e,c),0>p.vec3d.dot(a,h))?-g:g};f.clamp=l;f.isFinite=Number.isFinite||function(b){return"number"===typeof b&&window.isFinite(b)};f.isNaN=Number.isNaN||function(b){return b!==b};f.makePiecewiseLinearFunction=function(b){var a=b.length;return function(c){var g=0;if(c<=b[0][0])return b[0][1];
  805. if(c>=b[a-1][0])return b[a-1][1];for(;c>b[g][0];)g++;var e=b[g][0];c=(e-c)/(e-b[g-1][0]);return c*b[g-1][1]+(1-c)*b[g][1]}};f.vectorEquals=function(b,a){if(null==b||null==a)return b!==a;if(b.length!==a.length)return!1;for(var c=0;c<b.length;c++)if(b[c]!==a[c])return!1;return!0};f.floatEqualRelative=function(b,a,c){void 0===c&&(c=1E-6);if(f.isNaN(b)||f.isNaN(a))return!1;if(b===a)return!0;var g=Math.abs(b-a),e=Math.abs(b),h=Math.abs(a);if(0===b||0===a||1E-12>e&&1E-12>h){if(g>.01*c)return!1}else if(g/
  806. (e+h)>c)return!1;return!0};f.floatEqualAbsolute=function(b,a,c){void 0===c&&(c=1E-6);return f.isNaN(b)||f.isNaN(a)?!1:(b>a?b-a:a-b)<=c};a=function(){function b(b,a){this.min=b;this.max=a;this.range=a-b}b.prototype.ndiff=function(b,a){void 0===a&&(a=0);return Math.ceil((b-a)/this.range)*this.range+a};b.prototype._normalize=function(b,a,c,g){void 0===g&&(g=0);c-=g;c<b?c+=this.ndiff(b-c):c>a&&(c-=this.ndiff(c-a));return c+g};b.prototype.normalize=function(b,a){return this._normalize(this.min,this.max,
  807. b,a)};b.prototype.clamp=function(b,a){void 0===a&&(a=0);return l(b-a,this.min,this.max)+a};b.prototype.monotonic=function(b,a,c){return b<a?a:a+this.ndiff(b-a,c)};b.prototype.minimalMonotonic=function(b,a,c){return this._normalize(b,b+this.range,a,c)};b.prototype.center=function(b,a,c){a=this.monotonic(b,a,c);return this.normalize((b+a)/2,c)};b.prototype.diff=function(b,a,c){return this.monotonic(b,a,c)-b};b.prototype.contains=function(b,a,c){a=this.minimalMonotonic(b,a);c=this.minimalMonotonic(b,
  808. c);return c>b&&c<a};return b}();f.Cyclical=a;f.cyclical2PI=h(new a(0,2*Math.PI));f.cyclicalPI=h(new a(-Math.PI,Math.PI));f.cyclicalDeg=h(new a(0,360));var c=p.vec3d.create(),m=p.vec3d.create(),b=p.vec3d.create()})},"esri/views/3d/webgl-engine/lib/BufferVectorMath":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});(function(a){a.length=function(a,f){var e=a[f],h=a[f+1];a=a[f+2];return Math.sqrt(e*e+h*h+a*a)};a.normalize=function(a,f){var e=a[f],
  809. h=a[f+1],c=a[f+2],e=1/Math.sqrt(e*e+h*h+c*c);a[f]*=e;a[f+1]*=e;a[f+2]*=e};a.scale=function(a,f,l){a[f]*=l;a[f+1]*=l;a[f+2]*=l};a.add=function(a,f,l,h,c,m){void 0===m&&(m=f);c=c||a;c[m]=a[f]+l[h];c[m+1]=a[f+1]+l[h+1];c[m+2]=a[f+2]+l[h+2]};a.subtract=function(a,f,l,h,c,m){void 0===m&&(m=f);c=c||a;c[m]=a[f]-l[h];c[m+1]=a[f+1]-l[h+1];c[m+2]=a[f+2]-l[h+2]}})(f.Vec3Compact||(f.Vec3Compact={}))})},"esri/geometry/support/meshUtils/offset":function(){define(["require","exports","./projection","../../../views/3d/lib/glMatrix",
  810. "../../../views/3d/support/projectionUtils"],function(a,f,p,e,n){function l(b,a){if(b)for(var c=0;c<b.length;c+=3)for(var g=0;3>g;g++)b[c+g]+=a[g]}Object.defineProperty(f,"__esModule",{value:!0});f.offset=function(b,a,f){if(b.vertexAttributes&&b.vertexAttributes.position){var g=b.spatialReference;if(g.isWGS84||g.isWebMercator&&(!f||!1!==f.geographic)){f=b.spatialReference;var g=b.vertexAttributes.position,t=b.vertexAttributes.normal,x=new Float64Array(g.length),r=new Float32Array(t?t.length:0),w=
  811. b.extent.center,q=h;n.computeLinearTransformation(f,[w.x,w.y,w.z],c,n.SphericalECEFSpatialReference);e.mat4d.toMat3(c,m);e.mat3d.multiplyVec3(m,a,q);p.projectToECEF(g,f,x);t&&p.projectNormalToECEF(t,g,x,f,r);l(x,q);p.projectFromECEF(x,g,f);t&&p.projectNormalFromECEF(r,g,x,f,t)}else l(b.vertexAttributes.position,a);b.clearCache()}};var h=e.vec3d.create(),c=e.mat4d.create(),m=e.mat3d.create()})},"esri/geometry/support/meshUtils/primitives":function(){define(["require","exports","../../../geometry",
  812. "./georeference","../../../views/3d/lib/glMatrix"],function(a,f,p,e,n){Object.defineProperty(f,"__esModule",{value:!0});f.createUnitSizeBox=function(){for(var b=h.faceDescriptions,a=h.faceVertexOffsets,c=h.uvScales,e=4*b.length,m=new Float64Array(3*e),f=new Float32Array(3*e),e=new Float32Array(2*e),l=new Uint32Array(6*b.length),n=0,q=0,d=0,k=0,p=0;p<b.length;p++){for(var z=b[p],A=n/3,C=0,B=a;C<B.length;C++){var D=B[C];l[k++]=A+D}A=z.corners;for(C=0;4>C;C++){B=A[C];D=0;e[d++]=.25*c[C][0]+z.uvOrigin[0];
  813. e[d++]=z.uvOrigin[1]-.25*c[C][1];for(var F=0;3>F;F++)0!==z.axis[F]?(m[n++]=.5*z.axis[F],f[q++]=z.axis[F]):(m[n++]=.5*B[D++],f[q++]=0)}}return{position:m,normal:f,uv:e,faces:l}};f.createUnitSizeSphere=function(b){void 0===b&&(b=0);b=Math.round(8*Math.pow(2,b));for(var a=2*b,e=(b-1)*(a+1)+2*a,h=new Float64Array(3*e),m=new Float32Array(3*e),e=new Float32Array(2*e),f=new Uint32Array((b-1)*a*6),l=0,n=0,q=0,d=0,k=0,p=0;p<=b;p++){var z=p/b*Math.PI+.5*Math.PI,A=Math.cos(z);c[2]=Math.sin(z);for(var C=(z=0===
  814. p||p===b)?a-1:a,B=0;B<=C;B++){var D=B/C*2*Math.PI;c[0]=-Math.sin(D)*A;c[1]=Math.cos(D)*A;for(D=0;3>D;D++)h[l++]=.5*c[D],m[n++]=c[D];e[q++]=(B+(z?.5:0))/a;e[q++]=p/b;0!==p&&B!==a&&(p!==b&&(f[d++]=k,f[d++]=k+1,f[d++]=k-a),1!==p&&(f[d++]=k,f[d++]=k-a,f[d++]=k-a-1));k++}}return{position:h,normal:m,uv:e,faces:f}};f.createUnitSizeCylinder=function(b){void 0===b&&(b=0);b=Math.round(16*Math.pow(2,b));for(var a=4*(b+1)+2*b,e=new Float64Array(3*a),h=new Float32Array(3*a),a=new Float32Array(2*a),f=new Uint32Array(12*
  815. b),m=0,l=0,n=0,q=0,d=0,k=0;5>=k;k++)for(var p=0===k||5===k,z=1>=k||4<=k,A=2===k||4===k,C=p?b-1:b,B=0;B<=C;B++){var D=B/C*2*Math.PI,F=p?0:.5;c[0]=F*Math.sin(D);c[1]=F*-Math.cos(D);c[2]=2>=k?.5:-.5;for(D=0;3>D;D++)e[m++]=c[D],z?h[l++]=2===D?1>=k?1:-1:0:h[l++]=2===D?0:c[D]/F;a[n++]=(B+(p?.5:0))/b;1>=k?a[n++]=1*k/3:3>=k?a[n++]=1*(k-2)/3+1/3:a[n++]=1*(k-4)/3+2/3;A||0===k||B===b||(5!==k&&(f[q++]=d,f[q++]=d+1,f[q++]=d-b),1!==k&&(f[q++]=d,f[q++]=d-b,f[q++]=d-b-1));d++}return{position:e,normal:h,uv:a,faces:f}};
  816. f.createUnitSizePlane=function(b){b=l.facingAxisOrderSwap[b];for(var a=l.position,c=l.normal,e=new Float64Array(a.length),h=new Float32Array(c.length),f=0,m=0;4>m;m++)for(var n=f,q=0;3>q;q++){var d=b[q],k=Math.abs(d)-1,d=0<=d?1:-1;e[f]=a[n+k]*d;h[f]=c[n+k]*d;f++}return{position:e,normal:h,uv:new Float32Array(l.uv),faces:new Uint32Array(l.faces)}};var l={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,
  817. 1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};f.convertUnitGeometry=function(b,a,h){for(var g=0;g<b.position.length;g+=3)b.position[g+2]+=.5;g=h&&h.size;if(null!=g){g="number"===typeof g?[g,g,g]:[null!=g.width?g.width:1,null!=g.depth?g.depth:1,null!=g.height?g.height:1];m[0]=g[0];m[4]=g[1];m[8]=g[2];for(var f=0;f<b.position.length;f+=3){for(var l=0;3>l;l++)c[l]=b.position[f+l];n.mat3d.multiplyVec3(m,c);for(l=0;3>l;l++)b.position[f+l]=c[l]}if(g[0]!==g[1]||g[1]!==g[2])for(m[0]=
  818. 1/g[0],m[4]=1/g[1],m[8]=1/g[2],f=0;f<b.normal.length;f+=3){for(l=0;3>l;l++)c[l]=b.normal[f+l];n.mat3d.multiplyVec3(m,c);n.vec3d.normalize(c);for(l=0;3>l;l++)b.normal[f+l]=c[l]}}g=e.georeference(b,a,h);return new p.Mesh({vertexAttributes:{position:g.position,normal:g.normal,uv:b.uv},components:[{faces:b.faces,material:h&&h.material||null}],spatialReference:a.spatialReference})};var h={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,
  819. .625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]};f.boxFaceOrder={south:0,east:1,north:2,west:3,up:4,down:5};var c=n.vec3d.create(),m=n.mat3d.identity()})},
  820. "esri/geometry/support/meshUtils/georeference":function(){define(["require","exports","../../../views/3d/lib/glMatrix","../../../views/3d/support/projectionUtils"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.georeference=function(a,c,f){var b=c.spatialReference;if(b.isWGS84||b.isWebMercator&&(!f||!1!==f.geographic)){f=c.spatialReference;e.computeLinearTransformation(c.spatialReference,[c.x,c.y,c.z||0],n,e.SphericalECEFSpatialReference);var b=a.position,g=n,h=c.spatialReference,
  821. m=new Float64Array(b.length);for(c=0;c<b.length;c+=3){for(var v=0;3>v;v++)l[v]=b[c+v];p.mat4d.multiplyVec3(g,l);for(v=0;3>v;v++)m[c+v]=l[v]}c=new Float64Array(b.length);e.bufferToBuffer(m,e.SphericalECEFSpatialReference,0,c,h,0,m.length/3);a=a.normal;if(f.isWebMercator&&a){f=new Float32Array(a.length);for(b=0;b<a.length;b+=3)for(g=e.webMercator.y2lat(c[b+1]),g=Math.cos(g),l[0]=a[b+0]*g,l[1]=a[b+1]*g,l[2]=a[b+2],p.vec3d.normalize(l),g=0;3>g;g++)f[b+g]=l[g];a=f}a={position:c,normal:a}}else{f=new Float64Array(a.position.length);
  822. b=a.position;for(g=0;g<b.length;g+=3)f[g+0]=b[g+0]+c.x,f[g+1]=b[g+1]+c.y,f[g+2]=b[g+2]+c.z;a={position:f,normal:a.normal}}return a};var n=p.mat4d.create(),l=p.vec3d.create()})},"esri/geometry/support/meshUtils/rotate":function(){define("require exports ../../../core/Logger ./projection ../../../views/3d/lib/glMatrix ../../../views/3d/support/projectionUtils".split(" "),function(a,f,p,e,n,l){function h(b,a,c){void 0===c&&(c=x);if(b)for(n.mat4d.identity(u),n.mat4d.rotate(u,a[3],a),a=0;a<b.length;a+=
  823. 3){for(var d=0;3>d;d++)m[d]=b[a+d]-c[d];n.mat4d.multiplyVec3(u,m);for(d=0;3>d;d++)b[a+d]=m[d]+c[d]}}Object.defineProperty(f,"__esModule",{value:!0});var c=p.getLogger("esri.geometry.support.meshUtils.rotate");f.rotate=function(a,g,d){if(a.vertexAttributes&&a.vertexAttributes.position&&0!==g[3]){var k=a.spatialReference,q=d&&d.origin||a.extent.center;if(k.isWGS84||k.isWebMercator&&(!d||!1!==d.geographic)){d=a.spatialReference;k=r;l.pointToVector(q,k,l.SphericalECEFSpatialReference)||l.pointToVector(a.extent.center,
  824. k,l.SphericalECEFSpatialReference);var q=a.vertexAttributes.position,f=a.vertexAttributes.normal,m=new Float64Array(q.length),t=new Float32Array(f?f.length:0);l.computeLinearTransformation(l.SphericalECEFSpatialReference,k,u,l.SphericalECEFSpatialReference);n.mat4d.toMat3(u,v);var p=n.mat3d.multiplyVec3(v,g,b);p[3]=g[3];e.projectToECEF(q,d,m);f&&e.projectNormalToECEF(f,q,m,d,t);h(m,p,k);e.projectFromECEF(m,q,d);f&&(h(t,p),e.projectNormalFromECEF(t,q,m,d,f))}else d=r,l.pointToVector(q,d,a.spatialReference)||
  825. (k=a.extent.center,d[0]=k.x,d[1]=k.y,d[2]=k.z,c.error("Failed to project specified origin (wkid:"+q.spatialReference.wkid+") to mesh spatial reference (wkid:"+a.spatialReference.wkid+"). Using mesh extent.center instead")),h(a.vertexAttributes.position,g,d),h(a.vertexAttributes.normal,g);a.clearCache()}};f.axisAngleFrom=function(b,a,c){n.vec3d.set(b,c);c[3]=a;return c};f.axisAngleMultiply=function(b,a,c){n.quat4d.fromAngleAxis(b[3],b,g);n.quat4d.fromAngleAxis(a[3],a,t);n.quat4d.multiply(t,g,g);n.quat4d.toAngleAxis(g,
  826. c);return c};var m=n.vec3d.create(),b=n.vec4d.create(),g=n.quat4d.create(),t=n.quat4d.create(),u=n.mat4d.create(),v=n.mat3d.create(),x=[0,0,0],r=[0,0,0]})},"esri/geometry/Multipoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./support/zmUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b){function g(b){return function(a,c){return null==a?c:null==c?a:b(a,c)}}a=function(a){function c(){for(var b=
  827. 0;b<arguments.length;b++);b=a.call(this)||this;b.points=[];b.type="multipoint";return b}p(c,a);f=c;c.prototype.normalizeCtorArgs=function(b,a){if(!b&&!a)return null;var c={};Array.isArray(b)?(c.points=b,c.spatialReference=a):!b||"esri.geometry.SpatialReference"!==b.declaredClass&&null==b.wkid?(b.points&&(c.points=b.points),b.spatialReference&&(c.spatialReference=b.spatialReference),b.hasZ&&(c.hasZ=b.hasZ),b.hasM&&(c.hasM=b.hasM)):c.spatialReference=b;if(b=c.points&&c.points[0])void 0===c.hasZ&&void 0===
  828. c.hasM?(c.hasZ=2<b.length,c.hasM=!1):void 0===c.hasZ?c.hasZ=3<b.length:void 0===c.hasM&&(c.hasM=3<b.length);return c};Object.defineProperty(c.prototype,"extent",{get:function(){var b=this.points;if(!b.length)return null;for(var a=new h,c=this.hasZ,e=this.hasM,d=c?3:2,k=b[0],f=g(Math.min),m=g(Math.max),l=k[0],n=k[1],t=k[0],k=k[1],p,v,u,Y,aa=0,Z=b.length;aa<Z;aa++){var H=b[aa],W=H[0],I=H[1],l=f(l,W),n=f(n,I),t=m(t,W),k=m(k,I);c&&2<H.length&&(W=H[2],p=f(p,W),u=m(u,W));e&&H.length>d&&(H=H[d],v=f(v,H),
  829. Y=m(Y,H))}a.xmin=l;a.ymin=n;a.xmax=t;a.ymax=k;a.spatialReference=this.spatialReference;c?(a.zmin=p,a.zmax=u):(a.zmin=null,a.zmax=null);e?(a.mmin=v,a.mmax=Y):(a.mmin=null,a.mmax=null);return a},enumerable:!0,configurable:!0});c.prototype.writePoints=function(b,a,c,g){a.points=n.clone(this.points)};c.prototype.addPoint=function(a){this.clearCache();b.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this};c.prototype.clone=function(){var b={points:n.clone(this.points),
  830. spatialReference:this.spatialReference};this.hasZ&&(b.hasZ=!0);this.hasM&&(b.hasM=!0);return new f(b)};c.prototype.getPoint=function(b){if(!this._validateInputs(b))return null;b=this.points[b];var a={x:b[0],y:b[1],spatialReference:this.spatialReference},c=2;this.hasZ&&(a.z=b[2],c=3);this.hasM&&(a.m=b[c]);return new m(a)};c.prototype.removePoint=function(b){if(!this._validateInputs(b))return null;this.clearCache();return new m(this.points.splice(b,1)[0],this.spatialReference)};c.prototype.setPoint=
  831. function(a,c){if(!this._validateInputs(a))return this;this.clearCache();b.updateSupportFromPoint(c);this.points[a]=c.toArray();return this};c.prototype.toJSON=function(b){return this.write(null,b)};c.prototype._validateInputs=function(b){return null!=b&&0<=b&&b<this.points.length};e([l.property({dependsOn:["points","hasZ","hasM","spatialReference"]})],c.prototype,"cache",void 0);e([l.property({dependsOn:["cache"]})],c.prototype,"extent",null);e([l.property({type:[[Number]],json:{write:{isRequired:!0}}})],
  832. c.prototype,"points",void 0);e([l.writer("points")],c.prototype,"writePoints",null);return c=f=e([l.subclass("esri.geometry.Multipoint")],c);var f}(l.declared(c));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/zmUtils":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.updateSupportFromPoint=function(a,e,f){void 0===f&&(f=!1);var l=a.hasM,h=a.hasZ;Array.isArray(e)?4!==e.length||l||h?3===e.length&&f&&!l?(h=!0,l=!1):3===
  833. e.length&&l&&h&&(h=l=!1):h=l=!0:(h=!h&&e.hasZ&&(!l||e.hasM),l=!l&&e.hasM&&(!h||e.hasZ));a.hasZ=h;a.hasM=l}})},"esri/geometry/Polygon":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/centroid ./support/contains ./support/coordsUtils ./support/intersects ./support/webMercatorUtils ./support/zmUtils".split(" "),function(a,f,p,e,n,l,h,c,m,
  834. b,g,t,u,v,x,r){function w(b){return function(a,c){return null==a?c:null==c?a:b(a,c)}}var q=w(Math.min),d=w(Math.max);a=function(a){function c(){for(var b=0;b<arguments.length;b++);b=a.call(this)||this;b.rings=[];b.type="polygon";return b}p(c,a);k=c;c.createEllipse=function(b){var a=b.center.x,c=b.center.y,d=b.center.z,g=b.center.m,e=b.center.hasZ,q=b.center.hasM,h=b.longAxis,f=b.shortAxis,m=b.numberOfPoints;b=b.view;for(var l=[],n=2*Math.PI/m,t=e?3:2,p=0;p<m;p++){var r=b.toMap(h*Math.cos(p*n)+a,f*
  835. Math.sin(p*n)+c),r=[r.x,r.y];e&&(r[2]=d);q&&(r[t]=g);l.push(r)}l.push(l[0]);return new k({rings:[l],spatialReference:b.spatialReference})};c.createCircle=function(b){return k.createEllipse({center:b.center,longAxis:b.r,shortAxis:b.r,numberOfPoints:b.numberOfPoints,view:b.view})};c.fromExtent=function(b){var a=b.clone().normalize();b=b.spatialReference;var c=!1,d=!1;a.map(function(b){b.hasZ&&(c=!0);b.hasM&&(d=!0)});a={rings:a.map(function(b){var a=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,
  836. b.ymin],[b.xmin,b.ymin]];if(c&&b.hasZ)for(var g=b.zmin+.5*(b.zmax-b.zmin),e=0;e<a.length;e++)a[e].push(g);if(d&&b.hasM)for(b=b.mmin+.5*(b.mmax-b.mmin),e=0;e<a.length;e++)a[e].push(b);return a}),spatialReference:b};c&&(a.hasZ=!0);d&&(a.hasM=!0);return new k(a)};c.prototype.normalizeCtorArgs=function(a,c){var d=null,g,e,k=null;a&&!Array.isArray(a)?(d=a.rings?a.rings:null,c||(a.spatialReference?c=a.spatialReference:a.rings||(c=a)),g=a.hasZ,e=a.hasM):d=a;d=d||[];c=c||b.WGS84;d.length&&d[0]&&null!=d[0][0]&&
  837. "number"===typeof d[0][0]&&(d=[d]);if(k=d[0]&&d[0][0])void 0===g&&void 0===e?(g=2<k.length,e=!1):void 0===g?g=!e&&3<k.length:void 0===e&&(e=!g&&3<k.length);return{rings:d,spatialReference:c,hasZ:g,hasM:e}};Object.defineProperty(c.prototype,"centroid",{get:function(){var b=g.polygonCentroid(this);if(!b||isNaN(b[0])||isNaN(b[1])||this.hasZ&&isNaN(b[2]))return null;var a=new m;a.x=b[0];a.y=b[1];a.spatialReference=this.spatialReference;this.hasZ&&(a.z=b[2]);return a},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,
  838. "extent",{get:function(){var b=this.hasZ,a=this.hasM,c=this.spatialReference,g=this.rings,e=b?3:2;if(!g.length||!g[0].length)return null;for(var k=g[0][0],f=k[0],k=k[1],m=g[0][0],l=m[0],m=m[1],n=void 0,t=void 0,p=void 0,r=void 0,x=[],w=0;w<g.length;w++){for(var y=g[w],v=y[0],u=v[0],v=v[1],z=y[0],ha=z[0],z=z[1],V=void 0,P=void 0,ca=void 0,da=void 0,ka=0;ka<y.length;ka++){var ia=y[ka],qa=ia[0],pa=ia[1],f=q(f,qa),k=q(k,pa),l=d(l,qa),m=d(m,pa),u=q(u,qa),v=q(v,pa),ha=d(ha,qa),z=d(z,pa);b&&2<ia.length&&
  839. (qa=ia[2],n=q(n,qa),t=d(t,qa),V=q(V,qa),P=d(P,qa));a&&ia.length>e&&(da=ia[e],p=q(n,da),r=d(t,da),ca=q(V,da),da=d(P,da))}x.push(new h({xmin:u,ymin:v,zmin:V,mmin:ca,xmax:ha,ymax:z,zmax:P,mmax:da,spatialReference:c}))}g=new h;g.xmin=f;g.ymin=k;g.xmax=l;g.ymax=m;g.spatialReference=c;b&&(g.zmin=n,g.zmax=t);a&&(g.mmin=p,g.mmax=r);g.cache._partwise=1<x.length?x:null;return g},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isSelfIntersecting",{get:function(){return v.isSelfIntersecting(this.rings)},
  840. enumerable:!0,configurable:!0});c.prototype.writePaths=function(b,a,c,d){a.rings=n.clone(this.rings)};c.prototype.addRing=function(b){if(b){this.clearCache();var a=this.rings,c=a.length;if(Array.isArray(b[0]))a[c]=b.concat();else{for(var d=[],g=0,e=b.length;g<e;g++)d[g]=b[g].toArray();a[c]=d}return this}};c.prototype.clone=function(){var b=new k;b.spatialReference=this.spatialReference;b.rings=n.clone(this.rings);b.hasZ=this.hasZ;b.hasM=this.hasM;return b};c.prototype.contains=function(b){if(!b)return!1;
  841. x.canProject(b,this.spatialReference)&&(b=x.project(b,this.spatialReference));return t.polygonContainsPoint(this,b)};c.prototype.isClockwise=function(b){var a=this;b=Array.isArray(b[0])?b:b.map(function(b){return a.hasZ?a.hasM?[b.x,b.y,b.z,b.m]:[b.x,b.y,b.z]:[b.x,b.y]});return u.isClockwise(b,this.hasM,this.hasZ)};c.prototype.getPoint=function(b,a){if(!this._validateInputs(b,a))return null;b=this.rings[b][a];a=this.hasZ;var c=this.hasM;return a&&!c?new m(b[0],b[1],b[2],void 0,this.spatialReference):
  842. c&&!a?new m(b[0],b[1],void 0,b[2],this.spatialReference):a&&c?new m(b[0],b[1],b[2],b[3],this.spatialReference):new m(b[0],b[1],this.spatialReference)};c.prototype.insertPoint=function(b,a,c){if(!this._validateInputs(b,a,!0))return this;this.clearCache();r.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.rings[b].splice(a,0,c);return this};c.prototype.removePoint=function(b,a){if(!this._validateInputs(b,a))return null;this.clearCache();return new m(this.rings[b].splice(a,1)[0],
  843. this.spatialReference)};c.prototype.removeRing=function(b){if(!this._validateInputs(b,null))return null;this.clearCache();b=this.rings.splice(b,1)[0];var a=this.spatialReference;return b.map(function(b){return new m(b,a)})};c.prototype.setPoint=function(b,a,c){if(!this._validateInputs(b,a))return this;this.clearCache();r.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.rings[b][a]=c;return this};c.prototype._validateInputs=function(b,a,c){void 0===c&&(c=!1);return null==b||0>
  844. b||b>=this.rings.length||null!=a&&(b=this.rings[b],c&&(0>a||a>b.length)||!c&&(0>a||a>=b.length))?!1:!0};c.prototype.toJSON=function(b){return this.write(null,b)};e([l.property({dependsOn:["hasM","hasZ","rings"]})],c.prototype,"cache",void 0);e([l.property({readOnly:!0,dependsOn:["cache"]})],c.prototype,"centroid",null);e([l.property({dependsOn:["cache"],readOnly:!0})],c.prototype,"extent",null);e([l.property({dependsOn:["cache"],readOnly:!0})],c.prototype,"isSelfIntersecting",null);e([l.property({type:[[[Number]]],
  845. json:{write:{isRequired:!0}}})],c.prototype,"rings",void 0);e([l.writer("rings")],c.prototype,"writePaths",null);return c=k=e([l.subclass("esri.geometry.Polygon")],c);var k}(l.declared(c));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/centroid":function(){define(["require","exports","../support/coordsUtils"],function(a,f,p){function e(a,c){if(!a||!a.length)return null;for(var e=[],b=[],g=c?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,
  846. -Infinity],h=0,f=a.length;h<f;h++){var p=n(a[h],c,g);p&&b.push(p)}b.sort(function(b,a){var g=b[2]-a[2];0===g&&c&&(g=b[4]-a[4]);return g});b.length&&(h=6*b[0][2],e[0]=b[0][0]/h,e[1]=b[0][1]/h,c&&(h=6*b[0][4],e[2]=0!==h?b[0][3]/h:0),e[0]<g[0]||e[0]>g[1]||e[1]<g[2]||e[1]>g[3]||c&&(e[2]<g[4]||e[2]>g[5]))&&(e.length=0);if(!e.length)if(a=a[0]&&a[0].length?l(a[0],c):null)e[0]=a[0],e[1]=a[1],c&&2<a.length&&(e[2]=a[2]);else return null;return e}function n(a,c,e){for(var b=0,g=0,h=0,f=0,m=0,l=0,n=a.length-
  847. 1;l<n;l++){var p=a[l],q=p[0],d=p[1],k=p[2],y=a[l+1],z=y[0],A=y[1],C=y[2],B=q*A-z*d,f=f+B,b=b+(q+z)*B,g=g+(d+A)*B;c&&2<p.length&&2<y.length&&(B=q*C-z*k,h+=(k+C)*B,m+=B);q<e[0]&&(e[0]=q);q>e[1]&&(e[1]=q);d<e[2]&&(e[2]=d);d>e[3]&&(e[3]=d);c&&(k<e[4]&&(e[4]=k),k>e[5]&&(e[5]=k))}0<f&&(f*=-1);0<m&&(m*=-1);if(!f)return null;a=[b,g,.5*f];c&&(a[3]=h,a[4]=.5*m);return a}function l(a,c){for(var e=c?[0,0,0]:[0,0],b=c?[0,0,0]:[0,0],g=0,h=0,f=0,l=0,n=0,r=a.length;n<r-1;n++){var w=a[n],q=a[n+1];w&&q&&(e[0]=w[0],
  848. e[1]=w[1],b[0]=q[0],b[1]=q[1],c&&2<w.length&&2<q.length&&(e[2]=w[2],b[2]=q[2]),length=p.getLength(e,b))&&(g+=length,w=p.getMidpoint(w,q),h+=length*w[0],f+=length*w[1],c&&2<w.length&&(l+=length*w[2]))}return 0<g?c?[h/g,f/g,l/g]:[h/g,f/g]:a.length?a[0]:null}Object.defineProperty(f,"__esModule",{value:!0});f.extentCentroid=function(a){return a?a.hasZ?[a.xmax-a.xmin/2,a.ymax-a.ymin/2,a.zmax-a.zmin/2]:[a.xmax-a.xmin/2,a.ymax-a.ymin/2]:null};f.polygonCentroid=function(a){return a?e(a.rings,a.hasZ):null};
  849. f.lineCentroid=l})},"esri/geometry/Polyline":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/zmUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b,g){function t(b){return function(a,c){return null==a?c:null==c?a:b(a,c)}}var u=t(Math.min),v=t(Math.max);a=function(a){function c(){for(var b=0;b<arguments.length;b++);b=a.call(this)||this;b.paths=
  850. [];b.type="polyline";return b}p(c,a);f=c;c.prototype.normalizeCtorArgs=function(a,c){var d=null,g,e,q=null;a&&!Array.isArray(a)?(d=a.paths?a.paths:null,c||(a.spatialReference?c=a.spatialReference:a.paths||(c=a)),g=a.hasZ,e=a.hasM):d=a;d=d||[];c=c||b.WGS84;d.length&&d[0]&&null!=d[0][0]&&"number"===typeof d[0][0]&&(d=[d]);if(q=d[0]&&d[0][0])void 0===g&&void 0===e?(g=2<q.length,e=!1):void 0===g?g=!e&&3<q.length:void 0===e&&(e=!g&&3<q.length);return{paths:d,spatialReference:c,hasZ:g,hasM:e}};Object.defineProperty(c.prototype,
  851. "extent",{get:function(){var b=this.hasZ,a=this.hasM,c=this.spatialReference,g=this.paths,e=b?3:2;if(!g.length||!g[0].length)return null;for(var f=g[0][0],m=f[0],f=f[1],l=g[0][0],n=l[0],l=l[1],t=void 0,p=void 0,r=void 0,x=void 0,w=[],H=0;H<g.length;H++){for(var W=g[H],I=W[0],U=I[0],I=I[1],O=W[0],N=O[0],O=O[1],J=void 0,L=void 0,S=void 0,T=void 0,ha=0;ha<W.length;ha++){var V=W[ha],P=V[0],ca=V[1],m=u(m,P),f=u(f,ca),n=v(n,P),l=v(l,ca),U=u(U,P),I=u(I,ca),N=v(N,P),O=v(O,ca);b&&2<V.length&&(P=V[2],t=u(t,
  852. P),p=v(p,P),J=u(J,P),L=v(L,P));a&&V.length>e&&(T=V[e],r=u(t,T),x=v(p,T),S=u(J,T),T=v(L,T))}w.push(new h({xmin:U,ymin:I,zmin:J,mmin:S,xmax:N,ymax:O,zmax:L,mmax:T,spatialReference:c}))}g=new h;g.xmin=m;g.ymin=f;g.xmax=n;g.ymax=l;g.spatialReference=c;b&&(g.zmin=t,g.zmax=p);a&&(g.mmin=r,g.mmax=x);g.cache._partwise=1<w.length?w:null;return g},enumerable:!0,configurable:!0});c.prototype.writePaths=function(b,a,c,g){a.paths=n.clone(this.paths)};c.prototype.addPath=function(b){if(b){this.clearCache();var a=
  853. this.paths,c=a.length;if(Array.isArray(b[0]))a[c]=b.concat();else{for(var g=[],e=0,q=b.length;e<q;e++)g[e]=b[e].toArray();a[c]=g}return this}};c.prototype.clone=function(){var b=new f;b.spatialReference=this.spatialReference;b.paths=n.clone(this.paths);b.hasZ=this.hasZ;b.hasM=this.hasM;return b};c.prototype.getPoint=function(b,a){if(!this._validateInputs(b,a))return null;b=this.paths[b][a];a=this.hasZ;var c=this.hasM;return a&&!c?new m(b[0],b[1],b[2],void 0,this.spatialReference):c&&!a?new m(b[0],
  854. b[1],void 0,b[2],this.spatialReference):a&&c?new m(b[0],b[1],b[2],b[3],this.spatialReference):new m(b[0],b[1],this.spatialReference)};c.prototype.insertPoint=function(b,a,c){if(!this._validateInputs(b,a,!0))return this;this.clearCache();g.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.paths[b].splice(a,0,c);return this};c.prototype.removePath=function(b){if(!this._validateInputs(b,null))return null;this.clearCache();b=this.paths.splice(b,1)[0];var a=this.spatialReference;return b.map(function(b){return new m(b,
  855. a)})};c.prototype.removePoint=function(b,a){if(!this._validateInputs(b,a))return null;this.clearCache();return new m(this.paths[b].splice(a,1)[0],this.spatialReference)};c.prototype.setPoint=function(b,a,c){if(!this._validateInputs(b,a))return this;this.clearCache();g.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.paths[b][a]=c;return this};c.prototype._validateInputs=function(b,a,c){void 0===c&&(c=!1);return null==b||0>b||b>=this.paths.length||null!=a&&(b=this.paths[b],c&&
  856. (0>a||a>b.length)||!c&&(0>a||a>=b.length))?!1:!0};c.prototype.toJSON=function(b){return this.write(null,b)};e([l.property({dependsOn:["hasM","hasZ","paths"]})],c.prototype,"cache",void 0);e([l.property({dependsOn:["cache"],readOnly:!0})],c.prototype,"extent",null);e([l.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],c.prototype,"paths",void 0);e([l.writer("paths")],c.prototype,"writePaths",null);return c=f=e([l.subclass("esri.geometry.Polyline")],c);var f}(l.declared(c));a.prototype.toJSON.isDefaultToJSON=
  857. !0;return a})},"esri/geometry/ScreenPoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){return function(a){function c(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];b=a.apply(this,b)||this;b.x=0;b.y=0;b.z=void 0;return b}p(c,a);h=c;c.prototype.normalizeCtorArgs=function(b,a){return"number"===typeof b?{x:b,y:a}:Array.isArray(b)?{x:b[0],y:b[1]}:
  858. b};c.prototype.clone=function(){return new h({x:this.x,y:this.y,z:this.z})};c.prototype.toArray=function(){return null==this.z?[this.x,this.y]:[this.x,this.y,this.z]};e([l.property({type:Number})],c.prototype,"x",void 0);e([l.property({type:Number})],c.prototype,"y",void 0);e([l.property({type:Number})],c.prototype,"z",void 0);return c=h=e([l.subclass("esri.geometry.ScreenPoint")],c);var h}(l.declared(n))})},"esri/geometry/support/jsonUtils":function(){define("require exports ../Extent ../Multipoint ../Point ../Polygon ../Polyline".split(" "),
  859. function(a,f,p,e,n,l,h){function c(b){if(b){if(void 0!==b.x&&void 0!==b.y)return n.fromJSON(b);if(void 0!==b.paths)return h.fromJSON(b);if(void 0!==b.rings)return l.fromJSON(b);if(void 0!==b.points)return e.fromJSON(b);if(void 0!==b.xmin&&void 0!==b.ymin&&void 0!==b.xmax&&void 0!==b.ymax)return p.fromJSON(b)}return null}Object.defineProperty(f,"__esModule",{value:!0});f.fromJson=function(b){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(g){console.warn(g.stack)}return c(b)};
  860. f.fromJSON=c;f.getJsonType=function(b){return b instanceof n?"esriGeometryPoint":b instanceof h?"esriGeometryPolyline":b instanceof l?"esriGeometryPolygon":b instanceof p?"esriGeometryEnvelope":b instanceof e?"esriGeometryMultipoint":null};var m={esriGeometryPoint:n,esriGeometryPolyline:h,esriGeometryPolygon:l,esriGeometryEnvelope:p,esriGeometryMultipoint:e};f.getGeometryType=function(b){return b&&m[b]||null}})},"esri/layers/support/LOD":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType".split(" "),
  861. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this,b)||this;b.level=0;b.levelValue=null;b.resolution=0;b.scale=0;return b}p(c,a);b=c;c.prototype.clone=function(){return new b({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})};e([l.property({type:h.Integer,json:{write:!0}})],c.prototype,"level",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,
  862. "resolution",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,"scale",void 0);return c=b=e([l.subclass("esri.layers.support.LOD")],c);var b}(l.declared(n))})},"esri/layers/mixins/ArcGISCachedService":function(){define(["dojo/_base/lang","dojo/io-query","./ArcGISService","../support/TileInfo","../support/TilemapCache"],function(a,f,p,e,n){return p.createSubclass([],{declaredClass:"esri.layers.mixins.ArcGISCachedService",properties:{minScale:{json:{origins:{service:{read:!1}}}},maxScale:{json:{origins:{service:{read:!1}}}},
  863. resampling:!0,supportsBlankTile:{value:!1,readOnly:!0,dependsOn:["version"],get:function(){return 10.2<=this.version}},tileInfo:{value:null,type:e,json:{read:function(a,h){var c=h.minScale?h.minScale:Infinity,f=h.maxScale?h.maxScale:-Infinity;return a?(a.lods=a.lods.filter(function(b){return b.scale<=c&&b.scale>=f}),e.fromJSON(a)):null}}},tilemapCache:{value:null,json:{read:{source:["capabilities"],reader:function(a,e){return e.capabilities&&-1<e.capabilities.indexOf("Tilemap")?new n({layer:this}):
  864. null}}}},version:{}},getTileUrl:function(e,h,c){var m=a.mixin({},this.parsedUrl.query,{token:this.token,blankTile:!this.tilemapCache&&this.resampling&&this.supportsBlankTile?!1:null});e=this.parsedUrl.path+"/tile/"+e+"/"+h+"/"+c;m=f.objectToQuery(m);return e+(m?"?"+m:"")}})})},"esri/layers/mixins/ArcGISService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Logger ../../core/MultiOriginJSONSupport ../../core/accessorSupport/decorators ../support/arcgisLayerUrl".split(" "),
  865. function(a,f,p,e,n,l,h,c){var m=n.getLogger("esri.layers.mixins.ArcGISService");return function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);Object.defineProperty(a.prototype,"title",{get:function(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var b=c.parse(this.url);if(b&&b.title)return b.title}return this._get("title")||""},set:function(b){this._set("title",b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
  866. "url",{set:function(b){this._set("url",c.sanitizeUrl(b,m))},enumerable:!0,configurable:!0});e([h.property({dependsOn:["url"]})],a.prototype,"title",null);e([h.property({type:String})],a.prototype,"url",null);return a=e([h.subclass("esri.layers.mixins.ArcGISService")],a)}(h.declared(l))})},"esri/core/MultiOriginJSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./accessorSupport/decorators ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin ./accessorSupport/read ./accessorSupport/utils ./accessorSupport/write".split(" "),
  867. function(a,f,p,e,n,l,h,c,m,b,g){function t(a){return b.getProperties(a).store}return function(a){function f(){var g=a.call(this)||this,e=b.getProperties(g),f=e.metadatas,q=e.store,d=new h.default;e.store=d;q.keys().forEach(function(b){d.set(b,q.get(b),c.OriginId.DEFAULTS)});Object.keys(f).forEach(function(b){e.internalGet(b)&&d.set(b,e.internalGet(b),c.OriginId.DEFAULTS)});return g}p(f,a);f.prototype.clear=function(b,a){void 0===a&&(a="user");return t(this).clear(b,c.nameToId(a))};f.prototype.read=
  868. function(b,a){m.default(this,b,a);return this};f.prototype.write=function(b,a){b=b||{};g.default(this,b,a);return b};f.prototype.getAtOrigin=function(b,a){var g=t(this),e=c.nameToId(a);if("string"===typeof b)return g.get(b,e);var d={};b.forEach(function(b){d[b]=g.get(b,e)});return d};f.prototype.originOf=function(b){var a=t(this);if("string"===typeof b)return c.idToName(a.originOf(b));b.forEach(function(b){c.idToName(a.originOf(b))})};f.prototype.revert=function(a,g){var e=t(this),q=c.nameToId(g),
  869. d=b.getProperties(this);("string"===typeof a?"*"===a?Object.keys(e.getAll(q)):[a]:a).forEach(function(b){d.propertyInvalidated(b);e.revert(b,q);d.propertyCommitted(b)})};f.prototype.removeOrigin=function(b){var a=t(this);b=c.nameToId(b);var g=a.getAll(b),e;for(e in g)a.originOf(e)===b&&a.set(e,g[e],c.OriginId.USER)};f.prototype.updateOrigin=function(b,a){var g=t(this);a=c.nameToId(a);var e=this.get(b);g.clear(b);g.set(b,e,a)};return f=e([l.subclass("esri.core.MultiOriginJSONSupport")],f)}(l.declared(n))})},
  870. "esri/core/accessorSupport/MultiOriginStore":function(){define(["require","exports","./PropertyOrigin"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});a=function(){function a(){this._propertyOriginMap={};this._originStores=Array(p.OriginId.NUM);this._values={}}a.prototype.get=function(a,e){return(e=void 0===e?this._values:this._originStores[e])?e[a]:void 0};a.prototype.keys=function(){return Object.keys(this._values)};a.prototype.set=function(a,e,h){void 0===h&&(h=p.OriginId.USER);
  871. var c=this._originStores[h];c||(c={},this._originStores[h]=c);c[a]=e;return!(a in this._values)||this._propertyOriginMap[a]<=h?(c=this._values[a],this._values[a]=e,this._propertyOriginMap[a]=h,c!==e):!1};a.prototype.clear=function(a,e){void 0===e&&(e=p.OriginId.USER);var h=this._originStores[e];if(h){var c=h[a];delete h[a];if(a in this._values&&this._propertyOriginMap[a]===e)for(delete this._values[a],--e;0<=e;e--)if((h=this._originStores[e])&&a in h){this._values[a]=h[a];this._propertyOriginMap[a]=
  872. e;break}return c}};a.prototype.has=function(a,e){return(e=void 0===e?this._values:this._originStores[e])?a in e:!1};a.prototype.revert=function(a,e){for(;0<e&&!this.has(a,e);)--e;var h=this._originStores[e],h=h&&h[a],c=this._values[a];this._values[a]=h;this._propertyOriginMap[a]=e;return c!==h};a.prototype.originOf=function(a,e){return this._propertyOriginMap[a]||p.OriginId.DEFAULTS};a.prototype.getAll=function(a){return this._originStores[a]};return a}();f.default=a})},"esri/layers/support/arcgisLayerUrl":function(){define(["require",
  873. "exports","../../core/urlUtils"],function(a,f,p){function e(a){var e=p.urlToObject(a).path.match(f.match);if(!e)return null;a=e[1];var c=e[2],m=e[3],e=e[4],b=c.indexOf("/");return{title:n(-1!==b?c.slice(b+1):c),serverType:m,sublayer:null!=e&&""!==e?parseInt(e,10):null,url:{path:a}}}function n(a){a=a.replace(/\s*[/_]+\s*/g," ");return a[0].toUpperCase()+a.slice(1)}Object.defineProperty(f,"__esModule",{value:!0});f.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");
  874. f.match=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+f.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");f.test=function(a){return!!f.match.test(a)};f.parse=e;f.cleanTitle=n;f.titleFromUrlAndName=function(a,h){var c=[];a&&(a=e(a))&&a.title&&c.push(a.title);h&&(h=n(h),c.push(h));if(2===c.length){if(-1!==c[0].toLowerCase().indexOf(c[1].toLowerCase()))return c[0];if(-1!==c[1].toLowerCase().indexOf(c[0].toLowerCase()))return c[1]}return c.join(" - ")};f.isHostedAgolService=
  875. function(a){if(!a)return!1;a=a.toLowerCase();var e=-1!==a.indexOf(".arcgis.com/");a=-1!==a.indexOf("//services")||-1!==a.indexOf("//tiles")||-1!==a.indexOf("//features");return e&&a};f.isHostedSecuredProxyService=function(a,e){return e&&a&&-1!==a.toLowerCase().indexOf(e.toLowerCase())};f.sanitizeUrl=function(a,e){return a?p.removeTrailingSlash(p.removeQueryParameters(a,e)):a};f.sanitizeUrlWithLayerId=function(a,h,c){if(!h)return{url:h};h=p.removeQueryParameters(h,c);c=p.urlToObject(h);c=e(c.path);
  876. var f;c&&null!=c.sublayer&&(null==a.layerId&&(f=c.sublayer),h=c.url.path);return{url:p.removeTrailingSlash(h),layerId:f}};f.writeUrlWithLayerId=function(a,e,c,f){var b=null;f?b=c:f=c;p.writeOperationalLayerUrl(e,f);f.url&&null!=a.layerId&&(f.url=p.join(f.url,b,a.layerId.toString()))}})},"esri/layers/support/TilemapCache":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/io-query dojo/_base/lang ../../request ../../core/Accessor ../../core/Error ../../core/Handles ../../core/Logger ../../core/LRUMap ../../core/promiseUtils ../../core/watchUtils ../../core/accessorSupport/decorators ./Tilemap".split(" "),
  877. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r){var w=g.getLogger("esri.layers.support.TilemapCache");return function(a){function c(c){c=a.call(this)||this;c._handles=new b;c._pendingTilemapRequests={};c._availableLevels={};c.levels=5;c.cacheByteSize=2097152;c.request=h;return c}p(c,a);c.prototype.initialize=function(){var b=this;this._tilemapCache=new t(this.cacheByteSize,{sizeOfFunction:function(b){return b.byteSize}});this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers"],function(){return b._initializeTilemapDefinition()}),
  878. v.init(this,"layer.tileInfo.lods",function(a){return b._initializeAvailableLevels(a)},!0)]);this._initializeTilemapDefinition()};c.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};c.prototype.castLevels=function(b){return 2>=b?(w.error("Minimum levels for Tilemap is 3, but got ",b),3):b};Object.defineProperty(c.prototype,"size",{get:function(){return 1<<this.levels},enumerable:!0,configurable:!0});c.prototype.getTilemap=function(b,a,c){return this._tilemapFromCache(b,
  879. a,c,this._tmpTilemapDefinition)};c.prototype.fetchTilemap=function(b,a,c,d){var g=this;if(!this._availableLevels[b])return u.reject(new m("tilemap-cache:level-unavailable","Level "+b+" is unavailable in the service"));var e=this._tmpTilemapDefinition;if(b=this._tilemapFromCache(b,a,c,e))return u.resolve(b);var k=r.tilemapDefinitionId(e),q=this._pendingTilemapRequests[k];q||(q=r.Tilemap.fromDefinition(e,d).then(function(b){g._tilemapCache.set(k,b);delete g._pendingTilemapRequests[k];return b}).catch(function(b){delete g._pendingTilemapRequests[k];
  880. return u.reject(b)}),this._pendingTilemapRequests[k]=q);return u.create(function(b,a){q.then(b,a)})};c.prototype.getAvailability=function(b,a,c){return this._availableLevels[b]?(b=this.getTilemap(b,a,c))?b.getAvailability(a,c):"unknown":"unavailable"};c.prototype.getAvailabilityUpsample=function(b,a,c,d){d.level=b;d.row=a;d.col=c;b=this.layer.tileInfo;for(b.updateTileInfo(d);;)if(a=this.getAvailability(d.level,d.row,d.col),"unavailable"===a){if(!b.upsampleTile(d))return"unavailable"}else return a};
  881. c.prototype.fetchAvailability=function(b,a,c,d){return this._availableLevels[b]?this.fetchTilemap(b,a,c,d).always(function(d){return d instanceof r.Tilemap?(d=d.getAvailability(a,c),"unavailable"===d?u.reject(new m("tile-map:tile-unavailable","Tile is not available",{level:b,row:a,col:c})):d):d&&"cancel"===d.dojoType?u.reject(d):"unknown"}):u.reject(new m("tilemap-cache:level-unavailable","Level "+b+" is unavailable in the service"))};c.prototype.fetchAvailabilityUpsample=function(b,a,c,d,g){var e=
  882. this;d.level=b;d.row=a;d.col=c;var k=this.layer.tileInfo;k.updateTileInfo(d);return this.fetchAvailability(b,a,c,g).catch(function(b){return b&&"cancel"===b.dojoType?u.reject(b):k.upsampleTile(d)?e.fetchAvailabilityUpsample(d.level,d.row,d.col,d):u.reject(b)})};c.prototype._initializeTilemapDefinition=function(){if(this.layer.parsedUrl){var b=this.layer.parsedUrl,a=b.query;a&&a.token||!this.layer.token||(a=l.mixin(a,{token:this.layer.token}));this._tilemapCache.clear();this._tmpTilemapDefinition=
  883. {service:{url:b.path,query:a?n.objectToQuery(a):null,tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}};c.prototype._tilemapFromCache=function(b,a,c,d){b=this._getTilemapDefinition(b,a,c,d);b=r.tilemapDefinitionId(b);return this._tilemapCache.get(b)};c.prototype._getTilemapDefinition=function(b,a,c,d){d.level=b;d.row=a-a%this.size;d.col=c-c%this.size;return d};c.prototype._initializeAvailableLevels=function(b){var a=
  884. this;this._availableLevels={};b&&b.forEach(function(b){return a._availableLevels[b.level]=!0})};e([x.property({constructOnly:!0,type:Number})],c.prototype,"levels",void 0);e([x.cast("levels")],c.prototype,"castLevels",null);e([x.property({readOnly:!0,dependsOn:["levels"],type:Number})],c.prototype,"size",null);e([x.property({constructOnly:!0,type:Number})],c.prototype,"cacheByteSize",void 0);e([x.property({constructOnly:!0})],c.prototype,"layer",void 0);e([x.property({constructOnly:!0})],c.prototype,
  885. "request",void 0);return c=e([x.subclass("esri.layers.support.TilemapCache")],c)}(x.declared(c))})},"esri/core/LRUMap":function(){define(["require","exports"],function(a,f){return function(){function a(a,f){void 0===a&&(a=0);this.sizeOfFunction=function(){return 1};this._sizeOf=0;this._cache=new Map;this._queue=[];if(0>=a)throw Error("LRU cache size must be bigger than zero!");this._maxSize=a;f&&(f.disposeFunction&&(this.disposeFunction=f.disposeFunction),f.sizeOfFunction&&(this.sizeOfFunction=f.sizeOfFunction))}
  886. Object.defineProperty(a.prototype,"length",{get:function(){return this._cache.size},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"size",{get:function(){return this._sizeOf},enumerable:!0,configurable:!0});a.prototype.clear=function(){var a=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(e,f){a.disposeFunction(f,e)});this._cache.clear();this._sizeOf=0};a.prototype.delete=function(a){var e=this._cache.get(a);return this._cache.delete(a)?(this._sizeOf-=
  887. this.sizeOfFunction(e),this._queue.splice(this._queue.indexOf(a),1),this.disposeFunction&&this.disposeFunction(a,e),!0):!1};a.prototype.forEach=function(a,f){this._cache.forEach(a,f)};a.prototype.get=function(a){var e=this._cache.get(a);if(void 0!==e)return this._queue.splice(this._queue.indexOf(a),1),this._queue.unshift(a),e};a.prototype.has=function(a){return this._cache.has(a)};a.prototype.set=function(a,f){var e=this.get(a);void 0!==e?this._sizeOf-=this.sizeOfFunction(e):this._queue.unshift(a);
  888. this._sizeOf+=this.sizeOfFunction(f);this._cache.set(a,f);this._collect();return this};a.prototype._collect=function(){for(;this._queue.length&&this._sizeOf>this._maxSize;){var a=this._queue.pop(),f=this._cache.get(a);this._cache.delete(a)&&(this._sizeOf-=this.sizeOfFunction(f),this.disposeFunction&&this.disposeFunction(a,f))}};return a}()})},"esri/core/watchUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/Promise"],function(a,f,p,e){function n(b,a){Array.isArray(b)?b.forEach(a):
  889. a(b)}function l(b,a,c,g,d){d=b.watch(a,function(a,d,e,q){g&&!g(a)||c.call(b,a,d,e,q)},d);n(a,function(a){var d=b.get(a);g&&g(d)&&c.call(b,d,d,a,b)});return d}function h(b,a,c,g,d){function k(){f&&(f.remove(),f=null)}var q=!1,f,h=new p(k),m=new e;m.cancel=h.cancel;m.isCanceled=h.isCanceled;m.isFulfilled=h.isFulfilled;m.isRejected=h.isRejected;m.isResolved=h.isResolved;m.then=h.then;m.remove=k;Object.freeze(m);f=l(b,a,function(a,d,g,e){q=!0;k();c&&c.call(b,a,d,g,e);h.resolve({value:a,oldValue:d,propertyName:g,
  890. target:e})},g,d);q&&f.remove();return m}function c(b){return!!b}function m(b){return!b}function b(b){return!0===b}function g(b){return!1===b}function t(b){return void 0!==b}function u(b){return void 0===b}function v(b,a,c,g){var d=Array.isArray(a)?a:-1<a.indexOf(",")?a.split(","):[a];a=b.watch(a,c,g);d.forEach(function(a){a=a.trim();var d=b.get(a);c.call(b,d,d,a,b)});return a}Object.defineProperty(f,"__esModule",{value:!0});f.init=v;f.watch=function(b,a,c,g){return b.watch(a,c,g)};f.once=function(b,
  891. a,c,g){return h(b,a,c,null,g)};f.when=function(b,a,g,e){return l(b,a,g,c,e)};f.whenOnce=function(b,a,g,e){return h(b,a,g,c,e)};f.whenNot=function(b,a,c,g){return l(b,a,c,m,g)};f.whenNotOnce=function(b,a,c,g){return h(b,a,c,m,g)};f.whenTrue=function(a,c,g,e){return l(a,c,g,b,e)};f.whenTrueOnce=function(a,c,g,e){return h(a,c,g,b,e)};f.whenFalse=function(b,a,c,e){return l(b,a,c,g,e)};f.whenFalseOnce=function(b,a,c,e){return h(b,a,c,g,e)};f.whenDefined=function(b,a,c,g){return l(b,a,c,t,g)};f.whenDefinedOnce=
  892. function(b,a,c,g){return h(b,a,c,t,g)};f.whenUndefined=function(b,a,c,g){return l(b,a,c,u,g)};f.whenUndefinedOnce=function(b,a,c,g){return h(b,a,c,u,g)};f.pausable=function(b,a,c,g){var d=!1,e=b.watch(a,function(a,g,e,k){d||c.call(b,a,g,e,k)},g);return{remove:function(){e.remove()},pause:function(){d=!0},resume:function(){d=!1}}};f.on=function(b,a,c,g,d,e,f){function k(a){var d=q[a];d&&(e&&e(d.target,a,b,c),d.handle.remove(),delete q[a])}var q={},h=v(b,a,function(a,e,f){k(f);a&&"function"===typeof a.on&&
  893. (q[f]={handle:a.on(c,g),target:a},d&&d(a,f,b,c))},f);return{remove:function(){h.remove();for(var b in q)k(b)}}}})},"esri/layers/support/Tilemap":function(){define("require exports dojo/_base/lang ../../request ../../core/Error ../../core/lang ../../core/promiseUtils".split(" "),function(a,f,p,e,n,l,h){function c(a){var b;"vector-tile"===a.service.type?b=a.service.url+"/tilemap/"+a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height:(b=a.service.tileServers,b=(b&&b.length?b[a.row%b.length]:a.service.url)+
  894. "/tilemap/"+a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height);(a=a.service.query)&&(b=b+"?"+a);return b}Object.defineProperty(f,"__esModule",{value:!0});a=function(){function a(){this.location={left:0,top:0,width:0,height:0};this.byteSize=40}a.prototype.getAvailability=function(b,a){if(this._isAllAvailable)return"available";if(this._isAllUnvailable)return"unavailable";b=(b-this.location.top)*this.location.width+(a-this.location.left);a=b>>3;var c=this._tileAvailabilityBitSet;return 0>a||a>c.length?
  895. "unknown":c[a]&1<<b%8?"available":"unavailable"};a.prototype._updateFromData=function(b){for(var a=!0,c=!0,e=new Uint8Array(Math.ceil(this.location.width*this.location.height/8)),f=0,h=0;h<b.length;h++){var m=h%8;b[h]?(c=!1,e[f]|=1<<m):a=!1;7===m&&++f}this._isAllUnvailable=c;this._isAllAvailable=a;this._isAllAvailable||this._isAllUnvailable||(this._tileAvailabilityBitSet=e,this.byteSize+=e.length)};a.fromDefinition=function(b,g){var f=b.service.request||e,m=b.row,l=b.col,x=b.width,r=b.height,w={callbackParamName:"callback"};
  896. g=g?p.mixin(w,g):w;return f(c(b),g).then(function(b){return b.data}).catch(function(b){if(b&&b.details&&422===b.details.httpStatus){b=[];for(var a=0,c=x*r;a<c;a++)b[a]=0;return{location:{top:m,left:l,width:x,height:r},valid:!0,data:b}}return h.reject(b)}).then(function(b){if(b.location&&(b.location.top!==m||b.location.left!==l||b.location.width!==x||b.location.height!==r))throw new n("tilemap:location-mismatch","Tilemap response for different location than requested",{response:b,definition:{top:m,
  897. left:l,width:x,height:r}});return a.fromJSON(b)})};a.fromJSON=function(b){a.validateJSON(b);var c=new a;c.location=Object.freeze(l.clone(b.location));c._updateFromData(b.data);return Object.freeze(c)};a.validateJSON=function(b){if(!b||!b.location)throw new n("tilemap:missing-location","Location missing from tilemap response");if(!1===b.valid)throw new n("tilemap:invalid","Tilemap response was marked as invalid");if(!b.data)throw new n("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(b.data))throw new n("tilemap:data-mismatch",
  898. "Data must be an array of numbers");if(b.data.length!==b.location.width*b.location.height)throw new n("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");};return a}();f.Tilemap=a;f.tilemapDefinitionId=function(a){return a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height};f.tilemapDefinitionUrl=c;f.default=a})},"esri/layers/mixins/ArcGISMapService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../geometry/Extent ../../geometry/SpatialReference ./ArcGISService ../support/commonProperties".split(" "),
  899. function(a,f,p,e,n,l,h,c,m){return function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.copyright=null;a.fullExtent=null;a.legendEnabled=!0;a.spatialReference=null;a.version=null;return a}p(a,b);a.prototype.readCapabilities=function(b,a){return b&&b.split(",").map(function(b){return b.trim()})};a.prototype.readCopyright=function(b,a){return a.copyrightText};a.prototype.readVersion=function(b,a){(b=a.currentVersion)||(b=a.hasOwnProperty("capabilities")||a.hasOwnProperty("tables")?
  900. 10:a.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3);return b};e([n.property()],a.prototype,"capabilities",void 0);e([n.reader("service","capabilities")],a.prototype,"readCapabilities",null);e([n.property()],a.prototype,"copyright",void 0);e([n.reader("copyright",["copyrightText"])],a.prototype,"readCopyright",null);e([n.property({type:l})],a.prototype,"fullExtent",void 0);e([n.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],a.prototype,"id",void 0);e([n.property({type:Boolean,
  901. json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],a.prototype,"legendEnabled",void 0);e([n.property(m.popupEnabled)],a.prototype,"popupEnabled",void 0);e([n.property({type:h})],a.prototype,"spatialReference",void 0);e([n.property()],a.prototype,"version",void 0);e([n.reader("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],a.prototype,"readVersion",null);return a=e([n.subclass("esri.layers.mixins.ArcGISMapService")],
  902. a)}(n.declared(c))})},"esri/layers/support/commonProperties":function(){define(["require","exports","../../core/accessorSupport/PropertyOrigin","../../core/accessorSupport/utils","../../core/accessorSupport/write"],function(a,f,p,e,n){Object.defineProperty(f,"__esModule",{value:!0});f.screenSizePerspectiveEnabled={type:Boolean,value:!0,json:{origins:{"web-scene":{read:{source:["id","url","layerType"],reader:function(a,f){if(null==f.screenSizePerspective&&"defaults"===this.originOf("screenSizePerspectiveEnabled"))e.getProperties(this).store.set("screenSizePerspectiveEnabled",
  903. !1,p.OriginId.DEFAULTS);else return f.screenSizePerspective}},write:{ignoreOrigin:!0,target:"screenSizePerspective",writer:function(a,e,c,f){"defaults"===this.originOf("screenSizePerspectiveEnabled")&&a?e[c]=a:n.willPropertyWrite(this,"screenSizePerspectiveEnabled",{},f)&&(e[c]=a)}}}}}};f.popupEnabled={type:Boolean,json:{read:{source:"disablePopup",reader:function(a,e){return!e.disablePopup}},write:{target:"disablePopup",writer:function(a,e,c){e[c]=!a}}}};f.labelsVisible={type:Boolean,json:{read:{source:"showLabels"},
  904. write:{target:"showLabels"}}}})},"esri/layers/mixins/OperationalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Error ../../core/MultiOriginJSONSupport ../../core/promiseUtils ../../core/urlUtils ../../core/accessorSupport/decorators ../../core/accessorSupport/read ../../core/accessorSupport/write".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){f=function(a){function c(){var b=null!==a&&a.apply(this,
  905. arguments)||this;b.title="Layer";return b}p(c,a);f=c;c.prototype.writeListMode=function(b,a,c,g){g&&"ground"===g.layerContainerType?a[c]=b:b&&t.willPropertyWrite(this,c,{},g)&&(a[c]=b)};c.prototype.writeTitle=function(b,a){a.title=b||"Layer"};c.prototype.writeOperationalLayerType=function(b,a){b&&(a.layerType=b)};c.prototype.readOpacity=function(b,a,c){if(void 0!==a.opacity&&(!c||"web-map"===c.origin||"web-scene"===c.origin))return a.opacity;if((!c||"service"===c.origin)&&a.drawingInfo&&void 0!==
  906. a.drawingInfo.transparency)return 1-a.drawingInfo.transparency/100;if(a.layerDefinition&&a.layerDefinition.drawingInfo&&void 0!==a.layerDefinition.drawingInfo.transparency)return 1-a.layerDefinition.drawingInfo.transparency/100};c.prototype.readVisible=function(b,a){return!!a.visibility};c.prototype.read=function(b,a){var c=this,e=arguments;a&&(a.layer=this);g.readLoadable(this,b,function(a){return c.inherited(e,[b,a])},a);return this};c.prototype.write=function(b,a){if(a&&a.origin){var c=a.origin+
  907. "/"+(a.layerContainerType||"operational-layers"),g=f.supportedTypes[c],g=g&&g[this.operationalLayerType];if("write"!==g&&"readwrite"!==g)return a.messages&&a.messages.push(new l("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' are not supported in the context of '"+c+"'",{layer:this})),null;if(!this.url&&!u[this.operationalLayerType])return a.messages&&a.messages.push(new l("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+
  908. "' require a url to a service to be written to a '"+a.origin+"'",{layer:this})),null}return this.inherited(arguments,[b,a])};e([b.property({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}}}}})],c.prototype,"id",void 0);e([b.property({type:String,json:{write:{ignoreOrigin:!0}}})],c.prototype,"listMode",void 0);e([b.writer("listMode")],c.prototype,"writeListMode",null);e([b.property({type:String,json:{write:{ignoreOrigin:!0,allowNull:!0},origins:{"web-scene":{write:{isRequired:!0,
  909. ignoreOrigin:!0}}}}})],c.prototype,"title",void 0);e([b.writer("title")],c.prototype,"writeTitle",null);e([b.property({type:String,json:{write:{ignoreOrigin:!0,writer:m.writeOperationalLayerUrl}}})],c.prototype,"url",void 0);e([b.property({type:String,json:{write:{target:"layerType",ignoreOrigin:!0}}})],c.prototype,"operationalLayerType",void 0);e([b.writer("operationalLayerType")],c.prototype,"writeOperationalLayerType",null);e([b.property({type:Number,json:{write:{ignoreOrigin:!0}}})],c.prototype,
  910. "opacity",void 0);e([b.reader("opacity",["opacity","layerDefinition.drawingInfo.transparency","drawingInfo.transparency"])],c.prototype,"readOpacity",null);e([b.property({type:Boolean,json:{write:{target:"visibility",ignoreOrigin:!0}}})],c.prototype,"visible",void 0);e([b.reader("visible",["visibility"])],c.prototype,"readVisible",null);return c=f=e([b.subclass("esri.layers.mixins.OperationalLayer")],c);var f}(b.declared(n,h));var u={GroupLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,ArcGISFeatureLayer:!0,
  911. CSV:!0,VectorTileLayer:!0,KML:!0};(function(b){b.typeModuleMap={ArcGISFeatureLayer:function(){return c.create(function(b){return a(["../FeatureLayer"],b)})},ArcGISImageServiceLayer:function(){return c.create(function(b){return a(["../ImageryLayer"],b)})},ArcGISImageServiceVectorLayer:function(){return c.resolve(null)},ArcGISMapServiceLayer:function(){return c.create(function(b){return a(["../MapImageLayer"],b)})},ArcGISSceneServiceLayer:function(){return c.create(function(b){return a(["../SceneLayer"],
  912. b)})},ArcGISStreamLayer:function(){return c.create(function(b){return a(["../StreamLayer"],b)})},ArcGISTiledElevationServiceLayer:function(){return c.create(function(b){return a(["../ElevationLayer"],b)})},ArcGISTiledImageServiceLayer:function(){return c.create(function(b){return a(["../TileLayer"],b)})},ArcGISTiledMapServiceLayer:function(){return c.create(function(b){return a(["../TileLayer"],b)})},bingLayer:function(){return c.resolve(null)},CSV:function(){return c.create(function(b){return a(["../CSVLayer"],
  913. b)})},GeoRSS:function(){return c.create(function(b){return a(["../GeoRSSLayer"],b)})},GroupLayer:function(){return c.create(function(b){return a(["../GroupLayer"],b)})},IntegratedMeshLayer:function(){return c.create(function(b){return a(["../IntegratedMeshLayer"],b)})},KML:function(){return c.create(function(b){return a(["../KMLLayer"],b)})},OpenStreetMap:function(){return c.create(function(b){return a(["../OpenStreetMapLayer"],b)})},PointCloudLayer:function(){return c.create(function(b){return a(["../PointCloudLayer"],
  914. b)})},VectorTileLayer:function(){return c.create(function(b){return a(["../VectorTileLayer"],b)})},WebTiledLayer:function(){return c.create(function(b){return a(["../WebTileLayer"],b)})},WMS:function(){return c.create(function(b){return a(["../WMSLayer"],b)})}};b.supportedTypes={"web-scene/operational-layers":{ArcGISFeatureLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISSceneServiceLayer:"readwrite",ArcGISTiledElevationServiceLayer:"read",ArcGISTiledImageServiceLayer:"readwrite",
  915. ArcGISTiledMapServiceLayer:"readwrite",GroupLayer:"readwrite",IntegratedMeshLayer:"readwrite",PointCloudLayer:"readwrite",WebTiledLayer:"readwrite",CSV:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite"},"web-scene/basemap":{ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",WebTiledLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",WMS:"readwrite",ArcGISMapServiceLayer:"readwrite"},"web-scene/ground":{ArcGISTiledElevationServiceLayer:"readwrite"},
  916. "web-map/operational-layers":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISStreamLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",ArcGISFeatureLayer:"readwrite",CSV:"readwrite",GeoRSS:"readwrite",KML:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite"},"web-map/basemap":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",
  917. ArcGISMapServiceLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite",bingLayer:"readwrite"}}})(f||(f={}));return f})},"esri/layers/mixins/PortalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Error ../../core/Logger ../../core/promiseUtils ../../core/urlUtils ../../core/accessorSupport/decorators ../../portal/Portal ../../portal/PortalItem".split(" "),
  918. function(a,f,p,e,n,l,h,c,m,b,g,t){var u=h.getLogger("esri.layers.mixins.PortalLayer");return function(f){function h(){return null!==f&&f.apply(this,arguments)||this}p(h,f);Object.defineProperty(h.prototype,"portalItem",{set:function(b){b!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",b))},enumerable:!0,configurable:!0});h.prototype.writePortalItem=function(b,a,c){b&&b.id&&(a.itemId=b.id)};h.prototype.loadFromPortal=function(b){var g=this;return this.portalItem&&
  919. this.portalItem.id?c.create(function(b){return a(["../../portal/support/layersLoader"],b)}).then(function(a){return a.load({instance:g,supportedTypes:b.supportedTypes,validateItem:b.validateItem,supportsData:b.supportsData}).catch(function(b){u.warn("Failed to load layer ("+g.title+", "+g.id+") portal item ("+g.portalItem.id+")\n "+b);throw b;})}):c.resolve()};h.prototype.read=function(b,a){a&&(a.layer=this);return this.inherited(arguments)};h.prototype.write=function(b,a){var c=a&&a.portal,d=this.portalItem&&
  920. this.portalItem.id&&(this.portalItem.portal||g.getDefault());return c&&d&&!m.hasSamePortal(d.restUrl,c.restUrl)?(a.messages&&a.messages.push(new l("layer:cross-portal","The layer '"+this.title+" ("+this.id+")' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer",{layer:this})),null):this.inherited(arguments)};e([b.property({type:t})],
  921. h.prototype,"portalItem",null);e([b.writer("portalItem",{itemId:{type:String}})],h.prototype,"writePortalItem",null);return h=e([b.subclass("esri.layers.mixins.PortalLayer")],h)}(b.declared(n))})},"esri/layers/support/rasterFormats/LercCodec":function(){define([],function(){var a={defaultNoDataValue:-3.4027999387901484E38,decode:function(p,e){var n;e=e||{};var l=e.inputOffset||0,h=e.encodedMaskData||null===e.encodedMaskData,c={},m=new Uint8Array(p,l,10);c.fileIdentifierString=String.fromCharCode.apply(null,
  922. m);if("CntZImage"!=c.fileIdentifierString.trim())throw"Unexpected file identifier string: "+c.fileIdentifierString;l+=10;m=new DataView(p,l,24);c.fileVersion=m.getInt32(0,!0);c.imageType=m.getInt32(4,!0);c.height=m.getUint32(8,!0);c.width=m.getUint32(12,!0);c.maxZError=m.getFloat64(16,!0);l+=24;if(!h)if(m=new DataView(p,l,16),c.mask={},c.mask.numBlocksY=m.getUint32(0,!0),c.mask.numBlocksX=m.getUint32(4,!0),c.mask.numBytes=m.getUint32(8,!0),c.mask.maxValue=m.getFloat32(12,!0),l+=16,0<c.mask.numBytes){var h=
  923. new Uint8Array(Math.ceil(c.width*c.height/8)),m=new DataView(p,l,c.mask.numBytes),b=m.getInt16(0,!0),g=2,t=0;do{if(0<b)for(;b--;)h[t++]=m.getUint8(g++);else for(var u=m.getUint8(g++),b=-b;b--;)h[t++]=u;b=m.getInt16(g,!0);g+=2}while(g<c.mask.numBytes);if(-32768!==b||t<h.length)throw"Unexpected end of mask RLE encoding";c.mask.bitset=h;l+=c.mask.numBytes}else 0===(c.mask.numBytes|c.mask.numBlocksY|c.mask.maxValue)&&(h=new Uint8Array(Math.ceil(c.width*c.height/8)),c.mask.bitset=h);m=new DataView(p,l,
  924. 16);c.pixels={};c.pixels.numBlocksY=m.getUint32(0,!0);c.pixels.numBlocksX=m.getUint32(4,!0);c.pixels.numBytes=m.getUint32(8,!0);c.pixels.maxValue=m.getFloat32(12,!0);l+=16;h=c.pixels.numBlocksX;m=c.pixels.numBlocksY;h+=0<c.width%h?1:0;b=m+(0<c.height%m?1:0);c.pixels.blocks=Array(h*b);g=1E9;for(u=t=0;u<b;u++)for(var v=0;v<h;v++){var x=0,m=new DataView(p,l,Math.min(10,p.byteLength-l)),r={};c.pixels.blocks[t++]=r;var w=m.getUint8(0);x++;r.encoding=w&63;if(3<r.encoding)throw"Invalid block encoding ("+
  925. r.encoding+")";if(2===r.encoding)l++,g=Math.min(g,0);else{if(0!==w&&2!==w){w>>=6;r.offsetType=w;if(2===w)r.offset=m.getInt8(1),x++;else if(1===w)r.offset=m.getInt16(1,!0),x+=2;else if(0===w)r.offset=m.getFloat32(1,!0),x+=4;else throw"Invalid block offset type";g=Math.min(r.offset,g);if(1===r.encoding)if(w=m.getUint8(x),x++,r.bitsPerPixel=w&63,w>>=6,r.numValidPixelsType=w,2===w)r.numValidPixels=m.getUint8(x),x++;else if(1===w)r.numValidPixels=m.getUint16(x,!0),x+=2;else if(0===w)r.numValidPixels=m.getUint32(x,
  926. !0),x+=4;else throw"Invalid valid pixel count type";}l+=x;if(3!=r.encoding)if(0===r.encoding){m=(c.pixels.numBytes-1)/4;if(m!==Math.floor(m))throw"uncompressed block has invalid length";x=new ArrayBuffer(4*m);w=new Uint8Array(x);w.set(new Uint8Array(p,l,4*m));x=new Float32Array(x);for(w=0;w<x.length;w++)g=Math.min(g,x[w]);r.rawData=x;l+=4*m}else 1===r.encoding&&(m=Math.ceil(r.numValidPixels*r.bitsPerPixel/8),x=new ArrayBuffer(4*Math.ceil(m/4)),w=new Uint8Array(x),w.set(new Uint8Array(p,l,m)),r.stuffedData=
  927. new Uint32Array(x),l+=m)}}c.pixels.minValue=g;c.eofOffset=l;p=null!=e.noDataValue?e.noDataValue:a.defaultNoDataValue;var h=e.encodedMaskData,r=e.returnMask,m=0,b=c.pixels.numBlocksX,g=c.pixels.numBlocksY,t=Math.floor(c.width/b),u=Math.floor(c.height/g),v=2*c.maxZError,h=h||(c.mask?c.mask.bitset:null),q,l=new (e.pixelType||Float32Array)(c.width*c.height);r&&h&&(q=new Uint8Array(c.width*c.height));for(var r=new Float32Array(t*u),d,k,x=0;x<=g;x++)if(w=x!==g?u:c.height%g,0!==w)for(var y=0;y<=b;y++){var z=
  928. y!==b?t:c.width%b;if(0!==z){var A=x*c.width*u+y*t,C=c.width-z,B=c.pixels.blocks[m],D,F;if(2>B.encoding){if(0===B.encoding)D=B.rawData;else{D=B.stuffedData;F=B.bitsPerPixel;d=B.numValidPixels;k=B.offset;var G=v,Y=r,aa=c.pixels.maxValue,Z=(1<<F)-1,H=0,W=void 0,I=0,U=void 0,O=void 0,N=Math.ceil((aa-k)/G);D[D.length-1]<<=8*(4*D.length-Math.ceil(F*d/8));for(W=0;W<d;W++)0===I&&(O=D[H++],I=32),I>=F?(U=O>>>I-F&Z,I-=F):(I=F-I,U=(O&Z)<<I&Z,O=D[H++],I=32-I,U+=O>>>I),Y[W]=U<N?k+U*G:aa;D=r}F=0}else n=2===B.encoding?
  929. 0:B.offset;var J;if(h)for(k=0;k<w;k++){A&7&&(J=h[A>>3],J<<=A&7);for(d=0;d<z;d++)A&7||(J=h[A>>3]),J&128?(q&&(q[A]=1),l[A++]=2>B.encoding?D[F++]:n):(q&&(q[A]=0),l[A++]=p),J<<=1;A+=C}else if(2>B.encoding)for(k=0;k<w;k++){for(d=0;d<z;d++)l[A++]=D[F++];A+=C}else for(k=0;k<w;k++){for(d=0;d<z;d++)l[A++]=n;A+=C}if(1===B.encoding&&F!==B.numValidPixels)throw"Block and Mask do not match";m++}}n=q;q={width:c.width,height:c.height,pixelData:l,minValue:c.pixels.minValue,maxValue:c.pixels.maxValue,noDataValue:p};
  930. n&&(q.maskData=n);e.returnEncodedMask&&c.mask&&(q.encodedMaskData=c.mask.bitset?c.mask.bitset:null);if(e.returnFileInfo&&(q.fileInfo=f(c),e.computeUsedBitDepths)){e=q.fileInfo;n=c.pixels.numBlocksX*c.pixels.numBlocksY;J={};for(D=0;D<n;D++)F=c.pixels.blocks[D],0===F.encoding?J.float32=!0:1===F.encoding?J[F.bitsPerPixel]=!0:J[0]=!0;c=Object.keys(J);e.bitDepths=c}return q}},f=function(a){return{fileIdentifierString:a.fileIdentifierString,fileVersion:a.fileVersion,imageType:a.imageType,height:a.height,
  931. width:a.width,maxZError:a.maxZError,eofOffset:a.eofOffset,mask:a.mask?{numBlocksX:a.mask.numBlocksX,numBlocksY:a.mask.numBlocksY,numBytes:a.mask.numBytes,maxValue:a.mask.maxValue}:null,pixels:{numBlocksX:a.pixels.numBlocksX,numBlocksY:a.pixels.numBlocksY,numBytes:a.pixels.numBytes,maxValue:a.pixels.maxValue,minValue:a.pixels.minValue,noDataValue:this.noDataValue}}};return a})},"esri/support/LayersMixin":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Collection ../core/collectionUtils ../core/Logger ../core/accessorSupport/decorators ../layers/Layer".split(" "),
  932. function(a,f,p,e,n,l,h,c,m,b){function g(b,a,c){for(var e,f=0,d=b.length;f<d;f++)if(e=b.getItemAt(f),e[a]===c||e&&null!=e.layers&&(e=g(e.layers,a,c)))return e}var t=l.ofType(b),u=c.getLogger("esri.support.LayersMixin");return function(b){function a(a){var c=b.call(this,a)||this;c.layers=new t;c.layers.on("after-add",function(b){b=b.item;b.parent&&b.parent!==c&&"remove"in b.parent&&b.parent.remove(b);b.parent=c;c.layerAdded(b);"elevation"===b.type&&u.error("Layer '"+b.title+", id:"+b.id+"' of type '"+
  933. b.type+"' is not supported as an operational layer and will therefore be ignored.")});c.layers.on("after-remove",function(b){b=b.item;b.parent=null;c.layerRemoved(b)});return c}p(a,b);a.prototype.destroy=function(){this.layers.drain(this.layerRemoved,this)};Object.defineProperty(a.prototype,"layers",{set:function(b){this._set("layers",h.referenceSetter(b,this._get("layers"),t))},enumerable:!0,configurable:!0});a.prototype.findLayerById=function(b){return g(this.layers,"id",b)};a.prototype.add=function(b,
  934. a){var c=this.layers;a=c.getNextIndex(a);b.parent===this?this.reorder(b,a):c.add(b,a)};a.prototype.addMany=function(b,a){var c=this,d=this.layers;a=d.getNextIndex(a);b.slice().forEach(function(b){b.parent===c?c.reorder(b,a):(d.add(b,a),a+=1)})};a.prototype.findLayerByUid=function(b){return g(this.layers,"uid",b)};a.prototype.remove=function(b){return this.layers.remove(b)};a.prototype.removeMany=function(b){return this.layers.removeMany(b)};a.prototype.removeAll=function(){return this.layers.removeAll()};
  935. a.prototype.reorder=function(b,a){return this.layers.reorder(b,a)};a.prototype.layerAdded=function(b){};a.prototype.layerRemoved=function(b){};e([m.property({type:t,cast:h.castForReferenceSetter})],a.prototype,"layers",null);return a=e([m.subclass("esri.support.LayersMixin")],a)}(m.declared(n))})},"esri/Viewpoint":function(){define(["./core/JSONSupport","./Camera","./geometry/support/typeUtils","./geometry/support/jsonUtils"],function(a,f,p,e){var n=a.createSubclass({declaredClass:"esri.Viewpoint",
  936. properties:{rotation:{type:Number,value:0,cast:function(a){a%=360;0>a&&(a+=360);return a},json:{write:!0}},scale:{type:Number,value:0,json:{write:!0}},targetGeometry:{value:null,types:p.types,json:{read:function(a){return e.fromJSON(a)},write:!0}},camera:{value:null,type:f,json:{write:!0}}},clone:function(){return new n({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry?this.targetGeometry.clone():null,camera:this.camera?this.camera.clone():null})}});return n})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/accessorSupport/decorators ./geometry/Point ./views/3d/support/mathUtils".split(" "),
  937. function(a,f,p,e,n,l,h,c){return function(a){function b(b,c,g,e){b=a.call(this)||this;b.position=null;b.heading=0;b.tilt=0;b.fov=55;return b}p(b,a);g=b;b.prototype.getDefaults=function(b){if(!b.position)return{position:new h([0,0,0])}};b.prototype.normalizeCtorArgs=function(b,a,c,g){b&&"object"===typeof b&&("x"in b||Array.isArray(b))&&(b={position:b},null!=a&&(b.heading=a),null!=c&&(b.tilt=c),null!=g&&(b.fov=g));return b};b.prototype.equals=function(b){return b?this.tilt===b.tilt&&this.heading===
  938. b.heading&&this.fov===b.fov&&this.position.equals(b.position):!1};b.prototype.clone=function(){return new g({position:this.position.clone(),heading:this.heading,tilt:this.tilt,fov:this.fov})};e([l.property({type:h,json:{write:{isRequired:!0}}})],b.prototype,"position",void 0);e([l.property({type:Number,json:{write:{isRequired:!0}}}),l.cast(c.cyclicalDeg.normalize)],b.prototype,"heading",void 0);e([l.property({type:Number,json:{write:{isRequired:!0}}}),l.cast(function(b){return c.clamp(b,-180,180)})],
  939. b.prototype,"tilt",void 0);e([l.property({json:{read:!1,write:!1}})],b.prototype,"fov",void 0);return b=g=e([l.subclass("esri.Camera")],b);var g}(l.declared(n))})},"esri/geometry/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Extent ../Geometry ../Mesh ../Multipoint ../Point ../Polygon ../Polyline".split(" "),function(a,f,p,e,n,l,h,c,m,b){Object.defineProperty(f,"__esModule",{value:!0});f.types={base:n,key:"type",typeMap:{extent:e,multipoint:h,point:c,
  940. polyline:b,polygon:m,mesh:l}};f.ensureType=p.ensureOneOfType(f.types)})},"esri/layers/graphics/controllers/AutoController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Error ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../tasks/QueryTask ../../../tasks/support/StatisticDefinition".split(" "),function(a,
  941. f,p,e,n,l,h,c,m,b,g,t,u){var v;(function(b){b[b.Snapshot=0]="Snapshot";b[b.OnDemand=1]="OnDemand"})(v||(v={}));return function(f){function m(){var b=null!==f&&f.apply(this,arguments)||this;b.maxPointCountForAuto=4E3;b.maxRecordCountForAuto=2E3;b.maxVertexCountForAuto=25E4;return b}p(m,f);m.prototype.initialize=function(){var b=this,a=this.layer.when(function(){b._verifyCapabilities()}).then(function(){return b._figureOutMode().then(function(a){return b._createController(a)})}).then(function(a){return b._set("activeController",
  942. a)});this.addResolvingPromise(a)};m.prototype.destroy=function(){this.activeController&&(this.activeController.destroy(),this._set("activeController",null))};Object.defineProperty(m.prototype,"countThresholdForAuto",{get:function(){var b=this.layer.geometryType,a;"polyline"===b||"polygon"===b||"multipoint"===b?a=this.maxRecordCountForAuto:"point"===b&&(a=this.maxPointCountForAuto);return a},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"updating",{get:function(){return!1===this.isFulfilled()||
  943. !0===this.get("activeController.updating")},enumerable:!0,configurable:!0});m.prototype._figureOutMode=function(){return this._isStatisticsSupported()?this._checkByStatistics():this._checkByCount()};m.prototype._isStatisticsSupported=function(){return this.layer.source.parsedUrl?/(https?:)?\/\/services.*\.arcgis\.com/i.test(this.layer.source.parsedUrl.path):!1};m.prototype._checkByStatistics=function(){var b=this,a=this.layer,c=a.source.parsedUrl.path,a=a.createQuery();a.outStatistics=[new u({statisticType:"exceedslimit",
  944. maxPointCount:this.maxPointCountForAuto,maxRecordCount:this.maxRecordCountForAuto,maxVertexCount:this.maxVertexCountForAuto,outStatisticFieldName:"exceedslimit"})];return(new t({url:c+"/query"})).execute(a).then(function(a){a=a&&a.features&&a.features[0];if(0===(a&&a.attributes&&a.attributes.exceedslimit)){a=b.layer;var c=a.maxRecordCount;if(a.get("capabilities.query.supportsPagination")||c>=b.countThresholdForAuto)return v.Snapshot}return v.OnDemand})};m.prototype._checkByCount=function(){var b=
  945. this,a=this.layer;return a.queryFeatureCount().then(function(c){return c<=b.countThresholdForAuto&&c<=a.maxRecordCount?v.Snapshot:v.OnDemand})};m.prototype._createController=function(c){var g=this;return(c===v.OnDemand?b.create(function(b){return a(["./OnDemandController2D"],b)}):b.create(function(b){return a(["./SnapshotController"],b)})).then(function(b){return new b({layer:g.layer,layerView:g.layerView,graphics:g.graphics})}).catch(function(b){throw Error("Module path not found for controller type: "+
  946. (c===v.Snapshot?"snapshot":"on demand"));})};m.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new c("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:this.layer});};e([g.property()],m.prototype,"activeController",void 0);e([g.property({dependsOn:["layer.geometryType"]})],m.prototype,"countThresholdForAuto",null);e([g.property({type:h.ofType(n)})],m.prototype,"graphics",
  947. void 0);e([g.property()],m.prototype,"layer",void 0);e([g.property()],m.prototype,"layerView",void 0);e([g.property({dependsOn:["activeController.updating"]})],m.prototype,"updating",null);e([g.aliasOf("activeController.update")],m.prototype,"update",void 0);return m=e([g.subclass("esri.layers.graphics.controllers.AutoController2D")],m)}(g.declared(l,m))})},"esri/Graphic":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper dojo/_base/lang ./geometry ./PopupTemplate ./core/JSONSupport ./core/lang ./core/accessorSupport/decorators ./geometry/support/typeUtils ./symbols/support/jsonUtils ./symbols/support/typeUtils".split(" "),
  948. function(a,f,p,e,n,l,h,c,m,b,g,t,u){var v=0;return function(a){function c(b,c,g,e){b=a.call(this,b,c,g,e)||this;b.layer=null;b.sourceLayer=null;Object.defineProperty(b,"uid",{value:v++});return b}p(c,a);f=c;c.prototype.normalizeCtorArgs=function(b,a,c,g){return b&&!b.declaredClass?b:{geometry:b,symbol:a,attributes:c,popupTemplate:g}};Object.defineProperty(c.prototype,"attributes",{set:function(b){var a=this._get("attributes");a!==b&&(this._set("attributes",b),this._notifyLayer("attributes",a,b))},
  949. enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"geometry",{set:function(b){var a=this._get("geometry");a!==b&&(this._set("geometry",b),this._notifyLayer("geometry",a,b))},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"popupTemplate",{get:function(){return this.get("sourceLayer.popupTemplate")||null},set:function(b){void 0===b?this._clearOverride("popupTemplate"):this._override("popupTemplate",b)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,
  950. "symbol",{set:function(b){var a=this._get("symbol");a!==b&&(this._set("symbol",b),this._notifyLayer("symbol",a,b))},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"visible",{set:function(b){var a=this._get("visible");a!==b&&(this._set("visible",b),this._notifyLayer("visible",a,b))},enumerable:!0,configurable:!0});c.prototype.getAttribute=function(b){return this.attributes&&this.attributes[b]};c.prototype.setAttribute=function(b,a){if(this.attributes){var c=this.getAttribute(b);
  951. this.attributes[b]=a;this._notifyLayer("attributes",c,a,b)}else this.attributes=(c={},c[b]=a,c),this._notifyLayer("attributes",void 0,a,b)};c.prototype.toJSON=function(){return{geometry:this.geometry&&this.geometry.toJSON(),symbol:this.symbol&&this.symbol.toJSON(),attributes:n.mixin({},this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};c.prototype.clone=function(){return new f({attributes:m.clone(this.attributes),geometry:this.geometry&&this.geometry.clone()||null,layer:this.layer,
  952. popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),sourceLayer:this.sourceLayer,symbol:this.symbol&&this.symbol.clone()||null,visible:this.visible})};c.prototype._notifyLayer=function(b,a,c,g){this.layer&&(b={graphic:this,property:b,oldValue:a,newValue:c},g&&(b.attributeName=g),this.layer.graphicChanged(b))};e([b.property({value:null})],c.prototype,"attributes",null);e([b.property({value:null,types:g.types,json:{read:l.fromJSON}})],c.prototype,"geometry",null);e([b.property()],c.prototype,
  953. "layer",void 0);e([b.property({dependsOn:["sourceLayer.popupTemplate"],type:h})],c.prototype,"popupTemplate",null);e([b.property()],c.prototype,"sourceLayer",void 0);e([b.property({value:null,types:u.types,json:{read:t.read}})],c.prototype,"symbol",null);e([b.property({value:!0,set:function(b){}})],c.prototype,"visible",null);return c=f=e([b.subclass("esri.Graphic")],c);var f}(b.declared(c))})},"esri/PopupTemplate":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Collection ./core/date ./core/JSONSupport ./core/kebabDictionary ./core/lang ./core/accessorSupport/decorators ./layers/support/fieldUtils ./support/Action ./support/arcadeUtils".split(" "),
  954. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){var x=m({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),r=m({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.actions=null;b.content="";b.expressionInfos=null;b.fieldInfos=null;b.layerOptions=null;b.overwriteActions=!1;b.title="";b.relatedRecordsInfo=null;return b}e(c,a);d=c;c.prototype.readContent=function(b,a){var c=this,
  955. d=a.description,g=a.mediaInfos;b=a.showAttachments;if((a=a.popupElements)&&a.length)return a.map(function(b){"text"!==b.type||b.text?"media"===b.type&&(b.mediaInfos||g)&&(b.mediaInfos||(b.mediaInfos=g),b.mediaInfos=c._readMediaInfos(b.mediaInfos)):b.text=d;return b});a=[];d?a.push({type:"text",text:d}):a.push({type:"fields"});g&&g.length&&a.push({type:"media",mediaInfos:this._readMediaInfos(g)});b&&a.push({type:"attachments",displayType:"list"});return a.length?a:d};c.prototype.writeContent=function(a,
  956. c){var d=this;c.showAttachments=!1;"string"===typeof a?c.description=a:Array.isArray(a)&&(c.popupElements=b.clone(a),c.popupElements.forEach(function(a){"attachments"!==a.type||c.showAttachments?"media"!==a.type||c.mediaInfos?"text"!==a.type||c.description?"fields"!==a.type||c.fieldInfos||(a.fieldInfos&&(c.fieldInfos=d._writeFieldInfos(b.clone(a.fieldInfos))),delete a.fieldInfos):(a.text&&(c.description=a.text),delete a.text):(a.mediaInfos&&(c.mediaInfos=b.clone(a.mediaInfos),c.mediaInfos.forEach(function(b){b.type=
  957. r.toJSON(b.type)})),delete a.mediaInfos):c.showAttachments=!0;return a}))};c.prototype.writeExpressionInfos=function(b,a){a.expressionInfos=b||null};c.prototype.readFieldInfos=function(b){if(b)return b.forEach(function(b){var a=b.format&&b.format.dateFormat,c=b.stringFieldOption;a&&(b.format.dateFormat=h.fromJSON(a));c&&(b.stringFieldOption=x.fromJSON(c))}),b};c.prototype.writeFieldInfos=function(a,c){c.fieldInfos=a?this._writeFieldInfos(b.clone(a)):a};c.prototype.writeLayerOptions=function(b,a){a.layerOptions=
  958. b||null};c.prototype.writeTitle=function(b,a){a.title=b||""};c.prototype.writeRelatedRecordsInfo=function(b,a){a.relatedRecordsInfo=b||null};Object.defineProperty(c.prototype,"requiredFields",{get:function(){return this.collectRequiredFields()},enumerable:!0,configurable:!0});c.prototype.clone=function(){var a=this.actions,a=a?b.clone(a.toArray()):[];return new d({actions:a,content:Array.isArray(this.content)?b.clone(this.content):this.content,fieldInfos:this.fieldInfos?b.clone(this.fieldInfos):null,
  959. layerOptions:this.layerOptions?b.clone(this.layerOptions):null,overwriteActions:this.overwriteActions,relatedRecordsInfo:this.relatedRecordsInfo?b.clone(this.relatedRecordsInfo):null,title:this.title})};c.prototype.collectRequiredFields=function(){return this._getActionsFields(this.actions).concat(this._getTitleFields(this.title),this._getContentFields(this.content),this._getExpressionInfoFields(this.expressionInfos)).filter(function(b,a,c){return a===c.indexOf(b)})};c.prototype._getContentElementFields=
  960. function(b){var a=this;if(!b||"attachments"===b.type)return[];if("fields"===b.type)return this._getFieldInfoFields(b.fieldInfos||this.fieldInfos);if("media"===b.type)return(b.mediaInfos||[]).reduce(function(b,c){return b.concat(a._getMediaInfoFields(c))},[]);if("text"===b.type)return t.extractFieldNames(b.text)};c.prototype._getMediaInfoFields=function(b){var a=b.caption,c=b.value||{},d=c.fields,g=void 0===d?[]:d,d=c.normalizeField,e=c.tooltipField,k=c.sourceURL,c=c.linkURL;b=t.extractFieldNames(b.title).concat(t.extractFieldNames(a),
  961. t.extractFieldNames(k),t.extractFieldNames(c),g);d&&b.push(d);e&&b.push(e);return b};c.prototype._getContentFields=function(b){var a=this;return"string"===typeof b?t.extractFieldNames(b):Array.isArray(b)?b.reduce(function(b,c){return b.concat(a._getContentElementFields(c))},[]):[]};c.prototype._getExpressionInfoFields=function(b){return b?b.reduce(function(b,a){return b.concat(v.extractFieldNames(a.expression))},[]):[]};c.prototype._getFieldInfoFields=function(b){return b?b.filter(function(b){return"undefined"===
  962. typeof b.visible?!0:!!b.visible}).map(function(b){return b.fieldName}).filter(function(b){return-1===b.indexOf("relationships/")&&-1===b.indexOf("expression/")}):[]};c.prototype._getActionsFields=function(b){var a=this;return b?b.toArray().reduce(function(b,c){return b.concat(a._getActionFields(c))},[]):[]};c.prototype._getActionFields=function(b){return t.extractFieldNames(b.title).concat(t.extractFieldNames(b.className),t.extractFieldNames(b.image))};c.prototype._getTitleFields=function(b){return"string"===
  963. typeof b?t.extractFieldNames(b):[]};c.prototype._readMediaInfos=function(b){b.forEach(function(b){b.type=r.fromJSON(b.type)});return b};c.prototype._writeFieldInfos=function(b){b.forEach(function(b){var a=b.format&&b.format.dateFormat,c=b.stringFieldOption;a&&(b.format.dateFormat=h.toJSON(a));c&&(b.stringFieldOption=x.toJSON(c));b.format||delete b.format});return b};n([g.property({type:l.ofType(u)})],c.prototype,"actions",void 0);n([g.property()],c.prototype,"content",void 0);n([g.reader("content",
  964. ["description","popupElements","mediaInfos","showAttachments"])],c.prototype,"readContent",null);n([g.writer("content")],c.prototype,"writeContent",null);n([g.property()],c.prototype,"expressionInfos",void 0);n([g.writer("expressionInfos")],c.prototype,"writeExpressionInfos",null);n([g.property()],c.prototype,"fieldInfos",void 0);n([g.reader("fieldInfos")],c.prototype,"readFieldInfos",null);n([g.writer("fieldInfos")],c.prototype,"writeFieldInfos",null);n([g.property()],c.prototype,"layerOptions",
  965. void 0);n([g.writer("layerOptions")],c.prototype,"writeLayerOptions",null);n([g.property()],c.prototype,"overwriteActions",void 0);n([g.property()],c.prototype,"title",void 0);n([g.writer("title")],c.prototype,"writeTitle",null);n([g.property()],c.prototype,"relatedRecordsInfo",void 0);n([g.writer("relatedRecordsInfo")],c.prototype,"writeRelatedRecordsInfo",null);n([g.property({dependsOn:["actions","title","content","fieldInfos","expressionInfos"],readOnly:!0})],c.prototype,"requiredFields",null);
  966. return c=d=n([g.subclass("esri.PopupTemplate")],c);var d}(g.declared(c))})},"esri/core/date":function(){define(["require","exports","./kebabDictionary"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});var e={"short-date":"(datePattern: 'M/d/y', selector: 'date')","short-date-le":"(datePattern: 'd/M/y', selector: 'date')","long-month-day-year":"(datePattern: 'MMMM d, y', selector: 'date')","day-short-month-year":"(datePattern: 'd MMM y', selector: 'date')","long-date":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')",
  967. "short-date-short-time":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-le-short-time":"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-short-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')","short-date-le-short-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')","short-date-long-time":"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",
  968. "short-date-le-long-time":"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-long-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')","short-date-le-long-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')","long-month-year":"(datePattern: 'MMMM y', selector: 'date')","short-month-year":"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"};a=p({shortDate:"short-date",
  969. shortDateLE:"short-date-le",longDate:"long-date",dayShortMonthYear:"day-short-month-year",longMonthDayYear:"long-month-day-year",shortDateLongTime:"short-date-long-time",shortDateLELongTime:"short-date-le-long-time",shortDateShortTime:"short-date-short-time",shortDateLEShortTime:"short-date-le-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLongTime24:"short-date-long-time-24",shortDateLELongTime24:"short-date-le-long-time-24",
  970. longMonthYear:"long-month-year",shortMonthYear:"short-month-year"});f.toJSON=a.toJSON;f.fromJSON=a.fromJSON;f.getFormat=function(a){return e[a]}})},"esri/layers/support/fieldUtils":function(){define(["require","exports","dojo/_base/lang"],function(a,f,p){function e(a,e,c){if(a)for(var f=0;f<a.length;f++){var b=a[f],g=p.getObject(b,!1,e);(g=g&&"function"!==typeof g&&n(g,c))&&p.setObject(b,g.name,e)}}function n(a,e){if("string"!==typeof a)return null;if(null!=e){a=a.toLowerCase();for(var c=0;c<e.length;c++){var f=
  971. e[c];if(f&&f.name.toLowerCase()===a)return f}}return null}Object.defineProperty(f,"__esModule",{value:!0});f.extractFieldNames=function(a){if(!a||"string"!==typeof a)return[];a=a.match(/{[^}]*}/g);if(!a)return[];var e=/\{(\w+):.+\}/;return(a=a.filter(function(a){return!(0===a.indexOf("{relationships/")||0===a.indexOf("{expression/"))}).map(function(a){return a.replace(e,"{$1}")}))?a.map(function(a){return a.slice(1,-1)}):[]};f.fixRendererFields=function(a,h){if(null!=a&&null!=h){var c=0;for(a=Array.isArray(a)?
  972. a:[a];c<a.length;c++){var m=a[c];e(f.rendererFields,m,h);if(m.visualVariables)for(var b=0,m=m.visualVariables;b<m.length;b++)e(f.visualVariableFields,m[b],h)}}};f.getField=n;f.rendererFields="field field2 field3 normalizationField rotationInfo.field proportionalSymbolInfo.field proportionalSymbolInfo.normalizationField colorInfo.field colorInfo.normalizationField".split(" ");f.visualVariableFields=["field","normalizationField"];f.numericTypes=["integer","small-integer","single","double"];f.isNumericField=
  973. function(a,e){return a?-1<f.numericTypes.indexOf(a.type)&&a.name!==e.objectIdField:!1};f.isStringField=function(a,e){return a?"string"===a.type&&a.name!==e.objectIdField:!1};f.isDateField=function(a){return a?"date"===a.type:!1}})},"esri/support/Action":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Identifiable ../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l,h){return function(a){function c(b){b=
  974. a.call(this)||this;b.className=null;b.temporary=!1;b.image=null;b.id=null;b.title=null;b.visible=!0;return b}p(c,a);b=c;c.prototype.clone=function(){return new b({className:this.className,image:this.image,id:this.id,title:this.title,visible:this.visible})};e([h.property()],c.prototype,"className",void 0);e([h.property()],c.prototype,"temporary",void 0);e([h.property()],c.prototype,"image",void 0);e([h.property()],c.prototype,"id",void 0);e([h.property()],c.prototype,"title",void 0);e([h.property()],
  975. c.prototype,"visible",void 0);return c=b=e([h.subclass("esri.support.Action")],c);var b}(h.declared(n,l))})},"esri/support/arcadeUtils":function(){define("require exports dojo/_base/lang ../arcade/arcade ../arcade/Dictionary ../arcade/Feature".split(" "),function(a,f,p,e,n,l){function h(b){var a;try{a=b?e.parseScript(b):null}catch(t){a=null}return a}Object.defineProperty(f,"__esModule",{value:!0});var c=/^\$feature\./i,m={vars:{$feature:"any",$view:"any"},spatialReference:null};f.createSyntaxTree=
  976. h;f.createFunction=function(b,a){a=a||p.clone(m);b="string"===typeof b?h(b):b;var c;try{c=b?e.compileScript(b,a):null}catch(u){c=null}return c};f.createExecContext=function(b,a){return{vars:{$feature:null==b?new l:l.createFromGraphic(b),$view:a&&a.view},spatialReference:a&&a.sr}};f.createFeature=function(b,a,c){return l.createFromGraphicLikeObject(a,b,c)};f.updateExecContext=function(b,a){b.vars.$feature=a};f.evalSyntaxTree=function(b,a){var c;try{c=e.executeScript(b,a,a.spatialReference)}catch(u){c=
  977. null}return c};f.executeFunction=function(b,a){var c;try{c=b?b(a,a.spatialReference):null}catch(u){c=null}return c};f.extractFieldNames=function(b){if(!b)return[];b="string"===typeof b?h(b):b;var a=[];e.extractFieldLiterals(b).forEach(function(b){c.test(b)&&(b=b.replace(c,""),a.push(b))});a.sort();return a.filter(function(b,c){return 0===c||a[c-1]!==b})};f.dependsOnView=function(b){return e.referencesMember(b,"$view")};f.getViewInfo=function(b){if(b&&b.viewingMode&&null!=b.scale&&b.spatialReference)return{view:new n({viewingMode:b.viewingMode,
  978. scale:b.scale}),sr:b.spatialReference}};f.hasGeometryOperations=function(b){return(b="string"===typeof b?h(b):b)&&e.scriptUsesGeometryEngine(b)};f.enableGeometryOperations=function(){return e.enableGeometrySupport()}})},"esri/arcade/arcade":function(){define("require exports dojo/Deferred dojo/has ./arcadeCompiler ./arcadeRuntime ./parser".split(" "),function(a,f,p,e,n,l,h){Object.defineProperty(f,"__esModule",{value:!0});var c="disjoint intersects touches crosses within contains overlaps equals relate intersection union difference symmetricdifference clip cut area areageodetic length lengthgeodetic distance densify densifygeodetic generalize buffer buffergeodetic offset rotate issimple simplify multiparttosinglepart".split(" ");
  979. f.compileScript=function(a,b){return e("csp-restrictions")?function(b,c){return l.executeScript(a,b,c)}:n.compileScript(a,b)};f.extend=function(a){l.extend(a);n.extend(a)};f.parseScript=function(a){return h.parseScript(a)};f.validateScript=function(a,b){return h.validateScript(a,b,"simple")};f.scriptCheck=function(a,b,c){return h.scriptCheck(a,b,c,"full")};f.parseAndExecuteScript=function(a,b,c){return l.executeScript(h.parseScript(a),b,c)};f.executeScript=function(a,b,c){return l.executeScript(a,
  980. b,c)};f.referencesMember=function(a,b){return l.referencesMember(a,b)};f.referencesFunction=function(a,b){return l.referencesFunction(a,b)};f.extractFieldLiterals=function(a,b){void 0===b&&(b=!1);return h.extractFieldLiterals(a,b)};f.scriptUsesGeometryEngine=function(a){a=l.findFunctionCalls(a);for(var b=0;b<a.length;b++)if(-1<c.indexOf(a[b]))return!0;return!1};f.enableGeometrySupport=function(){var c=new p;a(["esri/geometry/geometryEngine","./functions/geomsync"],function(b,a){a.setGeometryEngine(b);
  981. c.resolve(!0)},function(b){c.reject(b)});return c.promise}})},"esri/arcade/arcadeCompiler":function(){define("require exports ./Dictionary ./Feature ./ImmutablePathArray ./ImmutablePointArray ./languageUtils ./treeAnalysis ./functions/date ./functions/geometry ./functions/geomsync ./functions/maths ./functions/stats ./functions/string ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline ../geometry/SpatialReference".split(" "),function(a,
  982. f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y){function z(b,a,c){try{return c(b,null,a)}catch(ka){throw ka;}}function A(b,a){try{switch(a.type){case "EmptyStatement":return"lc.voidOperation";case "VariableDeclarator":return G(b,a);case "VariableDeclaration":for(var d=[],g=0;g<a.declarations.length;g++)d.push(A(b,a.declarations[g]));return d.join("\n")+" \n lastStatement\x3d lc.voidOperation; \n";case "BlockStatement":return F(b,a);case "FunctionDeclaration":var g=a.id.name.toLowerCase(),e={applicationCache:void 0===
  983. b.applicationCache?null:b.applicationCache,spatialReference:b.spatialReference,console:b.console,symbols:b.symbols,localScope:{_SymbolsMap:{}},depthCounter:b.depthCounter+1,globalScope:b.globalScope};if(64<e.depthCounter)throw Error("Exceeded maximum function depth");for(var k="new lc.SizzleFunction( lang.functionDepthchecker(function() { var lastStatement \x3d lc.voidOperation; var lscope \x3d [];\n ",f=0;f<a.params.length;f++){var h=a.params[f].name.toLowerCase(),q=U(h,b);e.localScope._SymbolsMap[h]=
  984. q;k+="lscope['"+q+"']\x3darguments["+f.toString()+"];\n"}k+=F(e,a.body)+"\n return lastStatement; }, runtimeCtx))";k+="\n lastStatement \x3d lc.voidOperation; \n";void 0!==b.globalScope[g]?d="gscope['"+g+"']\x3d"+k:void 0!==b.globalScope._SymbolsMap[g]?d="gscope['"+b.globalScope._SymbolsMap[g]+"']\x3d"+k:(q=U(g,b),b.globalScope._SymbolsMap[g]=q,d="gscope['"+q+"']\x3d"+k);return d;case "ReturnStatement":var m;m=null===a.argument?"return lc.voidOperation;":"return "+A(b,a.argument)+";";return m;case "IfStatement":if("AssignmentExpression"===
  985. a.test.type||"UpdateExpression"===a.test.type)throw Error(c.nodeErrorMessage(a.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var l=A(b,a.test),n=O(b),t="var "+n+" \x3d "+l+";\n if ("+n+" \x3d\x3d\x3d true) {\n"+D(b,a.consequent)+"\n }\n",t=null!==a.alternate?t+("else if ("+n+"\x3d\x3d\x3dfalse) { \n"+D(b,a.alternate)+"}\n"):t+("else if ("+n+"\x3d\x3d\x3dfalse) { \n lastStatement \x3d lc.voidOperation;\n }\n");return t+="else { lang.error({type: '"+a.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); \n}\n";
  986. case "ExpressionStatement":var p;p="AssignmentExpression"===a.expression.type?"lastStatement \x3d lc.voidOperation; "+A(b,a.expression)+" \n ":"lastStatement \x3d "+A(b,a.expression)+";";return p;case "AssignmentExpression":return B(b,a);case "UpdateExpression":return C(b,a);case "BreakStatement":return"break;";case "ContinueStatement":return"continue;";case "ForStatement":d="lastStatement \x3d lc.voidOperation; \n";null!==a.init&&(d+=A(b,a.init));var r=O(b),v=O(b),d=d+("var "+r+" \x3d true;")+"\n do { ";
  987. null!==a.update&&(d+=" if ("+r+"\x3d\x3d\x3dfalse) {\n "+A(b,a.update)+" \n}\n "+r+"\x3dfalse; \n");null!==a.test&&(d+="var "+v+" \x3d "+A(b,a.test)+";",d+="if ("+v+"\x3d\x3d\x3dfalse) { break; } else if ("+v+"!\x3d\x3dtrue) { lang.error({type: '"+a.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); }\n");d+=A(b,a.body);null!==a.update&&(d+="\n "+A(b,a.update));return d+("\n"+r+" \x3d true; \n} while(true); lastStatement \x3d lc.voidOperation;");case "ForInStatement":var u=O(b),x=O(b),
  988. w=O(b),y="var "+u+" \x3d "+A(b,a.right)+";\n";"VariableDeclaration"===a.left.type&&(y+=A(b,a.left));var z="VariableDeclaration"===a.left.type?a.left.declarations[0].id.name:a.left.name,z=z.toLowerCase(),d="";null!==b.localScope&&(void 0!==b.localScope[z]?d="lscope['"+z+"']":void 0!==b.localScope._SymbolsMap[z]&&(d="lscope['"+b.localScope._SymbolsMap[z]+"']"));""===d&&(void 0!==b.globalScope[z]?d="gscope['"+z+"']":void 0!==b.globalScope._SymbolsMap[z]&&(d="gscope['"+b.globalScope._SymbolsMap[z]+"']"));
  989. y=y+("if ("+u+"\x3d\x3d\x3dnull) { lastStatement \x3d lc.voidOperation; }\n ")+("else if (lc.isArray("+u+") || lc.isString("+u+")) {")+("var "+x+"\x3d"+u+".length; \n")+("for(var "+w+"\x3d0; "+w+"\x3c"+x+"; "+w+"++) {\n");y+=d+"\x3d"+w+";\n";y+=A(b,a.body);y+="\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";y+="else if (lc.isImmutableArray("+u+")) {";y=y+("var "+x+"\x3d"+u+".length(); \n")+("for(var "+w+"\x3d0; "+w+"\x3c"+x+"; "+w+"++) {\n");y+=d+"\x3d"+w+";\n";y+=A(b,a.body);y+=
  990. "\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";y+="else if (( "+u+" instanceof lang.Dictionary) || ( "+u+" instanceof lang.Feature)) {";y=y+("var "+x+"\x3d"+u+".keys(); \n")+("for(var "+w+"\x3d0; "+w+"\x3c"+x+".length; "+w+"++) {\n");y+=d+"\x3d"+x+"["+w+"];\n";y+=A(b,a.body);y+="\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";return y+"else { lastStatement \x3d lc.voidOperation; } \n";case "Identifier":return aa(b,a);case "MemberExpression":var J;try{d=void 0,d=
  991. !0===a.computed?A(b,a.property):"'"+a.property.name+"'",J="lang.member("+A(b,a.object)+","+d+")"}catch(ua){throw ua;}return J;case "Literal":return null===a.value||void 0===a.value?"null":JSON.stringify(a.value);case "ThisExpression":throw Error(c.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTED"));case "CallExpression":try{if("Identifier"!==a.callee.type)throw Error(c.nodeErrorMessage(a,"RUNTIME","ONLYNODESSUPPORTED"));var P=a.callee.name.toLowerCase(),d="";null!==b.localScope&&(void 0!==b.localScope[P]?
  992. d="lscope['"+P+"']":void 0!==b.localScope._SymbolsMap[P]&&(d="lscope['"+b.localScope._SymbolsMap[P]+"']"));""===d&&(void 0!==b.globalScope[P]?d="gscope['"+P+"']":void 0!==b.globalScope._SymbolsMap[P]&&(d="gscope['"+b.globalScope._SymbolsMap[P]+"']"));if(""!==d)for(g="[",e=0;e<a.arguments.length;e++)0<e&&(g+=", "),g+=A(b,a.arguments[e]);else throw Error(c.nodeErrorMessage(a,"RUNTIME","NOTFOUND"));}catch(ua){throw ua;}return"lang.callfunc("+d+","+(g+"]")+",runtimeCtx)";case "UnaryExpression":var ca;
  993. try{ca="lang.unary("+A(b,a.argument)+",'"+a.operator+"')"}catch(ua){throw ua;}return ca;case "BinaryExpression":var L;try{L="lang.binary("+A(b,a.left)+","+A(b,a.right)+",'"+a.operator+"')"}catch(ua){throw ua;}return L;case "LogicalExpression":var Z;try{if("AssignmentExpression"===a.left.type||"UpdateExpression"===a.left.type)throw Error(c.nodeErrorMessage(a.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===a.right.type||"UpdateExpression"===a.right.type)throw Error(c.nodeErrorMessage(a.right,
  994. "RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("\x26\x26"===a.operator||"||"===a.operator)Z="(lang.logicalCheck("+A(b,a.left)+") "+a.operator+" lang.logicalCheck("+A(b,a.right)+"))";else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}catch(ua){throw ua;}return Z;case "ConditionalExpression":throw Error(c.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{d=[];for(g=0;g<a.elements.length;g++)"Literal"===a.elements[g].type?d.push(A(b,a.elements[g])):
  995. d.push("lang.aCheck("+A(b,a.elements[g])+",'ArrayExpression')");k="["+d.join(",")+"]"}catch(ua){throw ua;}return k;case "ObjectExpression":d="lang.dictionary([";for(g=0;g<a.properties.length;g++){var f=a.properties[g],H="Identifier"===f.key.type?"'"+f.key.name+"'":A(b,f.key),W=A(b,f.value);0<g&&(d+=",");d+="lang.strCheck("+H+",'ObjectExpression'),lang.aCheck("+W+", 'ObjectExpression')"}return d+"])";case "Property":throw Error("Should not get here");case "Array":throw Error(c.nodeErrorMessage(a,"RUNTIME",
  996. "NOTSUPPORTED"));default:throw Error(c.nodeErrorMessage(a,"RUNTIME","UNREOGNISED"));}}catch(ua){throw ua;}}function C(b,a){var c=null,d="";if("MemberExpression"===a.argument.type)return c=A(b,a.argument.object),d=!0===a.argument.computed?A(b,a.argument.property):"'"+a.argument.property.name+"'","lang.memberupdate("+c+","+d+",'"+a.operator+"',"+a.prefix+")";c=a.argument.name.toLowerCase();if(null!==b.localScope){if(void 0!==b.localScope[c])return"lang.update(lscope, '"+c+"','"+a.operator+"',"+a.prefix+
  997. ")";if(void 0!==b.localScope._SymbolsMap[c])return"lang.update(lscope, '"+b.localScope._SymbolsMap[c]+"','"+a.operator+"',"+a.prefix+")"}if(void 0!==b.globalScope[c])return"lang.update(gscope, '"+c+"','"+a.operator+"',"+a.prefix+")";if(void 0!==b.globalScope._SymbolsMap[c])return"lang.update(gscope, '"+b.globalScope._SymbolsMap[c]+"','"+a.operator+"',"+a.prefix+")";throw Error("Variable not recognised");}function B(b,a){var c=A(b,a.right),d=null,g="";if("MemberExpression"===a.left.type)return d=A(b,
  998. a.left.object),g=!0===a.left.computed?A(b,a.left.property):"'"+a.left.property.name+"'","lang.assignmember("+d+","+g+",'"+a.operator+"',"+c+");";d=a.left.name.toLowerCase();if(null!==b.localScope){if(void 0!==b.localScope[d])return"lscope['"+d+"']\x3dlang.assign("+c+",'"+a.operator+"', lscope['"+d+"']); ";if(void 0!==b.localScope._SymbolsMap[d])return"lscope['"+b.localScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+a.operator+"', lscope['"+b.localScope._SymbolsMap[d]+"']); "}if(void 0!==b.globalScope[d])return"gscope['"+
  999. d+"']\x3dlang.assign("+c+",'"+a.operator+"', gscope['"+d+"']); ";if(void 0!==b.globalScope._SymbolsMap[d])return"gscope['"+b.globalScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+a.operator+"', gscope['"+b.globalScope._SymbolsMap[d]+"']); ";throw Error("Variable not recognised");}function D(b,a){return"BlockStatement"===a.type?A(b,a):"ReturnStatement"===a.type?A(b,a):"BreakStatement"===a.type?A(b,a):"ContinueStatement"===a.type?A(b,a):"UpdateExpression"===a.type?"lastStatement \x3d "+A(b,a)+";":
  1000. "ExpressionStatement"===a.type?A(b,a):"ObjectExpression"===a.type?"lastStatement \x3d "+A(b,a)+";":A(b,a)}function F(b,a){for(var c="",d=0;d<a.body.length;d++)c="ReturnStatement"===a.body[d].type?c+(A(b,a.body[d])+" \n"):"BreakStatement"===a.body[d].type?c+(A(b,a.body[d])+" \n"):"ContinueStatement"===a.body[d].type?c+(A(b,a.body[d])+" \n"):"UpdateExpression"===a.body[d].type?c+("lastStatement \x3d "+A(b,a.body[d])+"; \n"):"ObjectExpression"===a.body[d].type?c+("lastStatement \x3d "+A(b,a.body[d])+
  1001. "; \n"):c+(A(b,a.body[d])+" \n");return c}function G(b,a){var c=null===a.init?null:A(b,a.init);c===h.voidOperation&&(c=null);a=a.id.name.toLowerCase();if(null!==b.localScope){if(void 0!==b.localScope[a])return"lscope['"+a+"']\x3d"+c+";";if(void 0!==b.localScope._SymbolsMap[a])return"lscope['"+b.localScope._SymbolsMap[a]+"']\x3d"+c+";";var d=U(a,b);b.localScope._SymbolsMap[a]=d;return"lscope['"+d+"']\x3d"+c+";"}if(void 0!==b.globalScope[a])return"gscope['"+a+"']\x3d"+c+";";if(void 0!==b.globalScope._SymbolsMap[a])return"gscope['"+
  1002. b.globalScope._SymbolsMap[a]+"']\x3d"+c+";";d=U(a,b);b.globalScope._SymbolsMap[a]=d;return"gscope['"+d+"']\x3d"+c+";"}function Y(b,a,d){a=a.toLowerCase();switch(a){case "hasz":return b=b.hasZ,void 0===b?!1:b;case "hasm":return b=b.hasM,void 0===b?!1:b;case "spatialreference":return a=b.spatialReference._arcadeCacheId,void 0===a&&(d=!0,Object.freeze&&Object.isFrozen(b.spatialReference)&&(d=!1),d&&(L++,a=b.spatialReference._arcadeCacheId=L)),b=new p({wkt:b.spatialReference.wkt,wkid:b.spatialReference.wkid}),
  1003. void 0!==a&&(b._arcadeCacheId="SPREF"+a.toString()),b}switch(b.type){case "extent":switch(a){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return b=b[a],void 0!==b?b:null;case "type":return"Extent"}break;case "polygon":switch(a){case "rings":return a=h.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===a&&(L++,a=L,h.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",a)),b=new n(b.rings,b.spatialReference,
  1004. !0===b.hasZ,!0===b.hasM,a);case "type":return"Polygon"}break;case "point":switch(a){case "x":case "y":case "z":case "m":return void 0!==b[a]?b[a]:null;case "type":return"Point"}break;case "polyline":switch(a){case "paths":return a=h.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===a&&(L++,a=L,h.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",a)),b=new n(b.paths,b.spatialReference,!0===b.hasZ,!0===b.hasM,a);case "type":return"Polyline"}break;case "multipoint":switch(a){case "points":return a=
  1005. h.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===a&&(L++,a=L,h.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",a)),b=new l(b.points,b.spatialReference,!0===b.hasZ,!0===b.hasM,a,1);case "type":return"Multipoint"}}throw Error(c.nodeErrorMessage(d,"RUNTIME","PROPERTYNOTFOUND"));}function aa(b,a){try{var d=a.name.toLowerCase();if(null!==b.localScope){if(void 0!==b.localScope[d])return"lscope['"+d+"']";if(void 0!==b.localScope._SymbolsMap[d])return"lscope['"+
  1006. b.localScope._SymbolsMap[d]+"']"}if(void 0!==b.globalScope[d])return"gscope['"+d+"']";if(void 0!==b.globalScope._SymbolsMap[d])return"gscope['"+b.globalScope._SymbolsMap[d]+"']";throw Error(c.nodeErrorMessage(a,"RUNTIME","VARIABLENOTFOUND"));}catch(ka){throw ka;}}function Z(b){return null===b?"":h.isArray(b)||h.isImmutableArray(b)?"Array":h.isDate(b)?"Date":h.isString(b)?"String":h.isBoolean(b)?"Boolean":h.isNumber(b)?"Number":b instanceof p?"Dictionary":b instanceof e?"Feature":b instanceof q?"Point":
  1007. b instanceof d?"Polygon":b instanceof k?"Polyline":b instanceof w?"Multipoint":b instanceof x?"Extent":h.isFunctionParameter(b)?"Function":b===h.voidOperation?"":"number"===typeof b&&isNaN(b)?"Number":"Unrecognised Type"}function H(b,a,c,d){try{if(h.equalityTest(a[c],d))return a[c+1];var g=a.length-c;return 1===g?a[c]:2===g?null:3===g?a[c+2]:H(b,a,c+2,d)}catch(qa){throw qa;}}function W(b,a,c,d){try{if(!0===d)return a[c+1];if(3===a.length-c)return a[c+2];var g=a[c+2];if(!1===h.isBoolean(g))throw Error("WHEN needs boolean test conditions");
  1008. return W(b,a,c+2,g)}catch(qa){throw qa;}}function I(b,a){var c=b.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[b[0]];var g=I(b.slice(0,d),a);b=I(b.slice(d,c),a);for(c=[];0<g.length||0<b.length;)0<g.length&&0<b.length?(d=a(g[0],b[0]),isNaN(d)&&(d=0),0>=d?(c.push(g[0]),g=g.slice(1)):(c.push(b[0]),b=b.slice(1))):0<g.length?(c.push(g[0]),g=g.slice(1)):0<b.length&&(c.push(b[0]),b=b.slice(1));return c}function U(b,a){a.symbols.symbolCounter++;return"_T"+a.symbols.symbolCounter.toString()}function O(b){b.symbols.symbolCounter++;
  1009. return"_Tvar"+b.symbols.symbolCounter.toString()}function N(b,a,c){var d={};b||(b={});c||(c={});d._SymbolsMap={};d.textformatting=1;d.infinity=1;d.pi=1;for(var g in a)d[g]=1;for(g in c)d[g]=1;for(g in b)d[g]=1;return d}function J(b){console.log(b)}Object.defineProperty(f,"__esModule",{value:!0});var L=0,S={};m.registerFunctions(S,z);v.registerFunctions(S,z);t.registerFunctions(S,z);b.registerFunctions(S,z);u.registerFunctions(S,z);g.registerFunctions(S,z);S["typeof"]=function(b,a){return z(b,a,function(b,
  1010. a,c){h.pcCheck(c,1,1);b=Z(c[0]);if("Unrecognised Type"===b)throw Error("Unrecognised Type");return b})};S.iif=function(b,a){try{return z(b,a,function(b,a,c){h.pcCheck(c,3,3);if(!1===h.isBoolean(c[0]))throw Error("IF Function must have a boolean test condition");return c[0]?c[1]:c[2]})}catch(da){throw da;}};S.decode=function(b,a){try{return z(b,a,function(a,c,d){if(2>d.length)throw Error("Missing Parameters");if(2===d.length)return d[1];if(0===(d.length-1)%2)throw Error("Must have a default value result.");
  1011. return H(b,d,1,d[0])})}catch(da){throw da;}};S.when=function(b,a){try{return z(b,a,function(a,c,d){if(3>d.length)throw Error("Missing Parameters");if(0===d.length%2)throw Error("Must have a default value result.");a=d[0];if(!1===h.isBoolean(a))throw Error("WHEN needs boolean test conditions");return W(b,d,0,a)})}catch(da){throw da;}};S.top=function(b,a){return z(b,a,function(b,a,c){h.pcCheck(c,2,2);if(h.isArray(c[0]))return h.toNumber(c[1])>=c[0].length?c[0].slice(0):c[0].slice(0,h.toNumber(c[1]));
  1012. if(h.isImmutableArray(c[0]))return h.toNumber(c[1])>=c[0].length()?c[0].slice(0):c[0].slice(0,h.toNumber(c[1]));throw Error("Top cannot accept this parameter type");})};S.first=function(b,a){return z(b,a,function(b,a,c){h.pcCheck(c,1,1);return h.isArray(c[0])?0===c[0].length?null:c[0][0]:h.isImmutableArray(c[0])?0===c[0].length()?null:c[0].get(0):null})};S.sort=function(b,a){return z(b,a,function(b,a,c){h.pcCheck(c,1,2);a=c[0];h.isImmutableArray(a)&&(a=a.toArray());if(!1===h.isArray(a))throw Error("Illegal Argument");
  1013. if(1<c.length){if(!1===h.isFunctionParameter(c[1]))throw Error("Illegal Argument");a=I(a,function(a,d){return V.callfunc(c[1],[a,d],b)})}else{if(0===a.length)return[];for(var d={},g=0;g<a.length;g++){var e=Z(a[g]);""!==e&&(d[e]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||!0===d.Extent||!0===d.Function)return a.slice(0);var g=0,e="",k;for(k in d)g++,e=k;a=1<g||"String"===e?I(a,function(b,a){if(null===b||void 0===b||b===h.voidOperation)return null===
  1014. a||void 0===a||a===h.voidOperation?0:1;if(null===a||void 0===a||a===h.voidOperation)return-1;b=h.toString(b);a=h.toString(a);return b<a?-1:b===a?0:1}):"Number"===e?I(a,function(b,a){return b-a}):"Boolean"===e?I(a,function(b,a){return b===a?0:a?-1:1}):"Date"===e?I(a,function(b,a){return a-b}):a.slice(0)}return a})};for(var T in S)S[T]=new h.NativeFunction(S[T]);var ha=function(){};ha.prototype=S;f.functionHelper={fixSpatialReference:h.fixSpatialReference,parseArguments:function(b,a){for(var c=[],d=
  1015. 0;d<a.arguments.length;d++)c.push(A(b,a.arguments[d]));return c},standardFunction:z};f.extend=function(b){for(var a={mode:"sync",compiled:!0,functions:{},signatures:[],standardFunction:z},d=0;d<b.length;d++)b[d].registerFunctions(a);for(var g in a.functions)S[g]=new h.NativeFunction(a.functions[g]),ha.prototype[g]=S[g];for(d=0;d<a.signatures.length;d++)c.addFunctionDeclaration(a.signatures[d],"f")};f.executeScript=function(b,a,c){return b(a,c)};f.extractFieldLiterals=function(b,a){void 0===a&&(a=
  1016. !1);return c.findFieldLiterals(b,a)};f.validateScript=function(b,a){return c.validateScript(b,a,"simple")};f.referencesMember=function(b,a){return c.referencesMember(b,a)};f.referencesFunction=function(b,a){return c.referencesFunction(b,a)};var V={error:function(b,a,d){throw Error(c.nodeErrorMessage(b,a,d));},functionDepthchecker:function(b,a){return function(){a.depthCounte++;if(64<a.depthCounter)throw Error("Exceeded maximum function depth");var c=b.apply(this,arguments);a.depthCounte--;return c}},
  1017. aCheck:function(b,a){if(h.isFunctionParameter(b))throw Error(c.nodeErrorMessage({type:a},"RUNTIME","FUNCTIONCONTEXTILLEGAL"));return b===h.voidOperation?null:b},Dictionary:p,Feature:e,dictionary:function(b){for(var a={},c=0;c<b.length;c+=2){if(h.isFunctionParameter(b[c+1]))throw Error("Illegal Argument");if(!1===h.isString(b[c]))throw Error("Illegal Argument");a[b[c].toString()]=b[c+1]===h.voidOperation?null:b[c+1]}b=new p(a);b.immutable=!1;return b},strCheck:function(b,a){if(!1===h.isString(b))throw Error("Illegal Argument");
  1018. return b},unary:function(b,a){if(h.isBoolean(b)){if("!"===a)return!b;if("-"===a)return-1*h.toNumber(b);if("+"===a)return 1*h.toNumber(b);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===a)return-1*h.toNumber(b);if("+"===a)return 1*h.toNumber(b);throw Error(c.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));},logicalCheck:function(b){if(!1===h.isBoolean(b))throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME",
  1019. "ONLYORORAND"));return b},logical:function(b,a,d){if(h.isBoolean(b)&&h.isBoolean(a))switch(d){case "||":return b||a;case "\x26\x26":return b&&a;default:throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}else throw Error(c.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));},binary:function(b,a,d){switch(d){case "\x3d\x3d":return h.equalityTest(b,a);case "\x3d":return h.equalityTest(b,a);case "!\x3d":return!h.equalityTest(b,a);case "\x3c":return h.greaterThanLessThan(b,
  1020. a,d);case "\x3e":return h.greaterThanLessThan(b,a,d);case "\x3c\x3d":return h.greaterThanLessThan(b,a,d);case "\x3e\x3d":return h.greaterThanLessThan(b,a,d);case "+":return h.isString(b)||h.isString(a)?h.toString(b)+h.toString(a):h.toNumber(b)+h.toNumber(a);case "-":return h.toNumber(b)-h.toNumber(a);case "*":return h.toNumber(b)*h.toNumber(a);case "/":return h.toNumber(b)/h.toNumber(a);case "%":return h.toNumber(b)%h.toNumber(a);default:throw Error(c.nodeErrorMessage({type:"BinaryExpression"},"RUNTIME",
  1021. "OPERATORNOTRECOGNISED"));}},assign:function(b,a,d){switch(a){case "\x3d":return b===h.voidOperation?null:b;case "/\x3d":return h.toNumber(d)/h.toNumber(b);case "*\x3d":return h.toNumber(d)*h.toNumber(b);case "-\x3d":return h.toNumber(d)-h.toNumber(b);case "+\x3d":return h.isString(d)||h.isString(b)?h.toString(d)+h.toString(b):h.toNumber(d)+h.toNumber(b);case "%\x3d":return h.toNumber(d)%h.toNumber(b);default:throw Error(c.nodeErrorMessage("AssignmentExpression","RUNTIME","OPERATORNOTRECOGNISED"));
  1022. }},update:function(b,a,c,d){var g=h.toNumber(b[a]);b[a]="++"===c?g+1:g-1;return!1===d?g:"++"===c?g+1:g-1},memberupdate:function(b,a,c,d){var g;if(h.isArray(b))if(h.isNumber(a)){0>a&&(a=b.length+a);if(0>a||a>=b.length)throw Error("Assignment outside of array bounds");g=h.toNumber(b[a]);b[a]="++"===c?g+1:g-1}else throw Error("Invalid Parameter");else if(b instanceof p){if(!1===h.isString(a))throw Error("Dictionary accessor must be a string");if(!0===b.hasField(a))g=h.toNumber(b.field(a)),b.setField(a,
  1023. "++"===c?g+1:g-1);else throw Error("Invalid Parameter");}else if(b instanceof e){if(!1===h.isString(a))throw Error("Feature accessor must be a string");if(!0===b.hasField(a))g=h.toNumber(b.field(a)),b.setField(a,"++"===c?g+1:g-1);else throw Error("Invalid Parameter");}else{if(h.isImmutableArray(b))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===d?g:"++"===c?g+1:g-1},assignmember:function(b,a,c,d){if(h.isArray(b))if(h.isNumber(a)){0>a&&(a=b.length+a);if(0>a||a>b.length)throw Error("Assignment outside of array bounds");
  1024. if(a===b.length&&"\x3d"!==c)throw Error("Invalid Parameter");b[a]=this.assign(d,c,b[a])}else throw Error("Invalid Parameter");else if(b instanceof p){if(!1===h.isString(a))throw Error("Dictionary accessor must be a string");if(!0===b.hasField(a))b.setField(a,this.assign(d,c,b.field(a)));else{if("\x3d"!==c)throw Error("Invalid Parameter");b.setField(a,this.assign(d,c,null))}}else if(b instanceof e){if(!1===h.isString(a))throw Error("Feature accessor must be a string");if(!0===b.hasField(a))b.setField(a,
  1025. this.assign(d,c,b.field(a)));else{if("\x3d"!==c)throw Error("Invalid Parameter");b.setField(a,this.assign(d,c,null))}}else{if(h.isImmutableArray(b))throw Error("Array is Immutable");throw Error("Invalid Parameter");}},member:function(b,a){if(null===b)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(b instanceof p||b instanceof e){if(h.isString(a))return b.field(a)}else if(b instanceof r){if(h.isString(a))return Y(b,a,"MemberExpression")}else if(h.isArray(b)){if(h.isNumber(a)&&
  1026. isFinite(a)&&Math.floor(a)===a){0>a&&(a=b.length+a);if(a>=b.length||0>a)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[a]}}else if(h.isString(b)){if(h.isNumber(a)&&isFinite(a)&&Math.floor(a)===a){0>a&&(a=b.length+a);if(a>=b.length||0>a)throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[a]}}else if(h.isImmutableArray(b)&&h.isNumber(a)&&isFinite(a)&&Math.floor(a)===a){0>a&&(a=b.length()+a);if(a>=b.length()||0>a)throw Error(c.nodeErrorMessage("MemberExpression",
  1027. "RUNTIME","OUTOFBOUNDS"));return b.get(a)}throw Error(c.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(b,a,c){return b instanceof h.NativeFunction?b.fn(c,a):b instanceof h.SizzleFunction?b.fn.apply(this,a):b.apply(this,a)}};f.compileScript=function(b,a){void 0===a&&(a=null);null===a&&(a={vars:{},customfunctions:{}});a={globalScope:N(a.vars,S,a.customfunctions),localScope:null,console:J,symbols:{symbolCounter:0}};b=A(a,b.body[0].body);""===b&&(b="lc.voidOperation;");
  1028. a={lc:h,lang:V,postProcess:function(b){b instanceof h.ReturnResult&&(b=b.value);b instanceof h.ImplicitResult&&(b=b.value);b===h.voidOperation&&(b=null);if(b===h.breakResult)throw Error("Cannot return BREAK");if(b===h.continueResult)throw Error("Cannot return CONTINUE");if(h.isFunctionParameter(b))throw Error("Cannot return FUNCTION");return b},prepare:function(b,a){a||(a=new y({wkid:102100}));var c=b.vars,d=b.customfunctions,g=new ha;c||(c={});d||(d={});var k=new p({newline:"\n",tab:"\t",singlequote:"'",
  1029. doublequote:'"',forwardslash:"/",backwardslash:"\\"});k.immutable=!1;g._SymbolsMap={textformatting:1,infinity:1,pi:1};g.textformatting=k;g.infinity=Number.POSITIVE_INFINITY;g.pi=Math.PI;for(var f in d)g[f]=d[f],g._SymbolsMap[f]=1;for(f in c)g._SymbolsMap[f]=1,g[f]=c[f]&&"esri.Graphic"===c[f].declaredClass?e.createFromGraphic(c[f]):c[f];return{spatialReference:a,globalScope:g,localScope:null,console:b.console?b.console:J,symbols:{symbolCounter:0},depthCounter:1,applicationCache:void 0===b.applicationCache?
  1030. null:b.applicationCache}}};return(new Function("context","spatialReference","var runtimeCtx\x3dthis.prepare(context, spatialReference);\n var lc \x3d this.lc; var lang \x3d this.lang; var gscope\x3druntimeCtx.globalScope; \n function mainBody() {\n var lastStatement\x3dlc.voidOperation;\n "+b+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(a)}})},"esri/arcade/Dictionary":function(){define(["require","exports","./ImmutableArray","./languageUtils","../geometry/Geometry"],
  1031. function(a,f,p,e,n){return function(){function a(e){this.attributes=null;this.plain=!1;this.immutable=!0;this.attributes=e instanceof a?e.attributes:void 0===e?{}:null===e?{}:e}a.prototype.field=function(a){var c=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var e in this.attributes)if(e.toLowerCase()===c)return this.attributes[e];throw Error("Field not Found");};a.prototype.setField=function(a,c){if(this.immutable)throw Error("Dictionary is Immutable");var e=a.toLowerCase();if(void 0===
  1032. this.attributes[a])for(var b in this.attributes)if(b.toLowerCase()===e){this.attributes[b]=c;return}this.attributes[a]=c};a.prototype.hasField=function(a){var c=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var e in this.attributes)if(e.toLowerCase()===c)return!0;return!1};a.prototype.keys=function(){var a=[],c;for(c in this.attributes)a.push(c);return a=a.sort()};a.prototype.castToText=function(){var a="",c;for(c in this.attributes){""!==a&&(a+=",");var f=this.attributes[c];null==f?
  1033. a+=JSON.stringify(c)+":null":e.isBoolean(f)||e.isNumber(f)||e.isString(f)?a+=JSON.stringify(c)+":"+JSON.stringify(f):f instanceof n?a+=JSON.stringify(c)+":"+e.toStringExplicit(f):f instanceof p?a+=JSON.stringify(c)+":"+e.toStringExplicit(f):f instanceof Array?a+=JSON.stringify(c)+":"+e.toStringExplicit(f):f instanceof Date?a+=JSON.stringify(c)+":"+JSON.stringify(f):null!==f&&"object"===typeof f&&void 0!==f.castToText&&(a+=JSON.stringify(c)+":"+f.castToText())}return"{"+a+"}"};return a}()})},"esri/arcade/ImmutableArray":function(){define(["require",
  1034. "exports"],function(a,f){return function(){function a(a){void 0===a&&(a=[]);this._elements=a}a.prototype.length=function(){return this._elements.length};a.prototype.get=function(a){return this._elements[a]};a.prototype.toArray=function(){for(var a=[],f=0;f<this.length();f++)a.push(this.get(f));return a};return a}()})},"esri/arcade/languageUtils":function(){define("require exports dojo/number dojo/_base/array ../kernel ../moment ./FunctionWrapper ./ImmutableArray ./ImmutablePathArray ./ImmutablePointArray ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline".split(" "),
  1035. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r){function w(b,a,c){if(""===a||null===a||void 0===a||a===c||a===c)return b;do b=b.replace(a,c);while(-1!==b.indexOf(a));return b}function q(b){return b instanceof O||b instanceof h||b instanceof N}function d(b){return"string"===typeof b||b instanceof String}function k(b){return"boolean"===typeof b}function y(b){return"number"===typeof b}function z(b){return b instanceof Array}function A(b){return b instanceof Date}function C(b,a){if(!1===isNaN(b)){if(void 0===
  1036. a||null===a||""===a)return b.toString();a=w(a,"\u2030","");a=w(a,"\u00a4","");return p.format(b,{pattern:a})}return b.toString()}function B(b,a){b=l(b);return void 0===a||null===a||""===a?b.format():b.format(D(a))}function D(b){return b.replace(/(LTS)|L|l/g,function(b){return"["+b+"]"})}function F(b,a,c){switch(c){case "\x3e":return b>a;case "\x3c":return b<a;case "\x3e\x3d":return b>=a;case "\x3c\x3d":return b<=a}return!1}function G(a,c){if(a===c||null===a&&c===f.voidOperation||null===c&&a===f.voidOperation)return!0;
  1037. if(A(a)&&A(c))return a.getTime()===c.getTime();if(a instanceof m||a instanceof b)return a.equalityTest(c);if(a instanceof v&&c instanceof v){var d=void 0,g=void 0;f.isVersion4?(d=a.cache._arcadeCacheId,g=c.cache._arcadeCacheId):(d=a.getCacheValue("_arcadeCacheId"),g=c.getCacheValue("_arcadeCacheId"));if(void 0!==d&&null!==d)return d===g}return void 0!==a&&void 0!==c&&null!==a&&null!==c&&"object"===typeof a&&"object"===typeof c&&(a._arcadeCacheId===c._arcadeCacheId&&void 0!==a._arcadeCacheId&&null!==
  1038. a._arcadeCacheId||a._underlyingGraphic===c._underlyingGraphic&&void 0!==a._underlyingGraphic&&null!==a._underlyingGraphic)?!0:!1}function Y(b,a){if(d(b))return b;if(null===b)return"";if(y(b))return C(b,a);if(k(b))return b.toString();if(A(b))return B(b,a);if(b instanceof t)return JSON.stringify(b.toJSON());if(z(b)){a=[];for(var g=0;g<b.length;g++)a[g]=Z(b[g]);return"["+a.join(",")+"]"}if(b instanceof c){a=[];for(g=0;g<b.length();g++)a[g]=Z(b.get(g));return"["+a.join(",")+"]"}return null!==b&&"object"===
  1039. typeof b&&void 0!==b.castToText?b.castToText():q(b)?"object, Function":""}function aa(b,a){if(d(b))return b;if(null===b)return"";if(y(b))return C(b,a);if(k(b))return b.toString();if(A(b))return B(b,a);if(b instanceof t)return b instanceof g?'{"xmin":'+b.xmin.toString()+',"ymin":'+b.ymin.toString()+","+(b.hasZ?'"zmin":'+b.zmin.toString()+",":"")+(b.hasM?'"mmin":'+b.mmin.toString()+",":"")+'"xmax":'+b.xmax.toString()+',"ymax":'+b.ymax.toString()+","+(b.hasZ?'"zmax":'+b.zmax.toString()+",":"")+(b.hasM?
  1040. '"mmax":'+b.mmax.toString()+",":"")+'"spatialReference":'+I(b.spatialReference)+"}":I(b.toJSON(),function(b,a){return b.key===a.key?0:"spatialReference"===b.key?1:"spatialReference"===a.key||b.key<a.key?-1:b.key>a.key?1:0});if(z(b)){a=[];for(var e=0;e<b.length;e++)a[e]=Z(b[e]);return"["+a.join(",")+"]"}if(b instanceof c){a=[];for(e=0;e<b.length();e++)a[e]=Z(b.get(e));return"["+a.join(",")+"]"}return null!==b&&"object"===typeof b&&void 0!==b.castToText?b.castToText():q(b)?"object, Function":""}function Z(b){if(null!==
  1041. b){if(k(b)||y(b)||d(b))return JSON.stringify(b);if(b instanceof t||b instanceof c||b instanceof Array)return aa(b);if(b instanceof Date)return JSON.stringify(B(b,""));if(null!==b&&"object"===typeof b&&void 0!==b.castToText)return b.castToText()}return"null"}function H(b,a){return y(b)?b:null===b||""===b?0:A(b)?NaN:k(b)?b?1:0:z(b)||""===b||void 0===b?NaN:void 0!==a&&d(b)?(a=w(a,"\u2030",""),a=w(a,"\u00a4",""),p.parse(b,{pattern:a})):b===f.voidOperation?0:Number(b)}function W(b,a){var c;e.some(a.fields,
  1042. function(a){a.name===b&&(c=a.domain);return!!c});return c}function I(b,a){a||(a={});"function"===typeof a&&(a={cmp:a});var c="boolean"===typeof a.cycles?a.cycles:!1,d=a.cmp&&function(b){return function(a){return function(c,d){return b({key:c,value:a[c]},{key:d,value:a[d]})}}}(a.cmp),g=[];return function P(b){b&&b.toJSON&&"function"===typeof b.toJSON&&(b=b.toJSON());if(void 0!==b){if("number"===typeof b)return isFinite(b)?""+b:"null";if("object"!==typeof b)return JSON.stringify(b);var a,e;if(Array.isArray(b)){e=
  1043. "[";for(a=0;a<b.length;a++)a&&(e+=","),e+=P(b[a])||"null";return e+"]"}if(null===b)return"null";if(-1!==g.indexOf(b)){if(c)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON");}var k=g.push(b)-1,f=Object.keys(b).sort(d&&d(b));e="";for(a=0;a<f.length;a++){var h=f[a],q=P(b[h]);q&&(e&&(e+=","),e+=JSON.stringify(h)+":"+q)}g.splice(k,1);return"{"+e+"}"}}(b)}Object.defineProperty(f,"__esModule",{value:!0});a=function(){return function(b){this.value=b}}();var U=
  1044. function(){return function(b){this.value=b}}(),O=function(){return function(b){this.fn=b}}(),N=function(){return function(b){this.fn=b}}();f.NativeFunction=O;f.ImplicitResult=U;f.ReturnResult=a;f.SizzleFunction=N;f.isVersion4=0===n.version.indexOf("4.");f.voidOperation={type:"VOID"};f.breakResult={type:"BREAK"};f.continueResult={type:"CONTINUE"};f.multiReplace=w;f.isFunctionParameter=q;f.isSimpleType=function(b){return d(b)||y(b)||A(b)||k(b)||null===b||b===f.voidOperation||"number"===typeof b?!0:
  1045. !1};f.defaultUndefined=function(b,a){return void 0===b?a:b};f.isString=d;f.isBoolean=k;f.isNumber=y;f.isArray=z;f.isFeatureCursor=function(b){return b&&void 0!==b.isFeatureCursor};f.isImmutableArray=function(b){return b instanceof c};f.isDate=A;f.pcCheck=function(b,a,c){if(b.length<a||b.length>c)throw Error("Function called with wrong number of Parameters");};f.generateUUID=function(){var b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=(b+16*Math.random())%
  1046. 16|0;b=Math.floor(b/16);return("x"===a?c:c&3|8).toString(16)})};f.formatNumber=C;f.formatDate=B;f.standardiseDateFormat=D;f.greaterThanLessThan=function(b,a,c){if(null===b){if(null===a||a===f.voidOperation)return F(null,null,c);if(y(a))return F(0,a,c);if(d(a)||k(a))return F(0,H(a),c);if(A(a))return F(0,a.getTime(),c)}if(b===f.voidOperation){if(null===a||a===f.voidOperation)return F(null,null,c);if(y(a))return F(0,a,c);if(d(a)||k(a))return F(0,H(a),c);if(A(a))return F(0,a.getTime(),c)}else if(y(b)){if(y(a))return F(b,
  1047. a,c);if(k(a))return F(b,H(a),c);if(null===a||a===f.voidOperation)return F(b,0,c);if(d(a))return F(b,H(a),c);if(A(a))return F(b,a.getTime(),c)}else if(d(b)){if(d(a))return F(Y(b),Y(a),c);if(A(a))return F(H(b),a.getTime(),c);if(y(a))return F(H(b),a,c);if(null===a||a===f.voidOperation)return F(H(b),0,c);if(k(a))return F(H(b),H(a),c)}else if(A(b)){if(A(a))return F(b,a,c);if(null===a||a===f.voidOperation)return F(b.getTime(),0,c);if(y(a))return F(b.getTime(),a,c);if(k(a)||d(a))return F(b.getTime(),H(a),
  1048. c)}else if(k(b)){if(k(a))return F(b,a,c);if(y(a))return F(H(b),H(a),c);if(A(a))return F(H(b),a.getTime(),c);if(null===a||a===f.voidOperation)return F(H(b),0,c);if(d(a))return F(H(b),H(a),c)}return!G(b,a)||"\x3c\x3d"!==c&&"\x3e\x3d"!==c?!1:!0};f.equalityTest=G;f.toString=Y;f.toNumberArray=function(b){var a=[];if(!1===z(b))return null;if(b instanceof c){for(var d=0;d<b.length();d++)a[d]=H(b.get(d));return a}for(d=0;d<b.length;d++)a[d]=H(b[d]);return a};f.toStringExplicit=aa;f.toNumber=H;f.toDate=function(b,
  1049. a){return A(b)?b:d(b)&&(b=l(b,[void 0===a||null===a||""===a?l.ISO_8601:a]),b.isValid())?b.toDate():null};f.toDateM=function(b,a){return A(b)?l(b):d(b)&&(b=l(b,[void 0===a||null===a||""===a?l.ISO_8601:a]),b.isValid())?b:null};f.toBoolean=function(b){if(k(b))return b;if(d(b)){if(b=b.toLowerCase(),"true"===b)return!0}else if(y(b))return 0===b||isNaN(b)?!1:!0;return!1};f.fixSpatialReference=function(b,a){if(null===b||void 0===b)return null;if(null===b.spatialReference||void 0===b.spatialReference)b.spatialReference=
  1050. a;return b};f.fixNullGeometry=function(b){return null===b?null:b instanceof v?"NaN"===b.x||null===b.x||isNaN(b.x)?null:b:b instanceof x?0===b.rings.length?null:b:b instanceof r?0===b.paths.length?null:b:b instanceof u?0===b.points.length?null:b:b instanceof g?"NaN"===b.xmin||null===b.xmin||isNaN(b.xmin)?null:b:null};f.getDomainValue=function(b,a){if(!b||!b.domain)return null;var c=null;a="string"===b.field.type||"esriFieldTypeString"===b.field.type?Y(a):H(a);for(var d=0;d<b.domain.codedValues.length;d++){var g=
  1051. b.domain.codedValues[d];g.code===a&&(c=g)}return null===c?null:c.name};f.getDomainCode=function(b,a){if(!b||!b.domain)return null;var c=null;a=Y(a);for(var d=0;d<b.domain.codedValues.length;d++){var g=b.domain.codedValues[d];g.name===a&&(c=g)}return null===c?null:c.code};f.getDomain=function(b,a,c,d){void 0===c&&(c=null);if(!a||!a.fields)return null;for(var g=null,k=0;k<a.fields.length;k++){var f=a.fields[k];f.name.toLowerCase()===b.toString().toLowerCase()&&(g=f)}if(null===g)return null;var h,q;
  1052. d||(d=c&&a.typeIdField&&c._field(a.typeIdField));null!=d&&e.some(a.types,function(b){return b.id===d?((h=b.domains&&b.domains[g.name])&&"inherited"===h.type&&(h=W(g.name,a),q=!0),!0):!1});q||h||(h=W(b,a));return{field:g,domain:h}};f.stableStringify=I})},"esri/moment":function(){define(["require","exports","./plugins/moment!"],function(a,f,p){return p})},"esri/plugins/moment":function(){define(["require","exports","dojo/_base/kernel","moment/moment"],function(a,f,p,e){Object.defineProperty(f,"__esModule",
  1053. {value:!0});var n={ar:1,"ar-dz":1,"ar-kw":1,"ar-ly":1,"ar-ma":1,"ar-sa":1,"ar-tn":1,bs:1,cs:1,da:1,de:1,"de-at":1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,"en-ie":1,"en-nz":1,es:1,"es-do":1,"es-us":1,et:1,fi:1,fr:1,"fr-ca":1,"fr-ch":1,he:1,hi:1,hr:1,id:1,it:1,ja:1,ko:1,lt:1,lv:1,nb:1,nl:1,"nl-be":1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,sl:1,sr:1,"sr-cyrl":1,sv:1,th:1,tr:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1};f.load=function(a,f,c){a=p.locale;var h=a in n;if(!h){var b=a.split("-");1<b.length&&b[0]in n&&
  1054. (a=b[0],h=!0)}h?f(["moment/locale/"+a],function(){c(e)}):c(e)}})},"moment/moment":function(){(function(a,f){"object"===typeof exports&&"undefined"!==typeof module?module.exports=f():"function"===typeof define&&define.amd?define(f):a.moment=f()})(this,function(){function a(){return Vb.apply(null,arguments)}function f(b){return b instanceof Array||"[object Array]"===Object.prototype.toString.call(b)}function p(b){return null!=b&&"[object Object]"===Object.prototype.toString.call(b)}function e(b){if(Object.getOwnPropertyNames)return 0===
  1055. Object.getOwnPropertyNames(b).length;for(var a in b)if(b.hasOwnProperty(a))return!1;return!0}function n(b){return void 0===b}function l(b){return"number"===typeof b||"[object Number]"===Object.prototype.toString.call(b)}function h(b){return b instanceof Date||"[object Date]"===Object.prototype.toString.call(b)}function c(b,a){var c=[],d;for(d=0;d<b.length;++d)c.push(a(b[d],d));return c}function m(b,a){return Object.prototype.hasOwnProperty.call(b,a)}function b(b,a){for(var c in a)m(a,c)&&(b[c]=a[c]);
  1056. m(a,"toString")&&(b.toString=a.toString);m(a,"valueOf")&&(b.valueOf=a.valueOf);return b}function g(b,a,c,d){return db(b,a,c,d,!0).utc()}function t(b){null==b._pf&&(b._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1});return b._pf}function u(b){if(null==b._isValid){var a=t(b),c=Wb.call(a.parsedDateParts,function(b){return null!=b}),c=!isNaN(b._d.getTime())&&
  1057. 0>a.overflow&&!a.empty&&!a.invalidMonth&&!a.invalidWeekday&&!a.weekdayMismatch&&!a.nullInput&&!a.invalidFormat&&!a.userInvalidated&&(!a.meridiem||a.meridiem&&c);b._strict&&(c=c&&0===a.charsLeftOver&&0===a.unusedTokens.length&&void 0===a.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(b))return c;b._isValid=c}return b._isValid}function v(a){var c=g(NaN);null!=a?b(t(c),a):t(c).userInvalidated=!0;return c}function x(b,a){var c,d,g;n(a._isAMomentObject)||(b._isAMomentObject=a._isAMomentObject);n(a._i)||
  1058. (b._i=a._i);n(a._f)||(b._f=a._f);n(a._l)||(b._l=a._l);n(a._strict)||(b._strict=a._strict);n(a._tzm)||(b._tzm=a._tzm);n(a._isUTC)||(b._isUTC=a._isUTC);n(a._offset)||(b._offset=a._offset);n(a._pf)||(b._pf=t(a));n(a._locale)||(b._locale=a._locale);if(0<Hb.length)for(c=0;c<Hb.length;c++)d=Hb[c],g=a[d],n(g)||(b[d]=g);return b}function r(b){x(this,b);this._d=new Date(null!=b._d?b._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===Ib&&(Ib=!0,a.updateOffset(this),Ib=!1)}function w(b){return b instanceof
  1059. r||null!=b&&null!=b._isAMomentObject}function q(b){return 0>b?Math.ceil(b)||0:Math.floor(b)}function d(b){b=+b;var a=0;0!==b&&isFinite(b)&&(a=q(b));return a}function k(b,a,c){var g=Math.min(b.length,a.length),e=Math.abs(b.length-a.length),k=0,f;for(f=0;f<g;f++)(c&&b[f]!==a[f]||!c&&d(b[f])!==d(a[f]))&&k++;return k+e}function y(b){!1===a.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function z(c,d){var g=!0;return b(function(){null!=
  1060. a.deprecationHandler&&a.deprecationHandler(null,c);if(g){for(var b=[],e,k=0;k<arguments.length;k++){e="";if("object"===typeof arguments[k]){e+="\n["+k+"] ";for(var f in arguments[0])e+=f+": "+arguments[0][f]+", ";e=e.slice(0,-2)}else e=arguments[k];b.push(e)}y(c+"\nArguments: "+Array.prototype.slice.call(b).join("")+"\n"+Error().stack);g=!1}return d.apply(this,arguments)},d)}function A(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c);Xb[b]||(y(c),Xb[b]=!0)}function C(b){return b instanceof
  1061. Function||"[object Function]"===Object.prototype.toString.call(b)}function B(a,c){var d=b({},a),g;for(g in c)m(c,g)&&(p(a[g])&&p(c[g])?(d[g]={},b(d[g],a[g]),b(d[g],c[g])):null!=c[g]?d[g]=c[g]:delete d[g]);for(g in a)m(a,g)&&!m(c,g)&&p(a[g])&&(d[g]=b({},d[g]));return d}function D(b){null!=b&&this.set(b)}function F(b,a){var c=b.toLowerCase();ob[c]=ob[c+"s"]=ob[a]=b}function G(b){return"string"===typeof b?ob[b]||ob[b.toLowerCase()]:void 0}function Y(b){var a={},c,d;for(d in b)m(b,d)&&(c=G(d))&&(a[c]=
  1062. b[d]);return a}function aa(b){var a=[],c;for(c in b)a.push({unit:c,priority:Ea[c]});a.sort(function(b,a){return b.priority-a.priority});return a}function Z(b,a,c){var d=""+Math.abs(b);return(0<=b?c?"+":"":"-")+Math.pow(10,Math.max(0,a-d.length)).toString().substr(1)+d}function H(b,a,c,d){var g=d;"string"===typeof d&&(g=function(){return this[d]()});b&&(lb[b]=g);a&&(lb[a[0]]=function(){return Z(g.apply(this,arguments),a[1],a[2])});c&&(lb[c]=function(){return this.localeData().ordinal(g.apply(this,
  1063. arguments),b)})}function W(b){return b.match(/\[[\s\S]/)?b.replace(/^\[|\]$/g,""):b.replace(/\\/g,"")}function I(b){var a=b.match(Yb),c,d;c=0;for(d=a.length;c<d;c++)a[c]=lb[a[c]]?lb[a[c]]:W(a[c]);return function(c){var g="",e;for(e=0;e<d;e++)g+=C(a[e])?a[e].call(c,b):a[e];return g}}function U(b,a){if(!b.isValid())return b.localeData().invalidDate();a=O(a,b.localeData());Jb[a]=Jb[a]||I(a);return Jb[a](b)}function O(b,a){function c(b){return a.longDateFormat(b)||b}var d=5;for(xb.lastIndex=0;0<=d&&xb.test(b);)b=
  1064. b.replace(xb,c),xb.lastIndex=0,--d;return b}function N(b,a,c){Kb[b]=C(a)?a:function(b,d){return b&&c?c:a}}function J(b,a){return m(Kb,b)?Kb[b](a._strict,a._locale):new RegExp(L(b))}function L(b){return S(b.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(b,a,c,d,g){return a||c||d||g}))}function S(b){return b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$\x26")}function T(b,a){var c,g=a;"string"===typeof b&&(b=[b]);l(a)&&(g=function(b,c){c[a]=d(b)});for(c=0;c<b.length;c++)Lb[b[c]]=g}
  1065. function ha(b,a){T(b,function(b,c,d,g){d._w=d._w||{};a(b,d._w,d,g)})}function V(b){return 0===b%4&&0!==b%100||0===b%400}function P(b,c){return function(d){return null!=d?(da(this,b,d),a.updateOffset(this,c),this):ca(this,b)}}function ca(b,a){return b.isValid()?b._d["get"+(b._isUTC?"UTC":"")+a]():NaN}function da(b,a,c){if(b.isValid()&&!isNaN(c))if("FullYear"===a&&V(b.year())&&1===b.month()&&29===b.date())b._d["set"+(b._isUTC?"UTC":"")+a](c,b.month(),ka(c,b.month()));else b._d["set"+(b._isUTC?"UTC":
  1066. "")+a](c)}function ka(b,a){if(isNaN(b)||isNaN(a))return NaN;var c=(a%12+12)%12;return 1===c?V(b+(a-c)/12)?29:28:31-c%7%2}function ia(b,a){var c;if(!b.isValid())return b;if("string"===typeof a)if(/^\d+$/.test(a))a=d(a);else if(a=b.localeData().monthsParse(a),!l(a))return b;c=Math.min(b.date(),ka(b.year(),a));b._d["set"+(b._isUTC?"UTC":"")+"Month"](a,c);return b}function qa(b){return null!=b?(ia(this,b),a.updateOffset(this,!0),this):ca(this,"Month")}function pa(){function b(b,a){return a.length-b.length}
  1067. var a=[],c=[],d=[],e,k;for(e=0;12>e;e++)k=g([2E3,e]),a.push(this.monthsShort(k,"")),c.push(this.months(k,"")),d.push(this.months(k,"")),d.push(this.monthsShort(k,""));a.sort(b);c.sort(b);d.sort(b);for(e=0;12>e;e++)a[e]=S(a[e]),c[e]=S(c[e]);for(e=0;24>e;e++)d[e]=S(d[e]);this._monthsShortRegex=this._monthsRegex=new RegExp("^("+d.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+c.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function xa(b,a,c,d,g,e,k){a=
  1068. new Date(b,a,c,d,g,e,k);100>b&&0<=b&&isFinite(a.getFullYear())&&a.setFullYear(b);return a}function ta(b){var a=new Date(Date.UTC.apply(null,arguments));100>b&&0<=b&&isFinite(a.getUTCFullYear())&&a.setUTCFullYear(b);return a}function ya(b,a,c){c=7+a-c;return-((7+ta(b,0,c).getUTCDay()-a)%7)+c-1}function va(b,a,c,d,g){c=(7+c-d)%7;d=ya(b,d,g);d=1+7*(a-1)+c+d;0>=d?(a=b-1,b=(V(a)?366:365)+d):d>(V(b)?366:365)?(a=b+1,b=d-(V(b)?366:365)):(a=b,b=d);return{year:a,dayOfYear:b}}function Ga(b,a,c){var d=ya(b.year(),
  1069. a,c),d=Math.floor((b.dayOfYear()-d-1)/7)+1;1>d?(b=b.year()-1,a=d+Ba(b,a,c)):d>Ba(b.year(),a,c)?(a=d-Ba(b.year(),a,c),b=b.year()+1):(b=b.year(),a=d);return{week:a,year:b}}function Ba(b,a,c){var d=ya(b,a,c);a=ya(b+1,a,c);return((V(b)?366:365)-d+a)/7}function La(b,a,c){var d,e;b=b.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)e=g([2E3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(e,"").toLocaleLowerCase(),
  1070. this._shortWeekdaysParse[d]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(e,"").toLocaleLowerCase();if(c)a="dddd"===a?Aa.call(this._weekdaysParse,b):"ddd"===a?Aa.call(this._shortWeekdaysParse,b):Aa.call(this._minWeekdaysParse,b);else if("dddd"===a){a=Aa.call(this._weekdaysParse,b);if(-1!==a)return a;a=Aa.call(this._shortWeekdaysParse,b);if(-1!==a)return a;a=Aa.call(this._minWeekdaysParse,b)}else if("ddd"===a){a=Aa.call(this._shortWeekdaysParse,b);if(-1!==a)return a;
  1071. a=Aa.call(this._weekdaysParse,b);if(-1!==a)return a;a=Aa.call(this._minWeekdaysParse,b)}else{a=Aa.call(this._minWeekdaysParse,b);if(-1!==a)return a;a=Aa.call(this._weekdaysParse,b);if(-1!==a)return a;a=Aa.call(this._shortWeekdaysParse,b)}return-1!==a?a:null}function fa(){function b(b,a){return a.length-b.length}var a=[],c=[],d=[],e=[],k,f,h,q;for(k=0;7>k;k++)f=g([2E3,1]).day(k),h=this.weekdaysMin(f,""),q=this.weekdaysShort(f,""),f=this.weekdays(f,""),a.push(h),c.push(q),d.push(f),e.push(h),e.push(q),
  1072. e.push(f);a.sort(b);c.sort(b);d.sort(b);e.sort(b);for(k=0;7>k;k++)c[k]=S(c[k]),d[k]=S(d[k]),e[k]=S(e[k]);this._weekdaysMinRegex=this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+e.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function wa(){return this.hours()%12||12}function za(b,a){H(b,0,0,function(){return this.localeData().meridiem(this.hours(),
  1073. this.minutes(),a)})}function hb(b,a){return a._meridiemParse}function Va(b){return b?b.toLowerCase().replace("_","-"):b}function Ma(b){var a=null;if(!Ca[b]&&"undefined"!==typeof module&&module&&module.exports)try{a=yb._abbr,require("./locale/"+b),Ka(a)}catch(Wc){}return Ca[b]}function Ka(b,a){b&&(b=n(a)?Fa(b):Ia(b,a))&&(yb=b);return yb._abbr}function Ia(b,a){if(null!==a){var c=Zb;a.abbr=b;if(null!=Ca[b])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),
  1074. c=Ca[b]._config;else if(null!=a.parentLocale)if(null!=Ca[a.parentLocale])c=Ca[a.parentLocale]._config;else return pb[a.parentLocale]||(pb[a.parentLocale]=[]),pb[a.parentLocale].push({name:b,config:a}),null;Ca[b]=new D(B(c,a));pb[b]&&pb[b].forEach(function(b){Ia(b.name,b.config)});Ka(b);return Ca[b]}delete Ca[b];return null}function Fa(b){var a;b&&b._locale&&b._locale._abbr&&(b=b._locale._abbr);if(!b)return yb;if(!f(b)){if(a=Ma(b))return a;b=[b]}a:{a=0;for(var c,d,g,e;a<b.length;){e=Va(b[a]).split("-");
  1075. c=e.length;for(d=(d=Va(b[a+1]))?d.split("-"):null;0<c;){if(g=Ma(e.slice(0,c).join("-"))){b=g;break a}if(d&&d.length>=c&&k(e,d,!0)>=c-1)break;c--}a++}b=null}return b}function Ya(b){var a;(a=b._a)&&-2===t(b).overflow&&(a=0>a[$a]||11<a[$a]?$a:1>a[Wa]||a[Wa]>ka(a[Ta],a[$a])?Wa:0>a[Da]||24<a[Da]||24===a[Da]&&(0!==a[Ua]||0!==a[ab]||0!==a[ib])?Da:0>a[Ua]||59<a[Ua]?Ua:0>a[ab]||59<a[ab]?ab:0>a[ib]||999<a[ib]?ib:-1,t(b)._overflowDayOfYear&&(a<Ta||a>Wa)&&(a=Wa),t(b)._overflowWeeks&&-1===a&&(a=mc),t(b)._overflowWeekday&&
  1076. -1===a&&(a=nc),t(b).overflow=a);return b}function Ja(b,a,c){return null!=b?b:null!=a?a:c}function Ra(b){var c,d=[],g;if(!b._d){g=new Date(a.now());g=b._useUTC?[g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()]:[g.getFullYear(),g.getMonth(),g.getDate()];if(b._w&&null==b._a[Wa]&&null==b._a[$a]){var e,k,f,h,q,m;e=b._w;if(null!=e.GG||null!=e.W||null!=e.E){if(q=1,m=4,k=Ja(e.GG,b._a[Ta],Ga(K(),1,4).year),f=Ja(e.W,1),h=Ja(e.E,1),1>h||7<h)c=!0}else if(q=b._locale._week.dow,m=b._locale._week.doy,f=Ga(K(),
  1077. q,m),k=Ja(e.gg,b._a[Ta],f.year),f=Ja(e.w,f.week),null!=e.d){if(h=e.d,0>h||6<h)c=!0}else if(null!=e.e){if(h=e.e+q,0>e.e||6<e.e)c=!0}else h=q;1>f||f>Ba(k,q,m)?t(b)._overflowWeeks=!0:null!=c?t(b)._overflowWeekday=!0:(c=va(k,f,h,q,m),b._a[Ta]=c.year,b._dayOfYear=c.dayOfYear)}if(null!=b._dayOfYear){c=Ja(b._a[Ta],g[Ta]);if(b._dayOfYear>(V(c)?366:365)||0===b._dayOfYear)t(b)._overflowDayOfYear=!0;c=ta(c,0,b._dayOfYear);b._a[$a]=c.getUTCMonth();b._a[Wa]=c.getUTCDate()}for(c=0;3>c&&null==b._a[c];++c)b._a[c]=
  1078. d[c]=g[c];for(;7>c;c++)b._a[c]=d[c]=null==b._a[c]?2===c?1:0:b._a[c];24===b._a[Da]&&0===b._a[Ua]&&0===b._a[ab]&&0===b._a[ib]&&(b._nextDay=!0,b._a[Da]=0);b._d=(b._useUTC?ta:xa).apply(null,d);d=b._useUTC?b._d.getUTCDay():b._d.getDay();null!=b._tzm&&b._d.setUTCMinutes(b._d.getUTCMinutes()-b._tzm);b._nextDay&&(b._a[Da]=24);b._w&&"undefined"!==typeof b._w.d&&b._w.d!==d&&(t(b).weekdayMismatch=!0)}}function Q(b){var a,c;a=b._i;var d=oc.exec(a)||pc.exec(a),g,e,k,f;if(d){t(b).iso=!0;a=0;for(c=zb.length;a<c;a++)if(zb[a][1].exec(d[1])){e=
  1079. zb[a][0];g=!1!==zb[a][2];break}if(null==e)b._isValid=!1;else{if(d[3]){a=0;for(c=Mb.length;a<c;a++)if(Mb[a][1].exec(d[3])){k=(d[2]||" ")+Mb[a][0];break}if(null==k){b._isValid=!1;return}}if(g||null==k){if(d[4])if(qc.exec(d[4]))f="Z";else{b._isValid=!1;return}b._f=e+(k||"")+(f||"");ga(b)}else b._isValid=!1}}else b._isValid=!1}function Ha(b){var a=rc.exec(b._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(a){var c=a[3],d=a[2],g=a[5],e=a[6],k=a[7],f=parseInt(a[4],10),c=[49>=f?2E3+
  1080. f:999>=f?1900+f:f,$b.indexOf(c),parseInt(d,10),parseInt(g,10),parseInt(e,10)];k&&c.push(parseInt(k,10));a:{if(k=a[1])if(k=ac.indexOf(k),d=(new Date(c[0],c[1],c[2])).getDay(),k!==d){t(b).weekdayMismatch=!0;k=b._isValid=!1;break a}k=!0}k&&(b._a=c,(k=a[8])?a=sc[k]:a[9]?a=0:(a=parseInt(a[10],10),k=a%100,a=(a-k)/100*60+k),b._tzm=a,b._d=ta.apply(null,b._a),b._d.setUTCMinutes(b._d.getUTCMinutes()-b._tzm),t(b).rfc2822=!0)}else b._isValid=!1}function ua(b){var c=tc.exec(b._i);null!==c?b._d=new Date(+c[1]):
  1081. (Q(b),!1===b._isValid&&(delete b._isValid,Ha(b),!1===b._isValid&&(delete b._isValid,a.createFromInputFallback(b))))}function ga(b){if(b._f===a.ISO_8601)Q(b);else if(b._f===a.RFC_2822)Ha(b);else{b._a=[];t(b).empty=!0;var c=""+b._i,d,g,e,k,f,h=c.length,q=0;e=O(b._f,b._locale).match(Yb)||[];for(d=0;d<e.length;d++){k=e[d];if(g=(c.match(J(k,b))||[])[0])f=c.substr(0,c.indexOf(g)),0<f.length&&t(b).unusedInput.push(f),c=c.slice(c.indexOf(g)+g.length),q+=g.length;if(lb[k]){if(g?t(b).empty=!1:t(b).unusedTokens.push(k),
  1082. f=b,null!=g&&m(Lb,k))Lb[k](g,f._a,f,k)}else b._strict&&!g&&t(b).unusedTokens.push(k)}t(b).charsLeftOver=h-q;0<c.length&&t(b).unusedInput.push(c);12>=b._a[Da]&&!0===t(b).bigHour&&0<b._a[Da]&&(t(b).bigHour=void 0);t(b).parsedDateParts=b._a.slice(0);t(b).meridiem=b._meridiem;c=b._a;d=Da;h=b._locale;e=b._a[Da];q=b._meridiem;null!=q&&(null!=h.meridiemHour?e=h.meridiemHour(e,q):null!=h.isPM&&((h=h.isPM(q))&&12>e&&(e+=12),h||12!==e||(e=0)));c[d]=e;Ra(b);Ya(b)}}function Qa(b){if(!b._d){var a=Y(b._i);b._a=
  1083. c([a.year,a.month,a.day||a.date,a.hour,a.minute,a.second,a.millisecond],function(b){return b&&parseInt(b,10)});Ra(b)}}function Na(a){var c=a._i,d=a._f;a._locale=a._locale||Fa(a._l);if(null===c||void 0===d&&""===c)return v({nullInput:!0});"string"===typeof c&&(a._i=c=a._locale.preparse(c));if(w(c))return new r(Ya(c));if(h(c))a._d=c;else if(f(d)){var g,e,k;if(0===a._f.length)t(a).invalidFormat=!0,a._d=new Date(NaN);else{for(c=0;c<a._f.length;c++)if(d=0,g=x({},a),null!=a._useUTC&&(g._useUTC=a._useUTC),
  1084. g._f=a._f[c],ga(g),u(g)&&(d+=t(g).charsLeftOver,d+=10*t(g).unusedTokens.length,t(g).score=d,null==k||d<k))k=d,e=g;b(a,e||g)}}else d?ga(a):la(a);u(a)||(a._d=null);return a}function la(b){var d=b._i;n(d)?b._d=new Date(a.now()):h(d)?b._d=new Date(d.valueOf()):"string"===typeof d?ua(b):f(d)?(b._a=c(d.slice(0),function(b){return parseInt(b,10)}),Ra(b)):p(d)?Qa(b):l(d)?b._d=new Date(d):a.createFromInputFallback(b)}function db(b,a,c,d,g){var k={};if(!0===c||!1===c)d=c,c=void 0;if(p(b)&&e(b)||f(b)&&0===b.length)b=
  1085. void 0;k._isAMomentObject=!0;k._useUTC=k._isUTC=g;k._l=c;k._i=b;k._f=a;k._strict=d;b=new r(Ya(Na(k)));b._nextDay&&(b.add(1,"d"),b._nextDay=void 0);return b}function K(b,a,c,d){return db(b,a,c,d,!1)}function ma(b,a){var c,d;1===a.length&&f(a[0])&&(a=a[0]);if(!a.length)return K();c=a[0];for(d=1;d<a.length;++d)if(!a[d].isValid()||a[d][b](c))c=a[d];return c}function E(b){for(var a in b)if(-1===Aa.call(qb,a)||null!=b[a]&&isNaN(b[a]))return!1;a=!1;for(var c=0;c<qb.length;++c)if(b[qb[c]]){if(a)return!1;
  1086. parseFloat(b[qb[c]])!==d(b[qb[c]])&&(a=!0)}return!0}function ea(b){b=Y(b);var a=b.year||0,c=b.quarter||0,d=b.month||0,g=b.week||0,e=b.day||0,k=b.hour||0,f=b.minute||0,h=b.second||0,q=b.millisecond||0;this._isValid=E(b);this._milliseconds=+q+1E3*h+6E4*f+36E5*k;this._days=+e+7*g;this._months=+d+3*c+12*a;this._data={};this._locale=Fa();this._bubble()}function ja(b){return b instanceof ea}function na(b){return 0>b?-1*Math.round(-1*b):Math.round(b)}function X(b,a){H(b,0,0,function(){var b=this.utcOffset(),
  1087. c="+";0>b&&(b=-b,c="-");return c+Z(~~(b/60),2)+a+Z(~~b%60,2)})}function ba(b,a){b=(a||"").match(b);if(null===b)return null;b=((b[b.length-1]||[])+"").match(uc)||["-",0,0];a=+(60*b[1])+d(b[2]);return 0===a?0:"+"===b[0]?a:-a}function M(b,c){return c._isUTC?(c=c.clone(),b=(w(b)||h(b)?b.valueOf():K(b).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+b),a.updateOffset(c,!1),c):K(b).local()}function nb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Oa(b,a){var c=b,g=null;ja(b)?c={ms:b._milliseconds,
  1088. d:b._days,M:b._months}:l(b)?(c={},a?c[a]=b:c.milliseconds=b):(g=vc.exec(b))?(c="-"===g[1]?-1:1,c={y:0,d:d(g[Wa])*c,h:d(g[Da])*c,m:d(g[Ua])*c,s:d(g[ab])*c,ms:d(na(1E3*g[ib]))*c}):(g=wc.exec(b))?(c="-"===g[1]?-1:1,c={y:Za(g[2],c),M:Za(g[3],c),w:Za(g[4],c),d:Za(g[5],c),h:Za(g[6],c),m:Za(g[7],c),s:Za(g[8],c)}):null==c?c={}:"object"===typeof c&&("from"in c||"to"in c)&&(g=K(c.from),c=K(c.to),g.isValid()&&c.isValid()?(c=M(c,g),g.isBefore(c)?c=vb(g,c):(c=vb(c,g),c.milliseconds=-c.milliseconds,c.months=-c.months),
  1089. g=c):g={milliseconds:0,months:0},c={},c.ms=g.milliseconds,c.M=g.months);c=new ea(c);ja(b)&&m(b,"_locale")&&(c._locale=b._locale);return c}function Za(b,a){b=b&&parseFloat(b.replace(",","."));return(isNaN(b)?0:b)*a}function vb(b,a){var c={milliseconds:0,months:0};c.months=a.month()-b.month()+12*(a.year()-b.year());b.clone().add(c.months,"M").isAfter(a)&&--c.months;c.milliseconds=+a-+b.clone().add(c.months,"M");return c}function Sa(b,a){return function(c,d){var g;null===d||isNaN(+d)||(A(a,"moment()."+
  1090. a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),g=c,c=d,d=g);c=Oa("string"===typeof c?+c:c,d);wb(this,c,b);return this}}function wb(b,c,d,g){var e=c._milliseconds,k=na(c._days);c=na(c._months);b.isValid()&&(g=null==g?!0:g,c&&ia(b,ca(b,"Month")+c*d),k&&da(b,"Date",ca(b,"Date")+k*d),e&&b._d.setTime(b._d.valueOf()+e*d),g&&a.updateOffset(b,k||c))}function sb(b,a){var c=12*(a.year()-b.year())+(a.month()-
  1091. b.month()),d=b.clone().add(c,"months");0>a-d?(b=b.clone().add(c-1,"months"),a=(a-d)/(d-b)):(b=b.clone().add(c+1,"months"),a=(a-d)/(b-d));return-(c+a)||0}function tb(b){if(void 0===b)return this._locale._abbr;b=Fa(b);null!=b&&(this._locale=b);return this}function mb(){return this._locale}function jb(b,a){H(0,[b,b.length],0,a)}function Qb(b,a,c,d,g){var e;if(null==b)return Ga(this,d,g).year;e=Ba(b,d,g);a>e&&(a=e);b=va(b,a,c,d,g);b=ta(b.year,0,b.dayOfYear);this.year(b.getUTCFullYear());this.month(b.getUTCMonth());
  1092. this.date(b.getUTCDate());return this}function kc(b,a){a[ib]=d(1E3*("0."+b))}function Rb(b){return b}function ub(b,a,c,d){var e=Fa();a=g().set(d,a);return e[c](a,b)}function Sb(b,a,c){l(b)&&(a=b,b=void 0);b=b||"";if(null!=a)return ub(b,a,c,"month");var d=[];for(a=0;12>a;a++)d[a]=ub(b,a,c,"month");return d}function Gb(b,a,c,d){"boolean"!==typeof b&&(c=a=b,b=!1);l(a)&&(c=a,a=void 0);a=a||"";var g=Fa();b=b?g._week.dow:0;if(null!=c)return ub(a,(c+b)%7,d,"day");g=[];for(c=0;7>c;c++)g[c]=ub(a,(c+b)%7,d,
  1093. "day");return g}function Tb(b,a,c,d){a=Oa(a,c);b._milliseconds+=d*a._milliseconds;b._days+=d*a._days;b._months+=d*a._months;return b._bubble()}function Ub(b){return 0>b?Math.floor(b):Math.ceil(b)}function cb(b){return function(){return this.as(b)}}function gb(b){return function(){return this.isValid()?this._data[b]:NaN}}function lc(b,a,c,d,g){return g.relativeTime(a||1,!!c,b,d)}function kb(b){return(0<b)-(0>b)||+b}function Ab(){if(!this.isValid())return this.localeData().invalidDate();var b=Nb(this._milliseconds)/
  1094. 1E3,a=Nb(this._days),c=Nb(this._months),d,g;d=q(b/60);g=q(d/60);b%=60;d%=60;var e=q(c/12),c=c%12,b=b?b.toFixed(3).replace(/\.?0+$/,""):"",k=this.asSeconds();if(!k)return"P0D";var f=0>k?"-":"",h=kb(this._months)!==kb(k)?"-":"",m=kb(this._days)!==kb(k)?"-":"",k=kb(this._milliseconds)!==kb(k)?"-":"";return f+"P"+(e?h+e+"Y":"")+(c?h+c+"M":"")+(a?m+a+"D":"")+(g||d||b?"T":"")+(g?k+g+"H":"")+(d?k+d+"M":"")+(b?k+b+"S":"")}var Vb,Wb;Wb=Array.prototype.some?Array.prototype.some:function(b){for(var a=Object(this),
  1095. c=a.length>>>0,d=0;d<c;d++)if(d in a&&b.call(this,a[d],d,a))return!0;return!1};var Hb=a.momentProperties=[],Ib=!1,Xb={};a.suppressDeprecationWarnings=!1;a.deprecationHandler=null;var bc;bc=Object.keys?Object.keys:function(b){var a,c=[];for(a in b)m(b,a)&&c.push(a);return c};var ob={},Ea={},Yb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,xb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  1096. Jb={},lb={},cc=/\d/,Pa=/\d\d/,dc=/\d{3}/,Ob=/\d{4}/,Bb=/[+-]?\d{6}/,sa=/\d\d?/,ec=/\d\d\d\d?/,fc=/\d\d\d\d\d\d?/,Cb=/\d{1,3}/,Pb=/\d{1,4}/,Db=/[+-]?\d{1,6}/,xc=/\d+/,Eb=/[+-]?\d+/,yc=/Z|[+-]\d\d:?\d\d/gi,Fb=/Z|[+-]\d\d(?::?\d\d)?/gi,rb=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Kb={},Lb={},Ta=0,$a=1,Wa=2,Da=3,Ua=4,ab=5,ib=6,mc=7,nc=8;H("Y",0,0,function(){var b=this.year();return 9999>=b?""+
  1097. b:"+"+b});H(0,["YY",2],0,function(){return this.year()%100});H(0,["YYYY",4],0,"year");H(0,["YYYYY",5],0,"year");H(0,["YYYYYY",6,!0],0,"year");F("year","y");Ea.year=1;N("Y",Eb);N("YY",sa,Pa);N("YYYY",Pb,Ob);N("YYYYY",Db,Bb);N("YYYYYY",Db,Bb);T(["YYYYY","YYYYYY"],Ta);T("YYYY",function(b,c){c[Ta]=2===b.length?a.parseTwoDigitYear(b):d(b)});T("YY",function(b,c){c[Ta]=a.parseTwoDigitYear(b)});T("Y",function(b,a){a[Ta]=parseInt(b,10)});a.parseTwoDigitYear=function(b){return d(b)+(68<d(b)?1900:2E3)};var gc=
  1098. P("FullYear",!0),Aa;Aa=Array.prototype.indexOf?Array.prototype.indexOf:function(b){var a;for(a=0;a<this.length;++a)if(this[a]===b)return a;return-1};H("M",["MM",2],"Mo",function(){return this.month()+1});H("MMM",0,0,function(b){return this.localeData().monthsShort(this,b)});H("MMMM",0,0,function(b){return this.localeData().months(this,b)});F("month","M");Ea.month=8;N("M",sa);N("MM",sa,Pa);N("MMM",function(b,a){return a.monthsShortRegex(b)});N("MMMM",function(b,a){return a.monthsRegex(b)});T(["M",
  1099. "MM"],function(b,a){a[$a]=d(b)-1});T(["MMM","MMMM"],function(b,a,c,d){d=c._locale.monthsParse(b,d,c._strict);null!=d?a[$a]=d:t(c).invalidMonth=b});var hc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$b="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");H("w",["ww",2],"wo","week");H("W",["WW",2],"Wo","isoWeek");F("week","w");F("isoWeek","W");Ea.week=5;Ea.isoWeek=5;N("w",sa);N("ww",sa,Pa);N("W",sa);N("WW",sa,Pa);ha(["w","ww","W","WW"],function(b,a,c,g){a[g.substr(0,1)]=d(b)});H("d",0,"do","day");H("dd",
  1100. 0,0,function(b){return this.localeData().weekdaysMin(this,b)});H("ddd",0,0,function(b){return this.localeData().weekdaysShort(this,b)});H("dddd",0,0,function(b){return this.localeData().weekdays(this,b)});H("e",0,0,"weekday");H("E",0,0,"isoWeekday");F("day","d");F("weekday","e");F("isoWeekday","E");Ea.day=11;Ea.weekday=11;Ea.isoWeekday=11;N("d",sa);N("e",sa);N("E",sa);N("dd",function(b,a){return a.weekdaysMinRegex(b)});N("ddd",function(b,a){return a.weekdaysShortRegex(b)});N("dddd",function(b,a){return a.weekdaysRegex(b)});
  1101. ha(["dd","ddd","dddd"],function(b,a,c,d){d=c._locale.weekdaysParse(b,d,c._strict);null!=d?a.d=d:t(c).invalidWeekday=b});ha(["d","e","E"],function(b,a,c,g){a[g]=d(b)});var ac="Sun Mon Tue Wed Thu Fri Sat".split(" ");H("H",["HH",2],0,"hour");H("h",["hh",2],0,wa);H("k",["kk",2],0,function(){return this.hours()||24});H("hmm",0,0,function(){return""+wa.apply(this)+Z(this.minutes(),2)});H("hmmss",0,0,function(){return""+wa.apply(this)+Z(this.minutes(),2)+Z(this.seconds(),2)});H("Hmm",0,0,function(){return""+
  1102. this.hours()+Z(this.minutes(),2)});H("Hmmss",0,0,function(){return""+this.hours()+Z(this.minutes(),2)+Z(this.seconds(),2)});za("a",!0);za("A",!1);F("hour","h");Ea.hour=13;N("a",hb);N("A",hb);N("H",sa);N("h",sa);N("k",sa);N("HH",sa,Pa);N("hh",sa,Pa);N("kk",sa,Pa);N("hmm",ec);N("hmmss",fc);N("Hmm",ec);N("Hmmss",fc);T(["H","HH"],Da);T(["k","kk"],function(b,a,c){b=d(b);a[Da]=24===b?0:b});T(["a","A"],function(b,a,c){c._isPm=c._locale.isPM(b);c._meridiem=b});T(["h","hh"],function(b,a,c){a[Da]=d(b);t(c).bigHour=
  1103. !0});T("hmm",function(b,a,c){var g=b.length-2;a[Da]=d(b.substr(0,g));a[Ua]=d(b.substr(g));t(c).bigHour=!0});T("hmmss",function(b,a,c){var g=b.length-4,e=b.length-2;a[Da]=d(b.substr(0,g));a[Ua]=d(b.substr(g,2));a[ab]=d(b.substr(e));t(c).bigHour=!0});T("Hmm",function(b,a,c){c=b.length-2;a[Da]=d(b.substr(0,c));a[Ua]=d(b.substr(c))});T("Hmmss",function(b,a,c){c=b.length-4;var g=b.length-2;a[Da]=d(b.substr(0,c));a[Ua]=d(b.substr(c,2));a[ab]=d(b.substr(g))});var zc=P("Hours",!0),Zb={calendar:{sameDay:"[Today at] LT",
  1104. nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",
  1105. MM:"%d months",y:"a year",yy:"%d years"},months:"January February March April May June July August September October November December".split(" "),monthsShort:$b,week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:ac,meridiemParse:/[ap]\.?m?\.?/i},Ca={},pb={},yb,oc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
  1106. pc=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qc=/Z|[+-]\d\d(?::?\d\d)?/,zb=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Mb=
  1107. [["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],tc=/^\/?Date\((\-?\d+)/i,rc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sc={UT:0,GMT:0,EDT:-240,
  1108. EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};a.createFromInputFallback=z("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(b){b._d=new Date(b._i+(b._useUTC?" UTC":""))});a.ISO_8601=function(){};
  1109. a.RFC_2822=function(){};var Ac=z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var b=K.apply(null,arguments);return this.isValid()&&b.isValid()?b<this?this:b:v()}),Bc=z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var b=K.apply(null,arguments);return this.isValid()&&b.isValid()?b>this?this:b:v()}),qb="year quarter month week day hour minute second millisecond".split(" ");
  1110. X("Z",":");X("ZZ","");N("Z",Fb);N("ZZ",Fb);T(["Z","ZZ"],function(b,a,c){c._useUTC=!0;c._tzm=ba(Fb,b)});var uc=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var vc=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,wc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Oa.fn=ea.prototype;Oa.invalid=function(){return Oa(NaN)};var Cc=Sa(1,"add"),Dc=Sa(-1,"subtract");a.defaultFormat=
  1111. "YYYY-MM-DDTHH:mm:ssZ";a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ic=z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return void 0===b?this.localeData():this.locale(b)});H(0,["gg",2],0,function(){return this.weekYear()%100});H(0,["GG",2],0,function(){return this.isoWeekYear()%100});jb("gggg","weekYear");jb("ggggg","weekYear");jb("GGGG","isoWeekYear");jb("GGGGG","isoWeekYear");F("weekYear",
  1112. "gg");F("isoWeekYear","GG");Ea.weekYear=1;Ea.isoWeekYear=1;N("G",Eb);N("g",Eb);N("GG",sa,Pa);N("gg",sa,Pa);N("GGGG",Pb,Ob);N("gggg",Pb,Ob);N("GGGGG",Db,Bb);N("ggggg",Db,Bb);ha(["gggg","ggggg","GGGG","GGGGG"],function(b,a,c,g){a[g.substr(0,2)]=d(b)});ha(["gg","GG"],function(b,c,d,g){c[g]=a.parseTwoDigitYear(b)});H("Q",0,"Qo","quarter");F("quarter","Q");Ea.quarter=7;N("Q",cc);T("Q",function(b,a){a[$a]=3*(d(b)-1)});H("D",["DD",2],"Do","date");F("date","D");Ea.date=9;N("D",sa);N("DD",sa,Pa);N("Do",function(b,
  1113. a){return b?a._dayOfMonthOrdinalParse||a._ordinalParse:a._dayOfMonthOrdinalParseLenient});T(["D","DD"],Wa);T("Do",function(b,a){a[Wa]=d(b.match(sa)[0])});var jc=P("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear");F("dayOfYear","DDD");Ea.dayOfYear=4;N("DDD",Cb);N("DDDD",dc);T(["DDD","DDDD"],function(b,a,c){c._dayOfYear=d(b)});H("m",["mm",2],0,"minute");F("minute","m");Ea.minute=14;N("m",sa);N("mm",sa,Pa);T(["m","mm"],Ua);var Ec=P("Minutes",!1);H("s",["ss",2],0,"second");F("second","s");Ea.second=15;
  1114. N("s",sa);N("ss",sa,Pa);T(["s","ss"],ab);var Fc=P("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)});H(0,["SS",2],0,function(){return~~(this.millisecond()/10)});H(0,["SSS",3],0,"millisecond");H(0,["SSSS",4],0,function(){return 10*this.millisecond()});H(0,["SSSSS",5],0,function(){return 100*this.millisecond()});H(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});H(0,["SSSSSSS",7],0,function(){return 1E4*this.millisecond()});H(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});
  1115. H(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});F("millisecond","ms");Ea.millisecond=16;N("S",Cb,cc);N("SS",Cb,Pa);N("SSS",Cb,dc);var eb;for(eb="SSSS";9>=eb.length;eb+="S")N(eb,xc);for(eb="S";9>=eb.length;eb+="S")T(eb,kc);var Gc=P("Milliseconds",!1);H("z",0,0,"zoneAbbr");H("zz",0,0,"zoneName");var R=r.prototype;R.add=Cc;R.calendar=function(b,c){b=b||K();var d=M(b,this).startOf("day"),d=a.calendarFormat(this,d)||"sameElse";c=c&&(C(c[d])?c[d].call(this,b):c[d]);return this.format(c||
  1116. this.localeData().calendar(d,this,K(b)))};R.clone=function(){return new r(this)};R.diff=function(b,a,c){var d;if(!this.isValid())return NaN;b=M(b,this);if(!b.isValid())return NaN;d=6E4*(b.utcOffset()-this.utcOffset());a=G(a);switch(a){case "year":a=sb(this,b)/12;break;case "month":a=sb(this,b);break;case "quarter":a=sb(this,b)/3;break;case "second":a=(this-b)/1E3;break;case "minute":a=(this-b)/6E4;break;case "hour":a=(this-b)/36E5;break;case "day":a=(this-b-d)/864E5;break;case "week":a=(this-b-d)/
  1117. 6048E5;break;default:a=this-b}return c?a:q(a)};R.endOf=function(b){b=G(b);if(void 0===b||"millisecond"===b)return this;"date"===b&&(b="day");return this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")};R.format=function(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);b=U(this,b);return this.localeData().postformat(b)};R.from=function(b,a){return this.isValid()&&(w(b)&&b.isValid()||K(b).isValid())?Oa({to:this,from:b}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()};
  1118. R.fromNow=function(b){return this.from(K(),b)};R.to=function(b,a){return this.isValid()&&(w(b)&&b.isValid()||K(b).isValid())?Oa({from:this,to:b}).locale(this.locale()).humanize(!a):this.localeData().invalidDate()};R.toNow=function(b){return this.to(K(),b)};R.get=function(b){b=G(b);return C(this[b])?this[b]():this};R.invalidAt=function(){return t(this).overflow};R.isAfter=function(b,a){b=w(b)?b:K(b);if(!this.isValid()||!b.isValid())return!1;a=G(n(a)?"millisecond":a);return"millisecond"===a?this.valueOf()>
  1119. b.valueOf():b.valueOf()<this.clone().startOf(a).valueOf()};R.isBefore=function(b,a){b=w(b)?b:K(b);if(!this.isValid()||!b.isValid())return!1;a=G(n(a)?"millisecond":a);return"millisecond"===a?this.valueOf()<b.valueOf():this.clone().endOf(a).valueOf()<b.valueOf()};R.isBetween=function(b,a,c,d){d=d||"()";return("("===d[0]?this.isAfter(b,c):!this.isBefore(b,c))&&(")"===d[1]?this.isBefore(a,c):!this.isAfter(a,c))};R.isSame=function(b,a){b=w(b)?b:K(b);if(!this.isValid()||!b.isValid())return!1;a=G(a||"millisecond");
  1120. if("millisecond"===a)return this.valueOf()===b.valueOf();b=b.valueOf();return this.clone().startOf(a).valueOf()<=b&&b<=this.clone().endOf(a).valueOf()};R.isSameOrAfter=function(b,a){return this.isSame(b,a)||this.isAfter(b,a)};R.isSameOrBefore=function(b,a){return this.isSame(b,a)||this.isBefore(b,a)};R.isValid=function(){return u(this)};R.lang=ic;R.locale=tb;R.localeData=mb;R.max=Bc;R.min=Ac;R.parsingFlags=function(){return b({},t(this))};R.set=function(b,a){if("object"===typeof b){b=Y(b);a=aa(b);
  1121. for(var c=0;c<a.length;c++)this[a[c].unit](b[a[c].unit])}else if(b=G(b),C(this[b]))return this[b](a);return this};R.startOf=function(b){b=G(b);switch(b){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":case "date":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===b&&this.weekday(0);"isoWeek"===b&&this.isoWeekday(1);"quarter"===b&&this.month(3*Math.floor(this.month()/3));return this};
  1122. R.subtract=Dc;R.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};R.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};R.toDate=function(){return new Date(this.valueOf())};R.toISOString=function(b){if(!this.isValid())return null;var a=(b=!0!==b)?this.clone().utc():this;return 0>a.year()||9999<a.year()?
  1123. U(a,b?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?b?this.toDate().toISOString():(new Date(this._d.valueOf())).toISOString().replace("Z",U(a,"Z")):U(a,b?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")};R.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var b="moment",a="";this.isLocal()||(b=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z");var b="["+b+'("]',c=0<=this.year()&&9999>=this.year()?"YYYY":
  1124. "YYYYYY";return this.format(b+c+"-MM-DD[T]HH:mm:ss.SSS"+(a+'[")]'))};R.toJSON=function(){return this.isValid()?this.toISOString():null};R.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};R.unix=function(){return Math.floor(this.valueOf()/1E3)};R.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};R.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};R.year=gc;R.isLeapYear=
  1125. function(){return V(this.year())};R.weekYear=function(b){return Qb.call(this,b,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};R.isoWeekYear=function(b){return Qb.call(this,b,this.isoWeek(),this.isoWeekday(),1,4)};R.quarter=R.quarters=function(b){return null==b?Math.ceil((this.month()+1)/3):this.month(3*(b-1)+this.month()%3)};R.month=qa;R.daysInMonth=function(){return ka(this.year(),this.month())};R.week=R.weeks=function(b){var a=this.localeData().week(this);return null==
  1126. b?a:this.add(7*(b-a),"d")};R.isoWeek=R.isoWeeks=function(b){var a=Ga(this,1,4).week;return null==b?a:this.add(7*(b-a),"d")};R.weeksInYear=function(){var b=this.localeData()._week;return Ba(this.year(),b.dow,b.doy)};R.isoWeeksInYear=function(){return Ba(this.year(),1,4)};R.date=jc;R.day=R.days=function(b){if(!this.isValid())return null!=b?this:NaN;var a=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=b){var c=this.localeData();"string"===typeof b&&(isNaN(b)?(b=c.weekdaysParse(b),b="number"===
  1127. typeof b?b:null):b=parseInt(b,10));return this.add(b-a,"d")}return a};R.weekday=function(b){if(!this.isValid())return null!=b?this:NaN;var a=(this.day()+7-this.localeData()._week.dow)%7;return null==b?a:this.add(b-a,"d")};R.isoWeekday=function(b){if(!this.isValid())return null!=b?this:NaN;if(null!=b){var a=this.localeData();b="string"===typeof b?a.weekdaysParse(b)%7||7:isNaN(b)?null:b;return this.day(this.day()%7?b:b-7)}return this.day()||7};R.dayOfYear=function(b){var a=Math.round((this.clone().startOf("day")-
  1128. this.clone().startOf("year"))/864E5)+1;return null==b?a:this.add(b-a,"d")};R.hour=R.hours=zc;R.minute=R.minutes=Ec;R.second=R.seconds=Fc;R.millisecond=R.milliseconds=Gc;R.utcOffset=function(b,c,d){var g=this._offset||0,e;if(!this.isValid())return null!=b?this:NaN;if(null!=b){if("string"===typeof b){if(b=ba(Fb,b),null===b)return this}else 16>Math.abs(b)&&!d&&(b*=60);!this._isUTC&&c&&(e=15*-Math.round(this._d.getTimezoneOffset()/15));this._offset=b;this._isUTC=!0;null!=e&&this.add(e,"m");g!==b&&(!c||
  1129. this._changeInProgress?wb(this,Oa(b-g,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?g:15*-Math.round(this._d.getTimezoneOffset()/15)};R.utc=function(b){return this.utcOffset(0,b)};R.local=function(b){this._isUTC&&(this.utcOffset(0,b),this._isUTC=!1,b&&this.subtract(15*-Math.round(this._d.getTimezoneOffset()/15),"m"));return this};R.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,
  1130. !0);else if("string"===typeof this._i){var b=ba(yc,this._i);null!=b?this.utcOffset(b):this.utcOffset(0,!0)}return this};R.hasAlignedHourOffset=function(b){if(!this.isValid())return!1;b=b?K(b).utcOffset():0;return 0===(this.utcOffset()-b)%60};R.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};R.isLocal=function(){return this.isValid()?!this._isUTC:!1};R.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};R.isUtc=
  1131. nb;R.isUTC=nb;R.zoneAbbr=function(){return this._isUTC?"UTC":""};R.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};R.dates=z("dates accessor is deprecated. Use date instead.",jc);R.months=z("months accessor is deprecated. Use month instead",qa);R.years=z("years accessor is deprecated. Use year instead",gc);R.zone=z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(b,a){return null!=b?("string"!==typeof b&&(b=
  1132. -b),this.utcOffset(b,a),this):-this.utcOffset()});R.isDSTShifted=z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!n(this._isDSTShifted))return this._isDSTShifted;var b={};x(b,this);b=Na(b);if(b._a){var a=b._isUTC?g(b._a):K(b._a);this._isDSTShifted=this.isValid()&&0<k(b._a,a.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var ra=D.prototype;ra.calendar=function(b,a,c){b=this._calendar[b]||this._calendar.sameElse;
  1133. return C(b)?b.call(a,c):b};ra.longDateFormat=function(b){var a=this._longDateFormat[b],c=this._longDateFormat[b.toUpperCase()];if(a||!c)return a;this._longDateFormat[b]=c.replace(/MMMM|MM|DD|dddd/g,function(b){return b.slice(1)});return this._longDateFormat[b]};ra.invalidDate=function(){return this._invalidDate};ra.ordinal=function(b){return this._ordinal.replace("%d",b)};ra.preparse=Rb;ra.postformat=Rb;ra.relativeTime=function(b,a,c,d){var g=this._relativeTime[c];return C(g)?g(b,a,c,d):g.replace(/%d/i,
  1134. b)};ra.pastFuture=function(b,a){b=this._relativeTime[0<b?"future":"past"];return C(b)?b(a):b.replace(/%s/i,a)};ra.set=function(b){var a,c;for(c in b)a=b[c],C(a)?this[c]=a:this["_"+c]=a;this._config=b;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};ra.months=function(b,a){return b?f(this._months)?this._months[b.month()]:this._months[(this._months.isFormat||hc).test(a)?"format":"standalone"][b.month()]:f(this._months)?
  1135. this._months:this._months.standalone};ra.monthsShort=function(b,a){return b?f(this._monthsShort)?this._monthsShort[b.month()]:this._monthsShort[hc.test(a)?"format":"standalone"][b.month()]:f(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};ra.monthsParse=function(b,a,c){var d,e;if(this._monthsParseExact){a:{b=b.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)e=g([2E3,d]),this._shortMonthsParse[d]=
  1136. this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(e,"").toLocaleLowerCase();if(c)a="MMM"===a?Aa.call(this._shortMonthsParse,b):Aa.call(this._longMonthsParse,b);else if("MMM"===a){a=Aa.call(this._shortMonthsParse,b);if(-1!==a)break a;a=Aa.call(this._longMonthsParse,b)}else{a=Aa.call(this._longMonthsParse,b);if(-1!==a)break a;a=Aa.call(this._shortMonthsParse,b)}a=-1!==a?a:null}return a}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=
  1137. []);for(d=0;12>d;d++)if(e=g([2E3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(e="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(e.replace(".",""),"i")),c&&"MMMM"===a&&this._longMonthsParse[d].test(b)||c&&"MMM"===a&&this._shortMonthsParse[d].test(b)||!c&&this._monthsParse[d].test(b))return d};
  1138. ra.monthsRegex=function(b){if(this._monthsParseExact)return m(this,"_monthsRegex")||pa.call(this),b?this._monthsStrictRegex:this._monthsRegex;m(this,"_monthsRegex")||(this._monthsRegex=rb);return this._monthsStrictRegex&&b?this._monthsStrictRegex:this._monthsRegex};ra.monthsShortRegex=function(b){if(this._monthsParseExact)return m(this,"_monthsRegex")||pa.call(this),b?this._monthsShortStrictRegex:this._monthsShortRegex;m(this,"_monthsShortRegex")||(this._monthsShortRegex=rb);return this._monthsShortStrictRegex&&
  1139. b?this._monthsShortStrictRegex:this._monthsShortRegex};ra.week=function(b){return Ga(b,this._week.dow,this._week.doy).week};ra.firstDayOfYear=function(){return this._week.doy};ra.firstDayOfWeek=function(){return this._week.dow};ra.weekdays=function(b,a){return b?f(this._weekdays)?this._weekdays[b.day()]:this._weekdays[this._weekdays.isFormat.test(a)?"format":"standalone"][b.day()]:f(this._weekdays)?this._weekdays:this._weekdays.standalone};ra.weekdaysMin=function(b){return b?this._weekdaysMin[b.day()]:
  1140. this._weekdaysMin};ra.weekdaysShort=function(b){return b?this._weekdaysShort[b.day()]:this._weekdaysShort};ra.weekdaysParse=function(b,a,c){var d,e;if(this._weekdaysParseExact)return La.call(this,b,a,c);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(d=0;7>d;d++)if(e=g([2E3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=
  1141. new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(e="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(e.replace(".",""),"i")),c&&"dddd"===a&&this._fullWeekdaysParse[d].test(b)||c&&"ddd"===a&&this._shortWeekdaysParse[d].test(b)||c&&"dd"===a&&this._minWeekdaysParse[d].test(b)||!c&&this._weekdaysParse[d].test(b))return d};
  1142. ra.weekdaysRegex=function(b){if(this._weekdaysParseExact)return m(this,"_weekdaysRegex")||fa.call(this),b?this._weekdaysStrictRegex:this._weekdaysRegex;m(this,"_weekdaysRegex")||(this._weekdaysRegex=rb);return this._weekdaysStrictRegex&&b?this._weekdaysStrictRegex:this._weekdaysRegex};ra.weekdaysShortRegex=function(b){if(this._weekdaysParseExact)return m(this,"_weekdaysRegex")||fa.call(this),b?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=
  1143. rb);return this._weekdaysShortStrictRegex&&b?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};ra.weekdaysMinRegex=function(b){if(this._weekdaysParseExact)return m(this,"_weekdaysRegex")||fa.call(this),b?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rb);return this._weekdaysMinStrictRegex&&b?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};ra.isPM=function(b){return"p"===(b+"").toLowerCase().charAt(0)};ra.meridiem=function(b,a,
  1144. c){return 11<b?c?"pm":"PM":c?"am":"AM"};Ka("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(b){var a=b%10,a=1===d(b%100/10)?"th":1===a?"st":2===a?"nd":3===a?"rd":"th";return b+a}});a.lang=z("moment.lang is deprecated. Use moment.locale instead.",Ka);a.langData=z("moment.langData is deprecated. Use moment.localeData instead.",Fa);var bb=Math.abs,Hc=cb("ms"),Ic=cb("s"),Jc=cb("m"),Kc=cb("h"),Lc=cb("d"),Mc=cb("w"),Nc=cb("M"),Oc=cb("y"),Pc=gb("milliseconds"),Qc=gb("seconds"),Rc=gb("minutes"),
  1145. Sc=gb("hours"),Tc=gb("days"),Uc=gb("months"),Vc=gb("years"),fb=Math.round,Xa={ss:44,s:45,m:45,h:22,d:26,M:11},Nb=Math.abs,oa=ea.prototype;oa.isValid=function(){return this._isValid};oa.abs=function(){var b=this._data;this._milliseconds=bb(this._milliseconds);this._days=bb(this._days);this._months=bb(this._months);b.milliseconds=bb(b.milliseconds);b.seconds=bb(b.seconds);b.minutes=bb(b.minutes);b.hours=bb(b.hours);b.months=bb(b.months);b.years=bb(b.years);return this};oa.add=function(b,a){return Tb(this,
  1146. b,a,1)};oa.subtract=function(b,a){return Tb(this,b,a,-1)};oa.as=function(b){if(!this.isValid())return NaN;var a,c=this._milliseconds;b=G(b);if("month"===b||"year"===b)return a=this._days+c/864E5,a=this._months+4800*a/146097,"month"===b?a:a/12;a=this._days+Math.round(146097*this._months/4800);switch(b){case "week":return a/7+c/6048E5;case "day":return a+c/864E5;case "hour":return 24*a+c/36E5;case "minute":return 1440*a+c/6E4;case "second":return 86400*a+c/1E3;case "millisecond":return Math.floor(864E5*
  1147. a)+c;default:throw Error("Unknown unit "+b);}};oa.asMilliseconds=Hc;oa.asSeconds=Ic;oa.asMinutes=Jc;oa.asHours=Kc;oa.asDays=Lc;oa.asWeeks=Mc;oa.asMonths=Nc;oa.asYears=Oc;oa.valueOf=function(){return this.isValid()?this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*d(this._months/12):NaN};oa._bubble=function(){var b=this._milliseconds,a=this._days,c=this._months,d=this._data;0<=b&&0<=a&&0<=c||0>=b&&0>=a&&0>=c||(b+=864E5*Ub(146097*c/4800+a),c=a=0);d.milliseconds=b%1E3;b=q(b/1E3);d.seconds=
  1148. b%60;b=q(b/60);d.minutes=b%60;b=q(b/60);d.hours=b%24;a+=q(b/24);b=q(4800*a/146097);c+=b;a-=Ub(146097*b/4800);b=q(c/12);d.days=a;d.months=c%12;d.years=b;return this};oa.clone=function(){return Oa(this)};oa.get=function(b){b=G(b);return this.isValid()?this[b+"s"]():NaN};oa.milliseconds=Pc;oa.seconds=Qc;oa.minutes=Rc;oa.hours=Sc;oa.days=Tc;oa.weeks=function(){return q(this.days()/7)};oa.months=Uc;oa.years=Vc;oa.humanize=function(b){if(!this.isValid())return this.localeData().invalidDate();var a=this.localeData(),
  1149. c;c=!b;var d=Oa(this).abs(),g=fb(d.as("s")),e=fb(d.as("m")),k=fb(d.as("h")),f=fb(d.as("d")),h=fb(d.as("M")),d=fb(d.as("y")),g=g<=Xa.ss&&["s",g]||g<Xa.s&&["ss",g]||1>=e&&["m"]||e<Xa.m&&["mm",e]||1>=k&&["h"]||k<Xa.h&&["hh",k]||1>=f&&["d"]||f<Xa.d&&["dd",f]||1>=h&&["M"]||h<Xa.M&&["MM",h]||1>=d&&["y"]||["yy",d];g[2]=c;g[3]=0<+this;g[4]=a;c=lc.apply(null,g);b&&(c=a.pastFuture(+this,c));return a.postformat(c)};oa.toISOString=Ab;oa.toString=Ab;oa.toJSON=Ab;oa.locale=tb;oa.localeData=mb;oa.toIsoString=z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  1150. Ab);oa.lang=ic;H("X",0,0,"unix");H("x",0,0,"valueOf");N("x",Eb);N("X",/[+-]?\d+(\.\d{1,3})?/);T("X",function(b,a,c){c._d=new Date(1E3*parseFloat(b,10))});T("x",function(b,a,c){c._d=new Date(d(b))});a.version="2.20.1";Vb=K;a.fn=R;a.min=function(){var b=[].slice.call(arguments,0);return ma("isBefore",b)};a.max=function(){var b=[].slice.call(arguments,0);return ma("isAfter",b)};a.now=function(){return Date.now?Date.now():+new Date};a.utc=g;a.unix=function(b){return K(1E3*b)};a.months=function(b,a){return Sb(b,
  1151. a,"months")};a.isDate=h;a.locale=Ka;a.invalid=v;a.duration=Oa;a.isMoment=w;a.weekdays=function(b,a,c){return Gb(b,a,c,"weekdays")};a.parseZone=function(){return K.apply(null,arguments).parseZone()};a.localeData=Fa;a.isDuration=ja;a.monthsShort=function(b,a){return Sb(b,a,"monthsShort")};a.weekdaysMin=function(b,a,c){return Gb(b,a,c,"weekdaysMin")};a.defineLocale=Ia;a.updateLocale=function(b,a){if(null!=a){var c,d=Zb;c=Ma(b);null!=c&&(d=c._config);a=B(d,a);a=new D(a);a.parentLocale=Ca[b];Ca[b]=a;Ka(b)}else null!=
  1152. Ca[b]&&(null!=Ca[b].parentLocale?Ca[b]=Ca[b].parentLocale:null!=Ca[b]&&delete Ca[b]);return Ca[b]};a.locales=function(){return bc(Ca)};a.weekdaysShort=function(b,a,c){return Gb(b,a,c,"weekdaysShort")};a.normalizeUnits=G;a.relativeTimeRounding=function(b){return void 0===b?fb:"function"===typeof b?(fb=b,!0):!1};a.relativeTimeThreshold=function(b,a){if(void 0===Xa[b])return!1;if(void 0===a)return Xa[b];Xa[b]=a;"s"===b&&(Xa.ss=a-1);return!0};a.calendarFormat=function(b,a){b=b.diff(a,"days",!0);return-6>
  1153. b?"sameElse":-1>b?"lastWeek":0>b?"lastDay":1>b?"sameDay":2>b?"nextDay":7>b?"nextWeek":"sameElse"};a.prototype=R;a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"};return a})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(a,f){return function(){return function(a,e){this.context=
  1154. this.definition=null;this.definition=a;this.context=e}}()})},"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray","./ImmutablePointArray"],function(a,f,p,e,n){return function(a){function e(c,e,b,g,f){c=a.call(this,c)||this;c._lazyPath=[];c._hasZ=!1;c._hasM=!1;c._hasZ=b;c._hasM=g;c._spRef=e;c._cacheId=f;return c}p(e,a);e.prototype.get=function(a){if(void 0===this._lazyPath[a]){var c=this._elements[a];if(void 0===c)return;this._lazyPath[a]=
  1155. new n(c,this._spRef,this._hasZ,this._hasM,this._cacheId,a)}return this._lazyPath[a]};e.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof e?!1:a.getUniqueHash()===this.getUniqueHash()};e.prototype.getUniqueHash=function(){return this._cacheId.toString()};return e}(e)})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ../kernel ./ImmutableArray ../geometry/Point".split(" "),function(a,f,p,e,n,l){var h=0===e.version.indexOf("4.");
  1156. return function(a){function c(b,c,e,f,h,m){b=a.call(this,b)||this;b._lazyPt=[];b._hasZ=!1;b._hasM=!1;b._spRef=c;b._hasZ=e;b._hasM=f;b._cacheId=h;b._partId=m;return b}p(c,a);c.prototype.get=function(b){if(void 0===this._lazyPt[b]){var a=this._elements[b];if(void 0===a)return;var c=this._hasZ,e=this._hasM,f=null,f=c&&!e?new l(a[0],a[1],a[2],void 0,this._spRef):e&&c?new l(a[0],a[1],void 0,a[2],this._spRef):c&&e?new l(a[0],a[1],a[2],a[3],this._spRef):new l(a[0],a[1],this._spRef);h?f.cache._arcadeCacheId=
  1157. this._cacheId.toString()+"-"+this._partId.toString()+"-"+b.toString():f.setCacheValue("_arcadeCacheId",this._cacheId.toString()+"-"+this._partId.toString()+"-"+b.toString());this._lazyPt[b]=f}return this._lazyPt[b]};c.prototype.equalityTest=function(b){return b===this?!0:null===b||!1===b instanceof c?!1:b.getUniqueHash()===this.getUniqueHash()};c.prototype.getUniqueHash=function(){return this._cacheId.toString()+"-"+this._partId.toString()};return c}(n)})},"esri/arcade/Feature":function(){define("require exports dojo/_base/lang ./Dictionary ./ImmutableArray ./languageUtils ../geometry/Geometry ../geometry/Point ../geometry/support/jsonUtils".split(" "),
  1158. function(a,f,p,e,n,l,h,c,m){return function(){function b(){this._layer=this.attributes=this._geometry=null;this.immutable=this.immutable=this._datesfixed=!0}b.createFromGraphic=function(a){var c=new b;c._geometry=a.geometry;c.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes;a._sourceLayer?(c._layer=a._sourceLayer,c._datesfixed=!1):a._layer?(c._layer=a._layer,c._datesfixed=!1):a.sourceLayer?(c._layer=a.sourceLayer,c._datesfixed=!1):a.layer&&(c._layer=a.layer,c._datesfixed=!1);
  1159. return c};b.createFromArcadeFeature=function(a){var c=new b;c._datesfixed=a._datesfixed;c.attributes=a.attributes;c._geometry=a._geometry;a._layer&&(c._layer=a._layer);return c};b.createFromArcadeDictionary=function(a){var c=new b;c.attributes=a.field("attributes");null!==c.attributes?c.attributes instanceof e?(c.attributes=c.attributes.attributes,null===c.attributes&&(c.attributes={})):c.attributes={}:c.attributes={};c._geometry=a.field("geometry");null!==c._geometry&&(c._geometry instanceof e?c._geometry=
  1160. b.parseGeometryFromDictionary(c._geometry):c._geometry instanceof h||(c._geometry=null));return c};b.createFromGraphicLikeObject=function(a,c,e){void 0===e&&(e=null);var g=new b;null===c&&(c={});g.attributes=c;g._geometry=a;g._layer=e;g._layer&&(g._datesfixed=!1);return g};b.prototype.repurposeFromGraphicLikeObject=function(b,a,c){void 0===c&&(c=null);null===a&&(a={});this.attributes=a;this._geometry=b;this._datesfixed=(this._layer=c)?!1:!0};b.prototype.castToText=function(){var b="",a;for(a in this.attributes){""!==
  1161. b&&(b+=",");var c=this.attributes[a];null==c?b+=JSON.stringify(a)+":null":l.isBoolean(c)||l.isNumber(c)||l.isString(c)?b+=JSON.stringify(a)+":"+JSON.stringify(c):c instanceof h?b+=JSON.stringify(a)+":"+l.toStringExplicit(c):c instanceof n?b+=JSON.stringify(a)+":"+l.toStringExplicit(c):c instanceof Array?b+=JSON.stringify(a)+":"+l.toStringExplicit(c):c instanceof Date?b+=JSON.stringify(a)+":"+JSON.stringify(c):null!==c&&"object"===typeof c&&void 0!==c.castToText&&(b+=JSON.stringify(a)+":"+c.castToText())}return'{"geometry":'+
  1162. (null===this.geometry()?"null":l.toStringExplicit(this.geometry()))+',"attributes":{'+b+"}}"};b.prototype._fixDates=function(){for(var b=[],a=0;a<this._layer.fields.length;a++){var c=this._layer.fields[a];"date"!==c.type&&"esriFieldTypeDate"!==c.type||b.push(c.name)}0<b.length&&this._fixDateFields(b);this._datesfixed=!0};b.prototype._fixDateFields=function(b){this.attributes=p.mixin({},this.attributes);for(var a=0;a<b.length;a++){var c=this.attributes[b[a]];if(null!==c)if(void 0===c)for(var g in this.attributes){if(g.toLowerCase()===
  1163. b[a]){c=this.attributes[g];null===c||c instanceof Date||(this.attributes[g]=new Date(c));break}}else c instanceof Date||(this.attributes[b[a]]=new Date(c))}};b.prototype.geometry=function(){return null===this._geometry||this._geometry instanceof h?this._geometry:this._geometry=m.fromJson(this._geometry)};b.prototype.field=function(b){!1===this._datesfixed&&this._fixDates();var a=b.toLowerCase();b=this.attributes[b];if(void 0!==b)return b;for(var c in this.attributes)if(c.toLowerCase()===a)return this.attributes[c];
  1164. if(this._hasFieldDefinition(a))return null;throw Error("Field not Found");};b.prototype._hasFieldDefinition=function(b){if(null===this._layer)return!1;for(var a=0;a<this._layer.fields.length;a++)if(this._layer.fields[a].name.toLowerCase()===b)return!0;return!1};b.prototype._field=function(b){!1===this._datesfixed&&this._fixDates();var a=b.toLowerCase();b=this.attributes[b];if(void 0!==b)return b;for(var c in this.attributes)if(c.toLowerCase()===a)return this.attributes[c];return null};b.prototype.setField=
  1165. function(b,a){if(this.immutable)throw Error("Feature is Immutable");if(!1===l.isSimpleType(a))throw Error("Illegal Value Assignment to Feature");var c=b.toLowerCase();if(void 0===this.attributes[b])for(var g in this.attributes)if(g.toLowerCase()===c){this.attributes[g]=a;return}this.attributes[b]=a};b.prototype.hasField=function(b){var a=b.toLowerCase();if(void 0!==this.attributes[b])return!0;for(var c in this.attributes)if(c.toLowerCase()===a)return!0;return this._hasFieldDefinition(a)?!0:!1};b.prototype.keys=
  1166. function(){var b=[],a={},c;for(c in this.attributes)b.push(c),a[c.toLowerCase()]=1;if(null!==this._layer)for(c=0;c<this._layer.fields.length;c++){var e=this._layer.fields[c];1!==a[e.name.toLowerCase()]&&b.push(e.name)}return b=b.sort()};b.parseGeometryFromDictionary=function(a){a=b.convertDictionaryToJson(a,!0);void 0!==a.spatialreference&&(a.spatialReference=a.spatialreference,delete a.spatialreference);void 0!==a.rings&&(a.rings=this.fixPathArrays(a.rings,!0===a.hasZ,!0===a.hasM));void 0!==a.paths&&
  1167. (a.paths=this.fixPathArrays(a.paths,!0===a.hasZ,!0===a.hasM));void 0!==a.points&&(a.points=this.fixPointArrays(a.points,!0===a.hasZ,!0===a.hasM));return m.fromJSON(a)};b.fixPathArrays=function(b,a,c){var g=[];if(b instanceof Array)for(var e=0;e<b.length;e++)g.push(this.fixPointArrays(b[e],a,c));else if(b instanceof n)for(e=0;e<b.length();e++)g.push(this.fixPointArrays(b.get(e),a,c));return g};b.fixPointArrays=function(b,a,e){var g=[];if(b instanceof Array)for(var f=0;f<b.length;f++){var h=b[f];h instanceof
  1168. c?a&&e?g.push([h.x,h.y,h.z,h.m]):a?g.push([h.x,h.y,h.z]):e?g.push([h.x,h.y,h.m]):g.push([h.x,h.y]):g.push(h)}else if(b instanceof n)for(f=0;f<b.length();f++)h=b.get(f),h instanceof c?a&&e?g.push([h.x,h.y,h.z,h.m]):a?g.push([h.x,h.y,h.z]):e?g.push([h.x,h.y,h.m]):g.push([h.x,h.y]):g.push(h);return g};b.convertDictionaryToJson=function(a,c){void 0===c&&(c=!1);var g={},f;for(f in a.attributes){var h=a.attributes[f];h instanceof e&&(h=b.convertDictionaryToJson(h));c?g[f.toLowerCase()]=h:g[f]=h}return g};
  1169. b.parseAttributesFromDictionary=function(b){var a={},c;for(c in b.attributes){var g=b.attributes[c];if(l.isSimpleType(g))a[c]=g;else throw Error("Illegal Argument");}return a};b.fromJson=function(a){var c=null;null!==a.geometry&&void 0!==a.geometry&&(c=m.fromJSON(a.geometry));var g={};if(null!==a.attributes&&void 0!==a.attributes)for(var e in a.attributes){var f=a.attributes[e];if(l.isString(f)||l.isNumber(f)||l.isBoolean(f)||l.isDate(f))g[e]=f;else throw Error("Illegal Argument");}return b.createFromGraphicLikeObject(c,
  1170. g,null)};b.prototype.domainValueLookup=function(b,a,c){if(null===this._layer||!this._layer.fields)return null;c=l.getDomain(b,this._layer,this,c);if(void 0===a)try{a=this.field(b)}catch(v){return null}return l.getDomainValue(c,a)};b.prototype.domainCodeLookup=function(b,a,c){if(null===this._layer||!this._layer.fields)return null;b=l.getDomain(b,this._layer,this,c);return l.getDomainCode(b,a)};return b}()})},"esri/arcade/treeAnalysis":function(){define(["require","exports"],function(a,f){function p(b,
  1171. a,c,g){return"0"!==b.min&&c.length<Number(b.min)||"*"!==b.max&&c.length>Number(b.max)?-2:1}function e(b,a,c){if(null!==c.localScope&&void 0!==c.localScope[b.toLowerCase()]){var d=c.localScope[b.toLowerCase()];if("FormulaFunction"===d.type||"any"===d.type)return void 0===d.signature&&(d.signature={min:"0",max:"*"}),p(d.signature,b,a,c)}return void 0!==c.globalScope[b.toLowerCase()]&&(d=c.globalScope[b.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&(d.signature={min:"0",
  1172. max:"*"}),p(d.signature,b,a,c)):-1}function n(b,a){void 0===a&&(a=!0);var c=u(b,"SYNTAX","UNREOGNISED");try{switch(b.type){case "VariableDeclarator":return null!==b.init&&"FunctionExpression"===b.init.type?u(b,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==b.id.type?u(b,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==b.init?n(b.init,!1):"";case "VariableDeclaration":for(var d=0;d<b.declarations.length;d++)if(c=n(b.declarations[d],a),""!==c)return c;return"";case "ForInStatement":c=n(b.left,a);
  1173. if(""!==c)break;if("VariableDeclaration"===b.left.type){if(1<b.left.declarations.length)return u(b,"SYNTAX","ONLY1VAR");if(null!==b.left.declarations[0].init)return u(b,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==b.left.type)return u(b,"SYNTAX","LEFTNOTVAR");c=n(b.right,a);if(""!==c)break;c=n(b.body,a);if(""!==c)break;return"";case "ForStatement":if(null!==b.test&&(c=n(b.test,a),""!==c))break;if(null!==b.init&&(c=n(b.init,a),""!==c))break;if(null!==b.update&&(c=n(b.update,a),""!==c))break;
  1174. if(null!==b.body&&(c=n(b.body,a),""!==c))break;return"";case "ContinueStatement":return"";case "EmptyStatement":return"";case "BreakStatement":return"";case "IfStatement":c=n(b.test,a);if(""!==c)break;if(null!==b.consequent&&(c=n(b.consequent,!1),""!==c))break;if(null!==b.alternate&&(c=n(b.alternate,!1),""!==c))break;return"";case "BlockStatement":for(var g=[],d=0;d<b.body.length;d++)"EmptyStatement"!==b.body[d].type&&g.push(b.body[d]);b.body=g;for(d=0;d<b.body.length;d++)if(c=n(b.body[d],a),""!==
  1175. c)return c;return"";case "FunctionDeclaration":return!1===a?u(b,"SYNTAX","GLOBALFUNCTIONSONLY"):"Identifier"!==b.id.type?u(b,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"):n(b.body,!1);case "ReturnStatement":return null!==b.argument?n(b.argument,a):"";case "UpdateExpression":return"Identifier"!==b.argument.type&&"MemberExpression"!==b.argument.type?u(b,"SYNTAX","ASSIGNMENTTOVARSONLY"):n(b.argument,a);case "AssignmentExpression":if("Identifier"!==b.left.type&&"MemberExpression"!==b.left.type)return u(b,"SYNTAX",
  1176. "ASSIGNMENTTOVARSONLY");c=n(b.left,a);if(""!==c)break;switch(b.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:return u(b,"SYNTAX","OPERATORNOTRECOGNISED")}return n(b.right,!1);case "ExpressionStatement":return n(b.expression,!1);case "Identifier":c="";break;case "MemberExpression":c=n(b.object,a);if(""!==c)break;return!0===b.computed?n(b.property,a):"";case "Literal":return"";case "ThisExpression":return u(b,"SYNTAX","NOTSUPPORTED");case "CallExpression":if("Identifier"!==
  1177. b.callee.type)return u(b,"SYNTAX","ONLYNODESSUPPORTED");c="";for(d=0;d<b.arguments.length;d++)if(c=n(b.arguments[d],a),""!==c)return c;return"";case "UnaryExpression":c=n(b.argument,a);break;case "BinaryExpression":c=n(b.left,a);if(""!==c)break;c=n(b.right,a);if(""!==c)break;switch(b.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:return u(b,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "LogicalExpression":c=
  1178. n(b.left,a);if(""!==c)break;c=n(b.right);if(""!==c)break;switch(b.operator){case "\x26\x26":case "||":break;default:return u(b,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "ConditionalExpression":return u(b,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":c="";for(d=0;d<b.elements.length&&(c=n(b.elements[d],a),""===c);d++);break;case "Array":return u(b,"SYNTAX","NOTSUPPORTED");case "ObjectExpression":c="";for(d=0;d<b.properties.length&&(c="",null!==b.properties[d].key&&("Literal"!==b.properties[d].key.type&&
  1179. "Identifier"!==b.properties[d].key.type&&(c=u(b,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===b.properties[d].key.type&&(g=b.properties[d].key.value,"string"===typeof g||g instanceof String||(c=u(b,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")))),""===c&&(c=n(b.properties[d],a)),""===c);d++);break;case "Property":if("Literal"!==b.key.type&&"Identifier"!==b.key.type)return u(b,"SYNTAX","ONLYLITERAL");if("Identifier"!==b.key.type&&(c=n(b.key,a),""!==c))break;c=n(b.value,a)}return c}catch(A){throw A;
  1180. }}function l(a,c){var d=u(a,"SYNTAX","UNREOGNISED"),f=null,h="";try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type)return u(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR");a.id.name.toLowerCase();var m=null===a.init?"":l(a.init,c);if(""!==m)return m;null===c.localScope?c.globalScope[a.id.name.toLowerCase()]={type:"any"}:c.localScope[a.id.name.toLowerCase()]={type:"any"};return"";case "FunctionDeclaration":f=b(a.id.name.toLowerCase(),a,c);h=g(a,c);if(""!==h)return h;
  1181. if(null!==c.localScope)return u(a,"SYNTAX","GLOBALFUNCTIONSONLY");f.isnative=!1;c.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[f]};return"";case "VariableDeclaration":for(var d="",q=0;q<a.declarations.length&&(d=l(a.declarations[q],c),""===d);q++);break;case "IfStatement":d=l(a.test,c);if(""!==d)break;if("AssignmentExpression"===a.test.type||"UpdateExpression"===a.test.type)return u(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");if(null!==a.consequent&&(d=l(a.consequent,
  1182. c),""!==d))break;if(null!==a.alternate&&(d=l(a.alternate,c),""!==d))break;return"";case "EmptyStatement":return"";case "BlockStatement":for(q=0;q<a.body.length;q++)if(d=l(a.body[q],c),""!==d)return d;return"";case "ReturnStatement":return null!==a.argument?l(a.argument,c):"";case "ForInStatement":if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return u(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return u(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==
  1183. a.left.type)return u(a,"SYNTAX","LEFTNOTVAR");d=l(a.left,c);if(""!==d)break;d=l(a.right,c);if(""!==d)break;d=l(a.body,c);if(""!==d)break;return"";case "ForStatement":if(null!==a.init&&(d=l(a.init,c),""!==d))break;if(null!==a.test&&(d=l(a.test,c),""!==d))break;if(null!==a.body&&(d=l(a.body,c),""!==d))break;if(null!==a.update&&(d=l(a.update,c),""!==d))break;return"";case "BreakStatement":return"";case "ContinueStatement":return"";case "UpdateExpression":if("Identifier"!==a.argument.type&&"MemberExpression"!==
  1184. a.argument.type)return u(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var n=!1;if("MemberExpression"===a.argument.type)return l(a.argument,c);null!==c.localScope&&void 0!==c.localScope[a.argument.name.toLowerCase()]&&(n=!0);void 0!==c.globalScope[a.argument.name.toLowerCase()]&&(n=!0);return!1===n?"Identifier "+a.argument.name+" has not been declared.":"";case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return u(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var t=l(a.right,c);
  1185. if(""!==t)return t;n=!1;if("MemberExpression"===a.left.type)return t=l(a.left,c),""!==t?t:"";null!==c.localScope&&void 0!==c.localScope[a.left.name.toLowerCase()]&&(n=!0);void 0!==c.globalScope[a.left.name.toLowerCase()]&&(n=!0);return!1===n?"Identifier "+a.left.name+" has not been declared.":"";case "ExpressionStatement":return l(a.expression,c);case "Identifier":var p=a.name.toLowerCase();if(null!==c.localScope&&void 0!==c.localScope[p])return"";d=void 0!==c.globalScope[p]?"":u(a,"SYNTAX","VARIABLENOTFOUND");
  1186. break;case "MemberExpression":d=l(a.object,c);if(""!==d)break;return!0===a.computed?l(a.property,c):"";case "Literal":return"";case "ThisExpression":d=u(a,"SYNTAX","NOTSUPPORTED");break;case "CallExpression":if("Identifier"!==a.callee.type)return u(a,"SYNTAX","ONLYNODESSUPPORTED");d="";for(q=0;q<a.arguments.length;q++)if(d=l(a.arguments[q],c),""!==d)return d;var r=e(a.callee.name,a.arguments,c);-1===r&&(d=u(a,"SYNTAX","NOTFOUND"));-2===r&&(d=u(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":d=
  1187. l(a.argument,c);break;case "BinaryExpression":d=l(a.left,c);if(""!==d)break;d=l(a.right,c);if(""!==d)break;return"";case "LogicalExpression":d=l(a.left,c);if(""!==d)break;if("AssignmentExpression"===a.left.type||"UpdateExpression"===a.left.type)return u(a.left,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");d=l(a.right,c);if(""!==d)break;return"AssignmentExpression"===a.right.type||"UpdateExpression"===a.right.type?u(a.right,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"):"";case "ConditionalExpression":return u(a,
  1188. "SYNTAX","NOTSUPPORTED");case "ArrayExpression":d="";for(q=0;q<a.elements.length&&(d=l(a.elements[q],c),""===d);q++);break;case "ObjectExpression":d="";for(q=0;q<a.properties.length;q++){d="";if(null!==a.properties[q].key&&("Literal"!==a.properties[q].key.type&&"Identifier"!==a.properties[q].key.type&&(d=u(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[q].key.type)){var v=a.properties[q].key.value;"string"===typeof v||v instanceof String||(d=u(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING"))}""===
  1189. d&&(d=l(a.properties[q],c));if(""!==d)break}break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return u(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(d=l(a.key,c),""!==d))break;d=l(a.value,c);break;case "Array":return u(a,"SYNTAX","NOTSUPPORTED")}return d}catch(aa){throw aa;}}function h(b,a){var c=!1;try{switch(b.type){case "VariableDeclarator":return null!==b.init?h(b.init,a):c;case "FunctionDeclaration":return h(b.body,a);case "VariableDeclaration":for(var d=0;d<
  1190. b.declarations.length;d++)if(h(b.declarations[d],a))return!0;return c;case "IfStatement":return h(b.test,a)||null!==b.consequent&&h(b.consequent,a)||null!==b.alternate&&h(b.alternate,a)?!0:c;case "EmptyStatement":return c;case "BlockStatement":for(d=0;d<b.body.length;d++)if(h(b.body[d],a))return!0;return c;case "ReturnStatement":return null!==b.argument?h(b.argument,a):c;case "UpdateExpression":return h(b.argument,a);case "AssignmentExpression":return(c=h(b.right,a))?c:h(b.left,a);case "ExpressionStatement":return h(b.expression,
  1191. a);case "ForInStatement":return(c=h(b.left,a))||(c=h(b.right,a))?c:c=h(b.body,a);case "ForStatement":if(null!==b.init&&(c=h(b.init,a))||null!==b.test&&(c=h(b.test,a))||null!==b.body&&(c=h(b.body,a)))return c;null!==b.update&&(c=h(b.update,a));return c;case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return a.toLowerCase()===b.name.toLowerCase();case "MemberExpression":if(c=h(b.object,a))return c;!0===b.computed&&(c=h(b.property,a));return c;
  1192. case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(d=0;d<b.arguments.length;d++)h(b.arguments[d],a)&&(c=!0);return c;case "ArrayExpression":for(d=0;d<b.elements.length;d++)h(b.elements[d],a)&&(c=!0);return c;case "UnaryExpression":return h(b.argument,a);case "BinaryExpression":return(c=h(b.left,a))?c:c=h(b.right,a);case "LogicalExpression":return(c=h(b.left,a))?c:c=h(b.right,a);case "ObjectExpression":for(d=0;d<b.properties.length;d++)h(b.properties[d],a)&&(c=!0);return c;
  1193. case "Property":return c=h(b.value,a);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(z){throw z;}}function c(b,a){var d=!1;try{switch(b.type){case "VariableDeclarator":return null!==b.init?c(b.init,a):d;case "FunctionDeclaration":return c(b.body,a);case "VariableDeclaration":for(var g=0;g<b.declarations.length;g++)if(c(b.declarations[g],a))return!0;return d;case "IfStatement":return c(b.test,a)||null!==b.consequent&&c(b.consequent,a)||null!==b.alternate&&c(b.alternate,
  1194. a)?!0:d;case "EmptyStatement":return d;case "BlockStatement":for(g=0;g<b.body.length;g++)if(c(b.body[g],a))return!0;return d;case "ReturnStatement":return null!==b.argument?c(b.argument,a):d;case "UpdateExpression":return c(b.argument,a);case "AssignmentExpression":return c(b.left,a)?!0:c(b.right,a);case "ExpressionStatement":return c(b.expression,a);case "ForInStatement":return(d=c(b.left,a))||(d=c(b.right,a))?d:d=c(b.body,a);case "ForStatement":if(null!==b.init&&(d=c(b.init,a))||null!==b.test&&
  1195. (d=c(b.test,a))||null!==b.body&&(d=c(b.body,a)))return d;null!==b.update&&(d=c(b.update,a));return d;case "BreakStatement":return d;case "ContinueStatement":return d;case "Compound":return d;case "Identifier":return d;case "MemberExpression":if(d=c(b.object,a))return d;!0===b.computed&&(d=c(b.property,a));return d;case "Literal":return d;case "ThisExpression":return d;case "CallExpression":if(b.callee.name.toLowerCase()===a.toLowerCase())return!0;for(g=0;g<b.arguments.length;g++)c(b.arguments[g],
  1196. a)&&(d=!0);return d;case "ArrayExpression":for(g=0;g<b.elements.length;g++)c(b.elements[g],a)&&(d=!0);return d;case "UnaryExpression":return c(b.argument,a);case "BinaryExpression":return(d=c(b.left,a))?d:d=c(b.right,a);case "LogicalExpression":return(d=c(b.left,a))?d:d=c(b.right,a);case "ConditionalExpression":return d;case "ObjectExpression":for(g=0;g<b.properties.length;g++)c(b.properties[g],a)&&(d=!0);return d;case "Property":return d=c(b.value,a);case "Array":return d;default:return d}}catch(z){throw z;
  1197. }}function m(b,a){var c=[],d;try{switch(b.type){case "VariableDeclarator":return null!==b.init?m(b.init,a):c;case "FunctionDeclaration":return m(b.body,a);case "VariableDeclaration":for(var g=0;g<b.declarations.length;g++)d=m(b.declarations[g],a),c=c.concat(d);return c;case "ForInStatement":return d=m(b.left,a),c=c.concat(d),d=m(b.right,a),c=c.concat(d),d=m(b.body,a),c=c.concat(d);case "ForStatement":return null!==b.init&&(d=m(b.init,a),c=c.concat(d)),null!==b.test&&(d=m(b.test,a),c=c.concat(d)),
  1198. null!==b.body&&(d=m(b.body,a),c=c.concat(d)),null!==b.update&&(d=m(b.update,a),c=c.concat(d)),c;case "IfStatement":return d=m(b.test,a),c=c.concat(d),null!==b.consequent&&(d=m(b.consequent,a),c=c.concat(d)),null!==b.alternate&&(d=m(b.alternate,a),c=c.concat(d)),c;case "EmptyStatement":return c;case "BlockStatement":for(g=0;g<b.body.length;g++)d=m(b.body[g],a),c=c.concat(d);return c;case "ReturnStatement":return null!==b.argument?m(b.argument,a):c;case "UpdateExpression":return m(b.argument,a);case "AssignmentExpression":return c=
  1199. m(b.left,a),c=c.concat(m(b.right,a));case "ExpressionStatement":return m(b.expression,a);case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":if("Identifier"!==b.object.type)return c;if(!1===b.computed)c.push(b.object.name.toLowerCase()+"."+b.property.name.toLowerCase());else try{"Literal"===b.property.type&&"string"===typeof b.property.value&&c.push(b.object.name.toLowerCase()+"."+b.property.value.toString().toLowerCase())}catch(A){}return c;
  1200. case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(g=0;g<b.arguments.length;g++)d=m(b.arguments[g],a),c=c.concat(d);return c;case "ArrayExpression":for(g=0;g<b.elements.length;g++)d=m(b.elements[g],a),c=c.concat(d);return c;case "UnaryExpression":return m(b.argument,a);case "ObjectExpression":for(g=0;g<b.properties.length;g++)d=m(b.properties[g],a),c=c.concat(d);return c;case "Property":return m(b.value,a);case "BinaryExpression":return d=m(b.left,a),c=c.concat(d),d=
  1201. m(b.right,a),c=c.concat(d);case "LogicalExpression":return d=m(b.left,a),c=c.concat(d),d=m(b.right,a),c=c.concat(d);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(A){throw A;}}function b(b,a,c){c=[];if(void 0!==a.params&&null!==a.params)for(var d=0;d<a.params.length;d++)c.push("any");return{name:b,"return":"any",params:c}}function g(b,a){a={globalScope:a.globalScope,localScope:{}};for(var c=0;c<b.params.length;c++)a.localScope[b.params[c].name.toLowerCase()]={type:"any"};
  1202. return l(b.body,a)}function t(b,a,c,g){var d={};if(void 0===b||null===b)b={};if(void 0===c||null===c)c={};d.infinity={type:"any"};d.textformatting={type:"any"};d.pi={type:"any"};for(var e in a)if("simple"!==g||"simple"===g&&"a"===a[e].av)d[e]={type:"FormulaFunction",signature:{min:a[e].min,max:a[e].max}},"simple"!==g&&(void 0!==a[e].fmin&&(d[e].signature.min=a[e].fmin),void 0!==a[e].fmax&&(d[e].signature.max=a[e].fmax));for(a=0;a<c.length;a++)e=c[a],d[e.name]={type:"FormulaFunction",signature:e};
  1203. for(e in b)d[e]=b[e],d[e].type="any";return d}function u(b,a,c){var d="";switch(a){case "SYNTAX":d="Syntax Error: ";break;case "RUNTIME":d="Runtime Error: ";break;default:d="Syntax Error: "}try{switch(b.type){case "IfStatement":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=" Assignments not be made in logical tests";break;case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;case "UpdateExpression":case "AssignmentExpression":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=
  1204. " Assignments not be made in logical tests";break;case "ASSIGNMENTTOVARSONLY":d+=" Assignments can only be made to identifiers"}break;case "ExpressionStatement":d+=" Assignments can only be made to identifiers";break;case "FunctionDeclaration":switch(c){case "GLOBALFUNCTIONSONLY":d+=" Functions cannot be declared as variables";break;case "FUNCTIONMUSTHAVEIDENTIFIER":d+=" Function Definition must have an identifier"}break;case "VariableDeclaration":d+=" Only 1 variable can be declared at a time";break;
  1205. case "VariableDeclarator":switch(c){case "FUNCTIONVARIABLEDECLARATOR":d+=" Functions cannot be declared as variables";break;case "VARIABLEMUSTHAVEIDENTIFIER":d+=" Variable Definition must have an identifier"}break;case "Identifier":d+=" Identifier Not Found. ";d+=b.name;break;case "ObjectExpression":switch(c){case "OBJECTPROPERTYMUSTBESTRING":d+=" Property name must be a string"}break;case "ForStatement":switch(c){case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;
  1206. case "ForInStatement":switch(c){case "ONLY1VAR":d+=" Can only declare 1 var for use with IN";break;case "CANNOTDECLAREVAL":d+=" Can only declare value for use with IN";break;case "LEFTNOVAR":d+="Must provide a variable to iterate with.";break;case "VARIABLENOTDECLARED":d+="Variable must be declared before it is used..";break;case "CANNOTITERATETHISTYPE":d+="This type cannot be used in an IN loop"}break;case "MemberExpression":switch(c){case "PROPERTYNOTFOUND":d+="Cannot find member property. ";d+=
  1207. !1===b.computed?b.property.name:"";break;case "OUTOFBOUNDS":d+="Out of Bounds. ";d+=!1===b.computed?b.property.name:"";break;case "NOTFOUND":d+="Cannot call member method on null. ";d+=!1===b.computed?b.property.name:"";break;case "INVALIDTYPE":d+="Cannot call member property on object of this type. ",d+=!1===b.computed?b.property.name:""}break;case "Property":switch(c){case "ONLYLITERAL":d+="Property names must be literals or identifiers"}break;case "Literal":break;case "ThisExpression":d+="THIS construct is not supported.";
  1208. case "CallExpression":switch(c){case "WRONGSIGNATURE":d+="Function signature does not match: ";d+=b.callee.name;break;case "ONLYNODESUPPORTED":d+="Functions must be declared.";d+=b.callee.name;break;case "NOTAFUNCTION":d+="Not a Function: ";d+=b.callee.name;break;case "NOTFOUND":d+="Function Not Found: "+b.callee.name}break;case "UnaryExpression":switch(c){case "NOTSUPPORTEDUNARYOPERATOR":d+="Operator "+b.operator+" not allowed in this context. Only ! can be used with boolean, and - with a number";
  1209. break;case "NOTSUPPORTEDTYPE":d+="Unary operator "+b.operator+" cannot be used with this argument."}case "BinaryExpression":switch(c){case "OPERATORNOTRECOGNISED":d+="Binary Operator not recognised "+b.operator}break;case "LogicalExpression":switch(c){case "ONLYBOOLEAN":d+="Operator "+b.operator+" cannot be used. Only || or \x26\x26 are allowed values";break;case "ONLYORORAND":d+="Logical Expression "+b.operator+" being applied to parameters that are not boolean."}break;case "ConditionalExpression":d+=
  1210. "Conditional statements not supported.";break;case "ArrayExpression":switch(c){case "FUNCTIONCONTEXTILLEGAL":d+=" Cannot Put Function inside Array."}break;case "Array":d+="Expression contains unrecognised array structure.";break;default:d+="Expression contains unrecognised code structures."}}catch(z){throw z;}return d}function v(b,a,c){return{line:b.loc.start.line,character:b.loc.start.column,reason:u(b,a,c)}}function x(b,a,c,g,e){void 0===e&&(e=!0);a={globalScope:a.globalScope,localScope:{}};for(e=
  1211. 0;e<b.params.length;e++)a.localScope[b.params[e].name.toLowerCase()]={type:"any"};r(b.body,a,c,g,!1)}function r(a,c,g,f,h){void 0===h&&(h=!0);if(null===a)throw Error("Unnexpexted Expression Syntax");var d=null;try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type){f.push(v(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"));break}"Identifier"!==a.id.type?f.push(v(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER")):(a.id.name.toLowerCase(),null===c.localScope?c.globalScope[a.id.name.toLowerCase()]=
  1212. {type:"any"}:c.localScope[a.id.name.toLowerCase()]={type:"any"});null===a.init?"":r(a.init,c,g,f,h);break;case "FunctionDeclaration":!1===h&&f.push(v(a,"SYNTAX","GLOBALFUNCTIONSONLY"));"Identifier"!==a.id.type&&f.push(v(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"));d=b("",a,c);x(a,c,g,f,h);null!==c.localScope&&f.push(v(a,"SYNTAX","GLOBALFUNCTIONSONLY"));d.isnative=!1;"Identifier"===a.id.type&&(c.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[d]});break;case "VariableDeclaration":for(var k=
  1213. 0;k<a.declarations.length;k++)r(a.declarations[k],c,g,f,h);break;case "IfStatement":null!==a.test&&(r(a.test,c,g,f,h),"AssignmentExpression"!==a.test.type&&"UpdateExpression"!==a.test.type||f.push(v(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION")));null!==a.consequent&&r(a.consequent,c,g,f,h);null!==a.alternate&&r(a.alternate,c,g,f,h);break;case "EmptyStatement":break;case "BlockStatement":if(null!==a.body)for(k=0;k<a.body.length;k++)r(a.body[k],c,g,f,h);break;case "ReturnStatement":null!==
  1214. a.argument&&r(a.argument,c,g,f,h);break;case "ForInStatement":"VariableDeclaration"===a.left.type?(1<a.left.declarations.length&&f.push(v(a,"SYNTAX","ONLY1VAR")),null!==a.left.declarations[0].init&&f.push(v(a,"SYNTAX","CANNOTDECLAREVAL"))):"Identifier"!==a.left.type&&f.push(v(a,"SYNTAX","LEFTNOTVAR"));r(a.left,c,g,f,h);r(a.right,c,g,f,h);r(a.body,c,g,f,h);break;case "ForStatement":null!==a.init&&r(a.init,c,g,f,h);null!==a.test&&r(a.test,c,g,f,h);null!==a.body&&r(a.body,c,g,f,h);null!==a.update&&r(a.update,
  1215. c,g,f,h);break;case "BreakStatement":break;case "ContinueStatement":break;case "UpdateExpression":"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?f.push(v(a,"SYNTAX","ASSIGNMENTTOVARSONLY")):("Identifier"===a.argument.type&&(d=!1,!1===g&&(null!==c.localScope&&void 0!==c.localScope[a.argument.name.toLowerCase()]&&(d=!0),void 0!==c.globalScope[a.argument.name.toLowerCase()]&&(d=!0),!1===d&&f.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+
  1216. a.argument.name+" has not been declared."}))),"MemberExpression"===a.argument.type&&r(a.argument,c,g,f,h));break;case "AssignmentExpression":"Identifier"!==a.left.type&&"MemberExpression"!==a.left.type&&f.push(v(a,"SYNTAX","ASSIGNMENTTOVARSONLY"));switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:f.push(v(a,"SYNTAX","OPERATORNOTRECOGNISED"))}r(a.right,c,g,f,h);d=!1;"Identifier"===a.left.type&&(null!==c.localScope&&void 0!==c.localScope[a.left.name.toLowerCase()]&&
  1217. (d=!0),void 0!==c.globalScope[a.left.name.toLowerCase()]&&(d=!0),!1===g&&!1===d&&f.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}));"MemberExpression"===a.left.type&&r(a.left,c,g,f,h);break;case "ExpressionStatement":r(a.expression,c,g,f,h);break;case "Identifier":var m=a.name.toLowerCase();if(null!==c.localScope&&void 0!==c.localScope[m])break;void 0===c.globalScope[m]&&!1===g&&f.push(v(a,"SYNTAX","VARIABLENOTFOUND"));
  1218. break;case "MemberExpression":r(a.object,c,g,f,h);!0===a.computed&&r(a.property,c,g,f,h);break;case "Literal":return"";case "ThisExpression":f.push(v(a,"SYNTAX","NOTSUPPORTED"));break;case "CallExpression":"Identifier"!==a.callee.type&&f.push(v(a,"SYNTAX","ONLYNODESSUPPORTED"));for(k=0;k<a.arguments.length;k++)r(a.arguments[k],c,g,f,h);var l=e(a.callee.name,a.arguments,c);!1===g&&-1===l&&f.push(v(a,"SYNTAX","NOTFOUND"));-2===l&&f.push(v(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":r(a.argument,
  1219. c,g,f,h);break;case "BinaryExpression":r(a.left,c,g,f,h);r(a.right,c,g,f,h);switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:f.push(v(a,"SYNTAX","OPERATORNOTRECOGNISED"))}break;case "LogicalExpression":switch(a.operator){case "\x26\x26":case "||":break;default:f.push(v(a,"SYNTAX","OPERATORNOTRECOGNISED"))}r(a.left,c,g,f,h);"AssignmentExpression"!==a.left.type&&"UpdateExpression"!==a.left.type||
  1220. f.push(v(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));r(a.right,c,g,f,h);"AssignmentExpression"!==a.right.type&&"UpdateExpression"!==a.right.type||f.push(v(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));break;case "ConditionalExpression":f.push(v(a,"SYNTAX","NOTSUPPORTED"));break;case "ArrayExpression":for(k=0;k<a.elements.length;k++)r(a.elements[k],c,g,f,h);break;case "Array":f.push(v(a,"SYNTAX","NOTSUPPORTED"));case "ObjectExpression":for(k=0;k<a.properties.length;k++)r(a.properties[k],
  1221. c,g,f,h);break;case "Property":"Literal"!==a.key.type&&"Identifier"!==a.key.type&&f.push(v(a,"SYNTAX","ONLYLITERAL"));"Literal"===a.key.type&&r(a.key,c,g,f,h);r(a.value,c,g,f,h);break;default:f.push(v(a,"SYNTAX","UNRECOGNISED"))}}catch(F){f.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Unnexpected Syntax"})}}function w(b,a){var c=[],d;try{switch(b.type){case "VariableDeclarator":return null!==b.init?w(b.init,a):c;case "FunctionDeclaration":return w(b.body,
  1222. a);case "VariableDeclaration":for(var g=0;g<b.declarations.length;g++)d=w(b.declarations[g],a),c=c.concat(d);return c;case "ForInStatement":return d=w(b.left,a),c=c.concat(d),d=w(b.right,a),c=c.concat(d),d=w(b.body,a),c=c.concat(d);case "ForStatement":return null!==b.init&&(d=w(b.init,a),c=c.concat(d)),null!==b.test&&(d=w(b.test,a),c=c.concat(d)),null!==b.body&&(d=w(b.body,a),c=c.concat(d)),null!==b.update&&(d=w(b.update,a),c=c.concat(d)),c;case "IfStatement":return d=w(b.test,a),c=c.concat(d),null!==
  1223. b.consequent&&(d=w(b.consequent,a),c=c.concat(d)),null!==b.alternate&&(d=w(b.alternate,a),c=c.concat(d)),c;case "EmptyStatement":return c;case "BlockStatement":for(g=0;g<b.body.length;g++)d=w(b.body[g],a),c=c.concat(d);return c;case "ReturnStatement":return null!==b.argument?w(b.argument,a):c;case "UpdateExpression":return w(b.argument,a);case "AssignmentExpression":return c=w(b.left,a),c=c.concat(w(b.right,a));case "ExpressionStatement":return w(b.expression,a);case "BreakStatement":return c;case "ContinueStatement":return c;
  1224. case "Compound":return c;case "Identifier":return c;case "MemberExpression":return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(g=0;g<b.arguments.length;g++)d=w(b.arguments[g],a),c=c.concat(d);c.push(b.callee.name.toLowerCase());return c;case "ArrayExpression":for(g=0;g<b.elements.length;g++)d=w(b.elements[g],a),c=c.concat(d);return c;case "UnaryExpression":return w(b.argument,a);case "ObjectExpression":for(g=0;g<b.properties.length;g++)d=w(b.properties[g],a),
  1225. c=c.concat(d);return c;case "Property":return w(b.value,a);case "BinaryExpression":return d=w(b.left,a),c=c.concat(d),d=w(b.right,a),c=c.concat(d);case "LogicalExpression":return d=w(b.left,a),c=c.concat(d),d=w(b.right,a),c=c.concat(d);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(A){throw A;}}Object.defineProperty(f,"__esModule",{value:!0});f.functionDecls={concatenate:{min:"0",max:"*",av:"a"},split:{min:"2",max:"4",av:"a"},guid:{min:"0",max:"1",av:"a"},today:{min:"0",
  1226. max:"0",av:"a"},now:{min:"0",max:"0",av:"a"},timestamp:{min:"0",max:"0",av:"a"},day:{min:"1",max:"1",av:"a"},month:{min:"1",max:"1",av:"a"},year:{min:"1",max:"1",av:"a"},hour:{min:"1",max:"1",av:"a"},second:{min:"1",max:"1",av:"a"},millisecond:{min:"1",max:"1",av:"a"},minute:{min:"1",max:"1",av:"a"},weekday:{min:"1",max:"1",av:"a"},toutc:{min:"1",max:"1",av:"a"},tolocal:{min:"1",max:"1",av:"a"},date:{min:"0",max:"7",av:"a"},datediff:{min:"2",max:"3",av:"a"},dateadd:{min:"2",max:"3",av:"a"},trim:{min:"1",
  1227. max:"1",av:"a"},text:{min:"1",max:"2",av:"a"},left:{min:"2",max:"2",av:"a"},right:{min:"2",max:"2",av:"a"},mid:{min:"2",max:"3",av:"a"},upper:{min:"1",max:"1",av:"a"},proper:{min:"1",max:"2",av:"a"},lower:{min:"1",max:"1",av:"a"},find:{min:"2",max:"3",av:"a"},iif:{min:"3",max:"3",av:"a"},decode:{min:"2",max:"*",av:"a"},when:{min:"2",max:"*",av:"a"},defaultvalue:{min:"2",max:"2",av:"a"},isempty:{min:"1",max:"1",av:"a"},domaincode:{min:"3",max:"4",av:"a"},domainname:{min:"2",max:"4",av:"a"},polygon:{min:"1",
  1228. max:"1",av:"a"},point:{min:"1",max:"1",av:"a"},polyline:{min:"1",max:"1",av:"a"},extent:{min:"1",max:"1",av:"a"},multipoint:{min:"1",max:"1",av:"a"},geometry:{min:"1",max:"1",av:"a"},count:{min:"0",max:"*",av:"a"},number:{min:"1",max:"2",av:"a"},acos:{min:"1",max:"1",av:"a"},asin:{min:"1",max:"1",av:"a"},atan:{min:"1",max:"1",av:"a"},atan2:{min:"2",max:"2",av:"a"},ceil:{min:"1",max:"2",av:"a"},floor:{min:"1",max:"2",av:"a"},round:{min:"1",max:"2",av:"a"},cos:{min:"1",max:"1",av:"a"},exp:{min:"1",
  1229. max:"1",av:"a"},log:{min:"1",max:"1",av:"a"},min:{min:"0",max:"*",av:"a"},constrain:{min:"3",max:"3",av:"a"},console:{min:"0",max:"*",av:"a"},max:{min:"0",max:"*",av:"a"},pow:{min:"2",max:"2",av:"a"},random:{min:"0",max:"0",av:"a"},sqrt:{min:"1",max:"1",av:"a"},sin:{min:"1",max:"1",av:"a"},tan:{min:"1",max:"1",av:"a"},abs:{min:"1",max:"1",av:"a"},isnan:{min:"1",max:"1",av:"a"},stdev:{min:"0",max:"*",av:"a"},average:{min:"0",max:"*",av:"a"},mean:{min:"0",max:"*",av:"a"},sum:{min:"0",max:"*",av:"a"},
  1230. variance:{min:"0",max:"*",av:"a"},distinct:{min:"0",max:"*",av:"a"},first:{min:"1",max:"1",av:"a"},top:{min:"2",max:"2",av:"a"},"boolean":{min:"1",max:"1",av:"a"},dictionary:{min:"0",max:"*",av:"a"},"typeof":{min:"1",max:"1",av:"a"},reverse:{min:"1",max:"1",av:"a"},replace:{min:"3",max:"4",av:"a"},sort:{min:"1",max:"2",av:"a"},feature:{min:"1",max:"*",av:"a"},haskey:{min:"2",max:"2",av:"a"},indexof:{min:"2",max:"2",av:"a"},disjoint:{min:"2",max:"2",av:"a"},intersects:{min:"2",max:"2",av:"a"},touches:{min:"2",
  1231. max:"2",av:"a"},crosses:{min:"2",max:"2",av:"a"},within:{min:"2",max:"2",av:"a"},contains:{min:"2",max:"2",av:"a"},overlaps:{min:"2",max:"2",av:"a"},equals:{min:"2",max:"2",av:"a"},relate:{min:"3",max:"3",av:"a"},intersection:{min:"2",max:"2",av:"a"},union:{min:"1",max:"2",av:"a"},difference:{min:"2",max:"2",av:"a"},symmetricdifference:{min:"2",max:"2",av:"a"},clip:{min:"2",max:"2",av:"a"},cut:{min:"2",max:"2",av:"a"},area:{min:"1",max:"2",av:"a"},areageodetic:{min:"1",max:"2",av:"a"},length:{min:"1",
  1232. max:"2",av:"a"},lengthgeodetic:{min:"1",max:"2",av:"a"},distance:{min:"2",max:"3",av:"a"},densify:{min:"2",max:"3",av:"a"},densifygeodetic:{min:"2",max:"3",av:"a"},generalize:{min:"2",max:"4",av:"a"},buffer:{min:"2",max:"3",av:"a"},buffergeodetic:{min:"2",max:"3",av:"a"},offset:{min:"2",max:"6",av:"a"},rotate:{min:"2",max:"3",av:"a"},issimple:{min:"1",max:"1",av:"a"},simplify:{min:"1",max:"1",av:"a"},centroid:{min:"1",max:"1",av:"a"},multiparttosinglepart:{min:"1",max:"1",av:"a"},setgeometry:{min:"2",
  1233. max:"2",av:"a"}};f.addFunctionDeclaration=function(b,a){var c=f.functionDecls[b.name.toLowerCase()];void 0===c?f.functionDecls[b.name.toLowerCase()]={min:b.min,max:b.max,av:a}:"a"===c.av&&"f"===a?(void 0!==c.fmin&&delete c.fmin,void 0!==c.fmax&&delete c.fmax,c.fmin=b.min,c.fmax=b.max):"f"===c.av&&"a"===a?(void 0===c.fmin&&(c.fmin=c.min),void 0===c.fmax&&(c.fmax=c.max),c.min=b.min,c.max=b.max,c.av="a"):"f"===a?(c.fmin=b.min,c.fmax=b.max):"a"===a&&(c.min=b.min,c.max=b.max)};f.checkFunctionSignature=
  1234. p;f.findFunction=e;f.validateLanguageNode=n;f.testValidityOfExpression=l;f.referencesMemberImpl=h;f.referencesMember=function(b,a){return!0===h(b.body[0].body,a.toLowerCase())?!0:!1};f.referencesFunctionImpl=c;f.referencesFunction=function(b,a){return!0===c(b.body[0].body,a)?!0:!1};f.findFieldLiteralsImpl=m;f.findFieldLiterals=function(b,a){return m(b.body[0].body,a)};f.extractFunctionDeclaration=b;f.validateFunction=g;f.constructGlobalScope=t;f.validateScript=function(b,a,c){void 0===c&&(c="full");
  1235. a={globalScope:t(a.vars,f.functionDecls,a.customFunctions,c),localScope:null};return l(b.body[0].body,a)};f.validateLanguage=function(b){return"BlockStatement"!==b.body[0].body.type?"Invalid formula content.":n(b.body[0].body)};f.nodeErrorMessage=u;f.makeError=v;f.extractAllIssuesInFunction=x;f.extractAllIssues=r;f.checkScript=function(b,a,c,g){void 0===g&&(g="full");var d=[];if("BlockStatement"!==b.body[0].body.type)return[{line:0,character:0,reason:"Invalid Body"}];if(null===a||void 0===a)a={vars:{},
  1236. customFunctions:[]};a={globalScope:t(a.vars,f.functionDecls,a.customFunctions,g),localScope:null};try{r(b.body[0].body,a,c,d)}catch(A){}return d};f.findFunctionCallsImpl=w;f.findFunctionCalls=function(b,a){return w(b.body[0].body,a)}})},"esri/arcade/functions/date":function(){define(["require","exports","../../moment","../languageUtils"],function(a,f,p,e){function n(a){return null===a?a:isNaN(a.getTime())?null:a}Object.defineProperty(f,"__esModule",{value:!0});f.registerFunctions=function(a,f){a.today=
  1237. function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,0,0);b=new Date;b.setHours(0,0,0,0);return b})};a.now=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,0,0);return new Date})};a.timestamp=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,0,0);b=new Date;return b=new Date(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds())})};a.toutc=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);
  1238. return null===b?null:new Date(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds())})};a.tolocal=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?null:p.utc([b.getFullYear(),b.getMonth(),b.getDate(),b.getHours(),b.getMinutes(),b.getSeconds(),b.getMilliseconds()]).toDate()})};a.day=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getDate()})};
  1239. a.month=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getMonth()})};a.year=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getFullYear()})};a.hour=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getHours()})};a.second=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getSeconds()})};a.millisecond=
  1240. function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getMilliseconds()})};a.minute=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getMinutes()})};a.weekday=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,1,1);b=e.toDate(c[0]);return null===b?NaN:b.getDay()})};a.date=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,0,7);if(3===c.length)return n(new Date(e.toNumber(c[0]),e.toNumber(c[1]),e.toNumber(c[2]),
  1241. 0,0,0,0));if(4===c.length)return n(new Date(e.toNumber(c[0]),e.toNumber(c[1]),e.toNumber(c[2]),e.toNumber(c[3]),0,0,0));if(5===c.length)return n(new Date(e.toNumber(c[0]),e.toNumber(c[1]),e.toNumber(c[2]),e.toNumber(c[3]),e.toNumber(c[4]),0,0));if(6===c.length)return n(new Date(e.toNumber(c[0]),e.toNumber(c[1]),e.toNumber(c[2]),e.toNumber(c[3]),e.toNumber(c[4]),e.toNumber(c[5]),0));if(7===c.length)return n(new Date(e.toNumber(c[0]),e.toNumber(c[1]),e.toNumber(c[2]),e.toNumber(c[3]),e.toNumber(c[4]),
  1242. e.toNumber(c[5]),e.toNumber(c[6])));if(2===c.length){b=e.toString(c[1]);if(""===b)return null;b=e.standardiseDateFormat(b);c=p(e.toString(c[0]),b,!0);return!0===c.isValid()?c.toDate():null}if(1===c.length){if(e.isString(c[0])&&""===c[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;b=e.toNumber(c[0]);return!1===isNaN(b)?n(new Date(b)):e.toDate(c[0])}if(0===c.length)return new Date})};a.datediff=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,2,3);b=e.toDateM(c[0]);a=e.toDateM(c[1]);
  1243. if(null===b||null===a)return NaN;switch(e.toString(c[2]).toLowerCase()){case "days":case "day":case "d":return b.diff(a,"days",!0);case "months":case "month":return b.diff(a,"months",!0);case "minutes":case "minute":case "m":return"M"===c[2]?b.diff(a,"months",!0):b.diff(a,"minutes",!0);case "seconds":case "second":case "s":return b.diff(a,"seconds",!0);case "milliseconds":case "millisecond":case "ms":return b.diff(a);case "hours":case "hour":case "h":return b.diff(a,"hours",!0);case "years":case "year":case "y":return b.diff(a,
  1244. "years",!0);default:return b.diff(a)}})};a.dateadd=function(a,h){return f(a,h,function(b,a,c){e.pcCheck(c,2,3);b=e.toDateM(c[0]);if(null===b)return null;a="milliseconds";switch(e.toString(c[2]).toLowerCase()){case "days":case "day":case "d":a="days";break;case "months":case "month":a="months";break;case "minutes":case "minute":case "m":a="M"===c[2]?"months":"minutes";break;case "seconds":case "second":case "s":a="seconds";break;case "milliseconds":case "millisecond":case "ms":a="milliseconds";break;
  1245. case "hours":case "hour":case "h":a="hours";break;case "years":case "year":case "y":a="years"}b.add(e.toNumber(c[1]),a);return b.toDate()})}}})},"esri/arcade/functions/geometry":function(){define("require exports ../Dictionary ../Feature ../languageUtils ../../geometry/Extent ../../geometry/Geometry ../../geometry/Multipoint ../../geometry/Point ../../geometry/Polygon ../../geometry/Polyline ../../geometry/support/jsonUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){Object.defineProperty(f,"__esModule",
  1246. {value:!0});f.registerFunctions=function(a,f){a.polygon=function(a,c){return f(a,c,function(c,g,d){n.pcCheck(d,1,1);c=null;if(d[0]instanceof p){if(c=n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===c instanceof b)throw Error("Illegal Parameter");}else c=d[0]instanceof b?t.fromJSON(d[0].toJSON()):n.fixSpatialReference(new b(JSON.parse(d[0])),a.spatialReference);if(null!==c&&!1===c.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
  1247. return n.fixNullGeometry(c)})};a.polyline=function(b,a){return f(b,a,function(a,c,d){n.pcCheck(d,1,1);a=null;if(d[0]instanceof p){if(a=n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),b.spatialReference),!1===a instanceof g)throw Error("Illegal Parameter");}else a=d[0]instanceof g?t.fromJSON(d[0].toJSON()):n.fixSpatialReference(new g(JSON.parse(d[0])),b.spatialReference);if(null!==a&&!1===a.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
  1248. return n.fixNullGeometry(a)})};a.point=function(b,a){return f(b,a,function(a,c,d){n.pcCheck(d,1,1);a=null;if(d[0]instanceof p){if(a=n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),b.spatialReference),!1===a instanceof m)throw Error("Illegal Parameter");}else a=d[0]instanceof m?t.fromJSON(d[0].toJSON()):n.fixSpatialReference(new m(JSON.parse(d[0])),b.spatialReference);if(null!==a&&!1===a.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
  1249. return n.fixNullGeometry(a)})};a.multipoint=function(b,a){return f(b,a,function(a,g,d){n.pcCheck(d,1,1);a=null;if(d[0]instanceof p){if(a=n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),b.spatialReference),!1===a instanceof c)throw Error("Illegal Parameter");}else a=d[0]instanceof c?t.fromJSON(d[0].toJSON()):n.fixSpatialReference(new c(JSON.parse(d[0])),b.spatialReference);if(null!==a&&!1===a.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
  1250. return n.fixNullGeometry(a)})};a.extent=function(a,h){return f(a,h,function(f,h,d){n.pcCheck(d,1,1);f=null;d[0]instanceof p?f=n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),a.spatialReference):d[0]instanceof m?(f={xmin:d[0].x,ymin:d[0].y,xmax:d[0].x,ymax:d[0].y,spatialReference:d[0].spatialReference.toJSON()},d[0].hasZ?(f.zmin=d[0].z,f.zmax=d[0].z):d[0].hasM&&(f.mmin=d[0].m,f.mmax=d[0].m),f=t.fromJSON(f)):f=d[0]instanceof b?t.fromJSON(d[0].extent.toJSON()):d[0]instanceof g?t.fromJSON(d[0].extent.toJSON()):
  1251. d[0]instanceof c?t.fromJSON(d[0].extent.toJSON()):d[0]instanceof l?t.fromJSON(d[0].toJSON()):n.fixSpatialReference(new l(JSON.parse(d[0])),a.spatialReference);if(null!==f&&!1===f.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return n.fixNullGeometry(f)})};a.geometry=function(b,a){return f(b,a,function(a,c,d){n.pcCheck(d,1,1);a=null;a=d[0]instanceof e?n.fixSpatialReference(d[0].geometry(),b.spatialReference):
  1252. d[0]instanceof p?n.fixSpatialReference(e.parseGeometryFromDictionary(d[0]),b.spatialReference):n.fixSpatialReference(t.fromJSON(JSON.parse(d[0])),b.spatialReference);if(null!==a&&!1===a.spatialReference.equals(b.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return n.fixNullGeometry(a)})};a.setgeometry=function(b,a){return f(b,a,function(b,a,c){n.pcCheck(c,2,2);if(c[0]instanceof e){if(!0===c[0].immutable)throw Error("Feature is Immutable");
  1253. if(c[1]instanceof h||null===c[1])c[0]._geometry=c[1];else throw Error("Illegal Argument");}else throw Error("Illegal Argument");return n.voidOperation})};a.feature=function(b,a){return f(b,a,function(a,c,d){if(0===d.length)throw Error("Missing Parameters");a=null;if(1===d.length)if(n.isString(d[0]))a=e.fromJson(JSON.parse(d[0]));else if(d[0]instanceof e)a=e.createFromArcadeFeature(d[0]);else if(d[0]instanceof h)a=e.createFromGraphicLikeObject(d[0],null,null);else if(d[0]instanceof p)a=d[0].hasField("geometry")?
  1254. d[0].field("geometry"):null,c=d[0].hasField("attributes")?d[0].field("attributes"):null,null!==a&&a instanceof p&&(a=e.parseGeometryFromDictionary(a)),null!==c&&(c=e.parseAttributesFromDictionary(c)),a=e.createFromGraphicLikeObject(a,c,null);else throw Error("Illegal Argument");else if(2===d.length){c=a=null;if(null!==d[0])if(d[0]instanceof h)a=d[0];else if(a instanceof p)a=e.parseGeometryFromDictionary(d[0]);else throw Error("Illegal Argument");if(null!==d[1])if(d[1]instanceof p)c=e.parseAttributesFromDictionary(d[1]);
  1255. else throw Error("Illegal Argument");a=e.createFromGraphicLikeObject(a,c)}else{a=null;c={};if(null!==d[0])if(d[0]instanceof h)a=d[0];else if(a instanceof p)a=e.parseGeometryFromDictionary(d[0]);else throw Error("Illegal Argument");for(var g=1;g<d.length;g+=2){var f=n.toString(d[g]),m=d[g+1];if(null===m||void 0===m||n.isString(m)||isNaN(m)||n.isDate(m)||n.isNumber(m)||n.isBoolean(m)){if(n.isFunctionParameter(m)||!1===n.isSimpleType(m))throw Error("Illegal Argument");c[f]=m===n.voidOperation?null:m}else throw Error("Illegal Argument");
  1256. }a=e.createFromGraphicLikeObject(a,c,null)}a.geometry=n.fixSpatialReference(a.geometry,b.spatialReference);a.immutable=!1;return a})};a.dictionary=function(b,a){return f(b,a,function(b,a,c){if(0===c.length)throw Error("Missing Parameters");if(0!==c.length%2)throw Error("Missing Parameters");b={};for(a=0;a<c.length;a+=2){var d=n.toString(c[a]),g=c[a+1];if(null===g||void 0===g||n.isString(g)||isNaN(g)||n.isDate(g)||n.isNumber(g)||n.isBoolean(g)||n.isArray(g)||n.isImmutableArray(g)){if(n.isFunctionParameter(g))throw Error("Illegal Argument");
  1257. b[d]=g===n.voidOperation?null:g}else throw Error("Illegal Argument");}c=new p(b);c.immutable=!1;return c})};a.haskey=function(b,a){return f(b,a,function(b,a,c){n.pcCheck(c,2,2);b=n.toString(c[1]);if(c[0]instanceof e||c[0]instanceof p)return c[0].hasField(b);throw Error("Illegal Argument");})};a.indexof=function(b,a){return f(b,a,function(b,a,c){n.pcCheck(c,2,2);b=c[1];if(n.isArray(c[0])){for(a=0;a<c[0].length;a++)if(n.equalityTest(b,c[0][a]))return a;return-1}if(n.isImmutableArray(c[0])){var d=c[0].length();
  1258. for(a=0;a<d;a++)if(n.equalityTest(b,c[0].get(a)))return a;return-1}throw Error("Illegal Argument");})}}})},"esri/arcade/functions/geomsync":function(){define("require exports ../../kernel ../kernel ../languageUtils ./centroid ../../geometry/Extent ../../geometry/Geometry ../../geometry/Multipoint ../../geometry/Point ../../geometry/Polygon ../../geometry/Polyline ../../geometry/support/jsonUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u){function v(b){return w?b.clone():u.fromJSON(b.toJSON())}
  1259. function x(b){return 0===p.version.indexOf("4.")?g.fromExtent(b):new g({spatialReference:b.spatialReference,rings:[[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]]]})}Object.defineProperty(f,"__esModule",{value:!0});var r=null,w=0===p.version.indexOf("4.");f.setGeometryEngine=function(b){r=b};f.registerFunctions=function(a,d){function f(b){n.pcCheck(b,2,2);if(!(b[0]instanceof c&&b[1]instanceof c||b[0]instanceof c&&null===b[1]||b[1]instanceof c&&null===b[0]||null===
  1260. b[0]&&null===b[1]))throw Error("Illegal Argument");}a.disjoint=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!0:r.disjoint(c[0],c[1])})};a.intersects=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!1:r.intersects(c[0],c[1])})};a.touches=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!1:r.touches(c[0],c[1])})};a.crosses=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?
  1261. !1:r.crosses(c[0],c[1])})};a.within=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!1:r.within(c[0],c[1])})};a.contains=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!1:r.contains(c[0],c[1])})};a.overlaps=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?!1:r.overlaps(c[0],c[1])})};a.equals=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,2);return d[0]===d[1]?!0:d[0]instanceof c&&d[1]instanceof
  1262. c?r.equals(d[0],d[1]):n.isDate(d[0])&&n.isDate(d[1])?d[0].getTime()===d[1].getTime():!1})};a.relate=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,3,3);if(d[0]instanceof c&&d[1]instanceof c)return r.relate(d[0],d[1],n.toString(d[2]));if(d[0]instanceof c&&null===d[1]||d[1]instanceof c&&null===d[0]||null===d[0]&&null===d[1])return!1;throw Error("Illegal Argument");})};a.intersection=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]||null===c[1]?null:r.intersect(c[0],c[1])})};
  1263. a.union=function(b,a){return d(b,a,function(a,d,g){a=[];if(0===g.length)throw Error("Function called with wrong number of Parameters");if(1===g.length)if(n.isArray(g[0]))for(d=0;d<g[0].length;d++){if(null!==g[0][d])if(g[0][d]instanceof c)a.push(g[0][d]);else throw Error("Illegal Argument");}else if(n.isImmutableArray(g[0]))for(g=g[0].toArray(),d=0;d<g.length;d++){if(null!==g[d])if(g[d]instanceof c)a.push(g[d]);else throw Error("Illegal Argument");}else{if(g[0]instanceof c)return n.fixSpatialReference(v(g[0]),
  1264. b.spatialReference);if(null===g[0])return null;throw Error("Illegal Argument");}else for(d=0;d<g.length;d++)if(null!==g[d])if(g[d]instanceof c)a.push(g[d]);else throw Error("Illegal Argument");return 0===a.length?null:r.union(a)})};a.difference=function(b,a){return d(b,a,function(b,a,c){f(c);return null!==c[0]&&null===c[1]?v(c[0]):null===c[0]?null:r.difference(c[0],c[1])})};a.symmetricdifference=function(b,a){return d(b,a,function(b,a,c){f(c);return null===c[0]&&null===c[1]?null:null===c[0]?v(c[1]):
  1265. null===c[1]?v(c[0]):r.symmetricDifference(c[0],c[1])})};a.clip=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,2);if(!(d[1]instanceof h)&&null!==d[1])throw Error("Illegal Argument");if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");return null===d[1]?null:r.clip(d[0],d[1])})};a.cut=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,2);if(!(d[1]instanceof t)&&null!==d[1])throw Error("Illegal Argument");if(null===d[0])return[];if(!(d[0]instanceof c))throw Error("Illegal Argument");
  1266. return null===d[1]?[v(d[0])]:r.cut(d[0],d[1])})};a.area=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return r.planarArea(d[0],e.convertSquareUnitsToCode(n.defaultUndefined(d[1],-1)))})};a.areageodetic=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return r.geodesicArea(d[0],e.convertSquareUnitsToCode(n.defaultUndefined(d[1],
  1267. -1)))})};a.length=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return r.planarLength(d[0],e.convertLinearUnitsToCode(n.defaultUndefined(d[1],-1)))})};a.lengthgeodetic=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,1,2);if(null===d[0])return 0;if(!(d[0]instanceof c))throw Error("Illegal Argument");return r.geodesicLength(d[0],e.convertLinearUnitsToCode(n.defaultUndefined(d[1],-1)))})};a.distance=function(b,
  1268. a){return d(b,a,function(b,a,d){n.pcCheck(d,2,3);if(!(d[0]instanceof c))throw Error("Illegal Argument");if(!(d[1]instanceof c))throw Error("Illegal Argument");return r.distance(d[0],d[1],e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1)))})};a.densify=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");b=n.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");if(0>=b)throw Error("Illegal Argument");
  1269. return d[0]instanceof g||d[0]instanceof t?r.densify(d[0],b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1))):d[0]instanceof h?r.densify(x(d[0]),b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1))):d[0]})};a.densifygeodetic=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");b=n.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");if(0>=b)throw Error("Illegal Argument");return d[0]instanceof
  1270. g||d[0]instanceof t?r.geodesicDensify(d[0],b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1))):d[0]instanceof h?r.geodesicDensify(x(d[0]),b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1))):d[0]})};a.generalize=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,4);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");b=n.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");return r.generalize(d[0],b,n.toBoolean(n.defaultUndefined(d[2],!0)),e.convertLinearUnitsToCode(n.defaultUndefined(d[3],
  1271. -1)))})};a.buffer=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");b=n.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");return 0===b?v(d[0]):r.buffer(d[0],b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1)))})};a.buffergeodetic=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof c))throw Error("Illegal Argument");b=n.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");
  1272. return 0===b?v(d[0]):r.geodesicBuffer(d[0],b,e.convertLinearUnitsToCode(n.defaultUndefined(d[2],-1)))})};a.offset=function(b,a){return d(b,a,function(b,a,c){n.pcCheck(c,2,6);if(null===c[0])return null;if(!(c[0]instanceof g||c[0]instanceof t))throw Error("Illegal Argument");b=n.toNumber(c[1]);if(isNaN(b))throw Error("Illegal Argument");a=n.toNumber(n.defaultUndefined(c[4],10));if(isNaN(a))throw Error("Illegal Argument");var d=n.toNumber(n.defaultUndefined(c[5],0));if(isNaN(d))throw Error("Illegal Argument");
  1273. return r.offset(c[0],b,e.convertLinearUnitsToCode(n.defaultUndefined(c[2],-1)),n.toString(n.defaultUndefined(c[3],"round")).toLowerCase(),a,d)})};a.rotate=function(a,e){return d(a,e,function(a,d,e){n.pcCheck(e,2,3);a=e[0];if(null===a)return null;if(!(a instanceof c))throw Error("Illegal Argument");a instanceof h&&(a=g.fromExtent(a));d=n.toNumber(e[1]);if(isNaN(d))throw Error("Illegal Argument");e=n.defaultUndefined(e[2],null);if(null===e)return r.rotate(a,d);if(e instanceof b)return r.rotate(a,d,
  1274. e);throw Error("Illegal Argument");})};a.centroid=function(a,e){return d(a,e,function(d,e,f){n.pcCheck(f,1,1);if(null===f[0])return null;if(!(f[0]instanceof c))throw Error("Illegal Argument");return f[0]instanceof b?n.fixSpatialReference(v(f[0]),a.spatialReference):f[0]instanceof g?w?f[0].centroid:f[0].getCentroid():f[0]instanceof t?l.centroidPolyline(f[0]):f[0]instanceof m?l.centroidMultiPoint(f[0]):f[0]instanceof h?w?f[0].center:f[0].getExtent().getCenter():null})};a.multiparttosinglepart=function(a,
  1275. e){return d(a,e,function(d,e,f){n.pcCheck(f,1,1);e=[];if(null===f[0])return null;if(!(f[0]instanceof c))throw Error("Illegal Argument");if(f[0]instanceof b||f[0]instanceof h)return[n.fixSpatialReference(v(f[0]),a.spatialReference)];d=r.simplify(f[0]);if(d instanceof g){e=[];var k=[];for(f=0;f<d.rings.length;f++)if(d.isClockwise(d.rings[f])){var l=u.fromJSON({rings:[d.rings[f]],hasZ:d.hasZ,hasM:d.hasM,spatialReference:w?d.spatialReference.toJSON():d.spatialReference.toJson()});e.push(l)}else k.push({ring:d.rings[f],
  1276. pt:d.getPoint(f,0)});for(d=0;d<k.length;d++)for(f=0;f<e.length;f++)if(e[f].contains(k[d].pt)){e[f].addRing(k[d].ring);break}return e}if(d instanceof t){e=[];for(f=0;f<d.paths.length;f++)k=u.fromJSON({paths:[d.paths[f]],hasZ:d.hasZ,hasM:d.hasM,spatialReference:w?d.spatialReference.toJSON():d.spatialReference.toJson()}),e.push(k);return e}if(f[0]instanceof m){d=n.fixSpatialReference(v(f[0]),a.spatialReference);for(f=0;f<d.points.length;f++)e.push(d.getPoint(f));return e}return null})};a.issimple=function(b,
  1277. a){return d(b,a,function(b,a,d){n.pcCheck(d,1,1);if(null===d[0])return!0;if(d[0]instanceof c)return r.isSimple(d[0]);throw Error("Illegal Argument");})};a.simplify=function(b,a){return d(b,a,function(b,a,d){n.pcCheck(d,1,1);if(null===d[0])return null;if(d[0]instanceof c)return r.simplify(d[0]);throw Error("Illegal Argument");})}}})},"esri/arcade/kernel":function(){define(["require","exports","../geometry/Extent"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.errback=function(a){return function(e){a.reject(e)}};
  1278. f.callback=function(a,f){return function(){try{a.apply(null,arguments)}catch(l){f.reject(l)}}};f.convertSquareUnitsToCode=function(a){if(void 0===a)return null;if("number"===typeof a)return a;switch(a.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square_meters":return 109404;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 109413;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 109414;
  1279. case "acres":case "acre":case "ac":return 109402;case "hectares":case "hectare":case "ha":return 109401;case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 109442;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 109405}return null};f.shapeExtent=function(a){if(null===a)return null;switch(a.type){case "polygon":case "multipoint":case "polyline":return a.extent;case "point":return new p({xmin:a.x,
  1280. ymin:a.y,xmax:a.x,ymax:a.y,spatialReference:a.spatialReference});case "extent":return a}return null};f.convertLinearUnitsToCode=function(a){if(void 0===a)return null;if("number"===typeof a||"number"===typeof a)return a;switch(a.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square-meters":return 9001;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 9035;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 9036;
  1281. case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 9096;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 9002}return null};f.sameGeomType=function(a,f){return a===f||"point"===a&&"esriGeometryPoint"===f||"polyline"===a&&"esriGeometryPolyline"===f||"polygon"===a&&"esriGeometryPolygon"===f||"extent"===a&&"esriGeometryEnvelope"===f||"multipoint"===a&&"esriGeometryMultipoint"===
  1282. f||"point"===f&&"esriGeometryPoint"===a||"polyline"===f&&"esriGeometryPolyline"===a||"polygon"===f&&"esriGeometryPolygon"===a||"extent"===f&&"esriGeometryEnvelope"===a||"multipoint"===f&&"esriGeometryMultipoint"===a?!0:!1}})},"esri/arcade/functions/centroid":function(){define(["require","exports","../../kernel","../../geometry/Point"],function(a,f,p,e){function n(a,e,b){var c={x:0,y:0};e&&(c.z=0);b&&(c.m=0);for(var f=0,h=a[0],m=0;m<a.length;m++){var n=a[m],p;a:if(n.length!==h.length)p=!1;else{for(p=
  1283. 0;p<n.length;p++)if(n[p]!==h[p]){p=!1;break a}p=!0}if(!1===p){p=l(h,n,e);var w=n,q=e,d=b,k={x:(h[0]+w[0])/2,y:(h[1]+w[1])/2};q&&(k.z=(h[2]+w[2])/2);q&&d?k.m=(h[3]+w[3])/2:d&&(k.m=(h[2]+w[2])/2);h=k;h.x*=p;h.y*=p;c.x+=h.x;c.y+=h.y;e&&(h.z*=p,c.z+=h.z);b&&(h.m*=p,c.m+=h.m);f+=p;h=n}}0<f?(c.x/=f,c.y/=f,e&&(c.z/=f),b&&(c.m/=f)):(c.x=a[0][0],c.y=a[0][1],e&&(c.z=a[0][2]),b&&e?c.m=a[0][3]:b&&(c.m=a[0][2]));return c}function l(a,e,b){var c=e[0]-a[0];a=e[1]-a[1];return b?(e=e[2]-e[2],Math.sqrt(c*c+a*a+e*e)):
  1284. Math.sqrt(c*c+a*a)}Object.defineProperty(f,"__esModule",{value:!0});var h=0===p.version.indexOf("4.");f.centroidPolyline=function(a){for(var c={x:0,y:0,spatialReference:h?a.spatialReference.toJSON():a.spatialReference.toJson()},b={x:0,y:0,spatialReference:h?a.spatialReference.toJSON():a.spatialReference.toJson()},g=0,f=0,p=0;p<a.paths.length;p++)if(0!==a.paths[p].length){var v;v=a.paths[p];var x=!0===a.hasZ;if(1>=v.length)v=0;else{for(var r=0,w=1;w<v.length;w++)r+=l(v[w-1],v[w],x);v=r}0===v?(x=n(a.paths[p],
  1285. !0===a.hasZ,!0===a.hasM),c.x+=x.x,c.y+=x.y,!0===a.hasZ&&(c.z+=x.z),!0===a.hasM&&(c.m+=x.m),++g):(x=n(a.paths[p],!0===a.hasZ,!0===a.hasM),b.x+=x.x*v,b.y+=x.y*v,!0===a.hasZ&&(b.z+=x.z*v),!0===a.hasM&&(b.m+=x.m*v),f+=v)}return 0<f?(b.x/=f,b.y/=f,!0===a.hasZ&&(b.z/=f),!0===a.hasM&&(b.m/=f),new e(b)):0<g?(c.x/=g,c.y/=g,!0===a.hasZ&&(b.z/=g),!0===a.hasM&&(c.m/=g),new e(c)):null};f.centroidMultiPoint=function(a){if(0===a.points.length)return null;for(var c=0,b=0,g=0,f=0,l=0;l<a.points.length;l++){var n=
  1286. a.getPoint(l);!0===n.hasZ&&(g+=n.z);!0===n.hasM&&(f+=n.m);c+=n.x;b+=n.y;f+=n.m}c={x:c/a.points.length,y:b/a.points.length,spatialReference:null};c.spatialReference=h?a.spatialReference.toJSON():a.spatialReference.toJson();!0===a.hasZ&&(c.z=g/a.points.length);!0===a.hasM&&(c.m=f/a.points.length);return new e(c)}})},"esri/arcade/functions/maths":function(){define(["require","exports","dojo/number","../languageUtils"],function(a,f,p,e){function n(a,e,c){if("undefined"===typeof c||0===+c)return Math[a](e);
  1287. e=+e;c=+c;if(isNaN(e)||"number"!==typeof c||0!==c%1)return NaN;e=e.toString().split("e");e=Math[a](+(e[0]+"e"+(e[1]?+e[1]-c:-c)));e=e.toString().split("e");return+(e[0]+"e"+(e[1]?+e[1]+c:c))}Object.defineProperty(f,"__esModule",{value:!0});f.registerFunctions=function(a,f){function c(a,b,c){a=e.toNumber(a);return isNaN(a)?a:isNaN(b)||isNaN(c)||b>c?NaN:a<b?b:a>c?c:a}a.number=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,2);b=c[0];return e.isNumber(b)?b:null===b?0:e.isDate(b)||e.isBoolean(b)?
  1288. Number(b):e.isArray(b)?NaN:""===b||void 0===b?Number(b):e.isString(b)?void 0!==c[1]?(c=e.multiReplace(c[1],"\u2030",""),c=e.multiReplace(c,"\u00a4",""),p.parse(b,{pattern:c})):Number(b.trim()):Number(b)})};a.abs=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.abs(e.toNumber(c[0]))})};a.acos=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.acos(e.toNumber(c[0]))})};a.asin=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.asin(e.toNumber(c[0]))})};
  1289. a.atan=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.atan(e.toNumber(c[0]))})};a.atan2=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,2,2);return Math.atan2(e.toNumber(c[0]),e.toNumber(c[1]))})};a.ceil=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,2);return 2===c.length?(b=e.toNumber(c[1]),isNaN(b)&&(b=0),n("ceil",e.toNumber(c[0]),-1*b)):Math.ceil(e.toNumber(c[0]))})};a.round=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,2);return 2===c.length?
  1290. (b=e.toNumber(c[1]),isNaN(b)&&(b=0),n("round",e.toNumber(c[0]),-1*b)):Math.round(e.toNumber(c[0]))})};a.floor=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,2);return 2===c.length?(b=e.toNumber(c[1]),isNaN(b)&&(b=0),n("floor",e.toNumber(c[0]),-1*b)):Math.floor(e.toNumber(c[0]))})};a.cos=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.cos(e.toNumber(c[0]))})};a.isnan=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return"number"===typeof c[0]&&isNaN(c[0])})};
  1291. a.exp=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.exp(e.toNumber(c[0]))})};a.log=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.log(e.toNumber(c[0]))})};a.pow=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,2,2);return Math.pow(e.toNumber(c[0]),e.toNumber(c[1]))})};a.random=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,0,0);return Math.random()})};a.sin=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.sin(e.toNumber(c[0]))})};
  1292. a.sqrt=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.sqrt(e.toNumber(c[0]))})};a.tan=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return Math.tan(e.toNumber(c[0]))})};a.defaultvalue=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,2,2);return null===c[0]||""===c[0]||void 0===c[0]?c[1]:c[0]})};a.isempty=function(a,b){return f(a,b,function(b,a,c){e.pcCheck(c,1,1);return null===c[0]||""===c[0]||void 0===c[0]?!0:!1})};a["boolean"]=function(a,b){return f(a,
  1293. b,function(b,a,c){e.pcCheck(c,1,1);return e.toBoolean(c[0])})};a.constrain=function(a,b){return f(a,b,function(b,a,f){e.pcCheck(f,3,3);b=e.toNumber(f[1]);a=e.toNumber(f[2]);if(e.isArray(f[0])){var g=[],h=0;for(f=f[0];h<f.length;h++)g.push(c(f[h],b,a));return g}if(e.isImmutableArray(f[0])){g=[];for(h=0;h<f[0].length();h++)g.push(c(f[0].get(h),b,a));return g}return c(f[0],b,a)})}}})},"esri/arcade/functions/stats":function(){define(["require","exports","../languageUtils","./fieldStats"],function(a,f,
  1294. p,e){function n(a,f,c,m){if(1===m.length){if(p.isArray(m[0]))return e.calculateStat(a,m[0],-1);if(p.isImmutableArray(m[0]))return e.calculateStat(a,m[0].toArray(),-1)}return e.calculateStat(a,m,-1)}Object.defineProperty(f,"__esModule",{value:!0});f.registerFunctions=function(a,e){a.stdev=function(a,f){return e(a,f,function(b,a,c){return n("stdev",b,a,c)})};a.variance=function(a,f){return e(a,f,function(b,a,c){return n("variance",b,a,c)})};a.average=function(a,f){return e(a,f,function(b,a,c){return n("mean",
  1295. b,a,c)})};a.mean=function(a,f){return e(a,f,function(b,a,c){return n("mean",b,a,c)})};a.sum=function(a,f){return e(a,f,function(b,a,c){return n("sum",b,a,c)})};a.min=function(a,f){return e(a,f,function(b,a,c){return n("min",b,a,c)})};a.max=function(a,f){return e(a,f,function(b,a,c){return n("max",b,a,c)})};a.distinct=function(a,f){return e(a,f,function(b,a,c){return n("distinct",b,a,c)})};a.count=function(a,f){return e(a,f,function(b,a,c){p.pcCheck(c,1,1);if(p.isArray(c[0])||p.isString(c[0]))return c[0].length;
  1296. if(p.isImmutableArray(c[0]))return c[0].length();throw Error("Invalid Parameters for Count");})}}})},"esri/arcade/functions/fieldStats":function(){define(["require","exports","../languageUtils"],function(a,f,p){function e(a){for(var e=0,c=0;c<a.length;c++)e+=a[c];return e/a.length}function n(a){for(var f=e(a),c=0,m=0;m<a.length;m++)c+=Math.pow(f-a[m],2);return c/a.length}Object.defineProperty(f,"__esModule",{value:!0});f.decodeStatType=function(a){switch(a.toLowerCase()){case "distinct":return"distinct";
  1297. case "avg":case "mean":return"avg";case "min":return"min";case "sum":return"sum";case "max":return"max";case "stdev":case "stddev":return"stddev";case "var":case "variance":return"var";case "count":return"count"}return""};f.calculateStat=function(a,f,c){void 0===c&&(c=1E3);switch(a.toLowerCase()){case "distinct":a:{a=c;c=[];for(var h={},b=[],g=0;g<f.length;g++){if(void 0!==f[g]&&null!==f[g]&&f[g]!==p.voidOperation){var l=f[g];if(p.isNumber(l)||p.isString(l))void 0===h[l]&&(c.push(l),h[l]=1);else{for(var u=
  1298. !1,v=0;v<b.length;v++)!0===p.equalityTest(b[v],l)&&(u=!0);!1===u&&(b.push(l),c.push(l))}}if(c.length>=a&&-1!==a){f=c;break a}}f=c}return f;case "avg":case "mean":return e(p.toNumberArray(f));case "min":return Math.min.apply(Math,p.toNumberArray(f));case "sum":f=p.toNumberArray(f);for(c=a=0;c<f.length;c++)a+=f[c];return a;case "max":return Math.max.apply(Math,p.toNumberArray(f));case "stdev":case "stddev":return Math.sqrt(n(p.toNumberArray(f)));case "var":case "variance":return n(p.toNumberArray(f));
  1299. case "count":return f.length}return 0}})},"esri/arcade/functions/string":function(){define(["require","exports","../Feature","../languageUtils"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.registerFunctions=function(a,f){a.trim=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,1,1);return e.toString(c[0]).trim()})};a.upper=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,1,1);return e.toString(c[0]).toUpperCase()})};a.proper=function(a,c){return f(a,c,function(a,
  1300. b,c){e.pcCheck(c,1,2);a=1;2===c.length&&"firstword"===e.toString(c[1]).toLowerCase()&&(a=2);b=/\s/;c=e.toString(c[0]);for(var g="",f=!0,h=0;h<c.length;h++){var m=c[h];b.test(m)?1===a&&(f=!0):m.toUpperCase()!==m.toLowerCase()&&(f?(m=m.toUpperCase(),f=!1):m=m.toLowerCase());g+=m}return g})};a.lower=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,1,1);return e.toString(c[0]).toLowerCase()})};a.guid=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,0,1);if(0<c.length)switch(e.toString(c[0]).toLowerCase()){case "digits":return e.generateUUID().replace("-",
  1301. "").replace("-","").replace("-","").replace("-","");case "digits-hyphen":return e.generateUUID();case "digits-hyphen-parentheses":return"("+e.generateUUID()+")"}return"{"+e.generateUUID()+"}"})};a.console=function(a,c){return f(a,c,function(c,b,g){0!==g.length&&(1===g.length?a.console(e.toString(g[0])):a.console(e.toString(g)));return e.voidOperation})};a.mid=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,2,3);a=e.toNumber(c[1]);if(isNaN(a))return"";0>a&&(a=0);if(2===c.length)return e.toString(c[0]).substr(a);
  1302. b=e.toNumber(c[2]);if(isNaN(b))return"";0>b&&(b=0);return e.toString(c[0]).substr(a,b)})};a.find=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,2,3);a=0;if(2<c.length){a=e.toNumber(e.defaultUndefined(c[2],0));if(isNaN(a))return-1;0>a&&(a=0)}return e.toString(c[1]).indexOf(e.toString(c[0]),a)})};a.left=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,2,2);a=e.toNumber(c[1]);if(isNaN(a))return"";0>a&&(a=0);return e.toString(c[0]).substr(0,a)})};a.right=function(a,c){return f(a,c,function(a,
  1303. b,c){e.pcCheck(c,2,2);a=e.toNumber(c[1]);if(isNaN(a))return"";0>a&&(a=0);return e.toString(c[0]).substr(-1*a,a)})};a.split=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,2,4);a=e.toNumber(e.defaultUndefined(c[2],-1));b=e.toBoolean(e.defaultUndefined(c[3],!1));-1===a||null===a||!0===b?c=e.toString(c[0]).split(e.toString(c[1])):(isNaN(a)&&(a=-1),-1>a&&(a=-1),c=e.toString(c[0]).split(e.toString(c[1]),a));if(!1===b)return c;b=[];for(var g=0;g<c.length&&!(-1!==a&&b.length>=a);g++)""!==c[g]&&void 0!==
  1304. c[g]&&b.push(c[g]);return b})};a.text=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,1,2);return e.toStringExplicit(c[0],c[1])})};a.concatenate=function(a,c){return f(a,c,function(a,b,c){a=[];if(1>c.length)return"";if(e.isArray(c[0])){b=e.defaultUndefined(c[2],"");for(var g=0;g<c[0].length;g++)a[g]=e.toStringExplicit(c[0][g],b);return 1<c.length?a.join(c[1]):a.join("")}if(e.isImmutableArray(c[0])){b=e.defaultUndefined(c[2],"");for(g=0;g<c[0].length();g++)a[g]=e.toStringExplicit(c[0].get(g),
  1305. b);return 1<c.length?a.join(c[1]):a.join("")}for(g=0;g<c.length;g++)a[g]=e.toStringExplicit(c[g]);return a.join("")})};a.reverse=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,1,1);if(e.isArray(c[0]))return a=c[0].slice(0),a.reverse(),a;if(e.isImmutableArray(c[0]))return a=c[0].toArray().slice(0),a.reverse(),a;throw Error("Invalid Parameter");})};a.replace=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,3,4);a=e.toString(c[0]);b=e.toString(c[1]);var g=e.toString(c[2]);return(4===c.length?
  1306. e.toBoolean(c[3]):1)?e.multiReplace(a,b,g):a.replace(b,g)})};a.domainname=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,2,4);if(c[0]instanceof p)return c[0].domainValueLookup(e.toString(c[1]),c[2],void 0===c[3]?void 0:e.toNumber(c[3]));throw Error("Invalid Parameter");})};a.domaincode=function(a,c){return f(a,c,function(a,b,c){e.pcCheck(c,3,4);if(c[0]instanceof p)return c[0].domainCodeLookup(e.toString(c[1]),c[2],void 0===c[3]?void 0:e.toNumber(c[3]));throw Error("Invalid Parameter");})}}})},
  1307. "esri/arcade/arcadeRuntime":function(){define("require exports ./Dictionary ./Feature ./FunctionWrapper ./ImmutablePathArray ./ImmutablePointArray ./languageUtils ./treeAnalysis ./functions/date ./functions/geometry ./functions/geomsync ./functions/maths ./functions/stats ./functions/string ../geometry/Extent ../geometry/Geometry ../geometry/Multipoint ../geometry/Point ../geometry/Polygon ../geometry/Polyline ../geometry/SpatialReference".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,
  1308. k,y,z){function A(b,a){for(var c=[],d=0;d<a.arguments.length;d++)c.push(B(b,a.arguments[d]));return c}function C(b,a,c){try{return c(b,a,A(b,a))}catch(pa){throw pa;}}function B(b,a){try{switch(a.type){case "EmptyStatement":return c.voidOperation;case "VariableDeclarator":var d=null===a.init?null:B(b,a.init);d===c.voidOperation&&(d=null);var g=a.id.name.toLowerCase();null!==b.localScope?b.localScope[g]={value:d,valueset:!0,node:a.init}:b.globalScope[g]={value:d,valueset:!0,node:a.init};return c.voidOperation;
  1309. case "VariableDeclaration":for(var f=0;f<a.declarations.length;f++)B(b,a.declarations[f]);return c.voidOperation;case "BlockStatement":var h;a:{for(var k=c.voidOperation,f=0;f<a.body.length;f++)if(k=B(b,a.body[f]),k instanceof c.ReturnResult||k===c.breakResult||k===c.continueResult){h=k;break a}h=k}return h;case "FunctionDeclaration":var l=a.id.name.toLowerCase();b.globalScope[l]={valueset:!0,node:null,value:new n(a,b)};return c.voidOperation;case "ReturnStatement":var q;if(null===a.argument)q=new c.ReturnResult(c.voidOperation);
  1310. else{var t=B(b,a.argument);q=new c.ReturnResult(t)}return q;case "IfStatement":var r;if("AssignmentExpression"===a.test.type||"UpdateExpression"===a.test.type)throw Error(m.nodeErrorMessage(a.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var v=B(b,a.test);if(!0===v)r=B(b,a.consequent);else if(!1===v)r=null!==a.alternate?B(b,a.alternate):c.voidOperation;else throw Error(m.nodeErrorMessage(a,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));return r;case "ExpressionStatement":var x;if("AssignmentExpression"===
  1311. a.expression.type||"UpdateExpression"===a.expression.type)x=B(b,a.expression);else{var w=B(b,a.expression);x=w===c.voidOperation?c.voidOperation:new c.ImplicitResult(w)}return x;case "AssignmentExpression":var u;var y=B(b,a.right),f=null,z="";if("MemberExpression"===a.left.type){f=B(b,a.left.object);z=!0===a.left.computed?B(b,a.left.property):a.left.property.name;if(c.isArray(f))if(c.isNumber(z)){0>z&&(z=f.length+z);if(0>z||z>f.length)throw Error("Assignment outside of array bounds");if(z===f.length&&
  1312. "\x3d"!==a.operator)throw Error("Invalid Parameter");f[z]=F(y,a.operator,f[z],a)}else throw Error("Invalid Parameter");else if(f instanceof p){if(!1===c.isString(z))throw Error("Dictionary accessor must be a string");if(!0===f.hasField(z))f.setField(z,F(y,a.operator,f.field(z),a));else{if("\x3d"!==a.operator)throw Error("Invalid Parameter");f.setField(z,F(y,a.operator,null,a))}}else if(f instanceof e){if(!1===c.isString(z))throw Error("Feature accessor must be a string");if(!0===f.hasField(z))f.setField(z,
  1313. F(y,a.operator,f.field(z),a));else{if("\x3d"!==a.operator)throw Error("Invalid Parameter");f.setField(z,F(y,a.operator,null,a))}}else{if(c.isImmutableArray(f))throw Error("Array is Immutable");throw Error("Invalid Parameter");}u=c.voidOperation}else if(f=a.left.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[f])b.localScope[f]={value:F(y,a.operator,b.localScope[f].value,a),valueset:!0,node:a.right},u=c.voidOperation;else if(void 0!==b.globalScope[f])b.globalScope[f]={value:F(y,a.operator,
  1314. b.globalScope[f].value,a),valueset:!0,node:a.right},u=c.voidOperation;else throw Error("Variable not recognised");return u;case "UpdateExpression":var A;var C,f=null,z="";if("MemberExpression"===a.argument.type){f=B(b,a.argument.object);z=!0===a.argument.computed?B(b,a.argument.property):a.argument.property.name;if(c.isArray(f))if(c.isNumber(z)){0>z&&(z=f.length+z);if(0>z||z>=f.length)throw Error("Assignment outside of array bounds");C=c.toNumber(f[z]);f[z]="++"===a.operator?C+1:C-1}else throw Error("Invalid Parameter");
  1315. else if(f instanceof p){if(!1===c.isString(z))throw Error("Dictionary accessor must be a string");if(!0===f.hasField(z))C=c.toNumber(f.field(z)),f.setField(z,"++"===a.operator?C+1:C-1);else throw Error("Invalid Parameter");}else if(f instanceof e){if(!1===c.isString(z))throw Error("Feature accessor must be a string");if(!0===f.hasField(z))C=c.toNumber(f.field(z)),f.setField(z,"++"===a.operator?C+1:C-1);else throw Error("Invalid Parameter");}else{if(c.isImmutableArray(f))throw Error("Array is Immutable");
  1316. throw Error("Invalid Parameter");}A=!1===a.prefix?C:"++"===a.operator?C+1:C-1}else if(f=a.argument.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[f])C=c.toNumber(b.localScope[f].value),b.localScope[f]={value:"++"===a.operator?C+1:C-1,valueset:!0,node:a},A=!1===a.prefix?C:"++"===a.operator?C+1:C-1;else if(void 0!==b.globalScope[f])C=c.toNumber(b.globalScope[f].value),b.globalScope[f]={value:"++"===a.operator?C+1:C-1,valueset:!0,node:a},A=!1===a.prefix?C:"++"===a.operator?C+1:C-1;else throw Error("Variable not recognised");
  1317. return A;case "BreakStatement":return c.breakResult;case "ContinueStatement":return c.continueResult;case "ForStatement":null!==a.init&&B(b,a.init);z={testResult:!0,lastAction:c.voidOperation};do b:{u=b;y=a;A=z;if(null!==y.test){A.testResult=B(u,y.test);if(!1===A.testResult)break b;if(!0!==A.testResult)throw Error(m.nodeErrorMessage(y,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}A.lastAction=B(u,y.body);A.lastAction===c.breakResult?A.testResult=!1:A.lastAction instanceof c.ReturnResult?A.testResult=
  1318. !1:null!==y.update&&B(u,y.update)}while(!0===z.testResult);f=z.lastAction instanceof c.ReturnResult?z.lastAction:c.voidOperation;return f;case "ForInStatement":return D(b,a);case "Identifier":return W(b,a);case "MemberExpression":return Y(b,a);case "Literal":return a.value;case "ThisExpression":throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return I(b,a);case "UnaryExpression":return aa(b,a);case "BinaryExpression":return Z(b,a);case "LogicalExpression":return H(b,
  1319. a);case "ConditionalExpression":throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(f=[],z=0;z<a.elements.length;z++){var G=B(b,a.elements[z]);if(c.isFunctionParameter(G))throw Error(m.nodeErrorMessage(a,"RUNTIME","FUNCTIONCONTEXTILLEGAL"));G===c.voidOperation?f.push(null):f.push(G)}}catch(Ra){throw Ra;}return f;case "ObjectExpression":f={};for(z=0;z<a.properties.length;z++){var ka=B(b,a.properties[z]);if(c.isFunctionParameter(ka.value))throw Error("Illegal Argument");
  1320. if(!1===c.isString(ka.key))throw Error("Illegal Argument");f[ka.key.toString()]=ka.value===c.voidOperation?null:ka.value}var ia=new p(f);ia.immutable=!1;return ia;case "Property":return{key:"Identifier"===a.key.type?a.key.name:B(b,a.key),value:B(b,a.value)};case "Array":throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTED"));default:throw Error(m.nodeErrorMessage(a,"RUNTIME","UNREOGNISED"));}}catch(Ra){throw Ra;}}function D(b,a){var d=B(b,a.right);"VariableDeclaration"===a.left.type&&B(b,a.left);
  1321. var g=null,f="VariableDeclaration"===a.left.type?a.left.declarations[0].id.name:a.left.name;null!==b.localScope&&void 0!==b.localScope[f]&&(g=b.localScope[f]);null===g&&void 0!==b.globalScope[f]&&(g=b.globalScope[f]);if(null===g)throw Error(m.nodeErrorMessage(a,"RUNTIME","VARIABLENOTDECLARED"));if(c.isArray(d)||c.isString(d)){for(var d=d.length,h=0;h<d&&(g.value=h,f=B(b,a.body),f!==c.breakResult);h++)if(f instanceof c.ReturnResult)return f;return c.voidOperation}if(c.isImmutableArray(d)){for(h=0;h<
  1322. d.length()&&(g.value=h,f=B(b,a.body),f!==c.breakResult);h++)if(f instanceof c.ReturnResult)return f;return c.voidOperation}if(d instanceof p||d instanceof e)for(d=d.keys(),h=0;h<d.length&&(g.value=d[h],f=B(b,a.body),f!==c.breakResult);h++){if(f instanceof c.ReturnResult)return f}else return c.voidOperation}function F(b,a,d,e){switch(a){case "\x3d":return b===c.voidOperation?null:b;case "/\x3d":return c.toNumber(d)/c.toNumber(b);case "*\x3d":return c.toNumber(d)*c.toNumber(b);case "-\x3d":return c.toNumber(d)-
  1323. c.toNumber(b);case "+\x3d":return c.isString(d)||c.isString(b)?c.toString(d)+c.toString(b):c.toNumber(d)+c.toNumber(b);case "%\x3d":return c.toNumber(d)%c.toNumber(b);default:throw Error(m.nodeErrorMessage(e,"RUNTIME","OPERATORNOTRECOGNISED"));}}function G(b,a,d,e){a=a.toLowerCase();switch(a){case "hasz":return b=b.hasZ,void 0===b?!1:b;case "hasm":return b=b.hasM,void 0===b?!1:b;case "spatialreference":return a=b.spatialReference._arcadeCacheId,void 0===a&&(d=!0,Object.freeze&&Object.isFrozen(b.spatialReference)&&
  1324. (d=!1),d&&(V++,a=b.spatialReference._arcadeCacheId=V)),b=new p({wkt:b.spatialReference.wkt,wkid:b.spatialReference.wkid}),void 0!==a&&(b._arcadeCacheId="SPREF"+a.toString()),b}switch(b.type){case "extent":switch(a){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return b=b[a],void 0!==b?b:null;case "type":return"Extent"}break;case "polygon":switch(a){case "rings":return a=c.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===
  1325. a&&(V++,a=V,c.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",a)),b=new l(b.rings,b.spatialReference,!0===b.hasZ,!0===b.hasM,a);case "type":return"Polygon"}break;case "point":switch(a){case "x":case "y":case "z":case "m":return void 0!==b[a]?b[a]:null;case "type":return"Point"}break;case "polyline":switch(a){case "paths":return a=c.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===a&&(V++,a=V,c.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",
  1326. a)),b=new l(b.paths,b.spatialReference,!0===b.hasZ,!0===b.hasM,a);case "type":return"Polyline"}break;case "multipoint":switch(a){case "points":return a=c.isVersion4?b.cache._arcadeCacheId:b.getCacheValue("_arcadeCacheId"),void 0===a&&(V++,a=V,c.isVersion4?b.cache._arcadeCacheId=a:b.setCacheValue("_arcadeCacheId",a)),b=new h(b.points,b.spatialReference,!0===b.hasZ,!0===b.hasM,a,1);case "type":return"Multipoint"}}throw Error(m.nodeErrorMessage(e,"RUNTIME","PROPERTYNOTFOUND"));}function Y(b,a){try{var d=
  1327. B(b,a.object);if(null===d)throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTFOUND"));if(!1===a.computed){if(d instanceof p||d instanceof e)return d.field(a.property.name);if(d instanceof w)return G(d,a.property.name,b,a);throw Error(m.nodeErrorMessage(a,"RUNTIME","INVALIDTYPE"));}var g=B(b,a.property);if(d instanceof p||d instanceof e){if(c.isString(g))return d.field(g)}else if(d instanceof w){if(c.isString(g))return G(d,g,b,a)}else if(c.isArray(d)){if(c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>
  1328. g&&(g=d.length+g);if(g>=d.length||0>g)throw Error(m.nodeErrorMessage(a,"RUNTIME","OUTOFBOUNDS"));return d[g]}}else if(c.isString(d)){if(c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=d.length+g);if(g>=d.length||0>g)throw Error(m.nodeErrorMessage(a,"RUNTIME","OUTOFBOUNDS"));return d[g]}}else if(c.isImmutableArray(d)&&c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=d.length()+g);if(g>=d.length()||0>g)throw Error(m.nodeErrorMessage(a,"RUNTIME","OUTOFBOUNDS"));return d.get(g)}throw Error(m.nodeErrorMessage(a,
  1329. "RUNTIME","INVALIDTYPE"));}catch(xa){throw xa;}}function aa(b,a){try{var d=B(b,a.argument);if(c.isBoolean(d)){if("!"===a.operator)return!d;if("-"===a.operator)return-1*c.toNumber(d);if("+"===a.operator)return 1*c.toNumber(d);throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===a.operator)return-1*c.toNumber(d);if("+"===a.operator)return 1*c.toNumber(d);throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(pa){throw pa;}}function Z(b,a){try{var d=
  1330. [B(b,a.left),B(b,a.right)],e=d[0],g=d[1];switch(a.operator){case "\x3d\x3d":return c.equalityTest(e,g);case "\x3d":return c.equalityTest(e,g);case "!\x3d":return!c.equalityTest(e,g);case "\x3c":return c.greaterThanLessThan(e,g,a.operator);case "\x3e":return c.greaterThanLessThan(e,g,a.operator);case "\x3c\x3d":return c.greaterThanLessThan(e,g,a.operator);case "\x3e\x3d":return c.greaterThanLessThan(e,g,a.operator);case "+":return c.isString(e)||c.isString(g)?c.toString(e)+c.toString(g):c.toNumber(e)+
  1331. c.toNumber(g);case "-":return c.toNumber(e)-c.toNumber(g);case "*":return c.toNumber(e)*c.toNumber(g);case "/":return c.toNumber(e)/c.toNumber(g);case "%":return c.toNumber(e)%c.toNumber(g);default:throw Error(m.nodeErrorMessage(a,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(ta){throw ta;}}function H(b,a){try{if("AssignmentExpression"===a.left.type||"UpdateExpression"===a.left.type)throw Error(m.nodeErrorMessage(a.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===a.right.type||
  1332. "UpdateExpression"===a.right.type)throw Error(m.nodeErrorMessage(a.right,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var d=B(b,a.left);if(c.isBoolean(d))switch(a.operator){case "||":if(!0===d)return d;var e=B(b,a.right);if(c.isBoolean(e))return e;throw Error(m.nodeErrorMessage(a,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===d)return d;e=B(b,a.right);if(c.isBoolean(e))return e;throw Error(m.nodeErrorMessage(a,"RUNTIME","ONLYORORAND"));default:throw Error(m.nodeErrorMessage(a,"RUNTIME","ONLYORORAND"));
  1333. }else throw Error(m.nodeErrorMessage(a,"RUNTIME","ONLYBOOLEAN"));}catch(xa){throw xa;}}function W(b,a){var c;try{var d=a.name.toLowerCase();if(null!==b.localScope&&void 0!==b.localScope[d])return c=b.localScope[d],!0!==c.valueset&&(c.value=B(b,c.node),c.valueset=!0),c.value;if(void 0!==b.globalScope[d])return c=b.globalScope[d],!0!==c.valueset&&(c.value=B(b,c.node),c.valueset=!0),c.value;throw Error(m.nodeErrorMessage(a,"RUNTIME","VARIABLENOTFOUND"));}catch(xa){throw xa;}}function I(b,a){try{if("Identifier"!==
  1334. a.callee.type)throw Error(m.nodeErrorMessage(a,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==b.localScope&&void 0!==b.localScope[a.callee.name.toLowerCase()]){var d=b.localScope[a.callee.name.toLowerCase()];if(d.value instanceof c.NativeFunction)return d.value.fn(b,a);if(d.value instanceof n)return S(b,a,d.value.definition);throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTAFUNCTION"));}if(void 0!==b.globalScope[a.callee.name.toLowerCase()]){d=b.globalScope[a.callee.name.toLowerCase()];if(d.value instanceof
  1335. c.NativeFunction)return d.value.fn(b,a);if(d.value instanceof n)return S(b,a,d.value.definition);throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTAFUNCTION"));}throw Error(m.nodeErrorMessage(a,"RUNTIME","NOTFOUND"));}catch(pa){throw pa;}}function U(b){return null==b?"":c.isArray(b)||c.isImmutableArray(b)?"Array":c.isDate(b)?"Date":c.isString(b)?"String":c.isBoolean(b)?"Boolean":c.isNumber(b)?"Number":b instanceof p?"Dictionary":b instanceof e?"Feature":b instanceof d?"Point":b instanceof k?"Polygon":
  1336. b instanceof y?"Polyline":b instanceof q?"Multipoint":b instanceof r?"Extent":c.isFunctionParameter(b)?"Function":b===c.voidOperation?"":"number"===typeof b&&isNaN(b)?"Number":"Unrecognised Type"}function O(b,a,d,e){try{var g=B(b,a.arguments[d]);if(c.equalityTest(g,e))return B(b,a.arguments[d+1]);var f=a.arguments.length-d;return 1===f?B(b,a.arguments[d]):2===f?null:3===f?B(b,a.arguments[d+2]):O(b,a,d+2,e)}catch(ya){throw ya;}}function N(b,a,d,e){try{if(!0===e)return B(b,a.arguments[d+1]);if(3===
  1337. a.arguments.length-d)return B(b,a.arguments[d+2]);var g=B(b,a.arguments[d+2]);if(!1===c.isBoolean(g))throw Error("WHEN needs boolean test conditions");return N(b,a,d+2,g)}catch(ta){throw ta;}}function J(b,a){var c=b.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[b[0]];var e=J(b.slice(0,d),a);b=J(b.slice(d,c),a);for(c=[];0<e.length||0<b.length;)0<e.length&&0<b.length?(d=a(e[0],b[0]),isNaN(d)&&(d=0),0>=d?(c.push(e[0]),e=e.slice(1)):(c.push(b[0]),b=b.slice(1))):0<e.length?(c.push(e[0]),e=
  1338. e.slice(1)):0<b.length&&(c.push(b[0]),b=b.slice(1));return c}function L(b,a,d){try{var e=b.body;if(d.length!==b.params.length)throw Error("Invalid Parameter calls to function.");for(var g=0;g<d.length;g++)a.localScope[b.params[g].name.toLowerCase()]={value:d[g],valueset:!0,node:null};var f=B(a,e);if(f instanceof c.ReturnResult)return f.value;if(f===c.breakResult)throw Error("Cannot Break from a Function");if(f===c.continueResult)throw Error("Cannot Continue from a Function");return f instanceof c.ImplicitResult?
  1339. f.value:f}catch(ya){throw ya;}}function S(b,a,c){return C(b,a,function(a,d,e){a={spatialReference:b.spatialReference,applicationCache:void 0===b.applicationCache?null:b.applicationCache,globalScope:b.globalScope,depthCounter:b.depthCounter+1,console:b.console,localScope:{}};if(64<a.depthCounter)throw Error("Exceeded maximum function depth");return L(c,a,e)})}function T(b){return function(){var a={applicationCache:void 0===b.context.applicationCache?null:b.context.applicationCache,spatialReference:b.context.spatialReference,
  1340. console:b.context.console,localScope:{},depthCounter:b.context.depthCounter+1,globalScope:b.context.globalScope};if(64<a.depthCounter)throw Error("Exceeded maximum function depth");return L(b.definition,a,arguments)}}function ha(b){console.log(b)}Object.defineProperty(f,"__esModule",{value:!0});var V=0,P={};b.registerFunctions(P,C);x.registerFunctions(P,C);u.registerFunctions(P,C);g.registerFunctions(P,C);v.registerFunctions(P,C);t.registerFunctions(P,C);P["typeof"]=function(b,a){return C(b,a,function(b,
  1341. a,d){c.pcCheck(d,1,1);b=U(d[0]);if("Unrecognised Type"===b)throw Error("Unrecognised Type");return b})};P.iif=function(b,a){try{c.pcCheck(null===a.arguments?[]:a.arguments,3,3);var d=B(b,a.arguments[0]);if(!1===c.isBoolean(d))throw Error("IF Function must have a boolean test condition");return!0===d?B(b,a.arguments[1]):B(b,a.arguments[2])}catch(pa){throw pa;}};P.decode=function(b,a){try{if(2>a.arguments.length)throw Error("Missing Parameters");if(2===a.arguments.length)return B(b,a.arguments[1]);
  1342. if(0===(a.arguments.length-1)%2)throw Error("Must have a default value result.");var c=B(b,a.arguments[0]);return O(b,a,1,c)}catch(pa){throw pa;}};P.when=function(b,a){try{if(3>a.arguments.length)throw Error("Missing Parameters");if(0===a.arguments.length%2)throw Error("Must have a default value result.");var d=B(b,a.arguments[0]);if(!1===c.isBoolean(d))throw Error("WHEN needs boolean test conditions");return N(b,a,0,d)}catch(pa){throw pa;}};P.top=function(b,a){return C(b,a,function(b,a,d){c.pcCheck(d,
  1343. 2,2);if(c.isArray(d[0]))return c.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));if(c.isImmutableArray(d[0]))return c.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};P.first=function(b,a){return C(b,a,function(b,a,d){c.pcCheck(d,1,1);return c.isArray(d[0])?0===d[0].length?null:d[0][0]:c.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};P.sort=function(b,a){return C(b,a,function(b,
  1344. a,d){c.pcCheck(d,1,2);b=d[0];c.isImmutableArray(b)&&(b=b.toArray());if(!1===c.isArray(b))throw Error("Illegal Argument");if(1<d.length){if(!1===c.isFunctionParameter(d[1]))throw Error("Illegal Argument");var e=T(d[1]);b=J(b,function(b,a){return e(b,a)})}else{if(0===b.length)return[];d={};for(a=0;a<b.length;a++){var g=U(b[a]);""!==g&&(d[g]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||!0===d.Extent||!0===d.Function)return b.slice(0);
  1345. a=0;var g="",f;for(f in d)a++,g=f;b=1<a||"String"===g?J(b,function(b,a){if(null===b||void 0===b||b===c.voidOperation)return null===a||void 0===a||a===c.voidOperation?0:1;if(null===a||void 0===a||a===c.voidOperation)return-1;b=c.toString(b);a=c.toString(a);return b<a?-1:b===a?0:1}):"Number"===g?J(b,function(b,a){return b-a}):"Boolean"===g?J(b,function(b,a){return b===a?0:a?-1:1}):"Date"===g?J(b,function(b,a){return a-b}):b.slice(0)}return b})};for(var ca in P)P[ca]={value:new c.NativeFunction(P[ca]),
  1346. valueset:!0,node:null};var da=function(){};da.prototype=P;da.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};da.prototype.pi={value:Math.PI,valueset:!0,node:null};f.functionHelper={fixSpatialReference:c.fixSpatialReference,parseArguments:A,standardFunction:C};f.extend=function(b){for(var a={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:C,evaluateIdentifier:W,arcadeCustomFunctionHandler:T},d=0;d<b.length;d++)b[d].registerFunctions(a);for(var e in a.functions)P[e]=
  1347. {value:new c.NativeFunction(a.functions[e]),valueset:!0,node:null},da.prototype[e]=P[e];for(d=0;d<a.signatures.length;d++)m.addFunctionDeclaration(a.signatures[d],"f")};f.executeScript=function(b,a,d){d||(d=new z(102100));var g=a.vars,f=a.customfunctions,h=new da;g||(g={});f||(f={});var k=new p({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});k.immutable=!1;h.textformatting={value:k,valueset:!0,node:null};for(var m in f)h[m]={value:new c.NativeFunction(f[m]),
  1348. "native":!0,valueset:!0,node:null};for(m in g)h[m]=g[m]&&"esri.Graphic"===g[m].declaredClass?{value:e.createFromGraphic(g[m]),valueset:!0,node:null}:{value:g[m],valueset:!0,node:null};b=B({spatialReference:d,globalScope:h,localScope:null,console:a.console?a.console:ha,depthCounter:1,applicationCache:void 0===a.applicationCache?null:a.applicationCache},b.body[0].body);b instanceof c.ReturnResult&&(b=b.value);b instanceof c.ImplicitResult&&(b=b.value);b===c.voidOperation&&(b=null);if(b===c.breakResult)throw Error("Cannot return BREAK");
  1349. if(b===c.continueResult)throw Error("Cannot return CONTINUE");if(b instanceof n)throw Error("Cannot return FUNCTION");if(b instanceof c.NativeFunction)throw Error("Cannot return FUNCTION");return b};f.extractFieldLiterals=function(b,a){void 0===a&&(a=!1);return m.findFieldLiterals(b,a)};f.validateScript=function(b,a){return m.validateScript(b,a,"simple")};f.referencesMember=function(b,a){return m.referencesMember(b,a)};f.referencesFunction=function(b,a){return m.referencesFunction(b,a)};f.findFunctionCalls=
  1350. function(b){return m.findFunctionCalls(b,!1)}})},"esri/arcade/parser":function(){define(["require","exports","./treeAnalysis","./lib/esprima"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.parseScript=function(a){a=e.parse("function _() { "+a+"\n}");if(null===a.body||void 0===a.body)throw Error("No formula provided.");if(0===a.body.length)throw Error("No formula provided.");if(0===a.body.length)throw Error("No formula provided.");if("BlockStatement"!==a.body[0].body.type)throw Error("Invalid formula content.");
  1351. var f=p.validateLanguage(a);if(""!==f)throw Error(f);return a};f.scriptCheck=function(a,f,h,c){var m=[];try{var b=e.parse("function _() { "+a+"\n}",{tolerant:!0,loc:!0}),g=b.errors;if(0<g.length)for(var l=0;l<g.length;l++)m.push({line:g[l].lineNumber,character:g[l].column,reason:g[l].description});var n=p.checkScript(b,f,h,c);for(f=0;f<n.length;f++)m.push(n[f])}catch(v){try{"Unexpected token }"===v.description?(v.index=("function _() { "+a+"\n}").length-1,m.push({line:v.lineNumber,character:v.column,
  1352. reason:"Unexpected end of script"})):m.push({line:v.lineNumber,character:v.column,reason:v.description})}catch(x){}}return m};f.extractFieldLiterals=function(a,e){void 0===e&&(e=!1);return p.findFieldLiterals(a,e)};f.validateScript=function(a,e,f){void 0===f&&(f="full");return p.validateScript(a,e,f)};f.referencesMember=function(a,e){return p.referencesMember(a,e)};f.referencesFunction=function(a,e){return p.referencesFunction(a,e)}})},"esri/arcade/lib/esprima":function(){(function(a,f){"function"===
  1353. typeof define&&define.amd?define(["exports"],f):"undefined"!==typeof exports?f(exports):f(a.esprima={})})(this,function(a){function f(b,a){if(!b)throw Error("ASSERT: "+a);}function p(b){return 48<=b&&57>=b}function e(b){return 0<="0123456789abcdefABCDEF".indexOf(b)}function n(b){return 0<="01234567".indexOf(b)}function l(b){return 10===b||13===b||8232===b||8233===b}function h(b){return 36===b||95===b||65<=b&&90>=b||97<=b&&122>=b||92===b||128<=b&&db.NonAsciiIdentifierStart.test(String.fromCharCode(b))}
  1354. function c(b){return 36===b||95===b||65<=b&&90>=b||97<=b&&122>=b||48<=b&&57>=b||92===b||128<=b&&db.NonAsciiIdentifierPart.test(String.fromCharCode(b))}function m(b){b=b.toLowerCase();switch(b.length){case 2:return"if"===b||"in"===b;case 3:return"var"===b||"for"===b;case 4:return"else"===b;case 5:return"break"===b;case 6:return"return"===b;case 8:return"function"===b.toLowerCase()||"continue"===b;default:return!1}}function b(b,a,c,d,e){f("number"===typeof c,"Comment must have valid position");ba.lastCommentStart>=
  1355. c||(ba.lastCommentStart=c,b={type:b,value:a},M.range&&(b.range=[c,d]),M.loc&&(b.loc=e),M.comments.push(b),M.attachComment&&(M.leadingComments.push(b),M.trailingComments.push(b)))}function g(a){var c,d,e;c=E-a;for(d={start:{line:ea,column:E-ja-a}};E<na;)if(e=K.charCodeAt(E),++E,l(e)){M.comments&&(a=K.slice(c+a,E-1),d.end={line:ea,column:E-ja-1},b("Line",a,c,E-1,d));13===e&&10===K.charCodeAt(E)&&++E;++ea;ja=E;return}M.comments&&(a=K.slice(c+a,E),d.end={line:ea,column:E-ja},b("Line",a,c,E,d))}function t(){var a,
  1356. c;for(c=0===E;E<na;)if(a=K.charCodeAt(E),32===a||9===a||11===a||12===a||160===a||5760<=a&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(a))++E;else if(l(a))++E,13===a&&10===K.charCodeAt(E)&&++E,++ea,ja=E,c=!0;else if(47===a)if(a=K.charCodeAt(E+1),47===a)++E,++E,g(2),c=!0;else if(42===a){++E;++E;a:{var d=a=void 0,e=void 0,e=void 0;M.comments&&(a=E-2,d={start:{line:ea,column:E-ja-2}});for(;E<na;)if(e=K.charCodeAt(E),l(e))13===e&&10===K.charCodeAt(E+
  1357. 1)&&++E,++ea,++E,ja=E,E>=na&&I();else{if(42===e&&47===K.charCodeAt(E+1)){++E;++E;M.comments&&(e=K.slice(a+2,E-2),d.end={line:ea,column:E-ja},b("Block",e,a,E,d));break a}++E}I()}}else break;else if(c&&45===a)if(45===K.charCodeAt(E+1)&&62===K.charCodeAt(E+2))E+=3,g(3);else break;else if(60===a)if("!--"===K.slice(E+1,E+4))++E,++E,++E,++E,g(4);else break;else break}function u(b){var a,c,d=0;a="u"===b?4:2;for(b=0;b<a;++b)if(E<na&&e(K[E]))c=K[E++],d=16*d+"0123456789abcdef".indexOf(c.toLowerCase());else return"";
  1358. return String.fromCharCode(d)}function v(){var b,a;b=K.charCodeAt(E++);a=String.fromCharCode(b);92===b&&(117!==K.charCodeAt(E)&&I(),++E,(b=u("u"))&&"\\"!==b&&h(b.charCodeAt(0))||I(),a=b);for(;E<na;){b=K.charCodeAt(E);if(!c(b))break;++E;a+=String.fromCharCode(b);92===b&&(a=a.substr(0,a.length-1),117!==K.charCodeAt(E)&&I(),++E,(b=u("u"))&&"\\"!==b&&c(b.charCodeAt(0))||I(),a+=b)}return a}function x(){var b=E,a=K.charCodeAt(E),c,d=K[E];switch(a){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++E,
  1359. M.tokenize&&(40===a?M.openParenToken=M.tokens.length:123===a&&(M.openCurlyToken=M.tokens.length)),{type:Q.Punctuator,value:String.fromCharCode(a),lineNumber:ea,lineStart:ja,start:b,end:E};default:if(c=K.charCodeAt(E+1),61===c)switch(a){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return E+=2,{type:Q.Punctuator,value:String.fromCharCode(a)+String.fromCharCode(c),lineNumber:ea,lineStart:ja,start:b,end:E};case 33:case 61:return E+=2,61===K.charCodeAt(E)&&++E,{type:Q.Punctuator,
  1360. value:K.slice(b,E),lineNumber:ea,lineStart:ja,start:b,end:E}}}a=K.substr(E,4);if("\x3e\x3e\x3e\x3d"===a)return E+=4,{type:Q.Punctuator,value:a,lineNumber:ea,lineStart:ja,start:b,end:E};a=a.substr(0,3);if("\x3e\x3e\x3e"===a||"\x3c\x3c\x3d"===a||"\x3e\x3e\x3d"===a)return E+=3,{type:Q.Punctuator,value:a,lineNumber:ea,lineStart:ja,start:b,end:E};a=a.substr(0,2);if(d===a[1]&&0<="+-\x3c\x3e\x26|".indexOf(d)||"\x3d\x3e"===a)return E+=2,{type:Q.Punctuator,value:a,lineNumber:ea,lineStart:ja,start:b,end:E};
  1361. if(0<="\x3c\x3e\x3d!+-*%\x26|^/".indexOf(d))return++E,{type:Q.Punctuator,value:d,lineNumber:ea,lineStart:ja,start:b,end:E};I()}function r(){var b,a,c;c=K[E];f(p(c.charCodeAt(0))||"."===c,"Numeric literal must start with a decimal digit or a decimal point");a=E;b="";if("."!==c){b=K[E++];c=K[E];if("0"===b){if("x"===c||"X"===c){++E;for(b="";E<na&&e(K[E]);)b+=K[E++];0===b.length&&I();h(K.charCodeAt(E))&&I();return{type:Q.NumericLiteral,value:parseInt("0x"+b,16),lineNumber:ea,lineStart:ja,start:a,end:E}}if("b"===
  1362. c||"B"===c){++E;for(c="";E<na;){b=K[E];if("0"!==b&&"1"!==b)break;c+=K[E++]}0===c.length&&I();E<na&&(b=K.charCodeAt(E),(h(b)||p(b))&&I());return{type:Q.NumericLiteral,value:parseInt(c,2),lineNumber:ea,lineStart:ja,start:a,end:E}}if("o"===c||"O"===c||n(c)){n(c)?(c=!0,b="0"+K[E++]):(c=!1,++E,b="");for(;E<na&&n(K[E]);)b+=K[E++];c||0!==b.length||I();(h(K.charCodeAt(E))||p(K.charCodeAt(E)))&&I();return{type:Q.NumericLiteral,value:parseInt(b,8),octal:c,lineNumber:ea,lineStart:ja,start:a,end:E}}c&&p(c.charCodeAt(0))&&
  1363. I()}for(;p(K.charCodeAt(E));)b+=K[E++];c=K[E]}if("."===c){for(b+=K[E++];p(K.charCodeAt(E));)b+=K[E++];c=K[E]}if("e"===c||"E"===c){b+=K[E++];c=K[E];if("+"===c||"-"===c)b+=K[E++];if(p(K.charCodeAt(E)))for(;p(K.charCodeAt(E));)b+=K[E++];else I()}h(K.charCodeAt(E))&&I();return{type:Q.NumericLiteral,value:parseFloat(b),lineNumber:ea,lineStart:ja,start:a,end:E}}function w(){X=null;t();Z("Regular Expression language structures not supported")}function q(){t();w()}function d(){var b;b=M.tokens[M.tokens.length-
  1364. 1];if(!b)return q();if("Punctuator"===b.type){if("]"===b.value)return x();if(")"===b.value)return b=M.tokens[M.openParenToken-1],!b||"Keyword"!==b.type||"if"!==b.value.toLowerCase()&&"while"!==b.value.toLowerCase()&&"for"!==b.value.toLowerCase()&&"with"!==b.value.toLowerCase()?x():q();if("}"===b.value){if(M.tokens[M.openCurlyToken-3]&&"Keyword"===M.tokens[M.openCurlyToken-3].type){if(b=M.tokens[M.openCurlyToken-4],!b)return x()}else if(M.tokens[M.openCurlyToken-4]&&"Keyword"===M.tokens[M.openCurlyToken-
  1365. 4].type){if(b=M.tokens[M.openCurlyToken-5],!b)return q()}else return x();if(0<=ua.indexOf(b.value))return x()}return q()}return"Keyword"===b.type&&"this"!==b.value?q():x()}function k(){var b;t();if(E>=na)return{type:Q.EOF,lineNumber:ea,lineStart:ja,start:E,end:E};b=K.charCodeAt(E);if(h(b)){var a;b=E;if(92===K.charCodeAt(E))a=v();else a:{var g;for(a=E++;E<na;){g=K.charCodeAt(E);if(92===g){E=a;a=v();break a}if(c(g))++E;else break}a=K.slice(a,E)}return{type:1===a.length?Q.Identifier:m(a)?Q.Keyword:"null"===
  1366. a.toLowerCase()?Q.NullLiteral:"true"===a.toLowerCase()||"false"===a.toLowerCase()?Q.BooleanLiteral:Q.Identifier,value:a,lineNumber:ea,lineStart:ja,start:b,end:E}}if(40===b||41===b||59===b)return x();if(39===b||34===b){var k="",q,w,z;g=!1;var y,B;y=ea;B=ja;b=K[E];f("'"===b||'"'===b,"String literal must starts with a quote");a=E;for(++E;E<na;)if(q=K[E++],q===b){b="";break}else if("\\"===q)if((q=K[E++])&&l(q.charCodeAt(0)))++ea,"\r"===q&&"\n"===K[E]&&++E,ja=E;else switch(q){case "u":case "x":if("{"===
  1367. K[E]){++E;w=q=void 0;q=K[E];w=0;for("}"===q&&I();E<na;){q=K[E++];if(!e(q))break;w=16*w+"0123456789abcdef".indexOf(q.toLowerCase())}(1114111<w||"}"!==q)&&I();q=65535>=w?String.fromCharCode(w):String.fromCharCode((w-65536>>10)+55296,(w-65536&1023)+56320);k+=q}else z=E,(w=u(q))?k+=w:(E=z,k+=q);break;case "n":k+="\n";break;case "r":k+="\r";break;case "t":k+="\t";break;case "b":k+="\b";break;case "f":k+="\f";break;case "v":k+="\x0B";break;default:n(q)?(w="01234567".indexOf(q),0!==w&&(g=!0),E<na&&n(K[E])&&
  1368. (g=!0,w=8*w+"01234567".indexOf(K[E++]),0<="0123".indexOf(q)&&E<na&&n(K[E])&&(w=8*w+"01234567".indexOf(K[E++]))),k+=String.fromCharCode(w)):k+=q}else if(l(q.charCodeAt(0)))break;else k+=q;""!==b&&I();return{type:Q.StringLiteral,value:k,octal:g,startLineNumber:y,startLineStart:B,lineNumber:ea,lineStart:ja,start:a,end:E}}return 46===b?p(K.charCodeAt(E+1))?r():x():p(b)?r():M.tokenize&&47===b?d():x()}function y(){var b,a,c;t();b={start:{line:ea,column:E-ja}};a=k();b.end={line:ea,column:E-ja};a.type!==
  1369. Q.EOF&&(c=K.slice(a.start,a.end),b={type:Ha[a.type],value:c,range:[a.start,a.end],loc:b},a.regex&&(b.regex={pattern:a.regex.pattern,flags:a.regex.flags}),M.tokens.push(b));return a}function z(){var b;b=X;E=b.end;ea=b.lineNumber;ja=b.lineStart;X="undefined"!==typeof M.tokens?y():k();E=b.end;ea=b.lineNumber;ja=b.lineStart;return b}function A(){var b,a,c;b=E;a=ea;c=ja;X="undefined"!==typeof M.tokens?y():k();E=b;ea=a;ja=c}function C(){this.line=ea;this.column=E-ja}function B(){this.start=new C;this.end=
  1370. null}function D(b){this.start=b.type===Q.StringLiteral?{line:b.startLineNumber,column:b.start-b.startLineStart}:{line:b.lineNumber,column:b.start-b.lineStart};this.end=null}function F(){E=X.start;X.type===Q.StringLiteral?(ea=X.startLineNumber,ja=X.startLineStart):(ea=X.lineNumber,ja=X.lineStart);M.range&&(this.range=[E,0]);M.loc&&(this.loc=new B)}function G(b){M.range&&(this.range=[b.start,0]);M.loc&&(this.loc=new D(b))}function Y(){var b,a,c,d;b=E;a=ea;c=ja;t();d=ea!==a;E=b;ea=a;ja=c;return d}function aa(b,
  1371. a,c){var d=Error("Line "+b+": "+c);d.index=a;d.lineNumber=b;d.column=a-ja+1;d.description=c;return d}function Z(b){var a,c;a=Array.prototype.slice.call(arguments,1);c=b.replace(/%(\d)/g,function(b,c){f(c<a.length,"Message reference must be in range");return a[c]});throw aa(ea,E,c);}function H(b){var a,c;a=Array.prototype.slice.call(arguments,1);c=b.replace(/%(\d)/g,function(b,c){f(c<a.length,"Message reference must be in range");return a[c]});c=aa(ea,E,c);if(M.errors)M.errors.push(c);else throw c;
  1372. }function W(b,a){var c=la.UnexpectedToken;b&&(c=a?a:b.type===Q.EOF?la.UnexpectedEOS:b.type===Q.Identifier?la.UnexpectedIdentifier:b.type===Q.NumericLiteral?la.UnexpectedNumber:b.type===Q.StringLiteral?la.UnexpectedString:la.UnexpectedToken);c=c.replace("%0",b?b.value:"ILLEGAL");return b&&"number"===typeof b.lineNumber?aa(b.lineNumber,b.start,c):aa(ea,E,c)}function I(b,a){throw W(b,a);}function U(b,a){b=W(b,a);if(M.errors)M.errors.push(b);else throw b;}function O(b){var a=z();a.type===Q.Punctuator&&
  1373. a.value===b||I(a)}function N(){var b;M.errors?(b=X,b.type===Q.Punctuator&&","===b.value?z():b.type===Q.Punctuator&&";"===b.value?(z(),U(b)):U(b,la.UnexpectedToken)):O(",")}function J(b){var a=z();a.type===Q.Keyword&&a.value.toLowerCase()===b.toLowerCase()||I(a)}function L(b){return X.type===Q.Punctuator&&X.value===b}function S(b){return X.type===Q.Keyword&&X.value.toLowerCase()===b.toLowerCase()}function T(){var b;59===K.charCodeAt(E)||L(";")?z():(b=ea,t(),ea===b&&(X.type===Q.EOF||L("}")||I(X)))}
  1374. function ha(b){return b.type===ga.Identifier||b.type===ga.MemberExpression}function V(b,a){var c,d=new F;a=ma;c=Ka();ma=a;return d.finishFunctionExpression(null,b,[],c)}function P(){var b,a;b=ma;ma=!0;a=Fa();a=V(a.params);ma=b;return a}function ca(){var b,a=new F;b=z();return b.type===Q.StringLiteral||b.type===Q.NumericLiteral?(ma&&b.octal&&U(b,la.StrictOctalLiteral),a.finishLiteral(b)):a.finishIdentifier(b.value)}function da(){var b,a,c,d=new F;b=X;if(b.type===Q.Identifier)return a=ca(),"get"!==
  1375. b.value||L(":")||L("(")?"set"!==b.value||L(":")||L("(")?L(":")?(z(),b=fa(),d.finishProperty("init",a,b,!1,!1)):L("(")?(b=P(),d.finishProperty("init",a,b,!0,!1)):d.finishProperty("init",a,a,!1,!0):(a=ca(),O("("),b=X,b.type!==Q.Identifier?(O(")"),U(b),b=V([])):(c=[za()],O(")"),b=V(c,b)),d.finishProperty("set",a,b,!1,!1)):(a=ca(),O("("),O(")"),b=V([]),d.finishProperty("get",a,b,!1,!1));if(b.type===Q.EOF||b.type===Q.Punctuator)I(b);else{a=ca();if(L(":"))return z(),b=fa(),d.finishProperty("init",a,b,!1,
  1376. !1);if(L("("))return b=P(),d.finishProperty("init",a,b,!0,!1);I(z())}}function ka(b){var a=[],c,d,e={},g=String,f=new F;for(!0!==b&&O("{");!L("}");)b=da(),c=b.key.type===ga.Identifier?b.key.name:g(b.key.value),d="init"===b.kind?Na.Data:"get"===b.kind?Na.Get:Na.Set,c="$"+c,Object.prototype.hasOwnProperty.call(e,c)?(e[c]===Na.Data?ma&&d===Na.Data?H(la.StrictDuplicateProperty):d!==Na.Data&&H(la.AccessorDataProperty):d===Na.Data?H(la.AccessorDataProperty):e[c]&d&&H(la.AccessorGetSet),e[c]|=d):e[c]=d,
  1377. a.push(b),L("}")||N();O("}");return f.finishObjectExpression(a)}function ia(){var b,a,c,d;if(L("("))return O("("),L(")")?(z(),a=Qa.ArrowParameterPlaceHolder):(++ba.parenthesisCount,a=wa(),O(")")),a;if(L("[")){a=[];var e=new F;for(O("[");!L("]");)L(",")?(z(),a.push(null)):(a.push(fa()),L("]")||O(","));z();return e.finishArrayExpression(a)}if(L("{"))return ka();b=X.type;d=new F;if(b===Q.Identifier)c=d.finishIdentifier(z().value);else if(b===Q.StringLiteral||b===Q.NumericLiteral)ma&&X.octal&&U(X,la.StrictOctalLiteral),
  1378. c=d.finishLiteral(z());else if(b===Q.Keyword){if(S("function")){d=null;var g;c=[];var f=[],h,k=new F;J("function");L("(")||(d=za());g=Fa(a);c=g.params;f=g.defaults;b=g.stricted;a=g.firstRestricted;g.message&&(e=g.message);h=ma;g=Ka();ma&&a&&I(a,e);ma&&b&&U(b,e);ma=h;return k.finishFunctionExpression(d,c,f,g)}S("this")?(z(),c=d.finishThisExpression()):I(z())}else b===Q.BooleanLiteral?(a=z(),a.value="true"===a.value.toLowerCase(),c=d.finishLiteral(a)):b===Q.NullLiteral?(a=z(),a.value=null,c=d.finishLiteral(a)):
  1379. L("/")||L("/\x3d")?(c="undefined"!==typeof M.tokens?d.finishLiteral(q()):d.finishLiteral(w()),A()):I(z());return c}function qa(){var b=[];O("(");if(!L(")"))for(;E<na;){b.push(fa());if(L(")"))break;N()}O(")");return b}function pa(){O(".");var b,a=new F;b=z();b.type===Q.Identifier||b.type===Q.Keyword||b.type===Q.BooleanLiteral||b.type===Q.NullLiteral||I(b);return a.finishIdentifier(b.value)}function xa(){var b;O("[");b=wa();O("]");return b}function ta(){var b,a,c=new F;J("new");var d;f(ba.allowIn,"callee of new expression always allow in keyword.");
  1380. d=X;for(b=S("new")?ta():ia();;)if(L("["))a=xa(),b=(new G(d)).finishMemberExpression("[",b,a);else if(L("."))a=pa(),b=(new G(d)).finishMemberExpression(".",b,a);else break;a=L("(")?qa():[];return c.finishNewExpression(b,a)}function ya(){var b,a,c=X,d,e=ba.allowIn;a=X;ba.allowIn=!0;for(b=S("new")?ta():ia();;)if(L("."))d=pa(),b=(new G(a)).finishMemberExpression(".",b,d);else if(L("("))d=qa(),b=(new G(a)).finishCallExpression(b,d);else if(L("["))d=xa(),b=(new G(a)).finishMemberExpression("[",b,d);else break;
  1381. ba.allowIn=e;X.type!==Q.Punctuator||!L("++")&&!L("--")||Y()||(ha(b)||H(la.InvalidLHSInAssignment),a=z(),b=(new G(c)).finishPostfixExpression(a.value,b));return b}function va(){var b,a,c;X.type!==Q.Punctuator&&X.type!==Q.Keyword?a=ya():L("++")||L("--")?(c=X,b=z(),a=va(),ha(a)||H(la.InvalidLHSInAssignment),a=(new G(c)).finishUnaryExpression(b.value,a)):L("+")||L("-")||L("~")||L("!")?(c=X,b=z(),a=va(),a=(new G(c)).finishUnaryExpression(b.value,a)):S("delete")||S("void")||S("typeof")?(c=X,b=z(),a=va(),
  1382. a=(new G(c)).finishUnaryExpression(b.value,a),ma&&"delete"===a.operator&&a.argument.type===ga.Identifier&&H(la.StrictDelete)):a=ya();return a}function Ga(b,a){var c=0;if(b.type!==Q.Punctuator&&b.type!==Q.Keyword)return 0;switch(b.value){case "||":c=1;break;case "\x26\x26":c=2;break;case "|":c=3;break;case "^":c=4;break;case "\x26":c=5;break;case "\x3d\x3d":case "!\x3d":case "\x3d\x3d\x3d":case "!\x3d\x3d":c=6;break;case "\x3c":case "\x3e":case "\x3c\x3d":case "\x3e\x3d":case "instanceof":c=7;break;
  1383. case "in":c=a?7:0;break;case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":c=8;break;case "+":case "-":c=9;break;case "*":case "/":case "%":c=11}return c}function Ba(){var b,a,c,d,e,g;b=X;a=va();if(a===Qa.ArrowParameterPlaceHolder)return a;c=X;d=Ga(c,ba.allowIn);if(0===d)return a;c.prec=d;z();b=[b,X];g=va();for(e=[a,c,g];0<(d=Ga(X,ba.allowIn));){for(;2<e.length&&d<=e[e.length-2].prec;)g=e.pop(),c=e.pop().value,a=e.pop(),b.pop(),a=(new G(b[b.length-1])).finishBinaryExpression(c,a,g),e.push(a);c=z();
  1384. c.prec=d;e.push(c);b.push(X);a=va();e.push(a)}d=e.length-1;a=e[d];for(b.pop();1<d;)a=(new G(b.pop())).finishBinaryExpression(e[d-1].value,e[d-2],a),d-=2;return a}function La(b){var a,c,d,e,g,f,h;e=[];g=[];f=0;h={paramSet:{}};a=0;for(c=b.length;a<c;a+=1)if(d=b[a],d.type===ga.Identifier)e.push(d),g.push(null),Ia(h,d,d.name);else if(d.type===ga.AssignmentExpression)e.push(d.left),g.push(d.right),++f,Ia(h,d.left,d.left.name);else return null;h.message===la.StrictParamDupe&&(b=ma?h.stricted:h.firstRestricted,
  1385. I(b,h.message));0===f&&(g=[]);return{params:e,defaults:g,rest:null,stricted:h.stricted,firstRestricted:h.firstRestricted,message:h.message}}function fa(){var b,a,c,d,e;b=ba.parenthesisCount;a=e=X;var g,f;f=X;c=Ba();c!==Qa.ArrowParameterPlaceHolder&&L("?")&&(z(),g=ba.allowIn,ba.allowIn=!0,a=fa(),ba.allowIn=g,O(":"),g=fa(),c=(new G(f)).finishConditionalExpression(c,a,g));if(c===Qa.ArrowParameterPlaceHolder||L("\x3d\x3e"))if(ba.parenthesisCount===b||ba.parenthesisCount===b+1)if(c.type===ga.Identifier?
  1386. d=La([c]):c.type===ga.AssignmentExpression?d=La([c]):c.type===ga.SequenceExpression?d=La(c.expressions):c===Qa.ArrowParameterPlaceHolder&&(d=La([])),d)return b=d,e=new G(e),O("\x3d\x3e"),d=ma,c=L("{")?Ka():fa(),ma&&b.firstRestricted&&I(b.firstRestricted,b.message),ma&&b.stricted&&U(b.stricted,b.message),ma=d,e.finishArrowFunctionExpression(b.params,b.defaults,c,c.type!==ga.BlockStatement);X.type!==Q.Punctuator?b=!1:(b=X.value,b="\x3d"===b||"*\x3d"===b||"/\x3d"===b||"%\x3d"===b||"+\x3d"===b||"-\x3d"===
  1387. b||"\x3c\x3c\x3d"===b||"\x3e\x3e\x3d"===b||"\x3e\x3e\x3e\x3d"===b||"\x26\x3d"===b||"^\x3d"===b||"|\x3d"===b);b&&(ha(c)||H(la.InvalidLHSInAssignment),a=z(),b=fa(),c=(new G(e)).finishAssignmentExpression(a.value,c,b));return c}function wa(){var b,a=X;b=fa();if(L(",")){for(b=[b];E<na&&L(",");)z(),b.push(fa());b=(new G(a)).finishSequenceExpression(b)}return b}function za(){var b,a=new F;b=z();b.type!==Q.Identifier&&I(b);return a.finishIdentifier(b.value)}function hb(b){var a=null,c,d=new F;c=za();"const"===
  1388. b?(O("\x3d"),a=fa()):L("\x3d")&&(z(),a=fa());return d.finishVariableDeclarator(c,a)}function Va(b){var a=[];do{a.push(hb(b));if(!L(","))break;z()}while(E<na);return a}function Ma(b){var a=X.type,c,d;a===Q.EOF&&I(X);if(a===Q.Punctuator&&"{"===X.value){if(b){O("{");var e=X;b=E;c=ea;d=ja;z();a=L(":");X=e;E=b;ea=c;ja=d;if((X.type===Q.Identifier||X.type===Q.StringLiteral)&&a)return ka(!0);b=new F;for(c=[];E<na&&!L("}");){d=Ja();if("undefined"===typeof d)break;c.push(d)}O("}");return b.finishBlockStatement(c)}return ka()}b=
  1389. new F;if(a===Q.Punctuator)switch(X.value){case ";":return b=new F,O(";"),b.finishEmptyStatement();case "(":return c=wa(),T(),b.finishExpressionStatement(c)}else if(a===Q.Keyword)switch(X.value.toLowerCase()){case "break":return c=null,J("break"),59===K.charCodeAt(E)?(z(),ba.inIteration||ba.inSwitch||Z(la.IllegalBreak),b=b.finishBreakStatement(null)):Y()?(ba.inIteration||ba.inSwitch||Z(la.IllegalBreak),b=b.finishBreakStatement(null)):(X.type===Q.Identifier&&(c=za(),d="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,
  1390. d)||Z(la.UnknownLabel,c.name)),T(),null!==c||ba.inIteration||ba.inSwitch||Z(la.IllegalBreak),b=b.finishBreakStatement(c)),b;case "continue":return c=null,J("continue"),59===K.charCodeAt(E)?(z(),ba.inIteration||Z(la.IllegalContinue),b=b.finishContinueStatement(null)):Y()?(ba.inIteration||Z(la.IllegalContinue),b=b.finishContinueStatement(null)):(X.type===Q.Identifier&&(c=za(),d="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,d)||Z(la.UnknownLabel,c.name)),T(),null!==c||ba.inIteration||Z(la.IllegalContinue),
  1391. b=b.finishContinueStatement(c)),b;case "for":var g,f,k;f=ba.allowIn;g=a=e=null;J("for");O("(");if(L(";"))z();else{if(S("var")){ba.allowIn=!1;var m=new F;g=z();k=Va();g=m.finishVariableDeclaration(k,g.value);ba.allowIn=f;1===g.declarations.length&&S("in")&&(z(),c=g,d=wa(),g=null)}else ba.allowIn=!1,g=wa(),ba.allowIn=f,S("in")&&(ha(g)||H(la.InvalidLHSInForIn),z(),c=g,d=wa(),g=null);"undefined"===typeof c&&O(";")}"undefined"===typeof c&&(L(";")||(a=wa()),O(";"),L(")")||(e=wa()));O(")");k=ba.inIteration;
  1392. ba.inIteration=!0;f=Ma(!0);ba.inIteration=k;return"undefined"===typeof c?b.finishForStatement(g,a,e,f):b.finishForInStatement(c,d,f);case "function":return Ya(b);case "if":return J("if"),O("("),c=wa(),O(")"),d=Ma(!0),S("else")?(z(),a=Ma(!0)):a=null,b.finishIfStatement(c,d,a);case "return":return c=null,J("return"),ba.inFunctionBody||H(la.IllegalReturn),32===K.charCodeAt(E)&&h(K.charCodeAt(E+1))?(c=wa(),T(),b=b.finishReturnStatement(c)):Y()?b=b.finishReturnStatement(null):(L(";")||L("}")||X.type===
  1393. Q.EOF||(c=wa()),T(),b=b.finishReturnStatement(c)),b;case "var":return J("var"),c=Va(),T(),b.finishVariableDeclaration(c,"var")}c=wa();if(c.type===ga.Identifier&&L(":"))return z(),a="$"+c.name,Object.prototype.hasOwnProperty.call(ba.labelSet,a)&&Z(la.Redeclaration,"Label",c.name),ba.labelSet[a]=!0,d=Ma(!1),delete ba.labelSet[a],b.finishLabeledStatement(c,d);T();return b.finishExpressionStatement(c)}function Ka(){var b,a=[],c,d,e,g,f,h=new F;for(O("{");E<na&&X.type===Q.StringLiteral;){c=X;b=Ja();a.push(b);
  1394. if(b.expression.type!==ga.Literal)break;b=K.slice(c.start+1,c.end-1);"use strict"===b?(ma=!0,d&&U(d,la.StrictOctalLiteral)):!d&&c.octal&&(d=c)}c=ba.labelSet;d=ba.inIteration;e=ba.inSwitch;g=ba.inFunctionBody;f=ba.parenthesizedCount;ba.labelSet={};ba.inIteration=!1;ba.inSwitch=!1;ba.inFunctionBody=!0;for(ba.parenthesizedCount=0;E<na&&!L("}");){b=Ja();if("undefined"===typeof b)break;a.push(b)}O("}");ba.labelSet=c;ba.inIteration=d;ba.inSwitch=e;ba.inFunctionBody=g;ba.parenthesizedCount=f;return h.finishBlockStatement(a)}
  1395. function Ia(b,a,c){c="$"+c;ma?Object.prototype.hasOwnProperty.call(b.paramSet,c)&&(b.stricted=a,b.message=la.StrictParamDupe):!b.firstRestricted&&Object.prototype.hasOwnProperty.call(b.paramSet,c)&&(b.firstRestricted=a,b.message=la.StrictParamDupe);b.paramSet[c]=!0}function Fa(b){b={params:[],defaultCount:0,defaults:[],firstRestricted:b};O("(");if(!L(")"))for(b.paramSet={};E<na;){var a=b,c=void 0,d=void 0,e=void 0,c=X,d=za();Ia(a,c,c.value);L("\x3d")&&(z(),e=fa(),++a.defaultCount);a.params.push(d);
  1396. a.defaults.push(e);if(L(")"))break;O(",")}O(")");0===b.defaultCount&&(b.defaults=[]);return{params:b.params,defaults:b.defaults,stricted:b.stricted,firstRestricted:b.firstRestricted,message:b.message}}function Ya(){var b,a=[],c=[],d,e,g,f,h,k=new F;J("function");b=za();d=Fa(g);a=d.params;c=d.defaults;e=d.stricted;g=d.firstRestricted;d.message&&(f=d.message);h=ma;d=Ka();ma&&g&&I(g,f);ma&&e&&U(e,f);ma=h;return k.finishFunctionDeclaration(b,a,c,d)}function Ja(){if(X.type===Q.Keyword)return"function"===
  1397. X.value.toLowerCase()?Ya():Ma(!1);if(X.type!==Q.EOF)return Ma(!1)}function Ra(){var b,a,c,d=[];for(b=0;b<M.tokens.length;++b)a=M.tokens[b],c={type:a.type,value:a.value},a.regex&&(c.regex={pattern:a.regex.pattern,flags:a.regex.flags}),M.range&&(c.range=a.range),M.loc&&(c.loc=a.loc),d.push(c);M.tokens=d}var Q,Ha,ua,ga,Qa,Na,la,db,K,ma,E,ea,ja,na,X,ba,M;Q={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};Ha={};Ha[Q.BooleanLiteral]=
  1398. "Boolean";Ha[Q.EOF]="\x3cend\x3e";Ha[Q.Identifier]="Identifier";Ha[Q.Keyword]="Keyword";Ha[Q.NullLiteral]="Null";Ha[Q.NumericLiteral]="Numeric";Ha[Q.Punctuator]="Punctuator";Ha[Q.StringLiteral]="String";Ha[Q.RegularExpression]="RegularExpression";ua="( { [ in typeof instanceof new return case delete throw void \x3d +\x3d -\x3d *\x3d /\x3d %\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d |\x3d ^\x3d , + - * / % ++ -- \x3c\x3c \x3e\x3e \x3e\x3e\x3e \x26 | ^ ! ~ \x26\x26 || ? : \x3d\x3d\x3d \x3d\x3d \x3e\x3d \x3c\x3d \x3c \x3e !\x3d !\x3d\x3d".split(" ");
  1399. ga={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",
  1400. FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator"};Qa={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}};
  1401. Na={Data:1,Get:2,Set:4};la={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",
  1402. MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",
  1403. StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",
  1404. AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};db={NonAsciiIdentifierStart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/,
  1405. NonAsciiIdentifierPart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/};
  1406. G.prototype=F.prototype={processComment:function(){var b,a,c,d=M.bottomRightStack,e,g,f=d[d.length-1];if(!(this.type===ga.Program&&0<this.body.length)){if(0<M.trailingComments.length){c=[];for(e=M.trailingComments.length-1;0<=e;--e)g=M.trailingComments[e],g.range[0]>=this.range[1]&&(c.unshift(g),M.trailingComments.splice(e,1));M.trailingComments=[]}else f&&f.trailingComments&&f.trailingComments[0].range[0]>=this.range[1]&&(c=f.trailingComments,delete f.trailingComments);if(f)for(;f&&f.range[0]>=this.range[0];)b=
  1407. f,f=d.pop();if(b)b.leadingComments&&b.leadingComments[b.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=b.leadingComments,b.leadingComments=void 0);else if(0<M.leadingComments.length)for(a=[],e=M.leadingComments.length-1;0<=e;--e)g=M.leadingComments[e],g.range[1]<=this.range[0]&&(a.unshift(g),M.leadingComments.splice(e,1));a&&0<a.length&&(this.leadingComments=a);c&&0<c.length&&(this.trailingComments=c);d.push(this)}},finish:function(){M.range&&(this.range[1]=E);M.loc&&(this.loc.end=
  1408. new C,M.source&&(this.loc.source=M.source));M.attachComment&&this.processComment()},finishArrayExpression:function(b){this.type=ga.ArrayExpression;this.elements=b;this.finish();return this},finishAssignmentExpression:function(b,a,c){this.type=ga.AssignmentExpression;this.operator=b;this.left=a;this.right=c;this.finish();return this},finishBinaryExpression:function(b,a,c){this.type="||"===b||"\x26\x26"===b?ga.LogicalExpression:ga.BinaryExpression;this.operator=b;this.left=a;this.right=c;this.finish();
  1409. return this},finishBlockStatement:function(b){this.type=ga.BlockStatement;this.body=b;this.finish();return this},finishBreakStatement:function(b){this.type=ga.BreakStatement;this.label=b;this.finish();return this},finishCallExpression:function(b,a){this.type=ga.CallExpression;this.callee=b;this.arguments=a;this.finish();return this},finishConditionalExpression:function(b,a,c){this.type=ga.ConditionalExpression;this.test=b;this.consequent=a;this.alternate=c;this.finish();return this},finishContinueStatement:function(b){this.type=
  1410. ga.ContinueStatement;this.label=b;this.finish();return this},finishEmptyStatement:function(){this.type=ga.EmptyStatement;this.finish();return this},finishExpressionStatement:function(b){this.type=ga.ExpressionStatement;this.expression=b;this.finish();return this},finishForStatement:function(b,a,c,d){this.type=ga.ForStatement;this.init=b;this.test=a;this.update=c;this.body=d;this.finish();return this},finishForInStatement:function(b,a,c){this.type=ga.ForInStatement;this.left=b;this.right=a;this.body=
  1411. c;this.each=!1;this.finish();return this},finishFunctionDeclaration:function(b,a,c,d){this.type=ga.FunctionDeclaration;this.id=b;this.params=a;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishFunctionExpression:function(b,a,c,d){this.type=ga.FunctionExpression;this.id=b;this.params=a;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishIdentifier:function(b){this.type=ga.Identifier;
  1412. this.name=b;this.finish();return this},finishIfStatement:function(b,a,c){this.type=ga.IfStatement;this.test=b;this.consequent=a;this.alternate=c;this.finish();return this},finishLiteral:function(b){this.type=ga.Literal;this.value=b.value;this.raw=K.slice(b.start,b.end);b.regex&&(this.regex=b.regex);this.finish();return this},finishMemberExpression:function(b,a,c){this.type=ga.MemberExpression;this.computed="["===b;this.object=a;this.property=c;this.finish();return this},finishObjectExpression:function(b){this.type=
  1413. ga.ObjectExpression;this.properties=b;this.finish();return this},finishPostfixExpression:function(b,a){this.type=ga.UpdateExpression;this.operator=b;this.argument=a;this.prefix=!1;this.finish();return this},finishProgram:function(b){this.type=ga.Program;this.body=b;this.finish();return this},finishProperty:function(b,a,c,d,e){this.type=ga.Property;this.key=a;this.value=c;this.kind=b;this.method=d;this.shorthand=e;this.finish();return this},finishReturnStatement:function(b){this.type=ga.ReturnStatement;
  1414. this.argument=b;this.finish();return this},finishUnaryExpression:function(b,a){this.type="++"===b||"--"===b?ga.UpdateExpression:ga.UnaryExpression;this.operator=b;this.argument=a;this.prefix=!0;this.finish();return this},finishVariableDeclaration:function(b,a){this.type=ga.VariableDeclaration;this.declarations=b;this.kind=a;this.finish();return this},finishVariableDeclarator:function(b,a){this.type=ga.VariableDeclarator;this.id=b;this.init=a;this.finish();return this}};a.version="2.0.0-dev";a.tokenize=
  1415. function(b,a){var c,d;c=String;"string"===typeof b||b instanceof String||(b=c(b));K=b;E=0;ea=0<K.length?1:0;ja=0;na=K.length;X=null;ba={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1};M={};a=a||{};a.tokens=!0;M.tokens=[];M.tokenize=!0;M.openParenToken=-1;M.openCurlyToken=-1;M.range="boolean"===typeof a.range&&a.range;M.loc="boolean"===typeof a.loc&&a.loc;"boolean"===typeof a.comment&&a.comment&&(M.comments=[]);"boolean"===typeof a.tolerant&&a.tolerant&&(M.errors=
  1416. []);try{A();if(X.type===Q.EOF)return M.tokens;for(z();X.type!==Q.EOF;)try{z()}catch(Sa){if(M.errors){M.errors.push(Sa);break}else throw Sa;}Ra();d=M.tokens;"undefined"!==typeof M.comments&&(d.comments=M.comments);"undefined"!==typeof M.errors&&(d.errors=M.errors)}catch(Sa){throw Sa;}finally{M={}}return d};a.parse=function(b,a){var c,d;d=String;"string"===typeof b||b instanceof String||(b=d(b));K=b;E=0;ea=0<K.length?1:0;ja=0;na=K.length;X=null;ba={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,
  1417. inIteration:!1,inSwitch:!1,lastCommentStart:-1};M={};"undefined"!==typeof a&&(M.range="boolean"===typeof a.range&&a.range,M.loc="boolean"===typeof a.loc&&a.loc,M.attachComment="boolean"===typeof a.attachComment&&a.attachComment,M.loc&&null!==a.source&&void 0!==a.source&&(M.source=d(a.source)),"boolean"===typeof a.tokens&&a.tokens&&(M.tokens=[]),"boolean"===typeof a.comment&&a.comment&&(M.comments=[]),"boolean"===typeof a.tolerant&&a.tolerant&&(M.errors=[]),M.attachComment&&(M.range=!0,M.comments=
  1418. [],M.bottomRightStack=[],M.trailingComments=[],M.leadingComments=[]));try{var e;t();A();e=new F;ma=!1;var g;b=[];for(var f,h,k;E<na;){f=X;if(f.type!==Q.StringLiteral)break;g=Ja();b.push(g);if(g.expression.type!==ga.Literal)break;h=K.slice(f.start+1,f.end-1);"use strict"===h?(ma=!0,k&&U(k,la.StrictOctalLiteral)):!k&&f.octal&&(k=f)}for(;E<na;){g=Ja();if("undefined"===typeof g)break;b.push(g)}c=e.finishProgram(b);"undefined"!==typeof M.comments&&(c.comments=M.comments);"undefined"!==typeof M.tokens&&
  1419. (Ra(),c.tokens=M.tokens);"undefined"!==typeof M.errors&&(c.errors=M.errors)}catch(jb){throw jb;}finally{M={}}return c};a.Syntax=function(){var b,a={};"function"===typeof Object.create&&(a=Object.create(null));for(b in ga)ga.hasOwnProperty(b)&&(a[b]=ga[b]);"function"===typeof Object.freeze&&Object.freeze(a);return a}()})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Warning ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PictureFillSymbol ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol3D ../TextSymbol ../WebStyleSymbol ../callouts/LineCallout3D ./symbolConversion".split(" "),
  1420. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d){function k(b,a,c){if(!b)return null;if(!c||"web-scene"!==c.origin||b.isInstanceOf(x)||b.isInstanceOf(w))return b.write(a,c);var e=d.to3D(b);if(e.symbol)return e.symbol.write(a,c);c.messages&&c.messages.push(new p("symbol:unsupported","Symbols of type '"+b.declaredClass+"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView",{symbol:b,context:c,error:e.error}));return null}Object.defineProperty(f,"__esModule",
  1421. {value:!0});var y={esriSMS:v,esriPMS:m,esriTS:r,esriSLS:u,esriSFS:t,esriPFS:c,PointSymbol3D:b,LineSymbol3D:l,PolygonSymbol3D:g,MeshSymbol3D:h,LabelSymbol3D:n,styleSymbolReference:w};f.read=function(b,a,c){if(a=b?y[b.type]||null:null)return a=new a,a.read(b,c),a;c&&c.messages&&b&&c.messages.push(new e("symbol:unsupported","Symbols of type '"+(b.type||"unknown")+"' are not supported",{definition:b,context:c}));return null};f.writeTarget=function(b,a,c,d){(b=k(b,{},d))&&(a[c]=b)};f.write=k;f.fromJSON=
  1422. function(b,a){var c=b?y[b.type]||null:null;return c?c.fromJSON(b,a):null};f.readCallout3D=function(b,a){if(!b||!b.type)return null;var c=null;switch(b.type){case "line":c=new q}c&&c.read(b,a);return c}})},"esri/symbols/LabelSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),
  1423. function(a,f,p,e,n,l,h,c,m,b,g){var t=n.ofType({base:null,key:"type",typeMap:{text:m}});return function(a){function c(b){b=a.call(this)||this;b.verticalOffset=null;b.callout=null;b.styleOrigin=null;b.symbolLayers=new t;b.type="label-3d";return b}p(c,a);f=c;c.prototype.supportsCallout=function(){return!0};c.prototype.hasVisibleCallout=function(){return b.hasVisibleCallout(this)};c.prototype.hasVisibleVerticalOffset=function(){return b.hasVisibleVerticalOffset(this)};c.prototype.clone=function(){return new f({styleOrigin:l.clone(this.styleOrigin),
  1424. symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail),callout:l.clone(this.callout),verticalOffset:l.clone(this.verticalOffset)})};e([h.property({type:g.default,json:{write:!0}})],c.prototype,"verticalOffset",void 0);e([h.property(b.calloutProperty)],c.prototype,"callout",void 0);e([h.property({json:{read:!1,write:!1}})],c.prototype,"styleOrigin",void 0);e([h.property({type:t})],c.prototype,"symbolLayers",void 0);e([h.property()],c.prototype,"type",void 0);return c=f=e([h.subclass("esri.symbols.LabelSymbol3D")],
  1425. c);var f}(h.declared(c))})},"esri/symbols/Symbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/collectionUtils ../core/Logger ../core/urlUtils ../core/Warning ../core/accessorSupport/decorators ../portal/Portal ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./PathSymbol3DLayer ./Symbol ./Symbol3DLayer ./TextSymbol3DLayer ./support/StyleOrigin ./support/Thumbnail".split(" "),
  1426. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y,z){var A={icon:v,object:r,line:x,path:w,fill:u,extrude:t,text:k},C=n.ofType({base:d,key:"type",typeMap:A}),B=h.getLogger("esri.symbols.Symbol3D");return function(a){function f(b){b=a.call(this)||this;b.styleOrigin=null;b.thumbnail=null;b.type=null;var c=b.__accessor__&&b.__accessor__.metadatas&&b.__accessor__.metadatas.symbolLayers;b._set("symbolLayers",new (c&&c.type||n));return b}p(f,a);Object.defineProperty(f.prototype,"color",{get:function(){return null},
  1427. set:function(b){B.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"symbolLayers",{set:function(b){l.referenceSetter(b,this._get("symbolLayers"))},enumerable:!0,configurable:!0});f.prototype.readSymbolLayers=function(b,a,c){a=[];for(var e=0;e<b.length;e++){var g=b[e],f=d.typeJSONDictionary.read(g.type),h=A[f];h?(g=new h,g.read(b[e],c),a.push(g)):(B.warn("Unknown symbol layer type: "+
  1428. f),c&&c.messages&&c.messages.push(new m("symbol-layer:unsupported","Symbol layers of type '"+(f||"unknown")+"' are not supported",{definition:g,context:c})))}return a};f.prototype.readStyleOrigin=function(b,a,d){if(b.styleUrl&&b.name)return a=c.read(b.styleUrl,d),new y({styleUrl:a,name:b.name});if(b.styleName&&b.name)return new y({portal:d&&d.portal||g.getDefault(),styleName:b.styleName,name:b.name});d&&d.messages&&d.messages.push(new m("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",
  1429. {context:d,definition:b}))};f.prototype.writeStyleOrigin=function(b,a,d,e){b.styleUrl&&b.name?(d=c.write(b.styleUrl,e),c.isAbsolute(d)&&(d=c.normalize(d)),a.styleOrigin={styleUrl:d,name:b.name}):b.styleName&&b.name&&(b.portal&&e&&e.portal&&!c.hasSamePortal(b.portal.restUrl,e.portal.restUrl)?e&&e.messages&&e.messages.push(new m("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):a.styleOrigin=
  1430. {styleName:b.styleName,name:b.name})};f.prototype.normalizeCtorArgs=function(b){return b instanceof d||b&&A[b.type]?{symbolLayers:[b]}:Array.isArray(b)?{symbolLayers:b}:b};e([b.property({json:{read:!1,write:!1}})],f.prototype,"color",null);e([b.property({type:C,nonNullable:!0,json:{write:!0}}),b.cast(l.castForReferenceSetter)],f.prototype,"symbolLayers",null);e([b.reader("symbolLayers")],f.prototype,"readSymbolLayers",null);e([b.property({type:y})],f.prototype,"styleOrigin",void 0);e([b.reader("styleOrigin")],
  1431. f.prototype,"readStyleOrigin",null);e([b.writer("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],f.prototype,"writeStyleOrigin",null);e([b.property({type:z.default,json:{read:!1}})],f.prototype,"thumbnail",void 0);e([b.property({type:String,readOnly:!0,json:{read:!1}})],f.prototype,"type",void 0);return f=e([b.subclass("esri.symbols.Symbol3D")],f)}(b.declared(q))})},"esri/symbols/ExtrudeSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils".split(" "),
  1432. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this)||this;b.type="extrude";b.size=void 0;b.material=null;b.edges=null;return b}p(c,a);b=c;c.prototype.clone=function(){return new b({edges:this.edges&&this.edges.clone(),enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};e([n.property()],c.prototype,"type",void 0);e([n.property({type:Number,json:{write:!0}})],c.prototype,"size",void 0);
  1433. e([n.property()],c.prototype,"material",void 0);e([n.property(h.symbol3dEdgesProperty)],c.prototype,"edges",void 0);return c=b=e([n.subclass("esri.symbols.ExtrudeSymbol3DLayer")],c);var b}(n.declared(l))})},"esri/symbols/Symbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/kebabDictionary ../core/accessorSupport/decorators ./support/ElevationInfo ./support/Symbol3DMaterial".split(" "),function(a,f,p,e,
  1434. n,l,h,c,m){var b=l({Icon:"icon",Object:"object",Line:"line",Path:"path",Fill:"fill",Extrude:"extrude",Text:"text"});a=function(a){function g(b){b=a.call(this)||this;b.enabled=!0;b.material=null;b.type=null;return b}p(g,a);g.prototype.writeEnabled=function(b,a,c){b||(a[c]=b)};e([h.property({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],g.prototype,"enabled",void 0);e([h.writer("enabled")],g.prototype,"writeEnabled",null);e([h.property({type:c,json:{read:!1,write:!1}})],g.prototype,
  1435. "elevationInfo",void 0);e([h.property({type:m.default,json:{write:!0}})],g.prototype,"material",void 0);e([h.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:b.write}}})],g.prototype,"type",void 0);return g=e([h.subclass("esri.symbols.Symbol3DLayer")],g)}(h.declared(n));(a||(a={})).typeJSONDictionary=b;return a})},"esri/symbols/support/ElevationInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../support/arcadeUtils".split(" "),
  1436. function(a,f,p,e,n,l,h,c){var m=l({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),b=l({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"}),g=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);g=a;Object.defineProperty(a.prototype,"requiredFields",{get:function(){return c.extractFieldNames(this.expression)},enumerable:!0,configurable:!0});
  1437. a.prototype.clone=function(){return new g({expression:this.expression,title:this.title})};e([h.property({type:String,json:{write:!0}})],a.prototype,"expression",void 0);e([h.property({readOnly:!0,dependsOn:["expression"]})],a.prototype,"requiredFields",null);e([h.property({type:String,json:{write:!0}})],a.prototype,"title",void 0);return a=g=e([h.subclass("esri.layers.support.FeatureExpressionInfo")],a);var g}(h.declared(n));return function(a){function c(){return null!==a&&a.apply(this,arguments)||
  1438. this}p(c,a);f=c;c.prototype.readFeatureExpressionInfo=function(b,a){if(null!=b)return b;if(a.featureExpression&&0===a.featureExpression.value)return{expression:"0"}};c.prototype.writeFeatureExpressionInfo=function(b,a,c,e){a[c]=b.write(null,e);"0"===b.expression&&(a.featureExpression={value:0})};Object.defineProperty(c.prototype,"mode",{get:function(){var b=this._get("mode");return b?b:null!=this.offset||this.featureExpressionInfo?"relative-to-ground":"on-the-ground"},set:function(b){this._set("mode",
  1439. b)},enumerable:!0,configurable:!0});c.prototype.write=function(b,a){return this.offset||this.mode||this.featureExpressionInfo||this.unit?this.inherited(arguments):null};c.prototype.clone=function(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})};e([h.property({type:g,json:{write:!0}})],c.prototype,"featureExpressionInfo",void 0);e([h.reader("featureExpressionInfo",["featureExpressionInfo",
  1440. "featureExpression"])],c.prototype,"readFeatureExpressionInfo",null);e([h.writer("featureExpressionInfo",{featureExpressionInfo:{type:g},"featureExpression.value":{type:Number}})],c.prototype,"writeFeatureExpressionInfo",null);e([h.property({type:String,dependsOn:["offset","featureExpressionInfo"],json:{read:m.read,write:{writer:m.write,isRequired:!0}}})],c.prototype,"mode",null);e([h.property({type:Number,json:{write:!0}})],c.prototype,"offset",void 0);e([h.property({type:String,json:{read:b.read,
  1441. write:b.write}})],c.prototype,"unit",void 0);return c=f=e([h.subclass("esri.layers.support.ElevationInfo")],c);var f}(h.declared(n))})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(a,f,p,e,n,l,h){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(){return null!==a&&a.apply(this,
  1442. arguments)||this}p(c,a);b=c;c.prototype.clone=function(){return new b({color:this.color?this.color.clone():null})};e([l.property(h.colorAndTransparencyProperty)],c.prototype,"color",void 0);return c=b=e([l.subclass("esri.symbols.support.Symbol3DMaterial")],c);var b}(l.declared(n));f.Symbol3DMaterial=a;f.default=a})},"esri/symbols/support/materialUtils":function(){define(["require","exports","../../Color","../../core/screenUtils","../../core/accessorSupport/ensureType"],function(a,f,p,e,n){function l(b){b=
  1443. n.ensureInteger(100*(1-b));return Math.max(0,Math.min(b,100))}function h(b){return Math.max(0,Math.min(1-b/100,1))}function c(b,a){b=null!=a.transparency?h(a.transparency):1;if((a=a.color)&&Array.isArray(a))return new p([a[0]||0,a[1]||0,a[2]||0,b])}function m(b,a){a.color=b.toJSON().slice(0,3);b=l(b.a);0!==b&&(a.transparency=b)}Object.defineProperty(f,"__esModule",{value:!0});f.opacityToTransparency=l;f.transparencyToOpacity=h;f.readColorAndTransparency=c;f.writeColorAndTransparency=m;f.colorAndTransparencyProperty=
  1444. {type:p,json:{type:[n.Integer],read:{source:["color","transparency"],reader:c},write:{target:{color:{type:[n.Integer]},transparency:{type:n.Integer}},writer:m}}};f.screenSizeProperty={type:Number,cast:e.toPt,json:{write:!0}}})},"esri/core/screenUtils":function(){define(["require","exports"],function(a,f){function p(a){return a?72*a/f.DPI:0}Object.defineProperty(f,"__esModule",{value:!0});var e=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;f.DPI=96;f.pt2px=function(a){return a?a/72*f.DPI:0};f.px2pt=p;f.toPt=
  1445. function(a){if("string"===typeof a){if(e.test(a)){var f=a.match(e),h=Number(f[1]),f=f[3]&&f[3].toLowerCase();a="-"===a.charAt(0);h="px"===f?p(h):h;return a?-h:h}console.warn("screenUtils.toPt: input not recognized!");return null}return a}})},"esri/symbols/edges/utils":function(){define(["require","exports","./Edges3D","./SketchEdges3D","./SolidEdges3D"],function(a,f,p,e,n){function l(a,c,f){if(!a)return a;switch(a.type){case "solid":return c=new n,c.read(a,f),c;case "sketch":return c=new e,c.read(a,
  1446. f),c}}Object.defineProperty(f,"__esModule",{value:!0});f.read=l;f.symbol3dEdgesProperty={types:{key:"type",base:p,typeMap:{solid:n,sketch:e}},json:{read:l,write:!0}}})},"esri/symbols/edges/Edges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper dojo/_base/lang ../../Color ../../core/JSONSupport ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),
  1447. function(a,f,p,e,n,l,h,c,m,b,g,t){return function(a){function c(c){c=a.call(this)||this;c.color=new h([0,0,0,1]);c.extensionLength=0;c.size=b.px2pt(1);return c}p(c,a);c.prototype.normalizeCtorArgs=function(b){b&&b.type&&(b=l.mixin({},b),delete b.type);return b};c.prototype.clone=function(){};c.prototype.cloneProperties=function(){return{color:m.clone(this.color),size:this.size,extensionLength:this.extensionLength}};e([g.property({type:String,readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],c.prototype,
  1448. "type",void 0);e([g.property(t.colorAndTransparencyProperty)],c.prototype,"color",void 0);e([g.property(n({},t.screenSizeProperty,{json:{write:{overridePolicy:function(b){return{enabled:!!b}}}}}))],c.prototype,"extensionLength",void 0);e([g.property(t.screenSizeProperty)],c.prototype,"size",void 0);return c=e([g.subclass("esri.symbols.edges.Edges3D")],c)}(g.declared(c))})},"esri/symbols/edges/SketchEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),
  1449. function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this)||this;b.type="sketch";return b}p(c,a);f=c;c.prototype.clone=function(){return new f(this.cloneProperties())};e([n.property({type:String})],c.prototype,"type",void 0);return c=f=e([n.subclass("esri.symbols.edges.SketchEdges3D")],c);var f}(n.declared(l))})},"esri/symbols/edges/SolidEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),
  1450. function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this)||this;b.type="solid";return b}p(c,a);f=c;c.prototype.clone=function(){return new f(this.cloneProperties())};e([n.property({type:String})],c.prototype,"type",void 0);return c=f=e([n.subclass("esri.symbols.support.SolidEdges3D")],c);var f}(n.declared(l))})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils ./support/Symbol3DFillMaterial ./support/Symbol3DOutline".split(" "),
  1451. function(a,f,p,e,n,l,h,c,m){return function(b){function a(a){a=b.call(this)||this;a.type="fill";a.material=null;a.outline=null;a.edges=null;return a}p(a,b);f=a;a.prototype.clone=function(){return new f({edges:this.edges&&this.edges.clone(),enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone()})};e([n.property()],a.prototype,"type",void 0);e([n.property({type:c.default})],a.prototype,
  1452. "material",void 0);e([n.property({type:m.default,json:{write:!0}})],a.prototype,"outline",void 0);e([n.property(h.symbol3dEdgesProperty)],a.prototype,"edges",void 0);return a=f=e([n.subclass("esri.symbols.FillSymbol3DLayer")],a);var f}(n.declared(l))})},"esri/symbols/support/Symbol3DFillMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Symbol3DMaterial".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,
  1453. "__esModule",{value:!0});a=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}p(c,a);f=c;c.prototype.clone=function(){return new f({color:this.color?this.color.clone():null,colorMixMode:this.colorMixMode})};e([n.property({type:String,json:{read:!0,write:!0}})],c.prototype,"colorMixMode",void 0);return c=f=e([n.subclass("esri.symbols.support.Symbol3DFillMaterial")],c);var f}(n.declared(l.default));f.Symbol3DFillMaterial=a;f.default=a})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/screenUtils ../../core/accessorSupport/decorators ./materialUtils".split(" "),
  1454. function(a,f,p,e,n,l,h,c,m){Object.defineProperty(f,"__esModule",{value:!0});a=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new n([0,0,0,1]);a.size=h.px2pt(1);return a}p(a,b);f=a;a.prototype.clone=function(){return new f({color:this.color?this.color.clone():null,size:this.size})};e([c.property(m.colorAndTransparencyProperty)],a.prototype,"color",void 0);e([c.property(m.screenSizeProperty)],a.prototype,"size",void 0);return a=f=e([c.subclass("esri.symbols.support.Symbol3DOutline")],
  1455. a);var f}(c.declared(l));f.Symbol3DOutline=a;f.default=a})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/urlUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/materialUtils ./support/Symbol3DOutline ./support/Symbol3DResource".split(" "),function(a,f,p,e,n,l,h,c,m,b,g){var t=n({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",
  1456. topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right"},{ignoreUnknown:!0}),u=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);c=a;a.prototype.readHref=function(b,a,c){return b?l.read(b,c):a.dataURI};a.prototype.writeHref=function(b,a,c,e){b&&(l.isDataProtocol(b)?a.dataURI=b:(a.href=l.write(b,e),l.isAbsolute(a.href)&&(a.href=l.normalize(a.href))))};a.prototype.clone=function(){return new c({href:this.href,primitive:this.primitive})};e([h.property({json:{write:!0,
  1457. read:{source:["href","dataURI"]}}})],a.prototype,"href",void 0);e([h.reader("href")],a.prototype,"readHref",null);e([h.writer("href",{href:{type:String},dataURI:{type:String}})],a.prototype,"writeHref",null);return a=c=e([h.subclass("esri.symbols.support.IconSymbol3DLayerResource")],a);var c}(h.declared(g.default));return function(a){function c(b){b=a.call(this)||this;b.material=null;b.resource=null;b.type="icon";b.size=12;b.anchor=void 0;b.outline=void 0;return b}p(c,a);g=c;c.prototype.clone=function(){return new g({anchor:this.anchor,
  1458. enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),size:this.size})};e([h.property()],c.prototype,"material",void 0);e([h.property({type:u,json:{write:!0}})],c.prototype,"resource",void 0);e([h.property()],c.prototype,"type",void 0);e([h.property(m.screenSizeProperty)],c.prototype,"size",void 0);e([h.property({type:String,json:{read:t.read,
  1459. write:t.write}})],c.prototype,"anchor",void 0);e([h.property({type:b.default,json:{write:!0}})],c.prototype,"outline",void 0);return c=g=e([h.subclass("esri.symbols.IconSymbol3DLayer")],c);var g}(h.declared(c))})},"esri/symbols/support/Symbol3DResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/urlUtils ../../core/accessorSupport/decorators".split(" "),function(a,f,p,
  1460. e,n,l,h,c){Object.defineProperty(f,"__esModule",{value:!0});var m=l({invertedCone:"inverted-cone"});a=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);f=a;a.prototype.readHref=function(b,a,c){return h.read(b,c)};a.prototype.writeHref=function(b,a,c,e){b&&(a.href=h.write(b,e),h.isAbsolute(a.href)&&(a.href=h.normalize(a.href)))};a.prototype.readPrimitive=function(b){return m.fromJSON(b)};a.prototype.writePrimitive=function(b,a){a.primitive=m.toJSON(b)};a.prototype.clone=
  1461. function(){return new f({href:this.href,primitive:this.primitive})};e([c.property({type:String,json:{write:!0}})],a.prototype,"href",void 0);e([c.reader("href")],a.prototype,"readHref",null);e([c.writer("href")],a.prototype,"writeHref",null);e([c.property({type:String,json:{write:!0}})],a.prototype,"primitive",void 0);e([c.reader("primitive")],a.prototype,"readPrimitive",null);e([c.writer("primitive")],a.prototype,"writePrimitive",null);return a=f=e([c.subclass("esri.symbols.support.Symbol3DResource")],
  1462. a);var f}(c.declared(n));f.Symbol3DResource=a;f.default=a})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/screenUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/materialUtils".split(" "),function(a,f,p,e,n,l,h,c){return function(a){function b(b){b=a.call(this)||this;b.material=null;b.type="line";b.size=n.px2pt(1);return b}p(b,a);g=b;b.prototype.clone=function(){return new g({enabled:this.enabled,
  1463. elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};e([l.property()],b.prototype,"material",void 0);e([l.property()],b.prototype,"type",void 0);e([l.property(c.screenSizeProperty)],b.prototype,"size",void 0);return b=g=e([l.subclass("esri.symbols.LineSymbol3DLayer")],b);var g}(l.declared(h))})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/accessorSupport/decorators ./Symbol3DLayer ./support/Symbol3DMaterial ./support/Symbol3DResource".split(" "),
  1464. function(a,f,p,e,n,l,h,c,m){var b=n({center:"center",top:"top",bottom:"bottom",origin:"origin"},{ignoreUnknown:!0});return function(a){function g(b){b=a.call(this)||this;b.material=null;b.resource=null;b.type="object";b.width=void 0;b.height=void 0;b.depth=void 0;b.anchor=void 0;b.heading=void 0;b.tilt=void 0;b.roll=void 0;return b}p(g,a);f=g;g.prototype.clone=function(){return new f({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,depth:this.depth,enabled:this.enabled,elevationInfo:this.elevationInfo&&
  1465. this.elevationInfo.clone(),height:this.height,material:this.material&&this.material.clone(),resource:this.resource&&this.resource.clone(),width:this.width})};Object.defineProperty(g.prototype,"isPrimitive",{get:function(){return!this.resource||"string"!==typeof this.resource.href},enumerable:!0,configurable:!0});e([l.property({type:c.default})],g.prototype,"material",void 0);e([l.property({type:m.default,json:{write:!0}})],g.prototype,"resource",void 0);e([l.property()],g.prototype,"type",void 0);
  1466. e([l.property({type:Number,json:{write:!0}})],g.prototype,"width",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"height",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"depth",void 0);e([l.property({type:String,json:{read:b.read,write:b.write}})],g.prototype,"anchor",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"heading",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"tilt",void 0);e([l.property({type:Number,json:{write:!0}})],
  1467. g.prototype,"roll",void 0);e([l.property({readOnly:!0,dependsOn:["resource","resource.href"]})],g.prototype,"isPrimitive",null);return g=f=e([l.subclass("esri.symbols.ObjectSymbol3DLayer")],g);var f}(l.declared(h))})},"esri/symbols/PathSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer".split(" "),function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this)||this;b.material=
  1468. null;b.type="path";b.size=void 0;return b}p(c,a);f=c;c.prototype.readSize=function(b,a){return b||a.width||0};c.prototype.clone=function(){return new f({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};e([n.property()],c.prototype,"material",void 0);e([n.property()],c.prototype,"type",void 0);e([n.property({type:Number,json:{write:{enabled:!0,target:{size:{type:Number},width:{type:Number}}}}})],c.prototype,
  1469. "size",void 0);e([n.reader("size",["size","width"])],c.prototype,"readSize",null);return c=f=e([n.subclass("esri.symbols.PathSymbol3DLayer")],c);var f}(n.declared(l))})},"esri/symbols/Symbol":function(){define(["../core/lang","../core/kebabDictionary","../core/JSONSupport","../Color"],function(a,f,p,e){var n=f({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",
  1470. PolygonSymbol3D:"polygon-3d",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"}),l=0;return p.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id="sym"+l++},properties:{type:{type:String,value:null,json:{read:n.fromJSON,write:{ignoreOrigin:!0,writer:function(a,c){c.type=n.toJSON(this.type)}}}},color:{type:e,value:new e([0,0,0,1]),json:{read:function(e){return e&&a.isDefined(e[0])?[e[0],e[1],e[2],e[3]/255]:e},write:{allowNull:!0}}}}})})},"esri/symbols/TextSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Symbol3DLayer ./support/materialUtils ./support/Symbol3DHalo".split(" "),
  1471. function(a,f,p,e,n,l,h,c,m){return function(b){function a(a){a=b.call(this)||this;a.font=null;a.halo=null;a.material=null;a.size=void 0;a.text=void 0;a.type="text";return a}p(a,b);f=a;a.prototype.writeFont=function(b,a){b&&(a.font=n.clone(b))};a.prototype.clone=function(){return new f({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),font:this.font&&n.clone(this.font),halo:this.halo&&n.clone(this.halo),material:this.material&&this.material.clone(),size:this.size,text:this.text})};
  1472. e([l.property()],a.prototype,"font",void 0);e([l.writer("font",{"font.family":{type:String},"font.weight":{type:String},"font.style":{type:String},"font.decoration":{type:String},"font.size":{type:Number}})],a.prototype,"writeFont",null);e([l.property({type:m.default,json:{write:!0}})],a.prototype,"halo",void 0);e([l.property()],a.prototype,"material",void 0);e([l.property(c.screenSizeProperty)],a.prototype,"size",void 0);e([l.property({type:String,json:{write:!0}})],a.prototype,"text",void 0);e([l.property()],
  1473. a.prototype,"type",void 0);return a=f=e([l.subclass("esri.symbols.TextSymbol3DLayer")],a);var f}(l.declared(h))})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(a,f,p,e,n,l,h,c,m){Object.defineProperty(f,"__esModule",{value:!0});a=function(b){function a(){var a=null!==b&&
  1474. b.apply(this,arguments)||this;a.color=new n([0,0,0,1]);a.size=0;return a}p(a,b);f=a;a.prototype.clone=function(){return new f({color:h.clone(this.color),size:this.size})};e([c.property(m.colorAndTransparencyProperty)],a.prototype,"color",void 0);e([c.property(m.screenSizeProperty)],a.prototype,"size",void 0);return a=f=e([c.subclass("esri.symbols.support.Symbol3DHalo")],a);var f}(c.declared(l));f.Symbol3DHalo=a;f.default=a})},"esri/symbols/support/StyleOrigin":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ../../portal/Portal".split(" "),
  1475. function(a,f,p,e,n,l,h){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.portal=null;return b}p(c,a);b=c;c.prototype.clone=function(){return new b({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};e([l.property({type:String})],c.prototype,"name",void 0);e([l.property({type:String})],c.prototype,"styleUrl",void 0);e([l.property({type:String})],c.prototype,"styleName",void 0);e([l.property({type:h})],c.prototype,"portal",void 0);return c=
  1476. b=e([l.subclass("esri.symbols.support.StyleOrigin")],c);var b}(l.declared(n))})},"esri/symbols/support/Thumbnail":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}p(c,a);f=c;c.prototype.clone=function(){return new f({url:this.url})};
  1477. e([l.property({type:String})],c.prototype,"url",void 0);return c=f=e([l.subclass("esri.symbols.support.Thumbnail")],c);var f}(l.declared(n));f.Thumbnail=a;f.default=a})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(a,f,p,e){function n(a){if(!a)return!1;a=a.verticalOffset;return!a||0>=a.screenLength||0>=a.maxWorldLength?!1:!0}function l(a,c,f){if(!a)return a;switch(a.type){case "line":return c=new e,c.read(a,f),c}}Object.defineProperty(f,
  1478. "__esModule",{value:!0});f.hasVisibleVerticalOffset=n;f.hasVisibleCallout=function(a){if(!a||!a.supportsCallout||!a.supportsCallout())return!1;var c=a.callout;return c&&c.visible?n(a)?!0:!1:!1};f.isCalloutSupport=function(a){return"point-3d"===a.type||"label-3d"===a.type};f.read=l;f.calloutProperty={types:{key:"type",base:p,typeMap:{line:e}},json:{read:l,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),
  1479. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this)||this;b.visible=!0;return b}p(c,a);c.prototype.normalizeCtorArgs=function(b){b&&b.type&&(b=n.mixin({},b),delete b.type);return b};c.prototype.clone=function(){};e([h.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],c.prototype,"type",void 0);e([h.property({readOnly:!0})],c.prototype,"visible",void 0);return c=e([h.subclass("esri.symbols.callouts.Callout3D")],c)}(h.declared(l))})},"esri/symbols/callouts/LineCallout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ./LineCallout3DBorder ../support/materialUtils".split(" "),
  1480. function(a,f,p,e,n,l,h,c,m,b,g){return function(a){function f(b){b=a.call(this)||this;b.type="line";b.color=new n([0,0,0,1]);b.size=h.px2pt(1);b.border=null;return b}p(f,a);m=f;Object.defineProperty(f.prototype,"visible",{get:function(){return 0<this.size&&0<this.color.a},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new m({color:l.clone(this.color),size:this.size,border:l.clone(this.border)})};e([c.property({type:String})],f.prototype,"type",void 0);e([c.property(g.colorAndTransparencyProperty)],
  1481. f.prototype,"color",void 0);e([c.property(g.screenSizeProperty)],f.prototype,"size",void 0);e([c.property({type:b.default,json:{write:!0}})],f.prototype,"border",void 0);e([c.property({dependsOn:["size","color"],readOnly:!0})],f.prototype,"visible",null);return f=m=e([c.subclass("esri.symbols.callouts.LineCallout3D")],f);var m}(c.declared(m))})},"esri/symbols/callouts/LineCallout3DBorder":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),
  1482. function(a,f,p,e,n,l,h,c,m){Object.defineProperty(f,"__esModule",{value:!0});a=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new n("white");return a}p(a,b);f=a;a.prototype.clone=function(){return new f({color:h.clone(this.color)})};e([c.property(m.colorAndTransparencyProperty)],a.prototype,"color",void 0);return a=f=e([c.subclass("esri.symbols.callouts.LineCallout3DBorder")],a);var f}(c.declared(l));f.LineCallout3DBorder=a;f.default=a})},"esri/symbols/support/Symbol3DVerticalOffset":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),
  1483. function(a,f,p,e,n,l,h){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.screenLength=0;b.minWorldLength=0;return b}p(c,a);b=c;c.prototype.writeMinWorldLength=function(b,a,c){b&&(a[c]=b)};c.prototype.clone=function(){return new b({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})};e([l.property(h.screenSizeProperty)],c.prototype,"screenLength",void 0);e([l.property({type:Number,
  1484. json:{write:!0}})],c.prototype,"minWorldLength",void 0);e([l.writer("minWorldLength")],c.prototype,"writeMinWorldLength",null);e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxWorldLength",void 0);return c=b=e([l.subclass("esri.symbols.support.Symbol3DVerticalOffset")],c);var b}(l.declared(n));f.Symbol3DVerticalOffset=a;f.default=a})},"esri/symbols/LineSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./LineSymbol3DLayer ./PathSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer".split(" "),
  1485. function(a,f,p,e,n,l,h,c,m,b,g){var t=n.ofType({base:null,key:"type",typeMap:{line:c,text:g,path:m}});return function(b){function a(a){a=b.call(this)||this;a.symbolLayers=new t;a.type="line-3d";return a}p(a,b);c=a;a.prototype.clone=function(){return new c({styleOrigin:l.clone(this.styleOrigin),symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail)})};e([h.property({type:t})],a.prototype,"symbolLayers",void 0);e([h.property()],a.prototype,"type",void 0);return a=c=e([h.subclass("esri.symbols.LineSymbol3D")],
  1486. a);var c}(h.declared(b))})},"esri/symbols/MeshSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/lang ../core/accessorSupport/decorators ./FillSymbol3DLayer ./Symbol3D".split(" "),function(a,f,p,e,n,l,h,c,m){var b=n.ofType({base:null,key:"type",typeMap:{fill:c}});return function(a){function c(c){c=a.call(this)||this;c.symbolLayers=new b;c.type="mesh-3d";return c}p(c,a);g=c;c.prototype.clone=function(){return new g({styleOrigin:l.clone(this.styleOrigin),
  1487. symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail)})};e([h.property({type:b})],c.prototype,"symbolLayers",void 0);e([h.property()],c.prototype,"type",void 0);return c=g=e([h.subclass("esri.symbols.MeshSymbol3D")],c);var g}(h.declared(m))})},"esri/symbols/PictureFillSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./FillSymbol ./support/urlUtils".split(" "),function(a,f,p,e,n,l){var h={xscale:1,yscale:1,xoffset:0,yoffset:0,width:12,
  1488. height:12},c=a(n,{declaredClass:"esri.symbols.PictureFillSymbol",properties:{type:"picture-fill",url:l.urlPropertyDefinition,xscale:{value:1,json:{write:!0}},yscale:{value:1,json:{write:!0}},width:{value:12,cast:e.toPt,json:{write:!0}},height:{value:12,cast:e.toPt,json:{write:!0}},xoffset:{value:0,cast:e.toPt,json:{write:!0}},yoffset:{value:0,cast:e.toPt,json:{write:!0}},source:l.sourcePropertyDefinition},getDefaults:function(){return f.mixin(this.inherited(arguments),h)},normalizeCtorArgs:function(a,
  1489. b,c,f){if(a&&"string"!==typeof a&&null==a.imageData)return a;var g={};a&&(g.url=a);b&&(g.outline=b);null!=c&&(g.width=e.toPt(c));null!=f&&(g.height=e.toPt(f));return g},clone:function(){var a=new c({color:p.clone(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});a._set("source",p.clone(this.source));return a}});c.defaultProps=h;return c})},"esri/symbols/FillSymbol":function(){define(["./Symbol",
  1490. "./SimpleLineSymbol"],function(a,f){return a.createSubclass({declaredClass:"esri.symbols.FillSymbol",properties:{outline:{type:f,json:{read:{default:null},write:!0}},type:null}})})},"esri/symbols/SimpleLineSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","../core/screenUtils","./LineSymbol"],function(a,f,p,e,n){var l={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dash-dot",STYLE_DASHDOTDOT:"long-dash-dot-dot",STYLE_NULL:"none",STYLE_SHORTDASH:"short-dash",
  1491. STYLE_SHORTDOT:"short-dot",STYLE_SHORTDASHDOT:"short-dash-dot",STYLE_SHORTDASHDOTDOT:"short-dash-dot-dot",STYLE_LONGDASH:"long-dash",STYLE_LONGDASHDOT:"long-dash-dot",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},h={color:[0,0,0,1],style:l.STYLE_SOLID,width:.75,cap:l.CAP_BUTT,join:l.JOIN_MITER,miterLimit:7.5},c=a(n,{declaredClass:"esri.symbols.SimpleLineSymbol",properties:{type:"simple-line",style:{value:l.STYLE_SOLID,json:{read:function(a,
  1492. b){return p.valueOf(this._jsonStyles,a)||void 0},write:function(a,b){b.style=this._jsonStyles[a]}}},cap:{value:l.CAP_BUTT,json:{read:!1,write:!1}},join:{value:l.JOIN_MITER,json:{read:!1,write:!1}},miterLimit:{value:7.5,cast:e.toPt,json:{read:!1,write:!1}}},_jsonStyles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot","dash-dot":"esriSLSDashDot","long-dash-dot-dot":"esriSLSDashDotDot",none:"esriSLSNull","inside-frame":"esriSLSInsideFrame","short-dash":"esriSLSShortDash","short-dot":"esriSLSShortDot",
  1493. "short-dash-dot":"esriSLSShortDashDot","short-dash-dot-dot":"esriSLSShortDashDotDot","long-dash":"esriSLSLongDash","long-dash-dot":"esriSLSLongDashDot"},getDefaults:function(){return f.mixin(this.inherited(arguments),h)},normalizeCtorArgs:function(a,b,c,f,h,l){if(a&&"string"!==typeof a)return a;var g={};null!=a&&(g.style=a);null!=b&&(g.color=b);null!=c&&(g.width=e.toPt(c));null!=f&&(g.cap=f);null!=h&&(g.join=h);null!=l&&(g.miterLimit=e.toPt(l));return g},clone:function(){return new c({color:p.clone(this.color),
  1494. style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit})}});f.mixin(c,l);c.defaultProps=h;return c})},"esri/symbols/LineSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(a,f,p){return a(p,{declaredClass:"esri.symbols.LineSymbol",properties:{color:{},type:"simple-line",width:{value:.75,cast:f.toPt,json:{write:!0}}}})})},"esri/symbols/support/urlUtils":function(){define(["require","exports","../../core/urlUtils"],function(a,f,p){function e(a,
  1495. e,b){return e.imageData?p.makeData({mediaType:e.contentType||"image/png",isBase64:!0,data:e.imageData}):n(e.url,b)}function n(a,e){return!e||"service"!==e.origin&&"portal-item"!==e.origin||!e.layer||"feature"!==e.layer.type&&"stream"!==e.layer.type||p.isAbsolute(a)||!e.layer.parsedUrl?p.read(a,e):p.join(e.layer.parsedUrl.path,"images",a)}function l(a,e,b,g){p.isDataProtocol(a)?(a=p.dataComponents(a),e.contentType=a.mediaType,e.imageData=a.data,b&&b.imageData===e.imageData&&b.url&&(e.url=h(b.url,g))):
  1496. e.url=h(a,g)}function h(a,e){return p.write(a,e)}Object.defineProperty(f,"__esModule",{value:!0});f.readImageDataOrUrl=e;f.read=n;f.writeImageDataAndUrl=l;f.write=h;f.urlPropertyDefinition={json:{read:{source:["imageData","url"],reader:e},write:{writer:function(a,e,b,g){l(a,e,this.source,g)}}}};f.sourcePropertyDefinition={readOnly:!0,json:{read:{source:["imageData","url"],reader:function(a,e,b){a={};e.imageData&&(a.imageData=e.imageData);e.contentType&&(a.contentType=e.contentType);e.url&&(a.url=
  1497. n(e.url,b));return a}}}}})},"esri/symbols/PictureMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./support/urlUtils".split(" "),function(a,f,p,e,n,l){var h={width:12,height:12,angle:0,xoffset:0,yoffset:0},c=a(n,{declaredClass:"esri.symbols.PictureMarkerSymbol",properties:{color:{json:{write:!1}},type:"picture-marker",url:l.urlPropertyDefinition,source:l.sourcePropertyDefinition,height:{json:{read:{source:["height","size"],reader:function(a,
  1498. b){return b.size||a}},write:!0},cast:e.toPt},width:{json:{read:{source:["width","size"],reader:function(a,b){return b.size||a}},write:!0},cast:e.toPt},size:{json:{write:!1}}},getDefaults:function(){return f.mixin(this.inherited(arguments),h)},normalizeCtorArgs:function(a,b,c){if(a&&"string"!==typeof a&&null==a.imageData)return a;var g={};a&&(g.url=a);null!=b&&(g.width=e.toPt(b));null!=c&&(g.height=e.toPt(c));return g},clone:function(){var a=new c({angle:this.angle,height:this.height,url:this.url,
  1499. width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});a._set("source",p.clone(this.source));return a}});c.defaultProps=h;return c})},"esri/symbols/MarkerSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(a,f,p){return a(p,{declaredClass:"esri.symbols.MarkerSymbol",properties:{angle:{value:0,json:{read:function(a){return a&&-1*a},write:function(a,f){f.angle=a&&-1*a}}},type:{},xoffset:{value:0,cast:f.toPt,json:{write:!0}},yoffset:{value:0,cast:f.toPt,json:{write:!0}},
  1500. size:{value:9,cast:function(a){return"auto"===a?a:f.toPt(a)},json:{write:!0}}}})})},"esri/symbols/PointSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Error ../core/lang ../core/accessorSupport/decorators ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){var x=n.ofType({base:null,
  1501. key:"type",typeMap:{icon:m,object:b,text:t}});return function(b){function a(a){a=b.call(this)||this;a.verticalOffset=null;a.callout=null;a.symbolLayers=new x;a.type="point-3d";return a}p(a,b);g=a;a.prototype.writeSymbolLayers=function(b,a,c,e){var d=b.filter(function(b){return"text"!==b.type});e&&e.messages&&d.length<b.length&&(b=b.find(function(b){return"text"===b.type}),e.messages.push(new l("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PointSymbol3D",{symbolLayer:b})));
  1502. a[c]=d.map(function(b){return b.write({},e)}).toArray()};a.prototype.supportsCallout=function(){if(1!==(this.symbolLayers?this.symbolLayers.length:0))return!1;switch(this.symbolLayers.getItemAt(0).type){case "icon":case "text":case "object":return!0}return!1};a.prototype.hasVisibleCallout=function(){return u.hasVisibleCallout(this)};a.prototype.hasVisibleVerticalOffset=function(){return u.hasVisibleVerticalOffset(this)};a.prototype.clone=function(){return new g({verticalOffset:h.clone(this.verticalOffset),
  1503. callout:h.clone(this.callout),styleOrigin:h.clone(this.styleOrigin),symbolLayers:h.clone(this.symbolLayers),thumbnail:h.clone(this.thumbnail)})};e([c.property({type:v.default,json:{write:!0}})],a.prototype,"verticalOffset",void 0);e([c.property(u.calloutProperty)],a.prototype,"callout",void 0);e([c.property({type:x})],a.prototype,"symbolLayers",void 0);e([c.writer("web-scene","symbolLayers")],a.prototype,"writeSymbolLayers",null);e([c.property()],a.prototype,"type",void 0);return a=g=e([c.subclass("esri.symbols.PointSymbol3D")],
  1504. a);var g}(c.declared(g))})},"esri/symbols/PolygonSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Error ../core/lang ../core/accessorSupport/decorators ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=n.ofType({base:null,key:"type",typeMap:{extrude:m,fill:b,icon:g,
  1505. line:t,object:u,text:x}});return function(b){function a(a){a=b.call(this)||this;a.type="polygon-3d";return a}p(a,b);d=a;a.prototype.writeSymbolLayers=function(b,a,c,d){var e=b.filter(function(b){return"text"!==b.type});d&&d.messages&&e.length<b.length&&(b=b.find(function(b){return"text"===b.type}),d.messages.push(new l("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PolygonSymbol3D",{symbolLayer:b})));a[c]=e.map(function(b){return b.write({},d)}).toArray()};a.prototype.clone=
  1506. function(){return new d({styleOrigin:h.clone(this.styleOrigin),symbolLayers:h.clone(this.symbolLayers),thumbnail:h.clone(this.thumbnail)})};a.fromJSON=function(b){var a=new d;a.read(b);if(2===a.symbolLayers.length&&"fill"===a.symbolLayers.getItemAt(0).type&&"line"===a.symbolLayers.getItemAt(1).type){var c=a.symbolLayers.getItemAt(0),e=a.symbolLayers.getItemAt(1);!e.enabled||b.symbolLayers&&b.symbolLayers[1]&&!1===b.symbolLayers[1].enable||(c.outline={size:e.size,color:e.material.color});a.symbolLayers.removeAt(1)}return a};
  1507. e([c.property({type:r})],a.prototype,"symbolLayers",void 0);e([c.writer("web-scene","symbolLayers")],a.prototype,"writeSymbolLayers",null);e([c.property()],a.prototype,"type",void 0);return a=d=e([c.subclass("esri.symbols.PolygonSymbol3D")],a);var d}(c.declared(v))})},"esri/symbols/SimpleFillSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","./FillSymbol","./SimpleLineSymbol"],function(a,f,p,e,n){var l={style:"solid",outline:new n,color:[0,0,0,.25]},h=a(e,{declaredClass:"esri.symbols.SimpleFillSymbol",
  1508. properties:{color:{},type:"simple-fill",style:{value:"solid",type:String,json:{read:function(a){return p.valueOf(this._styles,a)||void 0},write:function(a,e){e.style=this._styles[a]}}}},_styles:{solid:"esriSFSSolid",none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical","forward-diagonal":"esriSFSForwardDiagonal","backward-diagonal":"esriSFSBackwardDiagonal",cross:"esriSFSCross","diagonal-cross":"esriSFSDiagonalCross"},getDefaults:function(){return f.mixin(this.inherited(arguments),
  1509. l)},normalizeCtorArgs:function(a,e,b){if(a&&"string"!==typeof a)return a;var c={};a&&(c.style=a);e&&(c.outline=e);b&&(c.color=b);return c},clone:function(){return new h({color:p.clone(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}});f.mixin(h,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forward-diagonal",STYLE_BACKWARD_DIAGONAL:"backward-diagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonal-cross"});
  1510. h.defaultProps=l;return h})},"esri/symbols/SimpleMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./SimpleLineSymbol".split(" "),function(a,f,p,e,n,l){var h={style:"circle",color:[255,255,255,.25],outline:new l,size:12,angle:0,xoffset:0,yoffset:0},c=a(n,{declaredClass:"esri.symbols.SimpleMarkerSymbol",properties:{color:{json:{write:function(a,b){a&&"x"!==this.style&&"cross"!==this.style&&(b.color=a.toJSON())}}},type:"simple-marker",size:{value:12},
  1511. style:{type:String,value:"circle",json:{read:function(a){return p.valueOf(this._styles,a)},write:function(a,b){b.style=this._styles[a]}}},path:{type:String,value:null,set:function(a){this.style="path";this._set("path",a)},json:{write:!0}},outline:{type:l,json:{write:!0}}},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},getDefaults:function(){return f.mixin(this.inherited(arguments),h)},normalizeCtorArgs:function(a,
  1512. b,c,f){if(a&&"string"!==typeof a)return a;var g={};a&&(g.style=a);null!=b&&(g.size=e.toPt(b));c&&(g.outline=c);f&&(g.color=f);return g},clone:function(){return new c({angle:this.angle,color:p.clone(this.color),outline:this.outline&&this.outline.clone(),size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})},read:function b(a,c){return this.getInherited(b,arguments).call(this,f.mixin({outline:null},a),c)}});f.mixin(c,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",
  1513. STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"});c.defaultProps=h;return c})},"esri/symbols/TextSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ../Color ./Symbol ./Font".split(" "),function(a,f,p,e,n,l,h){var c={text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:{},angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},m=a(l,{declaredClass:"esri.symbols.TextSymbol",properties:{backgroundColor:{type:n,json:{write:!0}},borderLineColor:{type:n,
  1514. json:{write:!0}},borderLineSize:{type:Number,json:{write:!0}},color:{},font:{type:h,json:{write:!0}},horizontalAlignment:{value:"center",json:{write:!0}},kerning:{value:!0,json:{write:!0}},haloColor:{type:n,json:{write:!0}},haloSize:{type:Number,cast:e.toPt,json:{write:!0}},rightToLeft:{json:{write:!0}},rotated:{value:!1,json:{write:!0}},text:{type:String,json:{write:!0}},type:"text",verticalAlignment:{type:String,json:{write:!0}},xoffset:{value:0,type:Number,cast:e.toPt,json:{write:!0}},yoffset:{value:0,
  1515. type:Number,cast:e.toPt,json:{write:!0}},angle:{type:Number,value:0,json:{read:function(b){return b&&-1*b},write:function(b,a){a.angle=b&&-1*b}}},width:{json:{write:!0}}},getDefaults:function(){return f.mixin(this.inherited(arguments),c)},normalizeCtorArgs:function(b,a,c){if(b&&"string"!==typeof b)return b;var e={};b&&(e.text=b);a&&(e.font=a);c&&(e.color=c);return e},clone:function(){return new m({angle:this.angle,backgroundColor:p.clone(this.backgroundColor),borderLineColor:p.clone(this.borderLineColor),
  1516. borderLineSize:this.borderLineSize,color:p.clone(this.color),font:this.font&&this.font.clone(),haloColor:p.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}});f.mixin(m,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",
  1517. DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});m.defaultProps=c;return m})},"esri/symbols/Font":function(){define(["dojo/_base/lang","../core/JSONSupport","../core/lang","../core/screenUtils"],function(a,f,p,e){var n={style:"normal",weight:"normal",size:9,family:"serif",decoration:"none"},l=f.createSubclass({declaredClass:"esri.symbols.Font",properties:{decoration:{},family:{},size:{cast:e.toPt},style:{},weight:{}},getDefaults:function(){return n},normalizeCtorArgs:function(a,
  1518. c,f,b){if(a&&"string"!==typeof a)return a;var g={};null!=a&&(g.size=e.toPt(a));null!=c&&(g.style=c);null!=f&&(g.weight=f);b&&(g.family=b);return g},toJSON:function(){return p.fixJson({size:this.size,style:this.style,decoration:this.decoration,weight:this.weight,family:this.family})},clone:function(){return new l({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}});l.defaultProps=n;a.mixin(l,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",
  1519. WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});return l})},"esri/symbols/WebStyleSymbol":function(){define("require exports ../core/tsSupport/extendsHelper ../core/tsSupport/decorateHelper ../core/Logger ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../portal/Portal ./Symbol ./support/Thumbnail".split(" "),function(a,f,p,e,n,l,h,c,m,b,g){var t=n.getLogger("esri.symbols.WebStyleSymbol");return function(b){function f(a){a=b.call(this,
  1520. a)||this;a.styleName=null;a.portal=null;a.styleUrl=null;a.thumbnail=null;a.name=null;a.type="web-style";return a}p(f,b);n=f;f.prototype._readStyleUrl=function(b,a,c){return h.read(b,c)};f.prototype._writeStyleUrl=function(b,a,c,d){a.styleUrl=h.write(b,d);h.isAbsolute(a.styleUrl)&&(a.styleUrl=h.normalize(a.styleUrl))};f.prototype._writeType=function(b,a,c,d){a.type="styleSymbolReference"};f.prototype.read=function(b,a){this.portal=a?a.portal:void 0;this.inherited(arguments,[b,a]);return this};f.prototype.clone=
  1521. function(){return new n({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};f.prototype.fetchSymbol=function(){var b=this;return l.create(function(b){return a(["./support/styleUtils"],b)}).then(function(a){a=a.resolveWebStyleSymbol(b,{portal:b.portal});a.catch(function(b){t.error("#fetchSymbol()","Failed to create symbol from style",b)});return a})};e([c.property({json:{write:!1}})],f.prototype,"color",void 0);e([c.property({type:String,json:{write:!0}})],f.prototype,
  1522. "styleName",void 0);e([c.property({type:m,json:{write:!1}})],f.prototype,"portal",void 0);e([c.property({type:String,json:{write:!0}})],f.prototype,"styleUrl",void 0);e([c.reader("styleUrl")],f.prototype,"_readStyleUrl",null);e([c.writer("styleUrl")],f.prototype,"_writeStyleUrl",null);e([c.property({type:g.default,json:{read:!1}})],f.prototype,"thumbnail",void 0);e([c.property({type:String,json:{write:!0}})],f.prototype,"name",void 0);e([c.property({type:String,readOnly:!0,json:{read:!1}})],f.prototype,
  1523. "type",void 0);e([c.writer("type")],f.prototype,"_writeType",null);return f=n=e([c.subclass("esri.symbols.WebStyleSymbol")],f);var n}(c.declared(b))})},"esri/symbols/support/symbolConversion":function(){define("require exports dojo/_base/lang ../../Color ../../core/Error ../../core/lang ../FillSymbol3DLayer ../Font ../IconSymbol3DLayer ../LabelSymbol3D ../LineSymbol3D ../LineSymbol3DLayer ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol3D ../TextSymbol ../TextSymbol3DLayer ../WebStyleSymbol".split(" "),
  1524. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y,z){function A(b){var a=b.color?b.color.clone():new e([255,255,255]),c,d,g;b instanceof u?(b.color&&0===b.color.r&&0===b.color.g&&0===b.color.b&&(a=new e([255,255,255])),c={href:b.url},d=b.width<=b.height?b.height:b.width):(c=b.style,c in C?c=C[c]:(console.log(c+' cannot be mapped to Icon symbol. Fallback to "circle"'),c="circle"),c={primitive:c},d=b.size,b.outline&&b.outline.color&&0<b.outline.width&&(g={size:b.outline.width,color:b.outline.color.clone()}));
  1525. return new v(new m({size:d,resource:c,material:{color:a},outline:g}))}Object.defineProperty(f,"__esModule",{value:!0});var C={};C[q.STYLE_CIRCLE]="circle";C[q.STYLE_CROSS]="cross";C[q.STYLE_DIAMOND]="kite";C[q.STYLE_SQUARE]="square";C[q.STYLE_X]="x";f.to3D=function(a,e,f,m){void 0===e&&(e=!1);void 0===f&&(f=!1);void 0===m&&(m=!0);if(!a)return{symbol:null};if(a instanceof d||a instanceof z)m=a.clone();else if(a instanceof w)m=new g(new t({size:a.width||1,material:{color:a.color?a.color.clone():[255,
  1526. 255,255]}}));else if(a instanceof q)m=A(a);else if(a instanceof u)m=A(a);else if(a instanceof r)m=new h({material:{color:a.color?a.color.clone():[255,255,255]}}),a.outline&&a.outline.color&&(m.outline={size:a.outline.width||0,color:a.outline.color}),m=new x(m);else if(a instanceof k){var B=p.clone(c.defaultProps);a.font&&p.mixin(B,a.font);var D;D=a.haloColor;var C=a.haloSize;D=D&&0<C?{color:l.clone(D),size:C}:null;m=new (m?b:v)(new y({size:B.size,font:{family:B.family,weight:B.weight,style:B.style},
  1527. halo:D,material:{color:a.color.clone()},text:a.text}))}else return{error:new n("symbol-conversion:unsupported-2d-symbol","2D symbol of type '"+(a.type||a.declaredClass)+"' is unsupported in 3D",{symbol:a})};e&&(m.id=a.id);if(f&&m.isInstanceOf(d))for(a=0;a<m.symbolLayers.length;++a)m.symbolLayers.getItemAt(a)._ignoreDrivers=!0;return{symbol:m}}})},"esri/symbols/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PictureFillSymbol ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol ../TextSymbol ../WebStyleSymbol".split(" "),
  1528. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r){Object.defineProperty(f,"__esModule",{value:!0});f.types={base:v,key:"type",typeMap:{"simple-fill":g,"picture-fill":h,"picture-marker":c,"simple-line":t,"simple-marker":u,text:x,"label-3d":e,"line-3d":n,"mesh-3d":l,"point-3d":m,"polygon-3d":b,"web-style":r}};f.rendererTypes={base:v,key:"type",typeMap:{"simple-fill":g,"picture-fill":h,"picture-marker":c,"simple-line":t,"simple-marker":u,text:x,"line-3d":n,"mesh-3d":l,"point-3d":m,"polygon-3d":b,"web-style":r}};
  1529. f.labelTypes={base:v,key:"type",typeMap:{text:x,"label-3d":e}};f.types3D={base:v,key:"type",typeMap:{"label-3d":e,"line-3d":n,"mesh-3d":l,"point-3d":m,"polygon-3d":b,"web-style":r}};f.rendererTypes3D={base:v,key:"type",typeMap:{"line-3d":n,"mesh-3d":l,"point-3d":m,"polygon-3d":b,"web-style":r}};f.labelTypes3D={base:v,key:"type",typeMap:{"label-3d":e}};f.ensureType=p.ensureOneOfType(f.types)})},"esri/tasks/QueryTask":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/tsSupport/assignHelper ../geometry ../core/accessorSupport/decorators ./Task ./operations/query ./operations/queryRelatedRecords ./support/FeatureSet ./support/Query ./support/RelationshipQuery".split(" "),
  1530. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v){return function(a){function f(b){b=a.call(this,b)||this;b.gdbVersion=null;b.source=null;return b}p(f,a);f.prototype.execute=function(a,c){return b.executeQuery(this.parsedUrl,this._normalizeQuery(a),l({},this.requestOptions,c)).then(function(b){return t.fromJSON(b.data)})};f.prototype.executeForCount=function(a,c){return b.executeQueryForCount(this.parsedUrl,this._normalizeQuery(a),l({},this.requestOptions,c)).then(function(b){return b.data.count})};f.prototype.executeForExtent=
  1531. function(a,c){return b.executeQueryForExtent(this.parsedUrl,this._normalizeQuery(a),l({},this.requestOptions,c)).then(function(b){return{count:b.data.count,extent:h.Extent.fromJSON(b.data.extent)}})};f.prototype.executeForIds=function(a,c){return b.executeQueryForIds(this.parsedUrl,this._normalizeQuery(a),l({},this.requestOptions,c)).then(function(b){return b.data.objectIds})};f.prototype.executeRelationshipQuery=function(b,a){if(this.gdbVersion||this.source)b=b.clone().set({gdbVersion:this.gdbVersion||
  1532. b.gdbVersion,source:this.source||b.source});return g.executeRelationshipQuery(this.parsedUrl,b,l({},this.requestOptions,a)).then(function(b){var a=b.data,c={};Object.keys(a).forEach(function(b){return c[b]=t.fromJSON(a[b])});return c})};f.prototype._normalizeQuery=function(b){return this.gdbVersion||this.source?b.clone().set({gdbVersion:this.gdbVersion||b.gdbVersion,source:this.source||b.source}):b};e([c.property()],f.prototype,"gdbVersion",void 0);e([c.property()],f.prototype,"source",void 0);e([n(0,
  1533. c.cast(u))],f.prototype,"execute",null);e([n(0,c.cast(u))],f.prototype,"executeForCount",null);e([n(0,c.cast(u))],f.prototype,"executeForExtent",null);e([n(0,c.cast(u))],f.prototype,"executeForIds",null);e([n(0,c.cast(v))],f.prototype,"executeRelationshipQuery",null);return f=e([c.subclass("esri.tasks.QueryTask")],f)}(c.declared(m))})},"esri/tasks/Task":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/tsSupport/assignHelper ../core/Accessor ../core/urlUtils ../core/accessorSupport/decorators".split(" "),
  1534. function(a,f,p,e,n,l,h,c,m){return function(b){function a(a){a=b.call(this)||this;a.requestOptions=null;a.url=null;return a}p(a,b);a.prototype.normalizeCtorArgs=function(b,a){return"string"!==typeof b?b:l({url:b},a)};Object.defineProperty(a.prototype,"parsedUrl",{get:function(){return this._parseUrl(this.url)},enumerable:!0,configurable:!0});a.prototype._parseUrl=function(b){return b?c.urlToObject(b):null};a.prototype._encode=function(b,a,c){var e={},g;for(g in b)if("declaredClass"!==g){var f=b[g];
  1535. if(null!=f&&"function"!==typeof f)if(Array.isArray(f)){e[g]=[];for(var h=0;h<f.length;h++)e[g][h]=this._encode(f[h])}else"object"===typeof f?f.toJSON&&(f=f.toJSON(c&&c[g]),e[g]=a?f:JSON.stringify(f)):e[g]=f}return e};e([m.property({readOnly:!0,dependsOn:["url"]})],a.prototype,"parsedUrl",null);e([m.property()],a.prototype,"requestOptions",void 0);e([m.property({type:String})],a.prototype,"url",void 0);return a=e([m.subclass("esri.tasks.Task")],a)}(m.declared(h))})},"esri/tasks/operations/query":function(){define("require exports ../../core/tsSupport/assignHelper ../../request ../../core/urlUtils ../../geometry/support/jsonUtils ../../geometry/support/normalizeUtils ./urlUtils".split(" "),
  1536. function(a,f,p,e,n,l,h,c){function m(b){var a=b.geometry;b=b.toJSON();a&&(b.geometry=JSON.stringify(a),b.geometryType=l.getJsonType(a),b.inSR=a.spatialReference.wkid||JSON.stringify(a.spatialReference));b.groupByFieldsForStatistics&&(b.groupByFieldsForStatistics=b.groupByFieldsForStatistics.join(","));b.objectIds&&(b.objectIds=b.objectIds.join(","));b.orderByFields&&(b.orderByFields=b.orderByFields.join(","));b.outFields&&(b.outFields=b.outFields.join(","));b.outSR?b.outSR=b.outSR.wkid||JSON.stringify(b.outSR):
  1537. a&&(b.returnGeometry||b.returnCentroid)&&(b.outSR=b.inSR);b.returnGeometry&&delete b.returnGeometry;b.outStatistics&&(b.outStatistics=JSON.stringify(b.outStatistics));b.pixelSize&&(b.pixelSize=JSON.stringify(b.pixelSize));b.quantizationParameters&&(b.quantizationParameters=JSON.stringify(b.quantizationParameters));b.source&&(b.layer=JSON.stringify({source:b.source}),delete b.source);b.timeExtent&&(a=b.timeExtent,b.time=[null!=a.startTime?a.startTime:"null",null!=a.endTime?a.endTime:"null"],delete b.timeExtent);
  1538. return b}function b(b,a,f,l){var g="string"===typeof b?n.urlToObject(b):b;return h.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(b){if(b=b&&b[0])a=a.clone(),a.geometry=b;b=c.mapParameters(p({},g.query,{f:"json"},l,m(a)));return e(g.path+"/query",p({},f,{query:b,callbackParamName:"callback"}))})}Object.defineProperty(f,"__esModule",{value:!0});f.queryToQueryStringParameters=m;f.executeQuery=function(a,c,e){return b(a,c,e)};f.executeQueryForIds=function(a,c,e){return b(a,c,e,{returnIdsOnly:!0})};
  1539. f.executeQueryForCount=function(a,c,e){return b(a,c,e,{returnIdsOnly:!0,returnCountOnly:!0})};f.executeQueryForExtent=function(a,c,e){return b(a,c,e,{returnExtentOnly:!0,returnCountOnly:!0}).then(function(b){var a=b.data;if(!a.hasOwnProperty("extent")){if(a.features)throw Error("Layer does not support extent calculation.");if(a.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");}return b})}})},"esri/geometry/support/normalizeUtils":function(){define("require exports ../../config ../../core/Error ../../core/Logger ../../core/promiseUtils ../Polygon ../Polyline ../SpatialReference ./spatialReferenceUtils ./webMercatorUtils ../../tasks/GeometryService".split(" "),
  1540. function(a,f,p,e,n,l,h,c,m,b,g,t){function u(b){return"polygon"===b.type?b.rings:b.paths}function v(b,a){return Math.ceil((b-a)/(2*a))}function x(b,a){for(var c=0,d=u(b);c<d.length;c++)for(var e=0,g=d[c];e<g.length;e++)g[e][0]+=a;return b}function r(b){for(var a=[],c=0,d=0,e=0;e<b.length;e++){for(var g=b[e],f=null,h=0;h<g.length;h++)f=g[h],a.push(f),0===h?d=c=f[0]:(c=Math.min(c,f[0]),d=Math.max(d,f[0]));f&&a.push([(c+d)/2,0])}return a}function w(b,a){if(!(b instanceof c||b instanceof h))throw z.error("straightLineDensify: the input geometry is neither polyline nor polygon"),
  1541. new e("straightLineDensify: the input geometry is neither polyline nor polygon");for(var d=[],g=0,f=u(b);g<f.length;g++){var k=f[g],m=[];d.push(m);m.push([k[0][0],k[0][1]]);for(var l=0;l<k.length-1;l++){var n=k[l][0],q=k[l][1],p=k[l+1][0],t=k[l+1][1],r=Math.sqrt((p-n)*(p-n)+(t-q)*(t-q)),v=(t-q)/r,w=(p-n)/r,x=r/a;if(1<x){for(var y=1;y<=x-1;y++){var B=y*a;m.push([w*B+n,v*B+q])}r=(r+Math.floor(x-1)*a)/2;m.push([w*r+n,v*r+q])}m.push([p,t])}}return"polygon"===b.type?new h({rings:d,spatialReference:b.spatialReference}):
  1542. new c({paths:d,spatialReference:b.spatialReference})}function q(b,a,c){a&&(b=w(b,1E6),b=g.webMercatorToGeographic(b,!0));c&&(b=x(b,c));return b}function d(b,a,c){if(Array.isArray(b)){var d=b[0];if(d>a){var e=v(d,a);b[0]=d+-2*e*a}else d<c&&(e=v(d,c),b[0]=d+-2*e*c)}else d=b.x,d>a?(e=v(d,a),b=b.clone().offset(-2*e*a,0)):d<c&&(e=v(d,c),b=b.clone().offset(-2*e*c,0));return b}function k(b,a){for(var c=-1,d=function(d){var e=a.cutIndexes[d],g=a.geometries[d],f=u(g);d=function(b){var a=f[b];a.some(function(c){if(!(180>
  1543. c[0])){for(var d=c=0;d<a.length;d++){var e=a[d][0];c=e>c?e:c}c=Number(c.toFixed(9));c=-360*v(c,180);for(d=0;d<a.length;d++)e=g.getPoint(b,d),g.setPoint(b,d,e.clone().offset(c,0))}return!0})};for(var h=0;h<f.length;h++)d(h);if(e===c)if("polygon"===b[0].type)for(d=0,h=u(g);d<h.length;d++)b[e]=b[e].addRing(h[d]);else{if("polyline"===b[0].type)for(d=0,h=u(g);d<h.length;d++)b[e]=b[e].addPath(h[d])}else c=e,b[e]=g},e=0;e<a.cutIndexes.length;e++)d(e);return b}function y(a,e){if(!Array.isArray(a))return y([a],
  1544. e);e||(C||(C=new t({url:p.geometryServiceUrl})),e=C);for(var f,m,n,r,w,u,z,B=0,D=[],O=[],N=0;N<a.length;N++){var J=a[N];if(J)if(f||(f=J.spatialReference,m=b.getInfo(f),u=(n=f.isWebMercator)?102100:4326,r=A[u].maxX,w=A[u].minX,z=A[u].plus180Line,u=A[u].minus180Line),m)if("mesh"===J.type)O.push(J);else if("point"===J.type)O.push(d(J.clone(),r,w));else if("multipoint"===J.type)J=J.clone(),J.points=J.points.map(function(b){return d(b,r,w)}),O.push(J);else if("extent"===J.type){var L=J.clone(),J=L._normalize(!1,
  1545. !1,m);O.push(J.rings?new h(J):J)}else if(J.extent){var L=J.extent,S=2*v(L.xmin,w)*r,J=0===S?J.clone():x(J.clone(),S);L.offset(S,0);L.intersects(z)&&L.xmax!==r?(B=L.xmax>B?L.xmax:B,J=q(J,n),D.push(J),O.push("cut")):L.intersects(u)&&L.xmin!==w?(B=2*L.xmax*r>B?2*L.xmax*r:B,J=q(J,n,360),D.push(J),O.push("cut")):O.push(J)}else O.push(J.clone());else O.push(J);else O.push(J)}f=v(B,r);m=-90;z=f;for(B=new c;0<f;)N=-180+360*f,B.addPath([[N,m],[N,-1*m]]),m*=-1,f--;if(0<D.length&&0<z)return e.cut(D,B).then(function(b){return k(D,
  1546. b)}).then(function(b){for(var c=[],d=[],f=0;f<O.length;f++){var h=O[f];if("cut"!==h)d.push(h);else{var h=b.shift(),k=a[f];"polygon"===k.type&&k.rings&&1<k.rings.length&&h.rings.length>=k.rings.length?(c.push(h),d.push("simplify")):d.push(n?g.geographicToWebMercator(h):h)}}return c.length?e.simplify(c).then(function(b){for(var a=[],c=0;c<d.length;c++){var e=d[c];"simplify"!==e?a.push(e):a.push(n?g.geographicToWebMercator(b.shift()):b.shift())}return a}):d});f=[];for(m=0;m<O.length;m++)z=O[m],"cut"!==
  1547. z?f.push(z):(z=D.shift(),f.push(!0===n?g.geographicToWebMercator(z):z));return l.resolve(f)}Object.defineProperty(f,"__esModule",{value:!0});var z=n.getLogger("esri.geometry.support.normalizeUtils"),A={102100:{maxX:2.0037508342788905E7,minX:-2.0037508342788905E7,plus180Line:new c({paths:[[[2.0037508342788905E7,-2.0037508342788905E7],[2.0037508342788905E7,2.0037508342788905E7]]],spatialReference:m.WebMercator}),minus180Line:new c({paths:[[[-2.0037508342788905E7,-2.0037508342788905E7],[-2.0037508342788905E7,
  1548. 2.0037508342788905E7]]],spatialReference:m.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new c({paths:[[[180,-180],[180,180]]],spatialReference:m.WebMercator}),minus180Line:new c({paths:[[[-180,-180],[-180,180]]],spatialReference:m.WebMercator})}};f.straightLineDensify=w;var C;f.normalizeCentralMeridian=y;f.getDenormalizedExtent=function(a){if(!a)return null;var c=a.extent;if(!c)return null;var d=a.spatialReference&&b.getInfo(a.spatialReference);if(!d)return c;var d=d.valid,e=d[0],d=d[1],g=
  1549. c.width,f=c.xmin,h=c.xmax,h=[h,f],f=h[0],h=h[1];if("extent"===a.type||0===g||g<=d||g>2*d||f<e||h>d)return c;var k;switch(a.type){case "polygon":if(1<a.rings.length)k=r(a.rings);else return c;break;case "polyline":if(1<a.paths.length)k=r(a.paths);else return c;break;case "multipoint":k=a.points}a=c.clone();for(e=0;e<k.length;e++){var m=k[e][0];0>m?(m+=d,h=Math.max(m,h)):(m-=d,f=Math.min(m,f))}a.xmin=f;a.xmax=h;return a.width<g?(a.xmin-=d,a.xmax-=d,a):c}})},"esri/tasks/GeometryService":function(){define("../core/kebabDictionary ../core/accessorSupport/ensureType ../geometry/Extent ../geometry/Multipoint ../geometry/Polyline ../geometry/Polygon ../geometry/support/jsonUtils ../request ./Task ./support/ProjectParameters dojo/_base/lang".split(" "),
  1550. function(a,f,p,e,n,l,h,c,m,b,g){var t=a({MGRS:"mgrs",USNG:"usng",UTM:"utm",GeoRef:"geo-ref",GARS:"gars",DMS:"dms",DDM:"ddm",DD:"dd"}),u=f.ensureType(b);a=m.createSubclass({declaredClass:"esri.tasks.GeometryService",areasAndLengths:function(b,a){b={query:g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/areasAndLengths",b).then(function(b){return b.data})},autoComplete:function(b,
  1551. a,e){var f=b[0].spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),polygons:JSON.stringify(this._encodeGeometries(b).geometries),polylines:JSON.stringify(this._encodeGeometries(a).geometries)}),callbackParamName:"callback"};if(this.requestOptions||e)b=g.mixin({},this.requestOptions,e,b);return c(this.parsedUrl.path+"/autoComplete",b).then(function(b){return(b.data.geometries||[]).map(function(b){return new l({spatialReference:f,rings:b.rings})})})},buffer:function(b,
  1552. a){var e=g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),f=b.outSpatialReference||b.geometries[0].spatialReference;b={query:e,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/buffer",b).then(function(b){return(b.data.geometries||[]).map(function(b){return new l({spatialReference:f,rings:b.rings})})})},cut:function(b,a,e){var f=b[0].spatialReference,m=b.map(function(b){return b.toJSON()});b={query:g.mixin({},this.parsedUrl.query,
  1553. {f:"json",sr:JSON.stringify(f.toJSON()),target:JSON.stringify({geometryType:h.getJsonType(b[0]),geometries:m}),cutter:JSON.stringify(a.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||e)b=g.mixin({},this.requestOptions,e,b);return c(this.parsedUrl.path+"/cut",b).then(function(b){b=b.data;return{cutIndexes:b.cutIndexes,geometries:(b.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})}})},convexHull:function(b,a){var e=b[0].spatialReference;b={query:g.mixin({},
  1554. this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),geometries:JSON.stringify(this._encodeGeometries(b))}),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/convexHull",b).then(function(b){return h.fromJSON(b.data.geometry).set("spatialReference",e)})},densify:function(b,a){var e=g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),f=b.geometries[0].spatialReference;b={query:e,callbackParamName:"callback"};if(this.requestOptions||
  1555. a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/densify",b).then(function(b){return(b.data.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})})},difference:function(b,a,e){var f=b[0].spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(b)),geometry:JSON.stringify({geometryType:h.getJsonType(a),geometry:a.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||
  1556. e)b=g.mixin({},this.requestOptions,e,b);return c(this.parsedUrl.path+"/difference",b).then(function(b){return(b.data.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})})},distance:function(b,a){b={query:g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/distance",b).then(this._handleDistanceResponse)},fromGeoCoordinateString:function(b,a){var e=
  1557. {};g.isObject(b.sr)?e.sr=b.sr.wkid||JSON.stringify(b.sr.toJSON()):e.sr=b.sr;e.strings=JSON.stringify(b.strings);e.conversionType=t.toJSON(b.conversionType||"mgrs");e.conversionMode=b.conversionMode;b={query:g.mixin({},this.parsedUrl.query,{f:"json"},e),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/fromGeoCoordinateString",b).then(this._handleFromGeoCoordinateResponse)},generalize:function(b,a){var e=g.mixin({},this.parsedUrl.query,
  1558. {f:"json"},b.toJSON()),f=b.geometries[0].spatialReference;b={query:e,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/generalize",b).then(function(b){return(b.data.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})})},intersect:function(b,a,e){var f=b[0].spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),geometries:JSON.stringify(this._encodeGeometries(b)),
  1559. geometry:JSON.stringify({geometryType:h.getJsonType(a),geometry:a.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||e)b=g.mixin({},this.requestOptions,e,b);return c(this.parsedUrl.path+"/intersect",b).then(function(b){return(b.data.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})})},lengths:function(b,a){b={query:g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,
  1560. a,b);return c(this.parsedUrl.path+"/lengths",b).then(function(b){return b.data})},labelPoints:function(b,a){var e=b.map(function(b){return b.toJSON()}),f=b[0].spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:f.wkid?f.wkid:JSON.stringify(f.toJSON()),polygons:JSON.stringify(e)}),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/labelPoints",b).then(function(b){return(b.data.labelPoints||[]).map(function(b){return h.fromJSON(b).set("spatialReference",
  1561. f)})})},offset:function(b,a){var e=g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),f=b.geometries[0].spatialReference;b={query:e,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/offset",b).then(function(b){return(b.data.geometries||[]).map(function(b){return h.fromJSON(b).set("spatialReference",f)})})},project:function(b,a){b=u(b);var e=g.mixin({},b.toJSON(),this.parsedUrl.query,{f:"json"}),f=b.outSpatialReference,
  1562. m=h.getJsonType(b.geometries[0]),d=this._decodeGeometries;b={query:e,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/project",b).then(function(b){return d(b.data,m,f)})},relation:function(b,a){b={query:g.mixin({},this.parsedUrl.query,{f:"json"},b.toJSON()),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/relation",b).then(this._handleRelationResponse)},
  1563. reshape:function(b,a,e){var f=b.spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(f.toJSON()),target:JSON.stringify({geometryType:h.getJsonType(b),geometry:b.toJSON()}),reshaper:JSON.stringify(a.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||e)b=g.mixin({},this.requestOptions,e,b);return c(this.parsedUrl.path+"/reshape",b).then(function(b){return h.fromJSON(b.data.geometry).set("spatialReference",f)})},simplify:function(b,a){var e=b[0].spatialReference,
  1564. f=g.mixin({},this.parsedUrl.query,{f:"json",sr:e.wkid?e.wkid:JSON.stringify(e.toJSON()),geometries:JSON.stringify(this._encodeGeometries(b))}),m=h.getJsonType(b[0]),d=this._decodeGeometries;b={query:f,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/simplify",b).then(function(b){return d(b.data,m,e)})},toGeoCoordinateString:function(b,a){var e={};g.isObject(b.sr)?e.sr=b.sr.wkid||JSON.stringify(b.sr.toJSON()):e.sr=b.sr;e.coordinates=
  1565. JSON.stringify(b.coordinates);e.conversionType=t.toJSON(b.conversionType||"mgrs");e.conversionMode=b.conversionMode;e.numOfDigits=b.numOfDigits;e.rounding=b.rounding;e.addSpaces=b.addSpaces;b={query:g.mixin({},this.parsedUrl.query,{f:"json"},e),callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/toGeoCoordinateString",b).then(this._handleToGeoCoordinateResponse)},trimExtend:function(b,a){var e=g.mixin({},this.parsedUrl.query,
  1566. {f:"json"},b.toJSON()),f=b.sr;b={query:e,callbackParamName:"callback"};if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/trimExtend",b).then(function(b){return(b.data.geometries||[]).map(function(b){return new n({spatialReference:f,paths:b.paths})})})},union:function(b,a){var e=b[0].spatialReference;b={query:g.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),geometries:JSON.stringify(this._encodeGeometries(b))}),callbackParamName:"callback"};
  1567. if(this.requestOptions||a)b=g.mixin({},this.requestOptions,a,b);return c(this.parsedUrl.path+"/union",b).then(function(b){return h.fromJSON(b.data.geometry).set("spatialReference",e)})},_handleRelationResponse:function(b){return b.data.relations},_handleDistanceResponse:function(b){return(b=b.data)&&b.distance},_handleToGeoCoordinateResponse:function(b){return b.data.strings},_handleFromGeoCoordinateResponse:function(b){return b.data.coordinates},_encodeGeometries:function(b){var a=[],c,e=b.length;
  1568. for(c=0;c<e;c++)a.push(b[c].toJSON());return{geometryType:h.getJsonType(b[0]),geometries:a}},_decodeGeometries:function(b,a,c){var e=h.getGeometryType(a);b=b.geometries;var f=[],d={spatialReference:c.toJSON()},k=g.mixin;b.forEach(function(b,a){f[a]=new e(k(b,d))});return f},_toProjectGeometry:function(b){var a=b.spatialReference.toJSON();return b instanceof p?new l({rings:[[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]]],spatialReference:a}):new n({paths:[[].concat(b.points)],
  1569. spatialReference:a})},_fromProjectedGeometry:function(b,a,c){return"extent"===a?(b=b.rings[0],new p(b[0][0],b[0][1],b[2][0],b[2][1],c)):new e({points:b.paths[0],spatialReference:c.toJSON()})}});g.mixin(a,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,
  1570. UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,
  1571. UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,
  1572. UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",
  1573. UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});return a})},"esri/tasks/support/ProjectParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators ../../geometry/support/jsonUtils".split(" "),function(a,f,p,e,n,l,h,c,m){var b=h.getLogger("esri.tasks.support.ProjectParameters");
  1574. return function(a){function g(b){b=a.call(this)||this;b.geometries=null;b.outSpatialReference=null;b.transformation=null;b.transformForward=null;return b}p(g,a);Object.defineProperty(g.prototype,"outSR",{get:function(){b.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");return this.outSpatialReference},set:function(a){b.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");this.outSpatialReference=a},enumerable:!0,configurable:!0});g.prototype.toJSON=
  1575. function(){var b=this.geometries.map(function(b){return b.toJSON()}),a=this.geometries[0],c={};c.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON());c.inSR=a.spatialReference.wkid||JSON.stringify(a.spatialReference.toJSON());c.geometries=JSON.stringify({geometryType:m.getJsonType(a),geometries:b});this.transformation&&(c.transformation=this.transformation.wkid||JSON.stringify(this.transformation));l.isDefined(this.transformForward)&&(c.transformForward=this.transformForward);
  1576. return c};e([c.property()],g.prototype,"geometries",void 0);e([c.property({json:{read:{source:"outSR"}}})],g.prototype,"outSpatialReference",void 0);e([c.property({json:{read:!1}})],g.prototype,"outSR",null);e([c.property()],g.prototype,"transformation",void 0);e([c.property()],g.prototype,"transformForward",void 0);return g=e([c.subclass("esri.tasks.support.ProjectParameters")],g)}(c.declared(n))})},"esri/tasks/operations/urlUtils":function(){define(["require","exports"],function(a,f){function p(a){var e=
  1577. {},f;for(f in a)if("declaredClass"!==f){var h=a[f];if(null!=h&&"function"!==typeof h)if(Array.isArray(h)){e[f]=[];for(var c=0;c<h.length;c++)e[f][c]=p(h[c])}else"object"===typeof h?h.toJSON&&(e[f]=JSON.stringify(h)):e[f]=h}return e}Object.defineProperty(f,"__esModule",{value:!0});f.mapParameters=p})},"esri/tasks/operations/queryRelatedRecords":function(){define(["require","exports","../../core/tsSupport/assignHelper","../../request","./urlUtils"],function(a,f,p,e,n){function l(a){a=a.toJSON();a.objectIds&&
  1578. (a.objectIds=a.objectIds.join(","));a.outFields&&(a.outFields=a.outFields.join(","));a.outSpatialReference&&(a.outSR=a.outSR.wkid||JSON.stringify(a.outSR.toJSON()),delete a.outSpatialReference);a.source&&(a.layer=JSON.stringify({source:a.source}),delete a.source);return a}Object.defineProperty(f,"__esModule",{value:!0});f.toQueryStringParameters=l;f.executeRelationshipQuery=function(a,c,f){c={query:n.mapParameters(p({},a.query,{f:"json"},l(c))),callbackParamName:"callback"};f&&(c=p({},f,c));return e(a.path+
  1579. "/queryRelatedRecords",c).then(function(b){for(var a=b.data,c=a.geometryType,e=a.spatialReference,f={},h=0,a=a.relatedRecordGroups;h<a.length;h++){var m=a[h],l={fields:void 0,objectIdFieldName:void 0,geometryType:c,spatialReference:e,features:m.relatedRecords};if(null!=m.objectId)f[m.objectId]=l;else for(var n in m)m.hasOwnProperty(n)&&"relatedRecords"!==n&&(f[m[n]]=l)}b.data=f;return b})}})},"esri/tasks/support/FeatureSet":function(){define("../../core/kebabDictionary ../../core/JSONSupport ../../core/lang ../../Graphic ../../layers/support/Field ../../geometry/SpatialReference ../../geometry/support/graphicsUtils ../../geometry/support/jsonUtils dojo/_base/lang".split(" "),
  1580. function(a,f,p,e,n,l,h,c,m){a=a({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent"});return f.createSubclass({declaredClass:"esri.tasks.support.FeatureSet",getDefaults:function(){return m.mixin(this.inherited(arguments),{features:[]})},properties:{displayFieldName:null,exceededTransferLimit:null,features:{value:null,json:{read:function(b,a){var c=l.fromJSON(a.spatialReference);b=b.map(function(b){var a=
  1581. e.fromJSON(b);b=b.geometry&&b.geometry.spatialReference;a.geometry&&!b&&(a.geometry.spatialReference=c);return a});a.transform&&this._hydrate(a.transform,a.geometryType,b);return b}}},fields:{value:null,type:[n]},geometryType:{value:null,json:{read:a.fromJSON}},spatialReference:{type:l}},toJSON:function(b){var a={hasZ:this.hasZ,hasM:this.hasM};this.displayFieldName&&(a.displayFieldName=this.displayFieldName);this.fields&&(a.fields=this.fields.map(function(b){return b.toJSON()}));this.spatialReference?
  1582. a.spatialReference=this.spatialReference.toJSON():this.features[0]&&this.features[0].geometry&&(a.spatialReference=this.features[0].geometry.spatialReference.toJSON());this.features[0]&&(this.features[0].geometry&&(a.geometryType=c.getJsonType(this.features[0].geometry)),a.features=h._encodeGraphics(this.features,b));a.exceededTransferLimit=this.exceededTransferLimit;a.transform=this.transform;return p.fixJson(a)},quantize:function(b){var a=b.translate[0],c=b.translate[1],e=b.scale[0],f=b.scale[1],
  1583. h=this.features,m=function(b,a,c){var d,e,g,f,h,k,m=[];d=0;for(e=b.length;d<e;d++)if(g=b[d],0<d){if(k=a(g[0]),g=c(g[1]),k!==f||g!==h)m.push([k-f,g-h]),f=k,h=g}else f=a(g[0]),h=c(g[1]),m.push([f,h]);return 0<m.length?m:null},l=function(b,a,c){if("point"===b)return function(b){b.x=a(b.x);b.y=c(b.y);return b};if("polyline"===b||"polygon"===b)return function(b){var d,e,g,f,h;g=b.rings||b.paths;h=[];d=0;for(e=g.length;d<e;d++)f=g[d],(f=m(f,a,c))&&h.push(f);return 0<h.length?(b.rings?b.rings=h:b.paths=
  1584. h,b):null};if("multipoint"===b)return function(b){var d;d=m(b.points,a,c);return 0<d.length?(b.points=d,b):null};if("extent"===b)return function(b){return b}}(this.geometryType,function(b){return Math.round((b-a)/e)},function(b){return Math.round((c-b)/f)}),n,d;n=0;for(d=h.length;n<d;n++)l(h[n].geometry)||(h.splice(n,1),n--,d--);this.transform=b;return this},_hydrate:function(b,a,c){if(b){var e=b.translate[0],g=b.translate[1],f=b.scale[0],h=b.scale[1],m=function(b,a,c){if("esriGeometryPoint"===b)return function(b){b.x=
  1585. a(b.x);b.y=c(b.y)};if("esriGeometryPolyline"===b||"esriGeometryPolygon"===b)return function(b){b=b.rings||b.paths;var d,e,g,f,h,k,m,l;d=0;for(e=b.length;d<e;d++)for(h=b[d],g=0,f=h.length;g<f;g++)k=h[g],0<g?(m+=k[0],l+=k[1]):(m=k[0],l=k[1]),k[0]=a(m),k[1]=c(l)};if("esriGeometryEnvelope"===b)return function(b){b.xmin=a(b.xmin);b.ymin=c(b.ymin);b.xmax=a(b.xmax);b.ymax=c(b.ymax)};if("esriGeometryMultipoint"===b)return function(b){b=b.points;var d,e,g,f,h;d=0;for(e=b.length;d<e;d++)g=b[d],0<d?(f+=g[0],
  1586. h+=g[1]):(f=g[0],h=g[1]),g[0]=a(f),g[1]=c(h)}}(a,function(b){return b*f+e},function(b){return g-b*h});b=0;for(a=c.length;b<a;b++)c[b].geometry&&m(c[b].geometry)}}})})},"esri/layers/support/Field":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./domains ./fieldType".split(" "),function(a,f,p,e,n,l,h,c){return function(a){function b(b){b=a.call(this)||this;b.alias=null;b.domain=null;
  1587. b.editable=!1;b.length=-1;b.name=null;b.nullable=!0;b.type=null;return b}p(b,a);g=b;b.prototype.readDomain=function(b){var a=b&&b.type;return"range"===a?h.RangeDomain.fromJSON(b):"codedValue"===a?h.CodedValueDomain.fromJSON(b):null};b.prototype.clone=function(){return new g({alias:this.alias,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type})};e([l.property({type:String,json:{write:!0}})],b.prototype,"alias",
  1588. void 0);e([l.property({types:h.types,json:{write:!0}})],b.prototype,"domain",void 0);e([l.reader("domain")],b.prototype,"readDomain",null);e([l.property({type:Boolean,json:{write:!0}})],b.prototype,"editable",void 0);e([l.property({type:Number,json:{write:!0}})],b.prototype,"length",void 0);e([l.property({type:String,json:{write:!0}})],b.prototype,"name",void 0);e([l.property({type:Boolean,json:{write:!0}})],b.prototype,"nullable",void 0);e([l.property({type:String,json:{read:c.kebabDict.read,write:c.kebabDict.write}})],
  1589. b.prototype,"type",void 0);return b=g=e([l.subclass("esri.layers.support.Field")],b);var g}(l.declared(n))})},"esri/layers/support/domains":function(){define("require exports ./CodedValueDomain ./Domain ./InheritedDomain ./RangeDomain".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});f.CodedValueDomain=p;f.DomainBase=e;f.InheritedDomain=n;f.RangeDomain=l;f.types={key:"type",base:f.DomainBase,typeMap:{range:f.RangeDomain,"coded-value":f.CodedValueDomain}}})},"esri/layers/support/CodedValueDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/lang ../../core/accessorSupport/decorators ./Domain".split(" "),
  1590. function(a,f,p,e,n,l,h){return function(a){function c(b){b=a.call(this,b)||this;b.codedValues=null;b.type="coded-value";return b}p(c,a);b=c;c.prototype.writeCodedValues=function(b,a){var c=null;b&&(c=b.map(function(b){return n.fixJson(n.clone(b))}));a.codedValues=c};c.prototype.getName=function(b){var a=null;if(this.codedValues){var c=String(b);this.codedValues.some(function(b){String(b.code)===c&&(a=b.name);return!!a})}return a};c.prototype.clone=function(){return new b({codedValues:n.clone(this.codedValues),
  1591. name:this.name})};e([l.property({json:{write:!0}})],c.prototype,"codedValues",void 0);e([l.writer("codedValues")],c.prototype,"writeCodedValues",null);e([l.property()],c.prototype,"type",void 0);return c=b=e([l.subclass("esri.layers.support.CodedValueDomain")],c);var b}(l.declared(h))})},"esri/layers/support/Domain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),
  1592. function(a,f,p,e,n,l,h){var c=l({inherited:"inherited",codedValue:"coded-value",range:"range"});return function(a){function b(b){b=a.call(this,b)||this;b.name=null;b.type=null;return b}p(b,a);e([h.property({json:{write:!0}})],b.prototype,"name",void 0);e([h.property({json:{read:c.read,write:c.write}})],b.prototype,"type",void 0);return b=e([h.subclass("esri.layers.support.Domain")],b)}(h.declared(n))})},"esri/layers/support/InheritedDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),
  1593. function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this,b)||this;b.type="inherited";return b}p(c,a);f=c;c.prototype.clone=function(){return new f};e([n.property()],c.prototype,"type",void 0);return c=f=e([n.subclass("esri.layers.support.InheritedDomain")],c);var f}(n.declared(l))})},"esri/layers/support/RangeDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),
  1594. function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this,b)||this;b.maxValue=null;b.minValue=null;b.type="range";return b}p(c,a);f=c;c.prototype.clone=function(){return new f({maxValue:this.maxValue,minValue:this.minValue,name:this.name})};e([n.property({json:{read:{source:"range",reader:function(b,a){return a.range&&a.range[1]}},write:{target:"range",writer:function(b,a,c){a[c]=[this.minValue,b]}}}})],c.prototype,"maxValue",void 0);e([n.property({json:{read:{source:"range",reader:function(b,
  1595. a){return a.range&&a.range[0]}},write:{target:"range",writer:function(b,a,c){a[c]=[b,this.maxValue]}}}})],c.prototype,"minValue",void 0);e([n.property()],c.prototype,"type",void 0);return c=f=e([n.subclass("esri.layers.support.RangeDomain")],c);var f}(n.declared(l))})},"esri/layers/support/fieldType":function(){define(["require","exports","../../core/kebabDictionary"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.kebabDict=p({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",
  1596. esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})})},"esri/geometry/support/graphicsUtils":function(){define(["require","exports","dojo/_base/array","../../core/Collection","../Extent"],function(a,f,p,e,n){Object.defineProperty(f,
  1597. "__esModule",{value:!0});f.graphicsExtent=function(a){if(!a||!a.length)return null;var f=e.isCollection(a)?a.getItemAt(0).geometry:a[0].geometry,c=f.extent,m=f;null===c&&(c=new n(m.x,m.y,m.x,m.y,f.spatialReference));for(var b=1;b<a.length;b++){var m=f=e.isCollection(a)?a.getItemAt(b).geometry:a[b].geometry,g=f.extent;null===g&&(g=new n(m.x,m.y,m.x,m.y,f.spatialReference));c=c.clone().union(g)}return 0>c.width&&0>c.height?null:c};f.getGeometries=function(a){return p.map(a,function(a){return a.geometry})};
  1598. f._encodeGraphics=function(a,e){var c=[];p.forEach(a,function(a,b){a=a.toJSON();var g={};if(a.geometry){var f=e&&e[b];g.geometry=f&&f.toJSON()||a.geometry}a.attributes&&(g.attributes=a.attributes);c[b]=g});return c}})},"esri/tasks/support/Query":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../TimeExtent ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ../../geometry/support/jsonUtils ../../geometry/support/typeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils ./QuantizationParameters ./StatisticDefinition".split(" "),
  1599. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r){var w=c({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),q=c({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",
  1600. esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});return function(a){function c(b){b=a.call(this,b)||this;b.datumTransformation=null;b.distance=void 0;b.gdbVersion=null;b.geometry=null;b.geometryPrecision=void 0;b.groupByFieldsForStatistics=null;b.historicMoment=null;b.maxAllowableOffset=void 0;b.maxRecordCountFactor=1;b.multipatchOption=null;b.num=void 0;b.objectIds=null;b.orderByFields=null;b.outFields=null;b.outSpatialReference=null;b.outStatistics=null;b.parameterValues=
  1601. null;b.pixelSize=null;b.quantizationParameters=null;b.rangeValues=null;b.relationParameter=null;b.resultType=null;b.returnDistinctValues=!1;b.returnGeometry=!1;b.returnCentroid=!1;b.returnExceededLimitFeatures=!0;b.returnM=!1;b.returnZ=!1;b.source=null;b.spatialRelationship="intersects";b.start=void 0;b.sqlFormat=null;b.text=null;b.timeExtent=null;b.units="meters";b.where=null;return b}p(c,a);d=c;c.prototype.castDatumTransformation=function(b){return"number"===typeof b||"object"===typeof b?b:null};
  1602. c.prototype.writeHistoricMoment=function(b,a,c){a.historicMoment=b&&b.getTime()};c.prototype.writeParameterValues=function(b,a,c){if(b){c={};for(var d in b){var e=b[d];Array.isArray(e)?c[d]=e.map(function(b){return b instanceof Date?b.getTime():b}):c[d]=e instanceof Date?e.getTime():e}a.parameterValues=c}};c.prototype.writeStart=function(b,a,c){a.resultOffset=this.start;a.resultRecordCount=this.num||10;a.where="1\x3d1"};c.prototype.writeWhere=function(b,a,c){a.where=b||"1\x3d1"};c.prototype.clone=
  1603. function(){return new d(m.clone({datumTransformation:this.datumTransformation,distance:this.distance,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,historicMoment:this.historicMoment?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,
  1604. outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnM:this.returnM,
  1605. returnZ:this.returnZ,source:this.source,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.text,text:this.text,timeExtent:this.timeExtent,units:this.units,where:this.where}))};e([b.property({json:{write:!0}})],c.prototype,"datumTransformation",void 0);e([b.cast("datumTransformation")],c.prototype,"castDatumTransformation",null);e([b.property({type:Number,json:{write:!0}})],c.prototype,"distance",void 0);e([b.property({type:String,json:{write:!0}})],c.prototype,"gdbVersion",
  1606. void 0);e([b.property({types:t.types,json:{read:g.fromJSON,write:!0}})],c.prototype,"geometry",void 0);e([b.property({type:Number,json:{write:!0}})],c.prototype,"geometryPrecision",void 0);e([b.property({type:[String],json:{write:!0}})],c.prototype,"groupByFieldsForStatistics",void 0);e([b.property({type:Date})],c.prototype,"historicMoment",void 0);e([b.writer("historicMoment")],c.prototype,"writeHistoricMoment",null);e([b.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",
  1607. void 0);e([b.property({type:Number,cast:function(b){return 1>b?1:5<b?5:b},json:{write:{overridePolicy:function(b){return{enabled:1<b}}}}})],c.prototype,"maxRecordCountFactor",void 0);e([b.property({type:String,json:{write:!0}})],c.prototype,"multipatchOption",void 0);e([b.property({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0);e([b.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);e([b.property({type:[String],json:{write:!0}})],c.prototype,
  1608. "orderByFields",void 0);e([b.property({type:[String],json:{write:!0}})],c.prototype,"outFields",void 0);e([b.property({type:n.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],c.prototype,"outSpatialReference",void 0);e([b.property({type:[r],json:{write:!0}})],c.prototype,"outStatistics",void 0);e([b.property({json:{write:!0}})],c.prototype,"parameterValues",void 0);e([b.writer("parameterValues")],c.prototype,"writeParameterValues",null);e([b.property({types:v.types,json:{read:u.read,
  1609. write:!0}})],c.prototype,"pixelSize",void 0);e([b.property({type:x.default,json:{write:!0}})],c.prototype,"quantizationParameters",void 0);e([b.property({type:[Object],json:{write:!0}})],c.prototype,"rangeValues",void 0);e([b.property({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy:function(b){return{enabled:"relation"===this.spatialRelationship}}}}})],c.prototype,"relationParameter",void 0);e([b.property({type:String,json:{write:!0}})],c.prototype,"resultType",
  1610. void 0);e([b.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,"returnDistinctValues",void 0);e([b.property({type:Boolean,json:{write:!0}})],c.prototype,"returnGeometry",void 0);e([b.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,"returnCentroid",void 0);e([b.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:!b}}}}})],c.prototype,"returnExceededLimitFeatures",void 0);e([b.property({type:Boolean,
  1611. json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,"returnM",void 0);e([b.property({type:Boolean,json:{write:{overridePolicy:function(b){return{enabled:b}}}}})],c.prototype,"returnZ",void 0);e([b.property({json:{write:!0}})],c.prototype,"source",void 0);e([b.property({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],c.prototype,"spatialRelationship",void 0);e([b.property({type:Number,json:{read:{source:"resultOffset"}}})],
  1612. c.prototype,"start",void 0);e([b.writer("start"),b.writer("num")],c.prototype,"writeStart",null);e([b.property({type:String,json:{write:!0}})],c.prototype,"sqlFormat",void 0);e([b.property({type:String,json:{write:!0}})],c.prototype,"text",void 0);e([b.property({type:l,json:{write:!0}})],c.prototype,"timeExtent",void 0);e([b.property({type:String,json:{read:q.read,write:{writer:q.write,overridePolicy:function(b){return{enabled:0<this.distance}}}}})],c.prototype,"units",void 0);e([b.property({type:String,
  1613. json:{write:{overridePolicy:function(b){return{enabled:null!=b||0<this.start}}}}})],c.prototype,"where",void 0);e([b.writer("where")],c.prototype,"writeWhere",null);return c=d=e([b.subclass("esri.tasks.support.Query")],c);var d}(b.declared(h))})},"esri/TimeExtent":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){var h={milliseconds:{getter:"getUTCMilliseconds",
  1614. setter:"setUTCMilliseconds",multiplier:1},seconds:{getter:"getUTCSeconds",setter:"setUTCSeconds",multiplier:1},minutes:{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},hours:{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},days:{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},weeks:{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},months:{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},years:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},decades:{getter:"getUTCFullYear",
  1615. setter:"setUTCFullYear",multiplier:10},centuries:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:100}};return function(a){function c(b,c){b=a.call(this)||this;b.endTime=null;b.startTime=null;return b}p(c,a);b=c;c.prototype.normalizeCtorArgs=function(b,a){return!b||b instanceof Date?{startTime:b,endTime:a}:b};c.prototype.readEndTime=function(b,a){return null!=a.endTime?new Date(a.endTime):null};c.prototype.writeEndTime=function(b,a,c){a.endTime=b?b.getTime():null};c.prototype.readStartTime=
  1616. function(b,a){return null!=a.startTime?new Date(a.startTime):null};c.prototype.writeStartTime=function(b,a,c){a.startTime=b?b.getTime():null};c.prototype.clone=function(){return new b({endTime:this.endTime,startTime:this.startTime})};c.prototype.intersection=function(a){if(!a)return null;var c=this.startTime?this.startTime.getTime():-Infinity,e=this.endTime?this.endTime.getTime():Infinity,g=a.startTime?a.startTime.getTime():-Infinity;a=a.endTime?a.endTime.getTime():Infinity;var f,h;g>=c&&g<=e?f=g:
  1617. c>=g&&c<=a&&(f=c);e>=g&&e<=a?h=e:a>=c&&a<=e&&(h=a);if(isNaN(f)||isNaN(h))return null;c=new b;c.startTime=-Infinity===f?null:new Date(f);c.endTime=Infinity===h?null:new Date(h);return c};c.prototype.offset=function(a,c){var e=new b,g=this.startTime,f=this.endTime;g&&(e.startTime=this._offsetDate(g,a,c));f&&(e.endTime=this._offsetDate(f,a,c));return e};c.prototype._offsetDate=function(b,a,c){b=new Date(b.getTime());a&&c&&(c=h[c],b[c.setter](b[c.getter]()+a*c.multiplier));return b};e([l.property({type:Date,
  1618. json:{write:{allowNull:!0}}})],c.prototype,"endTime",void 0);e([l.reader("endTime")],c.prototype,"readEndTime",null);e([l.writer("endTime")],c.prototype,"writeEndTime",null);e([l.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"startTime",void 0);e([l.reader("startTime")],c.prototype,"readStartTime",null);e([l.writer("startTime")],c.prototype,"writeStartTime",null);return c=b=e([l.subclass("esri.TimeExtent")],c);var b}(l.declared(n))})},"esri/tasks/support/QuantizationParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators".split(" "),
  1619. function(a,f,p,e,n,l,h,c,m){Object.defineProperty(f,"__esModule",{value:!0});var b=h({upperLeft:"upper-left",lowerLeft:"lower-left"});a=function(a){function g(){var b=null!==a&&a.apply(this,arguments)||this;b.extent=null;b.mode="view";b.originPosition="upper-left";return b}p(g,a);f=g;g.prototype.clone=function(){return new f(c.clone({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))};e([m.property({type:n.Extent,json:{write:!0}})],g.prototype,"extent",
  1620. void 0);e([m.property({type:String,json:{write:!0}})],g.prototype,"mode",void 0);e([m.property({type:String,json:{read:b.read,write:b.write}})],g.prototype,"originPosition",void 0);e([m.property({type:Number,json:{write:!0}})],g.prototype,"tolerance",void 0);return g=f=e([m.subclass("esri.tasks.support.QuantizationParameters")],g);var f}(m.declared(l));f.default=a})},"esri/tasks/support/StatisticDefinition":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),
  1621. function(a,f,p,e,n,l){return function(a){function c(b){b=a.call(this)||this;b.maxPointCount=void 0;b.maxRecordCount=void 0;b.maxVertexCount=void 0;b.onStatisticField=null;b.outStatisticFieldName=null;b.statisticType=null;return b}p(c,a);f=c;c.prototype.clone=function(){return new f({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType})};
  1622. e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxPointCount",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxRecordCount",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxVertexCount",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"onStatisticField",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"outStatisticFieldName",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"statisticType",void 0);
  1623. return c=f=e([l.subclass("esri.tasks.support.StatisticDefinition")],c);var f}(l.declared(n))})},"esri/tasks/support/RelationshipQuery":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l,h,c){return function(a){function b(b){b=a.call(this,b)||this;b.definitionExpression=null;b.gdbVersion=null;b.geometryPrecision=void 0;
  1624. b.historicMoment=null;b.maxAllowableOffset=void 0;b.objectIds=null;b.outFields=null;b.outSpatialReference=null;b.relationshipId=void 0;b.returnGeometry=!1;b.source=null;return b}p(b,a);g=b;b.prototype._writeHistoricMoment=function(b,a){a.historicMoment=b&&b.getTime()};b.prototype.clone=function(){return new g(h.clone({definitionExpression:this.definitionExpression,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&this.historicMoment.getTime(),
  1625. maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,source:this.source}))};e([c.property({type:String,json:{write:!0}})],b.prototype,"definitionExpression",void 0);e([c.property({type:String,json:{write:!0}})],b.prototype,"gdbVersion",void 0);e([c.property({type:Number,json:{write:!0}})],b.prototype,"geometryPrecision",void 0);e([c.property({type:Date})],
  1626. b.prototype,"historicMoment",void 0);e([c.writer("historicMoment")],b.prototype,"_writeHistoricMoment",null);e([c.property({type:Number,json:{write:!0}})],b.prototype,"maxAllowableOffset",void 0);e([c.property({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0);e([c.property({type:[String],json:{write:!0}})],b.prototype,"outFields",void 0);e([c.property({type:n.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],b.prototype,"outSpatialReference",void 0);e([c.property({json:{write:!0}})],
  1627. b.prototype,"relationshipId",void 0);e([c.property({json:{write:!0}})],b.prototype,"returnGeometry",void 0);e([c.property({json:{write:!0}})],b.prototype,"source",void 0);return b=g=e([c.subclass("esri.tasks.support.RelationshipQuery")],b);var g}(c.declared(l))})},"esri/layers/graphics/controllers/OnDemandController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/Handles ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../geometry/Extent ./support/TileSet ../../support/GraphicsManager ../../support/TileInfo ../../../views/2d/tiling/TileInfoView ../../../views/2d/tiling/TileKey ../../../views/2d/tiling/TileQueue ../../../views/2d/tiling/TileStrategy".split(" "),
  1628. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k){var y=m.getLogger("esri.views.2d.layers.MapImageLayerView2D"),z=function(){function b(){this.key=new q(0,0,0,0)}b.prototype.dispose=function(){};return b}();return function(b){function a(a){var e=b.call(this)||this;e._handles=new c;e._pendingQueries=new Map;e._tileRequests=new Map;e.layer=a.layer;e.layerView=a.layerView;e.graphics=a.graphics;e._tileInfo=r.create({spatialReference:e.layerView.view.spatialReference,size:512});e._tileInfoView=new w(e._tileInfo);
  1629. e._tileQueue=new d({tileInfoView:e._tileInfoView,process:function(b){return e._fetchTile(b)}});e._tileSet=new v({layer:e.layer,tileInfo:e._tileInfo});e._graphicsManager=new x({graphics:e.graphics,objectIdField:e.layer.objectIdField});e._tileStrategy=new k({cachePolicy:"purge",acquireTile:function(b){return e._acquireTile(b)},releaseTile:function(b){return e._releaseTile(b)},tileInfoView:e._tileInfoView});e._handles.add([e.layer.watch("outFields",function(b,a){b&&a?-1===a.indexOf("*")&&(b.sort(),a.sort(),
  1630. JSON.stringify(b)!==JSON.stringify(a)&&e.refresh()):e.refresh()}),e.layer.watch("definitionExpression, historicMoment",function(){return e.refresh()}),e.layer.on("edits",function(b){return e._editsHandler(b)})],"layer");return e}p(a,b);a.prototype.destroy=function(){var b=this;this._pendingQueries.forEach(function(b){b.isFulfilled()||b.cancel()});this._tileStrategy.tiles.forEach(function(a){return b._releaseTile(a)});this._handles.destroy();this._graphicsManager.destroy();this._tileStrategy.destroy();
  1631. this._tileQueue.clear();this._tileRequests.clear()};Object.defineProperty(a.prototype,"graphics",{set:function(b){var a=this,c=this._get("graphics");c!==b&&(this._handles.remove("graphics"),c&&c.forEach(function(b){b.layer=null;b.sourceLayer=null}),b&&(b.forEach(function(b){b.layer=a.layer;b.sourceLayer=a.layer}),this._handles.add([b.on("after-add",function(b){b.item.layer=a.layer;b.item.sourceLayer=a.layer}),b.on("after-remove",function(b){b.item.layer=null;b.item.sourceLayer=null})],"graphics")),
  1632. this._set("graphics",b))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"updating",{get:function(){return 0<this._tileQueue.length||this.get("_graphicsManager.updating")},enumerable:!0,configurable:!0});a.prototype.update=function(b){var a=this;this._tileQueue.pause();this._tileQueue.state=b.state;this._tileStrategy.update(b);var c=this.layer.objectIdField,d=new Map;b=this._tileStrategy.tiles.reduce(function(b,e){if(e.featureSet){var g=a._graphicsManager.findIntent(e.intentId);
  1633. e.featureSet.features.forEach(function(a){a&&a.attributes&&(d.set(a.attributes[c],g),b.push(a))})}return b},[]);this._graphicsManager.update(b,d);this._tileQueue.resume();this.notifyChange("updating")};a.prototype.refresh=function(){var b=this;this._tileQueue.reset();this._tileStrategy.tiles.forEach(function(a){var c=b._graphicsManager.createIntentToAdd();b.notifyChange("updating");var d=b._tileSet.fetch(a.key).then(function(d){a.intentId=c;a.featureSet=d;b._graphicsManager.add(a.featureSet.features,
  1634. a.intentId);return a});d.always(function(){b._graphicsManager.removeIntent(c);b.notifyChange("updating")});return d});this.notifyChange("updating")};a.prototype._acquireTile=function(b){var a=this,c=new z;c.key.set(b);b=this._tileQueue.push(c.key).then(function(b){c.attached=!0;c.featureSet=b.featureSet;c.intentId=b.intentId;a._graphicsManager.removeIntent(c.intentId);a.layerView.requestUpdate()});this._tileRequests.set(c,b);this.notifyChange("updating");return c};a.prototype._releaseTile=function(b){if(this._tileRequests.has(b)){var a=
  1635. this._tileRequests.get(b);a.isFulfilled()||a.cancel();this._tileRequests.delete(b);this.layerView.requestUpdate()}};a.prototype._fetchTile=function(b){var a=this,c=this._graphicsManager.createIntentToAdd();b=this._tileSet.fetch(b).then(function(b){for(var a=Date.now(),d=0,e=b.features;d<e.length;d++)e[d]._ts=a;return{featureSet:b,intentId:c}});b.catch(function(b){a._graphicsManager.removeIntent(c);if(b&&"cancel"===b.dojoType)return g.reject(b);b=new l("ondemandcontroller2d:tile-request-failed","Failed to query for features",
  1636. {error:b});y.error(b);return g.reject(b)});return b};a.prototype._editsHandler=function(b){var a=this,c=function(b){return b.objectId},d=b.deletedFeatures.map(c);this._graphicsManager.delete(d);b=b.addedFeatures.concat(b.updatedFeatures).map(c);if(b.length){c=this.layer.createQuery();c.objectIds=b;c.outSpatialReference=this._tileInfo.spatialReference;var e=this._graphicsManager.createIntentToAdd(b);b=this.layer.queryFeatures(c);this._pendingQueries.set(e,b);this.notifyChange("updating");b.then(function(b){return a._refetchHandler(b,
  1637. e)}).always(function(){a._graphicsManager.removeIntent(e);a._pendingQueries.delete(e);a.notifyChange("updating")})}};a.prototype._refetchHandler=function(b,a){var c=this,d=b.features;if(d){var e=this._tileInfo.spatialReference;b=function(b){var a=b.key.extent,g=new u({xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3],spatialReference:e});d.forEach(function(a){a.geometry&&g.intersects(a.geometry)&&c._addFeatureToTile(a,b)})};for(var g=0,f=this._tileStrategy.tiles;g<f.length;g++)b(f[g]);this._graphicsManager.add(d,
  1638. a)}};a.prototype._addFeatureToTile=function(b,a){var c=a.featureSet.features||[],d=this.layer.objectIdField,e=b.attributes&&b.attributes[d],g;c.some(function(b){(b.attributes&&b.attributes[d])===e&&(g=b);return!!g});g?(g.geometry=b.geometry,g.attributes=b.attributes):c.push(b);a.featureSet.features=c};e([t.property()],a.prototype,"graphics",null);e([t.property()],a.prototype,"layer",void 0);e([t.property()],a.prototype,"layerView",void 0);e([t.property()],a.prototype,"updating",null);return a=e([t.subclass("esri.layers.graphics.controllers.OnDemandController2D")],
  1639. a)}(t.declared(n,b,h))})},"esri/layers/graphics/controllers/support/TileSet":function(){define(["require","exports","../../../../geometry/Extent","../../../../tasks/support/QuantizationParameters"],function(a,f,p,e){return function(){function a(a){this.layer=a.layer;this.tileInfo=a.tileInfo}a.prototype.fetch=function(a){return this._queryTile(a)};a.prototype._queryTile=function(a){return this.layer.queryFeatures(this._createQuery(a))};a.prototype._createQuery=function(a){this.tileInfo.updateTileInfo(a);
  1640. var e=this.tileInfo.spatialReference,c=a.extent,f=c[0],b=c[1],g=c[2],c=c[3],l=this.layer.createQuery();l.geometry=new p({xmin:f,ymin:b,xmax:g,ymax:c,spatialReference:e});l.outSpatialReference=e;this._setResolutionParams(l,a);return l};a.prototype._setResolutionParams=function(a,f){var c=this.layer,h=c.geometryType;if("polyline"===h||"polygon"===h)f=this.tileInfo.lodAt(f.level).resolution,"polyline"===h&&(a.maxAllowableOffset=f),c.get("capabilities.query.supportsQuantization")&&(a.quantizationParameters=
  1641. new e.default({mode:"view",originPosition:"upper-left",tolerance:f,extent:c.fullExtent}))};return a}()})},"esri/layers/support/GraphicsManager":function(){define(["../../core/Accessor"],function(a){var f=0;return a.createSubclass({constructor:function(){this._deletedGraphicsIndex=new Set;this._intentsIndex=new Map},destroy:function(){this.removeAll();this._intentsIndex=this._deletedGraphicsIndex=null},properties:{graphics:null,indexById:{value:null,dependsOn:["graphics","objectIdField"],get:function(){return this._createIndexById(this.graphics&&
  1642. this.graphics.toArray(),this.objectIdField)}},numGraphics:{value:0,dependsOn:["indexById"],get:function(){return this.indexById?this.indexById.size:0}},objectIdField:null,updating:{value:!1,dependsOn:["_intentsIndex"],get:function(){return!!(this._intentsIndex&&0<this._intentsIndex.size)}},_intentsIndex:{value:null}},_oldIndex:null,_deletedGraphicsIndex:null,beginPagedUpdate:function(){this._oldIndex=this.indexById;this.indexById=null;this.notifyChange("numGraphics")},addPage:function(a,e){this.add(a,
  1643. e)},revertPagedUpdate:function(){var a=this._removeLeftOnly(this.indexById,this._oldIndex);this.indexById=this._oldIndex;this._oldIndex=null;this.graphics.removeMany(a);this.notifyChange("numGraphics")},endPagedUpdate:function(){var a=this._removeLeftOnly(this._oldIndex,this.indexById);this._oldIndex=null;this.graphics.removeMany(a);this.notifyChange("numGraphics")},findGraphic:function(a){return(a=this.indexById&&this.indexById.get(a))&&a.graphic},removeAll:function(){this.indexById=this._oldIndex=
  1644. null;this.graphics.removeAll();this.notifyChange("numGraphics")},add:function(a,e){if(a&&a.length){for(var f=this.objectIdField,l=this.indexById=this.indexById||new Map,h=this._oldIndex,c=this._createIndexById(a,f),c=this._extractObjectIds(c),l=this._extractObjectIds(l),h=this._extractObjectIds(h),l=l.concat(h),m=[],b=l.length,h=0;h<b;h++){var g=l[h];-1<c.indexOf(g)&&m.push(g)}m.length&&this._remove(m,!1);e=this.findIntent(e);c=new Map;l=a.length;for(h=0;h<l;h++)(m=a[h])&&m.attributes&&c.set(m.attributes[f],
  1645. e);a.length&&this._add(a,c)}},remove:function(a){this._remove(a,!1)},delete:function(a){this._remove(a,!0)},isDeleted:function(a){return this._deletedGraphicsIndex.has(a)},createIntentToAdd:function(a){a&&this._intentsIndex.forEach(function(e,f){a.forEach(function(a){e.ignoredIds.add(a)})},this);var e=f++;this._intentsIndex.set(e,{ignoredIds:new Set});this.notifyChange("updating");return e},findIntent:function(a){return this._intentsIndex.get(a)},removeIntent:function(a){this._intentsIndex.delete(a);
  1646. this.notifyChange("updating")},update:function(a,e){if(a&&a.length){var f=this.objectIdField,l=this.indexById=this.indexById||new Map,h=this._oldIndex;a=this._createIndexById(a,f);for(var f=this._extractObjectIds(a),c=this._extractObjectIds(l),m=this._extractObjectIds(h),c=c.concat(m),m=[],b=c.length,g=0;g<b;g++){var p=c[g];if(-1===f.indexOf(p))m.push(p);else{var u=l.get(p)||h.get(p),u=u&&u.graphic&&u.graphic._ts,v=a.get(p);(v&&v.graphic&&v.graphic._ts)>u&&m.push(p)}}l=[];h=f.length;for(g=0;g<h;g++)p=
  1647. f[g],(-1===c.indexOf(p)||-1<m.indexOf(p))&&l.push(p);m.length&&this._remove(m,!1);l.length&&this._add(this._extractGraphics(l,a),e)}},_createIndexById:function(a,e){var f;if(a&&a.length&&e){var l,h,c;f=new Map;for(l=0;h=a[l];l++)c=h.attributes&&h.attributes[e],null!=c&&f.set(c,{graphic:h,refCount:1})}return f},_add:function(a,e){var f=this.objectIdField;a.forEach(function(a){var h=e.get(a.attributes&&a.attributes[f]);this._addToIndex(a,this.indexById,h)},this);this.graphics.addMany(a);this.notifyChange("numGraphics")},
  1648. _addToIndex:function(a,e,f){var l=a.attributes&&a.attributes[this.objectIdField];e&&null!=l&&(e.has(l)?f&&f.ignoredIds.has(l)||(f=e.get(l),e.set(l,{graphic:a,refCount:f.refCount+1})):this.isDeleted(l)||e.set(l,{graphic:a,refCount:1}))},_remove:function(a,e){a=a||[];a="object"===typeof a[0]?a.map(function(a){return a.attributes&&a.attributes[this.objectIdField]}.bind(this)):a;var f=this._extractGraphics(a,this._oldIndex),l=this._extractGraphics(a,this.indexById);a.forEach(function(a){e&&this._deletedGraphicsIndex.add(a);
  1649. this._removeFromIndex(a,this._oldIndex,e);this._removeFromIndex(a,this.indexById,e)}.bind(this));this.graphics.removeMany(f.concat(l));this.notifyChange("numGraphics")},_removeFromIndex:function(a,e,f){if(e&&e.has(a))if(f)e.delete(a);else{f=e.get(a);var l=f.refCount-1;0===l?e.delete(a):f.refCount=l}},_removeLeftOnly:function(a,e){var f=[];a&&a.forEach(function(l,h){var c=l.graphic;!c||e&&e.has(h)||(--l.refCount,0===l.refCount&&a.delete(h),f.push(c))});return f},_extractGraphics:function(a,e){return a&&
  1650. e?a.map(function(a){return(a=e.get(a))&&a.graphic}):[]},_extractObjectIds:function(a){var e=[];a&&a.forEach(function(a,f){e.push(f)});return e}})})},"esri/views/2d/tiling/TileInfoView":function(){define("require exports ./LODInfo ./TileCoverage ./TileKey ./TileSpan".split(" "),function(a,f,p,e,n,l){var h=function(){function a(b,a,c,e,f,h,m,l){this.x=b;this.ymin=a;this.ymax=c;this.invM=e;this.leftAdjust=f;this.rightAdjust=h;this.leftBound=m;this.rightBound=l}a.create=function(b,c){b[1]>c[1]&&(l=[c,
  1651. b],b=l[0],c=l[1]);l=b[0];b=b[1];var e=c[0];c=c[1];var g=e-l,f=c-b,f=0!==f?g/f:0,h=(Math.ceil(b)-b)*f,m=(Math.floor(b)-b)*f;return new a(l,Math.floor(b),Math.ceil(c),f,0>g?h:m,0>g?m:h,0>g?e:l,0>g?l:e);var l};a.prototype.incrRow=function(){this.x+=this.invM};a.prototype.getLeftCol=function(){return Math.max(this.x+this.leftAdjust,this.leftBound)};a.prototype.getRightCol=function(){return Math.min(this.x+this.rightAdjust,this.rightBound)};return a}(),c=[[0,0],[0,0],[0,0],[0,0]];return function(){function a(b,
  1652. a){var c=this;this.tileInfo=b;this.fullExtent=a;this.scales=[];this._lodInfos=null;this._infoByScale={};this._infoByLevel={};var e=b.lods.slice();e.sort(function(b,a){return a.scale-b.scale});var g=this._lodInfos=e.map(function(c){return p.create(b,c,a)});e.forEach(function(b,a){c._infoByLevel[b.level]=g[a];c._infoByScale[b.scale]=g[a];c.scales[a]=b.scale},this);this._wrap=b.isWrappable}a.prototype.getTileBounds=function(b,a){var c=this._infoByLevel[a.level];return c?c.getTileBounds(b,a):b};a.prototype.getTileCoords=
  1653. function(b,a){var c=this._infoByLevel[a.level];return c?c.getTileCoords(b,a):b};a.prototype.getTileCoverage=function(b,a){void 0===a&&(a=192);var g=this.getClosestInfoForScale(b.scale),f=e.pool.acquire(g),m=this._wrap,n;n=Infinity;var p=-Infinity,w,q,d=f.spans;c[0][0]=c[0][1]=c[1][1]=c[3][0]=-a;c[1][0]=c[2][0]=b.size[0]+a;c[2][1]=c[3][1]=b.size[1]+a;for(a=0;a<c.length;a++){var k=c[a];b.toMap(k,k);k[0]=g.getColumnForX(k[0]);k[1]=g.getRowForY(k[1])}b=[];k=3;for(a=0;4>a;a++){if(c[a][1]!==c[k][1]){var y=
  1654. h.create(c[a],c[k]);n=Math.min(y.ymin,n);p=Math.max(y.ymax,p);void 0===b[y.ymin]&&(b[y.ymin]=[]);b[y.ymin].push(y)}k=a}if(null==n||null==p||100<p-n)return null;for(k=[];n<p;){null!=b[n]&&(k=k.concat(b[n]));w=Infinity;q=-Infinity;for(a=k.length-1;0<=a;a--)y=k[a],w=Math.min(w,y.getLeftCol()),q=Math.max(q,y.getRightCol());w=Math.floor(w);q=Math.floor(q);if(n>=g.first[1]&&n<=g.last[1])if(m)if(g.size[0]<g.worldSize[0])for(y=Math.floor(q/g.worldSize[0]),a=Math.floor(w/g.worldSize[0]);a<=y;a++)d.push(new l(n,
  1655. Math.max(g.getFirstColumnForWorld(a),w),Math.min(g.getLastColumnForWorld(a),q)));else d.push(new l(n,w,q));else w>g.last[0]||q<g.first[0]||(w=Math.max(w,g.first[0]),q=Math.min(q,g.last[0]),d.push(new l(n,w,q)));n+=1;for(a=k.length-1;0<=a;a--)y=k[a],y.ymax>=n?y.incrRow():k.splice(a,1)}return f};a.prototype.getTileIdAtParent=function(b,a){a=n.pool.acquire(a);var c=this._infoByLevel[a.level];if(b.resolution<c.resolution)throw Error("Cannot calculate parent tile. destination LOD's resolution "+b.resolution+
  1656. " is not a parent resolution of "+c.resolution);return b.resolution===c.resolution?a.id:n.getId(b.level,Math.floor(a.row*c.resolution/b.resolution+.01),Math.floor(a.col*c.resolution/b.resolution+.01),a.world)};a.prototype.getTileParentId=function(b){b=n.pool.acquire(b);var a=this._lodInfos.indexOf(this._infoByLevel[b.level])-1;if(0>a)return n.pool.release(b),null;a=this.getTileIdAtParent(this._lodInfos[a],b);n.pool.release(b);return a};a.prototype.getTileResolution=function(b){return(b=this._infoByLevel[b.level])?
  1657. b.resolution:-1};a.prototype.getTileScale=function(b){return(b=this._infoByLevel[b.level])?b.scale:-1};a.prototype.intersects=function(b,a){var c=n.pool.acquire(a);a=this._infoByLevel[c.level];var e=b.lodInfo;if(e.resolution>a.resolution){var g=n.pool.acquire(this.getTileIdAtParent(e,c)),f=e.denormalizeCol(g.col,g.world);a=b.spans.some(function(b){return b.row===g.row&&b.colFrom<=f&&b.colTo>=f});n.pool.release(c);n.pool.release(g);return a}if(e.resolution<a.resolution){var h=b.spans.reduce(function(b,
  1658. a){b[0]=Math.min(b[0],a.row);b[1]=Math.max(b[1],a.row);b[2]=Math.min(b[2],a.colFrom);b[3]=Math.max(b[3],a.colTo);return b},[Infinity,-Infinity,Infinity,-Infinity]);b=h[0];var m=h[1],l=h[2],h=h[3],d=a.denormalizeCol(c.col,c.world),k=e.getColumnForX(a.getXForColumn(d)),p=e.getRowForY(a.getYForRow(c.row)),d=e.getColumnForX(a.getXForColumn(d+1))-1;a=e.getRowForY(a.getYForRow(c.row+1))-1;n.pool.release(c);return!(k>h||d<l||p>m||a<b)}var z=e.denormalizeCol(c.col,c.world);a=b.spans.some(function(b){return b.row===
  1659. c.row&&b.colFrom<=z&&b.colTo>=z});n.pool.release(c);return a};a.prototype.getClosestInfoForScale=function(b){var a=this.scales;this._infoByScale[b]||(b=a.reduce(function(a,c,e,g){return Math.abs(c-b)<Math.abs(a-b)?c:a},a[0]));return this._infoByScale[b]};return a}()})},"esri/views/2d/tiling/LODInfo":function(){define(["require","exports","../../../geometry/support/spatialReferenceUtils","./TileKey"],function(a,f,p,e){function n(a,c,e){a[0]=c;a[1]=e;return a}var l=new e("0/0/0/0");return function(){function a(a,
  1660. e,b,g,f,h,l,n,p,w,q,d){this.level=a;this.resolution=e;this.scale=b;this.origin=g;this.first=f;this.last=h;this.size=l;this.norm=n;this.worldStart=p;this.worldEnd=w;this.worldSize=q;this.wrap=d}a.create=function(c,e,b){var g=p.getInfo(c.spatialReference),f=[c.origin.x,c.origin.y],h=[c.size[0]*e.resolution,c.size[1]*e.resolution],m=[-Infinity,-Infinity],l=[Infinity,Infinity],r=[Infinity,Infinity];b&&(n(m,Math.max(0,Math.floor((b.xmin-f[0])/h[0])),Math.max(0,Math.floor((f[1]-b.ymax)/h[1]))),n(l,Math.max(0,
  1661. Math.floor((b.xmax-f[0])/h[0])),Math.max(0,Math.floor((f[1]-b.ymin)/h[1]))),n(r,l[0]-m[0]+1,l[1]-m[1]+1));var w;c.isWrappable?(c=[Math.ceil(Math.round(2*g.origin[1]/e.resolution)/c.size[0]),r[1]],g=[Math.floor((g.origin[0]-f[0])/h[0]),m[1]],b=[c[0]+g[0]-1,l[1]],w=!0):(g=m,b=l,c=r,w=!1);return new a(e.level,e.resolution,e.scale,f,m,l,r,h,g,b,c,w)};a.prototype.normalizeCol=function(a){if(!this.wrap)return a;var c=this.worldSize[0];return 0>a?c-1-Math.abs((a+1)%c):a%c};a.prototype.denormalizeCol=function(a,
  1662. e){return this.wrap?this.worldSize[0]*e+a:a};a.prototype.getWorldForColumn=function(a){return this.wrap?Math.floor(a/this.worldSize[0]):0};a.prototype.getFirstColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]};a.prototype.getLastColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]+this.size[0]-1};a.prototype.getColumnForX=function(a){return(a-this.origin[0])/this.norm[0]};a.prototype.getXForColumn=function(a){return this.origin[0]+a*this.norm[0]};a.prototype.getRowForY=
  1663. function(a){return(this.origin[1]-a)/this.norm[1]};a.prototype.getYForRow=function(a){return this.origin[1]-a*this.norm[1]};a.prototype.getTileBounds=function(a,e){l.set(e);var b=this.denormalizeCol(l.col,l.world),c=l.row;e=this.getXForColumn(b);var f=this.getYForRow(c+1),b=this.getXForColumn(b+1),c=this.getYForRow(c);a[0]=e;a[1]=f;a[2]=b;a[3]=c;return a};a.prototype.getTileCoords=function(a,e){l.set(e);Array.isArray(a)?n(a,this.getXForColumn(this.denormalizeCol(l.col,l.world)),this.getYForRow(l.row)):
  1664. (a.x=this.getXForColumn(this.denormalizeCol(l.col,l.world)),a.y=this.getYForRow(l.row));return a};return a}()})},"esri/views/2d/tiling/TileKey":function(){define(["require","exports","../../../core/ObjectPool"],function(a,f,p){return function(){function a(a,e,f,c){this.set(a,e,f,c)}a.from=function(e,f,h,c){return a.pool.acquire(e,f,h,c)};a.getId=function(a,e,f,c){return"object"===typeof a?a.level+"/"+a.row+"/"+a.col+"/"+a.world:a+"/"+e+"/"+f+"/"+c};Object.defineProperty(a.prototype,"id",{get:function(){return this.toString()},
  1665. enumerable:!0,configurable:!0});a.prototype.equals=function(a){return this.level===a.level&&this.row===a.row&&this.col===a.col&&this.world===a.world};a.prototype.release=function(){this.world=this.col=this.row=this.level=0};a.prototype.set=function(a,e,f,c){null==a?this.world=this.col=this.row=this.level=0:"object"===typeof a?(this.level=a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):"string"===typeof a?(a=a.split("/"),e=a[1],f=a[2],c=a[3],this.level=parseFloat(a[0]),this.row=
  1666. parseFloat(e),this.col=parseFloat(f),this.world=parseFloat(c)):(this.level=+a,this.row=+e,this.col=+f,this.world=+c||0);return this};a.prototype.toString=function(){return this.level+"/"+this.row+"/"+this.col+"/"+this.world};a.pool=new p(a,!0,null,25,50);return a}()})},"esri/views/2d/tiling/TileCoverage":function(){define(["require","exports","../../../core/ArrayPool","../../../core/ObjectPool","./TileSpan"],function(a,f,p,e,n){return function(){function a(a){this.lodInfo=a;this.spans=p.acquire()}
  1667. a.prototype.release=function(){for(var a=0,c=this.spans;a<c.length;a++)n.pool.release(c[a]);p.release(this.spans)};a.prototype.forEach=function(a,c){var e=this.spans,b=this.lodInfo,g=b.level;if(0!==e.length)for(var f=0;f<e.length;f++)for(var h=e[f],l=h.row,n=h.colTo,h=h.colFrom;h<=n;h++)a.call(c,g,l,b.normalizeCol(h),b.getWorldForColumn(h))};a.pool=new e(a,!0);return a}()})},"esri/views/2d/tiling/TileSpan":function(){define(["require","exports","../../../core/ObjectPool"],function(a,f,p){return function(){function a(a,
  1668. e,f){this.row=a;this.colFrom=e;this.colTo=f}a.pool=new p(a,!0);return a}()})},"esri/views/2d/tiling/TileQueue":function(){define(["require","exports","../../../core/QueueProcessor"],function(a,f,p){function e(a,e){a.length=0;e.forEach(function(b){return a.push(b)});return a}var n=new Set,l=[],h=new Map;return function(){function a(a){var b=this;this.tileInfoView=null;this.tileInfoView=a.tileInfoView;this._queues=a.tileServers&&0<a.tileServers.length?a.tileServers.map(function(){return new p({concurrency:a.concurrency||
  1669. 6,process:a.process,peeker:function(a){return b._peek(a)}})}):[new p({concurrency:a.concurrency||6,process:a.process,peeker:function(a){return b._peek(a)}})]}Object.defineProperty(a.prototype,"length",{get:function(){return this._queues.reduce(function(a,b){return a+b.length},0)},enumerable:!0,configurable:!0});a.prototype.clear=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].clear()};a.prototype.find=function(a,b){b=0;for(var c=this._queues;b<c.length;b++){var e=c[b].find(a);if(e)return e}};
  1670. a.prototype.has=function(a){for(var b=0,c=this._queues;b<c.length;b++)if(c[b].has(a))return!0;return!1};a.prototype.pause=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].pause()};a.prototype.push=function(a){return this._queues[a.row%this._queues.length].push(a)};a.prototype.reset=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].reset()};a.prototype.resume=function(){for(var a=0,b=this._queues;a<b.length;a++)b[a].resume()};a.prototype._peek=function(a){var b=this;if(!this.state)return a[0];
  1671. var c=this.tileInfoView,f=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY;a.forEach(function(a){var c=b.tileInfoView.getTileScale(a);h.has(c)||(h.set(c,[]),f=Math.max(c,f),m=Math.min(c,m));h.get(c).push(a);n.add(c)});var p=this.state.scale;h.has(p)||(e(l,n),l.sort(),p=l.reduce(function(b,a,c,e){return Math.abs(a-p)<Math.abs(b-p)?a:b},l[0]));p=Math.min(p,f);p=Math.max(p,m);a=h.get(p);var x=c.getClosestInfoForScale(p),r=x.getColumnForX(this.state.center[0]),w=x.getRowForY(this.state.center[1]);
  1672. a.sort(function(b,a){var c=x.denormalizeCol(b.col,b.world),d=x.denormalizeCol(a.col,a.world);return Math.sqrt((r-c)*(r-c)+(w-b.row)*(w-b.row))-Math.sqrt((r-d)*(r-d)+(w-a.row)*(w-a.row))});n.clear();h.clear();return a[0]};return a}()})},"esri/core/QueueProcessor":function(){define(["require","exports","dojo/Deferred","./Queue"],function(a,f,p,e){var n={};return function(){function a(a){this._apiPromises=new Map;this._resolvingPromises=new Map;this._isPaused=!1;this.concurrency=1;a.concurrency&&(this.concurrency=
  1673. a.concurrency);this._queue=new e(a.peeker?{peeker:a.peeker}:void 0);this.process=a.process}Object.defineProperty(a.prototype,"length",{get:function(){return this._resolvingPromises.size+this._queue.length},enumerable:!0,configurable:!0});a.prototype.clear=function(){this._queue.clear();var a=[];this._resolvingPromises.forEach(function(c){return a.push(c)});this._resolvingPromises.clear();a.forEach(function(a){return a.cancel()});a.length=0;this._apiPromises.forEach(function(c){return a.push(c)});
  1674. this._apiPromises.clear();a.forEach(function(a){return a.cancel()})};a.prototype.find=function(a,c){var e=this,b=void 0;this._apiPromises.forEach(function(g,f){a.call(c,f)&&(b=e._apiPromises.get(f).promise)});return b};a.prototype.has=function(a){return this._apiPromises.has(a)};a.prototype.pause=function(){this._isPaused=!0};a.prototype.push=function(a){var c=this;if(this._apiPromises.has(a))return this._apiPromises.get(a).promise;var e=new p(function(b){c._resolvingPromises.has(a)?c._resolvingPromises.get(a).cancel(b):
  1675. (c._remove(a),c._scheduleNext())});this._add(a,e);this._scheduleNext();return e.promise};a.prototype.reset=function(){var a=[];this._resolvingPromises.forEach(function(c){return a.push(c)});this._resolvingPromises.clear();a.forEach(function(a){return a.cancel(n)})};a.prototype.resume=function(){this._isPaused=!1;this._scheduleNext()};a.prototype._scheduleNext=function(){this._isPaused||this._next()};a.prototype._next=function(){this._resolvingPromises.size!==this.concurrency&&this._process(this._queue.pop())};
  1676. a.prototype._process=function(a){var c=this;if(null!=a){var e=this._apiPromises.get(a),b=this.process(a);b&&"function"===typeof b.then?(this._resolvingPromises.set(a,b),b.then(function(b){c._remove(a);c._scheduleNext();e.resolve(b)},function(b){b===n?c._process(a):(c._remove(a),c._scheduleNext(),e.reject(b))})):(e.resolve(b),this._remove(a));this._scheduleNext()}};a.prototype._add=function(a,c){this._apiPromises.set(a,c);this._queue.push(a)};a.prototype._remove=function(a){this._queue.remove(a);this._apiPromises.delete(a);
  1677. this._resolvingPromises.delete(a)};return a}()})},"esri/core/Queue":function(){define(["require","exports"],function(a,f){return function(){function a(a){this._items=[];this._itemSet=new Set;this._peeker=function(a){return a[0]};this._length=0;a&&a.peeker&&(this._peeker=a.peeker)}Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.clear=function(){this._itemSet.clear();this._length=this._items.length=0};a.prototype.peek=function(){if(0!==
  1678. this._length)return this._peeker(this._items)};a.prototype.push=function(a){this.contains(a)||this._add(a)};a.prototype.contains=function(a){return 0<this._length&&this._itemSet.has(a)};a.prototype.pop=function(){if(0!==this._length){var a=this.peek();this._remove(a);return a}};a.prototype.remove=function(a){this.contains(a)&&this._remove(a)};a.prototype._add=function(a){this._items.push(a);this._itemSet.add(a);this._length++};a.prototype._remove=function(a){this._itemSet.delete(a);this._items.splice(this._items.indexOf(a),
  1679. 1);this._length--};return a}()})},"esri/views/2d/tiling/TileStrategy":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./TileKey"],function(a,f,p,e){var n=new e(0,0,0,0),l=new Map,h=[],c=[];return function(){function a(a){this._previousResolution=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.tileIndex=new Map;this.tiles=[];this.acquireTile=a.acquireTile;this.releaseTile=a.releaseTile;this.tileInfoView=a.tileInfoView;a.cachePolicy&&(this.cachePolicy=a.cachePolicy)}
  1680. a.prototype.destroy=function(){this.tileIndex.clear()};a.prototype.update=function(a){var b=this,e=this.tileIndex,f=this.tileInfoView.getTileCoverage(a.state);if(f){var m=f.spans,p=f.lodInfo,r=p.level,w=a.state.resolution,q=!a.stationary&&w>this._previousResolution;this._previousResolution=w;e.forEach(function(a){return a.visible=!0});this.tiles.length=0;l.clear();var d=0,k=0;if(0<m.length)for(var y=0;y<m.length;y++){a=m[y];for(var z=a.row,A=a.colTo,C=a.colFrom;C<=A;C++)d++,a=n.set(r,z,p.normalizeCol(C),
  1681. p.getWorldForColumn(C)).id,e.has(a)?(w=e.get(a),w.attached?(l.set(a,w),k++):w.attached||q||this._addParentTile(a,l)):(w=this.acquireTile(n),this.tileIndex.set(a,w),q||this._addParentTile(a,l))}var B=k===d;c.length=0;h.length=0;e.forEach(function(a,d){n.set(d);if(!l.has(d)){var e=b.tileInfoView.intersects(f,n);!e||!q&&B?"purge"===b.cachePolicy?h.push(d):(n.level>r||!e)&&h.push(d):a.attached?c.push(d):n.level>r&&h.push(d)}});for(m=0;m<c.length;m++)a=c[m],(w=e.get(a))&&w.attached&&l.set(a,w);for(m=0;m<
  1682. h.length;m++)a=h[m],w=e.get(a),this.releaseTile(w),e["delete"](a);l.forEach(function(a){return b.tiles.push(a)});e.forEach(function(a){l.has(a.key.id)||(a.visible=!1)});c.length=0;h.length=0;l.clear()}};a.prototype.clear=function(){var a=this,c=this.tileIndex;c.forEach(function(b){a.releaseTile(b)});c.clear()};a.prototype._addParentTile=function(a,c){for(var b=null;;){a=this.tileInfoView.getTileParentId(a);if(!a)break;if(this.tileIndex.has(a)&&(b=this.tileIndex.get(a))&&b.attached){c.has(b.key.id)||
  1683. c.set(b.key.id,b);break}}};return a}()})},"esri/layers/graphics/controllers/SnapshotController":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/assignHelper ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/Handles ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../geometry/support/scaleUtils ../../support/GraphicsManager".split(" "),
  1684. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=b.getLogger("esri.layers.graphics.controllers.SnapshotController");return function(a){function b(b){b=a.call(this)||this;b._gManager=null;b._handles=new m;b._source=null;b._started=!1;b._pendingQueries=new Map;b.extent=null;b.hasAllFeatures=!1;b.hasFeatures=!1;b.layer=null;b.layerView=null;b.maxPageSize=null;b.pageSize=null;b.paginationEnabled=!1;return b}p(b,a);b.prototype.initialize=function(){var a=this,b=this.layer.when(function(){return a._verifyCapabilities()}).then(function(){return a._init()});
  1685. this.addResolvingPromise(b)};b.prototype.destroy=function(){this.cancelQuery();this._gManager&&(this._gManager.destroy(),this._gManager=null);this._handles.destroy();this._pendingQueries=this._handles=null};Object.defineProperty(b.prototype,"updating",{get:function(){return!!(this._pendingQueries&&0<this._pendingQueries.size)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"graphics",{set:function(a){this._get("graphics")!==a&&(this._handles.remove("graphics"),a&&(this._collectionChanged({added:a.toArray()}),
  1686. this._handles.add(a.on("change",this._collectionChanged.bind(this)),"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});b.prototype.cancelQuery=function(){var a=this;this._pendingQueries&&(this._pendingQueries.forEach(function(b,c){b.isFulfilled()||b.cancel(Error(a._cancelErrorMsg))}),this._pendingQueries.clear(),this.notifyChange("updating"))};b.prototype.refresh=function(){this.isResolved()&&this._started&&this._queryFeatures()};b.prototype.startup=function(){this._started||(this._started=
  1687. !0,this._resolutionParams=this._getResolutionParams(),this._queryFeatures())};b.prototype.update=function(){this.startup()};b.prototype._init=function(){var a=this.layer;this.paginationEnabled=!!a.get("capabilities.query.supportsPagination");this._source=a.source;var b=a.maxRecordCount||4E3;this.pageSize=null==this.maxPageSize?b:Math.min(b,this.maxPageSize);this._gManager=new x({graphics:this.graphics,objectIdField:a.objectIdField});this._setupStateWatchers()};b.prototype._getResolutionParams=function(){var a=
  1688. this.layer,b=a.get("capabilities.query.supportsQuantization"),c;if("polyline"===a.geometryType||"polygon"===a.geometryType){var e=v.getMetersPerUnit(this.layerView.view.spatialReference);null!=e&&(c=this._featureResolution.scale,e=this._featureResolution.value/e,c=a.maxScale?a.maxScale:a.minScale?Math.min(c,a.minScale):Math.min(c,v.getScale(this.layerView.view,a.fullExtent)),c*=e/this._featureResolution.scale)}return c?{maxAllowableOffset:b?null:c,quantizationParameters:b?{mode:"view",originPosition:"upperLeft",
  1689. tolerance:c,extent:a.fullExtent}:null}:null};b.prototype._setupStateWatchers=function(){var a=this;this._handles.add([this.watch("extent",this.refresh.bind(this)),this.layer.watch("outFields",function(b,c){b&&c?-1===c.indexOf("*")&&(b.sort(),c.sort(),JSON.stringify(b)!==JSON.stringify(c)&&a.refresh()):a.refresh()}),this.layer.watch("definitionExpression, historicMoment",this.refresh.bind(this)),this.layer.on("edits",this._editsHandler.bind(this))])};b.prototype._createQueryParams=function(){var a=
  1690. this.layerView,b=this.layer.createQuery();b.outSpatialReference=a.view.spatialReference;b.geometry=this.extent;b.set(this._resolutionParams);this.paginationEnabled&&(b.start=0,b.num=this.pageSize);return b};b.prototype._queryFeatures=function(){this.cancelQuery();this.hasAllFeatures=this.hasFeatures=!1;this._gManager.beginPagedUpdate();this.emit("query-start");this._executeQuery(this._createQueryParams())};b.prototype._executeQuery=function(a){var b=this,c=this._source.queryFeatures(a),d=this._gManager.createIntentToAdd();
  1691. this._querySetup(d,c);c.then(this._processFeatureSet.bind(this,a,d)).catch(function(a){return b._queryError(d,a)}).always(function(){return b._queryTeardown(d)})};b.prototype._processFeatureSet=function(a,b,c){var d=c.exceededTransferLimit,e=c.features,g=this._maxFeatures[this.layer.geometryType]||0,f=e?e.length:0,h=this._gManager.numGraphics+f,k=h>=g;k&&(r.warn('Feature limit exceeded on layer "',this.layer.title,'". Not all features are shown.'),(g=h-g)&&e.splice(f-g,g));a=d&&this.paginationEnabled&&
  1692. !k?this._queryNextPage(a):!1;e&&this._gManager.addPage(e,b);this.hasFeatures=!0;a||(this._gManager.endPagedUpdate(),this.hasAllFeatures=!d,this.emit("query-end",{success:!0}));return c};b.prototype._queryNextPage=function(a){a.start+=this.pageSize;this._executeQuery(a);return!0};b.prototype._queryError=function(a,b){b&&"cancel"===b.dojoType&&!this.hasFeatures?this._gManager.revertPagedUpdate():this._gManager.endPagedUpdate();this.emit("query-end",{success:!1});if(b&&"cancel"===b.dojoType)return t.reject(b);
  1693. a=new h("snapshotcontroller:tile-request-failed","Failed to query for features",{error:b});r.error(a);return t.reject(a)};b.prototype._querySetup=function(a,b){this._pendingQueries.set(a,b);this.notifyChange("updating")};b.prototype._queryTeardown=function(a){this._gManager.removeIntent(a);this._pendingQueries.delete(a);this.notifyChange("updating")};b.prototype._processRefetch=function(a,b){(b=b.features)&&this._gManager.add(b,a)};b.prototype._refetchError=function(a,b){};b.prototype._verifyCapabilities=
  1694. function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new h("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:this.layer});};b.prototype._collectionChanged=function(a){var b=a.added;if(b)for(var c=0;c<b.length;c++)b[c].layer=this.layer,b[c].sourceLayer=this.layer;if(b=a.removed)for(c=0;c<b.length;c++)b[c].layer=null,b[c].sourceLayer=null};b.prototype._editsHandler=function(a){var b=function(a){return a.objectId},
  1695. c=a.deletedFeatures.map(b);this._gManager.delete(c);a=a.addedFeatures.concat(a.updatedFeatures).map(b);a.length&&(b=this._createQueryParams(),b.objectIds=a,b=this._source.queryFeatures(b),a=this._gManager.createIntentToAdd(a),this._querySetup(a,b),b.then(this._processRefetch.bind(this,a)).catch(this._refetchError.bind(this,a)).always(this._queryTeardown.bind(this,a)))};e([u.shared("SnapshotController: query cancelled")],b.prototype,"_cancelErrorMsg",void 0);e([u.shared({value:.25,scale:945})],b.prototype,
  1696. "_featureResolution",void 0);e([u.shared({point:16E3,multipoint:8E3,polyline:4E3,polygon:4E3,multipatch:4E3})],b.prototype,"_maxFeatures",void 0);e([u.property()],b.prototype,"_pendingQueries",void 0);e([u.property({dependsOn:["_pendingQueries"]})],b.prototype,"updating",null);e([u.property()],b.prototype,"graphics",null);e([u.property()],b.prototype,"extent",void 0);e([u.property()],b.prototype,"hasAllFeatures",void 0);e([u.property()],b.prototype,"hasFeatures",void 0);e([u.property()],b.prototype,
  1697. "layer",void 0);e([u.property()],b.prototype,"layerView",void 0);e([u.property()],b.prototype,"maxPageSize",void 0);e([u.property()],b.prototype,"pageSize",void 0);e([u.property()],b.prototype,"paginationEnabled",void 0);return b=e([u.subclass("esri.layers.graphics.controllers.SnapshotController")],b)}(u.declared(l,g,c))})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("dojo/io-query dojo/_base/lang ../../support/layerSourceUtils ../../../core/Accessor ../../../core/Promise ../../../core/urlUtils ../../../core/Error ../../../request ../../../tasks/QueryTask".split(" "),
  1698. function(a,f,p,e,n,l,h,c,m){return e.createSubclass([n],{getDefaults:function(a){var b=this.inherited(arguments),c=a.layer;c&&(b=f.mixin(b,{url:c.url,layerId:c.layerId,gdbVersion:c.gdbVersion,dynamicDataSource:c.dynamicDataSource}));return b},initialize:function(){this.addResolvingPromise(this._fetchService())},properties:{dynamicDataSource:{},layer:{},layerId:{},gdbVersion:{dependsOn:["layer.gdbVersion"],get:function(){return this.layer.gdbVersion}},parsedUrl:{dependsOn:["url","layerId"],get:function(){var a=
  1699. this.url?l.urlToObject(this.url):null;if(null!=a)if(null!=this.layerId)a.path=l.join(a.path,this.layerId.toString());else if(null!=this.dynamicDataSource){var c={source:p.sourceToJSON(this.dynamicDataSource)};a.query={layer:JSON.stringify(c)}}return a}},queryTask:{dependsOn:["parsedUrl","gdbVersion"],get:function(){var b=this.parsedUrl.path+"?"+a.objectToQuery(this.parsedUrl.query);return new m({url:null!=this.dynamicDataSource?b:this.parsedUrl.path,gdbVersion:this.gdbVersion})}},url:{}},applyEdits:function(a){var b=
  1700. a.addFeatures.map(this._serializeFeature.bind(this)),e=a.updateFeatures.map(this._serializeFeature.bind(this));a=this._getFeatureIds(a.deleteFeatures);b={f:"json",adds:b.length?JSON.stringify(b):null,updates:e.length?JSON.stringify(e):null,deletes:a.length?a.join(","):null};return c(this.parsedUrl.path+"/applyEdits",{query:b,method:"post",responseType:"json",callbackParamName:"callback"}).then(this._createEditsResult.bind(this))},queryFeatures:function(a){return this.queryTask.execute(a)},queryObjectIds:function(a){return this.queryTask.executeForIds(a)},
  1701. queryFeatureCount:function(a){return this.queryTask.executeForCount(a)},queryExtent:function(a){return this.queryTask.executeForExtent(a)},_updateUrl:function(a){a&&(this.url=this.url.replace(/^http:/i,"https:"))},_fetchService:function(){return null==this.layerId&&null==this.dynamicDataSource?c(this.url,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){this._updateUrl(a.ssl);(a=a.data)&&a.layers&&a.layers[0]&&(this.layerId=a.layers[0].id);return this._fetchServiceLayer()}.bind(this)):
  1702. this._fetchServiceLayer()},_fetchServiceLayer:function(){return c(this.parsedUrl.path,{query:f.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"}).then(function(a){this._updateUrl(a.ssl);this.layerDefinition=a.data}.bind(this))},_serializeFeature:function(a){var b=a.geometry;a=a.attributes;return{geometry:b&&b.toJSON(),attributes:a}},_getFeatureIds:function(a){var b=this.layer.objectIdField,c=a[0],e=!(!c||null==c.objectId),f=!(!c||!c.attributes);return a.map(function(a){var c=
  1703. null;e?c=a.objectId:f&&(c=a.attributes&&a.attributes[b]);return c},this)},_createEditsResult:function(a){var b={};a=a.data;b.addFeatureResults=a.addResults?a.addResults.map(this._createFeatureEditResult.bind(this)):[];b.updateFeatureResults=a.updateResults?a.updateResults.map(this._createFeatureEditResult.bind(this)):[];b.deleteFeatureResults=a.deleteResults?a.deleteResults.map(this._createFeatureEditResult.bind(this)):[];return b},_createFeatureEditResult:function(a){var b=a.success?null:a.error||
  1704. {};return{objectId:a.objectId,globalId:a.globalId,error:b?new h("feature-layer-source:edit-failure",b.description,{code:b.code}):null}}})})},"esri/layers/support/layerSourceUtils":function(){define(["require","exports","../../core/kebabDictionary","../../core/lang"],function(a,f,p,e){function n(a){return null!=a&&a.hasOwnProperty("mapLayerId")}function l(a){return null!=a&&a.hasOwnProperty("dataSource")}function h(a){if(!a)return a;n(a)&&(a.type=f.MAPLAYER);if(l(a)&&(a.type=f.DATALAYER,!a.dataSource.type)){var b=
  1705. a.dataSource;b.workspaceId?b.type=b.gdbVersion?"table":b.query||b.oidFields?"query-table":"raster":b.leftTableKey&&b.rightTableKey&&b.leftTableSource&&b.rightTableSource&&(b.type="join-table",b.leftTableSource=h(b.leftTableSource),b.rightTableSource=h(b.rightTableSource))}return a}function c(a){var h={};if(a.type===f.MAPLAYER)h.mapLayerId=a.mapLayerId,a.gdbVersion&&(h.gdbVersion=a.gdbVersion);else if(a.type===f.DATALAYER){a.fields&&(h.fields=a.fields);var m;m=a.dataSource;var l;switch(m.type){case "table":l=
  1706. {dataSourceName:m.dataSourceName,workspaceId:m.workspaceId,gdbVersion:m.gdbVersion};break;case "query-table":l={geometryType:b.toJSON(m.geometryType),workspaceId:m.workspaceId,query:m.query,oidFields:m.oidFields,spatialReference:m.spatialReference};break;case "join-table":l={leftTableSource:c(m.leftTableSource),rightTableSource:c(m.rightTableSource),leftTableKey:m.leftTableKey,rightTableKey:m.rightTableKey,joinType:u.toJSON(m.joinType)};break;case "raster":l={workspaceId:m.workspaceId,dataSourceName:m.dataSourceName}}l.type=
  1707. t.toJSON(m.type);m=e.fixJson(l);h.dataSource=m}h.type=g.toJSON(a.type);return e.fixJson(h)}function m(a){var c={};if(g.fromJSON(a.type)===f.MAPLAYER)c.mapLayerId=a.mapLayerId,a.gdbVersion&&(c.gdbVersion=a.gdbVersion);else if(g.fromJSON(a.type)===f.DATALAYER){a.fields&&(c.fields=a.fields);var h;h=a.dataSource;var l;switch(h.type){case "table":l={dataSourceName:h.dataSourceName,workspaceId:h.workspaceId,gdbVersion:h.gdbVersion};break;case "queryTable":l={geometryType:b.fromJSON(h.geometryType),workspaceId:h.workspaceId,
  1708. query:h.query,oidFields:h.oidFields,spatialReference:h.spatialReference};break;case "joinTable":l={leftTableSource:m(h.leftTableSource),rightTableSource:m(h.rightTableSource),leftTableKey:h.leftTableKey,rightTableKey:h.rightTableKey,joinType:u.fromJSON(h.joinType)};break;case "raster":l={workspaceId:h.workspaceId,dataSourceName:h.dataSourceName}}l.type=t.fromJSON(h.type);h=e.fixJson(l);c.dataSource=h}c.type=g.fromJSON(a.type);return e.fixJson(c)}Object.defineProperty(f,"__esModule",{value:!0});f.MAPLAYER=
  1709. "map-layer";f.DATALAYER="data-layer";var b=p({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),g=p({mapLayer:f.MAPLAYER,dataLayer:f.DATALAYER}),t=p({joinTable:"join-table",queryTable:"query-table"}),u=p({esriLeftOuterJoin:"left-outer-join",esriLeftInnerJoin:"left-inner-join"});f.isMapLayerSource=n;f.isDataLayerSource=l;f.castSource=h;f.sourceToJSON=c;f.sourceFromJSON=m})},"esri/layers/graphics/sources/MemorySource":function(){define("../../../core/Collection ../../../core/Promise ../../../core/promiseUtils ../../../core/Error ../../../tasks/support/FeatureSet ../../../Graphic ../QueryEngine".split(" "),
  1710. function(a,f,p,e,n,l,h){return a.ofType(l).createSubclass([f],{properties:{layer:{value:null},_queryEngine:{value:null,dependsOn:["layer.loaded"],get:function(){return this.get("layer.loaded")?new h({features:this,objectIdField:this.layer.objectIdField}):null}}},queryFeatures:function(a){return this._queryEngine?this._queryEngine.queryFeatures(a).then(function(a){var b=new n;b.features=a;return b}):this._rejectQuery("Not ready to execute query")},queryObjectIds:function(a){return this._queryEngine?
  1711. this._queryEngine.queryObjectIds(a):this._rejectQuery("Not ready to execute query")},queryFeatureCount:function(a){return this._queryEngine?this._queryEngine.queryFeatureCount(a):this._rejectQuery("Not ready to execute query")},queryExtent:function(a){return this._queryEngine?this._queryEngine.queryExtent(a):this._rejectQuery("Not ready to execute query")},_rejectQuery:function(a){return p.reject(new e("MemorySource",a))}})})},"esri/layers/graphics/QueryEngine":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Error ../../core/promiseUtils ../../core/accessorSupport/decorators ../../geometry/support/graphicsUtils".split(" "),
  1712. function(a,f,p,e,n,l,h,c,m){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.features=null;b.objectIdField=null;return b}p(b,a);b.prototype.queryFeatures=function(a){if(this.features)if(a)if(this._isSupportedQuery(a)){var b=this._createFilters(a);a=b.length?this._executeQuery(a,b):this._rejectQuery("Invalid query")}else a=this._rejectQuery("Unsupported query");else a=this._returnAllFeatures();else a=this._rejectQuery("Engine not initialized");return a};b.prototype.queryObjectIds=
  1713. function(a){return this.objectIdField?this.queryFeatures(a).then(this._getObjectIds.bind(this)):this._rejectQuery("Unsupported query")};b.prototype.queryFeatureCount=function(a){return this.queryFeatures(a).then(function(a){return a.length})};b.prototype.queryExtent=function(a){var b=this;return this.queryFeatures(a).then(function(a){return{count:a.length,extent:b._getExtent(a)}})};b.prototype._returnAllFeatures=function(){return h.resolve(this.features.toArray())};b.prototype._executeQuery=function(a,
  1714. b){var c=this,e=this.features.filter(function(e){return b.every(function(b){return b.call(c,e,a)})});return h.resolve(e.toArray())};b.prototype._isSupportedQuery=function(a){var b=!0;if(null!=a.distance||null!=a.geometryPrecision||a.groupByFieldsForStatistics&&a.groupByFieldsForStatistics.length||null!=a.maxAllowableOffset||a.multipatchOption||null!=a.num||a.orderByFields&&a.orderByFields.length||a.outFields&&a.outFields.length||a.outSpatialReference||a.outStatistics&&a.outStatistics.length||a.pixelSize||
  1715. a.quantizationParameters||a.relationParameter||a.returnDistinctValues||null!=a.start||a.text||a.timeExtent||a.where||a.objectIds&&a.objectIds.length&&!this.objectIdField)b=!1;return b};b.prototype._createFilters=function(a){var b=[];a.objectIds&&a.objectIds.length&&b.push(this._createObjectIdFilter());a.geometry&&"extent"===a.geometry.type&&"intersects"===a.spatialRelationship&&b.push(this._createExtentFilter());return b};b.prototype._createExtentFilter=function(){return function(a,b){a=a.geometry;
  1716. b=b.geometry;return a&&b.intersects(a)}};b.prototype._createObjectIdFilter=function(){var a=this;return function(b,c){b=b.attributes;return-1<c.objectIds.indexOf(b&&b[a.objectIdField])}};b.prototype._rejectQuery=function(a){return h.reject(new l(this.declaredClass,a))};b.prototype._getObjectIds=function(a){var b=this.objectIdField,c=[];a.forEach(function(a){a=(a=a.attributes)&&a[b];null!=a&&c.push(a)});return c};b.prototype._getExtent=function(a){return a.length?m.graphicsExtent(a):null};e([c.property()],
  1717. b.prototype,"features",void 0);e([c.property()],b.prototype,"objectIdField",void 0);return b=e([c.subclass("esri.layers.graphics.QueryEngine")],b)}(c.declared(n))})},"esri/layers/TileLayer":function(){define("dojo/_base/lang dojo/io-query ../request ../core/urlUtils ../core/promiseUtils ../geometry/SpatialReference ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/arcgisLayers ./support/arcgisLayerUrl".split(" "),
  1718. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){return h.createSubclass([c,m,u,b,g,t],{declaredClass:"esri.layers.TileLayer",_mapsWithAttribution:"Canvas/World_Dark_Gray_Base Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Base Canvas/World_Light_Gray_Reference Elevation/World_Hillshade Ocean/World_Ocean_Base Ocean/World_Ocean_Reference Ocean_Basemap Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Transportation World_Imagery World_Street_Map World_Topo_Map".split(" "),
  1719. _TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_attributionServices:["services.arcgisonline.com/arcgis/rest/services","servicesdev.arcgisonline.com/arcgis/rest/services","servicesqa.arcgisonline.com/arcgis/rest/services"],normalizeCtorArgs:function(b,c){return"string"===typeof b?a.mixin({},{url:b},c):b},load:function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service","Map Service"]}).always(this._fetchService.bind(this)));return this.when()},
  1720. properties:{operationalLayerType:{get:function(){if(this.capabilities)return-1!==this.capabilities.indexOf("Map")?"ArcGISTiledMapServiceLayer":"ArcGISTiledImageServiceLayer";var a=this.url||this.portalItem&&this.portalItem.url;return a&&/\/ImageServer(\/|\/?$)/i.test(a)?"ArcGISTiledImageServiceLayer":"ArcGISTiledMapServiceLayer"}},attributionDataUrl:{dependsOn:["parsedUrl"],get:function(){return this._getDefaultAttribution(this._getMapName(this.parsedUrl.path.toLowerCase()))}},popupTemplates:null,
  1721. tileServers:{dependsOn:["parsedUrl"],value:null,cast:function(a){return Array.isArray(a)?a.map(function(a){return e.urlToObject(a).path}):null},get:function(){return this._getDefaultTileServers(this.parsedUrl.path)}},url:{json:{origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writer:e.writeOperationalLayerUrl}}}}},type:{value:"tile",json:{read:!1}},spatialReference:{json:{read:{source:["spatialReference","tileInfo"],reader:function(a,b){return(a=a||b.tileInfo&&b.tileInfo.spatialReference)&&
  1722. l.fromJSON(a)}}}}},getTileUrl:function(a,b,c){var d=this.tileServers,e=this.parsedUrl.query?f.objectToQuery(this.parsedUrl.query):"";this.token&&(e=e+(e?"\x26":"")+"token\x3d"+encodeURIComponent(this.token));this.resampling&&!this.tilemapCache&&this.supportsBlankTile&&(e=e+(e?"\x26":"")+"blankTile\x3dfalse");this.refreshTimestamp&&(e=e+(e?"\x26":"")+"_ts\x3d"+this.refreshTimestamp);return(d&&d.length?d[b%d.length]:this.parsedUrl.path)+"/tile/"+a+"/"+b+"/"+c+(e?"?"+e:"")},_fetchService:function(){return n.resolve().then(function(){return this.resourceInfo||
  1723. p(this.parsedUrl.path,{query:a.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"})}.bind(this)).then(function(a){a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));this.read(a.data,{origin:"service",url:this.parsedUrl});if(10.1===this.version&&!x.isHostedAgolService(this.url))return v.fetchServerVersion(this.url).then(function(a){this.read({currentVersion:a})}.bind(this)).catch(function(){})}.bind(this))},_getMapName:function(a){return(a=a.match(/^(?:https?:)?\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i))&&
  1724. a[2]},_getDefaultAttribution:function(a){if(a){var b;a=a.toLowerCase();for(var c=0,d=this._mapsWithAttribution.length;c<d;c++)if(b=this._mapsWithAttribution[c],-1<b.toLowerCase().indexOf(a))return e.makeAbsolute("//static.arcgis.com/attribution/"+b)}},_getDefaultTileServers:function(a){var b=-1!==a.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),c=-1!==a.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return b||c?[a,a.replace(b?/server\.arcgisonline/i:/services\.arcgisonline/i,b?"services.arcgisonline":
  1725. "server.arcgisonline")]:[]}})})},"esri/layers/mixins/RefreshableLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){return function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.refreshInterval=0;return c}p(c,a);c.prototype.refresh=function(){this.emit("refresh")};e([l.property({type:Number,cast:function(a){return.1<=a?a:
  1726. 0>=a?0:.1},json:{write:!0}})],c.prototype,"refreshInterval",void 0);return c=e([l.subclass("esri.layers.mixins.RefreshableLayer")],c)}(l.declared(n))})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ../../core/accessorSupport/write".split(" "),function(a,f,p,e,n,l,h){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||
  1727. this;b.minScale=0;b.maxScale=0;return b}p(c,a);e([l.property({type:Number,json:{write:{overridePolicy:function(a,c,e){if(h.willPropertyWrite(this,"maxScale",{},e))return{ignoreOrigin:!0}}}}})],c.prototype,"minScale",void 0);e([l.property({type:Number,json:{write:{overridePolicy:function(a,c,e){if(h.willPropertyWrite(this,"minScale",{},e))return{ignoreOrigin:!0}}}}})],c.prototype,"maxScale",void 0);return c=e([l.subclass("esri.layers.mixins.ScaleRangeLayer")],c)}(l.declared(n))})},"esri/layers/support/arcgisLayers":function(){define("require exports dojo/when dojo/_base/lang ../../request ../../core/Error ../../core/promiseUtils ./arcgisLayerUrl ./arcgisLayerUrl ./lazyLayerLoader".split(" "),
  1728. function(a,f,p,e,n,l,h,c,m,b){function g(a,b){return a.sublayerIds.map(function(c){return new a.Constructor(e.mixin({},b,{layerId:c,sublayerTitleMode:"service-name"}))})}function t(a){var c=m.parse(a);if(!c)return h.reject(new l("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:a}));var d=c.serverType,e=c.sublayer,g={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(d){case "MapServer":d=null!=e?"FeatureLayer":v(a).then(function(a){return a?
  1729. "TileLayer":"MapImageLayer"});break;case "ImageServer":d=r(a).then(function(a){var b=a.tileInfo&&a.tileInfo.format;return a.tileInfo?b&&"LERC"===b.toUpperCase()&&a.cacheType&&"elevation"===a.cacheType.toLowerCase()?"ElevationLayer":"TileLayer":"ImageryLayer"});break;case "SceneServer":d=r(c.url.path).then(function(a){var b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer"};return a&&Array.isArray(a.layers)&&0<a.layers.length&&(a=a.layers[0].layerType,
  1730. null!=b[a])?b[a]:"SceneLayer"});break;default:d=g[d]}var f={FeatureLayer:!0,SceneLayer:!0},n={parsedUrl:c,Constructor:null,sublayerIds:null},w;return p(d).then(function(b){w=b;if(f[b]&&null==e)return u(a).then(function(a){1!==a.length&&(n.sublayerIds=a)})}).then(function(){return(0,b.layerLookupMap[w])()}).then(function(a){n.Constructor=a;return n})}function u(a){return r(a).then(function(a){return a&&Array.isArray(a.layers)?a.layers.map(function(a){return a.id}).reverse():[]})}function v(a){return r(a).then(function(a){return a.tileInfo})}
  1731. function x(a,b){a=a.Constructor.prototype.declaredClass;return"esri.layers.FeatureLayer"===a||"esri.layers.StreamLayer"===a?e.mixin({returnZ:!0,outFields:["*"]},b):b}function r(a){return n(a,{responseType:"json",callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(f,"__esModule",{value:!0});f.fromUrl=function(b){return t(b.url).then(function(c){var d=x(c,e.mixin({},b.properties,{url:b.url}));return c.sublayerIds?h.create(function(b){return a(["../GroupLayer"],
  1732. b)}).then(function(a){var b=new a({title:c.parsedUrl.title});g(c,d).forEach(function(a){return b.add(a)});return h.resolve(b)}):h.resolve(new c.Constructor(d))})};f.fetchServerVersion=function(a){if(!c.test(a))return h.reject();a=a.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return n(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){return a.data&&a.data.currentVersion?a.data.currentVersion:h.reject()})}})},"esri/layers/support/lazyLayerLoader":function(){define(["require",
  1733. "exports","../../core/promiseUtils"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.layerLookupMap={CSVLayer:function(){return p.create(function(e){return a(["../CSVLayer"],e)})},ElevationLayer:function(){return p.create(function(e){return a(["../ElevationLayer"],e)})},FeatureLayer:function(){return p.create(function(e){return a(["../FeatureLayer"],e)})},GroupLayer:function(){return p.create(function(e){return a(["../GroupLayer"],e)})},GeoRSSLayer:function(){return p.create(function(e){return a(["../GeoRSSLayer"],
  1734. e)})},ImageryLayer:function(){return p.create(function(e){return a(["../ImageryLayer"],e)})},KMLLayer:function(){return p.create(function(e){return a(["../KMLLayer"],e)})},MapImageLayer:function(){return p.create(function(e){return a(["../MapImageLayer"],e)})},MapNotesLayer:function(){return p.create(function(e){return a(["../MapNotesLayer"],e)})},OpenStreetMapLayer:function(){return p.create(function(e){return a(["../OpenStreetMapLayer"],e)})},PointCloudLayer:function(){return p.create(function(e){return a(["../PointCloudLayer"],
  1735. e)})},SceneLayer:function(){return p.create(function(e){return a(["../SceneLayer"],e)})},IntegratedMeshLayer:function(){return p.create(function(e){return a(["../IntegratedMeshLayer"],e)})},StreamLayer:function(){return p.create(function(e){return a(["../StreamLayer"],e)})},TileLayer:function(){return p.create(function(e){return a(["../TileLayer"],e)})},UnknownLayer:function(){return p.create(function(e){return a(["../UnknownLayer"],e)})},UnsupportedLayer:function(){return p.create(function(e){return a(["../UnsupportedLayer"],
  1736. e)})},VectorTileLayer:function(){return p.create(function(e){return a(["../VectorTileLayer"],e)})},WebTileLayer:function(){return p.create(function(e){return a(["../WebTileLayer"],e)})},WMSLayer:function(){return p.create(function(e){return a(["../WMSLayer"],e)})},WMTSLayer:function(){return p.create(function(e){return a(["../WMTSLayer"],e)})}}})},"esri/layers/FeatureLayer":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper dojo/_base/lang ../Graphic ../PopupTemplate ../request ../core/Collection ../core/Error ../core/Handles ../core/kebabDictionary ../core/lang ../core/Logger ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ../geometry/support/normalizeUtils ./Layer ./graphics/sources/MemorySource ./mixins/ArcGISService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/arcgisLayerUrl ./support/commonProperties ./support/FeatureProcessing ./support/FeatureReduction ./support/FeatureReductionSelection ./support/FeatureTemplate ./support/FeatureType ./support/Field ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ./support/Relationship ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/support/jsonUtils ../renderers/support/styleUtils ../renderers/support/typeUtils ../symbols/SimpleFillSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleMarkerSymbol ../symbols/support/ElevationInfo ../symbols/support/jsonUtils ../tasks/support/FeatureSet ../tasks/support/Query".split(" "),
  1737. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y,z,A,C,B,D,F,G,Y,aa,Z,H,W,I,U,O,N,J,L,S,T,ha,V,P,ca,da,ka,ia,qa,pa,xa,ta,ya,va,Ga){function Ba(a){return a&&null!=a.applyEdits}function La(a){return a&&a.isInstanceOf&&a.isInstanceOf(D)}function fa(a,b,c){return!(a&&a.hasOwnProperty(b)?!a[b]:!c)}var wa=v({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),za=r.getLogger("esri.layers.FeatureLayer");
  1738. return function(f){function r(a){a=f.call(this)||this;a._handles=new u;a.featureReduction=null;a.copyright=null;a.displayField=null;a.definitionExpression=null;a.dynamicDataSource=null;a.editFieldsInfo=null;a.elevationInfo=null;a.fields=null;a.fullExtent=null;a.gdbVersion=null;a.geometryType=null;a.hasM=!1;a.hasZ=!1;a.heightModelInfo=null;a.historicMoment=null;a.isTable=!1;a.labelsVisible=!1;a.labelingInfo=null;a.layerId=void 0;a.legendEnabled=!0;a.maxRecordCount=void 0;a.minScale=0;a.maxScale=0;
  1739. a.objectIdField=null;a.operationalLayerType="ArcGISFeatureLayer";a.popupEnabled=!0;a.popupTemplate=null;a.relationships=null;a.returnM=!1;a.returnZ=!1;a.screenSizePerspectiveEnabled=!0;a.serviceDefinitionExpression=null;a.spatialReference=A.WGS84;a.templates=null;a.timeInfo=null;a.title=null;a.sublayerTitleMode="item-title";a.trackIdField=null;a.type="feature";a.typeIdField=null;a.types=null;a.userIsAdmin=!1;a.version=void 0;a.visible=!0;return a}e(r,f);r.prototype.normalizeCtorArgs=function(a,b){return"string"===
  1740. typeof a?h.mixin({},{url:a},b):a};r.prototype.load=function(){var a=this,b=this.source&&(Array.isArray(this.source)||La(this.source));if(this.portalItem&&b)this.addResolvingPromise(q.resolve());else return b=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]}).always(function(){if(a.url&&null==a.layerId&&/FeatureServer\/*$/i.test(a.url))return a._fetchFirstLayerId().then(function(b){null!=b&&(a.layerId=b)})}).then(function(){if(!a.url&&!a._hasMemorySource())throw new t("feature-layer:missing-url-or-source",
  1741. "Feature layer must be created with either a url or a source");return a.createGraphicsSource().then(a._initLayerProperties.bind(a))}),this.addResolvingPromise(b),this.when()};Object.defineProperty(r.prototype,"allRenderers",{get:function(){return this._getAllRenderers(this.renderer)},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"capabilities",{get:function(){var a=this._get("capabilities");return a||!this.loaded||this.hasService?a:{data:{supportsAttachment:!1,supportsM:!1,supportsZ:!1},
  1742. operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!0,supportsDelete:!0,supportsEditing:!0,supportsQuery:!0,supportsResizeAttachments:!1,supportsUpdate:!0},query:{supportsStatistics:!1,supportsCentroid:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!0,supportsGeometryProperties:!1,supportsOrderBy:!1,supportsPagination:!1,supportsQuantization:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsQueryByOthers:!1,
  1743. supportsHistoricMoment:!1},queryRelated:{supportsPagination:!1,supportsCount:!1,supportsOrderBy:!1},editing:{supportsGeometryUpdate:!0,supportsGlobalId:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}},enumerable:!0,configurable:!0});r.prototype.readCapabilities=function(a,b){b=b.layerDefinition||b;return{data:this._readDataCapabilities(b),operations:this._readOperationsCapabilities(b.capabilities||
  1744. a,b),query:this._readQueryCapabilities(b),queryRelated:this._readQueryRelatedCapabilities(b),editing:this._readEditingCapabilities(b)}};Object.defineProperty(r.prototype,"hasAttachments",{get:function(){return this.hasService&&this._get("hasAttachments")||!1},enumerable:!0,configurable:!0});r.prototype.readIsTable=function(a,b){b=b&&b.layerDefinition||b;return"Table"===b.type};Object.defineProperty(r.prototype,"hasService",{get:function(){return!this._hasMemorySource()},enumerable:!0,configurable:!0});
  1745. r.prototype.readMinScale=function(a,b){return b.effectiveMinScale||a||0};r.prototype.readMaxScale=function(a,b){return b.effectiveMaxScale||a||0};r.prototype.readObjectIdFieldFromService=function(a,b){b=b.layerDefinition||b;if(b.objectIdField)return b.objectIdField;if(b.fields)for(a=0,b=b.fields;a<b.length;a++){var c=b[a];if("esriFieldTypeOID"===c.type)return c.name}};Object.defineProperty(r.prototype,"outFields",{get:function(){var a=this,b=this._userOutFields,c=this.requiredFields,b=b&&b.slice(0),
  1746. c=c&&c.slice(0);b?-1===b.indexOf("*")&&c.forEach(function(a){-1===b.indexOf(a)&&b.push(a)}):b=c;-1!==b.indexOf("*")?b=["*"]:this.loaded&&(b=b.filter(function(b){var c=!!a.getField(b,a.fields);b&&!c&&za.error("[outFields] Invalid field: ",b);return c},this),b=b.map(function(b){return a.getField(b,a.fields).name},this),b=b.filter(function(a,b,c){return c.indexOf(a)===b}));return b},set:function(a){var b=this,c=this.requiredFields&&this.requiredFields.slice(0);a?-1===a.indexOf("*")&&c.forEach(function(b){-1===
  1747. a.indexOf(b)&&a.push(b)}):a=c;this.loaded&&(a=a.filter(function(a){var c="*"===a||!!b.getField(a,b.fields);a&&!c&&za.error("[outFields] Invalid field: ",a);return c},this),a=a.map(function(a){return"*"===a?a:b.getField(a,b.fields).name},this));this._userOutFields=a},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"parsedUrl",{get:function(){var a=this.url?d.urlToObject(this.url):null;null!=this.layerId&&null!=a&&(a.path=d.join(a.path,this.layerId.toString()));return a},enumerable:!0,
  1748. configurable:!0});Object.defineProperty(r.prototype,"renderer",{set:function(a){var b=this._getAllRenderers(a);S.fixRendererFields(b,this.fields);this._set("renderer",a)},enumerable:!0,configurable:!0});r.prototype.readRenderer=function(a,b,c){b=b.layerDefinition||b;var d=b.drawingInfo&&b.drawingInfo.renderer||void 0,e,g;if(d)(e=da.read(d,b,c)||void 0)||za.error("Failed to create renderer",{rendererDefinition:b.drawingInfo.renderer,layer:this,context:c});else if(b.defaultSymbol)ya.read(b.defaultSymbol,
  1749. b,c),b.types&&b.types.length?(e=new ca({defaultSymbol:g,field:b.typeIdField}),b.types.forEach(function(a){d.addUniqueValueInfo(a.id,ya.read(a.symbol,a,c))})):e=new P({symbol:g});else if("Table"!==b.type){switch(b.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":g=new xa;break;case "esriGeometryPolyline":g=new pa;break;case "esriGeometryPolygon":g=new qa}e=g&&new P({symbol:g})}return e};Object.defineProperty(r.prototype,"requiredFields",{get:function(){var a=this.timeInfo,b=[],
  1750. c=[],a=[this.objectIdField,this.typeIdField,this.editFieldsInfo&&this.editFieldsInfo.creatorField,a&&a.startTimeField,a&&a.endTimeField,this.trackIdField];this.allRenderers.forEach(function(a){b=b.concat(a.requiredFields)});this.labelingInfo&&this.labelingInfo.length&&this.labelingInfo.forEach(function(a){c=c.concat(a.requiredFields)});var c=c.map(function(a){return a.replace(/['"]+/g,"")}),a=a.concat(b),a=a.concat(c),d=this.elevationInfo&&this.elevationInfo.featureExpressionInfo;d&&(a=a.concat(d.requiredFields));
  1751. this.popupTemplate&&(a=a.concat(this.popupTemplate.requiredFields));return a.filter(function(a,b,c){return!!a&&c.indexOf(a)===b&&"function"!==typeof a})},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"source",{set:function(a){var b=this._get("source");b!==a&&(La(b)&&this._resetMemorySource(b),La(a)&&this._initMemorySource(a),this._set("source",a))},enumerable:!0,configurable:!0});r.prototype.castSource=function(a){return a?Array.isArray(a)||a&&a.isInstanceOf&&a.isInstanceOf(g)?
  1752. new D({layer:this,items:a}):a:null};r.prototype.readSource=function(a,b){a=va.fromJSON(b.featureSet);return new D({layer:this,items:a&&a.features||[]})};r.prototype.readTemplates=function(a,b){var c=b.editFieldsInfo;b=c&&c.creatorField;c=c&&c.editorField;a=a&&a.map(function(a){return N.fromJSON(a)});this._fixTemplates(a,b);this._fixTemplates(a,c);return a};r.prototype.readTitle=function(a,b){a=b.layerDefinition&&b.layerDefinition.name||b.name;b=b.title||b.layerDefinition&&b.layerDefinition.title;
  1753. if(a){b=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?H.titleFromUrlAndName(this.url,a):a;if(a=a||this.url&&H.parse(this.url).title)return"item-title-and-service-name"===this.sublayerTitleMode&&b&&(a=b+" - "+a),H.cleanTitle(a)}else if("item-title"===this.sublayerTitleMode&&b)return b};r.prototype.readTitleFromWebMap=function(a,b){return(a=b.layerDefinition&&b.layerDefinition.name)?a:b.title};r.prototype.readTypeIdField=function(a,b){b=b.layerDefinition||
  1754. b;if(a=b.typeIdField)if(b=this.getField(a,b.fields))a=b.name;return a};r.prototype.readTypes=function(a,b){var c=this;b=b.layerDefinition||b;a=b.types;var d=(b=b.editFieldsInfo)&&b.creatorField,e=b&&b.editorField;return a&&a.map(function(a){a=J.fromJSON(a);c._fixTemplates(a.templates,d);c._fixTemplates(a.templates,e);return a})};Object.defineProperty(r.prototype,"url",{set:function(a){a=H.sanitizeUrlWithLayerId(this,a,za);this._set("url",a.url);null!=a.layerId&&this._set("layerId",a.layerId)},enumerable:!0,
  1755. configurable:!0});r.prototype.writeUrl=function(a,b,c,d){H.writeUrlWithLayerId(this,a,b)};r.prototype.readVersion=function(a,b){b=b.layerDefinition||b;return b.currentVersion?b.currentVersion:b.hasOwnProperty("capabilities")||b.hasOwnProperty("drawingInfo")||b.hasOwnProperty("hasAttachments")||b.hasOwnProperty("htmlPopupType")||b.hasOwnProperty("relationships")||b.hasOwnProperty("timeInfo")||b.hasOwnProperty("typeIdField")||b.hasOwnProperty("types")?10:9.3};r.prototype.readVisible=function(a,b){if(b.layerDefinition&&
  1756. null!=b.layerDefinition.defaultVisibility)return!!b.layerDefinition.defaultVisibility;if(null!=b.visibility)return!!b.visibility};r.prototype.applyEdits=function(a){var b=this;return this.load().then(function(){return Ba(b.source)?b._processApplyEditsParams(a):q.reject(new t("FeatureLayer","Layer source does not support applyEdits capability"))}).then(function(a){if(Ba(b.source))return b.source.applyEdits(a).then(function(a){var c=function(a){return a.filter(function(a){return!a.error}).map(x.clone)},
  1757. c={addedFeatures:c(a.addFeatureResults),updatedFeatures:c(a.updateFeatureResults),deletedFeatures:c(a.deleteFeatureResults)};(c.addedFeatures.length||c.updatedFeatures.length||c.deletedFeatures.length)&&b.emit("edits",c);return a})})};r.prototype.createGraphicsSource=function(){var b=this;return this._hasMemorySource()?(this.emit("graphics-source-create",{graphicsSource:this.source}),this.source.when()):q.create(function(b){return a(["./graphics/sources/FeatureLayerSource"],b)}).then(function(a){return new a({layer:b})}).then(function(a){return a.when()}).then(function(a){b.emit("graphics-source-create",
  1758. {graphicsSource:a});return a})};r.prototype.createGraphicsController=function(b){var d=this,e=b.layerView,f=g.ofType(c),k=this.source,m=La(k),l=h.mixin(b.options||{},{layer:this,layerView:e,graphics:m?k:new f});return(m?q.create(function(b){return a(["./graphics/controllers/MemoryController"],b)}):"2d"===e.view.type?q.create(function(b){return a(["./graphics/controllers/AutoController2D"],b)}):q.create(function(b){return a(["./graphics/controllers/SnapshotController"],b)})).then(function(a){return new a(l)}).then(function(a){d.emit("graphics-controller-create",
  1759. {graphicsController:a});return a.when()})};r.prototype.createQuery=function(){var a=new Ga,b=this.get("capabilities.data");a.gdbVersion=this.gdbVersion;a.historicMoment=this.historicMoment;a.returnGeometry=!0;a.returnZ=b&&b.supportsZ&&this.returnZ||null;a.returnM=b&&b.supportsM&&this.returnM||null;a.outFields=this.outFields;a.where=this.definitionExpression||"1\x3d1";a.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null;return a};r.prototype.getFeatureType=function(a){var b=this.typeIdField;
  1760. if(!b||!a)return null;var c=a.attributes?a.attributes[b]:void 0;if("undefined"===typeof c)return null;var d=null;this.types.some(function(a){a.id.toString()===c.toString()&&(d=a);return!!d});return d};r.prototype.getFieldDomain=function(a,b){var c=this,d,e=!1;b=(b=b&&b.feature)&&b.attributes;var g=this.typeIdField&&b&&b[this.typeIdField];null!=g&&this.types&&(e=this.types.some(function(b){return b.id==g?((d=b.domains&&b.domains[a])&&"inherited"===d.type&&(d=c._getLayerDomain(a)),!0):!1}));e||d||(d=
  1761. this._getLayerDomain(a));return d};r.prototype.getField=function(a,b){var c=this.processing?this.fields.concat(this.processing.fields):this.fields;return S.getField(a,b||c)};r.prototype.graphicChanged=function(a){this.emit("graphic-update",a)};r.prototype.queryFeatureAttachments=function(a){var c=this;return this.load().then(function(){if(!a)return q.reject(new t("FeatureLayer","A feature is required to query attachments"));var e=c.layerId,g=c.objectIdField,f=c.token,h=c.url;if(!c.get("capabilities.data.supportsAttachment"))return q.reject(new t("FeatureLayer",
  1762. "this layer doesn't support attachments"));var k=a.attributes;if(!k)return q.reject(new t("FeatureLayer","'attributes' are required on a feature to query attachments"));k=k[g];if(!k)return q.reject(new t("FeatureLayer","feature is missing the identifying attribute "+g));var m=h+"/"+e+"/"+k+"/attachments";return b(m,{query:{f:"json",token:f},callbackParamName:"callback",responseType:"json"}).then(function(a){return a.data.attachmentInfos.map(function(a){return p({},a,{url:d.addProxy(m+"/"+a.id+(f?
  1763. "?token\x3d"+f:""))})})})})};r.prototype.queryFeatures=function(a){var b=this;return this.load().then(function(){if(!b.source.queryFeatures)return q.reject(new t("FeatureLayer","Layer source does not support queryFeatures capability"))}).then(function(){return b.source.queryFeatures(a||b.createQuery())}).then(function(a){if(a&&a.features){var c=b.popupTemplate;a.features.forEach(function(a){a.popupTemplate=c;a.layer=b;a.sourceLayer=b})}return a})};r.prototype.queryObjectIds=function(a){var b=this;
  1764. return this.load().then(function(){return b.source.queryObjectIds?b.source.queryObjectIds(a||b.createQuery()):q.reject(new t("FeatureLayer","Layer source does not support queryObjectIds capability"))})};r.prototype.queryFeatureCount=function(a){var b=this;return this.load().then(function(){return b.source.queryFeatureCount?b.source.queryFeatureCount(a||b.createQuery()):q.reject(new t("FeatureLayer","Layer source does not support queryFeatureCount capability"))})};r.prototype.queryExtent=function(a){var b=
  1765. this;return this.load().then(function(){return b.source.queryExtent?b.source.queryExtent(a||b.createQuery()):q.reject(new t("FeatureLayer","Layer source does not support queryExtent capability"))})};r.prototype.read=function(a,b){switch(b&&b.origin){case "web-scene":this.inherited(arguments,[{returnZ:!0},b])}var c=a.featureCollection;if(c){var d=c.layers;d&&1===d.length&&(this.inherited(arguments,[d[0],b]),null!=c.showLegend&&this.inherited(arguments,[{showLegend:c.showLegend},b]))}this.inherited(arguments,
  1766. [a,b]);return this};r.prototype.write=function(a,b){if(b&&"web-scene"===b.origin&&b.messages){if(!this.url)return b.messages.push(new t("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to web scenes",{layer:this})),null;if(this.isTable)return b.messages.push(new t("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' using a Table source cannot written to web scenes",{layer:this})),
  1767. null}return this.inherited(arguments)};r.prototype.importLayerViewModule=function(b){switch(b.type){case "2d":return q.create(function(b){return a(["../views/2d/layers/FeatureLayerView2D"],b)});case "3d":return q.create(function(b){return a(["../views/3d/layers/FeatureLayerView3D"],b)})}};r.prototype._getLayerDomain=function(a){if(!this.fields)return null;var b=null;this.fields.some(function(c){c.name===a&&(b=c.domain);return!!b});return b};r.prototype._fetchFirstLayerId=function(){return b(this.url,
  1768. {query:{f:"json"},callbackParamName:"callback",responseType:"json"}).then(function(a){if((a=a.data)&&Array.isArray(a.layers)&&0<a.layers.length)return a.layers[0].id})};r.prototype._initLayerProperties=function(a){var b=this;this.source||(this.source=a);a.url&&(this.url=a.url);a.layerDefinition&&this.read(a.layerDefinition,{origin:"service",url:this.parsedUrl});this._verifySource();this._verifyFields();this._addSymbolUrlTokens();S.fixRendererFields(this._getAllRenderers(this.renderer),this.fields);
  1769. this.watch("token",function(){b._addSymbolUrlTokens()});return ka.loadStyleRenderer(this,{origin:"service"})};r.prototype._findUrlBasedSymbols=function(){var a=this.renderer;if(!a)return[];var b=[];a.symbol&&b.push(a.symbol);a.defaultSymbol&&b.push(a.defaultSymbol);(a=a.classBreakInfos||a.uniqueValueInfos)&&a.forEach(function(a){a.symbol&&b.push(a.symbol)});return b.filter(function(a){return!!a.url})};r.prototype._addSymbolUrlTokens=function(){var a=this.token;!this._hasMemorySource()&&a&&this._findUrlBasedSymbols().forEach(function(b){var c=
  1770. b.url;if(c&&-1!==c.search(/https?\:/i)&&!/[?&]token=/.test(c)){var d=-1===c.indexOf("?")?"?":"\x26";b.url=c+d+"token\x3d"+a}})};r.prototype._getAllRenderers=function(a){if(!a)return[];var b=[];[a,a.trackRenderer,a.observationRenderer,a.latestObservationRenderer].forEach(function(a){a&&(b.push(a),a.rendererInfos&&a.rendererInfos.forEach(function(a){a.renderer&&b.push(a.renderer)}))});return b};r.prototype._verifyFields=function(){var a=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||
  1771. console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+a+")");this.isTable||this._hasMemorySource()||-1!==a.search(/\/FeatureServer\//i)||this.fields&&this.fields.some(function(a){return"geometry"===a.type})||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+a+")")};r.prototype._fixTemplates=function(a,b){a&&a.forEach(function(a){(a=a.prototype&&a.prototype.attributes)&&
  1772. b&&delete a[b]})};r.prototype._verifySource=function(){var a=this;if(this._hasMemorySource()){if(this.url)throw new t("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url");var b=["geometryType","fields","objectIdField"];if(!b.every(function(b){return null!=a[b]}))throw new t("feature-layer:missing-property","FeatureLayer created as feature collection requires properties: "+b.join(),{requiredProperties:b});}else{if(this.isTable)throw new t("feature-layer:source-type-not-supported",
  1773. "The table feature service type is not yet supported",{sourceType:"Table"});if(!this.url)throw new t("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source");}};r.prototype._initMemorySource=function(a){var b=this;a.forEach(function(a){a.layer=b;a.sourceLayer=b});this._handles.add([a.on("after-add",function(a){a.item.layer=b;a.item.sourceLayer=b}),a.on("after-remove",function(a){a.item.layer=null;a.item.sourceLayer=null})],"fl-source")};r.prototype._resetMemorySource=
  1774. function(a){a.forEach(function(a){a.layer=null;a.sourceLayer=null});this._handles.remove("fl-source")};r.prototype._hasMemorySource=function(){return!(this.url||!this.source)};r.prototype._readDataCapabilities=function(a){return{supportsAttachment:fa(a,"hasAttachments",!1),supportsM:fa(a,"hasM",!1),supportsZ:fa(a,"hasZ",!1)}};r.prototype._readOperationsCapabilities=function(a,b){a=a?a.toLowerCase().split(",").map(function(a){return a.trim()}):[];var c=-1!==a.indexOf("editing"),d=c&&-1!==a.indexOf("create"),
  1775. e=c&&-1!==a.indexOf("delete"),g=c&&-1!==a.indexOf("update");!c||d||e||g||(d=e=g=!0);return{supportsCalculate:fa(b,"supportsCalculate",!1),supportsTruncate:fa(b,"supportsTruncate",!1),supportsValidateSql:fa(b,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:e,supportsEditing:c,supportsQuery:-1!==a.indexOf("query"),supportsResizeAttachments:fa(b,"supportsAttachmentsResizing",!1),supportsUpdate:g}};r.prototype._readQueryCapabilities=function(a){var b=a.advancedQueryCapabilities,c=a.ownershipBasedAccessControlForFeatures,
  1776. d=a.archivingInfo;return{supportsStatistics:fa(b,"supportsStatistics",a.supportsStatistics),supportsCentroid:fa(b,"supportsReturningGeometryCentroid",!1),supportsDistance:fa(b,"supportsQueryWithDistance",!1),supportsDistinct:fa(b,"supportsDistinct",a.supportsAdvancedQueries),supportsExtent:fa(b,"supportsReturningQueryExtent",!1),supportsGeometryProperties:fa(b,"supportsReturningGeometryProperties",!1),supportsOrderBy:fa(b,"supportsOrderBy",a.supportsAdvancedQueries),supportsPagination:fa(b,"supportsPagination",
  1777. !1),supportsQuantization:fa(a,"supportsCoordinatesQuantization",!1),supportsResultType:fa(b,"supportsQueryWithResultType",!1),supportsSqlExpression:fa(b,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:fa(a,"useStandardizedQueries",!1),supportsQueryByOthers:fa(c,"allowOthersToQuery",!0),supportsHistoricMoment:fa(d,"supportsQueryWithHistoricMoment",!1)}};r.prototype._readQueryRelatedCapabilities=function(a){a=a.advancedQueryCapabilities;var b=fa(a,"supportsAdvancedQueryRelated",!1);return{supportsPagination:fa(a,
  1778. "supportsQueryRelatedPagination",!1),supportsCount:b,supportsOrderBy:b}};r.prototype._readEditingCapabilities=function(a){var b=a.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:fa(a,"allowGeometryUpdates",!0),supportsGlobalId:fa(a,"supportsApplyEditsWithGlobalIds",!1),supportsRollbackOnFailure:fa(a,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:fa(a,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:fa(a,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:fa(b,
  1779. "allowAnonymousToDelete",!0),supportsDeleteByOthers:fa(b,"allowOthersToDelete",!0),supportsUpdateByAnonymous:fa(b,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:fa(b,"allowOthersToUpdate",!0)}};r.prototype._processApplyEditsParams=function(a){if(!a)return q.reject(new t("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"));a=h.mixin({},a);a.addFeatures=a.addFeatures||[];a.updateFeatures=a.updateFeatures||[];a.deleteFeatures=a.deleteFeatures||
  1780. [];if(a.addFeatures.length||a.updateFeatures.length||a.deleteFeatures.length){var b=function(a){var b=new c;b.geometry=a.geometry;b.attributes=a.attributes;return b};a.addFeatures=a.addFeatures.map(b);a.updateFeatures=a.updateFeatures.map(b);return this._normalizeGeometries(a)}return q.reject(new t("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"))};r.prototype._normalizeGeometries=function(a){var b=a.addFeatures,c=a.updateFeatures,d=b.concat(c).map(function(a){return a.geometry});
  1781. return C.normalizeCentralMeridian(d).then(function(d){var e=b.length,g=c.length;d.slice(0,e).forEach(function(b,c){a.addFeatures[c].geometry=b});d.slice(e,e+g).forEach(function(b,c){a.updateFeatures[c].geometry=b});return a})};n([k.property({types:{key:"type",base:U.default,typeMap:{selection:O.default}},json:{origins:{"web-scene":{read:{source:"layerDefinition.featureReduction"},write:{target:"layerDefinition.featureReduction"}}}}})],r.prototype,"featureReduction",void 0);n([k.property({readOnly:!0,
  1782. dependsOn:["loaded","renderer","fields"]})],r.prototype,"allRenderers",null);n([k.property({readOnly:!0,dependsOn:["loaded"]})],r.prototype,"capabilities",null);n([k.reader("capabilities","layerDefinition.capabilities layerDefinition.advancedQueryCapabilities layerDefinition.archivingInfo layerDefinition.supportsStatistics layerDefinition.supportsAdvancedQueries layerDefinition.hasAttachments layerDefinition.hasM layerDefinition.hasZ layerDefinition.supportsCalculate layerDefinition.supportsTruncate layerDefinition.supportsValidateSql layerDefinition.supportsCoordinatesQuantization layerDefinition.useStandardizedQueries layerDefinition.ownershipBasedAccessControlForFeatures layerDefinition.allowGeometryUpdates layerDefinition.supportsApplyEditsWithGlobalIds layerDefinition.supportsRollbackOnFailureParameter layerDefinition.allowUpdateWithoutMValues layerDefinition.supportsAttachmentsByUploadId".split(" ")),
  1783. k.reader("service","capabilities","advancedQueryCapabilities archivingInfo supportsStatistics supportsAdvancedQueries hasAttachments hasM hasZ supportsAttachmentsResizing supportsCalculate supportsTruncate supportsValidateSql supportsCoordinatesQuantization useStandardizedQueries ownershipBasedAccessControlForFeatures allowGeometryUpdates supportsApplyEditsWithGlobalIds supportsRollbackOnFailureParameter allowUpdateWithoutMValues supportsAttachmentsByUploadId capabilities".split(" "))],r.prototype,
  1784. "readCapabilities",null);n([k.property({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],r.prototype,"copyright",void 0);n([k.property({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],r.prototype,"displayField",void 0);n([k.property({type:String,json:{origins:{service:{read:!1,write:!1}},read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}})],
  1785. r.prototype,"definitionExpression",void 0);n([k.property({readOnly:!0,json:{read:ya.read}})],r.prototype,"defaultSymbol",void 0);n([k.property()],r.prototype,"dynamicDataSource",void 0);n([k.property({readOnly:!0})],r.prototype,"editFieldsInfo",void 0);n([k.property({type:ta,json:{origins:{service:{read:{source:"elevationInfo"},write:{target:"elevationInfo",enabled:!1}}},read:{source:"layerDefinition.elevationInfo"},write:{target:"layerDefinition.elevationInfo"}}})],r.prototype,"elevationInfo",void 0);
  1786. n([k.property({type:[L],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.fields"}}})],r.prototype,"fields",void 0);n([k.property({type:y,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],r.prototype,"fullExtent",void 0);n([k.property()],r.prototype,"gdbVersion",void 0);n([k.property({json:{origins:{service:{read:wa.read}},read:{source:"layerDefinition.geometryType",reader:wa.read}}})],r.prototype,"geometryType",void 0);n([k.property({readOnly:!0,
  1787. dependsOn:["loaded"],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasAttachments"}}})],r.prototype,"hasAttachments",null);n([k.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],r.prototype,"hasM",void 0);n([k.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],r.prototype,"hasZ",void 0);n([k.property({readOnly:!0,type:z})],r.prototype,"heightModelInfo",void 0);n([k.property({type:Date})],
  1788. r.prototype,"historicMoment",void 0);n([k.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],r.prototype,"id",void 0);n([k.property({readOnly:!0})],r.prototype,"isTable",void 0);n([k.reader("service","isTable",["type"]),k.reader("isTable",["layerDefinition.type"])],r.prototype,"readIsTable",null);n([k.property({dependsOn:["loaded","url","source"],readOnly:!0})],r.prototype,"hasService",null);n([k.property(W.labelsVisible)],r.prototype,"labelsVisible",void 0);n([k.property({type:[T],
  1789. json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:ha.reader},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:ha.reader},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],r.prototype,"labelingInfo",void 0);n([k.property({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],r.prototype,"layerId",void 0);n([k.property({type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"}}})],
  1790. r.prototype,"legendEnabled",void 0);n([k.property({type:Number,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.maxRecordCount"}}})],r.prototype,"maxRecordCount",void 0);n([k.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}})],r.prototype,"minScale",void 0);n([k.reader("service","minScale",["minScale","effectiveMinScale"])],r.prototype,"readMinScale",null);n([k.property({type:Number,
  1791. json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}})],r.prototype,"maxScale",void 0);n([k.reader("service","maxScale",["maxScale","effectiveMaxScale"])],r.prototype,"readMaxScale",null);n([k.property({type:String})],r.prototype,"objectIdField",void 0);n([k.reader("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),k.reader("service","objectIdField",["objectIdField","fields"])],r.prototype,"readObjectIdFieldFromService",
  1792. null);n([k.property()],r.prototype,"operationalLayerType",void 0);n([k.property({dependsOn:["requiredFields"]})],r.prototype,"outFields",null);n([k.property({readOnly:!0,dependsOn:["layerId"]})],r.prototype,"parsedUrl",null);n([k.property(W.popupEnabled)],r.prototype,"popupEnabled",void 0);n([k.property({type:m,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],r.prototype,"popupTemplate",void 0);n([k.property({type:I})],r.prototype,"processing",void 0);n([k.property({type:[V],readOnly:!0})],
  1793. r.prototype,"relationships",void 0);n([k.property({types:ia.types,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],r.prototype,"renderer",null);n([k.reader("service","renderer",["drawingInfo.renderer","defaultSymbol","type"]),k.reader("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol","layerDefinition.type"])],r.prototype,"readRenderer",null);n([k.property({readOnly:!0,dependsOn:["allRenderers",
  1794. "labelingInfo","elevationInfo.featureExpressionInfo","popupTemplate.requiredFields"]})],r.prototype,"requiredFields",null);n([k.property({type:Boolean})],r.prototype,"returnM",void 0);n([k.property({type:Boolean})],r.prototype,"returnZ",void 0);n([k.property(W.screenSizePerspectiveEnabled)],r.prototype,"screenSizePerspectiveEnabled",void 0);n([k.property()],r.prototype,"source",null);n([k.cast("source")],r.prototype,"castSource",null);n([k.reader("portal-item","source",["featureSet"]),k.reader("web-map",
  1795. "source",["featureSet"])],r.prototype,"readSource",null);n([k.property({readOnly:!0,json:{origins:{service:{read:{source:"definitionExpression"}}}}})],r.prototype,"serviceDefinitionExpression",void 0);n([k.property({type:A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],r.prototype,"spatialReference",void 0);n([k.property({type:[N]})],r.prototype,"templates",void 0);n([k.reader("templates",["editFieldsInfo","creatorField",
  1796. "editorField","templates"])],r.prototype,"readTemplates",null);n([k.property()],r.prototype,"timeInfo",void 0);n([k.property()],r.prototype,"title",void 0);n([k.reader("service","title",["name"]),k.reader("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],r.prototype,"readTitle",null);n([k.reader("web-map","title",["layerDefinition.name","title"])],r.prototype,"readTitleFromWebMap",null);n([k.property({type:String})],r.prototype,"sublayerTitleMode",void 0);n([k.property({type:String,
  1797. readOnly:!0,json:{read:{source:"timeInfo.trackIdField"}}})],r.prototype,"trackIdField",void 0);n([k.property({json:{read:!1}})],r.prototype,"type",void 0);n([k.property({type:String,readOnly:!0})],r.prototype,"typeIdField",void 0);n([k.reader("service","typeIdField"),k.reader("typeIdField",["layerDefinition.typeIdField"])],r.prototype,"readTypeIdField",null);n([k.property({type:[J]})],r.prototype,"types",void 0);n([k.reader("service","types",["types"]),k.reader("types",["layerDefinition.types"])],
  1798. r.prototype,"readTypes",null);n([k.property({type:String})],r.prototype,"url",null);n([k.writer("url")],r.prototype,"writeUrl",null);n([k.property({readOnly:!0})],r.prototype,"userIsAdmin",void 0);n([k.property({json:{origins:{"portal-item":{read:!1}}}})],r.prototype,"version",void 0);n([k.reader("service","version","currentVersion capabilities drawingInfo hasAttachments htmlPopupType relationships timeInfo typeIdField types".split(" ")),k.reader("version","layerDefinition.currentVersion layerDefinition.capabilities layerDefinition.drawingInfo layerDefinition.hasAttachments layerDefinition.htmlPopupType layerDefinition.typeIdField layerDefinition.types".split(" "))],
  1799. r.prototype,"readVersion",null);n([k.property({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],r.prototype,"visible",void 0);n([k.reader("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],r.prototype,"readVisible",null);n([l(0,k.cast(Ga))],r.prototype,"queryFeatures",null);n([l(0,k.cast(Ga))],r.prototype,"queryObjectIds",null);n([l(0,k.cast(Ga))],r.prototype,"queryFeatureCount",null);n([l(0,k.cast(Ga))],r.prototype,"queryExtent",
  1800. null);return r=n([k.subclass("esri.layers.FeatureLayer")],r)}(k.declared(B,G,Y,Z,aa,F,w))})},"esri/layers/support/FeatureProcessing":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/lang ../../core/accessorSupport/decorators ../../layers/support/Field".split(" "),function(a,f,p,e,n,l,h,c){return function(a){function b(){return null!==a&&a.apply(this,arguments)||this}p(b,a);g=b;b.fromWorker=function(a){if(!a)return null;
  1801. var b=new g;b.fields=a.fields&&a.fields.map(function(a){return c.fromJSON(a)});b.options=a.options;b.process=new (Function.bind.apply(Function,[void 0].concat(a.process.args,[a.process.body])));return b};b.prototype.clone=function(){return new g(l.clone({fields:this.fields,options:this.options,process:this.process}))};b.prototype.toWorker=function(){var a=this.process.toString();return{fields:this.fields,options:this.options,process:{body:a.substring(a.indexOf("{")+1,a.lastIndexOf("}")),args:a.slice(a.indexOf("(")+
  1802. 1,a.indexOf(")")).match(/([^\s,]+)/g)}}};e([h.property({type:[c]})],b.prototype,"fields",void 0);e([h.property()],b.prototype,"options",void 0);e([h.property()],b.prototype,"process",void 0);return b=g=e([h.subclass("esri.layers.support.FeatureProcessing")],b);var g}(h.declared(n))})},"esri/layers/support/FeatureReduction":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),
  1803. function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.type=null;return c}p(c,a);e([l.property({type:String,readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0);return c=e([l.subclass("esri.layers.support.FeatureReduction")],c)}(l.declared(n));f.FeatureReduction=a;f.default=a})},"esri/layers/support/FeatureReductionSelection":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./FeatureReduction".split(" "),
  1804. function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function c(){var c=null!==a&&a.apply(this,arguments)||this;c.type="selection";return c}p(c,a);e([n.property()],c.prototype,"type",void 0);return c=e([n.subclass("esri.layers.support.FeatureReductionSelection")],c)}(n.declared(l.default));f.FeatureReductionSelection=a;f.default=a})},"esri/layers/support/FeatureTemplate":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators".split(" "),
  1805. function(a,f,p,e,n,l,h,c){var m=l({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",
  1806. esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});return function(a){function b(b){b=a.call(this,b)||this;b.name=null;b.description=null;b.drawingTool=null;b.prototype=null;b.thumbnail=null;return b}p(b,a);b.prototype.writeDrawingTool=function(a,b){b.drawingTool=m.toJSON(a)};b.prototype.writePrototype=function(a,b){b.prototype=h.fixJson(h.clone(a),!0)};b.prototype.writeThumbnail=function(a,b){b.thumbnail=h.fixJson(h.clone(a))};e([c.property({json:{write:!0}})],b.prototype,
  1807. "name",void 0);e([c.property({json:{write:!0}})],b.prototype,"description",void 0);e([c.property({json:{read:m.fromJSON,write:!0}})],b.prototype,"drawingTool",void 0);e([c.writer("drawingTool")],b.prototype,"writeDrawingTool",null);e([c.property({json:{write:!0}})],b.prototype,"prototype",void 0);e([c.writer("prototype")],b.prototype,"writePrototype",null);e([c.property({json:{write:!0}})],b.prototype,"thumbnail",void 0);e([c.writer("thumbnail")],b.prototype,"writeThumbnail",null);return b=e([c.subclass("esri.layers.support.FeatureTemplate")],
  1808. b)}(c.declared(n))})},"esri/layers/support/FeatureType":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./domains ./FeatureTemplate".split(" "),function(a,f,p,e,n,l,h,c,m){return function(a){function b(b){b=a.call(this,b)||this;b.id=null;b.name=null;b.domains=null;b.templates=null;return b}p(b,a);b.prototype.readDomains=function(a){var b={},e;for(e in a)if(a.hasOwnProperty(e)){var g=
  1809. a[e];switch(g.type){case "range":b[e]=c.RangeDomain.fromJSON(g);break;case "codedValue":b[e]=c.CodedValueDomain.fromJSON(g);break;case "inherited":b[e]=c.InheritedDomain.fromJSON(g)}}return b};b.prototype.writeDomains=function(a,b){var c={},e;for(e in a)a.hasOwnProperty(e)&&(c[e]=a[e]&&a[e].toJSON());l.fixJson(c);b.domains=c};b.prototype.readTemplates=function(a){return a&&a.map(function(a){return new m(a)})};b.prototype.writeTemplates=function(a,b){b.templates=a&&a.map(function(a){return a.toJSON()})};
  1810. e([h.property({json:{write:!0}})],b.prototype,"id",void 0);e([h.property({json:{write:!0}})],b.prototype,"name",void 0);e([h.property({json:{write:!0}})],b.prototype,"domains",void 0);e([h.reader("domains")],b.prototype,"readDomains",null);e([h.writer("domains")],b.prototype,"writeDomains",null);e([h.property({json:{write:!0}})],b.prototype,"templates",void 0);e([h.reader("templates")],b.prototype,"readTemplates",null);e([h.writer("templates")],b.prototype,"writeTemplates",null);return b=e([h.subclass("esri.layers.support.FeatureType")],
  1811. b)}(h.declared(n))})},"esri/layers/support/LabelClass":function(){define("../../core/date ../../core/JSONSupport ../../core/lang ../../core/kebabDictionary dojo/_base/lang dojo/number ./LabelExpressionInfo ./labelUtils ./types ../../support/arcadeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){function u(a){a=(a=b.createSyntaxTree(a))&&a.body&&a.body[0]&&a.body[0].body&&a.body[0].body.body;if(!a||1!==a.length)return null;a="ExpressionStatement"===
  1812. a[0].type&&a[0].expression;if(!a||"MemberExpression"!==a.type)return null;var c=a.object;if(!c||"Identifier"!==c.type||"$feature"!==c.name)return null;a=a.property;if(!a)return null;switch(a.type){case "Literal":return a.value;case "Identifier":return a.name}return null}function v(a){return a?"service"===a.origin?!1:!a.layer||!m.isOfType(a.layer,"map-image"):!0}var x=e({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",
  1813. esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",
  1814. esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",
  1815. esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"}),r=f.createSubclass({declaredClass:"esri.layers.support.LabelClass",properties:{name:{type:String,value:null,json:{write:!0}},labelExpression:{type:String,value:null,json:{read:function(a,b,c,e){b=b.labelExpressionInfo;if(!b||!b.value&&!b.expression)return a},write:{allowNull:!0,writer:function(a,b,c,e){this.labelExpressionInfo&&v(e)&&(null!=this.labelExpressionInfo.value?a=this._templateStringToSql(this.labelExpressionInfo.value):null!=
  1816. this.labelExpressionInfo.expression&&(e=u(this.labelExpressionInfo.expression))&&(a="["+e+"]"));null!=a&&(b[c]=a)}}}},labelExpressionInfo:{value:null,type:h,json:{write:{overridePolicy:function(a,b,c){return v(c)?{allowNull:!0}:{enabled:!1}},writer:function(a,b,c,e){if(null==a&&null!=this.labelExpression&&v(e))a=new h({expression:this.getLabelExpressionArcade()});else if(!a)return;a=a.toJSON(e);a.expression&&(b[c]=a)}}}},labelPlacement:{type:String,value:null,json:{read:function(a,b){return x.fromJSON(a)},
  1817. write:function(a,b){if(a=x.toJSON(a))b.labelPlacement=a}}},maxScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.minScale)b.maxScale=a}}},minScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.maxScale)b.minScale=a}}},requiredFields:{readOnly:!0,dependsOn:["labelExpression","labelExpressionInfo","where"],get:function(){var a=Object.create(null);this._collectRequiredFields(a);return Object.keys(a)}},symbol:{value:null,types:t.labelTypes,json:{origins:{"web-scene":{read:g.read,
  1818. write:{target:{symbol:{types:t.labelTypes3D}},writer:g.writeTarget}}},read:g.read,write:g.writeTarget}},useCodedValues:{type:Boolean,value:null,json:{write:!0}},where:{type:String,value:null,json:{write:!0}}},getLabelExpression:function(){var a={expression:"",type:"none"};this.labelExpressionInfo?this.labelExpressionInfo.value?(a.expression=this.labelExpressionInfo.value,a.type="conventional"):this.labelExpressionInfo.expression&&(a.expression=this.labelExpressionInfo.expression,a.type="arcade"):
  1819. null!=this.labelExpression&&(a.expression=this._sqlToTemplateString(this.labelExpression),a.type="conventional");return a},getLabelExpressionArcade:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return c.convertTemplatedStringToArcade(a.expression);case "arcade":return a.expression}return null},getOptions:function(){var a={},c=this.labelExpressionInfo;if(c){var e=c.expression;e&&!c.value&&(a.hasArcadeExpression=!0,a.compiledArcadeFunc=b.createFunction(e))}return a},
  1820. getLabelExpressionSingleField:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return(a=a.expression.match(w))&&a[1].trim()||null;case "arcade":return u(a.expression)}return null},clone:function(){return new r({labelExpression:this.labelExpression,labelExpressionInfo:p.clone(this.labelExpressionInfo),labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,symbol:this.symbol.clone(),where:this.where,useCodedValues:this.useCodedValues})},
  1821. _collectRequiredFields:function(a){this._collectLabelExpressionRequiredFields(this.getLabelExpression(),a);this._collectWhereRequiredFields(this.where,a)},_sqlToTemplateString:function(a){return a.replace(/\[/g,"{").replace(/\]/g,"}")},_templateStringToSql:function(a){return a.replace(/\{/g,"[").replace(/\}/g,"]")},_collectWhereRequiredFields:function(a,b){null!=a&&(a=a.split(" "),3===a.length&&(b[a[0]]=!0),7===a.length&&(b[a[0]]=!0,b[a[4]]=!0))},_collectLabelExpressionRequiredFields:function(a,c){"arcade"===
  1822. a.type?b.extractFieldNames(a.expression).forEach(function(a){c[a]=!0}):(a=a.expression.match(/{[^}]*}/g))&&a.forEach(function(a){c[a.slice(1,-1)]=!0})}});r.evaluateWhere=function(a,b){var c=function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=c?!0:!1}return!1};try{if(null==a)return!0;var d=a.split(" ");if(3===d.length)return c(b[d[0]],d[1],d[2]);
  1823. if(7===d.length){var e=c(b[d[0]],d[1],d[2]),g=d[3],f=c(b[d[4]],d[5],d[6]);switch(g){case "AND":return e&&f;case "OR":return e||f}}return!1}catch(B){console.log("Error.: can't parse \x3d "+a)}};r.buildLabelText=function(a,c,e,g){var d="";if(g&&g.hasArcadeExpression)g.compiledArcadeFunc&&(a=b.createExecContext(c),a=b.executeFunction(g.compiledArcadeFunc,a),null!=a&&(d=a.toString()));else var f=c&&c.attributes||{},d=a.replace(/{[^}]*}/g,function(a){return r.formatField(a.slice(1,-1),a,f,e,g)});return d};
  1824. r.formatField=function(b,c,e,g,f){var d=b.toLowerCase();for(b=0;b<g.length;b++)if(g[b].name.toLowerCase()===d){c=e[g[b].name];var h=g[b].domain;if(h&&n.isObject(h)){if("codedValue"==h.type)for(e=0;e<h.codedValues.length;e++)h.codedValues[e].code==c&&(c=h.codedValues[e].name);else"range"==h.type&&h.minValue<=c&&c<=h.maxValue&&(c=h.name);break}h=g[b].type;"date"==h?(h=a.fromJSON(f&&f.dateFormat||"shortDate"),(h="DateFormat"+a.getFormat(h))&&(c=p.substitute({myKey:c},"{myKey:"+h+"}"))):("integer"==h||
  1825. "small-integer"==h||"long"==h||"double"==h)&&f&&f.numberFormat&&f.numberFormat.digitSeparator&&f.numberFormat.places&&(c=l.format(c,{places:f.numberFormat.places}))}return null==c?"":c};var w=/^\s*\{([^}]+)\}\s*$/i;return r})},"esri/layers/support/LabelExpressionInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./labelUtils".split(" "),function(a,f,p,e,n,l,h){return function(a){function c(){var b=
  1826. null!==a&&a.apply(this,arguments)||this;b.value=null;b.expression=null;return b}p(c,a);b=c;c.prototype.readExpression=function(a,b){return b.value?h.convertTemplatedStringToArcade(b.value):a};c.prototype.writeExpression=function(a,b,c){null!=this.value&&(a=h.convertTemplatedStringToArcade(this.value));b[c]=a};c.prototype.clone=function(){return new b({value:this.value,expression:this.expression})};e([l.property({json:{read:!1,write:!1}})],c.prototype,"value",void 0);e([l.property({json:{write:{allowNull:!0}}})],
  1827. c.prototype,"expression",void 0);e([l.reader("expression",["expression","value"])],c.prototype,"readExpression",null);e([l.writer("expression")],c.prototype,"writeExpression",null);return c=b=e([l.subclass("esri.layers.support.LabelExpressionInfo")],c);var b}(l.declared(n))})},"esri/layers/support/labelUtils":function(){define(["require","exports","dojo/_base/lang"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});var e=/__begin__/ig,n=/__end__/ig,l=/^__begin__/i,h=/__end__$/i;f.convertTemplatedStringToArcade=
  1828. function(a){a?(a=p.replace(a,function(a,b){return'__begin__$feature["'+b+'"]__end__'}),a=l.test(a)?a.replace(l,""):'"'+a,a=h.test(a)?a.replace(h,""):a+'"',a=a.replace(e,'" + ').replace(n,' + "')):a='""';return a}})},"esri/layers/support/labelingInfo":function(){define(["require","exports","./LabelClass"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});var e=/\[([^\[\]]+)\]/ig;f.reader=function(a,f,h){var c=this;return a?a.map(function(a){var b=new p;b.read(a,h);if(b.labelExpression){var g=
  1829. f.fields||f.layerDefinition&&f.layerDefinition.fields||c.fields;b.labelExpression=b.labelExpression.replace(e,function(a,b){a:if(g){a=b.toLowerCase();for(var c=0;c<g.length;c++){var e=g[c].name;if(e.toLowerCase()===a){b=e;break a}}}return"["+b+"]"})}return b}):null}})},"esri/layers/support/Relationship":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),
  1830. function(a,f,p,e,n,l,h){var c=l({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"});return function(a){function b(b){b=a.call(this,b)||this;b.cardinality=null;b.id=null;b.keyField=null;b.name=null;b.relatedTableId=null;return b}p(b,a);e([h.property({json:{read:c.read,write:c.write}})],b.prototype,"cardinality",void 0);e([h.property({json:{read:!0,write:!0}})],b.prototype,"id",void 0);e([h.property({json:{read:!0,write:!0}})],
  1831. b.prototype,"keyField",void 0);e([h.property({json:{read:!0,write:!0}})],b.prototype,"name",void 0);e([h.property({json:{read:!0,write:!0}})],b.prototype,"relatedTableId",void 0);return b=e([h.subclass("esri.layers.support.Relationship")],b)}(h.declared(n))})},"esri/renderers/SimpleRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Renderer ../symbols/support/jsonUtils ../symbols/support/typeUtils".split(" "),
  1832. function(a,f,p,e,n,l,h,c,m){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.symbol=null;b.type="simple";return b}p(b,a);f=b;b.prototype.writeSymbolWebScene=function(a,b,e,g){c.writeTarget(a,b,e,g)};b.prototype.writeSymbol=function(a,b,e,g){c.writeTarget(a,b,e,g)};b.prototype.readSymbol=function(a,b,e){return c.read(a,b,e)};b.prototype.getSymbol=function(a,b){return this.symbol};b.prototype.getSymbols=function(){return this.symbol?[this.symbol]:
  1833. []};b.prototype.clone=function(){return new f({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:n.clone(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})};e([l.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);e([l.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);e([l.property({types:m.rendererTypes})],b.prototype,"symbol",void 0);e([l.writer("web-scene","symbol",{symbol:{types:m.rendererTypes3D}})],
  1834. b.prototype,"writeSymbolWebScene",null);e([l.writer("symbol")],b.prototype,"writeSymbol",null);e([l.reader("symbol")],b.prototype,"readSymbol",null);return b=f=e([l.subclass("esri.renderers.SimpleRenderer")],b);var f}(l.declared(h))})},"esri/renderers/Renderer":function(){define("../core/declare ../core/Accessor ../core/JSONSupport ../core/kebabDictionary ../core/screenUtils ../core/lang ../core/Error ../support/arcadeUtils dojo/_base/lang ../Color ./support/utils ./support/AuthoringInfo".split(" "),
  1835. function(a,f,p,e,n,l,h,c,m,b,g,t){var u=e({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),v=e({widthAndDepth:"width-and-depth"}),x=e({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});e({classedSize:"classed-size",classedColor:"classed-color",univariateColorSize:"univariate-color-size"});
  1836. e({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"});e({percentTotal:"percent-of-total"});var r=Math.PI;return a([f,p],{declaredClass:"esri.renderers.Renderer",properties:{authoringInfo:{type:t,value:null,json:{write:!0}},requiredFields:{dependsOn:["visualVariables"],get:function(){var a=Object.create(null);this.collectRequiredFields(a);return Object.keys(a)}},
  1837. type:{type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}},visualVariables:{json:{read:{source:["visualVariables","rotationType","rotationExpression"],reader:function(a,b){return this._readVariables(a,b)}},write:function(a,b,c,e){var d=[];a.forEach(function(a,b){"size"===a.type?d.push(this._writeSizeInfo(a,e,b)):"color"===a.type?d.push(this._writeColorInfo(a,e,b)):"opacity"===a.type?d.push(this._writeOpacityInfo(a,e,b)):"rotation"===a.type&&d.push(this._writeRotationInfo(a,e,b))},this);
  1838. b.visualVariables=d}}}},constructor:function(){this._cache={}},_rotationRE:/^\[([^\]]+)\]$/i,_viewScaleRE:/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i,_visualVariablesSetter:function(a){var b=this._cache;this.visualVariables&&this.visualVariables.forEach(function(a,c){b.hasOwnProperty(c)&&(b[c]=null)},this);a&&a.some(function(a){return!!a.target})&&a.sort(function(a,b){return a.target===b.target?0:a.target?1:-1});a&&a.forEach(function(a,c){"color"===a.type?b[c]=this._processColorInfo(a):"opacity"===
  1839. a.type?b[c]=this._processOpacityInfo(a):"size"===a.type?b[c]=this._processSizeInfo(a):"rotation"===a.type&&(b[c]=this._processRotationInfo(a))},this);this._set("visualVariables",a)},getSymbol:function(a,b){},getVisualVariableValues:function(a,b){var c=this.visualVariables,e;c&&(e=c.map(function(c){var d,e=c.type,g=e+"Info";b=m.mixin({},b);b[g]=c;switch(e){case "size":d=this.getSize(a,b);break;case "color":d=this.getColor(a,b);break;case "opacity":d=this.getOpacity(a,b);break;case "rotation":d=this.getRotationAngle(a,
  1840. b)}return{variable:c,value:d}},this).filter(function(a){return null!=a.value},this));return e},hasVisualVariables:function(a,b){return a?!!this.getVisualVariablesForType(a,b):!!(this.getVisualVariablesForType("size",b)||this.getVisualVariablesForType("color",b)||this.getVisualVariablesForType("opacity",b)||this.getVisualVariablesForType("rotation",b))},getVisualVariablesForType:function(a,b){var c=this.visualVariables,e;c&&(e=c.filter(function(c){return c.type===a&&("string"===typeof b?c.target===
  1841. b:!1===b?!c.target:!0)}))&&0===e.length&&(e=void 0);return e},getSize:function(a,b){var c=this._getVarInfo(b&&b.sizeInfo,"size"),e=c.variable,c=this._cache[c.cacheKey],g=null;if(e)var f=e.minSize,g=e.maxSize,f="object"===typeof f&&f?this._getSize(a,f,c&&c.minSize,b):f,g="object"===typeof g&&g?this._getSize(a,g,c&&c.maxSize,b):g,g=this._getSize(a,e,c&&c.root,b,[f,g]);return g},getSizeRangeAtScale:function(a,b){var c;a=this._getVarInfo(a,"size");var e=this._cache[a.cacheKey],g={scale:b};if((a=a.variable)&&
  1842. b){b=a.minSize;var f=a.maxSize;a="object"===typeof b&&b?this._getSize({},b,e&&e.minSize,g):b;e="object"===typeof f&&f?this._getSize({},f,e&&e.maxSize,g):f;if(null!=a||null!=e)a>e&&(c=e,e=a,a=c),c={minSize:a,maxSize:e}}return c},getColor:function(a,b){var c=this._getVarInfo(b&&b.colorInfo,"color");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b)},getOpacity:function(a,b){var c=this._getVarInfo(b&&b.opacityInfo,"opacity");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],
  1843. b,!0)},getRotationAngle:function(a,b){var d=this._getVarInfo(b&&b.rotationInfo,"rotation"),e=d.variable,g=this._cache[d.cacheKey],f=e.axis||"heading",d="heading"===f&&"arithmetic"===e.rotationType?90:0,f="heading"===f&&"arithmetic"===e.rotationType?-1:1,e=e.field,g=g&&g.compiledFunc,h=a.attributes,l=0;if(e||g)g?l=c.executeFunction(g,c.createExecContext(a,c.getViewInfo(b))):m.isFunction(e)?l=e.apply(this,arguments):h&&(l=h[e]||0),l="number"!==typeof l||isNaN(l)?null:d+f*l;return l},collectRequiredFields:function(a){var b=
  1844. [];this.visualVariables&&(b=b.concat(this.visualVariables));b.forEach(function(b){b&&(b.field&&(a[b.field]=!0),b.normalizationField&&(a[b.normalizationField]=!0),b.valueExpression&&c.extractFieldNames(b.valueExpression).forEach(function(b){a[b]=!0}))})},_getVarInfo:function(a,b){var c;a&&a.type===b&&this.visualVariables?(c=this.visualVariables.indexOf(a),a=this.visualVariables[c]):this.visualVariables&&(a=(a=this.getVisualVariablesForType(b))&&a[0],c=this.visualVariables.indexOf(a));return{variable:a,
  1845. cacheKey:c}},_readSizeInfo:function(a){a.axis&&(a.axis=v.fromJSON(a.axis));a.valueUnit&&(a.valueUnit=x.fromJSON(a.valueUnit));return a},_readColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(c,d){m.isArray(c)?a.colors[d]=b.fromJSON(c):a.colors[d]=new b(c)}),a.stops&&a.stops.forEach(function(c,d){c.color&&m.isArray(c.color)?a.stops[d].color=b.fromJSON(c.color):c.color&&(a.stops[d].color=new b(c.color))}));return a},_readOpacityInfo:function(a){var b;a&&(b=m.mixin({},a),b.transparencyValues&&
  1846. (b.opacityValues=b.transparencyValues.map(function(a){return 1-a/100}),delete b.transparencyValues),b.stops&&(b.stops=b.stops.map(function(a){a=m.mixin({},a);a.opacity=1-a.transparency/100;delete a.transparency;return a})));return b},_readVariables:function(a,b){a&&(a=a.map(function(a){a=l.clone(a);a.type=u.fromJSON(a.type);"size"===a.type?a=this._readSizeInfo(a):"color"===a.type?a=this._readColorInfo(a):"opacity"===a.type&&(a=this._readOpacityInfo(a));return a},this));var c=b.rotationType;if(b=b.rotationExpression)c=
  1847. {type:"rotation",rotationType:c},(b=b.match(this._rotationRE))&&b[1]&&(c.field=b[1],a||(a=[]),a.push(c));return a},_createCache:function(a){var b=a&&a.valueExpression,d=c.createSyntaxTree(b),d=c.createFunction(d),e=!(!a||!a.expression)||this._viewScaleRE.test(b);return{ipData:this._interpolateData(a),hasExpr:!!b,compiledFunc:d,isScaleDriven:e}},_processColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(c,d){c instanceof b||(a.colors[d]=new b(c))}),a.stops&&a.stops.forEach(function(c,d){!c.color||
  1848. c.color instanceof b||(a.stops[d].color=new b(c.color))}),this._sortStops(a.stops));return this._createCache(a)},_processOpacityInfo:function(a){this._sortStops(a&&a.stops);return this._createCache(a)},_processSizeInfo:function(a){a.stops&&Array.isArray(a.stops)?a.stops=this._processSizeInfoStops(a.stops):(a.minSize=a.minSize&&this._processSizeInfoSize(a.minSize),a.maxSize=a.maxSize&&this._processSizeInfoSize(a.maxSize));return{root:this._createCache(a),minSize:this._createCache(a.minSize),maxSize:this._createCache(a.maxSize)}},
  1849. _processSizeInfoSize:function(a){"object"===typeof a?a.stops=this._processSizeInfoStops(a.stops):a=n.toPt(a);return a},_processSizeInfoStops:function(a){a&&Array.isArray(a)&&(a.forEach(function(a){a.size=n.toPt(a.size)}),this._sortStops(a));return a},_sortStops:function(a){a&&Array.isArray(a)&&a.sort(function(a,b){return a.value-b.value})},_processRotationInfo:function(a){return this._createCache(a)},_getSize:function(a,b,d,e,f){var h=a.attributes,k=b.field,l=b.stops,n=0,p=d&&d.hasExpr,q=d&&d.compiledFunc,
  1850. t=d&&d.ipData,x=d&&d.isScaleDriven,w="number"===typeof a,v=w?a:null;if(k||x||p){var u=e&&e.scale,y=f?f[0]:b.minSize,I=f?f[1]:b.maxSize,U=b.minDataValue,O=b.maxDataValue,N=b.valueUnit||"unknown",J=b.valueRepresentation,n=b.scaleBy,L=b.normalizationField,S=h?parseFloat(h[L]):void 0,T=e&&e.shape;x?v=null==u?this._getAverageValue(b):u:"number"!==typeof v&&(p?v=c.executeFunction(q,c.createExecContext(a,c.getViewInfo(e))):m.isFunction(k)?v=k.apply(this,arguments):h&&(v=h[k]));if(null==v||L&&!w&&(isNaN(S)||
  1851. 0===S))return null;isNaN(S)||w||(v/=S);if(l)I=this._lookupData(v,t),v=I[0],y=I[1],v===y?n=l[v].size:(v=l[v].size,l=l[y].size,n=v+(l-v)*I[2]);else if(null!=y&&null!=I&&null!=U&&null!=O)v<=U?n=y:v>=O?n=I:(l=(v-U)/(O-U),"area"===n&&T?(y=(v="circle"===T)?r*Math.pow(y/2,2):y*y,l=y+l*((v?r*Math.pow(I/2,2):I*I)-y),n=v?2*Math.sqrt(l/r):Math.sqrt(l)):n=y+l*(I-y));else if("unknown"===N)null!=y&&null!=U?(y&&U?(l=v/U,n="circle"===T?2*Math.sqrt(l*Math.pow(y/2,2)):"square"===T||"diamond"===T||"image"===T?Math.sqrt(l*
  1852. Math.pow(y,2)):l*y):n=v+(y||U),n=n<y?y:n,null!=I&&n>I&&(n=I)):n=v;else{l=(e&&e.resolution?e.resolution:1)*g.meterIn[N];if("area"===J)n=Math.sqrt(v/r)/l,n*=2;else if(n=v/l,"radius"===J||"distance"===J)n*=2;null!=y&&n<y&&(n=y);null!=I&&n>I&&(n=I)}}else b&&(n=l&&l[0]&&l[0].size,null==n&&(n=b.minSize));return n=isNaN(n)?0:n},_getAverageValue:function(a){var b=a.stops,c;b?(c=b[0].value,a=b[b.length-1].value):(c=a.minDataValue||0,a=a.maxDataValue||0);return(c+a)/2},_getColorComponent:function(a,b,d,e,g,
  1853. f){var h=a.attributes,k=b&&b.field,l="number"===typeof a,n=l?a:null,p=d&&d.hasExpr,q=d&&d.compiledFunc,r=d&&d.ipData,t;if(k||p){var x=b.normalizationField,w=h?parseFloat(h[x]):void 0;"number"!==typeof n&&(p?n=c.executeFunction(q,c.createExecContext(a,c.getViewInfo(e))):m.isFunction(k)?n=k.apply(this,arguments):h&&(n=h[k]));null==n||x&&!l&&(isNaN(w)||0===w)||(isNaN(w)||l||(n/=w),t=g?this._getOpacity(n,b,r):this._getColor(n,b,r))}else b&&(h=b.stops,g?(t=h&&h[0]&&h[0].opacity,null==t&&(t=b.opacityValues&&
  1854. b.opacityValues[0])):t=h&&h[0]&&h[0].color||b.colors&&b.colors[0]);f&&(f.data=n,f.value=t);return f||t},_interpolateData:function(a){var b;if(a)if(a.colors||a.opacityValues){var c=(a.colors||a.opacityValues).length,e=a.minDataValue,g=(a.maxDataValue-e)/(c-1);b=[];for(a=0;a<c;a++)b[a]=e+a*g}else a.stops&&(b=a.stops.map(function(a){return a.value||0}));return b},_getOpacity:function(a,b,c){a=this._lookupData(a,c);var d;b=b||this.opacityInfo;a&&(c=a[0],d=a[1],c===d?d=this._getOpacValue(b,c):(c=this._getOpacValue(b,
  1855. c),b=this._getOpacValue(b,d),d=c+(b-c)*a[2]));return d},_getOpacValue:function(a,b){return a.opacityValues?a.opacityValues[b]:a.stops[b].opacity},_getColor:function(a,c,d){a=this._lookupData(a,d);var e;c=c||this.colorInfo;a&&(e=a[0],d=a[1],e=e===d?this._getColorObj(c,e):b.blendColors(this._getColorObj(c,e),this._getColorObj(c,d),a[2]),e=new b(e));return e},_getColorObj:function(a,b){return a.colors?a.colors[b]:a.stops[b].color},_lookupData:function(a,b){var c;if(b){var e=0,g=b.length-1;b.some(function(b,
  1856. c){if(a<b)return g=c,!0;e=c;return!1});c=[e,g,(a-b[e])/(b[g]-b[e])]}return c},_processForContext:function(a,b,c){if(b&&"web-scene"===b.origin){var d=null!=a.expression,e=null!=a.valueExpressionTitle&&"rotation"===a.type;b.messages&&(d&&b.messages.push(new h("property:unsupported",a.type+"VisualVariable.expression is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".expression",context:b})),e&&b.messages.push(new h("property:unsupported",
  1857. a.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".valueExpressionTitle",context:b})));d&&delete a.expression;e&&delete a.valueExpressionTitle}else"size"===a.type&&this._convertExpressionToArcade(a)},_writeRotationInfo:function(a,b,c){a&&(a=m.mixin({},a),this._processForContext(a,b,"visualVariables["+c+"]"),a.type=u.toJSON(a.type),a=l.fixJson(a,!0));return a},_convertExpressionToArcade:function(a){a&&
  1858. a.expression&&(a.valueExpression="$view.scale")},_writeSizeInfo:function(a,b,c){if(a){a=m.mixin({},a);this._processForContext(a,b,"string"===typeof c?c:"visualVariables["+c+"]");var d=a.minSize,e=a.maxSize;d&&(a.minSize="number"===typeof d?d:this._writeSizeInfo(d,b,"visualVariables["+c+"].minSize"));e&&(a.maxSize="number"===typeof e?e:this._writeSizeInfo(e,b,"visualVariables["+c+"].maxSize"));b=a.legendOptions;c=a.axis;a.type=u.toJSON(a.type);c&&(a.axis=v.toJSON(c));b&&(a.legendOptions=m.mixin({},
  1859. b),b=b.customValues)&&(a.legendOptions.customValues=b.slice(0));a.stops&&(a.stops=a.stops.map(function(a){a=m.mixin({},a);null===a.label&&delete a.label;return a}));a=l.fixJson(a,!0)}return a},_writeColorInfo:function(a,c,d){a&&(a=m.mixin({},a),this._processForContext(a,c,"visualVariables["+d+"]"),a.type=u.toJSON(a.type),a.colors&&(a.colors=a.colors.map(function(a){return b.toJSON(a)})),a.stops&&(a.stops=a.stops.map(function(a){a=m.mixin({},a);a.color&&(a.color=b.toJSON(a.color));null==a.value&&(a.value=
  1860. 0);null===a.label&&delete a.label;return a})),a.legendOptions&&(a.legendOptions=m.mixin({},a.legendOptions)),a=l.fixJson(a,!0));return a},_writeOpacityInfo:function(a,b,c){var d;a&&(d=m.mixin({},a),this._processForContext(d,b,"visualVariables["+c+"]"),d.type=u.toJSON(d.type),d.opacityValues&&(d.transparencyValues=d.opacityValues.map(function(a){return Math.max(0,Math.min(Math.round(100*(1-a)),100))}),delete d.opacityValues),d.stops&&(d.stops=d.stops.map(function(a){a=m.mixin({},a);a.transparency=
  1861. Math.max(0,Math.min(Math.round(100*(1-a.opacity)),100));delete a.opacity;null===a.label&&delete a.label;return a})),d.legendOptions&&(d.legendOptions=m.mixin({},d.legendOptions)),d=l.fixJson(d,!0));return d}})})},"esri/renderers/support/utils":function(){define("dojo/_base/lang dojo/_base/array dojo/date/locale ../../Color ../../core/numberUtils dojo/i18n!dojo/cldr/nls/gregorian".split(" "),function(a,f,p,e,n,l){function h(a){return a&&f.map(a,function(a){return new e(a)})}function c(a,c,e){var g=
  1862. "";0===c?g=b.lt+" ":c===e&&(g=b.gt+" ");return g+a}var m={},b={lte:"\x3c\x3d",gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%",ld:"\u2013"},g={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},t={millisecond:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},second:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},minute:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},hour:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},
  1863. day:{selector:"date",dateOptions:{formatLength:"long"}},month:{selector:"date",dateOptions:{formatLength:"long"}},year:{selector:"date",dateOptions:{selector:"year"}}},u={formatLength:"short",fullYear:!0},v={formatLength:"short"};a.mixin(m,{meterIn:{inches:1/.0254,feet:1/.3048,"us-feet":3.28084,yards:1/.9144,miles:1/1609.344,"nautical-miles":1/1852,millimeters:1E3,centimeters:100,decimeters:10,meters:1,kilometers:.001,"decimal-degrees":180/20015077},timelineDateFormatOptions:{selector:"date",dateOptions:{formatLength:"short",
  1864. fullYear:!0}},formatDate:function(b,c){var e=[];null==b||b instanceof Date||(b=new Date(b));c=c||{};c=a.mixin({},c);var g=c.selector?c.selector.toLowerCase():null,d=!g||-1<g.indexOf("time"),g=!g||-1<g.indexOf("date");d&&(c.timeOptions=c.timeOptions||v,c.timeOptions&&(c.timeOptions=a.mixin({},c.timeOptions),c.timeOptions.selector=c.timeOptions.selector||"time",e.push(c.timeOptions)));g&&(c.dateOptions=c.dateOptions||u,c.dateOptions&&(c.dateOptions=a.mixin({},c.dateOptions),c.dateOptions.selector=c.dateOptions.selector||
  1865. "date",e.push(c.dateOptions)));e&&e.length?(e=f.map(e,function(a){return p.format(b,a)}),c=1==e.length?e[0]:l["dateTimeFormat-medium"].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(a,b){return e[b]})):c=p.format(b);return c},createColorStops:function(a){var b=a.values,e=a.colors,g=a.labelIndexes,d=a.isDate,h=a.dateFormatOptions;a=[];return a=f.map(b,function(a,k){var l=null;if(!g||-1<f.indexOf(g,k)){var p;(p=d?m.formatDate(a,h):n.format(a))&&(l=c(p,k,b.length-1))}return{value:a,color:e[k],label:l}})},
  1866. updateColorStops:function(a){var b=a.stops,e=a.changes,g=a.isDate,d=a.dateFormatOptions,h=[],l,p=f.map(b,function(a){return a.value});f.forEach(e,function(a){h.push(a.index);p[a.index]=a.value});l=n.round(p,{indexes:h});f.forEach(b,function(a,e){a.value=p[e];if(null!=a.label){var f,h=null;(f=g?m.formatDate(l[e],d):n.format(l[e]))&&(h=c(f,e,b.length-1));a.label=h}})},createClassBreakLabel:function(a){var c=a.minValue,e=a.maxValue,g=a.isFirstBreak?"":b.gt+" ";a="percent-of-total"===a.normalizationType?
  1867. b.pct:"";c=null==c?"":n.format(c);e=null==e?"":n.format(e);return g+c+a+" "+b.ld+" "+e+a},setLabelsForClassBreaks:function(a){var b=a.classBreakInfos,c=a.classificationMethod,e=a.normalizationType,d=[];b&&b.length&&("standard-deviation"===c?console.log("setLabelsForClassBreaks: cannot set labels for class breaks generated using 'standard-deviation' method."):a.round?(d.push(b[0].minValue),f.forEach(b,function(a){d.push(a.maxValue)}),d=n.round(d),f.forEach(b,function(a,b){a.label=m.createClassBreakLabel({minValue:0===
  1868. b?d[0]:d[b],maxValue:d[b+1],isFirstBreak:0===b,normalizationType:e})})):f.forEach(b,function(a,b){a.label=m.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===b,normalizationType:e})}))},updateClassBreak:function(a){var b=a.classBreaks,c=a.normalizationType,e=a.change,d=e.index,e=e.value,g=-1,f=-1,h=b.length;"standard-deviation"===a.classificationMethod?console.log("updateClassBreak: cannot update labels for class breaks generated using 'standard-deviation' method."):
  1869. (0===d?g=d:d===h?f=d-1:(f=d-1,g=d),-1<g&&g<h&&(a=b[g],a.minValue=e,a.label=m.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===g,normalizationType:c})),-1<f&&f<h&&(a=b[f],a.maxValue=e,a.label=m.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===f,normalizationType:c})))},calculateDateFormatInterval:function(a){var b,c,e=a.length,d,h,l,m,n,p,t=Infinity,x;a=f.map(a,function(a){return new Date(a)});for(b=0;b<e-1;b++){d=a[b];l=[];n=Infinity;p=
  1870. "";for(c=b+1;c<e;c++)h=a[c],h=d.getFullYear()!==h.getFullYear()&&"year"||d.getMonth()!==h.getMonth()&&"month"||d.getDate()!==h.getDate()&&"day"||d.getHours()!==h.getHours()&&"hour"||d.getMinutes()!==h.getMinutes()&&"minute"||d.getSeconds()!==h.getSeconds()&&"second"||"millisecond",m=g[h],m<n&&(n=m,p=h),l.push(h);n<t&&(t=n,x=p)}return x},createUniqueValueLabel:function(a){var b=a.value,c=a.fieldInfo,e=a.domain;a=a.dateFormatInterval;var d=String(b);(e=e&&e.codedValues?e.getName(b):null)?d=e:"number"===
  1871. typeof b&&(d=c&&"date"===c.type?m.formatDate(b,a&&t[a]):n.format(b));return d},cloneColorVariable:function(b){var c;b&&(c=a.mixin({},b),c.colors=h(c.colors),c.stops=c.stops&&f.map(c.stops,function(b){b=a.mixin({},b);b.color&&(b.color=new e(b.color));return b}),c.legendOptions&&(c.legendOptions=a.mixin({},c.legendOptions)));return c},cloneOpacityVariable:function(b){var c;if(b){c=a.mixin({},b);if(b=c.opacityValues)c.opacityValues=b.slice(0);if(b=c.stops)c.stops=f.map(b,function(b){return a.mixin({},
  1872. b)});if(b=c.legendOptions)c.legendOptions=a.mixin({},b)}return c},cloneSizeVariable:function(b){var c;b&&(c=a.mixin({},b),c.stops&&(c.stops=f.map(c.stops,function(b){return a.mixin({},b)})),(b=c.minSize)&&"object"===typeof b&&(c.minSize=m.cloneSizeVariable(b)),(b=c.maxSize)&&"object"===typeof b&&(c.maxSize=m.cloneSizeVariable(b)),b=c.legendOptions)&&(c.legendOptions=a.mixin({},b),b=b.customValues)&&(c.legendOptions.customValues=b.slice(0));return c}});return m})},"esri/core/numberUtils":function(){define(["dojo/number",
  1873. "dojo/i18n!dojo/cldr/nls/number"],function(a,f){function p(a,e){return a-e}var e=/^-?(\d+)(\.(\d+))?$/i,n=new RegExp("\\"+f.decimal+"0+$","g"),l=/(\d)0*$/g,h={numDigits:function(a){var c=String(a),b=c.match(e);a={integer:0,fractional:0};b&&b[1]?(a.integer=b[1].split("").length,a.fractional=b[3]?b[3].split("").length:0):-1<c.toLowerCase().indexOf("e")&&(b=c.split("e"),c=b[0],b=b[1],c&&b&&(c=Number(c),b=Number(b),(a=0<b)||(b=Math.abs(b)),c=h.numDigits(c),a?(c.integer+=b,c.fractional=b>c.fractional?
  1874. 0:c.fractional-b):(c.fractional+=b,c.integer=b>c.integer?1:c.integer-b),a=c));return a},percentChange:function(a,e,b,g){var c={previous:null,next:null},f;null!=b&&(f=a-b,c.previous=Math.floor(Math.abs(100*(e-b-f)/f)));null!=g&&(f=g-a,c.next=Math.floor(Math.abs(100*(g-e-f)/f)));return c},round:function(a,e){a=a.slice(0);var b,c,f,l,m,n,r,w,q=e&&null!=e.tolerance?e.tolerance:2,d=e&&e.indexes,k=e&&null!=e.strictBounds?e.strictBounds:!1;if(d)d.sort(p);else for(d=[],m=0;m<a.length;m++)d.push(m);for(m=
  1875. 0;m<d.length;m++)if(w=d[m],e=a[w],b=0===w?null:a[w-1],c=w===a.length-1?null:a[w+1],f=h.numDigits(e),f=f.fractional){n=0;for(r=!1;n<=f&&!r;){l=e;r=n;var y=void 0,z=void 0,y=Number(l.toFixed(r));y<l?z=y+1/Math.pow(10,r):(z=y,y-=1/Math.pow(10,r));y=Number(y.toFixed(r));z=Number(z.toFixed(r));l=[y,z];l=k&&0===m?l[1]:l[0];r=q;var y=h.percentChange(e,l,b,c),A=z=void 0,z=void 0,z=null==y.previous||y.previous<=r,A=null==y.next||y.next<=r;r=z=z&&A||y.previous+y.next<=2*r;n++}r&&(a[w]=l)}return a},format:function(c,
  1876. e){e=e||{places:20,round:-1};(c=a.format(c,e))&&(c=c.replace(l,"$1").replace(n,""));return c}};return h})},"esri/renderers/support/AuthoringInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ./AuthoringInfoVisualVariable".split(" "),function(a,f,p,e,n,l,h,c){var m=l({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",
  1877. esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),b=l({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size"});return function(a){function g(b){b=a.call(this)||this;b.lengthUnit=null;b.visualVariables=null;return b}p(g,a);f=g;Object.defineProperty(g.prototype,"classificationMethod",{get:function(){if("class-breaks-size"===this.type||"class-breaks-color"===this.type){var a=this._get("classificationMethod");return a?
  1878. a:"manual"}return null},set:function(a){this._set("classificationMethod",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"fields",{get:function(){return"predominance"===this.type?this._get("fields"):null},set:function(a){this._set("fields",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"standardDeviationInterval",{get:function(){return"standard-deviation"===this.classificationMethod?this._get("standardDeviationInterval"):null},set:function(a){this._set("standardDeviationInterval",
  1879. a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"type",{get:function(){return this._get("type")},set:function(a){var b=a;"classed-size"===a?b="class-breaks-size":"classed-color"===a&&(b="class-breaks-color");this._set("type",b)},enumerable:!0,configurable:!0});g.prototype.clone=function(){return new f({classificationMethod:this.classificationMethod,fields:this.fields&&this.fields.slice(0),lengthUnit:this.lengthUnit,standardDeviationInterval:this.standardDeviationInterval,type:this.type,
  1880. visualVariables:this.visualVariables&&this.visualVariables.map(function(a){return a.clone()})})};e([h.property({type:String,value:null,dependsOn:["type"],json:{read:m.read,write:m.write}})],g.prototype,"classificationMethod",null);e([h.property({type:[String],value:null,dependsOn:["type"],json:{write:!0}})],g.prototype,"fields",null);e([h.property({type:String,json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],g.prototype,"lengthUnit",void 0);e([h.property({type:Number,value:null,
  1881. dependsOn:["classificationMethod"],json:{write:!0}})],g.prototype,"standardDeviationInterval",null);e([h.property({type:String,value:null,json:{read:b.read,write:b.write}})],g.prototype,"type",null);e([h.property({type:[c],json:{write:!0}})],g.prototype,"visualVariables",void 0);return g=f=e([h.subclass("esri.renderers.support.AuthoringInfo")],g);var f}(h.declared(n))})},"esri/renderers/support/AuthoringInfoVisualVariable":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../core/accessorSupport/decorators/cast".split(" "),
  1882. function(a,f,p,e,n,l,h,c){var m=l({percentTotal:"percent-of-total"}),b=l({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity"}),g={key:function(a){return"number"===typeof a?"number":"string"},typeMap:{number:Number,string:String},base:null};return function(a){function f(b){b=a.call(this)||this;b.endTime=null;b.field=null;b.maxSliderValue=null;b.minSliderValue=null;b.startTime=null;b.type=null;b.units=null;return b}p(f,a);l=f;f.prototype.castEndTime=function(a){return"string"===typeof a||
  1883. "number"===typeof a?a:null};f.prototype.castStartTime=function(a){return"string"===typeof a||"number"===typeof a?a:null};Object.defineProperty(f.prototype,"style",{get:function(){return"color"===this.type?this._get("style"):null},set:function(a){this._set("style",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"theme",{get:function(){return"color"===this.type?this._get("theme")||"high-to-low":null},set:function(a){this._set("theme",a)},enumerable:!0,configurable:!0});f.prototype.clone=
  1884. function(){return new l({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})};e([h.property({types:g,json:{write:!0}})],f.prototype,"endTime",void 0);e([c.cast("endTime")],f.prototype,"castEndTime",null);e([h.property({type:String,json:{write:!0}})],f.prototype,"field",void 0);e([h.property({type:Number,json:{write:!0}})],f.prototype,"maxSliderValue",
  1885. void 0);e([h.property({type:Number,json:{write:!0}})],f.prototype,"minSliderValue",void 0);e([h.property({types:g,json:{write:!0}})],f.prototype,"startTime",void 0);e([c.cast("startTime")],f.prototype,"castStartTime",null);e([h.property({type:String,value:null,dependsOn:["type"],json:{read:m.read,write:m.write}})],f.prototype,"style",null);e([h.property({type:String,value:null,dependsOn:["type"],json:{write:!0}})],f.prototype,"theme",null);e([h.property({type:String,json:{read:b.read,write:b.write}})],
  1886. f.prototype,"type",void 0);e([h.property({type:String,json:{write:!0}})],f.prototype,"units",void 0);return f=l=e([h.subclass("esri.renderers.support.AuthoringInfoVisualVariable")],f);var l}(h.declared(n))})},"esri/renderers/UniqueValueRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/arrayUtils ../core/Error ../core/lang ../core/Logger ../core/urlUtils ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ../portal/Portal ./Renderer ./support/diffUtils ./support/LegendOptions ./support/UniqueValueInfo ../support/arcadeUtils ../symbols/PolygonSymbol3D ../symbols/Symbol ../symbols/WebStyleSymbol ../symbols/support/jsonUtils ../symbols/support/styleUtils ../symbols/support/typeUtils".split(" "),
  1887. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k,y,z,A,C){var B=m.getLogger("esri.renderers.UniqueValueRenderer"),D=t.ensureType(w.default);return function(a){function f(b){b=a.call(this)||this;b._valueInfoMap={};b._isDefaultSymbolDerived=!1;b.type="unique-value";b.backgroundFillSymbol=null;b.field=null;b.field2=null;b.field3=null;b.valueExpression=null;b.valueExpressionTitle=null;b.legendOptions=null;b.defaultLabel=null;b.fieldDelimiter=null;b.portal=null;b.styleOrigin=null;b.diff={uniqueValueInfos:function(a,
  1888. b){if(a||b){if(!a||!b)return{type:"complete",oldValue:a,newValue:b};for(var c=!1,d={type:"collection",added:[],removed:[],changed:[],unchanged:[]},e=function(e){var g=l.find(a,function(a){return a.value===b[e].value});g?x.diff(g,b[e])?d.changed.push({type:"complete",oldValue:g,newValue:b[e]}):d.unchanged.push({oldValue:g,newValue:b[e]}):d.added.push(b[e]);c=!0},g=0;g<b.length;g++)e(g);e=function(e){l.find(b,function(b){return b.value===a[e].value})||(d.removed.push(a[e]),c=!0)};for(g=0;g<a.length;g++)e(g);
  1889. return c?d:void 0}}};b._set("uniqueValueInfos",[]);return b}p(f,a);m=f;f.prototype.writeType=function(a,b,c,d){b.type="uniqueValue"};f.prototype.writeBackgroundFillSymbolWebScene=function(a,b,c,d){z.writeTarget(a,b,c,d)};f.prototype.castField=function(a){return null==a?a:"function"===typeof a?a:t.ensureString(a)};f.prototype.writeField=function(a,b,c,d){"string"===typeof a?b[c]=a:d&&d.messages?d.messages.push(new h("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):
  1890. B.error(".field: cannot write field to JSON since it's not a string value")};Object.defineProperty(f.prototype,"compiledFunc",{get:function(){return q.createFunction(this.valueExpression)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"defaultSymbol",{set:function(a){this._isDefaultSymbolDerived=!1;this._set("defaultSymbol",a)},enumerable:!0,configurable:!0});f.prototype.readDefaultSymbol=function(a,b,c){return z.read(a,b,c)};f.prototype.writeDefaultSymbolWebScene=function(a,b,
  1891. c,d){this._isDefaultSymbolDerived||z.writeTarget(a,b,c,d)};f.prototype.writeDefaultSymbol=function(a,b,c,d){this._isDefaultSymbolDerived||z.writeTarget(a,b,c,d)};f.prototype.readPortal=function(a,b,c){return c.portal||u.getDefault()};f.prototype.readStyleOrigin=function(a,c,d){if(c.styleName)return Object.freeze({styleName:c.styleName});if(c.styleUrl)return a=b.read(c.styleUrl,d),Object.freeze({styleUrl:a})};f.prototype.writeStyleOrigin=function(a,c,d,e){a.styleName?c.styleName=a.styleName:a.styleUrl&&
  1892. (c.styleUrl=b.write(a.styleUrl,e),b.isAbsolute(c.styleUrl)&&(c.styleUrl=b.normalize(c.styleUrl)))};Object.defineProperty(f.prototype,"uniqueValueInfos",{set:function(a){this.styleOrigin?B.error("#uniqueValueInfos\x3d","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",a),this._updateValueInfoMap())},enumerable:!0,configurable:!0});f.prototype.addUniqueValueInfo=function(a,b){this.styleOrigin?B.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):
  1893. (a="object"===typeof a?D(a):new w.default({value:a,symbol:b}),this.uniqueValueInfos.push(a),this._valueInfoMap[a.value]=a)};f.prototype.removeUniqueValueInfo=function(a){if(this.styleOrigin)B.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");else for(var b=0;b<this.uniqueValueInfos.length;b++)if(this.uniqueValueInfos[b].value===a+""){delete this._valueInfoMap[a];this.uniqueValueInfos.splice(b,1);break}};f.prototype.getUniqueValueInfo=
  1894. function(a,b){var c=this.field,d=a.attributes,e;this.valueExpression?e=q.executeFunction(this.compiledFunc,q.createExecContext(a,q.getViewInfo(b))):"function"!==typeof c&&this.field2?(a=this.field2,b=this.field3,e=[],c&&e.push(d[c]),a&&e.push(d[a]),b&&e.push(d[b]),e=e.join(this.fieldDelimiter||"")):"function"===typeof c?e=c(a):c&&(e=d[c]);return this._valueInfoMap[e+""]};f.prototype.getSymbol=function(a,b){return(a=this.getUniqueValueInfo(a,b))&&a.symbol||this.defaultSymbol};f.prototype.getSymbols=
  1895. function(){for(var a=[],b=0,c=this.uniqueValueInfos;b<c.length;b++){var d=c[b];d.symbol&&a.push(d.symbol)}this.defaultSymbol&&a.push(this.defaultSymbol);return a};f.prototype.clone=function(){var a=new m({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:c.clone(this.defaultSymbol),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:c.clone(this.visualVariables),legendOptions:c.clone(this.legendOptions),
  1896. authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:c.clone(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(a._isDefaultSymbolDerived=!0);a._set("portal",this.portal);var b=c.clone(this.uniqueValueInfos);this.styleOrigin&&(a._set("styleOrigin",Object.freeze(c.clone(this.styleOrigin))),Object.freeze(b));a._set("uniqueValueInfos",b);a._updateValueInfoMap();return a};f.prototype.collectRequiredFields=function(a){this.inherited(arguments);[this.field,this.field2,
  1897. this.field3].forEach(function(b){b&&"string"===typeof b&&(a[b]=!0)});this.valueExpression&&q.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})};f.prototype.populateFromStyle=function(){var a=this;return A.fetchStyle(this.styleOrigin,{portal:this.portal}).then(function(b){var c=[];a._valueInfoMap={};b&&b.data&&Array.isArray(b.data.items)&&b.data.items.forEach(function(d){var e=new y({styleUrl:b.styleUrl,styleName:b.styleName,portal:a.portal,name:d.name});a.defaultSymbol||d.name!==
  1898. b.data.defaultItem||(a.defaultSymbol=e,a._isDefaultSymbolDerived=!0);e=new w.default({value:d.name,symbol:e});c.push(e);a._valueInfoMap[d.name]=e});a._set("uniqueValueInfos",Object.freeze(c));!a.defaultSymbol&&a.uniqueValueInfos.length&&(a.defaultSymbol=a.uniqueValueInfos[0].symbol,a._isDefaultSymbolDerived=!0);return a})};f.prototype._updateValueInfoMap=function(){var a=this;this._valueInfoMap={};this.uniqueValueInfos.forEach(function(b){return a._valueInfoMap[b.value+""]=b})};f.fromPortalStyle=
  1899. function(a,b){var c=new m(b&&b.properties);c._set("styleOrigin",Object.freeze({styleName:a}));c._set("portal",b&&b.portal||u.getDefault());b=c.populateFromStyle();b.catch(function(b){B.error("#fromPortalStyle('"+a+"'[, ...])","Failed to create unique value renderer from style name",b)});return b};f.fromStyleUrl=function(a,b){b=new m(b&&b.properties);b._set("styleOrigin",Object.freeze({styleUrl:a}));b=b.populateFromStyle();b.catch(function(b){B.error("#fromStyleUrl('"+a+"'[, ...])","Failed to create unique value renderer from style URL",
  1900. b)});return b};e([g.property()],f.prototype,"type",void 0);e([g.writer("type")],f.prototype,"writeType",null);e([g.property({types:{base:k,key:"type",typeMap:{"simple-fill":C.rendererTypes.typeMap["simple-fill"],"picture-fill":C.rendererTypes.typeMap["picture-fill"],"polygon-3d":C.rendererTypes.typeMap["polygon-3d"]}},json:{read:z.read,write:z.writeTarget}})],f.prototype,"backgroundFillSymbol",void 0);e([g.writer("web-scene","backgroundFillSymbol",{backgroundFillSymbol:{type:d}})],f.prototype,"writeBackgroundFillSymbolWebScene",
  1901. null);e([g.property({json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],f.prototype,"field",void 0);e([g.cast("field")],f.prototype,"castField",null);e([g.writer("field")],f.prototype,"writeField",null);e([g.property({type:String,json:{write:!0}})],f.prototype,"field2",void 0);e([g.property({type:String,json:{write:!0}})],f.prototype,"field3",void 0);e([g.property({type:String,json:{write:!0}})],f.prototype,"valueExpression",void 0);e([g.property({type:String,json:{write:!0}})],
  1902. f.prototype,"valueExpressionTitle",void 0);e([g.property({dependsOn:["valueExpression"]})],f.prototype,"compiledFunc",null);e([g.property({type:r.default,json:{write:!0}})],f.prototype,"legendOptions",void 0);e([g.property({type:String,json:{write:!0}})],f.prototype,"defaultLabel",void 0);e([g.property({types:C.rendererTypes})],f.prototype,"defaultSymbol",null);e([g.reader("defaultSymbol")],f.prototype,"readDefaultSymbol",null);e([g.writer("web-scene","defaultSymbol",{defaultSymbol:{types:C.rendererTypes3D}})],
  1903. f.prototype,"writeDefaultSymbolWebScene",null);e([g.writer("defaultSymbol")],f.prototype,"writeDefaultSymbol",null);e([g.property({type:String,json:{write:!0}})],f.prototype,"fieldDelimiter",void 0);e([g.property({type:u,readOnly:!0})],f.prototype,"portal",void 0);e([g.reader("portal",["styleName"])],f.prototype,"readPortal",null);e([g.property({readOnly:!0})],f.prototype,"styleOrigin",void 0);e([g.reader("styleOrigin",["styleName","styleUrl"])],f.prototype,"readStyleOrigin",null);e([g.writer("styleOrigin",
  1904. {styleName:{type:String},styleUrl:{type:String}})],f.prototype,"writeStyleOrigin",null);e([g.property({type:[w.default],json:{write:{overridePolicy:function(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],f.prototype,"uniqueValueInfos",null);e([g.property({dependsOn:["field","field2","field3","valueExpression"],readOnly:!0})],f.prototype,"requiredFields",void 0);e([n(1,g.cast(C.ensureType))],f.prototype,"addUniqueValueInfo",null);return f=m=e([g.subclass("esri.renderers.UniqueValueRenderer")],
  1905. f);var m}(g.declared(v))})},"esri/core/arrayUtils":function(){define([],function(){function a(a,f){return-1===a.indexOf(f)}function f(a,f,l){return!a.some(f.bind(null,l))}var p={findIndex:function(a,f,l){for(var e=a.length,c,m=0;m<e;m++)if(c=a[m],f.call(l,c,m,a))return m;return-1},find:function(a,f,l){for(var e=a.length,c,m=0;m<e;m++)if(c=a[m],f.call(l,c,m,a))return c},equals:function(a,f,l){if(!a&&!f)return!0;if(!a||!f||a.length!=f.length)return!1;if(l)for(var e=0;e<a.length;e++){if(!l(a[e],f[e]))return!1}else for(l=
  1906. 0;l<a.length;l++)if(a[l]!==f[l])return!1;return!0},difference:function(e,n,l){var h;l?(h=n.filter(f.bind(null,e,l)),e=e.filter(f.bind(null,n,l))):(h=n.filter(a.bind(null,e)),e=e.filter(a.bind(null,n)));return{added:h,removed:e}},intersect:function(a,f,l){return a&&f?l?a.filter(function(a){return-1<p.findIndex(f,function(c){return l(a,c)})}):a.filter(function(a){return-1<f.indexOf(a)}):[]},range:function(a,f){null==f&&(f=a,a=0);for(var e=Array(f-a),h=a;h<f;h++)e[h-a]=h;return e},constant:function(a,
  1907. f){for(var e=Array(a),h=0;h<a;h++)e[h]=f;return e},binaryIndexOf:function(a,f,l){for(var e=a.length,c=0,m=e-1;c<m;){var b=c+Math.floor((m-c)/2);f>a[b]?c=b+1:m=b}m=a[c];return l?f>=a[e-1]?-1:m===f?c:c-1:m===f?c:-1}};return p})},"esri/renderers/support/diffUtils":function(){define("require exports dojo/_base/lang ../../core/Accessor ../../core/Collection ../../core/accessorSupport/utils".split(" "),function(a,f,p,e,n,l){function h(a){return a instanceof n?Object.keys(a.items):a instanceof e?l.getProperties(a).keys():
  1908. a?Object.keys(a):[]}function c(a,b){return a instanceof n?a.items[b]:a[b]}function m(a,b){return Array.isArray(a)&&Array.isArray(b)?a.length!==b.length:!1}function b(a){return a?a.declaredClass:null}function g(a,f){var l=a.diff;if(l&&p.isFunction(l))return l(a,f);var n=h(a),v=h(f);if(0!==n.length||0!==v.length){if(!n.length||!v.length||m(a,f))return{type:"complete",oldValue:a,newValue:f};var q=v.filter(function(a){return-1===n.indexOf(a)}),d=n.filter(function(a){return-1===v.indexOf(a)}),q=n.filter(function(b){return-1<
  1909. v.indexOf(b)&&c(a,b)!==c(f,b)}).concat(q,d).sort();if((d=b(a))&&-1<t.indexOf(d)&&q.length)return{type:"complete",oldValue:a,newValue:f};var k,d=a instanceof e&&f instanceof e,u;for(u in q){var z=q[u],A=c(a,z),C=c(f,z),B=void 0;!d&&(p.isFunction(A)||p.isFunction(C))||A===C||null==A&&null==C||!(B=l&&l[z]&&p.isFunction(l[z])?l[z](A,C):"object"===typeof A&&"object"===typeof C&&b(A)===b(C)?g(A,C):{type:"complete",oldValue:A,newValue:C})||(k=k||{type:"partial",diff:{}},k.diff[z]=B)}return k}}Object.defineProperty(f,
  1910. "__esModule",{value:!0});var t=["esri.Color","esri.portal.Portal"];f.diff=function(a,c){if(!p.isFunction(a)&&!p.isFunction(c)&&(a||c))return!a||!c||"object"===typeof a&&"object"===typeof a&&b(a)!==b(c)?{type:"complete",oldValue:a,newValue:c}:g(a,c)}})},"esri/renderers/support/LegendOptions":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,
  1911. "__esModule",{value:!0});a=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.title=null;return b}p(c,a);f=c;c.prototype.clone=function(){return new f({title:this.title})};e([l.property({type:String,json:{write:!0}})],c.prototype,"title",void 0);return c=f=e([l.subclass("esri.renderers.support.LegendOptions")],c);var f}(l.declared(n));f.LegendOptions=a;f.default=a})},"esri/renderers/support/UniqueValueInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
  1912. function(a,f,p,e,n,l,h,c){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.symbol=null;b.value=null;return b}p(b,a);g=b;b.prototype.clone=function(){return new g({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})};e([l.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);e([l.property({type:String,json:{write:!0}})],
  1913. b.prototype,"label",void 0);e([l.property({types:c.rendererTypes,json:{origins:{"web-scene":{read:h.read,write:{target:{symbol:{types:c.rendererTypes3D}},writer:h.writeTarget}}},read:h.read,write:h.writeTarget}})],b.prototype,"symbol",void 0);e([l.property({type:String,json:{write:!0}})],b.prototype,"value",void 0);return b=g=e([l.subclass("esri.renderers.support.UniqueValueInfo")],b);var g}(l.declared(n));f.UniqueValueInfo=a;f.default=a})},"esri/symbols/support/styleUtils":function(){define("require exports ../../request ../../core/Error ../../core/promiseUtils ../../core/urlUtils ../../portal/Portal ../../portal/PortalQueryParams ../Symbol3D ./jsonUtils ./StyleOrigin ./Thumbnail".split(" "),
  1914. function(a,f,p,e,n,l,h,c,m,b,g,t){function u(a,b){return q(a).then(function(b){return{data:b.data,baseUrl:l.removeFile(a),styleUrl:a}})}function v(a,b){b=b.portal||h.getDefault();var c,e=b.url+" - "+(b.user&&b.user.username)+" - "+a;d[e]||(d[e]=x(a,b).then(function(a){c=a;return a.fetchData()}).then(function(b){return{data:b,baseUrl:c.itemUrl,styleName:a}}));return d[e]}function x(a,b){return b.load().then(function(){var d=new c({disableExtraQuery:!0,query:"owner:"+k+" AND type:"+y+' AND typekeywords:"'+
  1915. a+'"'});return b.queryItems(d)}).then(function(b){b=b.results;var c=null,d=a.toLowerCase();if(b&&Array.isArray(b))for(var g=0;g<b.length;g++){var f=b[g];if(f.typeKeywords.some(function(a){return a.toLowerCase()===d})&&f.type===y&&f.owner===k){c=f;break}}if(c)return c.load();throw new e("symbolstyleutils:style-not-found","The style '"+a+"' could not be found",{styleName:a});})}function r(a,b){return a.styleUrl?u(a.styleUrl,b):a.styleName?v(a.styleName,b):n.reject(new e("symbolstyleutils:style-url-and-name-missing",
  1916. "Either styleUrl or styleName is required to resolve a style"))}function w(a,c,d){for(var f=a.data,h={portal:d.portal,url:l.urlToObject(a.baseUrl),origin:"portal-item"},k=function(e){if(e.name!==c)return"continue";var f=l.read(e.webRef,h),k={portal:d.portal,url:l.urlToObject(l.removeFile(f)),origin:"portal-item"};return{value:q(f).then(function(f){if((f=b.fromJSON(f.data,k))&&f.isInstanceOf(m)){if(e.thumbnail)if(e.thumbnail.href){var n=l.read(e.thumbnail.href,h);f.thumbnail=new t.default({url:n})}else e.thumbnail.imageData&&
  1917. (f.thumbnail=new t.default({url:"data:image/png;base64,"+e.thumbnail.imageData}));a.styleUrl?f.styleOrigin=new g({portal:d.portal,styleUrl:a.styleUrl,name:c}):a.styleName&&(f.styleOrigin=new g({portal:d.portal,styleName:a.styleName,name:c}))}return f})}},p=0,f=f.items;p<f.length;p++){var r=k(f[p]);if("object"===typeof r)return r.value}return n.reject(new e("symbolstyleutils:symbol-name-not-found","The symbol name '"+c+"' could not be found",{symbolName:c}))}function q(a){return p(l.normalize(a),{responseType:"json",
  1918. query:{f:"json"}})}Object.defineProperty(f,"__esModule",{value:!0});var d={};f.fetchStyle=r;f.resolveWebStyleSymbol=function(a,b){return a.name?r(a,b).then(function(c){return w(c,a.name,b)}):n.reject(new e("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))};f.fetchSymbolFromStyle=w;f.styleNameFromItem=function(a){var b=0;for(a=a.typeKeywords;b<a.length;b++){var c=a[b];if(/^Esri.*Style$/.test(c)&&"Esri Style"!==c)return c}};var k="esri_en",y="Style"})},
  1919. "esri/renderers/support/jsonUtils":function(){define(["../../core/Warning","../SimpleRenderer","../UniqueValueRenderer","../ClassBreaksRenderer"],function(a,f,p,e){var n={simple:f,uniqueValue:p,classBreaks:e},l={fromJson:function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(c){console.warn(c.stack)}return l.fromJSON(a)},read:function(e,c,f){if(e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type)return f&&f.messages&&f.messages.push(new a("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+
  1920. e.type+"'",{definition:e,context:f})),null;if(c=e?n[e.type]||null:null)return c=new c,c.read(e,f),c;f&&f.messages&&e&&f.messages.push(new a("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:f}));return null},fromJSON:function(a){var c=a?n[a.type]||null:null;return c?c.fromJSON(a):null}};return l})},"esri/renderers/ClassBreaksRenderer":function(){define("../core/declare ../core/lang ../core/kebabDictionary ../core/Error ../core/Logger ../core/accessorSupport/ensureType dojo/_base/lang ../support/arcadeUtils ../symbols/Symbol ../symbols/PolygonSymbol3D ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer ./support/LegendOptions ./support/ClassBreakInfo".split(" "),
  1921. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=n.getLogger("esri.renderers.ClassBreaksRenderer");v=v.LegendOptions;x=x.ClassBreakInfo;var w=p({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"}),q=l.ensureType(x),d=a(u,{declaredClass:"esri.renderers.ClassBreaksRenderer",properties:{backgroundFillSymbol:{types:{base:m,key:"type",typeMap:{"simple-fill":t.types.typeMap["simple-fill"],"picture-fill":t.types.typeMap["picture-fill"],"polygon-3d":t.types.typeMap["polygon-3d"]}},
  1922. value:null,json:{origins:{"web-scene":{read:g.read,write:{target:{backgroundFillSymbol:{type:b}},writer:g.writeTarget}}},read:g.read,write:g.writeTarget}},classBreakInfos:{type:[x],json:{read:function(a,b,c){if(Array.isArray(a)){var d=b.minValue;return a.map(function(a){var b=new x;b.read(a,c);null==b.minValue&&(b.minValue=d);null==b.maxValue&&(b.maxValue=b.minValue);d=b.maxValue;return b})}},write:function(a,b,c,d){a=a.map(function(a){return a.write({},d)});this._areClassBreaksConsecutive()&&a.forEach(function(a){delete a.classMinValue});
  1923. b[c]=a}}},minValue:{type:Number,readOnly:!0,dependsOn:["classBreakInfos"],get:function(){return this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0},json:{read:!1,write:{overridePolicy:function(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}},defaultLabel:{type:String,value:null,json:{write:!0}},defaultSymbol:{types:t.rendererTypes,value:null,json:{origins:{"web-scene":{read:g.read,write:{target:{defaultSymbol:{types:t.rendererTypes3D}},
  1924. writer:g.writeTarget}}},read:g.read,write:g.writeTarget}},valueExpression:{type:String,value:null,json:{write:!0}},valueExpressionTitle:{type:String,value:null,json:{write:!0}},compiledFunc:{dependsOn:["valueExpression"],get:function(){return c.createFunction(this.valueExpression)}},legendOptions:{type:v,value:null,json:{write:!0}},field:{value:null,cast:function(a){return null==a?a:"function"===typeof a?a:l.ensureString(a)},json:{type:String,write:function(a,b,c,d){"string"===typeof a?b[c]=a:d&&
  1925. d.messages?d.messages.push(new e("property:unsupported","ClassBreaksRenderer.field set to a function cannot be written to JSON")):r.error(".field: cannot write field to JSON since it's not a string value")}}},isMaxInclusive:!0,normalizationField:{type:String,value:null,json:{write:!0}},normalizationTotal:{type:Number,value:null,json:{write:!0}},normalizationType:{type:String,value:null,dependsOn:["normalizationField","normalizationTotal"],get:function(){var a=this._get("normalizationType"),b=!!this.normalizationField,
  1926. c=null!=this.normalizationTotal;if(b||c)a=b&&"field"||c&&"percent-of-total",b&&c&&console.warn("warning: both normalizationField and normalizationTotal are set!");else if("field"===a||"percent-of-total"===a)a=null;return a},json:{read:w.fromJSON,write:function(a,b){if(a=w.toJSON(a))b.normalizationType=a}}},requiredFields:{dependsOn:["field","normalizationField","valueExpression"]},type:{value:"class-breaks",json:{write:function(a,b){b.type="classBreaks"}}}},constructor:function(){this.classBreakInfos=
  1927. []},addClassBreakInfo:function(a,b,c){a="number"===typeof a?new x({minValue:a,maxValue:b,symbol:c}):q(f.clone(a));this.classBreakInfos.push(a);1===this.classBreakInfos.length&&this.notifyChange("minValue")},removeClassBreakInfo:function(a,b){var c,d,e=this.classBreakInfos.length;for(d=0;d<e;d++)if(c=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],c[0]==a&&c[1]==b){this.classBreakInfos.splice(d,1);break}},getBreakIndex:function(a,b){var d=this.field,e=a.attributes,g=this.classBreakInfos.length,
  1928. f=this.isMaxInclusive;if(this.valueExpression)a=c.executeFunction(this.compiledFunc,c.createExecContext(a,c.getViewInfo(b)));else if(h.isFunction(d))a=d(a);else if(a=parseFloat(e[d]),b=this.normalizationType)if(d=parseFloat(this.normalizationTotal),e=parseFloat(e[this.normalizationField]),"log"===b)a=Math.log(a)*Math.LOG10E;else if("percent-of-total"===b&&!isNaN(d))a=a/d*100;else if("field"===b&&!isNaN(e)){if(isNaN(a)||isNaN(e))return-1;a/=e}if(null!=a&&!isNaN(a)&&"number"===typeof a)for(e=0;e<g;e++)if(b=
  1929. [this.classBreakInfos[e].minValue,this.classBreakInfos[e].maxValue],b[0]<=a&&(f?a<=b[1]:a<b[1]))return e;return-1},getClassBreakInfo:function(a,b){a=this.getBreakIndex(a,b);return-1!==a?this.classBreakInfos[a]:null},getSymbol:function(a,b){a=this.getBreakIndex(a,b);return-1<a?this.classBreakInfos[a].symbol:this.defaultSymbol},getSymbols:function(){var a=[];this.classBreakInfos.forEach(function(b){b.symbol&&a.push(b.symbol)});this.defaultSymbol&&a.push(this.defaultSymbol);return a},clone:function(){return new d({field:this.field,
  1930. backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:f.clone(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:f.clone(this.visualVariables),
  1931. legendOptions:f.clone(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})},collectRequiredFields:function(a){this.inherited(arguments);[this.field,this.normalizationField].forEach(function(b){b&&(a[b]=!0)});this.valueExpression&&c.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})},_areClassBreaksConsecutive:function(){for(var a=this.classBreakInfos,b=1;b<a.length;b++)if(a[b-1].maxValue!==a[b].minValue)return!1;return!0}});return d})},"esri/renderers/support/ClassBreakInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
  1932. function(a,f,p,e,n,l,h,c){Object.defineProperty(f,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.minValue=null;b.maxValue=0;b.symbol=null;return b}p(b,a);g=b;b.prototype.clone=function(){return new g({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})};e([l.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);
  1933. e([l.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);e([l.property({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],b.prototype,"minValue",void 0);e([l.property({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],b.prototype,"maxValue",void 0);e([l.property({types:c.rendererTypes,json:{origins:{"web-scene":{read:h.read,write:{target:{symbol:{types:c.rendererTypes3D}},writer:h.writeTarget}}},read:h.read,write:h.writeTarget}})],
  1934. b.prototype,"symbol",void 0);return b=g=e([l.subclass("esri.renderers.support.ClassBreakInfo")],b);var g}(l.declared(n));f.ClassBreakInfo=a;f.default=a})},"esri/renderers/support/styleUtils":function(){define(["require","exports","../../core/promiseUtils","../../core/Warning"],function(a,f,p,e){Object.defineProperty(f,"__esModule",{value:!0});f.loadStyleRenderer=function(a,f){var h=a&&a.getAtOrigin&&a.getAtOrigin("renderer",f.origin);return h&&"unique-value"===h.type&&h.styleOrigin?h.populateFromStyle().catch(function(c){f&&
  1935. f.messages&&f.messages.push(new e("renderer:style-reference","Failed to create unique value renderer from style reference: "+c.message,{error:c,context:f}));a.clear("renderer",f.origin)}).then(function(){return null}):p.resolve(null)}})},"esri/renderers/support/typeUtils":function(){define("require exports ../ClassBreaksRenderer ../Renderer ../SimpleRenderer ../UniqueValueRenderer".split(" "),function(a,f,p,e,n,l){Object.defineProperty(f,"__esModule",{value:!0});f.types={key:"type",base:e,typeMap:{simple:n,
  1936. "unique-value":l,"class-breaks":p}}})},"esri/plugins/popupManager":function(){define(["../views/PopupManager"],function(a){return{add:function(f,p){f.popupManager||(f.popupManager=new a(p),f.popupManager.view=f)},remove:function(a){var f=a.popupManager;f&&(f.destroy(),a.popupManager=null)}}})},"esri/views/PopupManager":function(){define("require ../core/promiseUtils dojo/_base/array dojo/on dojo/Deferred dojo/promise/all ../layers/support/layerUtils ../geometry/support/scaleUtils ../geometry/Extent ../tasks/support/Query ../layers/GroupLayer ../core/Accessor".split(" "),
  1937. function(a,f,p,e,n,l,h,c,m,b,g,t){var u;return t.createSubclass({declaredClass:"esri.views.PopupManager",properties:{map:{dependsOn:["view.map"],readOnly:!0}},constructor:function(){this._featureLayersCache={}},destroy:function(){this._featureLayersCache={};this.view=null},_clickHandle:null,_featureLayersCache:null,enabled:!1,_enabledSetter:function(a){this._clickHandle&&(a?this._clickHandle.resume():this._clickHandle.pause());this._set("enabled",a)},_mapGetter:function(){return this.get("view.map")||
  1938. null},view:null,_viewSetter:function(a){this._clickHandle&&(this._clickHandle.remove(),this._clickHandle=null);a&&(this._clickHandle=e.pausable(a,"click",this._clickHandler.bind(this)),this.enabled||this._clickHandle.pause());this._set("view",a)},getMapLayer:function(a){var b;if(a&&(b=a.findLayerById())&&(a=b.id,this._featureLayersCache[a])){var c=a.lastIndexOf("_");-1<c&&(a=a.substring(0,c),b=this.map.findLayerById(a))}return b},_closePopup:function(){var a=this.get("view.popup");a&&(a.clear(),a.close())},
  1939. _showPopup:function(a,e,h){function l(a){return k.allLayerViews.find(function(b){return b.layer===a})}function q(a){if(null==a)return!1;var b=l(a);return null==b?!1:a.loaded&&!b.suspended&&(a.popupEnabled&&a.popupTemplate||"graphics"===a.type||"geo-rss"===a.type||"map-notes"===a.type||"kml"===a.type||b.getPopupData)}function d(a){return(a=l(a))&&a.hasDraped}var k=this.view;a=k.popup;var r=this,t=[],x="3d"===k.type;p.forEach(this.map.layers.toArray(),function(a){a.isInstanceOf(g)?p.forEach(a.layers.toArray(),
  1940. function(a){!q(a)||x&&!d(a)||t.push(a)}):!q(a)||x&&!d(a)||t.push(a)});0<k.graphics.length&&t.push(k.graphics);(h&&k.graphics.includes(h)?h.popupTemplate:!h||q(h.layer))||(h=null);if(t.length||h){var v=[],u=!!h,D=r._calculateClickTolerance(t);if(e){var F=1;"2d"===k.type&&(F=k.state.resolution);var G=k.basemapTerrain;G&&G.overlayManager&&(F=G.overlayManager.overlayPixelSizeInMapUnits(e));D*=F;G&&!G.spatialReference.equals(k.spatialReference)&&(D*=c.getMetersPerUnitForSR(G.spatialReference)/c.getMetersPerUnitForSR(k.spatialReference));
  1941. var G=e.clone().offset(-D,-D),D=e.clone().offset(D,D),Y=new m(Math.min(G.x,D.x),Math.min(G.y,D.y),Math.max(G.x,D.x),Math.max(G.y,D.y),k.spatialReference),G=function(a){var c;if("imagery"===a.type){c=new b;c.geometry=e;var d=l(a),g={rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0};g.layerView=d;c=a.queryVisibleRasters(c,g).then(function(a){u=u||0<a.length;return a})}else if("csv"===a.type||"scene"===a.type||!r._featureLayersCache[a.id]&&"function"!==typeof a.queryFeatures){if("map-image"===
  1942. a.type||"wms"===a.type)return d=l(a),d.getPopupData(Y);var g=[],k;"esri.core.Collection\x3cesri.Graphic\x3e"===a.declaredClass?(d=a,k=!0):"graphics"===a.type?(d=a.graphics,k=!0):(d=(d=l(a))&&d.loadedGraphics,k=!1);d&&(g=d.filter(function(a){return a&&(!k||a.popupTemplate)&&a.visible&&Y.intersects(a.geometry)}).toArray());0<g.length&&(u=!0,c="scene"===a.type?r._fetchSceneAttributes(a,g):f.resolve(g))}else d=a.createQuery(),d.geometry=Y,c=a.queryFeatures(d).then(function(b){b=b.features;if(h&&h.layer===
  1943. a&&a.objectIdField){var c=a.objectIdField,d=h.attributes[c];b=b.filter(function(a){return a.attributes[c]!==d})}if(!h&&"function"===typeof l(a).getGraphics3DGraphics){var e=[],g=l(a).getGraphics3DGraphics(),f;for(f in g)e.push(g[f].graphic.attributes[a.objectIdField]);b=b.filter(function(b){return-1!==e.indexOf(b.attributes[a.objectIdField])})}u=u||0<b.length;return b});return c};if(x&&!h||!x)var v=t.map(G).filter(function(a){return!!a}),aa=function(a){return a.reduce(function(a,b){return a.concat(b.items?
  1944. aa(b.items):b)},[])},v=aa(v);h&&(h.layer&&"scene"===h.layer.type?v.unshift(this._fetchSceneAttributes(h.layer,[h])):h.popupTemplate&&(G=new n,v.unshift(G.resolve([h]))));p.some(v,function(a){return!a.isFulfilled()})||u?v.length&&a.open({promises:v,location:e}):r._closePopup()}else r._closePopup()}else r._closePopup()},_fetchSceneAttributes:function(a,b){return this.view.whenLayerView(a).then(function(c){var e=this._getOutFields(a.popupTemplate),g=b.map(function(a){return c.whenGraphicAttributes(a,
  1945. e).catch(function(){return a})});return f.eachAlways(g)}.bind(this)).then(function(a){return a.map(function(a){return a.value})})},_getSubLayerFeatureLayers:function(b,c){var g=c||new n,f=[];c=b.length;var m=Math.floor(this.view.extent.width/this.view.width),d=this.view.scale,k=!1,t=this,x=0;a:for(;x<c;x++){var v=b[x],C=v.dynamicLayerInfos||v.layerInfos;if(C){var B=null;v._params&&(v._params.layers||v._params.dynamicLayers)&&(B=v.visibleLayers);for(var B=h._getVisibleLayers(C,B),D=h._getLayersForScale(d,
  1946. C),F=C.length,G=0;G<F;G++){var Y=C[G],aa=Y.id,Z=v.popupTemplates[aa];if(!Y.subLayerIds&&Z&&Z.popupTemplate&&-1<p.indexOf(B,aa)&&-1<p.indexOf(D,aa)){if(!u){k=!0;break a}var H=v.id+"_"+aa,W=this._featureLayersCache[H];W&&W.loadError||(W||((W=Z.layerUrl)||(W=Y.source?this._getLayerUrl(v.url,"/dynamicLayer"):this._getLayerUrl(v.url,aa)),W=new u(W,{id:H,drawMode:!1,mode:u.MODE_SELECTION,outFields:this._getOutFields(Z.popupTemplate),resourceInfo:Z.resourceInfo,source:Y.source}),this._featureLayersCache[H]=
  1947. W),W.setDefinitionExpression(v.layerDefinitions&&v.layerDefinitions[aa]),W.setGDBVersion(v.gdbVersion),W.popupTemplate=Z.popupTemplate,W.setMaxAllowableOffset(m),W.setUseMapTime(!!v.useMapTime),v.layerDrawingOptions&&v.layerDrawingOptions[aa]&&v.layerDrawingOptions[aa].renderer&&W.setRenderer(v.layerDrawingOptions[aa].renderer),f.push(W))}}}}if(k){var I=new n;a(["../layers/FeatureLayer"],function(a){u=a;I.resolve()});I.then(function(){t._getSubLayerFeatureLayers(b,g)})}else{var U=[];p.forEach(f,function(a){if(!a.loaded){var b=
  1948. new n;e.once(a,"load, error",function(){b.resolve()});U.push(b.promise)}});U.length?l(U).then(function(){f=p.filter(f,function(a){return!a.loadError&&a.isVisibleAtScale(d)});g.resolve(f)}):(f=p.filter(f,function(a){return a.isVisibleAtScale(d)}),g.resolve(f))}return g.promise},_getLayerUrl:function(a,b){var c=a.indexOf("?");return-1===c?a+"/"+b:a.substring(0,c)+"/"+b+a.substring(c)},_getOutFields:function(a){var b=["*"];if("esri.PopupTemplate"===a.declaredClass){var c=null==a.content||Array.isArray(a.content)&&
  1949. a.content.every(function(a){return"attachments"===a.type||"fields"===a.type&&null==a.fieldInfos||"text"===a.type&&-1===a.text.indexOf("{")});a.fieldInfos&&!a.expressionInfos&&c&&(b=[],p.forEach(a.fieldInfos,function(a){var c=a.fieldName&&a.fieldName.toLowerCase();c&&"shape"!==c&&0!==c.indexOf("relationships/")&&b.push(a.fieldName)}))}return b},_calculateClickTolerance:function(a){var b=6;p.forEach(a,function(a){if(a=a.renderer)"simple"===a.type?((a=a.symbol)&&a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset))),
  1950. a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))):"unique-value"!==a.type&&"class-breaks"!==a.type||p.forEach(a.uniqueValueInfos||a.classBreakInfos,function(a){(a=a.symbol)&&a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset)));a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))})});return b},_clickHandler:function(a){function b(a){return c.allLayerViews.find(function(b){return b.layer===a})}var c=this.view,e=a.screenPoint,f=this;if(0===a.button&&c.popup&&c.ready){var d="3d"===c.type,h=c.map.allLayers.some(function(a){if(a.isInstanceOf(g))return!1;
  1951. var c;null==a?c=!1:(c=b(a),c=null==c?!1:a.loaded&&!c.suspended&&(a.popupEnabled&&a.popupTemplate||"graphics"===a.type||c.getPopupData));c&&!(c=!d)&&(c=(a=b(a))&&a.hasDraped);return c?!0:!1});null!=e?this.view.hitTest(e.x,e.y).then(function(b){h||0<b.results.length?0<b.results.length?(b=b.results[0],f._showPopup(a,b.mapPoint,b.graphic)):f._showPopup(a,a.mapPoint,null):f._closePopup()}):f._showPopup(a,a.mapPoint)}}})})},"esri/layers/support/layerUtils":function(){define(["dojo/_base/array"],function(a){return{_serializeLayerDefinitions:function(f){var p=
  1952. [],e=!1,n=/[:;]/;if(f&&(a.forEach(f,function(a,c){a&&(p.push([c,a]),!e&&n.test(a)&&(e=!0))}),0<p.length)){var l;e?(l={},a.forEach(p,function(a){l[a[0]]=a[1]}),l=JSON.stringify(l)):(l=[],a.forEach(p,function(a){l.push(a[0]+":"+a[1])}),l=l.join(";"));return l}return null},_serializeTimeOptions:function(f,p){if(f){var e=[];a.forEach(f,function(f,l){f&&(f=f.toJSON(),p&&-1!==a.indexOf(p,l)&&(f.useTime=!1),e.push('"'+l+'":'+JSON.stringify(f)))});if(e.length)return"{"+e.join(",")+"}"}},_getVisibleLayers:function(f,
  1953. p){var e=[],n,l;if(!f)return e;if(p)for(e=p.concat(),l=0;l<f.length;l++)p=f[l],n=a.indexOf(f,p.id),p.subLayerIds&&-1<n&&(e.splice(n,1),e=e.concat(p.subLayerIds));else e=this._getDefaultVisibleLayers(f);return e},_getDefaultVisibleLayers:function(f){var p=[],e;if(!f)return p;for(e=0;e<f.length;e++)0<=f[e].parentLayerId&&-1===a.indexOf(p,f[e].parentLayerId)&&a.some(f,function(a){return a.id===f[e].parentLayerId})||f[e].defaultVisibility&&p.push(f[e].id);return p},_getLayersForScale:function(f,p){var e=
  1954. [];if(0<f&&p){var n;for(n=0;n<p.length;n++)if(!(0<=p[n].parentLayerId&&-1===a.indexOf(e,p[n].parentLayerId)&&a.some(p,function(a){return a.id===p[n].parentLayerId}))&&0<=p[n].id){var l=!0,h=p[n].maxScale,c=p[n].minScale;if(0<h||0<c)0<h&&0<c?l=h<=f&&f<=c:0<h?l=h<=f:0<c&&(l=f<=c);l&&e.push(p[n].id)}}return e}}})},"esri/layers/GroupLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/utils ./Layer ./mixins/OperationalLayer ./mixins/PortalLayer ../support/LayersMixin".split(" "),
  1955. function(a,f,p,e,n,l,h,c,m,b,g,t){return function(b){function g(a){a=b.call(this)||this;a._visibilityHandles={};a.fullExtent=void 0;a.operationalLayerType="GroupLayer";a.spatialReference=void 0;a.type="group";a._visibilityWatcher=a._visibilityWatcher.bind(a);return a}p(g,b);g.prototype.initialize=function(){this._enforceVisibility(this.visibilityMode,this.visible);this.watch("visible",this._visibleWatcher.bind(this),!0)};g.prototype._writeLayers=function(a,b,c,e){var d=[];if(!a)return d;a.forEach(function(a){a.write&&
  1956. (a=a.write(null,e))&&a.layerType&&d.push(a)});b.layers=d};Object.defineProperty(g.prototype,"visibilityMode",{set:function(a){var b=this._get("visibilityMode")!==a;this._set("visibilityMode",a);b&&this._enforceVisibility(a,this.visible)},enumerable:!0,configurable:!0});g.prototype.load=function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]}));return this.when()};g.prototype.layerAdded=function(a){a.visible&&"exclusive"===this.visibilityMode?
  1957. this._turnOffOtherLayers(a):"inherited"===this.visibilityMode&&(a.visible=this.visible);this._visibilityHandles[a.uid]=a.watch("visible",this._visibilityWatcher,!0)};g.prototype.layerRemoved=function(a){var b=this._visibilityHandles[a.uid];b&&(b.remove(),delete this._visibilityHandles[a.uid]);this._enforceVisibility(this.visibilityMode,this.visible)};g.prototype.importLayerViewModule=function(b){switch(b.type){case "2d":return l.create(function(b){a(["../views/layers/GroupLayerView"],b)});case "3d":return l.create(function(b){a(["../views/layers/GroupLayerView"],
  1958. b)})}};g.prototype._turnOffOtherLayers=function(a){this.layers.forEach(function(b){b!==a&&(b.visible=!1)})};g.prototype._enforceVisibility=function(a,b){if(c.getProperties(this).initialized){var e=this.layers,g=e.find(function(a){return a.visible});switch(a){case "exclusive":e.length&&!g&&(g=e.getItemAt(0),g.visible=!0);this._turnOffOtherLayers(g);break;case "inherited":e.forEach(function(a){a.visible=b})}}};g.prototype._visibleWatcher=function(a){"inherited"===this.visibilityMode&&this.layers.forEach(function(b){b.visible=
  1959. a})};g.prototype._visibilityWatcher=function(a,b,c,e){switch(this.visibilityMode){case "exclusive":a?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case "inherited":e.visible=this.visible}};g.prototype._isAnyLayerVisible=function(){return this.layers.some(function(a){return a.visible})};e([h.property()],g.prototype,"fullExtent",void 0);e([h.property({json:{read:!1,write:{ignoreOrigin:!0}}})],g.prototype,"layers",void 0);e([h.writer("layers")],g.prototype,"_writeLayers",
  1960. null);e([h.property()],g.prototype,"operationalLayerType",void 0);e([h.property({json:{write:!1}})],g.prototype,"portalItem",void 0);e([h.property()],g.prototype,"spatialReference",void 0);e([h.property({json:{read:!1},readOnly:!0,value:"group"})],g.prototype,"type",void 0);e([h.property({json:{read:!1,write:!1}})],g.prototype,"url",void 0);e([h.property({type:String,value:"independent",json:{write:!0}})],g.prototype,"visibilityMode",null);return g=e([h.subclass("esri.layers.GroupLayer")],g)}(h.declared(m,
  1961. t,n,b,g))})},"esri/portal/support/layersCreator":function(){define("require exports dojo/has ../../core/promiseUtils ../../layers/Layer ../../layers/support/lazyLayerLoader ../PortalItem ./mapNotesUtils ./portalLayers ../../renderers/support/styleUtils".split(" "),function(a,f,p,e,n,l,h,c,m,b){function g(a,c,d){var g,f={};c.itemId&&(f.portalItem={id:c.itemId,portal:d.context.portal});g=new a(f);g.read(c,d.context);return b.loadStyleRenderer(g,d.context).then(function(){return e.resolve(g)})}function t(a,
  1962. b){return u(a,b).then(function(c){return g(c,a,b)})}function u(a,b){var d=b.context,e=v(d),g=a.layerType||a.type;!g&&b&&b.defaultLayerType&&(g=b.defaultLayerType);b=(b=e[g])?l.layerLookupMap[b]:l.layerLookupMap.UnknownLayer;if("Feature Collection"===a.type){if(a.itemId)return(new h({id:a.itemId,portal:d&&d.portal})).load().then(m.selectLayerClassPath).then(function(a){return l.layerLookupMap[a.className||"UnknownLayer"]}).then(function(a){return a()})}else"ArcGISFeatureLayer"===g&&c.isMapNotesLayer(a)&&
  1963. (b=l.layerLookupMap.MapNotesLayer);a.wmtsInfo&&(b=l.layerLookupMap.WMTSLayer);return b()}function v(a){switch(a.origin){case "web-scene":switch(a.layerContainerType){case "basemap":a=d;break;case "ground":a=q;break;default:a=w}break;default:switch(a.layerContainerType){case "basemap":a=y;break;default:a=k}}return a}function x(a,b,c){return b&&b.filter?c.then(function(a){var c=b.filter(a);return void 0===c?e.resolve(a):c instanceof n?e.resolve(c):c}):c}function r(a,b,c){if(!b)return[];for(var d=[],
  1964. g=[],f=0;f<b.length;f++){var h=b[f],k=t(h,c);d.push(k);g.push(null);if("GroupLayer"===h.layerType&&h.layers&&Array.isArray(h.layers)&&0<h.layers.length){h=h.layers.map(function(a){return t(a,c)});d.push.apply(d,h);for(var l=0;l<h.length;l++)g.push(k)}}var m={};return d.map(function(b,d){var f=function(a,b){m[b.id]=d;var c=a.findIndex(function(a){if(!a.id)return!1;a=m[a.id];return void 0===a?!1:d<a});0>c&&(c=void 0);a.add(b,c)};return x(a,c,b).then(function(b){if(null===g[d])f(a,b);else return g[d].then(function(a){f(a.layers,
  1965. b);return e.resolve(b)});return e.resolve(b)})})}Object.defineProperty(f,"__esModule",{value:!0});var w={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",
  1966. CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},q={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer"},d={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",DefaultTileLayer:"TileLayer"},k=
  1967. {ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},y={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",
  1968. ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",bingLayer:"UnsupportedLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};f.createLayer=t;f.processLayer=x;f.populateLayers=r;f.populateOperationalLayers=function(a,b,c){return r(a,b,c)}})},"esri/portal/support/mapNotesUtils":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,
  1969. "__esModule",{value:!0});f.isMapNotesLayer=function(a){var e=["TITLE","DESCRIPTION","IMAGE_URL","IMAGE_LINK_URL"];if((a=a.layers||a.featureCollection&&a.featureCollection.layers)&&Array.isArray(a))return a=a[0],a.layerDefinition.fields&&a.layerDefinition.fields.forEach(function(a){a=e.indexOf(a.name);-1<a&&e.splice(a,1)}),e.length?!1:!0}})},"esri/portal/support/portalLayers":function(){define("require exports dojo/_base/lang ../../request ../../core/Collection ../../core/Error ../../core/promiseUtils ../../layers/support/lazyLayerLoader ../PortalItem ./mapNotesUtils".split(" "),
  1970. function(a,f,p,e,n,l,h,c,m,b){function g(a){switch(a.type){case "Map Service":return u(a);case "Feature Service":return v(a);case "Feature Collection":return r(a);case "Scene Service":return x(a);case "Image Service":return w(a);case "Stream Service":return{className:"StreamLayer"};case "Vector Tile Service":return{className:"VectorTileLayer"};case "KML":return{className:"KMLLayer"};case "WMTS":return{className:"WMTSLayer"};case "WMS":return{className:"WMSLayer"};default:return h.reject(new l("portal:unknown-item-type",
  1971. "Unknown item type '${type}'",{type:a.type}))}}function t(a){return(0,c.layerLookupMap[a.className])().then(function(b){return{constructor:b,properties:a.properties}})}function u(a){return q(a).then(function(a){return a?{className:"TileLayer"}:{className:"MapImageLayer"}})}function v(a){return d(a).then(function(a){if("object"===typeof a){var b={returnZ:!0,outFields:["*"]};null!=a.id&&(b.layerId=a.id);return{className:"FeatureLayer",properties:b}}return{className:"GroupLayer"}})}function x(a){return d(a).then(function(b){if("object"===
  1972. typeof b){var c={},d=void 0;null!=b.id?(c.layerId=b.id,d=a.url+"/layers/"+b.id):d=a.url;if(Array.isArray(a.typeKeywords)&&0<a.typeKeywords.length){b={IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer"};for(var e=0,g=Object.keys(b);e<g.length;e++){var f=g[e];if(-1!==a.typeKeywords.indexOf(f))return{className:b[f]}}}return k(d).then(function(a){var b="SceneLayer";null!=a&&"IntegratedMesh"===a.layerType?b="IntegratedMeshLayer":null!=a&&"PointCloud"===
  1973. a.layerType&&(b="PointCloudLayer");return{className:b,properties:c}})}return{className:"GroupLayer"}})}function r(a){return a.load().then(function(){return a.fetchData()}).then(function(a){if(a&&Array.isArray(a.layers)){if(b.isMapNotesLayer(a))return{className:"MapNotesLayer"};if(1===a.layers.length)return{className:"FeatureLayer"}}return{className:"GroupLayer"}})}function w(a){return q(a).then(function(b){var c=new n(a.typeKeywords);return b?c.find(function(a){return"elevation 3d layer"===a.toLowerCase()})?
  1974. {className:"ElevationLayer"}:{className:"TileLayer"}:{className:"ImageryLayer"}})}function q(a){return k(a.url).then(function(a){return a.tileInfo})}function d(a){return!a.url||a.url.match(/\/\d+$/)?h.resolve({}):a.load().then(function(){return a.fetchData()}).then(function(b){return b&&Array.isArray(b.layers)?1===b.layers.length?{id:b.layers[0].id}:!1:k(a.url).then(function(a){return a&&Array.isArray(a.layers)?1===a.layers.length?{id:a.layers[0].id}:!1:{}})})}function k(a){return e(a,{responseType:"json",
  1975. callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(f,"__esModule",{value:!0});f.fromItem=function(a){!a.portalItem||a.portalItem instanceof m||a.portalItem.constructor&&a.portalItem.constructor._meta||(a=p.mixin({},a,{portalItem:new m(a.portalItem)}));return a.portalItem.load().then(g).then(t).then(function(b){var c=p.mixin({portalItem:a.portalItem},b.properties);b=b.constructor;"esri.layers.FeatureLayer"===b.declaredClass&&(c.returnZ=!0,c.outFields=
  1976. ["*"]);return h.resolve(new b(c))})};f.selectLayerClassPath=g})},"esri/views/layers/LayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Handles ../../core/Identifiable ../../core/Logger ../../core/Promise ../../core/promiseUtils ../../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||
  1977. this;b.handles=new h;b.layer=null;b.parent=null;b.view=null;return b}p(b,a);b.prototype.initialize=function(){var a=this;this.addResolvingPromise(this.layer);this.when().catch(function(b){if("layerview:create-error"!==b.name){var c=a.layer&&a.layer.id||"no id",e=a.layer&&a.layer.title||"no title";m.getLogger(a.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '"+e+"', id: '"+c+"')",b);return g.reject(b)}})};b.prototype.destroy=function(){this.layer=this.view=this.parent=
  1978. null};Object.defineProperty(b.prototype,"suspended",{get:function(){return!this.canResume()},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"updating",{get:function(){return!this.suspended&&this.isUpdating()},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"visible",{get:function(){return!0===this.get("layer.visible")},set:function(a){void 0===a?this._clearOverride("visible"):this._override("visible",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
  1979. "fullOpacity",{get:function(){var a=this.get("layer.opacity"),a=null!=a?a:1,b=this.get("parent.fullOpacity");return a*(null!=b?b:1)},enumerable:!0,configurable:!0});b.prototype.canResume=function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1};b.prototype.isUpdating=function(){return!1};e([t.property()],b.prototype,"layer",void 0);e([t.property()],b.prototype,"parent",void 0);e([t.property({readOnly:!0,dependsOn:["view","visible","layer.loaded",
  1980. "parent.suspended"]})],b.prototype,"suspended",null);e([t.property({type:Boolean,dependsOn:["suspended"],readOnly:!0})],b.prototype,"updating",null);e([t.property()],b.prototype,"view",void 0);e([t.property({dependsOn:["layer.visible"]})],b.prototype,"visible",null);e([t.property({dependsOn:["layer.opacity","parent.fullOpacity"]})],b.prototype,"fullOpacity",null);return b=e([t.subclass("esri.views.layers.LayerView")],b)}(t.declared(n,l,c,b))})},"esri/views/View":function(){define("dojo/_base/lang ../Graphic ../core/Accessor ../core/Collection ../core/CollectionFlattener ../core/Evented ../core/Handles ../core/Logger ../core/Promise ../core/watchUtils ../core/promiseUtils ../core/scheduling ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ./LayerViewManager ./RefreshManager ./BasemapView ./GroundView ./support/DefaultsFromMap".split(" "),
  1981. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x,r,w,q,d,k){var y=c.getLogger("esri.views.View");return p.createSubclass([m,l],{declaredClass:"esri.views.View",properties:{allLayerViews:{readOnly:!0},basemapView:{},animation:{},resizing:{},interacting:{},graphics:{type:e.ofType(f)},groundView:{},defaultsFromMap:k,heightModelInfo:{readOnly:!0,type:v,dependsOn:["map.heightModelInfo","defaultsFromMap.heightModelInfo"]},initialExtent:{readOnly:!0,type:u,dependsOn:["defaultsFromMap.extent"]},initialExtentRequired:{},
  1982. layerViews:{type:e},map:{},ready:{readOnly:!0,dependsOn:"map spatialReference width height initialExtentRequired initialExtent defaultsFromMap.isSpatialReferenceDone map.loaded".split(" ")},size:{readOnly:!0,dependsOn:["width","height"],get:function(){return[this.width,this.height]}},spatialReference:{type:x,dependsOn:["defaultsFromMap.spatialReference","defaultsFromMap.vcsWkid","defaultsFromMap.latestVcsWkid"]},stationary:{dependsOn:["animation","interacting","resizing"]},type:{},updating:{},padding:{},
  1983. width:{},height:{},cursor:{},spatialReferenceWarningDelay:1E3},constructor:function(a){this._viewHandles=new h;this._viewHandles.add(this.watch("ready",function(a,b){this._currentSpatialReference=a?this.spatialReference:null;this.notifyChange("spatialReference");!a&&b&&this.layerViewManager.clear()}.bind(this)));this.allLayerViews=new n({root:this,rootCollectionNames:["basemapView.baseLayerViews","groundView.layerViews","layerViews","basemapView.referenceLayerViews"],getChildrenFunction:function(a){return a.layerViews}});
  1984. this.defaultsFromMap=new k({view:this})},getDefaults:function(){return a.mixin(this.inherited(arguments),{layerViews:[],graphics:[],padding:{left:0,top:0,right:0,bottom:0}})},initialize:function(){var a=this.validate().then(function(){this._isValid=!0;this.notifyChange("ready");var a=function(){return b.whenOnce(this,"ready").then(function(){return g.after(0)}.bind(this)).then(function(){if(!this.ready)return a()}.bind(this))}.bind(this);return a()}.bind(this));this.addResolvingPromise(a);this.basemapView=
  1985. new q({view:this});this.groundView=new d({view:this});this.layerViewManager=new r({view:this});this.refreshManager=new w({view:this});this._resetInitialViewPropertiesFromContent();var c;b.init(this.defaultsFromMap,"isSpatialReferenceDone",function(a){var b=!!(this.map&&0<this.map.allLayers.length);a&&!this.spatialReference&&b||!c?a&&!this.spatialReference&&b&&!c&&(c=g.after(this.spatialReferenceWarningDelay),c.then(function(){y.warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}).catch(function(){})):
  1986. (c.cancel(),c=null)}.bind(this))},destroy:function(){this.destroyed||(this.basemapView.destroy(),this.groundView.destroy(),this.destroyLayerViews(),this.refreshManager.destroy(),this.defaultsFromMap.destroy(),this.defaultsFromMap=null,this._viewHandles.destroy(),this.map=null)},destroyLayerViews:function(){this.layerViewManager.destroy()},_viewHandles:null,_isValid:!1,_readyCycleForced:!1,_userSpatialReference:null,_currentSpatialReference:null,animation:null,basemapView:null,groundView:null,graphics:null,
  1987. _graphicsSetter:function(a){this._graphicsView&&(this._graphicsView.graphics=a);this._set("graphics",a)},heightModelInfo:null,_heightModelInfoGetter:function(){return this.getDefaultHeightModelInfo()},interacting:!1,layerViews:null,map:null,_mapSetter:function(a){var b=this._get("map");a!==b&&(a&&a.load&&a.load(),this._forceReadyCycle(),this._resetInitialViewPropertiesFromContent(),this._set("map",a))},padding:null,_readyGetter:function(){return!!(this._isValid&&!this._readyCycleForced&&this.map&&
  1988. 0!==this.width&&0!==this.height&&this.spatialReference&&(!this.map.load||this.map.loaded)&&(this._currentSpatialReference||!this.initialExtentRequired||this.initialExtent||this.defaultsFromMap&&this.defaultsFromMap.isSpatialReferenceDone)&&this.defaultsFromMap&&this.defaultsFromMap.isTileInfoDone&&this.isSpatialReferenceSupported(this.spatialReference))},spatialReference:null,_spatialReferenceGetter:function(){var a=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||
  1989. null;a&&this.isHeightModelInfoRequired&&this.defaultsFromMap&&(a=a.clone(),a.vcsWkid=this.defaultsFromMap.vcsWkid,a.latestVcsWkid=this.defaultsFromMap.latestVcsWkid);return a},_spatialReferenceSetter:function(a){this._userSpatialReference=a;this._set("spatialReference",a)},stationary:!0,_stationaryGetter:function(){return!this.animation&&!this.interacting&&!this.resizing},type:null,updating:!1,initialExtentRequired:!0,initialExtent:null,_initialExtentGetter:function(){return this.defaultsFromMap&&
  1990. this.defaultsFromMap.extent},cursor:"default",renderContext:null,whenLayerView:function(a){return this.layerViewManager.whenLayerView(a)},getDefaultSpatialReference:function(){return this.get("defaultsFromMap.spatialReference")},getDefaultHeightModelInfo:function(){return this.get("map.supportsHeightModelInfo")&&this.get("map.heightModelInfo")||this.get("defaultsFromMap.heightModelInfo")||null},validate:function(){return g.resolve()},isSpatialReferenceSupported:function(){return!0},isTileInfoRequired:function(){return!1},
  1991. _resetInitialViewPropertiesFromContent:function(){if(this.defaultsFromMap){var a=this.defaultsFromMap.start.bind(this.defaultsFromMap);this.defaultsFromMap.reset();this._currentSpatialReference=null;this.notifyChange("spatialReference");this._viewHandles.remove("defaultsFromMap");this._viewHandles.add([b.watch(this,"spatialReference",a),b.watch(this,"initialExtentRequired",a),t.schedule(a)],"defaultsFromMap")}},_forceReadyCycle:function(){this.ready&&(this._readyCycleForced=!0,b.whenFalseOnce(this,
  1992. "ready",function(){this._readyCycleForced=!1;this.notifyChange("ready")}.bind(this)),this.notifyChange("ready"))}})})},"esri/views/LayerViewManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Error ../core/Handles ../core/promiseUtils ../core/scheduling ../core/watchUtils ../core/accessorSupport/decorators ./LayerViewFactory".split(" "),function(a,f,p,e,n,l,h,c,m,b,g,t){return function(a){function f(){var c=a.call(this)||
  1993. this;c._promisesMap=new Map;c._layerViewsMap=new Map;c._handles=new h;c.factory=new t;c.ready=!1;c.layersToLayerViews=function(){var a=new Map;a.set("view.map.basemap.baseLayers","view.basemapView.baseLayerViews");a.set("view.map.ground.layers","view.groundView.layerViews");a.set("view.map.layers","view.layerViews");a.set("view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews");return a}();c._doWork=c._doWork.bind(c);c.refresh=c.refresh.bind(c);c._handles.add(b.init(c,"view.ready",
  1994. function(a){return c.ready=a}));c._handles.add(c.watch(["view.map.basemap","view.map.ground","view.map.layers","ready"],c.refresh),"watcher");return c}p(f,a);f.prototype.destroy=function(){this._handles&&(this.clear(),this.view=null,this.factory.destroy(),this.factory=null,this._handles.destroy(),this._map=this._layerViewsMap=this._promisesMap=this._handles=null)};f.prototype.clear=function(){this.destroyed||(this._layerViewsMap.forEach(this._disposeLayerView,this),this._promisesMap.forEach(function(a){return a.cancel()}),
  1995. this._layerViewsMap.clear(),this._promisesMap.clear(),this._refreshCollections())};f.prototype.refresh=function(){var a=this._handles;a.remove("refresh");a.add(m.schedule(this._doWork),"refresh")};f.prototype.whenLayerView=function(a){this.refresh();this._doWork();return this._promisesMap.has(a)?this._promisesMap.get(a):c.reject(new l("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:a}))};f.prototype._doWork=function(){var a=this,b=this._handles,c=this.get("view.map");
  1996. this._map!==c&&(this.clear(),this._map=c);if(b.has("refresh")){b.remove("refresh");b.remove("collection-change");this.factory.paused=!this.ready;var e=this._map&&this._map.allLayers;e&&(e.forEach(this._createLayerView,this),this._refreshCollections(),this._promisesMap.forEach(function(b,c){e.includes(c)||a._disposeLayerView(a._layerViewsMap.get(c),c)}),b.add(e.on("change",this.refresh),"collection-change"))}};f.prototype._refreshCollections=function(){var a=this;this.layersToLayerViews.forEach(function(b,
  1997. c){a._populateLayerViewsOwners(a.get(c),a.get(b),a.view)})};f.prototype._populateLayerViewsOwners=function(a,b,c){var e=this;if(a&&b){var d=0;a.forEach(function(a){var g=e._layerViewsMap.get(a);g&&(g.layer=a,g.parent=c,b.getItemAt(d)!==g&&b.splice(d,0,g),a.layers&&e._populateLayerViewsOwners(a.layers,g.layerViews,g),d+=1)});d<b.length&&b.splice(d,b.length)}else b&&b.removeAll()};f.prototype._createLayerView=function(a){var b=this,c=this.view,e=this.factory,d=this._layerViewsMap,g=this._promisesMap;
  1998. d.has(a)?a.load():g.has(a)||(e=e.create(c,a).then(function(e){if(!b._map||!b._map.allLayers.some(function(b){return a===b}))throw new l("view:no-layerview-for-layer","The layer has been removed from the map",{layer:a});d.set(a,e);b._refreshCollections();a.emit("layerview-create",{view:c,layerView:e});c.emit("layerview-create",{layer:a,layerView:e});return e.when()}),g.set(a,e),e.always(this.refresh))};f.prototype._disposeLayerView=function(a,b){if(this._promisesMap.has(b)&&(this._promisesMap.get(b).cancel(),
  1999. this._promisesMap.delete(b),a)){b=a.layer;var c=a.view;this.factory.dispose(a);a.layer=a.parent=a.view=null;this._layerViewsMap.delete(b);b.emit("layerview-destroy",{view:c,layerView:a});c.emit("layerview-destroy",{layer:b,layerView:a})}};e([g.property()],f.prototype,"ready",void 0);e([g.property()],f.prototype,"view",void 0);return f=e([g.subclass("esri.views.LayerViewManager")],f)}(g.declared(n))})},"esri/views/LayerViewFactory":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/Deferred dojo/when ../core/Accessor ../core/Collection ../core/Error ../core/watchUtils ../core/accessorSupport/decorators".split(" "),
  2000. function(a,f,p,e,n,l,h,c,m,b,g){return function(a){function f(){var b=null!==a&&a.apply(this,arguments)||this;b.creationRequests=new c;b.paused=!0;return b}p(f,a);f.prototype.initialize=function(){var a=this;b.whenFalse(this,"paused",function(){a.creationRequests.toArray().forEach(a._processRequest,a)},!0)};f.prototype.destroy=function(){this.creationRequests.drain(function(a){return a.deferred.cancel(void 0)})};Object.defineProperty(f.prototype,"working",{get:function(){return 0<this.creationRequests.length},
  2001. enumerable:!0,configurable:!0});f.prototype.create=function(a,b){var c=this.getLayerViewPromise(b);if(c)return c;var e=this.creationRequests,g={deferred:new n(function(){var a=new m("cancelled:layerview-create","layerview creation cancelled",{layer:b});e.remove(g);g.creationPromise&&g.creationPromise.cancel(a);return a}),view:a,layer:b,started:!1,creationPromise:null};e.push(g);this.paused||this._processRequest(g);return g.deferred.promise};f.prototype.dispose=function(a){a.layer.destroyLayerView(a)};
  2002. f.prototype.getLayerViewPromise=function(a){var b=this.creationRequests&&this.creationRequests.find(function(b){return b.layer===a});return b&&b.deferred.promise};f.prototype._processRequest=function(a){var b=this;if(!a.started){a.started=!0;var c=a.deferred,e=a.layer,g=a.view;e.load().then(function(b){if(!c.isCanceled())return a.creationPromise=b.createLayerView(g),a.creationPromise}).then(function(b){return c.isCanceled()?b:a.creationPromise=l(b.when())}).catch(function(a){c.isCanceled()||c.reject(new m("layerview:create-error",
  2003. "layerview creation failed",{layer:e,error:a}))}).then(function(d){b.creationRequests&&b.creationRequests.remove(a);c.isFulfilled()?d&&b.dispose(d):c.resolve(d);return d})}};e([g.property()],f.prototype,"creationRequests",void 0);e([g.property()],f.prototype,"paused",void 0);e([g.property()],f.prototype,"view",void 0);e([g.property({dependsOn:["paused","creationRequests.length"],readOnly:!0})],f.prototype,"working",null);return f=e([g.subclass("esri.views.LayerViewFactory")],f)}(g.declared(h))})},
  2004. "esri/views/RefreshManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Handles ../core/accessorSupport/decorators".split(" "),function(a,f,p,e,n,l,h){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b._handles=new l;b._currentTick=0;return b}p(c,a);c.prototype.initialize=function(){var a=this;this.view.allLayerViews.on("after-changes",function(){a.notifyChange("tickInterval");a._handles.remove("layerViewsUpdating");
  2005. a._handles.add(a._getLayerViewHandles(),"layerViewsUpdating")});this.watch("tickInterval",function(){return a._restartTicking()});this.watch("view.ready",function(){return a._restartTicking()});this._restartTicking()};c.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null,this._intervalID&&clearInterval(this._intervalID),this._currentTick=0)};Object.defineProperty(c.prototype,"tickInterval",{get:function(){var a=this.view.allLayerViews.filter(function(a){return!!a.refresh});
  2006. return this._getCommonInterval(a)},enumerable:!0,configurable:!0});c.prototype._restartTicking=function(){var a=this;this._currentTick=0;this._intervalID&&clearInterval(this._intervalID);this.get("view.ready")&&this.tickInterval&&(this._intervalID=setInterval(function(){var b=Date.now();a._currentTick+=a.tickInterval;a.view.allLayerViews.forEach(function(c){if(c.refresh){var e=Math.round(6E4*c.refreshInterval),g=0===a._currentTick%e,f=6E3>b-c.refreshTimestamp;e&&g&&!f&&c.refresh(b)}})},this.tickInterval))};
  2007. c.prototype._getLayerViewHandles=function(){var a=this,c=[];this.view.allLayerViews.forEach(function(b){if(b.refresh){var e=b.watch("refreshInterval",function(){return a.notifyChange("tickInterval")});c.push(e);b.layer&&(e=b.layer.on("refresh",function(){var a=Date.now();6E3>a-b.refreshTimestamp||b.refresh(a)}),c.push(e))}});return c};c.prototype._getCommonInterval=function(a){var b=function(a,c){return isNaN(a)||isNaN(c)?0:0>=c?a:b(c,a%c)};return a.toArray().reduce(function(a,c){return b(Math.round(6E4*
  2008. c.refreshInterval),a)},0)};e([h.property()],c.prototype,"view",void 0);e([h.property({readOnly:!0})],c.prototype,"tickInterval",null);return c=e([h.subclass("esri.views.RefreshManager")],c)}(h.declared(n))})},"esri/views/BasemapView":function(){define(["../core/Accessor","../core/Collection","../core/watchUtils"],function(a,f,p){return a.createSubclass({declaredClass:"esri.views.BasemapView",properties:{view:{},baseLayerViews:{type:f},referenceLayerViews:{type:f}},constructor:function(){this._loadingHdl=
  2009. p.init(this,"view.map.basemap",this._loadBasemap)},getDefaults:function(){return{baseLayerViews:[],referenceLayerViews:[]}},destroy:function(){this.view=null;this._loadingHdl&&(this._loadingHdl.remove(),this._loadingHdl=null)},_suspendedGetter:function(){return this.view?this.view.suspended:!0},_loadBasemap:function(a){a&&a.load()}})})},"esri/views/GroundView":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Collection ../core/Handles ../core/watchUtils ../core/accessorSupport/decorators ./support/GroundViewElevationSampler".split(" "),
  2010. function(a,f,p,e,n,l,h,c,m,b){return function(a){function g(b){b=a.call(this)||this;b.handles=new h;b.view=null;b.layerViews=new l;return b}p(g,a);g.prototype.initialize=function(){var a=this;this.handles.add(c.when(this,"view.map.ground",function(a){return a.load()}));this.handles.add(this.layerViews.on("after-changes",function(){return a.layerViewsAfterChangesHandler()}))};g.prototype.destroy=function(){this._set("view",null);this.handles&&(this.handles.destroy(),this.handles=null)};Object.defineProperty(g.prototype,
  2011. "elevationSampler",{get:function(){return this.view&&"2d"!==this.view.type&&this.view.ready&&this.view.basemapTerrain&&this.view.basemapTerrain.ready?new b({view:this.view}):null},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"updating",{get:function(){return this.suspended?!1:this.layerViews.some(function(a){return a.updating})},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"suspended",{get:function(){return!this.view||this.view.suspended},enumerable:!0,configurable:!0});
  2012. g.prototype.layerViewsAfterChangesHandler=function(){var a=this;this.handles.remove("updating");this.handles.add(this.layerViews.map(function(b){return b.watch("updating",function(){return a.updateUpdating()},!0)}).toArray(),"updating");this.updateUpdating()};g.prototype.updateUpdating=function(){this.notifyChange("updating")};e([m.property({readOnly:!0,dependsOn:["view.ready","view.basemapTerrain.ready"]})],g.prototype,"elevationSampler",null);e([m.property({type:Boolean,dependsOn:["suspended"],
  2013. readOnly:!0})],g.prototype,"updating",null);e([m.property({constructOnly:!0})],g.prototype,"view",void 0);e([m.property({type:l,readOnly:!0})],g.prototype,"layerViews",void 0);e([m.property({readOnly:!0,dependsOn:["view.suspended"]})],g.prototype,"suspended",null);return g=e([m.subclass("esri.views.GroundView")],g)}(m.declared(n))})},"esri/views/support/GroundViewElevationSampler":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Logger ../../core/accessorSupport/decorators ../../geometry/support/webMercatorUtils ../../layers/support/ElevationSampler".split(" "),
  2014. function(a,f,p,e,n,l,h,c,m,b){var g=h.getLogger("esri.views.support.GroundViewElevationSampler");return function(a){function f(b){b=a.call(this,b)||this;b.demResolution={min:-1,max:-1};return b}p(f,a);f.prototype.initialize=function(){var a=this;this.view.basemapTerrain.on("elevation-change",function(){return a.emit("changed",{})})};f.prototype.elevationAt=function(a){var b=a.spatialReference,c=this.spatialReference;return m.canProject(b,c)?this.view.basemapTerrain.getElevation(a):(g.error("Cannot sample elevation at a location with spatial reference ("+
  2015. (b?b.wkid:"unknown")+") different from the view ("+c.wkid+")"),null)};f.prototype.queryElevation=function(a){return b.updateGeometryElevation(a.clone(),this)};e([c.property({readOnly:!0})],f.prototype,"demResolution",void 0);e([c.property({readOnly:!0,aliasOf:"view.basemapTerrain.extent"})],f.prototype,"extent",void 0);e([c.property({readOnly:!0,aliasOf:"view.basemapTerrain.spatialReference"})],f.prototype,"spatialReference",void 0);e([c.property({constructOnly:!0})],f.prototype,"view",void 0);return f=
  2016. e([c.subclass("esri.views.support.GroundViewElevationSampler")],f)}(c.declared(n,l))})},"esri/layers/support/ElevationSampler":function(){define("require exports ../../geometry ../../core/Logger ../../geometry/support/scaleUtils ../../geometry/support/webMercatorUtils".split(" "),function(a,f,p,e,n,l){function h(a,b){var c=m(a,b.spatialReference);if(!c)return null;switch(a.type){case "point":a.z=b.elevationAt(c)||0;break;case "polyline":t.spatialReference=c.spatialReference;for(var e=0;e<a.paths.length;e++)for(var g=
  2017. a.paths[e],d=c.paths[e],f=0;f<g.length;f++){var h=g[f],l=d[f];t.x=l[0];t.y=l[1];h[2]=b.elevationAt(t)||0}a.hasZ=!0;break;case "multipoint":t.spatialReference=c.spatialReference;for(e=0;e<a.points.length;e++)g=a.points[e],d=c.points[e],t.x=d[0],t.y=d[1],g[2]=b.elevationAt(t)||0;a.hasZ=!0}return a}function c(a,b){return new p.Extent({xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3],spatialReference:b})}function m(a,c){var e=a.spatialReference;return e.equals(c)?a:l.canProject(e,c)?l.project(a,c):(b.error("Cannot project geometry spatial reference (wkid:"+
  2018. e.wkid+") to elevation sampler spatial reference (wkid:"+c.wkid+")"),null)}Object.defineProperty(f,"__esModule",{value:!0});var b=e.getLogger("esri.layers.support.ElevationSampler"),g=function(){function a(a,b){this.tile=a;this.extent=c(a.tile.extent,b.spatialReference);var e=n.getMetersPerUnitForSR(b.spatialReference);a=b.lodAt(a.tile.level).resolution*e;this.demResolution={min:a,max:a}}Object.defineProperty(a.prototype,"spatialReference",{get:function(){return this.extent.spatialReference},enumerable:!0,
  2019. configurable:!0});a.prototype.contains=function(a){var b=m(a,this.spatialReference);a=b.x;b=b.y;return a>=this.extent.xmin&&a<this.extent.xmax&&b>=this.extent.ymin&&b<this.extent.ymax};a.prototype.elevationAt=function(a){return(a=m(a,this.spatialReference))?this.tile.sample(a.x,a.y):null};a.prototype.queryElevation=function(a){return h(a.clone(),this)};a.prototype.on=function(a,b){return u};return a}();f.TileElevationSampler=g;a=function(){function a(a,b){this.samplers=b?a.map(function(a){return new g(a,
  2020. b)}):a;if(a=this.samplers[0])for(this.extent=a.extent.clone(),a=a.demResolution,this.demResolution={min:a.min,max:a.max},a=1;a<this.samplers.length;a++){var e=this.samplers[a];this.extent.union(e.extent);this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min);this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}else this.extent=c([0,0,0,0],b.spatialReference),this.demResolution={min:0,max:0}}Object.defineProperty(a.prototype,"spatialReference",{get:function(){return this.extent.spatialReference},
  2021. enumerable:!0,configurable:!0});a.prototype.elevationAt=function(a){a=m(a,this.spatialReference);if(!a)return null;for(var b=0,c=this.samplers;b<c.length;b++){var e=c[b];if(e.contains(a))return e.elevationAt(a)}return null};a.prototype.queryElevation=function(a){return h(a.clone(),this)};a.prototype.on=function(a,b){return u};return a}();f.MultiTileElevationSampler=a;f.updateGeometryElevation=h;var t=new p.Point,u={remove:function(){}}})},"esri/views/support/DefaultsFromMap":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/arrayUtils ../../core/Handles ../../core/Logger ../../core/watchUtils ../../core/accessorSupport/decorators ../../geometry/support/heightModelInfoUtils ../../geometry/support/webMercatorUtils ../../portal/support/geometryServiceUtils".split(" "),
  2022. function(a,f,p,e,n,l,h,c,m,b,g,t,u){function v(a){return a?JSON.stringify(a.toJSON()):"undefined"}function x(a){switch(a){case 0:return"Waiting";case 1:return"Found";case 2:return"Exhausted"}return"Unknown: "+a}var r=c.getLogger("esri.views.support.DefaultsFromMap");return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b._handles=new h;b._waitTask=null;b._isStarted=!1;b._spatialReferenceCandidates=null;b._extentCandidates=null;b.logDebugInformation=!1;b.isSpatialReferenceDone=
  2023. !1;b.isTileInfoDone=!1;b.isHeightModelInfoSearching=!1;b.spatialReference=null;b.extent=null;b.heightModelInfo=null;b.vcsWkid=null;b.latestVcsWkid=null;b.mapCollectionPaths=d.DefaultMapCollectionPaths.slice();b.tileInfo=null;return b}p(c,a);d=c;c.prototype.initialize=function(){var a=this;this.watch("mapCollectionPaths",function(){a._isStarted&&(a.reset(),a.start())})};c.prototype.destroy=function(){this._set("view",null);this._handles&&(this._handles.destroy(),this._handles=null,this._isStarted=
  2024. !1);this._cancelLoading()};c.prototype.reset=function(){this._handles.removeAll();this._isStarted=!1;this._set("isSpatialReferenceDone",!1);this._set("isTileInfoDone",!1);this._set("isHeightModelInfoSearching",!1);this._set("spatialReference",null);this._set("extent",null);this._set("heightModelInfo",null);this._set("vcsWkid",null);this._set("latestVcsWkid",null);this._set("tileInfo",null);this._extentCandidates=this._spatialReferenceCandidates=null};c.prototype.start=function(){this._handles.removeAll();
  2025. this._isStarted=!0;for(var a=this._updateLayerChange.bind(this),b=0,c=this.mapCollectionPaths;b<c.length;b++)this._handles.add(m.on(this.view,"map."+c[b],"change",a,a,a,!0))};c.prototype._ownerNameFromCollectionName=function(a){var b=a.lastIndexOf(".");return-1===b?"view":"view."+a.slice(0,b)};c.prototype._ensureLoadedOwnersFromCollectionName=function(a){a=this._ownerNameFromCollectionName(a).split(".");for(var b,c=0;c<a.length;c++){b=this.get(a.slice(0,c+1).join("."));if(!b)break;if(b.load&&!b.isFulfilled())return{owner:null,
  2026. loading:b.load()}}return{owner:b}};c.prototype._cancelLoading=function(){this._waitTask=null;this._extentProjectTask&&(this._extentProjectTask.cancel(),this._extentProjectTask=null)};c.prototype._updateWhen=function(a){var b=this,c=!0,d=!1,e=a.always(function(){c?d=!0:e===b._waitTask&&b._update()}),c=!1;d||(this._waitTask=e);return d};c.prototype._updateLayerChange=function(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1);this._update()};c.prototype._update=
  2027. function(){var a=this;this._cancelLoading();if(this.view){if(!this.isSpatialReferenceDone){this._debugLog("Starting search for spatial reference...");var b=this._processMapCollections(function(b){return a._processSpatialReferenceSource(b)});this._debugLog("Search ended with status '"+x(b)+"'");if(0!==b){var c=null,b=this._spatialReferenceCandidates;!b||1>b.length?(c=this.defaultSpatialReference,this._debugLog("No spatial reference found, locking to default ("+v(c)+")")):(this.defaultSpatialReference&&
  2028. 1<b.length&&-1<l.findIndex(b,function(b){return b.equals(a.defaultSpatialReference)})&&(b=[this.defaultSpatialReference]),c=b[0],this._debugLog("Locking to "+v(c)));this._set("spatialReference",c);this._set("isSpatialReferenceDone",!0);c&&(b=this.logDebugInformation,this.logDebugInformation=!1,this._processMapCollections(function(b){return a._findExtent(b,c)}),this.extent||this._projectExtentCandidate(),this.logDebugInformation=b)}}null==this.heightModelInfo&&this.view.isHeightModelInfoRequired&&
  2029. (this._debugLog("Starting search for height model info..."),b=this._processMapCollections(function(b){return a._processHeightModelInfoSource(b)},function(a){return g.mayHaveHeightModelInfo(a)}),this._debugLog("Search ended with status "+x(b)),this._set("isHeightModelInfoSearching",0===b));null==this.tileInfo&&(b=!1,this.view.isTileInfoRequired()&&(b=this._deriveTileInfo()),b||this._set("isTileInfoDone",!0))}};c.prototype._processMapCollections=function(a,b){for(var c=0,d=this.mapCollectionPaths;c<
  2030. d.length;c++){var e="map."+d[c],g=this._ensureLoadedOwnersFromCollectionName(e);this._debugLog("Processing collection "+e+"...");if(g.loading&&!this._updateWhen(g.loading))return this._debugLog("Collection "+e+" owner is loading -\x3e wait"),0;g=g.owner;if(!g||g.isRejected&&g.isRejected())this._debugLog("Collection "+e+" owner is invalid or rejected -\x3e skip");else if(g=this.view.get(e)){if(e=this._processMapCollection(g,a,b),2!==e)return e}else this._debugLog("Collection "+e+" does not exist -\x3e skip")}return 2};
  2031. c.prototype._processMapCollection=function(a,b,c){for(var d=0;d<a.length;d++){var e=a.getItemAt(d);if(null==c||c(e)){if(e.load&&!e.isFulfilled()&&!this._updateWhen(e.load()))return this._debugLog("Source "+e.id+" is loading -\x3e wait"),0;if(!e.load||e.isResolved()){if(b(e))return 1;if(e.layers&&(e=this._processMapCollection(e.layers,b),2!==e))return e}}else this._debugLog("Source "+e.id+" is skipped due to predicate")}return 2};c.prototype._processSpatialReferenceSource=function(a){var b=this._getSupportedSpatialReferences(a);
  2032. if(0===b.length)return!1;this._spatialReferenceCandidates?(b=l.intersect(b,this._spatialReferenceCandidates,function(a,b){return a.equals(b)}),0<b.length?this._spatialReferenceCandidates=b:this._debugLog("Layer "+a.id+" is ignored because its supported spatial\n references are not compatible with the previous candidates")):this._spatialReferenceCandidates=b;return 1===this._spatialReferenceCandidates.length};c.prototype._findExtent=function(a,b){var c=a.fullExtents||(a.fullExtent?[a.fullExtent]:
  2033. []),d=l.find(c,function(a){return a.spatialReference.equals(b)});if(d)return this._set("extent",d),!0;0<this._getSupportedSpatialReferences(a).length&&(c=c.map(function(b){return{extent:b,layer:a}}),this._extentCandidates=(this._extentCandidates||[]).concat(c));return!1};c.prototype._projectExtentCandidate=function(){var a=this;if(this._extentCandidates&&this._extentCandidates.length){var b=this.spatialReference,c=l.find(this._extentCandidates,function(a){return t.canProject(a.extent.spatialReference,
  2034. b)});c?this._set("extent",t.project(c.extent,b)):(c=this._extentCandidates[0],this._extentProjectTask=u.projectGeometry(c.extent,b,c.layer.portalItem).then(function(b){a._set("extent",b)}))}};c.prototype._getSupportedSpatialReferences=function(a){var b=this,c=a.supportedSpatialReferences||(a.spatialReference?[a.spatialReference]:[]);if(0===c.length)return this._debugLog("Layer "+a.id+" is ignored because it does not have any spatial references"),[];c=c.filter(function(c){return b.view.isSpatialReferenceSupported(c,
  2035. a,function(a){return b._debugLog(a)})});0===c.length?this._debugLog("Layer "+a.id+" has spatial references but none of them are supported (or layer doesn't require locking)"):this._debugLog("Layer "+a.id+" has spatial references. Resulting candidate set: "+c.map(v).join(", "));return c};c.prototype._processHeightModelInfoSource=function(a){var b=g.deriveHeightModelInfoFromLayer(a);return b?(this._set("heightModelInfo",b),this._set("isHeightModelInfoSearching",!1),a.spatialReference&&(this._set("vcsWkid",
  2036. a.spatialReference.vcsWkid),this._set("latestVcsWkid",a.spatialReference.latestVcsWkid)),!0):!1};c.prototype._deriveTileInfo=function(){if(!this.isSpatialReferenceDone)return!0;var a=this.get("view.map");if(!a)return!0;var b=a.basemap,c=b&&b.get("baseLayers.0"),a=a.get("layers.0"),d=!1,e=null;b&&"failed"!==b.loadStatus?b.loaded?c&&"failed"!==c.loadStatus?c.loaded?e=c.tileInfo:(this._updateWhen(c.load()),d=!0):a&&"failed"!==a.loadStatus?a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0):d=!0:
  2037. (this._updateWhen(b.load()),d=!0):a&&"failed"!==a.loadStatus&&(a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0));e&&!e.spatialReference.equals(this.spatialReference)&&(e=null);d||this._set("tileInfo",e);return d};c.prototype._debugLog=function(a){this.logDebugInformation&&r.info(a)};c.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"];e([b.property()],c.prototype,"logDebugInformation",void 0);e([b.property({readOnly:!0})],c.prototype,"isSpatialReferenceDone",
  2038. void 0);e([b.property({readOnly:!0})],c.prototype,"isTileInfoDone",void 0);e([b.property({readOnly:!0})],c.prototype,"isHeightModelInfoSearching",void 0);e([b.property({constructOnly:!0})],c.prototype,"view",void 0);e([b.property({readOnly:!0})],c.prototype,"spatialReference",void 0);e([b.property({readOnly:!0})],c.prototype,"extent",void 0);e([b.property({readOnly:!0})],c.prototype,"heightModelInfo",void 0);e([b.property({readOnly:!0})],c.prototype,"vcsWkid",void 0);e([b.property({readOnly:!0})],
  2039. c.prototype,"latestVcsWkid",void 0);e([b.property()],c.prototype,"mapCollectionPaths",void 0);e([b.property()],c.prototype,"defaultSpatialReference",void 0);e([b.property({readOnly:!0})],c.prototype,"tileInfo",void 0);return c=d=e([b.subclass("esri.views.support.DefaultsFromMap")],c);var d}(b.declared(n))})},"esri/geometry/support/heightModelInfoUtils":function(){define(["require","exports","../../core/Error","../HeightModelInfo","../../layers/support/arcgisLayerUrl"],function(a,f,p,e,n){function l(a,
  2040. b,c){if(h(a)&&h(b)){if(null==a||null==b)return 0;if(c||a.heightUnit===b.heightUnit){if(a.heightModel!==b.heightModel)return 2;switch(a.heightModel){case "gravity-related-height":return 0;case "ellipsoidal":return a.vertCRS===b.vertCRS?0:3;default:return 4}}else return 1}else return 4}function h(a){return null==a||null!=a.heightModel&&null!=a.heightUnit}function c(a){var c=a.url&&n.parse(a.url);return null==(a.spatialReference&&a.spatialReference.vcsWkid)&&c&&"ImageServer"===c.serverType||!a.heightModelInfo?
  2041. ("hasZ"in a?!0===a.hasZ:m(a))?e.deriveUnitFromSR(b,a.spatialReference):null:a.heightModelInfo}function m(a){switch(a.type){case "elevation":case "integrated-mesh":case "point-cloud":case "scene":return!0}return!1}Object.defineProperty(f,"__esModule",{value:!0});f.validateWebSceneError=function(a,b){if(!a)return null;if(!h(a))return new p("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:a});var c=a.heightUnit;a=e.deriveUnitFromSR(a,
  2042. b).heightUnit;return c!==a?new p("webscene:incompatible-height-unit","The vertical units of the scene ("+c+") must match the horizontal units of the scene ("+a+")",{verticalUnit:c,horizontalUnit:a}):null};f.rejectLayerError=function(a,b,f){var g=c(a),h=l(g,b,f),n=null;if(g){var t=e.deriveUnitFromSR(g,a.spatialReference).heightUnit;f||t===g.heightUnit||(n=new p("layerview:unmatched-height-unit","The vertical units of the layer must match the horizontal units ("+t+")",{horizontalUnit:t}))}if(null==
  2043. a.heightModelInfo&&null==a.spatialReference&&("hasZ"in a?!0===a.hasZ:m(a))||4===h||n)return new p("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:g,error:n});n=null;switch(h){case 1:a=g.heightUnit||"unknown";f=b.heightUnit||"unknown";n=new p("layerview:incompatible-height-unit","The vertical units of the layer ("+a+") must match the vertical units of the scene ("+f+")",{layerUnit:a,sceneUnit:f});break;case 2:a=g.heightModel||
  2044. "unknown";f=b.heightModel||"unknown";n=new p("layerview:incompatible-height-model","The height model of the layer ("+a+") must match the height model of the scene ("+f+")",{layerHeightModel:a,sceneHeightModel:f});break;case 3:a=g.vertCRS||"unknown",f=b.vertCRS||"unknown",n=new p("layerview:incompatible-vertical-datum","The vertical datum of the layer ("+a+") must match the vertical datum of the scene ("+f+")",{layerDatum:a,sceneDatum:f})}return n?new p("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",
  2045. {layerHeightModelInfo:g,sceneHeightModelInfo:b,error:n}):null};f.deriveHeightModelInfoFromLayer=c;f.mayHaveHeightModelInfo=function(a){return null!=a.layers||m(a)||void 0!==a.hasZ||void 0!==a.heightModelInfo};var b=new e({heightModel:"gravity-related-height"})})},"esri/portal/support/geometryServiceUtils":function(){define("require exports ../../config ../../core/Error ../../core/promiseUtils ../Portal ../PortalItem ../../tasks/GeometryService ../../tasks/support/ProjectParameters".split(" "),function(a,
  2046. f,p,e,n,l,h,c,m){function b(a){void 0===a&&(a=null);if(p.geometryServiceUrl)return n.resolve(new c({url:p.geometryServiceUrl}));if(!a)return n.reject(new e("internal:geometry-service-url-not-configured"));var b;a.isInstanceOf(h)?b=a.portal||l.getDefault():a.isInstanceOf(l)&&(b=a);return b.load().then(function(a){if(a.helperServices&&a.helperServices.geometry&&a.helperServices.geometry.url)return n.resolve(new c({url:a.helperServices.geometry.url}));throw new e("internal:geometry-service-url-not-configured");
  2047. })}Object.defineProperty(f,"__esModule",{value:!0});f.create=b;f.projectGeometry=function(a,c,e){void 0===e&&(e=null);return b(e).then(function(b){var e=new m;e.geometries=[a];e.outSpatialReference=c;return b.project(e)}).then(function(a){return a&&Array.isArray(a)&&1===a.length?a[0]:n.reject()})}})},"esri/views/ViewAnimation":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/Deferred ../core/Accessor ../core/Error ../core/Promise ../core/promiseUtils ../core/scheduling ../core/accessorSupport/decorators".split(" "),
  2048. function(a,f,p,e,n,l,h,c,m,b,g){a=function(a){function c(b){b=a.call(this)||this;b.state="running";b.target=null;return b}p(c,a);c.prototype.initialize=function(){this._dfd=new n;this.addResolvingPromise(this._dfd.promise)};Object.defineProperty(c.prototype,"done",{get:function(){return"finished"===this.state||"stopped"===this.state},enumerable:!0,configurable:!0});c.prototype.stop=function(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","stopped"),b.schedule(this._dfd.reject.bind(this._dfd,
  2049. new h("ViewAnimation stopped"))))};c.prototype.finish=function(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","finished"),b.schedule(this._dfd.resolve))};c.prototype.update=function(a,b){b||(b=m.isThenable(a)?"waiting-for-target":"running");this._set("target",a);this._set("state",b)};e([g.property({readOnly:!0,dependsOn:["state"]})],c.prototype,"done",null);e([g.property({readOnly:!0,type:String})],c.prototype,"state",void 0);e([g.property()],c.prototype,"target",void 0);return c=
  2050. e([g.subclass("esri.views.ViewAnimation")],c)}(g.declared(l,c));(a||(a={})).State={RUNNING:"running",STOPPED:"stopped",FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"};return a})},"esri/widgets/Widget":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/dom dojo/_base/lang ../core/Accessor ../core/ArrayPool ../core/Collection ../core/Evented ../core/Handles ../core/Logger ../core/watchUtils ../core/accessorSupport/decorators maquette".split(" "),
  2051. function(a,f,p,e,n,l,h,c,m,b,g,t,u,v,x){var r=t.getLogger("esri.widgets.Widget"),w=0;return function(a){function b(b,c){b=a.call(this)||this;b._attached=!1;b.destroyed=!1;b.domNode=null;b.iconClass="esri-icon-checkbox-unchecked";b.visible=!0;b._internalHandles=new g;b.render=b.render.bind(b);return b}p(b,a);b.prototype.normalizeCtorArgs=function(a,b){a=l.mixin({},a);b&&(a.container=b);return a};b.prototype.initialize=function(){var a=this;this._internalHandles.add(this._renderableProps.map(function(b){return u.init(a,
  2052. b,function(a,c){var d=this;m.isCollection(c)&&this._internalHandles.remove(this.declaredClass+":"+b+"-collection-change-event-listener");m.isCollection(a)&&(a=a.on("change",function(){return d.scheduleRender()}),this._internalHandles.add(a,this.declaredClass+":"+b+"-collection-change-event-listener"));this.scheduleRender()})}));this._delegatedEventNames.length&&this._internalHandles.add(u.init(this,"viewModel",function(){a._get("viewModel")&&a._internalHandles.remove("delegated-events");a._delegatedEventNames.map(function(b){return a.viewModel.on(b,
  2053. function(c){a.emit(b,c)})})}),"delegated-events");this.postInitialize();this._internalHandles.add(u.whenOnce(this,"container",function(b){return a._attach(b)}))};b.prototype.postInitialize=function(){};b.prototype.destroy=function(){this.destroyed||(this.viewModel&&this.viewModel.destroy(),this._detach(this.container),this._internalHandles.destroy(),this._set("destroyed",!0))};b.prototype.startup=function(){r.warn("Widget.startup() is deprecated and no longer needed")};Object.defineProperty(b.prototype,
  2054. "container",{set:function(a){this._get("container")||this._set("container",a)},enumerable:!0,configurable:!0});b.prototype.castContainer=function(a){return n.byId(a)};Object.defineProperty(b.prototype,"id",{get:function(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+w++},set:function(a){a&&this._set("id",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"label",{get:function(){return this.declaredClass.split(".").pop()},enumerable:!0,configurable:!0});
  2055. b.prototype.scheduleRender=function(){this._projector.scheduleRender()};b.prototype.on=function(a,b){var c=this.inherited(arguments);this._internalHandles.add(c);return c};b.prototype.classes=function(a){for(var b=c.acquire(),d=0;d<arguments.length;d++){var e=arguments[d],f=typeof e;if("string"===f)b.push(e);else if(Array.isArray(e))b.push.apply(b,e);else if("object"===f)for(var g in e)e[g]&&b.push(g)}d=b.join(" ");c.release(b);return d};b.prototype.own=function(a){1<arguments.length&&(a=Array.prototype.slice.call(arguments));
  2056. this._internalHandles.add(a)};b.prototype.renderNow=function(){this._projector.renderNow()};b.prototype._attach=function(a){a&&(this._projector.merge(a,this.render),this._attached=!0)};b.prototype._detach=function(a){a&&this._attached&&(this._projector.detach(this.render),a.parentNode&&a.parentNode.removeChild(a),this._attached=!1)};e([v.shared(x.createProjector())],b.prototype,"_projector",void 0);e([v.shared([])],b.prototype,"_renderableProps",void 0);e([v.shared([])],b.prototype,"_delegatedEventNames",
  2057. void 0);e([v.property({value:null})],b.prototype,"container",null);e([v.cast("container")],b.prototype,"castContainer",null);e([v.property({readOnly:!0})],b.prototype,"destroyed",void 0);e([v.property({aliasOf:"container"})],b.prototype,"domNode",void 0);e([v.property({readOnly:!0})],b.prototype,"iconClass",void 0);e([v.property({dependsOn:["container"]})],b.prototype,"id",null);e([v.property({readOnly:!0})],b.prototype,"label",null);e([v.property()],b.prototype,"viewModel",void 0);e([v.property()],
  2058. b.prototype,"visible",void 0);return b=e([v.subclass("esri.widgets.Widget")],b)}(v.declared(h,b))})},"maquette/dist/maquette.umd":function(){(function(a,f){"object"===typeof exports&&"undefined"!==typeof module?f(exports):"function"===typeof define&&define.amd?define(["exports"],f):f(a.maquette={})})(this,function(a){var f=[],p=function(a,b){var c={};Object.keys(a).forEach(function(b){c[b]=a[b]});b&&Object.keys(b).forEach(function(a){c[a]=b[a]});return c},e=function(a,b){return a.vnodeSelector!==
  2059. b.vnodeSelector?!1:a.properties&&b.properties?a.properties.key!==b.properties.key?!1:a.properties.bind===b.properties.bind:!a.properties&&!b.properties},n=function(a){if("string"!==typeof a)throw Error("Style values must be strings");},l=function(a,b,c,d){var f=a[b];if(""!==f.vnodeSelector){var g=f.properties;if(!(g&&(void 0===g.key?g.bind:g.key)))for(g=0;g<a.length;g++)if(g!==b&&e(a[g],f))throw Error(c.vnodeSelector+" had a "+f.vnodeSelector+" child "+("added"===d?d:"removed")+", but there is now more than one. You must add unique key properties to make them distinguishable.");
  2060. }},h=[],c=!1,m=function(a){(a.children||[]).forEach(m);a.properties&&a.properties.afterRemoved&&a.properties.afterRemoved.apply(a.properties.bind||a.properties,[a.domNode])},b=function(){c=!1;h.forEach(m);h.length=0},g=function(a){h.push(a);c||(c=!0,"undefined"!==typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(b,{timeout:16}):setTimeout(b,16))},t=function(a){var b=a.domNode;if(a.properties){var c=a.properties.exitAnimation;if(c){b.style.pointerEvents="none";c(b,function(){b.parentNode&&
  2061. (b.parentNode.removeChild(b),g(a))},a.properties);return}}b.parentNode&&(b.parentNode.removeChild(b),g(a))},u=function(a,b,c){if(b)for(var d=c.eventHandlerInterceptor,e=Object.keys(b),f=e.length,g=function(f){f=e[f];var g=b[f];if("className"===f)throw Error('Property "className" is not supported, use "class".');if("class"===f)g.split(/\s+/).forEach(function(b){return a.classList.add(b)});else if("classes"===f){var h=Object.keys(g),k=h.length;for(f=0;f<k;f++){var l=h[f];g[l]&&a.classList.add(l)}}else if("styles"===
  2062. f)for(h=Object.keys(g),k=h.length,f=0;f<k;f++){var l=h[f],m=g[l];m&&(n(m),c.styleApplyer(a,l,m))}else"key"!==f&&null!==g&&void 0!==g&&(h=typeof g,"function"===h?0===f.lastIndexOf("on",0)&&(d&&(g=d(f,g,a,b)),"oninput"===f&&function(){var a=g;g=function(b){a.apply(this,[b]);b.target["oninput-value"]=b.target.value}}(),a[f]=g):"string"===h&&"value"!==f&&"innerHTML"!==f?"http://www.w3.org/2000/svg"===c.namespace&&"href"===f?a.setAttributeNS("http://www.w3.org/1999/xlink",f,g):a.setAttribute(f,g):a[f]=
  2063. g)},h=0;h<f;h++)g(h)},v=function(a,b,c){var d=b.children;if(d)for(var e=0;e<d.length;e++)x(d[e],a,void 0,c);b.text&&(a.textContent=b.text);u(a,b.properties,c);b.properties&&b.properties.afterCreate&&b.properties.afterCreate.apply(b.properties.bind||b.properties,[a,c,b.vnodeSelector,b.properties,b.children])},x=function(a,b,c,d){var e,f=0,g=a.vnodeSelector,h=b.ownerDocument;if(""===g)e=a.domNode=h.createTextNode(a.text),void 0!==c?b.insertBefore(e,c):b.appendChild(e);else{for(var k=0;k<=g.length;++k){var l=
  2064. g.charAt(k);if(k===g.length||"."===l||"#"===l)l=g.charAt(f-1),f=g.slice(f,k),"."===l?e.classList.add(f):"#"===l?e.id=f:("svg"===f&&(d=p(d,{namespace:"http://www.w3.org/2000/svg"})),void 0!==d.namespace?e=a.domNode=h.createElementNS(d.namespace,f):(e=a.domNode=a.domNode||h.createElement(f),"input"===f&&a.properties&&void 0!==a.properties.type&&e.setAttribute("type",a.properties.type)),void 0!==c?b.insertBefore(e,c):e.parentNode!==b&&b.appendChild(e)),f=k+1}v(e,a,d)}},r,w=function(a,b,c){b&&b.split(" ").forEach(function(b){return a.classList.toggle(b,
  2065. c)})};r=function(a,b,c){var d=a.domNode;if(a===b)return!1;var g=!1;if(""===b.vnodeSelector){if(b.text!==a.text)return a=d.ownerDocument.createTextNode(b.text),d.parentNode.replaceChild(a,d),b.domNode=a,!0;b.domNode=d}else{0===b.vnodeSelector.lastIndexOf("svg",0)&&(c=p(c,{namespace:"http://www.w3.org/2000/svg"}));a.text!==b.text&&(g=!0,void 0===b.text?d.removeChild(d.firstChild):d.textContent=b.text);b.domNode=d;var h;h=a.children;var k=b.children,m=c;if(h===k)h=!1;else{h=h||f;for(var k=k||f,q=h.length,
  2066. u=k.length,v=0,y=0,z=!1;y<u;){var B=v<q?h[v]:void 0,A=k[y];if(void 0!==B&&e(B,A))z=r(B,A,m)||z,v++;else{b:{var B=h,D=A;if(""!==D.vnodeSelector)for(var F=v+1;F<B.length;F++)if(e(B[F],D)){B=F;break b}B=-1}if(0<=B){for(;v<B;v++)t(h[v]),l(h,v,b,"removed");z=r(h[B],A,m)||z;v=B+1}else x(A,d,v<q?h[v].domNode:void 0,m),A.properties&&(B=A.properties.enterAnimation)&&B(A.domNode,A.properties),l(k,y,b,"added")}y++}if(q>v)for(;v<q;v++)t(h[v]),l(h,v,b,"removed");h=z}g=h||g;h=a.properties;k=b.properties;m=c;if(k){q=
  2067. !1;u=Object.keys(k);y=u.length;for(z=0;z<y;z++)if(B=u[z],A=k[B],v=h[B],"class"===B)v!==A&&(w(d,v,!1),w(d,A,!0));else if("classes"===B)for(var D=d.classList,F=Object.keys(A),C=F.length,B=0;B<C;B++){var V=F[B],P=!!A[V];P!==!!v[V]&&(q=!0,P?D.add(V):D.remove(V))}else if("styles"===B)for(D=Object.keys(A),F=D.length,B=0;B<F;B++)C=D[B],V=A[C],V!==v[C]&&(q=!0,V?(n(V),m.styleApplyer(d,C,V)):m.styleApplyer(d,C,""));else A||"string"!==typeof v||(A=""),"value"===B?(D=d[B],D!==A&&(d["oninput-value"]?D===d["oninput-value"]:
  2068. A!==v)&&(d[B]=A,d["oninput-value"]=void 0),A!==v&&(q=!0)):A!==v&&(v=typeof A,"function"===v&&m.eventHandlerInterceptor||("string"===v&&"innerHTML"!==B?"http://www.w3.org/2000/svg"===m.namespace&&"href"===B?d.setAttributeNS("http://www.w3.org/1999/xlink",B,A):"role"===B&&""===A?d.removeAttribute(B):d.setAttribute(B,A):d[B]!==A&&(d[B]=A),q=!0));h=q}else h=void 0;g=h||g;b.properties&&b.properties.afterUpdate&&b.properties.afterUpdate.apply(b.properties.bind||b.properties,[d,c,b.vnodeSelector,b.properties,
  2069. b.children])}g&&b.properties&&b.properties.updateAnimation&&b.properties.updateAnimation(d,b.properties,a.properties);return!1};var q=function(a,b){return{getLastRender:function(){return a},update:function(c){if(a.vnodeSelector!==c.vnodeSelector)throw Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var d=a;a=c;r(d,c,b)},domNode:a.domNode}},d={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,
  2070. styleApplyer:function(a,b,c){a.style[b]=c}},k={create:function(a,b){b=p(d,b);x(a,document.createElement("div"),void 0,b);return q(a,b)},append:function(a,b,c){c=p(d,c);x(b,a,void 0,c);return q(b,c)},insertBefore:function(a,b,c){c=p(d,c);x(b,a.parentNode,a,c);return q(b,c)},merge:function(a,b,c){c=p(d,c);b.domNode=a;v(a,b,c);return q(b,c)},replace:function(a,b,c){c=p(d,c);x(b,a.parentNode,a,c);a.parentNode.removeChild(a);return q(b,c)}},y=function(a,b,c){for(var d=0,e=b.length;d<e;d++){var f=b[d];
  2071. Array.isArray(f)?y(a,f,c):null!==f&&void 0!==f&&!1!==f&&("string"===typeof f&&(f={vnodeSelector:"",properties:void 0,children:void 0,text:f.toString(),domNode:null}),c.push(f))}},z;z=Array.prototype.find?function(a,b){return a.find(b)}:function(a,b){return a.filter(b)[0]};var A=function(a,b){var c=a;b.forEach(function(a){c=c&&c.children?z(c.children,function(b){return b.domNode===a}):void 0});return c},C=function(a,b,c){var d=function(d){c("domEvent",d);var e=b(),f;f=d.currentTarget;for(var g=e.domNode,
  2072. h=[];f!==g;)h.push(f),f=f.parentNode;f=h;f.reverse();e=A(e.getLastRender(),f);a.scheduleRender();var k;e&&(k=e.properties["on"+d.type].apply(e.properties.bind||this,arguments));c("domEventProcessed",d);return k};return function(a,b,c,e){return d}};a.dom=k;a.h=function(a,b,c){if(Array.isArray(b))c=b,b=void 0;else if(b&&("string"===typeof b||b.hasOwnProperty("vnodeSelector"))||c&&("string"===typeof c||c.hasOwnProperty("vnodeSelector")))throw Error("h called with invalid arguments");var d,e;void 0!==
  2073. c&&1===c.length&&"string"===typeof c[0]?d=c[0]:c&&(e=[],y(a,c,e),0===e.length&&(e=void 0));return{vnodeSelector:a,properties:b,children:e,text:""===d?void 0:d,domNode:null}};a.createProjector=function(a){var b,c=p(d,a),e=c.performanceLogger,f=!0,g,h=!1,l=[],m=[],n=function(a,d,f){var g;c.eventHandlerInterceptor=C(b,function(){return g},e);g=a(d,f(),c);l.push(g);m.push(f)},q=function(){g=void 0;if(f){f=!1;e("renderStart",void 0);for(var a=0;a<l.length;a++){var b=m[a]();e("rendered",void 0);l[a].update(b);
  2074. e("patched",void 0)}e("renderDone",void 0);f=!0}};return b={renderNow:q,scheduleRender:function(){g||h||(g=requestAnimationFrame(q))},stop:function(){g&&(cancelAnimationFrame(g),g=void 0);h=!0},resume:function(){h=!1;f=!0;b.scheduleRender()},append:function(a,b){n(k.append,a,b)},insertBefore:function(a,b){n(k.insertBefore,a,b)},merge:function(a,b){n(k.merge,a,b)},replace:function(a,b){n(k.replace,a,b)},detach:function(a){for(var b=0;b<m.length;b++)if(m[b]===a)return m.splice(b,1),l.splice(b,1)[0];
  2075. throw Error("renderFunction was not found");}}};a.createCache=function(){var a,b;return{invalidate:function(){a=b=void 0},result:function(c,d){if(a)for(var e=0;e<c.length;e++)a[e]!==c[e]&&(b=void 0);b||(b=d(),a=c);return b}}};a.createMapping=function(a,b,c){var d=[],e=[];return{results:e,map:function(f){for(var g=f.map(a),h=e.slice(),k=0,l=0;l<f.length;l++){var m=f[l],n=g[l];if(n===d[k])e[l]=h[k],c(m,h[k],l),k++;else{for(var p=!1,q=1;q<d.length+1;q++){var r=(k+q)%d.length;if(d[r]===n){e[l]=h[r];c(f[l],
  2076. h[r],l);k=r+1;p=!0;break}}p||(e[l]=b(m,l))}}e.length=f.length;d=g}}};Object.defineProperty(a,"__esModule",{value:!0})})},"esri/widgets/support/widget":function(){define("require exports ./decorators ./jsxFactory ./widgetUtils ../Widget".split(" "),function(a,f,p,e,n,l){function h(a){for(var c in a)f.hasOwnProperty(c)||(f[c]=a[c])}Object.defineProperty(f,"__esModule",{value:!0});h(p);h(e);h(n);f.isWidget=function(a){return a&&a instanceof l};f.isWidgetBase=function(a){return a&&"function"===typeof a.postMixInProperties&&
  2077. "function"===typeof a.buildRendering&&"function"===typeof a.postCreate&&"function"===typeof a.startup}})},"esri/widgets/support/decorators":function(){define(["require","exports","./decorators/accessibleHandler","./decorators/renderable","./decorators/vmEvent"],function(a,f,p,e,n){function l(a){for(var c in a)f.hasOwnProperty(c)||(f[c]=a[c])}Object.defineProperty(f,"__esModule",{value:!0});l(p);l(e);l(n)})},"esri/widgets/support/decorators/accessibleHandler":function(){define(["require","exports",
  2078. "dojo/keys"],function(a,f,p){function e(a){return function(e){for(var f=[],c=1;c<arguments.length;c++)f[c-1]=arguments[c];c=e.type;if(e instanceof KeyboardEvent||"keyup"===c||"keydown"===c||"keypress"===c){if(e.keyCode===p.ENTER||e.keyCode===p.SPACE)e.preventDefault(),e.target.click()}else a.call.apply(a,[this,e].concat(f))}}Object.defineProperty(f,"__esModule",{value:!0});f.accessibleHandler=function(){return function(a,f){return{value:e(a[f])}}}})},"esri/widgets/support/decorators/renderable":function(){define(["require",
  2079. "exports","./propUtils"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.renderable=function(a){var e="string"===typeof a?p.splitProps(a):a;return function(a,f){a._renderableProps||(a._renderableProps=[]);a=a._renderableProps;e?a.push.apply(a,p.normalizePropNames(e,f)):a.push(f)}}})},"esri/widgets/support/decorators/propUtils":function(){define(["require","exports"],function(a,f){Object.defineProperty(f,"__esModule",{value:!0});f.splitProps=function(a){return a.split(",").map(function(a){return a.trim()})};
  2080. f.normalizePropNames=function(a,e){return a.map(function(a){a=0===a.indexOf(e)?a:e+"."+a;return a})}})},"esri/widgets/support/decorators/vmEvent":function(){define(["require","exports","./propUtils"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.vmEvent=function(a){return function(e){e._delegatedEventNames||(e._delegatedEventNames=[]);var f=Array.isArray(a)?a:p.splitProps(a);e._delegatedEventNames=e._delegatedEventNames.concat(f)}}})},"esri/widgets/support/jsxFactory":function(){define(["require",
  2081. "exports","maquette-jsx"],function(a,f,p){Object.defineProperty(f,"__esModule",{value:!0});f.tsx=p.jsx})},"maquette-jsx/dist/maquette-jsx.umd":function(){(function(a,f){"object"===typeof exports&&"undefined"!==typeof module?f(exports):"function"===typeof define&&define.amd?define(["exports"],f):f(a.maquetteCssTransitions={})})(this,function(a){var f=function(a,n){for(var e=0,h=a.length;e<h;e++){var c=a[e];Array.isArray(c)?f(c,n):null!==c&&void 0!==c&&!1!==c&&(c.hasOwnProperty("vnodeSelector")||(c=
  2082. {vnodeSelector:"",properties:void 0,children:void 0,text:c.toString(),domNode:null}),n.push(c))}},p=function(a,n){for(var e=[],h=2;h<arguments.length;h++)e[h-2]=arguments[h];if(1===e.length&&"string"===typeof e[0])return{vnodeSelector:a,properties:n||void 0,children:void 0,text:e[0],domNode:null};h=[];f(e,h);return{vnodeSelector:a,properties:n||void 0,children:h,text:void 0,domNode:null}};a.jsx=p;a.enableGlobalJsx=function(){window.jsx=p};Object.defineProperty(a,"__esModule",{value:!0})})},"esri/widgets/support/widgetUtils":function(){define(["require",
  2083. "exports","dojo/has","../../core/Logger","maquette-css-transitions"],function(a,f,p,e,n){Object.defineProperty(f,"__esModule",{value:!0});e.getLogger("esri.widgets.support.widgetUtils");f.join=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];return a.join(" ")};f.isRtl=function(){return"rtl"===document.dir};f.storeNode=function(a){this[a.getAttribute("data-node-ref")]=a};f.cssTransition=function(a,e){return("enter"===a?n.createEnterCssTransition:n.createExitCssTransition)(e)}})},
  2084. "maquette-css-transitions/dist/maquette-css-transitions.umd":function(){(function(a,f){"object"===typeof exports&&"undefined"!==typeof module?f(exports):"function"===typeof define&&define.amd?define(["exports"],f):f(a.maquetteCssTransitions={})})(this,function(a){var f,p,e=function(a){if("WebkitTransition"in a.style)f="webkitTransitionEnd",p="webkitAnimationEnd";else if("transition"in a.style)f="transitionend",p="animationend";else throw Error("Your browser is not supported!");};a.createEnterCssTransition=
  2085. function(a,l){void 0===l&&(l=a+"-active");return function(h){f||e(h);var c=!1,m=function(b){c||(c=!0,h.removeEventListener(f,m),h.removeEventListener(p,m),h.classList.remove(a),h.classList.remove(l))};h.classList.add(a);h.addEventListener(f,m);h.addEventListener(p,m);requestAnimationFrame(function(){h.classList.add(l)})}};a.createExitCssTransition=function(a,l){void 0===l&&(l=a+"-active");return function(h,c){f||e(h);var m=!1,b=function(a){m||(m=!0,h.removeEventListener(f,b),h.removeEventListener(p,
  2086. b),c())};h.classList.add(a);h.addEventListener(f,b);h.addEventListener(p,b);requestAnimationFrame(function(){h.classList.add(l)})}};Object.defineProperty(a,"__esModule",{value:!0})})},"url:esri/core/request/iframe.html":'\x3c!DOCTYPE html\x3e\r\n\x3chtml\x3e\r\n\x3chead\x3e\r\n \x3cmeta http-equiv\x3d"Content-Security-Policy" content\x3d"default-src \'none\'; script-src * \'unsafe-inline\'"\x3e\r\n\r\n \x3cscript\x3e\r\n var dojoConfig \x3d {\r\n async: true,\r\n baseUrl: "../../../dojo/",\r\n has: {\r\n "csp-restrictions": true,\r\n "dojo-preload-i18n-Api": false\r\n }\r\n };\r\n \x3c/script\x3e\r\n \x3c!--\r\n This src is relative to this page and assumes dojo is a sibling to esri.\r\n It is updated when this file is set as the iframe\'s `srcdoc` value.\r\n --\x3e\r\n \x3cscript src\x3d"../../../dojo/dojo.js"\x3e\x3c/script\x3e\r\n\r\n \x3cscript\x3e\r\n function windowMessageHandler(event) {\r\n window.removeEventListener("message", windowMessageHandler);\r\n\r\n var port \x3d event.ports[0];\r\n\r\n require([\r\n "dojo/request/script"\r\n ], function(script) {\r\n port.postMessage("ready");\r\n\r\n port.addEventListener("message", function(event) {\r\n var data \x3d event.data;\r\n script.get(data.url, data.options)\r\n .then(function(response) {\r\n port.postMessage({\r\n id: data.id,\r\n response: response\r\n });\r\n })\r\n .catch(function(error) {\r\n port.postMessage({\r\n id: data.id,\r\n isError: true,\r\n message: error.message\r\n });\r\n });\r\n });\r\n port.start();\r\n });\r\n }\r\n\r\n window.addEventListener("message", windowMessageHandler);\r\n \x3c/script\x3e\r\n\x3c/head\x3e\r\n\x3cbody\x3e\r\n\x3c/body\x3e\r\n\x3c/html\x3e\r\n',
  2087. "*now":function(a){a(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});require.boot&&require.apply(null,require.boot);