// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.3/esri/copyright.txt for details.
//>>built
(function(a,h){var p,m=function(){},f=function(d){for(var k in d)return 0;return 1},e={}.toString,l=function(d){return"[object Function]"==e.call(d)},g=function(d){return"[object String]"==e.call(d)},c=function(d){return"[object Array]"==e.call(d)},b=function(d,k){if(d)for(var b=0;b<d.length;)k(d[b++])},q=function(d,k){for(var b in k)d[b]=k[b];return d},x=function(d,k){return q(Error(d),{src:"dojoLoader",info:k})},y=1,t=function(){return"_"+y++},u=function(d,k,b){return la(d,k,b,0,u)},r=this,n=r.document,
w=n&&n.createElement("DiV"),d=u.has=function(d){return l(k[d])?k[d]=k[d](r,n,w):k[d]},k=d.cache=h.hasCache;d.add=function(b,n,v,c){(void 0===k[b]||c)&&(k[b]=n);return v&&d(b)};d.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);d("host-webworker")&&(q(h.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1,"dojo-guarantee-console":0}),h.loaderPatch={injectUrl:function(d,k){try{importScripts(d),k()}catch(ib){console.info("failed to load resource ("+
d+")"),console.error(ib)}}});for(var v in a.has)d.add(v,a.has[v],0,1);u.async=1;var A=d("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");u.eval=function(d,k){return A(d+"\r\n//# sourceURL\x3d"+k)};var z={},D=u.signal=function(d,k){d=z[d];b(d&&d.slice(0),function(d){d.apply(null,c(k)?k:[k])})},B=u.on=function(d,k){var b=z[d]||(z[d]=[]);b.push(k);return{remove:function(){for(var d=0;d<b.length;d++)if(b[d]===k){b.splice(d,1);break}}}},C=[],F={},K=[],M={},E=u.map={},V=[],P=
{},I="",J={},Q={};v={};var S=0,ga=function(d){var k,b,n,v;for(k in Q)b=Q[k],(n=k.match(/^url\:(.+)/))?J["url:"+Ua(n[1],d)]=b:"*now"==k?v=b:"*noref"!=k&&(n=Fa(k,d,!0),J[n.mid]=J["url:"+n.url]=b);v&&v(ta(d));Q={}},L=function(d){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return"\\"+d})},R=function(d,k){k.splice(0,k.length);for(var b in d)k.push([b,d[b],new RegExp("^"+L(b)+"(/|$)"),b.length]);k.sort(function(d,k){return k[3]-d[3]});return k},U=function(d,k){b(d,function(d){k.push([g(d[0])?
new RegExp("^"+L(d[0])+"$"):d[0],d[1]])})},T=function(d){var k=d.name;k||(k=d,d={name:k});d=q({main:"main"},d);d.location=d.location?d.location:k;d.packageMap&&(E[k]=d.packageMap);d.main.indexOf("./")||(d.main=d.main.substring(2));M[k]=d},N=[],Z=function(n,v,c){for(var e in n){"waitSeconds"==e&&(u.waitms=1E3*(n[e]||0));"cacheBust"==e&&(I=n[e]?g(n[e])?n[e]:(new Date).getTime()+"":"");if("baseUrl"==e||"combo"==e)u[e]=n[e];n[e]!==k&&(u.rawConfig[e]=n[e],"has"!=e&&d.add("config-"+e,n[e],0,v))}u.baseUrl||
(u.baseUrl="./");/\/$/.test(u.baseUrl)||(u.baseUrl+="/");for(e in n.has)d.add(e,n.has[e],0,v);b(n.packages,T);for(var a in n.packagePaths)b(n.packagePaths[a],function(d){var k=a+"/"+d;g(d)&&(d={name:d});d.location=k;T(d)});R(q(E,n.map),V);b(V,function(d){d[1]=R(d[1],[]);"*"==d[0]&&(V.star=d)});R(q(F,n.paths),K);U(n.aliases,C);if(v)N.push({config:n.config});else for(e in n.config)v=Ka(e,c),v.config=q(v.config||{},n.config[e]);n.cache&&(ga(),Q=n.cache,n.cache["*noref"]&&ga());D("config",[n,u.rawConfig])};
if(d("dojo-cdn")){var H=n.getElementsByTagName("script");p=0;for(var O,aa,ba,X;p<H.length;)if(O=H[p++],(ba=O.getAttribute("src"))&&(X=ba.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(aa=X[3]||"",h.baseUrl=h.baseUrl||aa,S=O),ba=O.getAttribute("data-dojo-config")||O.getAttribute("djConfig"))v=u.eval("({ "+ba+" })","data-dojo-config"),S=O}u.rawConfig={};Z(h,1);d("dojo-cdn")&&((M.dojo.location=aa)&&(aa+="/"),M.dijit.location=aa+"../dijit/",M.dojox.location=aa+"../dojox/");Z(a,1);Z(v,1);var ea=function(d){G(function(){b(d.deps,
mb)})},la=function(d,k,b,n,v){var e;if(g(d)){if((e=Ka(d,n,!0))&&e.executed)return e.result;throw x("undefinedModule",d);}c(d)||(Z(d,0,n),d=k,k=b);if(c(d))if(d.length){b="require*"+t();for(var a,r=[],f=0;f<d.length;)a=d[f++],r.push(Ka(a,n));e=q(va("",b,0,""),{injected:2,deps:r,def:k||m,require:n?n.require:u,gc:1});P[e.mid]=e;ea(e);var l=ya&&!0;G(function(){ca(e,l)});e.executed||ma.push(e);ka()}else k&&k();return v},ta=function(d){if(!d)return u;var k=d.require;k||(k=function(b,n,v){return la(b,n,v,
d,k)},d.require=q(k,u),k.module=d,k.toUrl=function(k){return Ua(k,d)},k.toAbsMid=function(k){return Ra(k,d)});return k},ma=[],wa=[],na={},sa=function(d){d.injected=1;na[d.mid]=1;d.url&&(na[d.url]=d.pack||1);sb()},Ea=function(d){d.injected=2;delete na[d.mid];d.url&&delete na[d.url];f(na)&&Va()},pa=u.idle=function(){return!wa.length&&f(na)&&!ma.length&&!ya},qa=function(d,k){if(k)for(var b=0;b<k.length;b++)if(k[b][2].test(d))return k[b];return 0},ua=function(d){var k=[],b,n;for(d=d.replace(/\\/g,"/").split("/");d.length;)b=
d.shift(),".."==b&&k.length&&".."!=n?(k.pop(),n=k[k.length-1]):"."!=b&&k.push(n=b);return k.join("/")},va=function(d,k,b,n){return{pid:d,mid:k,pack:b,url:n,executed:0,def:0}},Ca=function(d,k,n,v,c,g,e,q,a){var r,t,f,u;u=/^\./.test(d);if(/(^\/)|(\:)|(\.js$)/.test(d)||u&&!k)return va(0,d,0,d);d=ua(u?k.mid+"/../"+d:d);if(/^\./.test(d))throw x("irrationalPath",d);k&&(f=qa(k.mid,g));(f=(f=f||g.star)&&qa(d,f[1]))&&(d=f[1]+d.substring(f[3]));k=(X=d.match(/^([^\/]+)(\/(.+))?$/))?X[1]:"";(r=n[k])?d=k+"/"+
(t=X[3]||r.main):k="";var w=0;b(q,function(k){var b=d.match(k[0]);b&&0<b.length&&(w=l(k[1])?d.replace(k[0],k[1]):k[1])});if(w)return Ca(w,0,n,v,c,g,e,q,a);if(n=v[d])return a?va(n.pid,n.mid,n.pack,n.url):v[d];v=(f=qa(d,e))?f[1]+d.substring(f[3]):k?r.location+"/"+t:d;/(^\/)|(\:)/.test(v)||(v=c+v);return va(k,d,r,ua(v+".js"))},Fa=function(d,k,b){return Ca(d,k,M,P,u.baseUrl,b?[]:V,b?[]:K,b?[]:C)},Aa=function(d,k,b){return d.normalize?d.normalize(k,function(d){return Ra(d,b)}):Ra(k,b)},W=0,Ka=function(d,
k,b){var n,v;(n=d.match(/^(.+?)\!(.*)$/))?(v=Ka(n[1],k,b),5!==v.executed||v.load||Qa(v),v.load?(n=Aa(v,n[2],k),d=v.mid+"!"+(v.dynamic?++W+"!":"")+n):(n=n[2],d=v.mid+"!"+ ++W+"!waitingForPlugin"),d={plugin:v,mid:d,req:ta(k),prid:n}):d=Fa(d,k);return P[d.mid]||!b&&(P[d.mid]=d)},Ra=u.toAbsMid=function(d,k){return Fa(d,k).mid},Ua=u.toUrl=function(d,k){k=Fa(d+"/x",k);var b=k.url;return oa(0===k.pid?d:b.substring(0,b.length-5))},La={injected:2,executed:5,def:3,result:3};aa=function(d){return P[d]=q({mid:d},
La)};var Sa=aa("require"),da=aa("exports"),Ja=aa("module"),za={},ja=0,Qa=function(d){var k=d.result;d.dynamic=k.dynamic;d.normalize=k.normalize;d.load=k.load;return d},xa=function(d){var k={};b(d.loadQ,function(b){var n=Aa(d,b.prid,b.req.module),v=d.dynamic?b.mid.replace(/waitingForPlugin$/,n):d.mid+"!"+n,n=q(q({},b),{mid:v,prid:n,injected:0});P[v]&&P[v].injected||Ba(P[v]=n);k[b.mid]=P[v];Ea(b);delete P[b.mid]});d.loadQ=0;var n=function(d){for(var b=d.deps||[],n=0;n<b.length;n++)(d=k[b[n].mid])&&
(b[n]=d)},v;for(v in P)n(P[v]);b(ma,n)},ra=function(d){u.trace("loader-finish-exec",[d.mid]);d.executed=5;d.defOrder=ja++;d.loadQ&&(Qa(d),xa(d));for(p=0;p<ma.length;)ma[p]===d?ma.splice(p,1):p++;/^require\*/.test(d.mid)&&delete P[d.mid]},Pa=[],ca=function(d,k){if(4===d.executed)return u.trace("loader-circular-dependency",[Pa.concat(d.mid).join("-\x3e")]),!d.def||k?za:d.cjs&&d.cjs.exports;if(!d.executed){if(!d.def)return za;var b=d.mid,n=d.deps||[],v,c=[],g=0;for(d.executed=4;v=n[g++];){v=v===Sa?ta(d):
v===da?d.cjs.exports:v===Ja?d.cjs:ca(v,k);if(v===za)return d.executed=0,u.trace("loader-exec-module",["abort",b]),za;c.push(v)}u.trace("loader-run-factory",[d.mid]);k=d.def;c=l(k)?k.apply(null,c):k;d.result=void 0===c&&d.cjs?d.cjs.exports:c;ra(d)}return d.result},ya=0,G=function(d){try{ya++,d()}catch(hb){throw hb;}finally{ya--}pa()&&D("idle",[])},ka=function(){ya||G(function(){for(var d,k,b=0;b<ma.length;)d=ja,k=ma[b],ca(k),d!=ja?b=0:b++})};void 0===d("dojo-loader-eval-hint-url")&&d.add("dojo-loader-eval-hint-url",
1);var oa="function"==typeof a.fixupUrl?a.fixupUrl:function(d){d+="";return d+(I?(/\?/.test(d)?"\x26":"?")+I:"")},Ba=function(d){var k=d.plugin;5!==k.executed||k.load||Qa(k);var b=function(k){d.result=k;Ea(d);ra(d);ka()};k.load?k.load(d.prid,d.req,b):k.loadQ?k.loadQ.push(d):(k.loadQ=[d],ma.unshift(k),mb(k))},ha=0,ia=0,Y=0,tb=function(k,b){d("config-stripStrict")&&(k=k.replace(/(["'])use strict\1/g,""));Y=1;k===ha?ha.call(null):u.eval(k,d("dojo-loader-eval-hint-url")?b.url:b.mid);Y=0},mb=function(k){var b=
k.mid,n=k.url;if(!(k.executed||k.injected||na[b]||k.url&&(k.pack&&na[k.url]===k.pack||1==na[k.url])))if(sa(k),k.plugin)Ba(k);else{var v=function(){ub(k);if(2!==k.injected){if(d("dojo-enforceDefine")){D("error",x("noDefine",k));return}Ea(k);q(k,La);u.trace("loader-define-nonmodule",[k.url])}ka()};(ha=J[b]||J["url:"+k.url])?(u.trace("loader-inject",["cache",k.mid,n]),tb(ha,k),v()):(u.trace("loader-inject",["script",k.mid,n]),ia=k,u.injectUrl(oa(n),v,k),ia=0)}},jb=function(d,k,b){u.trace("loader-define-module",
[d.mid,k]);if(2===d.injected)return D("error",x("multipleDefine",d)),d;q(d,{deps:k,def:b,cjs:{id:d.mid,uri:d.url,exports:d.result={},setExports:function(k){d.cjs.exports=k},config:function(){return d.config}}});for(var n=0;k[n];n++)k[n]=Ka(k[n],d);Ea(d);l(b)||k.length||(d.result=b,ra(d));return d},ub=function(d,k){for(var n=[],v,c;wa.length;)c=wa.shift(),k&&(c[0]=k.shift()),v=c[0]&&Ka(c[0])||d,n.push([v,c[1],c[2]]);ga(d);b(n,function(d){ea(jb.apply(null,d))})},Va=m,sb=m;d("dom")&&d.add("ie-event-behavior",
n.attachEvent&&"undefined"===typeof Windows&&("undefined"===typeof opera||"[object Opera]"!=opera.toString()));if(d("dom")){var ob=function(k,b,n,v){if(d("ie-event-behavior"))return k.attachEvent(n,v),function(){k.detachEvent(n,v)};k.addEventListener(b,v,!1);return function(){k.removeEventListener(b,v,!1)}},vb=ob(window,"load","onload",function(){u.pageLoaded=1;try{"complete"!=n.readyState&&(n.readyState="complete")}catch(lb){}vb()}),H=n.getElementsByTagName("script");for(p=0;!S;)/^dojo/.test((O=
H[p++])&&O.type)||(S=O);u.injectUrl=function(d,k,b){b=b.node=n.createElement("script");var v=ob(b,"load","onreadystatechange",function(d){d=d||window.event;var b=d.target||d.srcElement;if("load"===d.type||/complete|loaded/.test(b.readyState))v(),c(),k&&k()}),c=ob(b,"error","onerror",function(k){v();c();D("error",x("scriptError",[d,k]))});b.type="text/javascript";b.charset="utf-8";b.src=d;S.parentNode.insertBefore(b,S);return b}}u.log=m;u.trace=m;O=function(k,b,n){var v=arguments.length,c=["require",
"exports","module"],e=[0,k,b];1==v?e=[0,l(k)?c:[],k]:2==v&&g(k)?e=[k,l(b)?c:[],b]:3==v&&(e=[k,b,n]);u.trace("loader-define",e.slice(0,2));if((v=e[0]&&Ka(e[0]))&&!na[v.mid])ea(jb(v,e[1],e[2]));else if(d("ie-event-behavior")&&d("host-browser")&&!Y){v=v||ia;if(!v)for(k in na)if((c=P[k])&&c.node&&"interactive"===c.node.readyState){v=c;break}v?(ga(v),ea(jb(v,e[1],e[2]))):D("error",x("ieDefineFailed",e[0]));ka()}else wa.push(e)};O.amd={vendor:"dojotoolkit.org"};q(q(u,h.loaderPatch),a.loaderPatch);B("error",
function(d){try{if(console.error(d),d instanceof Error){for(var k in d)console.log(k+":",d[k]);console.log(".")}}catch(ib){}});q(u,{uid:t,cache:J,packs:M});r.define||(r.define=O,r.require=u,b(N,function(d){Z(d)}),B=v.deps||a.deps||h.deps,a=v.callback||a.callback||h.callback,u.boot=B||a?[B||[],a]:0)})(this.dojoConfig||this.djConfig||this.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) + '//' + "js.arcgis.com/4.3/dojo",hasCache:{"config-deferredInstrumentation":0,"config-selectorEngine":"acme","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,dom:1,"host-browser":1},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",name:"esri"},{location:"../moment",
main:"moment",name:"moment"}]});
require({cache:{"dojo/domReady":function(){define(["./has"],function(a){function h(b){c.push(b);g&&p()}function p(){if(!b){for(b=!0;c.length;)try{c.shift()(f)}catch(r){console.error(r,"in domReady callback",r.stack)}b=!1;h._onQEmpty()}}var m=function(){return this}(),f=document,e={loaded:1,complete:1},l="string"!=typeof f.readyState,g=!!e[f.readyState],c=[],b;h.load=function(b,n,c){h(c)};h._Q=c;h._onQEmpty=function(){};l&&(f.readyState="loading");if(!g){var q=[],x=function(b){b=b||m.event;g||"readystatechange"==
b.type&&!e[f.readyState]||(l&&(f.readyState="complete"),g=1,p())},y=function(b,n){b.addEventListener(n,x,!1);c.push(function(){b.removeEventListener(n,x,!1)})};if(!a("dom-addeventlistener")){var y=function(b,n){n="on"+n;b.attachEvent(n,x);c.push(function(){b.detachEvent(n,x)})},t=f.createElement("div");try{t.doScroll&&null===m.frameElement&&q.push(function(){try{return t.doScroll("left"),1}catch(r){}})}catch(r){}}y(f,"DOMContentLoaded");y(m,"load");"onreadystatechange"in f?y(f,"readystatechange"):
l||q.push(function(){return e[f.readyState]});if(q.length){var u=function(){if(!g){for(var b=q.length;b--;)if(q[b]()){x("poller");return}setTimeout(u,30)}};u()}}return h})},"dojo/has":function(){define(["require","module"],function(a,h){var p=a.has||function(){};if(!p("dojo-has-api")){a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document;var m=function(){return this}(),f=a&&document,e=f&&f.createElement("DiV"),
l=h.config&&h.config()||{},p=function(g){return"function"==typeof l[g]?l[g]=l[g](m,f,e):l[g]};p.cache=l;p.add=function(g,c,b,e){("undefined"==typeof l[g]||e)&&(l[g]=c);return b&&p(g)};p.add("host-browser",a);p.add("dom",a)}p("host-browser")&&(p.add("dom-addeventlistener",!!document.addEventListener),p.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),p.add("touch-events","ontouchstart"in document),p.add("pointer-events",
"pointerEnabled"in window.navigator?window.navigator.pointerEnabled:"PointerEvent"in window),p.add("MSPointer",window.navigator.msPointerEnabled),p.add("touch-action",p("touch")&&p("pointer-events")),p.add("device-width",screen.availWidth||innerWidth),h=document.createElement("form"),p.add("dom-attributes-explicit",0==h.attributes.length),p.add("dom-attributes-specified-flag",0<h.attributes.length&&40>h.attributes.length));p.clearElement=function(g){g.innerHTML="";return g};p.normalize=function(g,
c){var b=g.match(/[\?:]|[^:\?]*/g),e=0,a=function(c){var g=b[e++];if(":"==g)return 0;if("?"==b[e++]){if(!c&&p(g))return a();a(!0);return a(c)}return g||0};return(g=a())&&c(g)};p.load=function(g,c,b){g?c([g],b):b()};return p})},"dojo/io/script":function(){define("../_base/connect ../_base/kernel ../_base/lang ../sniff ../_base/window ../_base/xhr ../dom ../dom-construct ../request/script ../aspect".split(" "),function(a,h,p,m,f,e,l,g,c,b){h.deprecated("dojo/io/script","Use dojo/request/script.","2.0");
var q={get:function(g){var a,t=this._makeScriptDeferred(g,function(b){a&&a.cancel()}),f=t.ioArgs;e._ioAddQueryToUrl(f);e._ioNotifyStart(t);a=c.get(f.url,{timeout:g.timeout,jsonp:f.jsonp,checkString:g.checkString,ioArgs:f,frameDoc:g.frameDoc,canAttach:function(b){f.requestId=b.id;f.scriptId=b.scriptId;f.canDelete=b.canDelete;return q._canAttach(f)}},!0);b.around(a,"isValid",function(b){return function(n){q._validCheck(t);return b.call(this,n)}});a.then(function(){t.resolve(t)}).otherwise(function(b){t.ioArgs.error=
b;t.reject(b)});return t},attach:c._attach,remove:c._remove,_makeScriptDeferred:function(b,g){g=e._ioSetArgs(b,g||this._deferredCancel,this._deferredOk,this._deferredError);var a=g.ioArgs;a.id=h._scopeName+"IoScript"+(b.callbackSuffix||this._counter++);a.canDelete=!1;a.jsonp=b.callbackParamName||b.jsonp;a.jsonp&&(a.query=a.query||"",0<a.query.length&&(a.query+="\x26"),a.query+=a.jsonp+"\x3d"+(b.frameDoc?"parent.":"")+h._scopeName+".io.script.jsonp_"+a.id+"._jsonpCallback",a.frameDoc=b.frameDoc,a.canDelete=
!0,g._jsonpCallback=this._jsonpCallback,this["jsonp_"+a.id]=g);g.addBoth(function(b){a.canDelete&&(b instanceof Error?q["jsonp_"+a.id]._jsonpCallback=function(){delete q["jsonp_"+a.id];if(a.requestId)h.global[c._callbacksProperty][a.requestId]()}:q._addDeadScript(a))});return g},_deferredCancel:function(b){b.canceled=!0},_deferredOk:function(b){b=b.ioArgs;return b.json||b.scriptLoaded||b},_deferredError:function(b,c){console.log("dojo.io.script error",b);return b},_deadScripts:[],_counter:1,_addDeadScript:function(b){q._deadScripts.push({id:b.id,
frameDoc:b.frameDoc});b.frameDoc=null},_validCheck:function(b){if((b=q._deadScripts)&&0<b.length){for(var c=0;c<b.length;c++)q.remove(b[c].id,b[c].frameDoc),delete q["jsonp_"+b[c].id],b[c].frameDoc=null;q._deadScripts=[]}return!0},_ioCheck:function(b){b=b.ioArgs;return b.json||b.scriptLoaded&&!b.args.checkString?!0:(b=b.args.checkString)&&eval("typeof("+b+") !\x3d 'undefined'")},_resHandle:function(b){q._ioCheck(b)?b.callback(b):b.errback(Error("inconceivable dojo.io.script._resHandle error"))},_canAttach:function(){return!0},
_jsonpCallback:function(b){this.ioArgs.json=b;if(this.ioArgs.requestId)h.global[c._callbacksProperty][this.ioArgs.requestId](b)}};p.setObject("dojo.io.script",q);return q})},"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(a,h,p,m,f,e,l,g){function c(b,n,c,d,k){d=g.hitch(c,d);if(!b||!b.addEventListener&&!b.attachEvent)return m.after(b||a.global,n,d,!0);"string"==typeof n&&"on"==n.substring(0,2)&&(n=n.substring(2));
b||(b=a.global);if(!k)switch(n){case "keypress":n=t;break;case "mouseenter":n=e.enter;break;case "mouseleave":n=e.leave}return h(b,n,d,k)}function b(b){b.keyChar=b.charCode?String.fromCharCode(b.charCode):"";b.charOrCode=b.keyChar||b.keyCode}l.add("events-keypress-typed",function(){var b={charCode:0};try{b=document.createEvent("KeyboardEvent"),(b.initKeyboardEvent||b.initKeyEvent).call(b,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(n){}return 0==b.charCode&&!l("opera")});var q={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},x=l("mac")?"metaKey":"ctrlKey",y=function(c,n){n=g.mixin({},c,n);b(n);n.preventDefault=function(){c.preventDefault()};n.stopPropagation=function(){c.stopPropagation()};return n},t;t=l("events-keypress-typed")?function(b,n){var c=h(b,"keydown",function(d){var k=d.keyCode,b=13!=k&&32!=k&&(27!=k||!l("ie"))&&(48>k||90<k)&&(96>k||111<k)&&(186>k||192<k)&&(219>k||222<k)&&229!=k;if(b||d.ctrlKey){b=b?0:k;if(d.ctrlKey){if(3==k||
13==k)return n.call(d.currentTarget,d);b=95<b&&106>b?b-48:!d.shiftKey&&65<=b&&90>=b?b+32:q[b]||b}k=y(d,{type:"keypress",faux:!0,charCode:b});n.call(d.currentTarget,k);if(l("ie"))try{d.keyCode=k.keyCode}catch(z){}}}),d=h(b,"keypress",function(d){var k=d.charCode;d=y(d,{charCode:32<=k?k:0,faux:!0});return n.call(this,d)});return{remove:function(){c.remove();d.remove()}}}:l("opera")?function(b,n){return h(b,"keypress",function(b){var d=b.which;3==d&&(d=99);d=32>d&&!b.shiftKey?0:d;b.ctrlKey&&!b.shiftKey&&
65<=d&&90>=d&&(d+=32);return n.call(this,y(b,{charCode:d}))})}:function(c,n){return h(c,"keypress",function(c){b(c);return n.call(this,c)})};var u={_keypress:t,connect:function(b,n,g,d,k){var v=arguments,e=[],q=0;e.push("string"==typeof v[0]?null:v[q++],v[q++]);var a=v[q+1];e.push("string"==typeof a||"function"==typeof a?v[q++]:null,v[q++]);for(a=v.length;q<a;q++)e.push(v[q]);return c.apply(this,e)},disconnect:function(b){b&&b.remove()},subscribe:function(b,n,c){return p.subscribe(b,g.hitch(n,c))},
publish:function(b,n){return p.publish.apply(p,[b].concat(n))},connectPublisher:function(b,n,c){var d=function(){u.publish(b,arguments)};return c?u.connect(n,c,d):u.connect(n,d)},isCopyKey:function(b){return b[x]}};u.unsubscribe=u.disconnect;g.mixin(a,u);return u})},"dojo/_base/kernel":function(){define(["../has","./config","require","module"],function(a,h,p,m){var f,e=function(){return this}(),l={},g={},c={config:h,global:e,dijit:l,dojox:g},l={dojo:["dojo",c],dijit:["dijit",l],dojox:["dojox",g]};
m=p.map&&p.map[m.id.match(/[^\/]+/)[0]];for(f in m)l[f]?l[f][0]=m[f]:l[f]=[m[f],{}];for(f in l)m=l[f],m[1]._scopeName=m[0],h.noGlobals||(e[m[0]]=m[1]);c.scopeMap=l;c.baseUrl=c.config.baseUrl=p.baseUrl;c.isAsync=p.async;c.locale=h.locale;h="$Rev: a1e2d9d $".match(/[0-9a-f]{7,}/);c.version={major:1,minor:12,patch:1,flag:"",revision:h?h[0]:NaN,toString:function(){var b=c.version;return b.major+"."+b.minor+"."+b.patch+b.flag+" ("+b.revision+")"}};a("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(c);
c.exit=function(){};a("host-webworker");a.add("console-as-object",function(){return Function.prototype.bind&&console&&"object"===typeof console.log});"undefined"!=typeof console||(console={});p="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var b;for(h=0;b=p[h++];)console[b]?a("console-as-object")&&(console[b]=Function.prototype.bind.call(console[b],console)):function(){var c=b+"";console[c]="log"in console?function(){var b=Array.prototype.slice.call(arguments);
b.unshift(c+":");console.log(b.join(" "))}:function(){};console[c]._fake=!0}();c.deprecated=c.experimental=function(){};c._hasResource={};return c})},"dojo/_base/config":function(){define(["../has","require"],function(a,h){a={};h=h.rawConfig;for(var p in h)a[p]=h[p];!a.locale&&"undefined"!=typeof navigator&&(p=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(a.locale=p.toLowerCase());return a})},"dojo/on":function(){define(["./has!dom-addeventlistener?:./aspect",
"./_base/kernel","./sniff"],function(a,h,p){function m(d,k,b,n,v){if(n=k.match(/(.*):(.*)/))return k=n[2],n=n[1],g.selector(n,k).call(v,d,b);p("touch")&&(c.test(k)&&(b=z(b)),p("event-orientationchange")||"orientationchange"!=k||(k="resize",d=window,b=z(b)));t&&(b=t(b));if(d.addEventListener){var e=k in x,q=e?x[k]:k;d.addEventListener(q,b,e);return{remove:function(){d.removeEventListener(q,b,e)}}}if(w&&d.attachEvent)return w(d,"on"+k,b);throw Error("Target must be an event emitter");}function f(){this.cancelable=
!1;this.defaultPrevented=!0}function e(){this.bubbles=!1}if(p("dom")){var l=window.ScriptEngineMajorVersion;p.add("jscript",l&&l()+ScriptEngineMinorVersion()/10);p.add("event-orientationchange",p("touch")&&!p("android"));p.add("event-stopimmediatepropagation",window.Event&&!!window.Event.prototype&&!!window.Event.prototype.stopImmediatePropagation);p.add("event-focusin",function(d,k,b){return"onfocusin"in b});p("touch")&&p.add("touch-can-modify-event-delegate",function(){var d=function(){};d.prototype=
document.createEvent("MouseEvents");try{var k=new d;k.target=null;return null===k.target}catch(C){return!1}})}var g=function(d,k,b,n){return"function"!=typeof d.on||"function"==typeof k||d.nodeType?g.parse(d,k,b,m,n,this):d.on(k,b)};g.pausable=function(d,k,b,n){var v;d=g(d,k,function(){if(!v)return b.apply(this,arguments)},n);d.pause=function(){v=!0};d.resume=function(){v=!1};return d};g.once=function(d,k,b,n){var v=g(d,k,function(){v.remove();return b.apply(this,arguments)});return v};g.parse=function(d,
k,b,n,v,c){var e;if(k.call)return k.call(c,d,b);k instanceof Array?e=k:-1<k.indexOf(",")&&(e=k.split(/\s*,\s*/));if(e){var q=[];k=0;for(var a;a=e[k++];)q.push(g.parse(d,a,b,n,v,c));q.remove=function(){for(var d=0;d<q.length;d++)q[d].remove()};return q}return n(d,k,b,v,c)};var c=/^touch/;g.matches=function(d,k,b,n,v){v=v&&"function"==typeof v.matches?v:h.query;n=!1!==n;1!=d.nodeType&&(d=d.parentNode);for(;!v.matches(d,k,b);)if(d==b||!1===n||!(d=d.parentNode)||1!=d.nodeType)return!1;return d};g.selector=
function(d,k,b){return function(n,v){function c(k){return g.matches(k,d,n,b,e)}var e="function"==typeof d?{matches:d}:this,q=k.bubble;return q?g(n,q(c),v):g(n,k,function(d){var k=c(d.target);if(k)return d.selectorTarget=k,v.call(k,d)})}};var b=[].slice,q=g.emit=function(d,k,n){var v=b.call(arguments,2),c="on"+k;if("parentNode"in d){var g=v[0]={},q;for(q in n)g[q]=n[q];g.preventDefault=f;g.stopPropagation=e;g.target=d;g.type=k;n=g}do d[c]&&d[c].apply(d,v);while(n&&n.bubbles&&(d=d.parentNode));return n&&
n.cancelable&&n},x=p("event-focusin")?{}:{focusin:"focus",focusout:"blur"};if(!p("event-stopimmediatepropagation"))var y=function(){this.modified=this.immediatelyStopped=!0},t=function(d){return function(k){if(!k.immediatelyStopped)return k.stopImmediatePropagation=y,d.apply(this,arguments)}};if(p("dom-addeventlistener"))g.emit=function(d,k,b){if(d.dispatchEvent&&document.createEvent){var n=(d.ownerDocument||document).createEvent("HTMLEvents");n.initEvent(k,!!b.bubbles,!!b.cancelable);for(var v in b)v in
n||(n[v]=b[v]);return d.dispatchEvent(n)&&n}return q.apply(g,arguments)};else{g._fixEvent=function(b,n){b||(b=(n&&(n.ownerDocument||n.document||n).parentWindow||window).event);if(!b)return b;try{u&&b.type==u.type&&b.srcElement==u.target&&(b=u)}catch(C){}if(!b.target)switch(b.target=b.srcElement,b.currentTarget=n||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=d,b.preventDefault=k),b.type){case "keypress":n=
"charCode"in b?b.charCode:b.keyCode,10==n?(n=0,b.keyCode=13):13==n||27==n?n=0:3==n&&(n=99),b.charCode=n,n=b,n.keyChar=n.charCode?String.fromCharCode(n.charCode):"",n.charOrCode=n.keyChar||n.keyCode}return b};var u,r=function(d){this.handle=d};r.prototype.remove=function(){delete _dojoIEListeners_[this.handle]};var n=function(d){return function(k){k=g._fixEvent(k,this);var b=d.call(this,k);k.modified&&(u||setTimeout(function(){u=null}),u=k);return b}},w=function(d,k,b){b=n(b);if(((d.ownerDocument?
d.ownerDocument.parentWindow:d.parentWindow||d.window||window)!=top||5.8>p("jscript"))&&!p("config-_allow_leaks")){"undefined"==typeof _dojoIEListeners_&&(_dojoIEListeners_=[]);var v=d[k];if(!v||!v.listeners){var c=v,v=Function("event","var callee \x3d arguments.callee; for(var i \x3d 0; i\x3ccallee.listeners.length; i++){var listener \x3d _dojoIEListeners_[callee.listeners[i]]; if(listener){listener.call(this,event);}}");v.listeners=[];d[k]=v;v.global=this;c&&v.listeners.push(_dojoIEListeners_.push(c)-
1)}v.listeners.push(d=v.global._dojoIEListeners_.push(b)-1);return new r(d)}return a.after(d,k,b,!0)},d=function(){this.cancelBubble=!0},k=g._preventDefault=function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey)try{this.keyCode=0}catch(D){}this.defaultPrevented=!0;this.returnValue=!1;this.modified=!0}}if(p("touch"))var v=function(){},A=window.orientation,z=function(d){return function(k){var b=k.corrected;if(!b){var n=k.type;try{delete k.type}catch(E){}if(k.type){if(p("touch-can-modify-event-delegate"))v.prototype=
k,b=new v;else{var b={},c;for(c in k)b[c]=k[c]}b.preventDefault=function(){k.preventDefault()};b.stopPropagation=function(){k.stopPropagation()}}else b=k,b.type=n;k.corrected=b;if("resize"==n){if(A==window.orientation)return null;A=window.orientation;b.type="orientationchange";return d.call(this,b)}"rotation"in b||(b.rotation=0,b.scale=1);var n=b.changedTouches[0],g;for(g in n)delete b[g],b[g]=n[g]}return d.call(this,b)}};return g})},"dojo/sniff":function(){define(["./has"],function(a){if(a("host-browser")){var h=
navigator,p=h.userAgent,h=h.appVersion,m=parseFloat(h);a.add("air",0<=p.indexOf("AdobeAIR"));a.add("wp",parseFloat(p.split("Windows Phone")[1])||void 0);a.add("msapp",parseFloat(p.split("MSAppHost/")[1])||void 0);a.add("khtml",0<=h.indexOf("Konqueror")?m:void 0);a.add("edge",parseFloat(p.split("Edge/")[1])||void 0);a.add("opr",parseFloat(p.split("OPR/")[1])||void 0);a.add("webkit",!a("wp")&&!a("edge")&&parseFloat(p.split("WebKit/")[1])||void 0);a.add("chrome",!a("edge")&&!a("opr")&&parseFloat(p.split("Chrome/")[1])||
void 0);a.add("android",!a("wp")&&parseFloat(p.split("Android ")[1])||void 0);a.add("safari",!(0<=h.indexOf("Safari"))||a("wp")||a("chrome")||a("android")||a("edge")||a("opr")?void 0:parseFloat(h.split("Version/")[1]));a.add("mac",0<=h.indexOf("Macintosh"));a.add("quirks","BackCompat"==document.compatMode);if(!a("wp")&&p.match(/(iPhone|iPod|iPad)/)){var f=RegExp.$1.replace(/P/,"p"),e=p.match(/OS ([\d_]+)/)?RegExp.$1:"1",e=parseFloat(e.replace(/_/,".").replace(/_/g,""));a.add(f,e);a.add("ios",e)}a.add("bb",
(0<=p.indexOf("BlackBerry")||0<=p.indexOf("BB10"))&&parseFloat(p.split("Version/")[1])||void 0);a.add("trident",parseFloat(h.split("Trident/")[1])||void 0);a.add("svg","undefined"!==typeof SVGAngle);a("webkit")||(0<=p.indexOf("Opera")&&a.add("opera",9.8<=m?parseFloat(p.split("Version/")[1])||m:m),!(0<=p.indexOf("Gecko"))||a("wp")||a("khtml")||a("trident")||a("edge")||a.add("mozilla",m),a("mozilla")&&a.add("ff",parseFloat(p.split("Firefox/")[1]||p.split("Minefield/")[1])||void 0),document.all&&!a("opera")&&
(p=parseFloat(h.split("MSIE ")[1])||void 0,(h=document.documentMode)&&5!=h&&Math.floor(p)!=h&&(p=h),a.add("ie",p)),a.add("wii","undefined"!=typeof opera&&opera.wiiremote))}return a})},"dojo/topic":function(){define(["./Evented"],function(a){var h=new a;return{publish:function(a,m){return h.emit.apply(h,arguments)},subscribe:function(a,m){return h.on.apply(h,arguments)}}})},"dojo/Evented":function(){define(["./aspect","./on"],function(a,h){function p(){}var m=a.after;p.prototype={on:function(a,e){return h.parse(this,
a,e,function(a,g){return m(a,"on"+g,e,!0)})},emit:function(a,e){var f=[this];f.push.apply(f,arguments);return h.emit.apply(h,f)}};return p})},"dojo/aspect":function(){define([],function(){function a(e,g,c,b){var q=e[g],a="around"==g,f;if(a){var t=c(function(){return q.advice(this,arguments)});f={remove:function(){t&&(t=e=c=null)},advice:function(b,c){return t?t.apply(b,c):q.advice(b,c)}}}else f={remove:function(){if(f.advice){var b=f.previous,q=f.next;q||b?(b?b.next=q:e[g]=q,q&&(q.previous=b)):delete e[g];
e=c=f.advice=null}},id:e.nextId++,advice:c,receiveArguments:b};if(q&&!a)if("after"==g){for(;q.next&&(q=q.next););q.next=f;f.previous=q}else"before"==g&&(e[g]=f,f.next=q,q.previous=f);else e[g]=f;return f}function h(e){return function(g,c,b,q){var f=g[c],l;f&&f.target==g||(g[c]=l=function(){for(var b=l.nextId,c=arguments,g=l.before;g;)g.advice&&(c=g.advice.apply(this,c)||c),g=g.next;if(l.around)var n=l.around.advice(this,c);for(g=l.after;g&&g.id<b;){if(g.advice)if(g.receiveArguments)var e=g.advice.apply(this,
c),n=e===p?n:e;else n=g.advice.call(this,n,c);g=g.next}return n},f&&(l.around={advice:function(b,c){return f.apply(b,c)}}),l.target=g,l.nextId=l.nextId||0);g=a(l||f,e,b,q);b=null;return g}}var p,m=h("after"),f=h("before"),e=h("around");return{before:f,around:e,after:m}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(a,h,p,m){if(h._fixEvent){var f=h._fixEvent;h._fixEvent=function(e,g){(e=f(e,g))&&m.normalizeEvent(e);return e}}var e={fix:function(e,g){return h._fixEvent?
h._fixEvent(e,g):e},stop:function(e){p("dom-addeventlistener")||e&&e.preventDefault?(e.preventDefault(),e.stopPropagation()):(e=e||window.event,e.cancelBubble=!0,h._preventDefault.call(e))}};a.fixEvent=e.fix;a.stopEvent=e.stop;return e})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(a,h,p,m){function f(b,c,e,g,a,f){f=f||"px";b=b.style;isNaN(c)||(b.left=c+f);isNaN(e)||(b.top=e+f);0<=g&&(b.width=g+f);0<=a&&(b.height=a+f)}function e(b){return"button"==
b.tagName.toLowerCase()||"input"==b.tagName.toLowerCase()&&"button"==(b.getAttribute("type")||"").toLowerCase()}function l(b){return"border-box"==g.boxModel||"table"==b.tagName.toLowerCase()||e(b)}var g={boxModel:"content-box"};a("ie")&&(g.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");g.getPadExtents=function(b,c){b=p.byId(b);var e=c||m.getComputedStyle(b),g=m.toPixelValue;c=g(b,e.paddingLeft);var q=g(b,e.paddingTop),a=g(b,e.paddingRight);b=g(b,e.paddingBottom);return{l:c,
t:q,r:a,b:b,w:c+a,h:q+b}};g.getBorderExtents=function(b,c){b=p.byId(b);var e=m.toPixelValue,g=c||m.getComputedStyle(b);c="none"!=g.borderLeftStyle?e(b,g.borderLeftWidth):0;var q="none"!=g.borderTopStyle?e(b,g.borderTopWidth):0,a="none"!=g.borderRightStyle?e(b,g.borderRightWidth):0;b="none"!=g.borderBottomStyle?e(b,g.borderBottomWidth):0;return{l:c,t:q,r:a,b:b,w:c+a,h:q+b}};g.getPadBorderExtents=function(b,c){b=p.byId(b);var e=c||m.getComputedStyle(b);c=g.getPadExtents(b,e);b=g.getBorderExtents(b,
e);return{l:c.l+b.l,t:c.t+b.t,r:c.r+b.r,b:c.b+b.b,w:c.w+b.w,h:c.h+b.h}};g.getMarginExtents=function(b,c){b=p.byId(b);var e=c||m.getComputedStyle(b),g=m.toPixelValue;c=g(b,e.marginLeft);var q=g(b,e.marginTop),a=g(b,e.marginRight);b=g(b,e.marginBottom);return{l:c,t:q,r:a,b:b,w:c+a,h:q+b}};g.getMarginBox=function(b,c){b=p.byId(b);c=c||m.getComputedStyle(b);c=g.getMarginExtents(b,c);var e=b.offsetLeft-c.l,q=b.offsetTop-c.t,f=b.parentNode,u=m.toPixelValue;8==a("ie")&&!a("quirks")&&f&&(f=m.getComputedStyle(f),
e-="none"!=f.borderLeftStyle?u(b,f.borderLeftWidth):0,q-="none"!=f.borderTopStyle?u(b,f.borderTopWidth):0);return{l:e,t:q,w:b.offsetWidth+c.w,h:b.offsetHeight+c.h}};g.getContentBox=function(b,c){b=p.byId(b);var e=c||m.getComputedStyle(b);c=b.clientWidth;var q,f=g.getPadExtents(b,e);q=g.getBorderExtents(b,e);var e=b.offsetLeft+f.l+q.l,u=b.offsetTop+f.t+q.t;c?q=b.clientHeight:(c=b.offsetWidth-q.w,q=b.offsetHeight-q.h);if(8==a("ie")&&!a("quirks")){var r=b.parentNode,n=m.toPixelValue;r&&(r=m.getComputedStyle(r),
e-="none"!=r.borderLeftStyle?n(b,r.borderLeftWidth):0,u-="none"!=r.borderTopStyle?n(b,r.borderTopWidth):0)}return{l:e,t:u,w:c-f.w,h:q-f.h}};g.setContentSize=function(b,c,e){b=p.byId(b);var a=c.w;c=c.h;l(b)&&(e=g.getPadBorderExtents(b,e),0<=a&&(a+=e.w),0<=c&&(c+=e.h));f(b,NaN,NaN,a,c)};var c={l:0,t:0,w:0,h:0};g.setMarginBox=function(b,q,x){b=p.byId(b);var y=x||m.getComputedStyle(b);x=q.w;var t=q.h,u=l(b)?c:g.getPadBorderExtents(b,y),y=g.getMarginExtents(b,y);if(a("webkit")&&e(b)){var r=b.style;0<=
x&&!r.width&&(r.width="4px");0<=t&&!r.height&&(r.height="4px")}0<=x&&(x=Math.max(x-u.w-y.w,0));0<=t&&(t=Math.max(t-u.h-y.h,0));f(b,q.l,q.t,x,t)};g.isBodyLtr=function(b){b=b||h.doc;return"ltr"==(h.body(b).dir||b.documentElement.dir||"ltr").toLowerCase()};g.docScroll=function(b){b=b||h.doc;var c=h.doc.parentWindow||h.doc.defaultView;return"pageXOffset"in c?{x:c.pageXOffset,y:c.pageYOffset}:(c=a("quirks")?h.body(b):b.documentElement)&&{x:g.fixIeBiDiScrollLeft(c.scrollLeft||0,b),y:c.scrollTop||0}};g.getIeDocumentElementOffset=
function(b){return{x:0,y:0}};g.fixIeBiDiScrollLeft=function(b,c){c=c||h.doc;var e=a("ie");if(e&&!g.isBodyLtr(c)){var q=a("quirks");c=q?h.body(c):c.documentElement;var f=h.global;6==e&&!q&&f.frameElement&&c.scrollHeight>c.clientHeight&&(b+=c.clientLeft);return 8>e||q?b+c.clientWidth-c.scrollWidth:-b}return b};g.position=function(b,c){b=p.byId(b);var e=h.body(b.ownerDocument),q=b.getBoundingClientRect(),q={x:q.left,y:q.top,w:q.right-q.left,h:q.bottom-q.top};9>a("ie")&&(q.x-=a("quirks")?e.clientLeft+
e.offsetLeft:0,q.y-=a("quirks")?e.clientTop+e.offsetTop:0);c&&(b=g.docScroll(b.ownerDocument),q.x+=b.x,q.y+=b.y);return q};g.getMarginSize=function(b,c){b=p.byId(b);c=g.getMarginExtents(b,c||m.getComputedStyle(b));b=b.getBoundingClientRect();return{w:b.right-b.left+c.w,h:b.bottom-b.top+c.h}};g.normalizeEvent=function(b){"layerX"in b||(b.layerX=b.offsetX,b.layerY=b.offsetY);if(!("pageX"in b)){var c=b.target,c=c&&c.ownerDocument||document,e=a("quirks")?c.body:c.documentElement;b.pageX=b.clientX+g.fixIeBiDiScrollLeft(e.scrollLeft||
0,c);b.pageY=b.clientY+(e.scrollTop||0)}};return g})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(a,h,p){var m={global:a.global,doc:a.global.document||null,body:function(f){f=f||a.doc;return f.body||f.getElementsByTagName("body")[0]},setContext:function(f,e){a.global=m.global=f;a.doc=m.doc=e},withGlobal:function(f,e,l,g){var c=a.global;try{return a.global=m.global=f,m.withDoc.call(null,f.document,e,l,g)}finally{a.global=m.global=c}},withDoc:function(f,e,l,g){var c=
m.doc,b=p("quirks"),q=p("ie"),x,y,t;try{return a.doc=m.doc=f,a.isQuirks=p.add("quirks","BackCompat"==a.doc.compatMode,!0,!0),p("ie")&&(t=f.parentWindow)&&t.navigator&&(x=parseFloat(t.navigator.appVersion.split("MSIE ")[1])||void 0,(y=f.documentMode)&&5!=y&&Math.floor(x)!=y&&(x=y),a.isIE=p.add("ie",x,!0,!0)),l&&"string"==typeof e&&(e=l[e]),e.apply(l,g||[])}finally{a.doc=m.doc=c,a.isQuirks=p.add("quirks",b,!0,!0),a.isIE=p.add("ie",q,!0,!0)}}};h.mixin(a,m);return m})},"dojo/_base/lang":function(){define(["./kernel",
"../has","../sniff"],function(a,h){h.add("bug-for-in-skips-shadowed",function(){for(var b in{toString:1})return 0;return 1});var p=h("bug-for-in-skips-shadowed")?"hasOwnProperty valueOf isPrototypeOf propertyIsEnumerable toLocaleString toString constructor".split(" "):[],m=p.length,f=function(b,c,e){e||(e=b[0]&&a.scopeMap[b[0]]?a.scopeMap[b.shift()][1]:a.global);try{for(var g=0;g<b.length;g++){var q=b[g];if(!(q in e))if(c)e[q]={};else return;e=e[q]}return e}catch(u){}},e=Object.prototype.toString,
l=function(b,c,e){return(e||[]).concat(Array.prototype.slice.call(b,c||0))},g=/\{([^\}]+)\}/g,c={_extraNames:p,_mixin:function(b,c,e){var g,a,q,f={};for(g in c)a=c[g],g in b&&(b[g]===a||g in f&&f[g]===a)||(b[g]=e?e(a):a);if(h("bug-for-in-skips-shadowed")&&c)for(q=0;q<m;++q)g=p[q],a=c[g],g in b&&(b[g]===a||g in f&&f[g]===a)||(b[g]=e?e(a):a);return b},mixin:function(b,e){b||(b={});for(var g=1,a=arguments.length;g<a;g++)c._mixin(b,arguments[g]);return b},setObject:function(b,c,e){var g=b.split(".");
b=g.pop();return(e=f(g,!0,e))&&b?e[b]=c:void 0},getObject:function(b,c,e){return b?f(b.split("."),c,e):e},exists:function(b,e){return void 0!==c.getObject(b,!1,e)},isString:function(b){return"string"==typeof b||b instanceof String},isArray:Array.isArray||function(b){return"[object Array]"==e.call(b)},isFunction:function(b){return"[object Function]"===e.call(b)},isObject:function(b){return void 0!==b&&(null===b||"object"==typeof b||c.isArray(b)||c.isFunction(b))},isArrayLike:function(b){return!!b&&
!c.isString(b)&&!c.isFunction(b)&&!(b.tagName&&"form"==b.tagName.toLowerCase())&&(c.isArray(b)||isFinite(b.length))},isAlien:function(b){return b&&!c.isFunction(b)&&/\{\s*\[native code\]\s*\}/.test(String(b))},extend:function(b,e){for(var g=1,a=arguments.length;g<a;g++)c._mixin(b.prototype,arguments[g]);return b},_hitchArgs:function(b,e){var g=c._toArray(arguments,2),q=c.isString(e);return function(){var f=c._toArray(arguments),l=q?(b||a.global)[e]:e;return l&&l.apply(b||this,g.concat(f))}},hitch:function(b,
e){if(2<arguments.length)return c._hitchArgs.apply(a,arguments);e||(e=b,b=null);if(c.isString(e)){b=b||a.global;if(!b[e])throw['lang.hitch: scope["',e,'"] is null (scope\x3d"',b,'")'].join("");return function(){return b[e].apply(b,arguments||[])}}return b?function(){return e.apply(b,arguments||[])}:e},delegate:function(){function b(){}return function(e,g){b.prototype=e;e=new b;b.prototype=null;g&&c._mixin(e,g);return e}}(),_toArray:h("ie")?function(){function b(b,c,e){e=e||[];for(c=c||0;c<b.length;c++)e.push(b[c]);
return e}return function(c){return(c.item?b:l).apply(this,arguments)}}():l,partial:function(b){return c.hitch.apply(a,[null].concat(c._toArray(arguments)))},clone:function(b){if(!b||"object"!=typeof b||c.isFunction(b))return b;if(b.nodeType&&"cloneNode"in b)return b.cloneNode(!0);if(b instanceof Date)return new Date(b.getTime());if(b instanceof RegExp)return new RegExp(b);var e,g,a;if(c.isArray(b))for(e=[],g=0,a=b.length;g<a;++g)g in b&&(e[g]=c.clone(b[g]));else e=b.constructor?new b.constructor:
{};return c._mixin(e,b,c.clone)},trim:String.prototype.trim?function(b){return b.trim()}:function(b){return b.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(b,e,a){return b.replace(a||g,c.isFunction(e)?e:function(b,g){return c.getObject(g,!1,e)})}};c.mixin(a,c);return c})},"dojo/dom":function(){define(["./sniff","./_base/window","./_base/kernel"],function(a,h,p){if(7>=a("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(e){}var m={};a("ie")?m.byId=function(e,a){if("string"!=
typeof e)return e;var g=a||h.doc;a=e&&g.getElementById(e);if(!a||a.attributes.id.value!=e&&a.id!=e){g=g.all[e];if(!g||g.nodeName)g=[g];for(var c=0;a=g[c++];)if(a.attributes&&a.attributes.id&&a.attributes.id.value==e||a.id==e)return a}else return a}:m.byId=function(e,a){return("string"==typeof e?(a||h.doc).getElementById(e):e)||null};p=p.global.document||null;a.add("dom-contains",!(!p||!p.contains));m.isDescendant=a("dom-contains")?function(e,a){return!(!(a=m.byId(a))||!a.contains(m.byId(e)))}:function(e,
a){try{for(e=m.byId(e),a=m.byId(a);e;){if(e==a)return!0;e=e.parentNode}}catch(g){}return!1};a.add("css-user-select",function(e,a,g){if(!g)return!1;e=g.style;a=["Khtml","O","Moz","Webkit"];g=a.length;var c="userSelect";do if("undefined"!==typeof e[c])return c;while(g--&&(c=a[g]+"UserSelect"));return!1});var f=a("css-user-select");m.setSelectable=f?function(e,a){m.byId(e).style[f]=a?"":"none"}:function(e,a){e=m.byId(e);var g=e.getElementsByTagName("*"),c=g.length;if(a)for(e.removeAttribute("unselectable");c--;)g[c].removeAttribute("unselectable");
else for(e.setAttribute("unselectable","on");c--;)g[c].setAttribute("unselectable","on")};return m})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(a,h,p){function m(b,c,e){c=c.toLowerCase();if("auto"==e){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(e){case 700:return"bold";default:return"normal"}c in q||(q[c]=x.test(c));return q[c]?l(b,e):e}var f,e={};f=a("webkit")?function(b){var c;if(1==b.nodeType){var e=b.ownerDocument.defaultView;
c=e.getComputedStyle(b,null);!c&&b.style&&(b.style.display="",c=e.getComputedStyle(b,null))}return c||{}}:a("ie")&&(9>a("ie")||a("quirks"))?function(b){return 1==b.nodeType&&b.currentStyle?b.currentStyle:{}}:function(b){if(1===b.nodeType){var c=b.ownerDocument.defaultView;return(c.opener?c:p.global.window).getComputedStyle(b,null)}return{}};e.getComputedStyle=f;var l;l=a("ie")?function(b,c){if(!c)return 0;if("medium"==c)return 4;if(c.slice&&"px"==c.slice(-2))return parseFloat(c);var e=b.style,n=b.runtimeStyle,
g=e.left,d=n.left;n.left=b.currentStyle.left;try{e.left=c,c=e.pixelLeft}catch(k){c=0}e.left=g;n.left=d;return c}:function(b,c){return parseFloat(c)||0};e.toPixelValue=l;var g=function(b,c){try{return b.filters.item("DXImageTransform.Microsoft.Alpha")}catch(r){return c?{}:null}},c=9>a("ie")||10>a("ie")&&a("quirks")?function(b){try{return g(b).Opacity/100}catch(u){return 1}}:function(b){return f(b).opacity},b=9>a("ie")||10>a("ie")&&a("quirks")?function(c,e){""===e&&(e=1);var a=100*e;1===e?(c.style.zoom=
"",g(c)&&(c.style.filter=c.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,""))):(c.style.zoom=1,g(c)?g(c,1).Opacity=a:c.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+a+")",g(c,1).Enabled=!0);if("tr"==c.tagName.toLowerCase())for(c=c.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&b(c,e);return e}:function(b,c){return b.style.opacity=c},q={left:!0,top:!0},x=/margin|padding|width|height|max|min|offset/,y={cssFloat:1,styleFloat:1,"float":1};
e.get=function(b,g){var a=h.byId(b),n=arguments.length;if(2==n&&"opacity"==g)return c(a);g=y[g]?"cssFloat"in a.style?"cssFloat":"styleFloat":g;var q=e.getComputedStyle(a);return 1==n?q:m(a,g,q[g]||a.style[g])};e.set=function(c,g,a){var n=h.byId(c),q=arguments.length,d="opacity"==g;g=y[g]?"cssFloat"in n.style?"cssFloat":"styleFloat":g;if(3==q)return d?b(n,a):n.style[g]=a;for(var k in g)e.set(c,k,g[k]);return e.getComputedStyle(n)};return e})},"dojo/mouse":function(){define(["./_base/kernel","./on",
"./has","./dom","./_base/window"],function(a,h,p,m,f){function e(a,g){var c=function(b,c){return h(b,a,function(e){if(g)return g(e,c);if(!m.isDescendant(e.relatedTarget,b))return c.call(this,e)})};c.bubble=function(b){return e(a,function(c,e){var g=b(c.target),a=c.relatedTarget;if(g&&g!=(a&&1==a.nodeType&&b(a)))return e.call(g,c)})};return c}p.add("dom-quirks",f.doc&&"BackCompat"==f.doc.compatMode);p.add("events-mouseenter",f.doc&&"onmouseenter"in f.doc.createElement("div"));p.add("events-mousewheel",
f.doc&&"onmousewheel"in f.doc);f=p("dom-quirks")&&p("ie")||!p("dom-addeventlistener")?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,g){return e.button&g},isLeft:function(e){return e.button&1},isMiddle:function(e){return e.button&4},isRight:function(e){return e.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,g){return e.button==g},isLeft:function(e){return 0==e.button},isMiddle:function(e){return 1==e.button},isRight:function(e){return 2==e.button}};a.mouseButtons=f;a=p("events-mousewheel")?
"mousewheel":function(e,g){return h(e,"DOMMouseScroll",function(c){c.wheelDelta=-c.detail;g.call(this,c)})};return{_eventHandler:e,enter:e("mouseover"),leave:e("mouseout"),wheel:a,isLeft:f.isLeft,isMiddle:f.isMiddle,isRight:f.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(a,h,p){if(!p("host-browser"))return p;a._name="browser";h.mixin(a,{isBrowser:!0,isFF:p("ff"),isIE:p("ie"),isKhtml:p("khtml"),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:p("android"),isWii:p("wii"),isQuirks:p("quirks"),isAir:p("air")});return p})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(a,h){return a.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:h("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,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:h("mac")&&!h("air")?
h("safari")?91:224:17}})},"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(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){a._xhrObj=u._create;var n=a.config;a.objectToQuery=m.objectToQuery;a.queryToObject=m.queryToObject;a.fieldToObject=e.fieldToObject;a.formToObject=e.toObject;a.formToQuery=e.toQuery;a.formToJson=e.toJson;a._blockAsync=!1;h.add("native-xhr2-blob",
function(){if(h("native-xhr2")){var d=new XMLHttpRequest;d.open("GET","/",!0);d.responseType="blob";var k=d.responseType;d.abort();return"blob"===k}});var w=a._contentHandlers=a.contentHandlers={text:function(d){return d.responseText},json:function(d){return c.fromJson(d.responseText||null)},"json-comment-filtered":function(d){g.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.");
d=d.responseText;var k=d.indexOf("/*"),b=d.lastIndexOf("*/");if(-1==k||-1==b)throw Error("JSON was not comment filtered");return c.fromJson(d.substring(k+2,b))},javascript:function(d){return a.eval(d.responseText)},xml:function(d){var k=d.responseXML;k&&h("dom-qsa2.1")&&!k.querySelectorAll&&h("dom-parser")&&(k=(new DOMParser).parseFromString(d.responseText,"application/xml"));if(h("ie")&&(!k||!k.documentElement)){var b=function(d){return"MSXML"+d+".DOMDocument"},b=["Microsoft.XMLDOM",b(6),b(4),b(3),
b(2)];q.some(b,function(b){try{var n=new ActiveXObject(b);n.async=!1;n.loadXML(d.responseText);k=n}catch(K){return!1}return!0})}return k},"json-comment-optional":function(d){return d.responseText&&/^[^{\[]*\/\*/.test(d.responseText)?w["json-comment-filtered"](d):w.json(d)}};h("native-xhr2")&&(w.arraybuffer=w.blob=w.document=function(d,k){return"blob"!==k.args.handleAs||h("native-xhr2-blob")?d.response:new Blob([d.response],{type:d.getResponseHeader("Content-Type")})});a._ioSetArgs=function(d,k,c,
v){var g={args:d,url:d.url},q=null;if(d.form){var q=f.byId(d.form),r=q.getAttributeNode("action");g.url=g.url||(r?r.value:a.doc?a.doc.URL:null);q=e.toObject(q)}r=[{}];q&&r.push(q);d.content&&r.push(d.content);d.preventCache&&r.push({"dojo.preventCache":(new Date).valueOf()});g.query=m.objectToQuery(b.mixin.apply(null,r));g.handleAs=d.handleAs||"text";var t=new l(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 u=d.load;u&&b.isFunction(u)&&t.addCallback(function(k){return u.call(d,k,g)});var x=d.error;x&&b.isFunction(x)&&t.addErrback(function(k){return x.call(d,k,g)});var w=d.handle;w&&b.isFunction(w)&&t.addBoth(function(k){return w.call(d,k,g)});t.addErrback(function(d){return v(d,t)});n.ioPublish&&a.publish&&!1!==g.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=g;return t};var d=function(d){d=w[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);return d},v=function(d){0>=A&&(A=0,n.ioPublish&&a.publish&&(!d||d&&!1!==d.ioArgs.args.ioPublish)&&a.publish("/dojo/io/stop"))},A=0;y.after(t,"_onAction",function(){--A});y.after(t,"_onInFlight",v);a._ioCancelAll=t.cancelAll;a._ioNotifyStart=function(d){n.ioPublish&&a.publish&&!1!==d.ioArgs.args.ioPublish&&(A||a.publish("/dojo/io/start"),
A+=1,a.publish("/dojo/io/send",[d]))};a._ioWatch=function(d,k,n,c){d.ioArgs.options=d.ioArgs.args;b.mixin(d,{response:d.ioArgs,isValid:function(b){return k(d)},isReady:function(k){return n(d)},handleResponse:function(k){return c(d)}});t(d);v(d)};a._ioAddQueryToUrl=function(d){d.query.length&&(d.url+=(-1==d.url.indexOf("?")?"?":"\x26")+d.query,d.query=null)};a.xhr=function(b,n,c){var v,e=a._ioSetArgs(n,function(d){v&&v.cancel()},d,k),g=e.ioArgs;"postData"in n?g.query=n.postData:"putData"in n?g.query=
n.putData:"rawBody"in n?g.query=n.rawBody:(2<arguments.length&&!c||-1==="POST|PUT".indexOf(b.toUpperCase()))&&a._ioAddQueryToUrl(g);var q;h("native-xhr2")&&(q={arraybuffer:1,blob:1,document:1});q=h("native-xhr2")&&q[n.handleAs]?n.handleAs:"text";"blob"!==q||h("native-xhr2-blob")||(q="arraybuffer");q={method:b,handleAs:q,responseType:n.responseType,timeout:n.timeout,withCredentials:n.withCredentials,ioArgs:g};"undefined"!==typeof n.headers&&(q.headers=n.headers);"undefined"!==typeof n.contentType&&
(q.headers||(q.headers={}),q.headers["Content-Type"]=n.contentType);"undefined"!==typeof g.query&&(q.data=g.query);"undefined"!==typeof n.sync&&(q.sync=n.sync);a._ioNotifyStart(e);try{v=u(g.url,q,!0)}catch(E){return e.cancel(),e}e.ioArgs.xhr=v.response.xhr;v.then(function(){e.resolve(e)}).otherwise(function(d){g.error=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,fieldToObject:e.fieldToObject,formToObject:e.toObject,objectToQuery:m.objectToQuery,formToQuery:e.toQuery,formToJson:e.toJson,queryToObject:m.queryToObject,contentHandlers:w,
_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 h={};return{objectToQuery:function(p){var m=encodeURIComponent,f=[],e;for(e in p){var l=p[e];if(l!=h[e]){var g=m(e)+"\x3d";if(a.isArray(l))for(var c=0,b=l.length;c<b;++c)f.push(g+
m(l[c]));else f.push(g+m(l))}}return f.join("\x26")},queryToObject:function(h){var m=decodeURIComponent;h=h.split("\x26");for(var f={},e,l,g=0,c=h.length;g<c;++g)if(l=h[g],l.length){var b=l.indexOf("\x3d");0>b?(e=m(l),l=""):(e=m(l.slice(0,b)),l=m(l.slice(b+1)));"string"==typeof f[e]&&(f[e]=[f[e]]);a.isArray(f[e])?f[e].push(l):f[e]=l}return f}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(a,h,p,m){var f={fieldToObject:function(e){var a=null;if(e=h.byId(e)){var g=
e.name,c=(e.type||"").toLowerCase();if(g&&c&&!e.disabled)if("radio"==c||"checkbox"==c)e.checked&&(a=e.value);else if(e.multiple)for(a=[],e=[e.firstChild];e.length;)for(g=e.pop();g;g=g.nextSibling)if(1==g.nodeType&&"option"==g.tagName.toLowerCase())g.selected&&a.push(g.value);else{g.nextSibling&&e.push(g.nextSibling);g.firstChild&&e.push(g.firstChild);break}else a=e.value}return a},toObject:function(e){var l={};e=h.byId(e).elements;for(var g=0,c=e.length;g<c;++g){var b=e[g],q=b.name,x=(b.type||"").toLowerCase();
if(q&&x&&0>"file|submit|image|reset|button".indexOf(x)&&!b.disabled){var m=l,t=q,b=f.fieldToObject(b);if(null!==b){var u=m[t];"string"==typeof u?m[t]=[u,b]:a.isArray(u)?u.push(b):m[t]=b}"image"==x&&(l[q+".x"]=l[q+".y"]=l[q].x=l[q].y=0)}}return l},toQuery:function(e){return p.objectToQuery(f.toObject(e))},toJson:function(e,a){return m.stringify(f.toObject(e),null,a?4:0)}};return f})},"dojo/json":function(){define(["./has"],function(a){var h="undefined"!=typeof JSON;a.add("json-parse",h);a.add("json-stringify",
h&&'{"a":1}'==JSON.stringify({a:0},function(a,f){return f||1}));if(a("json-stringify"))return JSON;var p=function(a){return('"'+a.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};return{parse:a("json-parse")?JSON.parse:function(a,f){if(f&&!/^([\s\[\{]*(?:"(?:\\.|[^"])*"|-?\d[\d\.]*(?:[Ee][+-]?\d+)?|null|true|false|)[\s\]\}]*(?:,|:|$))+$/.test(a))throw new SyntaxError("Invalid characters in JSON");return eval("("+
a+")")},stringify:function(a,f,e){function l(c,b,a){f&&(c=f(a,c));var q;q=typeof c;if("number"==q)return isFinite(c)?c+"":"null";if("boolean"==q)return c+"";if(null===c)return"null";if("string"==typeof c)return p(c);if("function"==q||"undefined"==q)return g;if("function"==typeof c.toJSON)return l(c.toJSON(a),b,a);if(c instanceof Date)return'"{FullYear}-{Month+}-{Date}T{Hours}:{Minutes}:{Seconds}Z"'.replace(/\{(\w+)(\+)?\}/g,function(b,d,k){b=c["getUTC"+d]()+(k?1:0);return 10>b?"0"+b:b});if(c.valueOf()!==
c)return l(c.valueOf(),b,a);var m=e?b+e:"",t=e?" ":"",u=e?"\n":"";if(c instanceof Array){var t=c.length,r=[];for(a=0;a<t;a++)q=l(c[a],m,a),"string"!=typeof q&&(q="null"),r.push(u+m+q);return"["+r.join(",")+u+b+"]"}r=[];for(a in c){var n;if(c.hasOwnProperty(a)){if("number"==typeof a)n='"'+a+'"';else if("string"==typeof a)n=p(a);else continue;q=l(c[a],m,a);"string"==typeof q&&r.push(u+m+n+":"+t+q)}}return"{"+r.join(",")+u+b+"}"}var g;"string"==typeof f&&(e=f,f=null);return l(a,"","")}}})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),
function(a,h,p,m,f,e,l){var g=function(){},c=Object.freeze||function(){},b=a.Deferred=function(a){function q(d){if(u)throw Error("This deferred has already been resolved");t=d;u=!0;l()}function l(){for(var d;!d&&k;){var b=k;k=k.next;if(d=b.progress==g)u=!1;var n=w?b.error:b.resolved;f("config-useDeferredInstrumentation")&&w&&h.instrumentRejected&&h.instrumentRejected(t,!!n);if(n)try{var c=n(t);c&&"function"===typeof c.then?c.then(e.hitch(b.deferred,"resolve"),e.hitch(b.deferred,"reject"),e.hitch(b.deferred,
"progress")):(n=d&&void 0===c,d&&!n&&(w=c instanceof Error),b.deferred[n&&w?"reject":"resolve"](n?t:c))}catch(F){b.deferred.reject(F)}else w?b.deferred.reject(t):b.deferred.resolve(t)}}var t,u,r,n,w,d,k,v=this.promise=new p;this.isResolved=v.isResolved=function(){return 0==n};this.isRejected=v.isRejected=function(){return 1==n};this.isFulfilled=v.isFulfilled=function(){return 0<=n};this.isCanceled=v.isCanceled=function(){return r};this.resolve=this.callback=function(d){this.fired=n=0;this.results=
[d,null];q(d)};this.reject=this.errback=function(d){w=!0;this.fired=n=1;f("config-useDeferredInstrumentation")&&h.instrumentRejected&&h.instrumentRejected(d,!!k);q(d);this.results=[null,d]};this.progress=function(d){for(var b=k;b;){var n=b.progress;n&&n(d);b=b.next}};this.addCallbacks=function(d,k){this.then(d,k,g);return this};v.then=this.then=function(n,c,e){var a=e==g?this:new b(v.cancel);n={resolved:n,error:c,progress:e,deferred:a};k?d=d.next=n:k=d=n;u&&l();return a.promise};var A=this;v.cancel=
this.cancel=function(){if(!u){var d=a&&a(A);u||(d instanceof Error||(d=new m(d)),d.log=!1,A.reject(d))}r=!0};c(v)};e.extend(b,{addCallback:function(b){return this.addCallbacks(e.hitch.apply(a,arguments))},addErrback:function(b){return this.addCallbacks(null,e.hitch.apply(a,arguments))},addBoth:function(b){var c=e.hitch.apply(a,arguments);return this.addCallbacks(c,c)},fired:-1});b.when=a.when=l;return b})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise",
"./has!config-deferredInstrumentation?./promise/instrumentation"],function(a,h,p,m,f){var e=Object.freeze||function(){},l=function(b,c,e,f,r){a("config-deferredInstrumentation")&&2===c&&q.instrumentRejected&&0===b.length&&q.instrumentRejected(e,!1,f,r);for(r=0;r<b.length;r++)g(b[r],c,e,f)},g=function(e,g,f,l){var r=e[g],n=e.deferred;if(r)try{var t=r(f);if(0===g)"undefined"!==typeof t&&b(n,g,t);else{if(t&&"function"===typeof t.then){e.cancel=t.cancel;t.then(c(n,1),c(n,2),c(n,0));return}b(n,1,t)}}catch(d){b(n,
2,d)}else b(n,g,f);a("config-deferredInstrumentation")&&2===g&&q.instrumentRejected&&q.instrumentRejected(f,!!r,l,n.promise)},c=function(c,e){return function(g){b(c,e,g)}},b=function(b,c,e){if(!b.isCanceled())switch(c){case 0:b.progress(e);break;case 1:b.resolve(e);break;case 2:b.reject(e)}},q=function(b){var c=this.promise=new m,f=this,u,r,n,w=!1,d=[];a("config-deferredInstrumentation")&&Error.captureStackTrace&&(Error.captureStackTrace(f,q),Error.captureStackTrace(c,q));this.isResolved=c.isResolved=
function(){return 1===u};this.isRejected=c.isRejected=function(){return 2===u};this.isFulfilled=c.isFulfilled=function(){return!!u};this.isCanceled=c.isCanceled=function(){return w};this.progress=function(k,b){if(u){if(!0===b)throw Error("This deferred has already been fulfilled.");return c}l(d,0,k,null,f);return c};this.resolve=function(k,b){if(u){if(!0===b)throw Error("This deferred has already been fulfilled.");return c}l(d,u=1,r=k,null,f);d=null;return c};var k=this.reject=function(b,e){if(u){if(!0===
e)throw Error("This deferred has already been fulfilled.");return c}a("config-deferredInstrumentation")&&Error.captureStackTrace&&Error.captureStackTrace(n={},k);l(d,u=2,r=b,n,f);d=null;return c};this.then=c.then=function(k,b,e){var v=[e,k,b];v.cancel=c.cancel;v.deferred=new q(function(d){return v.cancel&&v.cancel(d)});u&&!d?g(v,u,r,n):d.push(v);return v.deferred.promise};this.cancel=c.cancel=function(d,n){if(!u){b&&(n=b(d),d="undefined"===typeof n?d:n);w=!0;if(!u)return"undefined"===typeof d&&(d=
new p),k(d),d;if(2===u&&r===d)return d}else if(!0===n)throw Error("This deferred has already been fulfilled.");};e(c)};q.prototype.toString=function(){return"[object Deferred]"};f&&f(q);return q})},"dojo/errors/CancelError":function(){define(["./create"],function(a){return a("CancelError",null,null,{dojoType:"cancel",log:!1})})},"dojo/errors/create":function(){define(["../_base/lang"],function(a){return function(h,p,m,f){m=m||Error;var e=function(a){if(m===Error){Error.captureStackTrace&&Error.captureStackTrace(this,
e);var g=Error.call(this,a),c;for(c in g)g.hasOwnProperty(c)&&(this[c]=g[c]);this.message=a;this.stack=g.stack}else m.apply(this,arguments);p&&p.apply(this,arguments)};e.prototype=a.delegate(m.prototype,f);e.prototype.name=h;return e.prototype.constructor=e}})},"dojo/promise/Promise":function(){define(["../_base/lang"],function(a){function h(){throw new TypeError("abstract");}return a.extend(function(){},{then:function(a,m,f){h()},cancel:function(a,m){h()},isResolved:function(){h()},isRejected:function(){h()},
isFulfilled:function(){h()},isCanceled:function(){h()},always:function(a){return this.then(a,a)},otherwise:function(a){return this.then(null,a)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(a,h){return function(p,m,f,e){var l=p&&"function"===typeof p.then,g=l&&p instanceof h;if(!l)return 1<arguments.length?m?m(p):p:(new a).resolve(p);g||(l=new a(p.cancel),
p.then(l.resolve,l.reject,l.progress),p=l.promise);return m||f||e?p.then(m,f,e):p}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(a,h){a.fromJson=function(a){return eval("("+a+")")};a._escapeString=h.stringify;a.toJsonIndentStr="\t";a.toJson=function(p,m){return h.stringify(p,function(a,e){return e&&(a=e.__json__||e.json,"function"==typeof a)?a.call(e):e},m&&a.toJsonIndentStr)};return a})},"dojo/_base/array":function(){define(["./kernel","../has","./lang"],function(a,h,p){function m(b){return l[b]=
new Function("item","index","array",b)}function f(b){var c=!b;return function(e,g,a){var q=0,f=e&&e.length||0,n;f&&"string"==typeof e&&(e=e.split(""));"string"==typeof g&&(g=l[g]||m(g));if(a)for(;q<f;++q){if(n=!g.call(a,e[q],q,e),b^n)return!n}else for(;q<f;++q)if(n=!g(e[q],q,e),b^n)return!n;return c}}function e(b){var e=1,a=0,f=0;b||(e=a=f=-1);return function(q,l,r,n){if(n&&0<e)return c.lastIndexOf(q,l,r);n=q&&q.length||0;var t=b?n+f:a;r===g?r=b?a:n+f:0>r?(r=n+r,0>r&&(r=a)):r=r>=n?n+f:r;for(n&&"string"==
typeof q&&(q=q.split(""));r!=t;r+=e)if(q[r]==l)return r;return-1}}var l={},g,c={every:f(!1),some:f(!0),indexOf:e(!0),lastIndexOf:e(!1),forEach:function(b,c,e){var g=0,a=b&&b.length||0;a&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=l[c]||m(c));if(e)for(;g<a;++g)c.call(e,b[g],g,b);else for(;g<a;++g)c(b[g],g,b)},map:function(b,c,e,g){var a=0,q=b&&b.length||0;g=new (g||Array)(q);q&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=l[c]||m(c));if(e)for(;a<q;++a)g[a]=c.call(e,b[a],
a,b);else for(;a<q;++a)g[a]=c(b[a],a,b);return g},filter:function(b,c,e){var g=0,a=b&&b.length||0,q=[],f;a&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=l[c]||m(c));if(e)for(;g<a;++g)f=b[g],c.call(e,f,g,b)&&q.push(f);else for(;g<a;++g)f=b[g],c(f,g,b)&&q.push(f);return q},clearCache:function(){l={}}};p.mixin(a,c);return c})},"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,h,p,m,f,e){function l(){for(var e=+new Date,a=0,f;a<b.length&&(f=b[a]);a++){var t=f.response,l=t.options;f.isCanceled&&f.isCanceled()||f.isValid&&!f.isValid(t)?(b.splice(a--,1),g._onAction&&g._onAction()):f.isReady&&f.isReady(t)?(b.splice(a--,1),f.handleResponse(t),g._onAction&&g._onAction()):f.startTime&&f.startTime+(l.timeout||0)<e&&(b.splice(a--,1),f.cancel(new h("Timeout exceeded",t)),g._onAction&&g._onAction())}g._onInFlight&&g._onInFlight(f);b.length||(clearInterval(c),c=null)}function g(e){e.response.options.timeout&&
(e.startTime=+new Date);e.isFulfilled()||(b.push(e),c||(c=setInterval(l,50)),e.response.options.sync&&l())}var c=null,b=[];g.cancelAll=function(){try{m.forEach(b,function(b){try{b.cancel(new p("All requests canceled."))}catch(x){}})}catch(q){}};f&&e&&f.doc.attachEvent&&e(f.global,"unload",function(){g.cancelAll()});return g})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise".split(" "),
function(a,h,p,m,f,e,l,g){function c(b){return q(b)}function b(b){return void 0!==b.data?b.data:b.text}a.deepCopy=function(b,c){for(var e in c){var g=b[e],q=c[e];g!==q&&(g&&"object"===typeof g&&q&&"object"===typeof q?a.deepCopy(g,q):b[e]=q)}return b};a.deepCreate=function(b,c){c=c||{};var e=l.delegate(b),g,q;for(g in b)(q=b[g])&&"object"===typeof q&&(e[g]=a.deepCreate(q,c[g]));return a.deepCopy(e,c)};var q=Object.freeze||function(b){return b};a.deferred=function(e,f,t,u,r,n){var w=new m(function(d){f&&
f(w,e);return d&&(d instanceof h||d instanceof p)?d:new p("Request canceled",e)});w.response=e;w.isValid=t;w.isReady=u;w.handleResponse=r;t=w.then(c).otherwise(function(d){d.response=e;throw d;});a.notify&&t.then(l.hitch(a.notify,"emit","load"),l.hitch(a.notify,"emit","error"));u=t.then(b);r=new g;for(var d in u)u.hasOwnProperty(d)&&(r[d]=u[d]);r.response=t;q(r);n&&w.then(function(d){n.call(w,d)},function(d){n.call(w,e,d)});w.promise=r;w.then=r.then;return w};a.addCommonMethods=function(b,c){e.forEach(c||
["GET","POST","PUT","DELETE"],function(c){b[("DELETE"===c?"DEL":c).toLowerCase()]=function(e,g){g=l.delegate(g||{});g.method=c;return b(e,g)}})};a.parseArgs=function(b,c,e){var g=c.data,a=c.query;!g||e||"object"!==typeof g||g instanceof ArrayBuffer||g instanceof Blob||(c.data=f.objectToQuery(g));a?("object"===typeof a&&(a=f.objectToQuery(a)),c.preventCache&&(a+=(a?"\x26":"")+"request.preventCache\x3d"+ +new Date)):c.preventCache&&(a="request.preventCache\x3d"+ +new Date);b&&a&&(b+=(~b.indexOf("?")?
"\x26":"?")+a);return{url:b,options:c,getHeader:function(b){return null}}};a.checkStatus=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,h){return a("RequestTimeoutError",null,h,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError",
"./watch","./handlers","./util","../has"],function(a,h,p,m,f){function e(b,n){var c=b.xhr;b.status=b.xhr.status;try{b.text=c.responseText}catch(k){}"xml"===b.options.handleAs&&(b.data=c.responseXML);if(!n)try{p(b)}catch(k){n=k}var d;if(n)this.reject(n);else{try{p(b)}catch(k){d=k}m.checkStatus(c.status)?d?this.reject(d):this.resolve(b):(n=d?new a("Unable to load "+b.url+" status: "+c.status+" and an error in handleAs: transformation of response",b):new a("Unable to load "+b.url+" status: "+c.status,
b),this.reject(n))}}function l(b){return this.xhr.getResponseHeader(b)}function g(r,n,w){var d=f("native-formdata")&&n&&n.data&&n.data instanceof FormData,k=m.parseArgs(r,m.deepCreate(u,n),d);r=k.url;n=k.options;var v,A=m.deferred(k,y,b,q,e,function(){v&&v()}),z=k.xhr=g._create();if(!z)return A.cancel(new a("XHR was not created")),w?A:A.promise;k.getHeader=l;x&&(v=x(z,A,k));var p="undefined"===typeof n.data?null:n.data,B=!n.sync,C=n.method;try{z.open(C,r,B,n.user||t,n.password||t);n.withCredentials&&
(z.withCredentials=n.withCredentials);f("native-response-type")&&n.handleAs in c&&(z.responseType=c[n.handleAs]);var F=n.headers;r=d?!1:"application/x-www-form-urlencoded";if(F)for(var K in F)"content-type"===K.toLowerCase()?r=F[K]:F[K]&&z.setRequestHeader(K,F[K]);r&&!1!==r&&z.setRequestHeader("Content-Type",r);F&&"X-Requested-With"in F||z.setRequestHeader("X-Requested-With","XMLHttpRequest");m.notify&&m.notify.emit("send",k,A.promise.cancel);z.send(p)}catch(M){A.reject(M)}h(A);z=null;return w?A:
A.promise}f.add("native-xhr",function(){return"undefined"!==typeof XMLHttpRequest});f.add("dojo-force-activex-xhr",function(){return f("activex")&&"file:"===window.location.protocol});f.add("native-xhr2",function(){if(f("native-xhr")&&!f("dojo-force-activex-xhr")){var b=new XMLHttpRequest;return"undefined"!==typeof b.addEventListener&&("undefined"===typeof opera||"undefined"!==typeof b.upload)}});f.add("native-formdata",function(){return"undefined"!==typeof FormData});f.add("native-response-type",
function(){return f("native-xhr")&&"undefined"!==typeof(new XMLHttpRequest).responseType});f.add("native-xhr2-blob",function(){if(f("native-response-type")){var b=new XMLHttpRequest;b.open("GET","/",!0);b.responseType="blob";var n=b.responseType;b.abort();return"blob"===n}});var c={blob:f("native-xhr2-blob")?"blob":"arraybuffer",document:"document",arraybuffer:"arraybuffer"},b,q,x,y;f("native-xhr2")?(b=function(b){return!this.isFulfilled()},y=function(b,n){n.xhr.abort()},x=function(b,n,c){function d(d){n.handleResponse(c)}
function k(d){d=new a("Unable to load "+c.url+" status: "+d.target.status,c);n.handleResponse(c,d)}function v(d){d.lengthComputable?(c.loaded=d.loaded,c.total=d.total,n.progress(c)):3===c.xhr.readyState&&(c.loaded="loaded"in d?d.loaded:d.position,n.progress(c))}b.addEventListener("load",d,!1);b.addEventListener("error",k,!1);b.addEventListener("progress",v,!1);return function(){b.removeEventListener("load",d,!1);b.removeEventListener("error",k,!1);b.removeEventListener("progress",v,!1);b=null}}):
(b=function(b){return b.xhr.readyState},q=function(b){return 4===b.xhr.readyState},y=function(b,n){b=n.xhr;n=typeof b.abort;"function"!==n&&"object"!==n&&"unknown"!==n||b.abort()});var t,u={data:null,query:null,sync:!1,method:"GET"};g._create=function(){throw Error("XMLHTTP not available");};if(f("native-xhr")&&!f("dojo-force-activex-xhr"))g._create=function(){return new XMLHttpRequest};else if(f("activex"))try{new ActiveXObject("Msxml2.XMLHTTP"),g._create=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}catch(r){try{new ActiveXObject("Microsoft.XMLHTTP"),
g._create=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}catch(n){}}m.addCommonMethods(g);return g})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../has!dom?../selector/_loader"],function(a,h,p,m){function f(c){var e=b[c.options.handleAs];c.data=e?e(c):c.data||c.text;return c}m.add("activex","undefined"!==typeof ActiveXObject);m.add("dom-parser",function(b){return"DOMParser"in b});var e;if(m("activex")){var l=["Msxml2.DOMDocument.6.0",
"Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML.DOMDocument"],g;e=function(b){function c(b){try{var c=new ActiveXObject(b);c.async=!1;c.loadXML(a);e=c;g=b}catch(n){return!1}return!0}var e=b.data,a=b.text;e&&m("dom-qsa2.1")&&!e.querySelectorAll&&m("dom-parser")&&(e=(new DOMParser).parseFromString(a,"application/xml"));e&&e.documentElement||g&&c(g)||p.some(l,c);return e}}var c=function(b){return m("native-xhr2-blob")||"blob"!==b.options.handleAs||"undefined"===typeof Blob?b.xhr.response:new Blob([b.xhr.response],
{type:b.xhr.getResponseHeader("Content-Type")})},b={javascript:function(b){return h.eval(b.text||"")},json:function(b){return a.parse(b.text||null)},xml:e,blob:c,arraybuffer:c,document:c};f.register=function(c,e){b[c]=e};return f})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(a,h,p,m,f,e){function l(b,d){var k=d.parentNode;k&&k.insertBefore(b,d)}function g(b){if("innerHTML"in b)try{b.innerHTML="";return}catch(k){}for(var d;d=
b.lastChild;)b.removeChild(d)}var c={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},b=/<\s*([\w\:]+)/,q={},x=0,y="__"+h._scopeName+"ToDomId",t;for(t in c)c.hasOwnProperty(t)&&(h=c[t],h.pre="option"==t?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+h.join("\x3e\x3c")+"\x3e",h.post="\x3c/"+h.reverse().join("\x3e\x3c/")+
"\x3e");var u;8>=p("ie")&&(u=function(b){b.__dojo_html5_tested="yes";var d=r("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},b.body);1!==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)});n(d)});a.toDom=function(n,d){d=d||m.doc;var k=d[y];k||(d[y]=k=++x+"",q[k]=d.createElement("div"));8>=p("ie")&&!d.__dojo_html5_tested&&
d.body&&u(d);n+="";var v=n.match(b),e=v?v[1].toLowerCase():"",k=q[k];if(v&&c[e])for(v=c[e],k.innerHTML=v.pre+n+v.post,n=v.length;n;--n)k=k.firstChild;else k.innerHTML=n;if(1==k.childNodes.length)return k.removeChild(k.firstChild);for(n=d.createDocumentFragment();d=k.firstChild;)n.appendChild(d);return n};a.place=function(b,d,k){d=f.byId(d);"string"==typeof b&&(b=/^\s*</.test(b)?a.toDom(b,d.ownerDocument):f.byId(b));if("number"==typeof k){var n=d.childNodes;!n.length||n.length<=k?d.appendChild(b):
l(b,n[0>k?0:k])}else switch(k){case "before":l(b,d);break;case "after":k=b;(n=d.parentNode)&&(n.lastChild==d?n.appendChild(k):n.insertBefore(k,d.nextSibling));break;case "replace":d.parentNode.replaceChild(b,d);break;case "only":a.empty(d);d.appendChild(b);break;case "first":if(d.firstChild){l(b,d.firstChild);break}default:d.appendChild(b)}return b};var r=a.create=function(b,d,k,n){var c=m.doc;k&&(k=f.byId(k),c=k.ownerDocument);"string"==typeof b&&(b=c.createElement(b));d&&e.set(b,d);k&&a.place(b,
k,n);return b};a.empty=function(b){g(f.byId(b))};var n=a.destroy=function(b){if(b=f.byId(b)){var d=b;b=b.parentNode;d.firstChild&&g(d);b&&(p("ie")&&b.canHaveChildren&&"removeNode"in d?d.removeNode(!1):b.removeChild(d))}}})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(a,h,p,m,f,e){function l(b,c){b=b.getAttributeNode&&b.getAttributeNode(c);return!!b&&b.specified}var g={innerHTML:1,textContent:1,className:1,htmlFor:h("ie"),value:1},
c={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};a.has=function(b,a){var f=a.toLowerCase();return g[e.names[f]||a]||l(m.byId(b),c[f]||a)};a.get=function(b,a){b=m.byId(b);var f=a.toLowerCase(),q=e.names[f]||a,t=b[q];if(g[q]&&"undefined"!=typeof t)return t;if("textContent"==q)return e.get(b,q);if("href"!=q&&("boolean"==typeof t||p.isFunction(t)))return t;a=c[f]||a;return l(b,a)?b.getAttribute(a):null};a.set=function(b,q,l){b=m.byId(b);if(2==arguments.length){for(var x in q)a.set(b,
x,q[x]);return b}x=q.toLowerCase();var t=e.names[x]||q,u=g[t];if("style"==t&&"string"!=typeof l)return f.set(b,l),b;if(u||"boolean"==typeof l||p.isFunction(l))return e.set(b,q,l);b.setAttribute(c[x]||q,l);return b};a.remove=function(b,e){m.byId(b).removeAttribute(c[e.toLowerCase()]||e)};a.getNodeProp=function(b,g){b=m.byId(b);var a=g.toLowerCase(),f=e.names[a]||g;if(f in b&&"href"!=f)return b[f];g=c[a]||g;return l(b,g)?b.getAttribute(g):null}})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),
function(a,h,p,m,f,e,l,g){function c(b){var e="";b=b.childNodes;for(var g=0,a;a=b[g];g++)8!=a.nodeType&&(e=1==a.nodeType?e+c(a):e+a.nodeValue);return e}var b={},q=1,x=h._scopeName+"attrid";p.add("dom-textContent",function(b,c,e){return"textContent"in e});a.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};a.get=function(b,e){b=f.byId(b);var g=e.toLowerCase();
e=a.names[g]||e;return"textContent"!=e||p("dom-textContent")?b[e]:c(b)};a.set=function(c,t,u){c=f.byId(c);if(2==arguments.length&&"string"!=typeof t){for(var r in t)a.set(c,r,t[r]);return c}r=t.toLowerCase();r=a.names[r]||t;if("style"==r&&"string"!=typeof u)return e.set(c,u),c;if("innerHTML"==r)return p("ie")&&c.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(l.empty(c),c.appendChild(l.toDom(u,c.ownerDocument))):c[r]=u,c;if("textContent"==r&&!p("dom-textContent"))return l.empty(c),
c.appendChild(c.ownerDocument.createTextNode(u)),c;if(m.isFunction(u)){var n=c[x];n||(n=q++,c[x]=n);b[n]||(b[n]={});var w=b[n][r];if(w)g.disconnect(w);else try{delete c[r]}catch(d){}u?b[n][r]=g.connect(c,r,u):c[r]=null;return c}c[r]=u;return c}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){function x(d,b){d.canDelete&&n._remove(d.id,b.options.frameDoc,
!0)}function y(d){z&&z.length&&(f.forEach(z,function(d){n._remove(d.id,d.frameDoc);d.frameDoc=null}),z=[]);return d.options.jsonp?!d.data:!0}function t(d){return!!this.scriptLoaded}function u(d){return(d=d.options.checkString)&&eval("typeof("+d+') !\x3d\x3d "undefined"')}function r(d,b){if(this.canDelete){var k=this.response.options;z.push({id:this.id,frameDoc:k.ioArgs?k.ioArgs.frameDoc:k.frameDoc});k.ioArgs&&(k.ioArgs.frameDoc=null);k.frameDoc=null}b?this.reject(b):this.resolve(d)}function n(b,c,
g){var a=p.parseArgs(b,p.deepCopy({},c));b=a.url;c=a.options;var f=p.deferred(a,x,y,c.jsonp?null:c.checkString?u:t,r);e.mixin(f,{id:w+d++,canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+c.jsonp+"\x3d")).test(b)||(b+=(~b.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+w+"_callbacks."+f.id),f.canDelete=!0,A[f.id]=function(d){a.data=d;f.handleResponse(a)});p.notify&&p.notify.emit("send",a,f.promise.cancel);if(!c.canAttach||c.canAttach(f)){var q=n._attach(f.id,b,c.frameDoc);if(!c.jsonp&&
!c.checkString)var m=l(q,k,function(d){if("load"===d.type||v.test(q.readyState))m.remove(),f.scriptLoaded=d})}l.once(q,"error",function(d){f.reject(d);n._remove(f.id,c.frameDoc,!0)});h(f);return g?f:f.promise}b.add("script-readystatechange",function(d,b){return"undefined"!==typeof b.createElement("script").onreadystatechange&&("undefined"===typeof d.opera||"[object Opera]"!==d.opera.toString())});var w=a.id.replace(/[\/\.\-]/g,"_"),d=0,k=b("script-readystatechange")?"readystatechange":"load",v=/complete|loaded/,
A=m.global[w+"_callbacks"]={},z=[];n.get=n;n._attach=function(d,b,k){k=k||q.doc;var n=k.createElement("script");n.type="text/javascript";n.src=b;n.id=d;n.async=!0;n.charset="utf-8";return k.getElementsByTagName("head")[0].appendChild(n)};n._remove=function(d,b,k){c.destroy(g.byId(d,b));A[d]&&(k?A[d]=function(){delete A[d]}:delete A[d])};n._callbacksProperty=w+"_callbacks";return n})},"dojo/io/iframe":function(){define("../_base/config ../_base/json ../_base/kernel ../_base/lang ../_base/xhr ../sniff ../_base/window ../dom ../dom-construct ../query require ../aspect ../request/iframe".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y){p.deprecated("dojo/io/iframe","Use dojo/request/iframe.","2.0");e=y._iframeName;e=e.substring(0,e.lastIndexOf("_"));var t=m.delegate(y,{create:function(){return t._frame=y.create.apply(y,arguments)},get:null,post:null,send:function(b){var c,n=f._ioSetArgs(b,function(d){c&&c.cancel()},function(d){var b=null;d=d.ioArgs;try{var k=d.handleAs;"xml"===k||"html"===k?b=c.response.data:(b=c.response.text,"json"===k?b=h.fromJson(b):"javascript"===k&&(b=p.eval(b)))}catch(B){b=
B}return b},function(d,b){b.ioArgs._hasError=!0;return d}),e=n.ioArgs,d="GET",k=g.byId(b.form);b.method&&"POST"===b.method.toUpperCase()&&k&&(d="POST");b={method:d,handleAs:"json"===b.handleAs||"javascript"===b.handleAs?"text":b.handleAs,form:b.form,query:k?null:b.content,data:k?b.content:null,timeout:b.timeout,ioArgs:e};b.method&&(b.method=b.method.toUpperCase());if(a.ioPublish&&p.publish&&!1!==e.args.ioPublish)var v=x.after(y,"_notifyStart",function(d){d.options.ioArgs===e&&(v.remove(),f._ioNotifyStart(n))},
!0);c=y(e.url,b,!0);e._callNext=c._callNext;c.then(function(){n.resolve(n)}).otherwise(function(d){n.ioArgs.error=d;n.reject(d)});return n},_iframeOnload:l.global[e+"_onload"]});m.setObject("dojo.io.iframe",t);return t})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),function(a,h,p,m,f,e,l,g){function c(d,b){var k=function(k,n){if("string"==typeof n&&(n=p.byId(n),!n))return new b([]);k="string"==
typeof k?d(k,n):k?k.end&&k.on?k:[k]:[];return k.end&&k.on?k:new b(k)};k.matches=d.match||function(d,b,n){return 0<k.filter([d],b,n).length};k.filter=d.filter||function(d,b,n){return k(b,n).filter(function(b){return-1<f.indexOf(d,b)})};if("function"!=typeof d){var n=d.search;d=function(d,b){return n(b||document,d)}}return k}h.add("array-extensible",function(){return 1==e.delegate([],{length:1}).length&&!h("bug-for-in-skips-shadowed")});var b=Array.prototype,q=b.slice,x=b.concat,y=f.forEach,t=function(d,
b,n){b=[0].concat(q.call(b,0));n=n||a.global;return function(k){b[0]=k;return d.apply(n,b)}},u=function(d){var b=this instanceof r&&h("array-extensible");"number"==typeof d&&(d=Array(d));var c=d&&"length"in d?d:arguments;if(b||!c.sort){for(var g=b?this:[],a=g.length=c.length,f=0;f<a;f++)g[f]=c[f];if(b)return g;c=g}e._mixin(c,n);c._NodeListCtor=function(d){return r(d)};return c},r=u,n=r.prototype=h("array-extensible")?[]:{};r._wrap=n._wrap=function(d,b,n){d=new (n||this._NodeListCtor||r)(d);return b?
d._stash(b):d};r._adaptAsMap=function(d,b){return function(){return this.map(t(d,arguments,b))}};r._adaptAsForEach=function(d,b){return function(){this.forEach(t(d,arguments,b));return this}};r._adaptAsFilter=function(d,b){return function(){return this.filter(t(d,arguments,b))}};r._adaptWithCondition=function(d,b,n){return function(){var k=arguments,c=t(d,k,n);if(b.call(n||a.global,k))return this.map(c);this.forEach(c);return this}};y(["slice","splice"],function(d){var k=b[d];n[d]=function(){return this._wrap(k.apply(this,
arguments),"slice"==d?this:null)}});y(["indexOf","lastIndexOf","every","some"],function(d){var b=f[d];n[d]=function(){return b.apply(a,[this].concat(q.call(arguments,0)))}});e.extend(u,{constructor:r,_NodeListCtor:r,toString:function(){return this.join(",")},_stash:function(d){this._parent=d;return this},on:function(d,b){var k=this.map(function(k){return m(k,d,b)});k.remove=function(){for(var d=0;d<k.length;d++)k[d].remove()};return k},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},
concat:function(d){var b=q.call(this,0),n=f.map(arguments,function(d){return q.call(d,0)});return this._wrap(x.apply(b,n),this)},map:function(d,b){return this._wrap(f.map(this,d,b),this)},forEach:function(d,b){y(this,d,b);return this},filter:function(d){var b=arguments,n=this,c=0;if("string"==typeof d){n=w._filterResult(this,b[0]);if(1==b.length)return n._stash(this);c=1}return this._wrap(f.filter(n,b[c],b[c+1]),this)},instantiate:function(d,b){var k=e.isFunction(d)?d:e.getObject(d);b=b||{};return this.forEach(function(d){new k(b,
d)})},at:function(){var d=new this._NodeListCtor(0);y(arguments,function(b){0>b&&(b=this.length+b);this[b]&&d.push(this[b])},this);return d._stash(this)}});var w=c(g,u);a.query=c(g,function(d){return u(d)});w.load=function(d,b,n){l.load(d,b,function(d){n(c(d,u))})};a._filterQueryResult=w._filterResult=function(d,b,n){return new u(w.filter(d,b,n))};a.NodeList=w.NodeList=u;return w})},"dojo/selector/_loader":function(){define(["../has","require"],function(a,h){if("undefined"!==typeof document){var p=
document.createElement("div");a.add("dom-qsa2.1",!!p.querySelectorAll);a.add("dom-qsa3",function(){try{return p.innerHTML="\x3cp class\x3d'TEST'\x3e\x3c/p\x3e",1==p.querySelectorAll(".TEST:empty").length}catch(f){}})}var m;return{load:function(f,e,l,g){if(g&&g.isBuild)l();else{g=h;f="default"==f?a("config-selectorEngine")||"css3":f;f="css2"==f||"lite"==f?"./lite":"css2.1"==f?a("dom-qsa2.1")?"./lite":"./acme":"css3"==f?a("dom-qsa3")?"./lite":"./acme":"acme"==f?"./acme":(g=e)&&f;if("?"==f.charAt(f.length-
1)){f=f.substring(0,f.length-1);var c=!0}if(c&&(a("dom-compliant-qsa")||m))return l(m);g([f],function(b){"./lite"!=f&&(m=b);l(b)})}}}})},"dojo/selector/acme":function(){define(["../dom","../sniff","../_base/array","../_base/lang","../_base/window"],function(a,h,p,m,f){var e=m.trim,l=p.forEach,g="BackCompat"==f.doc.compatMode,c=!1,b=function(){return!0},q=function(d){d=0<="\x3e~+".indexOf(d.slice(-1))?d+" * ":d+" ";for(var b=function(b,k){return e(d.slice(b,k))},k=[],n=-1,v=-1,g=-1,a=-1,f=-1,q=-1,
r=-1,t,l="",u="",w,x=0,A=d.length,m=null,h=null,y=function(){0<=q&&(m.id=b(q,x).replace(/\\/g,""),q=-1);if(0<=r){var d=r==x?null:b(r,x);m[0>"\x3e~+".indexOf(d)?"tag":"oper"]=d;r=-1}0<=f&&(m.classes.push(b(f+1,x).replace(/\\/g,"")),f=-1)};l=u,u=d.charAt(x),x<A;x++)"\\"!=l&&(m||(w=x,m={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return c?this.otag:this.tag}},r=x),t?u==t&&(t=null):"'"==u||'"'==u?t=u:0<=n?"]"==u?(h.attr?h.matchFor=b(g||n+1,x):h.attr=b(n+1,x),
!(n=h.matchFor)||'"'!=n.charAt(0)&&"'"!=n.charAt(0)||(h.matchFor=n.slice(1,-1)),h.matchFor&&(h.matchFor=h.matchFor.replace(/\\/g,"")),m.attrs.push(h),h=null,n=g=-1):"\x3d"==u&&(g=0<="|~^$*".indexOf(l)?l:"",h.type=g+u,h.attr=b(n+1,x-g.length),g=x+1):0<=v?")"==u&&(0<=a&&(h.value=b(v+1,x)),a=v=-1):"#"==u?(y(),q=x+1):"."==u?(y(),f=x):":"==u?(y(),a=x):"["==u?(y(),n=x,h={}):"("==u?(0<=a&&(h={name:b(a+1,x),value:null},m.pseudos.push(h)),v=x):" "==u&&l!=u&&(y(),0<=a&&m.pseudos.push({name:b(a+1,x)}),m.loops=
m.pseudos.length||m.attrs.length||m.classes.length,m.oquery=m.query=b(w,x),m.otag=m.tag=m.oper?null:m.tag||"*",m.tag&&(m.tag=m.tag.toUpperCase()),k.length&&k[k.length-1].oper&&(m.infixOper=k.pop(),m.query=m.infixOper.query+" "+m.query),k.push(m),m=null));return k},x=function(d,b){return d?b?function(){return d.apply(window,arguments)&&b.apply(window,arguments)}:d:b},y=function(d,b){b=b||[];d&&b.push(d);return b},t=function(d){return 1==d.nodeType},u=function(d,b){return d?"class"==b?d.className||
"":"for"==b?d.htmlFor||"":"style"==b?d.style.cssText||"":(c?d.getAttribute(b):d.getAttribute(b,2))||"":""},r={"*\x3d":function(d,b){return function(k){return 0<=u(k,d).indexOf(b)}},"^\x3d":function(d,b){return function(k){return 0==u(k,d).indexOf(b)}},"$\x3d":function(d,b){return function(k){k=" "+u(k,d);var n=k.lastIndexOf(b);return-1<n&&n==k.length-b.length}},"~\x3d":function(d,b){var k=" "+b+" ";return function(b){return 0<=(" "+u(b,d)+" ").indexOf(k)}},"|\x3d":function(d,b){var k=b+"-";return function(n){n=
u(n,d);return n==b||0==n.indexOf(k)}},"\x3d":function(d,b){return function(k){return u(k,d)==b}}};m=f.doc.documentElement;var n=!(m.nextElementSibling||"nextElementSibling"in m),w=n?"nextSibling":"nextElementSibling",d=n?"previousSibling":"previousElementSibling",k=n?t:b,v=function(b){for(;b=b[d];)if(k(b))return!1;return!0},A=function(d){for(;d=d[w];)if(k(d))return!1;return!0},z=function(d){var b=d.parentNode,b=7!=b.nodeType?b:b.nextSibling,n=0,c=b.children||b.childNodes,e=d._i||d.getAttribute("_i")||
-1,v=b._l||("undefined"!==typeof b.getAttribute?b.getAttribute("_l"):-1);if(!c)return-1;c=c.length;if(v==c&&0<=e&&0<=v)return e;h("ie")&&"undefined"!==typeof b.setAttribute?b.setAttribute("_l",c):b._l=c;e=-1;for(b=b.firstElementChild||b.firstChild;b;b=b[w])k(b)&&(h("ie")?b.setAttribute("_i",++n):b._i=++n,d===b&&(e=n));return e},D=function(d){return!(z(d)%2)},B=function(d){return z(d)%2},C={checked:function(d,b){return function(d){return!("checked"in d?!d.checked:!d.selected)}},disabled:function(d,
b){return function(d){return d.disabled}},enabled:function(d,b){return function(d){return!d.disabled}},"first-child":function(){return v},"last-child":function(){return A},"only-child":function(d,b){return function(d){return v(d)&&A(d)}},empty:function(d,b){return function(d){var b=d.childNodes;for(d=d.childNodes.length-1;0<=d;d--){var k=b[d].nodeType;if(1===k||3==k)return!1}return!0}},contains:function(d,b){d=b.charAt(0);if('"'==d||"'"==d)b=b.slice(1,-1);return function(d){return 0<=d.innerHTML.indexOf(b)}},
not:function(d,b){d=q(b)[0];b={el:1};"*"!=d.tag&&(b.tag=1);d.classes.length||(b.classes=1);var k=K(d,b);return function(d){return!k(d)}},"nth-child":function(d,b){d=parseInt;if("odd"==b)return B;if("even"==b)return D;if(-1!=b.indexOf("n")){b=b.split("n",2);var k=b[0]?"-"==b[0]?-1:d(b[0]):1,n=b[1]?d(b[1]):0,c=0,e=-1;0<k?0>n?n=n%k&&k+n%k:0<n&&(n>=k&&(c=n-n%k),n%=k):0>k&&(k*=-1,0<n&&(e=n,n%=k));if(0<k)return function(d){d=z(d);return d>=c&&(0>e||d<=e)&&d%k==n};b=n}var v=d(b);return function(d){return z(d)==
v}}},F=9>h("ie")||9==h("ie")&&h("quirks")?function(d){var b=d.toLowerCase();"class"==b&&(d="className");return function(k){return c?k.getAttribute(d):k[d]||k[b]}}:function(d){return function(b){return b&&b.getAttribute&&b.hasAttribute(d)}},K=function(d,k){if(!d)return b;k=k||{};var n=null;"el"in k||(n=x(n,t));"tag"in k||"*"!=d.tag&&(n=x(n,function(b){return b&&(c?b.tagName:b.tagName.toUpperCase())==d.getTag()}));"classes"in k||l(d.classes,function(d,b,k){var c=new RegExp("(?:^|\\s)"+d+"(?:\\s|$)");
n=x(n,function(d){return c.test(d.className)});n.count=b});"pseudos"in k||l(d.pseudos,function(d){var b=d.name;C[b]&&(n=x(n,C[b](b,d.value)))});"attrs"in k||l(d.attrs,function(d){var b,k=d.attr;d.type&&r[d.type]?b=r[d.type](k,d.matchFor):k.length&&(b=F(k));b&&(n=x(n,b))});"id"in k||d.id&&(n=x(n,function(b){return!!b&&b.id==d.id}));n||"default"in k||(n=b);return n},M=function(d){return function(b,k,c){for(;b=b[w];)if(!n||t(b)){c&&!ba(b,c)||!d(b)||k.push(b);break}return k}},E=function(d){return function(b,
n,c){for(b=b[w];b;){if(k(b)){if(c&&!ba(b,c))break;d(b)&&n.push(b)}b=b[w]}return n}},V=function(d,n){var c=function(d){var b=[];try{b=Array.prototype.slice.call(d)}catch(pa){for(var k=0,n=d.length;k<n;k++)b.push(d[k])}return b};d=d||b;return function(b,e,v){var g=0,a=[],a=c(b.children||b.childNodes);for(n&&p.forEach(a,function(d){1===d.nodeType&&(a=a.concat(c(d.getElementsByTagName("*"))))});b=a[g++];)k(b)&&(!v||ba(b,v))&&d(b,g)&&e.push(b);return e}},P=function(d,b){for(d=d.parentNode;d&&d!=b;)d=d.parentNode;
return!!d},I={},J=function(d){var k=I[d.query];if(k)return k;var n=d.infixOper,n=n?n.oper:"",c=K(d,{el:1}),e="*"==d.tag,v=f.doc.getElementsByClassName;if(n)v={el:1},e&&(v.tag=1),c=K(d,v),"+"==n?k=M(c):"~"==n?k=E(c):"\x3e"==n&&(k=V(c));else if(d.id)c=!d.loops&&e?b:K(d,{el:1,id:1}),k=function(b,k){var n=a.byId(d.id,b.ownerDocument||b);b.ownerDocument&&!P(b,b.ownerDocument)&&p.some(11===b.nodeType?b.childNodes:[b],function(b){b=V(function(b){return b.id===d.id},!0)(b,[]);if(b.length)return n=b[0],!1});
if(n&&c(n)&&(9==b.nodeType||P(n,b)))return y(n,k)};else if(v&&/\{\s*\[native code\]\s*\}/.test(String(v))&&d.classes.length&&!g)var c=K(d,{el:1,classes:1,id:1}),q=d.classes.join(" "),k=function(d,b,k){b=y(0,b);for(var n,e=0,v=d.getElementsByClassName(q);n=v[e++];)c(n,d)&&ba(n,k)&&b.push(n);return b};else e||d.loops?(c=K(d,{el:1,tag:1,id:1}),k=function(b,k,n){k=y(0,k);for(var e,v=0,g=(e=d.getTag())?b.getElementsByTagName(e):[];e=g[v++];)c(e,b)&&ba(e,n)&&k.push(e);return k}):k=function(b,k,n){k=y(0,
k);for(var c=0,e=d.getTag(),e=e?b.getElementsByTagName(e):[];b=e[c++];)ba(b,n)&&k.push(b);return k};return I[d.query]=k},Q={},S={},ga=function(d){var b=q(e(d));if(1==b.length){var k=J(b[0]);return function(d){if(d=k(d,[]))d.nozip=!0;return d}}return function(d){d=y(d);for(var k,n,c=b.length,e,v,g=0;g<c;g++){v=[];k=b[g];n=d.length-1;0<n&&(e={},v.nozip=!0);n=J(k);for(var a=0;k=d[a];a++)n(k,v,e);if(!v.length)break;d=v}return v}},L=h("ie")?"commentStrip":"nozip",R=!!f.doc.querySelectorAll,U=/\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g,
T=function(d,b,k,n){return k?(b?b+" ":"")+k+(n?" "+n:""):d},N=/([^[]*)([^\]]*])?/g,Z=function(d,b,k){return b.replace(U,T)+(k||"")},H=function(d,b){d=d.replace(N,Z);if(R){var k=S[d];if(k&&!b)return k}if(k=Q[d])return k;var k=d.charAt(0),n=-1==d.indexOf(" ");0<=d.indexOf("#")&&n&&(b=!0);if(!R||b||-1!="\x3e~+".indexOf(k)||h("ie")&&-1!=d.indexOf(":")||g&&0<=d.indexOf(".")||-1!=d.indexOf(":contains")||-1!=d.indexOf(":checked")||-1!=d.indexOf("|\x3d")){var c=d.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g);
return Q[d]=2>c.length?ga(d):function(d){for(var b=0,k=[],n;n=c[b++];)k=k.concat(ga(n)(d));return k}}var e=0<="\x3e~+".indexOf(d.charAt(d.length-1))?d+" *":d;return S[d]=function(b){if(9==b.nodeType||n)try{var k=b.querySelectorAll(e);k[L]=!0;return k}catch(qa){}return H(d,!0)(b)}},O=0,aa=h("ie")?function(d){return c?d.getAttribute("_uid")||d.setAttribute("_uid",++O)||O:d.uniqueID}:function(d){return d._uid||(d._uid=++O)},ba=function(d,b){if(!b)return 1;d=aa(d);return b[d]?0:b[d]=1},X=function(d){if(d&&
d.nozip)return d;if(!d||!d.length)return[];if(2>d.length)return[d[0]];var b=[];O++;var k,n;if(h("ie")&&c){var e=O+"";for(k=0;k<d.length;k++)(n=d[k])&&n.getAttribute("_zipIdx")!=e&&(b.push(n),n.setAttribute("_zipIdx",e))}else if(h("ie")&&d.commentStrip)try{for(k=0;k<d.length;k++)(n=d[k])&&t(n)&&b.push(n)}catch(sa){}else for(k=0;k<d.length;k++)(n=d[k])&&n._zipIdx!=O&&(b.push(n),n._zipIdx=O);return b},ea=function(d,b){b=b||f.doc;c="div"===(b.ownerDocument||b).createElement("div").tagName;return(d=H(d)(b))&&
d.nozip?d:X(d)};ea.filter=function(d,b,k){for(var n=[],c=q(b),c=1!=c.length||/[^\w#\.]/.test(b)?function(d){return-1!=p.indexOf(ea(b,a.byId(k)),d)}:K(c[0]),e=0,v;v=d[e];e++)c(v)&&n.push(v);return n};return ea})},"dojo/request/iframe":function(){define("module require ./watch ./util ./handlers ../_base/lang ../io-query ../query ../has ../dom ../dom-construct ../_base/window ../NodeList-dom".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x){function y(d){return!this.isFulfilled()}function t(d){return!!this._finished}
function u(d,b){if(!b)try{var k=d.options,c=n.doc(n._frame),v=k.handleAs;if("html"!==v){if("xml"===v)if("html"===c.documentElement.tagName.toLowerCase()){g("a",c.documentElement).orphan();var a=c.documentElement.innerText||c.documentElement.textContent,a=a.replace(/>\s+</g,"\x3e\x3c");d.text=e.trim(a)}else d.data=c;else d.text=c.getElementsByTagName("textarea")[0].value;f(d)}else d.data=c}catch(F){b=F}b?this.reject(b):this._finished?this.resolve(d):this.reject(Error("Invalid dojo/request/iframe request state"))}
function r(d){this._callNext()}function n(b,c,e){var v=m.parseArgs(b,m.deepCreate(k,c),!0);b=v.url;c=v.options;if("GET"!==c.method&&"POST"!==c.method)throw Error(c.method+" not supported by dojo/request/iframe");n._frame||(n._frame=n.create(n._iframeName,d+"();"));b=m.deferred(v,null,y,t,u,r);b._callNext=function(){this._calledNext||(this._calledNext=!0,n._currentDfd=null,n._fireNextRequest())};b._legacy=e;n._dfdQueue.push(b);n._fireNextRequest();p(b);return e?b:b.promise}var w=a.id.replace(/[\/\.\-]/g,
"_"),d=w+"_onload";x.global[d]||(x.global[d]=function(){var d=n._currentDfd;if(d){var k=b.byId(d.response.options.form)||d._tmpForm;if(k){for(var c=d._contentToClean,e=0;e<c.length;e++)for(var g=c[e],a=0;a<k.childNodes.length;a++){var f=k.childNodes[a];if(f.name===g){q.destroy(f);break}}d._originalAction&&k.setAttribute("action",d._originalAction);d._originalMethod&&(k.setAttribute("method",d._originalMethod),k.method=d._originalMethod);d._originalTarget&&(k.setAttribute("target",d._originalTarget),
k.target=d._originalTarget)}d._tmpForm&&(q.destroy(d._tmpForm),delete d._tmpForm);d._finished=!0}else n._fireNextRequest()});var k={method:"POST"};n.create=function(d,b,k){if(x.global[d])return x.global[d];if(x.global.frames[d])return x.global.frames[d];k||(c("config-useXDomain")&&!c("config-dojoBlankHtmlUrl")&&console.warn("dojo/request/iframe: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set dojoConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),
k=c("config-dojoBlankHtmlUrl")||h.toUrl("dojo/resources/blank.html"));b=q.place('\x3ciframe id\x3d"'+d+'" name\x3d"'+d+'" src\x3d"'+k+'" onload\x3d"'+b+'" style\x3d"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden"\x3e',x.body());return x.global[d]=b};n.doc=function(d){if(d.contentDocument)return d.contentDocument;var b=d.name;if(b){var k=x.doc.getElementsByTagName("iframe");if(d.document&&k[b].contentWindow&&k[b].contentWindow.document)return k[b].contentWindow.document;
if(x.doc.frames[b]&&x.doc.frames[b].document)return x.doc.frames[b].document}return null};n.setSrc=function(d,b,k){d=x.global.frames[d.name];d.contentWindow&&(d=d.contentWindow);try{k?d.location.replace(b):d.location=b}catch(D){console.log("dojo/request/iframe.setSrc: ",D)}};n._iframeName=w+"_IoIframe";n._notifyStart=function(){};n._dfdQueue=[];n._currentDfd=null;n._fireNextRequest=function(){var d;try{if(!n._currentDfd&&n._dfdQueue.length){do d=n._currentDfd=n._dfdQueue.shift();while(d&&(d.canceled||
d.isCanceled&&d.isCanceled())&&n._dfdQueue.length);if(!d||d.canceled||d.isCanceled&&d.isCanceled())n._currentDfd=null;else{var k=d.response,c=k.options,g=d._contentToClean=[],a=b.byId(c.form),f=m.notify,r=c.data||null,t;d._legacy||"POST"!==c.method||a?"GET"===c.method&&a&&-1<k.url.indexOf("?")&&(t=k.url.slice(k.url.indexOf("?")+1),r=e.mixin(l.queryToObject(t),r)):a=d._tmpForm=q.create("form",{name:w+"_form",style:{position:"absolute",top:"-1000px",left:"-1000px"}},x.body());if(a){if(!d._legacy){var u=
a;do u=u.parentNode;while(u&&u!==x.doc.documentElement);u||(a.style.position="absolute",a.style.left="-1000px",a.style.top="-1000px",x.body().appendChild(a));a.name||(a.name=w+"_form")}if(r){var u=function(d,b){q.create("input",{type:"hidden",name:d,value:b},a);g.push(d)},h;for(h in r){var y=r[h];if(e.isArray(y)&&1<y.length)for(t=0;t<y.length;t++)u(h,y[t]);else a[h]?a[h].value=y:u(h,y)}}var p=a.getAttributeNode("action"),I=a.getAttributeNode("method"),J=a.getAttributeNode("target");k.url&&(d._originalAction=
p?p.value:null,p?p.value=k.url:a.setAttribute("action",k.url));d._legacy?I&&I.value||(I?I.value=c.method:a.setAttribute("method",c.method)):(d._originalMethod=I?I.value:null,I?I.value=c.method:a.setAttribute("method",c.method));d._originalTarget=J?J.value:null;J?J.value=n._iframeName:a.setAttribute("target",n._iframeName);a.target=n._iframeName;f&&f.emit("send",k,d.promise.cancel);n._notifyStart(k);a.submit()}else c="",k.options.data&&(c=k.options.data,"string"!==typeof c&&(c=l.objectToQuery(c))),
u=k.url+(-1<k.url.indexOf("?")?"\x26":"?")+c,f&&f.emit("send",k,d.promise.cancel),n._notifyStart(k),n.setSrc(n._frame,u,!0)}}}catch(Q){d.reject(Q)}};m.addCommonMethods(n,["GET","POST"]);return n})},"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,h,p,m,f,e,l,g,c){function b(b){return function(n,d,k){return 2==arguments.length?b["string"==typeof d?"get":"set"](n,d):b.set(n,
d,k)}}var q=function(b){return 1==b.length&&"string"==typeof b[0]},x=function(b){var n=b.parentNode;n&&n.removeChild(b)},y=h.NodeList,t=y._adaptWithCondition,u=y._adaptAsForEach,r=y._adaptAsMap;m.extend(y,{_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=e.toDom(b,c&&c.ownerDocument),b=11==b.nodeType?m._toArray(b.childNodes):[b]):m.isArrayLike(b)?m.isArray(b)||
(b=m._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 n,g=b.length,f=g-1;0<=f;f--){var q=k?this._cloneNode(b[f]):b[f];if(b._runParse&&a.parser&&a.parser.parse)for(n||(n=c.ownerDocument.createElement("div")),n.appendChild(q),a.parser.parse(n),q=n.firstChild;n.firstChild;)n.removeChild(n.firstChild);f==g-1?e.place(q,c,d):c.parentNode.insertBefore(q,c);c=q}},position:r(l.position),attr:t(b(g),
q),style:t(b(c),q),addClass:u(f.add),removeClass:u(f.remove),toggleClass:u(f.toggle),replaceClass:u(f.replace),empty:u(e.empty),removeAttr:u(g.remove),marginBox:r(l.getMarginBox),place:function(b,c){var d=h(b)[0];return this.forEach(function(b){e.place(b,d,c)})},orphan:function(b){return(b?h._filterResult(this,b):this).forEach(x)},adopt:function(b,c){return h(b).place(this[0],c)._stash(this)},query:function(b){if(!b)return this;var n=new y;this.map(function(d){h(b,d).forEach(function(d){void 0!==
d&&n.push(d)})});return n._stash(this)},filter:function(b){var n=arguments,d=this,k=0;if("string"==typeof b){d=h._filterResult(this,n[0]);if(1==n.length)return d._stash(this);k=1}return this._wrap(p.filter(d,n[k],n[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):e.empty(k);return this}});return y})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(a,h,p){function m(c){if("string"==typeof c||
c instanceof String){if(c&&!e.test(c))return l[0]=c,l;c=c.split(e);c.length&&!c[0]&&c.shift();c.length&&!c[c.length-1]&&c.pop();return c}return c?h.filter(c,function(b){return b}):[]}var f,e=/\s+/,l=[""],g={};return f={contains:function(c,b){return 0<=(" "+p.byId(c).className+" ").indexOf(" "+b+" ")},add:function(c,b){c=p.byId(c);b=m(b);var e=c.className,g,e=e?" "+e+" ":" ";g=e.length;for(var a=0,f=b.length,l;a<f;++a)(l=b[a])&&0>e.indexOf(" "+l+" ")&&(e+=l+" ");g<e.length&&(c.className=e.substr(1,
e.length-2))},remove:function(c,b){c=p.byId(c);var e;if(void 0!==b){b=m(b);e=" "+c.className+" ";for(var g=0,f=b.length;g<f;++g)e=e.replace(" "+b[g]+" "," ");e=a.trim(e)}else e="";c.className!=e&&(c.className=e)},replace:function(c,b,e){c=p.byId(c);g.className=c.className;f.remove(g,e);f.add(g,b);c.className!==g.className&&(c.className=g.className)},toggle:function(c,b,e){c=p.byId(c);if(void 0===e){b=m(b);for(var g=0,a=b.length,q;g<a;++g)q=b[g],f[f.contains(c,q)?"remove":"add"](c,q)}else f[e?"add":
"remove"](c,b);return e}}})},"esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Accessor ./core/CollectionFlattener ./core/Evented ./support/LayersMixin ./Ground ./support/basemapUtils ./support/groundUtils ./core/accessorSupport/decorators".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x){a=function(g){function a(e){e=g.call(this)||this;e.basemap=null;e.ground=new c;e._basemapCache=b.createCache();return e}p(a,g);Object.defineProperty(a.prototype,
"allLayers",{get:function(){return new e({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(b){return b.layers}})},enumerable:!0,configurable:!0});a.prototype.castBasemap=function(c){return b.ensureType(c,this._basemapCache)};return a}(x.declared(f,l,g));m([x.property({readOnly:!0})],a.prototype,"allLayers",null);m([x.property()],a.prototype,"basemap",void 0);m([x.cast("basemap")],a.prototype,"castBasemap",null);m([x.property(),
x.cast(q.ensureType)],a.prototype,"ground",void 0);return a=m([x.subclass("esri.Map")],a)})},"esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(a,h){return function(a,m){a.__bases__=m.__bases__}})},"esri/core/tsSupport/decorateHelper":function(){define([],function(){return function(a,h,p,m){var f=arguments.length,e=3>f?h:null===m?m=Object.getOwnPropertyDescriptor(h,p):m,l;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)e=Reflect.decorate(a,
h,p,m);else for(var g=a.length-1;0<=g;g--)if(l=a[g])e=(3>f?l(e):3<f?l(h,p,e):l(h,p))||e;return 3<f&&e&&Object.defineProperty(h,p,e),e}})},"esri/core/Accessor":function(){define("./declare ./accessorSupport/Properties ./accessorSupport/get ./accessorSupport/introspection ./accessorSupport/set ./accessorSupport/watch".split(" "),function(a,h,p,m,f,e){h=h.default;a.before(function(e,c){a.hasMixin(e,l)&&m.processPrototype(c)});a.after(function(e){a.hasMixin(e,l)&&(m.processClass(e),Object.defineProperties(e.prototype,
{initialized:{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},destroyed:{get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}}}))});var l=a(null,{declaredClass:"esri.core.Accessor","-chains-":{initialize:"after",destroy:"before"},constructor:function(){if(this.constructor===l)throw Error("[accessor] cannot instanciate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{value:new h(this)});if(0<
arguments.length&&this.normalizeCtorArgs){for(var e=[],c=0;c<arguments.length;c++)e.push(arguments[c]);this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,e)}},__accessor__:null,postscript:function(e){var c=this.__accessor__;e=c.ctorArgs||e;var b;null!=this.getDefaults&&(b=this.getDefaults(e||{}),this.set(b));c.initialize();e&&(this.set(e),c.ctorArgs=null);this.initialize()},initialize:function(){},destroy:function(){if(this.__accessor__)e.removeTarget(this),this.__accessor__.destroy();else try{throw Error("instance is already destroyed");
}catch(g){console.warn(g.stack)}},get:function(e){return p.get(this,e)},hasOwnProperty:function(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)},keys:function(){return this.__accessor__?this.__accessor__.keys():[]},set:function(e,c){f.set(this,e,c);return this},watch:function(g,c,b){return e.watch(this,g,c,b)},_clearOverride:function(e){return this.__accessor__.clearOverride(e)},_override:function(e,c){return this.__accessor__.override(e,c)},_isOverridden:function(e){return this.__accessor__.isOverridden(e)},
notifyChange:function(e){this.__accessor__.propertyInvalidated(e)},_get:function(e){return this.__accessor__.internalGet(e)},_set:function(e,c){return this.__accessor__.internalSet(e,c)}});return l})},"esri/core/declare":function(){define(["require","exports","dojo/_base/declare"],function(a,h,p){function m(e,c){e&&!Array.isArray(e)&&"function"!==typeof e&&(c=e,e=null);e=e||[];c=c||{};return f([this].concat(e),c)}function f(a,c){a&&!Array.isArray(a)&&"function"!==typeof a&&(c=a,a=null);"function"===
typeof a?a=[a]:a||(a=[]);c=c||{};var b,g;b=0;for(g=e.length;b<g;b++)e[b](a,c);a=p(a,c);a.createSubclass=m;b=0;for(g=l.length;b<g;b++)l[b](a);return a}var e=[],l=[];(function(a){a.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 e=c.length-1;0<=e;e--)if(c[e].prototype.declaredClass===b)return!0;return-1!==c.indexOf(b)};a.safeMixin=function(c,b){return p.safeMixin(c,b)};
a.before=function(c){e.push(c)};a.after=function(c){l.push(c)}})(f||(f={}));return f})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(a,h,p){function m(d,b){throw Error("declare"+(b?" "+b:"")+": "+d);}function f(d,b){for(var k=[],n=[{cls:0,refs:[]}],c={},e=1,a=d.length,g=0,v,f,q,r,t;g<a;++g){(v=d[g])?"[object Function]"!=A.call(v)&&m("mixin #"+g+" is not a callable constructor.",b):m("mixin #"+g+" is unknown. Did you use dojo.require to pull it in?",b);f=v._meta?v._meta.bases:
[v];q=0;for(v=f.length-1;0<=v;--v)r=f[v].prototype,r.hasOwnProperty("declaredClass")||(r.declaredClass="uniqName_"+D++),r=r.declaredClass,c.hasOwnProperty(r)||(c[r]={count:0,refs:[],cls:f[v]},++e),r=c[r],q&&q!==r&&(r.refs.push(q),++q.count),q=r;++q.count;n[0].refs.push(q)}for(;n.length;){q=n.pop();k.push(q.cls);for(--e;t=q.refs,1==t.length;){q=t[0];if(!q||--q.count){q=0;break}k.push(q.cls);--e}if(q)for(g=0,a=t.length;g<a;++g)q=t[g],--q.count||n.push(q)}e&&m("can't build consistent linearization",
b);v=d[0];k[0]=v?v._meta&&v===k[k.length-v._meta.bases.length]?v._meta.bases.length:1:0;return k}function e(d,b,k,n){var c,e,a,g,f,q,r=this._inherited=this._inherited||{};"string"===typeof d&&(c=d,d=b,b=k,k=n);if("function"===typeof d)a=d,d=b,b=k;else try{a=d.callee}catch(ga){if(ga instanceof TypeError)m("strict mode inherited() requires the caller function to be passed before arguments",this.declaredClass);else throw ga;}(c=c||a.nom)||m("can't deduce a name to call inherited()",this.declaredClass);
k=n=0;g=this.constructor._meta;n=g.bases;q=r.p;if("constructor"!=c){if(r.c!==a&&(q=0,f=n[0],g=f._meta,g.hidden[c]!==a)){(e=g.chains)&&"string"==typeof e[c]&&m("calling chained method with inherited: "+c,this.declaredClass);do if(g=f._meta,e=f.prototype,g&&(e[c]===a&&e.hasOwnProperty(c)||g.hidden[c]===a))break;while(f=n[++q]);q=f?q:-1}if(f=n[++q])if(e=f.prototype,f._meta&&e.hasOwnProperty(c))k=e[c];else{a=v[c];do if(e=f.prototype,(k=e[c])&&(f._meta?e.hasOwnProperty(c):k!==a))break;while(f=n[++q])}k=
f&&k||v[c]}else{if(r.c!==a&&(q=0,(g=n[0]._meta)&&g.ctor!==a)){for((e=g.chains)&&"manual"===e.constructor||m("calling chained constructor with inherited",this.declaredClass);(f=n[++q])&&(!(g=f._meta)||g.ctor!==a););q=f?q:-1}for(;(f=n[++q])&&!(k=(g=f._meta)?g.ctor:f););k=f&&k}r.c=k;r.p=q;if(k)return!0===b?k:k.apply(this,b||d)}function l(d,b,k){return"string"===typeof d?"function"===typeof b?this.__inherited(d,b,k,!0):this.__inherited(d,b,!0):"function"===typeof d?this.__inherited(d,b,!0):this.__inherited(d,
!0)}function g(d,b,k,n){var c=this.getInherited(d,b,k);if(c)return c.apply(this,n||k||b||d)}function c(d){for(var b=this.constructor._meta.bases,k=0,n=b.length;k<n;++k)if(b[k]===d)return!0;return this instanceof d}function b(d,b){for(var k in b)"constructor"!=k&&b.hasOwnProperty(k)&&(d[k]=b[k]);if(h("bug-for-in-skips-shadowed"))for(var n=p._extraNames,c=n.length;c;)k=n[--c],"constructor"!=k&&b.hasOwnProperty(k)&&(d[k]=b[k])}function q(b){d.safeMixin(this.prototype,b);return this}function x(b,k){b instanceof
Array||"function"===typeof b||(k=b,b=void 0);k=k||{};b=b||[];return d([this].concat(b),k)}function y(d,b){return function(){var k=arguments,n=k,c=k[0],e,a;a=d.length;var g;if(!(this instanceof k.callee))return w(k);if(b&&(c&&c.preamble||this.preamble))for(g=Array(d.length),g[0]=k,e=0;;){(c=k[0])&&(c=c.preamble)&&(k=c.apply(this,k)||k);c=d[e].prototype;(c=c.hasOwnProperty("preamble")&&c.preamble)&&(k=c.apply(this,k)||k);if(++e==a)break;g[e]=k}for(e=a-1;0<=e;--e)c=d[e],(c=(a=c._meta)?a.ctor:c)&&c.apply(this,
g?g[e]:k);(c=this.postscript)&&c.apply(this,n)}}function t(d,b){return function(){var k=arguments,n=k,c=k[0];if(!(this instanceof k.callee))return w(k);b&&(c&&(c=c.preamble)&&(n=c.apply(this,n)||n),(c=this.preamble)&&c.apply(this,n));d&&d.apply(this,k);(c=this.postscript)&&c.apply(this,k)}}function u(d){return function(){var b=arguments,k=0,n,c;if(!(this instanceof b.callee))return w(b);for(;n=d[k];++k)if(n=(c=n._meta)?c.ctor:n){n.apply(this,b);break}(n=this.postscript)&&n.apply(this,b)}}function r(d,
b,k){return function(){var n,c,e=0,a=1;k&&(e=b.length-1,a=-1);for(;n=b[e];e+=a)c=n._meta,(n=(c?c.hidden:n.prototype)[d])&&n.apply(this,arguments)}}function n(d){z.prototype=d.prototype;d=new z;z.prototype=null;return d}function w(d){var b=d.callee,k=n(b);b.apply(k,d);return k}function d(a,g,w){"string"!=typeof a&&(w=g,g=a,a="");w=w||{};var z,C,F,D,K,J,Q,S=1,ga=g;"[object Array]"==A.call(g)?(J=f(g,a),F=J[0],S=J.length-F,g=J[S]):(J=[0],g?"[object Function]"==A.call(g)?(F=g._meta,J=J.concat(F?F.bases:
g)):m("base class is not a callable constructor.",a):null!==g&&m("unknown base class. Did you use dojo.require to pull it in?",a));if(g)for(C=S-1;;--C){z=n(g);if(!C)break;F=J[C];(F._meta?b:k)(z,F.prototype);D=h("csp-restrictions")?function(){}:new Function;D.superclass=g;D.prototype=z;g=z.constructor=D}else z={};d.safeMixin(z,w);F=w.constructor;F!==v.constructor&&(F.nom="constructor",z.constructor=F);for(C=S-1;C;--C)(F=J[C]._meta)&&F.chains&&(Q=k(Q||{},F.chains));z["-chains-"]&&(Q=k(Q||{},z["-chains-"]));
g&&g.prototype&&g.prototype["-chains-"]&&(Q=k(Q||{},g.prototype["-chains-"]));F=!Q||!Q.hasOwnProperty("constructor");J[0]=D=Q&&"manual"===Q.constructor?u(J):1==J.length?t(w.constructor,F):y(J,F);D._meta={bases:J,hidden:w,chains:Q,parents:ga,ctor:w.constructor};D.superclass=g&&g.prototype;D.extend=q;D.createSubclass=x;D.prototype=z;z.constructor=D;z.getInherited=l;z.isInstanceOf=c;z.inherited=B;z.__inherited=e;a&&(z.declaredClass=a,p.setObject(a,D));if(Q)for(K in Q)z[K]&&"string"==typeof Q[K]&&"constructor"!=
K&&(F=z[K]=r(K,J,"after"===Q[K]),F.nom=K);return D}var k=p.mixin,v=Object.prototype,A=v.toString,z,D=0;z=h("csp-restrictions")?function(){}:new Function;var B=a.config.isDebug?g:e;a.safeMixin=d.safeMixin=function(d,b){var k,n;for(k in b)n=b[k],n===v[k]&&k in v||"constructor"==k||("[object Function]"==A.call(n)&&(n.nom=k),d[k]=n);if(h("bug-for-in-skips-shadowed")&&b)for(var c=p._extraNames,e=c.length;e;)k=c[--e],n=b[k],n===v[k]&&k in v||"constructor"==k||("[object Function]"==A.call(n)&&(n.nom=k),
d[k]=n);return d};return a.declare=d})},"esri/core/accessorSupport/Properties":function(){define("require exports dojo/has ./Store ./PropertyOrigin ./extensions ../Logger".split(" "),function(a,h,p,m,f,e,l){l.getLogger("esri.core.Accessor");var g=0;a=function(){function c(b){this.host=b;this._origin=f.OriginId.USER;this.cursors={};this.ctorArgs=null;this.destroyed=!1;this.dirties={};this.initialized=!1;this.metadatas=this.host.constructor.__accessorMetadata__;this.overridden=null;this.store=new m.default;
Object.defineProperty(this,"uid",{value:g++})}c.prototype.initialize=function(){this.initialized=!0;e.instanceCreated(this.host,this.metadatas)};c.prototype.destroy=function(){this.destroyed=!0;for(var b=this.cursors,c=0,e=Object.getOwnPropertyNames(b);c<e.length;c++){var a=e[c],g=b[a];if(g){for(;0<g.length;)g.pop().propertyDestroyed(this,a);b[a]=null}}};c.prototype.clearOverride=function(b){this.isOverridden(b)&&(this.overridden[b]=!1,this.propertyInvalidated(b))};c.prototype.get=function(b){var c=
this.metadatas[b];if(this.store.has(b)&&!0===!this.dirties[b])return this.store.get(b);var e=c.get;return e?(c=e.call(this.host),this.store.set(b,c,f.OriginId.COMPUTED),this.propertyCommitted(b),c):c.value};c.prototype.originOf=function(b){var c=this.store.originOf(b);return void 0===c&&(b=this.metadatas[b])&&b.hasOwnProperty("value")?"defaults":f.idToName(c)};c.prototype.has=function(b){return this.metadatas[b]?this.store.has(b):!1};c.prototype.internalGet=function(b){if(this.metadatas[b]){var c=
this.store;return c.has(b)?c.get(b):this.metadatas[b].value}};c.prototype.internalSet=function(b,c){this.metadatas[b]&&(this.propertyInvalidated(b),this.initialized?this.store.set(b,c,this._origin):this.store.set(b,c,f.OriginId.DEFAULTS),this.propertyCommitted(b))};c.prototype.isOverridden=function(b){return null!=this.overridden&&!0===this.overridden[b]};c.prototype.keys=function(){return this.store.keys()};c.prototype.override=function(b,c){this.metadatas[b]&&(this.overridden||(this.overridden=
{}),this.overridden[b]=!0,this.internalSet(b,c))};c.prototype.set=function(b,c){if(this.metadatas[b]){var e=this.metadatas[b],a=e.set;(e=e.cast)&&(c=e.call(this.host,c));a?a.call(this.host,c):this.internalSet(b,c)}};c.prototype.setDefaultOrigin=function(b){this._origin=f.nameToId(b)};c.prototype.propertyInvalidated=function(b){var c=this.cursors[b];if(c)for(var e=0;e<c.length;e++)c[e].propertyInvalidated(this,b);this.isOverridden(b)||(this.dirties[b]=!0)};c.prototype.propertyCommitted=function(b){this.dirties[b]=
!1;var c=this.cursors[b];if(c)for(var e=0;e<c.length;e++)c[e].propertyCommitted(this,b)};c.prototype.addCursor=function(b,c){var e=this.cursors[b];e||(this.cursors[b]=e=[]);e.push(c)};c.prototype.removeCursor=function(b,c){var e=this.cursors[b];this.cursors[b]&&(e.splice(e.indexOf(c),1),0===e.length&&(this.cursors[b]=null))};return c}();Object.defineProperty(h,"__esModule",{value:!0});h.default=a})},"esri/core/accessorSupport/Store":function(){define(["require","exports","./PropertyOrigin"],function(a,
h,p){a=function(){function a(){this._values={}}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}();Object.defineProperty(h,"__esModule",{value:!0});h.default=a})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require",
"exports"],function(a,h){function p(e){switch(e){case "defaults":return f.DEFAULTS;case "service":return f.SERVICE;case "portal-item":return f.PORTAL_ITEM;case "web-scene":return f.WEB_SCENE;case "web-map":return f.WEB_MAP;case "user":return f.USER}}function m(e){switch(e){case f.DEFAULTS:return"defaults";case f.SERVICE:return"service";case f.PORTAL_ITEM:return"portal-item";case f.WEB_SCENE:return"web-scene";case f.WEB_MAP:return"web-map";case f.USER:return"user"}}var f;(function(e){e[e.DEFAULTS=
0]="DEFAULTS";e[e.COMPUTED=1]="COMPUTED";e[e.SERVICE=2]="SERVICE";e[e.PORTAL_ITEM=3]="PORTAL_ITEM";e[e.WEB_SCENE=4]="WEB_SCENE";e[e.WEB_MAP=5]="WEB_MAP";e[e.USER=6]="USER";e[e.NUM=7]="NUM"})(f=h.OriginId||(h.OriginId={}));h.nameToId=p;h.idToName=m;h.readableNameToId=function(e){return p(e)};h.idToReadableName=function(e){return m(e)};h.writableNameToId=function(e){return p(e)};h.idToWritableName=function(e){return m(e)}})},"esri/core/accessorSupport/extensions":function(){define(["require","exports",
"./extensions/aliasedProperty","./extensions/computedProperty","./extensions/serializableProperty"],function(a,h,p,m,f){var e=[p.default,m.default,f.default];h.processPrototypeMetadatas=function(a,g){for(var c=Object.getOwnPropertyNames(a),b=0;b<e.length;b++){var f=e[b];if(f.processPrototypePropertyMetadata)for(var l=0,m=c;l<m.length;l++){var t=m[l];f.processPrototypePropertyMetadata(t,a[t],a,g)}}};h.processClassMetadatas=function(a,g){for(var c=Object.getOwnPropertyNames(a),b=0;b<e.length;b++){var f=
e[b];if(f.processClassPropertyMetadata)for(var l=0,m=c;l<m.length;l++){var t=m[l];f.processClassPropertyMetadata(t,a[t],a,g)}}};h.instanceCreated=function(a,g){for(var c=Object.getOwnPropertyNames(g),b=0;b<e.length;b++){var f=e[b];f.instanceCreated&&f.instanceCreated(a,g,c)}}})},"esri/core/accessorSupport/extensions/aliasedProperty":function(){define("require exports dojo/has ../wire ../utils ../get ../set".split(" "),function(a,h,p,m,f,e,l){function g(c,b,e){var a=f.getProperties(c);return m.wire(c,
e.aliasOf,function(){a.propertyInvalidated(b)})}h.AliasedPropertyExtension={processClassPropertyMetadata:function(c,b,a,g){var f=b.aliasOf;if(f&&(c=f.split(".")[0],null!=a[c]&&!b.set&&!b.get)){var q;b.get=function(){var b=e.default(this,f);if("function"===typeof b){q||(q=f.split(".").slice(0,-1).join("."));var c=e.default(this,q);c&&(b=b.bind(c))}return b};b.readOnly||(b.set=function(b){return l.default(this,f,b)})}},instanceCreated:function(c,b,e){for(var a=0;a<e.length;a++){var f=e[a],q=b[f];q.aliasOf&&
g(c,f,q)}}};Object.defineProperty(h,"__esModule",{value:!0});h.default=h.AliasedPropertyExtension})},"esri/core/accessorSupport/wire":function(){define(["require","exports","./utils"],function(a,h,p){function m(b,e,a){e=p.splitPath(e);if(Array.isArray(e)){for(var q=[],t=0;t<e.length;t++)q.push((new f(e[t],a)).install(b));return new g(q)}b=(new f(e,a)).install(b);return new c(b)}var f=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 l(this,b):new e(this,b);return b};b.prototype.notify=function(b){this.callback(b,this.path)};return b}(),e=function(){function b(b,c){this.binding=b;this.target=c;p.getProperties(c).addCursor(this.binding.path,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}(),l=function(){function b(b,c){this.binding=b;this.target=c;this.stack=[];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;b=this.stack.pop();)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)};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 e=this.stack,a=e[e.length-1];a.properties!==b&&a.propertyName!==c;)a.properties.removeCursor(a.propertyName,this),e.pop(),
a=e[e.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],this.stack.push({properties:c,propertyName:b}),c.addCursor(b,this),this.moveForward())};return b}(),g=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}(),c=function(){function b(b){this.cursor=
b}b.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return b}();h.create=function(b,e){b=p.splitPath(b);if(Array.isArray(b)){for(var a=[],q=0;q<b.length;q++)a.push(new f(b[q],e));return function(b){for(var c=[],n=0;n<a.length;n++)c[n]=a[n].install(b);return new g(c)}}var l=new f(b,e);return function(b){return new c(l.install(b))}};h.wire=m;Object.defineProperty(h,"__esModule",{value:!0});h.default=m})},"esri/core/accessorSupport/utils":function(){define(["require","exports","../lang"],
function(a,h,p){function m(b){return b?b.__accessor__?b.__accessor__:b.propertyInvalidated?b:null:null}function f(b,c){return c?Object.keys(c).reduce(function(b,e){if("value"===e)return b[e]=c[e],b;if(void 0===b[e])return b[e]=p.clone(c[e]),b;var a=b[e],g=c[e];if(a===g)return b;if(Array.isArray(g)||Array.isArray(b))a=a?Array.isArray(a)?b[e]=a.concat():b[e]=[a]:b[e]=[],g&&(Array.isArray(g)||(g=[g]),g.forEach(function(b){-1===a.indexOf(b)&&a.push(b)}));else if(g&&"object"===typeof g)b[e]=f(a,g);else if(!b.hasOwnProperty(e)||
c.hasOwnProperty(e))b[e]=g;return b},b||{}):b}function e(b){return Array.isArray(b)?b:b.split(".")}function l(b){if(Array.isArray(b)||-1<b.indexOf(",")){b=Array.isArray(b)?b:b.split(",");for(var c=0;c<b.length;c++)b[c]=b[c].trim();return 1===b.length?b[0]:b}return b.trim()}function g(b){var c=!1;return function(){c||(c=!0,b())}}h.getProperties=m;h.isPropertyDeclared=function(b,c){return b&&b.metadatas&&null!=b.metadatas[c]};h.merge=f;h.pathToStringOrArray=function(b){return b?"string"===typeof b&&
-1===b.indexOf(".")?b:e(b):b};h.pathToArray=e;h.splitPath=l;h.parse=function(b,c,e,a){c=l(c);if(Array.isArray(c)){var f=c.map(function(c){return a(b,c.trim(),e)});return{remove:g(function(){return f.forEach(function(b){return b.remove()})})}}return a(b,c.trim(),e)};h.once=g;var c=0;h.uid=function(b){if(null==b)return c++;b=m(b);null==b.uid&&(b.uid=c++);return b.uid}})},"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,h,p,m,f,e,l){function g(b){return void 0!==b&&null!==b}function c(b){return g(b)?b:""}function b(b,q,n){var r=n.match(/([^\(]+)(\([^\)]+\))?/i),d=p.trim(r[1]);n=q[b];var r=JSON.parse((r[2]?p.trim(r[2]):"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),k=r.utcOffset;if(-1===a.indexOf(y,d))d=p.getObject(d),p.isFunction(d)&&(n=d(n,b,q,r));else if("number"===typeof n||"string"===typeof n&&
n&&!isNaN(Number(n)))switch(n=Number(n),d){case "NumberFormat":b=p.mixin({},r);q=parseFloat(b.places);if(isNaN(q)||0>q)b.places=Infinity;return f.format(n,b);case "DateString":n=new Date(n);if(r.local||r.systemLocale)return r.systemLocale?n.toLocaleDateString()+(r.hideTime?"":" "+n.toLocaleTimeString()):n.toDateString()+(r.hideTime?"":" "+n.toTimeString());n=n.toUTCString();r.hideTime&&(n=n.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return n;case "DateFormat":return n=new Date(n),g(k)&&(n=m.add(n,
"minute",n.getTimezoneOffset()-k)),e.format(n,r)}return c(n)}function q(b,c){var n;if(c)for(n in b)b.hasOwnProperty(n)&&(void 0===b[n]?delete b[n]:b[n]instanceof Object&&q(b[n],!0));else for(n in b)b.hasOwnProperty(n)&&void 0===b[n]&&delete b[n];return b}function x(b){if(!b||"object"!=typeof b||p.isFunction(b))return b;if("function"===typeof b.clone)b=b.clone();else if("function"===typeof b.map&&"function"===typeof b.forEach)b=b.map(x);else{var c={},n,e,d={};for(n in b){e=b[n];var k=!(n in d)||d[n]!==
e;if(!(n in c)||c[n]!==e&&k)c[n]=x?x(e):e}b=c}return b}var y=["NumberFormat","DateString","DateFormat"],t=/<\/?[^>]+>/g;return{equals:function(b,c){return b===c||"number"===typeof b&&isNaN(b)&&"number"===typeof c&&isNaN(c)||p.isFunction((b||{}).getTime)&&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 n in b)if(b[n]==c)return n;return null},stripTags:function(b){if(b){var c=
typeof b;if("string"===c)b=b.replace(t,"");else if("object"===c)for(var n in b)(c=b[n])&&"string"===typeof c&&(c=c.replace(t,"")),b[n]=c}return b},substitute:function(e,f,n){var q,d,k;g(n)&&(p.isObject(n)?(q=n.first,d=n.dateFormat,k=n.numberFormat):q=n);if(f&&"{*}"!==f)return p.replace(f,p.hitch({obj:e},function(n,e){n=e.split(":");return 1<n.length?(e=n[0],n.shift(),b(e,this.obj,n.join(":"))):d&&-1!==a.indexOf(d.properties||"",e)?b(e,this.obj,d.formatter||"DateString"):k&&-1!==a.indexOf(k.properties||
"",e)?b(e,this.obj,k.formatter||"NumberFormat"):c(this.obj[e])}));f=[];var v;f.push('\x3ctable summary\x3d"'+l.fieldsSummary+'"\x3e\x3ctbody\x3e');for(v in e)if(n=e[v],d&&-1!==a.indexOf(d.properties||"",v)?n=b(v,e,d.formatter||"DateString"):k&&-1!==a.indexOf(k.properties||"",v)&&(n=b(v,e,k.formatter||"NumberFormat")),f.push("\x3ctr\x3e\x3cth\x3e"+v+"\x3c/th\x3e\x3ctd\x3e"+c(n)+"\x3c/td\x3e\x3c/tr\x3e"),q)break;f.push("\x3c/tbody\x3e\x3c/table\x3e");return f.join("")},filter:function(b,c,n){c=[p.isString(b)?
b.split(""):b,n||h.global,p.isString(c)?new Function("item","index","array",c):c];n={};var e;b=c[0];for(e in b)c[2].call(c[e],b[e],e,b)&&(n[e]=b[e]);return n},startsWith:function(b,c,n){n=n||0;return b.indexOf(c,n)===n},endsWith:function(b,c,n){if("number"!==typeof n||!isFinite(n)||Math.floor(n)!==n||n>b.length)n=b.length;n-=c.length;b=b.indexOf(c,n);return-1!==b&&b===n},isDefined:g,fixJson:q,clone:x}})},"dojo/date":function(){define(["./has","./_base/lang"],function(a,h){var p={getDaysInMonth:function(a){var f=
a.getMonth();return 1==f&&p.isLeapYear(a)?29:[31,28,31,30,31,30,31,31,30,31,30,31][f]},isLeapYear:function(a){a=a.getFullYear();return!(a%400)||!(a%4)&&!!(a%100)},getTimezoneName:function(a){var f=a.toString(),e="",l=f.indexOf("(");if(-1<l)e=f.substring(++l,f.indexOf(")"));else if(l=/([A-Z\/]+) \d{4}$/,f=f.match(l))e=f[1];else if(f=a.toLocaleString(),l=/ ([A-Z\/]+)$/,f=f.match(l))e=f[1];return"AM"==e||"PM"==e?"":e},compare:function(a,f,e){a=new Date(+a);f=new Date(+(f||new Date));"date"==e?(a.setHours(0,
0,0,0),f.setHours(0,0,0,0)):"time"==e&&(a.setFullYear(0,0,0),f.setFullYear(0,0,0));return a>f?1:a<f?-1:0},add:function(a,f,e){var l=new Date(+a),g=!1,c="Date";switch(f){case "day":break;case "weekday":var b;(f=e%5)?b=parseInt(e/5):(f=0<e?5:-5,b=0<e?(e-5)/5:(e+5)/5);var q=a.getDay(),x=0;6==q&&0<e?x=1:0==q&&0>e&&(x=-1);q+=f;if(0==q||6==q)x=0<e?2:-2;e=7*b+f+x;break;case "year":c="FullYear";g=!0;break;case "week":e*=7;break;case "quarter":e*=3;case "month":g=!0;c="Month";break;default:c="UTC"+f.charAt(0).toUpperCase()+
f.substring(1)+"s"}if(c)l["set"+c](l["get"+c]()+e);g&&l.getDate()<a.getDate()&&l.setDate(0);return l},difference:function(a,f,e){f=f||new Date;e=e||"day";var l=f.getFullYear()-a.getFullYear(),g=1;switch(e){case "quarter":a=a.getMonth();f=f.getMonth();g=Math.floor(f/3)+1+4*l-(Math.floor(a/3)+1);break;case "weekday":l=Math.round(p.difference(a,f,"day"));e=parseInt(p.difference(a,f,"week"));if(0==l%7)l=5*e;else{var g=0,c=a.getDay(),b=f.getDay();e=parseInt(l/7);f=l%7;a=new Date(a);a.setDate(a.getDate()+
7*e);a=a.getDay();if(0<l)switch(!0){case 6==c:g=-1;break;case 0==c:g=0;break;case 6==b:g=-1;break;case 0==b:g=-2;break;case 5<a+f:g=-2}else if(0>l)switch(!0){case 6==c:g=0;break;case 0==c:g=1;break;case 6==b:g=2;break;case 0==b:g=1;break;case 0>a+f:g=2}l=l+g-2*e}g=l;break;case "year":g=l;break;case "month":g=f.getMonth()-a.getMonth()+12*l;break;case "week":g=parseInt(p.difference(a,f,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=
f.getTime()-a.getTime()}return Math.round(g)}};h.mixin(h.getObject("dojo.date",!0),p);return p})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(a,h,p,m,f){var e={};a.setObject("dojo.number",e);e.format=function(g,c){c=a.mixin({},c||{});var b=h.normalizeLocale(c.locale),b=h.getLocalization("dojo.cldr","number",b);c.customs=b;b=c.pattern||b[(c.type||"decimal")+"Format"];return isNaN(g)||Infinity==Math.abs(g)?null:e._applyPattern(g,
b,c)};e._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;e._applyPattern=function(a,c,b){b=b||{};var g=b.customs.group,f=b.customs.decimal;c=c.split(";");var l=c[0];c=c[0>a?1:0]||"-"+l;if(-1!=c.indexOf("%"))a*=100;else if(-1!=c.indexOf("\u2030"))a*=1E3;else if(-1!=c.indexOf("\u00a4"))g=b.customs.currencyGroup||g,f=b.customs.currencyDecimal||f,c=c.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(c,e,n,a){return(c=b[["symbol","currency","displayName"][n.length-1]]||b.currency||"")?e+c+a:""});else if(-1!=
c.indexOf("E"))throw Error("exponential notation not supported");var t=e._numberPatternRE,l=l.match(t);if(!l)throw Error("unable to find a number expression in pattern: "+c);!1===b.fractional&&(b.places=0);return c.replace(t,e._formatAbsolute(a,l[0],{decimal:f,group:g,places:b.places,round:b.round}))};e.round=function(e,c,b){b=10/(b||10);return(b*+e).toFixed(c)/b};if(0==(.9).toFixed()){var l=e.round;e.round=function(e,c,b){var a=Math.pow(10,-c||0),g=Math.abs(e);if(!e||g>=a)a=0;else if(g/=a,.5>g||
.95<=g)a=0;return l(e,c,b)+(0<e?a:-a)}}e._formatAbsolute=function(a,c,b){b=b||{};!0===b.places&&(b.places=0);Infinity===b.places&&(b.places=6);c=c.split(".");var g="string"==typeof b.places&&b.places.indexOf(","),f=b.places;g?f=b.places.substring(g+1):0<=f||(f=(c[1]||[]).length);0>b.round||(a=e.round(a,f,b.round));a=String(Math.abs(a)).split(".");var l=a[1]||"";c[1]||b.places?(g&&(b.places=b.places.substring(0,g)),g=void 0!==b.places?b.places:c[1]&&c[1].lastIndexOf("0")+1,g>l.length&&(a[1]=m.pad(l,
g,"0",!0)),f<l.length&&(a[1]=l.substr(0,f))):a[1]&&a.pop();f=c[0].replace(",","");g=f.indexOf("0");-1!=g&&(g=f.length-g,g>a[0].length&&(a[0]=m.pad(a[0],g)),-1==f.indexOf("#")&&(a[0]=a[0].substr(a[0].length-g)));var f=c[0].lastIndexOf(","),t,u;-1!=f&&(t=c[0].length-f-1,c=c[0].substr(0,f),f=c.lastIndexOf(","),-1!=f&&(u=c.length-f-1));c=[];for(f=a[0];f;)g=f.length-t,c.push(0<g?f.substr(g):f),f=0<g?f.slice(0,g):"",u&&(t=u,u=void 0);a[0]=c.reverse().join(b.group||",");return a.join(b.decimal||".")};e.regexp=
function(a){return e._parseInfo(a).regexp};e._parseInfo=function(a){a=a||{};var c=h.normalizeLocale(a.locale),c=h.getLocalization("dojo.cldr","number",c),b=a.pattern||c[(a.type||"decimal")+"Format"],g=c.group,l=c.decimal,m=1;if(-1!=b.indexOf("%"))m/=100;else if(-1!=b.indexOf("\u2030"))m/=1E3;else{var t=-1!=b.indexOf("\u00a4");t&&(g=c.currencyGroup||g,l=c.currencyDecimal||l)}c=b.split(";");1==c.length&&c.push("-"+c[0]);c=f.buildGroupRE(c,function(b){b="(?:"+f.escapeString(b,".")+")";return b.replace(e._numberPatternRE,
function(b){var c={signed:!1,separator:a.strict?g:[g,""],fractional:a.fractional,decimal:l,exponent:!1};b=b.split(".");var f=a.places;1==b.length&&1!=m&&(b[1]="###");1==b.length||0===f?c.fractional=!1:(void 0===f&&(f=a.pattern?b[1].lastIndexOf("0")+1:Infinity),f&&void 0==a.fractional&&(c.fractional=!0),!a.places&&f<b[1].length&&(f+=","+b[1].length),c.places=f);b=b[0].split(",");1<b.length&&(c.groupSize=b.pop().length,1<b.length&&(c.groupSize2=b.pop().length));return"("+e._realNumberRegexp(c)+")"})},
!0);t&&(c=c.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(b,c,n,e){b=f.escapeString(a[["symbol","currency","displayName"][n.length-1]]||a.currency||"");if(!b)return"";c=c?"[\\s\\xa0]":"";e=e?"[\\s\\xa0]":"";return a.strict?c+b+e:(c&&(c+="*"),e&&(e+="*"),"(?:"+c+b+e+")?")}));return{regexp:c.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:g,decimal:l,factor:m}};e.parse=function(a,c){c=e._parseInfo(c);a=(new RegExp("^"+c.regexp+"$")).exec(a);if(!a)return NaN;var b=a[1];if(!a[1]){if(!a[2])return NaN;
b=a[2];c.factor*=-1}b=b.replace(new RegExp("["+c.group+"\\s\\xa0]","g"),"").replace(c.decimal,".");return b*c.factor};e._realNumberRegexp=function(a){a=a||{};"places"in a||(a.places=Infinity);"string"!=typeof a.decimal&&(a.decimal=".");"fractional"in a&&!/^0/.test(a.places)||(a.fractional=[!0,!1]);"exponent"in a||(a.exponent=[!0,!1]);"eSigned"in a||(a.eSigned=[!0,!1]);var c=e._integerRegexp(a),b=f.buildGroupRE(a.fractional,function(b){var c="";b&&0!==a.places&&(c="\\"+a.decimal,c=Infinity==a.places?
"(?:"+c+"\\d+)?":c+("\\d{"+a.places+"}"));return c},!0),g=f.buildGroupRE(a.exponent,function(b){return b?"([eE]"+e._integerRegexp({signed:a.eSigned})+")":""}),c=c+b;b&&(c="(?:(?:"+c+")|(?:"+b+"))");return c+g};e._integerRegexp=function(e){e=e||{};"signed"in e||(e.signed=[!0,!1]);"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="";var c=f.buildGroupRE(e.signed,function(b){return b?"[-+]":""},!0),b=f.buildGroupRE(e.separator,function(b){if(!b)return"(?:\\d+)";b=f.escapeString(b);" "==b?
b="\\s":"\u00a0"==b&&(b="\\s\\xa0");var c=e.groupSize,a=e.groupSize2;return a?(b="(?:0|[1-9]\\d{0,"+(a-1)+"}(?:["+b+"]\\d{"+a+"})*["+b+"]\\d{"+c+"})",0<c-a?"(?:"+b+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":b):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+b+"]\\d{"+c+"})*)"},!0);return c+b};return e})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./has!host-browser?./_base/xhr ./json module".split(" "),function(a,h,p,m,f,e,l,g,c){p.add("dojo-preload-i18n-Api",1);l=
a.i18n={};var b=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,q=function(d,b,k,c){var n=[k+c];b=b.split("-");for(var e="",a=0;a<b.length;a++)if(e+=(e?"-":"")+b[a],!d||d[e])n.push(k+e+"/"+c),n.specificity=e;return n},x={},y=function(d,b,k){k=k?k.toLowerCase():a.locale;d=d.replace(/\./g,"/");b=b.replace(/\./g,"/");return/root/i.test(k)?d+"/nls/"+b:d+"/nls/"+k+"/"+b},t=a.getL10nName=function(d,b,k){return d=c.id+"!"+y(d,b,k)},u=function(d,b,k,c,n,a){d([b],function(g){var v=e.clone(g.root||g.ROOT),f=q(!g._v1x&&
g,n,k,c);d(f,function(){for(var d=1;d<f.length;d++)v=e.mixin(e.clone(v),arguments[d]);x[b+"/"+n]=v;v.$locale=f.specificity;a()})})},r=function(d){var b=f.extraLocale||[],b=e.isArray(b)?b:[b];b.push(d);return b},n=function(c,n,f){var q=b.exec(c),l=q[1]+"/",t=q[5]||q[4],w=l+t,h=(q=q[5]&&q[4])||a.locale||"",y=w+"/"+h,q=q?[h]:r(h),z=q.length,D=function(){--z||f(e.delegate(x[y]))},h=c.split("*"),B="preload"==h[1];if(p("dojo-preload-i18n-Api")){if(B&&(x[c]||(x[c]=1,v(h[2],g.parse(h[3]),1,n)),f(1)),(h=B)||
(d&&k.push([c,n,f]),h=d&&!x[y]),h)return}else if(B){f(1);return}m.forEach(q,function(d){var b=w+"/"+d;p("dojo-preload-i18n-Api")&&A(b);x[b]?D():u(n,w,l,t,d,D)})};p("dojo-preload-i18n-Api");var w=l.normalizeLocale=function(d){d=d?d.toLowerCase():a.locale;return"root"==d?"ROOT":d},d=0,k=[],v=l._preloadLocalizations=function(b,c,g,v){function f(d,b){v([d],b)}function q(d,b){for(d=d.split("-");d.length;){if(b(d.join("-")))return;d.pop()}b("ROOT")}function l(){for(--d;!d&&k.length;)n.apply(null,k.shift())}
function t(k){k=w(k);q(k,function(n){if(0<=m.indexOf(c,n)){var a=b.replace(/\./g,"/")+"_"+n;d++;f(a,function(b){for(var c in b){var a=b[c],g=c.match(/(.+)\/([^\/]+)$/),f;if(g&&(f=g[2],g=g[1]+"/",a._localized)){var t;if("ROOT"===n){var r=t=a._localized;delete a._localized;r.root=a;x[h.toAbsMid(c)]=r}else t=a._localized,x[h.toAbsMid(g+f+"/"+n)]=a;n!==k&&function(b,c,n,a){var g=[],f=[];q(k,function(d){a[d]&&(g.push(h.toAbsMid(b+d+"/"+c)),f.push(h.toAbsMid(b+c+"/"+d)))});g.length?(d++,v(g,function(){for(var d=
g.length-1;0<=d;d--)n=e.mixin(e.clone(n),arguments[d]),x[f[d]]=n;x[h.toAbsMid(b+c+"/"+k)]=e.clone(n);l()})):x[h.toAbsMid(b+c+"/"+k)]=n}(g,f,a,t)}}l()});return!0}return!1})}v=v||h;t();m.forEach(a.config.extraLocale,t)},A=function(){},A=function(d){for(var b,k=d.split("/"),c=a.global[k[0]],n=1;c&&n<k.length-1;c=c[k[n++]]);c&&((b=c[k[n]])||(b=c[k[n].replace(/-/g,"_")]),b&&(x[d]=b));return b};l.getLocalization=function(d,b,k){var c;d=y(d,b,k);n(d,h,function(d){c=d});return c};return e.mixin(l,{dynamic:!0,
normalize:function(d,b){return/^\./.test(d)?b(d):d},load:n,cache:x,getL10nName:t})})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(a,h){var p=/[&<>'"\/]/g,m={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},f={};h.setObject("dojo.string",f);f.escape=function(e){return e?e.replace(p,function(e){return m[e]}):""};f.rep=function(e,a){if(0>=a||!e)return"";for(var g=[];;){a&1&&g.push(e);if(!(a>>=1))break;e+=e}return g.join("")};
f.pad=function(e,a,g,c){g||(g="0");e=String(e);a=f.rep(g,Math.ceil((a-e.length)/g.length));return c?e+a:a+e};f.substitute=function(e,f,g,c){c=c||a.global;g=g?h.hitch(c,g):function(b){return b};return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(b,e,a){if(""==e)return"$";b=h.getObject(e,!1,f);a&&(b=h.getObject(a,!1,c).call(c,b,e));a=g(b,e);if("undefined"===typeof a)throw Error('string.substitute could not find key "'+e+'" in template');return a.toString()})};f.trim=String.prototype.trim?
h.trim:function(e){e=e.replace(/^\s+/,"");for(var a=e.length-1;0<=a;a--)if(/\S/.test(e.charAt(a))){e=e.substring(0,a+1);break}return e};return f})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(a,h){var p={};h.setObject("dojo.regexp",p);p.escapeString=function(a,f){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(e){return f&&-1!=f.indexOf(e)?e:"\\"+e})};p.buildGroupRE=function(a,f,e){if(!(a instanceof Array))return f(a);for(var l=[],g=0;g<a.length;g++)l.push(f(a[g]));
return p.group(l.join("|"),e)};p.group=function(a,f){return"("+(f?"?:":"")+a+")"};return p})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),function(a,h,p,m,f,e,l,g,c){function b(b,c,d,k){return k.replace(/([a-z])\1*/ig,function(n){var e,a,g=n.charAt(0);n=n.length;var v=["abbr","wide","narrow"];switch(g){case "G":e=c[4>n?"eraAbbr":"eraNames"][0>b.getFullYear()?0:1];break;
case "y":e=b.getFullYear();switch(n){case 1:break;case 2:if(!d.fullYear){e=String(e);e=e.substr(e.length-2);break}default:a=!0}break;case "Q":case "q":e=Math.ceil((b.getMonth()+1)/3);a=!0;break;case "M":case "L":e=b.getMonth();3>n?(e+=1,a=!0):(g=["months","L"==g?"standAlone":"format",v[n-3]].join("-"),e=c[g][e]);break;case "w":e=y._getWeekOfYear(b,0);a=!0;break;case "d":e=b.getDate();a=!0;break;case "D":e=y._getDayOfYear(b);a=!0;break;case "e":case "c":if(e=b.getDay(),2>n){e=(e-m.getFirstDayOfWeek(d.locale)+
8)%7;break}case "E":e=b.getDay();3>n?(e+=1,a=!0):(g=["days","c"==g?"standAlone":"format",v[n-3]].join("-"),e=c[g][e]);break;case "a":g=12>b.getHours()?"am":"pm";e=d[g]||c["dayPeriods-format-wide-"+g];break;case "h":case "H":case "K":case "k":a=b.getHours();switch(g){case "h":e=a%12||12;break;case "H":e=a;break;case "K":e=a%12;break;case "k":e=a||24}a=!0;break;case "m":e=b.getMinutes();a=!0;break;case "s":e=b.getSeconds();a=!0;break;case "S":e=Math.round(b.getMilliseconds()*Math.pow(10,n-3));a=!0;
break;case "v":case "z":if(e=y._getZone(b,!0,d))break;n=4;case "Z":g=y._getZone(b,!1,d);g=[0>=g?"+":"-",l.pad(Math.floor(Math.abs(g)/60),2),l.pad(Math.abs(g)%60,2)];4==n&&(g.splice(0,0,"GMT"),g.splice(3,0,":"));e=g.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+k);}a&&(e=l.pad(e,n));return e})}function q(b,c,d,k){var n=function(d){return d};c=c||n;d=d||n;k=k||n;var e=b.match(/(''|[^'])+/g),a="'"==b.charAt(0);h.forEach(e,function(b,k){b?(e[k]=(a?d:c)(b.replace(/''/g,
"'")),a=!a):e[k]=""});return k(e.join(""))}function x(b,c,d,k){k=e.escapeString(k);d.strict||(k=k.replace(" a"," ?a"));return k.replace(/([a-z])\1*/ig,function(k){var n;n=k.charAt(0);var e=k.length,a="",g="";d.strict?(1<e&&(a="0{"+(e-1)+"}"),2<e&&(g="0{"+(e-2)+"}")):(a="0?",g="0{0,2}");switch(n){case "y":n="\\d{2,4}";break;case "M":case "L":2<e?(n=c["months-"+("L"==n?"standAlone":"format")+"-"+t[e-3]].slice(0).join("|"),d.strict||(n=n.replace(/\./g,""),n="(?:"+n+")\\.?")):n="1[0-2]|"+a+"[1-9]";break;
case "D":n="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+a+"[1-9][0-9]|"+g+"[1-9]";break;case "d":n="3[01]|[12]\\d|"+a+"[1-9]";break;case "w":n="[1-4][0-9]|5[0-3]|"+a+"[1-9]";break;case "E":case "e":case "c":n=".+?";break;case "h":n="1[0-2]|"+a+"[1-9]";break;case "k":n="1[01]|"+a+"\\d";break;case "H":n="1\\d|2[0-3]|"+a+"\\d";break;case "K":n="1\\d|2[0-4]|"+a+"[1-9]";break;case "m":case "s":n="[0-5]\\d";break;case "S":n="\\d{"+e+"}";break;case "a":e=d.am||c["dayPeriods-format-wide-am"];a=d.pm||c["dayPeriods-format-wide-pm"];
n=e+"|"+a;d.strict||(e!=e.toLowerCase()&&(n+="|"+e.toLowerCase()),a!=a.toLowerCase()&&(n+="|"+a.toLowerCase()),-1!=n.indexOf(".")&&(n+="|"+n.replace(/\./g,"")));n=n.replace(/\./g,"\\.");break;default:n=".*"}b&&b.push(k);return"("+n+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var y={};a.setObject(c.id.replace(/\//g,"."),y);y._getZone=function(b,c,d){return c?p.getTimezoneName(b):b.getTimezoneOffset()};y.format=function(c,e){e=e||{};var d=f.normalizeLocale(e.locale),k=e.formatLength||"short",d=y._getGregorianBundle(d),
n=[];c=a.hitch(this,b,c,d,e);if("year"==e.selector)return q(d["dateFormatItem-yyyy"]||"yyyy",c);var g;"date"!=e.selector&&(g=e.timePattern||d["timeFormat-"+k])&&n.push(q(g,c));"time"!=e.selector&&(g=e.datePattern||d["dateFormat-"+k])&&n.push(q(g,c));return 1==n.length?n[0]:d["dateTimeFormat-"+k].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(d,b){return n[b]})};y.regexp=function(b){return y._parseInfo(b).regexp};y._parseInfo=function(b){b=b||{};var c=f.normalizeLocale(b.locale),c=y._getGregorianBundle(c),
d=b.formatLength||"short",k=b.datePattern||c["dateFormat-"+d],n=b.timePattern||c["timeFormat-"+d],d="date"==b.selector?k:"time"==b.selector?n:c["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(d,b){return[n,k][b]}),e=[];return{regexp:q(d,a.hitch(this,x,e,c,b)),tokens:e,bundle:c}};y.parse=function(b,c){var d=/[\u200E\u200F\u202A\u202E]/g,k=y._parseInfo(c),n=k.tokens,e=k.bundle;b=(new RegExp("^"+k.regexp.replace(d,"")+"$",k.strict?"":"i")).exec(b&&b.replace(d,""));if(!b)return null;var a=["abbr",
"wide","narrow"],g=[1970,0,1,0,0,0,0],f="";b=h.every(b,function(d,b){if(!b)return!0;var k=n[b-1];b=k.length;k=k.charAt(0);switch(k){case "y":if(2!=b&&c.strict)g[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),g[0]=d<k?b+d:b-100+d;else{if(c.strict)return!1;g[0]=d}break;case "M":case "L":if(2<b){if(b=e["months-"+("L"==k?"standAlone":"format")+"-"+a[b-3]].concat(),c.strict||(d=d.replace(".","").toLowerCase(),b=h.map(b,function(d){return d.replace(".",
"").toLowerCase()})),d=h.indexOf(b,d),-1==d)return!1}else d--;g[1]=d;break;case "E":case "e":case "c":b=e["days-"+("c"==k?"standAlone":"format")+"-"+a[b-3]].concat();c.strict||(d=d.toLowerCase(),b=h.map(b,function(d){return d.toLowerCase()}));d=h.indexOf(b,d);if(-1==d)return!1;break;case "D":g[1]=0;case "d":g[2]=d;break;case "a":b=c.am||e["dayPeriods-format-wide-am"];k=c.pm||e["dayPeriods-format-wide-pm"];if(!c.strict){var v=/\./g;d=d.replace(v,"").toLowerCase();b=b.replace(v,"").toLowerCase();k=
k.replace(v,"").toLowerCase()}if(c.strict&&d!=b&&d!=k)return!1;f=d==k?"p":d==b?"a":"";break;case "K":24==d&&(d=0);case "h":case "H":case "k":if(23<d)return!1;g[3]=d;break;case "m":g[4]=d;break;case "s":g[5]=d;break;case "S":g[6]=d}return!0});d=+g[3];"p"===f&&12>d?g[3]=d+12:"a"===f&&12==d&&(g[3]=0);d=new Date(g[0],g[1],g[2],g[3],g[4],g[5],g[6]);c.strict&&d.setFullYear(g[0]);var q=n.join(""),k=-1!=q.indexOf("d"),q=-1!=q.indexOf("M");if(!b||q&&d.getMonth()>g[1]||k&&d.getDate()>g[2])return null;if(q&&
d.getMonth()<g[1]||k&&d.getDate()<g[2])d=p.add(d,"hour",1);return d};var t=["abbr","wide","narrow"],u=[],r={};y.addCustomFormats=function(b,c){u.push({pkg:b,name:c});r={}};y._getGregorianBundle=function(b){if(r[b])return r[b];var c={};h.forEach(u,function(d){d=f.getLocalization(d.pkg,d.name,b);c=a.mixin(c,d)},this);return r[b]=c};y.addCustomFormats(c.id.replace(/\/date\/locale$/,".cldr"),"gregorian");y.getNames=function(b,c,d,k){var n;k=y._getGregorianBundle(k);b=[b,d,c];"standAlone"==d&&(d=b.join("-"),
n=k[d],1==n[0]&&(n=void 0));b[1]="format";return(n||k[b.join("-")]).concat()};y.isWeekend=function(b,c){c=m.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};y._getDayOfYear=function(b){return p.difference(new Date(b.getFullYear(),0,1,b.getHours()),b)+1};y._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((y._getDayOfYear(b)+k-1)/7);d==c&&k++;return k};return y})},
"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(a,h){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,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=h.normalizeLocale(a);a=a.split("-");var f=a[1];f?4==f.length&&(f=a[2]):f={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",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",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",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",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",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",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",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 f};p.getWeekend=function(a){var f=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}[f];f={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}[f];void 0===a&&(a=6);void 0===f&&(f=0);return{start:a,end:f}};return p})},"esri/core/accessorSupport/get":function(){define(["require","exports","./utils"],function(a,h,p){function m(e,c,b){if(null!=b.getItemAt||Array.isArray(b)){var a=parseInt(e,10);if(!isNaN(a))return Array.isArray(b)?b[a]:b.getItemAt(a)}a=p.getProperties(b);return c?p.isPropertyDeclared(a,e)?a.get(e):b[e]:p.isPropertyDeclared(a,e)?a.internalGet(e):b[e]}function f(e,c,b,a){if(null==e)return e;if((e=m(c[a],
b,e))||!(a<c.length-1))return a===c.length-1?e:f(e,c,b,a+1)}function e(e,c,b,a){void 0===b&&(b=!1);void 0===a&&(a=0);return"string"===typeof c&&-1===c.indexOf(".")?m(c,b,e):f(e,p.pathToArray(c),b,a)}function l(a,c){return e(a,c,!0)}h.valueOf=e;h.get=l;h.exists=function(a,c){return void 0!==e(c,a,!0)};Object.defineProperty(h,"__esModule",{value:!0});h.default=l})},"esri/core/accessorSupport/set":function(){define(["require","exports","./get"],function(a,h,p){function m(a,e,l){if(a&&e)if("object"===
typeof e){l=0;for(var g=Object.getOwnPropertyNames(e);l<g.length;l++){var c=g[l];m(a,c,e[c])}}else"_"!==e[0]&&(-1!==e.indexOf(".")?(e=e.split("."),c=e.splice(e.length-1,1)[0],m(p.default(a,e),c,l)):a[e]=l)}h.set=m;Object.defineProperty(h,"__esModule",{value:!0});h.default=m})},"esri/core/accessorSupport/extensions/computedProperty":function(){define(["require","exports","dojo/has","../utils","../wire"],function(a,h,p,m,f){h.ComputedPropertyExtension={processClassPropertyMetadata:function(e,a,g,c){a.dependsOn&&
(a.wire=f.create(a.dependsOn,function(b){return m.getProperties(b).propertyInvalidated(e)}))},instanceCreated:function(e,a,g){for(var c=0;c<g.length;c++){var b=a[g[c]];b.wire&&b.wire(e)}}};Object.defineProperty(h,"__esModule",{value:!0});h.default=h.ComputedPropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ./serializableProperty/shorthands ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/writer".split(" "),
function(a,h,p,m,f,e){function l(e,c,b){var a=e&&e.json;e&&e.json&&e.json.origins&&b&&(e=e.json.origins[b.origin])&&c in e&&(a=e);return a}h.originSpecificReadPropertyDefinition=function(e,c){return l(e,"read",c)};h.originSpecificWritePropertyDefinition=function(e,c){return l(e,"write",c)};h.SerializablePropertyExtension={processPrototypePropertyMetadata:function(a,c,b,q){if(p.process(c)){m.process(c);q=(b=Array.isArray(c.type))?c.type[0]:c.type;if(c.json.origins)for(var g in c.json.origins){var l=
c.json.origins[g];f.create(q,b,a,l);e.create(q,b,a,l)}f.create(q,b,a,c.json);e.create(q,b,a,c.json)}}};Object.defineProperty(h,"__esModule",{value:!0});h.default=h.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require","exports"],function(a,h){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 m(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===a.write.enabled&&(a.write.enabled=!0)}h.process=function(a){a.json||(a.json={});p(a.json);m(a.json);if(a.json.origins)for(var e in a.json.origins)p(a.json.origins[e]),m(a.json.origins[e]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require","exports"],
function(a,h){h.process=function(a){if(a.json&&a.json.origins){var m=a.json.origins,f={portalItem:["portal-item"],webScene:["web-scene"],webMap:["web-map"],webDocument:["web-scene","web-map"],"web-document":["web-scene","web-map"]};a=function(e){if(m[e]){var a=m[e];f[e].forEach(function(c){m[c]=a});delete m[e]}};for(var e in f)a(e)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports","dojo/_base/lang","./type"],function(a,h,p,m){function f(b,
c,a,f){if(c)return l(b);if(g(b)){var q=l(b.prototype.itemType);return function(c,e){return(c=q(c,e))?new b(c):c}}return e(b)}function e(b){return b.prototype.read?function(c,e,a){return null==c?c:(new b).read(c,a)}:b.fromJSON}function l(b){var c=e(b);return function(b,e,a){return null==b?b:Array.isArray(b)?b.map(function(b){return c(b,null,a)}):[c(b,null,a)]}}function g(b){return m.isCollection(b)&&c(b.prototype.itemType)}function c(b){return!!b&&(!!b.prototype.read||!!b.fromJSON||g(b))}h.create=
function(b,e,a,g){(!g.read||!g.read.reader&&!1!==g.read.enabled)&&c(b)&&p.setObject("read.reader",f(b,e,a,g),g)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require","exports"],function(a,h){h.isCollection=function(a){return!!a&&!!a.prototype.declaredClass&&0===a.prototype.declaredClass.indexOf("esri.core.Collection")}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require","exports","dojo/_base/lang","./type"],
function(a,h,p,m){function f(a,c,b,f){p.setObject(b,e(a,f),c)}function e(e,c){return e&&"function"===typeof e.toJSON&&!e.toJSON.isDefaultToJSON?e.toJSON():e&&"function"===typeof e.write?e.write({},c):e}function l(a,c,b,f){null===a?a=null:a&&"function"===typeof a.map?(a=a.map(function(b){return e(b,f)}),"function"===typeof a.toArray&&(a=a.toArray())):a=[e(a,f)];p.setObject(b,a,c)}h.create=function(e,c,b,a){a.write&&!a.write.writer&&!1!==a.write.enabled&&(c||m.isCollection(e)?a.write.writer=l:a.write.writer=
f)}})},"esri/core/Logger":function(){define(["require","exports","dojo/has"],function(a,h,p){var m={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||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(e){for(var a=[],g=1;g<arguments.length;g++)a[g-1]=arguments[g];this._isEnabled()&&
this._matchLevel(e)&&(g=this._inheritedWriter())&&g.apply(void 0,[e,this.module].concat(a))};a.prototype.error=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];this.log.apply(this,["error"].concat(e))};a.prototype.warn=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];this.log.apply(this,["warn"].concat(e))};a.prototype.info=function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];this.log.apply(this,["info"].concat(a))};a.prototype.getLogger=function(e){return a.getLogger(this.module+
"."+e)};a.getLogger=function(e){var f=a._loggers[e];f||(f=new a({module:e}));return f};a.prototype._parentWithMember=function(a,f){for(var e=this;e&&null==e[a];)e=e.parent;return e?e[a]:f};a.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};a.prototype._consoleWriter=function(a,f){for(var e=[],c=2;c<arguments.length;c++)e[c-2]=arguments[c];console[a].apply(console,["["+f+"]"].concat(e))};a.prototype._matchLevel=function(a){return m[this._parentWithMember("level",
"error")]<=m[a]};a.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};return a}();a._loggers={};a.getLogger("esri").level="warn";return a})},"esri/core/accessorSupport/introspection":function(){define("require exports dojo/_base/lang ./utils ./metadata ./ensureType ./extensions ./decorators/cast".split(" "),function(a,h,p,m,f,e,l,g){var c=Object.prototype.hasOwnProperty,b=/^_([a-zA-Z0-9]+)(Getter|Setter|Reader|Writer|Caster)$/,q={Getter:"get",Setter:"set",Reader:"json.read.reader",
Writer:"json.write.writer",Caster:"cast"},x=/^_(set|get)([a-zA-Z0-9]+)Attr$/;h.processPrototype=function(a){for(var g=a.declaredClass,u=a.properties||{},r=0,n=Object.getOwnPropertyNames(u);r<n.length;r++){var w=n[r],d=u[w],k=typeof d;null==d?f.setPropertyMetadata(a,w,{value:d}):Array.isArray(d)?f.setPropertyMetadata(a,w,{type:[d[0]],value:null}):"object"===k?m.getProperties(d)||d instanceof Date?f.setPropertyMetadata(a,w,{type:d.constructor,value:d}):f.setPropertyMetadata(a,w,d):"boolean"===k?f.setPropertyMetadata(a,
w,{type:Boolean,value:d}):"string"===k?f.setPropertyMetadata(a,w,{type:String,value:d}):"number"===k?f.setPropertyMetadata(a,w,{type:Number,value:d}):"function"===k&&f.setPropertyMetadata(a,w,{type:d,value:null})}r=0;for(n=Object.getOwnPropertyNames(a);r<n.length;r++){var k=n[r],d=a[k],v=void 0,u=w=void 0;if(v=b.exec(k))w=v[1],u=q[v[2]];else if(v=x.exec(k))w=v[2][0].toLowerCase()+v[2].substr(1),u=v[1].toLowerCase();w&&u&&(w=f.getPropertyMetadata(a,w),p.setObject(u,d,w))}r=0;for(n=Object.getOwnPropertyNames(f.getPropertiesMetadata(a));r<
n.length;r++)if(w=n[r],d=f.getPropertyMetadata(a,w),u=d.type,void 0===d.value&&c.call(a,w)&&(d.value=a[w]),!d.cast&&u)switch(u){case Number:d.cast=e.ensureNumber;break;case Boolean:d.cast=e.ensureBoolean;break;case String:d.cast=e.ensureString;break;case Date:d.cast=e.ensureDate;break;default:Array.isArray(u)?d.cast=e.ensureArray(u[0]):d.cast=e.ensureType(u)}l.processPrototypeMetadatas(f.getPropertiesMetadata(a),g);return f.getPropertiesMetadata(a)};h.processClass=function(b){for(var c=b.prototype,
a=c.declaredClass,e=b._meta.bases,n={},q=e.length-1;0<=q;q--)m.merge(n,f.getMetadata(e[q].prototype));var d=n.properties;l.processClassMetadatas(d,a);Object.defineProperty(b,"__accessorMetadata__",{value:d});for(var k={},a=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);k.set(b,d)}}}},e=0,q=Object.getOwnPropertyNames(d);e<q.length;e++)a(q[e]);Object.defineProperties(b.prototype,k);if(n.parameters)for(b=0,a=Object.getOwnPropertyNames(n.parameters);b<a.length;b++)e=a[b],q=Object.getOwnPropertyDescriptor(c,e)||{value:c[e]},(q=g.autocastMethod(c,e,q))&&Object.defineProperty(c,e,q);return n}})},"esri/core/accessorSupport/metadata":function(){define(["require",
"exports"],function(a,h){function p(a){return null!=a.__accessorMetadata__}function m(a){return p(a)&&null!=f(a).properties}function f(a){a.__accessorMetadata__||Object.defineProperty(a,"__accessorMetadata__",{value:{},enumerable:!0,configurable:!0,writable:!0});return a.__accessorMetadata__}function e(a){a=f(a);var c=a.properties;c||(c=a.properties={});return c}function l(a,c){var b=f(a);a=b.parameters;a||(a=b.parameters={});b=a[c];b||(b=[],a[c]=b);return b}h.hasMetadata=p;h.hasPropertiesMetadata=
m;h.hasPropertyMetadata=function(a,c){return m(a)&&null!=e(a)[c]};h.hasParametersMetadata=function(a,c){return p(a)&&null!=f(a).parameters&&null!=f(a).parameters[c]};h.getMetadata=f;h.getPropertiesMetadata=e;h.getPropertyMetadata=function(a,c){a=e(a);var b=a[c];b||(b=a[c]={});return b};h.setPropertyMetadata=function(a,c,b){e(a)[c]=b};h.getParametersMetadata=l;h.getParameterMetadata=function(a,c,b){var e=l(a,c)[b];e||(l(a,c)[b]=e={index:b});return e}})},"esri/core/accessorSupport/ensureType":function(){define(["require",
"exports","dojo/has"],function(a,h,p){function m(a,e){return e.isInstanceOf?e.isInstanceOf(a):e instanceof a}function f(a,e){if(1===arguments.length)return f.bind(null,a);e&&a&&!m(a,e)&&(e=new a(e));return e}function e(a,g){return 1===arguments.length?e.bind(null,a):g?Array.isArray(g)?g.map(f.bind(null,a)):[f(a,g)]:g}h.isInstanceOf=m;h.ensureDate=function(a){return null==a?a:new Date(a)};h.ensureBoolean=function(a){return!0===a||!1===a?a:!!a};h.ensureString=function(a){return null==a?a:a.toString()};
h.ensureNumber=function(a){return null==a?a:parseFloat(a)};h.ensureType=f;h.ensureArray=e;Object.defineProperty(h,"__esModule",{value:!0});h.default=f})},"esri/core/accessorSupport/decorators/cast":function(){define(["require","exports","../metadata","../ensureType"],function(a,h,p,m){function f(b){var c="_meta"in b?m.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]?l.apply(this,b):e.apply(this,b)}}function e(b,c,a,
e){p.getPropertyMetadata(b,c).cast=e}function l(b,c,a,e){p.getParameterMetadata(b,c,a).cast=e}function g(b){return function(c,a,e){p.getPropertyMetadata(c,b).cast=c[a]}}var c=Object.prototype.toString;h.autocastMethod=function(b,c,a){if(p.hasParametersMetadata(b,c)){var e=p.getParametersMetadata(b,c).filter(function(b){return null!=b.cast});if(e.length){var g=a.value;a.value=function(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];for(c=0;c<e.length;c++){var a=e[c];b[a.index]=a.cast(b[a.index])}return g.apply(this,
b)};return a}console.warn("Method "+b.declaredClass+"::"+c+" is decorated with @cast but no parameters are decorated")}};h.cast=function(){for(var b=[],a=0;a<arguments.length;a++)b[a]=arguments[a];if(3!==b.length||"string"!==typeof b[1]){if(1===b.length&&"[object Function]"===c.call(b[0]))return f(b[0]);if(1===b.length&&"string"===typeof b[0])return g(b[0])}}})},"esri/core/accessorSupport/watch":function(){define("require exports ../Scheduler ../ObjectPool ../ArrayPool ../lang ./utils ./get ./wire".split(" "),
function(a,h,p,m,f,e,l,g,c){function b(b){w.has(b)?d.splice(d.indexOf(b),1):w.add(b);d.push(b);k||(k=p.schedule(x))}function q(d){if(!d.removed){var b=d.callback,k=d.path,c=d.oldValue,a=d.target,n=g.valueOf(a,d.propertyPath,!0);e.equals(c,n)||(d.oldValue=n,b.call(a,n,c,k,a))}}function x(){if(k){k=null;var b=d;d=n.acquire();w.clear();for(var c=n.acquire(),a=0;a<b.length;a++){var e=b[a];q(e);e.removed&&c.push(e)}for(a=0;a<d.length;a++)e=d[a],e.removed&&(c.push(e),w.delete(e),d.splice(a,1),--a);for(a=
0;a<c.length;a++)r.pool.release(c[a]);n.release(b);n.release(c)}}function y(d,k,a){var e=l.parse(d,k,a,function(d,k,a){var n=g.valueOf(d,k,!0),v,f=c.wire(d,k,function(d,k){d.__accessor__.destroyed?e.remove():(v||(v=r.pool.acquire(d,k,n,a),n=null),b(v))});return{remove:l.once(function(){f.remove();v&&(v.removed=!0,b(v),v=null);e=f=n=null})}});return e}function t(d,b,k){var a=l.parse(d,b,k,function(d,b,k){var n=g.valueOf(d,b,!0),v=!1;return c.wire(d,b,function(d,b){if(d.__accessor__.destroyed)a.remove();
else if(!v){v=!0;var c=g.valueOf(d,b,!0);e.equals(n,c)||k.call(d,c,n,b,d);n=g.valueOf(d,b,!0);v=!1}})});return a}function u(d,b,k,c){void 0===c&&(c=!1);return!d.__accessor__||d.__accessor__.destroyed?{remove:function(){}}:c?t(d,b,k):y(d,b,k)}var r=function(){function d(d,b,k,c){this.target=d;this.path=b;this.oldValue=k;this.callback=c;this.removed=!1;this.propertyPath=l.pathToStringOrArray(b)}d.prototype.release=function(){this.target=this.path=this.propertyPath=this.callback=this.oldValue=null;this.removed=
!0};return d}();r.pool=new m(r,!0);var n=new f,w=new Set,d=n.acquire(),k;h.dispatchTarget=function(b){for(var k=n.copy(d),c=0;c<k.length;c++){var a=k[c];a.target===b&&(q(a),w.delete(a),d.splice(d.indexOf(a),1))}};h.removeTarget=function(b){for(var k=0;k<d.length;k++){var c=d[k];c.target===b&&(c.removed=!0)}};h.dispatch=x;h.watch=u;Object.defineProperty(h,"__esModule",{value:!0});h.default=u})},"esri/core/Scheduler":function(){define(["./ArrayPool","./ObjectPool","./nextTick","./requestAnimationFrame",
"./now"],function(a,h,p,m,f){var e=["prepare","preRender","render","postRender","update"],l=new h(function(){this.isActive=!0;this.callback=null},!0,function(b){b.isActive=!1;b.callback=null}),g=function(){},c=function(){this.item.isActive=!1;q.release(this)},b={time:0,deltaTime:0,spendInFrame:0,spendInTask:0},q=new h(function(){this.remove=c;this.item=null},!0,function(b){b.remove=g;b.item=null});h=function(){this._boundDispatch=this._dispatch.bind(this);this.willDispatch=!1;this._queue=a.acquire();
this._frameTasks=a.acquire();this._phaseTasks={};this._previousFrameTime=-1;for(var b=0;b<e.length;b++)this._phaseTasks[e[b]]=a.acquire();this._boundAnimationFrame=this._animationFrame.bind(this);this.executing=!1;this._animationFrameRequestId=null};h.prototype={schedule:function(b){var c=l.acquire();c.callback=b;this._schedule(c);b=q.acquire();b.item=c;return b},_dispatch:function(){for(var b=this._queue;b.length;){var c=b.shift();c.isActive&&(c.isActive=!1,c.callback())}this.willDispatch=!1},_schedule:function(b){this._queue.push(b);
this.willDispatch||(this.willDispatch=!0,p(this._boundDispatch))},addFrameTask:function(b){var c={phases:b,paused:!1,pausedAt:0,epoch:-1,dt:0,ticks:-1,removed:!1};this._frameTasks.push(c);for(var a=0;a<e.length;a++){var g=e[a];b[g]&&this._phaseTasks[g].push(c)}this._animationFrameRequestId||(this._previousFrameTime=-1,this._requestAnimationFrame());return{isPaused:function(){return c.paused},remove:function(){c.removed=!0},pause:function(){c.paused=!0;c.pausedAt=f()},resume:function(){c.paused=!1;
-1!==c.epoch&&(c.epoch+=f()-c.pausedAt)}}},clearFrameTasks:function(){for(var b=0;b<this._frameTasks.length;b++)this._frameTasks[b].removed=!0},_purge:function(){for(var b=0;b<this._frameTasks.length;){var c=this._frameTasks[b];b++;if(c.removed){this._frameTasks.splice(b-1,1);for(var a=0;a<e.length;a++){var g=e[a];if(c.phases[g]){var g=this._phaseTasks[g],n=g.indexOf(c);-1!==n&&g.splice(n,1)}}}}},_animationFrame:function(c){this._animationFrameRequestId=null;this.executing=!0;0<this._frameTasks.length&&
this._requestAnimationFrame();c=f();0>this._previousFrameTime&&(this._previousFrameTime=c);var a=c-this._previousFrameTime;this._previousFrameTime=c;for(var g=0;g<this._frameTasks.length;g++){var q=this._frameTasks[g];-1!==q.epoch&&(q.dt=a)}for(g=0;g<e.length;g++)for(var a=e[g],n=this._phaseTasks[a],l=0;l<n.length;l++)q=n[l],q.paused||q.removed||(0===g&&q.ticks++,-1===q.epoch&&(q.epoch=c),b.time=c,b.deltaTime=q.dt,b.spendInFrame=f()-c,b.spendInTask=c-q.epoch,q.phases[a].call(q,b));this._purge();this.executing=
!1},_requestAnimationFrame:function(){this._animationFrameRequestId=m(this._boundAnimationFrame)}};var x=new h;h.schedule=function(b){return x.schedule(b)};h.addFrameTask=function(b){return x.addFrameTask(b)};h.clearFrameTasks=function(){return x.clearFrameTasks()};Object.defineProperty(h,"executing",{get:function(){return x.executing}});h.instance=x;return h})},"esri/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],function(a,h,p){var m=Array.prototype.splice;a=function(){function a(a,
e){void 0===a&&(a=50);void 0===e&&(e=50);this._pool=new p(Array,!1,function(c){return c.length=0},e,a)}a.prototype.acquire=function(){return this._pool.acquire()};a.prototype.copy=function(a){var e=this.acquire();a.unshift(0,0);m.apply(e,a);a.splice(0,2);return e};a.prototype.release=function(a){this._pool.release(a)};a.acquire=function(){return f.acquire()};a.copy=function(a){return f.copy(a)};a.release=function(a){return f.release(a)};return a}();var f=new a(100);return a})},"esri/core/ObjectPool":function(){define(["require",
"exports"],function(a,h){var p=function(){return function(){}}();return function(){function a(a,e,l,g,c){void 0===g&&(g=1);void 0===c&&(c=0);this.classConstructor=a;this.acquireFunctionOrWithConstructor=e;this.releaseFunction=l;this.growthSize=g;!0===e?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof e&&(this.acquireFunction=e);this._pool=Array(c);this._set=new Set;for(a=0;a<c;a++)this._pool[a]=new this.classConstructor;this.growthSize=Math.max(g,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 l=this.growthSize,g=0;g<l;g++)this._pool[g]=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&&!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._constructorAcquireFunction=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];(g=this.classConstructor).call.apply(g,[a].concat(e));var g};return a}()})},"esri/core/nextTick":function(){define(["require","exports"],function(a,h){function p(){if(m.postMessage&&!m.importScripts){var a=m.onmessage,f=!0;m.onmessage=function(){f=!1};m.postMessage("","*");m.onmessage=a;return f}return!1}var m=function(){return this}(),f=m.MutationObserver||m.WebKitMutationObserver;
return function(){var a;if(m.process&&m.process.nextTick)a=function(b){m.process.nextTick(b)};else if(m.Promise)a=function(b){m.Promise.resolve().then(b)};else if(f){var l=[],g=document.createElement("div");(new f(function(){for(;0<l.length;)l.shift()()})).observe(g,{attributes:!0});a=function(b){l.push(b);g.setAttribute("queueStatus","1")}}else if(p()){var c=[];m.addEventListener("message",function(b){if(b.source===m&&"esri-nexttick-message"===b.data)for(b.stopPropagation();c.length;)c.shift()()},
!0);a=function(b){c.push(b);m.postMessage("esri-nexttick-message","*")}}else a=m.setImmediate?function(b){return m.setImmediate(b)}:function(b){return m.setTimeout(b,0)};return a}()})},"esri/core/requestAnimationFrame":function(){define(["dojo/_base/window","dojo/sniff","./now"],function(a,h,p){var m=a.global;a=h("ff");var f=h("ie"),e=h("webkit");h=h("opera");var l=p(),g=m.requestAnimationFrame;g||(g=m[(e&&"webkit"||a&&"moz"||h&&"o"||f&&"ms")+"RequestAnimationFrame"])||(g=function(c){var b=p(),a=
Math.max(0,16-(b-l)),e=m.setTimeout(function(){c(p())},a);l=b+a;return e});return g})},"esri/core/now":function(){define(["require","exports","./global"],function(a,h,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()};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/global":function(){define(["require","exports"],function(a,h){return"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{}})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Collection ./HandleRegistry".split(" "),function(a,h,p,m,f,e,l){a=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(c){return b.watch("root."+c,b.updateCollections,!0)}));this.updateCollections()};c.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};c.prototype.updateCollections=function(){var b=this;this._collections=this.rootCollectionNames.map(function(c){return b.get("root."+
c)}).filter(function(b){return null!=b});this.refresh()};c.prototype.refresh=function(){var b=this._handles;b.remove("collections");this.removeAll();for(var c=this._collections.slice(),a=0,e=this._collections;a<e.length;a++)this._processCollection(c,this,e[a]);for(a=0;a<c.length;a++)b.add(c[a].on("after-changes",this.refresh),"collections")};c.prototype._createNewInstance=function(b){return new e(b)};c.prototype._processCollection=function(b,c,a){var e=this;a&&(b.push(a),a.forEach(function(a){a&&
(c.push(a),e._processCollection(b,c,e.getChildrenFunction(a)))}))};return c}(f.declared(e));m([f.property()],a.prototype,"rootCollectionNames",void 0);m([f.property()],a.prototype,"root",void 0);m([f.property()],a.prototype,"getChildrenFunction",void 0);return a=m([f.subclass("esri.core.CollectionFlattener")],a)})},"esri/core/accessorSupport/decorators":function(){define("require exports ./decorators/aliasOf ./decorators/cast ./decorators/declared ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer".split(" "),
function(a,h,p,m,f,e,l,g,c,b){function q(b){for(var c in b)h.hasOwnProperty(c)||(h[c]=b[c])}q(p);q(m);q(f);q(e);q(l);q(g);q(c);q(b)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","../metadata"],function(a,h,p){h.aliasOf=function(a){return function(f,e){p.getPropertyMetadata(f,e).aliasOf=a}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require","exports"],function(a,h){h.declared=function(a){for(var m=[],f=1;f<arguments.length;f++)m[f-
1]=arguments[f];f=function(){return this||{}};f.__bases__=[a].concat(m);return f}})},"esri/core/accessorSupport/decorators/property":function(){define(["require","exports","../../lang","../metadata"],function(a,h,p,m){h.property=function(a){void 0===a&&(a={});return function(e,f){var g=e.constructor.prototype;(e=Object.getOwnPropertyDescriptor(e,f))&&(e.get||e.set)&&(a=p.clone(a),e.set&&(a.set=e.set),e.get&&(a.get=e.get));f=m.getPropertyMetadata(g,f);for(var c in a)g=a[c],Array.isArray(g)?f[c]=(f[c]||
[]).concat(g):f[c]=g}};h.propertyJSONMeta=function(a,e,l){a=m.getPropertyMetadata(a.constructor.prototype,l);a.json||(a.json={});a=a.json;void 0!==e&&(a.origins||(a.origins={}),a.origins[e]||(a.origins[e]={}),a=a.origins[e]);return a}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,h,p,m){h.reader=function(a,e,l){var g,c;void 0===e||Array.isArray(e)?(c=a,l=e,g=[void 0]):(c=e,g=Array.isArray(a)?a:[a]);return function(b,
a,e){var f=b.constructor.prototype;g.forEach(function(e){e=m.propertyJSONMeta(b,e,c);e.read&&"object"!==typeof e.read&&(e.read={});p.setObject("read.reader",f[a],e);l&&(e.read.source=(e.read.source||[]).concat(l))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(a,h){h.shared=function(a){return function(m,f){m[f]=a}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require","exports","../../declare","../metadata"],function(a,
h,p,m){function f(b,c){b.read&&("function"===typeof b.read?c.push(b.read):"object"===typeof b.read&&b.read.reader&&c.push(b.read.reader))}function e(b,c){b.write&&("function"===typeof b.write?c.push(b.write):"object"===typeof b.write&&b.write.writer&&c.push(b.write.writer))}function l(b){var c=[];b=m.getPropertiesMetadata(b.prototype);if(!b)return c;for(var a in b){var g=b[a];g.cast&&c.push(g.cast);g.copy&&c.push(g.copy);if(g=g.json)if(f(g,c),e(g,c),g=g.origins)for(var t in g){var l=g[t];f(l,c);e(l,
c)}}return c}function g(b){var c={},a=["__bases__"],e=m.getPropertiesMetadata(b.prototype),g=l(b);Object.getOwnPropertyNames(b.prototype).filter(function(c){return-1!==a.indexOf(c)||e&&e.hasOwnProperty(c)||-1!==g.indexOf(b.prototype[c])?!1:!0}).forEach(function(a){c[a]=b.prototype[a]});return c}function c(b){var c=Object.getOwnPropertyNames(b),a=Object.getPrototypeOf(b.prototype).constructor,e=Object.getOwnPropertyNames(Function);e.push("__bases__");var g=Object.getOwnPropertyNames(a),f={};c.filter(function(c){return-1!==
e.indexOf(c)?!1:-1===g.indexOf(c)||a[c]!==b[c]?!0:!1}).forEach(function(c){f[c]=b[c]});return f}h.subclass=function(b){return function(a){var e=g(a),f=c(a);null!=b&&(e.declaredClass=b);a=p(a.__bases__,e);for(var q in f)a[q]=f[q];return a}}})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,h,p,m){h.writer=function(a,e){var f;void 0===e?(e=a,f=[void 0]):f=Array.isArray(a)?a:[a];return function(a,c,b){var g=a.constructor.prototype;
f.forEach(function(b){b=m.propertyJSONMeta(a,b,e);b.write&&"object"!==typeof b.write&&(b.write={});p.setObject("write.writer",g[c],b)})}}})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./accessorSupport/decorators ./accessorSupport/ensureType ./Accessor ./ArrayPool ./Evented ./ObjectPool ./Scheduler ./lang".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y){function t(d){return d?d.isInstanceOf&&d.isInstanceOf(B)?!0:
!1:!1}function u(d){return d?t(d)?d.toArray():d.length?Array.prototype.slice.apply(d):[]:[]}function r(d){if(d&&d.length)return d[0]}function n(d,b,k,c){b&&b.forEach(function(b,a,e){d.push(b);n(d,k.call(c,b,a,e),k,c)})}(function(){return function(){}})();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 w=function(){},d=new q(a,!0,function(d){d.item=null;d.target=null}),k=new Set,v=new Set,A=new Set,z=new Map,D=0,B=C=function(b){function a(d){d=b.call(this,d)||this;d._boundDispatch=d._dispatchColChange.bind(d);d._chgListeners=[];d._notifications=null;d._timer=null;d.length=0;d._items=[];Object.defineProperty(d,"uid",{value:D++});return d}p(a,b);a.ofType=function(d){if(!d)return C;if(z.has(d))return z.get(d);var b=C.createSubclass({declaredClass:"esri.core.Collection\x3c"+d.prototype.declaredClass+
"\x3e"});Object.defineProperty(b.prototype,"itemType",{value:d});z.set(d,b);return b};a.prototype.normalizeCtorArgs=function(d){return d?Array.isArray(d)||t(d)?{items:d}:d:{}};Object.defineProperty(a.prototype,"items",{get:function(){return this._items},set:function(d){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(u(d))),this._emitAfterChanges())},enumerable:!0,configurable:!0});a.prototype.on=function(d,b){var k;Array.isArray(d)?k=d:-1<d.indexOf(",")&&(k=d.split(/\s*,\s*/));
if(k){var c=[];for(d=0;d<k.length;d++)c.push(this.on(k[d],b));c.remove=function(){for(var d=0;d<c.length;d++)c[d].remove()};return c}if("change"===d){var a=this._chgListeners,e={removed:!1,callback:b};a.push(e);this._notifications&&this._notifications.push({listeners:a.slice(),items:this._items.slice(),changes:[]});return{remove:function(){this.remove=w;e.removed=!0;a.splice(a.indexOf(e),1)}}}return f.after(this,"on"+d,b,!0)};a.prototype.hasEventListener=function(d){return"change"===d?0<this._chgListeners.length:
this.inherited(arguments)};a.prototype.add=function(d,b){if(this._emitBeforeChanges())return this;b=this.getNextIndex(b);this._splice(b,0,d);this._emitAfterChanges();return this};a.prototype.addMany=function(d,b){void 0===b&&(b=this._items.length);if(this._emitBeforeChanges())return this;b=this.getNextIndex(b);this._splice.apply(this,[b,0].concat(u(d)));this._emitAfterChanges();return this};a.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges())return[];var d=this._splice(0,this.length)||
[];this._emitAfterChanges();return d};a.prototype.clone=function(){return this._createNewInstance({items:this._items.map(y.clone)})};a.prototype.concat=function(){for(var d=[],b=0;b<arguments.length;b++)d[b]=arguments[b];d=d.map(u);return this._createNewInstance({items:(k=this._items).concat.apply(k,d)});var k};a.prototype.drain=function(d,b){if(this.length&&!this._emitBeforeChanges()){for(var k=this._splice(0,this.length),c=k.length,a=0;a<c;a++)d.call(b,k[a],a,k);this._emitAfterChanges()}};a.prototype.every=
function(d,b){return this._items.every(d,b)};a.prototype.filter=function(d,b){var k;k=2===arguments.length?this._items.filter(d,b):this._items.filter(d);return this._createNewInstance({items:k})};a.prototype.find=function(d,b){if("function"!==typeof d)throw new TypeError(d+" is not a function");for(var k=this._items,c=k.length,a=0;a<c;a++){var e=k[a];if(d.call(b,e,a,k))return e}};a.prototype.findIndex=function(d,b){if("function"!==typeof d)throw new TypeError(d+" is not a function");for(var k=this._items,
c=k.length,a=0;a<c;a++)if(d.call(b,k[a],a,k))return a;return-1};a.prototype.flatten=function(d,b){var k=[];n(k,this,d,b);return new C(k)};a.prototype.forEach=function(d,b){for(var k=this._items,a=k.length,c=0;c<a;c++)d.call(b,k[c],c,k)};a.prototype.getItemAt=function(d){return this._items[d]};a.prototype.getNextIndex=function(d){var b=this.length;d=null==d?b:d;0>d?d=0:d>b&&(d=b);return d};a.prototype.includes=function(d,b){void 0===b&&(b=0);return arguments.length?-1!==this._items.indexOf(d,b):!1};
a.prototype.indexOf=function(d,b){void 0===b&&(b=0);return this._items.indexOf(d,b)};a.prototype.join=function(d){void 0===d&&(d=",");return this._items.join(d)};a.prototype.lastIndexOf=function(d,b){void 0===b&&(b=this.length-1);return this._items.lastIndexOf(d,b)};a.prototype.map=function(d,b){d=this._items.map(d,b);return new C({items:d})};a.prototype.reorder=function(d,b){void 0===b&&(b=this.length-1);var k=this.indexOf(d);if(-1!==k){0>b?b=0:b>=this.length&&(b=this.length-1);if(k!==b){if(this._emitBeforeChanges())return d;
this._splice(k,1);this._splice(b,0,d);this._emitAfterChanges()}return d}};a.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var d=r(this._splice(this.length-1,1));this._emitAfterChanges();return d}};a.prototype.push=function(){for(var d=[],b=0;b<arguments.length;b++)d[b]=arguments[b];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[this.length,0].concat(d));this._emitAfterChanges();return this.length};a.prototype.reduce=function(d,b){var k=this._items;
return 2===arguments.length?k.reduce(d,b):k.reduce(d)};a.prototype.reduceRight=function(d,b){var k=this._items;return 2===arguments.length?k.reduceRight(d,b):k.reduceRight(d)};a.prototype.remove=function(d){return this.removeAt(this.indexOf(d))};a.prototype.removeAt=function(d){if(!(0>d||d>=this.length||this._emitBeforeChanges()))return d=r(this._splice(d,1)),this._emitAfterChanges(),d};a.prototype.removeMany=function(d){if(!d||!d.length||this._emitBeforeChanges())return[];d=t(d)?d.toArray():d;for(var b=
this._items,k=[],a=d.length,c=0;c<a;c++){var e=b.indexOf(d[c]);if(-1<e){for(var n=c+1,g=e+1,v=Math.min(d.length-n,b.length-g),f=0;f<v&&d[n+f]===b[g+f];)f++;n=1+f;(e=this._splice(e,n))&&0<e.length&&k.push.apply(k,e);c+=n-1}}this._emitAfterChanges();return k};a.prototype.reverse=function(){if(this._emitBeforeChanges())return this;var d=this._splice(0,this.length);d&&(d.reverse(),this._splice.apply(this,[0,0].concat(d)));this._emitAfterChanges();return this};a.prototype.shift=function(){if(this.length&&
!this._emitBeforeChanges()){var d=r(this._splice(0,1));this._emitAfterChanges();return d}};a.prototype.slice=function(d,b){void 0===d&&(d=0);void 0===b&&(b=this.length);return this._createNewInstance({items:this._items.slice(d,b)})};a.prototype.some=function(d,b){return this._items.some(d,b)};a.prototype.sort=function(d){if(!this.length||this._emitBeforeChanges())return this;var b=this._splice(0,this.length);arguments.length?b.sort(d):b.sort();this._splice.apply(this,[0,0].concat(b));return this};
a.prototype.splice=function(d,b){for(var k=[],c=2;c<arguments.length;c++)k[c-2]=arguments[c];if(this._emitBeforeChanges())return[];k=this._splice.apply(this,[d,b].concat(k))||[];this._emitAfterChanges();return k};a.prototype.toArray=function(){return this._items.slice()};a.prototype.toJSON=function(){return this.toArray()};a.prototype.toLocaleString=function(){return this._items.toLocaleString()};a.prototype.toString=function(){return this._items.toString()};a.prototype.unshift=function(){for(var d=
[],b=0;b<arguments.length;b++)d[b]=arguments[b];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[0,0].concat(d));this._emitAfterChanges();return this.length};a.prototype._createNewInstance=function(d){return new this.constructor(d)};a.prototype._splice=function(b,k){for(var c=this,a=[],e=2;e<arguments.length;e++)a[e-2]=arguments[e];var n=this._items,g=this.constructor.prototype.itemType,v,f;!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),
items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=x.schedule(this._boundDispatch));if(k){f=n.splice(b,k);if(this.hasEventListener("before-remove")){e=d.acquire();e.target=this;e.cancellable=!0;for(var q=0,t=f.length;q<t;q++)v=f[q],e.reset(v),this.emit("before-remove",e),e.defaultPrevented&&(f.splice(q,1),n.splice(b,0,v),b+=1,--q,--t);d.release(e)}this.length=this._items.length;if(this.hasEventListener("after-remove")){e=d.acquire();e.target=this;e.cancellable=!1;
t=f.length;for(q=0;q<t;q++)e.reset(f[q]),this.emit("after-remove",e);d.release(e)}this._notifyChangeEvent(null,f)}if(a&&a.length){g&&(a=a.map(l.ensureType.bind(null,g)));if(this.hasEventListener("before-add")){var r=d.acquire();r.target=this;r.cancellable=!0;a=a.filter(function(d){r.reset(d);c.emit("before-add",r);return!r.defaultPrevented});d.release(r)}n.splice.apply(n,[b,0].concat(a));this.length=this._items.length;if(this.hasEventListener("after-add")){e=d.acquire();e.target=this;e.cancellable=
!1;n=0;for(g=a;n<g.length;n++)v=g[n],e.reset(v),this.emit("after-add",e);d.release(e)}this._notifyChangeEvent(a,null)}return f};a.prototype._emitBeforeChanges=function(){var b=!1;if(this.hasEventListener("before-changes")){var k=d.acquire();k.target=this;k.cancellable=!0;this.emit("before-changes",k);b=k.defaultPrevented;d.release(k)}return b};a.prototype._emitAfterChanges=function(){if(this.hasEventListener("after-changes")){var b=d.acquire();b.target=this;b.cancellable=!1;this.emit("after-changes",
b);d.release(b)}};a.prototype._notifyChangeEvent=function(d,b){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:d,removed:b})};a.prototype._dispatchColChange=function(){this._timer&&(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();v.clear();A.clear();for(var e=0;e<b.length;e++){var n=b[e],g=n.added,n=n.removed;if(g)if(0===A.size&&0===
v.size)for(var f=0,q=g;f<q.length;f++)g=q[f],k.add(g);else for(f=0,q=g;f<q.length;f++)g=q[f],v.has(g)?(A.add(g),v.delete(g)):A.has(g)||k.add(g);if(n)if(0===A.size&&0===k.size)for(f=0;f<n.length;f++)g=n[f],v.add(g);else for(f=0;f<n.length;f++)g=n[f],k.has(g)?k.delete(g):(A.delete(g),v.add(g))}var t=c.acquire();k.forEach(function(d){t.push(d)});var r=c.acquire();v.forEach(function(d){r.push(d)});var l=a._items,u=d.items,w=c.acquire();A.forEach(function(d){u.indexOf(d)!==l.indexOf(d)&&w.push(d)});if(d.listeners&&
(t.length||r.length||w.length))for(b={target:a,added:t,removed:r,moved:w},e=d.listeners.length,g=0;g<e;g++)n=d.listeners[g],n.removed||n.callback.call(a,b);c.release(t);c.release(r);c.release(w)},a=this,e=0;e<d.length;e++)b(d[e]);k.clear();v.clear();A.clear()}};return a}(e.declared(g,b));B.isCollection=t;m([e.property()],B.prototype,"length",void 0);m([e.property()],B.prototype,"items",null);var B=C=m([e.subclass("esri.core.Collection")],B),C;return B})},"esri/core/Evented":function(){define(["./declare",
"dojo/Evented"],function(a,h){return a(h,{declaredClass:"esri.core.Evented",hasEventListener:function(a){a="on"+a;return!(!this[a]||!this[a].after)},emit:function(a,m){if(this.hasEventListener(a))return m=m||{},m.target||(m.target=this),this.inherited(arguments,[a,m])}})})},"esri/core/HandleRegistry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Accessor ./accessorSupport/decorators".split(" "),function(a,h,p,m,f,e){a=function(a){function e(){var c=
a.call(this)||this;c._groups=null;c._groups={};return c}p(e,a);e.prototype.destroy=function(){this.removeAll();this._groups=null};Object.defineProperty(e.prototype,"size",{get:function(){var a=0,b=this._groups,e;for(e in b)a+=b[e].length;return a},enumerable:!0,configurable:!0});e.prototype.add=function(a,b){if(!this._isHandle(a)&&!Array.isArray(a))return this;b=this._getOrCreateGroup(b);if(Array.isArray(a))for(var c=0;c<a.length;c++)b.push(a[c]);else b.push(a);this.notifyChange("size");return this};
e.prototype.has=function(a){a=this._groups[a];return!!a&&0<a.length};e.prototype.remove=function(a){if(Array.isArray(a))a.forEach(this.remove.bind(this));else{a=this._getGroup(a);if(!a)return this;for(var b=0;b<a.length;b++)a[b].remove();a.length=0;this.notifyChange("size")}return this};e.prototype.removeAll=function(){var a=this._groups,b;for(b in a)this.remove(b),delete a[b];return this};e.prototype._isHandle=function(a){return a&&!!a.remove};e.prototype._getOrCreateGroup=function(a){return this._getGroup(a)||
(this._groups[this._ensureGroupName(a)]=[])};e.prototype._getGroup=function(a){return this._groups[this._ensureGroupName(a)]};e.prototype._ensureGroupName=function(a){return a||"_default_"};return e}(e.declared(f));m([e.property({readOnly:!0})],a.prototype,"size",null);return a=m([e.subclass()],a)})},"esri/support/LayersMixin":function(){define(["../core/Accessor","../core/Collection","../core/Logger"],function(a,h,p){var m=function(a,f){for(var e,c=0,b=a.length;c<b;c++)if(e=a.getItemAt(c),e.id===
f||e.layers&&(e=m(e.layers,f)))return e},f=p.getLogger("esri.Map");return a.createSubclass({declaredClass:"esri.support.LayersMixin",destroy:function(){this._layersHandle.remove();this._layersHandle=null;this.layers.drain(this._lyrRemove,this)},properties:{layers:{type:h,get:function(){var a=this._get("layers");if(a)return a;a=new h;a.on("after-add",function(a){a=a.item;a.parent&&a.parent!==this&&a.parent.remove(a);a.parent=this;this.layerAdded(a);"elevation"===a.type&&f.error("Layer '"+a.title+", id:"+
a.id+"' of type '"+a.type+"' is not supported as an operational layer and will therefore be ignored.")}.bind(this));a.on("after-remove",function(a){a=a.item;a.parent=null;this.layerRemoved(a)}.bind(this));return a},set:function(a){var e=this._get("layers");e&&this.remove(e.toArray());this.addMany(a.toArray())}}},findLayerById:function(a){return m(this.layers,a)},add:function(a,f){var e=this.layers;f=e.getNextIndex(f);a.parent===this?this.reorder(a,f):e.add(a,f)},addMany:function(a,f){var e=this.layers;
f=e.getNextIndex(f);a.slice().forEach(function(a){a.parent===this?this.reorder(a,f):(e.add(a,f),f+=1)},this)},remove:function(a){return this.layers.remove(a)},removeMany:function(a){return this.layers.removeMany(a)},removeAll:function(){return this.layers.removeAll()},reorder:function(a,f){return this.layers.reorder(a,f)},layerAdded:function(a){},layerRemoved:function(a){}})})},"esri/Ground":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators ./core/Accessor ./core/Collection ./core/collectionUtils ./core/Logger ./core/requireUtils ./layers/Layer".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q){var x=l.ofType(q),y=c.getLogger("esri.Ground");h=t=function(c){function e(b){b=c.call(this)||this;b.layers=new x;b.layers.on("after-add",function(b){b=b.item;"elevation"!==b.type&&y.error("Layer '"+b.title+", id:"+b.id+"' of type '"+b.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});return b}p(e,c);Object.defineProperty(e.prototype,"layers",{set:function(b){this._set("layers",g.referenceSetter(b,
this._get("layers"),x))},enumerable:!0,configurable:!0});e.prototype.queryElevation=function(c,e){var d=this;return b.when(a,"./layers/support/ElevationQuery").then(function(b){b=new b.ElevationQuery;var k=d.layers.filter(function(d){return"elevation"===d.type}).toArray();return b.queryAll(k,c,e)})};e.prototype.clone=function(){return new t({layers:this.layers.slice()})};return e}(f.declared(e));m([f.property({type:x}),f.cast(g.castForReferenceSetter)],h.prototype,"layers",null);h=t=m([f.subclass("esri.Ground")],
h);var t;return h})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(a,h,p){h.referenceSetter=function(a,f,e){void 0===e&&(e=p);f||(f=new e);f.removeAll();a&&(Array.isArray(a)||a.isInstanceOf&&a.isInstanceOf(p))?f.addMany(a):f.add(a);return f};h.castForReferenceSetter=function(a){return a}})},"esri/core/requireUtils":function(){define(["require","exports","dojo/Deferred"],function(a,h,p){function m(a,e){if(Array.isArray(e)){var f=new p;a(e,function(){for(var a=
[],c=0;c<arguments.length;c++)a[c]=arguments[c];f.resolve(a)});return f.promise}return m(a,[e]).then(function(a){return a[0]})}h.when=m;h.getAbsMid=function(a,e,l){return e.toAbsMid?e.toAbsMid(a):l.id.replace(/\/[^\/]*$/ig,"/")+a}})},"esri/layers/Layer":function(){define("require dojo/Deferred ../core/Accessor ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/urlUtils ../core/requireUtils ../core/promiseUtils ../core/Logger ../config ../kernel ../request ../geometry/SpatialReference ../geometry/Extent".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){var n=0,w=q.getLogger("esri.layers.Layer");p=p.createSubclass([f,e,l],{declaredClass:"esri.layers.Layer",properties:{attributionDataUrl:null,credential:{value:null,readOnly:!0,dependsOn:["loaded","parsedUrl"],get:function(){var d=this.loaded&&this.parsedUrl&&y.id&&y.id.findCredential(this.parsedUrl.path)||null;d&&d.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));return d}},fullExtent:new r(-180,-90,180,90,u.WGS84),hasAttributionData:{readOnly:!0,dependsOn:["attributionDataUrl"],
get:function(){return null!=this.attributionDataUrl}},id:{get:function(){return Date.now().toString(16)+"-layer-"+n++}},legendEnabled:!0,listMode:"show",opacity:{value:1,type:Number,cast:function(d){return 0>d?0:1<d?1:d}},parsedUrl:{readOnly:!0,dependsOn:["url"],get:function(){var d=this._get("url");return d?g.urlToObject(d):null}},popupEnabled:!0,refreshInterval:0,attributionVisible:!0,spatialReference:u.WGS84,title:null,token:{dependsOn:["credential.token"],get:function(){var d=this.get("parsedUrl.query.token"),
b=this.get("credential.token");return d||b||null},set:function(d){d?this._override("token",d):this._clearOverride("token")}},type:{type:String,readOnly:!0,value:null,json:{read:!1}},url:{value:null},visible:!0},initialize:function(){this.otherwise(function(d){q.getLogger(this.declaredClass).error("#load()","Failed to load layer (title: '"+this.title+"', id: '"+this.id+"')",d)})},createLayerView:function(d){var k=this.viewModulePaths[d.type];return k?c.when(a,k).then(function(b){b.default&&(b=b.default);
return new b({layer:this,view:d})}.bind(this)):b.reject(new m("layerview:module-unavailable","No LayerView module available for layer '${layer.declaredClass}' and view type: '${view.type}'",{view:d,layer:this}))},destroyLayerView:function(d){d.destroy()},fetchAttributionData:function(){var d=this.attributionDataUrl;this.hasAttributionData&&d?d=t(d,{query:{f:"json"},responseType:"json"}).then(function(d){return d.data}):(d=new h,d.reject(new m("layer:no-attribution-data","Layer does not have attribution data")),
d=d.promise);return d},refresh:function(){this.emit("refresh")}});p.fromArcGISServerUrl=function(d){"string"===typeof d&&(d={url:d});var b=c.when(a,"./support/arcgisLayers").then(function(b){return b.fromUrl(d)});b.otherwise(function(b){w.error("#fromArcGISServerUrl({ url: '"+d.url+"'})","Failed to create layer from arcgis server url",b)});return b};p.fromPortalItem=function(d){!d||d.portalItem||"object"!==typeof d||d.declaredClass&&"esri.portal.PortalItem"!==d.declaredClass||(d={portalItem:d});var b=
c.when(a,"../portal/support/portalLayers").then(function(b){return b.fromItem(d)});b.otherwise(function(b){var k=d&&d.portalItem;w.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+(k&&k.portal&&k.portal.url||x.portalUrl)+"', id: '"+(k&&k.id||"unset")+"')",b)});return b};return p})},"esri/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","./Message"],function(a,h,p,m,f){a=function(a){function e(g,c,b){var f=a.call(this,
g,c,b)||this;return f instanceof e?f:new e(g,c,b)}p(e,a);return e}(f);a.prototype.type="error";return a})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(a,h){function p(){this.constructor=a}for(var m in h)h.hasOwnProperty(m)&&(a[m]=h[m]);a.prototype=null===h?Object.create(h):(p.prototype=h.prototype,new p)}})},"esri/core/Message":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","dojo/string"],function(a,h,p,m,f){return function(){function a(e,
g,c){this instanceof a&&(this.name=e,this.message=g&&f.substitute(g,c,function(b){return null==b?"":b})||"",this.details=c)}a.prototype.toString=function(){return"["+this.name+"]: "+this.message};return a}()})},"esri/core/Identifiable":function(){define(["./declare"],function(a){var h=0;return a(null,{constructor:function(){Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+h++})}})})},"esri/core/Loadable":function(){define("./Promise ./Accessor ./Error ./Warning dojo/aspect dojo/_base/lang dojo/Deferred".split(" "),
function(a,h,p,m,f,e,l){return a.createSubclass([h],{declaredClass:"esri.core.Loadable","-chains-":e.mixin(h._meta.chains,{load:"after"}),constructor:function(){this._set("loadWarnings",[]);var a=new l;this.addResolvingPromise(a.promise);f.around(this,"load",function(c){return function(){"not-loaded"===this.loadStatus&&(this.loadStatus="loading",c.apply(this),a.resolve(),a=null);return this}});this.then(function(a){this.loadStatus="loaded"}.bind(this),function(a){this.loadStatus="failed";this.loadError=
a}.bind(this))},properties:{loaded:{readOnly:!0,dependsOn:["loadStatus"],get:function(){return"loaded"===this.loadStatus}},loadError:null,loadStatus:"not-loaded",loadWarnings:{type:[m],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("./declare dojo/promise/all dojo/aspect dojo/Deferred dojo/errors/create ./Scheduler".split(" "),
function(a,h,p,m,f,e){var l=function(b){if(!b.isFulfilled()){var a=b._promiseProps,c=a.resolvingPromises,g,f;a.allPromise&&a.allPromise.cancel();var q=new m;for(g=c.length-1;0<=g;g--)f=c[g],f.isCanceled&&f.isCanceled()?c.splice(g,1):f.then(null,null,a.resolver.progress);f=null;(a.allPromise=h(c.concat([q.promise]))).then(function(){a.resolver.resolve(b);b=a=q=a.allPromise=a.resolvingPromises=null},function(c){a.allPromise=null;if(!c||"cancel"!==c.dojoType){var e=Array.prototype.slice.call(arguments,
0);a.resolver.reject(e[0]);b=a=q=a.allPromise=a.resolvingPromises=null}});q&&e.schedule(function(){q&&q.resolve()})}},g=f("CancelError",null,function(b){this.target=b}),c=function(b){return b||new g(this.instance)},b=function(b){this.instance=b;this.canceler=c.bind(this);this.resolver=new m;this.initialized=!1;this.resolvingPromises=[]};b.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)}}};return a(null,{declaredClass:"esri.core.Promise",constructor:function(){Object.defineProperty(this,"_promiseProps",{value:new b(this),enumerable:!1,configurable:!1,writable:!0});var a=p.after(this,"postscript",function(b,c){a.remove();a=null;l(this)},!0)},_promiseProps:null,always:function(b){return this.then(b,b)},then:function(b,a,c){var e=new m(this._promiseProps.canceler);b=e.then(b,a,c);this._promiseProps.resolver.then(e.resolve,e.reject,e.progress);
return b},isResolved:function(){return this._promiseProps.resolver.isResolved()},isRejected:function(){return this._promiseProps.resolver.isRejected()},isFulfilled:function(){return this._promiseProps.resolver.isFulfilled()},otherwise:function(b){return this.then(null,b)},addResolvingPromise:function(b){b&&!this.isFulfilled()&&(this._promiseProps.resolvingPromises.push(b),l(this))}})})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(a,h,p){var m=a.some;return function(a){var e,
f;a instanceof Array?f=a:a&&"object"===typeof a&&(e=a);var g,c=[];if(e){f=[];for(var b in e)Object.hasOwnProperty.call(e,b)&&(c.push(b),f.push(e[b]));g={}}else f&&(g=[]);if(!f||!f.length)return(new h).resolve(g);var q=new h;q.promise.always(function(){g=c=null});var x=f.length;m(f,function(b,a){e||c.push(a);p(b,function(b){q.isFulfilled()||(g[c[a]]=b,0===--x&&q.resolve(g))},q.reject);return q.isFulfilled()});return q.promise}})},"esri/core/Warning":function(){define(["require","exports","./tsSupport/extendsHelper",
"./tsSupport/decorateHelper","./Message"],function(a,h,p,m,f){a=function(a){function e(g,c,b){var f=a.call(this,g,c,b)||this;return f instanceof e?f:new e(g,c,b)}p(e,a);return e}(f);a.prototype.type="warning";return a})},"esri/core/urlUtils":function(){define("require exports dojo/_base/window dojo/_base/lang dojo/_base/url dojo/io-query ../config ./lang ./sniff ./Logger ./Error".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){function x(d){var b={path:null,query:null},k=new f(d),a=d.indexOf("?");null===
k.query?b.path=d:(b.path=d.substring(0,a),b.query=e.queryToObject(k.query));k.fragment&&(b.hash=k.fragment,null===k.query&&(b.path=b.path.substring(0,b.path.length-(k.fragment.length+1))));return b}function y(b,k){void 0===b&&(b=!1);void 0===k&&(k=!0);var a,c=S.proxyUrl;if("string"===typeof b){if(a=b,a=/^\s*https:/i.test(a)||"https"===h.appUrl.scheme&&M(a),b=r(b))c=b.proxyUrl}else a=!!b;if(!c)throw Q.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 q("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.");var e;a&&k&&"https"===h.appUrl.scheme&&(k=V(c),d(k)&&(c=k,e=1));c=x(c);c._xo=e;return c}function t(d){var b=d.indexOf("?");-1!==b?(U.path=d.slice(0,b),U.query=d.slice(b+1)):(U.path=d,U.query=null);return U}function u(d){d=t(d).path;d&&"/"===d[d.length-1]||(d+="/");d=P(d,!0);return d=d.toLowerCase()}
function r(d){var b=S.proxyRules;d=u(d);for(var k=0;k<b.length;k++)if(0===d.indexOf(b[k].urlPrefix))return b[k]}function n(d){d=D(d);var b=d.indexOf("/sharing");return 0<b?d.substring(0,b):d.replace(/\/+$/,"")}function w(d,b,k){void 0===k&&(k=!1);d=J(d);b=J(b);return k||d.scheme===b.scheme?d.host.toLowerCase()===b.host.toLowerCase()&&d.port===b.port:!1}function d(d){return c("esri-phonegap")?!0:c("esri-cors")?null!=k(d):!1}function k(d,b){void 0===b&&(b=!1);"string"===typeof d&&(d=F(d)?J(d):h.appUrl);
for(var k=S.corsEnabledServers||[],a=0;a<k.length;a++)for(var c=k[a],e=void 0,e="string"===typeof c?v(c):c.host?v(c.host):[],n=0;n<e.length;n++)if(w(d,e[n]))return b?a:c;return b?-1:null}function v(d){h.corsServersUrlCache[d]||(ga.test(d)||M(d)?h.corsServersUrlCache[d]=[new f(A(d))]:h.corsServersUrlCache[d]=[new f("http://"+d),new f("https://"+d)]);return h.corsServersUrlCache[d]}function A(d,b,k){void 0===b&&(b=h.appBaseUrl);if(M(d))return k&&k.preserveProtocolRelative?d:"http"===h.appUrl.scheme&&
h.appUrl.authority===C(d).slice(2)?"http:"+d:"https:"+d;if(ga.test(d))return d;k=B;if("/"===d[0]){var a=b.indexOf("//"),a=b.indexOf("/",a+2);b=-1===a?b:b.slice(0,a)}return k(b,d)}function z(d,b,k){void 0===b&&(b=h.appBaseUrl);if(!F(d))return d;var a=D(d),c=a.toLowerCase();b=D(b).toLowerCase().replace(/\/+$/,"");if((k=k?D(k).toLowerCase().replace(/\/+$/,""):null)&&0!==b.indexOf(k))return d;for(var e=function(d,b,k){k=d.indexOf(b,k);return-1===k?d.length:k},n=e(c,"/",c.indexOf("//")+2),g=-1;c.slice(0,
n+1)===b.slice(0,n)+"/";){g=n+1;if(n===c.length)break;n=e(c,"/",n+1)}if(-1===g||k&&g<k.length)return d;d=a.slice(g);a=b.slice(g-1).replace(/[^/]+/g,"").length;if(0<a)for(c=0;c<a;c++)d="../"+d;else d="./"+d;return d}function D(d){d=A(d);d=I(d);return d=d.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 k=d[0],a=k.indexOf("//");b.push(k.slice(0,a+1));R.test(d[0])&&(b[0]+="/");d[0]=k.slice(a+
2)}else"/"===d[0][0]&&b.push("");d=d.reduce(function(d,b){return d.concat(b.split("/"))},[]);for(k=0;k<d.length;k++)a=d[k],".."===a&&0<b.length?b.pop():!a||"."===a&&0!==b.length||b.push(a);return b.join("/")}}function C(d){if(K(d))return null;var b=d.indexOf("://");if(-1===b&&M(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 M(d)||ga.test(d)}function K(d){return"data:"===d.slice(0,5)}function M(d){return d&&"/"===d[0]&&"/"===d[1]}function E(d){return L.test(d)||
"http"===h.appUrl.scheme&&M(d)}function V(d){return M(d)?"https:"+d:d.replace(L,"https:")}function P(d,b){void 0===b&&(b=!1);if(M(d))return d.slice(2);d=d.replace(ga,"");b&&1<d.length&&"/"===d[0]&&"/"===d[1]&&(d=d.slice(2));return d}function I(d){var b=l.request.httpsDomains;if(!E(d))return d;d=d.trim();var k=d.indexOf("/",7),a;a=-1===k?d:d.slice(0,k);a=a.toLowerCase().slice(7);if("http"===h.appUrl.scheme&&a===h.appUrl.authority)return d;if("https"===h.appUrl.scheme&&a===h.appUrl.authority||b&&b.some(function(d){return a===
d||g.endsWith(a,"."+d)}))d=V(d);return d}function J(d){if("string"===typeof d)return new f(A(d));d.scheme||(d.scheme=h.appUrl.scheme);return d}a=p.global;var Q=b.getLogger("esri.core.urlUtils"),S=l.request,ga=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,L=/^\s*http:/i,R=/^\s*file:/i;h.appUrl=new f(a.location);h.corsServersUrlCache={};h.appBaseUrl=function(){var d=h.appUrl.path,d=d.substring(0,d.lastIndexOf(d.split("/")[d.split("/").length-1]));return""+(h.appUrl.scheme+"://"+h.appUrl.host+(null!=h.appUrl.port?
":"+h.appUrl.port:""))+d}();h.urlToObject=x;h.getProxyUrl=y;h.addProxy=function(d){var b=r(d),k,a;b?(a=t(b.proxyUrl),k=a.path,a=a.query?e.queryToObject(a.query):null):S.forceProxy&&(a=y(),k=a.path,a=a.query);k&&(b=x(d),d=k+"?"+b.path,(k=e.objectToQuery(m.mixin(a||{},b.query)))&&(d=d+"?"+k));return d};var U={path:"",query:""};h.addProxyRule=function(d){d={proxyUrl:d.proxyUrl,urlPrefix:u(d.urlPrefix)};for(var b=S.proxyRules,k=d.urlPrefix,a=b.length,c=0;c<b.length;c++){var e=b[c].urlPrefix;if(0===k.indexOf(e)){if(k.length===
e.length)return-1;a=c;break}0===e.indexOf(k)&&(a=c+1)}b.splice(a,0,d);return a};h.getProxyRule=r;h.hasSamePortal=function(d,b){d=n(d);b=n(b);return P(d)===P(b)};h.hasSameOrigin=w;h.canUseXhr=d;h.getCorsConfig=k;h.makeAbsolute=A;h.makeRelative=z;h.normalize=D;h.join=B;h.getOrigin=C;h.isAbsolute=F;h.isDataProtocol=K;h.isProtocolRelative=M;h.read=function(d,b){b=b&&b.url&&b.url.path;return d&&b?A(d,b,{preserveProtocolRelative:!0}):d};h.write=function(d,b){if(!d)return d;d=A(d);(b=b&&b.url&&b.url.path)&&
(d=z(d,b,b));return d}})},"dojo/_base/url":function(){define(["./kernel"],function(a){var h=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,p=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,m=function(){for(var a=arguments,e=[a[0]],l=1;l<a.length;l++)if(a[l]){var g=new m(a[l]+""),e=new m(e[0]+"");if(""==g.path&&!g.scheme&&!g.authority&&!g.query)null!=g.fragment&&(e.fragment=g.fragment),g=e;else if(!g.scheme&&(g.scheme=e.scheme,!g.authority&&(g.authority=e.authority,
"/"!=g.path.charAt(0)))){for(var e=(e.path.substring(0,e.path.lastIndexOf("/")+1)+g.path).split("/"),c=0;c<e.length;c++)"."==e[c]?c==e.length-1?e[c]="":(e.splice(c,1),c--):0<c&&(1!=c||""!=e[0])&&".."==e[c]&&".."!=e[c-1]&&(c==e.length-1?(e.splice(c,1),e[c-1]=""):(e.splice(c-1,2),c-=2));g.path=e.join("/")}e=[];g.scheme&&e.push(g.scheme,":");g.authority&&e.push("//",g.authority);e.push(g.path);g.query&&e.push("?",g.query);g.fragment&&e.push("#",g.fragment)}this.uri=e.join("");a=this.uri.match(h);this.scheme=
a[2]||(a[1]?"":null);this.authority=a[4]||(a[3]?"":null);this.path=a[5];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)};m.prototype.toString=function(){return this.uri};return a._Url=m})},"esri/config":function(){define(["require","exports","dojo/_base/window"],function(a,h,p){return{screenDPI:96,geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",
geoRSSServiceUrl:null,kmlServiceUrl:null,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 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 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 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.arcgisonline.com www.arcgis.com".split(" "),
corsStatus:{},forceProxy:!1,maxUrlLength:2E3,maxWorkers:5,proxyRules:[],proxyUrl:null,timeout:6E4,useCors:"with-credentials",useWorkers:"on-request",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/core/sniff":function(){define(["dojo/_base/window","dojo/sniff","../kernel"],function(a,h,p){var m=h("ff"),f=h("ie"),e=void 0===
f&&7<=h("trident"),l=h("webkit"),g=h("opera"),c=h("chrome"),b=h("safari"),q=a.global;a=navigator.userAgent;var x;(x=a.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&h.add("esri-iphone",parseFloat(x[2].replace("_",".")));(x=a.match(/Android\s+(\d+\.\d+)/i))&&h.add("esri-android",parseFloat(x[1]));(x=a.match(/Fennec\/(\d+\.\d+)/i))&&h.add("esri-fennec",parseFloat(x[1]));0<=a.indexOf("BlackBerry")&&0<=a.indexOf("WebKit")&&h.add("esri-blackberry",1);h.add("esri-touch",h("esri-iphone")||h("esri-android")||
h("esri-blackberry")||6<=h("esri-fennec")||(m||l)&&document.createTouch?!0:!1);(x=a.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&h.add("esri-mobile",x);h.add("esri-pointer",navigator.pointerEnabled||navigator.msPointerEnabled);p._getDOMAccessor=function(b){var a="";m?a="Moz":l?a="Webkit":f?a="ms":g&&(a="O");return a+b.charAt(0).toUpperCase()+b.substr(1)};h.add("esri-phonegap",!!q.cordova);h.add("esri-cors",h("esri-phonegap")||"XMLHttpRequest"in q&&"withCredentials"in new XMLHttpRequest);
if(h("host-webworker"))return h;h.add("esri-file-upload",q.FormData&&q.FileList?!0:!1);h.add("esri-workers",q.Worker?!0:!1);h.add("esri-transforms",e||9<=f||3.5<=m||4<=c||3.1<=b||10.5<=g||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transitions",e||10<=f||4<=m||4<=c||3.1<=b||10.5<=g||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transforms3d",e||10<=m||12<=c||4<=b||3.2<=h("esri-iphone")||3<=h("esri-android"));h.add("esri-url-encodes-apostrophe",function(){var b=q.document.createElement("a");
b.href="?'";return-1<b.href.indexOf("?%27")});3>h("esri-android")&&(h.add("esri-transforms",!1,!1,!0),h.add("esri-transitions",!1,!1,!0),h.add("esri-transforms3d",!1,!1,!0));p._css=function(a){var e=h("esri-transforms3d");void 0!==a&&null!==a?e=a:e&&(c||b&&!h("esri-iphone"))&&(e=!1);var q=e?"translate3d(":"translate(",r=e?c?",-1px)":",0px)":")",n=e?"scale3d(":"scale(",w=e?",1)":")",d=e?"rotate3d(0,0,1,":"rotate(",k=e?"matrix3d(":"matrix(",v=e?",0,0,":",",x=e?",0,0,0,0,1,0,":",",z=e?",0,1)":")";return{names:{transition:l&&
"-webkit-transition"||m&&"MozTransition"||g&&"OTransition"||f&&"msTransition"||"transition",transform:l&&"-webkit-transform"||m&&"MozTransform"||g&&"OTransform"||f&&"msTransform"||"transform",transformName:l&&"-webkit-transform"||m&&"-moz-transform"||g&&"-o-transform"||f&&"-ms-transform"||"transform",origin:l&&"-webkit-transform-origin"||m&&"MozTransformOrigin"||g&&"OTransformOrigin"||f&&"msTransformOrigin"||"transformOrigin",endEvent:l&&"webkitTransitionEnd"||m&&"transitionend"||g&&"oTransitionEnd"||
f&&"MSTransitionEnd"||"transitionend"},translate:function(d,b){return q+d+"px,"+b+"px"+r},scale:function(d){return n+d+","+d+w},rotate:function(b){return d+b+"deg)"},matrix:function(d){return d.m?(d=d.m,k+d[0].toFixed(10)+","+d[1].toFixed(10)+v+d[2].toFixed(10)+","+d[3].toFixed(10)+x+d[4].toFixed(10)+(m?"px,":",")+d[5].toFixed(10)+(m?"px":"")+z):k+d.xx.toFixed(10)+","+d.yx.toFixed(10)+v+d.xy.toFixed(10)+","+d.yy.toFixed(10)+x+d.dx.toFixed(10)+(m?"px,":",")+d.dy.toFixed(10)+(m?"px":"")+z},matrix3d:function(d){d=
d.m;return"matrix3d("+d[0].toFixed(10)+","+d[1].toFixed(10)+",0,0,"+d[2].toFixed(10)+","+d[3].toFixed(10)+",0,0,0,0,1,0,"+d[4].toFixed(10)+","+d[5].toFixed(10)+",0,1)"},getScaleFromMatrix:function(d){if(!d)return 1;d=d.toLowerCase();var b=-1<d.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(d.substring(b.length,d.indexOf(",")))}}};h.add("esri-webgl",function(){var b;try{if(!q.WebGLRenderingContext)throw 0;b=document.createElement("canvas")}catch(n){return!1}for(var a=["webgl","experimental-webgl",
"webkit-3d","moz-webgl"],c=null,e=0;e<a.length;++e){try{c=b.getContext(a[e])}catch(n){}if(c)break}b=c;if(!b)return!1;b=b.getParameter(b.VERSION);return b?(b=b.match(/^WebGL\s+([\d.]*)/))&&.91<parseFloat(b[1]):!1});return h})},"esri/kernel":function(){define([],function(){return{version:"4.3",workerMessages:{}}})},"esri/core/promiseUtils":function(){define(["require","exports","dojo/Deferred","./Error"],function(a,h,p,m){function f(a){if(a){if("function"!==typeof a.forEach){var e=Object.keys(a),g=
e.map(function(b){return a[b]});return f(g).then(function(b){var a={};e.forEach(function(c,e){return a[c]=b[e]});return a})}var c=new p,b=[],q=a.length;0===q&&c.resolve(b);a.forEach(function(a){var e={promise:a};b.push(e);a.then(function(b){e.value=b}).otherwise(function(b){e.error=b}).then(function(){--q;0===q&&c.resolve(b)})});return c.promise}}h.eachAlways=f;h.create=function(a){var e=new p;a(function(a){void 0===a&&(a=null);return e.resolve(a)},e.reject);return e.promise};h.reject=function(a){var e=
new p;e.reject(a);return e.promise};h.resolve=function(a){void 0===a&&(a=null);var e=new p;e.resolve(a);return e.promise};h.after=function(a,f){void 0===f&&(f=null);var e=0,c=new p(function(){e&&(clearTimeout(e),e=0)}),e=setTimeout(function(){c.resolve(f)},a);return c.promise};h.timeout=function(a,f,g){var c=0,b=new p(a.cancel);a.then(function(a){b.isFulfilled()||(b.resolve(a),c&&(clearTimeout(c),c=0))});a.otherwise(function(a){b.isFulfilled()||(b.reject(a),c&&(clearTimeout(c),c=0))});c=setTimeout(function(){var a=
g||new m("promiseUtils:timeout","The wrapped promise did not resolve within "+f+" ms");b.reject(a)},f);return b.promise};h.wrapCallback=function(a){var e=!1,g=new p(function(){return e=!0});a(function(a){e||g.resolve(a)});return g.promise}})},"esri/request":function(){define("require dojo/_base/array dojo/_base/config dojo/Deferred dojo/_base/lang dojo/_base/url dojo/request dojo/io-query dojo/when ./kernel ./config ./core/sniff ./core/lang ./core/urlUtils ./core/deferredUtils ./core/promiseUtils dojo/has!host-browser?dojo/io/script dojo/has!host-browser?dojo/io/iframe dojo/has!host-browser?dojo/dom-construct".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d){function k(d,b){var k=g.objectToQuery(d.content);k&&(d.url+=(-1===d.url.indexOf("?")?"?":"\x26")+k);if(2E3<d.url.length)return r.reject(f.mixin(Error(),{message:"When using responseType 'image', URL length cannot exceed 2000 characters."}));var a=new Image;d.allowImageDataAccess&&(d.withCredentials?a.crossOrigin="use-credentials":b&&(a.crossOrigin="anonymous"));var c=!1,e=new m(function(d){c=!0;a.onload=a.onerror=a.onabort=null;a.src=""});b=function(d){a.onload=
a.onerror=a.onabort=null;c||e.reject(d)};a.onload=function(){a.onload=a.onerror=a.onabort=null;c||e.resolve(this)};a.onerror=b;a.onabort=b;a.alt="";a.src=d.url;return e.promise}function v(d){d=new e(d);return(d.host+(d.port?":"+d.port:"")).toLowerCase()}function A(a,c,e){var v=!!a.useProxy,q=a.method||"auto",r;r=a.crossOrigin;a=f.mixin({},a);a._ssl&&(a.url=a.url.replace(/^http:/i,"https:"));var u=a.content,A=a.url,z=c&&a.form;r=y.isDefined(r)?r:M.useCors;a.load=function(d){var b;d&&(d.error?(b=f.mixin(Error(),
d.error),b.log=p.isDebug):"error"===d.status&&(b=f.mixin(Error(),d),b.log=p.isDebug),b&&!y.isDefined(b.httpCode)&&(b.httpCode=b.code));return b||d};a.error=function(d,b){b&&b.xhr&&b.xhr.abort();d instanceof Error||(d=f.mixin(Error(),d));d.log=p.isDebug;return d};a._token&&(a.content=a.content||{},a.content.token=a._token);var C=0,F;A&&(F=g.objectToQuery(u),C=F.length+A.length+1,x("esri-url-encodes-apostrophe")&&(C=F.replace(/'/g,"%27").length+A.length+1));a.timeout=y.isDefined(a.timeout)?a.timeout:
M.timeout;a.handleAs=a.handleAs||"json";try{var D,B,E=r&&t.canUseXhr(a.urlObj)&&!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(a.url),I=t.hasSameOrigin(a.urlObj,t.appUrl)||E,J="post"===q||c||C>M.maxUrlLength?!0:!1,Q=I||-1===a.handleAs.indexOf("json")||!a.callbackParamName||c?!1:!0,P=t.getProxyRule(a.url)||M.forceProxy||v||!("image"===a.handleAs&&!a.allowImageDataAccess||Q&&!J||I)?!0:!1;c&&!x("esri-file-upload")&&!P&&E&&(P=!0);if((x("host-browser")||x("host-webworker"))&&P)if(D=t.getProxyUrl(A,
r),B=D.path,D._xo&&(E=!0),!J&&B.length+1+C>M.maxUrlLength&&(J=!0),a.url=B+"?"+A,J)a.content=f.mixin(D.query||{},u);else{var ta=g.objectToQuery(f.mixin(D.query||{},u));ta&&(a.url+=(-1===A.indexOf("?")?"?":"\x26")+ta);a.content=null}if((x("host-browser")||x("host-webworker"))&&Q&&!J)return!y.isDefined(a.isAsync)&&4>x("ff")&&(a.isAsync=!0),n.get(K?K(a):a);var ma=a.headers;!x("host-browser")&&!x("host-webworker")||ma&&ma.hasOwnProperty("X-Requested-With")||(ma=a.headers=ma||{},ma["X-Requested-With"]=
null);if(x("host-browser")&&c){var wa=a.callbackParamName||"callback.html",na=a.callbackElementName||"textarea",sa,Ea,pa,qa,ua=z.elements?z.elements.length:0,va;if(u=a.content)for(sa in u)if(pa=u[sa],y.isDefined(pa)){Ea=null;for(qa=0;qa<ua;qa++)if(va=z.elements[qa],va.name===sa){Ea=va;break}Ea?Ea.value=pa:e?z.append(sa,pa):z.appendChild(d.create("input",{type:"hidden",name:sa,value:pa}))}if(x("esri-file-upload"))h.forEach(z.elements,function(d){d.name===wa&&z.removeChild(d)}),a.contentType=!1,a.postData=
e?z:new FormData(z),delete a.form;else{z.enctype="multipart/form-data";9>x("ie")&&(z.encoding="multipart/form-data");z.method="post";h.some(z.elements,function(d){return d.name===wa})||z.appendChild(d.create("input",{type:"hidden",name:wa,value:na}));if(-1!==A.toLowerCase().indexOf("addattachment")||-1!==A.toLowerCase().indexOf("updateattachment"))a.url=A+(-1===A.indexOf("?")?"?":"\x26")+wa+"\x3d"+na,P&&(a.url=B+"?"+a.url);delete a.content}}if(E&&!a.hasOwnProperty("withCredentials")&&"with-credentials"===
M.useCors){e=P?B:A;var Ca=t.getCorsConfig(e);if(Ca&&Ca.hasOwnProperty("withCredentials"))Ca.withCredentials&&(a.withCredentials=!0);else if(b.id){var Fa=b.id.findServerInfo(e);Fa&&Fa.webTierAuth&&(a.withCredentials=!0)}}a=K?K(a):a;if("image"===a.handleAs)return k(a,E);if(J){a.data=a.content;if(x("host-browser")&&c&&!x("esri-file-upload"))return w.send(a);!P&&x("safari")&&(a.url+=(-1===a.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+V++);return l.post(a.url,a)}a.query=a.content;return l.get(a.url,
a)}catch(Aa){return c=new m,c.reject(a.error(Aa)),c}}function z(d){var b=M.corsStatus,k=t.getCorsConfig(d,!0);-1<k&&M.corsEnabledServers.splice(k,1);b[v(d)]=1;return k}function D(d){var b=M.corsStatus;try{var k=v(d.url);if(M.corsDetection&&M.useCors&&x("esri-cors")&&d.url&&-1!==d.url.toLowerCase().indexOf("/rest/services")&&!t.hasSameOrigin(d.urlObj,t.appUrl)&&!t.canUseXhr(d.urlObj)){if(b[k])return b[k];var a=new m;b[k]=a.promise;var c=d.url.substring(0,d.url.toLowerCase().indexOf("/rest/")+6)+"info";
l.get(c,{query:{f:"json"},failOk:!0,handleAs:"json",headers:{"X-Requested-With":null},timeout:1E3*M.corsDetectionTimeout}).then(function(b){b?(t.canUseXhr(d.url)||M.corsEnabledServers.push(k),a.resolve()):a.reject()},function(d){a.reject()});return a.promise}}catch(L){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}}function B(d,k,c,e){function n(d){d._pendingDfd=A(c,F,m);if(d._pendingDfd){var k=!!d._pendingDfd.response;(d._pendingDfd.response||d._pendingDfd).then(function(b){var a=
k?b.data:b;b=k?b.getHeader.bind(b):P;var c=null;d.ioArgs=d._pendingDfd&&d._pendingDfd.ioArgs;if(a&&(a.error?(c=f.mixin(Error(),a.error),c.log=p.isDebug):"error"===a.status&&(c=f.mixin(Error(),a),c.log=p.isDebug),c&&!y.isDefined(c.httpCode)&&(c.httpCode=c.code),c))throw c;d.resolve({data:a,url:e.url,requestOptions:e.requestOptions,getHeader:b});d._pendingDfd=null}).then(null,function(k){var a,n,g;k&&(a=k.code,n=k.subcode,g=(g=k.messageCode)&&g.toUpperCase());if(k&&403==a&&(4==n||k.message&&-1<k.message.toLowerCase().indexOf("ssl")&&
-1===k.message.toLowerCase().indexOf("permission"))){if(!c._ssl){c._ssl=c._sslFromServer=!0;B(d,!0,c,e);return}}else if(k&&415==k.status){if(z(c.url),!c._err415){c._err415=1;B(d,!0,c,e);return}}else if(b.id&&-1!==h.indexOf(b.id._errorCodes,a)&&!b.id._isPublic(c.url)&&!q&&(403!=a||-1===h.indexOf(E,g)&&(!y.isDefined(n)||2==n&&c._token))){C(d,c,e,k);return}d.ioArgs=d._pendingDfd&&d._pendingDfd.ioArgs;d.reject(k);d._pendingDfd=null})}else{d.ioArgs=d._pendingDfd&&d._pendingDfd.ioArgs;var a=Error("Deferred object is missing");
a.log=p.isDebug;d.reject(a);d._pendingDfd=null}}var g=c.form,q=c.disableIdentityLookup,r=c._preLookup,u=!1;if(x("esri-workers")&&!1!==M.useWorkers)if(!0===c.useWorkers||!0===M.useWorkers)u=!0;else if(c.workerOptions){var w=c.workerOptions;if(w.callback||w.worker&&w.worker.worker instanceof Worker)u=!0}var m=g&&x("esri-file-upload")&&g instanceof FormData,F=g&&(g.elements?h.some(g.elements,function(d){return"file"===d.type}):m),D=-1!==c.url.toLowerCase().indexOf("token\x3d")||c.content&&c.content.token||
F&&h.some(g.elements,function(d){return"token"===d.name})?1:0;if(!k){d.then(function(d){if((/\/sharing\/rest\/accounts\/self/i.test(c.url)||/\/sharing\/rest\/portals\/self/i.test(c.url))&&!D&&!c._token&&d.user&&d.user.username){var k=M.corsEnabledServers,a=t.getCorsConfig(c.url,!0),e={host:v(c.url),withCredentials:!0};if(-1===a)k.push(e);else{var n=k[a];"object"===typeof n?n.withCredentials=!0:k.splice(a,1,e)}}if(k=c._credential)if(a=(a=b.id.findServerInfo(k.server))&&a.owningSystemUrl)a=a.replace(/\/?$/,
"/sharing"),(k=b.id.findCredential(a,k.userId))&&-1===b.id._getIdenticalSvcIdx(a,k)&&k.resources.splice(0,0,a);return d}).always(function(d){delete c._credential;d&&(d.ssl=!!c._ssl)});var K=c.load,I=c.error;K&&d.then(function(b){var k=d._pendingDfd,k=k&&k.ioArgs;return K.call(k&&k.args,b,k)});I&&d.then(null,function(b){var k=d._pendingDfd,k=k&&k.ioArgs;return I.call(k&&k.args,b,k)})}!b.id||D||c._token||b.id._isPublic(c.url)||q&&!r||!(k=b.id.findCredential(c.url))||(c._token=k.token,c._ssl=k.ssl);
u?c.workerOptions&&c.workerOptions.worker?(l=c.workerOptions.worker,n(d)):a(["./workers/RequestClient"],function(b){if(c.workerOptions){var k=c.workerOptions;l=b.getClient(k.callback,k.cbFunction)}else l=b.getClient();n(d)}):n(d);return d.promise}function C(d,k,a,c){d._pendingDfd=b.id.getCredential(k.url,{token:k._token,error:c});d._pendingDfd.then(function(b){k._token=b.token;k._credential=b;k._ssl=k._sslFromServer||b.ssl;B(d,!0,k,a)}).then(null,function(b){d.reject(b);d._pendingDfd=null})}function F(d,
b){"string"!==typeof d&&console.error("esri/request: the first parameter should be a url string");var k=f.mixin({},b),a={url:d,requestOptions:f.mixin({},b)};k.content=k.query;delete k.query;k.preventCache=!!k.cacheBust;delete k.cacheBust;k.handleAs=k.responseType;delete k.responseType;"array-buffer"===k.handleAs&&(k.handleAs="arraybuffer");if("image"===k.handleAs){if(x("host-webworker"))return r.reject(f.mixin(Error(),{message:"The responseType 'image' is not supported in Web Workers or Node environment."}));
k.preventCache&&(k.content=k.content||{},k.content["request.preventCache"]=Date.now());k.method="auto"}k.url=t.normalize(d);"file"!==t.appUrl.scheme&&(k.url=t.makeAbsolute(k.url));k.urlObj=new e(k.url);var n=u.makeDeferredCancellingPending();c(D(k)).always(function(){B(n,!1,k,a)});return n.promise}var K,M=q.request,E=["COM_0056","COM_0057"],V=0,P=function(){return null};F._makeRequest=A;F._processRequest=B;F._disableCors=z;F._detectCors=D;F.setRequestPreCallback=function(d){K=d};return F})},"dojo/request":function(){define(["./request/default!"],
function(a){return a})},"dojo/request/default":function(){define(["exports","require","../has"],function(a,h,p){var m=p("config-requestProvider"),f;if(p("host-browser")||p("host-webworker"))f="./xhr";m||(m=f);a.getPlatformDefaultId=function(){return f};a.load=function(a,l,g,c){h(["platform"==a?f:m],function(b){g(b)})}})},"esri/core/deferredUtils":function(){define(["dojo/Deferred"],function(a){var h={makeDeferredCancellingPending:function(){var p={},m=h._dfdCanceller.bind(null,p),m=new a(m);return p.deferred=
m},_dfdCanceller:function(a){a=a.deferred?a.deferred:a;a.canceled=!0;var m=a._pendingDfd;a.isResolved()||!m||m.isResolved()||m.cancel();a._pendingDfd=null},_fixDfd:function(a){var m=a.then;a.then=function(a,e,l){if(a){var g=a;a=function(a){return a&&a._argsArray?g.apply(null,a):g(a)}}return m.call(this,a,e,l)};return a},_resDfd:function(a,m,f){var e=m.length;1===e?f?a.reject(m[0]):a.resolve(m[0]):1<e?(m._argsArray=!0,a.resolve(m)):a.resolve()}};return h})},"esri/geometry/SpatialReference":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),
function(a,h,p,m,f,e,l){a=b=function(a){function e(b){b=a.call(this)||this;b.latestWkid=null;b.wkid=null;b.wkt=null;return b}p(e,a);e.prototype.normalizeCtorArgs=function(b){return b&&"object"===typeof b?b:(a={},a["string"===typeof b?"wkt":"wkid"]=b,a);var a};Object.defineProperty(e.prototype,"isWGS84",{get:function(){return 4326===this.wkid},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"isWebMercator",{get:function(){return-1!==g.indexOf(this.wkid)},enumerable:!0,configurable:!0});
Object.defineProperty(e.prototype,"isGeographic",{get:function(){return l.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"isWrappable",{get:function(){return-1!==c.indexOf(this.wkid)},enumerable:!0,configurable:!0});e.prototype.writeWkt=function(b,a){this.wkid||(a.wkt=b)};e.prototype.clone=function(){if(this===b.WGS84)return b.WGS84;if(this===b.WebMercator)return b.WebMercator;var a=new b;null!=this.wkid?(a.wkid=this.wkid,null!=this.latestWkid&&(a.latestWkid=
this.latestWkid),null!=this.vcsWkid&&(a.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(a.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(a.wkt=this.wkt);return a};e.prototype.equals=function(b){if(b){if(this===b)return!0;if(null!=this.wkid||null!=b.wkid)return this.wkid===b.wkid||this.isWebMercator&&b.isWebMercator||null!=b.latestWkid&&this.wkid===b.latestWkid||null!=this.latestWkid&&b.wkid===this.latestWkid;if(this.wkt&&b.wkt)return this.wkt.toUpperCase()===b.wkt.toUpperCase()}return!1};e.fromJSON=
function(a){if(!a)return null;if(a.wkid){if(102100===a.wkid)return b.WebMercator;if(4326===a.wkid)return b.WGS84}var c=new b;c.read(a);return c};return e}(e.declared(f));a.WGS84=null;a.WebMercator=null;m([e.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,"isWGS84",null);m([e.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,"isWebMercator",null);m([e.property({dependsOn:["wkid","wkt"],readOnly:!0})],a.prototype,"isGeographic",null);m([e.property({dependsOn:["wkid"],readOnly:!0})],a.prototype,
"isWrappable",null);m([e.property({json:{write:!0}})],a.prototype,"latestWkid",void 0);m([e.property({json:{write:!0}})],a.prototype,"wkid",void 0);m([e.property()],a.prototype,"wkt",void 0);m([e.writer("wkt")],a.prototype,"writeWkt",null);m([e.property({json:{write:!0}})],a.prototype,"vcsWkid",void 0);m([e.property({json:{write:!0}})],a.prototype,"latestVcsWkid",void 0);a=b=m([e.subclass("esri.SpatialReference")],a);a.WGS84=new a(4326);a.WebMercator=new a({wkid:102100,latestWkid:3857});Object.freeze&&
(Object.freeze(a.WGS84),Object.freeze(a.WebMercator));var g=[102113,102100,3857,3785],c=[102113,102100,3857,3785,4326],b;return a})},"esri/core/JSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./declare ./accessorSupport/read ./accessorSupport/write ./accessorSupport/decorators".split(" "),function(a,h,p,m,f,e,l,g,c){function b(b,a){if(!b)return null;if(b.declaredClass)throw Error("JSON object is already hydrated");var c=new this;
c.read(b,a);return c}var q=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);a.prototype.read=function(b,a){l.default(this,b,a);return this};a.prototype.write=function(b,a){return g.default(this,b||{},a)};a.prototype.toJSON=function(b){return this.write(null,b)};return a}(c.declared(f)),q=m([c.subclass("esri.core.JSONSupport")],q);q.prototype.toJSON.isDefaultToJSON=!0;e.after(function(a){e.hasMixin(a,q)&&(a.fromJSON=b.bind(a))});return q})},"esri/core/accessorSupport/read":function(){define("require exports dojo/_base/lang ./utils ./get ./extensions/serializableProperty".split(" "),
function(a,h,p,m,f,e){function l(a,b,q){void 0===q&&(q=g);for(var c=m.getProperties(a),l=c.metadatas,t={},u=0,r=Object.getOwnPropertyNames(b);u<r.length;u++){var n=t,w=l,d=r[u],k=b,v=q,A=e.originSpecificReadPropertyDefinition(w[d],v);A&&(!A.read||!1!==A.read.enabled&&!A.read.source)&&(n[d]=!0);for(var h=0,p=Object.getOwnPropertyNames(w);h<p.length;h++){var B=p[h],A=e.originSpecificReadPropertyDefinition(w[B],v),C;a:{C=d;var F=k;if(A&&A.read&&!1!==A.read.enabled&&A.read.source)if(A=A.read.source,"string"===
typeof A){if(A===C||-1<A.indexOf(".")&&0===A.indexOf(C)&&f.exists(A,F)){C=!0;break a}}else for(var K=0;K<A.length;K++){var M=A[K];if(M===C||-1<M.indexOf(".")&&0===M.indexOf(C)&&f.exists(M,F)){C=!0;break a}}C=!1}C&&(n[B]=!0)}}c.setDefaultOrigin(q.origin);u=0;for(t=Object.getOwnPropertyNames(t);u<t.length;u++)r=t[u],w=(n=e.originSpecificReadPropertyDefinition(l[r],q).read)&&n.source,d=void 0,d=w&&"string"===typeof w?f.valueOf(b,w):b[r],n&&n.reader&&(d=n.reader.call(a,d,b,q)),void 0!==d&&c.set(r,d);
c.setDefaultOrigin("user")}var g={origin:"service"};h.read=l;h.readLoadable=function(a,b,e,f){void 0===f&&(f=g);b=p.mixin({},f,{messages:[]});e(b);b.messages.forEach(function(b){"warning"!==b.type||a.loaded?f&&f.messages.push(b):a.loadWarnings.push(b)})};Object.defineProperty(h,"__esModule",{value:!0});h.default=l})},"esri/core/accessorSupport/write":function(){define(["require","exports","./PropertyOrigin","./utils","./extensions/serializableProperty"],function(a,h,p,m,f){function e(a,c,b,e,f,l){if(!e||
!e.write)return!1;var g=a.get(b);if(void 0===g)return!1;!f&&e.write.overridePolicy&&(a=e.write.overridePolicy.call(a,g,b,l),void 0!==a&&(f=a));f||(f=e.write);return!f||!1===f.enabled||!f.allowNull&&null===g||!f.ignoreOrigin&&l&&l.origin&&c.store.originOf(b)<p.nameToId(l.origin)?!1:!0}function l(a,c,b){var g=m.getProperties(a),l=g.metadatas,h;for(h in l){var t=f.originSpecificWritePropertyDefinition(l[h],b);if(e(a,g,h,t,null,b)){var u=a.get(h),r={};t.write.writer.call(a,u,r,t.write.target||h,b);t=
r;0<Object.keys(t).length&&(c=m.merge(c,t),b&&b.writtenProperties&&b.writtenProperties.push({target:a,propName:h,oldOrigin:p.idToReadableName(g.store.originOf(h)),newOrigin:b.origin}))}}return c}h.willPropertyWrite=function(a,c,b,q){var g=m.getProperties(a),l=f.originSpecificWritePropertyDefinition(g.metadatas[c],q);return l?e(a,g,c,l,b,q):!1};h.write=l;Object.defineProperty(h,"__esModule",{value:!0});h.default=l})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require","exports",
"./WKIDUnitConversion"],function(a,h,p){h.isGeographic=function(a){return a.wkid?null==p[a.wkid]:a.wkt?/^\s*GEOGCS/i.test(a.wkt):!1};h.getInfo=function(a){return a.wkid?m[a.wkid]:null};a=[-2.0037508342788905E7,2.0037508342788905E7];h=[-2.0037508342787E7,2.0037508342787E7];var m={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',
valid: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,
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]]',
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]]',
valid:[-180,180],origin:[-180,180],dx:1E-5}}})},"esri/geometry/support/WKIDUnitConversion":function(){define([],function(){var a,h={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],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,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,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,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,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,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,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,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,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,7257:0,7258:2,7259:0,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,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,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,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,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,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,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,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,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++)h[a]=0;for(a=2056;2065>=a;a++)h[a]=0;for(a=2067;2135>=a;a++)h[a]=0;for(a=2137;2154>=a;a++)h[a]=0;for(a=2161;2170>=a;a++)h[a]=0;for(a=2172;2193>=a;a++)h[a]=0;for(a=2195;2198>=a;a++)h[a]=0;for(a=2200;2203>=a;a++)h[a]=0;for(a=2205;2217>=a;a++)h[a]=0;for(a=2222;2224>=a;a++)h[a]=1;for(a=2225;2250>=a;a++)h[a]=2;for(a=2251;2253>=
a;a++)h[a]=1;for(a=2257;2264>=a;a++)h[a]=2;for(a=2274;2279>=a;a++)h[a]=2;for(a=2280;2282>=a;a++)h[a]=1;for(a=2283;2289>=a;a++)h[a]=2;for(a=2290;2292>=a;a++)h[a]=0;for(a=2308;2313>=a;a++)h[a]=0;for(a=2315;2491>=a;a++)h[a]=0;for(a=2494;2866>=a;a++)h[a]=0;for(a=2867;2869>=a;a++)h[a]=1;for(a=2870;2888>=a;a++)h[a]=2;for(a=2891;2895>=a;a++)h[a]=2;for(a=2896;2898>=a;a++)h[a]=1;for(a=2902;2908>=a;a++)h[a]=2;for(a=2915;2920>=a;a++)h[a]=2;for(a=2921;2923>=a;a++)h[a]=1;for(a=2924;2930>=a;a++)h[a]=2;for(a=2931;2962>=
a;a++)h[a]=0;for(a=2964;2968>=a;a++)h[a]=2;for(a=2969;2973>=a;a++)h[a]=0;for(a=2975;2991>=a;a++)h[a]=0;for(a=2995;3051>=a;a++)h[a]=0;for(a=3054;3079>=a;a++)h[a]=0;for(a=3081;3088>=a;a++)h[a]=0;for(a=3092;3101>=a;a++)h[a]=0;for(a=3106;3138>=a;a++)h[a]=0;for(a=3146;3151>=a;a++)h[a]=0;for(a=3153;3166>=a;a++)h[a]=0;for(a=3168;3172>=a;a++)h[a]=0;for(a=3174;3203>=a;a++)h[a]=0;for(a=3294;3358>=a;a++)h[a]=0;for(a=3367;3403>=a;a++)h[a]=0;for(a=3408;3416>=a;a++)h[a]=0;for(a=3417;3438>=a;a++)h[a]=2;for(a=3441;3446>=
a;a++)h[a]=2;for(a=3447;3450>=a;a++)h[a]=0;for(a=3451;3459>=a;a++)h[a]=2;for(a=3460;3478>=a;a++)h[a]=0;for(a=3554;3559>=a;a++)h[a]=0;for(a=3560;3570>=a;a++)h[a]=2;for(a=3571;3581>=a;a++)h[a]=0;for(a=3594;3597>=a;a++)h[a]=0;for(a=3601;3604>=a;a++)h[a]=0;for(a=3637;3639>=a;a++)h[a]=0;for(a=3665;3667>=a;a++)h[a]=0;for(a=3693;3695>=a;a++)h[a]=0;for(a=3701;3727>=a;a++)h[a]=0;for(a=3728;3739>=a;a++)h[a]=2;for(a=3740;3751>=a;a++)h[a]=0;for(a=3753;3760>=a;a++)h[a]=2;for(a=3761;3773>=a;a++)h[a]=0;for(a=3775;3777>=
a;a++)h[a]=0;for(a=3779;3781>=a;a++)h[a]=0;for(a=3783;3785>=a;a++)h[a]=0;for(a=3788;3791>=a;a++)h[a]=0;for(a=3797;3802>=a;a++)h[a]=0;for(a=3814;3816>=a;a++)h[a]=0;for(a=3825;3829>=a;a++)h[a]=0;for(a=3832;3841>=a;a++)h[a]=0;for(a=3844;3852>=a;a++)h[a]=0;for(a=3873;3885>=a;a++)h[a]=0;for(a=3890;3893>=a;a++)h[a]=0;for(a=3907;3912>=a;a++)h[a]=0;for(a=3942;3950>=a;a++)h[a]=0;for(a=3968;3970>=a;a++)h[a]=0;for(a=3973;3976>=a;a++)h[a]=0;for(a=3986;3989>=a;a++)h[a]=0;for(a=3994;3997>=a;a++)h[a]=0;for(a=4048;4051>=
a;a++)h[a]=0;for(a=4056;4063>=a;a++)h[a]=0;for(a=4093;4096>=a;a++)h[a]=0;for(a=4390;4398>=a;a++)h[a]=0;for(a=4399;4413>=a;a++)h[a]=2;for(a=4418;4433>=a;a++)h[a]=2;for(a=4455;4457>=a;a++)h[a]=2;for(a=4484;4489>=a;a++)h[a]=0;for(a=4491;4554>=a;a++)h[a]=0;for(a=4568;4589>=a;a++)h[a]=0;for(a=4652;4656>=a;a++)h[a]=0;for(a=4766;4800>=a;a++)h[a]=0;for(a=5014;5016>=a;a++)h[a]=0;for(a=5069;5072>=a;a++)h[a]=0;for(a=5105;5130>=a;a++)h[a]=0;for(a=5173;5188>=a;a++)h[a]=0;for(a=5253;5259>=a;a++)h[a]=0;for(a=5269;5275>=
a;a++)h[a]=0;for(a=5292;5311>=a;a++)h[a]=0;for(a=5329;5331>=a;a++)h[a]=0;for(a=5343;5349>=a;a++)h[a]=0;for(a=5355;5357>=a;a++)h[a]=0;for(a=5387;5389>=a;a++)h[a]=0;for(a=5459;5463>=a;a++)h[a]=0;for(a=5479;5482>=a;a++)h[a]=0;for(a=5518;5520>=a;a++)h[a]=0;for(a=5530;5539>=a;a++)h[a]=0;for(a=5550;5552>=a;a++)h[a]=0;for(a=5562;5583>=a;a++)h[a]=0;for(a=5623;5625>=a;a++)h[a]=2;for(a=5631;5639>=a;a++)h[a]=0;for(a=5649;5653>=a;a++)h[a]=0;for(a=5663;5680>=a;a++)h[a]=0;for(a=5682;5685>=a;a++)h[a]=0;for(a=5875;5877>=
a;a++)h[a]=0;for(a=5921;5940>=a;a++)h[a]=0;for(a=6050;6125>=a;a++)h[a]=0;for(a=6244;6275>=a;a++)h[a]=0;for(a=6328;6348>=a;a++)h[a]=0;for(a=6350;6356>=a;a++)h[a]=0;for(a=6366;6372>=a;a++)h[a]=0;for(a=6381;6387>=a;a++)h[a]=0;for(a=6393;6404>=a;a++)h[a]=0;for(a=6480;6483>=a;a++)h[a]=0;for(a=6511;6514>=a;a++)h[a]=0;for(a=6579;6581>=a;a++)h[a]=0;for(a=6619;6624>=a;a++)h[a]=0;for(a=6625;6627>=a;a++)h[a]=2;for(a=6628;6632>=a;a++)h[a]=0;for(a=6634;6637>=a;a++)h[a]=0;for(a=6669;6692>=a;a++)h[a]=0;for(a=6707;6709>=
a;a++)h[a]=0;for(a=6720;6723>=a;a++)h[a]=0;for(a=6732;6738>=a;a++)h[a]=0;for(a=6931;6933>=a;a++)h[a]=0;for(a=6956;6959>=a;a++)h[a]=0;for(a=7005;7007>=a;a++)h[a]=0;for(a=7057;7070>=a;a++)h[a]=2;for(a=7074;7082>=a;a++)h[a]=0;for(a=7109;7118>=a;a++)h[a]=0;for(a=7119;7127>=a;a++)h[a]=1;for(a=7374;7376>=a;a++)h[a]=0;for(a=7528;7586>=a;a++)h[a]=0;for(a=7587;7645>=a;a++)h[a]=2;for(a=7845;7859>=a;a++)h[a]=0;for(a=20002;20032>=a;a++)h[a]=0;for(a=20062;20092>=a;a++)h[a]=0;for(a=20135;20138>=a;a++)h[a]=0;for(a=
20248;20258>=a;a++)h[a]=0;for(a=20348;20358>=a;a++)h[a]=0;for(a=20436;20440>=a;a++)h[a]=0;for(a=20822;20824>=a;a++)h[a]=0;for(a=20934;20936>=a;a++)h[a]=0;for(a=21035;21037>=a;a++)h[a]=0;for(a=21095;21097>=a;a++)h[a]=0;for(a=21148;21150>=a;a++)h[a]=0;for(a=21413;21423>=a;a++)h[a]=0;for(a=21473;21483>=a;a++)h[a]=0;for(a=21780;21782>=a;a++)h[a]=0;for(a=21891;21894>=a;a++)h[a]=0;for(a=21896;21899>=a;a++)h[a]=0;for(a=22171;22177>=a;a++)h[a]=0;for(a=22181;22187>=a;a++)h[a]=0;for(a=22191;22197>=a;a++)h[a]=
0;for(a=22234;22236>=a;a++)h[a]=0;for(a=22521;22525>=a;a++)h[a]=0;for(a=22991;22994>=a;a++)h[a]=0;for(a=23028;23038>=a;a++)h[a]=0;for(a=23830;23853>=a;a++)h[a]=0;for(a=23866;23872>=a;a++)h[a]=0;for(a=23877;23884>=a;a++)h[a]=0;for(a=23886;23894>=a;a++)h[a]=0;for(a=23946;23948>=a;a++)h[a]=0;for(a=24311;24313>=a;a++)h[a]=0;for(a=24342;24347>=a;a++)h[a]=0;for(a=24370;24374>=a;a++)h[a]=10;for(a=24375;24381>=a;a++)h[a]=0;for(a=24718;24721>=a;a++)h[a]=0;for(a=24817;24821>=a;a++)h[a]=0;for(a=24877;24882>=
a;a++)h[a]=0;for(a=24891;24893>=a;a++)h[a]=0;for(a=25391;25395>=a;a++)h[a]=0;for(a=25828;25838>=a;a++)h[a]=0;for(a=26191;26195>=a;a++)h[a]=0;for(a=26391;26393>=a;a++)h[a]=0;for(a=26701;26722>=a;a++)h[a]=0;for(a=26729;26799>=a;a++)h[a]=2;for(a=26801;26803>=a;a++)h[a]=2;for(a=26811;26813>=a;a++)h[a]=2;for(a=26847;26870>=a;a++)h[a]=2;for(a=26891;26899>=a;a++)h[a]=0;for(a=26901;26923>=a;a++)h[a]=0;for(a=26929;26946>=a;a++)h[a]=0;for(a=26948;26998>=a;a++)h[a]=0;for(a=27037;27040>=a;a++)h[a]=0;for(a=27205;27232>=
a;a++)h[a]=0;for(a=27258;27260>=a;a++)h[a]=0;for(a=27391;27398>=a;a++)h[a]=0;for(a=27561;27564>=a;a++)h[a]=0;for(a=27571;27574>=a;a++)h[a]=0;for(a=27581;27584>=a;a++)h[a]=0;for(a=27591;27594>=a;a++)h[a]=0;for(a=28191;28193>=a;a++)h[a]=0;for(a=28348;28358>=a;a++)h[a]=0;for(a=28402;28432>=a;a++)h[a]=0;for(a=28462;28492>=a;a++)h[a]=0;for(a=29118;29122>=a;a++)h[a]=0;for(a=29168;29172>=a;a++)h[a]=0;for(a=29177;29185>=a;a++)h[a]=0;for(a=29187;29195>=a;a++)h[a]=0;for(a=29900;29903>=a;a++)h[a]=0;for(a=30161;30179>=
a;a++)h[a]=0;for(a=30491;30494>=a;a++)h[a]=0;for(a=30729;30732>=a;a++)h[a]=0;for(a=31251;31259>=a;a++)h[a]=0;for(a=31265;31268>=a;a++)h[a]=0;for(a=31275;31279>=a;a++)h[a]=0;for(a=31281;31297>=a;a++)h[a]=0;for(a=31461;31469>=a;a++)h[a]=0;for(a=31491;31495>=a;a++)h[a]=0;for(a=31917;31922>=a;a++)h[a]=0;for(a=31965;32E3>=a;a++)h[a]=0;for(a=32001;32003>=a;a++)h[a]=2;for(a=32005;32031>=a;a++)h[a]=2;for(a=32033;32060>=a;a++)h[a]=2;for(a=32064;32067>=a;a++)h[a]=2;for(a=32074;32077>=a;a++)h[a]=2;for(a=32081;32086>=
a;a++)h[a]=0;for(a=32107;32130>=a;a++)h[a]=0;for(a=32133;32158>=a;a++)h[a]=0;for(a=32164;32167>=a;a++)h[a]=2;for(a=32180;32199>=a;a++)h[a]=0;for(a=32201;32260>=a;a++)h[a]=0;for(a=32301;32360>=a;a++)h[a]=0;for(a=32601;32662>=a;a++)h[a]=0;for(a=32664;32667>=a;a++)h[a]=2;for(a=32701;32761>=a;a++)h[a]=0;for(a=53001;53004>=a;a++)h[a]=0;for(a=53008;53019>=a;a++)h[a]=0;for(a=53021;53032>=a;a++)h[a]=0;for(a=53042;53046>=a;a++)h[a]=0;for(a=53074;53080>=a;a++)h[a]=0;for(a=54001;54004>=a;a++)h[a]=0;for(a=54008;54019>=
a;a++)h[a]=0;for(a=54021;54032>=a;a++)h[a]=0;for(a=54042;54046>=a;a++)h[a]=0;for(a=54048;54053>=a;a++)h[a]=0;for(a=54074;54080>=a;a++)h[a]=0;for(a=102001;102040>=a;a++)h[a]=0;for(a=102042;102063>=a;a++)h[a]=0;for(a=102065;102067>=a;a++)h[a]=0;for(a=102070;102117>=a;a++)h[a]=0;for(a=102122;102216>=a;a++)h[a]=0;for(a=102221;102377>=a;a++)h[a]=0;for(a=102382;102388>=a;a++)h[a]=0;for(a=102389;102398>=a;a++)h[a]=2;for(a=102399;102444>=a;a++)h[a]=0;for(a=102445;102447>=a;a++)h[a]=2;for(a=102448;102458>=
a;a++)h[a]=0;for(a=102459;102468>=a;a++)h[a]=2;for(a=102469;102496>=a;a++)h[a]=0;for(a=102500;102519>=a;a++)h[a]=1;for(a=102520;102524>=a;a++)h[a]=0;for(a=102525;102529>=a;a++)h[a]=2;for(a=102530;102561>=a;a++)h[a]=0;for(a=102570;102588>=a;a++)h[a]=0;for(a=102590;102598>=a;a++)h[a]=0;for(a=102601;102603>=a;a++)h[a]=0;for(a=102605;102628>=a;a++)h[a]=0;for(a=102629;102646>=a;a++)h[a]=2;for(a=102648;102700>=a;a++)h[a]=2;for(a=102701;102703>=a;a++)h[a]=0;for(a=102707;102730>=a;a++)h[a]=2;for(a=102733;102758>=
a;a++)h[a]=2;for(a=102767;102798>=a;a++)h[a]=0;for(a=102965;102969>=a;a++)h[a]=0;for(a=102971;102973>=a;a++)h[a]=0;for(a=102975;102989>=a;a++)h[a]=0;for(a=102990;102992>=a;a++)h[a]=1;for(a=102997;103002>=a;a++)h[a]=0;for(a=103003;103008>=a;a++)h[a]=2;for(a=103009;103011>=a;a++)h[a]=0;for(a=103012;103014>=a;a++)h[a]=2;for(a=103019;103021>=a;a++)h[a]=0;for(a=103022;103024>=a;a++)h[a]=2;for(a=103029;103031>=a;a++)h[a]=0;for(a=103032;103034>=a;a++)h[a]=2;for(a=103065;103068>=a;a++)h[a]=0;for(a=103074;103076>=
a;a++)h[a]=0;for(a=103077;103079>=a;a++)h[a]=1;for(a=103080;103082>=a;a++)h[a]=0;for(a=103083;103085>=a;a++)h[a]=2;for(a=103090;103093>=a;a++)h[a]=0;for(a=103097;103099>=a;a++)h[a]=0;for(a=103100;103102>=a;a++)h[a]=2;for(a=103107;103109>=a;a++)h[a]=0;for(a=103110;103112>=a;a++)h[a]=2;for(a=103113;103116>=a;a++)h[a]=0;for(a=103117;103120>=a;a++)h[a]=2;for(a=103153;103157>=a;a++)h[a]=0;for(a=103158;103162>=a;a++)h[a]=2;for(a=103163;103165>=a;a++)h[a]=0;for(a=103166;103168>=a;a++)h[a]=1;for(a=103169;103171>=
a;a++)h[a]=2;for(a=103186;103188>=a;a++)h[a]=0;for(a=103189;103191>=a;a++)h[a]=2;for(a=103192;103195>=a;a++)h[a]=0;for(a=103196;103199>=a;a++)h[a]=2;for(a=103200;103224>=a;a++)h[a]=0;for(a=103225;103227>=a;a++)h[a]=1;for(a=103232;103237>=a;a++)h[a]=0;for(a=103238;103243>=a;a++)h[a]=2;for(a=103244;103246>=a;a++)h[a]=0;for(a=103247;103249>=a;a++)h[a]=2;for(a=103254;103256>=a;a++)h[a]=0;for(a=103257;103259>=a;a++)h[a]=2;for(a=103264;103266>=a;a++)h[a]=0;for(a=103267;103269>=a;a++)h[a]=2;for(a=103300;103375>=
a;a++)h[a]=0;for(a=103381;103383>=a;a++)h[a]=0;for(a=103384;103386>=a;a++)h[a]=1;for(a=103387;103389>=a;a++)h[a]=0;for(a=103390;103392>=a;a++)h[a]=2;for(a=103397;103399>=a;a++)h[a]=0;for(a=103400;103471>=a;a++)h[a]=2;for(a=103476;103478>=a;a++)h[a]=0;for(a=103479;103481>=a;a++)h[a]=2;for(a=103486;103488>=a;a++)h[a]=0;for(a=103489;103491>=a;a++)h[a]=2;for(a=103492;103495>=a;a++)h[a]=0;for(a=103496;103499>=a;a++)h[a]=2;for(a=103528;103543>=a;a++)h[a]=0;for(a=103544;103548>=a;a++)h[a]=2;for(a=103549;103551>=
a;a++)h[a]=0;for(a=103552;103554>=a;a++)h[a]=1;for(a=103555;103557>=a;a++)h[a]=2;for(a=103558;103560>=a;a++)h[a]=0;for(a=103571;103573>=a;a++)h[a]=0;for(a=103574;103576>=a;a++)h[a]=2;for(a=103577;103580>=a;a++)h[a]=0;for(a=103581;103583>=a;a++)h[a]=2;for(a=103600;103694>=a;a++)h[a]=0;for(a=103700;103793>=a;a++)h[a]=2;for(a=103794;103871>=a;a++)h[a]=0;for(a=103900;103971>=a;a++)h[a]=2;return h})},"esri/geometry/Extent":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./support/webMercatorUtils ./support/mathUtils ./support/spatialReferenceUtils".split(" "),
function(a,h,p,m,f,e,l,g){var c=m.createSubclass({declaredClass:"esri.geometry.Extent",type:"extent",normalizeCtorArgs:function(b,c,e,g,f){return this.isSR(b)?{spatialReference:b,xmin:0,ymin:0,xmax:0,ymax:0}:a.isObject(b)?(b.spatialReference=b.spatialReference||p.WGS84,b):{xmin:b,ymin:c,xmax:e,ymax:g,spatialReference:f||p.WGS84}},properties:{cache:{dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax".split(" ")},center:{readOnly:!0,dependsOn:["cache"],get:function(b){b||(b=new f({spatialReference:this.spatialReference}));
b.x=.5*(this.xmin+this.xmax);b.y=.5*(this.ymin+this.ymax);this.hasZ&&(b.z=.5*(this.zmin+this.zmax));this.hasM&&(b.m=.5*(this.mmin+this.mmax));return b}},extent:{readOnly:!0,dependsOn:["cache"],get:function(){return this.clone()}},hasM:{readOnly:!0,dependsOn:["mmin","mmax"],get:function(){return null!=this.mmin&&null!=this.mmax}},hasZ:{readOnly:!0,dependsOn:["zmin","zmax"],get:function(){return null!=this.zmin&&null!=this.zmax}},height:{readOnly:!0,dependsOn:["ymin","ymax"],get:function(){return Math.abs(this.ymax-
this.ymin)}},width:{readOnly:!0,dependsOn:["xmin","xmax"],get:function(){return Math.abs(this.xmax-this.xmin)}},xmin:0,ymin:0,mmin:void 0,zmin:void 0,xmax:0,ymax:0,mmax:void 0,zmax:void 0},centerAt:function(b){var a=this.center;return null!=b.z&&this.hasZ?this.offset(b.x-a.x,b.y-a.y,b.z-a.z):this.offset(b.x-a.x,b.y-a.y)},clone:function(){var b=new c;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},contains:function(b){if(!b)return!1;var a=b.type;if("point"===a){var c=this.spatialReference,g=b.spatialReference,a=b.x,t=b.y;b=b.z;c&&g&&!c.equals(g)&&e.canProject(c,g)&&(c=c.isWebMercator?f.lngLatToXY(a,t):f.xyToLngLat(a,t,!0),a=c[0],t=c[1]);if(a>=this.xmin&&a<=this.xmax&&t>=this.ymin&&t<=this.ymax)return null!=b&&this.hasZ?b>=this.zmin&&b<=this.zmax:!0}else if("extent"===a)return this._containsExtent(b);return!1},equals:function(b){if(!b)return!1;
var a=this.spatialReference;if(!a.equals(b.spatialReference))if(e.canProject(b.spatialReference,a))b=e.project(b,a);else return!1;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&&this.mmax===b.mmax},expand:function(b){b=.5*(1-b);var a=this.width*b,c=this.height*b;this.xmin+=a;this.ymin+=c;this.xmax-=a;this.ymax-=c;this.hasZ&&(a=(this.zmax-this.zmin)*b,this.zmin+=a,this.zmax-=a);this.hasM&&(b*=this.mmax-
this.mmin,this.mmin+=b,this.mmax-=b);return this},intersects:function(b){if(!b)return!1;var a=b.type,c=this.spatialReference,g=b.spatialReference;c&&g&&!c.equals(g)&&e.canProject(c,g)&&(b=c.isWebMercator?e.geographicToWebMercator(b):e.webMercatorToGeographic(b,!0));switch(a){case "point":return this.contains(b);case "multipoint":return this._intersectsMultipoint(b);case "extent":return this._intersectsExtent(b);case "polygon":return this._intersectsPolygon(b);case "polyline":return this._intersectsPolyline(b)}},
normalize:function(){var b=this._normalize(!1,!0);Array.isArray(b)||(b=[b]);return b},offset:function(b,a,c){this.xmin+=b;this.ymin+=a;this.xmax+=b;this.ymax+=a;null!=c&&(this.zmin+=c,this.zmax+=c);return this},shiftCentralMeridian:function(){return this._normalize(!0)},toJSON:function(){var b=this.spatialReference,b={xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax,spatialReference:b&&b.toJSON()};this.hasZ&&(b.zmin=this.zmin,b.zmax=this.zmax);this.hasM&&(b.mmax=this.mmax,b.mmin=this.mmin);
return b},union:function(b){function a(b,a,c){return null==a?c:null==c?a:b(a,c)}this.xmin=Math.min(this.xmin,b.xmin);this.ymin=Math.min(this.ymin,b.ymin);this.xmax=Math.max(this.xmax,b.xmax);this.ymax=Math.max(this.ymax,b.ymax);if(this.hasZ||b.hasZ)this.zmin=a(Math.min,this.zmin,b.zmin),this.zmax=a(Math.max,this.zmax,b.zmax);if(this.hasM||b.hasM)this.mmin=a(Math.min,this.mmin,b.mmin),this.mmax=a(Math.max,this.mmax,b.mmax);return this},intersection:function(b){function a(b,a,c){return null==a?c:null==
c?a:b(a,c)}if(!this._intersectsExtent(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||b.hasZ)this.zmin=a(Math.max,this.zmin,b.zmin),this.zmax=a(Math.min,this.zmax,b.zmax);if(this.hasM||b.hasM)this.mmin=a(Math.max,this.mmin,b.mmin),this.mmax=a(Math.min,this.mmax,b.mmax);return this},_containsExtent:function(b){var a=b.xmin,c=b.ymin,e=b.zmin,g=b.xmax,l=b.ymax,r=b.zmax;b=b.spatialReference;
return null!=e&&this.hasZ?this.contains(new f(a,c,e,b))&&this.contains(new f(a,l,e,b))&&this.contains(new f(g,l,e,b))&&this.contains(new f(g,c,e,b))&&this.contains(new f(a,c,r,b))&&this.contains(new f(a,l,r,b))&&this.contains(new f(g,l,r,b))&&this.contains(new f(g,c,r,b)):this.contains(new f(a,c,b))&&this.contains(new f(a,l,b))&&this.contains(new f(g,l,b))&&this.contains(new f(g,c,b))},_intersectsMultipoint:function(b){var a=b.points.length,c;for(c=0;c<a;c++)if(this.contains(b.getPoint(c)))return!0;
return!1},_intersectsExtent:function(b){var a,c;c=this.hasZ&&b.hasZ;if(this.xmin<=b.xmin){if(a=b.xmin,this.xmax<a)return!1}else if(a=this.xmin,b.xmax<a)return!1;if(this.ymin<=b.ymin){if(a=b.ymin,this.ymax<a)return!1}else if(a=this.ymin,b.ymax<a)return!1;if(c&&b.hasZ)if(this.zmin<=b.zmin){if(c=b.zmin,this.zmax<c)return!1}else if(c=this.zmin,b.zmax<c)return!1;return!0},_intersectsPolygon:function(b){var a=[this.xmin,this.ymax],c=[this.xmax,this.ymax],e=[this.xmin,this.ymin],g=[this.xmax,this.ymin],
l=[a,c,e,g],a=[[e,a],[a,c],[c,g],[g,e]],e=b.rings,g=e.length,r,n=new f(0,0,this.spatialReference);r=l.length;for(c=0;c<r;c++)if(n.x=l[c][0],n.y=l[c][1],b.contains(n))return!0;for(var n={x:0,y:0,spatialReference:b.spatialReference,type:"point"},w,d,c=0;c<g;c++)if(l=e[c],r=l.length){w=l[0];n.x=w[0];n.y=w[1];if(this.contains(n))return!0;for(b=1;b<r;b++){d=l[b];n.x=d[0];n.y=d[1];if(this.contains(n)||this._intersectsLine([w,d],a))return!0;w=d}}return!1},_intersectsPolyline:function(b){var a=[[[this.xmin,
this.ymin],[this.xmin,this.ymax]],[[this.xmin,this.ymax],[this.xmax,this.ymax]],[[this.xmax,this.ymax],[this.xmax,this.ymin]],[[this.xmax,this.ymin],[this.xmin,this.ymin]]],c,e=b.paths,g=e.length,f,r,n,l,d={x:0,y:0,spatialReference:b.spatialReference,type:"point"};for(b=0;b<g;b++)if(f=e[b],r=f.length){n=f[0];d.x=n[0];d.y=n[1];if(this.contains(d))return!0;for(c=1;c<r;c++){l=f[c];d.x=l[0];d.y=l[1];if(this.contains(d)||this._intersectsLine([n,l],a))return!0;n=l}}return!1},_intersectsLine:function(b,
a){var c=l._getLineIntersection2,e,g=a.length;for(e=0;e<g;e++)if(c(b,a[e]))return!0;return!1},_shiftCM:function(b){var a=this.spatialReference;if(b=b||g.getInfo(a)){var c=this._getCM(b);if(c){var f=a.isWebMercator?e.webMercatorToGeographic(c):c;this.xmin-=c.x;this.xmax-=c.x;a.isWebMercator||(f.x=this._normalizeX(f.x,b).x);this.spatialReference=new p(h.substitute({Central_Meridian:f.x},4326===a.wkid?b.altTemplate:b.wkTemplate))}}return this},_getCM:function(b){var a,c=b.valid[0];b=b.valid[1];var e=
this.xmin,g=this.xmax;e>=c&&e<=b&&g>=c&&g<=b||(a=this.center);return a},_normalize:function(b,a,c){var e=this.spatialReference;if(e&&(c=c||g.getInfo(e))){var f=this._getParts(c).map(function(b){return b.extent});if(2<f.length)return b?this._shiftCM(c):this.set({xmin:c.valid[0],xmax:c.valid[1]});if(2===f.length){if(b)return this._shiftCM(c);if(a)return f;var q=!0,r=!0;f.map(function(b){b.hasZ||(q=!1);b.hasM||(r=!1)});return{rings:f.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(q)for(var d=(b.zmax-b.zmin)/2,k=0;k<a.length;k++)a[k].push(d);if(r)for(b=(b.mmax-b.mmin)/2,k=0;k<a.length;k++)a[k].push(b);return a}),hasZ:q,hasM:r,spatialReference:e}}return f[0]||this}return this},_getParts:function(b){var a=this.cache._parts;if(!a){var a=[],e=this.xmin,f=this.xmax,l=this.ymin,u=this.ymax,r=this.spatialReference,n=this.width,w=e,d=f,k=0,v=0,m,h;b=b||g.getInfo(r);m=b.valid[0];h=b.valid[1];v=this._normalizeX(e,b);e=v.x;k=v.frameId;v=this._normalizeX(f,
b);f=v.x;v=v.frameId;b=e===f&&0<n;if(n>2*h){n=new c(w<d?e:f,l,h,u,r);e=new c(m,l,w<d?f:e,u,r);h=new c(0,l,h,u,r);l=new c(m,l,0,u,r);r=[];m=[];n.contains(h)&&r.push(k);n.contains(l)&&m.push(k);e.contains(h)&&r.push(v);e.contains(l)&&m.push(v);for(u=k+1;u<v;u++)r.push(u),m.push(u);a.push({extent:n,frameIds:[k]},{extent:e,frameIds:[v]},{extent:h,frameIds:r},{extent:l,frameIds:m})}else e>f||b?a.push({extent:new c(e,l,h,u,r),frameIds:[k]},{extent:new c(m,l,f,u,r),frameIds:[v]}):a.push({extent:new c(e,
l,f,u,r),frameIds:[k]});this.cache._parts=a}v=this.hasZ;l=this.hasM;if(v||l)for(k={},v&&(k.zmin=this.zmin,k.zmax=this.zmax),l&&(k.mmin=this.mmin,k.mmax=this.mmax),v=0;v<a.length;v++)a[v].extent.set(k);return a},_normalizeX:function(b,a){var c=0,e=a.valid[0],g=a.valid[1];a=2*g;b>g?(c=Math.ceil(Math.abs(b-g)/a),b-=c*a):b<e&&(c=Math.ceil(Math.abs(b-e)/a),b+=c*a,c=-c);return{x:b,frameId:c}}});return c})},"esri/geometry/Geometry":function(){define(["../core/JSONSupport","./SpatialReference"],function(a,
h){return a.createSubclass({declaredClass:"esri.geometry.Geometry",type:null,properties:{cache:{value:null,readOnly:!0,dependsOn:["spatialReference"],get:function(){return{}}},extent:{value:null,readOnly:!0,dependsOn:["spatialReference"]},hasM:!1,hasZ:!1,spatialReference:h.WGS84},isSR:function(a){return a&&("esri.SpatialReference"===a.declaredClass||null!=a.wkid)},clone:function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null},toJSON:function(){console.warn(".toJSON() is not implemented for "+
this.declaredClass);return null},clearCache:function(){this.notifyChange("cache")},getCacheValue:function(a){return this.cache[a]},setCacheValue:function(a,m){this.cache[a]=m}})})},"esri/geometry/Point":function(){define(["./SpatialReference","./Geometry","./support/webMercatorUtils","./support/spatialReferenceUtils"],function(a,h,p,m){var f=[0,0],e=p.lngLatToXY,l=p.xyToLngLat,g=h.createSubclass({declaredClass:"esri.geometry.Point",normalizeCtorArgs:function(c,b,g,l,m){var q;Array.isArray(c)?(q=c,
m=b,c=q[0],b=q[1],g=q[2],l=q[3]):c&&"object"===typeof c?(q=c,c=null!=q.x?q.x:q.longitude,b=null!=q.y?q.y:q.latitude,g=null!=q.z?q.z:q.altitude,l=q.m,(m=q.spatialReference)&&"esri.SpatialReference"!==m.declaredClass&&(m=new a(m)),!q.declaredClass&&m&&m.isWebMercator&&null!=q.longitude&&null!=q.latitude&&(b=e(q.longitude,q.latitude,!1,f),c=b[0],b=b[1])):this.isSR(g)?(m=g,g=null):this.isSR(l)&&(m=l,l=null);c={x:c,y:b};null!=m&&(c.spatialReference=m);null!=g&&(c.z=g);null!=l&&(c.m=l);return c},properties:{cache:{dependsOn:["x",
"y","z","m"]},hasM:{dependsOn:["m"],get:function(){return void 0!==this.m},set:function(a){var b=this._get("hasM");a!==b&&(this._set("m",a?0:void 0),this._set("hasM",a))}},hasZ:{dependsOn:["z"],get:function(){return void 0!==this.z},set:function(a){var b=this._get("hasZ");a!==b&&(this._set("z",a?0:void 0),this._set("hasZ",a))}},latitude:{dependsOn:["y"],get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return l(this.x,this.y,!1,f)[1];if(4326===a.wkid)return this._get("y")}return null},
set:function(a){var b=this._get("spatialReference");b&&(b.isWebMercator?this._set("y",e(this.x,a,!1,f)[1]):4326===b.wkid&&this._set("y",a),this._set("latitude",a))}},longitude:{dependsOn:["x"],get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return l(this._get("x"),this._get("y"),!1,f)[0];if(4326===a.wkid)return this._get("x")}return null},set:function(a){var b=this._get("spatialReference");b&&(b.isWebMercator?this._set("x",e(a,this._get("y"),!1,f)[0]):4326===b.wkid&&this._set("x",
a),this._set("longitude",a))}},x:0,y:0,z:void 0,m:void 0,type:"point"},clone:function(){var a=new g;a.x=this.x;a.y=this.y;a.z=this.z;a.m=this.m;a.spatialReference=this.spatialReference;return a},copy:function(a){g.copy(a,this);return this},equals:function(a){if(!a)return!1;var b=this.x,c=this.y,g=this.z,f=this.m,t=this.spatialReference,u=a.x,r=a.y,n=a.z,w=a.m;a=a.spatialReference;if(!t.equals(a))if(t.isWebMercator&&4326===a.wkid)r=e(u,r),u=r[0],r=r[1],a=t;else if(4326===t.wkid&&a.isWebMercator)r=
l(u,r),u=r[0],r=r[1],a=t;else return!1;return b===u&&c===r&&g===n&&f===w&&t.wkid===a.wkid},offset:function(a,b,e){this.x+=a;this.y+=b;null!=e&&this.hasZ&&(this.z+=e);return this},normalize:function(){var a=this.x,b=this.spatialReference;if(b){var e=m.getInfo(b);if(e){var b=e.valid[0],g=e.valid[1],e=2*g;a>g?(b=Math.ceil(Math.abs(a-g)/e),a-=b*e):a<b&&(b=Math.ceil(Math.abs(a-b)/e),a+=b*e)}}this._set("x",a);return this},distance:function(a){return g.distance(this,a)},toArray:function(){var a=this.hasZ,
b=this.hasM;return a&&b?[this.x,this.y,this.z,this.m]:a?[this.x,this.y,this.z]:b?[this.x,this.y,this.m]:[this.x,this.y]},toJSON:function(){var a=this.spatialReference,b={x:this.x,y:this.y};this.hasZ&&(b.z=this.z);this.hasM&&(b.m=this.m);b.spatialReference=a&&a.toJSON();return b}});g.lngLatToXY=e;g.xyToLngLat=l;g.copy=function(a,b){b.x=a.x;b.y=a.y;b.z=a.z;b.m=a.m;b.spatialReference=Object.isFrozen(a.spatialReference)?a.spatialReference:a.spatialReference.clone()};g.distance=function(a,b){var c=a.x-
b.x,e=a.y-b.y;a=a.hasZ&&b.hasZ?a.z-b.z:0;return Math.sqrt(c*c+e*e+a*a)};return g})},"esri/geometry/support/webMercatorUtils":function(){define(["require","exports","../SpatialReference"],function(a,h,p){function m(a,b,e,f,l){if("point"===a.type)b=b(a.x,a.y,f,g),l.x=b[0],l.y=b[1];else if("extent"===a.type)d=b(a.xmin,a.ymin,f,g),l.xmin=d[0],l.ymin=d[1],b=b(a.xmax,a.ymax,f,g),l.xmax=b[0],l.ymax=b[1];else if("polyline"===a.type||"polygon"===a.type){var c=(d="polyline"===a.type)?a.paths:a.rings,q=[],r=
void 0;for(a=0;a<c.length;a++){var n=c[a],r=[];q.push(r);for(var w=0;w<n.length;w++)r.push(b(n[w][0],n[w][1],f)),2<n[w].length&&r[w].push(n[w][2]),3<n[w].length&&r[w].push(n[w][3])}d?l.paths=q:l.rings=q}else if("multipoint"===a.type){d=a.points;c=[];for(a=0;a<d.length;a++)c[a]=b(d[a][0],d[a][1],f),2<d[a].length&&c[a].push(d[a][2]),3<d[a].length&&c[a].push(d[a][3]);l.points=c}l.spatialReference=e;return l;var d}function f(a,b){a=a&&(null!=a.wkid?a:a.spatialReference);b=b&&(null!=b.wkid?b:b.spatialReference);
return a&&b?b.equals(a)?!0:b.isWebMercator&&4326===a.wkid||a.isWebMercator&&4326===b.wkid:!1}function e(a,b,e,g){void 0===g&&(g=[0,0]);89.99999<b?b=89.99999:-89.99999>b&&(b=-89.99999);b*=.017453292519943;g[0]=111319.49079327169*a;g[1]=3189068.5*Math.log((1+Math.sin(b))/(1-Math.sin(b)));return g}function l(a,b,e,g){void 0===e&&(e=!1);void 0===g&&(g=[0,0]);a=a/6378137*57.29577951308232;g[0]=e?a:a-360*Math.floor((a+180)/360);g[1]=57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*b/6378137)));
return g}var g=[0,0];h.canProject=f;h.project=function(a,b){var c=a&&a.spatialReference;b=b&&(null!=b.wkid?b:b.spatialReference);return f(c,b)?c.equals(b)?a.clone():b.isWebMercator?m(a,e,p.WebMercator,!1,a.clone()):4326===b.wkid?m(a,l,p.WGS84,!1,a.clone()):null:null};h.lngLatToXY=e;h.xyToLngLat=l;h.geographicToWebMercator=function(a,b,g){void 0===b&&(b=!1);void 0===g&&(g=a.clone());return m(a,e,p.WebMercator,b,g)};h.webMercatorToGeographic=function(a,b,e){void 0===b&&(b=!1);void 0===e&&(e=a.clone());
return m(a,l,p.WGS84,b,e)}})},"esri/geometry/support/mathUtils":function(){define(["../Point"],function(a){function h(e,f){var g,c,b;e instanceof a?(g=f.x-e.x,c=f.y-e.y,b=0,null!=e.z&&null!=f.z&&(b=e.z-f.z)):(g=f[0]-e[0],c=f[1]-e[1],b=0,null!=e[2]&&null!=f[2]&&(b=e[2]-f[2]));return Math.sqrt(g*g+c*c+b*b)}function p(e,f,g){var c,b,q;if(e instanceof a)return c=e.x+g*(f.x-e.x),b=e.y+g*(f.y-e.y),null!=e.z&&null!=f.z&&(q=e.z+g*(f.z-e.z)),new a(c,b,q);c=e[0]+g*(f[0]-e[0]);b=e[1]+g*(f[1]-e[1]);return 2<
e.length&&2<f.length?[c,b,e[2]+g*(f[2]-e[2])]:[c,b]}function m(a,f){return 1E-8>Math.abs(a-f)}function f(a,f,g,c){var b,e=m(a[0],f[0])?1E10:(a[1]-f[1])/(a[0]-f[0]),l=m(g[0],c[0])?1E10:(g[1]-c[1])/(g[0]-c[0]),h=a[1]-e*a[0],t=g[1]-l*g[0];if(m(e,l)){if(m(h,t)){if(m(a[0],f[0]))if(Math.min(a[1],f[1])<Math.max(g[1],c[1])||Math.max(a[1],f[1])>Math.min(g[1],c[1]))a=(a[1]+f[1]+g[1]+c[1]-Math.min(a[1],f[1],g[1],c[1])-Math.max(a[1],f[1],g[1],c[1]))/2,b=(a-h)/e;else return null;else if(Math.min(a[0],f[0])<Math.max(g[0],
c[0])||Math.max(a[0],f[0])>Math.min(g[0],c[0]))b=(a[0]+f[0]+g[0]+c[0]-Math.min(a[0],f[0],g[0],c[0])-Math.max(a[0],f[0],g[0],c[0]))/2,a=e*b+h;else return null;return[b,a]}return null}m(e,1E10)?(b=a[0],a=l*b+t):m(l,1E10)?(b=g[0],a=e*b+h):(b=-(h-t)/(e-l),a=a[1]===f[1]?a[1]:g[1]===c[1]?g[1]:e*b+h);return[b,a]}return{getLength:h,_getLength:function(a,f){var e=f[0]-a[0];a=f[1]-a[1];return Math.sqrt(e*e+a*a)},getPointOnLine:p,getMidpoint:function(a,f){return p(a,f,.5)},_equals:m,_getLineIntersection:f,getLineIntersection:function(e,
l,g,c,b){(e=f([e.x,e.y],[l.x,l.y],[g.x,g.y],[c.x,c.y]))&&(e=new a(e[0],e[1],b));return e},_getLineIntersection2:function(a,f){var e=a[0],c=a[1],b=f[0],q=f[1];f=e[0];e=e[1];a=c[0];var c=c[1],l=b[0],m=b[1],b=q[0]-l,l=f-l,t=a-f,q=q[1]-m,m=e-m,u=c-e,r=q*t-b*u;if(0===r)return!1;b=(b*m-q*l)/r;l=(t*m-u*l)/r;return 0<=b&&1>=b&&0<=l&&1>=l?[f+b*(a-f),e+b*(c-e)]:!1},_pointLineDistance:function(a,f){var e=f[0],c=f[1];f=e[0];var b=e[1],e=a[0];a=a[1];var q=c[0]-f,l=c[1]-b,m=e-f,t=a-b,c=Math.sqrt,u=Math.pow,r=c(u(q,
2)+u(l,2)),m=(m*q+t*l)/(r*r),b=b+m*l;return c(u(e-(f+m*q),2)+u(a-b,2))},getPathLength:function(a){for(var e=0,g=a.length,c=0;c<g-1;++c)e+=h(a[c],a[c+1]);return e},getPointOnPath:function(a,f){if(0>=f)return a[0];for(var e=0,c=a.length,b=0;b<c-1;++b){var q=h(a[b],a[b+1]);if(f-e<q)return p(a[b],a[b+1],(f-e)/q);e+=q}return a[c-1]}}})},"esri/support/basemapUtils":function(){define("require exports ./basemapDefinitions ../core/accessorSupport/ensureType ../core/urlUtils ../core/Logger ../Basemap".split(" "),
function(a,h,p,m,f,e,l){function g(d,b){var k;if("string"===typeof d){if(!(d in p))return b=Object.keys(p).map(function(d){return'"'+d+'"'}).join(", "),w.warn("Unable to find basemap definition for: "+d+". Try one of these: "+b),null;b&&(k=b[d]);k||(k=l.fromId(d),b&&(b[d]=k))}else k=m.default(l,d);return k}function c(d,b){return d.map(function(d){return b.find(function(b){var k=x(d);b=x(b);return k.type===b.type&&k.url===b.url})||d})}function b(d){return d?!d.loaded&&d.resourceInfo?y(d.resourceInfo):
{baseLayers:q(d.baseLayers),referenceLayers:q(d.referenceLayers)}:null}function q(d){return(Array.isArray(d)?d:d.toArray()).map(x)}function x(d){return{type:d.type,url:n(d.urlTemplate||d.url||d.styleUrl)}}function y(d){return d?{baseLayers:t(d.baseMapLayers.filter(function(d){return!d.isReference})),referenceLayers:t(d.baseMapLayers.filter(function(d){return d.isReference}))}:null}function t(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:n(d.templateUrl||d.urlTemplate||d.styleUrl||d.url)}})}function u(d,b,a){return null!=d!==(null!=b)?"not-equal":d?r(d.baseLayers,b.baseLayers)?r(d.referenceLayers,b.referenceLayers)?"equal":a.mustMatchReferences?"not-equal":"base-layers-equal":"not-equal":"equal"}function r(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 n(d){return d?f.normalize(d).replace(/^\s*https?:/i,
"").toLowerCase():""}var w=e.getLogger("esri.Basemap");h.createCache=function(){return{}};h.ensureType=g;h.clonePreservingTiledLayers=function(d,b){void 0===b&&(b=null);d=g(d);if(!d)return null;d=new l({id:d.id,title:d.title,baseLayers:d.baseLayers.slice(),referenceLayers:d.referenceLayers.slice()});b&&(d.baseLayers=c(d.baseLayers,b.baseLayers),d.referenceLayers=c(d.referenceLayers,b.referenceLayers));return d};h.wellKnownBasemapId=function(d){var a=null;d=b(d);for(var c in p){var e=y(p[c]),e=u(d,
e,{mustMatchReferences:!1});if("equal"===e){a=c;break}else"base-layers-equal"===e&&(a=c)}return a};h.contentEquals=function(d,a){if(d===a)return!0;d=b(d);a=b(a);return"equal"===u(d,a,{mustMatchReferences:!0})}})},"esri/support/basemapDefinitions":function(){define(["require","exports","dojo/i18n!../nls/basemaps"],function(a,h,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",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",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"),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",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",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",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",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",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"),baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/850db44b9eb845d3bd42b19e8aa7a024/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/0e02e6f86d02455091796eaae811d9b5/resources/styles/root.json",layerType:"VectorTileLayer",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/4e1133c28ac04cca97693cf336cd49ad/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",styleUrl:"//www.arcgis.com/sharing/rest/content/items/6f65bc1351b7411588a8cb43fe23dad7/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/bf79e422e9454565ae0cbe9553cf6471/resources/styles/root.json",layerType:"VectorTileLayer",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",styleUrl:"//www.arcgis.com/sharing/rest/content/items/2e063e709e3446459f8538ed6743f879/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/dcbbba0edf094eaa81af19298b9c6247/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/Basemap":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./support/basemapDefinitions ./core/Collection ./core/collectionUtils ./core/Evented ./core/JSONSupport ./core/Loadable ./core/promiseUtils ./core/requireUtils ./core/urlUtils ./core/Logger ./portal/Portal ./portal/PortalItem ./layers/Layer".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d){var k=0,v=g.ofType(d),A=r.getLogger("esri.Basemap");h=z=function(d){function b(b){b=d.call(this)||this;b.id=null;b.portalItem=null;b.resourceInfo=null;b.thumbnailUrl=null;b.title="Basemap";b.id=Date.now().toString(16)+"-basemap-"+k++;b.baseLayers=new g;b.referenceLayers=new g;var a=function(d){"elevation"===d.type&&A.error("Layer '"+d.title+", id:"+d.id+"' of type '"+d.type+"' is not supported as a basemap layer and will therefore be ignored.")};b.baseLayers.on("after-add",
function(d){return a(d.item)});b.referenceLayers.on("after-add",function(d){return a(d.item)});return b}p(b,d);b.prototype.initialize=function(){var d=this;this.otherwise(function(b){A.error("#load()","Failed to load basemap (title: '"+d.title+"', id: '"+d.id+"')",b)});this.resourceInfo&&this.read(this.resourceInfo)};Object.defineProperty(b.prototype,"baseLayers",{set:function(d){this._set("baseLayers",c.referenceSetter(d,this._get("baseLayers"),v))},enumerable:!0,configurable:!0});b.prototype.writeBaseLayers=
function(d,b,a,k){var c=[];if(!d)return c;k=e.mixin({},k,{layerContainerType:"basemap"});this.baseLayers.forEach(function(d){if(d.write){var b={};d.write(b,k)&&c.push(b)}});this.referenceLayers.forEach(function(d){if(d.write){var b={isReference:!0};d.write(b,k)&&c.push(b)}});b.baseMapLayers=c};Object.defineProperty(b.prototype,"referenceLayers",{set:function(d){this._set("referenceLayers",c.referenceSetter(d,this._get("referenceLayers"),v))},enumerable:!0,configurable:!0});b.prototype.writeTitle=
function(d,b){b.title=d||"Basemap"};b.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this};b.prototype.clone=function(){var d={id:this.id,title:this.title};this.resourceInfo||this.portalItem?(d.portalItem=this.portalItem,d.resourceInfo=this.resourceInfo):(d.baseLayers=this.baseLayers.slice(),d.referenceLayers=this.referenceLayers.slice());return new z(d)};b.prototype.read=function(d,b){!b||"web-scene"!==b.origin&&"web-map"!==b.origin||(this._layerOrigin=b.origin);
b&&b.portal&&(this._layerPortal=b.portal);return this.inherited(arguments)};b.prototype.write=function(d,b){d=d||{};this.inherited(arguments,[d,b]);!this.loaded&&this.resourceInfo&&this.resourceInfo.baseMapLayers&&(d.baseMapLayers=this.resourceInfo.baseMapLayers.map(function(d){d=e.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};b.prototype.toJSON=function(){return this.write(null,
{origin:"web-map"})};b.prototype._loadFromSource=function(){var d=this.resourceInfo,b=this.portalItem;return d?this._loadFromJSON(d):b?this._loadFromItem(b):y.resolve(null)};b.prototype._loadFromJSON=function(d,b){var k=this,c=this.portalItem&&this.portalItem.portal||this._layerPortal||null;return t.when(a,"./portal/support/layersCreator").then(function(a){var e=[];if(d.baseMapLayers&&Array.isArray(d.baseMapLayers)){var n={context:{origin:k._layerOrigin||"web-map",layerContainerType:"basemap",url:b,
portal:c},defaultLayerType:"DefaultTileLayer"},g=a.populateOperationalLayers(k.baseLayers,d.baseMapLayers.filter(function(d){return!d.isReference}),n);e.push.apply(e,g);a=a.populateOperationalLayers(k.referenceLayers,d.baseMapLayers.filter(function(d){return d.isReference}),n);e.push.apply(e,a)}return y.eachAlways(e)}).then(function(){})};b.prototype._loadFromItem=function(d){var b=this;return d.load().then(function(d){return d.fetchData()}).then(function(a){var k=u.urlToObject(d.itemUrl);b.resourceInfo=
a.baseMap;b.read(b.resourceInfo,{origin:"web-map",portal:d.portal||n.getDefault(),url:k});b.read({title:d.title,thumbnailUrl:d.thumbnailUrl},{origin:"portal-item",portal:d.portal||n.getDefault(),url:k});return b._loadFromJSON(b.resourceInfo,k)})};b.fromJSON=function(d){return d?new z({resourceInfo:d}):null};b.fromId=function(d){return(d=l[d])?z.fromJSON(d):null};return b}(f.declared(q,b,x));m([f.property({type:v,json:{write:{ignoreOrigin:!0}}}),f.cast(c.castForReferenceSetter)],h.prototype,"baseLayers",
null);m([f.writer("baseLayers")],h.prototype,"writeBaseLayers",null);m([f.property({json:{origins:{webScene:{write:!0}}}})],h.prototype,"id",void 0);m([f.property({type:w})],h.prototype,"portalItem",void 0);m([f.property({type:v}),f.cast(c.castForReferenceSetter)],h.prototype,"referenceLayers",null);m([f.property()],h.prototype,"resourceInfo",void 0);m([f.property()],h.prototype,"thumbnailUrl",void 0);m([f.property()],h.prototype,"title",void 0);m([f.writer("title")],h.prototype,"writeTitle",null);
h=z=m([f.subclass("esri.Basemap")],h);var z;return h})},"esri/portal/Portal":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../config ../identity/IdentityManager ../request ../geometry/Extent ../core/JSONSupport ../core/Loadable ./PortalQueryParams ./PortalQueryResult ./PortalUser ../core/promiseUtils ../core/requireUtils dojo/promise/all dojo/_base/kernel dojo/_base/lang".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v){var A;h=z=function(e){function f(d){d=e.call(this)||this;d.access=null;d.allSSL=!1;d.authMode=z.AUTH_MODE_AUTO;d.authorizedCrossOriginDomains=null;d.bingKey=null;d.canListApps=!1;d.canListData=!1;d.canListPreProvisionedItems=!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.description=null;d.featuredGroups=null;d.featuredItemsGroupQuery=null;d.galleryTemplatesGroupQuery=null;d.livingAtlasGroupQuery=null;d.homePageFeaturedContent=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=!1;return d}p(f,e);f.prototype.normalizeCtorArgs=function(d){return"string"===typeof d?{url:d}:d};f.prototype.initialize=function(){var d=this;this._esriId_credentialCreateHandle=c.on("credential-create",function(){d.loaded&&!d.credential&&d.authMode===z.AUTH_MODE_AUTO&&(d.credential=c.findCredential(d.restUrl),
d.credential&&d._fetchSelf().then(function(b){d.read(b)}))})};f.prototype.destroy=function(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};f.prototype.readDefaultBasemap=function(d){return d?(d=A.fromJSON(d),d.portalItem={portal:this},d):null};Object.defineProperty(f.prototype,"extraQuery",{get:function(){return this.id&&!this.canSearchPublic?" AND orgid:"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,
"isOrganization",{get:function(){return!!this.access},enumerable:!0,configurable:!0});Object.defineProperty(f.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(f.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});
f.prototype.readUser=function(d){var b=null;d&&(b=r.fromJSON(d),b.portal=this);return b};f.prototype.load=function(){var d=this,b=n.resolve().then(function(){return d.authMode===z.AUTH_MODE_IMMEDIATE?c.getCredential(d.restUrl):d.authMode===z.AUTH_MODE_AUTO?c.checkSignInStatus(d.restUrl).otherwise(function(){return null}):null}).then(function(b){d.credential=b;return w.when(a,"../Basemap")}).then(function(d){A=d}).then(function(){return d._fetchSelf()}).then(function(b){d.read(b)});this.addResolvingPromise(b);
return this};f.prototype.fetchBasemaps=function(){var d=new t;d.query=this.basemapGalleryGroupQuery;d.disableExtraQuery=!0;return this.queryGroups(d).then(function(b){d.num=100;d.query='type:"Web Map" -type:"Web Application"';return b.total?(b=b.results[0],d.sortField=b.sortField||"name",d.sortOrder=b.sortOrder||"desc",b.queryItems(d)):null}).then(function(d){return d&&d.total?d.results.filter(function(d){return"Web Map"===d.type}).map(function(d){return new A({portalItem:d})}):[]})};f.prototype.fetchFeaturedGroups=
function(){var d=this.featuredGroups,b=new t;b.num=100;b.sortField="title";if(d&&d.length){for(var a=[],k=0;k<d.length;k++){var c=d[k];a.push('(title:"'+c.title+'" AND owner:'+c.owner+")")}b.query=a.join(" OR ");return this.queryGroups(b).then(function(d){return d.results})}return n.resolve([])};f.getDefault=function(){z._default||(z._default=new z);return z._default};f.prototype.queryGroups=function(d){return this._queryPortal("/community/groups",d,"PortalGroup")};f.prototype.queryItems=function(d){return this._queryPortal("/search",
d,"PortalItem")};f.prototype.queryUsers=function(d){d.sortField||(d.sortField="username");return this._queryPortal("/community/users",d,"PortalUser")};f.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","Portal.toJSON is not yet implemented");};f.prototype._fetchSelf=function(){return this._request(this.restUrl+"/portals/self",{query:{culture:k.locale}})};f.prototype._queryPortal=function(b,k,c){var e=this,n=function(a){return e._request(e.restUrl+b,k.toRequestOptions(e)).then(function(d){var b=
k.clone();b.start=d.nextStart;return new u({nextQueryParams:b,queryParams:k,total:d.total,results:z._resultsToTypedArray(a,{portal:e},d)})}).then(function(b){return d(b.results).always(function(){return b})})};return c?w.when(a,"./"+c).then(function(d){return n(d)}):n()};f.prototype._normalizeSSL=function(d){var b=this.allSSL||window&&"https:"===window.location.protocol;if(this.isPortal){var a=z._getLocation(d);if(-1<this.portalHostname.toLowerCase().indexOf(a.hostname.toLowerCase())&&a.port&&"80"!==
a.port&&"443"!==a.port)return d=a.pathname,0!==d.indexOf("/")&&(d="/"+d),b?"https://"+a.hostname+(this.httpsPort&&443!==this.httpsPort?":"+this.httpsPort:"")+d+a.search:"http://"+a.hostname+(this.httpPort&&80!==this.httpPort?":"+this.httpPort:"")+d+a.search}return b?d.replace("http:","https:"):d};f.prototype._normalizeUrl=function(d){var b=this.credential&&this.credential.token;return this._normalizeSSL(b?d+(-1<d.indexOf("?")?"\x26":"?")+"token\x3d"+b:d)};f.prototype._requestToTypedArray=function(b,
k,c){var e=this,n=function(a){return e._request(b,k).then(function(b){var k=z._resultsToTypedArray(a,{portal:e},b);return d(k).always(function(){return k})})};return c?w.when(a,"./"+c).then(function(d){return n(d)}):n()};f.prototype._request=function(d,a){var k={f:"json"},c={disableIdentityLookup:this.authMode===z.AUTH_MODE_ANONYMOUS},e;a&&(v.mixin(k,a.query),e=a.responseType,c.method=a.method);return b(this._normalizeSSL(d),v.mixin({callbackParamName:"callback",query:k,responseType:e,timeout:0},
c)).then(function(d){return d.data})};f._getLocation=function(d){var b=document.createElement("a");b.href=d;return{protocol:b.protocol,hostname:b.hostname,port:b.port,pathname:b.pathname,search:b.search,hash:b.hash,host:b.host}};f._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=v.mixin(d?d.fromJSON(a):a,b);"function"===typeof a.load&&a.load();
return a})}else a=[];return a};return f}(e.declared(x,y));h.AUTH_MODE_ANONYMOUS="anonymous";h.AUTH_MODE_AUTO="auto";h.AUTH_MODE_IMMEDIATE="immediate";m([e.property()],h.prototype,"access",void 0);m([e.property()],h.prototype,"allSSL",void 0);m([e.property()],h.prototype,"authMode",void 0);m([e.property()],h.prototype,"authorizedCrossOriginDomains",void 0);m([e.property()],h.prototype,"basemapGalleryGroupQuery",void 0);m([e.property()],h.prototype,"bingKey",void 0);m([e.property()],h.prototype,"canListApps",
void 0);m([e.property()],h.prototype,"canListData",void 0);m([e.property()],h.prototype,"canListPreProvisionedItems",void 0);m([e.property()],h.prototype,"canProvisionDirectPurchase",void 0);m([e.property()],h.prototype,"canSearchPublic",void 0);m([e.property()],h.prototype,"canShareBingPublic",void 0);m([e.property()],h.prototype,"canSharePublic",void 0);m([e.property()],h.prototype,"canSignInArcGIS",void 0);m([e.property()],h.prototype,"canSignInIDP",void 0);m([e.property()],h.prototype,"colorSetsGroupQuery",
void 0);m([e.property()],h.prototype,"commentsEnabled",void 0);m([e.property({type:Date})],h.prototype,"created",void 0);m([e.property()],h.prototype,"credential",void 0);m([e.property()],h.prototype,"culture",void 0);m([e.property()],h.prototype,"customBaseUrl",void 0);m([e.property()],h.prototype,"defaultBasemap",void 0);m([e.reader("defaultBasemap")],h.prototype,"readDefaultBasemap",null);m([e.property({type:q})],h.prototype,"defaultExtent",void 0);m([e.property()],h.prototype,"description",void 0);
m([e.property({dependsOn:["id","canSearchPublic"],readOnly:!0})],h.prototype,"extraQuery",null);m([e.property()],h.prototype,"featuredGroups",void 0);m([e.property()],h.prototype,"featuredItemsGroupQuery",void 0);m([e.property()],h.prototype,"galleryTemplatesGroupQuery",void 0);m([e.property()],h.prototype,"livingAtlasGroupQuery",void 0);m([e.property()],h.prototype,"helpBase",void 0);m([e.property()],h.prototype,"helperServices",void 0);m([e.property()],h.prototype,"helpMap",void 0);m([e.property()],
h.prototype,"homePageFeaturedContent",void 0);m([e.property()],h.prototype,"homePageFeaturedContentCount",void 0);m([e.property()],h.prototype,"httpPort",void 0);m([e.property()],h.prototype,"httpsPort",void 0);m([e.property()],h.prototype,"id",void 0);m([e.property()],h.prototype,"ipCntryCode",void 0);m([e.property({dependsOn:["access"],readOnly:!0})],h.prototype,"isOrganization",null);m([e.property()],h.prototype,"isPortal",void 0);m([e.property()],h.prototype,"layerTemplatesGroupQuery",void 0);
m([e.property()],h.prototype,"maxTokenExpirationMinutes",void 0);m([e.property({type:Date})],h.prototype,"modified",void 0);m([e.property()],h.prototype,"name",void 0);m([e.property()],h.prototype,"portalHostname",void 0);m([e.property()],h.prototype,"portalMode",void 0);m([e.property()],h.prototype,"portalProperties",void 0);m([e.property()],h.prototype,"region",void 0);m([e.property({dependsOn:["url"],readOnly:!0})],h.prototype,"restUrl",null);m([e.property()],h.prototype,"rotatorPanels",void 0);
m([e.property()],h.prototype,"showHomePageDescription",void 0);m([e.property()],h.prototype,"staticImagesUrl",void 0);m([e.property()],h.prototype,"stylesGroupQuery",void 0);m([e.property()],h.prototype,"supportsHostedServices",void 0);m([e.property()],h.prototype,"symbolSetsGroupQuery",void 0);m([e.property()],h.prototype,"templatesGroupQuery",void 0);m([e.property()],h.prototype,"thumbnail",void 0);m([e.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],h.prototype,"thumbnailUrl",null);
m([e.property()],h.prototype,"units",void 0);m([e.property()],h.prototype,"url",void 0);m([e.property()],h.prototype,"urlKey",void 0);m([e.property()],h.prototype,"user",void 0);m([e.reader("user")],h.prototype,"readUser",null);m([e.property()],h.prototype,"useStandardizedQuery",void 0);m([f(1,e.cast(t))],h.prototype,"_queryPortal",null);h=z=m([e.subclass("esri.portal.Portal")],h);var z;return h})},"esri/core/tsSupport/paramHelper":function(){define([],function(){return function(a,h){return function(p,
m){h(p,m,a)}}})},"esri/identity/IdentityManager":function(){define(["./IdentityManagerDialog","../kernel","./OAuthSignInHandler","../core/declare"],function(a,h,p,m){a=new a;h.id=m.safeMixin(a,p);return h.id})},"esri/identity/IdentityManagerDialog":function(){define("dojo/_base/kernel ../core/declare dojo/_base/config dojo/Deferred dojo/_base/lang dojo/dom-attr dojo/keys dijit/registry dijit/Dialog ../kernel ../core/lang ../core/domUtils ./Credential ./IdentityManagerBase dojo/i18n!./nls/identity dojo/query dijit/form/Button dijit/form/Form dijit/form/ValidationTextBox".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u){return h([t],{declaredClass:"esri.identity.IdentityManager",constructor:function(b){f.mixin(this,b)},_dialogContent:"\x3cdiv data-dojo-type\x3d'dijit.form.Form' data-dojo-props\x3d'\"class\":\"esriIdForm\"'\x3e\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{info}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3ctable style\x3d'width: 100%;'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblUser}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"text\", \"class\":\"esriIdUser\", required:true, trim:true, style:\"width: 100%;\", autocapitalize:\"none\", autocorrect:\"off\", spellcheck:false' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel\x3e{lblPwd}\x3c/label\x3e\x3cbr/\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' data-dojo-props\x3d'type:\"password\", \"class\":\"esriIdPwd\", required:true, style:\"width: 100%;\"' /\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e\x3c/div\x3e",
signIn:function(b,a,c){this._nls||(this._nls=u);this._loginDialog||(this._loginDialog=this.dialog=this._createLoginDialog(),this.emit("dialog-create"));var d=this._loginDialog,k=c&&c.error,n=c&&c.token,g=new m(function(){d.onCancel()});if(d.open)return b=Error("BUSY"),b.code="IdentityManager.1",b.log=p.isDebug,g.reject(b),g.promise;x.hide(d.errMsg_);k&&403==k.code&&n&&(e.set(d.errMsg_,"innerHTML",this._nls.forbidden),x.show(d.errMsg_));d.dfd_=g;d.serverInfo_=a;d.resUrl_=b;d.admin_=c&&c.isAdmin;e.set(d.resLink_,
{title:b,innerHTML:"("+(this.getResourceName(b)||this._nls.lblItem)+")"});e.set(d.serverLink_,{title:a.server,innerHTML:(-1!==a.server.toLowerCase().indexOf("arcgis.com")?"ArcGIS Online":a.server)+" "});d.txtPwd_.set("value","");d.show();return g.promise},_createLoginDialog:function(){var f=this._nls,n=q.substitute(f,this._dialogContent),n=q.substitute({resource:"\x3cspan class\x3d'resLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e",server:"\x3cspan class\x3d'serverLink' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e"},
n),t=new c({title:f.title,content:n,"class":" esri-widget esriSignInDialog esriIdentityDialog",style:"width: 18em;",esriIdMgr_:this,onShow:function(){this.domNode.classList.add("esriIdentityDialog--visible")},onHide:function(){this.domNode.classList.remove("esriIdentityDialog--visible")},keypressed_:function(d){d.charOrCode===l.ENTER&&this.execute_()},execute_:function(){var d=this.txtUser_.get("value"),a=this.txtPwd_.get("value"),n=this.dfd_,g=this;if(this.form_.validate()&&d&&a){this.btnSubmit_.set("label",
f.lblSigning);var r=b.id.findCredential(g.resUrl_,d),l=function(b){g.btnSubmit_.set("label",f.lblOk);g.btnSubmit_.set("disabled",!1);x.hide(g.errMsg_);g.hide();c._DialogLevelManager.hide(g);var a=g.serverInfo_;g.dfd_=g.serverInfo_=g.generateDfd_=g.resUrl_=null;var k,e,v=r,l;b&&(k=b.token,e=q.isDefined(b.expires)?Number(b.expires):null,l=!!b.ssl,v?(v.userId=d,v.token=k,v.expires=e,v.validity=b.validity,v.ssl=l,v.creationTime=(new Date).getTime()):v=new y({userId:d,server:a.server,token:k,expires:e,
ssl:l,isAdmin:g.admin_,validity:b.validity}));n.resolve(v)};r&&!r._enqueued?l():(g.btnSubmit_.set("disabled",!0),g.generateDfd_=b.id.generateToken(this.serverInfo_,{username:d,password:a},{isAdmin:this.admin_}).then(l).then(null,function(d){g.btnSubmit_.set("disabled",!1);g.generateDfd_=null;g.btnSubmit_.set("label",f.lblOk);e.set(g.errMsg_,"innerHTML",d&&d.code?f.invalidUser:f.noAuthService);x.show(g.errMsg_)}))}},cancel_:function(){t.generateDfd_&&t.generateDfd_.cancel();var d=t.dfd_,b=t.resUrl_,
a=t.serverInfo_;t.btnSubmit_.set("disabled",!1);t.dfd_=t.serverInfo_=t.generateDfd_=t.resUrl_=null;x.hide(t.errMsg_);c._DialogLevelManager.hide(t);t.esriIdMgr_.emit("dialog-cancel",{resourceUrl:b,serverInfo:a});b=Error("ABORTED");b.code="IdentityManager.2";b.log=p.isDebug;d.reject(b)}}),n=t.domNode;t.form_=g.byNode(a.query(".esriIdForm",n)[0]);t.txtUser_=g.byNode(a.query(".esriIdUser",n)[0]);t.txtPwd_=g.byNode(a.query(".esriIdPwd",n)[0]);t.btnSubmit_=g.byNode(a.query(".esriIdSubmit",n)[0]);t.btnCancel_=
g.byNode(a.query(".esriIdCancel",n)[0]);t.resLink_=a.query(".resLink",n)[0];t.serverLink_=a.query(".serverLink",n)[0];t.errMsg_=a.query(".esriErrorMsg",n)[0];t.connect(t.txtUser_,"onKeyPress",t.keypressed_);t.connect(t.txtPwd_,"onKeyPress",t.keypressed_);t.connect(t.btnSubmit_,"onClick",t.execute_);t.connect(t.btnCancel_,"onClick",t.onCancel);t.connect(t,"onCancel",t.cancel_);return t}})})},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(a,h,p){var m=
{},f={},e={length:0,add:function(a){if(f[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");f[a.id]=a;this.length++},remove:function(a){f[a]&&(delete f[a],this.length--)},byId:function(a){return"string"==typeof a?f[a]:a},byNode:function(a){return f[a.getAttribute("widgetId")]},toArray:function(){var a=[],e;for(e in f)a.push(f[e]);return a},getUniqueId:function(a){var e;do e=a+"_"+(a in m?++m[a]:m[a]=0);while(f[e]);return"dijit"==p._scopeName?e:
p._scopeName+"_"+e},findWidgets:function(a,e){function c(a){for(a=a.firstChild;a;a=a.nextSibling)if(1==a.nodeType){var g=a.getAttribute("widgetId");g?(g=f[g])&&b.push(g):a!==e&&c(a)}}var b=[];c(a);return b},_destroyAll:function(){p._curFocus=null;p._prevFocus=null;p._activeStack=[];a.forEach(e.findWidgets(h.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})},getEnclosingWidget:function(a){for(;a;){var e=1==a.nodeType&&a.getAttribute("widgetId");if(e)return f[e];
a=a.parentNode}return null},_hash:f};return p.registry=e})},"dijit/main":function(){define(["dojo/_base/kernel"],function(a){return a.dijit})},"dijit/Dialog":function(){define("require dojo/_base/array dojo/aspect dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/fx dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/ready dojo/sniff dojo/window dojo/dnd/Moveable dojo/dnd/TimedMoveable ./focus ./_base/manager ./_Widget ./_TemplatedMixin ./_CssStateMixin ./form/_FormMixin ./_DialogMixin ./DialogUnderlay ./layout/ContentPane ./layout/utils dojo/text!./templates/Dialog.html ./a11yclick dojo/i18n!./nls/common".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v,A,z,D,B,C,F,K,M,E){function V(){}var P=new f;P.resolve(!0);v=m("dijit._DialogBase"+(r("dojo-bidi")?"_NoBidi":""),[z,B,C,D],{templateString:E,baseClass:"dijitDialog",cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},_setTitleAttr:{node:"titleNode",type:"innerHTML"},open:!1,duration:v.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,draggable:!0,_setDraggableAttr:function(d){this._set("draggable",d)},maxRatio:.9,
closable:!0,_setClosableAttr:function(d){this.closeButtonNode.style.display=d?"":"none";this._set("closable",d)},postMixInProperties:function(){var d=q.getLocalization("dijit","common");y.mixin(this,d);this.inherited(arguments)},postCreate:function(){c.set(this.domNode,{display:"none",position:"absolute"});this.ownerDocumentBody.appendChild(this.domNode);this.inherited(arguments);p.after(this,"onExecute",y.hitch(this,"hide"),!0);p.after(this,"onCancel",y.hitch(this,"hide"),!0);this._modalconnects=
[]},onLoad:function(){this.resize();this._position();this.autofocus&&J.isTop(this)&&(this._getFocusItems(),k.focus(this._firstFocusItem));this.inherited(arguments)},focus:function(){this._getFocusItems();k.focus(this._firstFocusItem)},_endDrag:function(){var d=g.position(this.domNode),b=n.getBox(this.ownerDocument);d.y=Math.min(Math.max(d.y,0),b.h-d.h);d.x=Math.min(Math.max(d.x,0),b.w-d.w);this._relativePosition=d;this._position()},_setup:function(){var b=this.domNode;this.titleBar&&this.draggable?
(this._moveable=new (6==r("ie")?d:w)(b,{handle:this.titleBar}),p.after(this._moveable,"onMoveStop",y.hitch(this,"_endDrag"),!0)):l.add(b,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":h.map(this["class"].split(/\s/),function(d){return d+"_underlay"}).join(" "),_onKeyDown:y.hitch(this,"_onKey"),ownerDocument:this.ownerDocument}},_size:function(){this.resize()},_position:function(){if(!l.contains(this.ownerDocumentBody,"dojoMove")){var d=this.domNode,b=n.getBox(this.ownerDocument),
a=this._relativePosition,k=g.position(d);c.set(d,{left:Math.floor(b.l+(a?Math.min(a.x,b.w-k.w):(b.w-k.w)/2))+"px",top:Math.floor(b.t+(a?Math.min(a.y,b.h-k.h):(b.h-k.h)/2))+"px"})}},_onKey:function(d){if(d.keyCode==x.TAB){this._getFocusItems();var b=d.target;this._firstFocusItem==this._lastFocusItem?(d.stopPropagation(),d.preventDefault()):b==this._firstFocusItem&&d.shiftKey?(k.focus(this._lastFocusItem),d.stopPropagation(),d.preventDefault()):b!=this._lastFocusItem||d.shiftKey||(k.focus(this._firstFocusItem),
d.stopPropagation(),d.preventDefault())}else this.closable&&d.keyCode==x.ESCAPE&&(this.onCancel(),d.stopPropagation(),d.preventDefault())},show:function(){if(this.open)return P.promise;this._started||this.startup();this._alreadyInitialized||(this._setup(),this._alreadyInitialized=!0);this._fadeOutDeferred&&(this._fadeOutDeferred.cancel(),J.hide(this));var d=n.get(this.ownerDocument);this._modalconnects.push(t(d,"scroll",y.hitch(this,"resize",null)));this._modalconnects.push(t(this.domNode,"keydown",
y.hitch(this,"_onKey")));c.set(this.domNode,{opacity:0,display:""});this._set("open",!0);this._onShow();this.resize();this._position();var a;this._fadeInDeferred=new f(y.hitch(this,function(){a.stop();delete this._fadeInDeferred}));this._fadeInDeferred.then(void 0,V);d=this._fadeInDeferred.promise;a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:y.hitch(this,function(){J.show(this,this.underlayAttrs)}),onEnd:y.hitch(this,function(){this.autofocus&&J.isTop(this)&&(this._getFocusItems(),
k.focus(this._firstFocusItem));this._fadeInDeferred.resolve(!0);delete this._fadeInDeferred})}).play();return d},hide:function(){if(!this._alreadyInitialized||!this.open)return P.promise;this._fadeInDeferred&&this._fadeInDeferred.cancel();var d;this._fadeOutDeferred=new f(y.hitch(this,function(){d.stop();delete this._fadeOutDeferred}));this._fadeOutDeferred.then(void 0,V);this._fadeOutDeferred.then(y.hitch(this,"onHide"));var a=this._fadeOutDeferred.promise;d=b.fadeOut({node:this.domNode,duration:this.duration,
onEnd:y.hitch(this,function(){this.domNode.style.display="none";J.hide(this);this._fadeOutDeferred.resolve(!0);delete this._fadeOutDeferred})}).play();this._scrollConnected&&(this._scrollConnected=!1);for(var k;k=this._modalconnects.pop();)k.remove();this._relativePosition&&delete this._relativePosition;this._set("open",!1);return a},resize:function(d){if("none"!=this.domNode.style.display){this._checkIfSingleChild();if(!d){this._shrunk&&(this._singleChild&&"undefined"!=typeof this._singleChildOriginalStyle&&
(this._singleChild.domNode.style.cssText=this._singleChildOriginalStyle,delete this._singleChildOriginalStyle),h.forEach([this.domNode,this.containerNode,this.titleBar,this.actionBarNode],function(d){d&&c.set(d,{position:"static",width:"auto",height:"auto"})}),this.domNode.style.position="absolute");var b=n.getBox(this.ownerDocument);b.w*=this.maxRatio;b.h*=this.maxRatio;var a=g.position(this.domNode);a.w>=b.w||a.h>=b.h?(d={w:Math.min(a.w,b.w),h:Math.min(a.h,b.h)},this._shrunk=!0):this._shrunk=!1}if(d){g.setMarginBox(this.domNode,
d);b=[];this.titleBar&&b.push({domNode:this.titleBar,region:"top"});this.actionBarNode&&b.push({domNode:this.actionBarNode,region:"bottom"});a={domNode:this.containerNode,region:"center"};b.push(a);var k=M.marginBox2contentBox(this.domNode,d);M.layoutChildren(this.domNode,k,b);this._singleChild?(b=M.marginBox2contentBox(this.containerNode,a),this._singleChild.resize({w:b.w,h:b.h})):(this.containerNode.style.overflow="auto",this._layoutChildren())}else this._layoutChildren();r("touch")||d||this._position()}},
_layoutChildren:function(){h.forEach(this.getChildren(),function(d){d.resize&&d.resize()})},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();for(var d;d=this._modalconnects.pop();)d.remove();J.hide(this);this.inherited(arguments)}});r("dojo-bidi")&&(v=m("dijit._DialogBase",v,{_setTitleAttr:function(d){this._set("title",d);this.titleNode.innerHTML=d;this.applyTextDir(this.titleNode)},
_setTextDirAttr:function(d){this._created&&this.textDir!=d&&(this._set("textDir",d),this.set("title",this.title))}}));var I=m("dijit.Dialog",[K,v],{});I._DialogBase=v;var J=I._DialogLevelManager={_beginZIndex:950,show:function(d,b){Q[Q.length-1].focus=k.curNode;var a=Q[Q.length-1].dialog?Q[Q.length-1].zIndex+2:I._DialogLevelManager._beginZIndex;c.set(d.domNode,"zIndex",a);F.show(b,a-1);Q.push({dialog:d,underlayAttrs:b,zIndex:a})},hide:function(d){if(Q[Q.length-1].dialog==d){Q.pop();var b=Q[Q.length-
1];1==Q.length?F.hide():F.show(b.underlayAttrs,b.zIndex-1);if(d.refocus&&(d=b.focus,!b.dialog||d&&e.isDescendant(d,b.dialog.domNode)||(b.dialog._getFocusItems(),d=b.dialog._firstFocusItem),d))try{d.focus()}catch(L){}}else b=h.indexOf(h.map(Q,function(d){return d.dialog}),d),-1!=b&&Q.splice(b,1)},isTop:function(d){return Q[Q.length-1].dialog==d}},Q=I._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];k.watch("curNode",function(d,b,a){d=Q[Q.length-1].dialog;if(a&&d&&!d._fadeOutDeferred&&a.ownerDocument==
d.ownerDocument){do if(a==d.domNode||l.contains(a,"dijitPopup"))return;while(a=a.parentNode);d.focus()}});r("dijit-legacy-requires")&&u(0,function(){a(["dijit/TooltipDialog"])});return I})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(a,h,p,m,f,e,l,g,c){var b=p.mixin,q={},x=q._Line=function(d,b){this.start=d;this.end=b};x.prototype.getValue=function(d){return(this.end-this.start)*d+this.start};var y=q.Animation=
function(d){b(this,d);p.isArray(this.curve)&&(this.curve=new x(this.curve[0],this.curve[1]))};y.prototype=new m;p.extend(y,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var d=this._percent,b=this.easing;return b?b(d):d},_fire:function(d,b){b=b||[];if(this[d])if(h.debugAtAllCosts)this[d].apply(this,b);else try{this[d].apply(this,b)}catch(v){console.error("exception in animation handler for:",d),console.error(v)}return this},play:function(d,b){this._delayTimer&&this._clearTimer();
if(b)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;b=p.hitch(this,"_play",b);if(0<d)return this._delayTimer=setTimeout(b,d),this;b();return this},_play:function(d){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);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,b){this._stopTimer();this._active=this._paused=!0;this._percent=d;b&&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=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 t=0,u=null,r={run:function(){}};p.extend(y,{_startTimer:function(){this._timer||(this._timer=e.after(r,
"run",p.hitch(this,"_cycle"),!0),t++);u||(u=setInterval(p.hitch(r,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,t--);0>=t&&(clearInterval(u),u=null,t=0)}});var n=l("ie")?function(d){var b=d.style;b.width.length||"auto"!=c.get(d,"width")||(b.width="auto")}:function(){};q._fade=function(d){d.node=g.byId(d.node);var a=b({properties:{}},d);d=a.properties.opacity={};d.start="start"in a?a.start:function(){return+c.get(a.node,"opacity")||0};d.end=a.end;d=q.animateProperty(a);
e.after(d,"beforeBegin",p.partial(n,a.node),!0);return d};q.fadeIn=function(d){return q._fade(b({end:1},d))};q.fadeOut=function(d){return q._fade(b({end:0},d))};q._defaultEasing=function(d){return.5+Math.sin((d+1.5)*Math.PI)/2};var w=function(d){this._properties=d;for(var b in d){var a=d[b];a.start instanceof f&&(a.tempColor=new f)}};w.prototype.getValue=function(d){var b={},a;for(a in this._properties){var c=this._properties[a],e=c.start;e instanceof f?b[a]=f.blendColors(e,c.end,d,c.tempColor).toCss():
p.isArray(e)||(b[a]=(c.end-e)*d+e+("opacity"!=a?c.units||"px":0))}return b};q.animateProperty=function(d){var k=d.node=g.byId(d.node);d.easing||(d.easing=a._defaultEasing);d=new y(d);e.after(d,"beforeBegin",p.hitch(d,function(){var d={},a;for(a in this.properties){var e=function(d,b){var a={height:d.offsetHeight,width:d.offsetWidth}[b];if(void 0!==a)return a;a=c.get(d,b);return"opacity"==b?+a:g?a:parseFloat(a)};if("width"==a||"height"==a)this.node.display="block";var n=this.properties[a];p.isFunction(n)&&
(n=n(k));n=d[a]=b({},p.isObject(n)?n:{end:n});p.isFunction(n.start)&&(n.start=n.start(k));p.isFunction(n.end)&&(n.end=n.end(k));var g=0<=a.toLowerCase().indexOf("color");"end"in n?"start"in n||(n.start=e(k,a)):n.end=e(k,a);g?(n.start=new f(n.start),n.end=new f(n.end)):n.start="opacity"==a?+n.start:parseFloat(n.start)}this.curve=new w(d)}),!0);e.after(d,"onAnimate",p.hitch(c,"set",d.node),!0);return d};q.anim=function(d,b,a,c,e,n){return q.animateProperty({node:d,duration:a||y.prototype.duration,properties:b,
easing:c,onEnd:e}).play(n||0)};b(a,q);a._Animation=y;return q})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(a,h,p,m){var f=a.Color=function(a){a&&this.setColor(a)};f.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,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:m.transparentColor||
[0,0,0,0]};h.extend(f,{r:255,g:255,b:255,a:1,_set:function(a,f,g,c){this.r=a;this.g=f;this.b=g;this.a=c},setColor:function(a){h.isString(a)?f.fromString(a,this):h.isArray(a)?f.fromArray(a,this):(this._set(a.r,a.g,a.b,a.a),a instanceof f||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,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)}});f.blendColors=a.blendColors=function(a,l,g,c){var b=c||new f;p.forEach(["r","g","b","a"],function(c){b[c]=a[c]+(l[c]-a[c])*g;"a"!=c&&(b[c]=Math.round(b[c]))});return b.sanitize()};f.fromRgb=a.colorFromRgb=function(a,l){return(a=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&f.fromArray(a[1].split(/\s*,\s*/),l)};f.fromHex=a.colorFromHex=
function(a,l){var e=l||new f,c=4==a.length?4:8,b=(1<<c)-1;a=Number("0x"+a.substr(1));if(isNaN(a))return null;p.forEach(["b","g","r"],function(g){var f=a&b;a>>=c;e[g]=4==c?17*f:f});e.a=1;return e};f.fromArray=a.colorFromArray=function(a,l){l=l||new f;l._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));isNaN(l.a)&&(l.a=1);return l.sanitize()};f.fromString=a.colorFromString=function(a,l){var e=f.named[a];return e&&f.fromArray(e,l)||f.fromRgb(a,l)||f.fromHex(a,l)};return f})},"dojo/ready":function(){define(["./_base/kernel",
"./has","require","./has!host-browser?./domReady","./_base/lang"],function(a,h,p,m,f){var e=0,l=[],g=0;h=function(){e=1;a._postLoad=a.config.afterOnLoad=!0;c()};var c=function(){if(!g){for(g=1;e&&(!m||0==m._Q.length)&&(p.idle?p.idle():1)&&l.length;){var b=l.shift();try{b()}catch(y){if(y.info=y.message,p.signal)p.signal("error",y);else throw y;}}g=0}};p.on&&p.on("idle",c);m&&(m._onQEmpty=c);var b=a.ready=a.addOnLoad=function(b,e,g){var q=f._toArray(arguments);"number"!=typeof b?(g=e,e=b,b=1E3):q.shift();
g=g?f.hitch.apply(a,q):function(){e()};g.priority=b;for(q=0;q<l.length&&b>=l[q].priority;q++);l.splice(q,0,g);c()},q=a.config.addOnLoad;if(q)b[f.isArray(q)?"apply":"call"](a,q);m?m(h):h();return b})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(a,h,p,m,f,e,l){h.add("rtl-adjust-position-for-verticalScrollBar",function(a,b){a=p.body(b);b=l.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",
visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},a,"last");var c=l.create("div",{style:{overflow:"hidden",direction:"ltr"}},b,"last"),e=0!=f.position(c).x;b.removeChild(c);a.removeChild(b);return e});h.add("position-fixed-support",function(a,b){a=p.body(b);b=l.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},a,"last");var c=l.create("span",{style:{position:"fixed",left:"0",top:"0"}},b,"last"),e=f.position(c).x!=f.position(b).x;
b.removeChild(c);a.removeChild(b);return e});var g={getBox:function(a){a=a||p.doc;var b="BackCompat"==a.compatMode?p.body(a):a.documentElement,c=f.docScroll(a);if(h("touch")){var e=g.get(a);a=e.innerWidth||b.clientWidth;b=e.innerHeight||b.clientHeight}else a=b.clientWidth,b=b.clientHeight;return{l:c.x,t:c.y,w:a,h:b}},get:function(a){if(h("ie")&&g!==document.parentWindow){a.parentWindow.execScript("document._parentWindow \x3d window;","Javascript");var b=a._parentWindow;a._parentWindow=null;return b}return a.parentWindow||
a.defaultView},scrollIntoView:function(a,b){try{a=m.byId(a);var c=a.ownerDocument||p.doc,g=p.body(c),l=c.documentElement||g.parentNode,t=h("ie")||h("trident"),u=h("webkit");if(a!=g&&a!=l)if(!(h("mozilla")||t||u||h("opera")||h("trident")||h("edge"))&&"scrollIntoView"in a)a.scrollIntoView(!1);else{var r="BackCompat"==c.compatMode,n=Math.min(g.clientWidth||l.clientWidth,l.clientWidth||g.clientWidth),w=Math.min(g.clientHeight||l.clientHeight,l.clientHeight||g.clientHeight),c=u||r?g:l,d=b||f.position(a),
k=a.parentNode;b=function(d){return 6>=t||7==t&&r?!1:h("position-fixed-support")&&"fixed"==e.get(d,"position").toLowerCase()};var v=this,u=function(d,b,a){"BODY"==d.tagName||"HTML"==d.tagName?v.get(d.ownerDocument).scrollBy(b,a):(b&&(d.scrollLeft+=b),a&&(d.scrollTop+=a))};if(!b(a))for(;k;){k==g&&(k=c);var A=f.position(k),z=b(k),D="rtl"==e.getComputedStyle(k).direction.toLowerCase();if(k==c)A.w=n,A.h=w,c==l&&(t||h("trident"))&&D&&(A.x+=c.offsetWidth-A.w),A.x=0,A.y=0;else{var B=f.getPadBorderExtents(k);
A.w-=B.w;A.h-=B.h;A.x+=B.l;A.y+=B.t;var C=k.clientWidth,F=A.w-C;0<C&&0<F&&(D&&h("rtl-adjust-position-for-verticalScrollBar")&&(A.x+=F),A.w=C);C=k.clientHeight;F=A.h-C;0<C&&0<F&&(A.h=C)}z&&(0>A.y&&(A.h+=A.y,A.y=0),0>A.x&&(A.w+=A.x,A.x=0),A.y+A.h>w&&(A.h=w-A.y),A.x+A.w>n&&(A.w=n-A.x));var K=d.x-A.x,M=d.y-A.y,E=K+d.w-A.w,V=M+d.h-A.h,P,I;0<E*K&&(k.scrollLeft||k==c||k.scrollWidth>k.offsetHeight)&&(P=Math[0>K?"max":"min"](K,E),D&&(8==t&&!r||5<=h("trident"))&&(P=-P),I=k.scrollLeft,u(k,P,0),P=k.scrollLeft-
I,d.x-=P);0<V*M&&(k.scrollTop||k==c||k.scrollHeight>k.offsetHeight)&&(P=Math.ceil(Math[0>M?"max":"min"](M,V)),I=k.scrollTop,u(k,0,P),P=k.scrollTop-I,d.y-=P);k=k!=c&&!z&&k.parentNode}}}catch(J){console.error("scrollIntoView: "+J),a.scrollIntoView(!1)}}};a.setObject("dojo.window",g);return g})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../has ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),function(a,h,p,
m,f,e,l,g,c,b,q,x,y){function t(b,a){"touchAction"in document.body.style?u="touchAction":"msTouchAction"in document.body.style&&(u="msTouchAction");r=function(d,b){d.style[u]=b};r(b,a)}var u,r=function(){};l("touch-action")&&(r=t);return h("dojo.dnd.Moveable",[e],{handle:"",delay:0,skip:!1,constructor:function(a,c){this.node=m.byId(a);r(this.node,"none");c||(c={});this.handle=c.handle?m.byId(c.handle):null;this.handle||(this.handle=this.node);this.delay=0<c.delay?c.delay:0;this.skip=c.skip;this.mover=
c.mover?c.mover:x;this.events=[g(this.handle,b.press,p.hitch(this,"onMouseDown")),g(this.handle,"dragstart",p.hitch(this,"onSelectStart")),g(this.handle,"selectstart",p.hitch(this,"onSelectStart"))]},markupFactory:function(b,a,d){return new d(a,b)},destroy:function(){a.forEach(this.events,function(b){b.remove()});r(this.node,"");this.events=this.node=this.handle=null},onMouseDown:function(a){if(!this.skip||!q.isFormElement(a)){if(this.delay)this.events.push(g(this.handle,b.move,p.hitch(this,"onMouseMove")),
g(this.handle.ownerDocument,b.release,p.hitch(this,"onMouseUp"))),this._lastX=a.pageX,this._lastY=a.pageY;else this.onDragDetected(a);a.stopPropagation();a.preventDefault()}},onMouseMove:function(b){if(Math.abs(b.pageX-this._lastX)>this.delay||Math.abs(b.pageY-this._lastY)>this.delay)this.onMouseUp(b),this.onDragDetected(b);b.stopPropagation();b.preventDefault()},onMouseUp:function(b){for(var a=0;2>a;++a)this.events.pop().remove();b.stopPropagation();b.preventDefault()},onSelectStart:function(b){this.skip&&
q.isFormElement(b)||(b.stopPropagation(),b.preventDefault())},onDragDetected:function(b){new this.mover(this.node,b,this)},onMoveStart:function(b){c.publish("/dnd/move/start",b);f.add(y.body(),"dojoMove");f.add(this.node,"dojoMoveItem")},onMoveStop:function(b){c.publish("/dnd/move/stop",b);f.remove(y.body(),"dojoMove");f.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(b,a){this.onMoving(b,a);var d=b.node.style;d.left=a.l+"px";d.top=a.t+"px";this.onMoved(b,a)},onMoving:function(){},
onMoved:function(){}})})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),function(a,h,p,m,f,e,l,g,c,b){function q(d,b,a){return u&&a?function(d,b){return e(d,a,b)}:n?function(a,k){var c=e(a,b,function(d){k.call(this,d);F=(new Date).getTime()}),n=e(a,d,function(d){(!F||(new Date).getTime()>F+1E3)&&k.call(this,d)});return{remove:function(){c.remove();n.remove()}}}:function(b,a){return e(b,d,a)}}function x(d){do if(void 0!==
d.dojoClick)return d;while(d=d.parentNode)}function y(a,c,n){if(!g.isRight(a)){var f=x(a.target);if(d=!a.target.disabled&&f&&f.dojoClick)if(v=(k="useTarget"==d)?f:a.target,k&&a.preventDefault(),A=a.changedTouches?a.changedTouches[0].pageX-b.global.pageXOffset:a.clientX,z=a.changedTouches?a.changedTouches[0].pageY-b.global.pageYOffset:a.clientY,D=("object"==typeof d?d.x:"number"==typeof d?d:0)||4,B=("object"==typeof d?d.y:"number"==typeof d?d:0)||4,!w){a=function(a){b.doc.addEventListener(a,function(b){var k=
b.target;d&&!b._dojo_click&&(new Date).getTime()<=C+1E3&&("INPUT"!=k.tagName||!m.contains(k,"dijitOffScreen"))&&(b.stopPropagation(),b.stopImmediatePropagation&&b.stopImmediatePropagation(),"click"==a&&("INPUT"!=k.tagName||"radio"==k.type&&(m.contains(k,"dijitCheckBoxInput")||m.contains(k,"mblRadioButton"))||"checkbox"==k.type&&(m.contains(k,"dijitCheckBoxInput")||m.contains(k,"mblCheckBox")))&&"TEXTAREA"!=k.tagName&&"AUDIO"!=k.tagName&&"VIDEO"!=k.tagName&&b.preventDefault())},!0)};var r=function(a){d=
k?p.isDescendant(b.doc.elementFromPoint(a.changedTouches?a.changedTouches[0].pageX-b.global.pageXOffset:a.clientX,a.changedTouches?a.changedTouches[0].pageY-b.global.pageYOffset:a.clientY),v):d&&(a.changedTouches?a.changedTouches[0].target:a.target)==v&&Math.abs((a.changedTouches?a.changedTouches[0].pageX-b.global.pageXOffset:a.clientX)-A)<=D&&Math.abs((a.changedTouches?a.changedTouches[0].pageY-b.global.pageYOffset:a.clientY)-z)<=B};w=!0;b.doc.addEventListener(c,function(d){g.isRight(d)||(r(d),k&&
d.preventDefault())},!0);b.doc.addEventListener(n,function(b){if(!g.isRight(b)&&(r(b),d)){var a=function(d){var a=document.createEvent("MouseEvents");a._dojo_click=!0;a.initMouseEvent(d,!0,!0,b.view,b.detail,n.screenX,n.screenY,n.clientX,n.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,null);return a};C=(new Date).getTime();var c=k?v:b.target;"LABEL"===c.tagName&&(c=p.byId(c.getAttribute("for"))||c);var n=b.changedTouches?b.changedTouches[0]:b,f=a("mousedown"),q=a("mouseup"),l=a("click");setTimeout(function(){e.emit(c,
"mousedown",f);e.emit(c,"mouseup",q);e.emit(c,"click",l);C=(new Date).getTime()},0)}},!0);a("click");a("mousedown");a("mouseup")}}}var t=5>l("ios"),u=l("pointer-events")||l("MSPointer"),r=function(){var d={},b;for(b in{down:1,move:1,up:1,cancel:1,over:1,out:1})d[b]=l("MSPointer")?"MSPointer"+b.charAt(0).toUpperCase()+b.slice(1):"pointer"+b;return d}(),n=l("touch-events"),w,d,k=!1,v,A,z,D,B,C,F,K;l("touch")&&(u?c(function(){b.doc.addEventListener(r.down,function(d){y(d,r.move,r.up)},!0)}):c(function(){function d(d){var b=
f.delegate(d,{bubbles:!0});6<=l("ios")&&(b.touches=d.touches,b.altKey=d.altKey,b.changedTouches=d.changedTouches,b.ctrlKey=d.ctrlKey,b.metaKey=d.metaKey,b.shiftKey=d.shiftKey,b.targetTouches=d.targetTouches);return b}K=b.body();b.doc.addEventListener("touchstart",function(d){F=(new Date).getTime();var b=K;K=d.target;e.emit(b,"dojotouchout",{relatedTarget:K,bubbles:!0});e.emit(K,"dojotouchover",{relatedTarget:b,bubbles:!0});y(d,"touchmove","touchend")},!0);e(b.doc,"touchmove",function(a){F=(new Date).getTime();
var k=b.doc.elementFromPoint(a.pageX-(t?0:b.global.pageXOffset),a.pageY-(t?0:b.global.pageYOffset));k&&(K!==k&&(e.emit(K,"dojotouchout",{relatedTarget:k,bubbles:!0}),e.emit(k,"dojotouchover",{relatedTarget:K,bubbles:!0}),K=k),e.emit(k,"dojotouchmove",d(a))||a.preventDefault())});e(b.doc,"touchend",function(a){F=(new Date).getTime();var k=b.doc.elementFromPoint(a.pageX-(t?0:b.global.pageXOffset),a.pageY-(t?0:b.global.pageYOffset))||b.body();e.emit(k,"dojotouchend",d(a))})}));h={press:q("mousedown",
"touchstart",r.down),move:q("mousemove","dojotouchmove",r.move),release:q("mouseup","dojotouchend",r.up),cancel:q(g.leave,"touchcancel",u?r.cancel:null),over:q("mouseover","dojotouchover",r.over),out:q("mouseout","dojotouchout",r.out),enter:g._eventHandler(q("mouseover","dojotouchover",r.over)),leave:g._eventHandler(q("mouseout","dojotouchout",r.out))};return a.touch=h})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(a,h,p,m){var f=p.getObject("dojo.dnd",
!0);f.getCopyKeyState=function(e){return e[a("mac")?"metaKey":"ctrlKey"]};f._uniqueId=0;f.getUniqueId=function(){var a;do a=h._scopeName+"Unique"+ ++f._uniqueId;while(m.byId(a));return a};f._empty={};f.isFormElement=function(a){a=a.target;3==a.nodeType&&(a=a.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+a.tagName.toLowerCase()+" ")};return f})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y){return h("dojo.dnd.Mover",[c],{constructor:function(a,c,g){function n(b){b.preventDefault();b.stopPropagation()}this.node=e.byId(a);this.marginBox={l:c.pageX,t:c.pageY};this.mouseButton=c.button;c=this.host=g;a=a.ownerDocument;this.events=[b(a,q.move,p.hitch(this,"onFirstMove")),b(a,q.move,p.hitch(this,"onMouseMove")),b(a,q.release,p.hitch(this,"onMouseUp")),b(a,"dragstart",n),b(a.body,"selectstart",n)];y.autoScrollStart(a);if(c&&c.onMoveStart)c.onMoveStart(this)},
onMouseMove:function(b){y.autoScroll(b);var a=this.marginBox;this.host.onMove(this,{l:a.l+b.pageX,t:a.t+b.pageY},b);b.preventDefault();b.stopPropagation()},onMouseUp:function(b){(m("webkit")&&m("mac")&&2==this.mouseButton?0==b.button:this.mouseButton==b.button)&&this.destroy();b.preventDefault();b.stopPropagation()},onFirstMove:function(b){var a=this.node.style,c,e=this.host;switch(a.position){case "relative":case "absolute":c=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;
default:a.position="absolute";a=l.getMarginBox(this.node);c=f.doc.body;var q=g.getComputedStyle(c),d=l.getMarginBox(c,q),q=l.getContentBox(c,q);c=a.l-(q.l-d.l);a=a.t-(q.t-d.t)}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;if(e&&e.onFirstMove)e.onFirstMove(this,b);this.events.shift().remove()},destroy:function(){a.forEach(this.events,function(b){b.remove()});var b=this.host;if(b&&b.onMoveStop)b.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),
function(a,h,p,m,f,e){var l={};a.setObject("dojo.dnd.autoscroll",l);l.getViewport=e.getBox;l.V_TRIGGER_AUTOSCROLL=32;l.H_TRIGGER_AUTOSCROLL=32;l.V_AUTOSCROLL_VALUE=16;l.H_AUTOSCROLL_VALUE=16;var g,c=p.doc,b=Infinity,q=Infinity;l.autoScrollStart=function(a){c=a;g=e.getBox(c);a=p.body(c).parentNode;b=Math.max(a.scrollHeight-g.h,0);q=Math.max(a.scrollWidth-g.w,0)};l.autoScroll=function(a){var f=g||e.getBox(c),t=p.body(c).parentNode,m=0,r=0;a.clientX<l.H_TRIGGER_AUTOSCROLL?m=-l.H_AUTOSCROLL_VALUE:a.clientX>
f.w-l.H_TRIGGER_AUTOSCROLL&&(m=Math.min(l.H_AUTOSCROLL_VALUE,q-t.scrollLeft));a.clientY<l.V_TRIGGER_AUTOSCROLL?r=-l.V_AUTOSCROLL_VALUE:a.clientY>f.h-l.V_TRIGGER_AUTOSCROLL&&(r=Math.min(l.V_AUTOSCROLL_VALUE,b-t.scrollTop));window.scrollBy(m,r)};l._validNodes={div:1,p:1,td:1};l._validOverflow={auto:1,scroll:1};l.autoScrollNodes=function(b){for(var a,c,e,g,n,q=0,d=0,k=b.target;k;){if(1==k.nodeType&&k.tagName.toLowerCase()in l._validNodes){e=f.getComputedStyle(k);n=e.overflowX.toLowerCase()in l._validOverflow;
g=e.overflowY.toLowerCase()in l._validOverflow;if(n||g)a=m.getContentBox(k,e),c=m.position(k,!0);if(n){e=Math.min(l.H_TRIGGER_AUTOSCROLL,a.w/2);n=b.pageX-c.x;if(h("webkit")||h("opera"))n+=p.body().scrollLeft;q=0;0<n&&n<a.w&&(n<e?q=-e:n>a.w-e&&(q=e),k.scrollLeft+=q)}if(g){g=Math.min(l.V_TRIGGER_AUTOSCROLL,a.h/2);e=b.pageY-c.y;if(h("webkit")||h("opera"))e+=p.body().scrollTop;d=0;0<e&&e<a.h&&(e<g?d=-g:e>a.h-g&&(d=g),k.scrollTop+=d)}if(q||d)return}try{k=k.parentNode}catch(v){k=null}}l.autoScroll(b)};
return l})},"dojo/dnd/TimedMoveable":function(){define(["../_base/declare","./Moveable"],function(a,h){var p=h.prototype.onMove;return a("dojo.dnd.TimedMoveable",h,{timeout:40,constructor:function(a,f){f||(f={});f.timeout&&"number"==typeof f.timeout&&0<=f.timeout&&(this.timeout=f.timeout)},onMoveStop:function(a){a._timer&&(clearTimeout(a._timer),p.call(this,a,a._leftTop));h.prototype.onMoveStop.apply(this,arguments)},onMove:function(a,f){a._leftTop=f;if(!a._timer){var e=this;a._timer=setTimeout(function(){a._timer=
null;p.call(e,a,a._leftTop)},this.timeout)}}})})},"dijit/focus":function(){define("dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/Evented dojo/_base/lang dojo/on dojo/domReady dojo/sniff dojo/Stateful dojo/_base/window dojo/window ./a11y ./registry ./main".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n){var w,d,k=new (h([x,l],{curNode:null,activeStack:[],constructor:function(){var d=g.hitch(this,function(d){p.isDescendant(this.curNode,d)&&this.set("curNode",
null);p.isDescendant(this.prevNode,d)&&this.set("prevNode",null)});a.before(e,"empty",d);a.before(e,"destroy",d)},registerIframe:function(d){return this.registerWin(d.contentWindow,d)},registerWin:function(d,b){var a=this,k=d.document&&d.document.body;if(k){var e=q("pointer-events")?"pointerdown":q("MSPointer")?"MSPointerDown":q("touch-events")?"mousedown, touchstart":"mousedown",n=c(d.document,e,function(d){d&&d.target&&null==d.target.parentNode||a._onTouchNode(b||d.target,"mouse")}),g=c(k,"focusin",
function(d){if(d.target.tagName){var k=d.target.tagName.toLowerCase();"#document"!=k&&"body"!=k&&(u.isFocusable(d.target)?a._onFocusNode(b||d.target):a._onTouchNode(b||d.target))}}),f=c(k,"focusout",function(d){a._onBlurNode(b||d.target)});return{remove:function(){n.remove();g.remove();f.remove();k=n=g=f=null}}}},_onBlurNode:function(b){b=(new Date).getTime();b<w+100||(this._clearFocusTimer&&clearTimeout(this._clearFocusTimer),this._clearFocusTimer=setTimeout(g.hitch(this,function(){this.set("prevNode",
this.curNode);this.set("curNode",null)}),0),this._clearActiveWidgetsTimer&&clearTimeout(this._clearActiveWidgetsTimer),b<d+100||(this._clearActiveWidgetsTimer=setTimeout(g.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([])}),0)))},_onTouchNode:function(b,a){d=(new Date).getTime();this._clearActiveWidgetsTimer&&(clearTimeout(this._clearActiveWidgetsTimer),delete this._clearActiveWidgetsTimer);f.contains(b,"dijitPopup")&&(b=b.firstChild);var k=[];try{for(;b;){var c=m.get(b,
"dijitPopupParent");if(c)b=r.byId(c).domNode;else if(b.tagName&&"body"==b.tagName.toLowerCase()){if(b===y.body())break;b=t.get(b.ownerDocument).frameElement}else{var e=b.getAttribute&&b.getAttribute("widgetId"),n=e&&r.byId(e);!n||"mouse"==a&&n.get("disabled")||k.unshift(e);b=b.parentNode}}}catch(K){}this._setStack(k,a)},_onFocusNode:function(d){d&&9!=d.nodeType&&(w=(new Date).getTime(),this._clearFocusTimer&&(clearTimeout(this._clearFocusTimer),delete this._clearFocusTimer),this._onTouchNode(d),d!=
this.curNode&&(this.set("prevNode",this.curNode),this.set("curNode",d)))},_setStack:function(d,b){var a=this.activeStack,k=a.length-1,c=d.length-1;if(d[c]!=a[k]){this.set("activeStack",d);var e;for(e=k;0<=e&&a[e]!=d[e];e--)if(k=r.byId(a[e]))k._hasBeenBlurred=!0,k.set("focused",!1),k._focusManager==this&&k._onBlur(b),this.emit("widget-blur",k,b);for(e++;e<=c;e++)if(k=r.byId(d[e]))k.set("focused",!0),k._focusManager==this&&k._onFocus(b),this.emit("widget-focus",k,b)}},focus:function(d){if(d)try{d.focus()}catch(z){}}}));
b(function(){var d=k.registerWin(t.get(document));q("ie")&&c(window,"unload",function(){d&&(d.remove(),d=null)})});n.focus=function(d){k.focus(d)};for(var v in k)/^_/.test(v)||(n.focus[v]="function"==typeof k[v]?g.hitch(k,v):k[v]);k.watch(function(d,b,a){n.focus[d]=a});return k})},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(a,h,p,m){return a("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(a){var e=this._attrPairNames;return e[a]?
e[a]:e[a]={s:"_"+a+"Setter",g:"_"+a+"Getter"}},postscript:function(a){a&&this.set(a)},_get:function(a,e){return"function"===typeof this[e.g]?this[e.g]():this[a]},get:function(a){return this._get(a,this._getAttrNames(a))},set:function(a,e){if("object"===typeof a){for(var f in a)a.hasOwnProperty(f)&&"_watchCallbacks"!=f&&this.set(f,a[f]);return this}f=this._getAttrNames(a);var g=this._get(a,f);f=this[f.s];var c;"function"===typeof f?c=f.apply(this,Array.prototype.slice.call(arguments,1)):this[a]=e;
if(this._watchCallbacks){var b=this;m(c,function(){b._watchCallbacks(a,g,e)})}return this},_changeAttrValue:function(a,e){var f=this.get(a);this[a]=e;this._watchCallbacks&&this._watchCallbacks(a,f,e);return this},watch:function(a,e){var f=this._watchCallbacks;if(!f)var g=this,f=this._watchCallbacks=function(b,a,c,e){var q=function(e){if(e){e=e.slice();for(var f=0,n=e.length;f<n;f++)e[f].call(g,b,a,c)}};q(f["_"+b]);e||q(f["*"])};e||"function"!==typeof a?a="_"+a:(e=a,a="*");var c=f[a];"object"!==typeof c&&
(c=f[a]=[]);c.push(e);a={};a.unwatch=a.remove=function(){var b=p.indexOf(c,e);-1<b&&c.splice(b,1)};return a}})})},"dijit/a11y":function(){define("dojo/_base/array dojo/dom dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/sniff ./main".split(" "),function(a,h,p,m,f,e,l){var g={_isElementShown:function(a){var b=m.get(a);return"hidden"!=b.visibility&&"collapsed"!=b.visibility&&"none"!=b.display&&"hidden"!=p.get(a,"type")},hasDefaultTabStop:function(a){switch(a.nodeName.toLowerCase()){case "a":return p.has(a,
"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var b;try{var c=a.contentDocument;if("designMode"in c&&"on"==c.designMode)return!0;b=c.body}catch(x){try{b=a.contentWindow.document.body}catch(y){return!1}}return b&&("true"==b.contentEditable||b.firstChild&&"true"==b.firstChild.contentEditable);default:return"true"==a.contentEditable}},effectiveTabIndex:function(a){if(!p.get(a,"disabled"))return p.has(a,"tabIndex")?+p.get(a,"tabIndex"):
g.hasDefaultTabStop(a)?0:void 0},isTabNavigable:function(a){return 0<=g.effectiveTabIndex(a)},isFocusable:function(a){return-1<=g.effectiveTabIndex(a)},_getTabNavigable:function(a){function b(d){return d&&"input"==d.tagName.toLowerCase()&&d.type&&"radio"==d.type.toLowerCase()&&d.name&&d.name.toLowerCase()}function c(d){return w[b(d)]||d}var f,l,t,m,r,n,w={},d=g._isElementShown,k=g.effectiveTabIndex,v=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(!(1!=a.nodeType||9>=e("ie")&&"HTML"!==a.scopeName)&&
d(a)){var c=k(a);if(0<=c){if(0==c)f||(f=a),l=a;else if(0<c){if(!t||c<m)m=c,t=a;if(!r||c>=n)n=c,r=a}c=b(a);p.get(a,"checked")&&c&&(w[c]=a)}"SELECT"!=a.nodeName.toUpperCase()&&v(a)}};d(a)&&v(a);return{first:c(f),last:c(l),lowest:c(t),highest:c(r)}},getFirstInTabbingOrder:function(a,b){a=g._getTabNavigable(h.byId(a,b));return a.lowest?a.lowest:a.first},getLastInTabbingOrder:function(a,b){a=g._getTabNavigable(h.byId(a,b));return a.last?a.last:a.highest}};f.mixin(l,g);return g})},"dijit/_base/manager":function(){define(["dojo/_base/array",
"dojo/_base/config","dojo/_base/lang","../registry","../main"],function(a,h,p,m,f){var e={};a.forEach("byId getUniqueId findWidgets _destroyAll byNode getEnclosingWidget".split(" "),function(a){e[a]=m[a]});p.mixin(e,{defaultDuration:h.defaultDuration||200});p.mixin(f,e);return f})},"dijit/_Widget":function(){define("dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/has dojo/_base/kernel dojo/_base/lang dojo/query dojo/ready ./registry ./_WidgetBase ./_OnDijitClickMixin ./_FocusMixin dojo/uacss ./hccss".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y){function t(){}function u(b){return function(a,c,d,k){return a&&"string"==typeof c&&a[c]==t?a.on(c.substring(2).toLowerCase(),l.hitch(d,k)):b.apply(p,arguments)}}a.around(p,"connect",u);e.connect&&a.around(e,"connect",u);a=m("dijit._Widget",[q,x,y],{onClick:t,onDblClick:t,onKeyDown:t,onKeyPress:t,onKeyUp:t,onMouseDown:t,onMouseMove:t,onMouseOut:t,onMouseOver:t,onMouseLeave:t,onMouseEnter:t,onMouseUp:t,constructor:function(b){this._toConnect={};for(var a in b)this[a]===
t&&(this._toConnect[a.replace(/^on/,"").toLowerCase()]=b[a],delete b[a])},postCreate:function(){this.inherited(arguments);for(var b in this._toConnect)this.on(b,this._toConnect[b]);delete this._toConnect},on:function(b,a){return this[this._onMap(b)]===t?p.connect(this.domNode,b.toLowerCase(),this,a):this.inherited(arguments)},_setFocusedAttr:function(b){this._focused=b;this._set("focused",b)},setAttribute:function(b,a){e.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.",
"","2.0");this.set(b,a)},attr:function(b,a){return 2<=arguments.length||"object"===typeof b?this.set.apply(this,arguments):this.get(b)},getDescendants:function(){e.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?g("[widgetId]",this.containerNode).map(b.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});f("dijit-legacy-requires")&&c(0,function(){require(["dijit/_base"])});
return a})},"dijit/_WidgetBase":function(){define("require dojo/_base/array dojo/aspect dojo/_base/config dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/_base/kernel dojo/_base/lang dojo/on dojo/ready dojo/Stateful dojo/topic dojo/_base/window ./Destroyable dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v,A,z){function D(d){return function(b){g[b?
"set":"remove"](this.domNode,d,b);this._set(d,b)}}y.add("dijit-legacy-requires",!t.isAsync);y.add("dojo-bidi",!1);y("dijit-legacy-requires")&&n(0,function(){a(["dijit/_base/manager"])});var B={};m=e("dijit._WidgetBase",[w,v],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:D("lang"),dir:"",_setDirAttr:D("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(d){this._set("ownerDocument",
d)},attributeMap:{},_blankGif:m.blankGif||a.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var d=this.constructor;if(!d._setterAttrs){var b=d.prototype,a=d._setterAttrs=[],d=d._onMap={},k;for(k in b.attributeMap)a.push(k);for(k in b)/^on/.test(k)&&(d[k.substring(2).toLowerCase()]=k),/^_set[A-Z](.*)Attr$/.test(k)&&(k=k.charAt(4).toLowerCase()+k.substr(5,k.length-9),b.attributeMap&&k in b.attributeMap||a.push(k))}},postscript:function(d,b){this.create(d,b)},create:function(d,b){this._introspect();
this.srcNodeRef=l.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);d&&(this.params=d,u.mixin(this,d));this.postMixInProperties();this.id||(this.id=z.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=k.body(this.ownerDocument);z.add(this);
this.buildRendering();var a;this.domNode&&(this._applyAttributes(),(d=this.srcNodeRef)&&d.parentNode&&this.domNode!==d&&(d.parentNode.replaceChild(this.domNode,d),a=!0),this.domNode.setAttribute("widgetId",this.id));this.postCreate();a&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var d={},b;for(b in this.params||{})d[b]=this._get(b);h.forEach(this.constructor._setterAttrs,function(b){if(!(b in d)){var a=this._get(b);a&&this.set(b,a)}},this);for(b in d)this.set(b,d[b])},postMixInProperties:function(){},
buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var d=this.baseClass.split(" ");this.isLeftToRight()||(d=d.concat(h.map(d,function(d){return d+"Rtl"})));c.add(this.domNode,d)}},postCreate:function(){},startup:function(){this._started||(this._started=!0,h.forEach(this.getChildren(),function(d){d._started||d._destroyed||!u.isFunction(d.startup)||(d.startup(),d._started=!0)}))},destroyRecursive:function(d){this._beingDestroyed=
!0;this.destroyDescendants(d);this.destroy(d)},destroy:function(d){function b(b){b.destroyRecursive?b.destroyRecursive(d):b.destroy&&b.destroy(d)}this._beingDestroyed=!0;this.uninitialize();h.forEach(this._connects,u.hitch(this,"disconnect"));h.forEach(this._supportingWidgets,b);this.domNode&&h.forEach(z.findWidgets(this.domNode,this.containerNode),b);this.destroyRendering(d);z.remove(this.id);this._destroyed=!0},destroyRendering:function(d){this.bgIframe&&(this.bgIframe.destroy(d),delete this.bgIframe);
this.domNode&&(d?g.remove(this.domNode,"widgetId"):b.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(d||b.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(d){h.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(d)})},uninitialize:function(){return!1},_setStyleAttr:function(d){var b=this.domNode;u.isObject(d)?x.set(b,d):b.style.cssText=b.style.cssText?b.style.cssText+("; "+d):d;this._set("style",d)},_attrToDom:function(d,b,a){a=3<=
arguments.length?a:this.attributeMap[d];h.forEach(u.isArray(a)?a:[a],function(a){var k=this[a.node||a||"domNode"];switch(a.type||"attribute"){case "attribute":u.isFunction(b)&&(b=u.hitch(this,b));a=a.attribute?a.attribute:/^on[A-Z][a-zA-Z]*$/.test(d)?d.toLowerCase():d;k.tagName?g.set(k,a,b):k.set(a,b);break;case "innerText":k.innerHTML="";k.appendChild(this.ownerDocument.createTextNode(b));break;case "innerHTML":k.innerHTML=b;break;case "class":c.replace(k,b,this[d]);break;case "toggleClass":c.toggle(k,
a.className||d,b)}},this)},get:function(d){var b=this._getAttrNames(d);return this[b.g]?this[b.g]():this._get(d)},set:function(d,b){if("object"===typeof d){for(var a in d)this.set(a,d[a]);return this}a=this._getAttrNames(d);var k=this[a.s];if(u.isFunction(k))var c=k.apply(this,Array.prototype.slice.call(arguments,1));else{var k=this.focusNode&&!u.isFunction(this.focusNode)?"focusNode":"domNode",e=this[k]&&this[k].tagName,n;if((n=e)&&!(n=B[e])){n=this[k];var g={},f;for(f in n)g[f.toLowerCase()]=!0;
n=B[e]=g}f=n;a=d in this.attributeMap?this.attributeMap[d]:a.s in this?this[a.s]:f&&a.l in f&&"function"!=typeof b||/^aria-|^data-|^role$/.test(d)?k:null;null!=a&&this._attrToDom(d,b,a);this._set(d,b)}return c||this},_attrPairNames:{},_getAttrNames:function(d){var b=this._attrPairNames;if(b[d])return b[d];var a=d.replace(/^[a-z]|-[a-zA-Z]/g,function(d){return d.charAt(d.length-1).toUpperCase()});return b[d]={n:d+"Node",s:"_set"+a+"Attr",g:"_get"+a+"Attr",l:a.toLowerCase()}},_set:function(d,b){var a=
this[d];this[d]=b;!this._created||a===b||a!==a&&b!==b||(this._watchCallbacks&&this._watchCallbacks(d,a,b),this.emit("attrmodified-"+d,{detail:{prevValue:a,newValue:b}}))},_get:function(d){return this[d]},emit:function(d,b,a){b=b||{};void 0===b.bubbles&&(b.bubbles=!0);void 0===b.cancelable&&(b.cancelable=!0);b.detail||(b.detail={});b.detail.widget=this;var k,c=this["on"+d];c&&(k=c.apply(this,a?a:[b]));this._started&&!this._beingDestroyed&&r.emit(this.domNode,d.toLowerCase(),b);return k},on:function(d,
b){var a=this._onMap(d);return a?p.after(this,a,b,!0):this.own(r(this.domNode,d,b))[0]},_onMap:function(d){var b=this.constructor,a=b._onMap;if(!a){var a=b._onMap={},k;for(k in b.prototype)/^on/.test(k)&&(a[k.replace(/^on/,"").toLowerCase()]=k)}return a["string"==typeof d&&d.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?z.findWidgets(this.containerNode):[]},getParent:function(){return z.getEnclosingWidget(this.domNode.parentNode)},
connect:function(d,b,a){return this.own(f.connect(d,b,this,a))[0]},disconnect:function(d){d.remove()},subscribe:function(b,a){return this.own(d.subscribe(b,u.hitch(this,a)))[0]},unsubscribe:function(d){d.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():q.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=x.get(this.domNode,"display")},placeAt:function(d,a){var k=!d.tagName&&z.byId(d);!k||!k.addChild||a&&"number"!==typeof a?(d=k&&"domNode"in
k?k.containerNode&&!/after|before|replace/.test(a||"")?k.containerNode:k.domNode:l.byId(d,this.ownerDocument),b.place(this.domNode,d,a),!this._started&&(this.getParent()||{})._started&&this.startup()):k.addChild(this,a);return this},defer:function(d,b){var a=setTimeout(u.hitch(this,function(){a&&(a=null,this._destroyed||u.hitch(this,d)())}),b||0);return{remove:function(){a&&(clearTimeout(a),a=null);return null}}}});y("dojo-bidi")&&m.extend(A);return m})},"dijit/Destroyable":function(){define(["dojo/_base/array",
"dojo/aspect","dojo/_base/declare"],function(a,h,p){return p("dijit.Destroyable",null,{destroy:function(a){this._destroyed=!0},own:function(){var m=["destroyRecursive","destroy","remove"];a.forEach(arguments,function(f){function e(){g.remove();a.forEach(c,function(b){b.remove()})}var l,g=h.before(this,"destroy",function(b){f[l](b)}),c=[];f.then?(l="cancel",f.then(e,e)):a.forEach(m,function(b){"function"===typeof f[b]&&(l||(l=b),c.push(h.after(f,b,e,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),
function(a,h,p,m,f,e){a=m("dijit._OnDijitClickMixin",null,{connect:function(a,g,c){return this.inherited(arguments,[a,"ondijitclick"==g?e:g,c])}});a.a11yclick=e;return a})},"dijit/a11yclick":function(){define(["dojo/keys","dojo/mouse","dojo/on","dojo/touch"],function(a,h,p,m){function f(e){if((e.keyCode===a.ENTER||e.keyCode===a.SPACE)&&!/input|button|textarea/i.test(e.target.nodeName))for(e=e.target;e;e=e.parentNode)if(e.dojoClick)return!0}var e;p(document,"keydown",function(a){f(a)?(e=a.target,a.preventDefault()):
e=null});p(document,"keyup",function(a){f(a)&&a.target==e&&(e=null,p.emit(a.target,"click",{cancelable:!0,bubbles:!0,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey,altKey:a.altKey,_origType:a.type}))});var l=function(a,c){a.dojoClick=!0;return p(a,"click",c)};l.click=l;l.press=function(e,c){var b=p(e,m.press,function(b){("mousedown"!=b.type||h.isLeft(b))&&c(b)}),g=p(e,"keydown",function(b){b.keyCode!==a.ENTER&&b.keyCode!==a.SPACE||c(b)});return{remove:function(){b.remove();g.remove()}}};
l.release=function(e,c){var b=p(e,m.release,function(b){("mouseup"!=b.type||h.isLeft(b))&&c(b)}),g=p(e,"keyup",function(b){b.keyCode!==a.ENTER&&b.keyCode!==a.SPACE||c(b)});return{remove:function(){b.remove();g.remove()}}};l.move=m.move;return l})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(a,h,p,m){m.extend(h,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});
return p("dijit._FocusMixin",null,{_focusManager:a})})},"dojo/uacss":function(){define(["./dom-geometry","./_base/lang","./domReady","./sniff","./_base/window"],function(a,h,p,m,f){var e=f.doc.documentElement;f=m("ie");var l=m("trident"),g=m("opera"),c=Math.floor,b=m("ff"),q=a.boxModel.replace(/-/,""),g={dj_quirks:m("quirks"),dj_opera:g,dj_khtml:m("khtml"),dj_webkit:m("webkit"),dj_safari:m("safari"),dj_chrome:m("chrome"),dj_edge:m("edge"),dj_gecko:m("mozilla"),dj_ios:m("ios"),dj_android:m("android")};
f&&(g.dj_ie=!0,g["dj_ie"+c(f)]=!0,g.dj_iequirks=m("quirks"));l&&(g.dj_trident=!0,g["dj_trident"+c(l)]=!0);b&&(g["dj_ff"+c(b)]=!0);g["dj_"+q]=!0;var x="",y;for(y in g)g[y]&&(x+=y+" ");e.className=h.trim(e.className+" "+x);p(function(){if(!a.isBodyLtr()){var b="dj_rtl dijitRtl "+x.replace(/ /g,"-rtl ");e.className=h.trim(e.className+" "+b+"dj_rtl dijitRtl "+x.replace(/ /g,"-rtl "))}});return m})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(a,
h,p,m){p(function(){h("highcontrast")&&a.add(m.body(),"dijit_a11y")});return h})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),function(a,h,p,m,f,e,l){f.add("highcontrast",function(){var e=l.doc.createElement("div");try{e.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(h.blankGif||a.toUrl("./resources/blank.gif"))+'");';l.body().appendChild(e);
var c=m.getComputedStyle(e),b=c.backgroundImage;return c.borderTopColor==c.borderRightColor||b&&("none"==b||"url(invalid-url:)"==b)}catch(q){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+q.toString()),!1}finally{8>=f("ie")?e.outerHTML="":l.body().removeChild(e)}});e(function(){f("highcontrast")&&p.add(l.body(),"dj_a11y")});return f})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),
function(a,h,p,m,f,e,l,g){var c=h("dijit._TemplatedMixin",g,{templateString:null,templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(b){var a=this.declaredClass,c=this;return l.substitute(b,this,function(b,e){"!"==e.charAt(0)&&(b=m.getObject(e.substr(1),!1,c));if("undefined"==typeof b)throw Error(a+" template:"+e);return null==b?"":"!"==e.charAt(0)?b:this._escapeValue(""+b)},this)},_escapeValue:function(b){return b.replace(/["'<>&]/g,function(b){return{"\x26":"\x26amp;",
"\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[b]})},buildRendering:function(){if(!this._rendered){this.templateString||(this.templateString=a(this.templatePath,{sanitize:!0}));var b=c.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),e;if(m.isString(b)){if(e=p.toDom(this._stringRepl(b),this.ownerDocument),1!=e.nodeType)throw Error("Invalid template: "+b);}else e=b.cloneNode(!0);this.domNode=e}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);
this._rendered=!0},_fillContent:function(b){var a=this.containerNode;if(b&&a)for(;b.hasChildNodes();)a.appendChild(b.firstChild)}});c._templateCache={};c.getCachedTemplate=function(b,a,e){var g=c._templateCache,f=b,q=g[f];if(q){try{if(!q.ownerDocument||q.ownerDocument==(e||document))return q}catch(r){}p.destroy(q)}b=l.trim(b);if(a||b.match(/\$\{([^\}]+)\}/g))return g[f]=b;a=p.toDom(b,e);if(1!=a.nodeType)throw Error("Invalid template: "+b);return g[f]=a};e("ie")&&f(window,"unload",function(){var b=
c._templateCache,a;for(a in b){var e=b[a];"object"==typeof e&&p.destroy(e);delete b[a]}});return c})},"dojo/cache":function(){define(["./_base/kernel","./text"],function(a){return a.cache})},"dojo/text":function(){define(["./_base/kernel","require","./has","./has!host-browser?./request"],function(a,h,p,m){var f;p("host-browser")?f=function(b,a,c){m(b,{sync:!!a,headers:{"X-Requested-With":null}}).then(c)}:h.getText?f=h.getText:console.error("dojo/text plugin failed to load because loader does not support getText");
var e={},l=function(b){if(b){b=b.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var a=b.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);a&&(b=a[1])}else b="";return b},g={},c={};a.cache=function(b,a,c){var g;"string"==typeof b?/\//.test(b)?(g=b,c=a):g=h.toUrl(b.replace(/\./g,"/")+(a?"/"+a:"")):(g=b+"",c=a);b=void 0!=c&&"string"!=typeof c?c.value:c;c=c&&c.sanitize;if("string"==typeof b)return e[g]=b,c?l(b):b;if(null===b)return delete e[g],null;g in e||f(g,!0,function(b){e[g]=
b});return c?l(e[g]):e[g]};return{dynamic:!0,normalize:function(b,a){b=b.split("!");var c=b[0];return(/^\./.test(c)?a(c):c)+(b[1]?"!"+b[1]:"")},load:function(b,a,m){b=b.split("!");var q=1<b.length,t=b[0],u=a.toUrl(b[0]);b="url:"+u;var r=g,n=function(d){m(q?l(d):d)};t in e?r=e[t]:a.cache&&b in a.cache?r=a.cache[b]:u in e&&(r=e[u]);if(r===g)if(c[u])c[u].push(n);else{var w=c[u]=[n];f(u,!a.async,function(d){e[t]=e[u]=d;for(var b=0;b<w.length;)w[b++](d);delete c[u]})}else n(r)}}})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),
function(a,h,p,m,f,e,l,g,c){var b=f.delegate(g,{mouseenter:e.enter,mouseleave:e.leave,keypress:p._keypress}),q;p=m("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(b){for(var a=b;;)if(1==a.nodeType&&(this._processTemplateNode(a,function(b,a){return b.getAttribute(a)},this._attach)||
this.searchContainerNode)&&a.firstChild)a=a.firstChild;else{if(a==b)break;for(;!a.nextSibling;)if(a=a.parentNode,a==b)return;a=a.nextSibling}},_processTemplateNode:function(b,a,c){var e=!0,g=this.attachScope||this,n=a(b,"dojoAttachPoint")||a(b,"data-dojo-attach-point");if(n)for(var q=n.split(/\s*,\s*/);n=q.shift();)f.isArray(g[n])?g[n].push(b):g[n]=b,e="containerNode"!=n,this._attachPoints.push(n);if(a=a(b,"dojoAttachEvent")||a(b,"data-dojo-attach-event"))for(n=a.split(/\s*,\s*/),q=f.trim;a=n.shift();)if(a){var d=
null;-1!=a.indexOf(":")?(d=a.split(":"),a=q(d[0]),d=q(d[1])):a=q(a);d||(d=a);this._attachEvents.push(c(b,a,f.hitch(g,d)))}return e},_attach:function(c,e,g){e=e.replace(/^on/,"").toLowerCase();e="dijitclick"==e?q||(q=a("./a11yclick")):b[e]||e;return l(c,e,g)},_detachTemplateNodes:function(){var b=this.attachScope||this;h.forEach(this._attachPoints,function(a){delete b[a]});this._attachPoints=[];h.forEach(this._attachEvents,function(b){b.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();
this.inherited(arguments)}});f.extend(c,{dojoAttachEvent:"",dojoAttachPoint:""});return p})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x){h=h("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);a.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),
function(b){this.watch(b,e.hitch(this,"_setStateClass"))},this);for(var b in this.cssStateNodes||{})this._trackMouseState(this[b],this.cssStateNodes[b]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(b){if(!this.disabled)switch(b.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",
!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function b(d){c=c.concat(a.map(c,function(b){return b+d}),"dijit"+d)}var c=this.baseClass.split(" ");this.isLeftToRight()||b("Rtl");var e="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&b(e);this.state&&b(this.state);
this.selected&&b("Selected");this._opened&&b("Opened");this.disabled?b("Disabled"):this.readOnly?b("ReadOnly"):this.active?b("Active"):this.hovering&&b("Hover");this.focused&&b("Focused");var e=this.stateNode||this.domNode,g={};a.forEach(e.className.split(" "),function(d){g[d]=!0});"_stateClasses"in this&&a.forEach(this._stateClasses,function(d){delete g[d]});a.forEach(c,function(d){g[d]=!0});var n=[],f;for(f in g)n.push(f);e.className=n.join(" ");this._stateClasses=c},_subnodeCssMouseEvent:function(b,
a,c){function e(c){m.toggle(b,a+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":m.toggle(b,a+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":m.toggle(b,a+"Hover",!1);e(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":e(!0);break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":e(!1);break;case "focus":case "focusin":m.toggle(b,
a+"Focused",!0);break;case "blur":case "focusout":m.toggle(b,a+"Focused",!1)}},_trackMouseState:function(b,a){b._cssState=a}});g(function(){function a(b,a,c){if(!c||!p.isDescendant(c,a))for(;a&&a!=c;a=a.parentNode)if(a._cssState){var d=x.getEnclosingWidget(a);d&&(a==d.domNode?d._cssMouseEvent(b):d._subnodeCssMouseEvent(a,a._cssState,b))}}var e=b.body(),g;l(e,c.over,function(b){a(b,b.target,b.relatedTarget)});l(e,c.out,function(b){a(b,b.target,b.relatedTarget)});l(e,q.press,function(b){g=b.target;
a(b,g)});l(e,q.release,function(b){a(b,g);g=null});l(e,"focusin, focusout",function(b){var a=b.target;if(a._cssState&&!a.getAttribute("widgetId")){var c=x.getEnclosingWidget(a);c&&c._subnodeCssMouseEvent(a,a._cssState,b)}})});return h})},"dijit/form/_FormMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/on dojo/window".split(" "),function(a,h,p,m,f,e){return h("dijit.form._FormMixin",null,{state:"",_getDescendantFormWidgets:function(e){var g=[];a.forEach(e||
this.getChildren(),function(a){"value"in a?g.push(a):g=g.concat(this._getDescendantFormWidgets(a.getChildren()))},this);return g},reset:function(){a.forEach(this._getDescendantFormWidgets(),function(a){a.reset&&a.reset()})},validate:function(){var f=!1;return a.every(a.map(this._getDescendantFormWidgets(),function(a){a._hasBeenBlurred=!0;var c=a.disabled||!a.validate||a.validate();c||f||(e.scrollIntoView(a.containerNode||a.domNode),a.focus(),f=!0);return c}),function(a){return a})},setValues:function(a){p.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(e){var g={};a.forEach(this._getDescendantFormWidgets(),function(b){b.name&&(g[b.name]||(g[b.name]=[])).push(b)});for(var c in g)if(g.hasOwnProperty(c)){var b=g[c],f=m.getObject(c,!1,e);void 0!==f&&(f=[].concat(f),"boolean"==typeof b[0].checked?a.forEach(b,function(b){b.set("value",-1!=a.indexOf(f,b._get("value")))}):b[0].multiple?b[0].set("value",f):a.forEach(b,function(b,a){b.set("value",
f[a])}))}},getValues:function(){p.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var e={};a.forEach(this._getDescendantFormWidgets(),function(a){var c=a.name;if(c&&!a.disabled){var b=a.get("value");"boolean"==typeof a.checked?/Radio/.test(a.declaredClass)?!1!==b?m.setObject(c,b,e):(b=m.getObject(c,!1,e),void 0===b&&m.setObject(c,null,e)):(a=m.getObject(c,!1,e),a||(a=[],m.setObject(c,a,e)),!1!==b&&
a.push(b)):(a=m.getObject(c,!1,e),"undefined"!=typeof a?m.isArray(a)?a.push(b):m.setObject(c,[a,b],e):m.setObject(c,b,e))}});return e},isValid:function(){return""==this.state},onValidStateChange:function(){},_getState:function(){var e=a.map(this._descendants,function(a){return a.get("state")||""});return 0<=a.indexOf(e,"Error")?"Error":0<=a.indexOf(e,"Incomplete")?"Incomplete":""},disconnectChildren:function(){},connectChildren:function(e){this._descendants=this._getDescendantFormWidgets();a.forEach(this._descendants,
function(a){a._started||a.startup()});e||this._onChildChange()},_onChildChange:function(a){a&&"state"!=a&&"disabled"!=a||this._set("state",this._getState());a&&"value"!=a&&"disabled"!=a&&"checked"!=a||(this._onChangeDelayTimer&&this._onChangeDelayTimer.remove(),this._onChangeDelayTimer=this.defer(function(){delete this._onChangeDelayTimer;this._set("value",this.get("value"))},10))},startup:function(){this.inherited(arguments);this._descendants=this._getDescendantFormWidgets();this.value=this.get("value");
this.state=this._getState();var a=this;this.own(f(this.containerNode,"attrmodified-state, attrmodified-disabled, attrmodified-value, attrmodified-checked",function(e){e.target!=a.domNode&&a._onChildChange(e.type.replace("attrmodified-",""))}));this.watch("state",function(a,c,b){this.onValidStateChange(""==b)})},destroy:function(){this.inherited(arguments)}})})},"dijit/_DialogMixin":function(){define(["dojo/_base/declare","./a11y"],function(a,h){return a("dijit._DialogMixin",null,{actionBarTemplate:"",
execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=h._getTabNavigable(this.domNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}})})},"dijit/DialogUnderlay":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-style dojo/on dojo/window ./_Widget ./_TemplatedMixin ./BackgroundIframe ./Viewport ./main".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x){var y=a("dijit.DialogUnderlay",[g,c],{templateString:"\x3cdiv class\x3d'dijitDialogUnderlayWrapper'\x3e\x3cdiv class\x3d'dijitDialogUnderlay' tabIndex\x3d'-1' data-dojo-attach-point\x3d'node'\x3e\x3c/div\x3e\x3c/div\x3e",dialogId:"","class":"",_modalConnects:[],_setDialogIdAttr:function(b){m.set(this.node,"id",b+"_underlay");this._set("dialogId",b)},_setClassAttr:function(b){this.node.className="dijitDialogUnderlay "+b;this._set("class",b)},postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);
this.own(e(this.domNode,"keydown",h.hitch(this,"_onKeyDown")));this.inherited(arguments)},layout:function(){var b=this.node.style,a=this.domNode.style;a.display="none";var c=l.getBox(this.ownerDocument);a.top=c.t+"px";a.left=c.l+"px";b.width=c.w+"px";b.height=c.h+"px";a.display="block"},show:function(){this.domNode.style.display="block";this.open=!0;this.layout();this.bgIframe=new b(this.domNode);var a=l.get(this.ownerDocument);this._modalConnects=[q.on("resize",h.hitch(this,"layout")),e(a,"scroll",
h.hitch(this,"layout"))]},hide:function(){this.bgIframe.destroy();delete this.bgIframe;for(this.domNode.style.display="none";this._modalConnects.length;)this._modalConnects.pop().remove();this.open=!1},destroy:function(){for(;this._modalConnects.length;)this._modalConnects.pop().remove();this.inherited(arguments)},_onKeyDown:function(){}});y.show=function(b,a){var c=y._singleton;!c||c._destroyed?c=x._underlay=y._singleton=new y(b):b&&c.set(b);f.set(c.domNode,"zIndex",a);c.open||c.show()};y.hide=function(){var b=
y._singleton;b&&!b._destroyed&&b.hide()};return y})},"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(a,h,p,m,f,e,l,g){g.add("config-bgIframe",(g("ie")||g("trident"))&&!/IEMobile\/10\.0/.test(navigator.userAgent));var c=new function(){var b=[];this.pop=function(){var c;b.length?(c=b.pop(),c.style.display=""):(9>g("ie")?(c=p.dojoBlankHtmlUrl||a.toUrl("dojo/resources/blank.html")||'javascript:""',
c=document.createElement("\x3ciframe src\x3d'"+c+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e")):(c=m.create("iframe"),c.src='javascript:""',c.className="dijitBackgroundIframe",c.setAttribute("role","presentation"),f.set(c,"opacity",.1)),c.tabIndex=-1);return c};this.push=function(a){a.style.display="none";b.push(a)}};h.BackgroundIframe=function(b){if(!b.id)throw Error("no id");if(g("config-bgIframe")){var a=this.iframe=
c.pop();b.appendChild(a);7>g("ie")||g("quirks")?(this.resize(b),this._conn=l(b,"resize",e.hitch(this,"resize",b))):f.set(a,{width:"100%",height:"100%"})}};e.extend(h.BackgroundIframe,{resize:function(b){this.iframe&&f.set(this.iframe,{width:b.offsetWidth+"px",height:b.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),c.push(this.iframe),delete this.iframe)}});return h.BackgroundIframe})},"dijit/Viewport":function(){define(["dojo/Evented",
"dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(a,h,p,m,f){var e=new a,l;p(function(){var a=f.getBox();e._rlh=h(window,"resize",function(){var b=f.getBox();if(a.h!=b.h||a.w!=b.w)a=b,e.emit("resize")});if(8==m("ie")){var c=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=c&&(c=screen.deviceXDPI,e.emit("resize"))},500)}m("ios")&&(h(document,"focusin",function(b){l=b.target}),h(document,"focusout",function(b){l=null}))});e.getEffectiveBox=function(a){a=f.getBox(a);var c=l&&
l.tagName&&l.tagName.toLowerCase();m("ios")&&l&&!l.readOnly&&("textarea"==c||"input"==c&&/^(color|email|number|password|search|tel|text|url)$/.test(l.type))&&(a.h*=0==orientation||180==orientation?.66:.4,c=l.getBoundingClientRect(),a.h=Math.max(a.h,c.top+c.height));return a};return e})},"dijit/layout/ContentPane":function(){define("dojo/_base/kernel dojo/_base/lang ../_Widget ../_Container ./_ContentPaneResizeMixin dojo/string dojo/html dojo/_base/array dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-construct dojo/_base/xhr dojo/i18n dojo/when dojo/i18n!../nls/loading".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){return c("dijit.layout.ContentPane",[p,m,f],{href:"",content:"",extractContent:!1,parseOnLoad:!0,parserScope:a._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"\x3cspan class\x3d'dijitContentPaneLoading'\x3e\x3cspan class\x3d'dijitInline dijitIconLoading'\x3e\x3c/span\x3e${loadingState}\x3c/span\x3e",errorMessage:"\x3cspan class\x3d'dijitContentPaneError'\x3e\x3cspan class\x3d'dijitInline dijitIconError'\x3e\x3c/span\x3e${errorState}\x3c/span\x3e",
isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:!0,template:!1,markupFactory:function(b,a,d){var k=new d(b,a);return!k.href&&k._contentSetter&&k._contentSetter.parseDeferred&&!k._contentSetter.parseDeferred.isFulfilled()?k._contentSetter.parseDeferred.then(function(){return k}):k},create:function(b,a){if(!(b&&b.template||!a||"href"in b||"content"in b)){a=q.byId(a);for(var d=a.ownerDocument.createDocumentFragment();a.firstChild;)d.appendChild(a.firstChild);
b=h.delegate(b,{content:d})}this.inherited(arguments,[b,a])},postMixInProperties:function(){this.inherited(arguments);var b=u.getLocalization("dijit","loading",this.lang);this.loadingMessage=e.substitute(this.loadingMessage,b);this.errorMessage=e.substitute(this.errorMessage,b)},buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode);this.domNode.removeAttribute("title")},startup:function(){this.inherited(arguments);this._contentSetter&&g.forEach(this._contentSetter.parseResults,
function(b){b._started||b._destroyed||!h.isFunction(b.startup)||(b.startup(),b._started=!0)},this)},_startChildren:function(){g.forEach(this.getChildren(),function(b){b._started||b._destroyed||!h.isFunction(b.startup)||(b.startup(),b._started=!0)});this._contentSetter&&g.forEach(this._contentSetter.parseResults,function(b){b._started||b._destroyed||!h.isFunction(b.startup)||(b.startup(),b._started=!0)},this)},setHref:function(b){a.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.",
"","2.0");return this.set("href",b)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b(h.hitch(this,"cancel"));this.onLoadDeferred.then(h.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(b){a.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",b)},_setContentAttr:function(a){this._set("href",
"");this.cancel();this.onLoadDeferred=new b(h.hitch(this,"cancel"));this._created&&this.onLoadDeferred.then(h.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&-1==this._xhrDfd.fired&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},destroy:function(){this.cancel();this.inherited(arguments)},destroyRecursive:function(b){this._beingDestroyed||
this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new b(h.hitch(this,"cancel"));this.onLoadDeferred.then(h.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),!0);var b=this,a={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};
h.isObject(this.ioArgs)&&h.mixin(a,this.ioArgs);var d=this._xhrDfd=(this.ioMethod||t.get)(a),k;d.then(function(d){k=d;try{return b._isDownloaded=!0,b._setContent(d,!1)}catch(A){b._onError("Content",A)}},function(a){d.canceled||b._onError("Download",a);delete b._xhrDfd;return a}).then(function(){b.onDownloadEnd();delete b._xhrDfd;return k});delete this._hrefChanged},_onLoadHandler:function(b){this._set("isLoaded",!0);try{this.onLoadDeferred.resolve(b)}catch(w){console.error("Error "+this.widgetId+
" running custom onLoad code: "+w.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(n){console.error("Error "+this.widgetId+" running custom onUnload code: "+n.message)}},destroyDescendants:function(b){this.isLoaded&&this._onUnloadHandler();var a=this._contentSetter;g.forEach(this.getChildren(),function(d){d.destroyRecursive?d.destroyRecursive(b):d.destroy&&d.destroy(b);d._destroyed=!0});a&&(g.forEach(a.parseResults,function(d){d._destroyed||(d.destroyRecursive?
d.destroyRecursive(b):d.destroy&&d.destroy(b),d._destroyed=!0)}),delete a.parseResults);b||y.empty(this.containerNode);delete this._singleChild},_setContent:function(b,a){b=this.preprocessContent(b);this.destroyDescendants();var d=this._contentSetter;d&&d instanceof l._ContentSetter||(d=this._contentSetter=new l._ContentSetter({node:this.containerNode,_onError:h.hitch(this,this._onError),onContentError:h.hitch(this,function(d){d=this.onContentError(d);try{this.containerNode.innerHTML=d}catch(z){console.error("Fatal "+
this.id+" could not change content due to "+z.message,z)}})}));var k=h.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!b.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{}),k=d.set(h.isObject(b)&&b.domNode?b.domNode:b,k),c=this;return r(k&&k.then?k:d.parseDeferred,function(){delete c._contentSetterParams;a||(c._started&&(c._startChildren(),c._scheduleLayout()),c._onLoadHandler(b))})},
preprocessContent:function(b){return b},_onError:function(b,a,d){this.onLoadDeferred.reject(a);b=this["on"+b+"Error"].call(this,a);d?console.error(d,a):b&&this._setContent(b,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}})})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],
function(a,h,p,m){return h("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||(this.containerNode=this.domNode)},addChild:function(a,e){var f=this.containerNode;if(0<e){for(f=f.firstChild;0<e;)1==f.nodeType&&e--,f=f.nextSibling;f?e="before":(f=this.containerNode,e="last")}p.place(a.domNode,f,e);this._started&&!a._started&&a.startup()},removeChild:function(a){"number"==typeof a&&(a=this.getChildren()[a]);a&&(a=a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},
hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(f,e){var l=this.getChildren();f=a.indexOf(l,f);return l[f+e]},getIndexOfChild:function(f){return a.indexOf(this.getChildren(),f)}})})},"dijit/layout/_ContentPaneResizeMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/query ../registry ../Viewport ./utils".split(" "),function(a,h,p,m,f,e,l,g,c,b){return h("dijit.layout._ContentPaneResizeMixin",
null,{doLayout:!0,isLayoutContainer:!0,startup:function(){if(!this._started){var b=this.getParent();this._childOfLayoutWidget=b&&b.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;this.inherited(arguments);this._isShown()&&this._onShow();this._childOfLayoutWidget||this.own(c.on("resize",e.hitch(this,"resize")))}},_checkIfSingleChild:function(){if(this.doLayout){var b=[],a=!1;l("\x3e *",this.containerNode).some(function(c){var e=g.byNode(c);e&&e.resize?b.push(e):!/script|link|style/i.test(c.nodeName)&&
c.offsetHeight&&(a=!0)});this._singleChild=1!=b.length||a?null:b[0];p.toggle(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)}},resize:function(b,a){this._resizeCalled=!0;this._scheduleLayout(b,a)},_scheduleLayout:function(b,a){this._isShown()?this._layout(b,a):(this._needLayout=!0,this._changeSize=b,this._resultSize=a)},_layout:function(a,c){delete this._needLayout;this._wasShown||!1===this.open||this._onShow();a&&m.setMarginBox(this.domNode,a);var g=this.containerNode;g===this.domNode?
(c=c||{},e.mixin(c,a||{}),"h"in c&&"w"in c||(c=e.mixin(m.getMarginBox(g),c)),this._contentBox=b.marginBox2contentBox(g,c)):this._contentBox=m.getContentBox(g);this._layoutChildren()},_layoutChildren:function(){this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var b=this._contentBox||m.getContentBox(this.containerNode);this._singleChild.resize({w:b.w,h:b.h})}else for(var b=this.getChildren(),a,c=0;a=b[c++];)a.resize&&a.resize()},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&
"open"in this?this.open:this._resizeCalled;if("open"in this)return this.open;var b=this.domNode,a=this.domNode.parentNode;return"none"!=b.style.display&&"hidden"!=b.style.visibility&&!p.contains(b,"dijitHidden")&&a&&a.style&&"none"!=a.style.display},_onShow:function(){this._wasShown=!0;this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments)}})})},"dijit/layout/utils":function(){define(["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],
function(a,h,p,m,f){function e(a){return a.substring(0,1).toUpperCase()+a.substring(1)}function l(a,b){var c=a.resize?a.resize(b):p.setMarginBox(a.domNode,b);c?f.mixin(a,c):(f.mixin(a,p.getMarginBox(a.domNode)),f.mixin(a,b))}var g={marginBox2contentBox:function(a,b){var c=m.getComputedStyle(a),e=p.getMarginExtents(a,c),g=p.getPadBorderExtents(a,c);return{l:m.toPixelValue(a,c.paddingLeft),t:m.toPixelValue(a,c.paddingTop),w:b.w-(e.w+g.w),h:b.h-(e.h+g.h)}},layoutChildren:function(c,b,g,m,p){b=f.mixin({},
b);h.add(c,"dijitLayoutContainer");g=a.filter(g,function(b){return"center"!=b.region&&"client"!=b.layoutAlign}).concat(a.filter(g,function(b){return"center"==b.region||"client"==b.layoutAlign}));a.forEach(g,function(a){var c=a.domNode,g=a.region||a.layoutAlign;if(!g)throw Error("No region setting for "+a.id);var n=c.style;n.left=b.l+"px";n.top=b.t+"px";n.position="absolute";h.add(c,"dijitAlign"+e(g));c={};m&&m==a.id&&(c["top"==a.region||"bottom"==a.region?"h":"w"]=p);"leading"==g&&(g=a.isLeftToRight()?
"left":"right");"trailing"==g&&(g=a.isLeftToRight()?"right":"left");"top"==g||"bottom"==g?(c.w=b.w,l(a,c),b.h-=a.h,"top"==g?b.t+=a.h:n.top=b.t+b.h+"px"):"left"==g||"right"==g?(c.h=b.h,l(a,c),b.w-=a.w,"left"==g?b.l+=a.w:n.left=b.l+b.w+"px"):"client"!=g&&"center"!=g||l(a,b)})}};f.setObject("dijit.layout.utils",g);return g})},"dojo/html":function(){define("./_base/kernel ./_base/lang ./_base/array ./_base/declare ./dom ./dom-construct ./parser".split(" "),function(a,h,p,m,f,e,l){var g=0,c={_secureForInnerHtml:function(b){return b.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,
"")},_emptyNode:e.empty,_setNodeContent:function(b,a){e.empty(b);if(a)if("number"==typeof a&&(a=a.toString()),"string"==typeof a&&(a=e.toDom(a,b.ownerDocument)),!a.nodeType&&h.isArrayLike(a))for(var c=a.length,g=0;g<a.length;g=c==a.length?g+1:0)e.place(a[g],b,"last");else e.place(a,b,"last");return b},_ContentSetter:m("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:a._scopeName,startup:!0,constructor:function(b,a){h.mixin(this,
b||{});a=this.node=f.byId(this.node||a);this.id||(this.id=["Setter",a?a.id||a.tagName:"",g++].join("_"))},set:function(b,a){void 0!==b&&(this.content=b);"number"==typeof b&&(b=b.toString());a&&this._mixin(a);this.onBegin();this.setContent();return(b=this.onEnd())&&b.then?b:this.node},setContent:function(){var b=this.node;if(!b)throw Error(this.declaredClass+": setContent given no node");try{b=c._setNodeContent(b,this.content)}catch(x){var a=this.onContentError(x);try{b.innerHTML=a}catch(y){console.error("Fatal "+
this.declaredClass+".setContent could not change content due to "+y.message,y)}}this.node=b},empty:function(){this.parseDeferred&&(this.parseDeferred.isResolved()||this.parseDeferred.cancel(),delete this.parseDeferred);this.parseResults&&this.parseResults.length&&(p.forEach(this.parseResults,function(b){b.destroy&&b.destroy()}),delete this.parseResults);e.empty(this.node)},onBegin:function(){var b=this.content;if(h.isString(b)&&(this.cleanContent&&(b=c._secureForInnerHtml(b)),this.extractContent)){var a=
b.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);a&&(b=a[1])}this.empty();this.content=b;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.parseDeferred;delete this.node;delete this.content},onContentError:function(b){return"Error occurred setting content: "+b},onExecError:function(b){return"Error occurred executing scripts: "+b},_mixin:function(b){var a={},c;for(c in b)c in a||(this[c]=b[c])},_parse:function(){var b=
this.node;try{var a={};p.forEach(["dir","lang","textDir"],function(b){this[b]&&(a[b]=this[b])},this);var c=this;this.parseDeferred=l.parse({rootNode:b,noStart:!this.startup,inherited:a,scope:this.parserScope}).then(function(b){return c.parseResults=b},function(b){c._onError("Content",b,"Error parsing in _ContentSetter#"+this.id)})}catch(y){this._onError("Content",y,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(b,a,e){b=this["on"+b+"Error"].call(this,a);e?console.error(e,a):b&&c._setNodeContent(this.node,
b,!0)}}),set:function(b,a,e){void 0==a&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),a="");"number"==typeof a&&(a=a.toString());return e?(new c._ContentSetter(h.mixin(e,{content:a,node:b}))).set():c._setNodeContent(b,a,!0)}};h.setObject("dojo.html",c);return c})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){function n(d){return eval("("+d+")")}function w(d){var b=d._nameCaseMap,a=d.prototype;if(!b||b._extendCnt<k){var b=d._nameCaseMap={},c;for(c in a)"_"!==c.charAt(0)&&(b[c.toLowerCase()]=c);b._extendCnt=k}return b}function d(d,b){b||(b=a);var k=b._dojoParserCtorMap||(b._dojoParserCtorMap={}),c=d.join();if(!k[c]){for(var e=[],n=0,g=d.length;n<g;n++){var f=d[n];e[e.length]=k[f]=k[f]||p.getObject(f)||~f.indexOf("/")&&b(f)}d=e.shift();k[c]=e.length?d.createSubclass?
d.createSubclass(e):d.extend.apply(d,e):d}return k[c]}new Date("X");var k=0;c.after(p,"extend",function(){k++},!0);var v={_clearCache:function(){k++;_ctorMap={}},_functionFromScript:function(d,b){var a="",k="",c=d.getAttribute(b+"args")||d.getAttribute("args");b=d.getAttribute("with");c=(c||"").split(/\s*,\s*/);b&&b.length&&m.forEach(b.split(/\s*,\s*/),function(d){a+="with("+d+"){";k+="}"});return new Function(c,a+d.innerHTML+k)},instantiate:function(d,b,a){b=b||{};a=a||{};var k=(a.scope||h._scopeName)+
"Type",c="data-"+(a.scope||h._scopeName)+"-",e=c+"type",n=c+"mixins",g=[];m.forEach(d,function(d){var a=k in b?b[k]:d.getAttribute(e)||d.getAttribute(k);if(a){var c=d.getAttribute(n),a=c?[a].concat(c.split(/\s*,\s*/)):[a];g.push({node:d,types:a})}});return this._instantiate(g,b,a)},_instantiate:function(a,k,c,e){function n(d){k._started||c.noStart||m.forEach(d,function(d){"function"!==typeof d.startup||d._started||d.startup()});return d}a=m.map(a,function(b){var a=b.ctor||d(b.types,c.contextRequire);
if(!a)throw Error("Unable to resolve constructor for: '"+b.types.join()+"'");return this.construct(a,b.node,k,c,b.scripts,b.inherited)},this);return e?b(a).then(n):n(a)},construct:function(d,b,a,k,e,f){function v(d){F&&p.setObject(F,d);for(D=0;D<U.length;D++)c[U[D].advice||"after"](d,U[D].method,p.hitch(d,U[D].func),!0);for(D=0;D<T.length;D++)T[D].call(d);for(D=0;D<N.length;D++)d.watch(N[D].prop,N[D].func);for(D=0;D<Z.length;D++)u(d,Z[D].event,Z[D].func);return d}var r=d&&d.prototype;k=k||{};var l=
{};k.defaults&&p.mixin(l,k.defaults);f&&p.mixin(l,f);var A;y("dom-attributes-explicit")?A=b.attributes:y("dom-attributes-specified-flag")?A=m.filter(b.attributes,function(d){return d.specified}):(f=(/^input$|^img$/i.test(b.nodeName)?b:b.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),A=m.map(f.split(/\s+/),function(d){var a=d.toLowerCase();return{name:d,value:"LI"==b.nodeName&&"value"==d||"enctype"==a?b.getAttribute(a):b.getAttributeNode(a).value}}));
var x=k.scope||h._scopeName;f="data-"+x+"-";var z={};"dojo"!==x&&(z[f+"props"]="data-dojo-props",z[f+"type"]="data-dojo-type",z[f+"mixins"]="data-dojo-mixins",z[x+"type"]="dojotype",z[f+"id"]="data-dojo-id");for(var D=0,C,x=[],F,B;C=A[D++];){var L=C.name,R=L.toLowerCase();C=C.value;switch(z[R]||R){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":B=C;break;case "data-dojo-id":case "jsid":F=C;break;case "data-dojo-attach-point":case "dojoattachpoint":l.dojoAttachPoint=
C;break;case "data-dojo-attach-event":case "dojoattachevent":l.dojoAttachEvent=C;break;case "class":l["class"]=b.className;break;case "style":l.style=b.style&&b.style.cssText;break;default:if(L in r||(L=w(d)[R]||L),L in r)switch(typeof r[L]){case "string":l[L]=C;break;case "number":l[L]=C.length?Number(C):NaN;break;case "boolean":l[L]="false"!=C.toLowerCase();break;case "function":""===C||-1!=C.search(/[^\w\.]+/i)?l[L]=new Function(C):l[L]=p.getObject(C,!1)||new Function(C);x.push(L);break;default:R=
r[L],l[L]=R&&"length"in R?C?C.split(/\s*,\s*/):[]:R instanceof Date?""==C?new Date(""):"now"==C?new Date:q.fromISOString(C):R instanceof g?h.baseUrl+C:n(C)}else l[L]=C}}for(A=0;A<x.length;A++)z=x[A].toLowerCase(),b.removeAttribute(z),b[z]=null;if(B)try{B=n.call(k.propsThis,"{"+B+"}"),p.mixin(l,B)}catch(H){throw Error(H.toString()+" in data-dojo-props\x3d'"+B+"'");}p.mixin(l,a);e||(e=d&&(d._noScript||r._noScript)?[]:t("\x3e script[type^\x3d'dojo/']",b));var U=[],T=[],N=[],Z=[];if(e)for(D=0;D<e.length;D++)z=
e[D],b.removeChild(z),a=z.getAttribute(f+"event")||z.getAttribute("event"),k=z.getAttribute(f+"prop"),B=z.getAttribute(f+"method"),x=z.getAttribute(f+"advice"),A=z.getAttribute("type"),z=this._functionFromScript(z,f),a?"dojo/connect"==A?U.push({method:a,func:z}):"dojo/on"==A?Z.push({event:a,func:z}):l[a]=z:"dojo/aspect"==A?U.push({method:B,advice:x,func:z}):"dojo/watch"==A?N.push({prop:k,func:z}):T.push(z);d=(e=d.markupFactory||r.markupFactory)?e(l,b,d):new d(l,b);return d.then?d.then(v):v(d)},scan:function(b,
k){function c(d){if(!d.inherited){d.inherited={};var b=d.node,a=c(d.parent),b={dir:b.getAttribute("dir")||a.dir,lang:b.getAttribute("lang")||a.lang,textDir:b.getAttribute(l)||a.textDir},k;for(k in b)b[k]&&(d.inherited[k]=b[k])}return d.inherited}var e=[],n=[],g={},f=(k.scope||h._scopeName)+"Type",v="data-"+(k.scope||h._scopeName)+"-",r=v+"type",l=v+"textdir",v=v+"mixins",q=b.firstChild,t=k.inherited;if(!t){var u=function(d,b){return d.getAttribute&&d.getAttribute(b)||d.parentNode&&u(d.parentNode,
b)},t={dir:u(b,"dir"),lang:u(b,"lang"),textDir:u(b,l)},w;for(w in t)t[w]||delete t[w]}w={inherited:t};for(var A,z;;)if(q)if(1!=q.nodeType)q=q.nextSibling;else if(A&&"script"==q.nodeName.toLowerCase())(t=q.getAttribute("type"))&&/^dojo\/\w/i.test(t)&&A.push(q),q=q.nextSibling;else if(z)q=q.nextSibling;else if(t=q.getAttribute(r)||q.getAttribute(f),b=q.firstChild,t||b&&(3!=b.nodeType||b.nextSibling)){z=null;if(t){var p=q.getAttribute(v);A=p?[t].concat(p.split(/\s*,\s*/)):[t];try{z=d(A,k.contextRequire)}catch(U){}z||
m.forEach(A,function(d){~d.indexOf("/")&&!g[d]&&(g[d]=!0,n[n.length]=d)});p=z&&!z.prototype._noScript?[]:null;w={types:A,ctor:z,parent:w,node:q,scripts:p};w.inherited=c(w);e.push(w)}else w={node:q,scripts:A,parent:w};A=p;z=q.stopParser||z&&z.prototype.stopParser&&!k.template;q=b}else q=q.nextSibling;else{if(!w||!w.node)break;q=w.node.nextSibling;z=!1;w=w.parent;A=w.scripts}var y=new x;n.length?(k.contextRequire||a)(n,function(){y.resolve(m.filter(e,function(b){if(!b.ctor)try{b.ctor=d(b.types,k.contextRequire)}catch(Z){}for(var a=
b.parent;a&&!a.types;)a=a.parent;var c=b.ctor&&b.ctor.prototype;b.instantiateChildren=!(c&&c.stopParser&&!k.template);b.instantiate=!a||a.instantiate&&a.instantiateChildren;return b.instantiate}))}):y.resolve(e);return y.promise},_require:function(d,b){d=n("{"+d.innerHTML+"}");var k=[],c=[],e=new x;b=b&&b.contextRequire||a;for(var g in d)k.push(g),c.push(d[g]);b(c,function(){for(var d=0;d<k.length;d++)p.setObject(k[d],arguments[d]);e.resolve(arguments)});return e.promise},_scanAmd:function(d,b){var a=
new x,k=a.promise;a.resolve(!0);var c=this;t("script[type\x3d'dojo/require']",d).forEach(function(d){k=k.then(function(){return c._require(d,b)});d.parentNode.removeChild(d)});return k},parse:function(d,b){!d||"string"==typeof d||"nodeType"in d||(b=d,d=b.rootNode);var a=d?e.byId(d):l.body();b=b||{};var k=b.template?{template:!0}:{},c=[],n=this;d=this._scanAmd(a,b).then(function(){return n.scan(a,b)}).then(function(d){return n._instantiate(d,k,b,!0)}).then(function(d){return c=c.concat(d)}).otherwise(function(d){console.error("dojo/parser::parse() error",
d);throw d;});p.mixin(c,d);return c}};h.parser=v;f.parseOnLoad&&r(100,v,"parse");return v})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(a,h){var p={};a.setObject("dojo.date.stamp",p);p.fromISOString=function(a,f){p._isoRegExp||(p._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var e=p._isoRegExp.exec(a);a=null;if(e){e.shift();e[1]&&e[1]--;e[6]&&(e[6]*=1E3);f&&(f=new Date(f),h.forEach(h.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),
function(a){return f["get"+a]()}),function(a,b){e[b]=e[b]||a}));a=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);100>e[0]&&a.setFullYear(e[0]||1970);var l=0,g=e[7]&&e[7].charAt(0);"Z"!=g&&(l=60*(e[8]||0)+(Number(e[9])||0),"-"!=g&&(l*=-1));g&&(l-=a.getTimezoneOffset());l&&a.setTime(a.getTime()+6E4*l)}return a};p.toISOString=function(a,f){var e=function(b){return 10>b?"0"+b:b};f=f||{};var l=[],g=f.zulu?"getUTC":"get",c="";"time"!=f.selector&&(c=a[g+"FullYear"](),c=["0000".substr((c+
"").length)+c,e(a[g+"Month"]()+1),e(a[g+"Date"]())].join("-"));l.push(c);"date"!=f.selector&&(c=[e(a[g+"Hours"]()),e(a[g+"Minutes"]()),e(a[g+"Seconds"]())].join(":"),g=a[g+"Milliseconds"](),f.milliseconds&&(c+="."+(100>g?"0":"")+e(g)),f.zulu?c+="Z":"time"!=f.selector&&(a=a.getTimezoneOffset(),f=Math.abs(a),c+=(0<a?"-":"+")+e(Math.floor(f/60))+":"+e(f%60)),l.push(c));return l.join("T")};return p})},"esri/core/domUtils":function(){define(["dojo/on","dojo/dom-style","dojo/has"],function(a,h,p){var m=
{show:function(a){if(a=m.getNode(a))a.style.display="block"},getNode:function(a){return a&&a.domNode||a},hide:function(a){if(a=m.getNode(a))a.style.display="none"},toggle:function(a){if(a=m.getNode(a))a.style.display="none"===a.style.display?"block":"none"},documentBox:8>=p("ie")?{w:document.documentElement.clientWidth,h:document.documentElement.clientHeight}:{w:window.innerWidth,h:window.innerHeight},setScrollable:function(f){if(f=this.getNode(f)){var e=0,l=0,g=0,c=0,b=0,q=0;return[a(f,"touchstart",
function(a){e=a.touches[0].screenX;l=a.touches[0].screenY;g=f.scrollWidth;c=f.scrollHeight;b=f.clientWidth;q=f.clientHeight}),a(f,"touchmove",function(a){a.preventDefault();var m=f.firstChild;m instanceof Text&&(m=f.childNodes[1]);var t=m._currentX||0,u=m._currentY||0,t=t+(a.touches[0].screenX-e);0<t?t=0:0>t&&Math.abs(t)+b>g&&(t=-1*(g-b));m._currentX=t;u+=a.touches[0].screenY-l;0<u?u=0:0>u&&Math.abs(u)+q>c&&(u=-1*(c-q));m._currentY=u;h.set(m,{"-webkit-transition-property":"-webkit-transform","-webkit-transform":"translate("+
t+"px, "+u+"px)"});e=a.touches[0].screenX;l=a.touches[0].screenY})]}}};return m})},"esri/identity/Credential":function(){define(["./IdentityManagerBase"],function(a){return a.Credential})},"esri/identity/IdentityManagerBase":function(){define("../core/declare dojo/_base/config dojo/_base/lang dojo/_base/array dojo/Deferred dojo/_base/url dojo/sniff dojo/cookie dojo/io-query dojo/regexp ../kernel ../config ../core/lang ./ServerInfo ../core/urlUtils ../core/deferredUtils ../core/Accessor ../request ../core/Evented ./OAuthCredential ./OAuthInfo".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v){var A={},z=function(d){var b=(new e(d.owningSystemUrl)).host;d=(new e(d.server)).host;var a=/.+\.arcgis\.com$/i;return a.test(b)&&a.test(d)},D=function(d,b){return!!(z(d)&&b&&m.some(b,function(b){return b.test(d.server)}))},B;a=a(d,{declaredClass:"esri.identity.IdentityManagerBase",constructor:function(){this._portalConfig=p.getObject("esriGeowConfig");this.serverInfos=[];this.oAuthInfos=[];this.credentials=[];this._soReqs=[];this._xoReqs=[];this._portals=
[];this._getOAuthHash()},defaultOAuthInfo:null,defaultTokenValidity:60,tokenValidity:null,signInPage:null,useSignInPage:!0,normalizeWebTierAuth:!1,_busy:null,_oAuthHash:null,_gwTokenUrl:"/sharing/generateToken",_agsRest:"/rest/services",_agsPortal:/\/sharing(\/|$)/i,_agsAdmin:/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i,_adminSvcs:/\/admin\/services(\/|$)/i,_agolSuffix:".arcgis.com",_gwDomains:[{regex:/https?:\/\/www\.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"},
{regex:/https?:\/\/dev\.arcgis\.com/i,tokenServiceUrl:"https://dev.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*dev[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://devext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*qa[^.]*\.arcgis\.com/i,tokenServiceUrl:"https://qaext.arcgis.com/sharing/generateToken"},{regex:/https?:\/\/.*.arcgis\.com/i,tokenServiceUrl:"https://www.arcgis.com/sharing/generateToken"}],_legacyFed:[],_regexSDirUrl:/http.+\/rest\/services\/?/ig,_regexServerType:/(\/(MapServer|GeocodeServer|GPServer|GeometryServer|ImageServer|NAServer|FeatureServer|GeoDataServer|GlobeServer|MobileServer|GeoenrichmentServer|VectorTileServer|SceneServer)).*/ig,
_gwUser:/http.+\/users\/([^\/]+)\/?.*/i,_gwItem:/http.+\/items\/([^\/]+)\/?.*/i,_gwGroup:/http.+\/groups\/([^\/]+)\/?.*/i,_errorCodes:[499,498,403,401],_rePortalTokenSvc:/\/sharing(\/rest)?\/generatetoken/i,_publicUrls:[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],_createDefaultOAuthInfo:!0,_hasTestedIfAppIsOnPortal:!1,registerServers:function(d){var b=this.serverInfos;b?(d=m.filter(d,function(d){return!this.findServerInfo(d.server)},this),this.serverInfos=b.concat(d)):
this.serverInfos=d;m.forEach(d,function(d){d.owningSystemUrl&&this._portals.push(d.owningSystemUrl);if(d.hasPortal){this._portals.push(d.server);var b=x.request.corsEnabledServers,a=this._getOrigin(d.tokenServiceUrl);u.canUseXhr(d.server)||b.push(d.server.replace(/^https?:\/\//i,""));u.canUseXhr(a)||b.push(a.replace(/^https?:\/\//i,""))}},this)},registerOAuthInfos:function(d){var b=this.oAuthInfos;b?(d=m.filter(d,function(d){return!this.findOAuthInfo(d.portalUrl)},this),this.oAuthInfos=b.concat(d)):
this.oAuthInfos=d},registerToken:function(d){var b=this._sanitizeUrl(d.server),a=this.findServerInfo(b),k=!0,c;a||(a=new t,a.server=this._getServerInstanceRoot(b),a.tokenServiceUrl=this._getTokenSvcUrl(b),a.hasPortal=!0,this.registerServers([a]));(c=this.findCredential(b,d.userId))?(p.mixin(c,d),k=!1):(c=new B({userId:d.userId,server:a.server,token:d.token,expires:d.expires,ssl:d.ssl,scope:this._isServerRsrc(b)?"server":"portal"}),c.resources=[b],this.credentials.push(c));c.emitTokenChange(!1);k||
c.refreshServerTokens()},toJSON:function(){return y.fixJson({serverInfos:m.map(this.serverInfos,function(d){return d.toJSON()}),oAuthInfos:m.map(this.oAuthInfos,function(d){return d.toJSON()}),credentials:m.map(this.credentials,function(d){return d.toJSON()})})},initialize:function(d){if(d){p.isString(d)&&(d=JSON.parse(d));var b=d.serverInfos,a=d.oAuthInfos;d=d.credentials;if(b){var k=[];m.forEach(b,function(d){d.server&&d.tokenServiceUrl&&k.push(d.declaredClass?d:new t(d))});k.length&&this.registerServers(k)}if(a){var c=
[];m.forEach(a,function(d){d.appId&&c.push(d.declaredClass?d:new v(d))});c.length&&this.registerOAuthInfos(c)}d&&m.forEach(d,function(d){d.userId&&d.server&&d.token&&d.expires&&d.expires>(new Date).getTime()&&(d=d.declaredClass?d:new B(d),d.emitTokenChange(),this.credentials.push(d))},this)}},findServerInfo:function(d){var b;d=this._sanitizeUrl(d);m.some(this.serverInfos,function(a){this._hasSameServerInstance(a.server,d)&&(b=a);return!!b},this);return b},findOAuthInfo:function(d){var b;d=this._sanitizeUrl(d);
m.some(this.oAuthInfos,function(a){this._hasSameServerInstance(a.portalUrl,d)&&(b=a);return!!b},this);return b},findCredential:function(d,b){var a,k;d=this._sanitizeUrl(d);k=this._isServerRsrc(d)?"server":"portal";b?m.some(this.credentials,function(c){this._hasSameServerInstance(c.server,d)&&b===c.userId&&c.scope===k&&(a=c);return!!a},this):m.some(this.credentials,function(b){this._hasSameServerInstance(b.server,d)&&-1!==this._getIdenticalSvcIdx(d,b)&&b.scope===k&&(a=b);return!!a},this);return a},
getCredential:function(d,b){var a,k,c=!0;y.isDefined(b)&&(p.isObject(b)?(a=!!b.token,k=b.error,c=!1!==b.prompt):a=b);d=this._sanitizeUrl(d);var e=r.makeDeferredCancellingPending(),n=this._isAdminResource(d),g=a&&this._doPortalSignIn(d)?this._getEsriAuthCookie():null;a=a?this.findCredential(d):null;if(g||a)return d=Error("You are currently signed in as: '"+(g&&g.email||a&&a.userId)+"'. You do not have access to this resource: "+d),d.code="IdentityManagerBase.1",d.httpCode=k&&k.httpCode,d.messageCode=
k?k.messageCode:null,d.subcode=k?k.subcode:null,d.details=k?k.details:null,d.log=h.isDebug,e.reject(d),e.promise;if(k=this._findCredential(d,b))return e.resolve(k),e.promise;k=this.findServerInfo(d);if(k)!k.hasServer&&this._isServerRsrc(d)&&(k._restInfoDfd=this._getTokenSvcUrl(d,!0),k.hasServer=!0);else{g=this._getTokenSvcUrl(d);if(!g)return d=Error("Unknown resource - could not find token service endpoint."),d.code="IdentityManagerBase.2",d.log=h.isDebug,e.reject(d),e.promise;k=new t;k.server=this._getServerInstanceRoot(d);
p.isString(g)?(k.tokenServiceUrl=g,k.hasPortal=!0):(k._restInfoDfd=g,k.hasServer=!0);this.registerServers([k])}c&&k.hasPortal&&void 0===k._selfReq&&!this._findOAuthInfo(d)&&(k._selfReq={owningTenant:b&&b.owningTenant,selfDfd:this._getPortalSelf(k.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),d)});return this._enqueue(d,k,b,e,n)},getResourceName:function(d){return this._isRESTService(d)?d.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(d)&&
d.replace(this._gwUser,"$1")||this._gwItem.test(d)&&d.replace(this._gwItem,"$1")||this._gwGroup.test(d)&&d.replace(this._gwGroup,"$1")||""},generateToken:function(d,b,a){var k,c,n,g,f,v,r=this._rePortalTokenSvc.test(d.tokenServiceUrl),l=new e(window.location.href.toLowerCase()),t=this._getEsriAuthCookie(),m,x=!b;g=d.shortLivedTokenValidity;var z;b&&(z=q.id.tokenValidity||g||q.id.defaultTokenValidity,z>g&&(z=g));a&&(k=a.isAdmin,c=a.serverUrl,n=a.token,v=a.ssl,d.customParameters=a.customParameters);
k?g=d.adminTokenServiceUrl:(g=d.tokenServiceUrl,f=new e(g.toLowerCase()),t&&(m=(m=t.auth_tier)&&m.toLowerCase()),("web"===m||d.webTierAuth)&&a&&a.serverUrl&&!v&&"http"===l.scheme&&(u.hasSameOrigin(l.uri,g,!0)||"https"===f.scheme&&l.host===f.host&&"7080"===l.port&&"7443"===f.port)&&(g=g.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),x&&r&&(g=g.replace(/\/rest/i,"")));a=p.mixin({query:p.mixin({request:"getToken",username:b&&b.username,password:b&&b.password,serverUrl:c,token:n,expiration:z,
referer:k||r?window.location.host:null,client:k?"referer":null,f:"json"},d.customParameters),method:x?"auto":"post",disableIdentityLookup:!0,useProxy:this._useProxy(d,a),responseType:"json",callbackParamName:x?"callback":void 0},a&&a.ioArgs);r||(a.withCredentials=!1);return w(g,a).then(function(a){a=a.data;if(!a||!a.token)return a=Error("Unable to generate token"),a.code="IdentityManagerBase.3",a.log=h.isDebug,a;var k=d.server;A[k]||(A[k]={});b&&(A[k][b.username]=b.password);a.validity=z;return a})},
isBusy:function(){return!!this._busy},checkSignInStatus:function(d){return this.getCredential(d,{prompt:!1})},setRedirectionHandler:function(d){this._redirectFunc=d},setProtocolErrorHandler:function(d){this._protocolFunc=d},signIn:function(){},oAuthSignIn:function(){},destroyCredentials:function(){if(this.credentials){var d=this.credentials.slice();m.forEach(d,function(d){d.destroy()})}this.emit("credentials-destroy")},_getOAuthHash:function(){var d=window.location.hash;if(d){"#"===d.charAt(0)&&(d=
d.substring(1));var d=c.queryToObject(d),b=!1;d.access_token&&d.expires_in&&d.state&&d.hasOwnProperty("username")?(d.state=JSON.parse(d.state),this._oAuthHash=d,b=!0):d.error&&d.error_description&&(console.log("IdentityManager OAuth Error: ",d.error," - ",d.error_description),"access_denied"===d.error&&(b=!0));b&&(!l("ie")||8<l("ie"))&&(window.location.hash="")}},_findCredential:function(d,b){var a=-1,k,c,e,n=b&&b.token;b=b&&b.resource;var g=this._isServerRsrc(d)?"server":"portal",f=m.filter(this.credentials,
function(b){return this._hasSameServerInstance(b.server,d)&&b.scope===g},this);d=b||d;if(f.length)if(1===f.length)if(b=f[0],c=(k=(e=this.findServerInfo(b.server))&&e.owningSystemUrl)&&this.findCredential(k,b.userId),a=this._getIdenticalSvcIdx(d,b),n)-1!==a&&(b.resources.splice(a,1),this._removeResource(d,c));else return-1===a&&b.resources.push(d),this._addResource(d,c),b;else{var v,r;m.some(f,function(b){r=this._getIdenticalSvcIdx(d,b);return-1!==r?(v=b,c=(k=(e=this.findServerInfo(v.server))&&e.owningSystemUrl)&&
this.findCredential(k,v.userId),a=r,!0):!1},this);if(n)v&&(v.resources.splice(a,1),this._removeResource(d,c));else if(v)return this._addResource(d,c),v}},_findOAuthInfo:function(d){var b=this.findOAuthInfo(d);b||m.some(this.oAuthInfos,function(a){this._isIdProvider(a.portalUrl,d)&&(b=a);return!!b},this);return b},_addResource:function(d,b){b&&-1===this._getIdenticalSvcIdx(d,b)&&b.resources.push(d)},_removeResource:function(d,b){var a=-1;b&&(a=this._getIdenticalSvcIdx(d,b),-1<a&&b.resources.splice(a,
1))},_useProxy:function(d,b){return b&&b.isAdmin&&!u.hasSameOrigin(d.adminTokenServiceUrl,window.location.href)||!this._isPortalDomain(d.tokenServiceUrl)&&10.1==d.currentVersion&&!u.hasSameOrigin(d.tokenServiceUrl,window.location.href)},_getOrigin:function(d){d=new e(d);return d.scheme+"://"+d.host+(y.isDefined(d.port)?":"+d.port:"")},_getServerInstanceRoot:function(d){var b=d.toLowerCase(),a=b.indexOf(this._agsRest);-1===a&&this._isAdminResource(d)&&(a=b.indexOf("/admin"));-1===a&&(a=b.indexOf("/sharing"));
-1===a&&"/"===b.substr(-1)&&(a=b.length-1);return-1<a?d.substring(0,a):d},_hasSameServerInstance:function(d,b){d=d.toLowerCase();b=this._getServerInstanceRoot(b).toLowerCase();d=d.substr(d.indexOf(":"));b=b.substr(b.indexOf(":"));return d===b},_sanitizeUrl:function(d){d=u.normalize(p.trim(d));var b=(x.request.proxyUrl||"").toLowerCase(),a=b?d.toLowerCase().indexOf(b+"?"):-1;-1!==a&&(d=d.substring(a+b.length+1));return u.urlToObject(d).path},_isRESTService:function(d){return-1<d.indexOf(this._agsRest)},
_isAdminResource:function(d){return this._agsAdmin.test(d)||this._adminSvcs.test(d)},_isServerRsrc:function(d){return this._isRESTService(d)||this._isAdminResource(d)},_isIdenticalService:function(d,b){var a;this._isRESTService(d)&&this._isRESTService(b)?(d=this._getSuffix(d).toLowerCase(),b=this._getSuffix(b).toLowerCase(),a=d===b,a||(a=/(.*)\/(MapServer|FeatureServer).*/ig,a=d.replace(a,"$1")===b.replace(a,"$1"))):this._isAdminResource(d)&&this._isAdminResource(b)?a=!0:this._isServerRsrc(d)||this._isServerRsrc(b)||
!this._isPortalDomain(d)||(a=!0);return a},_isPortalDomain:function(d){d=d.toLowerCase();var b=(new e(d)).authority,a=this._portalConfig,k=-1!==b.indexOf(this._agolSuffix);!k&&a&&(k=this._hasSameServerInstance(this._getServerInstanceRoot(a.restBaseUrl),d));k||(!this._arcgisUrl&&(a=p.getObject("esri.arcgis.utils.arcgisUrl"))&&(this._arcgisUrl=(new e(a)).authority),this._arcgisUrl&&(k=this._arcgisUrl.toLowerCase()===b));k||(k=m.some(this._portals,function(b){return this._hasSameServerInstance(b,d)},
this));return k=k||this._agsPortal.test(d)},_isIdProvider:function(d,b){var a=-1,k=-1;m.forEach(this._gwDomains,function(c,e){-1===a&&c.regex.test(d)&&(a=e);-1===k&&c.regex.test(b)&&(k=e)});var c=!1;if(-1<a&&-1<k)if(0===a||4===a){if(0===k||4===k)c=!0}else if(1===a){if(1===k||2===k)c=!0}else 2===a?2===k&&(c=!0):3===a&&3===k&&(c=!0);if(!c){var e=this.findServerInfo(b),n=e&&e.owningSystemUrl;n&&z(e)&&this._isPortalDomain(n)&&this._isIdProvider(d,n)&&(c=!0)}return c},_isPublic:function(d){d=this._sanitizeUrl(d);
return m.some(this._publicUrls,function(b){return b.test(d)})},_getIdenticalSvcIdx:function(d,b){var a=-1;m.some(b.resources,function(b,k){return this._isIdenticalService(d,b)?(a=k,!0):!1},this);return a},_getSuffix:function(d){return d.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")},_getTokenSvcUrl:function(d){var b,a;if((b=this._isRESTService(d))||this._isAdminResource(d))return a=d.toLowerCase().indexOf(b?this._agsRest:"/admin/"),b=d.substring(0,a)+"/admin/generateToken",d=
d.substring(0,a)+"/rest/info",a=w(d,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(d){return d.data}),a.adminUrl_=b,a;if(this._isPortalDomain(d)){var k="";m.some(this._gwDomains,function(b){b.regex.test(d)&&(k=b.tokenServiceUrl);return!!k});k||m.some(this._portals,function(b){this._hasSameServerInstance(b,d)&&(k=b+this._gwTokenUrl);return!!k},this);k||(a=d.toLowerCase().indexOf("/sharing"),-1!==a&&(k=d.substring(0,a)+this._gwTokenUrl));k||(k=this._getOrigin(d)+
this._gwTokenUrl);k&&(b=(new e(d)).port,/^http:\/\//i.test(d)&&"7080"===b&&(k=k.replace(/:7080/i,":7443")),k=k.replace(/http:/i,"https:"));return k}if(-1!==d.toLowerCase().indexOf("premium.arcgisonline.com"))return"https://premium.arcgisonline.com/server/tokens"},_getPortalSelf:function(d,b){"https:"===window.location.protocol?d=d.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(b)&&(d=d.replace(/^https:/i,"http:").replace(/:7443/i,":7080"));return w(d,{query:{f:"json"},responseType:"json",
callbackParamName:"callback",crossOrigin:!1,disableIdentityLookup:!0}).then(function(d){return d.data})},_hasPortalSession:function(){return!!this._getEsriAuthCookie()},_getEsriAuthCookie:function(){var d;if(g.isSupported()){var b=this._getAllCookies("esri_auth"),a;for(a=0;a<b.length;a++){var k=JSON.parse(b[a]);if(k.portalApp){d=k;break}}}return d},_getAllCookies:function(d){var a=[],k=document.cookie.match(new RegExp("(?:^|; )"+b.escapeString(d)+"\x3d([^;]*)","g"));if(k)for(d=0;d<k.length;d++){var c=
k[d],e=c.indexOf("\x3d");-1<e&&(c=c.substring(e+1),a.push(decodeURIComponent(c)))}return a},_doPortalSignIn:function(d){if(g.isSupported()){var b=this._getEsriAuthCookie(),a=this._portalConfig,k=window.location.href,c=this.findServerInfo(d);if(this.useSignInPage&&(a||this._isPortalDomain(k)||b)&&(c?c.hasPortal||c.owningSystemUrl&&this._isPortalDomain(c.owningSystemUrl):this._isPortalDomain(d))&&(this._isIdProvider(k,d)||a&&(this._hasSameServerInstance(this._getServerInstanceRoot(a.restBaseUrl),d)||
this._isIdProvider(a.restBaseUrl,d))||u.hasSameOrigin(k,d,!0)))return!0}return!1},_checkProtocol:function(d,b,a,k){var c=!0;k=k?b.adminTokenServiceUrl:b.tokenServiceUrl;0!==p.trim(k).toLowerCase().indexOf("https:")||0===window.location.href.toLowerCase().indexOf("https:")||x.request.useCors&&(u.canUseXhr(k)||u.canUseXhr(u.getProxyUrl(!0).path))||(c=this._protocolFunc?!!this._protocolFunc({resourceUrl:d,serverInfo:b}):!1,c||(d=Error("Aborted the Sign-In process to avoid sending password over insecure connection."),
d.code="IdentityManagerBase.4",d.log=h.isDebug,console.log(d.message),a(d)));return c},_enqueue:function(d,b,a,k,c,e){k||(k=r.makeDeferredCancellingPending());k.resUrl_=d;k.sinfo_=b;k.options_=a;k.admin_=c;k.refresh_=e;this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(d),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(k)):this._xoReqs.push(k):this._doSignIn(k);return k.promise},_doSignIn:function(d){this._busy=d;var b=
this,a=function(a){var k=d.options_&&d.options_.resource,c=d.resUrl_,e=d.refresh_,n=!1;-1===m.indexOf(b.credentials,a)&&(e&&-1!==m.indexOf(b.credentials,e)?(e.userId=a.userId,e.token=a.token,e.expires=a.expires,e.validity=a.validity,e.ssl=a.ssl,e.creationTime=a.creationTime,n=!0,a=e):b.credentials.push(a));a.resources||(a.resources=[]);a.resources.push(k||c);a.scope=b._isServerRsrc(c)?"server":"portal";a.emitTokenChange();var k=b._soReqs,g={};b._soReqs=[];m.forEach(k,function(d){if(!this._isIdenticalService(c,
d.resUrl_)){var b=this._getSuffix(d.resUrl_);g[b]||(g[b]=!0,a.resources.push(d.resUrl_))}},b);d.resolve(a);m.forEach(k,function(d){d.resolve(a)});b._busy=d.resUrl_=d.sinfo_=d.refresh_=null;n||b.emit("credential-create",{credential:a});b._soReqs.length&&b._doSignIn(b._soReqs.shift());b._xoReqs.length&&b._doSignIn(b._xoReqs.shift())},c=function(a){d.reject(a);b._busy=d.resUrl_=d.sinfo_=d.refresh_=null;b._soReqs.length&&b._doSignIn(b._soReqs.shift());b._xoReqs.length&&b._doSignIn(b._xoReqs.shift())},
e=function(e,n,g,f){var v=d.sinfo_,r=!d.options_||!1!==d.options_.prompt,l=v.hasPortal&&b._findOAuthInfo(d.resUrl_);b._doPortalSignIn(d.resUrl_)?(e=b._getEsriAuthCookie(),l=b._portalConfig,e?a(new B({userId:e.email,server:v.server,token:e.token,expires:null})):r?(r="",e=window.location.href,r=b.signInPage?b.signInPage:l?l.baseUrl+l.signin:b._isIdProvider(e,d.resUrl_)?b._getOrigin(e)+"/home/signin.html":v.tokenServiceUrl.replace(b._rePortalTokenSvc,"")+"/home/signin.html",r=r.replace(/http:/i,"https:"),
l&&!1===l.useSSL&&(r=r.replace(/https:/i,"http:")),0===e.toLowerCase().replace("https","http").indexOf(r.toLowerCase().replace("https","http"))?(v=Error("Cannot redirect to Sign-In page from within Sign-In page. URL of the resource that triggered this workflow: "+d.resUrl_),v.code="IdentityManagerBase.5",v.log=h.isDebug,c(v)):b._redirectFunc?b._redirectFunc({signInPage:r,returnUrlParamName:"returnUrl",returnUrl:e,resourceUrl:d.resUrl_,serverInfo:v}):window.location=r+"?returnUrl\x3d"+window.escape(e)):
(v=Error("User is not signed in."),v.code="IdentityManagerBase.6",v.log=h.isDebug,c(v))):e?a(new B({userId:e,server:v.server,token:g,expires:y.isDefined(f)?Number(f):null,ssl:!!n})):l?(e=l._oAuthCred,e||(n=new k(l,window.localStorage),g=new k(l,window.sessionStorage),n.isValid()&&g.isValid()?n.expires>g.expires?(e=n,g.destroy()):(e=g,n.destroy()):e=n.isValid()?n:g,l._oAuthCred=e),e.isValid()?a(new B({userId:e.userId,server:v.server,token:e.token,expires:e.expires,ssl:e.ssl,_oAuthCred:e})):b._oAuthHash&&
b._oAuthHash.state.portalUrl===l.portalUrl?(r=b._oAuthHash,v=new B({userId:r.username,server:v.server,token:r.access_token,expires:(new Date).getTime()+1E3*Number(r.expires_in),ssl:"true"===r.ssl,oAuthState:r.state,_oAuthCred:e}),e.storage=r.persist?window.localStorage:window.sessionStorage,e.token=v.token,e.expires=v.expires,e.userId=v.userId,e.ssl=v.ssl,e.save(),b._oAuthHash=null,a(v)):r?d._pendingDfd=b.oAuthSignIn(d.resUrl_,v,l,d.options_).then(a,c):(v=Error("User is not signed in."),v.code="IdentityManagerBase.6",
v.log=h.isDebug,c(v))):r?b._checkProtocol(d.resUrl_,v,c,d.admin_)&&(r=d.options_,d.admin_&&(r=r||{},r.isAdmin=!0),d._pendingDfd=b.signIn(d.resUrl_,v,r).then(a,c)):(v=Error("User is not signed in."),v.code="IdentityManagerBase.6",v.log=h.isDebug,c(v))},n=function(){var k=d.sinfo_,e=k.owningSystemUrl,n=d.options_,g,f,v,r;n&&(g=n.token,f=n.error,v=n.prompt);r=b._findCredential(e,{token:g,resource:d.resUrl_});!r&&z(k)&&m.some(b.credentials,function(d){this._isIdProvider(e,d.server)&&(r=d);return!!r},
b);r?(n=b.findCredential(d.resUrl_,r.userId))?a(n):D(k,b._legacyFed)?(n=r.toJSON(),n.server=k.server,n.resources=null,a(new B(n))):(d._pendingDfd=b.generateToken(b.findServerInfo(r.server),null,{serverUrl:d.resUrl_,token:r.token,ssl:r.ssl})).then(function(b){a(new B({userId:r.userId,server:k.server,token:b.token,expires:y.isDefined(b.expires)?Number(b.expires):null,ssl:!!b.ssl,isAdmin:d.admin_,validity:b.validity}))},c):(b._busy=null,g&&(d.options_.token=null),(d._pendingDfd=b.getCredential(e.replace(/\/?$/,
"/sharing"),{resource:d.resUrl_,owningTenant:k.owningTenant,token:g,error:f,prompt:v})).then(function(a){b._enqueue(d.resUrl_,d.sinfo_,d.options_,d,d.admin_)},function(d){c(d)}))},g=d.sinfo_.owningSystemUrl,f=this._isServerRsrc(d.resUrl_),v=d.sinfo_._restInfoDfd;v?v.then(function(a){var k=d.sinfo_;k.adminTokenServiceUrl=k._restInfoDfd.adminUrl_;k._restInfoDfd=null;k.tokenServiceUrl=p.getObject("authInfo.tokenServicesUrl",!1,a)||p.getObject("authInfo.tokenServiceUrl",!1,a)||p.getObject("tokenServiceUrl",
!1,a);k.shortLivedTokenValidity=p.getObject("authInfo.shortLivedTokenValidity",!1,a);k.currentVersion=a.currentVersion;k.owningTenant=a.owningTenant;(a=k.owningSystemUrl=a.owningSystemUrl)&&b._portals.push(a);f&&a?n():e()},function(){d.sinfo_._restInfoDfd=null;var b=Error("Unknown resource - could not find token service endpoint.");b.code="IdentityManagerBase.2";b.log=h.isDebug;c(b)}):f&&g?n():d.sinfo_._selfReq?d.sinfo_._selfReq.selfDfd.then(function(a){var k={},c,e,n,g;a&&(c=a.user&&a.user.username,
k.username=c,k.allSSL=a.allSSL,e=a.supportsOAuth,n=a.currentVersion,"multitenant"===a.portalMode&&(g=a.customBaseUrl));d.sinfo_.webTierAuth=!!c;return c&&b.normalizeWebTierAuth?b.generateToken(d.sinfo_,null,{ssl:k.allSSL}).always(function(d){k.portalToken=d&&d.token;k.tokenExpiration=d&&d.expires;return k}):!c&&e&&4.4<=parseFloat(n)&&!b._doPortalSignIn(d.resUrl_)?b._generateOAuthInfo({portalUrl:d.sinfo_.server,customBaseUrl:g,owningTenant:d.sinfo_._selfReq.owningTenant}).always(function(){return k}):
k}).always(function(b){d.sinfo_._selfReq=null;b?e(b.username,b.allSSL,b.portalToken,b.tokenExpiration):e()}):e()},_generateOAuthInfo:function(d){var b=this,a,k=d.portalUrl,c=d.customBaseUrl,e=d.owningTenant;if(d=!this.defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal){a=window.location.href;var n=a.indexOf("?");-1<n&&(a=a.slice(0,n));n=a.search(/\/(apps|home)\//);a=-1<n?a.slice(0,n):null}d&&a?(this._hasTestedIfAppIsOnPortal=!0,d=w(a+"/sharing/rest",{query:{f:"json"},
responseType:"json"}).then(function(){b.defaultOAuthInfo=new v({appId:"arcgisonline",popup:!0,popupCallbackUrl:a+"/home/oauth-callback.html"})})):(d=new f,d.resolve(),d=d.promise);return d.then(function(){if(b.defaultOAuthInfo)return k=k.replace(/^http:/i,"https:"),w(k+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:e,client_id:b.defaultOAuthInfo.appId,redirect_uri:u.makeAbsolute(b.defaultOAuthInfo.popupCallbackUrl),f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(d){if(d.data.valid){var a=
b.defaultOAuthInfo.clone();a.portalUrl=d.data.urlKey&&c?"https://"+d.data.urlKey+"."+c:k;b.oAuthInfos.push(a)}})})}});B=n.createSubclass([d],{declaredClass:"esri.identity.Credential",constructor:function(d){d&&d._oAuthCred&&(this._oAuthCred=d._oAuthCred)},initialize:function(){this.resources=this.resources||[];y.isDefined(this.creationTime)||(this.creationTime=(new Date).getTime())},_oAuthCred:null,properties:{creationTime:{},expires:{},isAdmin:{},oAuthState:{},resources:{},scope:{},server:{},ssl:{},
token:{},tokenRefreshBuffer:2,userId:{},validity:{}},refreshToken:function(){var d=this,b=this.resources&&this.resources[0],a=q.id.findServerInfo(this.server),k=a&&a.owningSystemUrl,c=!!k&&"server"===this.scope,e=c&&D(a,q.id._legacyFed),n=c&&q.id.findServerInfo(k),g,f=(g=a.webTierAuth)&&q.id.normalizeWebTierAuth,v=A[this.server],v=v&&v[this.userId],r={username:this.userId,password:v},l;if(!g||f)if(c&&!n&&m.some(q.id.serverInfos,function(d){q.id._isIdProvider(k,d.server)&&(n=d);return!!n}),g=n&&q.id.findCredential(n.server,
this.userId),!c||g)if(e)g.refreshToken();else{if(c)l={serverUrl:b,token:g&&g.token,ssl:g&&g.ssl};else if(f)r=null,l={ssl:this.ssl};else if(v)this.isAdmin&&(l={isAdmin:!0});else{var t;b&&(b=q.id._sanitizeUrl(b),this._enqueued=1,t=q.id._enqueue(b,a,null,null,this.isAdmin,this),t.then(function(){d._enqueued=0;d.refreshServerTokens()}).then(null,function(){d._enqueued=0}));return t}return q.id.generateToken(c?n:a,c?null:r,l).then(function(b){d.token=b.token;d.expires=y.isDefined(b.expires)?Number(b.expires):
null;d.creationTime=(new Date).getTime();d.validity=b.validity;d.emitTokenChange();d.refreshServerTokens()}).then(null,function(){})}},refreshServerTokens:function(){"portal"===this.scope&&m.forEach(q.id.credentials,function(d){var b=q.id.findServerInfo(d.server),a=b&&b.owningSystemUrl;d!==this&&d.userId===this.userId&&a&&"server"===d.scope&&(q.id._hasSameServerInstance(this.server,a)||q.id._isIdProvider(a,this.server))&&(D(b,q.id._legacyFed)?(d.token=this.token,d.expires=this.expires,d.creationTime=
this.creationTime,d.validity=this.validity,d.emitTokenChange()):d.refreshToken())},this)},emitTokenChange:function(d){clearTimeout(this._refreshTimer);var b=this.server&&q.id.findServerInfo(this.server),a=(b=b&&b.owningSystemUrl)&&q.id.findServerInfo(b);!1!==d&&(!b||"portal"===this.scope||a&&a.webTierAuth&&!q.id.normalizeWebTierAuth)&&(y.isDefined(this.expires)||y.isDefined(this.validity))&&this._startRefreshTimer();this.emit("token-change")},destroy:function(){this.userId=this.server=this.token=
this.expires=this.validity=this.resources=this.creationTime=null;this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);var d=m.indexOf(q.id.credentials,this);-1<d&&q.id.credentials.splice(d,1);this.emitTokenChange();this.emit("destroy")},toJSON:function(){var d=y.fixJson({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),b=this.resources;b&&0<b.length&&(d.resources=
b);return d},_startRefreshTimer:function(){clearTimeout(this._refreshTimer);var d=6E4*this.tokenRefreshBuffer,b=(this.validity?this.creationTime+6E4*this.validity:this.expires)-(new Date).getTime();0>b&&(b=0);this._refreshTimer=setTimeout(p.hitch(this,this.refreshToken),b>d?b-d:b)}});a.Credential=B;return a})},"dojo/cookie":function(){define(["./_base/kernel","./regexp"],function(a,h){a.cookie=function(a,m,f){var e=document.cookie,l;if(1==arguments.length)l=(l=e.match(new RegExp("(?:^|; )"+h.escapeString(a)+
"\x3d([^;]*)")))?decodeURIComponent(l[1]):void 0;else{f=f||{};e=f.expires;if("number"==typeof e){var g=new Date;g.setTime(g.getTime()+864E5*e);e=f.expires=g}e&&e.toUTCString&&(f.expires=e.toUTCString());m=encodeURIComponent(m);var e=a+"\x3d"+m,c;for(c in f)e+="; "+c,g=f[c],!0!==g&&(e+="\x3d"+g);document.cookie=e}return l};a.cookie.isSupported=function(){"cookieEnabled"in navigator||(this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled="CookiesAllowed"==this("__djCookieTest__"),navigator.cookieEnabled&&
this("__djCookieTest__","",{expires:-1}));return navigator.cookieEnabled};return a.cookie})},"esri/identity/ServerInfo":function(){define(["../core/declare","dojo/_base/lang","../core/lang"],function(a,h,p){return a(null,{declaredClass:"esri.identity.ServerInfo",constructor:function(a){h.mixin(this,a)},toJSON:function(){return p.fixJson({server:this.server,tokenServiceUrl:this.tokenServiceUrl,adminTokenServiceUrl:this.adminTokenServiceUrl,shortLivedTokenValidity:this.shortLivedTokenValidity,owningSystemUrl:this.owningSystemUrl,
owningTenant:this.owningTenant,currentVersion:this.currentVersion,hasPortal:this.hasPortal,hasServer:this.hasServer,webTierAuth:this.webTierAuth})}})})},"esri/identity/OAuthCredential":function(){define(["../core/declare"],function(a){return a(null,{declaredClass:"esri.identity.OAuthCredential",oAuthInfo:null,storage:null,expires:null,ssl:null,token:null,userId:null,constructor:function(a,p){this.oAuthInfo=a;this.storage=p;this._init()},isValid:function(){var a=!1;if(this.oAuthInfo&&this.token&&this.userId){var p=
(new Date).getTime();this.expires>p&&(this.expires-p)/1E3>60*this.oAuthInfo.minTimeUntilExpiration&&(a=!0)}return a},save:function(){if(this.storage){var a=this._load(),p=this.oAuthInfo;if(p&&p.authNamespace&&p.portalUrl){var m=a[p.authNamespace];m||(m=a[p.authNamespace]={});m[p.portalUrl]={expires:this.expires,ssl:this.ssl,token:this.token,userId:this.userId};try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(a))}catch(f){console.log(f)}}}},destroy:function(){var a=this._load(),p=this.oAuthInfo;
if(p&&p.authNamespace&&p.portalUrl&&this.storage){var m=a[p.authNamespace];if(m){delete m[p.portalUrl];try{this.storage.setItem("esriJSAPIOAuth",JSON.stringify(a))}catch(f){console.log(f)}}}p&&(this.oAuthInfo=p._oAuthCred=null)},_init:function(){var a=this._load(),p=this.oAuthInfo;p&&p.authNamespace&&p.portalUrl&&(a=a[p.authNamespace])&&(a=a[p.portalUrl])&&(this.expires=a.expires,this.ssl=a.ssl,this.token=a.token,this.userId=a.userId)},_load:function(){var a={};if(this.storage){var p=this.storage.getItem("esriJSAPIOAuth");
if(p)try{a=JSON.parse(p)}catch(m){console.log(m)}}return a}})})},"esri/identity/OAuthInfo":function(){define(["../core/lang","../core/declare","dojo/_base/lang"],function(a,h,p){var m=h(null,{declaredClass:"esri.identity.OAuthInfo",constructor:function(a){p.mixin(this,{expiration:20160,minTimeUntilExpiration:30,portalUrl:"https://www.arcgis.com",authNamespace:"/",forceLogin:!1,showSocialLogins:!1,popup:!1,popupCallbackUrl:"oauth-callback.html",popupWindowFeatures:"height\x3d480,width\x3d800,location,resizable,scrollbars,status"},
a)},_oAuthCred:null,toJSON:function(){return a.fixJson({appId:this.appId,expiration:this.expiration,locale:this.locale,minTimeUntilExpiration:this.minTimeUntilExpiration,portalUrl:this.portalUrl,authNamespace:this.authNamespace,forceLogin:this.forceLogin,showSocialLogins:this.showSocialLogins,popup:this.popup,popupCallbackUrl:this.popupCallbackUrl,popupWindowFeatures:this.popupWindowFeatures})},clone:function(){return new m(this.toJSON())}});return m})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),
function(a,h,p,m,f,e,l,g,c,b){m("dijit-legacy-requires")&&l(0,function(){a(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});l=h("dijit.form.Button"+(m("dojo-bidi")?"_NoBidi":""),[g,c],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:b,_setValueAttr:"valueNode",_setNameAttr:function(b){this.valueNode&&this.valueNode.setAttribute("name",b)},postCreate:function(){this.inherited(arguments);
this._setLabelFromContainer()},_setLabelFromContainer:function(){this.containerNode&&!this.label&&(this.label=e.trim(this.containerNode.innerHTML),this.onLabelSet())},_setShowLabelAttr:function(b){this.containerNode&&p.toggle(this.containerNode,"dijitDisplayNone",!b);this._set("showLabel",b)},setLabel:function(b){f.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",b)},onLabelSet:function(){this.inherited(arguments);this.showLabel||
"title"in this.params||(this.titleNode.title=e.trim(this.containerNode.innerText||this.containerNode.textContent||""))}});m("dojo-bidi")&&(l=h("dijit.form.Button",l,{onLabelSet:function(){this.inherited(arguments);this.titleNode.title&&this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(b){this._created&&this.textDir!=b&&(this._set("textDir",b),this._setLabelAttr(this.label))}}));return l})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),
function(a,h,p,m,f,e,l,g){h("dijit-legacy-requires")&&m(0,function(){require(["dijit/form/_FormValueWidget"])});return a("dijit.form._FormWidget",[f,l,e,g],{setDisabled:function(a){p.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},setValue:function(a){p.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){p.deprecated(this.declaredClass+
"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=this.name&&!h("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(a,h,p,m,f,e,l,g,c,b){return h("dijit.form._FormWidgetMixin",
null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(c){this._set("disabled",c);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?p.set(this.focusNode,"disabled",c):this.focusNode.setAttribute("aria-disabled",c?"true":"false");this.valueNode&&p.set(this.valueNode,"disabled",c);c?(this._set("hovering",!1),
this._set("active",!1),c="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",a.forEach(f.isArray(c)?c:[c],function(a){a=this[a];g("webkit")||b.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(b){if("mouse"==b&&this.isFocusable())var a=this.own(l(this.focusNode,"focus",function(){t.remove();a.remove()}))[0],e=g("pointer-events")?
"pointerup":g("MSPointer")?"MSPointerUp":g("touch-events")?"touchend, mouseup":"mouseup",t=this.own(l(this.ownerDocumentBody,e,f.hitch(this,function(b){t.remove();a.remove();this.focused&&("touchend"==b.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){c.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=m.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(q){}},
compare:function(b,a){return"number"==typeof b&&"number"==typeof a?isNaN(b)&&isNaN(a)?0:b-a:b>a?1:b<a?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(b,a){void 0!=this._lastValueReported||null!==a&&this._onChangeActive||(this._resetValue=this._lastValueReported=b);this._pendingOnChange=this._pendingOnChange||typeof b!=typeof this._lastValueReported||0!=this.compare(b,this._lastValueReported);(this.intermediateChanges||a||void 0===a)&&this._pendingOnChange&&(this._lastValueReported=
b,this._pendingOnChange=!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(b)})))},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],
function(a,h,p,m){var f=a("dijit.form._ButtonMixin"+(p("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(a){a.stopPropagation();a.preventDefault();this.disabled||this.valueNode.click(a);return!1},_onClick:function(a){if(this.disabled)return a.stopPropagation(),a.preventDefault(),!1;!1===this.onClick(a)&&a.preventDefault();var e=a.defaultPrevented;if(!e&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var g=this.domNode;g.parentNode;g=g.parentNode){var c=m.byNode(g);
if(c&&"function"==typeof c._onSubmit){c._onSubmit(a);a.preventDefault();e=!0;break}}return!e},postCreate:function(){this.inherited(arguments);h.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(a){this._set("label",a);(this.containerNode||this.focusNode).innerHTML=a;this.onLabelSet()},onLabelSet:function(){}});p("dojo-bidi")&&(f=a("dijit.form._ButtonMixin",f,{onLabelSet:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));
return f})},"dijit/form/Form":function(){define("dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/sniff ../_Widget ../_TemplatedMixin ./_FormMixin ../layout/_ContentPaneResizeMixin".split(" "),function(a,h,p,m,f,e,l,g){return a("dijit.form.Form",[f,e,l,g],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"\x3cform data-dojo-attach-point\x3d'containerNode' data-dojo-attach-event\x3d'onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}\x3e\x3c/form\x3e",
postMixInProperties:function(){this.nameAttrSetting=this.name?"name\x3d'"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){h.set(this.domNode,"encType",a);m("ie")&&(this.domNode.encoding=a);this._set("encType",a)},reset:function(a){var b={returnValue:!0,preventDefault:function(){this.returnValue=!1},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};!1!==this.onReset(b)&&b.returnValue&&
this.inherited(arguments,[])},onReset:function(){return!0},_onReset:function(a){this.reset(a);a.stopPropagation();a.preventDefault();return!1},_onSubmit:function(a){var b=this.constructor.prototype;if(this.execute!=b.execute||this.onExecute!=b.onExecute)p.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0"),this.onExecute(),this.execute(this.getValues());!1===this.onSubmit(a)&&(a.stopPropagation(),a.preventDefault())},onSubmit:function(){return this.isValid()},
submit:function(){!1!==this.onSubmit()&&this.containerNode.submit()}})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),function(a,h,p,m,f,e,l){var g=a("dijit.form.ValidationTextBox",f,{templateString:l,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",
regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(a,b){b!=g.prototype[a]&&(h.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+a+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",b))},_setRegExpGenAttr:function(a){this._deprecateRegExp("regExpGen",a);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(a){this._deprecateRegExp("regExp",a)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},
validator:function(a,b){return(new RegExp("^(?:"+this._computeRegexp(b)+")"+(this.required?"":"?")+"$")).test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||void 0!==this.parse(a,b))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.get("constraints"))},_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){var a="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:
this.invalidMessage?this.invalidMessage:this.promptMessage,b="$_unset_$"==this.missingMessage?this.messages.missingMessage:this.missingMessage?this.missingMessage:a;return this.required&&this._isEmpty(this.textbox.value)?b:a},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var b="",c=this.disabled||this.isValid(a);c&&(this._maskValidSubsetError=!0);var e=this._isEmpty(this.textbox.value),g=!c&&a&&this._isValidSubset();this._set("state",c?"":((!this._hasBeenBlurred||
a)&&e||g)&&(this._maskValidSubsetError||g&&!this._hasBeenBlurred&&a)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=a&&g,b=this.getErrorMessage(a)):"Incomplete"==this.state?(b=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):e&&(b=this.getPromptMessage(a));this.set("message",b);return c},displayMessage:function(a){a&&this.focused?e.show(a,this.domNode,this.tooltipPosition,
!this.isLeftToRight()):e.hide(this.domNode)},_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(a){this.constraints=p.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(a){!a.locale&&this.lang&&(a.locale=this.lang);this._set("constraints",a);this._refreshState()},_setPatternAttr:function(a){this._set("pattern",a);this._refreshState()},
_computeRegexp:function(a){var b=this.pattern;"function"==typeof b&&(b=b.call(this,a));if(b!=this._lastRegExp){var c="";this._lastRegExp=b;".*"!=b&&b.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(b){switch(b.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=b;break;case ")":c+="|$)";break;default:c+="(?:"+b+"|$)"}});try{"".search(c)}catch(x){c=this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre="^(?:"+
c+")$"}return b},postMixInProperties:function(){this.inherited(arguments);this.messages=m.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=
!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){e.hide(this.domNode);this.inherited(arguments)}});return g})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){g=a("dijit.form.TextBox"+(l("dojo-bidi")?"_NoBidi":""),
[g,c],{templateString:b,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',_buttonInputDisabled:l("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var b=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==b||"file"==b)&&this.templateString==this.constructor.prototype.templateString)this.templateString=
this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>l("ie")&&this.defer(function(){try{var b=p.getComputedStyle(this.domNode);if(b){var a=b.fontFamily;if(a){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(b=0;b<c.length;b++)c[b].style.fontFamily=a}}}catch(u){}})},_setPlaceHolderAttr:function(b){this._set("placeHolder",b);this._phspan||(this._attachPoints.push("_phspan"),this._phspan=h.create("span",{className:"dijitPlaceHolder dijitInputField"},
this.textbox,"after"),this.own(e(this._phspan,"mousedown",function(b){b.preventDefault()}),e(this._phspan,"touchend, pointerup, MSPointerUp",f.hitch(this,function(){this.focus()}))));this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(b));this._updatePlaceHolder()},_onInput:function(b){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},
_setValueAttr:function(b,a,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){m.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(b){m.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",b)},_onBlur:function(b){this.disabled||(this.inherited(arguments),
this._updatePlaceHolder(),l("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(b){this.disabled||this.readOnly||(this.inherited(arguments),this._updatePlaceHolder())}});9>l("ie")&&(g.prototype._isTextSelected=function(){var b=this.ownerDocument.selection.createRange();return b.parentElement()==this.textbox&&0<b.text.length},q._setSelectionRange=c._setSelectionRange=function(b,a,c){b.createTextRange&&(b=b.createTextRange(),b.collapse(!0),
b.moveStart("character",-99999),b.moveStart("character",a),b.moveEnd("character",c-a),b.select())});l("dojo-bidi")&&(g=a("dijit.form.TextBox",g,{_setPlaceHolderAttr:function(b){this.inherited(arguments);this.applyTextDir(this._phspan)}}));return g})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(a,h,p,m){return a("dijit.form._FormValueWidget",[p,m],{_layoutHackIE7:function(){if(7==h("ie"))for(var a=this.domNode,e=a.parentNode,
l=a.firstChild||a,g=l.style.filter,c=this;e&&0==e.clientHeight;)(function(){var b=c.connect(e,"onscroll",function(){c.disconnect(b);l.style.filter=(new Date).getMilliseconds();c.defer(function(){l.style.filter=g})})})(),e=e.parentNode}})})},"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(a,h,p,m,f,e){return a("dijit.form._FormValueMixin",e,{readOnly:!1,_setReadOnlyAttr:function(a){h.set(this.focusNode,
"readOnly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(a,e){this._handleOnChange(a,e)},_handleOnChange:function(a,e){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),
function(a,h,p,m,f,e,l,g){var c=h("dijit.form._TextBoxMixin"+(m("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(b,a,c){var e;void 0!==b&&(e=this.filter(b),"string"!=typeof c&&(c=null===e||"number"==typeof e&&isNaN(e)?"":this.filter(this.format(e,this.constraints)),0!=this.compare(e,this.filter(this.parse(c,this.constraints)))&&
(c=null)));null==c||"number"==typeof c&&isNaN(c)||this.textbox.value==c||(this.textbox.value=c,this._set("displayedValue",this.get("displayedValue")));this.inherited(arguments,[e,a])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(b){null==b?b="":"string"!=typeof b&&(b=String(b));this.textbox.value=b;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(b){return null==
b?"":b.toString?b.toString():b},parse:function(b){return b},_refreshState:function(){},onInput:function(){},_onInput:function(b){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||b);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),!1)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);
this.inherited(arguments);this.own(l(this.textbox,"keydown, keypress, paste, cut, compositionend",e.hitch(this,function(b){var a;if("keydown"==b.type&&229!=b.keyCode){a=b.keyCode;switch(a){case f.SHIFT:case f.ALT:case f.CTRL:case f.META:case f.CAPS_LOCK:case f.NUM_LOCK:case f.SCROLL_LOCK:return}if(!b.ctrlKey&&!b.metaKey&&!b.altKey){switch(a){case f.NUMPAD_0:case f.NUMPAD_1:case f.NUMPAD_2:case f.NUMPAD_3:case f.NUMPAD_4:case f.NUMPAD_5:case f.NUMPAD_6:case f.NUMPAD_7:case f.NUMPAD_8:case f.NUMPAD_9:case f.NUMPAD_MULTIPLY:case f.NUMPAD_PLUS:case f.NUMPAD_ENTER:case f.NUMPAD_MINUS:case f.NUMPAD_PERIOD:case f.NUMPAD_DIVIDE:return}if(65<=
a&&90>=a||48<=a&&57>=a||a==f.SPACE)return;a=!1;for(var c in f)if(f[c]===b.keyCode){a=!0;break}if(!a)return}}(a=32<=b.charCode?String.fromCharCode(b.charCode):b.charCode)||(a=65<=b.keyCode&&90>=b.keyCode||48<=b.keyCode&&57>=b.keyCode||b.keyCode==f.SPACE?String.fromCharCode(b.keyCode):b.keyCode);a||(a=229);if("keypress"==b.type){if("string"!=typeof a)return;if("a"<=a&&"z">=a||"A"<=a&&"Z">=a||"0"<=a&&"9">=a||" "===a)if(b.ctrlKey||b.metaKey||b.altKey)return}var g={faux:!0},t;for(t in b)/^(layer[XY]|returnValue|keyLocation)$/.test(t)||
(c=b[t],"function"!=typeof c&&"undefined"!=typeof c&&(g[t]=c));e.mixin(g,{charOrCode:a,_wasConsumed:!1,preventDefault:function(){g._wasConsumed=!0;b.preventDefault()},stopPropagation:function(){b.stopPropagation()}});this._lastInputProducingEvent=g;!1===this.onInput(g)&&(g.preventDefault(),g.stopPropagation());if(!g._wasConsumed&&9>=m("ie"))switch(b.keyCode){case f.TAB:case f.ESCAPE:case f.DOWN_ARROW:case f.UP_ARROW:case f.LEFT_ARROW:case f.RIGHT_ARROW:break;default:b.keyCode==f.ENTER&&"textarea"!=
this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&l.emit(this.textbox,"input",{bubbles:!0})})}})),l(this.textbox,"input",e.hitch(this,"_onInput")),l(this.domNode,"keypress",function(b){b.stopPropagation()}))},_blankValue:"",filter:function(b){if(null===b)return this._blankValue;if("string"!=typeof b)return b;this.trim&&(b=e.trim(b));this.uppercase&&(b=b.toUpperCase());this.lowercase&&(b=b.toLowerCase());this.propercase&&(b=b.replace(/[^\s]+/g,
function(b){return b.substring(0,1).toUpperCase()+b.substring(1)}));return b},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(b){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(b){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==b&&(this._selectOnClickHandle=l.once(this.domNode,"mouseup, touchend",e.hitch(this,function(b){this._isTextSelected()||
c.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});m("dojo-bidi")&&(c=h("dijit.form._TextBoxMixin",c,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);
this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));c._setSelectionRange=g._setSelectionRange=function(b,a,c){b.setSelectionRange&&b.setSelectionRange(a,c)};c.selectInputText=g.selectInputText=function(b,a,e){b=p.byId(b);isNaN(a)&&(a=0);isNaN(e)&&(e=b.value?b.value.length:0);try{b.focus(),c._setSelectionRange(b,a,e)}catch(y){}};return c})},"dijit/Tooltip":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/fx dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff ./_base/manager ./place ./_Widget ./_TemplatedMixin ./BackgroundIframe dojo/text!./templates/Tooltip.html ./main".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w){function d(){}var k=h("dijit._MasterTooltip",[t,u],{duration:x.defaultDuration,templateString:n,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new r(this.domNode);this.fadeIn=p.fadeIn({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onShow")});this.fadeOut=p.fadeOut({node:this.domNode,duration:this.duration,onEnd:g.hitch(this,"_onHide")})},show:function(b,a,k,c,e,n,f){if(!this.aroundNode||this.aroundNode!==
a||this.containerNode.innerHTML!=b)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=b;e&&this.set("textDir",e);this.containerNode.align=c?"right":"left";var r=y.around(this.domNode,a,k&&k.length?k:v.defaultPosition,!c,g.hitch(this,"orient")),t=r.aroundNodePos;"M"==r.corner.charAt(0)&&"M"==r.aroundCorner.charAt(0)?(this.connectorNode.style.top=t.y+(t.h-this.connectorNode.offsetHeight>>1)-r.y+"px",this.connectorNode.style.left=""):"M"==r.corner.charAt(1)&&
"M"==r.aroundCorner.charAt(1)?this.connectorNode.style.left=t.x+(t.w-this.connectorNode.offsetWidth>>1)-r.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");l.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=a;this.onMouseEnter=n||d;this.onMouseLeave=f||d}},orient:function(d,b,a,k,c){this.connectorNode.style.top="";var n=k.h;k=k.w;d.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove",
"BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[b+"-"+a];this.domNode.style.width="auto";var g=e.position(this.domNode);if(q("ie")||q("trident"))g.w+=2;e.setMarginBox(this.domNode,{w:Math.min(Math.max(k,1),g.w)});"B"==a.charAt(0)&&"B"==b.charAt(0)?(d=e.position(d),b=this.connectorNode.offsetHeight,
d.h>n?(this.connectorNode.style.top=n-(c.h+b>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(c.h/2-b/2,0),d.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,g.w-k)},_onShow:function(){q("ie")&&(this.domNode.style.filter="")},hide:function(b){this._onDeck&&this._onDeck[1]==b?this._onDeck=null:this.aroundNode===b&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=
null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=d},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});q("dojo-bidi")&&k.extend({_setAutoTextDir:function(d){this.applyTextDir(d);a.forEach(d.children,function(d){this._setAutoTextDir(d)},this)},_setTextDirAttr:function(d){this._set("textDir",d);"auto"==d?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});w.showTooltip=
function(d,b,c,e,n,g,f){c&&(c=a.map(c,function(d){return{after:"after-centered",before:"before-centered"}[d]||d}));v._masterTT||(w._masterTT=v._masterTT=new k);return v._masterTT.show(d,b,c,e,n,g,f)};w.hideTooltip=function(d){return v._masterTT&&v._masterTT.hide(d)};var v=h("dijit.Tooltip",t,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(d){a.forEach(this._connections||[],function(d){a.forEach(d,function(d){d.remove()})},this);this._connectIds=
a.filter(g.isArrayLike(d)?d:d?[d]:[],function(d){return m.byId(d,this.ownerDocument)},this);this._connections=a.map(this._connectIds,function(d){d=m.byId(d,this.ownerDocument);var a=this.selector,k=a?function(d){return b.selector(a,d)}:function(d){return d},e=this;return[b(d,k(c.enter),function(){e._onHover(this)}),b(d,k("focusin"),function(){e._onHover(this)}),b(d,k(c.leave),g.hitch(e,"_onUnHover")),b(d,k("focusout"),g.hitch(e,"set","state","DORMANT"))]},this);this._set("connectId",d)},addTarget:function(d){d=
d.id||d;-1==a.indexOf(this._connectIds,d)&&this.set("connectId",this._connectIds.concat(d))},removeTarget:function(d){d=a.indexOf(this._connectIds,d.id||d);0<=d&&(this._connectIds.splice(d,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);f.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var d=this.connectId;a.forEach(g.isArrayLike(d)?d:[d],this.addTarget,this)},getContent:function(d){return this.label||this.domNode.innerHTML},
state:"DORMANT",_setStateAttr:function(d){if(!(this.state==d||"SHOW TIMER"==d&&"SHOWING"==this.state||"HIDE TIMER"==d&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(d){case "DORMANT":this._connectNode&&(v.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")},
this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}v.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,g.hitch(this,"set","state","SHOWING"),g.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",d)}},_onHover:function(d){this._connectNode&&d!=this._connectNode&&
this.set("state","DORMANT");this._connectNode=d;this.set("state","SHOW TIMER")},_onUnHover:function(d){this.set("state","HIDE TIMER")},open:function(d){this.set("state","DORMANT");this._connectNode=d;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");a.forEach(this._connections||[],function(d){a.forEach(d,function(d){d.remove()})},this);this.inherited(arguments)}});v._MasterTooltip=k;v.show=
w.showTooltip;v.hide=w.hideTooltip;v.defaultPosition=["after-centered","before-centered"];return v})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(a,h,p,m,f,e,l){function g(b,c,g,l){var t=e.getEffectiveBox(b.ownerDocument);b.parentNode&&"body"==String(b.parentNode.tagName).toLowerCase()||f.body(b.ownerDocument).appendChild(b);var m=null;a.some(c,function(a){var d=a.corner,k=a.pos,c=0,e=
{w:{L:t.l+t.w-k.x,R:k.x-t.l,M:t.w}[d.charAt(1)],h:{T:t.t+t.h-k.y,B:k.y-t.t,M:t.h}[d.charAt(0)]},n=b.style;n.left=n.right="auto";g&&(c=g(b,a.aroundCorner,d,e,l),c="undefined"==typeof c?0:c);var f=b.style,r=f.display,q=f.visibility;"none"==f.display&&(f.visibility="hidden",f.display="");n=h.position(b);f.display=r;f.visibility=q;r={L:k.x,R:k.x-n.w,M:Math.max(t.l,Math.min(t.l+t.w,k.x+(n.w>>1))-n.w)}[d.charAt(1)];q={T:k.y,B:k.y-n.h,M:Math.max(t.t,Math.min(t.t+t.h,k.y+(n.h>>1))-n.h)}[d.charAt(0)];k=Math.max(t.l,
r);f=Math.max(t.t,q);r=Math.min(t.l+t.w,r+n.w)-k;q=Math.min(t.t+t.h,q+n.h)-f;c+=n.w-r+(n.h-q);if(null==m||c<m.overflow)m={corner:d,aroundCorner:a.aroundCorner,x:k,y:f,w:r,h:q,overflow:c,spaceAvailable:e};return!c});m.overflow&&g&&g(b,m.aroundCorner,m.corner,m.spaceAvailable,l);c=m.y;var r=m.x,n=f.body(b.ownerDocument);/relative|absolute/.test(p.get(n,"position"))&&(c-=p.get(n,"marginTop"),r-=p.get(n,"marginLeft"));n=b.style;n.top=c+"px";n.left=r+"px";n.right="auto";return m}var c={TL:"BR",TR:"BL",
BL:"TR",BR:"TL"};return l.place={at:function(b,e,f,l,t){f=a.map(f,function(b){var a={corner:b,aroundCorner:c[b],pos:{x:e.x,y:e.y}};l&&(a.pos.x+="L"==b.charAt(1)?l.x:-l.x,a.pos.y+="T"==b.charAt(0)?l.y:-l.y);return a});return g(b,f,t)},around:function(b,c,e,f,l){function t(d,b){C.push({aroundCorner:d,corner:b,pos:{x:{L:A,R:A+y,M:A+(y>>1)}[d.charAt(1)],y:{T:x,B:x+B,M:x+(B>>1)}[d.charAt(0)]}})}var r;if("string"==typeof c||"offsetWidth"in c||"ownerSVGElement"in c){if(r=h.position(c,!0),/^(above|below)/.test(e[0])){var n=
h.getBorderExtents(c),q=c.firstChild?h.getBorderExtents(c.firstChild):{t:0,l:0,b:0,r:0},d=h.getBorderExtents(b),k=b.firstChild?h.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0};r.y+=Math.min(n.t+q.t,d.t+k.t);r.h-=Math.min(n.t+q.t,d.t+k.t)+Math.min(n.b+q.b,d.b+k.b)}}else r=c;if(c.parentNode)for(n="absolute"==p.getComputedStyle(c).position,c=c.parentNode;c&&1==c.nodeType&&"BODY"!=c.nodeName;){q=h.position(c,!0);d=p.getComputedStyle(c);/relative|absolute/.test(d.position)&&(n=!1);if(!n&&/hidden|auto|scroll/.test(d.overflow)){var k=
Math.min(r.y+r.h,q.y+q.h),v=Math.min(r.x+r.w,q.x+q.w);r.x=Math.max(r.x,q.x);r.y=Math.max(r.y,q.y);r.h=k-r.y;r.w=v-r.x}"absolute"==d.position&&(n=!0);c=c.parentNode}var A=r.x,x=r.y,y="w"in r?r.w:r.w=r.width,B="h"in r?r.h:(m.deprecated("place.around: dijit/place.__Rectangle: { x:"+A+", y:"+x+", height:"+r.height+", width:"+y+" } has been deprecated.  Please use { x:"+A+", y:"+x+", h:"+r.height+", w:"+y+" }","","2.0"),r.h=r.height),C=[];a.forEach(e,function(d){var b=f;switch(d){case "above-centered":t("TM",
"BM");break;case "below-centered":t("BM","TM");break;case "after-centered":b=!b;case "before-centered":t(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":t(b?"TL":"TR",b?"TR":"TL");t(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":t(b?"BL":"BR",b?"TL":"TR");t(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":t(b?"TL":"TR",b?"BL":"BR");t(b?"TR":"TL",b?"BR":"BL");break;default:t(d.aroundCorner,d.corner)}});b=g(b,C,l,{w:y,h:B});b.aroundNodePos=r;return b}}})},
"esri/identity/OAuthSignInHandler":function(){define("./Credential ../core/domUtils ../core/lang ../core/urlUtils dijit/Dialog dijit/registry dojo/_base/config dojo/Deferred dojo/_base/kernel dojo/dom-attr dojo/i18n!./nls/identity dojo/io-query dojo/sniff dijit/form/Button dojo/query".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y){return{_oAuthDfd:null,_oAuthIntervalId:0,_oAuthDialogContent:"\x3cdiv class\x3d'dijitDialogPaneContentArea'\x3e\x3cdiv style\x3d'padding-bottom: 5px; word-wrap: break-word;'\x3e{oAuthInfo}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'esriErrorMsg' style\x3d'display: none; color: white; background-color: #D46464; text-align: center; padding-top: 3px; padding-bottom: 3px;'\x3e{invalidUser}\x3c/div\x3e\x3cdiv style\x3d'margin: 0px; padding: 0px; height: 10px;'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitDialogPaneActionBar'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdSubmit\"'\x3e{lblOk}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' data-dojo-props\x3d'type:\"button\", \"class\":\"esriIdCancel\"'\x3e{lblCancel}\x3c/button\x3e\x3c/div\x3e",
setOAuthRedirectionHandler:function(b){this._oAuthRedirectFunc=b},oAuthSignIn:function(a,c,e,n){var f=this._oAuthDfd=new g;f.resUrl_=a;f.sinfo_=c;f.oinfo_=e;var d=!n||!1!==n.oAuthPopupConfirmation;if(!e.popup||!d)return this._doOAuthSignIn(a,c,e),f.promise;this._nls||(this._nls=q);this.oAuthDialog||(this.oAuthDialog=this._createOAuthDialog());a=this.oAuthDialog;c=n&&n.error;n=n&&n.token;h.hide(a.errMsg_);c&&403==c.code&&n&&(b.set(a.errMsg_,"innerHTML",this._nls.forbidden),h.show(a.errMsg_));a.show();
return f.promise},setOAuthResponseHash:function(b){var c=this._oAuthDfd;this._oAuthDfd=null;if(c&&b)if(clearInterval(this._oAuthIntervalId),"#"===b.charAt(0)&&(b=b.substring(1)),b=x.queryToObject(b),b.error)b=Error("access_denied"===b.error?"ABORTED":"OAuth: "+b.error+" - "+b.error_description),b.code="IdentityManagerBase.2",b.log=l.isDebug,c.reject(b);else{var e=c.oinfo_._oAuthCred,n=new a({userId:b.username,server:c.sinfo_.server,token:b.access_token,expires:(new Date).getTime()+1E3*Number(b.expires_in),
ssl:"true"===b.ssl,_oAuthCred:e});e.storage=b.persist?window.localStorage:window.sessionStorage;e.token=n.token;e.expires=n.expires;e.userId=n.userId;e.ssl=n.ssl;e.save();c.resolve(n)}},_createOAuthDialog:function(){var b=this._nls,a=p.substitute(b,this._oAuthDialogContent),g=new f({title:b.title,content:a,"class":"esri-widget esriOAuthSignInDialog esriIdentityDialog",style:"min-width: 18em;",esriIdMgr_:this,execute_:function(){var b=g.esriIdMgr_._oAuthDfd;g.hide_();g.esriIdMgr_._doOAuthSignIn(b.resUrl_,
b.sinfo_,b.oinfo_)},cancel_:function(){var b=g.esriIdMgr_._oAuthDfd;g.esriIdMgr_._oAuthDfd=null;g.hide_();var a=Error("ABORTED");a.code="IdentityManager.2";a.log=l.isDebug;b.reject(a)},hide_:function(){h.hide(g.errMsg_);g.hide();f._DialogLevelManager.hide(g)}}),b=g.domNode;g.btnSubmit_=e.byNode(c.query(".esriIdSubmit",b)[0]);g.btnCancel_=e.byNode(c.query(".esriIdCancel",b)[0]);g.errMsg_=c.query(".esriErrorMsg",b)[0];g.connect(g.btnSubmit_,"onClick",g.execute_);g.connect(g.btnCancel_,"onClick",g.onCancel);
g.connect(g,"onCancel",g.cancel_);return g},_doOAuthSignIn:function(b,a,c){var e=this,g={client_id:c.appId,response_type:"token",state:JSON.stringify({portalUrl:c.portalUrl}),expiration:c.expiration,locale:c.locale,redirect_uri:c.popup?m.makeAbsolute(c.popupCallbackUrl):window.location.href.replace(/#.*$/,"")};c.forceLogin&&(g.force_login=!0);c.showSocialLogins&&(g.showSocialLogins=!0);var d=c.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",k=d+"?"+x.objectToQuery(g);if(c.popup){var f;
7===y("ie")?(f=window.open(c.popupCallbackUrl,"esriJSAPIOAuth",c.popupWindowFeatures),f.location=k):f=window.open(k,"esriJSAPIOAuth",c.popupWindowFeatures);f?(f.focus(),this._oAuthDfd.oAuthWin_=f,this._oAuthIntervalId=setInterval(function(){if(f.closed){clearInterval(e._oAuthIntervalId);var d=e._oAuthDfd;if(d){var b=Error("ABORTED");b.code="IdentityManager.2";b.log=l.isDebug;d.reject(b)}}},500)):(b=Error("ABORTED"),b.code="IdentityManager.2",b.log=l.isDebug,this._oAuthDfd.reject(b))}else this._oAuthRedirectFunc?
this._oAuthRedirectFunc({authorizeParams:g,authorizeUrl:d,resourceUrl:b,serverInfo:a,oAuthInfo:c}):window.location=k}}})},"esri/portal/PortalQueryParams":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/kebabDictionary ../geometry/Extent ../geometry/support/webMercatorUtils ../geometry/SpatialReference dojo/_base/lang".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){var x=l({avgRating:"avg-rating",
numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});a=y=function(a){function e(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(e,a);Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(b){"asc"!==b&&"desc"!==b||this._set("sortOrder",b)},enumerable:!0,configurable:!0});e.prototype.clone=function(){return new y({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})};e.prototype.toRequestOptions=function(a,e){var n;if(this.extent){var d=c.project(this.extent,b.WGS84);d&&(n=d.xmin+","+d.ymin+","+d.xmax+","+d.ymax)}d=this.query;!this.disableExtraQuery&&a.extraQuery&&(d="("+d+")"+a.extraQuery);a={bbox:n,q:d,num:this.num,sortField:null,sortOrder:null,start:this.start};this.sortField&&(a.sortField=x.toJSON(this.sortField),
a.sortOrder=this.sortOrder);return{query:q.mixin(e,a)}};return e}(f.declared(e));m([f.property()],a.prototype,"disableExtraQuery",void 0);m([f.property({type:g})],a.prototype,"extent",void 0);m([f.property()],a.prototype,"num",void 0);m([f.property()],a.prototype,"query",void 0);m([f.property()],a.prototype,"sortField",void 0);m([f.property()],a.prototype,"sortOrder",null);m([f.property()],a.prototype,"start",void 0);a=y=m([f.subclass("esri.portal.PortalQueryParams")],a);var y;return a})},"esri/core/kebabDictionary":function(){define(["require",
"exports"],function(a,h){return function(a){var m={},f;for(f in a)m[a[f]]=f;var e=function(a){return m.hasOwnProperty(a)?m[a]:a},l=function(e){return a.hasOwnProperty(e)?a[e]:e};return{toJSON:e,fromJSON:l,read:function(a){return l(a)},write:function(a,c,b){c[b]=e(a)}}}})},"esri/portal/PortalQueryResult":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),function(a,h,p,m,f,e){a=function(a){function e(c){c=
a.call(this)||this;c.nextQueryParams=null;c.queryParams=null;c.results=null;c.total=null;return c}p(e,a);return e}(f.declared(e));m([f.property()],a.prototype,"nextQueryParams",void 0);m([f.property()],a.prototype,"queryParams",void 0);m([f.property()],a.prototype,"results",void 0);m([f.property()],a.prototype,"total",void 0);return a=m([f.subclass("esri.portal.PortalQueryResult")],a)})},"esri/portal/PortalUser":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalFolder ./PortalGroup ../core/promiseUtils ../core/requireUtils dojo/promise/all".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x){h=function(f){function l(){var b=f.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;return b}p(l,f);Object.defineProperty(l.prototype,"thumbnailUrl",{get:function(){var b=this.url,a=this.thumbnail;return b&&a?this.portal._normalizeUrl(b+"/info/"+a):null},enumerable:!0,
configurable:!0});Object.defineProperty(l.prototype,"userContentUrl",{get:function(){var b=this.get("portal.restUrl");return b?b+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"url",{get:function(){var b=this.get("portal.restUrl");return b?b+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});l.prototype.addItem=function(b){var a=this,c=b&&b.item,e=b&&b.data;b=b&&b.folder;var d={method:"post"};c&&(d.query=c._getPostQuery(),
null!=e&&("string"===typeof e?d.query.text=e:"object"===typeof e&&(d.query.text=JSON.stringify(e))));e=this.userContentUrl;b&&(e+="/"+b.id);return this.portal._request(e+"/addItem",d).then(function(d){c.id=d.id;c.portal=a.portal;return c.loaded?c._reload():c.load()})};l.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=null;b.portal=null})};l.prototype.fetchFolders=
function(){var b=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(a){return a&&a.folders?a.folders.map(function(a){a=g.fromJSON(a);a.portal=b.portal;return a}):[]})};l.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=c.fromJSON(a);a.portal=b.portal;return a}):[]})};l.prototype.fetchItems=function(b){var c=this;b||(b={});var e=this.userContentUrl;b.folder&&(e+="/"+b.folder.id);
var g;return q.when(a,"./PortalItem").then(function(d){g=d;return c.portal._request(e,{query:{folders:!1,num:b.num||10,start:b.start||1}})}).then(function(d){var b;return d&&d.items?(b=d.items.map(function(d){d=g.fromJSON(d);d.portal=c.portal;d.load();return d}),x(b).always(function(){return{items:b,nextStart:d.nextStart,total:d.total}})):{items:[],nextStart:-1,total:0}})};l.prototype.queryFavorites=function(a){return this.favGroupId?(this._favGroup||(this._favGroup=new c({id:this.favGroupId,portal:this.portal})),
this._favGroup.queryItems(a)):b.reject(new e("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};l.prototype.toJSON=function(){throw new e("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};return l}(f.declared(l));m([f.property()],h.prototype,"access",void 0);m([f.property({type:Date})],h.prototype,"created",void 0);m([f.property()],h.prototype,"culture",void 0);m([f.property()],h.prototype,"description",void 0);m([f.property()],h.prototype,
"email",void 0);m([f.property()],h.prototype,"favGroupId",void 0);m([f.property()],h.prototype,"fullName",void 0);m([f.property({type:Date})],h.prototype,"modified",void 0);m([f.property()],h.prototype,"orgId",void 0);m([f.property()],h.prototype,"portal",void 0);m([f.property()],h.prototype,"preferredView",void 0);m([f.property()],h.prototype,"privileges",void 0);m([f.property()],h.prototype,"region",void 0);m([f.property()],h.prototype,"role",void 0);m([f.property()],h.prototype,"roleId",void 0);
m([f.property()],h.prototype,"thumbnail",void 0);m([f.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],h.prototype,"thumbnailUrl",null);m([f.property()],h.prototype,"units",void 0);m([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],h.prototype,"userContentUrl",null);m([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],h.prototype,"url",null);m([f.property()],h.prototype,"username",void 0);return h=m([f.subclass("esri.portal.PortalUser")],h)})},"esri/portal/PortalFolder":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport".split(" "),
function(a,h,p,m,f,e,l){a=function(a){function c(b){b=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 e("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};return c}(f.declared(l));m([f.property({type:Date})],
a.prototype,"created",void 0);m([f.property()],a.prototype,"id",void 0);m([f.property()],a.prototype,"portal",void 0);m([f.property()],a.prototype,"title",void 0);m([f.property({dependsOn:["portal.restUrl"],readOnly:!0})],a.prototype,"url",null);m([f.property()],a.prototype,"username",void 0);return a=m([f.subclass("esri.portal.PortalFolder")],a)})},"esri/portal/PortalGroup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalQueryParams".split(" "),
function(a,h,p,m,f,e,l,g,c){a=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,"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.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 c;b.query="group:"+this.id+(b.query?" "+b.query:"");return this.portal.queryItems(b)};return a}(e.declared(g));m([e.property()],a.prototype,"access",void 0);m([e.property({type:Date})],a.prototype,"created",void 0);m([e.property()],a.prototype,"description",void 0);m([e.property()],a.prototype,"id",void 0);m([e.property()],
a.prototype,"isInvitationOnly",void 0);m([e.property({type:Date})],a.prototype,"modified",void 0);m([e.property()],a.prototype,"owner",void 0);m([e.property()],a.prototype,"portal",void 0);m([e.property()],a.prototype,"snippet",void 0);m([e.property()],a.prototype,"sortField",void 0);m([e.property()],a.prototype,"sortOrder",void 0);m([e.property()],a.prototype,"tags",void 0);m([e.property()],a.prototype,"title",void 0);m([e.property({dependsOn:["portal.restUrl"],readOnly:!0})],a.prototype,"url",null);
m([f(0,e.cast(c))],a.prototype,"queryItems",null);return a=m([e.subclass("esri.portal.PortalGroup")],a)})},"esri/portal/PortalItem":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/lang ../geometry/Extent ../core/JSONSupport ../core/Loadable ./Portal ./PortalRating ../core/promiseUtils".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y){h=t=function(b){function c(a){a=b.call(this)||this;
a.access=null;a.accessInformation=null;a.avgRating=null;a.created=null;a.culture=null;a.description=null;a.extent=null;a.id=null;a.itemControl=null;a.licenseInfo=null;a.modified=null;a.name=null;a.numComments=null;a.numRatings=null;a.numViews=null;a.owner=null;a.portal=null;a.size=null;a.snippet=null;a.tags=null;a.title=null;a.type=null;a.typeKeywords=null;a.url=null;return a}p(c,b);Object.defineProperty(c.prototype,"displayName",{get:function(){var b=this.type,a=this.typeKeywords||[],d=b;"Feature Service"===
b||"Feature Collection"===b?d=-1<a.indexOf("Table")?"Table":-1<a.indexOf("Route Layer")?"Route Layer":"Feature Layer":"Image Service"===b?d=-1<a.indexOf("Elevation 3D Layer")?"Elevation Layer":"Imagery Layer":"Scene Service"===b?d="Scene Layer":"Scene Package"===b?d="Scene Layer Package":"Stream Service"===b?d="Feature Layer":"Geoprocessing Service"===b&&this.portal&&this.portal.isPortal?d=-1<a.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===b?d="Locator":"Microsoft Powerpoint"===
b?d="Microsoft PowerPoint":"GeoJson"===b?d="GeoJSON":"Globe Service"===b?d="Globe Layer":"Vector Tile Service"===b?d="Tile Layer":"Map Service"===b?d=-1<a.indexOf("Hosted Service")||-1<a.indexOf("Tiled")?"Tile Layer":"Map Image Layer":b&&-1<b.toLowerCase().indexOf("add in")?d=b.replace(/(add in)/ig,"Add-In"):"datastore catalog service"===b&&(d="Big Data File Share");return d},enumerable:!0,configurable:!0});c.prototype.readExtent=function(b){return b&&b.length?new g(b[0][0],b[0][1],b[1][0],b[1][1]):
null};Object.defineProperty(c.prototype,"iconUrl",{get:function(){var b=this.type&&this.type.toLowerCase()||"",c=this.typeKeywords||[],d=!1,k=!1,e=!1;0<b.indexOf("service")||"feature collection"===b||"kml"===b||"wms"===b||"wmts"===b||"wfs"===b?(d=-1<c.indexOf("Hosted Service"),"feature service"===b||"feature collection"===b||"kml"===b||"wfs"===b?(k=-1<c.indexOf("Table"),e=-1<c.indexOf("Route Layer"),b=k?"table":e?"routelayer":d?"featureshosted":"features"):b="map service"===b||"wms"===b||"wmts"===
b?d||-1<c.indexOf("Tiled")||"wmts"===b?"maptiles":"mapimages":"scene service"===b?-1<c.indexOf("Line")?"sceneweblayerline":-1<c.indexOf("3DObject")?"sceneweblayermultipatch":-1<c.indexOf("Point")?"sceneweblayerpoint":-1<c.indexOf("IntegratedMesh")?"sceneweblayermesh":-1<c.indexOf("PointCloud")?"sceneweblayerpointcloud":-1<c.indexOf("Polygon")?"sceneweblayerpolygon":"sceneweblayer":"image service"===b?-1<c.indexOf("Elevation 3D Layer")?"elevationlayer":"imagery":"stream service"===b?"streamlayer":
"vector tile service"===b?"vectortile":"datastore catalog service"===b?"datastorecollection":"geocoding service"===b?"geocodeservice":"layers"):b="web map"===b||"cityengine web scene"===b?"maps":"web scene"===b?-1<c.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<c.indexOf("ArcGIS Pro")||"explorer map"===b&&c.indexOf("Explorer Document")?"mapsgray":"service definition"===b||"csv"===b||"shapefile"===b||"cad drawing"===b||"geojson"===b||"360 vr experience"===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||"csv collection"===b||"kml collection"===b||"windows mobile package"===b||"map template"===b||"desktop application template"===b||"arcpad package"===b||"code sample"===b||"form"===b||"document link"===b||"vector tile package"===b||"operations dashboard add in"===b||"rules package"===b||"image"===b||"workflow manager package"===b||"desktop style"===b||"explorer map"===b&&-1<c.indexOf("Explorer Mapping Application")||
-1<c.indexOf("Document")?"datafilesgray":"network analysis service"===b||"geoprocessing service"===b||"geodata service"===b||"geometry service"===b||"geoprocessing package"===b||"locator package"===b||"geoprocessing sample"===b||"workflow manager service"===b||"raster function template"===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":"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":"dashboard"===b?"dashboard":"maps";return b?a.toUrl("../images/portal/"+
b+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service".split(";").indexOf(this.type)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"itemUrl",{get:function(){var b=this.get("portal.restUrl");return b?b+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"thumbnailUrl",
{get:function(){var b=this.itemUrl,a=this.thumbnail;return b&&a?this.portal._normalizeUrl(b+"/info/"+a):null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"userItemUrl",{get:function(){var b=this.get("portal.restUrl");if(!b)return null;var a=this.owner||this.get("portal.user.username");return a?b+"/content/users/"+(this.ownerFolder?a+"/"+this.ownerFolder:a)+"/items/"+this.id:null},enumerable:!0,configurable:!0});c.prototype.load=function(){var b=this;this.portal||(this.portal=
q.getDefault());var a=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(a);return this};c.prototype.addRating=function(b){var a={method:"post",query:{}};b instanceof x&&(b=b.rating);isNaN(b)||"number"!==typeof b||(a.query.rating=b);return this.portal._request(this.itemUrl+"/addRating",a).then(function(){return new x({rating:b,created:new Date})})};c.prototype.deleteRating=
function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};c.prototype.fetchData=function(b){void 0===b&&(b="json");return this.portal._request(this.itemUrl+"/data",{responseType:b})};c.prototype.fetchRating=function(){return this.portal._request(this.itemUrl+"/rating").then(function(b){return null!=b.rating?(b.created=new Date(b.created),new x(b)):null})};c.prototype.fetchRelatedItems=function(b){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",
{query:b},"PortalItem")};c.prototype.update=function(b){var a=this;if(!this.id)return y.reject(new e("portal:item-does-not-exist","The item does not exist yet and cannot be updated"));var d=b&&b.data;b={method:"post"};b.query=this._getPostQuery();for(var k in b.query)null===b.query[k]&&(b.query[k]="");b.query.clearEmptyFields=!0;null!=d&&("string"===typeof d?b.query.text=d:"object"===typeof d&&(b.query.text=JSON.stringify(d)));return(k=this.userItemUrl)?this.portal._request(k+"/update",b).then(function(){return a.loaded?
a._reload():a.load()}):y.reject(new e("portal:not-signed-in","Not signed in"))};c.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,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};
return l.fixJson(b)};c.fromJSON=function(b){if(!b)return null;if(b.declaredClass)throw Error("JSON object is already hydrated");return new t({resourceInfo:b})};c.prototype._reload=function(){var b=this;return this.portal._request(this.itemUrl,{query:{_ts:(new Date).getTime()}}).then(function(a){b.resourceInfo=a;b.read(a);return b})};c.prototype._getPostQuery=function(){var b=this.toJSON(),a;for(a in b)"tags"===a&&null!==b[a]&&(b[a]=b[a].join(", ")),"typeKeywords"===a&&null!==b[a]&&(b[a]=b[a].join(", "));
return b};return c}(f.declared(c,b));m([f.property()],h.prototype,"access",void 0);m([f.property()],h.prototype,"accessInformation",void 0);m([f.property()],h.prototype,"avgRating",void 0);m([f.property({type:Date})],h.prototype,"created",void 0);m([f.property()],h.prototype,"culture",void 0);m([f.property()],h.prototype,"description",void 0);m([f.property({dependsOn:["type","typeKeywords"],readOnly:!0})],h.prototype,"displayName",null);m([f.property({type:g})],h.prototype,"extent",void 0);m([f.reader("extent")],
h.prototype,"readExtent",null);m([f.property({dependsOn:["type","typeKeywords"],readOnly:!0})],h.prototype,"iconUrl",null);m([f.property()],h.prototype,"id",void 0);m([f.property({dependsOn:["type"],readOnly:!0})],h.prototype,"isLayer",null);m([f.property()],h.prototype,"itemControl",void 0);m([f.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],h.prototype,"itemUrl",null);m([f.property()],h.prototype,"licenseInfo",void 0);m([f.property({type:Date})],h.prototype,"modified",void 0);m([f.property()],
h.prototype,"name",void 0);m([f.property()],h.prototype,"numComments",void 0);m([f.property()],h.prototype,"numRatings",void 0);m([f.property()],h.prototype,"numViews",void 0);m([f.property()],h.prototype,"owner",void 0);m([f.property()],h.prototype,"ownerFolder",void 0);m([f.property({type:q})],h.prototype,"portal",void 0);m([f.property()],h.prototype,"resourceInfo",void 0);m([f.property()],h.prototype,"size",void 0);m([f.property()],h.prototype,"snippet",void 0);m([f.property()],h.prototype,"tags",
void 0);m([f.property()],h.prototype,"thumbnail",void 0);m([f.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],h.prototype,"thumbnailUrl",null);m([f.property()],h.prototype,"title",void 0);m([f.property()],h.prototype,"type",void 0);m([f.property()],h.prototype,"typeKeywords",void 0);m([f.property()],h.prototype,"url",void 0);m([f.property({dependsOn:["portal.restUrl","portal.user.username","owner","ownerFolder","id"],readOnly:!0})],h.prototype,"userItemUrl",null);
h=t=m([f.subclass("esri.portal.PortalItem")],h);var t;return h})},"esri/portal/PortalRating":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),function(a,h,p,m,f,e){a=function(a){function e(c){c=a.call(this)||this;c.created=null;c.rating=null;return c}p(e,a);return e}(f.declared(e));m([f.property()],a.prototype,"created",void 0);m([f.property()],a.prototype,"rating",void 0);return a=
m([f.subclass("esri.portal.PortalRating")],a)})},"esri/support/groundUtils":function(){define("require exports ../core/accessorSupport/ensureType ../core/Logger ../Ground ../layers/ElevationLayer".split(" "),function(a,h,p,m,f,e){var l=m.getLogger("esri.support.groundUtils");h.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"}};h.ensureType=function(a){var c;"string"===typeof a?a in h.groundElevationLayers?
(a=h.groundElevationLayers[a],a=new e({id:a.id,url:a.url}),c=new f({layers:[a]})):l.warn("Unable to find ground definition for: "+a+'. Try "world-elevation"'):c=p.default(f,a);return c}})},"esri/layers/ElevationLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/_base/lang ../request ../core/Error ../core/promiseUtils ../core/requireUtils ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./support/rasterFormats/LercCodec".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){h=function(n){function f(d){d=n.call(this)||this;d.type="elevation";d.url=null;d.opacity=1;d.operationalLayerType="ArcGISTiledElevationServiceLayer";return d}p(f,n);f.prototype.normalizeCtorArgs=function(d,b){return"string"===typeof d?e.mixin({},{url:d},b):d};f.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 g("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"});}}).always(function(){return d._fetchImageService()}));return this};f.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 l(c,{responseType:"array-buffer",
failOk:!0})}).then(function(d){d=r.decode(d.data,{noDataValue:c,returnFileInfo:!0});return{values:d.pixelData,width:d.width,height:d.height,maxZError:d.fileInfo.maxZError,noDataValue:d.noDataValue}})};f.prototype.queryElevation=function(d,k){var c=this;return b.when(a,"./support/ElevationQuery").then(function(b){return(new b.ElevationQuery).query(c,d,k)})};f.prototype._fetchTileAvailability=function(d,b,a){return this.tilemapCache?this.tilemapCache.fetchAvailability(d,b,a):c.resolve("unknown")};f.prototype._fetchImageService=
function(){var d=this;return c.resolve().then(function(){if(d.resourceInfo)return d.resourceInfo;var b={query:e.mixin({f:"json"},d.parsedUrl.query),responseType:"json",callbackParamName:"callback"};return l(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})})};return f}(f.declared(q,x,y,t,u));m([f.shared({"3d":"../views/3d/layers/ElevationLayerView3D"})],h.prototype,"viewModulePaths",void 0);m([f.property()],h.prototype,
"resourceInfo",void 0);m([f.property()],h.prototype,"type",void 0);m([f.property()],h.prototype,"url",void 0);m([f.property({json:{read:!1,write:!1}})],h.prototype,"opacity",void 0);m([f.property()],h.prototype,"operationalLayerType",void 0);return h=m([f.subclass("esri.layers.ElevationLayer")],h)})},"esri/layers/TiledLayer":function(){define(["./Layer","./support/TileInfo"],function(a,h){return a.createSubclass({properties:{attributionDataUrl:null,tileInfo:h},viewModulePaths:{"2d":"../views/2d/layers/TiledLayerView2D",
"3d":"../views/3d/layers/TiledLayerView3D"},getTileUrl:function(a,m,f){}})})},"esri/layers/support/TileInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ../../geometry/SpatialReference ../../geometry/Point ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/scaleUtils ./LOD".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u){var r=l({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"});a=n=function(a){function d(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(d,a);d.create=function(d){void 0===d&&(d={size:256,spatialReference:b.WebMercator});var a=d.size||
256;d=d.spatialReference||b.WebMercator;for(var k=x.getInfo(d),k=k?new q(k.origin[0],k.origin[1],d):new q(0,0,d),c=1/(39.3700787*t.getUnitValueForSR(d)*96),e=256/a*5.91657527591555E8,g=[{level:0,scale:e,resolution:e*c}],f=1;24>f;f++)e/=2,g.push({level:f,scale:e,resolution:e*c});return new n({dpi:96,lods:g,origin:k,size:a,spatialReference:d})};Object.defineProperty(d.prototype,"lods",{set:function(d){var b=this,a=0,k=0,c=[];this._levelToLOD={};d&&(a=-Infinity,k=Infinity,d.forEach(function(d){c.push(d.scale);
a=d.scale>a?d.scale:a;k=d.scale<k?d.scale:k;b._levelToLOD[d.level]=d}));this._set("scales",c);this._set("minScale",a);this._set("maxScale",k);this._set("lods",d);this._initializeUpsampleLevels()},enumerable:!0,configurable:!0});d.prototype.zoomToScale=function(d){var b=this.scales;if(0>=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])};d.prototype.scaleToZoom=function(d){for(var b=this.scales,a=b.length-1,k=0;k<a;k++){var c=b[k],e=
b[k+1];if(c<=d)break;if(e===d)return k+1;if(c>d&&e<d)return k+1-(d-e)/(c-e)}return k};d.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))};d.prototype.tileAt=function(d,b,a,c){var k=this.lodAt(d);if(!k)return null;c||(c={id:null,level:0,row:0,col:0,extent:[0,0,0,0]});var e;if("number"===typeof b)e=b,b=a;else{if(b.spatialReference.equals(this.spatialReference))e=b.x,b=b.y;else{c=y.project(b,
this.spatialReference);if(!c)return null;e=c.x;b=c.y}c=a}a=k.resolution*this.size[0];k=k.resolution*this.size[1];c.level=d;c.row=Math.floor((this.origin.y-b)/k+.001);c.col=Math.floor((e-this.origin.x)/a+.001);this.updateTileInfo(c);return c};d.prototype.updateTileInfo=function(d){var b=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};d.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};d.prototype.lodAt=function(d){return this._levelToLOD&&this._levelToLOD[d]||null};d.prototype.clone=function(){return n.fromJSON(this.toJSON())};d.prototype.toJSON=function(){return g.fixJson({rows:this.size[0],cols:this.size[1],
dpi:this.dpi,format:r.toJSON(this.format),compressionQuality:this.compressionQuality,origin:this.origin&&this.origin.toJSON(),spatialReference:this.spatialReference&&this.spatialReference.toJSON(),lods:this.lods&&this.lods.map(function(d){return d.toJSON()})})};d.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]={parentLevel:b?b.level:-1,factor:b?b.resolution/c.resolution:0};b=c}};return d}(c.declared(e));
m([c.property()],a.prototype,"compressionQuality",void 0);m([c.property()],a.prototype,"dpi",void 0);m([c.property({json:{read:r.fromJSON}})],a.prototype,"format",void 0);m([c.property({type:q,json:{read:function(b,d){return q.fromJSON(f.mixin({spatialReference:d.spatialReference},b))}}})],a.prototype,"origin",void 0);m([c.property({type:[u],value:null})],a.prototype,"lods",null);m([c.property({readOnly:!0})],a.prototype,"minScale",void 0);m([c.property({readOnly:!0})],a.prototype,"maxScale",void 0);
m([c.property({readOnly:!0})],a.prototype,"scales",void 0);m([c.property({cast:function(b){return Array.isArray(b)?b:"number"===typeof b?[b,b]:[256,256]},json:{read:{source:["rows","cols"],reader:function(b,d){return[d.cols,d.rows]}}}})],a.prototype,"size",void 0);m([c.property({type:b})],a.prototype,"spatialReference",void 0);a=n=m([c.subclass("esri.layers.support.TileInfo")],a);var n;return a})},"esri/geometry/support/scaleUtils":function(){define(["../../config","../../core/lang","./WKIDUnitConversion"],
function(a,h,p){var m=20015077/180,f={getUnitValueForSR:function(a){return this.getUnitValue(a)||m},getUnitValue:function(a){var e,g,c;a&&("object"===typeof a?(e=a.wkid,g=a.wkt):"number"===typeof a?e=a:"string"===typeof a&&(g=a));e?c=p.values[p[e]]:g&&-1!==g.search(/^PROJCS/i)&&(a=/UNIT\[([^\]]+)\]\]$/i.exec(g))&&a[1]&&(c=parseFloat(a[1].split(",")[1]));return c},getScale:function(e,l,g){var c,b,q;1<arguments.length&&h.isDefined(l)&&!l.declaredClass?(c=e,b=l,l=null,q=f.getUnitValue(g)):(c=l||e.extent,
b=e.width,q=f.getUnitValue(c&&c.spatialReference));return c&&b?c.width/b*(q||m)*39.37*a.screenDPI:0},getExtentForScale:function(e,l){var g=e.extent;e=e.width;var c=f.getUnitValue(g.get("spatialReference"));return g.clone().expand(l*e/(39.37*(c||m)*a.screenDPI)/g.get("width"))}};return f})},"esri/layers/support/LOD":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),
function(a,h,p,m,f,e){a=l=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);c.prototype.clone=function(){return new l({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})};return c}(f.declared(e));m([f.property({json:{write:!0}})],a.prototype,"level",void 0);m([f.property({json:{write:!0}})],a.prototype,"levelValue",void 0);m([f.property({json:{write:!0}})],a.prototype,"resolution",void 0);m([f.property({json:{write:!0}})],
a.prototype,"scale",void 0);a=l=m([f.subclass("esri.layers.support.LOD")],a);var l;return a})},"esri/layers/mixins/ArcGISMapService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ArcGISService ./ScaleRangeLayer ../../geometry/Extent ../../geometry/SpatialReference".split(" "),function(a,h,p,m,f,e,l,g,c){a=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.copyright=null;
a.fullExtent=null;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.readLegendEnabled=function(b,a){return a.showLegend};a.prototype.writeLegendEnabled=function(b,a){b||(a.showLegend=!1)};a.prototype.readPopupEnabled=function(b,a){return!a.disablePopup};a.prototype.readVersion=function(b,a){(b=a.currentVersion)||(b=a.hasOwnProperty("capabilities")||
a.hasOwnProperty("tables")?10:a.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3);return b};return a}(f.declared(e,l));m([f.property()],a.prototype,"capabilities",void 0);m([f.reader("service","capabilities")],a.prototype,"readCapabilities",null);m([f.property()],a.prototype,"copyright",void 0);m([f.reader("copyright",["copyrightText"])],a.prototype,"readCopyright",null);m([f.property({type:g})],a.prototype,"fullExtent",void 0);m([f.property({json:{origins:{service:{read:!1},portalItem:{read:!1}}}})],
a.prototype,"id",void 0);m([f.property()],a.prototype,"legendEnabled",void 0);m([f.reader("legendEnabled",["showLegend"])],a.prototype,"readLegendEnabled",null);m([f.writer("legendEnabled")],a.prototype,"writeLegendEnabled",null);m([f.reader("popupEnabled",["disablePopup"])],a.prototype,"readPopupEnabled",null);m([f.property({type:c})],a.prototype,"spatialReference",void 0);m([f.property()],a.prototype,"version",void 0);m([f.reader("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],
a.prototype,"readVersion",null);return a=m([f.subclass("esri.layers.mixins.ArcGISMapService")],a)})},"esri/layers/mixins/ArcGISService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/MultiOriginJSONSupport ../support/arcgisLayerUrl".split(" "),function(a,h,p,m,f,e,l){a=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}p(c,a);Object.defineProperty(c.prototype,"title",
{get:function(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var b=l.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});return c}(f.declared(e));m([f.property({dependsOn:["url"]})],a.prototype,"title",null);m([f.property()],a.prototype,"url",void 0);return a=m([f.subclass("esri.layers.mixins.ArcGISService")],a)})},"esri/core/MultiOriginJSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Accessor ./accessorSupport/read ./accessorSupport/write ./accessorSupport/utils ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q){function x(b){return c.getProperties(b).store}a=function(a){function e(){var e=a.call(this)||this,g=c.getProperties(e),n=g.metadatas,f=g.store,d=new b.default;g.store=d;f.keys().forEach(function(b){d.set(b,f.get(b),q.OriginId.DEFAULTS)});Object.keys(n).forEach(function(b){g.internalGet(b)&&d.set(b,g.internalGet(b),q.OriginId.DEFAULTS)});return e}p(e,a);e.prototype.clear=function(b,a){void 0===a&&(a="user");return x(this).clear(b,q.nameToId(a))};e.prototype.read=function(b,
a){l.default(this,b,a);return this};e.prototype.write=function(b,a){b=b||{};g.default(this,b,a);return b};e.prototype.getAtOrigin=function(b,a){var c=x(this),e=q.nameToId(a);if("string"===typeof b)return c.get(b,e);var d={};b.forEach(function(b){d[b]=c.get(b,e)});return d};e.prototype.originOf=function(b){var a=x(this);if("string"===typeof b)return q.idToName(a.originOf(b));b.forEach(function(b){q.idToName(a.originOf(b))})};e.prototype.revert=function(b,a){var e=x(this),g=q.nameToId(a),d=c.getProperties(this);
("string"===typeof b?"*"===b?Object.keys(e.getAll(g)):[b]:b).forEach(function(b){d.propertyInvalidated(b);e.revert(b,g);d.propertyCommitted(b)})};e.prototype.removeOrigin=function(b){var a=x(this);b=q.nameToId(b);var c=a.getAll(b),e;for(e in c)a.originOf(e)===b&&a.set(e,c[e],q.OriginId.USER)};e.prototype.updateOrigin=function(b,a){var c=x(this);a=q.nameToId(a);var e=this.get(b);c.clear(b);c.set(b,e,a)};return e}(f.declared(e));return a=m([f.subclass("esri.core.MultiOriginJSONSupport")],a)})},"esri/core/accessorSupport/MultiOriginStore":function(){define(["require",
"exports","./PropertyOrigin"],function(a,h,p){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,l){void 0===l&&(l=p.OriginId.USER);var g=this._originStores[l];g||(g={},this._originStores[l]=g);g[a]=e;return!(a in this._values)||this._propertyOriginMap[a]<=
l?(g=this._values[a],this._values[a]=e,this._propertyOriginMap[a]=l,g!==e):!1};a.prototype.clear=function(a,e){void 0===e&&(e=p.OriginId.USER);var f=this._originStores[e];if(f){var g=f[a];delete f[a];if(a in this._values&&this._propertyOriginMap[a]===e)for(delete this._values[a],--e;0<=e;e--)if((f=this._originStores[e])&&a in f){this._values[a]=f[a];this._propertyOriginMap[a]=e;break}return g}};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 f=this._originStores[e],f=f&&f[a],g=this._values[a];this._values[a]=f;this._propertyOriginMap[a]=e;return g!==f};a.prototype.originOf=function(a,e){return this._propertyOriginMap[a]||p.OriginId.DEFAULTS};a.prototype.getAll=function(a){return this._originStores[a]};return a}();Object.defineProperty(h,"__esModule",{value:!0});h.default=a})},"esri/layers/support/arcgisLayerUrl":function(){define(["require","exports","../../core/urlUtils"],function(a,h,
p){function m(a){var e=p.urlToObject(a).path.match(h.match);if(!e)return null;a=e[1];var g=e[2],c=e[3],e=e[4],b=g.indexOf("/");return{title:f(-1!==b?g.slice(b+1):g),serverType:c,sublayer:null!=e&&""!==e?parseInt(e,10):null,url:{path:a}}}function f(a){a=a.replace(/\s*[/_]+\s*/g," ");return a[0].toUpperCase()+a.slice(1)}h.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");h.match=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+
h.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");h.test=function(a){return!!h.match.test(a)};h.parse=m;h.cleanTitle=f;h.titleFromUrlAndName=function(a,l){var e=[];a&&(a=m(a))&&a.title&&e.push(a.title);l&&(l=f(l),e.push(l));if(2===e.length){if(-1!==e[0].toLowerCase().indexOf(e[1].toLowerCase()))return e[0];if(-1!==e[1].toLowerCase().indexOf(e[0].toLowerCase()))return e[1]}return e.join(" - ")};h.isHostedAgolService=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};h.isHostedSecuredProxyService=function(a,f){return f&&a&&-1!==a.toLowerCase().indexOf(f.toLowerCase())}})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/accessorSupport/write".split(" "),function(a,h,p,m,f,e,l){a=function(a){function c(){var b=
null!==a&&a.apply(this,arguments)||this;b.minScale=0;b.maxScale=0;return b}p(c,a);return c}(f.declared(e));m([f.property({json:{write:{overridePolicy:function(a,c,b){if(l.willPropertyWrite(this,"maxScale",{},b))return{ignoreOrigin:!0}}}}})],a.prototype,"minScale",void 0);m([f.property({json:{write:{overridePolicy:function(a,c,b){if(l.willPropertyWrite(this,"minScale",{},b))return{ignoreOrigin:!0}}}}})],a.prototype,"maxScale",void 0);return a=m([f.subclass("esri.layers.mixins.ScaleRangeLayer")],a)})},
"esri/layers/mixins/ArcGISCachedService":function(){define("dojo/_base/lang dojo/io-query ./ArcGISService ./ScaleRangeLayer ../support/TileInfo ../support/TilemapCache".split(" "),function(a,h,p,m,f,e){return p.createSubclass([m],{declaredClass:"esri.layers.mixins.ArcGISCachedService",properties:{minScale:{json:{origins:{service:{read:!1}}}},maxScale:{json:{origins:{service:{read:!1}}}},resampling:!0,supportsBlankTile:{value:!1,readOnly:!0,dependsOn:["version"],get:function(){return 10.2<=this.version}},
tileInfo:{value:null,type:f,json:{read:function(a,e){var c=e.minScale?e.minScale:Infinity,b=e.maxScale?e.maxScale:-Infinity;return a?(a.lods=a.lods.filter(function(a){return a.scale<=c&&a.scale>=b}),f.fromJSON(a)):null}}},tilemapCache:{value:null,json:{read:{source:["capabilities"],reader:function(a,g){return g.capabilities&&-1<g.capabilities.indexOf("Tilemap")?new e({layer:this}):null}}}},refreshTimestamp:null,version:{}},refresh:function(){this.refreshTimestamp=Date.now();this.inherited(arguments)},
getTileUrl:function(e,g,c){var b=a.mixin({},this.parsedUrl.query,{token:this.token,blankTile:!this.tilemapCache&&this.resampling&&this.supportsBlankTile?!1:null,_ts:this.refreshTimestamp});e=this.parsedUrl.path+"/tile/"+e+"/"+g+"/"+c;b=h.objectToQuery(b);return e+(b?"?"+b:"")}})})},"esri/layers/support/TilemapCache":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang dojo/io-query ../../request ../../core/Accessor ../../core/LRUMap ../../core/promiseUtils ../../core/watchUtils ../../core/Error ../../core/HandleRegistry ../../core/Logger ../../core/accessorSupport/decorators ./Tilemap".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r){var n=t.getLogger("esri.layers.support.TilemapCache");a=function(a){function d(){var d=null!==a&&a.apply(this,arguments)||this;d._handles=new y;d._pendingTilemapRequests={};d._availableLevels={};d.levels=5;d.cacheByteSize=2097152;d.request=l;return d}p(d,a);d.prototype.normalizeCtorArgs=function(d){var b=this;d=f.mixin({},d);this._constructOnly={};["cacheByteSize","layer","levels","request"].forEach(function(a){a in d&&("levels"===a&&2>=d[a]?n.error("Minimum levels for Tilemap is 3, but got ",
d[a]):b._constructOnly[a]=d[a],delete d[a])});return d};d.prototype.initialize=function(){var d=this,b;for(b in this._constructOnly)this._set(b,this._constructOnly[b]);this._constructOnly=null;this._tilemapCache=new c(this.cacheByteSize,{sizeOfFunction:function(d){return d.byteSize}});this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers"],function(){return d._initializeTilemapDefinition()}),q.init(this,"layer.tileInfo.lods",function(b){return d._initializeAvailableLevels(b)},!0)]);
this._initializeTilemapDefinition()};d.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};Object.defineProperty(d.prototype,"size",{get:function(){return 1<<this.levels},enumerable:!0,configurable:!0});d.prototype.getTilemap=function(d,b,a){return this._tilemapFromCache(d,b,a,this._tmpTilemapDefinition)};d.prototype.fetchTilemap=function(d,a,c,e){var k=this;if(!this._availableLevels[d])return b.reject(new x("tilemap-cache:level-unavailable","Level "+d+" is unavailable in the service"));
var n=this._tmpTilemapDefinition;if(d=this._tilemapFromCache(d,a,c,n))return b.resolve(d);var g=r.tilemapDefinitionId(n);d=this._pendingTilemapRequests[g];d||(d=r.Tilemap.fromDefinition(n,e).then(function(d){k._tilemapCache.set(g,d);delete k._pendingTilemapRequests[g];return d}).otherwise(function(d){delete k._pendingTilemapRequests[g];return b.reject(d)}),this._pendingTilemapRequests[g]=d);return d};d.prototype.getAvailability=function(d,b,a){return this._availableLevels[d]?(d=this.getTilemap(d,
b,a))?d.getAvailability(b,a):"unknown":"unavailable"};d.prototype.getAvailabilityUpsample=function(d,b,a,c){c.level=d;c.row=b;c.col=a;d=this.layer.tileInfo;for(d.updateTileInfo(c);;)if(b=this.getAvailability(c.level,c.row,c.col),"unavailable"===b){if(!d.upsampleTile(c))return"unavailable"}else return b};d.prototype.fetchAvailability=function(d,a,c,e){return this._availableLevels[d]?this.fetchTilemap(d,a,c,e).always(function(k){return k instanceof r.Tilemap?(k=k.getAvailability(a,c),"unavailable"===
k?b.reject(new x("tile-map:tile-unavailable","Tile is not available",{level:d,row:a,col:c})):k):"unknown"}):b.reject(new x("tilemap-cache:level-unavailable","Level "+d+" is unavailable in the service"))};d.prototype.fetchAvailabilityUpsample=function(d,a,c,e,n){var k=this;e.level=d;e.row=a;e.col=c;var g=this.layer.tileInfo;g.updateTileInfo(e);return this.fetchAvailability(d,a,c,n).otherwise(function(d){return g.upsampleTile(e)?k.fetchAvailabilityUpsample(e.level,e.row,e.col,e):b.reject(d)})};d.prototype._initializeTilemapDefinition=
function(){if(this.layer.parsedUrl){var d=this.layer.parsedUrl,b=d.query;b&&b.token||!this.layer.token||(b=f.mixin(b,{token:this.layer.token}));this._tilemapCache.clear();this._tmpTilemapDefinition={service:{url:d.path,query:b?e.objectToQuery(b):null,tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}};d.prototype._tilemapFromCache=function(d,b,a,c){d=this._getTilemapDefinition(d,b,a,c);d=r.tilemapDefinitionId(d);return this._tilemapCache.get(d)};
d.prototype._getTilemapDefinition=function(d,b,a,c){c.level=d;c.row=b-b%this.size;c.col=a-a%this.size;return c};d.prototype._initializeAvailableLevels=function(d){var b=this;this._availableLevels={};d&&d.forEach(function(d){return b._availableLevels[d.level]=!0})};return d}(u.declared(g));m([u.property({readOnly:!0})],a.prototype,"levels",void 0);m([u.property({readOnly:!0,dependsOn:["levels"]})],a.prototype,"size",null);m([u.property({readOnly:!0})],a.prototype,"cacheByteSize",void 0);m([u.property({readOnly:!0})],
a.prototype,"layer",void 0);m([u.property({readOnly:!0})],a.prototype,"request",void 0);return a=m([u.subclass("esri.layers.support.TilemapCache")],a)})},"esri/core/LRUMap":function(){define(["require","exports"],function(a,h){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))}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});Object.defineProperty(a.prototype,"keys",{get:function(){return this._queue.slice()},enumerable:!0,configurable:!0});a.prototype.clear=function(){var a=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(f,
e){a.disposeFunction(e,f)});this._cache.clear();this._sizeOf=0};a.prototype.delete=function(a){var f=this._cache.get(a);return this._cache.delete(a)?(this._sizeOf-=this.sizeOfFunction(f),this.disposeFunction&&this.disposeFunction(a,f),this._queue.splice(this._queue.indexOf(a),1),!0):!1};a.prototype.forEach=function(a,f){this._cache.forEach(a,f)};a.prototype.get=function(a){var f=this._cache.get(a);if(void 0!==f)return this._queue.splice(this._queue.indexOf(a),1),this._queue.unshift(a),f};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);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,h,p,m){function f(b,a,c,e,g){g=b.watch(a,function(d,a,n,g){e&&!e(d)||c.call(b,d,a,n,g)},g);var d=b.get(a);e&&e(d)&&c.call(b,d,d,a,b);return g}function e(b,a,c,e,g){function d(){n&&(n.remove(),n=null)}var k=!1,n,l=new p(d),r=new m;r.cancel=l.cancel;r.isCanceled=l.isCanceled;r.isFulfilled=l.isFulfilled;r.isRejected=l.isRejected;r.isResolved=l.isResolved;r.then=l.then;r.remove=d;Object.freeze(r);
n=f(b,a,function(a,e,n,g){k=!0;d();c&&c.call(b,a,e,n,g);l.resolve({value:a,oldValue:e,propertyName:n,target:g})},e,g);k&&n.remove();return r}function l(b){return!!b}function g(b){return!b}function c(b){return!0===b}function b(b){return!1===b}function q(b){return void 0!==b}function x(b){return void 0===b}function y(b,a,c,e){(Array.isArray(a)?a:-1<a.indexOf(",")?a.split(","):[a]).forEach(function(a){a=a.trim();var d=b.get(a);c.call(b,d,d,a,b)});return b.watch(a,c,e)}h.init=y;h.watch=function(b,a,c,
e){return b.watch(a,c,e)};h.once=function(b,a,c,n){return e(b,a,c,null,n)};h.when=function(b,a,c,e){return f(b,a,c,l,e)};h.whenOnce=function(b,a,c,n){return e(b,a,c,l,n)};h.whenNot=function(b,a,c,e){return f(b,a,c,g,e)};h.whenNotOnce=function(b,a,c,n){return e(b,a,c,g,n)};h.whenTrue=function(b,a,e,n){return f(b,a,e,c,n)};h.whenTrueOnce=function(b,a,g,n){return e(b,a,g,c,n)};h.whenFalse=function(a,c,e,n){return f(a,c,e,b,n)};h.whenFalseOnce=function(a,c,g,n){return e(a,c,g,b,n)};h.whenDefined=function(b,
a,c,e){return f(b,a,c,q,e)};h.whenDefinedOnce=function(b,a,c,n){return e(b,a,c,q,n)};h.whenUndefined=function(b,a,c,e){return f(b,a,c,x,e)};h.whenUndefinedOnce=function(b,a,c,n){return e(b,a,c,x,n)};h.pausable=function(b,a,c,e){var n=!1;return{remove:b.watch(a,function(d,a,e,g){n||c.call(b,d,a,e,g)},e).remove,pause:function(){n=!0},resume:function(){n=!1}}};h.on=function(b,a,c,e,g,d,k){function n(){l&&(d&&d(f,a,b,c),l.remove(),f=l=null)}var f=null,l=null,r=y(b,a,function(d){n();d&&d.on&&(f=d,l=d.on(c,
e),g&&g(f,a,b,c))},k);return{remove:function(){r.remove();n()}}}})},"esri/layers/support/Tilemap":function(){define("require exports dojo/_base/lang ../../request ../../core/lang ../../core/Error".split(" "),function(a,h,p,m,f,e){function l(a){var c=a.service.tileServers,c=(c&&c.length?c[a.row%c.length]:a.service.url)+"/tilemap/"+a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height;(a=a.service.query)&&(c=c+"?"+a);return c}a=function(){function a(){this.location={left:0,top:0,width:0,height:0};this.byteSize=
40}a.prototype.getAvailability=function(a,b){if(this._isAllAvailable)return"available";if(this._isAllUnvailable)return"unavailable";a=(a-this.location.top)*this.location.width+(b-this.location.left);b=a>>3;var c=this._tileAvailabilityBitSet;return 0>b||b>c.length?"unknown":c[b]&1<<a%8?"available":"unavailable"};a.prototype._updateFromData=function(a){for(var b=!0,c=!0,e=new Uint8Array(Math.ceil(this.location.width*this.location.height/8)),g=0,f=0;f<a.length;f++){var l=f%8;a[f]?(c=!1,e[g]|=1<<l):b=
!1;7===l&&++g}this._isAllUnvailable=c;this._isAllAvailable=b;this._isAllAvailable||this._isAllUnvailable||(this._tileAvailabilityBitSet=e,this.byteSize+=e.length)};a.fromDefinition=function(c,b){var g=c.service.request||m,f=c.row,h=c.col,t=c.width,u=c.height,r={failOk:!0,callbackParamName:"callback"};b=b?p.mixin(r,b):r;return g(l(c),b).then(function(b){var c=b.data;if(c.location&&(c.location.top!==f||c.location.left!==h||c.location.width!==t||c.location.height!==u))throw new e("tilemap:location-mismatch",
"Tilemap response for different location than requested",{response:c,definition:{top:f,left:h,width:t,height:u}});return a.fromJSON(b.data)})};a.fromJSON=function(c){a.validateJSON(c);var b=new a;b.location=Object.freeze(f.clone(c.location));b._updateFromData(c.data);return Object.freeze(b)};a.validateJSON=function(a){if(!a||!a.location)throw new e("tilemap:missing-location","Location missing from tilemap response");if(!a.valid)throw new e("tilemap:invalid","Tilemap response was marked as invalid");
if(!a.data)throw new e("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(a.data))throw new e("tilemap:data-mismatch","Data must be an array of numbers");if(a.data.length!==a.location.width*a.location.height)throw new e("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");};return a}();h.Tilemap=a;h.tilemapDefinitionId=function(a){return a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height};h.tilemapDefinitionUrl=l;Object.defineProperty(h,
"__esModule",{value:!0});h.default=a})},"esri/layers/mixins/OperationalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/MultiOriginJSONSupport ../../core/Error ../../core/urlUtils ../../core/accessorSupport/read".split(" "),function(a,h,p,m,f,e,l,g,c,b){a=function(a){function e(){var b=null!==a&&a.apply(this,arguments)||this;b.title="Layer";return b}p(e,a);e.prototype.writeListMode=
function(b,a){b&&(a.listMode=b)};e.prototype.writeTitle=function(b,a){a.title=b||"Layer"};e.prototype.writeUrl=function(b,a){b&&c.isProtocolRelative(b)&&(b="https:"+b);a.url=b};e.prototype.writeOperationalLayerType=function(b,a){b&&(a.layerType=b)};e.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!==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};e.prototype.readVisible=function(b,a){return!!a.visibility};e.prototype.read=function(a,c){var e=this,g=arguments;b.readLoadable(this,a,function(d){return e.inherited(g,[a,d])},c);return this};e.prototype.write=function(b,a){if(a&&a.origin){var c=a.origin+"/"+(a.layerContainerType||"operational-layers"),e=x[c];if(e&&!e[this.operationalLayerType])return a.messages&&
a.messages.push(new g("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&&!q[this.operationalLayerType])return a.messages&&a.messages.push(new g("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to a '"+a.origin+"'",{layer:this})),null}return this.inherited(arguments,[b,a])};return e}(f.declared(e,l));
m([f.property({json:{write:{ignoreOrigin:!0}}})],a.prototype,"id",void 0);m([f.property()],a.prototype,"listMode",void 0);m([f.writer("listMode")],a.prototype,"writeListMode",null);m([f.property({json:{write:{ignoreOrigin:!0,allowNull:!0}}})],a.prototype,"title",void 0);m([f.writer("title")],a.prototype,"writeTitle",null);m([f.property({json:{write:{ignoreOrigin:!0}}})],a.prototype,"url",void 0);m([f.writer("url")],a.prototype,"writeUrl",null);m([f.property({json:{write:{target:"layerType",ignoreOrigin:!0}}})],
a.prototype,"operationalLayerType",void 0);m([f.writer("operationalLayerType")],a.prototype,"writeOperationalLayerType",null);m([f.property({json:{write:{ignoreOrigin:!0}}})],a.prototype,"opacity",void 0);m([f.reader("opacity",["opacity","layerDefinition.drawingInfo.transparency","drawingInfo.transparency"])],a.prototype,"readOpacity",null);m([f.property({json:{write:{target:"visibility",ignoreOrigin:!0}}})],a.prototype,"visible",void 0);m([f.reader("visible",["visibility"])],a.prototype,"readVisible",
null);a=m([f.subclass("esri.layers.mixins.OperationalLayer")],a);var q={GroupLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,ArcGISFeatureLayer:!0,CSV:!0,VectorTileLayer:!0},x={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,VectorTileLayer:!0},"web-scene/basemap":{ArcGISTiledElevationServiceLayer:!0,
ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0},"web-map/operational-layers":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGSFeatureLayer:!0,CSV:!0,GeoRSS:!0,KML:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,
ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,bingLayer:!0}};return a})},"esri/layers/mixins/PortalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Error ../../core/Logger ../../core/requireUtils ../../core/promiseUtils ../../core/urlUtils ../../portal/PortalItem ../../portal/Portal".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y){var t=g.getLogger("esri.layers.Layer");h=function(e){function g(){return null!==e&&e.apply(this,arguments)||this}p(g,e);Object.defineProperty(g.prototype,"portalItem",{set:function(b){b!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",b))},enumerable:!0,configurable:!0});g.prototype.writePortalItem=function(b,a){b&&b.id&&(a.itemId=b.id)};g.prototype.loadFromPortal=function(e){var n=this;return this.portalItem&&this.portalItem.id?
c.when(a,"../../portal/support/layersLoader").then(function(d){return d.load({instance:n,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData}).otherwise(function(d){t.warn("Failed to load layer ("+n.title+", "+n.id+") portal item ("+n.portalItem.id+")\n  "+d);throw d;})}):b.resolve()};g.prototype.write=function(b,a){var d=a&&a.portal,k=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.getDefault());return d&&k&&!q.hasSamePortal(k.restUrl,d.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)};return g}(f.declared(e));m([f.property({type:x})],h.prototype,"portalItem",null);m([f.writer("portalItem")],h.prototype,"writePortalItem",
null);return h=m([f.subclass("esri.layers.mixins.PortalLayer")],h)})},"esri/layers/support/rasterFormats/LercCodec":function(){define([],function(){var a={defaultNoDataValue:-3.4027999387901484E38,decode:function(p,m){var f;m=m||{};var e=m.inputOffset||0,l=m.encodedMaskData||null===m.encodedMaskData,g={},c=new Uint8Array(p,e,10);g.fileIdentifierString=String.fromCharCode.apply(null,c);if("CntZImage"!=g.fileIdentifierString.trim())throw"Unexpected file identifier string: "+g.fileIdentifierString;e+=
10;c=new DataView(p,e,24);g.fileVersion=c.getInt32(0,!0);g.imageType=c.getInt32(4,!0);g.height=c.getUint32(8,!0);g.width=c.getUint32(12,!0);g.maxZError=c.getFloat64(16,!0);e+=24;if(!l)if(c=new DataView(p,e,16),g.mask={},g.mask.numBlocksY=c.getUint32(0,!0),g.mask.numBlocksX=c.getUint32(4,!0),g.mask.numBytes=c.getUint32(8,!0),g.mask.maxValue=c.getFloat32(12,!0),e+=16,0<g.mask.numBytes){var l=new Uint8Array(Math.ceil(g.width*g.height/8)),c=new DataView(p,e,g.mask.numBytes),b=c.getInt16(0,!0),q=2,x=0;
do{if(0<b)for(;b--;)l[x++]=c.getUint8(q++);else for(var y=c.getUint8(q++),b=-b;b--;)l[x++]=y;b=c.getInt16(q,!0);q+=2}while(q<g.mask.numBytes);if(-32768!==b||x<l.length)throw"Unexpected end of mask RLE encoding";g.mask.bitset=l;e+=g.mask.numBytes}else 0===(g.mask.numBytes|g.mask.numBlocksY|g.mask.maxValue)&&(l=new Uint8Array(Math.ceil(g.width*g.height/8)),g.mask.bitset=l);c=new DataView(p,e,16);g.pixels={};g.pixels.numBlocksY=c.getUint32(0,!0);g.pixels.numBlocksX=c.getUint32(4,!0);g.pixels.numBytes=
c.getUint32(8,!0);g.pixels.maxValue=c.getFloat32(12,!0);e+=16;l=g.pixels.numBlocksX;c=g.pixels.numBlocksY;l+=0<g.width%l?1:0;b=c+(0<g.height%c?1:0);g.pixels.blocks=Array(l*b);q=1E9;for(y=x=0;y<b;y++)for(var t=0;t<l;t++){var u=0,c=new DataView(p,e,Math.min(10,p.byteLength-e)),r={};g.pixels.blocks[x++]=r;var n=c.getUint8(0);u++;r.encoding=n&63;if(3<r.encoding)throw"Invalid block encoding ("+r.encoding+")";if(2===r.encoding)e++,q=Math.min(q,0);else{if(0!==n&&2!==n){n>>=6;r.offsetType=n;if(2===n)r.offset=
c.getInt8(1),u++;else if(1===n)r.offset=c.getInt16(1,!0),u+=2;else if(0===n)r.offset=c.getFloat32(1,!0),u+=4;else throw"Invalid block offset type";q=Math.min(r.offset,q);if(1===r.encoding)if(n=c.getUint8(u),u++,r.bitsPerPixel=n&63,n>>=6,r.numValidPixelsType=n,2===n)r.numValidPixels=c.getUint8(u),u++;else if(1===n)r.numValidPixels=c.getUint16(u,!0),u+=2;else if(0===n)r.numValidPixels=c.getUint32(u,!0),u+=4;else throw"Invalid valid pixel count type";}e+=u;if(3!=r.encoding)if(0===r.encoding){c=(g.pixels.numBytes-
1)/4;if(c!==Math.floor(c))throw"uncompressed block has invalid length";u=new ArrayBuffer(4*c);n=new Uint8Array(u);n.set(new Uint8Array(p,e,4*c));u=new Float32Array(u);for(n=0;n<u.length;n++)q=Math.min(q,u[n]);r.rawData=u;e+=4*c}else 1===r.encoding&&(c=Math.ceil(r.numValidPixels*r.bitsPerPixel/8),u=new ArrayBuffer(4*Math.ceil(c/4)),n=new Uint8Array(u),n.set(new Uint8Array(p,e,c)),r.stuffedData=new Uint32Array(u),e+=c)}}g.pixels.minValue=q;g.eofOffset=e;p=null!=m.noDataValue?m.noDataValue:a.defaultNoDataValue;
var l=m.encodedMaskData,r=m.returnMask,c=0,b=g.pixels.numBlocksX,q=g.pixels.numBlocksY,x=Math.floor(g.width/b),y=Math.floor(g.height/q),t=2*g.maxZError,l=l||(g.mask?g.mask.bitset:null),w,e=new (m.pixelType||Float32Array)(g.width*g.height);r&&l&&(w=new Uint8Array(g.width*g.height));for(var r=new Float32Array(x*y),d,k,u=0;u<=q;u++)if(n=u!==q?y:g.height%q,0!==n)for(var v=0;v<=b;v++){var A=v!==b?x:g.width%b;if(0!==A){var z=u*g.width*y+v*x,D=g.width-A,B=g.pixels.blocks[c],C,F;if(2>B.encoding){if(0===B.encoding)C=
B.rawData;else{C=B.stuffedData;F=B.bitsPerPixel;d=B.numValidPixels;k=B.offset;var K=t,M=r,E=g.pixels.maxValue,V=(1<<F)-1,P=0,I=void 0,J=0,Q=void 0,S=void 0,ga=Math.ceil((E-k)/K);C[C.length-1]<<=8*(4*C.length-Math.ceil(F*d/8));for(I=0;I<d;I++)0===J&&(S=C[P++],J=32),J>=F?(Q=S>>>J-F&V,J-=F):(J=F-J,Q=(S&V)<<J&V,S=C[P++],J=32-J,Q+=S>>>J),M[I]=Q<ga?k+Q*K:E;C=r}F=0}else f=2===B.encoding?0:B.offset;var L;if(l)for(k=0;k<n;k++){z&7&&(L=l[z>>3],L<<=z&7);for(d=0;d<A;d++)z&7||(L=l[z>>3]),L&128?(w&&(w[z]=1),e[z++]=
2>B.encoding?C[F++]:f):(w&&(w[z]=0),e[z++]=p),L<<=1;z+=D}else if(2>B.encoding)for(k=0;k<n;k++){for(d=0;d<A;d++)e[z++]=C[F++];z+=D}else for(k=0;k<n;k++){for(d=0;d<A;d++)e[z++]=f;z+=D}if(1===B.encoding&&F!==B.numValidPixels)throw"Block and Mask do not match";c++}}f=w;w={width:g.width,height:g.height,pixelData:e,minValue:g.pixels.minValue,maxValue:g.pixels.maxValue,noDataValue:p};f&&(w.maskData=f);m.returnEncodedMask&&g.mask&&(w.encodedMaskData=g.mask.bitset?g.mask.bitset:null);if(m.returnFileInfo&&
(w.fileInfo=h(g),m.computeUsedBitDepths)){m=w.fileInfo;f=g.pixels.numBlocksX*g.pixels.numBlocksY;L={};for(C=0;C<f;C++)F=g.pixels.blocks[C],0===F.encoding?L.float32=!0:1===F.encoding?L[F.bitsPerPixel]=!0:L[0]=!0;g=Object.keys(L);m.bitDepths=g}return w}},h=function(a){return{fileIdentifierString:a.fileIdentifierString,fileVersion:a.fileVersion,imageType:a.imageType,height:a.height,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/Viewpoint":function(){define(["./core/JSONSupport","./Camera","./core/lang","./geometry/support/jsonUtils"],function(a,h,p,m){var f=a.createSubclass({declaredClass:"esri.Viewpoint",properties:{rotation:{value:0,cast:function(a){a%=360;0>a&&(a+=
360);return a}},scale:0,targetGeometry:{value:null,json:{read:function(a){return m.fromJSON(a)}}},camera:{value:null,type:h}},toJSON:function(){var a={scale:this.scale,rotation:this.rotation,targetGeometry:this.targetGeometry?this.targetGeometry.toJSON():void 0,camera:this.camera?this.camera.toJSON():void 0};a.camera&&delete a.camera.fov;return p.fixJson(a)},clone:function(){return new f({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry?this.targetGeometry.clone():null,camera:this.camera?
this.camera.clone():null})}});return f})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/lang ./geometry/Point ./views/3d/support/mathUtils ./core/accessorSupport/decorators".split(" "),function(a,h,p,m,f,e,l,g,c){a=b=function(a){function c(b){b=a.call(this)||this;b.position=null;b.heading=0;b.tilt=0;b.fov=55;return b}p(c,a);c.prototype.getDefaults=function(b){if(!b.position)return{position:new l([0,
0,0])}};c.prototype.normalizeCtorArgs=function(b,a,c,e){b&&"object"===typeof b&&("x"in b||Array.isArray(b))&&(b={position:b},null!=a&&(b.heading=a),null!=c&&(b.tilt=c),null!=e&&(b.fov=e));return b};c.prototype.equals=function(b){return b?this.tilt===b.tilt&&this.heading===b.heading&&this.fov===b.fov&&this.position.equals(b.position):!1};c.prototype.clone=function(){return new b({position:this.position.clone(),heading:this.heading,tilt:this.tilt,fov:this.fov})};c.prototype.toJSON=function(){var b=
{position:this.position.toJSON(),heading:this.heading,tilt:this.tilt};return e.fixJson(b)};return c}(c.declared(f));m([c.property({type:l})],a.prototype,"position",void 0);m([c.property(),c.cast(g.cyclicalDeg.normalize)],a.prototype,"heading",void 0);m([c.property(),c.cast(function(b){return g.clamp(b,-180,180)})],a.prototype,"tilt",void 0);m([c.property({json:{read:!1,write:!1}})],a.prototype,"fov",void 0);a=b=m([c.subclass("esri.Camera")],a);var b;return a})},"esri/views/3d/support/mathUtils":function(){define(["../lib/glMatrix"],
function(a){function h(b){for(var a in b){var c=b[a];"function"===typeof c&&(b[a]=c.bind(b))}return b}var p=a.vec3d,m=a.mat4d,f=p.create(),e=m.create(),l=p.create(),g=p.create(),c={deg2rad:function(b){return b*Math.PI/180},rad2deg:function(b){return 180*b/Math.PI},asin:function(b){return Math.asin(1<b?1:-1>b?-1:b)},acos:function(b){return Math.acos(1<b?1:-1>b?-1:b)},log2:Math.log2||function(b){return Math.log(b)/Math.LN2},fovx2fovy:function(b,a,c){return 2*Math.atan(c*Math.tan(.5*b)/a)},fovy2fovx:function(b,
a,c){return 2*Math.atan(a*Math.tan(.5*b)/c)},lerp:function(b,a,c){return b+(a-b)*c},bilerp:function(b,a,c,e,g,f){b+=(a-b)*g;return b+(c+(e-c)*g-b)*f},slerp:function(b,a,c,g){g||(g=b);var l=p.length(b),q=p.length(a),r=p.dot(b,a)/l/q;.999999999999>r&&(p.cross(b,a,f),m.identity(e),m.rotate(e,c*Math.acos(r),f),m.multiplyVec3(e,b,g));p.scale(g,((1-c)*l+c*q)/l)},slerpOrLerp:function(b,a,c,g,l){var q=p.length(b),r=p.length(a);p.cross(b,a,f);p.length(f)/q/r>l?(a=Math.acos(p.dot(b,a)/q/r),m.identity(e),m.rotate(e,
c*a,f),m.multiplyVec3(e,b,g),p.scale(g,((1-c)*q+c*r)/q)):p.lerp(b,a,c,g)},angle:function(b,a,e){b=p.normalize(b,l);a=p.normalize(a,g);var m=c.acos(p.dot(b,a));return e&&(b=p.cross(b,a,f),0>p.dot(b,e))?-m:m},clamp:function(b,a,c){return b<a?a:b>c?c:b},isFinite:Number.isFinite||function(b){return"number"===typeof b&&isFinite(b)},isNaN:Number.isNaN||function(b){return b!==b},makePiecewiseLinearFunction:function(b){var a=b.length;return function(c){var e=0;if(c<=b[0][0])return b[0][1];if(c>=b[a-1][0])return b[a-
1][1];for(;c>b[e][0];)e++;var g=b[e][0];c=(g-c)/(g-b[e-1][0]);return c*b[e-1][1]+(1-c)*b[e][1]}},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},floatEqualRelative:function(b,a,c){void 0===c&&(c=1E-6);if(isNaN(b)||isNaN(a))return!1;if(b===a)return!0;var e=Math.abs(b-a),g=Math.abs(b),f=Math.abs(a);if(0===b||0===a||1E-12>g&&1E-12>f){if(e>.01*c)return!1}else if(e/(g+f)>c)return!1;return!0},floatEqualAbsolute:function(b,
a,c){void 0===c&&(c=1E-6);return isNaN(b)||isNaN(a)?!1:(b>a?b-a:a-b)<=c},Cyclical:function(b,a){this.min=b;this.max=a;this.range=a-b;this.ndiff=function(b,a){a=a||0;return Math.ceil((b-a)/this.range)*this.range+a};this._normalize=function(b,a,c,e){e=e||0;c-=e;c<b?c+=this.ndiff(b-c):c>a&&(c-=this.ndiff(c-a));return c+e};this.normalize=function(b,a){return this._normalize(this.min,this.max,b,a)};this.clamp=function(e,g){g=g||0;return c.clamp(e-g,b,a)+g};this.monotonic=function(b,a,c){return b<a?a:a+
this.ndiff(b-a,c)};this.minimalMonotonic=function(b,a,c){return this._normalize(b,b+this.range,a,c)};this.center=function(b,a,c){a=this.monotonic(b,a,c);return this.normalize((b+a)/2,c)};this.diff=function(b,a,c){return this.monotonic(b,a,c)-b};this.contains=function(b,a,c){a=this.minimalMonotonic(b,a);c=this.minimalMonotonic(b,c);return c>b&&c<a}}};c.cyclical2PI=h(new c.Cyclical(0,2*Math.PI));c.cyclicalPI=h(new c.Cyclical(-Math.PI,Math.PI));c.cyclicalDeg=h(new c.Cyclical(0,360));return c})},"esri/views/3d/lib/glMatrix":function(){define([],
function(){var a={};(function(a,p){p(a,!0);p(a,!1)})(a,function(a,p){var m={};(function(){if("undefined"!=typeof Float32Array){var d=new Float32Array(1),b=new Int32Array(d.buffer);m.invsqrt=function(a){d[0]=a;b[0]=1597463007-(b[0]>>1);var k=d[0];return k*(1.5-.5*a*k*k)}}else m.invsqrt=function(d){return 1/Math.sqrt(d)}})();var f=Array;"undefined"!=typeof Float32Array&&(f=p?Float32Array:Array);var e={create:function(d){var b=new f(3);d?(b[0]=d[0],b[1]=d[1],b[2]=d[2]):b[0]=b[1]=b[2]=0;return b},createFrom:function(d,
b,a){var k=new f(3);k[0]=d;k[1]=b;k[2]=a;return k},set:function(d,b){b[0]=d[0];b[1]=d[1];b[2]=d[2];return b},set3:function(d,b,a,c){c[0]=d;c[1]=b;c[2]=a;return c},add:function(d,b,a){if(!a||d===a)return d[0]+=b[0],d[1]+=b[1],d[2]+=b[2],d;a[0]=d[0]+b[0];a[1]=d[1]+b[1];a[2]=d[2]+b[2];return a},subtract:function(d,b,a){if(!a||d===a)return d[0]-=b[0],d[1]-=b[1],d[2]-=b[2],d;a[0]=d[0]-b[0];a[1]=d[1]-b[1];a[2]=d[2]-b[2];return a},multiply:function(d,b,a){if(!a||d===a)return d[0]*=b[0],d[1]*=b[1],d[2]*=
b[2],d;a[0]=d[0]*b[0];a[1]=d[1]*b[1];a[2]=d[2]*b[2];return a},max:function(d,b,a){a[0]=Math.max(d[0],b[0]);a[1]=Math.max(d[1],b[1]);a[2]=Math.max(d[2],b[2]);return a},min:function(d,b,a){a[0]=Math.min(d[0],b[0]);a[1]=Math.min(d[1],b[1]);a[2]=Math.min(d[2],b[2]);return a},negate:function(d,b){b||(b=d);b[0]=-d[0];b[1]=-d[1];b[2]=-d[2];return b},scale:function(d,b,a){if(!a||d===a)return d[0]*=b,d[1]*=b,d[2]*=b,d;a[0]=d[0]*b;a[1]=d[1]*b;a[2]=d[2]*b;return a},normalize:function(d,b){b||(b=d);var a=d[0],
k=d[1];d=d[2];var c=Math.sqrt(a*a+k*k+d*d);if(!c)return b[0]=0,b[1]=0,b[2]=0,b;if(1===c)return b[0]=a,b[1]=k,b[2]=d,b;c=1/c;b[0]=a*c;b[1]=k*c;b[2]=d*c;return b},cross:function(d,b,a){a||(a=d);var k=d[0],c=d[1];d=d[2];var e=b[0],n=b[1];b=b[2];a[0]=c*b-d*n;a[1]=d*e-k*b;a[2]=k*n-c*e;return a},length:function(d){var b=d[0],a=d[1];d=d[2];return Math.sqrt(b*b+a*a+d*d)},length2:function(d){var b=d[0],a=d[1];d=d[2];return b*b+a*a+d*d},dot:function(d,b){return d[0]*b[0]+d[1]*b[1]+d[2]*b[2]},direction:function(d,
b,a){a||(a=d);var k=d[0]-b[0],c=d[1]-b[1];d=d[2]-b[2];b=Math.sqrt(k*k+c*c+d*d);if(!b)return a[0]=0,a[1]=0,a[2]=0,a;b=1/b;a[0]=k*b;a[1]=c*b;a[2]=d*b;return a},lerp:function(d,b,a,c){c||(c=d);c[0]=d[0]+a*(b[0]-d[0]);c[1]=d[1]+a*(b[1]-d[1]);c[2]=d[2]+a*(b[2]-d[2]);return c},dist:function(d,b){var a=b[0]-d[0],k=b[1]-d[1];d=b[2]-d[2];return Math.sqrt(a*a+k*k+d*d)},dist2:function(d,b){var a=b[0]-d[0],k=b[1]-d[1];d=b[2]-d[2];return a*a+k*k+d*d}},l=null,g=new f(4);e.unproject=function(d,b,a,c,e){e||(e=d);
l||(l=u.create());var k=l;g[0]=2*(d[0]-c[0])/c[2]-1;g[1]=2*(d[1]-c[1])/c[3]-1;g[2]=2*d[2]-1;g[3]=1;u.multiply(a,b,k);if(!u.inverse(k))return null;u.multiplyVec4(k,g);if(0===g[3])return null;e[0]=g[0]/g[3];e[1]=g[1]/g[3];e[2]=g[2]/g[3];return e};var c=e.createFrom(1,0,0),b=e.createFrom(0,1,0),q=e.createFrom(0,0,1);e.rotationTo=function(d,a,g){g||(g=r.create());var k=e.dot(d,a),f=e.create();if(1<=k)r.set(n,g);else if(-.999999>k)e.cross(c,d,f),1E-6>f.length&&e.cross(b,d,f),1E-6>f.length&&e.cross(q,d,
f),e.normalize(f),r.fromAxisAngle(f,Math.PI,g);else{var k=Math.sqrt(2*(1+k)),v=1/k;e.cross(d,a,f);g[0]=f[0]*v;g[1]=f[1]*v;g[2]=f[2]*v;g[3]=.5*k;r.normalize(g)}1<g[3]?g[3]=1:-1>g[3]&&(g[3]=-1);return g};var h=e.create(),y=e.create();e.project=function(d,b,a,c){c||(c=d);e.direction(b,a,h);e.subtract(d,b,y);d=e.dot(h,y);e.scale(h,d,c);e.add(c,b,c)};e.str=function(d){return"["+d[0]+", "+d[1]+", "+d[2]+"]"};var t={create:function(d){var b=new f(9);d?(b[0]=d[0],b[1]=d[1],b[2]=d[2],b[3]=d[3],b[4]=d[4],b[5]=
d[5],b[6]=d[6],b[7]=d[7],b[8]=d[8]):b[0]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=0;return b},createFrom:function(d,b,a,c,e,n,g,l,r){var k=new f(9);k[0]=d;k[1]=b;k[2]=a;k[3]=c;k[4]=e;k[5]=n;k[6]=g;k[7]=l;k[8]=r;return k},determinant:function(d){var b=d[3],a=d[4],c=d[5],e=d[6],n=d[7],g=d[8];return d[0]*(g*a-c*n)+d[1]*(-g*b+c*e)+d[2]*(n*b-a*e)},inverse:function(d,b){var a=d[0],k=d[1],c=d[2],e=d[3],n=d[4],g=d[5],f=d[6],l=d[7];d=d[8];var r=d*n-g*l,m=-d*e+g*f,q=l*e-n*f,w=a*r+k*m+c*q;if(!w)return null;w=
1/w;b||(b=t.create());b[0]=r*w;b[1]=(-d*k+c*l)*w;b[2]=(g*k-c*n)*w;b[3]=m*w;b[4]=(d*a-c*f)*w;b[5]=(-g*a+c*e)*w;b[6]=q*w;b[7]=(-l*a+k*f)*w;b[8]=(n*a-k*e)*w;return b},multiply:function(d,b,a){a||(a=d);var k=d[0],c=d[1],e=d[2],n=d[3],g=d[4],f=d[5],v=d[6],l=d[7];d=d[8];var r=b[0],m=b[1],q=b[2],t=b[3],w=b[4],u=b[5],h=b[6],x=b[7];b=b[8];a[0]=r*k+m*n+q*v;a[1]=r*c+m*g+q*l;a[2]=r*e+m*f+q*d;a[3]=t*k+w*n+u*v;a[4]=t*c+w*g+u*l;a[5]=t*e+w*f+u*d;a[6]=h*k+x*n+b*v;a[7]=h*c+x*g+b*l;a[8]=h*e+x*f+b*d;return a},add:function(d,
b,a){a||(a=d);a[0]=d[0]+b[0];a[1]=d[1]+b[1];a[2]=d[2]+b[2];a[3]=d[3]+b[3];a[4]=d[4]+b[4];a[5]=d[5]+b[5];a[6]=d[6]+b[6];a[7]=d[7]+b[7];a[8]=d[8]+b[8];return a},subtract:function(d,b,a){a||(a=d);a[0]=d[0]-b[0];a[1]=d[1]-b[1];a[2]=d[2]-b[2];a[3]=d[3]-b[3];a[4]=d[4]-b[4];a[5]=d[5]-b[5];a[6]=d[6]-b[6];a[7]=d[7]-b[7];a[8]=d[8]-b[8];return a},multiplyVec2:function(d,b,a){a||(a=b);var k=b[0];b=b[1];a[0]=k*d[0]+b*d[3]+d[6];a[1]=k*d[1]+b*d[4]+d[7];return a},multiplyVec3:function(d,b,a){a||(a=b);var k=b[0],
c=b[1];b=b[2];a[0]=k*d[0]+c*d[3]+b*d[6];a[1]=k*d[1]+c*d[4]+b*d[7];a[2]=k*d[2]+c*d[5]+b*d[8];return a},set:function(d,b){b[0]=d[0];b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=d[6];b[7]=d[7];b[8]=d[8];return b},identity:function(d){d||(d=t.create());d[0]=1;d[1]=0;d[2]=0;d[3]=0;d[4]=1;d[5]=0;d[6]=0;d[7]=0;d[8]=1;return d},transpose:function(d,b){if(!b||d===b){b=d[1];var a=d[2],k=d[5];d[1]=d[3];d[2]=d[6];d[3]=b;d[5]=d[7];d[6]=a;d[7]=k;return d}b[0]=d[0];b[1]=d[3];b[2]=d[6];b[3]=d[1];b[4]=d[4];
b[5]=d[7];b[6]=d[2];b[7]=d[5];b[8]=d[8];return b},toMat4:function(d,b){b||(b=u.create());b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=d[8];b[9]=d[7];b[8]=d[6];b[7]=0;b[6]=d[5];b[5]=d[4];b[4]=d[3];b[3]=0;b[2]=d[2];b[1]=d[1];b[0]=d[0];return b},str:function(d){return"["+d[0]+", "+d[1]+", "+d[2]+", "+d[3]+", "+d[4]+", "+d[5]+", "+d[6]+", "+d[7]+", "+d[8]+"]"}},u={create:function(d){var b=new f(16);4===arguments.length?(b[0]=arguments[0],b[1]=arguments[1],b[2]=arguments[2],b[3]=arguments[3],b[4]=arguments[4],
b[5]=arguments[5],b[6]=arguments[6],b[7]=arguments[7],b[8]=arguments[8],b[9]=arguments[9],b[10]=arguments[10],b[11]=arguments[11],b[12]=arguments[12],b[13]=arguments[13],b[14]=arguments[14],b[15]=arguments[15]):d&&(b[0]=d[0],b[1]=d[1],b[2]=d[2],b[3]=d[3],b[4]=d[4],b[5]=d[5],b[6]=d[6],b[7]=d[7],b[8]=d[8],b[9]=d[9],b[10]=d[10],b[11]=d[11],b[12]=d[12],b[13]=d[13],b[14]=d[14],b[15]=d[15]);return b},createFrom:function(d,b,a,c,e,n,g,l,r,m,q,t,w,u,h,x){var k=new f(16);k[0]=d;k[1]=b;k[2]=a;k[3]=c;k[4]=e;
k[5]=n;k[6]=g;k[7]=l;k[8]=r;k[9]=m;k[10]=q;k[11]=t;k[12]=w;k[13]=u;k[14]=h;k[15]=x;return k},createFromMatrixRowMajor:function(d){var b=new f(16);b[0]=d[0];b[4]=d[1];b[8]=d[2];b[12]=d[3];b[1]=d[4];b[5]=d[5];b[9]=d[6];b[13]=d[7];b[2]=d[8];b[6]=d[9];b[10]=d[10];b[14]=d[11];b[3]=d[12];b[7]=d[13];b[11]=d[14];b[15]=d[15];return b},createFromMatrix:function(b){var d=new f(16);d[0]=b[0];d[1]=b[1];d[2]=b[2];d[3]=b[3];d[4]=b[4];d[5]=b[5];d[6]=b[6];d[7]=b[7];d[8]=b[8];d[9]=b[9];d[10]=b[10];d[11]=b[11];d[12]=
b[12];d[13]=b[13];d[14]=b[14];d[15]=b[15];return d},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=u.create());b[0]=
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],e=b[7],n=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]=e;b[14]=n;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},
determinant:function(b){var d=b[0],a=b[1],c=b[2],e=b[3],n=b[4],g=b[5],f=b[6],l=b[7],r=b[8],m=b[9],q=b[10],t=b[11],w=b[12],u=b[13],h=b[14];b=b[15];return w*m*f*e-r*u*f*e-w*g*q*e+n*u*q*e+r*g*h*e-n*m*h*e-w*m*c*l+r*u*c*l+w*a*q*l-d*u*q*l-r*a*h*l+d*m*h*l+w*g*c*t-n*u*c*t-w*a*f*t+d*u*f*t+n*a*h*t-d*g*h*t-r*g*c*b+n*m*c*b+r*a*f*b-d*m*f*b-n*a*q*b+d*g*q*b},inverse:function(b,a){a||(a=b);var d=b[0],c=b[1],k=b[2],e=b[3],n=b[4],g=b[5],f=b[6],l=b[7],r=b[8],m=b[9],q=b[10],t=b[11],w=b[12],u=b[13],h=b[14];b=b[15];var x=
d*g-c*n,p=d*f-k*n,y=d*l-e*n,R=c*f-k*g,U=c*l-e*g,T=k*l-e*f,N=r*u-m*w,Z=r*h-q*w,H=r*b-t*w,O=m*h-q*u,aa=m*b-t*u,ba=q*b-t*h,X=x*ba-p*aa+y*O+R*H-U*Z+T*N;if(!X)return null;X=1/X;a[0]=(g*ba-f*aa+l*O)*X;a[1]=(-c*ba+k*aa-e*O)*X;a[2]=(u*T-h*U+b*R)*X;a[3]=(-m*T+q*U-t*R)*X;a[4]=(-n*ba+f*H-l*Z)*X;a[5]=(d*ba-k*H+e*Z)*X;a[6]=(-w*T+h*y-b*p)*X;a[7]=(r*T-q*y+t*p)*X;a[8]=(n*aa-g*H+l*N)*X;a[9]=(-d*aa+c*H-e*N)*X;a[10]=(w*U-u*y+b*x)*X;a[11]=(-r*U+m*y-t*x)*X;a[12]=(-n*O+g*Z-f*N)*X;a[13]=(d*O-c*Z+k*N)*X;a[14]=(-w*R+u*p-
h*x)*X;a[15]=(r*R-m*p+q*x)*X;return a},toRotationMat:function(b,a){a||(a=u.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=t.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],k=b[2],e=b[4],n=b[5],g=b[6],f=b[8],l=b[9];b=b[10];var r=b*n-g*l,
m=-b*e+g*f,q=l*e-n*f,w=d*r+c*m+k*q;if(!w)return null;w=1/w;a||(a=t.create());a[0]=r*w;a[1]=(-b*c+k*l)*w;a[2]=(g*c-k*n)*w;a[3]=m*w;a[4]=(b*d-k*f)*w;a[5]=(-g*d+k*e)*w;a[6]=q*w;a[7]=(-l*d+c*f)*w;a[8]=(n*d-c*e)*w;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],k=b[1],e=b[2],n=b[3],g=b[4],f=b[5],v=b[6],l=b[7],r=b[8],m=b[9],q=b[10],t=b[11],w=b[12],u=b[13],h=b[14];b=b[15];var x=a[0],p=a[1],y=a[2],U=a[3],T=a[4],N=a[5],Z=a[6],H=a[7],O=a[8],aa=a[9],ba=a[10],X=a[11],ea=a[12],la=a[13],ta=a[14];a=a[15];
c[0]=x*d+p*g+y*r+U*w;c[1]=x*k+p*f+y*m+U*u;c[2]=x*e+p*v+y*q+U*h;c[3]=x*n+p*l+y*t+U*b;c[4]=T*d+N*g+Z*r+H*w;c[5]=T*k+N*f+Z*m+H*u;c[6]=T*e+N*v+Z*q+H*h;c[7]=T*n+N*l+Z*t+H*b;c[8]=O*d+aa*g+ba*r+X*w;c[9]=O*k+aa*f+ba*m+X*u;c[10]=O*e+aa*v+ba*q+X*h;c[11]=O*n+aa*l+ba*t+X*b;c[12]=ea*d+la*g+ta*r+a*w;c[13]=ea*k+la*f+ta*m+a*u;c[14]=ea*e+la*v+ta*q+a*h;c[15]=ea*n+la*l+ta*t+a*b;return c},multiplyVec3:function(b,a,c){c||(c=a);var d=a[0],k=a[1];a=a[2];c[0]=b[0]*d+b[4]*k+b[8]*a+b[12];c[1]=b[1]*d+b[5]*k+b[9]*a+b[13];c[2]=
b[2]*d+b[6]*k+b[10]*a+b[14];return c},multiplyVec4:function(b,a,c){c||(c=a);var d=a[0],k=a[1],e=a[2];a=a[3];c[0]=b[0]*d+b[4]*k+b[8]*e+b[12]*a;c[1]=b[1]*d+b[5]*k+b[9]*e+b[13]*a;c[2]=b[2]*d+b[6]*k+b[10]*e+b[14]*a;c[3]=b[3]*d+b[7]*k+b[11]*e+b[15]*a;return c},translate:function(b,a,c){var d=a[0],k=a[1];a=a[2];var e,n,g,f,v,l,r,m,q,t,w,u;if(!c||b===c)return b[12]=b[0]*d+b[4]*k+b[8]*a+b[12],b[13]=b[1]*d+b[5]*k+b[9]*a+b[13],b[14]=b[2]*d+b[6]*k+b[10]*a+b[14],b[15]=b[3]*d+b[7]*k+b[11]*a+b[15],b;e=b[0];n=b[1];
g=b[2];f=b[3];v=b[4];l=b[5];r=b[6];m=b[7];q=b[8];t=b[9];w=b[10];u=b[11];c[0]=e;c[1]=n;c[2]=g;c[3]=f;c[4]=v;c[5]=l;c[6]=r;c[7]=m;c[8]=q;c[9]=t;c[10]=w;c[11]=u;c[12]=e*d+v*k+q*a+b[12];c[13]=n*d+l*k+t*a+b[13];c[14]=g*d+r*k+w*a+b[14];c[15]=f*d+m*k+u*a+b[15];return c},scale:function(b,a,c){var d=a[0],k=a[1];a=a[2];if(!c||b===c)return b[0]*=d,b[1]*=d,b[2]*=d,b[3]*=d,b[4]*=k,b[5]*=k,b[6]*=k,b[7]*=k,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]=b[2]*d;c[3]=b[3]*d;c[4]=b[4]*k;c[5]=b[5]*
k;c[6]=b[6]*k;c[7]=b[7]*k;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,e){var d=c[0],k=c[1];c=c[2];var n=Math.sqrt(d*d+k*k+c*c),g,f,v,l,r,m,q,t,w,u,h,A,x,p,y,T,N,Z,H,O;if(!n)return null;1!==n&&(n=1/n,d*=n,k*=n,c*=n);g=Math.sin(a);f=Math.cos(a);
v=1-f;a=b[0];n=b[1];l=b[2];r=b[3];m=b[4];q=b[5];t=b[6];w=b[7];u=b[8];h=b[9];A=b[10];x=b[11];p=d*d*v+f;y=k*d*v+c*g;T=c*d*v-k*g;N=d*k*v-c*g;Z=k*k*v+f;H=c*k*v+d*g;O=d*c*v+k*g;d=k*c*v-d*g;k=c*c*v+f;e?b!==e&&(e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15]):e=b;e[0]=a*p+m*y+u*T;e[1]=n*p+q*y+h*T;e[2]=l*p+t*y+A*T;e[3]=r*p+w*y+x*T;e[4]=a*N+m*Z+u*H;e[5]=n*N+q*Z+h*H;e[6]=l*N+t*Z+A*H;e[7]=r*N+w*Z+x*H;e[8]=a*O+m*d+u*k;e[9]=n*O+q*d+h*k;e[10]=l*O+t*d+A*k;e[11]=r*O+w*d+x*k;return e},rotateX:function(b,a,c){var d=
Math.sin(a);a=Math.cos(a);var k=b[4],e=b[5],n=b[6],g=b[7],f=b[8],v=b[9],l=b[10],r=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]=k*a+f*d;c[5]=e*a+v*d;c[6]=n*a+l*d;c[7]=g*a+r*d;c[8]=k*-d+f*a;c[9]=e*-d+v*a;c[10]=n*-d+l*a;c[11]=g*-d+r*a;return c},rotateY:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var k=b[0],e=b[1],n=b[2],g=b[3],f=b[8],v=b[9],l=b[10],r=b[11];c?b!==c&&(c[4]=b[4],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]=k*a+f*-d;c[1]=e*a+v*-d;c[2]=n*a+l*-d;c[3]=g*a+r*-d;c[8]=k*d+f*a;c[9]=e*d+v*a;c[10]=n*d+l*a;c[11]=g*d+r*a;return c},rotateZ:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var k=b[0],e=b[1],n=b[2],g=b[3],f=b[4],v=b[5],l=b[6],r=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]=k*a+f*d;c[1]=e*a+v*d;c[2]=n*a+l*d;c[3]=g*a+r*d;c[4]=k*-d+f*a;c[5]=e*-d+v*a;c[6]=n*-d+l*a;c[7]=g*-d+r*a;return c},frustum:function(b,
a,c,e,n,g,f){f||(f=u.create());var d=a-b,k=e-c,v=g-n;f[0]=2*n/d;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=2*n/k;f[6]=0;f[7]=0;f[8]=(a+b)/d;f[9]=(e+c)/k;f[10]=-(g+n)/v;f[11]=-1;f[12]=0;f[13]=0;f[14]=-(g*n*2)/v;f[15]=0;return f},perspective:function(b,a,c,e,n){b=c*Math.tan(b*Math.PI/360);a*=b;return u.frustum(-a,a,-b,b,c,e,n)},ortho:function(b,a,c,e,n,g,f){f||(f=u.create());var d=a-b,k=e-c,v=g-n;f[0]=2/d;f[1]=0;f[2]=0;f[3]=0;f[4]=0;f[5]=2/k;f[6]=0;f[7]=0;f[8]=0;f[9]=0;f[10]=-2/v;f[11]=0;f[12]=-(b+a)/d;f[13]=
-(e+c)/k;f[14]=-(g+n)/v;f[15]=1;return f},lookAt:function(b,a,c,e){e||(e=u.create());var d,k,n,g,f,v,l,r,m=b[0],q=b[1];b=b[2];n=c[0];g=c[1];k=c[2];l=a[0];c=a[1];d=a[2];if(m===l&&q===c&&b===d)return u.identity(e);a=m-l;c=q-c;l=b-d;r=1/Math.sqrt(a*a+c*c+l*l);a*=r;c*=r;l*=r;d=g*l-k*c;k=k*a-n*l;n=n*c-g*a;(r=Math.sqrt(d*d+k*k+n*n))?(r=1/r,d*=r,k*=r,n*=r):n=k=d=0;g=c*n-l*k;f=l*d-a*n;v=a*k-c*d;(r=Math.sqrt(g*g+f*f+v*v))?(r=1/r,g*=r,f*=r,v*=r):v=f=g=0;e[0]=d;e[1]=g;e[2]=a;e[3]=0;e[4]=k;e[5]=f;e[6]=c;e[7]=
0;e[8]=n;e[9]=v;e[10]=l;e[11]=0;e[12]=-(d*m+k*q+n*b);e[13]=-(g*m+f*q+v*b);e[14]=-(a*m+c*q+l*b);e[15]=1;return e},fromRotationTranslation:function(b,a,c){c||(c=u.create());var d=b[0],k=b[1],e=b[2],n=b[3],g=d+d,f=k+k,v=e+e;b=d*g;var l=d*f,d=d*v,r=k*f,k=k*v,e=e*v,g=n*g,f=n*f,n=n*v;c[0]=1-(r+e);c[1]=l+n;c[2]=d-f;c[3]=0;c[4]=l-n;c[5]=1-(b+e);c[6]=k+g;c[7]=0;c[8]=d+f;c[9]=k-g;c[10]=1-(b+r);c[11]=0;c[12]=a[0];c[13]=a[1];c[14]=a[2];c[15]=1;return c},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 d=new f(4);b?(d[0]=b[0],d[1]=b[1],d[2]=b[2],d[3]=b[3]):d[0]=d[1]=d[2]=d[3]=0;return d},createFrom:function(b,a,c,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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;b[1]=0;b[2]=0;b[3]=1;return b}},n=r.identity();r.calculateW=
function(b,a){var d=b[0],c=b[1],k=b[2];if(!a||b===a)return b[3]=-Math.sqrt(Math.abs(1-d*d-c*c-k*k)),b;a[0]=d;a[1]=c;a[2]=k;a[3]=-Math.sqrt(Math.abs(1-d*d-c*c-k*k));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],k=b[2],e=b[3],d=(d=d*d+c*c+k*k+e*e)?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};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 d=b[0],a=b[1],c=b[2];b=b[3];return Math.sqrt(d*d+a*a+c*c+b*b)};r.normalize=function(b,a){a||(a=b);var d=b[0],c=b[1],k=b[2];b=b[3];var e=Math.sqrt(d*d+c*c+k*k+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]=k*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;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],k=b[1],e=b[2];b=b[3];var n=a[0],g=a[1],f=a[2];a=a[3];c[0]=d*a+b*n+k*f-e*g;c[1]=k*a+b*g+e*n-d*f;c[2]=e*a+b*f+d*g-k*n;c[3]=b*a-d*n-k*g-e*f;return c};r.multiplyVec3=function(b,a,c){c||(c=a);var d=a[0],k=a[1],e=a[2];a=b[0];var n=b[1],g=b[2];b=b[3];var f=b*d+n*e-g*k,v=b*k+g*d-a*e,l=b*e+a*k-n*d,d=-a*d-n*k-g*e;c[0]=f*b+d*-a+v*-g-l*-n;c[1]=v*b+d*-n+l*-a-f*-g;c[2]=l*b+d*-g+f*-n-v*-a;return c};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=t.create());var d=b[0],c=b[1],k=b[2],e=b[3],n=d+d,g=c+c,f=k+k;b=d*n;var l=d*g,d=d*f,r=c*g,c=c*f,k=k*f,n=e*n,g=e*g,e=e*f;a[0]=1-(r+k);a[1]=l+e;a[2]=d-g;a[3]=l-e;a[4]=1-(b+k);a[5]=c+n;a[6]=d+g;a[7]=c-n;a[8]=1-(b+r);return a};r.toMat4=function(b,a){a||(a=u.create());var d=b[0],c=b[1],k=b[2],e=b[3],n=d+d,g=c+c,f=k+k;b=d*n;var l=d*g,d=d*f,r=c*g,c=c*f,k=k*f,n=e*n,g=e*g,e=e*f;a[0]=1-(r+k);a[1]=l+e;
a[2]=d-g;a[3]=0;a[4]=l-e;a[5]=1-(b+k);a[6]=c+n;a[7]=0;a[8]=d+g;a[9]=c-n;a[10]=1-(b+r);a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};r.slerp=function(b,a,c,e){e||(e=b);var d=b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3],k,n;if(1<=Math.abs(d))return e!==b&&(e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3]),e;k=Math.acos(d);n=Math.sqrt(1-d*d);if(.001>Math.abs(n))return e[0]=.5*b[0]+.5*a[0],e[1]=.5*b[1]+.5*a[1],e[2]=.5*b[2]+.5*a[2],e[3]=.5*b[3]+.5*a[3],e;d=Math.sin((1-c)*k)/n;c=Math.sin(c*k)/n;e[0]=b[0]*d+a[0]*
c;e[1]=b[1]*d+a[1]*c;e[2]=b[2]*d+a[2]*c;e[3]=b[3]*d+a[3]*c;return e};r.fromRotationMatrix=function(b,a){a||(a=r.create());var d=b[0]+b[4]+b[8],c;if(0<d)c=Math.sqrt(d+1),a[3]=.5*c,c=.5/c,a[0]=(b[7]-b[5])*c,a[1]=(b[2]-b[6])*c,a[2]=(b[3]-b[1])*c;else{c=r.fromRotationMatrix.s_iNext=r.fromRotationMatrix.s_iNext||[1,2,0];d=0;b[4]>b[0]&&(d=1);b[8]>b[3*d+d]&&(d=2);var e=c[d],k=c[e];c=Math.sqrt(b[3*d+d]-b[3*e+e]-b[3*k+k]+1);a[d]=.5*c;c=.5/c;a[3]=(b[3*k+e]-b[3*e+k])*c;a[e]=(b[3*e+d]+b[3*d+e])*c;a[k]=(b[3*k+
d]+b[3*d+k])*c}return a};t.toQuat4=r.fromRotationMatrix;(function(){var b=t.create();r.fromAxes=function(a,d,c,e){b[0]=d[0];b[3]=d[1];b[6]=d[2];b[1]=c[0];b[4]=c[1];b[7]=c[2];b[2]=a[0];b[5]=a[1];b[8]=a[2];return r.fromRotationMatrix(b,e)}})();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];return c};r.toAngleAxis=function(b,a){a||(a=b);var d=
b[0]*b[0]+b[1]*b[1]+b[2]*b[2];0<d?(a[3]=2*Math.acos(b[3]),d=m.invsqrt(d),a[0]=b[0]*d,a[1]=b[1]*d,a[2]=b[2]*d):(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 w={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,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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=w.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 d=b[0],c=b[1],e=b[2];b=b[3];var k=d*b-e*c;if(!k)return null;k=1/k;a[0]=b*k;a[1]=-c*k;a[2]=-e*k;a[3]=d*k;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2];b=b[3];c[0]=d*a[0]+e*a[2];c[1]=d*a[1]+e*a[3];c[2]=k*a[0]+b*a[2];c[3]=
k*a[1]+b*a[3];return c},rotate:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2];b=b[3];var n=Math.sin(a);a=Math.cos(a);c[0]=d*a+e*n;c[1]=d*-n+e*a;c[2]=k*a+b*n;c[3]=k*-n+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],e=b[2],k=b[3],n=a[0];a=a[1];c[0]=b[0]*n;c[1]=d*a;c[2]=e*n;c[3]=k*a;return c},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"}};p=p?"":"d";a["glMath"+p]=m;
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 d=new f(2);d[0]=b;d[1]=a;return d},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},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 d=a[0]-b[0];b=a[1]-b[1];return Math.sqrt(d*d+b*b)},dist2:function(b,a){var d=a[0]-b[0];b=a[1]-b[1];return d*d+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 d=b[0]*b[0]+b[1]*b[1];0<d?(d=Math.sqrt(d),a[0]=b[0]/d,a[1]=b[1]/d):a[0]=a[1]=0;return a},cross:function(b,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,e){e||(e=b);e[0]=b[0]+c*(a[0]-b[0]);e[1]=b[1]+c*(a[1]-b[1]);return e},str:function(b){return"["+b[0]+", "+b[1]+"]"}};a["vec3"+p]=e;a["vec4"+p]={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]=0,a[1]=0,a[2]=0,a[3]=0);return a},createFrom:function(b,a,c,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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,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,e,n){n[0]=b;n[1]=a;n[2]=c;n[3]=e;return n},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,e){e||(e=b);e[0]=b[0]+c*(a[0]-b[0]);e[1]=b[1]+c*(a[1]-b[1]);e[2]=
b[2]+c*(a[2]-b[2]);e[3]=b[3]+c*(a[3]-b[3]);return e},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"}};a["mat2"+p]=w;a["mat3"+p]=t;a["mat4"+p]=u;a["quat4"+p]=r});return a})},"esri/geometry/support/jsonUtils":function(){define(["../Point","../Polyline","../Polygon","../Multipoint","../Extent"],function(a,h,p,m,f){function e(e){if(!e)return null;if(e){if(void 0!==e.x&&void 0!==e.y)return a.fromJSON(e);if(void 0!==e.paths)return h.fromJSON(e);if(void 0!==e.rings)return p.fromJSON(e);
if(void 0!==e.points)return m.fromJSON(e);if(void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax)return f.fromJSON(e)}return null}var l={esriGeometryPoint:a,esriGeometryPolyline:h,esriGeometryPolygon:p,esriGeometryEnvelope:f,esriGeometryMultipoint:m};return{fromJSON:e,fromJson:function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(c){console.warn(c.stack)}return e(a)},getJsonType:function(e){return e instanceof a?"esriGeometryPoint":e instanceof h?"esriGeometryPolyline":
e instanceof p?"esriGeometryPolygon":e instanceof f?"esriGeometryEnvelope":e instanceof m?"esriGeometryMultipoint":null},getGeometryType:function(a){return a&&l[a]||null}}})},"esri/geometry/Polyline":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/zmUtils".split(" "),function(a,h,p,m,f,e,l){var g=m.createSubclass({declaredClass:"esri.geometry.Polyline",type:"polyline",getDefaults:function(a){return{paths:[]}},normalizeCtorArgs:function(a,b){var c=
null,e,g,f=null;a&&!Array.isArray(a)?(c=a.paths?a.paths:null,b||(a.spatialReference?b=a.spatialReference:a.paths||(b=a)),e=a.hasZ,g=a.hasM):c=a;c=c||[];b=b||p.WGS84;c.length&&c[0]&&null!=c[0][0]&&"number"==typeof c[0][0]&&(c=[c]);if(f=c[0]&&c[0][0])void 0===e&&void 0===g?(e=2<f.length,g=!1):void 0===e?e=!g&&3<f.length:void 0===g&&(g=!e&&3<f.length);return{paths:c,spatialReference:b,hasZ:e,hasM:g}},_path:0,properties:{cache:{dependsOn:["hasM","hasZ","paths"]},extent:{dependsOn:["cache"],readOnly:!0,
get:function(){function a(b){return function(a,d){return void 0===a?d:void 0===d?a:b(a,d)}}var b=this.paths,g=b.length;if(!g||!b[0].length)return null;var f,l,m,u,r,n,w,d,k,v,h,p,D=n=b[0][0][0],B=w=b[0][0][1],C,F,K=a(Math.min),M=a(Math.max),E=this.spatialReference,V=[],P,I,J,Q,S,ga,L,R,U=this.hasZ,T=this.hasM,N=U?3:2;for(v=0;v<g;v++){f=b[v];P=I=f[0]&&f[0][0];J=Q=f[0]&&f[0][1];p=f.length;L=R=S=ga=void 0;for(h=0;h<p;h++)l=f[h],m=l[0],u=l[1],D=K(D,m),B=K(B,u),n=M(n,m),w=M(w,u),P=K(P,m),J=K(J,u),I=M(I,
m),Q=M(Q,u),U&&2<l.length&&(r=l[2],C=K(C,r),d=M(d,r),S=K(S,r),ga=M(ga,r)),T&&l.length>N&&(l=l[N],F=K(F,r),k=M(k,r),L=K(L,l),R=M(R,l));V.push(new e({xmin:P,ymin:J,zmin:S,mmin:L,xmax:I,ymax:Q,zmax:ga,mmax:R,spatialReference:E?E.clone():null}))}b=new e({xmin:D,ymin:B,xmax:n,ymax:w,spatialReference:E?E.toJSON():null});U&&(b.zmin=C,b.zmax=d);T&&(b.mmin=F,b.mmax=k);b.cache._partwise=1<V.length?V:null;return b}},paths:null},addPath:function(a){this.clearCache();this._path=this.paths.length;this.paths[this._path]=
[];a.forEach(this._addPoint,this);return this},clone:function(){var c=new g;c.spatialReference=this.spatialReference;c.paths=a.clone(this.paths);c.hasZ=this.hasZ;c.hasM=this.hasM;return c},getPoint:function(a,b){if(this._validateInputs(a,b)){a=this.paths[a][b];b=this.hasZ;var c=this.hasM;return b&&c?new f(a[0],a[1],a[2],a[3],this.spatialReference):b?new f(a[0],a[1],a[2],void 0,this.spatialReference):c?new f(a[0],a[1],void 0,a[2],this.spatialReference):new f(a[0],a[1],this.spatialReference)}},insertPoint:function(a,
b,e){if(this._validateInputs(a)&&h.isDefined(b)&&0<=b&&b<=this.paths[a].length)return this.clearCache(),l.updateSupportFromPoint(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[a].splice(b,0,e),this},removePath:function(a){if(this._validateInputs(a,null)){this.clearCache();a=this.paths.splice(a,1)[0];var b,c=a.length,e=this.spatialReference;for(b=0;b<c;b++)a[b]=new f(a[b],e);return a}},removePoint:function(a,b){if(this._validateInputs(a,b))return this.clearCache(),new f(this.paths[a].splice(b,
1)[0],this.spatialReference)},setPoint:function(a,b,e){if(this._validateInputs(a,b))return this.clearCache(),l.updateSupportFromPoint(this,e),Array.isArray(e)||(e=e.toArray()),this.paths[a][b]=e,this},toJSON:function(){var a=this.spatialReference,a={paths:this.paths,spatialReference:a&&a.toJSON()};this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return a},_initPathPointsToArray:function(a){for(var b=0;b<a.paths.length;b++)a.paths[b]=a.paths[b].map(function(b){l.updateSupportFromPoint(a,b,!0);Array.isArray(b)||
(a.spatialReference||(a.spatialReference=b.spatialReference),b=b.toArray());return b});return a},_addPoint:function(a){Array.isArray(a)?this.paths[this._path].push(a):this.paths[this._path].push(a.toArray());l.updateSupportFromPoint(this,a)},_insertPoints:function(a,b){this.clearCache();this._path=b;this.paths[this._path]||(this.paths[this._path]=[]);a.forEach(this._addPoint,this)},_validateInputs:function(a,b){return null!==a&&void 0!==a&&(0>a||a>=this.paths.length)||null!==b&&void 0!==a&&(0>b||
b>=this.paths[a].length)?!1:!0}});return g})},"esri/geometry/support/zmUtils":function(){define([],function(){return{updateSupportFromPoint:function(a,h,p){var m=a.hasZ,f=a.hasM;Array.isArray(h)?4!==h.length||f||m?3===h.length&&p&&!f?(m=!0,f=!1):3===h.length&&f&&m&&(m=f=!1):m=f=!0:(m=!(!m&&h.hasZ&&(!f||h.hasM)),f=!(!f&&h.hasM&&(!m||h.hasZ)));a.hasZ=m;a.hasM=f}}})},"esri/geometry/Polygon":function(){define("dojo/_base/lang ../core/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/coordsUtils ./support/mathUtils ./support/webMercatorUtils".split(" "),
function(a,h,p,m,f,e,l,g,c){var b=function(b){return function(a,c){return null==a?c:null==c?a:b(a,c)}},q=b(Math.min),x=b(Math.max),y=m.createSubclass({declaredClass:"esri.geometry.Polygon",type:"polygon",getDefaults:function(b){return{rings:[]}},normalizeCtorArgs:function(b,a){var c=null,e,g,d=null;b&&!Array.isArray(b)?(c=b.rings?b.rings:null,a||(b.spatialReference?a=b.spatialReference:b.rings||(a=b)),e=b.hasZ,g=b.hasM):c=b;c=c||[];a=a||p.WGS84;c.length&&c[0]&&null!=c[0][0]&&"number"==typeof c[0][0]&&
(c=[c]);if(d=c[0]&&c[0][0])void 0===e&&void 0===g?(e=2<d.length,g=!1):void 0===e?e=!g&&3<d.length:void 0===g&&(g=!e&&3<d.length);return{rings:c,spatialReference:a,hasZ:e,hasM:g}},_ring:0,properties:{cache:{dependsOn:["hasM","hasZ","rings"]},centroid:{readOnly:!0,dependsOn:["cache"],get:function(b){var a=l.centroid([],this.rings,this.hasZ);if(isNaN(a[0])||isNaN(a[1])||this.hasZ&&isNaN(a[2]))return null;b=b||new f;b.x=a[0];b.y=a[1];b.spatialReference=this.spatialReference;this.hasZ&&(b.z=a[2]);return b}},
extent:{dependsOn:["cache"],readOnly:!0,get:function(){var b=this.rings,a=b.length;if(!a||!b[0].length)return null;var c,n,g,d,k,f,l,m,h,p,y,F=k=b[0][0][0],K=f=b[0][0][1],M,E,V=this.spatialReference,P=[],I,J,Q,S,ga,L,R,U,T=this.hasZ,N=this.hasM,Z=T?3:2;for(h=0;h<a;h++){c=b[h];I=J=c[0]&&c[0][0];Q=S=c[0]&&c[0][1];y=c.length;R=U=ga=L=void 0;for(p=0;p<y;p++)n=c[p],g=n[0],d=n[1],F=q(F,g),K=q(K,d),k=x(k,g),f=x(f,d),I=q(I,g),Q=q(Q,d),J=x(J,g),S=x(S,d),T&&2<n.length&&(g=n[2],M=q(M,g),l=x(l,g),ga=q(ga,g),
L=x(L,g)),N&&n.length>Z&&(n=n[Z],E=q(M,n),m=x(l,n),R=q(ga,n),U=x(L,n));P.push(new e({xmin:I,ymin:Q,zmin:ga,mmin:R,xmax:J,ymax:S,zmax:L,mmax:U,spatialReference:V}))}b=new e;b.xmin=F;b.ymin=K;b.xmax=k;b.ymax=f;b.spatialReference=V;T&&(b.zmin=M,b.zmax=l);N&&(b.mmin=E,b.mmax=m);b.cache._partwise=1<P.length?P:null;return b}},isSelfIntersecting:{dependsOn:["cache"],readOnly:!0,get:function(){var b=this.rings,a=b.length,c,e,f,d,k,l,m,q,h;for(d=0;d<a;d++){c=b[d];for(e=0;e<c.length-1;e++)for(l=[[c[e][0],c[e][1]],
[c[e+1][0],c[e+1][1]]],f=d+1;f<a;f++)for(k=0;k<b[f].length-1;k++)if(m=[[b[f][k][0],b[f][k][1]],[b[f][k+1][0],b[f][k+1][1]]],(q=g._getLineIntersection2(l,m))&&!(q[0]===l[0][0]&&q[1]===l[0][1]||q[0]===m[0][0]&&q[1]===m[0][1]||q[0]===l[1][0]&&q[1]===l[1][1]||q[0]===m[1][0]&&q[1]===m[1][1]))return!0;k=c.length;if(!(4>=k))for(e=0;e<k-3;e++)for(h=k-1,0===e&&(h=k-2),l=[[c[e][0],c[e][1]],[c[e+1][0],c[e+1][1]]],f=e+2;f<h;f++)if(m=[[c[f][0],c[f][1]],[c[f+1][0],c[f+1][1]]],(q=g._getLineIntersection2(l,m))&&
!(q[0]===l[0][0]&&q[1]===l[0][1]||q[0]===m[0][0]&&q[1]===m[0][1]||q[0]===l[1][0]&&q[1]===l[1][1]||q[0]===m[1][0]&&q[1]===m[1][1]))return!0}return!1}},rings:null},addRing:function(b){if(b){this.clearCache();var a=this.rings,c=a.length;if(Array.isArray(b[0]))a[c]=b.concat();else{var e=[];a[c]=e;a=0;for(c=b.length;a<c;a++)e[a]=b[a].toArray()}return this}},clone:function(){var b=new y;b.spatialReference=this.spatialReference;b.rings=a.clone(this.rings);b.hasZ=this.hasZ;b.hasM=this.hasM;return b},contains:function(b){if(!b)return!1;
c.canProject(b,this.spatialReference)&&(b=c.project(b,this.spatialReference));return l.contains(this.rings,l.fromGeom(b))},isClockwise:function(b){var a=0,c=0,e=0,g,d=b.length,k,f,l,m=this.hasZ,q=this.hasM;for(g=0;g<d;g++)k=b[g],f=b[(g+1)%d],Array.isArray(k)?(a+=k[0]*f[1]-f[0]*k[1],l=2,2<k.length&&2<f.length&&m&&(c+=k[0]*f[2]-f[0]*k[2],l=3),k.length>l&&f.length>l&&q&&(e+=k[0]*f[l]-f[0]*k[l])):(a+=k.x*f.y-f.x*k.y,k.hasZ&&f.hasZ&&(c+=k.x*f.z-f.x*k.z),k.hasM&&f.hasM&&(e+=k.x*f.m-f.x*k.m));return 0>=
a&&0>=c&&0>=e},getPoint:function(b,a){if(this._validateInputs(b,a)){b=this.rings[b][a];a=this.hasZ;var c=this.hasM;return a&&!c?new f(b[0],b[1],b[2],void 0,this.spatialReference):c&&a?new f(b[0],b[1],void 0,b[2],this.spatialReference):a&&c?new f(b[0],b[1],b[2],b[3],this.spatialReference):new f(b[0],b[1],this.spatialReference)}},insertPoint:function(b,a,c){if(this._validateInputs(b)&&h.isDefined(a)&&0<=a&&a<=this.rings[b].length)return this.clearCache(),this.rings[b].splice(a,0,c),this},removePoint:function(b,
a){if(this._validateInputs(b,a))return this.clearCache(),new f(this.rings[b].splice(a,1)[0],this.spatialReference)},removeRing:function(b){if(this._validateInputs(b,null)){this.clearCache();b=this.rings.splice(b,1)[0];var a,c=b.length,e=this.spatialReference;for(a=0;a<c;a++)b[a]=new f(b[a],e);return b}},setPoint:function(b,a,c){if(this._validateInputs(b,a))return this.clearCache(),Array.isArray(c)||(c=c.toArray()),this.rings[b][a]=c,this},toJSON:function(){var b=this.spatialReference,b={rings:this.rings,
spatialReference:b&&b.toJSON()};this.hasZ&&(b.hasZ=!0);this.hasM&&(b.hasM=!0);return b},_insertPoints:function(b,a){this.clearCache();this._ring=a;this.rings[this._ring]||(this.rings[this._ring]=[]);b.forEach(this._addPoint,this)},_validateInputs:function(b,a){return null!==b&&void 0!==b&&(0>b||b>=this.rings.length)||null!==a&&void 0!==b&&(0>a||a>=this.rings[b].length)?!1:!0}});y.createEllipse=function(b){var a=b.center.x,c=b.center.y,e=b.center.z,g=b.center.m,d=b.longAxis,k=b.shortAxis,f=b.numberOfPoints;
b=b.map;var l,m,q,t=[],h=2*Math.PI/f;for(m=0;m<f;m++)l=Math.cos(m*h),q=Math.sin(m*h),l=b.toMap({x:d*l+a,y:k*q+c}),null==e||l.hasZ||(l.z=e),null==g||l.hasM||(l.m=g),t.push(l);t.push(t[0]);return new y({rings:[t],spatialReference:b.spatialReference})};y.createCircle=function(b){return y.createEllipse({center:b.center,longAxis:b.r,shortAxis:b.r,numberOfPoints:b.numberOfPoints,map:b.map})};y.fromExtent=function(b){var a=b.clone().normalize();b=b.spatialReference;var c=!1,e=!1;a.map(function(b){b.hasZ&&
(c=!0);b.hasM&&(e=!0)});a={rings: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 k=(b.zmax-b.zmin)/2,n=0;n<a.length;n++)a[n].push(k);if(e&&b.hasM)for(b=(b.mmax-b.mmin)/2,n=0;n<a.length;n++)a[n].push(b);return a}),spatialReference:b?b.toJSON():null};c&&(a.hasZ=!0);e&&(a.hasM=!0);return new y(a)};return y})},"esri/geometry/support/coordsUtils":function(){define([],function(){var a=function(a,f,e){var l=e[0];e=e[1];for(var g=
0,c,b,m,h,p=0,t=f.length;p<t;p++)g++,g===t&&(g=0),c=f[p][0],b=f[g][0],m=f[p][1],h=f[g][1],(m<e&&h>=e||h<e&&m>=e)&&c+(e-m)/(h-m)*(b-c)<l&&(a=!a);return a},h=function(a,f,e){for(var l=0,g=0,c=0,b,m,h,p,t,u,r,n,w,d=0,k=0,v=0,A=f.length-1;v<A;v++)b=f[v],m=b[0],h=b[1],p=b[2],t=f[v+1],u=t[0],r=t[1],n=t[2],w=m*r-u*h,d+=w,l+=(m+u)*w,g+=(h+r)*w,e&&2<b.length&&2<t.length&&(w=m*n-u*p,c+=(p+n)*w,k+=w);0<d&&(d*=-1);0<k&&(k*=-1);d?(a[0]=l,a[1]=g,a[2]=.5*d,e?(a[3]=c,a[4]=.5*k):a.length=3):a.length=0;return a},p=
function(a,f){for(var e=0,l=0,g=0,c=0,b=f?[0,0,0]:[0,0],m=f?[0,0,0]:[0,0],h,p,t,u=0,r=a.length;u<r-1;u++)if(h=a[u],p=a[u+1],h&&p){b[0]=h[0];b[0]=h[1];m[0]=p[0];m[0]=p[1];f&&2<h.length&&2<p.length&&(b[2]=h[2],m[2]=p[2]);t=m[0]-b[0];var n=m[1]-b[1],w=0;1<b.length&&1<m.length&&(w=b[2]-m[2]);if(t=Math.sqrt(t*t+n*n+w*w))e+=t,n=h[0]+.5*(p[0]-h[0]),w=h[1]+.5*(p[1]-h[1]),h=2<h.length&&2<p.length?[n,w,h[2]+.5*(p[2]-h[2])]:[n,w],l+=t*h[0],g+=t*h[1],f&&2<h.length&&(c+=t*h[2])}return 0<e?f?[l/e,g/e,c/e]:[l/e,
g/e]:a.length?a[0]:null};return{fromGeom:function(a){if(!a)return null;if(Array.isArray(a))return a;var f=a.hasZ,e=a.hasM;if("point"===a.type)return e&&f?[a.x,a.y,a.z,a.m]:f?[a.x,a.y,a.z]:e?[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.path.slice(0);if("multipoint"===a.type)return a.points.slice(0);if("extent"===a.type){a=a.clone().normalize();if(!a)return null;f=e=!1;a.map(function(a){a.hasZ&&(f=!0);a.hasM&&(e=!0)});return a.map(function(a){var g=
[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(f&&a.hasZ)for(var c=.5*(a.zmax-a.zmin),b=0;b<g.length;b++)g[b].push(c);if(e&&a.hasM)for(a=.5*(a.mmax-a.mmin),b=0;b<g.length;b++)g[b].push(a);return g})}return null},contains:function(m,f){if(!m)return!1;if(!Array.isArray(m[0][0]))return a(!1,m,f);for(var e=!1,l=0,g=m.length;l<g;l++)e=a(e,m[l],f);return e},centroid:function(a,f,e){for(var l=[],g,c=0,b=f.length;c<b;c++)g=h([],f[c],e),g.length&&l.push(g);l.sort(function(b,
a){var c=b[2]-a[2];0===c&&e&&(c=b[4]-a[4]);return c});a.length=e?3:2;if(l.length)f=6*l[0][2],a[0]=l[0][0]/f,a[1]=l[0][1]/f,e&&(a[2]=l[0][3]/(6*l[0][4]));else if(l=f[0]&&f[0].length?p(f[0]):null)a[0]=l[0],a[1]=l[1],e&&2<l.length&&(a[2]=l[2]);return a},isClockwise:function(a){for(var f=0,e=0,l=e+1,g=a.length;e<g;e++,l+=1%g)f+=a[e][0]*a[l][1]-a[l][0]*a[e][1];return 0>=.5*f}}})},"esri/geometry/Multipoint":function(){define("dojo/_base/lang ./SpatialReference ./Geometry ./Point ./Extent ./support/zmUtils".split(" "),
function(a,h,p,m,f,e){var l=p.createSubclass({declaredClass:"esri.geometry.Multipoint",type:"multipoint",getDefaults:function(a){return{points:[]}},normalizeCtorArgs:function(a,c){var b=null,e,g,f=null;a&&!Array.isArray(a)?a.wkid?c=a:(b=a.points||null,c=a.spatialReference||null,e=a.hasZ,g=a.hasM):b=a;b=b||[];c=c||h.WGS84;if(f=b[0])void 0===e&&void 0===g?(e=2<f.length,g=!1):void 0===e?e=3<f.length:void 0===g&&(g=3<f.length);return{points:b,spatialReference:c,hasZ:e,hasM:g}},properties:{cache:{dependsOn:["points",
"hasZ","hasM"]},extent:{dependsOn:["cache"],get:function(a){function c(b){return function(a,d){return null==a?d:null==d?a:b(a,d)}}if(!this.points.length)return null;a=a||new f;var b=this.points,e=this.hasZ,g=this.hasM,l=b[0],m=c(Math.min),h=c(Math.max),r=k=l[0],n=v=l[1],w,d,k,v,p,z,D,B,C,F,K=e?3:2;C=0;for(F=b.length;C<F;C++)l=b[C],D=l[0],B=l[1],r=m(r,D),n=m(n,B),k=h(k,D),v=h(v,B),e&&2<l.length&&(D=l[2],w=m(w,D),p=h(p,D)),g&&l.length>K&&(l=l[K],d=m(d,l),z=h(z,l));a.xmin=r;a.ymin=n;a.xmax=k;a.ymax=
v;a.spatialReference=this.spatialReference;e?(a.zmin=w,a.zmax=p):(a.zmin=null,a.zmax=null);g?(a.mmin=d,a.mmax=z):(a.mmin=null,a.mmax=null);return a}},points:null},addPoint:function(a){this.clearCache();e.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this},clone:function(){var e={points:a.clone(this.points),spatialReference:this.spatialReference};this.hasZ&&(e.hasZ=!0);this.hasM&&(e.hasM=!0);return new l(e)},getPoint:function(a){if(this._validateInputs(a)){a=
this.points[a];var c,b,e=2;this.hasZ&&(c=a[2],e=3);this.hasM&&(b=a[e]);return new m({x:a[0],y:a[1],z:c,m:b,spatialReference:this.spatialReference})}},removePoint:function(a){if(this._validateInputs(a))return this.clearCache(),new m(this.points.splice(a,1)[0],this.spatialReference)},setPoint:function(a,c){if(this._validateInputs(a))return this.clearCache(),e.updateSupportFromPoint(c),this.points[a]=c.toArray(),this},toJSON:function(){var e=this.spatialReference,e={points:a.clone(this.points),spatialReference:e&&
e.toJSON()};this.hasZ&&(e.hasZ=!0);this.hasM&&(e.hasM=!0);return e},_pointsToArrays:function(a){for(var c=0;c<a.points.length;c++){var b=a.points[c];e.updateSupportFromPoint(a,b,!0);Array.isArray(b)||(a.spatialReference||(a.spatialReference=b.spatialReference),a.points[c]=b.toArray())}return a},_validateInputs:function(a){return null!=a&&0<=a&&a<this.points.length}});return l})},"esri/layers/graphics/controllers/AutoController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/requireUtils ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Promise ../../../tasks/QueryTask ../../../tasks/support/StatisticDefinition".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x){var y;(function(b){b[b.Snapshot=0]="Snapshot";b[b.OnDemand=1]="OnDemand"})(y||(y={}));h=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.controllerModulePaths=(c={},c[y.Snapshot]="./SnapshotController",c[y.OnDemand]="./OnDemandController2D",c);a.maxPointCountForAuto=4E3;a.maxRecordCountForAuto=2E3;a.maxVertexCountForAuto=25E4;return a;var c}p(c,b);c.prototype.initialize=function(){var b=this,a=this.layer.then(function(){return b._figureOutMode().then(function(a){return b._createController(a)})}).then(function(a){return b._set("activeController",
a)});this.addResolvingPromise(a)};c.prototype.destroy=function(){this.activeController&&(this.activeController.destroy(),this._set("activeController",null))};Object.defineProperty(c.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(c.prototype,"updating",{get:function(){return!1===this.isFulfilled()||
!0===this.get("activeController.updating")},enumerable:!0,configurable:!0});c.prototype._figureOutMode=function(){return this._isStatisticsSupported()?this._checkByStatistics():this._checkByCount()};c.prototype._isStatisticsSupported=function(){return/(https?:)?\/\/services.*\.arcgis\.com/i.test(this.layer.source.parsedUrl.path)};c.prototype._checkByStatistics=function(){var b=this,a=this.layer,c=a.source.parsedUrl.path,a=a.createQuery();a.outStatistics=[new x({statisticType:"exceedslimit",maxPointCount:this.maxPointCountForAuto,
maxRecordCount:this.maxRecordCountForAuto,maxVertexCount:this.maxVertexCountForAuto,outStatisticFieldName:"exceedslimit"})];return(new q({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 d=a.maxRecordCount;if(a.advancedQueryCapabilities&&a.advancedQueryCapabilities.supportsPagination||d>=b.countThresholdForAuto)return y.Snapshot}return y.OnDemand})};c.prototype._checkByCount=function(){var b=this,a=this.layer;
return(new q({url:a.source.parsedUrl.path+"/query"})).executeForCount(a.createQuery()).then(function(c){return c<=b.countThresholdForAuto&&c<=a.maxRecordCount?y.Snapshot:y.OnDemand})};c.prototype._createController=function(b){var c=this;return e.when(a,this.controllerModulePaths[b]).then(function(b){return new b({layer:c.layer,layerView:c.layerView,graphics:c.graphics})}).otherwise(function(a){throw Error("Module path not found for controller type: "+(b===y.Snapshot?"snapshot":"on demand"));})};return c}(f.declared(g,
b));m([f.property()],h.prototype,"activeController",void 0);m([f.property({dependsOn:["layer.geometryType"]})],h.prototype,"countThresholdForAuto",null);m([f.property()],h.prototype,"controllerModulePaths",void 0);m([f.property({type:c.ofType(l)})],h.prototype,"graphics",void 0);m([f.property()],h.prototype,"layer",void 0);m([f.property()],h.prototype,"layerView",void 0);m([f.property({dependsOn:["activeController.updating"]})],h.prototype,"updating",null);m([f.aliasOf("activeController.update")],
h.prototype,"update",void 0);return h=m([f.subclass("esri.layers.graphics.controllers.AutoController2D")],h)})},"esri/Graphic":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./core/lang ./core/JSONSupport ./PopupTemplate ./geometry/support/jsonUtils ./symbols/support/jsonUtils".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){var x=0;a=y=function(b){function a(a,c,e,d){a=b.call(this,a,c,e,d)||this;
a.layer=null;a.popupTemplate=null;Object.defineProperty(a,"uid",{value:x++});return a}p(a,b);a.prototype.normalizeCtorArgs=function(b,a,c,d){return b&&!b.declaredClass?b:{geometry:b,symbol:a,attributes:c,popupTemplate:d}};Object.defineProperty(a.prototype,"attributes",{set:function(b){var a=this._get("attributes");a!==b&&(this._set("attributes",b),this._notifyLayer("attributes",a,b))},enumerable:!0,configurable:!0});Object.defineProperty(a.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(a.prototype,"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(a.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});a.prototype.getAttribute=function(b){return this.attributes&&
this.attributes[b]};a.prototype.setAttribute=function(b,a){if(this.attributes){var c=this.getAttribute(b);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)};a.prototype.getEffectivePopupTemplate=function(){return this.popupTemplate||this.layer&&this.layer.popupTemplate};a.prototype.toJSON=function(){return{geometry:this.geometry&&this.geometry.toJSON(),symbol:this.symbol&&this.symbol.toJSON(),attributes:e.mixin({},
this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};a.prototype.clone=function(){return new y({attributes:l.clone(this.attributes),geometry:this.geometry&&this.geometry.clone()||null,popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),symbol:this.symbol&&this.symbol.clone()||null,visible:this.visible})};a.prototype._notifyLayer=function(b,a,c,d){this.layer&&(b={graphic:this,property:b,oldValue:a,newValue:c},d&&(b.attributeName=d),this.layer.graphicChanged(b))};
return a}(f.declared(g));m([f.property({value:null})],a.prototype,"attributes",null);m([f.property({value:null,json:{read:b.fromJSON}})],a.prototype,"geometry",null);m([f.property()],a.prototype,"layer",void 0);m([f.property({type:c})],a.prototype,"popupTemplate",void 0);m([f.property({value:null,json:{read:q.read}})],a.prototype,"symbol",null);m([f.property({value:!0,set:function(b){}})],a.prototype,"visible",null);a=y=m([f.subclass("esri.Graphic")],a);var y;return a})},"esri/PopupTemplate":function(){define(["./core/JSONSupport",
"./core/kebabDictionary","./core/Collection","./core/lang","./support/Action"],function(a,h,p,m,f){var e=h({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),l=h({shortDate:"short-date",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",longMonthYear:"long-month-year",shortMonthYear:"short-month-year"}),g=h({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"}),c=a.createSubclass({properties:{actions:{type:p.ofType(f)},content:{value:null,json:{read:{source:["description","popupElements","mediaInfos",
"showAttachments"]}}},fieldInfos:{value:null},overwriteActions:{value:!1},title:{value:""},relatedRecordsInfo:{value:null}},declaredClass:"esri.PopupTemplate",actions:null,content:"",fieldInfos:null,_fieldInfosReader:function(b){return this._readFieldInfos(b)},overwriteActions:!1,title:"",relatedRecordsInfo:null,_relatedRecordsInfoReader:function(b){return b?m.clone(b):b},_dateFormatKebabDict:l,clone:function(){var b=this.actions;b&&(b=m.clone(b.toArray()));return new c({actions:b||[],content:Array.isArray(this.content)?
m.clone(this.content):this.content,fieldInfos:this.fieldInfos?m.clone(this.fieldInfos):null,overwriteActions:this.overwriteActions,relatedRecordsInfo:this.relatedRecordsInfo?m.clone(this.relatedRecordsInfo):null,title:this.title})},toJSON:function(){var b={showAttachments:!1,title:this.title};this.fieldInfos&&(b.fieldInfos=this._writeFieldInfos(m.clone(this.fieldInfos)));this.relatedRecordsInfo&&(b.relatedRecordsInfo=m.clone(this.relatedRecordsInfo));var a=this.content;"string"===typeof a?b.description=
a:Array.isArray(a)&&(b.popupElements=m.clone(a),b.popupElements.forEach(function(a){"attachments"!==a.type||b.showAttachments?"media"!==a.type||b.mediaInfos?"text"!==a.type||b.description?"fields"!==a.type||b.fieldInfos||(a.fieldInfos&&(b.fieldInfos=this._writeFieldInfos(m.clone(a.fieldInfos))),delete a.fieldInfos):(a.text&&(b.description=a.text),delete a.text):(a.mediaInfos&&(b.mediaInfos=m.clone(a.mediaInfos),b.mediaInfos.forEach(function(b){b.type=g.toJSON(b.type)})),delete a.mediaInfos):b.showAttachments=
!0;return a}.bind(this)));return b},_contentReader:function(b,a){b=a.description;var c=[],e=a.popupElements;e&&e.length?c=e.map(function(b){"text"!==b.type||b.text?"media"===b.type&&(b.mediaInfos||a.mediaInfos)&&(b.mediaInfos||(b.mediaInfos=a.mediaInfos),b.mediaInfos=this._readMediaInfos(b.mediaInfos)):b.text=a.description;return b}.bind(this)):(a.description?c.push({type:"text",text:a.description}):c.push({type:"fields"}),a.mediaInfos&&a.mediaInfos.length&&c.push({type:"media",mediaInfos:this._readMediaInfos(a.mediaInfos)}),
a.showAttachments&&c.push({type:"attachments",displayType:"list"}));c.length&&(b=c);return b},_readFieldInfos:function(b){b&&b.forEach(function(b){var a=b.format&&b.format.dateFormat,c=b.stringFieldOption;a&&(b.format.dateFormat=l.fromJSON(a));c&&(b.stringFieldOption=e.fromJSON(c))});return b},_writeFieldInfos:function(b){b.forEach(function(b){var a=b.format&&b.format.dateFormat,c=b.stringFieldOption;a&&(b.format.dateFormat=l.toJSON(a));c&&(b.stringFieldOption=e.toJSON(c));b.format||delete b.format});
return b},_readMediaInfos:function(b){b.forEach(function(b){b.type=g.fromJSON(b.type)});return b}});return c})},"esri/support/Action":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Identifiable ../core/accessorSupport/decorators".split(" "),function(a,h,p,m,f,e,l){a=g=function(a){function b(b){b=a.call(this)||this;b.className="";b.temporary=!1;b.image="";b.id="";b.title="";b.visible=!0;return b}p(b,a);b.prototype.clone=
function(){return new g({className:this.className,image:this.image,id:this.id,title:this.title,visible:this.visible})};return b}(l.declared(f,e));m([l.property()],a.prototype,"className",void 0);m([l.property()],a.prototype,"temporary",void 0);m([l.property()],a.prototype,"image",void 0);m([l.property()],a.prototype,"id",void 0);m([l.property()],a.prototype,"title",void 0);m([l.property()],a.prototype,"visible",void 0);a=g=m([l.subclass("esri.support.Action")],a);var g;return a})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Warning ../Symbol3D ../SimpleLineSymbol ../SimpleMarkerSymbol ../PictureMarkerSymbol ../PictureFillSymbol ../SimpleFillSymbol ../TextSymbol ../PointSymbol3D ../LineSymbol3D ../PolygonSymbol3D ../MeshSymbol3D ../LabelSymbol3D ../WebStyleSymbol ./symbolConversion".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w){var d={esriSMS:l,esriPMS:g,esriTS:q,esriSLS:e,esriSFS:b,esriPFS:c,PointSymbol3D:x,LineSymbol3D:y,PolygonSymbol3D:t,MeshSymbol3D:u,LabelSymbol3D:r,styleSymbolReference:n};h.read=function(b,a,c){if(a=b?d[b.type]||null:null)return a=new a,a.read(b,c),a;c&&c.messages&&b&&c.messages.push(new m("symbol:unsupported","Symbols of type '"+(b.type||"unknown")+"' are not supported",{definition:b,context:c}));return null};h.write=function(b,a,d){if(!b)return null;
if(!d||"web-scene"!==d.origin||b.isInstanceOf(f)||b.isInstanceOf(n))return b.write(a,d);var c=w.to3D(b);if(c.symbol)return c.symbol.write(a,d);d.messages&&d.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:d,error:c.error}));return null};h.fromJSON=function(b,a){var c=b?d[b.type]||null:null;return c?c.fromJSON(b,a):null}})},"esri/symbols/Symbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Logger ../core/collectionUtils ../core/Warning ../core/urlUtils ./Symbol ./Symbol3DLayer ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./LineSymbol3DLayer ./PathSymbol3DLayer ./FillSymbol3DLayer ./ExtrudeSymbol3DLayer ./TextSymbol3DLayer ./support/Thumbnail ./support/StyleOrigin ../portal/Portal ../core/accessorSupport/decorators".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v,A){var z={Icon:x,Object:y,Line:t,Path:u,Fill:r,Extrude:n,Text:w},D=f.ofType(q),B=e.getLogger("esri.symbols.Symbol3D");a=function(b){function a(a){a=b.call(this)||this;a.styleOrigin=null;a.thumbnail=null;a.type=null;a._set("symbolLayers",a._createSymbolLayersCollection());return a}p(a,b);Object.defineProperty(a.prototype,"symbolLayers",{set:function(b){var a=this._get("symbolLayers");a?(a.removeAll(),a.addMany(b)):(a=this._createSymbolLayersCollection(b),
this._set("symbolLayers",a))},enumerable:!0,configurable:!0});a.prototype.readSymbolLayers=function(b,a,d){a=this._createSymbolLayersCollection();for(var c=0;c<b.length;c++){var e=b[c],k=e.type,n=z[k];n?(e=new n,e.read(b[c],d),a.add(e)):(B.warn("Unknown symbol layer type: "+k),d&&d.messages&&d.messages.push(new g("symbol-layer:unsupported","Symbol layers of type '"+(k||"unknown")+"' are not supported",{definition:e,context:d})))}return a};a.prototype.readStyleOrigin=function(b,a,d){if(b.styleUrl&&
b.name)return a=c.read(b.styleUrl,d),new k({styleUrl:a,name:b.name});if(b.styleName&&b.name)return new k({portal:d&&d.portal||v.getDefault(),styleName:b.styleName,name:b.name});d&&d.messages&&d.messages.push(new g("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:d,definition:b}))};a.prototype.writeStyleOrigin=function(b,a,d,e){b.styleUrl&&b.name?(d=c.write(b.styleUrl,e),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 g("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={styleName:b.styleName,name:b.name})};a.prototype.normalizeCtorArgs=function(b){return b instanceof q?{symbolLayers:this._createSymbolLayersCollection([b])}:Array.isArray(b)?{symbolLayers:this._createSymbolLayersCollection(b)}:
b};a.prototype._createSymbolLayersCollection=function(b){var a=this;b=new D(b);b.on("before-add",function(b){return a._onSymbolLayersBeforeAdd(b)});return b};a.prototype._onSymbolLayersBeforeAdd=function(b){0>this._allowedLayerTypes.indexOf(b.item.type)&&(B.error("Symbol layer of type '"+b.item.type+"' is not allowed for symbol of type '"+this.type+"'"),b.preventDefault())};return a}(A.declared(b));m([A.property({json:{write:!1}})],a.prototype,"color",void 0);m([A.property({type:D,json:{write:!0}}),
A.cast(l.castForReferenceSetter)],a.prototype,"symbolLayers",null);m([A.reader("symbolLayers")],a.prototype,"readSymbolLayers",null);m([A.property({type:k})],a.prototype,"styleOrigin",void 0);m([A.reader("styleOrigin")],a.prototype,"readStyleOrigin",null);m([A.writer("styleOrigin")],a.prototype,"writeStyleOrigin",null);m([A.property({type:d.default,json:{read:!1}})],a.prototype,"thumbnail",void 0);m([A.property({type:String,readOnly:!0,json:{read:!1}})],a.prototype,"type",void 0);return a=m([A.subclass("esri.symbols.Symbol3D")],
a)})},"esri/symbols/Symbol":function(){define(["../core/lang","../core/kebabDictionary","../core/JSONSupport","../Color"],function(a,h,p,m){var f=h({esriSMS:"simple-marker-symbol",esriPMS:"picture-marker-symbol",esriSLS:"simple-line-symbol",esriSFS:"simple-fill-symbol",esriPFS:"picture-fill-symbol",esriTS:"text-symbol",esriSHD:"shield-label-symbol",PointSymbol3D:"point-symbol-3d",LineSymbol3D:"line-symbol-3d",PolygonSymbol3D:"polygon-symbol-3d",MeshSymbol3D:"mesh-symbol-3d",LabelSymbol3D:"label-symbol-3d"}),
e=0;return p.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id="sym"+e++},properties:{type:{type:String,value:null,json:{read:f.fromJSON,write:{ignoreOrigin:!0,writer:function(a,e){e.type=f.toJSON(this.type)}}}},color:{type:m,value:new m([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:!0}}}})})},"esri/Color":function(){define(["./core/declare","dojo/colors"],function(a,h){var p=a([h],{declaredClass:"esri.Color",toJSON:function(){return[this.r,
this.g,this.b,1<this.a?this.a:Math.round(255*this.a)]},clone:function(){return new p(this.toRgba())}});p.toJSON=function(a){return a&&[a.r,a.g,a.b,1<a.a?a.a:Math.round(255*a.a)]};p.fromJSON=function(a){return a&&new p([a[0],a[1],a[2],a[3]/255])};p.toUnitRGB=function(a){return[a.r/255,a.g/255,a.b/255]};p.toUnitRGBA=function(a){return[a.r/255,a.g/255,a.b/255,a.a||1]};var m="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(a=0;a<m.length;a++)p[m[a]]=h[m[a]];p.named.rebeccapurple=
[102,51,153];return p})},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(a,h,p,m){var f={};h.setObject("dojo.colors",f);var e=function(a,c,b){0>b&&++b;1<b&&--b;var e=6*b;return 1>e?a+(c-a)*e:1>2*b?c:2>3*b?a+(c-a)*(2/3-b)*6:a};a.colorFromRgb=p.fromRgb=function(a,c){var b=a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(b){a=b[2].split(/\s*,\s*/);var g=a.length,b=b[1];if("rgb"==b&&3==g||"rgba"==b&&4==g)return b=a[0],"%"==b.charAt(b.length-
1)?(b=m.map(a,function(b){return 2.56*parseFloat(b)}),4==g&&(b[3]=a[3]),p.fromArray(b,c)):p.fromArray(a,c);if("hsl"==b&&3==g||"hsla"==b&&4==g){var b=(parseFloat(a[0])%360+360)%360/360,f=parseFloat(a[1])/100,l=parseFloat(a[2])/100,f=.5>=l?l*(f+1):l+f-l*f,l=2*l-f,b=[256*e(l,f,b+1/3),256*e(l,f,b),256*e(l,f,b-1/3),1];4==g&&(b[3]=a[3]);return p.fromArray(b,c)}}return null};var l=function(a,c,b){a=Number(a);return isNaN(a)?b:a<c?c:a>b?b:a};p.prototype.sanitize=function(){this.r=Math.round(l(this.r,0,255));
this.g=Math.round(l(this.g,0,255));this.b=Math.round(l(this.b,0,255));this.a=l(this.a,0,1);return this};f.makeGrey=p.makeGrey=function(a,c){return p.fromArray([a,a,a,c])};h.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,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,
80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,
206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,
240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,
0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,
232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,
250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return p})},"esri/symbols/Symbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/JSONSupport ./support/Symbol3DMaterial ../core/accessorSupport/decorators".split(" "),function(a,h,p,
m,f,e,l,g){a=function(a){function b(b){b=a.call(this)||this;b.enabled=!0;b.material=null;b.type=null;return b}p(b,a);b.prototype.writeEnabled=function(b,a){b||(a.enabled=b)};b.prototype.readElevationInfo=function(b){return f.clone(b)};b.prototype.writeElevationInfo=function(b,a){a.elevationInfo=f.clone(b)};return b}(g.declared(e));m([g.property()],a.prototype,"enabled",void 0);m([g.writer("enabled")],a.prototype,"writeEnabled",null);m([g.property()],a.prototype,"elevationInfo",void 0);m([g.reader("elevationInfo")],
a.prototype,"readElevationInfo",null);m([g.writer("elevationInfo")],a.prototype,"writeElevationInfo",null);m([g.property({type:l.default,json:{write:!0}})],a.prototype,"material",void 0);m([g.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],a.prototype,"type",void 0);return a=m([g.subclass("esri.symbols.Symbol3DLayer")],a)})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/lang ../../core/JSONSupport ../../Color ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(a,h,p,m,f,e,l,g,c){function b(b){return Math.max(0,Math.min(Math.round(b),255))}a=q=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}p(c,a);c.prototype.readColor=function(b,a){a=null!=a.transparency?g.transparencyToOpacity(a.transparency):1;if(b&&f.isDefined(b[0]))return[b[0],b[1],b[2],a]};c.prototype.writeColor=function(a,c){c.color=[b(a.r),b(a.g),b(a.b)];a=g.opacityToTransparency(a.a);0!==a&&(c.transparency=a)};c.prototype.clone=function(){return new q({color:this.color?
this.color.clone():null,colorMixMode:this.colorMixMode})};return c}(c.declared(e));m([c.property({type:l})],a.prototype,"color",void 0);m([c.reader("color",["color","transparency"])],a.prototype,"readColor",null);m([c.writer("color")],a.prototype,"writeColor",null);m([c.property({type:String,json:{read:!1,write:!1}})],a.prototype,"colorMixMode",void 0);a=q=m([c.subclass("esri.symbols.support.Symbol3DMaterial")],a);h.Symbol3DMaterial=a;Object.defineProperty(h,"__esModule",{value:!0});h.default=a;var q})},
"esri/symbols/support/materialUtils":function(){define(["require","exports"],function(a,h){h.opacityToTransparency=function(a){return Math.max(0,Math.min(Math.round(100*(1-a)),100))};h.transparencyToOpacity=function(a){return Math.max(0,Math.min(1-a/100,1))}})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../request ../core/kebabDictionary ../core/promiseUtils ../core/screenUtils ../core/urlUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/Symbol3DOutline ./support/Symbol3DMaterial ./support/Symbol3DResource ../views/3d/layers/graphics/Graphics3DIconSymbolLayer".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u){var r=e({topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right"});a=n=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}p(a,b);a.prototype.readHref=function(b,a,d){return b?c.read(b,d):a.dataURI};a.prototype.writeHref=function(b,a,d,e){b&&(c.isDataProtocol(b)?a.dataURI=b:a.href=c.write(b,e))};a.prototype.clone=function(){return new n({href:this.href,primitive:this.primitive})};return a}(b.declared(t.default));
m([b.property({json:{write:!0,read:{source:["href","dataURI"]}}})],a.prototype,"href",void 0);m([b.reader("href")],a.prototype,"readHref",null);m([b.writer("href")],a.prototype,"writeHref",null);a=n=m([b.subclass("esri.symbols.support.IconSymbol3DLayerResource")],a);q=w=function(b){function a(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type="Icon";a.size=void 0;a.anchor=void 0;a.outline=void 0;return a}p(a,b);a.prototype.readAnchor=function(b){return r.fromJSON(b)};a.prototype.writeAnchor=
function(b,a){a.anchor=r.toJSON(b)};a.prototype.computeResourceSize=function(){if(this.resource.href)return this._fetchImage().then(function(b){return[b.width,b.height]});if(this.resource.primitive)return l.resolve(u.PRIMITIVE_SIZE)};a.prototype.computeSize=function(){var b=this;return this.computeResourceSize().then(function(a){if(null==b.size)return a;a=a[0]/a[1];return 1<a?[b.size,b.size/a]:[b.size*a,b.size]})};a.prototype.clone=function(){return new w({anchor:this.anchor,enabled:this.enabled,
material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),size:this.size})};a.prototype._fetchImage=function(){return f(this.resource.href,{responseType:"image"}).then(function(b){return b.data})};return a}(b.declared(q));m([b.property({type:y.default})],q.prototype,"material",void 0);m([b.property({type:a,json:{write:!0}})],q.prototype,"resource",void 0);m([b.property()],q.prototype,"type",void 0);m([b.property({json:{write:!0}}),
b.cast(g.toPt)],q.prototype,"size",void 0);m([b.property({type:String})],q.prototype,"anchor",void 0);m([b.reader("anchor")],q.prototype,"readAnchor",null);m([b.writer("anchor")],q.prototype,"writeAnchor",null);m([b.property({type:x.default,json:{write:!0}})],q.prototype,"outline",void 0);q=w=m([b.subclass("esri.symbols.IconSymbol3DLayer")],q);var n,w;return q})},"esri/core/screenUtils":function(){define(["require","exports"],function(a,h){function p(a){return 72*a/h.DPI}var m=/^(\d+(\.\d+)?)\s*((px)|(pt))?$/i;
h.DPI=96;h.pt2px=function(a){return a/72*h.DPI};h.px2pt=p;h.toPt=function(a){if("string"===typeof a){if(m.test(a)){a=a.match(m);var e=Number(a[1]);return"px"===(a[3]&&a[3].toLowerCase())?p(e):e}console.warn("screenUtils.toPt: input not recognized!");return null}return a}})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/lang ../../core/JSONSupport ../../Color ../../core/screenUtils ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(a,h,p,m,f,e,l,g,c,b){a=q=function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l([0,0,0,1]);a.size=1;return a}p(a,b);a.prototype.readColor=function(b,a){a=null!=a.transparency?c.transparencyToOpacity(a.transparency):1;if(b&&f.isDefined(b[0]))return[b[0],b[1],b[2],a]};a.prototype.writeColor=function(b,a){a.color=[b.r,b.g,b.b];1!==b.a&&(a.transparency=c.opacityToTransparency(b.a))};a.prototype.clone=function(){return new q({color:f.clone(this.color),size:this.size})};
return a}(b.declared(e));m([b.property({type:l})],a.prototype,"color",void 0);m([b.reader("color",["color","transparency"])],a.prototype,"readColor",null);m([b.writer("color")],a.prototype,"writeColor",null);m([b.property({json:{write:!0}}),b.cast(g.toPt)],a.prototype,"size",void 0);a=q=m([b.subclass("esri.symbols.support.Symbol3DOutline")],a);h.Symbol3DOutline=a;Object.defineProperty(h,"__esModule",{value:!0});h.default=a;var q})},"esri/symbols/support/Symbol3DResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/urlUtils ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),
function(a,h,p,m,f,e,l,g){var c=l({invertedCone:"inverted-cone"});a=b=function(a){function e(){return null!==a&&a.apply(this,arguments)||this}p(e,a);e.prototype.readHref=function(b,a,c){return f.read(b,c)};e.prototype.writeHref=function(b,a,c,e){b&&(a.href=f.write(b,e))};e.prototype.readPrimitive=function(b){return c.fromJSON(b)};e.prototype.writePrimitive=function(b,a){a.primitive=c.toJSON(b)};e.prototype.clone=function(){return new b({href:this.href,primitive:this.primitive})};return e}(g.declared(e));
m([g.property({json:{write:!0}})],a.prototype,"href",void 0);m([g.reader("href")],a.prototype,"readHref",null);m([g.writer("href")],a.prototype,"writeHref",null);m([g.property({json:{write:!0}})],a.prototype,"primitive",void 0);m([g.reader("primitive")],a.prototype,"readPrimitive",null);m([g.writer("primitive")],a.prototype,"writePrimitive",null);a=b=m([g.subclass("esri.symbols.support.Symbol3DResource")],a);h.Symbol3DResource=a;Object.defineProperty(h,"__esModule",{value:!0});h.default=a;var b})},
"esri/views/3d/layers/graphics/Graphics3DIconSymbolLayer":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/_base/lang dojo/when ./Graphics3DSymbolLayer ./Graphics3DGraphicLayer ./Graphics3DDrapedGraphicLayer ./ElevationAligners ./Graphics3DSymbolCommonCode ./SignedDistanceFunctions ./FastSymbolUpdates ../../../../core/urlUtils ../../../../core/screenUtils ../../../../config ../../../../Color ../../../../geometry/Polygon ../../support/projectionUtils ../../lib/glMatrix ../../webgl-engine/Stage ../../webgl-engine/lib/Geometry ../../webgl-engine/lib/GeometryUtil ../../webgl-engine/lib/RenderGeometry ../../webgl-engine/lib/Texture ../../webgl-engine/materials/HUDMaterial".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v,A,z,D,B){function C(b){return"cross"===b||"x"===b}function F(b){var a;"primitive:"===b.substring(0,10)&&(b=b.substring(10));switch(b){case S.PRIM_CIRCLE:a=q.computeSignedDistancefieldCicle(128,64);break;case S.PRIM_SQUARE:a=q.computeSignedDistancefieldSquare(128,64,!1);break;case S.PRIM_KITE:a=q.computeSignedDistancefieldSquare(128,64,!0);break;case S.PRIM_CROSS:a=q.computeSignedDistancefieldCrossAndX(128,64,!1);break;case S.PRIM_X:a=q.computeSignedDistancefieldCrossAndX(128,
64,!0)}return new D(a,"sdf_"+b,{mipmap:!1,wrapClamp:!0,width:128,height:128,components:4})}var K=d.vec3d;a=d.vec4d;var M=d.mat4d.identity(),E=[0,0,1],V=[0,0,0,0],P=[0,0,0],I=[1,1,1],J="center bottom top left right bottom-left bottom-right top-left top-right".split(" "),Q=[.25,.25,.75,.75],S={PRIM_CIRCLE:"circle",PRIM_SQUARE:"square",PRIM_CROSS:"cross",PRIM_X:"x",PRIM_KITE:"kite"};e=function(a){function d(){return null!==a&&a.apply(this,arguments)||this}p(d,a);d.prototype._prepareResources=function(){var b=
this.symbol,a=null!=b.size?t.pt2px(b.size):16;this._size=null;this._symbolTextureRatio=1;this._primitive=null;var d=this._getStageIdHint();this._isPropertyDriven("size")&&64>a&&(a=64);var c=b.resource||{primitive:"circle",href:void 0},e={anchorPos:this._getAnchorPos(b)};if(c.href)e.color=this._getFillColor(b,null),e.outlineColor=this._getOutlineColor(b),e.outlineSize=this._getOutlineSize(b,null),e.textureIsSignedDistanceField=!1,this._prepareImageResources(c.href,a,e,d);else{var c=c.primitive||"circle",
k="primitive:"+c;this._primitive=c;e.color=this._getFillColor(b,c);e.outlineColor=this._getOutlineColor(b);e.outlineSize=this._getOutlineSize(b,c);C(c)&&0===e.outlineSize?this.reject():(this.texture=this._context.sharedResources.textures.acquire(k,F),this._textureURI=k,e.textureIsSignedDistanceField=!0,e.distanceFieldBoundingBox=Q,e.textureId=this.texture.getId(),this._size=[a,a],this._symbolTextureRatio=2,this._createMaterialsAndAddToStage(e,this._context.stage,d),this.resolve())}};d.prototype._getOutlineDefaultSize=
function(b){return C(b)?1.5:0};d.prototype._getOutlineSize=function(b,a){return b.outline?null!=b.outline.size?t.pt2px(b.outline.size):this._getOutlineDefaultSize(a):this._getOutlineDefaultSize(a)};d.prototype._getOutlineColor=function(b){var a=this._getLayerOpacity();if(b.outline&&null!=b.outline.color){var d=r.toUnitRGB(b.outline.color);return[d[0],d[1],d[2],b.outline.color.a*a]}return[0,0,0,a]};d.prototype._getFillColor=function(b,a){return C(a)?V:this._getMaterialOpacityAndColor()};d.prototype._getAnchorPos=
function(b){return-1<J.indexOf(b.anchor)?b.anchor:"center"};d.prototype._prepareImageResources=function(b,a,d,c){var e=this,k=function(b){if(!e.isRejected()){var k=b.params,n=k.width/k.height;e._size=a?1<n?[a,a/n]:[a*n,a]:[k.width,k.height];d.textureId=b.getId();e._createMaterialsAndAddToStage(d,e._context.stage,c);e.resolve()}},n="data:image/svg"===b.substring(0,14),g=".svg"===b.substring(b.length-4,b.length);if(n||g){b=y.normalize(b);var l=new Image,g=!n&&y.hasSameOrigin(b,window.location.href);
n||(g||y.canUseXhr(b)?g||(l.crossOrigin="anonymous"):u.request.proxyUrl&&(b=u.request.proxyUrl+"?"+b));l.src=b;l.onerror=function(){e.reject()};l.onload=function(){if(!e.isRejected()){var b=l.width,d=l.height,c=1;b&&d&&(c=b/d);null!=a&&(1<c?(b=a,d=Math.round(a/c)):(d=a,b=Math.round(a*c)));c=document.createElement("canvas");c.width=b;c.height=d;c.getContext("2d").drawImage(l,0,0,b,d);b=c.toDataURL();f(e._context.sharedResources.textures.acquire(b),k,function(){e.reject()});e._textureURI=b}};l.onerror=
function(){console.warn("Failed to create Icon primitive");e.reject()}}else f(this._context.sharedResources.textures.acquire(b),k,function(){e.reject()}),this._textureURI=b};d.prototype._createMaterialsAndAddToStage=function(b,a,d){this._fastUpdates=x.initFastSymbolUpdatesState(this._context.renderer,this._supportsShaderVisualVariables(),this._fastVisualVariableConvertOptions());this._fastUpdates.enabled&&m.mixin(b,this._fastUpdates.materialParameters);var c=m.clone(b);c.occlusionTest=!1;c.shaderPolygonOffset=
0;this._drapedMaterial=new B(c,d+"_iconDraped");a.add(k.ModelContentType.MATERIAL,this._drapedMaterial);b.occlusionTest=!0;this._material=new B(b,d+"_icon");a.add(k.ModelContentType.MATERIAL,this._material)};d.prototype.destroy=function(){this.isFulfilled()||this.reject();this._material&&(this._context.stage.remove(k.ModelContentType.MATERIAL,this._material.getId()),this._material=null);this._drapedMaterial&&(this._context.stage.remove(k.ModelContentType.MATERIAL,this._drapedMaterial.getId()),this._drapedMaterial=
null);this._textureURI&&(this._context.sharedResources.textures.release(this._textureURI),this._textureURI=null)};d.prototype._getGeometry=function(a){a=a.geometry;if("extent"===a.type)return b.placePointOnPolygon(n.fromExtent(a));if("polyline"===a.type)return b.placePointOnPolyline(a);if("polygon"===a.type)return b.placePointOnPolygon(a);if("point"===a.type)return a;this._logWarning("unsupported geometry type for icon symbol: "+a.type);return null};d.prototype._getScaleFactor=function(b){if(this._isPropertyDriven("size")){if(b.size){for(var a=
0;3>a;a++)b.size[a]&&"symbolValue"!==b.size[0]&&(b.size[a]=t.pt2px(b.size[a]));a=this._size[0]>this._size[1]?this._size[0]:this._size[1];if("symbolValue"===b.size[0])return 1;if(isFinite(b.size[0]))return b.size[0]/a;if(isFinite(b.size[2]))return b.size[2]/a}}else return 1};d.prototype.createGraphics3DGraphic=function(a,d){var c=this._getGeometry(a);if(null===c)return null;var e="graphic"+a.uid,k=this._getVertexOpacityAndColor(d),n=1;this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size||
(n=this._getScaleFactor(d));n*=this._symbolTextureRatio;d=[this._size[0]*n,this._size[1]*n];n=this._getGraphicElevationInfo(a);return n.mode===b.ELEV_MODES.ON_THE_GROUND?this._createAsOverlay(a,c,k,d,n,e,a.uid):this._createAs3DShape(a,c,k,d,n,e,a.uid)};d.prototype.layerPropertyChanged=function(a,d,e){if("opacity"===a)return d=this._getFillColor(this.symbol,this._primitive),this._drapedMaterial.setParameterValues({color:d}),this._material.setParameterValues({color:d}),d=this._getOutlineColor(this.symbol),
this._drapedMaterial.setParameterValues({outlineColor:d}),this._material.setParameterValues({outlineColor:d}),!0;if("elevationInfo"===a){var k=this._elevationInfo.mode;this._updateElevationInfo();a=this._elevationInfo.mode;var n=b.ELEV_MODES;if(k===n.ON_THE_GROUND&&a===n.ON_THE_GROUND)return!0;if(k!==a&&(k===n.ON_THE_GROUND||a===n.ON_THE_GROUND))return!1;var k=this._context.elevationProvider,g=this._context.renderCoordsHelper,f=c.perObjectElevationAligner,v;for(v in d){var m=d[v],r=m._graphics[e];
r&&r instanceof l&&(m=this._getGraphicElevationInfo(m.graphic),r.elevationAligner=a===n.RELATIVE_TO_GROUND?f:null,r.elevationInfo.set(m),f(r,k,g))}return!0}return!1};d.prototype.applyRendererDiff=function(b,a,d,c){for(var e in b.diff)switch(e){case "visualVariables":if(x.updateFastSymbolUpdatesState(this._fastUpdates,a,this._fastVisualVariableConvertOptions()))this._material.setParameterValues(this._fastUpdates.materialParameters),this._drapedMaterial.setParameterValues(this._fastUpdates.materialParameters);
else return!1;break;default:return!1}return!0};d.prototype.setDrawOrder=function(b,a,d){this._drapedMaterial&&(this._drapedMaterial.setRenderPriority(b),d[this._drapedMaterial.getId()]=!0)};d.prototype._defaultElevationInfoNoZ=function(){return ga};d.prototype._getGraphicElevationInfo=function(d){var c=a.prototype._getGraphicElevationInfo.call(this,d);c.mode!==b.ELEV_MODES.RELATIVE_TO_GROUND||0!==c.offset||d.geometry.get("hasZ")||(c.offset=1/this._context.renderCoordsHelper.unitInMeters);return c};
d.prototype._createAs3DShape=function(a,d,e,k,n,g,f){var m=this,r=this._getFastUpdateAttrValues(a),q=r?function(b){return x.evaluateModelTransform(m._fastUpdates.materialParameters,r,b)}:null;a=A.createPointGeometry(E,null,e,k,L,null,r);a=[new v(a,g)];g=b.createStageObjectForPoint.call(this,d,a,[[this._material]],null,null,n,g,this._context.layer.id,f,!0,q);if(null===g)return null;f=null;n.mode===b.ELEV_MODES.RELATIVE_TO_GROUND?f=c.perObjectElevationAligner:n.mode===b.ELEV_MODES.ABSOLUTE_HEIGHT&&
(f=c.perObjectVerticalDistanceToGroundAligner);n=new l(this,g.object,a,null,null,f,n);n.alignedTerrainElevation=g.terrainElevation;if(this._fastUpdates.enabled){var h=k[0]/this._symbolTextureRatio,w=k[1]/this._symbolTextureRatio;n.getScreenSize=function(){var b=q(M);return[b[0]*h,b[5]*w]}}else{var t=k[0]/this._symbolTextureRatio,u=k[1]/this._symbolTextureRatio;n.getScreenSize=function(){return[t,u]}}b.extendPointGraphicElevationInfo(n,d,this._context.elevationProvider);return n};d.prototype._createAsOverlay=
function(a,d,c,e,k,n,f){var l=this;this._drapedMaterial.setRenderPriority(this._symbolLayerOrder);f=K.create();w.pointToVector(d,f,this._context.overlaySR);f[2]=this._getDrapedZ();if((d=this._context.clippingExtent)&&!b.pointInBox2D(f,d))return null;var v=this._getFastUpdateAttrValues(a),m=v?function(b){return x.evaluateModelTransform(l._fastUpdates.materialParameters,v,b)}:null;a=A.createPointGeometry(E,f,c,e,null,null,v);c=new z(a);c.material=this._drapedMaterial;c.center=f;c.bsRadius=0;c.transformation=
M;c.name=n;c.uniqueName=n+"#"+a.id;k=new g(this,[c],null,null,null,k);if(this._fastUpdates.enabled){var r=e[0]/this._symbolTextureRatio,q=e[1]/this._symbolTextureRatio;k.getScreenSize=function(){var b=m(M);return[b[0]*r,b[5]*q]}}else{var h=e[0]/this._symbolTextureRatio,t=e[1]/this._symbolTextureRatio;k.getScreenSize=function(){return[h,t]}}return k};d.prototype._supportsShaderVisualVariables=function(){return!0};d.prototype._fastVisualVariableConvertOptions=function(){var b=this._size[0]>this._size[1]?
this._size[0]:this._size[1],a=[b,b,b],d=t.px2pt(1),b=b*d;return{modelSize:a,symbolSize:[b,b,b],unitInMeters:d,transformation:{anchor:P,scale:I,rotation:0}}};return d}(e);e.PRIMITIVE_SIZE=[64,64];e.VALID_ANCHOR_STRINGS=J;var ga={mode:b.ELEV_MODES.RELATIVE_TO_GROUND,offset:0},L=a.createFrom(0,0,0,1);return e})},"esri/views/3d/layers/graphics/Graphics3DSymbolLayer":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/_base/lang ../../support/PromiseLightweight ../../support/mathUtils ./ElevationInfo ./graphicUtils ../../../../core/Logger ../../../../Color".split(" "),
function(a,h,p,m,f,e,l,g,c,b){function q(b,a){b=null!=b?a.attributes[b]:0;null!=b&&isFinite(b)||(b=0);return b}var x=new l,y=c.getLogger("esri.symbols.Symbol3D");a=function(a){function c(b,d,c){var e=a.call(this)||this;e.symbol=b;e._context=d;e._symbolLayerOrder=d.layerOrder;e._symbolLayerOrderDelta=d.layerOrderDelta;e._elevationInfo=new l;e._material=null;e._updateDrivenProperties(c);e._updateElevationInfo();e._prepareResources();return e}p(c,a);c.prototype._logWarning=function(b){y.warn(b)};c.prototype._prepareResources=
function(b){throw Error("This is an abstract base class");};c.prototype._defaultElevationInfoNoZ=function(){return t};c.prototype._defaultElevationInfoZ=function(){return u};c.prototype._updateElevationInfo=function(){for(var b in this._elevationInfo)this._elevationInfo[b]=void 0;if(b=this._context.layer.elevationInfo)this._elevationInfo=m.mixin(this._elevationInfo,b);this.symbol.elevationInfo&&(this._elevationInfo=m.mixin(this._elevationInfo,this.symbol.elevationInfo))};c.prototype._getGraphicElevationInfo=
function(b){b=b.geometry.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ();x.mode=this._elevationInfo.mode||b.mode;x.offset=null!=this._elevationInfo.offset?this._elevationInfo.offset:b.offset;x.featureExpression=this._elevationInfo.featureExpression;x.offset/=this._context.renderCoordsHelper.unitInMeters;return x};c.prototype._getDrapedZ=function(){return-2};c.prototype._updateDrivenProperties=function(b){var a={color:!1,opacity:!1,size:!1};!b&&(b=this._context.renderer)&&(a.color=
!!b.colorInfo,a.size=!!b.sizeInfo,b.visualVariables&&b.visualVariables.forEach(function(b){switch(b.type){case "color":a.color=!0;if(b.colors)for(var d=0;d<b.colors.length;d++){var c=b.colors[d];c&&(Array.isArray(c)&&3<c.length&&255!==c[3]||void 0!==c.a&&255!==c.a)&&(a.opacity=!0)}if(b.stops)for(d=0;d<b.stops.length;d++)(c=b.stops[d].color)&&(Array.isArray(c)&&3<c.length&&255!==c[3]||void 0!==c.a&&255!==c.a)&&(a.opacity=!0);break;case "opacity":a.opacity=!0;break;case "size":a.size=!0}}));this._drivenProperties=
a};c.prototype._isPropertyDriven=function(b){return this._drivenProperties[b]};c.prototype._getLayerOpacity=function(){if(this._context.layerView&&"fullOpacity"in this._context.layerView)return this._context.layerView.fullOpacity;var b=this._context.layer.opacity;return null==b?1:b};c.prototype._getMaterialOpacity=function(){var b;b=1*this._getLayerOpacity();var a=this.symbol.material;a&&!this._isPropertyDriven("opacity")&&(b*=a.color.a);return b};c.prototype._getMaterialOpacityAndColor=function(){var a=
this.symbol.material,d=this._getMaterialOpacity(),a=this._isPropertyDriven("color")||!a?null:b.toUnitRGB(a.color);return g.mixinColorAndOpacity(a,d)};c.prototype._getVertexOpacityAndColor=function(b,a,c){var d=this._isPropertyDriven("color")?b.color:null;b=this._isPropertyDriven("opacity")?b.opacity:null;d=g.mixinColorAndOpacity(d,b);c&&(d[0]*=c,d[1]*=c,d[2]*=c,d[3]*=c);return a?new a(d):d};c.prototype._getStageIdHint=function(){return this._context.layer.id+"_symbol"};c.prototype.isFastUpdatesEnabled=
function(){return this._fastUpdates&&this._fastUpdates.enabled};c.prototype.setDrawOrder=function(b,a,c){this._material&&(this._material.setRenderPriority(b),c[this._material.getId()]=!0)};c.prototype.createGraphics3DGraphic=function(b,a){for(var d=2;d<arguments.length;d++);throw Error("This is an abstract base class");};c.prototype.destroy=function(){throw Error("This is an abstract base class");};c.prototype.layerPropertyChanged=function(b,a,c){return!1};c.prototype.applyRendererDiff=function(b,
a,c,e){return!1};c.prototype._getFastUpdateAttrValues=function(b){if(!this._fastUpdates.enabled)return null;var a=this._fastUpdates.visualVariables,c=a.size?q(a.size.field,b):0,n=a.color?q(a.color.field,b):0;a.rotation?(a=a.rotation,b=q(a.field,b),b=e.deg2rad("arithmetic"===a.rotationType?90-b:b)):b=0;return[c,n,b,0]};return c}(f.Promise);var t={mode:l.MODES.ON_THE_GROUND,offset:0},u={mode:l.MODES.ABSOLUTE_HEIGHT,offset:0};return a})},"esri/views/3d/support/PromiseLightweight":function(){(function(a){function h(a){this._callbacks=
[];this._errbacks=[];this._cancelCallback=a;this._iserr=this._isdone=this._iscancelled=!1}function p(a,e){var f=new h;0===a.length?f.done.apply(f,e):a[0].apply(null,e).then(function(){a.splice(0,1);p(a,arguments).then(function(){f.done.apply(f,arguments)})});return f}h.prototype.cancel=function(a){this._callbacks=[];this._errbacks=[];this._iscancelled=!0;this._cancelCallback&&this._cancelCallback(a)};h.prototype.then=function(a,e,l){var g;if(!this._iscancelled)return this._isdone?g=a.apply(l,this.result):
this._iserr&&e?g=e.apply(l,this.result):(this._callbacks.push(function(){return a.apply(l,arguments)}),e&&this._errbacks.push(function(){return e.apply(l,arguments)})),g};h.prototype.done=function(){this.result=arguments;this._isdone=!0;for(var a=0;a<this._callbacks.length;a++)this._callbacks[a].apply(null,arguments);this._callbacks=[];this._errbacks=[]};h.prototype.resolve=h.prototype.done;h.prototype.reject=function(){if(!this._iscancelled){this.result=arguments;this._iserr=!0;for(var a=0;a<this._errbacks.length;a++)this._errbacks[a].apply(null,
arguments);this._callbacks=[];this._errbacks=[]}};h.prototype.isRejected=function(){return this._iserr};h.prototype.isFulfilled=function(){return this._isdone||this._iserr};h.prototype.isResolved=function(){return this._isdone};h.prototype.isCancelled=function(){return this._iscancelled};var m={Promise:h,join:function(a){function e(a,e){return function(){e&&(m=!0);c+=1;b[a]=Array.prototype.slice.call(arguments);c===g&&(m?f.reject():f.done(b))}}for(var f=new h,g=a.length,c=0,b=[],m=!1,p=0;p<g;p++)a[p].then(e(p,
!1),e(p,!0));0===a.length&&f.done();return f},chain:p};"function"===typeof define&&define.amd?define(function(){return m}):a.promise=m})(this)},"esri/views/3d/layers/graphics/ElevationInfo":function(){define(["require","exports","../../../../core/lang"],function(a,h,p){a=function(){function a(a){a?this.set(a):(this.mode=null,this.offset=0,this.featureExpression=null)}a.prototype.set=function(a){this.mode=a.mode;this.offset=a.offset;this.featureExpression=a.featureExpression?p.clone(a.featureExpression):
null};return a}();a.MODES={ABSOLUTE_HEIGHT:"absolute-height",RELATIVE_TO_GROUND:"relative-to-ground",ON_THE_GROUND:"on-the-ground"};return a})},"esri/views/3d/layers/graphics/graphicUtils":function(){define("require exports ../../../../geometry/SpatialReference ../../../../geometry/Point ../../../../geometry/support/webMercatorUtils ../../lib/glMatrix".split(" "),function(a,h,p,m,f,e){function l(a,b){var c=a.spatialReference;c.equals(b)||(c.isWebMercator&&b.wkid===p.WGS84.wkid?f.webMercatorToGeographic(a,
!1,a):b.isWebMercator&&c.wkid===p.WGS84.wkid&&f.geographicToWebMercator(a,!1,a))}var g=e.vec4d;h.computeCentroid=function(a,b){if("extent"===a.type)return a.center;for(var c=a["polygon"===a.type?"rings":"paths"],e=0,g=0,f=0,h=a.hasZ,r=0,n=0;n<c.length;n++){for(var w=c[n],d=0;d<w.length;d++)e+=w[d][0],g+=w[d][1],h&&(f+=w[d][2]);r+=w.length}a=new m({x:e/r,y:g/r,z:h?f/r:void 0,spatialReference:a.spatialReference});b&&l(a,b);return a};h.convertToSR=l;h.enlargeExtent=function(a,b,e){if(a){b||(b=g.create());
var c=.5*a.width*(e-1);e=.5*a.height*(e-1);a.width<1E-7*a.height?c+=e/20:a.height<1E-7*a.width&&(e+=c/20);g.set4(a.xmin-c,a.ymin-e,a.xmax+c,a.ymax+e,b);return b}return null};h.updateVertexAttributeAuxpos1w=function(a,b){for(var c=0;c<a.geometries.length;++c){var e=a.geometries[c].data.vertexAttributes.auxpos1;e&&e.data[3]!==b&&(e.data[3]=b,a.geometryVertexAttrsUpdated(c))}};h.mixinColorAndOpacity=function(a,b){var c=[1,1,1,1];null!=a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);null!==b&&void 0!==b?c[3]=b:null!=
a&&3<a.length&&(c[3]=a[3]);return c};h.overrideColor=function(a,b,e,g,f){f=f.slice();for(var c=0;3>c;++c)a&&null!=a[c]?f[c]=a[c]:e&&null!=e[c]&&(f[c]=e[c]);null!=b?f[3]=b:null!=g&&(f[3]=g);return f}})},"esri/views/3d/layers/graphics/Graphics3DGraphicLayer":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../../core/tsSupport/generatorHelper ../../../../core/tsSupport/awaiterHelper ./ElevationInfo ../../webgl-engine/Stage ../../lib/glMatrix ../../support/aaBoundingBox".split(" "),
function(a,h,p,m,f,e,l,g,c){a=g.vec3d;var b=g.mat4d,q=[0,0,0];g=function(){function a(b,c,e,d,k,g,f,l){this._addedToStage=!1;this.alignedTerrainElevation=0;this.graphics3DSymbolLayer=b;this.uniqueMaterials=d;this.uniqueGeometries=e;this.uniqueTextures=k;this.stageObject=c;this.elevationAligner=g;this.elevationInfo=new t(f);this.stageLayer=this.stage=null;this._shown=!1;this._visibilityFlags={};this.visibilityMode=null!=l?l:a.VisibilityModes.HIDE_FACERANGE}a.prototype.initialize=function(b,a){this.stageLayer=
b;this.stage=a;if(this.uniqueMaterials)for(b=0;b<this.uniqueMaterials.length;b++)a.add(l.ModelContentType.MATERIAL,this.uniqueMaterials[b]);if(this.uniqueGeometries)for(b=0;b<this.uniqueGeometries.length;b++)a.add(l.ModelContentType.GEOMETRY,this.uniqueGeometries[b]);if(this.uniqueTextures)for(b=0;b<this.uniqueTextures.length;b++)a.add(l.ModelContentType.TEXTURE,this.uniqueTextures[b]);a.add(l.ModelContentType.OBJECT,this.stageObject)};a.prototype.isDraped=function(){return!1};a.prototype.areVisibilityFlagsSet=
function(b,a){for(var c=!0,d=Object.keys(this._visibilityFlags),e=0;e<d.length;e++){var n=d[e];if(n!==a){if(n===b)return this._visibilityFlags[n];c=c&&this._visibilityFlags[n]}}return c};a.prototype.setVisibilityFlag=function(b,a){this._visibilityFlags[b]=a;return this._calcAndSetVisibility()};a.prototype._calcAndSetVisibility=function(){if(null!=this.stage){var b=this.areVisibilityFlagsSet();return this._shown!==b?((this._shown=b)?this._addedToStage?this.stageObject.unhideAllComponents():(this.stageLayer.addObject(this.stageObject),
this._addedToStage=!0):this.visibilityMode===a.VisibilityModes.HIDE_FACERANGE?this.stageObject.hideAllComponents():(this.stageLayer.removeObject(this.stageObject),this._addedToStage=!1),!0):!1}};a.prototype.destroy=function(){var b=this.stage;if(this.stageLayer){if(this.uniqueMaterials)for(var a=0;a<this.uniqueMaterials.length;a++)b.remove(l.ModelContentType.MATERIAL,this.uniqueMaterials[a].getId());if(this.uniqueGeometries)for(a=0;a<this.uniqueGeometries.length;a++)b.remove(l.ModelContentType.GEOMETRY,
this.uniqueGeometries[a].getId());if(this.uniqueTextures)for(a=0;a<this.uniqueTextures.length;a++)b.remove(l.ModelContentType.TEXTURE,this.uniqueTextures[a].getId())}b.remove(l.ModelContentType.OBJECT,this.stageObject.getId());this._addedToStage&&(this.stageLayer.removeObject(this.stageObject),this._addedToStage=!1);this._shown=!1;this.stage=this.stageLayer=null};a.prototype.mustAlignToTerrain=function(){return null!==this.elevationAligner};a.prototype.alignWithElevation=function(b,a){this.elevationAligner&&
this.elevationAligner(this,b,a)};a.prototype.setDrawOrder=function(b,a,c){};a.prototype.getBSRadius=function(){return this.stageObject.getBSRadius()};a.prototype.getCenterObjectSpace=function(){return this.stageObject.getCenter(!0)};a.prototype.getBoundingBoxObjectSpace=function(b){var a=this.stageObject;b||(b=c.create());c.setMin(b,a.getBBMin(!0));c.setMax(b,a.getBBMax(!0));return b};a.prototype.getProjectedBoundingBox=function(a,n,g){return f(this,void 0,void 0,function(){var d,k,f,l,r,h;return m(this,
function(m){switch(m.label){case 0:d=this.getBoundingBoxObjectSpace(g);k=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];for(f=0;f<k.length;f++)l=k[f],y[0]=d[l[0]],y[1]=d[l[1]],y[2]=d[l[2]],b.multiplyVec3(this.stageObject.objectTransformation,y),x[3*f+0]=y[0],x[3*f+1]=y[1],x[3*f+2]=y[2];if(!a(x,0,8))return[3,6];c.set(d,c.NEGATIVE_INFINITY);for(f=0;f<x.length;f+=3)for(r=0;3>r;r++)d[r]=Math.min(d[r],x[f+r]),d[r+3]=Math.max(d[r+3],x[f+r]);if(!n)return[3,5];c.center(d,q);if(this.elevationInfo.mode===
e.MODES.ABSOLUTE_HEIGHT)return[3,5];h=void 0;m.label=1;case 1:return m.trys.push([1,3,,4]),[4,n.queryElevation(q[0],q[1])];case 2:return h=m.sent(),[3,4];case 3:return m.sent(),h=null,[3,4];case 4:null!=h&&c.offset(d,0,0,-this.alignedTerrainElevation+h),m.label=5;case 5:return[2,d];case 6:return[2,null]}})})};a.prototype.getScreenSize=function(){throw Error("Not implemented for this symbol layer/graphic type");};return a}();g.VisibilityModes={REMOVE_OBJECT:0,HIDE_FACERANGE:1};var x=[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=a.create(),t=function(b){function a(a){a=b.call(this,a)||this;a.centerPointInElevationSR=null;return a}p(a,b);return a}(e);return g})},"esri/core/tsSupport/generatorHelper":function(){define([],function(){return function(a,h){function p(a){return function(b){return m([a,b])}}function m(c){if(e)throw new TypeError("Generator is already executing.");for(;f;)try{if(e=1,l&&(g=l[c[0]&2?"return":c[0]?"throw":"next"])&&!(g=g.call(l,c[1])).done)return g;if(l=0,g)c=[0,
g.value];switch(c[0]){case 0:case 1:g=c;break;case 4:return f.label++,{value:c[1],done:!1};case 5:f.label++;l=c[1];c=[0];continue;case 7:c=f.ops.pop();f.trys.pop();continue;default:if(!(g=f.trys,g=0<g.length&&g[g.length-1])&&(6===c[0]||2===c[0])){f=0;continue}if(3===c[0]&&(!g||c[1]>g[0]&&c[1]<g[3]))f.label=c[1];else if(6===c[0]&&f.label<g[1])f.label=g[1],g=c;else if(g&&f.label<g[2])f.label=g[2],f.ops.push(c);else{g[2]&&f.ops.pop();f.trys.pop();continue}}c=h.call(a,f)}catch(b){c=[6,b],l=0}finally{e=
g=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}var f={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},e,l,g;return{next:p(0),"throw":p(1),"return":p(2)}}})},"esri/core/tsSupport/awaiterHelper":function(){define(["dojo/Deferred","dojo/when"],function(a,h){return function(p,m,f,e){function l(a){try{c(e.next(a))}catch(x){b.reject(x)}}function g(a){try{c(e["throw"](a))}catch(x){b.reject(x)}}function c(a){a.done?h(a.value).then(b.resolve,b.reject):h(a.value).then(l,
g)}var b=new a;c((e=e.apply(p,m||[])).next());return b.promise}})},"esri/views/3d/webgl-engine/Stage":function(){define("require exports ./parts/Model ./parts/View ./lib/Selector ./lib/Camera ./lib/gl-matrix ./lib/Util ./lib/ModelContentType".split(" "),function(a,h,p,m,f,e,l,g,c){a=l.vec2d;h=l.vec2;var b=l.vec3d;l=function(){function a(b,a){this._intersectTolerance=f.DEFAULT_TOLERANCE;this._viewContent=[];this._externalIntersectionHandlers=[];this.onSelectionChange=function(){};this.container=b;
this.model=new p;this.view=new m(b,this,this.model.getDirtySet(),a);this.view.setLights(this.model.getAmbientLight(),this.model.getDirectionalLight())}a.prototype.setNeedsRender=function(){this.view.setNeedsRender()};a.prototype.dispose=function(){this.view.dispose();this.model=this.view=null};a.prototype.setSelectionObject=function(b,a,c){this.model.setSelection(b,c);this.view.setSelectionObject(void 0!==b?b.getId():void 0,c);if(!a)this.onSelectionChange(b,c)};a.prototype.getSelectionObject=function(){return this.model.getSelection()};
a.prototype.frame=function(a,c){void 0===c&&(c=0);var n=Math.max(1E-6,a.getBSRadius());c=Math.max(2,c+2);c*=n;var n=this.getCamera(),d=b.create(n.viewForward);b.scale(d,-(1.5*c/Math.tan(n.fov)));b.set(a.getCenter(),n.center);b.add(n.center,d,n.eye);n=new e(n.eye,n.center,n.up);this.setCamera(n)};a.prototype.beginMod=function(){a.DebugSettings.fineGrainedContentValidation&&this.model.validateContent()};a.prototype.endMod=function(b){void 0===b&&(b=!1);a.DebugSettings.fineGrainedContentValidation&&
!b&&this.model.validateContent()};a.prototype.add=function(b,a){this.model.add(b,a);"function"===typeof a.addParentStage&&a.addParentStage(this)};a.prototype.remove=function(b,a){b=this.model.remove(b,a);"function"===typeof b.removeParentStage&&b.removeParentStage(this);return b};a.prototype.notifyDirty=function(b,a,c,d){this.model.notifyDirty(b,a,c,d)};a.prototype.processDirty=function(){var b=this.model.getDirtySet(),c=b.getDirtyMaterials();if(b.hasDirtyGeometryRecords()||c){a.DebugSettings.endFrameContentValidation&&
this.model.validateContent();a.DebugSettings.logDirtySet&&console.log("Dirty set: "+this.model.getDirtySet().formatDebugInfo(!1));var e=b.getAddRemoveUpdateListFilteredByLayers(this._viewContent,!0);(0<e[0].length+e[1].length+e[2].length||c)&&this.view.modify(e[0],e[1],e[2],c);a.DebugSettings.logDirtySet&&(console.log("RGs add: "+e[0].map(function(b){return b.uniqueName})),console.log("RGs remove: "+e[1].map(function(b){return b.uniqueName})));b.getAddRemoveUpdateList(!0);b.clearDirtyMaterials();
this.view.setNeedsRender()}};a.prototype.processDirtyLayer=function(b){var a=this.model.getDirtySet(),c=a.getDirtyMaterials();b=a.getAddRemoveUpdateListFilteredByLayers([b],!0);(0<b[0].length+b[1].length+b[2].length||c)&&this.view.modify(b[0],b[1],b[2],c);a.clearDirtyMaterials()};a.prototype.get=function(b,a){return this.model.get(b,a)};a.prototype.getAll=function(b){return this.model.getAll(b)};a.prototype.addTextureListener=function(b){this.view.addTextureListener(b)};a.prototype.removeTextureListener=
function(b){this.view.removeTextureListener(b)};a.prototype.getContainer=function(){return this.container};a.prototype.getCamera=function(){return this.view.getCamera()};a.prototype.setCamera=function(b){this.view.setCamera(b)};a.prototype.getViewParams=function(b){return this.view.getViewParams(b)};a.prototype.setViewParams=function(b){this.view.setViewParams(b)};a.prototype.getLayers=function(){return this.model.getAll(c.LAYER)};a.prototype.getAmbientLight=function(){return this.model.getAmbientLight()};
a.prototype.getDirectionalLight=function(){return this.model.getDirectionalLight()};a.prototype.setAmbientLight=function(b){this.model.setAmbientLight(b);this.view.setLights(this.model.getAmbientLight(),this.model.getDirectionalLight())};a.prototype.setDirectionalLight=function(b){this.model.setDirectionalLight(b);this.view.setLights(this.model.getAmbientLight(),this.model.getDirectionalLight())};a.prototype.getCanvas=function(){return this.view.getCanvas()};a.prototype.setRenderParams=function(b){this.view.setRenderParams(b)};
a.prototype.getRenderParams=function(){return this.view.getRenderParams()};a.prototype.has=function(b){return this.view.has(b)};a.prototype.getViewContent=function(){return this._viewContent.slice(0)};a.prototype.setViewContent=function(b){var a=g.array2object(this._viewContent),c=g.array2object(b),d=g.subtractObjects(c,a),a=g.subtractObjects(a,c);this.processDirty();c=this.model.getDirtySet();d=c.getResidentRenderGeometriesFilteredByLayers(g.object2array(d));a=c.getResidentRenderGeometriesFilteredByLayers(g.object2array(a));
this.view.modify(d,a,[]);this._viewContent=b.slice(0)};a.prototype.addToViewContent=function(b){for(var a=[],c=0;c<b.length;c++)-1===this._viewContent.indexOf(b[c])&&a.push(b[c]);0<b.length&&(this.processDirty(),b=this.model.getDirtySet().getResidentRenderGeometriesFilteredByLayers(a),this.view.modify(b,[],[]),this._viewContent.push.apply(this._viewContent,a))};a.prototype.removeFromViewContent=function(b){this.processDirty();for(var a=this.model.getDirtySet(),c=this._viewContent,d=[],e=0;e<b.length;e++){var g=
c.indexOf(b[e]);-1<g&&(c[g]=c[c.length-1],c.pop(),d.push(b[e]))}b=a.getResidentRenderGeometriesFilteredByLayers(d);this.view.modify([],b,[])};a.prototype.getViewFrustumObjects=function(){return this.view.getFrustumObjects()};a.prototype.getLocalOrigin=function(b,a,c){return this.model.getOrigin(b,a,c)};a.prototype.getFrameTask=function(){return this.view.getFrameTask()};a.prototype.requestScreenCapture=function(b,a){this.view.requestScreenCapture(b,a)};a.prototype.getAllTexturesLoaded=function(){return this.view.getAllTexturesLoaded()};
a.prototype.getTextureLoaded=function(b){return this.view.getTextureLoaded(b)};a.prototype.addExternalRenderer=function(b,a){"function"===typeof a.intersect&&this._externalIntersectionHandlers.push(a);return this.view.addExternalRenderer(b,a)};a.prototype.removeExternalRenderer=function(b){var a=this._externalIntersectionHandlers.indexOf(b);-1<a&&this._externalIntersectionHandlers.splice(a,1);return this.view.removeExternalRenderer(b)};a.prototype.getContentDebugStrings=function(b){return this.model.formatDebugInfo(b)};
a.prototype.getRenderStats=function(){return this.view.getCombinedStats()};a.prototype.getRenderStatString=function(b){var a=this.getRenderStats(),c="";if(b){var c=c+"\x3ctable\x3e",d;for(d in a)c+="\x3ctr\x3e\x3ctd\x3e"+d+'\x3c/td\x3e\x3ctd style\x3d"text-align: right"\x3e'+Math.round(a[d])+"\x3c/td\x3e\x3c/tr\x3e";c+="\x3c/table\x3e"}else for(d in a)c+=d+": "+a[d]+"\n";return c};a.prototype.pick=function(a,c,e,d){var k=b.create(),n=b.create();this.view.getPickRay(a,k,n);return this.pickRay(k,n,
a,a,c,e,d)};a.prototype.pickRayWithBeginPoint=function(b,a,c,d,e){this.view.pickRayWithBeginPoint(b,a,c,d,e)};a.prototype.pickRay=function(a,c,e,d,k,g,l){d=this.view.getCamera();e||(e=q,d.projectPoint(c,e));var n;if(k){n=Array(k.length);for(var m=0;m<n.length;m++)n[m]=this.model.get(p.ContentType.LAYER,k[m])}else{n=[];k=this.getViewContent();for(var v=this.model.getAll(p.ContentType.LAYER),m=0;m<k.length;m++){var r=v[k[m]];r&&"VISIBLE"===r.getState()&&n.push(r)}}l?l.init(n,a,c,e,d,this._intersectTolerance,
g):l=new f(n,a,c,e,d,this._intersectTolerance,g);for(m=0;m<this._externalIntersectionHandlers.length;m++)this._externalIntersectionHandlers[m].intersect(l,a,c,e);if(l.getHudResults().length){m=l.getHudResults();m.sort(function(b,a){return a.dist-b.dist});c=m[m.length-1];e=x;d.projectPoint(c.center,e);e[0]=Math.round(e[0]);e[1]=Math.round(e[1]);k=y;this.view.getPickRay(e,a,k);v=b.dist(c.center,a)/b.dist(a,k)*.99;t.init(n,a,k,e,d,this._intersectTolerance,g);for(m=0;m<this._externalIntersectionHandlers.length;m++)this._externalIntersectionHandlers[m].intersect(t,
a,k,e);if(null==t.getMinResult().dist||v<=t.getMinResult().dist)l.getMinResult().set(c.target,c.name,c.dist,c.normal,c.priority),l.getMinResult().setIntersector("stage")}return l};a.prototype.getIntersectTolerance=function(){return this._intersectTolerance};a.prototype.setIntersectTolerance=function(b){void 0===b&&(b=1E-5);this._intersectTolerance=b};a.prototype.getTextureGraphicsRenderer=function(){return this.view.getTextureGraphicsRenderer()};return a}();l.DebugSettings={fineGrainedContentValidation:!1,
endFrameContentValidation:!1,logDirtySet:!1};l.ModelContentType=c;var q=a.create(),x=h.create(),y=b.create(),t=new f;t.enableHUDSelection=!1;return l})},"esri/views/3d/webgl-engine/parts/Model":function(){define("require exports dojo/string ../lib/lights ../lib/ModelContentType ../lib/ModelDirtySet ../lib/RenderGeometry ../lib/Util ../lib/gl-matrix".split(" "),function(a,h,p,m,f,e,l,g,c){var b=g.assert,q=g.verify,x=c.vec3d,y=c.mat4d,t=g.logWithBase;a=function(){function a(){this.dirtySet=new e(this);
this.ambientLight=new m.AmbientLight([1,1,1],.3);this.directionalLight=new m.DirectionalLight([1,1,1],.7,x.normalize([1,1,1]));this._uniqueIdx=0;this._id2origin={};this.content={};for(var b in f)this.content[f[b]]={}}a.prototype.getAll=function(a){a=this.content[a];b(void 0!==a);return a};a.prototype.get=function(b,a){return this.getAll(b)[a]};a.prototype.add=function(a,c){var e=this.content[a];b(void 0!==e);var d=c.getId();b(null==e[d],"Model/Stage already contains object to be added");e[d]=c;a===
f.LAYER&&this.notifyDirty(a,c,"layerAdded")};a.prototype.remove=function(a,c){var e=this.content[a];b(void 0!==e);var d=e[c];b(void 0!==d,"Model/Stage doesn't contain object to be removed");delete e[c];a===f.TEXTURE&&d.unload();a===f.LAYER&&this.notifyDirty(a,d,"layerRemoved");return d};a.prototype.getDirtySet=function(){return this.dirtySet};a.prototype.notifyDirty=function(b,a,c,d){this.dirtySet.handleUpdate(a,c,d)};a.prototype.getAmbientLight=function(){return this.ambientLight};a.prototype.setAmbientLight=
function(b){this.ambientLight.set(b)};a.prototype.getDirectionalLight=function(){return this.directionalLight};a.prototype.setDirectionalLight=function(b){this.directionalLight.set(b)};a.prototype.getSelection=function(){return this.selection};a.prototype.setSelection=function(b,a){this.selection=b;this.selectionFaceRange=a};a.prototype.getSelectionFaceRange=function(){return this.selectionFaceRange};a.prototype.getOrigin=function(b,a,c){void 0===c&&(c=10);var d=0;a=a*c/1E4;1<a&&(d=Math.ceil(t(a,
2)));a=1E4*Math.pow(2,d);c=Math.round(b[0]/a);var e=Math.round(b[1]/a);b=Math.round(b[2]/a);var d=d+"_"+c+"_"+e+"_"+b,g=this._id2origin[d];null==g&&(g={vec3:x.createFrom(c*a,e*a,b*a),id:d},this._id2origin[d]=g);return g};a.prototype.getGeometryRenderGeometries=function(b,a,c){var d=b.getId(),e=a.geometry,g=e.getData(),f=!!e.singleUse,n=a.materials,m=a.instanceParameters,q=b.getCombinedStaticTransformation(a),h=y.maxScale(q),r=a.origin,e=e.getBoundingInfo(0);a=a.getId()+"#0";var t=this._uniqueIdx++;
b=new l(g,e,n[0],q,h,b.getCastShadow(),f,d,a,t);b.origin=r||this.getOrigin(b.center,b.bsRadius);b.instanceParameters=m;c.push(b)};a.prototype.updateRenderGeometryTransformation=function(b,a,c){b.getCombinedStaticTransformation(a,c.transformation);c.updateTransformation(c.transformation)};a.prototype.formatDebugInfo=function(b){var a=[];if(b){a[0]="\x3ctable\x3e";for(var c in f)b=f[c],a[0]+="\x3ctr\x3e\x3ctd\x3e"+b+'\x3c/td\x3e\x3ctd style\x3d"text-align: right"\x3e'+Object.keys(this.getAll(b)).length+
"\x3c/td\x3e\x3c/tr\x3e";a[0]+="\x3c/table\x3e";a[1]=this.dirtySet.formatDebugInfo(!0)}else{a[0]="";for(c in f)b=f[c],a[0]+=p.pad(String(Object.keys(this.getAll(b)).length),6," ")+" "+b+", ";a[1]=this.dirtySet.formatDebugInfo(!1)}return a};a.prototype.validateContent=function(){var b=this.getAll(f.OBJECT),a;for(a in b)this.validateObject(b[a]);var b=this.getAll(f.LAYER),c;for(c in b)this.validateLayer(b[c]);c=this.getAll(f.MATERIAL);for(var d in c)this.validateMaterial(c[d])};a.prototype.validateObject=
function(a){a=a.geometryRecords;for(var c=0;c<a.length;++c){var e=a[c];b(null!=this.get(f.GEOMETRY,e.geometry.id));var d=e.geometry.numGroups;b(d<=e.materials.length,"object materials do not match geometry groups");q(d===e.materials.length,"object materials do not match geometry groups");for(var k=0;k<d;++k)b(null!=this.get(f.MATERIAL,e.materials[k].getId()))}};a.prototype.validateLayer=function(a){a=a.getObjects();for(var c=0;c<a.length;++c){var e=this.get(f.OBJECT,a[c].getId());b(null!=e)}};a.prototype.validateMaterial=
function(a){a=a.getAllTextureIds();for(var c=0;c<a.length;++c){var e=this.get(f.TEXTURE,a[c]);b(null!=e)}};return a}();a.ContentType=f;return a})},"esri/views/3d/webgl-engine/lib/lights":function(){define(["require","exports"],function(a,h){a=function(){function a(a,f){this.color=a;this.intensity=f}a.prototype.set=function(a){void 0!==a.color&&(this.color=a.color);void 0!==a.intensity&&(this.intensity=a.intensity)};return a}();h.AmbientLight=a;a=function(){function a(a,f,e){this.color=a;this.intensity=
f;this.direction=e}a.prototype.set=function(a){void 0!==a.color&&(this.color=a.color);void 0!==a.intensity&&(this.intensity=a.intensity);void 0!==a.direction&&(this.direction=a.direction)};return a}();h.DirectionalLight=a})},"esri/views/3d/webgl-engine/lib/ModelContentType":function(){define(["require","exports"],function(a,h){a=function(){return function(){}}();a.LAYER="layers";a.OBJECT="objects";a.GEOMETRY="geometries";a.MATERIAL="materials";a.TEXTURE="textures";return a})},"esri/views/3d/webgl-engine/lib/ModelDirtySet":function(){define(["require",
"exports","./ModelContentType","./ModelDirtyTypesTs","./Util"],function(a,h,p,m,f){var e=f.objectEmpty,l=f.assert;return function(){function a(a){this._residentGeomRecords={};this._dirtyGeomRecords={};this._dirtyMaterials={};this._model=a}Object.defineProperty(a.prototype,"residentLayerCount",{get:function(){return Object.keys(this._residentGeomRecords).length},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"residentObjectCount",{get:function(){var a=0,b;for(b in this._residentGeomRecords)a+=
Object.keys(this._residentGeomRecords[b]).length;return a},enumerable:!0,configurable:!0});a.prototype._getResidentGeometryRecords=function(){return this._residentGeomRecords};a.prototype._getDirtyGeometryRecords=function(){return this._dirtyGeomRecords};a.prototype.getDirtyMaterials=function(){return e(this._dirtyMaterials)?null:this._dirtyMaterials};a.prototype.clearDirtyMaterials=function(){this._dirtyMaterials={}};a.prototype.hasDirtyGeometryRecords=function(){for(var a in this._dirtyGeomRecords)for(var b in this._dirtyGeomRecords[a]){var f=
this._dirtyGeomRecords[a][b];if(f&&!e(f))return!0}return!1};a.prototype.handleUpdate=function(a,b,e){l(this[b],"ModelDirtySet doesn't know how to process "+b);return this[b](a,e)};a.prototype.getAddRemoveUpdateList=function(a){return this.getAddRemoveUpdateListFilteredByLayers(Object.keys(this._dirtyGeomRecords),a)};a.prototype.getAddRemoveUpdateListFilteredByLayers=function(a,b){for(var c=[],f=[],g=[],m=0;m<a.length;m++){var h=a[m];if(h in this._dirtyGeomRecords){for(var r in this._dirtyGeomRecords[h]){var n=
this._dirtyGeomRecords[h][r];if(n){var w=this._createObjectRecordObjIfNonexistent(this._residentGeomRecords,h,r),d;for(d in n){var k=n[d],v=k[0],A=k[1],k=k[2],z=A&2&&k&1;if(A&4||z){var D=w[d];D?f.push.apply(f,D[1]):4===A&&l(!1,"ModelDirtySet.getAddRemoveListFilteredByLayers: invalid remove");b&&D&&delete w[d]}if(A&1||z){var D=[v,[]],B=this._model.get(p.OBJECT,r);this._model.getGeometryRenderGeometries(B,v,D[1]);c.push.apply(c,D[1]);b&&(w[d]=D)}if(A&2&&!z)if(D=w[d],B=this._model.get(p.OBJECT,r),D){A=
D[1];z=A.length;if(k&16)for(D=0;D<z;D++){var C=A[D];this._model.updateRenderGeometryTransformation(B,v,C)}for(D=0;D<z;D++)C=A[D],g.push({renderGeometry:C,updateType:k})}else l(!1,"ModelDirtySet.getAddRemoveListFilteredByLayers: invalid update")}e(w)&&delete this._residentGeomRecords[h][r]}}e(this._residentGeomRecords[h])&&delete this._residentGeomRecords[h]}b&&delete this._dirtyGeomRecords[h]}return[c,f,g]};a.prototype.getResidentRenderGeometries=function(){return this.getResidentRenderGeometriesFilteredByLayers(Object.keys(this._residentGeomRecords))};
a.prototype.getResidentRenderGeometriesFilteredByLayers=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];if(e in this._residentGeomRecords)for(var f in this._residentGeomRecords[e]){var g=this._residentGeomRecords[e][f];if(g)for(var l in g)b.push.apply(b,g[l][1])}}return b};a.prototype.componentVisibilityChanged=function(a,b,e){if(null!=b)this._componentVisibilityChanged(a,b,e);else{b=0;for(var c=a.getGeometryRecords();b<c.length;b++)this._componentVisibilityChanged(a,c[b],e)}};a.prototype.vertexAttrsUpdated=
function(a,b,e){this._updateOrCreateDirtyRecord(a,b,e,2,0,0,2,5,4)};a.prototype.colorAttrsUpdated=function(a,b,e){this._updateOrCreateDirtyRecord(a,b,e,2,0,0,2,5,8)};a.prototype.matChanged=function(a){this._dirtyMaterials[a.getId()]=!0};a.prototype.layerAdded=function(a){for(var b=a.getObjects(),c=0;c<b.length;c++)this.layObjectAdded(a,b[c])};a.prototype.layerRemoved=function(a){for(var b=a.getObjects(),c=0;c<b.length;c++)this.layObjectRemoved(a,b[c])};a.prototype.layObjectAdded=function(a,b){a=a.getId();
for(var c=b.getGeometryRecords(),e=0;e<c.length;e++)this.objGeometryAdded(b,c[e],a)};a.prototype.layObjectRemoved=function(a,b){a=a.getId();for(var c=b.getGeometryRecords(),e=0;e<c.length;e++)this.objGeometryRemoved(b,c[e],a)};a.prototype.layObjectReplaced=function(a,b){this.layObjectRemoved(a,b[0]);this.layObjectAdded(a,b[1])};a.prototype.objDirty=function(a,b){b=b||this._getParentLayerId(a);var c=a.getId(),c=this._createObjectRecordObjIfNonexistent(this._residentGeomRecords,b,c),e;for(e in c)this._updateOrCreateDirtyRecord(a,
c[e][0],b,2,0,2,0,5,1)};a.prototype.objTransformation=function(a,b){b=b||this._getParentLayerId(a);var c=a.getId(),c=this._createObjectRecordObjIfNonexistent(this._residentGeomRecords,b,c),e;for(e in c)this._updateOrCreateDirtyRecord(a,c[e][0],b,2,0,0,2,5,16)};a.prototype.objGeometryAdded=function(a,b,e){this._updateOrCreateDirtyRecord(a,b,e,1,4,0,0,0)};a.prototype.objGeometryRemoved=function(a,b,e){this._updateOrCreateDirtyRecord(a,b,e,4,1,2,0,0)};a.prototype.objGeometryReplaced=function(a,b){this.objGeometryRemoved(a,
b[0]);this.objGeometryAdded(a,b[1])};a.prototype.objGeometryTransformation=function(a,b){this.objGeometryReplaced(a,b)};a.prototype._componentVisibilityChanged=function(a,b,e){this._updateOrCreateDirtyRecord(a,b,e,2,0,0,2,5,2)};a.prototype._updateOrCreateDirtyRecord=function(a,b,e,f,g,m,h,r,n){e=e||this._getParentLayerId(a);var c=a.getId();a=b.getId();e=this._createObjectRecordObjIfNonexistent(this._dirtyGeomRecords,e,c);(c=e[a])?(b=c[1],b&g?delete e[a]:b&m?(c[1]=f,c[2]=n):b&h?c[2]|=n:b&r||l(!1,"ModelDirtySet.objGeometryAdded: inconsistent state")):
e[a]=[b,f,n]};a.prototype._createObjectRecordObjIfNonexistent=function(a,b,e){a[b]||(a[b]={});a[b][e]||(a[b][e]={});return a[b][e]};a.prototype._getParentLayerId=function(a){return a.parentLayer.id};a.prototype.formatDebugInfo=function(a){var b=["ADD","UPD",void 0,"REM"];if(a)return"";a="";for(var c in this._dirtyGeomRecords)for(var e in this._dirtyGeomRecords[c]){var f=this._dirtyGeomRecords[c][e];if(f){0<a.length&&(a+="\n");a+=c+"."+e;var g=[],l;for(l in f){var m=f[l][1];g[m]||(g[m]=[]);g[m].push(f[l][0].geometry.id)}for(f=
0;f<g.length;f++)if(g[f])for(a+=" "+b[f-1]+": ",m=0;m<g[f].length;m++)a+=g[f][m]+", "}}return a};return a}()})},"esri/views/3d/webgl-engine/lib/ModelDirtyTypesTs":function(){define(["require","exports"],function(a,h){})},"esri/views/3d/webgl-engine/lib/Util":function(){define(["./gl-matrix","../../../../core/now"],function(a,h){function p(b){this.message=b}var m=a.vec2d,f=a.vec3d,e=a.vec4d,l=a.mat4d,g=l.create(),c=[e.createFrom(-1,-1,-1,1),e.createFrom(1,-1,-1,1),e.createFrom(1,1,-1,1),e.createFrom(-1,
1,-1,1),e.createFrom(-1,-1,1,1),e.createFrom(1,-1,1,1),e.createFrom(1,1,1,1),e.createFrom(-1,1,1,1)],b=e.create(),q=Array(8);for(a=0;8>a;++a)q[a]=f.create();var x=f.create(),y=f.create(),t=f.create(),u=f.create(),r=f.create(),n=f.create(),w=f.create(),d=f.create(),k=f.create(),v=f.create(),A=f.create(),z=f.create(),D=f.create(),B=f.create();p.prototype.toString=function(){return"AssertException: "+this.message};var C={EARTH_RADIUS:6378137,METER2FEET:3.28084,ECCENTRICITY_SQUARED:.0066943799901414,
AssertException:p,VertexAttrConstants:{POSITION:"position",NORMAL:"normal",UV0:"uv0",AUXPOS1:"auxpos1",AUXPOS2:"auxpos2",COLOR:"color",SIZE:"size",REGION:"region"},assert:function(b,a){if(!b)throw b=Error("dummy"),b.stack&&console.log(b.stack),new p(a);},verify:function(b,a){b||(console.log("Verify failed: "+a),console.log(Error("dummy").stack))},createQuadVertexUvBuffer:function(b){b=b||Float32Array;b=new b(20);b[0]=-1;b[1]=-1;b[2]=0;b[3]=0;b[4]=0;b[5]=1;b[6]=-1;b[7]=0;b[8]=1;b[9]=0;b[10]=-1;b[11]=
1;b[12]=0;b[13]=0;b[14]=1;b[15]=1;b[16]=1;b[17]=0;b[18]=1;b[19]=1;return b},isPowerOfTwo:function(b){return 0===(b&b-1)},lerp:function(b,a,d){return b+(a-b)*d},clamp:function(b,a,d){return b<a?a:b>d?d:b},fallbackIfUndefined:function(b,a){return void 0===b?a:b},hex2rgb:function(b){b=Math.floor(b);return[(b>>16&255)/255,(b>>8&255)/255,(b&255)/255]},rgb2hex:function(b){var a=C.clamp(Math.round(255*b[0]),0,255),d=C.clamp(Math.round(255*b[1]),0,255);b=C.clamp(Math.round(255*b[2]),0,255);return"0x"+((a<<
16)+(d<<8)+b).toString(16)},dec2hex:function(b){b=b.toString(16);return"00000000".substr(0,8-b.length)+b},deg2rad:function(b){return b/180*Math.PI},rad2deg:function(b){return 180*b/Math.PI},azimuthElevationAngle2Direction:function(b,a){b=1.5*Math.PI-b;a=.5*Math.PI-a;return[Math.cos(b)*Math.sin(a),Math.cos(a),Math.sin(b)*Math.sin(a)]},rayPlane:function(b,a,d,c){var e=f.dot(d,a);if(0===e)return!1;d=-(f.dot(d,b)+d[3])/e;f.add(b,f.scale(a,d,c),c);return!0},raySphereClosestPositive:function(b,a,d,c){var e=
f.dot(a,a),k=2*f.dot(a,b);d=f.dot(b,b)-d*d;d=k*k-4*e*d;if(0>d)return!1;var g=Math.sqrt(d);d=(-k-g)/(2*e);e=(-k+g)/(2*e);if(0>d||e<d&&0<e)d=e;return 0<d?(f.add(b,f.scale(a,d,c),c),!0):!1},rayTriangle3D:function(b,a,d,c,e,k,g,n,l){l||(l=f.create());var m=c[g]-d[k],v=c[g+1]-d[k+1],h=c[g+2]-d[k+2];c=e[n]-d[k];g=e[n+1]-d[k+1];e=e[n+2]-d[k+2];var q=a[1]*e-g*a[2],r=a[2]*c-e*a[0],t=a[0]*g-c*a[1];n=m*q+v*r+h*t;if(-1E-5<n&&1E-5>n)return!1;n=1/n;var w=b[0]-d[k],u=b[1]-d[k+1];b=b[2]-d[k+2];l[1]=n*(w*q+u*r+b*
t);if(0>l[1]||1<l[1])return!1;d=u*h-v*b;b=b*m-h*w;m=w*v-m*u;l[2]=n*(a[0]*d+a[1]*b+a[2]*m);if(0>l[2]||1<l[1]+l[2])return!1;l[0]=n*(c*d+g*b+e*m);return!0},rayBoxTest:function(b,a,d,c){var e,k=(d[0]-b[0])/a[0],f=(c[0]-b[0])/a[0];k>f&&(e=k,k=f,f=e);var g=(d[1]-b[1])/a[1],n=(c[1]-b[1])/a[1];g>n&&(e=g,g=n,n=e);if(k>n||g>f)return!1;g>k&&(k=g);n<f&&(f=n);d=(d[2]-b[2])/a[2];b=(c[2]-b[2])/a[2];d>b&&(e=d,d=b,b=e);if(k>b||d>f)return!1;b<f&&(f=b);return 0>f?!1:!0},rayRay2D:function(b,a,d,c,e,k){k||(k=m.create());
var f=(c[e]-d[e])*(a[0]-b[0])-(c[0]-d[0])*(a[e]-b[e]);if(0===f)return!1;d=((c[0]-d[0])*(b[e]-d[e])-(c[e]-d[e])*(b[0]-d[0]))/f;k[0]=b[0]+d*(a[0]-b[0]);k[1]=b[e]+d*(a[e]-b[e]);return!0},matrix2frustum:function(a,d,e){l.multiply(d,a,g);l.inverse(g);for(a=0;8>a;++a)l.multiplyVec4(g,c[a],b),f.set3(b[0]/b[3],b[1]/b[3],b[2]/b[3],e[a])},matrix2frustumPlanes:function(b,a,d,c){void 0===c&&(c=d,d=q);C.matrix2frustum(b,a,d);C.point2plane(d[4],d[0],d[3],c[0]);C.point2plane(d[1],d[5],d[6],c[1]);C.point2plane(d[4],
d[5],d[1],c[2]);C.point2plane(d[3],d[2],d[6],c[3]);C.point2plane(d[0],d[1],d[2],c[4]);C.point2plane(d[5],d[4],d[7],c[5])},point2plane:function(b,a,d,c){f.subtract(b,a,x);f.subtract(d,a,y);f.cross(y,x,c);f.normalize(c);c[3]=-f.dot(c,b)},project:function(a,d,c,e,k){k||(k=a);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=1;l.multiplyVec4(d,b);2<k.length&&(k[2]=-b[2]);l.multiplyVec4(c,b);C.assert(0!==b[3]);k[0]=b[0]/b[3];k[1]=b[1]/b[3];k[2]=b[2]/b[3];k[0]=(.5*k[0]+.5)*e[2]+e[0];k[1]=(.5*k[1]+.5)*e[3]+e[1]},geodeticToGeocentricLatidude:function(b){return Math.atan((1-
C.ECCENTRICITY_SQUARED)*Math.tan(b))},latLon2positionWGS84Ellipsoid:function(b,a,d,c){var e=6378137/Math.sqrt(1-C.ECCENTRICITY_SQUARED*Math.pow(Math.sin(b),2)),k=Math.cos(b);c[0]=(e+d)*Math.cos(a)*k;c[1]=(e*(1-C.ECCENTRICITY_SQUARED)+d)*Math.sin(b);c[2]=-(e+d)*Math.sin(a)*k},pos2latLon:function(b,a){var d=f.length(b);a[0]=Math.asin(C.clamp(b[1]/d,-1,1));a[1]=(0>b[2]?1:-1)*Math.acos(C.clamp(b[0]/(Math.cos(a[0])*d),-1,1));a[0]=C.rad2deg(a[0]);a[1]=C.rad2deg(a[1]);a[2]=d},pos2latLonWGS84Ellipsoid:function(b,
a){var d=b[0],c=-b[2],e=b[1],k=Math.sqrt(Math.pow(6378137,2)*(1-C.ECCENTRICITY_SQUARED));b=Math.sqrt(Math.pow(d,2)+Math.pow(c,2));var f=Math.atan2(6378137*e,k*b),d=Math.atan2(c,d),c=Math.atan2(e+Math.pow(Math.sqrt((Math.pow(6378137,2)-Math.pow(k,2))/Math.pow(k,2)),2)*k*Math.pow(Math.sin(f),3),b-6378137*C.ECCENTRICITY_SQUARED*Math.pow(Math.cos(f),3));b=b/Math.cos(c)-6378137/Math.sqrt(1-C.ECCENTRICITY_SQUARED*Math.pow(Math.sin(c),2))+C.EARTH_RADIUS;a[0]=c;a[1]=d;a[2]=b},computeGlobeTransformation:function(b,
a,d){var c=C.deg2rad(b[0]);b=C.deg2rad(b[1]);C.latLon2position(c,b,t,a);l.translate(d,t);l.rotateY(d,.5*Math.PI+b);l.rotateX(d,.5*Math.PI-c);return d},readUInt16:function(b,a){return b[a]+(b[a+1]<<8)},readUInt32:function(b,a){return b[a]+(b[a+1]<<8)+(b[a+2]<<16)+(b[a+3]<<24)},setIfDefined:function(b,a,d){void 0!==a[b]&&(d[b]=a[b])},array2object:function(b,a){var d={},c,e;if(void 0!==a)for(c=0,e=b.length;c<e;++c)d[a(b[c])]=b[c];else for(c=0,e=b.length;c<e;++c)d[b[c]]=b[c];return d},object2array:function(b){var a=
[],d;for(d in b)a.push(b[d]);return a},mergeObjects:function(b,a,d){void 0===d&&(d={});var c;if(d!==b)for(c in b)d[c]=b[c];if(d!==a)for(c in a)d[c]=a[c];return d},subtractObjects:function(b,a){var d={},c;for(c in b)void 0===a[c]&&(d[c]=b[c]);return d},intersectObjects:function(b,a){var d={},c;for(c in b)void 0!==a[c]&&(d[c]=b[c]);return d},getFirstObjectKey:function(b){for(var a in b)return a},getFirstObjectValue:function(b){return b[C.getFirstObjectKey(b)]},objectEmpty:function(b){for(var a in b)return!1;
return!0},arraysEqual:function(b,a){if(b.length!==a.length)return!1;for(var d=0,c=b.length;d<c;++d)if(b[d]!==a[d])return!1;return!0},arrayRemove:function(b,a){var d=b.indexOf(a);return-1!==d?(b[d]=b[b.length-1],b.pop(),a):null},byteBuffer2base64image:function(b,a,d,c,e){var k=4*a;C.assert(b.length===k*d,"buffer length must match image resolution");var f=document.createElement("canvas");f.width=a;f.height=d;var g=f.getContext("2d");a=g.getImageData(0,0,a,d);for(var n=a.data,l=0;l<d;++l)for(var m=l*
k,v=(d-1-l)*k,h=0;h<k;++h)n[m++]=b[v++];g.putImageData(a,0,0);return f.toDataURL(c,e)},cround:function(b){return Math.round(100*b)/100},logWithBase:function(b,a){return Math.log(b)/Math.log(a)},setMatrixTranslation:function(b,a){b[12]=a[0];b[13]=a[1];b[14]=a[2]},setMatrixTranslation3:function(b,a,d,c){b[12]=a;b[13]=d;b[14]=c},getMatrixTranslation:function(b,a){a=a||f.create();a[0]=b[12];a[1]=b[13];a[2]=b[14];return a},createTranslationMatrix:function(b,a){b=l.identity(b);C.setMatrixTranslation(b,
a);return b},fovx2fovy:function(b,a,d){return 2*Math.atan(d*Math.tan(.5*b)/a)},fovy2fovx:function(b,a,d){return 2*Math.atan(a*Math.tan(.5*b)/d)},fovx2fovd:function(b,a,d){return 2*Math.atan(Math.sqrt(a*a+d*d)*Math.tan(.5*b)/a)},fovy2fovd:function(b,a,d){return 2*Math.atan(Math.sqrt(a*a+d*d)*Math.tan(.5*b)/d)},fovd2fovx:function(b,a,d){return 2*Math.atan(a*Math.tan(.5*b)/Math.sqrt(a*a+d*d))},fovd2fovy:function(b,a,d){return 2*Math.atan(d*Math.tan(.5*b)/Math.sqrt(a*a+d*d))},nextHighestPowerOfTwo:function(b){--b;
for(var a=1;32>a;a<<=1)b|=b>>a;return b+1},linelineDistance3D:function(b,a,c,e){var k,g,l;u[0]=b[0]-c[0];u[1]=b[1]-c[1];u[2]=b[2]-c[2];r[0]=e[0]-c[0];r[1]=e[1]-c[1];r[2]=e[2]-c[2];if(1E-4>Math.abs(r.x)&&1E-4>Math.abs(r.y)&&1E-4>Math.abs(r.z))return[!1];n[0]=a[0]-b[0];n[1]=a[1]-b[1];n[2]=a[2]-b[2];if(1E-4>Math.abs(n.x)&&1E-4>Math.abs(n.y)&&1E-4>Math.abs(n.z))return[!1];a=u[0]*r[0]+u[1]*r[1]+u[2]*r[2];e=r[0]*n[0]+r[1]*n[1]+r[2]*n[2];k=u[0]*n[0]+u[1]*n[1]+u[2]*n[2];g=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];l=
(n[0]*n[0]+n[1]*n[1]+n[2]*n[2])*g-e*e;if(1E-4>Math.abs(l))return[!1];k=(a*e-k*g)/l;a=(a+e*k)/g;w[0]=b[0]+k*n[0];w[1]=b[1]+k*n[1];w[2]=b[2]+k*n[2];d[0]=c[0]+a*r[0];d[1]=c[1]+a*r[1];d[2]=c[2]+a*r[2];return[!0,f.dist(w,d),w,d]},projectVectorVector2D:function(b,a,d){z[0]=a[0]-b[0];z[1]=a[1]-b[1];z[2]=0;D[0]=d[0]-b[0];D[1]=d[1]-b[1];D[2]=0;B[0]=d[0];B[1]=d[1];B[2]=0;a=f.dot(D,z);d=f.length(z);a/=d*d;A[0]=z[0]*a;A[1]=z[1]*a;k[0]=b[0]+A[0];k[1]=b[1]+A[1];f.subtract(B,k,v);b=f.length(v);a=f.length(D);d=f.length(z);
var c=f.length(A);if(c>a||c>d)b=Number.MAX_VALUE;return b}};C.performance={now:h};return C})},"esri/views/3d/webgl-engine/lib/gl-matrix":function(){define([],function(){var a={};(function(a,p){p(a,!0);p(a,!1)})(a,function(a,p){var m={};(function(){if("undefined"!=typeof Float32Array){var b=new Float32Array(1),a=new Int32Array(b.buffer);m.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 m.invsqrt=function(b){return 1/Math.sqrt(b)}})();var f=Array;"undefined"!=
typeof Float32Array&&(f=p?Float32Array:Array);var e={create:function(b){var a=new f(3);b?(a[0]=b[0],a[1]=b[1],a[2]=b[2]):a[0]=a[1]=a[2]=0;return a},createFrom:function(b,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,e){e[0]=b;e[1]=a;e[2]=c;return e},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]*=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],c=b[1];b=b[2];var e=Math.sqrt(d*d+c*c+b*b);if(!e)return a[0]=0,a[1]=0,a[2]=0,a;if(1===e)return a[0]=d,a[1]=c,a[2]=b,a;e=1/e;a[0]=d*e;a[1]=c*e;a[2]=b*e;return a},cross:function(b,a,c){c||(c=b);var d=b[0],e=b[1];b=b[2];var k=a[0],f=a[1];a=a[2];c[0]=e*a-b*f;c[1]=b*k-d*a;c[2]=d*f-e*k;return c},length:function(b){var a=b[0],d=b[1];b=b[2];return Math.sqrt(a*
a+d*d+b*b)},length2:function(b){var a=b[0],d=b[1];b=b[2];return a*a+d*d+b*b},dot:function(b,a){return b[0]*a[0]+b[1]*a[1]+b[2]*a[2]},direction:function(b,a,c){c||(c=b);var d=b[0]-a[0],e=b[1]-a[1];b=b[2]-a[2];a=Math.sqrt(d*d+e*e+b*b);if(!a)return c[0]=0,c[1]=0,c[2]=0,c;a=1/a;c[0]=d*a;c[1]=e*a;c[2]=b*a;return c},lerp:function(b,a,c,e){e||(e=b);e[0]=b[0]+c*(a[0]-b[0]);e[1]=b[1]+c*(a[1]-b[1]);e[2]=b[2]+c*(a[2]-b[2]);return e},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}},l=null,g=new f(4);e.unproject=function(b,a,c,e,f){f||(f=b);l||(l=u.create());var d=l;g[0]=2*(b[0]-e[0])/e[2]-1;g[1]=2*(b[1]-e[1])/e[3]-1;g[2]=2*b[2]-1;g[3]=1;u.multiply(c,a,d);if(!u.inverse(d))return null;u.multiplyVec4(d,g);if(0===g[3])return null;f[0]=g[0]/g[3];f[1]=g[1]/g[3];f[2]=g[2]/g[3];return f};var c=e.createFrom(1,0,0),b=e.createFrom(0,1,0),h=e.createFrom(0,0,1);e.rotationTo=function(a,k,f){f||(f=
r.create());var d=e.dot(a,k),g=e.create();if(1<=d)r.set(n,f);else if(-.999999>d)e.cross(c,a,g),1E-6>g.length&&e.cross(b,a,g),1E-6>g.length&&e.cross(h,a,g),e.normalize(g),r.fromAxisAngle(g,Math.PI,f);else{var d=Math.sqrt(2*(1+d)),l=1/d;e.cross(a,k,g);f[0]=g[0]*l;f[1]=g[1]*l;f[2]=g[2]*l;f[3]=.5*d;r.normalize(f)}1<f[3]?f[3]=1:-1>f[3]&&(f[3]=-1);return f};var x=e.create(),y=e.create();e.project=function(b,a,c,f){f||(f=b);e.direction(a,c,x);e.subtract(b,a,y);b=e.dot(x,y);e.scale(x,b,f);e.add(f,a,f)};e.str=
function(b){return"["+b[0]+", "+b[1]+", "+b[2]+"]"};var t={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]=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,e,g,n,l,m,h){var d=new f(9);d[0]=b;d[1]=a;d[2]=c;d[3]=e;d[4]=g;d[5]=n;d[6]=l;d[7]=m;d[8]=h;return d},determinant:function(b){var a=b[3],d=b[4],c=b[5],e=b[6],f=b[7],g=b[8];return b[0]*(g*d-c*f)+b[1]*(-g*a+c*e)+b[2]*(f*a-d*e)},inverse:function(b,
a){var d=b[0],c=b[1],e=b[2],k=b[3],f=b[4],g=b[5],n=b[6],l=b[7];b=b[8];var m=b*f-g*l,h=-b*k+g*n,r=l*k-f*n,q=d*m+c*h+e*r;if(!q)return null;q=1/q;a||(a=t.create());a[0]=m*q;a[1]=(-b*c+e*l)*q;a[2]=(g*c-e*f)*q;a[3]=h*q;a[4]=(b*d-e*n)*q;a[5]=(-g*d+e*k)*q;a[6]=r*q;a[7]=(-l*d+c*n)*q;a[8]=(f*d-c*k)*q;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2],f=b[3],g=b[4],n=b[5],l=b[6],m=b[7];b=b[8];var v=a[0],h=a[1],q=a[2],r=a[3],t=a[4],w=a[5],u=a[6],p=a[7];a=a[8];c[0]=v*d+h*f+q*l;c[1]=v*e+h*g+
q*m;c[2]=v*k+h*n+q*b;c[3]=r*d+t*f+w*l;c[4]=r*e+t*g+w*m;c[5]=r*k+t*n+w*b;c[6]=u*d+p*f+a*l;c[7]=u*e+p*g+a*m;c[8]=u*k+p*n+a*b;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],e=a[1];a=a[2];c[0]=d*b[0]+e*b[3]+a*b[6];c[1]=d*b[1]+e*b[4]+a*b[7];c[2]=d*b[2]+e*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=t.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];a[5]=b[7];a[6]=b[2];a[7]=b[5];a[8]=b[8];return a},toMat4:function(b,a){a||(a=u.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]+"]"}},u={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],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,e,g,n,l,m,h,q,r,t,w,u,p,x){var d=new f(16);d[0]=b;d[1]=a;d[2]=c;d[3]=e;d[4]=g;d[5]=n;d[6]=l;d[7]=m;d[8]=h;d[9]=q;d[10]=r;d[11]=t;d[12]=w;d[13]=u;d[14]=p;d[15]=x;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]=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=u.create());b[0]=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],e=b[6],k=b[7],
f=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]=e;b[11]=b[14];b[12]=c;b[13]=k;b[14]=f;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},determinant:function(b){var a=b[0],d=b[1],c=b[2],e=b[3],f=b[4],g=b[5],n=b[6],l=b[7],m=b[8],h=b[9],q=b[10],r=b[11],t=b[12],w=b[13],u=b[14];b=b[15];return t*h*n*e-m*w*n*e-t*g*q*e+f*w*q*e+m*g*u*e-
f*h*u*e-t*h*c*l+m*w*c*l+t*d*q*l-a*w*q*l-m*d*u*l+a*h*u*l+t*g*c*r-f*w*c*r-t*d*n*r+a*w*n*r+f*d*u*r-a*g*u*r-m*g*c*b+f*h*c*b+m*d*n*b-a*h*n*b-f*d*q*b+a*g*q*b},inverse:function(b,a){a||(a=b);var d=b[0],c=b[1],e=b[2],k=b[3],f=b[4],g=b[5],n=b[6],l=b[7],m=b[8],h=b[9],q=b[10],r=b[11],t=b[12],w=b[13],u=b[14];b=b[15];var p=d*g-c*f,x=d*n-e*f,y=d*l-k*f,R=c*n-e*g,U=c*l-k*g,T=e*l-k*n,N=m*w-h*t,Z=m*u-q*t,H=m*b-r*t,O=h*u-q*w,aa=h*b-r*w,ba=q*b-r*u,X=p*ba-x*aa+y*O+R*H-U*Z+T*N;if(!X)return null;X=1/X;a[0]=(g*ba-n*aa+l*
O)*X;a[1]=(-c*ba+e*aa-k*O)*X;a[2]=(w*T-u*U+b*R)*X;a[3]=(-h*T+q*U-r*R)*X;a[4]=(-f*ba+n*H-l*Z)*X;a[5]=(d*ba-e*H+k*Z)*X;a[6]=(-t*T+u*y-b*x)*X;a[7]=(m*T-q*y+r*x)*X;a[8]=(f*aa-g*H+l*N)*X;a[9]=(-d*aa+c*H-k*N)*X;a[10]=(t*U-w*y+b*p)*X;a[11]=(-m*U+h*y-r*p)*X;a[12]=(-f*O+g*Z-n*N)*X;a[13]=(d*O-c*Z+e*N)*X;a[14]=(-t*R+w*x-u*p)*X;a[15]=(m*R-h*x+q*p)*X;return a},toRotationMat:function(b,a){a||(a=u.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=t.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],e=b[2],k=b[4],f=b[5],g=b[6],n=b[8],l=b[9];b=b[10];var m=b*f-g*l,h=-b*k+g*n,q=l*k-f*n,r=d*m+c*h+e*q;if(!r)return null;r=1/r;a||(a=t.create());a[0]=m*r;a[1]=(-b*c+e*l)*r;a[2]=(g*c-e*f)*r;a[3]=h*r;a[4]=(b*d-e*n)*r;a[5]=(-g*d+e*k)*r;a[6]=q*r;a[7]=(-l*d+c*n)*r;
a[8]=(f*d-c*k)*r;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2],f=b[3],g=b[4],n=b[5],l=b[6],m=b[7],h=b[8],v=b[9],r=b[10],q=b[11],t=b[12],w=b[13],u=b[14];b=b[15];var p=a[0],x=a[1],y=a[2],U=a[3],T=a[4],N=a[5],Z=a[6],H=a[7],O=a[8],aa=a[9],ba=a[10],X=a[11],ea=a[12],la=a[13],ta=a[14];a=a[15];c[0]=p*d+x*g+y*h+U*t;c[1]=p*e+x*n+y*v+U*w;c[2]=p*k+x*l+y*r+U*u;c[3]=p*f+x*m+y*q+U*b;c[4]=T*d+N*g+Z*h+H*t;c[5]=T*e+N*n+Z*v+H*w;c[6]=T*k+N*l+Z*r+H*u;c[7]=T*f+N*m+Z*q+H*b;c[8]=O*d+aa*g+ba*h+X*t;
c[9]=O*e+aa*n+ba*v+X*w;c[10]=O*k+aa*l+ba*r+X*u;c[11]=O*f+aa*m+ba*q+X*b;c[12]=ea*d+la*g+ta*h+a*t;c[13]=ea*e+la*n+ta*v+a*w;c[14]=ea*k+la*l+ta*r+a*u;c[15]=ea*f+la*m+ta*q+a*b;return c},multiplyVec3:function(b,a,c){c||(c=a);var d=a[0],e=a[1];a=a[2];c[0]=b[0]*d+b[4]*e+b[8]*a+b[12];c[1]=b[1]*d+b[5]*e+b[9]*a+b[13];c[2]=b[2]*d+b[6]*e+b[10]*a+b[14];return c},multiplyVec4:function(b,a,c){c||(c=a);var d=a[0],e=a[1],k=a[2];a=a[3];c[0]=b[0]*d+b[4]*e+b[8]*k+b[12]*a;c[1]=b[1]*d+b[5]*e+b[9]*k+b[13]*a;c[2]=b[2]*d+
b[6]*e+b[10]*k+b[14]*a;c[3]=b[3]*d+b[7]*e+b[11]*k+b[15]*a;return c},translate:function(b,a,c){var d=a[0],e=a[1];a=a[2];var k,f,g,n,l,m,h,r,q,v,t,w;if(!c||b===c)return b[12]=b[0]*d+b[4]*e+b[8]*a+b[12],b[13]=b[1]*d+b[5]*e+b[9]*a+b[13],b[14]=b[2]*d+b[6]*e+b[10]*a+b[14],b[15]=b[3]*d+b[7]*e+b[11]*a+b[15],b;k=b[0];f=b[1];g=b[2];n=b[3];l=b[4];m=b[5];h=b[6];r=b[7];q=b[8];v=b[9];t=b[10];w=b[11];c[0]=k;c[1]=f;c[2]=g;c[3]=n;c[4]=l;c[5]=m;c[6]=h;c[7]=r;c[8]=q;c[9]=v;c[10]=t;c[11]=w;c[12]=k*d+l*e+q*a+b[12];c[13]=
f*d+m*e+v*a+b[13];c[14]=g*d+h*e+t*a+b[14];c[15]=n*d+r*e+w*a+b[15];return c},scale:function(b,a,c){var d=a[0],e=a[1];a=a[2];if(!c||b===c)return b[0]*=d,b[1]*=d,b[2]*=d,b[3]*=d,b[4]*=e,b[5]*=e,b[6]*=e,b[7]*=e,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]=b[2]*d;c[3]=b[3]*d;c[4]=b[4]*e;c[5]=b[5]*e;c[6]=b[6]*e;c[7]=b[7]*e;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,e){var d=c[0],k=c[1];c=c[2];var f=Math.sqrt(d*d+k*k+c*c),g,n,l,m,h,r,q,v,t,w,u,p,x,A,y,T,N,Z,H,O;if(!f)return null;1!==f&&(f=1/f,d*=f,k*=f,c*=f);g=Math.sin(a);n=Math.cos(a);l=1-n;a=b[0];f=b[1];m=b[2];h=b[3];r=b[4];q=b[5];v=b[6];t=b[7];w=b[8];u=b[9];p=b[10];x=b[11];A=d*d*l+n;y=k*d*l+c*g;T=c*d*l-k*g;N=d*k*l-c*g;Z=k*k*l+n;H=c*k*l+d*g;O=d*c*l+k*g;d=k*c*l-d*g;k=c*c*l+n;
e?b!==e&&(e[12]=b[12],e[13]=b[13],e[14]=b[14],e[15]=b[15]):e=b;e[0]=a*A+r*y+w*T;e[1]=f*A+q*y+u*T;e[2]=m*A+v*y+p*T;e[3]=h*A+t*y+x*T;e[4]=a*N+r*Z+w*H;e[5]=f*N+q*Z+u*H;e[6]=m*N+v*Z+p*H;e[7]=h*N+t*Z+x*H;e[8]=a*O+r*d+w*k;e[9]=f*O+q*d+u*k;e[10]=m*O+v*d+p*k;e[11]=h*O+t*d+x*k;return e},rotateX:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var e=b[4],k=b[5],f=b[6],g=b[7],n=b[8],l=b[9],m=b[10],h=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]=
e*a+n*d;c[5]=k*a+l*d;c[6]=f*a+m*d;c[7]=g*a+h*d;c[8]=e*-d+n*a;c[9]=k*-d+l*a;c[10]=f*-d+m*a;c[11]=g*-d+h*a;return c},rotateY:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);var e=b[0],k=b[1],f=b[2],g=b[3],n=b[8],l=b[9],m=b[10],h=b[11];c?b!==c&&(c[4]=b[4],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]=e*a+n*-d;c[1]=k*a+l*-d;c[2]=f*a+m*-d;c[3]=g*a+h*-d;c[8]=e*d+n*a;c[9]=k*d+l*a;c[10]=f*d+m*a;c[11]=g*d+h*a;return c},rotateZ:function(b,a,c){var d=Math.sin(a);a=Math.cos(a);
var e=b[0],k=b[1],f=b[2],g=b[3],n=b[4],l=b[5],m=b[6],h=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]=e*a+n*d;c[1]=k*a+l*d;c[2]=f*a+m*d;c[3]=g*a+h*d;c[4]=e*-d+n*a;c[5]=k*-d+l*a;c[6]=f*-d+m*a;c[7]=g*-d+h*a;return c},frustum:function(b,a,c,e,f,g,n){n||(n=u.create());var d=a-b,k=e-c,l=g-f;n[0]=2*f/d;n[1]=0;n[2]=0;n[3]=0;n[4]=0;n[5]=2*f/k;n[6]=0;n[7]=0;n[8]=(a+b)/d;n[9]=(e+c)/k;n[10]=-(g+f)/l;n[11]=-1;n[12]=0;n[13]=0;n[14]=-(g*f*2)/
l;n[15]=0;return n},perspective:function(b,a,c,e,f){b=c*Math.tan(b*Math.PI/360);a*=b;return u.frustum(-a,a,-b,b,c,e,f)},ortho:function(b,a,c,e,f,g,n){n||(n=u.create());var d=a-b,k=e-c,l=g-f;n[0]=2/d;n[1]=0;n[2]=0;n[3]=0;n[4]=0;n[5]=2/k;n[6]=0;n[7]=0;n[8]=0;n[9]=0;n[10]=-2/l;n[11]=0;n[12]=-(b+a)/d;n[13]=-(e+c)/k;n[14]=-(g+f)/l;n[15]=1;return n},lookAt:function(b,a,c,e){e||(e=u.create());var d,k,f,g,n,l,m,h,r=b[0],q=b[1];b=b[2];f=c[0];g=c[1];k=c[2];m=a[0];c=a[1];d=a[2];if(r===m&&q===c&&b===d)return u.identity(e);
a=r-m;c=q-c;m=b-d;h=1/Math.sqrt(a*a+c*c+m*m);a*=h;c*=h;m*=h;d=g*m-k*c;k=k*a-f*m;f=f*c-g*a;(h=Math.sqrt(d*d+k*k+f*f))?(h=1/h,d*=h,k*=h,f*=h):f=k=d=0;g=c*f-m*k;n=m*d-a*f;l=a*k-c*d;(h=Math.sqrt(g*g+n*n+l*l))?(h=1/h,g*=h,n*=h,l*=h):l=n=g=0;e[0]=d;e[1]=g;e[2]=a;e[3]=0;e[4]=k;e[5]=n;e[6]=c;e[7]=0;e[8]=f;e[9]=l;e[10]=m;e[11]=0;e[12]=-(d*r+k*q+f*b);e[13]=-(g*r+n*q+l*b);e[14]=-(a*r+c*q+m*b);e[15]=1;return e},fromRotationTranslation:function(b,a,c){c||(c=u.create());var d=b[0],e=b[1],k=b[2],f=b[3],g=d+d,n=
e+e,l=k+k;b=d*g;var m=d*n,d=d*l,h=e*n,e=e*l,k=k*l,g=f*g,n=f*n,f=f*l;c[0]=1-(h+k);c[1]=m+f;c[2]=d-n;c[3]=0;c[4]=m-f;c[5]=1-(b+k);c[6]=e+g;c[7]=0;c[8]=d+n;c[9]=e-g;c[10]=1-(b+h);c[11]=0;c[12]=a[0];c[13]=a[1];c[14]=a[2];c[15]=1;return c},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,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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;b[1]=0;b[2]=0;b[3]=1;return b}},n=r.identity();r.calculateW=function(b,a){var d=b[0],c=b[1],e=b[2];if(!a||b===a)return b[3]=-Math.sqrt(Math.abs(1-d*d-c*c-e*e)),b;a[0]=d;a[1]=c;a[2]=e;a[3]=-Math.sqrt(Math.abs(1-d*d-c*c-e*e));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],e=b[2],k=b[3],d=(d=d*d+c*c+e*e+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};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],
e=b[2];b=b[3];var k=Math.sqrt(d*d+c*c+e*e+b*b);if(0===k)return a[0]=0,a[1]=0,a[2]=0,a[3]=0,a;k=1/k;a[0]=d*k;a[1]=c*k;a[2]=e*k;a[3]=b*k;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;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],e=b[1],k=b[2];b=b[3];var f=a[0],g=a[1],n=a[2];a=a[3];c[0]=d*a+b*f+e*n-k*g;c[1]=e*a+b*g+k*f-d*n;c[2]=k*a+b*n+d*g-e*f;c[3]=b*a-d*f-e*g-k*n;return c};r.multiplyVec3=
function(b,a,c){c||(c=a);var d=a[0],e=a[1],k=a[2];a=b[0];var f=b[1],g=b[2];b=b[3];var n=b*d+f*k-g*e,l=b*e+g*d-a*k,m=b*k+a*e-f*d,d=-a*d-f*e-g*k;c[0]=n*b+d*-a+l*-g-m*-f;c[1]=l*b+d*-f+m*-a-n*-g;c[2]=m*b+d*-g+n*-f-l*-a;return c};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=t.create());var d=b[0],c=b[1],e=b[2],k=b[3],f=d+d,g=c+c,n=e+e;b=d*f;var l=d*g,d=d*n,m=c*g,c=c*n,e=e*n,f=k*f,g=k*
g,k=k*n;a[0]=1-(m+e);a[1]=l+k;a[2]=d-g;a[3]=l-k;a[4]=1-(b+e);a[5]=c+f;a[6]=d+g;a[7]=c-f;a[8]=1-(b+m);return a};r.toMat4=function(b,a){a||(a=u.create());var d=b[0],c=b[1],e=b[2],k=b[3],f=d+d,g=c+c,n=e+e;b=d*f;var l=d*g,d=d*n,m=c*g,c=c*n,e=e*n,f=k*f,g=k*g,k=k*n;a[0]=1-(m+e);a[1]=l+k;a[2]=d-g;a[3]=0;a[4]=l-k;a[5]=1-(b+e);a[6]=c+f;a[7]=0;a[8]=d+g;a[9]=c-f;a[10]=1-(b+m);a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a};r.slerp=function(b,a,c,e){e||(e=b);var d=b[0]*a[0]+b[1]*a[1]+b[2]*a[2]+b[3]*a[3],k,
f;if(1<=Math.abs(d))return e!==b&&(e[0]=b[0],e[1]=b[1],e[2]=b[2],e[3]=b[3]),e;k=Math.acos(d);f=Math.sqrt(1-d*d);if(.001>Math.abs(f))return e[0]=.5*b[0]+.5*a[0],e[1]=.5*b[1]+.5*a[1],e[2]=.5*b[2]+.5*a[2],e[3]=.5*b[3]+.5*a[3],e;d=Math.sin((1-c)*k)/f;c=Math.sin(c*k)/f;e[0]=b[0]*d+a[0]*c;e[1]=b[1]*d+a[1]*c;e[2]=b[2]*d+a[2]*c;e[3]=b[3]*d+a[3]*c;return e};r.fromRotationMatrix=function(b,a){a||(a=r.create());var d=b[0]+b[4]+b[8],c;if(0<d)c=Math.sqrt(d+1),a[3]=.5*c,c=.5/c,a[0]=(b[7]-b[5])*c,a[1]=(b[2]-b[6])*
c,a[2]=(b[3]-b[1])*c;else{c=r.fromRotationMatrix.s_iNext=r.fromRotationMatrix.s_iNext||[1,2,0];d=0;b[4]>b[0]&&(d=1);b[8]>b[3*d+d]&&(d=2);var e=c[d],k=c[e];c=Math.sqrt(b[3*d+d]-b[3*e+e]-b[3*k+k]+1);a[d]=.5*c;c=.5/c;a[3]=(b[3*k+e]-b[3*e+k])*c;a[e]=(b[3*e+d]+b[3*d+e])*c;a[k]=(b[3*k+d]+b[3*d+k])*c}return a};t.toQuat4=r.fromRotationMatrix;(function(){var b=t.create();r.fromAxes=function(a,d,c,e){b[0]=d[0];b[3]=d[1];b[6]=d[2];b[1]=c[0];b[4]=c[1];b[7]=c[2];b[2]=a[0];b[5]=a[1];b[8]=a[2];return r.fromRotationMatrix(b,
e)}})();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];return c};r.toAngleAxis=function(b,a){a||(a=b);var d=b[0]*b[0]+b[1]*b[1]+b[2]*b[2];0<d?(a[3]=2*Math.acos(b[3]),d=m.invsqrt(d),a[0]=b[0]*d,a[1]=b[1]*d,a[2]=b[2]*d):(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 w={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,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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=w.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 d=b[0],c=b[1],e=b[2];b=b[3];var k=d*b-e*c;if(!k)return null;k=1/k;a[0]=b*k;a[1]=-c*k;a[2]=-e*k;a[3]=d*k;return a},multiply:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2];b=b[3];c[0]=d*a[0]+e*a[2];c[1]=d*a[1]+e*a[3];c[2]=k*a[0]+b*a[2];c[3]=k*a[1]+b*a[3];return c},rotate:function(b,a,c){c||(c=b);var d=b[0],e=b[1],k=b[2];b=b[3];var f=Math.sin(a);a=Math.cos(a);c[0]=d*a+e*f;c[1]=d*-f+e*a;c[2]=k*a+b*f;c[3]=k*-f+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],e=b[2],k=b[3],f=a[0];a=a[1];c[0]=b[0]*f;c[1]=d*a;c[2]=e*f;c[3]=k*a;return c},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"}};p=p?"":"d";a["glMath"+p]=m;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 d=new f(2);d[0]=b;d[1]=a;return d},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},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 d=a[0]-b[0];b=a[1]-b[1];return Math.sqrt(d*d+b*b)},dist2:function(b,a){var d=a[0]-b[0];b=a[1]-b[1];return d*d+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 d=b[0]*b[0]+b[1]*b[1];0<d?(d=Math.sqrt(d),a[0]=b[0]/d,a[1]=b[1]/d):a[0]=a[1]=0;return a},cross:function(b,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,e){e||(e=b);e[0]=b[0]+c*(a[0]-b[0]);e[1]=b[1]+c*(a[1]-b[1]);return e},str:function(b){return"["+b[0]+", "+b[1]+"]"}};a["vec3"+p]=e;a["vec4"+p]={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]=0,a[1]=0,a[2]=0,a[3]=0);return a},createFrom:function(b,a,c,e){var d=new f(4);d[0]=b;d[1]=a;d[2]=c;d[3]=e;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,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,e,f){f[0]=b;f[1]=a;f[2]=c;f[3]=e;return f},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,e){e||(e=b);e[0]=b[0]+c*(a[0]-b[0]);e[1]=b[1]+c*(a[1]-b[1]);e[2]=b[2]+c*(a[2]-b[2]);e[3]=b[3]+c*(a[3]-b[3]);return e},str:function(b){return"["+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+"]"}};a["mat2"+p]=w;a["mat3"+p]=t;a["mat4"+p]=u;a["quat4"+p]=r});return a})},"esri/views/3d/webgl-engine/lib/RenderGeometry":function(){define(["require",
"exports","./gl-matrix"],function(a,h,p){var m=p.vec3d,f=p.mat4d;return function(){function a(a,e,c,b,f,h,p,t,u,r){this.data=a.toRenderData();this.componentOffsets=a.componentOffsets;this.boundingInfo=e;this.material=c;this.origin=null;this.center=m.create();this.bsRadius=0;this.transformation=null;b&&this.updateTransformation(b,f);this.castShadow=h;this.singleUse=p;this.name=t;this.uniqueName=u;this.idx=r;this.canBeMerged=!0;this.instanceParameters={}}a.prototype.updateTransformation=function(a,
e){e=e||f.maxScale(a);this.transformation=a;f.multiplyVec3(a,this.boundingInfo.getCenter(),this.center);this.bsRadius=this.boundingInfo.getBSRadius()*e};return a}()})},"esri/views/3d/webgl-engine/parts/View":function(){define("require exports ../../../../core/Logger ../lib/GLTextureRep ../lib/GLMaterialRep ../lib/ShaderSnippets ../lib/GLSLShaderRep ../lib/TextureRenderer ../lib/gl-matrix ../lib/webgl-utils ./Model ./Viewport ../materials/repository ../lib/SSAOHelperObscurance ../lib/HighlightHelper ../lib/OffscreenRenderingHelper ../lib/tracer ../../../webgl/RenderingContext ../lib/ProgramRepository ../../../support/screenshotUtils".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k){var v=c.vec3d,A=c.vec4d,z=p.getLogger("esri.views.3d.webgl-engine.parts.View");a=function(){function a(b,a,d,c){var e=this;this._backgroundColor=A.createFrom(1,1,1,1);this._lightDirection=v.createFrom(0,1,0);this._didRender=!1;this._idleSuspend=this._needsRender=!0;this._shouldRender=!1;this._screenCaptureQueue=[];this._container=b;this._stage=a;this._initializeContext(c);this._initializeShaders();this._textureRep=new m(a.getAll(q.ContentType.TEXTURE),
this._programRepository,function(){return e._viewport.getCamera().viewport},this._rctx);this._materialRep=new f(this._textureRep,this._programRepository);this._viewport=new x(this._programRepository,this._materialRep,this._textureRep,this._rctx);this._initializeViewportCamera();this._textureRenderer=new g(this._rctx,this._canvas,this._programRepository,this._materialRep,this._textureRep,d);this._initializeFrameTask()}a.prototype._initializeFrameTask=function(){var b=this;this._frameTask={preRender:function(){n.begin();
b._stage.processDirty();b.needsRender()?(b._shouldRender=!0,b._viewport.getCamera().setGLViewport(b._rctx),b._rctx.setClearColor.apply(b._rctx,b._backgroundColor),b._rctx.clear(16640)):b._shouldRender=!1},render:function(){b._shouldRender&&(b._didRender=!0,b._viewport.render(b._lightDirection,null))},postRender:function(){n.end()},update:function(){b._performScreenCaptures();b.resetNeedsRender()}}};a.prototype._initializeViewportCamera=function(){var b=this._container.getBoundingClientRect(),a=this._viewport.getCamera();
a.viewport[2]=b.width;a.viewport[3]=b.height;this._viewport.setCamera(a)};a.prototype._initializeContext=function(a){this._canvas=a.canvas;this._canvas||(this._canvas=document.createElement("canvas"));this._canvas.setAttribute("style","width: 100%; height:100%; display:block;");var d=b.setupWebGL(this._canvas,{alpha:a.alpha||!1,antialias:!1,depth:!0,stencil:null==a.stencil?!0:a.stencil});this._gl=n.instrumentContext(d[0]);this._rctx=new w(d[0],{disabledExtensions:a.deactivatedWebGLExtensions});!a.alpha&&
this._rctx.contextAttributes.alpha&&z.error("WebGL context has alpha channel even though no alpha channel was requested");this._container.appendChild(this._canvas)};a.prototype._initializeShaders=function(){this._shaderSnippets=new e;this._shaderRep=new l;this._programRepository=new d;y.initializeShaders(this._shaderSnippets,this._shaderRep,this._programRepository,this._rctx);u.loadShaders(this._shaderSnippets,this._shaderRep,this._programRepository,this._rctx);t.loadShaders(this._shaderSnippets,
this._shaderRep,this._programRepository,this._rctx);r.loadShaders(this._shaderSnippets,this._shaderRep,this._programRepository,this._rctx)};a.prototype.dispose=function(){this._viewport.dispose();this._viewport=null;this._textureRenderer.dispose();this._textureRenderer=null;this._programRepository.dispose();this._programRepository=null;this._container.contains(this._canvas)&&this._container.removeChild(this._canvas);this._gl=this._canvas=this._container=null};a.prototype.getCombinedStats=function(){return this._viewport.getCombinedStats()};
a.prototype.setNeedsRender=function(){this._didRender=!1;this._needsRender=!0};a.prototype.resetNeedsRender=function(){this._didRender&&(this._didRender=this._needsRender=!1);this._viewport.resetNeedsRender();this._textureRep.resetNeedsRender()};a.prototype.needsRender=function(){return this._needsRender||!this._idleSuspend||this._viewport.needsRender()||this._textureRep.needsRender()};a.prototype.getFrameTask=function(){return this._frameTask};a.prototype.setLights=function(b,a){v.set(a.direction,
this._lightDirection);A.set4(b.color[0],b.color[1],b.color[2],b.intensity,D.ambient);A.set4(a.color[0],a.color[1],a.color[2],a.intensity,D.diffuse);A.set4(a.color[0],a.color[1],a.color[2],Math.min(a.intensity+b.intensity,1),D.specular);v.set(a.direction,D.direction);this._viewport.setLightingData(D);this._needsRender=!0};a.prototype.getViewParams=function(b){var a=this._viewport.getViewParams(b);if(!b||b.backgroundColor)a.backgroundColor=this._backgroundColor;return a};a.prototype.setViewParams=function(b){this._needsRender=
!0;b.backgroundColor&&(this._backgroundColor=b.backgroundColor);this._viewport.setViewParams(b)};a.prototype.setRenderParams=function(b){this._needsRender=!0;void 0!==b.idleSuspend&&(this._idleSuspend=!!b.idleSuspend);this._viewport.setRenderParams(b)};a.prototype.getRenderParams=function(){var b=this._viewport.getRenderParams();b.anisotropicFiltering=this._textureRep.getMaxAnisotropy();b.idleSuspend=this._idleSuspend;return b};Object.defineProperty(a.prototype,"renderingContext",{get:function(){return this._rctx},
enumerable:!0,configurable:!0});a.prototype.has=function(b){return"s3tc"===b?!!this._rctx.extensions.compressedTextureS3TC:"standardDerivatives"===b?!!this._rctx.extensions.standardDerivatives:"shaderTextureLOD"===b?!!this._rctx.extensions.shaderTextureLOD:"angleInstancedArrays"===b?!!this._rctx.extensions.angleInstancedArrays:!1};a.prototype.getFrustumObjects=function(){return this._viewport.getFrustumObjects()};a.prototype.modify=function(b,a,d,c){this._viewport.modify(b,a,d,c)};a.prototype.setSelectionObject=
function(b,a){this._viewport.setSelectionObject(b,a)};a.prototype.setCamera=function(b){this._viewport.setCamera(b)};a.prototype.getCamera=function(){return this._viewport.getCamera()};a.prototype.getPickRay=function(b,a,d){this._viewport.getPickRay(b,a,d)};a.prototype.pickRayWithBeginPoint=function(b,a,d,c,e){this._viewport.pickRayWithBeginPoint(b,a,d,c,e)};a.prototype.getCanvas=function(){return this._canvas};a.prototype.getTextureGraphicsRenderer=function(){return this._textureRenderer};a.prototype.requestScreenCapture=
function(b,a){this._screenCaptureQueue.push({settings:b||{},callback:a});this._needsRender=!0};a.prototype.getAllTexturesLoaded=function(){return 0===this._textureRep.getLoadingCount()};a.prototype.getTextureLoaded=function(b){return this._textureRep.getIsLoaded(b)};a.prototype.addTextureListener=function(b){this._textureRep.addTextureListener(b)};a.prototype.removeTextureListener=function(b){this._textureRep.removeTextureListener(b)};a.prototype.addExternalRenderer=function(b,a){return this._viewport.addExternalRenderer(b,
a)?(a.initializeRenderContext({rctx:this._rctx,gl:this._rctx.gl,shaderSnippets:this._shaderSnippets,shaderRep:this._shaderRep,programRep:this._programRepository,textureRep:this._textureRep}),!0):!1};a.prototype.removeExternalRenderer=function(b){return this._viewport.removeExternalRenderer(b)?(b.uninitializeRenderContext({rctx:this._rctx,gl:this._rctx.gl}),!0):!1};a.prototype._performScreenCaptures=function(){if(0!==this._screenCaptureQueue.length){for(var b=0;b<this._screenCaptureQueue.length;b++){var a=
this._screenCaptureQueue[b],d=0,c=0,e=this._canvas.width,f=this._canvas.height,g=this._canvas.width,n=this._canvas.height;if(g=a.settings.area)d=g.x,c=g.y,e=g.width,f=g.height;void 0!==a.settings.width&&void 0!==a.settings.height?(g=a.settings.width/a.settings.height,f*g<e?(g*=f,d+=Math.floor((e-g)/2),e=Math.floor(g)):(g=e/g,c+=Math.floor((f-g)/2),f=Math.floor(g)),g=a.settings.width,n=a.settings.height):(g=e,n=f);var l=this._canvas;if(0!==d||0!==c||e!==this._canvas.width||f!==this._canvas.height||
g!==this._canvas.width||n!==this._canvas.height){this._resizeCanvas||(this._resizeCanvas=document.createElement("canvas"));this._resizeCanvas.width=g;this._resizeCanvas.height=n;var m=this._resizeCanvas.getContext("2d"),l=new Uint8Array(e*f*4);this._gl.readPixels(d,this._canvas.height-(c+f),e,f,6408,5121,l);d=m.getImageData(0,0,g,n);k.resampleHermite(l,e,f,d.data,g,n,!0);m.putImageData(d,0,0);l=this._resizeCanvas;m=null}e={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"}[a.settings.format?a.settings.format.toLowerCase():
"png"];f=1;void 0!==a.settings.quality&&(f=a.settings.quality/100);e=l.toDataURL(e,f);a.callback({dataURL:e,x:0,y:0,width:g,height:n})}this._screenCaptureQueue=[]}};return a}();var D={ambient:A.create(),diffuse:A.create(),specular:A.create(),direction:v.create()};return a})},"esri/views/3d/webgl-engine/lib/GLTextureRep":function(){define(["require","exports","./Util","../../../webgl/Texture","../../../webgl/enums"],function(a,h,p,m,f){var e=function(){function a(a){this._glTexture=null;this._refCount=
0;this._glTexture=a}a.prototype.incRefCnt=function(){++this._refCount};a.prototype.decRefCnt=function(){--this._refCount;p.assert(0<=this._refCount)};a.prototype.getRefCnt=function(){return this._refCount};a.prototype.setGLTexture=function(a){this._glTexture=a};a.prototype.getGLTexture=function(){return this._glTexture};return a}();return function(){function a(a,c,b,e){this.NUM_PARALLEL=8;this.textures=a;this._programRepository=c;this.getViewportToRestore=b;this._rctx=e;this.NUM_PARALLEL=8;this.id2textureRef=
{};this.loading={};this._queue=[];this.listeners=[];this.maxMaxAnisotropy=(this.afExt=e.extensions.textureFilterAnisotropic)?e.parameters.maxMaxAnisotropy:1;this.maxAnisotropy=Math.min(8,this.maxMaxAnisotropy);this._needsRender=!0;this._fallbackTextureData=new Uint8Array(256);this._fallbackTextureTransparentData=new Uint8Array(256);for(a=0;a<this._fallbackTextureData.length;++a)this._fallbackTextureData[a]=255,this._fallbackTextureTransparentData[a]=0!==(a+1)%4?255:0;this._fallbackTextureDesc={target:3553,
pixelFormat:6408,dataType:5121,samplingMode:9728,width:8,height:8,maxAnisotropy:8}}a.prototype.resetNeedsRender=function(){this._needsRender=!1};a.prototype.needsRender=function(){return this._needsRender};a.prototype.aquire=function(a,c,b,f){var g=this,l=this.id2textureRef[a];if(null==l){c=this.textures[a];p.assert(void 0!==c);c.setUnloadFunc(this._unload.bind(this));b=!0===b;var h=this._createGLTextureDescription(c),l=new e(b?new m(this._rctx,this._fallbackTextureDesc,this._fallbackTextureTransparentData):
new m(this._rctx,this._fallbackTextureDesc,this._fallbackTextureData));p.assert(null==this.id2textureRef[a]);this.id2textureRef[a]=l;c.initializeThroughRender?(a=c.initializeThroughRender(this._rctx,h),l.setGLTexture(a),f&&f(l)):c.deferredLoading()?this.getLoadingCount()<this.NUM_PARALLEL?this._loadImage(a,h,f):this._queue.push([a,h,f]):c.initializeThroughUpload(this._rctx,h,this._programRepository,this.getViewportToRestore(),function(b){l.setGLTexture(b);g._needsRender=!0;f&&f(l)});this._needsRender=
!0}l.incRefCnt();return l};a.prototype.release=function(a){a=this.id2textureRef[a];void 0!==a&&(a.decRefCnt(),p.assert(0<=a.getRefCnt()))};a.prototype.getLoadingCount=function(){return Object.keys(this.loading).length};a.prototype.getIsLoaded=function(a){if(null==this.id2textureRef[a]||void 0!==this.loading[a])return!1;for(var c=0;c<this._queue.length;++c)if(this._queue[c][0]===a)return!1;return!0};a.prototype.addTextureListener=function(a){p.assert(-1===this.listeners.indexOf(a));this.listeners.push(a)};
a.prototype.removeTextureListener=function(a){a=this.listeners.indexOf(a);p.assert(-1!==a);this.listeners.splice(a,1)};a.prototype.getTexture=function(a){return this.textures[a]};a.prototype.getMaxAnisotropy=function(){return this.maxAnisotropy};a.prototype._unload=function(a){var c=this.id2textureRef[a];void 0!==c&&(c.getGLTexture().dispose(),delete this.id2textureRef[a]);this.next(a)};a.prototype._createGLTextureDescription=function(a){return{target:3553,pixelFormat:6408,dataType:5121,maxAnisotropy:this.afExt&&
a.params&&a.params.mipmap&&!a.params.disableAnisotropy?this.maxAnisotropy:void 0,wrapMode:a.params&&a.params.wrapClamp?33071:void 0}};a.prototype.next=function(a){if(a in this.loading){delete this.loading[a];var c=Object.keys(this.id2textureRef),b=Object.keys(this.loading);this.listeners.forEach(function(e){e(a,c,b)});this.processQueue()}};a.prototype._loadImage=function(a,c,b){var e=this;p.assert(null==this.loading[a]);this.loading[a]=!0;var f=this.textures[a];p.assert(void 0!==f);setTimeout(function(){var g=
e.id2textureRef[a];g&&g.getRefCnt()&&f.initializeThroughUpload(e._rctx,c,e._programRepository,e.getViewportToRestore(),function(c){e.next(a);e._needsRender=!0;g&&g.getRefCnt()&&(g.setGLTexture(c),b&&b(g))})},0)};a.prototype.processQueue=function(){for(var a=[],c=0;c<this._queue.length;++c){var b=this._queue[c][0],e=this.id2textureRef[b];void 0!==e&&(0===e.getRefCnt()?(e.getGLTexture().dispose(),delete this.id2textureRef[b]):a.push(this._queue[c]))}this._queue=a;a=Math.min(this.NUM_PARALLEL-Object.keys(this.loading).length,
this._queue.length);for(c=0;c<a;++c)this._loadImage(this._queue[c][0],this._queue[c][1],this._queue[c][2]);this._queue.splice(0,a)};return a}()})},"esri/views/webgl/Texture":function(){define(["require","exports"],function(a,h){a=function(){function a(m,f,e){this._glName=this._context=null;this._id=-1;this._desc=void 0;this._wrapModeDirty=this._samplingModeDirty=!1;this._context=m;this._desc={pixelFormat:f.pixelFormat,dataType:f.dataType,target:f.target?f.target:3553,samplingMode:f.samplingMode?f.samplingMode:
9729,wrapMode:f.wrapMode?f.wrapMode:10497,maxAnisotropy:f.maxAnisotropy,flipped:void 0!==f.flipped?f.flipped:!1,hasMipmap:void 0!==f.hasMipmap?f.hasMipmap:!1,level:void 0!==f.level?f.level:0,unpackAlignment:f.unpackAlignment?f.unpackAlignment:4,width:f.width,height:f.height};this._id=++a._nextId;this.setData(e)}Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,
configurable:!0});Object.defineProperty(a.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._context&&this._glName&&(this._context.gl.deleteTexture(this._glName),this._glName=null)};a.prototype.resize=function(a,f){var e=this._desc;if(e.width!==a||e.height!==f)e.width=a,e.height=f,this.setData(null)};a.prototype.setData=function(m){var f=this._context.gl;this._glName||(this._glName=f.createTexture());void 0===m&&(m=null);
null===m&&(this._desc.width=this._desc.width||4,this._desc.height=this._desc.height||4);var e=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var l=this._desc;a._validateTexture(l);f.pixelStorei(f.UNPACK_ALIGNMENT,l.unpackAlignment);f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,l.flipped?1:0);m instanceof ImageData||m instanceof HTMLImageElement||m instanceof HTMLCanvasElement||m instanceof HTMLVideoElement?(l.width&&l.height&&console.assert(m.width===l.width&&m.height===l.height),f.texImage2D(f.TEXTURE_2D,
l.level,l.pixelFormat,l.pixelFormat,l.dataType,m),void 0===this._desc.width&&(this._desc.width=m.width),void 0===this._desc.height&&(this._desc.height=m.height)):(null!=l.width&&null!=l.height||console.error("Width and height must be specified!"),f.texImage2D(f.TEXTURE_2D,l.level,l.pixelFormat,l.width,l.height,0,l.pixelFormat,l.dataType,m));l.hasMipmap&&this.generateMipmap();a._applySamplingMode(f,this._desc);a._applyWrapMode(f,this._desc);a._applyAnisotropicFilteringParameters(this._context,this._desc);
this._context.bindTexture(e,0)};a.prototype.updateData=function(a,f,e,l,g,c){c||console.error("An attempt to use uninitialized data!");this._glName||console.error("An attempt to update uninitialized texture!");var b=this._context.gl,m=this._desc,h=this._context.getBoundTexture(0);this._context.bindTexture(this,0);(0>f||0>e||l>m.width||g>m.height||f+l>m.width||e+g>m.height)&&console.error("An attempt to update out of bounds of the texture!");c instanceof ImageData||c instanceof HTMLImageElement||c instanceof
HTMLCanvasElement||c instanceof HTMLVideoElement?(console.assert(c.width===l&&c.height===g),b.texSubImage2D(b.TEXTURE_2D,a,f,e,m.pixelFormat,m.dataType,c)):b.texSubImage2D(b.TEXTURE_2D,a,f,e,l,g,m.pixelFormat,m.dataType,c);this._context.bindTexture(h,0)};a.prototype.generateMipmap=function(){var m=this._desc;m.hasMipmap||(m.hasMipmap=!0,a._validateTexture(m));9729===m.samplingMode?(this._samplingModeDirty=!0,m.samplingMode=9985):9728===m.samplingMode&&(this._samplingModeDirty=!0,m.samplingMode=9984);
m=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var f=this._context.gl;f.generateMipmap(f.TEXTURE_2D);this._context.bindTexture(m,0)};a.prototype.setSamplingMode=function(m){m!==this._desc.samplingMode&&(this._desc.samplingMode=m,a._validateTexture(this._desc),this._samplingModeDirty=!0)};a.prototype.setWrapMode=function(m){m!==this._desc.wrapMode&&(this._desc.wrapMode=m,a._validateTexture(this._desc),this._wrapModeDirty=!0)};a.prototype.applyChanges=function(){var m=this._context.gl,
f=this._desc;this._samplingModeDirty&&(a._applySamplingMode(m,f),this._samplingModeDirty=!1);this._wrapModeDirty&&(a._applyWrapMode(m,f),this._wrapModeDirty=!1)};a._isPowerOfTwo=function(a){return 0===(a&a-1)};a._validateTexture=function(m){(0>m.width||0>m.height)&&console.error("Negative dimension parameters are not allowed!");a._isPowerOfTwo(m.width)&&a._isPowerOfTwo(m.height)||(33071!==m.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),m.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))};
a._applySamplingMode=function(a,f){var e=f.samplingMode;if(9985===e||9987===e)e=9729;else if(9984===e||9986===e)e=9728;a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,e);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,f.samplingMode)};a._applyWrapMode=function(a,f){a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,f.wrapMode);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,f.wrapMode)};a._applyAnisotropicFilteringParameters=function(a,f){if(null!=f.maxAnisotropy){var e=a.extensions.textureFilterAnisotropic;
e&&(a=a.gl,a.texParameterf(a.TEXTURE_2D,e.TEXTURE_MAX_ANISOTROPY_EXT,f.maxAnisotropy))}};return a}();a._nextId=0;return a})},"esri/views/webgl/enums":function(){define(["require","exports"],function(a,h){h.BASE_TEXTURE_UNIT=33984})},"esri/views/3d/webgl-engine/lib/GLMaterialRep":function(){define(["require","exports","./Util"],function(a,h,p){var m=function(){function a(a){this.refCnt=0;this.glMaterial=a}a.prototype.incRefCnt=function(){++this.refCnt};a.prototype.decRefCnt=function(){--this.refCnt;
p.assert(0<=this.refCnt)};a.prototype.getRefCnt=function(){return this.refCnt};a.prototype.getGLMaterial=function(){return this.glMaterial};return a}();return function(){function a(a,f){this.textureRep=a;this.programRep=f;this.id2glMaterialRef={}}a.prototype.aquire=function(a){return this.aquireExt(a,"color")};a.prototype.aquireDepthShadowMap=function(a){return this.aquireExt(a,"depthShadowMap")};a.prototype.aquireDepth=function(a){return this.aquireExt(a,"depth")};a.prototype.aquireNormal=function(a){return this.aquireExt(a,
"normal")};a.prototype.aquireHighlight=function(a){return this.aquireExt(a,"highlight")};a.prototype.aquireExt=function(a,f){var e;e=a.getId()+"_"+f;var c=this.id2glMaterialRef[e];null==c?(a=(c=a.getGLMaterials()[f])?new c(a,this.programRep,this.textureRep):void 0,c=new m(a),this.id2glMaterialRef[e]=c):a=c.getGLMaterial();c.incRefCnt();a&&this.increaseProgramReferences(a);return a};a.prototype.release=function(a){this.releaseExt(a,"color")};a.prototype.releaseDepth=function(a){this.releaseExt(a,"depth")};
a.prototype.releaseNormal=function(a){this.releaseExt(a,"normal")};a.prototype.releaseDepthShadowMap=function(a){this.releaseExt(a,"depthShadowMap")};a.prototype.releaseHighlight=function(a){this.releaseExt(a,"highlight")};a.prototype.releaseExt=function(a,f){a=a+"_"+f;f=this.id2glMaterialRef[a];f.decRefCnt();if(0===f.getRefCnt()){if(f=f.getGLMaterial())this.decreaseProgramReferences(f),void 0!==f.dispose&&f.dispose();delete this.id2glMaterialRef[a]}};a.prototype.updateMaterialParameters=function(a){var e=
this.id2glMaterialRef[a+"_color"];e&&e.getGLMaterial()&&this.updateParamsForMat(e.getGLMaterial());(e=this.id2glMaterialRef[a+"_depth"])&&e.getGLMaterial()&&this.updateParamsForMat(e.getGLMaterial());(e=this.id2glMaterialRef[a+"_depthShadowMap"])&&e.getGLMaterial()&&this.updateParamsForMat(e.getGLMaterial());(e=this.id2glMaterialRef[a+"_normal"])&&e.getGLMaterial()&&this.updateParamsForMat(e.getGLMaterial());(a=this.id2glMaterialRef[a+"_highlight"])&&a.getGLMaterial()&&this.updateParamsForMat(a.getGLMaterial())};
a.prototype.updateParamsForMat=function(a){a.updateParameters&&a.updateParameters()};a.prototype.increaseProgramReferences=function(a){if(a.getAllPrograms){a=a.getAllPrograms();for(var e=0;e<a.length;e++)this.programRep.increaseRefCount(a[e])}else this.programRep.increaseRefCount(a.getProgram())};a.prototype.decreaseProgramReferences=function(a){if(a.getAllPrograms){a=a.getAllPrograms();for(var e=0;e<a.length;e++)this.programRep.decreaseRefCount(a[e])}else this.programRep.decreaseRefCount(a.getProgram())};
return a}()})},"esri/views/3d/webgl-engine/lib/ShaderSnippets":function(){define(["require","exports","./Util","dojox/xml/parser"],function(a,h,p,m){return function(){function a(){var a=p.VertexAttrConstants,f;for(f in a)this[a[f]]=p.VertexAttrConstants[f]}a.prototype._parse=function(a){a=m.parse(a).getElementsByTagName("snippet");for(var e=/\$[a-zA-Z0-9]+[ \t]*/,f=/[\$\s]+/g,c=0;c<a.length;c++){var b=a[c].getAttribute("name");p.assert(null==this[b]);for(var h=a[c].textContent,x=void 0;null!==(x=
h.match(e));){var y=this[x[0].replace(f,"")];p.assert(void 0!==y);h=h.replace(x[0],y)}this[b]=h}};return a}()})},"dojox/xml/parser":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(a){a.getObject("xml.parser",!0,dojox);dojox.xml.parser.parse=function(h,p){var m=a.doc,f;p=p||"text/xml";if(h&&a.trim(h)&&"DOMParser"in a.global){f=(new DOMParser).parseFromString(h,p);h=f.documentElement;if("parsererror"==h.nodeName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"==
h.namespaceURI){if(m=h.getElementsByTagNameNS("http://www.mozilla.org/newlayout/xml/parsererror.xml","sourcetext")[0])m=m.firstChild.data;throw Error("Error parsing text "+h.firstChild.data+" \n"+m);}return f}if("ActiveXObject"in a.global){m=function(a){return"MSXML"+a+".DOMDocument"};m=["Microsoft.XMLDOM",m(6),m(4),m(3),m(2)];a.some(m,function(a){try{f=new ActiveXObject(a)}catch(g){return!1}return!0});if(h&&f&&(f.async=!1,f.loadXML(h),h=f.parseError,0!==h.errorCode))throw Error("Line: "+h.line+"\nCol: "+
h.linepos+"\nReason: "+h.reason+"\nError Code: "+h.errorCode+"\nSource: "+h.srcText);if(f)return f}else if(m.implementation&&m.implementation.createDocument){if(h&&a.trim(h)&&m.createElement){p=m.createElement("xml");p.innerHTML=h;var e=m.implementation.createDocument("foo","",null);a.forEach(p.childNodes,function(a){e.importNode(a,!0)});return e}return m.implementation.createDocument("","",null)}return null};dojox.xml.parser.textContent=function(h,p){if(1<arguments.length)return dojox.xml.parser.replaceChildren(h,
(h.ownerDocument||a.doc).createTextNode(p)),p;if(void 0!==h.textContent)return h.textContent;var m="";h&&a.forEach(h.childNodes,function(a){switch(a.nodeType){case 1:case 5:m+=dojox.xml.parser.textContent(a);break;case 3:case 2:case 4:m+=a.nodeValue}});return m};dojox.xml.parser.replaceChildren=function(h,p){var m=[];a.isIE&&a.forEach(h.childNodes,function(a){m.push(a)});dojox.xml.parser.removeChildren(h);a.forEach(m,a.destroy);a.isArray(p)?a.forEach(p,function(a){h.appendChild(a)}):h.appendChild(p)};
dojox.xml.parser.removeChildren=function(a){for(var h=a.childNodes.length;a.hasChildNodes();)a.removeChild(a.firstChild);return h};dojox.xml.parser.innerXML=function(a){return a.innerXML?a.innerXML:a.xml?a.xml:"undefined"!=typeof XMLSerializer?(new XMLSerializer).serializeToString(a):null};return dojox.xml.parser})},"esri/views/3d/webgl-engine/lib/GLSLShaderRep":function(){define(["require","exports","./Util"],function(a,h,p){return function(){function a(){this.shaders={}}a.prototype.add=function(a,
e){p.assert(null==this.shaders[a]);this.shaders[a]=e};a.prototype.get=function(a){p.assert(void 0!==this.shaders[a]);return this.shaders[a]};return a}()})},"esri/views/3d/webgl-engine/lib/TextureRenderer":function(){define("require exports ./Renderer ./Camera ./Util ./gl-matrix ../materials/internal/TexOnlyGLMaterial ../../../webgl/Texture ../../../webgl/FramebufferObject ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Util ../../../webgl/enums ./DefaultVertexBufferLayouts ./DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u){var r=e.vec3d,n=e.vec4d,w=e.mat4d;a=function(){function a(b,a,d,c,e,f){this._acquiredTextures={};this._clearColor=n.createFrom(0,0,0,0);this._id2origin={};this._rctx=b;this._canvas=a;this._programRep=d;this._materialRep=c;this._textureRep=e;this._modelDirtySet=f;this._renderer=new p(d,c,e,this._rctx,!0);this._renderer.setLightingData({ambient:[1,1,1,1],diffuse:[0,0,0,0],specular:[0,0,0,0],direction:[0,-1,0]})}a.prototype.dispose=function(){for(var b in this._acquiredTextures)this._acquiredTextures[b].fbo.dispose(),
this._textureRep.release(b);this._acquiredTextures=null;this._renderer.dispose();this._renderer=null};a.prototype.addRenderGeometries=function(b){var a=this;b.forEach(function(b){null==b.origin&&(b.origin=a.getOrigin(b.center,b.bsRadius))});this._renderer.modify(b,[])};a.prototype.removeRenderGeometries=function(b){this._renderer.modify([],b)};a.prototype.updateRenderGeometries=function(b,a){b=b.map(function(b){return{renderGeometry:b,updateType:a}});this._renderer.modify([],[],b,{})};a.prototype.updateRenderOrder=
function(b){0<Object.keys(b).length&&this._renderer.modifyRenderOrder(b)};a.prototype.setBackgroundColor=function(b){this._clearColor=b};a.prototype.isEmpty=function(){return this._renderer.isEmpty()};a.prototype.processDirtyMaterials=function(){var b=this._modelDirtySet.getDirtyMaterials();b&&this._renderer.modify([],[],[],b);this._modelDirtySet.clearDirtyMaterials()};a.prototype.draw=function(b,a){this.processDirtyMaterials();var e=b.id.toString(),f,n=this._rctx,g=n.gl;if(this._acquiredTextures[e])f=
this._acquiredTextures[e].fbo;else{f=this._textureRep.aquire(e).getGLTexture();f=c.createWithAttachments(this._rctx,f,{colorTarget:0,depthStencilTarget:0});var l=Object.keys(this._acquiredTextures).length;this._acquiredTextures[e]={texture:b,fbo:f,idx:l}}b=a.width;l=a.height;if(f.width!==b||f.height!==l)f.resize(b,l),f.colorTexture.setSamplingMode(9729);A.near=1;A.far=1E4;n.bindFramebuffer(f);n.setDepthTestEnabled(!1);n.setBlendFunctionSeparate(770,771,1,771);n.setClearColor.apply(n,this._clearColor);
n.clear(g.COLOR_BUFFER_BIT);this._renderer.setPixelRatio(a.pixelRatio||1);for(g=0;g<a.views.length;g++)f=a.views[g],A.viewport=f.viewport,w.ortho(0,f.extent[2]-f.extent[0],0,f.extent[3]-f.extent[1],A.near,A.far,A.projectionMatrix),w.identity(A.viewMatrix),w.translate(A.viewMatrix,[-f.extent[0],-f.extent[1],0]),A.setGLViewport(this._rctx),d&&this._drawTestTexture(b,l,k[this._acquiredTextures[e].idx%k.length]),this._renderer.render(A,v);n.setDepthTestEnabled(!0);n.setBlendFunctionSeparate(770,771,1,
771);n.bindFramebuffer(null);n.setViewport(0,0,this._canvas.width,this._canvas.height)};a.prototype._drawTestTexture=function(a,d,c){var e=this._rctx,f=e.gl;if(!this._testPatternMat){for(var k=new Uint8Array(a*d*4),n=0,m=0;m<d;m++)for(var h=0;h<a;h++){var r=Math.floor(h/10),v=Math.floor(m/10);2>r||2>v||10*r>a-20||10*v>d-20?(k[n++]=255,k[n++]=255,k[n++]=255,k[n++]=255):(k[n++]=255,k[n++]=255,k[n++]=255,r&1&&v&1?k[n++]=h&1^m&1?0:255:k[n++]=r&1^v&1?0:128)}a=new g(e,{target:3553,pixelFormat:6408,dataType:5121,
samplingMode:9728,width:a,height:d},k);this._testPatternMat=new l(this._programRep,a,[1,1,1,1],!0,f.ALWAYS);this._testPatternBindParams={proj:w.identity(),view:w.identity(),nearFar:[-1,1],origin:[0,0,0]};f=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,-1,1,0,0,1,1,1,0,1,1]);this._quadVAO=new b(e,u.Default3D,{geometry:t.Pos3Tex},{geometry:q.createVertex(e,35044,f)})}this._testPatternMat.setColor([c[0],c[1],c[2],1]);this._testPatternMat.bind(e,this._testPatternBindParams);this._testPatternMat.bindView(e,
this._testPatternBindParams);e.bindVAO(this._quadVAO);e.drawArrays(5,0,x.vertexCount(this._quadVAO,"geometry"));this._testPatternMat.release(e)};a.prototype.getOrigin=function(b,a){var d=0;a=10*a/1E4;1<a&&(d=Math.ceil(f.logWithBase(a,2)));a=1E4*Math.pow(2,d);var c=Math.round(b[0]/a),e=Math.round(b[1]/a);b=Math.round(b[2]/a);var d=d+"_"+c+"_"+e+"_"+b,k=this._id2origin[d];null==k&&(k={vec3:r.createFrom(c*a,e*a,b*a),id:d},this._id2origin[d]=k);return k};return a}();var d=!1,k=[[1,.5,.5],[.5,.5,1],[.5,
1,.5]],v={get:function(){return!0}},A=new m;return a})},"esri/views/3d/webgl-engine/lib/Renderer":function(){define("require exports ./IntervalUtilities ./ModelDirtyTypesTs ./Float32ArrayList ./InstanceBufferData ./Lighting ../materials/internal/SimpleGLMaterial ./LinearDepthTextureHelper ./NormalTextureHelper ./HighlightTextureHelper ./RenderPass ./RenderSlot ./RenderContext ./ExternalRendererContainer ./StencilRenderingHelper ./BitSet ./Util ./gl-matrix ./ComponentUtils ../../../webgl/Texture ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Util ./FxaaRenderPass ./SmaaRenderPass ../../../webgl/enums ./DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u,r,n,w,d,k,v,A,z,D,B,C,F,K){var M=w.assert,E=w.array2object,V=w.objectEmpty,P=w.getFirstObjectValue,I=w.setMatrixTranslation3;a=d.vec2d;var J=d.vec4d,Q=d.mat4d,S=w.VertexAttrConstants,ga=Q.identity();w=function(){function a(a,d,e,f,k){this._lighting=new l;this._mat2dataMerged={};this._mat2dataInstanced={};this._renderOrder=[];this._externalRenderers=new u;this._renderContext=new t;this._framesRendered=0;this._isRendering=!1;this._pixelRatio=1;this._threshold=
1535;this._needsRender=!0;this._stats=new L;this.ssaoEnabled=!1;this.renderOptions={antialiasing:"smaa",earlyOcclusionPixelDraw:!1};this._programRep=a;this._materialRep=d;this._textureRep=e;this._orderedRendering=k;this._rctx=f;d=f.gl;this._fxaaPass=new B(f);this._smaaPass=new C(f);this._selectionMaterial=new g(a,J.createFrom(.1,.2,.9,.4),d.EQUAL);this._selectionMaterialLines=new g(a,J.createFrom(.1,.2,.9,.4),d.EQUAL,d.LINES);this._renderContext.lightingData=this._lighting.get();f.setDepthTestEnabled(!0);
f.setFaceCullingEnabled(!0);f.setBlendingEnabled(!1);f.setBlendFunctionSeparate(770,771,1,771);this._bindParameters={view:null,proj:null,viewInvTransp:null,nearFar:null,lightingData:null,viewport:null,framebufferTex:null,shadowMap:null,origin:null,pixelRatio:null,instanceParameters:null,depthFBO:null,normalFBO:null,extensions:{angleInstancedArrays:f.extensions.angleInstancedArrays}};this._linearDepthTextureHelper=new c(f);this._normalTextureHelper=new b(f);this._highlightTextureHelper=new q(f);this._stencilRenderingHelper=
new r(f);this._initializeFramebufferTexture()}a.prototype._initializeFramebufferTexture=function(){var b=this._rctx.gl,b=this._rctx.contextAttributes.alpha?b.RGBA:b.RGB,a=new v(this._rctx,{target:3553,pixelFormat:b,dataType:5121,samplingMode:9728,wrapMode:33071,width:4,height:4});this._framebuffer={format:b,texture:a,copied:!1}};a.prototype.dispose=function(){for(var b in this._mat2dataMerged){this._releaseMaterials(b);var a=this._mat2dataMerged[b],d;for(d in a.origin2data)a.origin2data[d].vao.dispose(!0)}this._mat2dataMerged=
null;for(b in this._mat2dataInstanced)for(d in this._releaseMaterials(b),a=this._mat2dataInstanced[b],a.origin2data)a.origin2data[d].vao.dispose(!0);this._mat2dataInstanced=null;this._framebuffer.texture.dispose();this._framebuffer.texture=null;this._linearDepthTextureHelper.getEnableState()&&this._linearDepthTextureHelper.disable();this._normalTextureHelper.getEnableState()&&this._normalTextureHelper.disable();this._highlightTextureHelper.getEnableState()&&this._highlightTextureHelper.setEnableState(!1);
this._stencilRenderingHelper.getEnableState()&&this._stencilRenderingHelper.setEnableState(!1)};a.prototype.setLightingData=function(b){this._lighting.set(b);this._needsRender=!0};a.prototype.getLightingData=function(){return this._lighting.get()};a.prototype.setPixelRatio=function(b){this._pixelRatio=b;this._needsRender=!0};a.prototype.getPixelRatio=function(){return this._pixelRatio};a.prototype.addExternalRenderer=function(b,a){this._externalRenderers.addRenderer(b,a);return!0};a.prototype.removeExternalRenderer=
function(b){this._externalRenderers.removeRenderer(b);return!0};a.prototype.getExternalRenderers=function(){return this._externalRenderers};a.prototype.resetNeedsRender=function(){this._needsRender=!1;this._externalRenderers.resetNeedsRender()};a.prototype.needsRender=function(){return this._needsRender||this._externalRenderers.needsRender()};a.prototype.getCombinedStats=function(){this._stats.VBOallocatedSize=0;this._stats.VBOoptimalSize=0;this._stats.VBOusedSize=0;for(var b in this._mat2dataInstanced){var a=
this._mat2dataInstanced[b],d;for(d in a.origin2data){var c=a.origin2data[d];this._stats.VBOallocatedSize+=c.buffer.getArray().length;this._stats.VBOusedSize+=c.buffer.getSize();this._stats.VBOoptimalSize+=c.optimalCount}}for(b in this._mat2dataMerged)for(d in a=this._mat2dataMerged[b],a.origin2data)c=a.origin2data[d],this._stats.VBOallocatedSize+=c.buffer.getArray().length,this._stats.VBOusedSize+=c.buffer.getSize(),this._stats.VBOoptimalSize+=c.optimalCount;this._stats.VBOallocatedSize*=.00390625;
this._stats.VBOusedSize*=.00390625;this._stats.VBOoptimalSize*=.00390625;return this._stats};a.prototype.setSelectionObject=function(b,a){b?(Array.isArray(b)?this._selectionIndices=this._name2indices(E(b)):this._selectionIndices=this._name2indices(E([b])),this._selectionFaceIndexRange=void 0,null!=a&&1===a.length&&(this._selectionFaceIndexRange=[[3*a[0][0],3*a[0][1]]])):this._selectionFaceIndexRange=this._selectionIndices=void 0;this._needsRender=!0};a.prototype.renderGeometrySlots=function(b){this._externalRenderers.render(y.INTERNAL_MATERIAL,
b);this._renderInternalSlot(y.STENCIL_MATERIAL,b);this._externalRenderers.render(y.OPAQUE_TERRAIN,b);this._renderInternalSlot(y.OPAQUE_MATERIAL,b);this._externalRenderers.render(y.OPAQUE_EXTERNAL,b);b.ssaoHelper&&b.ssaoHelper.bindAll(this._programRep);this._renderInternalSlot(y.TRANSPARENT_MATERIAL,b);this.renderOptions.earlyOcclusionPixelDraw&&this._renderInternalSlot(y.OCCLUSION_PIXELS,this._renderContext);this._externalRenderers.render(y.TRANSPARENT_EXTERNAL,b);b.ssaoHelper&&b.ssaoHelper.bindAll(this._programRep);
this._externalRenderers.render(y.TRANSPARENT_TERRAIN,b)};a.prototype._renderHighlights=function(b,a,d,c){var e=!!c&&c.getEnableState()&&void 0!==this._selectionIndices;this._highlightTextureHelper.setEnableState(e);e&&(this._highlightTextureHelper.setupFBOs(b),this._highlightTextureHelper.prepareHighlightPass(),this.renderGeometryPass(x.MATERIAL_HIGHLIGHT,b,a,this._selectionIndices,this._selectionFaceIndexRange),this._rctx.clear(this._rctx.gl.DEPTH_BUFFER_BIT),this._renderInternalSlot(y.OVERLAY,this._renderContext),
this._highlightTextureHelper.finish(d),a=this._highlightTextureHelper.getHighlightFBO(),c.render(b,d,a))};a.prototype._renderUnordered=function(b,a,d,c,e,f,k){var n=this._rctx;this._isRendering=!0;this._stats.reset();this._framebuffer.copied=!1;this._updateGlobalUniforms(b.projectionMatrix);this._renderContext.pass=x.MATERIAL;this._renderContext.camera=b;this._renderContext.shadowMap=d;this._renderContext.ssaoHelper=c;this._renderContext.offscreenRenderingHelper=f;this._renderContext.stencilRenderingHelper=
this._stencilRenderingHelper;this._renderContext.depth=this._linearDepthTextureHelper.getDepthFBO();this._renderContext.normals=this._normalTextureHelper.getNormalFBO();this._renderContext.highlight=this._highlightTextureHelper.getHighlightFBO();this._renderContext.visibleContent=a;this._renderContext.filterContent=null;this._renderContext.filterFaceRange=null;this._renderContext.options=this.renderOptions;this._renderContext.rctx=this._rctx;f.setEnableState(!0);f.initializeFrame(b);this._externalRenderers.render(y.BACKGROUND,
this._renderContext);this.renderGeometrySlots(this._renderContext);this._externalRenderers.render(y.POSTPROCESSING_ATMOSPHERE,this._renderContext);switch(this.renderOptions.antialiasing){case "none":d=b.viewport;d=Q.ortho(d[0],d[2],d[1],d[3],-1,1);f.drawQuad(d);this._fxaaPass.disable();this._smaaPass.disable();break;case "fxaa":this._smaaPass.disable();this._fxaaPass.render({colorTexture:f.getColorTexture()},null);break;case "smaa":this._fxaaPass.disable(),this._smaaPass.render({colorTexture:f.getColorTexture()},
null)}this.renderOptions.earlyOcclusionPixelDraw||(f.bindFramebuffer(),this._renderInternalSlot(y.OCCLUSION_PIXELS,this._renderContext));n.bindFramebuffer(null);this._renderContext.framebufferTex=f.getColorTexture();this._renderInternalSlot(y.OVERLAY,this._renderContext);this._renderHighlights(b,a,e,k);this._framesRendered++;this._isRendering=!1};a.prototype._renderOrdered=function(b,a){this._isRendering=!0;this._stats.reset();this._framebuffer.copied=!1;this._updateGlobalUniforms(b.projectionMatrix);
this._bindParameters.view=b.viewMatrix;this._bindParameters.proj=b.projectionMatrix;this._bindParameters.viewInvTransp=b.viewInverseTransposeMatrix;U[0]=b.near;U[1]=b.far;this._bindParameters.nearFar=U;this._bindParameters.lightingData=this._lighting.get();this._bindParameters.viewport=b.fullViewport;this._bindParameters.framebufferTex=this._framebuffer.texture;this._bindParameters.pixelRatio=this._pixelRatio;this._bindParameters.instanceParameters=void 0;this._bindParameters.depthFBO=this._linearDepthTextureHelper.getDepthFBO();
this._bindParameters.normalFBO=this._normalTextureHelper.getNormalFBO();b=null;for(var d=0;d<this._renderOrder.length;d++){var c=this._renderOrder[d][1];if(c.instanced){var e=c.instanced,f=e[x.MATERIAL];!f||f.isVisible&&!f.isVisible()||(this._renderInternalInstanced(e,f,this._bindParameters,Infinity,a,null,null,!1),b=null)}c.merged&&(e=c.merged,!(f=e[x.MATERIAL])||f.isVisible&&!f.isVisible()||(c=f.getProgram(),c!==b&&(c.setUniformMatrix4fv("model",ga),c.hasUniform("modelNormal")&&c.setUniformMatrix4fv("modelNormal",
ga)),b=c,this._renderInternalMerged(e,f,this._bindParameters,Infinity)))}this._framesRendered++;this._isRendering=!1};a.prototype.render=function(b,a,d,c,e,f,k){this._orderedRendering?this._renderOrdered(b,a):this._renderUnordered(b,a,d,c,e,k,f)};a.prototype.renderAuxiliaryBuffers=function(b,a,d,c,e,f){f=this.ssaoEnabled;this._linearDepthTextureHelper.setEnableState(f);f&&(this._linearDepthTextureHelper.setupFBOs(b),this._linearDepthTextureHelper.prepareDepthPass(),this.renderGeometryPass(x.MATERIAL_DEPTH,
b,a,void 0,void 0,d,c),this._linearDepthTextureHelper.finish(e));this._normalTextureHelper.setEnableState(this.ssaoEnabled);this.ssaoEnabled&&(this._normalTextureHelper.setupFBOs(b),this._normalTextureHelper.prepareNormalPass(),this.renderGeometryPass(x.MATERIAL_NORMAL,b,a,void 0,void 0,d,c),this._normalTextureHelper.finish(e));this.ssaoEnabled&&c.computeSSAO(b,e,this._linearDepthTextureHelper.getDepthFBO(),this._normalTextureHelper.getNormalFBO());c.bindAll(this._programRep)};a.prototype.renderGeometryPass=
function(b,a,d,c,e,f,k){this._isRendering=!0;this._updateGlobalUniforms(a.projectionMatrix);this._renderContext.pass=b;this._renderContext.camera=a;this._renderContext.shadowMap=f;this._renderContext.ssaoHelper=k;this._renderContext.depth=this._linearDepthTextureHelper.getDepthFBO();this._renderContext.normals=this._normalTextureHelper.getNormalFBO();this._renderContext.visibleContent=d;this._renderContext.filterContent=c;this._renderContext.filterFaceRange=e;this._renderContext.rctx=this._rctx;this.renderGeometrySlots(this._renderContext);
this._isRendering=!1};a.prototype.renderSelection=function(b){this._isRendering=!0;for(var a=0;a<y.MAX_SLOTS;++a)this._renderInternalSlot(a,b);this._isRendering=!1};a.prototype._renderInternalSlot=function(b,a){this._bindParameters.view=a.camera.viewMatrix;this._bindParameters.proj=a.camera.projectionMatrix;this._bindParameters.viewInvTransp=a.camera.viewInverseTransposeMatrix;this._bindParameters.cameraAboveGround=a.camera.aboveGround;U[0]=a.camera.near;U[1]=a.camera.far;this._bindParameters.nearFar=
U;this._bindParameters.lightingData=this._lighting.get();this._bindParameters.viewport=a.camera.fullViewport;this._bindParameters.framebufferTex=this._renderContext.offscreenRenderingHelper?this._renderContext.offscreenRenderingHelper.getColorTexture():this._framebuffer.texture;this._bindParameters.shadowMap=a.shadowMap;this._bindParameters.pixelRatio=this._pixelRatio;this._bindParameters.instanceParameters=void 0;this._bindParameters.depthFBO=this._linearDepthTextureHelper.getDepthFBO();for(var d in this._mat2dataInstanced){var c=
this._mat2dataInstanced[d],e=c[a.pass];e&&e.beginSlot(b)&&(!e.isVisible||e.isVisible())&&this._renderInternalInstanced(c,e,this._bindParameters,b,a.visibleContent,a.filterContent,a.filterFaceRange,!1)}if(a.filterContent)for(d in this._mat2dataMerged)c=this._mat2dataMerged[d],(e=c[a.pass])&&e.beginSlot(b)&&(!e.isVisible||e.isVisible())&&this._renderInternalInstanced(c,e,this._bindParameters,b,null,a.filterContent,a.filterFaceRange,!0);else{for(var c=this._programRep.getProgramsUsingUniform("model"),
e=this._programRep.getProgramsUsingUniform("modelNormal"),f=0;f<c.length;f++){var k=c[f];k.setUniformMatrix4fv("model",ga);-1<e.indexOf(k)&&k.setUniformMatrix4fv("modelNormal",ga)}for(d in this._mat2dataMerged)c=this._mat2dataMerged[d],(e=c[a.pass])&&e.beginSlot(b)&&(!e.isVisible||e.isVisible())&&this._renderInternalMerged(c,e,this._bindParameters,b)}this._stencilRenderingHelper.getEnableState()&&b===y.STENCIL_MATERIAL&&this._stencilRenderingHelper.prepareStencilDisabledPass()};a.prototype._renderInternalInstanced=
function(b,a,d,c,e,f,k,n){var g=this._rctx,l=g.gl,m=!1,h=a.getDrawMode(g),r=this._bindParameters.extensions.angleInstancedArrays,q;for(q in b.origin2data){var t=b.origin2data[q];d.origin=t.origin;c===y.STENCIL_MATERIAL&&(this._stencilRenderingHelper.setEnableState(!0),this._stencilRenderingHelper.prepareStencilWritePass());var w=!1;if(a.instanced)for(var u in t.perGeometryDataInfo){var v=t.perGeometryDataInfo[u];m||(a.bind(g,d),m=!0);g.bindVAO(v.vao);var p=a.getProgram();D.assertCompatibleVertexAttributeLocations(v.vao,
p);w||(a.bindView(g,d),w=!0);var p=v.to-v.from,x=v.refCount;h===l.TRIANGLES&&(this._stats.trianglesRendered+=x*p/3);r.drawArraysInstancedANGLE(h,v.from,p,x);this._stats.drawCallsAngleInstanced++;this._stats.instancesDrawnAngle+=x}else{var v=t.instances,A;for(A in v){var p=v[A],x=p.idx,z=p.displayedIndexRange;k&&(z=k);z&&0===z.length||e&&!e.get(x)||f&&!f.get(x)||(m||(a.bind(g,d),m=!0),w||(g.bindVAO(t.vao),a.bindView(g,d),w=!0),n||a.bindInstance(g,p),this._stats.drawCallsInstanced++,h===l.TRIANGLES&&
(this._stats.trianglesRendered+=(p.to-p.from)/3),z?this._drawArraysFaceRange(z,p.from,h):g.drawArrays(h,p.from,p.to-p.from))}}}g.bindVAO(null);m&&a.release(g,d)};a.prototype._drawArraysFaceRange=function(b,a,d){for(var c=this._rctx,e=0;e<b.length;e++){var f=b[e];c.drawArrays(d,f[0]+a,f[1]-f[0]+1)}this._stats.drawCallsFragmented+=b.length-1};a.prototype._renderInternalMerged=function(b,a,d,c){var e=this._rctx,f=e.gl,k=!1,n;for(n in b.origin2data){var g=b.origin2data[n];d.origin=g.origin;c===y.STENCIL_MATERIAL&&
(this._stencilRenderingHelper.setEnableState(!0),this._stencilRenderingHelper.prepareStencilWritePass());if(!g.displayedIndexRange||0!==g.displayedIndexRange.length){k||(a.bind(e,d),k=!0);var l=a.getProgram();e.bindVAO(g.vao);D.assertCompatibleVertexAttributeLocations(g.vao,l);a.bindView(e,d);this._stats.drawCallsMerged++;l=a.getDrawMode(e);l===f.TRIANGLES&&(this._stats.trianglesRendered+=g.vao.vertexBuffers.geometry.size/3);g.displayedIndexRange?this._drawArraysFaceRange(g.displayedIndexRange,0,
l):e.drawArrays(l,0,D.vertexCount(g.vao,"geometry"))}}k&&a.release(e,d)};a.prototype._updateGlobalUniforms=function(b){for(var a=this._programRep.getProgramsUsingUniform("proj"),d=0;d<a.length;d++)a[d].setUniformMatrix4fv("proj",b);if(this._lighting)for(a=this._programRep.getProgramsUsingUniform("lightDirection"),d=0;d<a.length;d++)this._lighting.setUniforms(a[d])};a.prototype.print=function(){var b=Object.keys(this._mat2dataMerged).length,a=Object.keys(this._mat2dataInstanced).length;console.log("number of materials (merged/instanced): "+
b+"/"+a);var b=0,d;for(d in this._mat2dataMerged){var a=this._mat2dataMerged[d],c;for(c in a.origin2data)b+=Object.keys(a.origin2data[c].instances).length}var e=0;for(d in this._mat2dataInstanced)for(c in a=this._mat2dataInstanced[d],a.origin2data)e+=Object.keys(a.origin2data[c].instances).length;console.log("number of instances (merged/instanced): "+b+"/"+e)};a.prototype.isEmpty=function(){for(var b in this._mat2dataInstanced){var a=this._mat2dataInstanced[b],d;for(d in a.origin2data)if(!V(a.origin2data[d].instances))return!1}for(b in this._mat2dataMerged)for(d in a=
this._mat2dataMerged[b],a.origin2data)if(!V(a.origin2data[d].instances))return!1;return!0};a.prototype.modify=function(b,a,d,c){this._isRendering&&console.warn("Renderer.modify called while rendering");var e=[],f=[];this._mergedOrInstanced(b,e,f);b=[];var k=[];this._mergedOrInstanced(a,b,k);a={};d&&this._performUpdates(d,a);d=[];this._modifyMerged(e,b,d,a);this._modifyInstanced(f,k,d);this._updateMergedFaceranges(a);this._releaseMaterials(d);this._modifyMaterials(c);this._needsRender=!0};a.prototype._isInstanced=
function(b){var a=!1,d=P(b.data.faces.indices).length,a=(a=(a=a||!1===b.material.canBeMerged)||b.material.instanced)||b.material.isBackdrop;return b.singleUse?a:a=a||d>this._threshold};a.prototype._mergedOrInstanced=function(b,a,d){for(var c=0;c<b.length;++c)1>P(b[c].data.faces.indices).length||(this._isInstanced(b[c])?d.push(b[c]):a.push(b[c]))};a.prototype._performUpdates=function(b,a){for(var d=0;d<b.length;d++){var c=b[d],e=c.renderGeometry,f=this._isInstanced(e),c=c.updateType;c&2&&this._updateFaceranges(e,
f,a);c&4||!f&&c&16?this._updateVertexAttributes(e,f):f&&c&16?this._updateInstanceTransformation(e,f):c&8&&this._updateColorAttributes(e)}};a.prototype._updateFaceranges=function(b,a,d){var c=b.material.getId(),e=b.origin.id,f=(a?this._mat2dataInstanced:this._mat2dataMerged)[c].origin2data[e],n=f.instances[b.uniqueName];n&&(n.displayedIndexRange=k.generateVisibleIndexRanges(b.instanceParameters.componentVisibilities,b.componentOffsets),a||(d[this._modifiedMergedFacerangesKey(c,e)]=f))};a.prototype._updateMergedFaceranges=
function(b){for(var a in b){var d=b[a];d.displayedIndexRange=[];var c=d.instances,e=!0,f;for(f in c){var k=c[f];k.displayedIndexRange?(d.displayedIndexRange.push.apply(d.displayedIndexRange,p.offsetIntervals(k.displayedIndexRange,k.from)),e=!1):d.displayedIndexRange.push([k.from,k.to-1])}d.displayedIndexRange=e?null:p.mergeIntervals(d.displayedIndexRange)}};a.prototype._updateVertexAttributes=function(b,a){var d=b.material,c=d.getId(),c=(a?this._mat2dataInstanced:this._mat2dataMerged)[c].origin2data[b.origin.id],
e=c.instances[b.uniqueName],f,k;a||(f=b.origin.vec3,I(T,-f[0],-f[1],-f[2]),Q.multiply(T,b.transformation,N),Q.inverse(N,Z),Q.transpose(Z),f=N,k=Z);a=D.getStride(d.getVertexBufferLayout());var n=a/4;M(e.from+d.getOutputAmount(P(b.data.faces.indices).length)/n===e.to,"material VBO layout has changed");d.fillInterleaved(b.data,f,k,b.instanceParameters,c.buffer.getArray(),e.from*n);c.vao.vertexBuffers.geometry.setSubData(c.buffer.getArray(),e.from*a,e.from*a,e.to*a)};a.prototype._updateInstanceTransformation=
function(b,a){var d=b.origin.vec3,c=(a?this._mat2dataInstanced:this._mat2dataMerged)[b.material.getId()].origin2data[b.origin.id];a=c.instances[b.uniqueName];I(T,-d[0],-d[1],-d[2]);Q.multiply(T,b.transformation,a.transformation);Q.inverse(a.transformation,a.transformationNormal);Q.transpose(a.transformationNormal,a.transformationNormal);d=c.perGeometryDataInfo[b.data.id];if(c=d.instanceBufferData)b=c.getSlot(b.idx),c.fill(b,0,a.transformation),c.fill(b,16,a.transformationNormal),b=4*c.getOffset(b),
a=D.getStride(d.vao.layout.instance),d.vao.vertexBuffers.instance.setSubData(c.getArray(),b,b,b+a)};a.prototype._updateColorAttributes=function(b){var a=b.material,d=a.getId(),c=b.origin.id,d=(this._isInstanced(b)?this._mat2dataInstanced:this._mat2dataMerged)[d].origin2data[c],c=d.instances[b.uniqueName],e={};e[S.COLOR]=!0;var f=D.getStride(a.getVertexBufferLayout())/4;M(c.from+a.getOutputAmount(P(b.data.faces.indices).length)/f===c.to,"material VBO layout has changed");a.fillInterleaved(b.data,void 0,
void 0,b.instanceParameters,d.buffer.getArray(),c.from*f,e);d.vao.vertexBuffers.geometry.setSubData(d.buffer.getArray(),c.from*f*4,c.from*f*4,c.to*f*4)};a.prototype._modifyMerged=function(b,a,d,c){var e=this._rctx;b=this._compMat2delta(b,a,!1);for(var n in b){a=b[n];for(var g in a){var l=a[g],m=l.optimalCount,h=l.material,r=h.getVertexBufferLayout(),q=D.getStride(r)/4,t=this._mat2dataMerged[n];if(null==t){M(0<m);var w=h.getRenderPriority(),t={origin2data:{}};t[x.MATERIAL]=this._materialRep.aquire(h);
t[x.MATERIAL_DEPTH_SHADOWMAP]=this._materialRep.aquireDepthShadowMap(h);t[x.MATERIAL_NORMAL]=this._materialRep.aquireNormal(h);t[x.MATERIAL_DEPTH]=this._materialRep.aquireDepth(h);t[x.MATERIAL_HIGHLIGHT]=this._materialRep.aquireHighlight(h);this._mat2dataMerged[n]=t;this._orderedRendering&&this._insertIntoRenderOrder(t,w,"merged")}w=t.origin2data[g];null==w&&(M(0<m),w={instances:{},vao:new A(e,K.Default3D,{geometry:r},{geometry:z.createVertex(e,35044)}),buffer:new f(m),optimalCount:0,origin:l.origin},
t.origin2data[g]=w);if(0<m){var r=w.buffer.getSize(),u=w.buffer.getArray(),t=m<l.sparseCount/2,v=w.buffer.resize(t?m:l.sparseCount),p=l.toRemove;if(t||v){for(var r=0,y=w.buffer.getArray(),t=0;t<p.length;++t)v=w.instances[p[t].uniqueName],w.optimalCount-=(v.to-v.from)*q,delete w.instances[p[t].uniqueName];var t={},O;for(O in w.instances)v=w.instances[O],M(null==t[v.from]),t[v.from]=v;for(var B in t){var v=t[B],E=v.from*q,H=v.to*q;y.set(u.subarray(E,H),r);v.from=r/q;r+=H-E;v.to=r/q}M(r===w.optimalCount)}else for(t=
0;t<p.length;++t)v=p[t].uniqueName,M(void 0!==w.instances[v]),E=w.instances[v].from*q,H=w.instances[v].to*q,w.buffer.erase(E,H),delete w.instances[v],w.optimalCount-=H-E;I(T,-l.origin[0],-l.origin[1],-l.origin[2]);u=l.toAdd;l=!1;for(t=0;t<u.length;++t)p=u[t],E=p.data,Q.multiply(T,p.transformation,N),Q.inverse(N,Z),Q.transpose(Z),v=r,h.fillInterleaved(E,N,Z,p.instanceParameters,w.buffer.getArray(),r),E=h.getOutputAmount(P(E.faces.indices).length),y=v+E,M(null==w.instances[p.uniqueName]),H=k.generateVisibleIndexRanges(p.instanceParameters.componentVisibilities,
p.componentOffsets),v=new R(p.name,v/q,y/q,H,void 0,void 0,p.idx),H&&(l=!0),w.instances[p.uniqueName]=v,w.optimalCount+=E,r+=E;M(w.optimalCount===m);m=new Float32Array(w.buffer.getArray().buffer,0,w.buffer.getSize());w.vao.vertexBuffers.geometry.setData(m);if(l||w.displayedIndexRange)c[this._modifiedMergedFacerangesKey(n,g)]=w}else M(0===m),w.vao.dispose(!0),w.vao=null,delete t.origin2data[g],0===Object.keys(t.origin2data).length&&(d.push(n),delete this._mat2dataMerged[n],this._orderedRendering&&
this._removeFromRenderOrder(t,"merged"))}}};a.prototype._modifyInstanced=function(b,a,d){b=this._compMat2delta(b,a,!0);a=this._rctx;for(var c in b){var n=b[c],g;for(g in n){var l=n[g];if(0===l.optimalCount)l=this._mat2dataInstanced[c],l.origin2data[g].vao.dispose(!0),delete l.origin2data[g],0===Object.keys(l.origin2data).length&&(d.push(c),delete this._mat2dataInstanced[c],this._orderedRendering&&this._removeFromRenderOrder(l,"instanced"));else{var m=l.material,h=this._mat2dataInstanced[c];if(null==
h){var r=m.getRenderPriority(),h={origin2data:{}};h[x.MATERIAL]=this._materialRep.aquire(m);h[x.MATERIAL_DEPTH_SHADOWMAP]=this._materialRep.aquireDepthShadowMap(m);h[x.MATERIAL_NORMAL]=this._materialRep.aquireNormal(m);h[x.MATERIAL_DEPTH]=this._materialRep.aquireDepth(m);h[x.MATERIAL_HIGHLIGHT]=this._materialRep.aquireHighlight(m);this._mat2dataInstanced[c]=h;this._orderedRendering&&this._insertIntoRenderOrder(h,r,"instanced")}var q=m.getVertexBufferLayout(),t=h[x.MATERIAL].instanced?m.getInstanceBufferLayout():
void 0,w=t&&D.findAttribute(t,"instanceColor"),u=t&&D.findAttribute(t,"instanceFeatureAttribute"),v=D.getStride(q)/4,r=h.origin2data[g];null==r&&(r={instances:{},vao:new A(a,K.Default3D,{geometry:q},{geometry:z.createVertex(a,35044)}),buffer:new f(l.optimalCount),optimalCount:0,perGeometryDataInfo:{},origin:l.origin},h.origin2data[g]=r);var h=r.buffer.getSize(),p=r.buffer.getArray(),y=l.optimalCount<l.sparseCount/2,O=r.buffer.resize(y?l.optimalCount:l.sparseCount),B;for(B in l.perGeometryDelta){var E=
r.perGeometryDataInfo[B];if(E&&E.instanceBufferData){var H=l.perGeometryDelta[B].removeCount;0<H&&E.instanceBufferData.prepareFree(H)}}var C=l.toRemove;if(y||O){for(y=0;y<C.length;++y){O=C[y];delete r.instances[O.uniqueName];B=O.data.id;var aa=E=r.perGeometryDataInfo[B];0===--aa.refCount&&null==l.dataId2refCount[B]?(r.optimalCount-=(aa.to-aa.from)*v,delete r.perGeometryDataInfo[B]):E.instanceBufferData&&E.instanceBufferData.free(O.idx)}var h=0,y=r.buffer.getArray(),O={},J;for(J in r.perGeometryDataInfo)aa=
r.perGeometryDataInfo[J],M(null==O[aa.from]),O[aa.from]=aa;for(var F in O)aa=O[F],H=aa.from*v,E=aa.to*v,y.set(p.subarray(H,E),h),aa.from=h/v,h+=E-H,aa.to=h/v;for(var V in r.instances)H=r.instances[V],H.from=r.perGeometryDataInfo[H.dataId].from,H.to=r.perGeometryDataInfo[H.dataId].to}else for(y=0;y<C.length;++y)O=C[y],delete r.instances[O.uniqueName],B=O.data.id,E=r.perGeometryDataInfo[B],0===--E.refCount&&null==l.dataId2refCount[B]?(H=E.from*v,E=E.to*v,r.buffer.erase(H,E),r.optimalCount-=E-H,delete r.perGeometryDataInfo[B]):
E.instanceBufferData&&E.instanceBufferData.free(O.idx);I(T,-l.origin[0],-l.origin[1],-l.origin[2]);for(B in l.perGeometryDelta)(E=r.perGeometryDataInfo[B])&&E.instanceBufferData&&(y=l.perGeometryDelta[B].addCount,0<y&&E.instanceBufferData.prepareAllocate(y));p=l.toAdd;for(y=0;y<p.length;++y){O=p[y];H=O.data;B=H.id;E=r.perGeometryDataInfo[B];null==E?(m.fillInterleaved(H,void 0,void 0,void 0,r.buffer.getArray(),h),C=m.getOutputAmount(P(H.faces.indices).length),H=h/v,h+=C,E=h/v,r.optimalCount+=C,E={refCount:1,
from:H,to:E,vao:null,instanceBufferData:null},t&&(H=D.getStride(t)/4,E.vao=new A(a,K.Default3D,{geometry:q,instance:t},{geometry:r.vao.vertexBuffers.geometry,instance:z.createVertex(a,35044)}),E.instanceBufferData=new e(H,l.perGeometryDelta[B].addCount)),r.perGeometryDataInfo[B]=E):++E.refCount;M(E.from*v<=r.buffer.getSize()&&E.to*v<=r.buffer.getSize());H=Q.create();Q.multiply(T,O.transformation,H);C=k.generateVisibleIndexRanges(O.instanceParameters.componentVisibilities,O.componentOffsets);H=new R(O.name,
E.from,E.to,C,H,O.instanceParameters,O.idx,B);if(E=E.instanceBufferData)C=E.allocate(O.idx),E.fill(C,0,H.transformation),E.fill(C,16,H.transformationNormal),w&&E.fill(C,w.offset/4,O.instanceParameters.color),u&&E.fill(C,u.offset/4,O.instanceParameters.featureAttribute);r.instances[O.uniqueName]=H}M(r.optimalCount===l.optimalCount);m=new Float32Array(r.buffer.getArray().buffer,0,r.buffer.getSize());r.vao.vertexBuffers.geometry.setData(m);for(B in r.perGeometryDataInfo)if(q=r.perGeometryDataInfo[B],
q.vao&&(m=q.vao.vertexBuffers.instance))t=l.perGeometryDelta[B],0<t.addCount+t.removeCount&&(q=q.instanceBufferData.compact(),m.setData(q))}}}};a.prototype._compMat2delta=function(b,a,d){var c={};this._updateMat2delta(b,!0,d,c);this._updateMat2delta(a,!1,d,c);return c};a.prototype._updateMat2delta=function(b,a,d,c){for(var e=0;e<b.length;++e){var f=b[e],k=f.origin,n=f.material,g=n.getId(),l=d?this._mat2dataInstanced[g]:this._mat2dataMerged[g],l=l&&l.origin2data[k.id],m=c[g];null==m&&(m={},c[g]=m);
g=m[k.id];if(null==g){g={optimalCount:null==l?0:l.optimalCount,sparseCount:null==l?0:l.buffer.getSize(),material:n,toAdd:[],toRemove:[],perGeometryDelta:null,origin:k.vec3};if(d){var h={};if(void 0!==l)for(var r in l.perGeometryDataInfo)h[r]=l.perGeometryDataInfo[r].refCount;g.dataId2refCount=h;g.perGeometryDelta={}}m[k.id]=g}k=n.getOutputAmount(P(f.data.faces.indices).length);d?(n=f.data.id,l=g.perGeometryDelta[n],l||(l={addCount:0,removeCount:0},g.perGeometryDelta[n]=l),a?(l.addCount++,null==g.dataId2refCount[n]&&
(g.dataId2refCount[n]=0),1===++g.dataId2refCount[n]&&(g.optimalCount+=k,g.sparseCount+=k),g.toAdd.push(f)):(l.removeCount++,0===--g.dataId2refCount[n]&&(delete g.dataId2refCount[n],g.optimalCount-=k),g.toRemove.push(f))):a?(g.optimalCount+=k,g.sparseCount+=k,g.toAdd.push(f)):(g.optimalCount-=k,g.toRemove.push(f))}};a.prototype._modifiedMergedFacerangesKey=function(b,a){return b+"_"+a};a.prototype._insertIntoRenderOrder=function(b,a,d){for(var c=b[x.MATERIAL].getMaterialId(),e=this._renderOrder.length,
f=0;f<e&&this._renderOrder[f][0]>=a;){var k=this._renderOrder[f][1];if(k.id===c){M(!k[d],"matData for type already exists");k[d]=b;return}f++}c={id:c,instanced:null,merged:null};c[d]=b;this._renderOrder.splice(f,0,[a,c])};a.prototype._removeFromRenderOrder=function(b,a){var d=b[x.MATERIAL].getMaterialId();for(b=0;this._renderOrder[b][1].id!==d;)b++;d=this._renderOrder[b][1];d[a]=null;d.instanced||d.merged||this._renderOrder.splice(b,1)};a.prototype._updateRenderOrder=function(b,a){for(var d=a.length,
c=0;c<d&&a[c][1].id!==b;)c++;if(c<d){b=a[c][1];b=(b.merged||b.instanced)[x.MATERIAL].getRenderPriority();var e=a[c][0];if(b!==a[c][0])for(a[c][0]=b,e=b>e?-1:1,c+=e;-1<c&&c<d&&e*a[c][0]>e*b;){var f=a[c];a[c]=a[c-e];a[c-e]=f;c+=e}}};a.prototype._modifyMaterials=function(b){for(var a in b)this._materialRep.updateMaterialParameters(a)};a.prototype.modifyRenderOrder=function(b){if(this._orderedRendering){for(var a in b)this._updateRenderOrder(a,this._renderOrder);this._needsRender=!0}};a.prototype._releaseMaterials=
function(b){if(Array.isArray(b))for(var a=0;a<b.length;a++)this._materialRep.release(b[a]),this._materialRep.releaseDepthShadowMap(b[a]),this._materialRep.releaseNormal(b[a]),this._materialRep.releaseDepth(b[a]),this._materialRep.releaseHighlight(b[a]);else this._materialRep.release(b),this._materialRep.releaseDepthShadowMap(b),this._materialRep.releaseNormal(b),this._materialRep.releaseDepth(b),this._materialRep.releaseHighlight(b)};a.prototype._name2indices=function(b){for(var a=new n,d=0;2>d;++d){var c=
0===d?this._mat2dataMerged:this._mat2dataInstanced,e;for(e in c){var f=c[e].origin2data,k;for(k in f){var g=f[k].instances,l;for(l in g){var m=g[l];void 0!==b[m.name]&&a.set(m.idx)}}}}return a};return a}();var L=function(){function b(){this.reset()}b.prototype.reset=function(){this.VBOusedSize=this.VBOoptimalSize=this.VBOallocatedSize=this.instancesDrawnAngle=this.drawCallsFragmented=this.drawCallsMerged=this.drawCallsAngleInstanced=this.drawCallsInstanced=this.trianglesRendered=0};return b}(),R=
function(){return function(b,a,d,c,e,f,k,g){this.name=b;this.from=a;this.to=d;this.displayedIndexRange=c;this.transformation=e;this.instanceParameters=f;this.idx=k;this.dataId=g;null!=e&&(this.transformationNormal=Q.create(),Q.set(e,this.transformationNormal),Q.inverse(this.transformationNormal,this.transformationNormal),Q.transpose(this.transformationNormal,this.transformationNormal))}}(),U=a.create(),T=Q.identity(),N=Q.create(),Z=Q.create();return w})},"esri/views/3d/webgl-engine/lib/IntervalUtilities":function(){define(["require",
"exports"],function(a,h){return function(){function a(){}a.copyIntervals=function(a){for(var f=[],e=0;e<a.length;e++){var l=a[e];f.push([l[0],l[1]])}return f};a.convertFaceToIndexRange=function(a,f){for(var e=0;e<a.length;e++){var l=a[e];l[0]*=f;l[1]=l[1]*f+(f-1)}};a.sortIntervals=function(a){return a.sort(function(a,e){return a[0]===e[0]?a[1]>e[1]?1:a[1]<e[1]?-1:0:a[0]>e[0]?1:a[0]<e[0]?-1:0})};a.intersectIntervals=function(a,f){if(0>=a.length)return[];for(var e=[],l=0;l<a.length;l++){var g=a[l];
g[1]<f[0]||g[0]>f[1]||(g=[g[0],g[1]],g[0]<f[0]&&(g[0]=f[0]),g[1]>f[1]&&(g[1]=f[1]),e.push(g))}return e};a.mergeIntervals=function(a){if(0>=a.length)return[];var f=[];a=this.sortIntervals(a);f.push(a[0]);for(var e=1;e<a.length;e++){var l=f[f.length-1];l[1]+1<a[e][0]?f.push(a[e]):l[1]<a[e][1]&&(l[1]=a[e][1],f.pop(),f.push(l))}return f};a.invertIntervals=function(a,f){for(var e=[],l=0,g=0;g<a.length;g++){var c=a[g];c[0]>l&&e.push([l,c[0]-1]);l=c[1]+1}l<=f&&e.push([l,f]);return e};a.offsetIntervals=function(a,
f){for(var e=[],l=0;l<a.length;l++){var g=a[l];e.push([g[0]+f,g[1]+f])}return e};return a}()})},"esri/views/3d/webgl-engine/lib/Float32ArrayList":function(){define(["require","exports","./Util"],function(a,h,p){return function(){function a(a){null==a?a=16:65536>a&&(a=p.nextHighestPowerOfTwo(a));this.array=new Float32Array(a);this.size=0}a.prototype.resize=function(a,e){void 0===e&&(e=!1);this.size=a;var f;if(this.size>this.array.length){for(a=this.array.length||1;a<this.size;)a*=2;f=new Float32Array(a);
e&&f.set(this.array);this.array=f;return!0}if(this.size<=this.array.length/2){a=this.array.length;for(f=2*this.size;a>=f;)a=Math.floor(a/2);f=new Float32Array(a);e&&f.set(this.array.subarray(0,a));this.array=f;return!0}return!1};a.prototype.append=function(a){var e=this.size;this.resize(this.size+a.length,!0);this.array.set(a,e)};a.prototype.erase=function(a,e){for(;a<e;++a)this.array[a]=0};a.prototype.getArray=function(){return this.array};a.prototype.getSize=function(){return this.size};return a}()})},
"esri/views/3d/webgl-engine/lib/InstanceBufferData":function(){define(["require","exports","./Util"],function(a,h,p){return function(){function a(a,e){null==e&&(e=4);var f=p.nextHighestPowerOfTwo(e*a);this.array=new Float32Array(f);this.zeroItem=new Float32Array(a);this.endSlot=0;this.perInstanceDataSize=a;this.emptySlots=[];this.emptySlotsIdx=0;this.id2slot={};this.slot2id=Array(e)}a.prototype.prepareFree=function(a){this.emptySlots.length+=a};a.prototype.free=function(a){a=this.id2slot[a];null!=
a&&(this.emptySlots[this.emptySlotsIdx++]=a,this.slot2id[a]=void 0)};a.prototype.prepareAllocate=function(a){a-=this.emptySlotsIdx;0<a&&this._resizeArray((this.endSlot+a)*this.perInstanceDataSize)};a.prototype.allocate=function(a){var e;e=0<this.emptySlotsIdx?this.emptySlots[--this.emptySlotsIdx]:this.endSlot++;this.id2slot[a]=e;this.slot2id[e]=a;return e};a.prototype.getSlot=function(a){return this.id2slot[a]};a.prototype.getOffset=function(a){return a*this.perInstanceDataSize};a.prototype.getArray=
function(){return this.array};a.prototype.fill=function(a,e,l){this.array.set(l,a*this.perInstanceDataSize+e)};a.prototype.compact=function(){if(0<this.emptySlotsIdx){this.emptySlots.length=this.emptySlotsIdx;for(this.emptySlots.sort(function(a,b){return a-b});0<this.emptySlotsIdx&&this.emptySlots[this.emptySlotsIdx-1]===this.endSlot;)this.emptySlotsIdx--,this.endSlot--;for(;0<this.emptySlotsIdx;){this.emptySlotsIdx--;var a=this.endSlot-1,e=this.emptySlots[this.emptySlotsIdx],l=a*this.perInstanceDataSize,
g=e*this.perInstanceDataSize;this.array.set(this.array.subarray(l,l+this.perInstanceDataSize),g);this.array.set(this.zeroItem,l);l=this.slot2id[a];this.slot2id[a]=void 0;this.slot2id[e]=l;this.id2slot[l]=e;this.endSlot--}}this._resizeArray(this.endSlot*this.perInstanceDataSize);this.emptySlots.length=0;return this.array};a.prototype._resizeArray=function(a){var e;if(a>this.array.length){for(e=this.array.length||1;e<a;)e*=2;a=new Float32Array(e);a.set(this.array);this.array=a}else if(a<=this.array.length/
2){e=this.array.length;for(a*=2;e>=a;)e/=2;a=new Float32Array(e);a.set(this.array.subarray(0,e));this.array=a}};return a}()})},"esri/views/3d/webgl-engine/lib/Lighting":function(){define(["require","exports","./gl-matrix"],function(a,h,p){var m=p.vec3d,f=p.vec4d;return function(){function a(a,e,c,b){this.ambient=f.create(a);this.diffuse=f.create(e);this.specular=f.create(c);this.direction=m.create(b)}a.prototype.setUniforms=function(a){a.setUniform4fv("lightAmbient",this.ambient);a.setUniform4fv("lightDiffuse",
this.diffuse);a.setUniform4fv("lightSpecular",this.specular);a.setUniform3fv("lightDirection",this.direction)};a.prototype.set=function(a){a.ambient&&f.set(a.ambient,this.ambient);a.diffuse&&f.set(a.diffuse,this.diffuse);a.specular&&f.set(a.specular,this.specular);a.direction&&m.set(a.direction,this.direction)};a.prototype.get=function(){return{ambient:this.ambient,diffuse:this.diffuse,specular:this.specular,direction:this.direction}};return a}()})},"esri/views/3d/webgl-engine/materials/internal/SimpleGLMaterial":function(){define("require exports dojo/text!./SimpleGLMaterial.xml ./MaterialUtil ../../lib/RenderSlot ../../../../webgl/Program ../../../../webgl/enums ../../lib/DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g){return function(){function a(b,a,c,e){void 0===e&&(e=4);this.id=m.__GLMaterial_id++;this.program=b.get("simple");this.color=a;this.depthFunc=c;this.drawMode=e}a.prototype.getId=function(){return this.id};a.prototype.beginSlot=function(b){return b===f.INTERNAL_MATERIAL};a.prototype.getProgram=function(){return this.program};a.prototype.bind=function(b,a){b.bindProgram(this.program);this.program.setUniformMatrix4fv("model",m.IDENTITY);this.program.setUniformMatrix4fv("proj",
a.proj);this.program.setUniform4fv("color",this.color);b.setBlendingEnabled(!0);b.setBlendFunctionSeparate(b.gl.SRC_ALPHA,b.gl.ONE_MINUS_SRC_ALPHA,b.gl.ONE,b.gl.ONE_MINUS_SRC_ALPHA);b.setDepthTestEnabled(!0);void 0!==this.depthFunc&&b.setDepthFunction(this.depthFunc)};a.prototype.release=function(b){void 0!==this.depthFunc&&b.setDepthFunction(513);b.setBlendingEnabled(!1)};a.prototype.bindView=function(b,a){m.bindView(a.origin,a.view,this.program)};a.prototype.bindInstance=function(b,a){this.program.setUniformMatrix4fv("model",
a.transformation)};a.prototype.getDrawMode=function(b){return this.drawMode};a.loadShaders=function(b,a,c,f){b._parse(p);b=new e(f,b.vertexShaderSimple,b.fragmentShaderSimple,g.Default3D);c.add("simple",b)};return a}()})},"esri/views/3d/webgl-engine/materials/internal/MaterialUtil":function(){define("../../lib/IdGen ../../lib/gl-matrix ../../parts/Model ../../lib/ComponentUtils ../../lib/Util ../../../../webgl/Util".split(" "),function(a,h,p,m,f,e){var l=h.vec3d,g=h.mat4d,c=h.mat4,b=f.VertexAttrConstants,
q={};q.__Material_idGen=new a;q.__GLMaterial_id=0;q.IDENTITY=g.identity();q.fill=function(b,a,d,c,e,f){if(void 0===e||3!==f)for(e=0;e<f;++e)d[c+e]=b[a+e];else{var k=b[a],g=b[a+1];b=b[a+2];d[c]=e[0]*k+e[4]*g+e[8]*b+e[12];d[c+1]=e[1]*k+e[5]*g+e[9]*b+e[13];d[c+2]=e[2]*k+e[6]*g+e[10]*b+e[14]}return f};var x=function(b,a,d,c,e,f){for(var k=b.length,g=0;g<k;++g){for(var n=d*b[g],l=0;l<d;++l)c[e+l]=a[n+l];e+=f}};q.fillInterleaved=function(a,d,c,f,k,g,n,l){for(var m=e.getStride(k)/4,h=0;h<k.length;h++){var r=
k[h],q=n+r.offset/4,r=r.name;if(null==l||null!=l[r]){var t;switch(r){case "uv0":t=a.vertexAttr[r];null!=t&&x(a.faces.indices[r],t.data,t.size,g,q,m);break;case "region":t=a.vertexAttr[r];var r=a.faces.indices[r],w=t.data,u=t.size;t=g;var v=m;t=new Uint16Array(t.buffer);for(var q=2*q,v=2*v,p=r.length,y=0;y<p;++y){var A=u*r[y],z;for(z=0;z<u;++z)t[q+z]=w[A+z];q+=v}break;case "color":t=a.vertexAttr[r];if(f&&f.color)for(r=a.faces.indices[r],w=t.data,u=f.color,t=t.size,v=g,p=m,v=new Uint8Array(v.buffer),
q*=4,p*=4,y=r.length,A=0;A<y;++A){z=t*r[A];var D;for(D=0;D<t;++D)v[q+D]=w[z+D]*u[D];4>D&&(v[q+3]=255*u[3]);q+=p}else for(r=a.faces.indices[r],w=t.data,u=t.size,t=g,v=m,t=new Uint8Array(t.buffer),q*=4,v*=4,p=r.length,y=0;y<p;++y){A=u*r[y];for(z=0;z<u;++z)t[q+z]=w[A+z];4>z&&(t[q+3]=255);q+=v}break;default:if(t=a.vertexAttr[r],u=r===b.POSITION?d:r===b.NORMAL?c:void 0,void 0!==u&&3===t.size)for(r=a.faces.indices[r],w=t.data,t=g,v=m,p=r.length,y=0;y<p;++y)D=3*r[y],A=w[D],z=w[D+1],D=w[D+2],t[q]=u[0]*A+
u[4]*z+u[8]*D+u[12],t[q+1]=u[1]*A+u[5]*z+u[9]*D+u[13],t[q+2]=u[2]*A+u[6]*z+u[10]*D+u[14],q+=v;else x(a.faces.indices[r],t.data,t.size,g,q,m)}}}};q.triangleVertexArrayToWireframeLines=function(b,a,d,c){for(d=Math.floor(d/3)-1;0<=d;d--){var e=a+3*d*c,f=a+6*d*c+5*c;this.fill(b,e,b,f,null,c);f-=c;this.fill(b,e+c,b,f,null,c);f-=c;this.fill(b,e+c,b,f,null,c);f-=c;this.fill(b,e+2*c,b,f,null,c);f-=c;this.fill(b,e+2*c,b,f,null,c);f-=c;this.fill(b,e,b,f,null,c)}};var y=l.create(),t=l.create(),u=l.create(),
r=l.create(),n=function(b,a,d,c,e,f){var k=b.getCenter();l.project(k,d,c,y);var g=l.dist2(y,k),h=b.getBSRadius(),k=a.visibilities,q=a.offsets;if(g<h*h){var g=b.getPrimitiveIndices(),h=b.getIndices(),w=b.getPosition(),p=g?g.length:h.length/3;if(1E4<p&&(b=b.getChildren(),void 0!==b)){for(k=0;8>k;++k)void 0!==b[k]&&n(b[k],a,d,c,e,f);return}a=w.size;b=w.data;var w=d[0],v=d[1];d=d[2];var x=c[0]-w,A=c[1]-v;c=c[2]-d;for(var z=m.createVisibilityCache(),D=0;D<p;++D){var B=g?g[D]:D;if(m.lookupOffsetVisibility(k,
q,3*B,z)){var C=a*h[3*B],U=a*h[3*B+1],T=a*h[3*B+2],N=b[C],Z=b[C+1],C=b[C+2],H=b[U],O=b[U+1],U=b[U+2],aa=b[T],ba=b[T+1],T=b[T+2],X=H-N,ea=O-Z,la=U-C,ta=aa-N,ma=ba-Z,wa=T-C,na=A*wa-ma*c,sa=c*ta-wa*x,Ea=x*ma-ta*A,pa=X*na+ea*sa+la*Ea;if(!(pa>-e&&pa<e)){var pa=1/pa,qa=w-N,ua=v-Z,va=d-C,na=pa*(qa*na+ua*sa+va*Ea);0>na||1<na||(sa=ua*la-ea*va,la=va*X-la*qa,X=qa*ea-X*ua,ea=pa*(x*sa+A*la+c*X),0>ea||1<na+ea||(ta=pa*(ta*sa+ma*la+wa*X),0<=ta&&(ma=t,wa=u,pa=r,l.set3(N,Z,C,ma),l.set3(H,O,U,wa),l.set3(aa,ba,T,pa),
l.subtract(wa,ma,wa),l.subtract(pa,ma,pa),l.normalize(l.cross(wa,pa,ma)),f(ta,ma,B))))}}}}};q.intersectTriangleGeometry=function(b,a,d,c,e,k,g){d=b.getData();a={offsets:d.componentOffsets,visibilities:a.componentVisibilities};f.assert("triangle"===d.primitiveType);n(b.getBoundingInfo(0),a,e,k,c.tolerance,g)};q.basicMaterialConstructor=function(b,a){var d=!0,c=0,e=q.__Material_idGen.gen(a);b.getId=function(){return e};var k;b.getParentStage=function(){return k};b.addParentStage=function(b){f.assert(void 0===
k,"Material can only be added to a single Stage");k=b};b.removeParentStage=function(b){k=void 0};b.setVisible=function(a){d!==a&&(d=a,b.notifyDirty("matChanged"))};b.isVisible=function(){return d};b.notifyDirty=function(a){k&&k.notifyDirty(p.ContentType.MATERIAL,b,a)};b.setRenderPriority=function(b){c=b;this.notifyDirty("matChanged")};b.getRenderPriority=function(){return c}};var w=q.aquireIfNotUndefined=function(b,a,d,c){if(void 0!==b)return d.aquire(b,a,c)},d=q.releaseIfNotUndefined=function(b,
a){void 0!==b&&a.release(b)},k=c.create();q.bindView=function(b,a,d){c.translate(a,b,k);d.setUniformMatrix4fv("view",k)};q.bindCamPos=function(b,a,d){d.setUniform3f("camPos",a[3]-b[0],a[7]-b[1],a[11]-b[2])};q.basicGLMaterialConstructor=function(b,a){var d=q.__GLMaterial_id++;b.getId=function(){return d};b.getMaterialId=function(){return a.getId()};b.isVisible=function(){return a.isVisible()};b.getRenderPriority=function(){return a.getRenderPriority()}};q.singleTextureGLMaterialConstructor=function(b,
a,c,e){var f=w(c.textureId,c.initTexture,a,e);b.updateTexture=function(b){c.textureId!==b&&(d(c.textureId,a),c.textureId=b,f=w(c.textureId,c.initTexture,a,e))};b.renderTexture=function(b){(b=a.getTexture(c.textureId))&&b.dirty&&b.redraw&&b.redraw()};b.bindTexture=function(b,a){void 0!==f&&(a.setUniform1i("tex",0),b.bindTexture(f.getGLTexture()))};b.bindTextureSize=function(b,a){void 0!==f&&(b=f.getGLTexture(),a.setUniform2f("texSize",b.descriptor.width,b.descriptor.height))};b.dispose=function(){d(c.textureId,
a)}};q.multiTextureGLMaterialConstructor=function(b,a,c,e){for(var f=e.length,k=Array(f),g=0;g<f;g++)k[g]=w(c[e[g][0]],c[e[g][1]],a);b.updateTextures=function(b){for(var g=0;g<f;g++){var n=c[e[g][0]],l=b[e[g][0]];n!==l&&(d(n,a),c[e[g][0]]=l,k[g]=w(l,c[e[g][1]],a))}};b.bindTextures=function(b,a){for(var d=0;d<f;d++)void 0!==k[d]&&(a.setUniform1i(e[d][2],d),b.bindTexture(k[d].getGLTexture(),d));b.setActiveTexture(0)};b.bindOneTexture=function(b,a,d){a.setUniform1i(e[d][2],d);b.bindTexture(k[d].getGLTexture(),
d);b.setActiveTexture(0)};b.disposeTextures=function(){for(var b=0;b<f;b++)d(c[e[b][0]],a)}};q.externalColorMixModes={multiply:1,ignore:2,replace:3,tint:4};return q})},"esri/views/3d/webgl-engine/lib/IdGen":function(){define(["require","exports"],function(a,h){return function(){function a(){this._count=0}a.prototype.gen=function(a){null==a&&(a="a");return a+"_"+this._count++};return a}()})},"esri/views/3d/webgl-engine/lib/ComponentUtils":function(){define(["require","exports","../../../../core/arrayUtils"],
function(a,h,p){function m(b){void 0===b&&(b=!0);return{isVisibleBit:!b,data:new Uint32Array(0)}}function f(b,a){return l(b,a,!0)}function e(b,a){return l(b,a,!1)}function l(a,c,e){var f=!1;a=a||b;var g=a.data;c=c.length-1;var n=8*g.BYTES_PER_ELEMENT,f=g.length*n;a=e===a.isVisibleBit;if(0===g.length||0===c)f=!a;else if(f<c&&!a)f=!0;else{var l=q[n];e=q[0];for(var d=0;d<g.length-1;d++)if(f=!a&&g[d]!==l||a&&g[d]!==e)return f;f=g.length-1;c=q[(c-1)%n+1];f=!a&&(g[f]&c)!==c||a&&(g[f]&c)!==e}return f}function g(b){return 0<
b.length}function c(b,a,c,e){var f=c/e|0;return 0!==(a[f]&1<<c-f*e)===b}h.updateVisibility=function(b,a,c,e){if(c<a.length-1){null==b&&(b=m());var f=b.data,g=8*f.BYTES_PER_ELEMENT,l=c/g|0,d=c-g*l;a=(a.length-1-1)/g|0;var k=f;e=e===b.isVisibleBit;c<k.length*g||!e||(c=Math.max(l+1,Math.ceil(1.5*k.length)),c=Math.min(c,a+1),f=new Uint32Array(c),f.set(k));l<f.length&&(f[l]=f[l]&~(1<<d)|(e?1:0)<<d);b.data=f}return b};h.getVisibility=function(b,a){if(null!=b){var e=b.isVisibleBit,f=b.data,g=8*f.BYTES_PER_ELEMENT;
return a<f.length*g?c(e,f,a,g):!b.isVisibleBit}return!0};h.createVisibilityCache=function(b){void 0===b&&(b=0);return{startComponentIdx:b}};h.lookupOffsetVisibility=function(b,a,e,f){if(null==b)return!0;var g=!b.isVisibleBit;if(0<a.length&&e<a[a.length-1]){var n=b.isVisibleBit;b=b.data;var l=8*b.BYTES_PER_ELEMENT,d=b.length*l,k=f?f.startComponentIdx:null;if(!(k&&a[k]<=e&&a[k+1]>e)){var m;if(m=k)m=k+1,m=a[m]<=e&&a[m+1]>e;k=m?k+1:p.binaryIndexOf(a,e,!0)}k<d&&(g=c(n,b,k,l));f&&(f.startComponentIdx=k)}return g};
h.hideAllComponents=function(b){if(null==b)b=m(!1);else{b.isVisibleBit=!0;for(var a=0;a<b.data.length;a++)b.data[a]=0}return b};h.unhideAllComponents=function(b){var a;if(null!=b)for(a=b,a.isVisibleBit=!1,b=0;b<a.data.length;b++)a.data[b]=0;return a};h.generateVisibleIndexRanges=function(b,a){var e;if(b)if(g(a))if(0===b.data.length)e=[],a=[[a[0],a[a.length-1]-1]],e=b.isVisibleBit?e:a;else{e=[];var f=b.isVisibleBit;b=b.data;for(var l=8*b.BYTES_PER_ELEMENT,n=b.length*l,m=a.length-1,d=null,k=0;k<n&&
k<m;k++){var h=c(f,b,k,l);if(h!==d){var d=a[k],q=e[e.length-1];h?e.push([d,-1]):q&&(q[1]=d-1);d=h}}(f=e[e.length-1])&&-1===f[1]&&(f[1]=a[a.length-1]-1)}else e=[],e=b.isVisibleBit?e:null;else e=null;return e};h.defaultVisibilities=m;h.isAllVisible=function(b,a){return!e(b,a)};h.isAllHidden=function(b,a){return!f(b,a)};h.hasVisible=f;h.hasHidden=e;var b=m();h.createOffsets=function(b){return Array.isArray(b)?new Uint32Array(b):b};h.hasComponent=function(b,a){return a<b.length-1};h.hasComponents=g;var q=
[];for(a=0;65>a;a++)q.push(Math.pow(2,a)-1)})},"esri/core/arrayUtils":function(){define([],function(){function a(a,m){return-1===a.indexOf(m)}function h(a,m,f){return!a.some(m.bind(null,f))}return{findIndex:function(a,m,f){for(var e=a.length,l,g=0;g<e;g++)if(l=a[g],m.call(f,l,g,a))return g;return-1},find:function(a,m,f){for(var e=a.length,l,g=0;g<e;g++)if(l=a[g],m.call(f,l,g,a))return l},equals:function(a,m,f){if(!a&&!m)return!0;if(!a||!m||a.length!=m.length)return!1;if(f)for(var e=0;e<a.length;e++){if(!f(a[e],
m[e]))return!1}else for(f=0;f<a.length;f++)if(a[f]!==m[f])return!1;return!0},difference:function(p,m,f){var e;f?(e=m.filter(h.bind(null,p,f)),p=p.filter(h.bind(null,m,f))):(e=m.filter(a.bind(null,p)),p=p.filter(a.bind(null,m)));return{added:e,removed:p}},range:function(a,m){null==m&&(m=a,a=0);for(var f=Array(m-a),e=a;e<m;e++)f[e-a]=e;return f},constant:function(a,m){for(var f=Array(a),e=0;e<a;e++)f[e]=m;return f},binaryIndexOf:function(a,m,f){for(var e=a.length,l=0,g=e-1;l<g;){var c=l+Math.floor((g-
l)/2);m>a[c]?l=c+1:g=c}g=a[l];return f?m>=a[e-1]?-1:g===m?l:l-1:g===m?l:-1}}})},"esri/views/webgl/Util":function(){define(["require","exports","../../core/Error"],function(a,h,p){return function(){function a(){}a.vertexCount=function(f,e){return f.vertexBuffers[e].size/a.getStride(f.layout[e])};a.getStride=function(a){return a[0].stride};a.addDescriptor=function(a,e,l,g,c,b){var f=0;switch(g){case 5126:f=4;break;case 5124:f=4;break;case 5125:f=4;break;case 5122:f=2;break;case 5123:f=2;break;case 5120:f=
1;break;case 5121:f=1;break;default:throw Error("Unknown data type");}if(0<a.length){var m=a[0].stride,h=m+f*l;a.forEach(function(b){return b.stride=h});a.push({name:e,count:l,type:g,offset:m,stride:h,normalized:c,divisor:b})}else a.push({name:e,count:l,type:g,offset:0,stride:f*l,normalized:c,divisor:b})};a.assertCompatibleVertexAttributeLocations=function(a,e){(a=a.locations===e.locations)||console.error("VertexAttributeLocations are incompatible");return a};a.hasAttribute=function(a,e){for(var f=
0;f<a.length;f++)if(a[f].name===e)return!0;return!1};a.findAttribute=function(a,e){for(var f=0;f<a.length;f++)if(a[f].name===e)return a[f];return null};a.copyFramebufferToTexture=function(a,e,l,g,c){void 0===c&&(c=0);var b=a.getBoundFramebufferObject(),f=a.getBoundTexture(0);a.bindFramebuffer(e);a.bindTexture(l,0);a.gl.copyTexImage2D(a.gl.TEXTURE_2D,c,l.descriptor.pixelFormat,g[0],g[1],g[2],g[3],0);a.gl.flush();a.bindFramebuffer(b);a.bindTexture(f,0)};a.assert=function(a,e){if(!a)throw new p(e);};
return a}()})},"esri/views/3d/webgl-engine/lib/RenderSlot":function(){define(["require","exports"],function(a,h){var p;a=p||(p={});a[a.BACKGROUND=0]="BACKGROUND";a[a.INTERNAL_MATERIAL=1]="INTERNAL_MATERIAL";a[a.STENCIL_MATERIAL=2]="STENCIL_MATERIAL";a[a.OPAQUE_TERRAIN=3]="OPAQUE_TERRAIN";a[a.OPAQUE_MATERIAL=4]="OPAQUE_MATERIAL";a[a.OPAQUE_EXTERNAL=5]="OPAQUE_EXTERNAL";a[a.TRANSPARENT_MATERIAL=6]="TRANSPARENT_MATERIAL";a[a.TRANSPARENT_EXTERNAL=7]="TRANSPARENT_EXTERNAL";a[a.TRANSPARENT_TERRAIN=8]="TRANSPARENT_TERRAIN";
a[a.OCCLUSION_PIXELS=9]="OCCLUSION_PIXELS";a[a.POSTPROCESSING_HIGHLIGHT=10]="POSTPROCESSING_HIGHLIGHT";a[a.POSTPROCESSING_ATMOSPHERE=11]="POSTPROCESSING_ATMOSPHERE";a[a.OVERLAY=12]="OVERLAY";a[a.MAX_SLOTS=13]="MAX_SLOTS";return p})},"esri/views/webgl/Program":function(){define(["require","exports","dojo/has"],function(a,h,p){a=function(){function a(f,e,l,g,c){this._glName=this._context=null;this._locations={};this._id=void 0;this._initialized=!1;this._fShader=this._vShader=null;this._defines=void 0;
this._nameToUniformLocation={};this._nameToAttribLocation={};this._nameToUniform1={};this._nameToUniform2={};this._nameToUniform3={};this._nameToUniform4={};this._nameToUniformMatrix3={};this._nameToUniformMatrix4={};f||console.error("RenderingContext isn't initialized!");0===e.length&&console.error("Shaders source should not be empty!");this._context=f;this._vertexShaderSource=e;this._fragmentShaderSource=l;this._defines=c;this._id=a._nextId++;this._locations=g}Object.defineProperty(a.prototype,
"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});a.prototype.dispose=function(){var a=this._context.gl;this._vShader&&(a.deleteShader(this._vShader),this._vShader=null);this._fShader&&(a.deleteShader(this._fShader),this._fShader=null);this._glName&&(a.deleteProgram(this._glName),
this._glName=null)};a.prototype.initialize=function(){if(!this._initialized){this._vShader=this._loadShader(35633);this._fShader=this._loadShader(35632);this._vShader&&this._fShader||console.error("Error loading shaders!");var a=this._context.gl,e=a.createProgram();a.attachShader(e,this._vShader);a.attachShader(e,this._fShader);for(var l in this._locations)a.bindAttribLocation(e,this._locations[l],l);a.linkProgram(e);a.getProgramParameter(e,a.LINK_STATUS)||console.error("Could not initialize shader\nVALIDATE_STATUS: "+
a.getProgramParameter(e,a.VALIDATE_STATUS)+", gl error ["+a.getError()+"]infoLog: "+a.getProgramInfoLog(e));this._glName=e;this._initialized=!0}};a.prototype.getUniformLocation=function(a){this.initialize();void 0===this._nameToUniformLocation[a]&&(this._nameToUniformLocation[a]=this._context.gl.getUniformLocation(this._glName,a));return this._nameToUniformLocation[a]};a.prototype.hasUniform=function(a){return null!==this.getUniformLocation(a)};a.prototype.getAttribLocation=function(a){this.initialize();
void 0===this._nameToAttribLocation[a]&&(this._nameToAttribLocation[a]=this._context.gl.getAttribLocation(this._glName,a));return this._nameToAttribLocation[a]};a.prototype.setUniform1i=function(a,e){var f=this._nameToUniform1[a];if(void 0===f||e!==f)this._context.bindProgram(this),this._context.gl.uniform1i(this.getUniformLocation(a),e),this._nameToUniform1[a]=e};a.prototype.setUniform1f=function(a,e){var f=this._nameToUniform1[a];if(void 0===f||e!==f)this._context.bindProgram(this),this._context.gl.uniform1f(this.getUniformLocation(a),
e),this._nameToUniform1[a]=e};a.prototype.setUniform1fv=function(f,e){var l=this._nameToUniform2[f];void 0!==l&&a._arraysEqual(e,l)||(this._context.bindProgram(this),this._context.gl.uniform1fv(this.getUniformLocation(f),e),void 0===l?this._nameToUniform2[f]=new Float32Array(e):l.set(e))};a.prototype.setUniform2f=function(a,e,l){var f=this._nameToUniform2[a];if(void 0===f||e!==f[0]||l!==f[1])this._context.bindProgram(this),this._context.gl.uniform2f(this.getUniformLocation(a),e,l),void 0===f?this._nameToUniform2[a]=
new Float32Array([e,l]):(f[0]=e,f[1]=l)};a.prototype.setUniform2fv=function(f,e){var l=this._nameToUniform2[f];void 0!==l&&a._arraysEqual(e,l)||(this._context.bindProgram(this),this._context.gl.uniform2fv(this.getUniformLocation(f),e),void 0===l?this._nameToUniform2[f]=new Float32Array(e):l.set(e))};a.prototype.setUniform3f=function(a,e,l,g){var c=this._nameToUniform3[a];if(void 0===c||e!==c[0]||l!==c[1]||g!==c[2])this._context.bindProgram(this),this._context.gl.uniform3f(this.getUniformLocation(a),
e,l,g),void 0===c?this._nameToUniform3[a]=new Float32Array([e,l,g]):(c[0]=e,c[1]=l,c[2]=g)};a.prototype.setUniform3fv=function(f,e){var l=this._nameToUniform3[f];void 0!==l&&a._arraysEqual(e,l)||(this._context.bindProgram(this),this._context.gl.uniform3fv(this.getUniformLocation(f),e),void 0===l?this._nameToUniform3[f]=new Float32Array(e):l.set(e))};a.prototype.setUniform4f=function(a,e,l,g,c){var b=this._nameToUniform4[a];if(void 0===b||e!==b[0]||l!==b[1]||g!==b[2]||c!==b[3])this._context.bindProgram(this),
this._context.gl.uniform4f(this.getUniformLocation(a),e,l,g,c),void 0===b?this._nameToUniform4[a]=new Float32Array([e,l,g,c]):(b[0]=e,b[1]=l,b[2]=g,b[3]=c)};a.prototype.setUniform4fv=function(f,e){var l=this._nameToUniform4[f];void 0!==l&&a._arraysEqual(e,l)||(this._context.bindProgram(this),this._context.gl.uniform4fv(this.getUniformLocation(f),e),void 0===l?this._nameToUniform4[f]=new Float32Array(e):l.set(e))};a.prototype.setUniformMatrix3fv=function(f,e,l){void 0===l&&(l=!1);var g=this._nameToUniformMatrix3[f];
void 0!==g&&(9===g.length?a._matrix3Equal(g,e):a._arraysEqual(e,g))||(this._context.bindProgram(this),this._context.gl.uniformMatrix3fv(this.getUniformLocation(f),l,e),void 0===g?this._nameToUniformMatrix3[f]=new Float32Array(e):g.set(e))};a.prototype.setUniformMatrix4fv=function(f,e,l){void 0===l&&(l=!1);var g=this._nameToUniformMatrix4[f];void 0!==g&&(16===g.length?a._matrix4Equal(g,e):a._arraysEqual(e,g))||(this._context.bindProgram(this),this._context.gl.uniformMatrix4fv(this.getUniformLocation(f),
l,e),void 0===g?this._nameToUniformMatrix4[f]=new Float32Array(e):g.set(e))};a._padToThree=function(a){var e=a.toString();1E3>a&&(e=("  "+a).slice(-3));return e};a.prototype._addLineNumbers=function(f){var e=2;return f.replace(/\n/g,function(){return"\n"+a._padToThree(e++)+":"})};a.prototype._loadShader=function(a){var e=35633===a?this._vertexShaderSource:this._fragmentShaderSource;if(void 0!==this._defines){var f="";if(Array.isArray(this._defines))for(var g=0,c=this._defines;g<c.length;g++)var b=
c[g],f=f+("#define "+b+"\n");else for(b in this._defines)f+="#define "+b+"\n";e=f+e}f=this._context.gl;a=f.createShader(a);f.shaderSource(a,e);f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(console.error(f.getShaderInfoLog(a)),console.error(this._addLineNumbers(e)));return a};a._matrix4Equal=function(a,e){return a[0]===e[0]&&a[1]===e[1]&&a[2]===e[2]&&a[3]===e[3]&&a[4]===e[4]&&a[5]===e[5]&&a[6]===e[6]&&a[7]===e[7]&&a[8]===e[8]&&a[9]===e[9]&&a[10]===e[10]&&a[11]===e[11]&&a[12]===e[12]&&
a[13]===e[13]&&a[14]===e[14]&&a[15]===e[15]};a._matrix3Equal=function(a,e){return a[0]===e[0]&&a[1]===e[1]&&a[2]===e[2]&&a[3]===e[3]&&a[4]===e[4]&&a[5]===e[5]&&a[6]===e[6]&&a[7]===e[7]&&a[8]===e[8]};a._arraysEqual=function(a,e){if(a.length!==e.length)return!1;for(var f=0;f<a.length;++f)if(a[f]!==e[f])return!1;return!0};return a}();a._nextId=0;return a})},"esri/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations":function(){define(["require","exports"],function(a,h){h.Default3D={position:0,normal:1,
uv0:2,color:3,instanceColor:3,size:4,auxpos1:5,auxpos2:6,featureAttribute:6,instanceFeatureAttribute:6,region:7,model:8,modelNormal:12}})},"esri/views/3d/webgl-engine/lib/LinearDepthTextureHelper":function(){define(["require","exports","./Util","../../../webgl/FramebufferObject","../../../webgl/enums"],function(a,h,p,m,f){return function(){function a(a){this._rctx=a;this._depthFBO=void 0;this.height=this.width=this.viewportToRestore=null}a.prototype.setEnableState=function(a){a!==this.getEnableState()&&
(a?this.enable():this.disable())};a.prototype.getEnableState=function(){return void 0!==this._depthFBO};a.prototype.getDepthFBO=function(){return this._depthFBO};a.prototype.enable=function(){p.assert(!this.getEnableState());this._depthFBO=m.createWithAttachments(this._rctx,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:0,height:0},{colorTarget:0,depthStencilTarget:1})};a.prototype.disable=function(){p.assert(this.getEnableState());this._depthFBO.dispose();this._depthFBO=
void 0};a.prototype.setupFBOs=function(a){p.assert(this.getEnableState());this.viewportToRestore=a=a.fullViewport;this.width=a[2];this.height=a[3];this._rctx.setViewport(0,0,this.width,this.height)};a.prototype.prepareDepthPass=function(){p.assert(this.getEnableState());var a=this._rctx,e=a.gl;this._depthFBO.resize(this.width,this.height);a.bindFramebuffer(this._depthFBO);a.setClearColor(0,0,0,0);a.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)};a.prototype.finish=function(a){var e=this._rctx;e.bindFramebuffer(a);
e.setViewport(this.viewportToRestore[0],this.viewportToRestore[1],this.viewportToRestore[2],this.viewportToRestore[3])};return a}()})},"esri/views/webgl/FramebufferObject":function(){define(["require","exports","./Texture"],function(a,h,p){a=function(){function a(f,e,l,g){this._colorAttachment=this._stencilAttachment=this._depthAttachment=this._glName=this._context=null;this._initialized=!1;this._context=f;this._desc={colorTarget:e.colorTarget,depthStencilTarget:e.depthStencilTarget,width:e.width,
height:e.height,multisampled:e.multisampled};this._id=a._nextId++;l&&(f=void 0,l instanceof p?(this._colorAttachment=l,f=l.descriptor):(f=l,this._colorAttachment=new p(this._context,f)),0!==this._desc.colorTarget&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),a._validateTextureDimensions(f,this._desc));g&&(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),
l=void 0,g instanceof p?(this._depthStencilTexture=g,l=this._depthStencilTexture.descriptor):(l=g,this._depthStencilTexture=new p(this._context,l)),a._validateTextureDimensions(l,this._desc))}a.create=function(f,e){return new a(f,e)};a.createWithAttachments=function(f,e,l,g){return new a(f,l,e,g)};Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"colorTexture",{get:function(){return this._colorAttachment instanceof p?this._colorAttachment:null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._desc.width},
enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._desc.height},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._context&&this._glName&&(this._disposeColorAttachment(),this._disposeDepthStencilAttachments(),this._context.gl.deleteFramebuffer(this._glName),this._glName=null)};a.prototype.attachColorTexture=function(f){if(f){a._validateTextureDimensions(f.descriptor,this._desc);this._disposeColorAttachment();if(this._initialized){this._context.bindFramebuffer(this);
var e=this._context.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,f.glName,0)}this._colorAttachment=f}};a.prototype.detachColorTexture=function(){var a=void 0;if(this._colorAttachment instanceof p){a=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;this._context.gl.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)}this._colorAttachment=null}return a};a.prototype.attachDepthStencilTexture=function(f){if(f){var e=
f.descriptor;34041!==e.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!");34042!==e.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8_WEBGL!");this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!");a._validateTextureDimensions(e,this._desc);4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4);this._disposeDepthStencilAttachments();
this._initialized&&(this._context.bindFramebuffer(this),e=this._context.gl,e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,f.glName,0));this._depthStencilTexture=f}};a.prototype.detachDepthStencilTexture=function(){var a=this._depthStencilTexture;if(a&&this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;this._context.gl.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,null,0)}this._depthStencilTexture=null;return a};
a.prototype.copyToTexture=function(a,e,l,g,c,b,m){(0>a||0>e||0>c||0>b)&&console.error("Offsets cannot be negative!");(0>=l||0>=g)&&console.error("Copy width and height must be greater than zero!");var f=this._desc,h=m.descriptor;3553!==m.descriptor.target&&console.error("Texture target must be TEXTURE_2D!");(a+l>f.width||e+g>f.height||c+l>h.width||b+g>h.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");f=this._context;f.bindTexture(m);f.bindFramebuffer(this);
f.gl.copyTexSubImage2D(3553,0,c,b,a,e,l,g)};a.prototype.readPixels=function(a,e,l,g,c,b,m){(0>=l||0>=g)&&console.error("Copy width and height must be greater than zero!");m||console.error("Target memory is not initialized!");this._context.bindFramebuffer(this);this._context.gl.readPixels(a,e,l,g,c,b,m)};a.prototype.resize=function(f,e){var l=this._desc;if(l.width!==f||l.height!==e)if(this._initialized)l.width=f,l.height=e,this._colorAttachment instanceof p?(g=this._colorAttachment,l=g.descriptor,
l.width=f,l.height=e,this._colorAttachment=new p(this._context,l),a._validateTextureDimensions(g.descriptor,this._desc)):this._colorAttachment=null,null!=this._depthStencilTexture&&(l=this._depthStencilTexture.descriptor,l.width=f,l.height=e,this._depthStencilTexture=new p(this._context,l)),this._initialized=!1;else{l.width=f;l.height=e;if(this._colorAttachment instanceof p){var g=this._colorAttachment;g.resize(f,e)}this._depthStencilTexture&&this._depthStencilTexture.resize(f,e)}};a.prototype.initialize=
function(){if(this._initialized)return!1;var a=this._context.gl,e=a.createFramebuffer(),l=this._desc;a.bindFramebuffer(a.FRAMEBUFFER,e);if(!this._colorAttachment)if(0===l.colorTarget)this._colorAttachment=new p(this._context,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:l.width,height:l.height});else{var g=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,g);a.renderbufferStorage(a.RENDERBUFFER,a.RGBA4,l.width,l.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,
a.COLOR_ATTACHMENT0,a.RENDERBUFFER,g);this._colorAttachment=g}this._colorAttachment instanceof p&&a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this._colorAttachment.glName,0);switch(l.depthStencilTarget){case 1:case 3:g=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,g);var c=1===l.depthStencilTarget?a.DEPTH_ATTACHMENT:a.DEPTH_STENCIL_ATTACHMENT;a.renderbufferStorage(a.RENDERBUFFER,1===l.depthStencilTarget?a.DEPTH_COMPONENT16:a.DEPTH_STENCIL,l.width,l.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,
c,a.RENDERBUFFER,g);this._depthAttachment=g;break;case 2:g=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,g);a.renderbufferStorage(a.RENDERBUFFER,a.STENCIL_INDEX8,l.width,l.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.STENCIL_ATTACHMENT,a.RENDERBUFFER,g);this._stencilAttachment=g;break;case 4:this._depthStencilTexture||(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),
this._depthStencilTexture=new p(this._context,{target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:l.width,height:l.height})),a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,this._depthStencilTexture.glName,0)}a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!");this._glName=e;return this._initialized=!0};a.prototype._disposeColorAttachment=function(){if(this._colorAttachment instanceof
p){var a=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)}a.dispose()}else this._colorAttachment instanceof WebGLRenderbuffer&&(a=this._colorAttachment,e=this._context.gl,this._initialized&&(this._context.bindFramebuffer(this),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(a));this._colorAttachment=
null};a.prototype._disposeDepthStencilAttachments=function(){var a=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);var e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,1===this._desc.depthStencilTarget?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,null)}a.deleteRenderbuffer(this._depthAttachment);this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),e=this._context.gl,
e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,null)),a.deleteRenderbuffer(this._stencilAttachment),this._stencilAttachment=null);this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),a=this._context.gl,a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,null,0)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)};a._validateTextureDimensions=function(a,e){console.assert(0<=a.width&&0<=a.height);3553!==
a.target&&console.error("Texture type must be TEXTURE_2D!");void 0!==e.width&&0<=e.width&&void 0!==e.height&&0<=e.height?e.width===a.width&&e.height===a.height||console.error("Color attachment texture must match the framebuffer's!"):(e.width=a.width,e.height=a.height)};return a}();a._nextId=0;return a})},"esri/views/3d/webgl-engine/lib/NormalTextureHelper":function(){define(["require","exports","./Util","../../../webgl/FramebufferObject","../../../webgl/enums"],function(a,h,p,m,f){return function(){function a(a){this.rctx=
a;this.normalFBO=void 0;this.height=this.width=this.viewportToRestore=null}a.prototype.setEnableState=function(a){a!==this.getEnableState()&&(a?this.enable():this.disable())};a.prototype.getEnableState=function(){return void 0!==this.normalFBO};a.prototype.getNormalFBO=function(){return this.normalFBO};a.prototype.enable=function(){p.assert(!this.getEnableState());this.normalFBO=m.createWithAttachments(this.rctx,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:0,
height:0},{colorTarget:0,depthStencilTarget:1})};a.prototype.disable=function(){p.assert(this.getEnableState());this.normalFBO.dispose();this.normalFBO=void 0};a.prototype.setupFBOs=function(a){p.assert(this.getEnableState());this.viewportToRestore=a=a.viewport;this.width=a[2];this.height=a[3];this.rctx.setViewport(0,0,this.width,this.height)};a.prototype.prepareNormalPass=function(){p.assert(this.getEnableState());var a=this.rctx,e=a.gl;this.normalFBO.resize(this.width,this.height);a.bindFramebuffer(this.normalFBO);
a.setClearColor(0,0,0,0);a.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)};a.prototype.finish=function(a){var e=this.rctx;e.bindFramebuffer(a);e.setViewport(this.viewportToRestore[0],this.viewportToRestore[1],this.viewportToRestore[2],this.viewportToRestore[3])};return a}()})},"esri/views/3d/webgl-engine/lib/HighlightTextureHelper":function(){define(["require","exports","./Util","../../../webgl/FramebufferObject","../../../webgl/enums"],function(a,h,p,m,f){return function(){function a(a){this._rctx=
a;this.height=this.width=this.viewportToRestore=this.fbo2=this.fbo=null}a.prototype.setEnableState=function(a){a!==this.getEnableState()&&(a?this.enable():this.disable())};a.prototype.getEnableState=function(){return null!==this.fbo};a.prototype.getHighlightFBO=function(){return this.fbo};a.prototype.getBlurFBO=function(){return this.fbo2};a.prototype.enable=function(){p.assert(!this.getEnableState());this.fbo=m.createWithAttachments(this._rctx,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9729,
wrapMode:33071,width:0,height:0},{colorTarget:0,depthStencilTarget:1})};a.prototype.disable=function(){p.assert(this.getEnableState());this.fbo.dispose();this.fbo=null};a.prototype.setupFBOs=function(a){p.assert(this.getEnableState());this.viewportToRestore=a=a.fullViewport;this.width=a[2];this.height=a[3];this._rctx.setViewport(0,0,this.width,this.height)};a.prototype.prepareHighlightPass=function(){p.assert(this.getEnableState());var a=this._rctx,e=a.gl;this.fbo.resize(this.width,this.height);a.bindFramebuffer(this.fbo);
a.setClearColor(0,0,0,0);a.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)};a.prototype.finish=function(a){var e=this._rctx;e.bindFramebuffer(a);e.setViewport(this.viewportToRestore[0],this.viewportToRestore[1],this.viewportToRestore[2],this.viewportToRestore[3])};return a}()})},"esri/views/3d/webgl-engine/lib/RenderPass":function(){define(["require","exports"],function(a,h){var p;a=p||(p={});a[a.MATERIAL=0]="MATERIAL";a[a.MATERIAL_DEPTH=1]="MATERIAL_DEPTH";a[a.MATERIAL_NORMAL=2]="MATERIAL_NORMAL";a[a.MATERIAL_DEPTH_SHADOWMAP=
3]="MATERIAL_DEPTH_SHADOWMAP";a[a.MATERIAL_HIGHLIGHT=4]="MATERIAL_HIGHLIGHT";a[a.MAX_PASS=5]="MAX_PASS";return p})},"esri/views/3d/webgl-engine/lib/RenderContext":function(){define(["require","exports","./RenderSlot","./RenderPass"],function(a,h,p,m){return function(){return function(){this.normals=this.lightingData=this.highlight=this.filterFaceRange=this.filterContent=this.depth=this.camera=this.options=this.rctx=null;this.pass=m.MATERIAL;this.shadowMap=null;this.slot=p.BACKGROUND;this.framebufferTex=
this.visibleContent=this.stencilRenderingHelper=this.offscreenRenderingHelper=this.ssaoHelper=null}}()})},"esri/views/3d/webgl-engine/lib/ExternalRendererContainer":function(){define(["require","exports","./RenderSlot"],function(a,h,p){return function(){function a(){this.renderersChanged=!1;this.renderers=[];this.slots=[];for(var a=0;a<p.MAX_SLOTS;++a)this.slots[a]=[]}a.prototype.addRenderer=function(a,e){this.renderers.push(e);for(var f=0;f<a.length;++f)this.slots[a[f]].push(e);this.renderersChanged=
!0};a.prototype.removeRenderer=function(a){this.renderers=this.renderers.filter(function(e){return e!==a});for(var e=0;e<this.slots.length;++e)this.slots[e]=this.slots[e].filter(function(e){return e!==a});this.renderersChanged=!0};a.prototype.render=function(a,e){e.slot=a;a=this.slots[a];for(var f=0;f<a.length;++f){var g=a[f];g.render(e)&&(g.didRender=!0)}};a.prototype.needsRender=function(){if(this.renderersChanged)return!0;for(var a=0;a<this.renderers.length;++a)if(this.renderers[a].needsRender)return!0;
return!1};a.prototype.resetNeedsRender=function(){this.renderersChanged=!1;for(var a=0;a<this.renderers.length;++a){var e=this.renderers[a];e.resetNeedsRender?e.resetNeedsRender():e.didRender&&(e.needsRender=!1,e.didRender=!1)}};return a}()})},"esri/views/3d/webgl-engine/lib/StencilRenderingHelper":function(){define(["require","exports","./Util","../../../webgl/enums"],function(a,h,p,m){return function(){function a(a){this._enabled=!1;this._rctx=a}a.prototype.enable=function(){this._enabled=!0;this._rctx.setStencilTestEnabled(!0)};
a.prototype.disable=function(){this._enabled=!1;this._rctx.setStencilTestEnabled(!1)};a.prototype.getIsSupported=function(){return!!this._rctx.contextAttributes.stencil};a.prototype.setEnableState=function(a){a?this.enable():this.disable()};a.prototype.getEnableState=function(){return this._enabled};a.prototype.prepareStencilWritePass=function(){p.assert(this.getEnableState());var a=this._rctx;a.setClearStencil(0);a.setStencilFunction(519,1,255);a.setStencilOp(7680,7680,7681);a.setStencilWriteMask(255)};
a.prototype.prepareStencilReadPass=function(){p.assert(this.getEnableState());var a=this._rctx;a.setStencilFunction(517,1,255);a.setStencilWriteMask(0)};a.prototype.prepareStencilDisabledPass=function(){p.assert(this.getEnableState());var a=this._rctx;a.setStencilFunction(519,0,0);a.setStencilWriteMask(0)};return a}()})},"esri/views/3d/webgl-engine/lib/BitSet":function(){define(["require","exports"],function(a,h){return function(){function a(){this.bitsPerWord=32;this.addressBitsPerWord=5;this._store=
[]}a.prototype.clone=function(){var m=new a;m._store=this._store.slice();return m};a.prototype.wordIndex=function(a){return a>>this.addressBitsPerWord};a.prototype.set=function(a){return this._store[this.wordIndex(a-1)]|=1<<a-1};a.prototype.clear=function(a){return this._store[this.wordIndex(a-1)]&=255^1<<a-1};a.prototype.clearAll=function(){for(var a=0;a<this._store.length;++a)this._store[a]=0};a.prototype.get=function(a){return 0!==(this._store[this.wordIndex(a-1)]&1<<a-1)};a.prototype.length=function(){return 0===
this.wordLength()?0:this.bitsPerWord*(this.wordLength()-1)+(this._store[this.wordLength()-1].toString(2).length+1)};a.prototype.wordLength=function(){for(var a,f=this._store.length,e=a=this._store.length-1;(0>=a?0>=e:0<=e)&&0===this._store[e];0>=a?e++:e--)f--;return f};a.prototype.store=function(){return this._store};a.prototype.cardinality=function(){for(var a=0,f=this.length(),e=0;0<=f?e<=f:e>=f;0<=f?e++:e--)this.get(e)&&a++;return a};a.prototype.toString=function(){for(var a=[],f=this.length(),
e=0;0<=f?e<=f:e>=f;0<=f?e++:e--)this.get(e)&&a.push(""+e);return"{"+a.join(",")+"}"};a.prototype.toBinaryString=function(){var a=this,f=function(a,f,g){for(;a.length<g;)a=f+a;return a};return 0<this.wordLength()?this._store.map(function(e){return f(e.toString(2),"0",a.bitsPerWord)}).join(""):f("","0",this.bitsPerWord)};a.prototype.or=function(a){if(this!==a){for(var f=Math.min(this.wordLength(),a.wordLength()),e=f-1,l=0;0<=e?l<=e:l>=e;0<=e?l++:l--)this._store[l]|=a.store[l];f<a.wordLength()&&(this._store=
this._store.concat(a._store.slice(f,a.wordLength())));return null}};a.prototype.and=function(a){if(this!==a){for(var f=this.wordLength(),e=a.wordLength(),l=f;f<=e?l<=e:l>=e;f<=e?l++:l--)this._store[l]=0;f=this.wordLength();for(l=0;0<=f?l<=f:l>=f;0<=f?l++:l--)this._store[l]&=a.store[l];return null}};a.prototype.andNot=function(a){for(var f=Math.min(this.wordLength(),a.wordLength())-1,e=0;0<=f?e<=f:e>=f;0<=f?e++:e--)this._store[e]&=~a.store[e];return null};a.prototype.xor=function(a){if(this!==a){for(var f=
this.wordLength(),e=0;0<=f?e<=f:e>=f;0<=f?e++:e--)this._store[e]^=a.store[e];return null}};return a}()})},"esri/views/webgl/VertexArrayObject":function(){define(["require","exports"],function(a,h){a=function(){function a(m,f,e,l,g){this._locations=this._layout=this._glName=this._context=null;this._indexBuffer=this._buffers=void 0;this._initialized=!1;this._context=m;this._layout=e;this._buffers=l;this._locations=f;g&&(this._indexBuffer=g);this._id=a._nextId++}Object.defineProperty(a.prototype,"id",
{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"vertexBuffers",{get:function(){return this._buffers},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"indexBuffer",{get:function(){return this._indexBuffer},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"layout",{get:function(){return this._layout},enumerable:!0,
configurable:!0});Object.defineProperty(a.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});a.prototype.dispose=function(a){void 0===a&&(a=!0);var f=this._context.extensions.vao;f&&this._glName&&(f.deleteVertexArrayOES(this._glName),this._glName=null);this._context.getBoundVAO()===this&&this._context.bindVAO(null);if(a){for(var e in this._buffers)this._buffers[e].dispose(),delete this._buffers[e];this._indexBuffer&&(this._indexBuffer.dispose(),this._indexBuffer=
null)}};a.prototype.initialize=function(){if(!this._initialized){var a=this._context.extensions.vao;if(a){var f=a.createVertexArrayOES();a.bindVertexArrayOES(f);this._bindLayout();a.bindVertexArrayOES(null);this._glName=f}this._initialized=!0}};a.prototype.bind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(this.glName):(this._context.bindVAO(null),this._bindLayout())};a.prototype._bindLayout=function(){var a=this._buffers,f=this._context.extensions.vao,e=this._layout,
l=this._indexBuffer;a||console.error("Vertex buffer dictionary is empty!");var g=this._context.gl,c,b,h=0,p;for(p in a)for((c=a[p])||console.error("Vertex buffer is uninitialized!"),(b=e[p])||console.error("Vertex element descriptor is empty!"),this._context.bindBuffer(c),h=0;h<b.length;++h){c=b[h];var y=this._locations[c.name];void 0===y&&console.error("There is no location for vertex attribute '"+c.name+" defined.");if(4>=c.count){if(g.enableVertexAttribArray(y),g.vertexAttribPointer(y,c.count,
c.type,c.normalized,c.stride,c.offset),c.divisor&&0<c.divisor){var t=this._context.extensions.angleInstancedArrays;t&&t.vertexAttribDivisorANGLE(y,c.divisor)}}else if(16===c.count&&5126===c.type)for(var u=0;4>u;u++)g.enableVertexAttribArray(y+u),g.vertexAttribPointer(y+u,4,c.type,c.normalized,c.stride,c.offset+16*u),c.divisor&&0<c.divisor&&(t=this._context.extensions.angleInstancedArrays)&&t.vertexAttribDivisorANGLE(y+u,c.divisor);else console.error("Unsupported vertex attribute element count: "+
c.count)}l&&(f?g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,l.glName):this._context.bindBuffer(l))};a.prototype.unbind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(null):this._unbindLayout()};a.prototype._unbindLayout=function(){var a=this._buffers,f=this._layout,e=this._locations,l=this._context;a||console.error("Vertex buffer dictionary is empty!");var g=l.gl,c,b,h,p=0,y=0,t;for(t in a){(c=a[t])||console.error("Vertex buffer is uninitialized!");b=f[t];p=0;for(y=
b.length;p<y;++p)h=b[p],g.disableVertexAttribArray(e[h.name]);l.unbindBuffer(c.bufferType)}(a=this._indexBuffer)&&l.unbindBuffer(a.bufferType)};return a}();a._nextId=0;return a})},"esri/views/webgl/BufferObject":function(){define(["require","exports"],function(a,h){a=function(){function a(m,f,e,l){this._glName=this._context=null;this._bufferType=void 0;this._usage=35044;this._size=-1;this._indexType=void 0;this._context=m;this._bufferType=f;this._usage=e;this._id=a._nextId++;this._glName=this._context.gl.createBuffer();
l&&this.setData(l)}a.createIndex=function(m,f,e){return new a(m,34963,f,e)};a.createVertex=function(m,f,e){return new a(m,34962,f,e)};Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"usage",{get:function(){return this._usage},
enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bufferType",{get:function(){return this._bufferType},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"indexType",{get:function(){return this._indexType},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"byteSize",{get:function(){return 34962===this._bufferType?this._size:5125===this._indexType?4*this._size:2*this._size},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._glName&&
(this._context.gl.deleteBuffer(this._glName),this._glName=null)};a.prototype.setData=function(a){if(a){if("number"===typeof a)0>a&&console.error("Buffer size cannot be negative!"),this._size=a;else{var f=a.byteLength;a instanceof Uint16Array&&(f/=2,this._indexType=5123);a instanceof Uint32Array&&(f/=4,this._indexType=5125);this._size=f}f=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferData(this._bufferType,a,this._usage);this._context.bindVAO(f)}};
a.prototype.setSubData=function(a,f,e,l){void 0===f&&(f=0);void 0===e&&(e=0);if(a){(0>f||f>=this._size)&&console.error("offset is out of range!");var g=f,c=e,b=l,m=a.byteLength;a instanceof Uint16Array&&(m/=2,g*=2,c*=2,b*=2);a instanceof Uint32Array&&(m/=4,g*=4,c*=4,b*=2);void 0===l&&(l=m-1);e>=l&&console.error("end must be bigger than start!");f+e-l>this._size&&console.error("An attempt to write beyond the end of the buffer!");f=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);
this._context.gl.bufferSubData(this._bufferType,g,(a instanceof ArrayBuffer?a:a.buffer).slice(c,b));this._context.bindVAO(f)}};return a}();a._nextId=0;return a})},"esri/views/3d/webgl-engine/lib/FxaaRenderPass":function(){define("require exports ../../../webgl/Program ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/enums".split(" "),function(a,h,p,m,f,e){return function(){function a(a){this.isEnabled=!1;this.vertexAttributeLocations={position:0};this.vertexBufferLayout=
[{name:"position",count:2,type:5126,offset:0,stride:8,normalized:!1}];this.rctx=a}a.prototype.enable=function(){if(!this.isEnabled){var a=this.rctx;this.program=new p(a,"\n      #version 100\n      precision mediump float;\n\n      attribute vec2 position;\n\n      varying   vec2 fCoordinate;\n\n      void main() {\n        fCoordinate \x3d (position + 1.0 ) * 0.5;\n        gl_Position \x3d vec4(position, -1, 1);\n      }","\n      #version 100\n      precision mediump float;\n      /**\n       * @license\n       * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.\n       *\n       * TO  THE MAXIMUM  EXTENT PERMITTED  BY APPLICABLE  LAW, THIS SOFTWARE  IS PROVIDED\n       * *AS IS*  AND NVIDIA AND  ITS SUPPLIERS DISCLAIM  ALL WARRANTIES,  EITHER  EXPRESS\n       * OR IMPLIED, INCLUDING, BUT NOT LIMITED  TO, NONINFRINGEMENT,IMPLIED WARRANTIES OF\n       * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL  NVIDIA\n       * OR ITS SUPPLIERS BE  LIABLE  FOR  ANY  DIRECT, SPECIAL,  INCIDENTAL,  INDIRECT,  OR\n       * CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,  DAMAGES FOR LOSS\n       * OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY\n       * OTHER PECUNIARY LOSS) ARISING OUT OF THE  USE OF OR INABILITY  TO USE THIS SOFTWARE,\n       * EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n       */\n\n      #define FXAA_EDGE_THRESHOLD      (1.0/8.0)\n      #define FXAA_EDGE_THRESHOLD_MIN  (1.0/24.0)\n      #define FXAA_SEARCH_STEPS        16\n      #define FXAA_SEARCH_THRESHOLD    (1.0/4.0)\n      #define FXAA_SUBPIX_CAP          (3.0/4.0)\n      #define FXAA_SUBPIX_TRIM         (1.0/4.0)\n      #define FXAA_SUBPIX_TRIM_SCALE (1.0/(1.0 - FXAA_SUBPIX_TRIM))\n\n      uniform vec2 uRcpFrameDimension;\n      uniform sampler2D uColorTexture;\n      varying vec2 fCoordinate;\n\n      // Return the luma, the estimation of luminance from rgb inputs.\n      // This approximates luma using one FMA instruction,\n      // skipping normalization and tossing out blue.\n      // FxaaLuma() will range 0.0 to 2.963210702.\n      float FxaaLuma(vec3 rgb) {\n        return rgb.y * (0.587 / 0.299) + rgb.x;\n      }\n      vec3 FxaaLerp3(vec3 a, vec3 b, float amountOfA) {\n        return (vec3(-amountOfA) * b) + ((a * vec3(amountOfA)) + b);\n      }\n      vec4 FxaaTexOff(sampler2D tex, vec2 pos, ivec2 off, vec2 rcpFrame) {\n        float x \x3d pos.x + float(off.x) * rcpFrame.x;\n        float y \x3d pos.y + float(off.y) * rcpFrame.y;\n        return texture2D(tex, vec2(x, y));\n      }\n\n      // pos is the output of FxaaVertexShader interpolated across screen.\n      // xy -\x3e actual texture position {0.0 to 1.0}\n      // rcpFrame should be a uniform equal to  {1.0/frameWidth, 1.0/frameHeight}\n      vec3 FxaaPixelShader(vec2 pos, sampler2D tex, vec2 rcpFrame) {\n        vec3 rgbN \x3d FxaaTexOff(tex, pos.xy, ivec2( 0,-1), rcpFrame).xyz;\n        vec3 rgbW \x3d FxaaTexOff(tex, pos.xy, ivec2(-1, 0), rcpFrame).xyz;\n        vec3 rgbM \x3d FxaaTexOff(tex, pos.xy, ivec2( 0, 0), rcpFrame).xyz;\n        vec3 rgbE \x3d FxaaTexOff(tex, pos.xy, ivec2( 1, 0), rcpFrame).xyz;\n        vec3 rgbS \x3d FxaaTexOff(tex, pos.xy, ivec2( 0, 1), rcpFrame).xyz;\n        float lumaN \x3d FxaaLuma(rgbN);\n        float lumaW \x3d FxaaLuma(rgbW);\n        float lumaM \x3d FxaaLuma(rgbM);\n        float lumaE \x3d FxaaLuma(rgbE);\n        float lumaS \x3d FxaaLuma(rgbS);\n        float rangeMin \x3d min(lumaM, min(min(lumaN, lumaW), min(lumaS, lumaE)));\n        float rangeMax \x3d max(lumaM, max(max(lumaN, lumaW), max(lumaS, lumaE)));\n        float range \x3d rangeMax - rangeMin;\n        if (range \x3c max(FXAA_EDGE_THRESHOLD_MIN, rangeMax * FXAA_EDGE_THRESHOLD)) {\n          return rgbM;\n        }\n        vec3 rgbL \x3d rgbN + rgbW + rgbM + rgbE + rgbS;\n        float lumaL \x3d (lumaN + lumaW + lumaE + lumaS) * 0.25;\n        float rangeL \x3d abs(lumaL - lumaM);\n        float blendL \x3d max(0.0, (rangeL / range) - FXAA_SUBPIX_TRIM) * FXAA_SUBPIX_TRIM_SCALE;\n        blendL \x3d min(FXAA_SUBPIX_CAP, blendL);\n        vec3 rgbNW \x3d FxaaTexOff(tex, pos.xy, ivec2(-1,-1), rcpFrame).xyz;\n        vec3 rgbNE \x3d FxaaTexOff(tex, pos.xy, ivec2( 1,-1), rcpFrame).xyz;\n        vec3 rgbSW \x3d FxaaTexOff(tex, pos.xy, ivec2(-1, 1), rcpFrame).xyz;\n        vec3 rgbSE \x3d FxaaTexOff(tex, pos.xy, ivec2( 1, 1), rcpFrame).xyz;\n        rgbL +\x3d (rgbNW + rgbNE + rgbSW + rgbSE);\n        rgbL *\x3d vec3(1.0/9.0);\n        float lumaNW \x3d FxaaLuma(rgbNW);\n        float lumaNE \x3d FxaaLuma(rgbNE);\n        float lumaSW \x3d FxaaLuma(rgbSW);\n        float lumaSE \x3d FxaaLuma(rgbSE);\n        float edgeVert \x3d\n          abs((0.25 * lumaNW) + (-0.5 * lumaN) + (0.25 * lumaNE)) +\n          abs((0.50 * lumaW ) + (-1.0 * lumaM) + (0.50 * lumaE )) +\n          abs((0.25 * lumaSW) + (-0.5 * lumaS) + (0.25 * lumaSE));\n        float edgeHorz \x3d\n          abs((0.25 * lumaNW) + (-0.5 * lumaW) + (0.25 * lumaSW)) +\n          abs((0.50 * lumaN ) + (-1.0 * lumaM) + (0.50 * lumaS )) +\n          abs((0.25 * lumaNE) + (-0.5 * lumaE) + (0.25 * lumaSE));\n        bool horzSpan \x3d edgeHorz \x3e\x3d edgeVert;\n        float lengthSign \x3d horzSpan ? -rcpFrame.y : -rcpFrame.x;\n        if(!horzSpan) {\n          lumaN \x3d lumaW;\n          lumaS \x3d lumaE;\n        }\n        float gradientN \x3d abs(lumaN - lumaM);\n        float gradientS \x3d abs(lumaS - lumaM);\n        lumaN \x3d (lumaN + lumaM) * 0.5;\n        lumaS \x3d (lumaS + lumaM) * 0.5;\n        if (gradientN \x3c gradientS)\n        {\n          lumaN \x3d lumaS;\n          lumaN \x3d lumaS;\n          gradientN \x3d gradientS;\n          lengthSign *\x3d -1.0;\n        }\n        vec2 posN;\n        posN.x \x3d pos.x + (horzSpan ? 0.0 : lengthSign * 0.5);\n        posN.y \x3d pos.y + (horzSpan ? lengthSign * 0.5 : 0.0);\n        gradientN *\x3d FXAA_SEARCH_THRESHOLD;\n        vec2 posP \x3d posN;\n        vec2 offNP \x3d horzSpan ? vec2(rcpFrame.x, 0.0) : vec2(0.0, rcpFrame.y);\n        float lumaEndN \x3d lumaN;\n        float lumaEndP \x3d lumaN;\n        bool doneN \x3d false;\n        bool doneP \x3d false;\n        posN +\x3d offNP * vec2(-1.0, -1.0);\n        posP +\x3d offNP * vec2( 1.0,  1.0);\n        for(int i \x3d 0; i \x3c FXAA_SEARCH_STEPS; i++) {\n          if(!doneN) {\n            lumaEndN \x3d FxaaLuma(texture2D(tex, posN.xy).xyz);\n          }\n          if(!doneP) {\n            lumaEndP \x3d FxaaLuma(texture2D(tex, posP.xy).xyz);\n          }\n          doneN \x3d doneN || (abs(lumaEndN - lumaN) \x3e\x3d gradientN);\n          doneP \x3d doneP || (abs(lumaEndP - lumaN) \x3e\x3d gradientN);\n          if(doneN \x26\x26 doneP) { break; }\n          if(!doneN) {\n            posN -\x3d offNP;\n          }\n          if(!doneP) {\n            posP +\x3d offNP;\n          }\n        }\n        float dstN \x3d horzSpan ? pos.x - posN.x : pos.y - posN.y;\n        float dstP \x3d horzSpan ? posP.x - pos.x : posP.y - pos.y;\n        bool directionN \x3d dstN \x3c dstP;\n        lumaEndN \x3d directionN ? lumaEndN : lumaEndP;\n        if(((lumaM - lumaN) \x3c 0.0) \x3d\x3d ((lumaEndN - lumaN) \x3c 0.0)) {\n          lengthSign \x3d 0.0;\n        }\n        float spanLength \x3d (dstP + dstN);\n        dstN \x3d directionN ? dstN : dstP;\n        float subPixelOffset \x3d (0.5 + (dstN * (-1.0/spanLength))) * lengthSign;\n        vec3 rgbF \x3d texture2D(tex, vec2(\n          pos.x + (horzSpan ? 0.0 : subPixelOffset),\n          pos.y + (horzSpan ? subPixelOffset : 0.0))).xyz;\n        return FxaaLerp3(rgbL, rgbF, blendL);\n      }\n\n      void main() {\n        vec4 color;\n        vec2 screenCoord \x3d fCoordinate;\n        // if (screenCoord.x \x3c 0.5) {\n          color.rgb \x3d FxaaPixelShader(screenCoord, uColorTexture, uRcpFrameDimension);\n        // } else if (screenCoord.x \x3c 0.501 \x26\x26 screenCoord.x \x3e 0.499) {\n        //   color.rgb \x3d vec3(1,0,0);\n        // } else {\n        //   color \x3d texture2D(uColorTexture, fCoordinate);\n        // }\n        color.a \x3d 1.0;\n        gl_FragColor \x3d color;\n      }",
this.vertexAttributeLocations);var c=new Float32Array([-1,-1,3,-1,-1,3]);this.vao=new m(a,this.vertexAttributeLocations,{geometry:this.vertexBufferLayout},{geometry:new f(a,34962,35044,c)});this.isEnabled=!0}};a.prototype.disable=function(){this.isEnabled&&(this.program.dispose(),this.program=null,this.vao.dispose(),this.vao=null,this.isEnabled=!1)};a.prototype.render=function(a,c){this.enable();var b=this.rctx;b.bindVAO(this.vao);b.bindFramebuffer(c);var e=0,g=0;null!=c?(e=c.descriptor.width,g=c.descriptor.height):
(e=b.gl.canvas.width,g=b.gl.canvas.height);b.bindProgram(this.program);b.bindTexture(a.colorTexture,0);this.program.setUniform1i("uColorTexture",0);this.program.setUniform2f("uRcpFrameDimension",1/e,1/g);b.setFaceCullingEnabled(!1);b.drawArrays(4,0,3)};return a}()})},"esri/views/3d/webgl-engine/lib/SmaaRenderPass":function(){define("require exports ../../../webgl/Program ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Texture ../../../webgl/FramebufferObject ../../../webgl/enums".split(" "),
function(a,h,p,m,f,e,l,g){return function(){function a(a){this.isEnabled=!1;this.vertexAttributeLocations={vPosition:0};this.vertexBufferLayout=[{name:"vPosition",count:2,type:5126,offset:0,stride:8,normalized:!1}];this.rctx=a}a.prototype.enable=function(){if(!this.isEnabled){var a=this.rctx;this.programEdgeDetect=new p(a,"\n      #define SHADER_NAME SMAA::EdgeDetect\n      precision highp float;\n      precision highp int;\n\n      uniform vec4 uResolution;\n      attribute vec2 vPosition;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[3];\n\n      void SMAAEdgeDetectionVS( vec2 texcoord ) {\n        fOffset[0] \x3d texcoord.xyxy + uResolution.xyxy * vec4( -1.0, 0.0, 0.0,  1.0 ); // WebGL port note: Changed sign in W component\n        fOffset[1] \x3d texcoord.xyxy + uResolution.xyxy * vec4(  1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component\n        fOffset[2] \x3d texcoord.xyxy + uResolution.xyxy * vec4( -2.0, 0.0, 0.0,  2.0 ); // WebGL port note: Changed sign in W component\n      }\n\n      void main() {\n        fTexCoord \x3d (vPosition + 1.0 ) * 0.5;\n        gl_Position \x3d vec4(vPosition, 0, 1);\n        SMAAEdgeDetectionVS( fTexCoord );\n      }",
"\n      #define SHADER_NAME SMAA::EdgeDetect\n      precision highp float;\n      precision highp int;\n\n      #define SMAA_THRESHOLD 0.05\n      #define SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR 2\n      #define SMAA_USE_COLOR_EDGE_DETECTION 0\n\n      uniform sampler2D tColor;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[3];\n\n      vec4 SMAALumaEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {\n        // Calculate the threshold:\n        vec2 threshold \x3d vec2(SMAA_THRESHOLD, SMAA_THRESHOLD);\n\n        // Calculate lumas:\n        vec3 weights \x3d vec3(0.2126, 0.7152, 0.0722);\n        float L \x3d dot(texture2D(colorTex, texcoord).rgb, weights);\n\n        float Lleft \x3d dot(texture2D(colorTex, offset[0].xy).rgb, weights);\n        float Ltop  \x3d dot(texture2D(colorTex, offset[0].zw).rgb, weights);\n\n        // We do the usual threshold:\n        vec4 delta;\n        delta.xy \x3d abs(L - vec2(Lleft, Ltop));\n        vec2 edges \x3d step(threshold, delta.xy);\n\n        // Then discard if there is no edge:\n        if (dot(edges, vec2(1.0, 1.0)) \x3d\x3d 0.0) discard;\n\n        // Calculate right and bottom deltas:\n        float Lright \x3d dot(texture2D(colorTex, offset[1].xy).rgb, weights);\n        float Lbottom  \x3d dot(texture2D(colorTex, offset[1].zw).rgb, weights);\n        delta.zw \x3d abs(L - vec2(Lright, Lbottom));\n\n        // Calculate the maximum delta in the direct neighborhood:\n        vec2 maxDelta \x3d max(delta.xy, delta.zw);\n\n        // Calculate left-left and top-top deltas:\n        float Lleftleft \x3d dot(texture2D(colorTex, offset[2].xy).rgb, weights);\n        float Ltoptop \x3d dot(texture2D(colorTex, offset[2].zw).rgb, weights);\n        delta.zw \x3d abs(vec2(Lleft, Ltop) - vec2(Lleftleft, Ltoptop));\n\n        // Calculate the final maximum delta:\n        maxDelta \x3d max(maxDelta.xy, delta.zw);\n        float finalDelta \x3d max(maxDelta.x, maxDelta.y);\n\n        // Local contrast adaptation:\n        edges.xy *\x3d step(finalDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy);\n\n        return vec4( edges, 0.0, 0.0 );\n      }\n\n      vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {\n        vec2 threshold \x3d vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );\n\n        // Calculate color deltas:\n        vec4 delta;\n        vec3 C \x3d texture2D( colorTex, texcoord ).rgb;\n\n        vec3 Cleft \x3d texture2D( colorTex, offset[0].xy ).rgb;\n        vec3 t \x3d abs( C - Cleft );\n        delta.x \x3d max( max( t.r, t.g ), t.b );\n\n        vec3 Ctop \x3d texture2D( colorTex, offset[0].zw ).rgb;\n        t \x3d abs( C - Ctop );\n        delta.y \x3d max( max( t.r, t.g ), t.b );\n\n        // We do the usual threshold:\n        vec2 edges \x3d step( threshold, delta.xy );\n\n        // Then discard if there is no edge:\n        if ( dot( edges, vec2( 1.0, 1.0 ) ) \x3d\x3d 0.0 )\n            discard;\n\n        // Calculate right and bottom deltas:\n        vec3 Cright \x3d texture2D( colorTex, offset[1].xy ).rgb;\n        t \x3d abs( C - Cright );\n        delta.z \x3d max( max( t.r, t.g ), t.b );\n\n        vec3 Cbottom  \x3d texture2D( colorTex, offset[1].zw ).rgb;\n        t \x3d abs( C - Cbottom );\n        delta.w \x3d max( max( t.r, t.g ), t.b );\n\n        // Calculate the maximum delta in the direct neighborhood:\n        float maxDelta \x3d max( max( max( delta.x, delta.y ), delta.z ), delta.w );\n\n        // Calculate left-left and top-top deltas:\n        vec3 Cleftleft  \x3d texture2D( colorTex, offset[2].xy ).rgb;\n        t \x3d abs( C - Cleftleft );\n        delta.z \x3d max( max( t.r, t.g ), t.b );\n\n        vec3 Ctoptop \x3d texture2D( colorTex, offset[2].zw ).rgb;\n        t \x3d abs( C - Ctoptop );\n        delta.w \x3d max( max( t.r, t.g ), t.b );\n\n        // Calculate the final maximum delta:\n        maxDelta \x3d max( max( maxDelta, delta.z ), delta.w );\n\n        // Local contrast adaptation in action:\n        edges.xy *\x3d step( maxDelta, float(SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR) * delta.xy );\n\n        return vec4( edges, 0.0, 0.0 );\n      }\n\n      void main() {\n        #if SMAA_USE_COLOR_EDGE_DETECTION\n          gl_FragColor \x3d SMAAColorEdgeDetectionPS( fTexCoord, fOffset, tColor );\n        #else\n          gl_FragColor \x3d SMAALumaEdgeDetectionPS( fTexCoord, fOffset, tColor );\n        #endif\n      }",
this.vertexAttributeLocations);this.programBlendWeights=new p(a,"\n      #define SHADER_NAME SMAA::BlendWeights\n      precision highp float;\n      precision highp int;\n\n      #define SMAA_MAX_SEARCH_STEPS 8\n\n      uniform vec4 uResolution;\n      attribute vec2 vPosition;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[3];\n      varying vec2 fPixCoord;\n\n      void SMAABlendingWeightCalculationVS( vec2 texcoord ) {\n        fPixCoord \x3d texcoord * uResolution.zw;\n        fOffset[0] \x3d texcoord.xyxy + uResolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );\n        fOffset[1] \x3d texcoord.xyxy + uResolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );\n        fOffset[2] \x3d vec4( fOffset[0].xz, fOffset[1].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * uResolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );\n      }\n\n      void main() {\n        fTexCoord \x3d (vPosition + 1.0 ) * 0.5;\n        gl_Position \x3d vec4(vPosition, 0, 1);\n        SMAABlendingWeightCalculationVS( fTexCoord );\n      }",
"\n      #define SHADER_NAME SMAA::BlendWeights\n      precision highp float;\n      precision highp int;\n\n      #define SMAA_MAX_SEARCH_STEPS 8\n      #define SMAA_AREATEX_MAX_DISTANCE 16\n      #define SMAA_AREATEX_PIXEL_SIZE ( 1.0 / vec2( 160.0, 560.0 ) )\n      #define SMAA_AREATEX_SUBTEX_SIZE ( 1.0 / 7.0 )\n\n      #define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * uResolution.xy, 0.0 )\n\n      uniform sampler2D tEdges;\n      uniform sampler2D tArea;\n      uniform sampler2D tSearch;\n      uniform vec4 uResolution;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[3];\n      varying vec2 fPixCoord;\n\n      vec2 round( vec2 x ) {\n        return sign( x ) * floor( abs( x ) + 0.5 );\n      }\n\n      float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {\n        e.r \x3d bias + e.r * scale;\n        return 255.0 * texture2D( searchTex, e, 0.0 ).r;\n      }\n\n      float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n        vec2 e \x3d vec2( 0.0, 1.0 );\n        for ( int i \x3d 0; i \x3c SMAA_MAX_SEARCH_STEPS; i ++ ) {\n          e \x3d texture2D( edgesTex, texcoord, 0.0 ).rg;\n          texcoord -\x3d vec2( 2.0, 0.0 ) * uResolution.xy;\n          if ( ! ( texcoord.x \x3e end \x26\x26 e.g \x3e 0.8281 \x26\x26 e.r \x3d\x3d 0.0 ) ) break;\n        }\n        texcoord.x +\x3d 0.25 * uResolution.x;\n        texcoord.x +\x3d uResolution.x;\n        texcoord.x +\x3d 2.0 * uResolution.x;\n        texcoord.x -\x3d uResolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);\n        return texcoord.x;\n      }\n\n      float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n        vec2 e \x3d vec2( 0.0, 1.0 );\n        for ( int i \x3d 0; i \x3c SMAA_MAX_SEARCH_STEPS; i ++ ) {\n          e \x3d texture2D( edgesTex, texcoord, 0.0 ).rg;\n          texcoord +\x3d vec2( 2.0, 0.0 ) * uResolution.xy;\n          if ( ! ( texcoord.x \x3c end \x26\x26 e.g \x3e 0.8281 \x26\x26 e.r \x3d\x3d 0.0 ) ) break;\n        }\n        texcoord.x -\x3d 0.25 * uResolution.x;\n        texcoord.x -\x3d uResolution.x;\n        texcoord.x -\x3d 2.0 * uResolution.x;\n        texcoord.x +\x3d uResolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );\n        return texcoord.x;\n      }\n\n      float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n        vec2 e \x3d vec2( 1.0, 0.0 );\n        for ( int i \x3d 0; i \x3c SMAA_MAX_SEARCH_STEPS; i ++ ) {\n          e \x3d texture2D( edgesTex, texcoord, 0.0 ).rg;\n          texcoord +\x3d vec2( 0.0, 2.0 ) * uResolution.xy;\n          if ( ! ( texcoord.y \x3e end \x26\x26 e.r \x3e 0.8281 \x26\x26 e.g \x3d\x3d 0.0 ) ) break;\n        }\n        texcoord.y -\x3d 0.25 * uResolution.y;\n        texcoord.y -\x3d uResolution.y;\n        texcoord.y -\x3d 2.0 * uResolution.y;\n        texcoord.y +\x3d uResolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );\n        return texcoord.y;\n      }\n\n      float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {\n        vec2 e \x3d vec2( 1.0, 0.0 );\n        for ( int i \x3d 0; i \x3c SMAA_MAX_SEARCH_STEPS; i ++ ) {\n          e \x3d texture2D( edgesTex, texcoord, 0.0 ).rg;\n          texcoord -\x3d vec2( 0.0, 2.0 ) * uResolution.xy;\n          if ( ! ( texcoord.y \x3c end \x26\x26 e.r \x3e 0.8281 \x26\x26 e.g \x3d\x3d 0.0 ) ) break;\n        }\n        texcoord.y +\x3d 0.25 * uResolution.y;\n        texcoord.y +\x3d uResolution.y;\n        texcoord.y +\x3d 2.0 * uResolution.y;\n        texcoord.y -\x3d uResolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );\n        return texcoord.y;\n      }\n\n      vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {\n        vec2 texcoord \x3d float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;\n        texcoord \x3d SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );\n        texcoord.y +\x3d SMAA_AREATEX_SUBTEX_SIZE * offset;\n        return texture2D( areaTex, texcoord, 0.0 ).rg;\n      }\n\n      vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {\n        vec4 weights \x3d vec4( 0.0, 0.0, 0.0, 0.0 );\n        vec2 e \x3d texture2D( edgesTex, texcoord ).rg;\n        if ( e.g \x3e 0.0 ) {\n          vec2 d;\n          vec2 coords;\n          coords.x \x3d SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );\n          coords.y \x3d offset[ 1 ].y;\n          d.x \x3d coords.x;\n          float e1 \x3d texture2D( edgesTex, coords, 0.0 ).r;\n          coords.x \x3d SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );\n          d.y \x3d coords.x;\n          d \x3d d * uResolution.z - pixcoord.x;\n          vec2 sqrt_d \x3d sqrt( abs( d ) );\n          coords.y -\x3d 1.0 * uResolution.y;\n          float e2 \x3d SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;\n          weights.rg \x3d SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );\n        }\n        if ( e.r \x3e 0.0 ) {\n          vec2 d;\n          vec2 coords;\n          coords.y \x3d SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );\n          coords.x \x3d offset[ 0 ].x;\n          d.x \x3d coords.y;\n          float e1 \x3d texture2D( edgesTex, coords, 0.0 ).g;\n          coords.y \x3d SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );\n          d.y \x3d coords.y;\n          d \x3d d * uResolution.w - pixcoord.y;\n          vec2 sqrt_d \x3d sqrt( abs( d ) );\n          coords.y -\x3d 1.0 * uResolution.y;\n          float e2 \x3d SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;\n          weights.ba \x3d SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );\n\n          // for some reason the following lines are necessary to prevent\n          // texture lookup precision issues on some Intel integrated graphics chips\n          vec4 dbg \x3d (offset[ 0 ]+offset[ 1 ]+offset[ 2 ] + coords.xyyx);\n          weights.r +\x3d 0.00000001 * dot(vec4(0,1,0,1),dbg);\n        }\n        return weights;\n      }\n\n      void main() {\n        gl_FragColor \x3d SMAABlendingWeightCalculationPS( fTexCoord, fPixCoord, fOffset, tEdges, tArea, tSearch, ivec4( 0.0 ) );\n      }",
this.vertexAttributeLocations);this.programBlur=new p(a,"\n      #define SHADER_NAME SMAA::NeighborhoodBlending\n      precision highp float;\n      precision highp int;\n\n      uniform vec4 uResolution;\n      attribute vec2 vPosition;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[2];\n\n      void SMAANeighborhoodBlendingVS( vec2 texcoord ) {\n        fOffset[0] \x3d texcoord.xyxy + uResolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );\n        fOffset[1] \x3d texcoord.xyxy + uResolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );\n      }\n\n      void main() {\n        fTexCoord \x3d (vPosition + 1.0 ) * 0.5;\n        gl_Position \x3d vec4(vPosition, 0, 1);\n\n        SMAANeighborhoodBlendingVS(fTexCoord);\n      }",
"\n      #define SHADER_NAME SMAA::NeighborhoodBlending\n      precision highp float;\n      precision highp int;\n\n      #define SMAA_DEBUG_SPLIT_VIEW 0\n\n      uniform sampler2D tBlendWeights;\n      uniform sampler2D tColor;\n      uniform vec4 uResolution;\n\n      varying vec2 fTexCoord;\n      varying vec4 fOffset[2];\n\n      vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {\n        vec4 a;\n        a.xz \x3d texture2D( blendTex, texcoord ).xz;\n        a.y \x3d texture2D( blendTex, offset[ 1 ].zw ).g;\n        a.w \x3d texture2D( blendTex, offset[ 1 ].xy ).a;\n\n        if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) \x3c 1e-5 ) {\n          return texture2D( colorTex, texcoord, 0.0 );\n        } else {\n          vec2 offset;\n          offset.x \x3d a.a \x3e a.b ? a.a : -a.b;\n          offset.y \x3d a.g \x3e a.r ? -a.g : a.r;\n\n          if ( abs( offset.x ) \x3e abs( offset.y )) {\n            offset.y \x3d 0.0;\n          } else {\n            offset.x \x3d 0.0;\n          }\n\n          vec4 C \x3d texture2D( colorTex, texcoord, 0.0 );\n          texcoord +\x3d sign( offset ) * uResolution.xy;\n          vec4 Cop \x3d texture2D( colorTex, texcoord, 0.0 );\n\n          float s \x3d abs( offset.x ) \x3e abs( offset.y ) ? abs( offset.x ) : abs( offset.y );\n          //C.xyz \x3d pow(C.xyz, vec3(2.2));\n          //Cop.xyz \x3d pow(Cop.xyz, vec3(2.2));\n          vec4 mixed \x3d mix(C, Cop, s);\n          //mixed.xyz \x3d pow(mixed.xyz, vec3(1.0 / 2.2));\n\n          return mixed;\n        }\n      }\n\n      void main() {\n        gl_FragColor \x3d SMAANeighborhoodBlendingPS( fTexCoord, fOffset, tColor, tBlendWeights );\n\n        #if SMAA_DEBUG_SPLIT_VIEW // split the view in the middle and display the unprocessed image on the right\n          // test stuff\n          if (fTexCoord.x \x3e 0.5) {\n            if (fTexCoord.x \x3c 0.5 + uResolution.x) {\n              gl_FragColor \x3d vec4(0, 0, 1, 1);\n            } else {\n              gl_FragColor \x3d texture2D(tColor, fTexCoord);\n            }\n          }\n        #endif // DEBUG\n      }",
this.vertexAttributeLocations);var c=new Float32Array([-1,-1,3,-1,-1,3]);this.vao=new m(a,this.vertexAttributeLocations,{geometry:this.vertexBufferLayout},{geometry:new f(a,34962,35044,c)});this.tmpFramebufferEdges=l.createWithAttachments(this.rctx,{target:3553,pixelFormat:6407,dataType:5121,samplingMode:9729,wrapMode:33071,width:4,height:4},{colorTarget:0,depthStencilTarget:0});this.tmpFramebufferBlend=l.createWithAttachments(this.rctx,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9729,
wrapMode:33071,width:4,height:4},{colorTarget:0,depthStencilTarget:0});this.textureArea=this.loadTextureFromBase64("data:image/png;base64,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\x3d",
9729,6407);this.textureSearch=this.loadTextureFromBase64("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII\x3d",9728,6409);this.isEnabled=!0}};a.prototype.disable=function(){this.isEnabled&&(this.programEdgeDetect.dispose(),this.programEdgeDetect=null,this.programBlendWeights.dispose(),this.programBlendWeights=null,this.programBlur.dispose(),this.programBlur=null,this.vao.dispose(),
this.vao=null,this.textureArea.dispose(),this.textureArea=null,this.textureSearch.dispose(),this.textureSearch=null,this.tmpFramebufferBlend.dispose(),this.tmpFramebufferBlend=null,this.tmpFramebufferEdges.dispose(),this.tmpFramebufferEdges=null,this.isEnabled=!1)};a.prototype.render=function(a,c){this.enable();var b=this.rctx,e=0,g=0;null!=c?(e=c.descriptor.width,g=c.descriptor.height):(e=b.gl.canvas.width,g=b.gl.canvas.height);b.bindVAO(this.vao);b.setFaceCullingEnabled(!0);b.setCullFace(1029);
b.setFrontFace(2305);b.setBlendingEnabled(!1);b.setDepthTestEnabled(!1);b.setViewport(0,0,e,g);this.tmpFramebufferEdges.resize(e,g);b.bindFramebuffer(this.tmpFramebufferEdges);b.setClearColor(0,0,0,1);b.clear(b.gl.COLOR_BUFFER_BIT);b.bindProgram(this.programEdgeDetect);b.bindTexture(a.colorTexture,0);this.programEdgeDetect.setUniform1i("tColor",0);this.programEdgeDetect.setUniform4f("uResolution",1/e,1/g,e,g);b.drawArrays(4,0,3);this.tmpFramebufferBlend.resize(e,g);b.bindFramebuffer(this.tmpFramebufferBlend);
b.setClearColor(0,0,1,1);b.clear(b.gl.COLOR_BUFFER_BIT);b.bindProgram(this.programBlendWeights);this.programBlendWeights.setUniform4f("uResolution",1/e,1/g,e,g);b.bindTexture(this.textureSearch,1);this.programBlendWeights.setUniform1i("tSearch",1);b.bindTexture(this.textureArea,2);this.programBlendWeights.setUniform1i("tArea",2);b.bindTexture(this.tmpFramebufferEdges.colorTexture,3);this.programBlendWeights.setUniform1i("tEdges",3);b.drawArrays(4,0,3);b.bindFramebuffer(c);b.setClearColor(0,1,0,1);
b.clear(b.gl.COLOR_BUFFER_BIT);b.bindProgram(this.programBlur);this.programBlur.setUniform4f("uResolution",1/e,1/g,e,g);b.bindTexture(a.colorTexture,0);this.programBlur.setUniform1i("tColor",0);b.bindTexture(this.tmpFramebufferBlend.colorTexture,1);this.programBlur.setUniform1i("tBlendWeights",1);b.drawArrays(4,0,3);b.setBlendingEnabled(!0);b.setDepthTestEnabled(!0)};a.prototype.loadTextureFromBase64=function(a,c,g){var b=new Image;b.src=a;var f=new e(this.rctx,{pixelFormat:g,dataType:5121,wrapMode:33071,
samplingMode:c},!1!==b.complete?b:null);b.complete||(b.onload=function(){f.resize(b.width,b.height);f.setData(b)});return f};return a}()})},"esri/views/3d/webgl-engine/lib/Camera":function(){define(["require","exports","./Util","./gl-matrix"],function(a,h,p,m){function f(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]}function e(a,b){return a[0]===b[0]&&a[1]===b[1]&&a[2]===b[2]&&a[3]===b[3]}var l=m.vec3d,g=m.vec4d,c=m.mat4d;a=function(){function a(a,b,e){this._viewUp=l.create();this._viewForward=
l.create();this._viewRight=l.create();this._viewport=g.create();this._padding=g.create();this._fov=55/180*Math.PI;this._near=0;this._far=1E3;this._viewDirty=!0;this._viewMatrix=c.create();this._projectionDirty=!0;this._projectionMatrix=c.create();this._viewInverseTransposeMatrixDirty=!0;this._viewInverseTransposeMatrix=null;this._frustumPlanesDirty=!0;this._frustumPlanes=[g.create(),g.create(),g.create(),g.create(),g.create(),g.create()];this._fullViewport=null;this.aboveGround=!0;this._eye=l.create(a);
this._center=l.create(b);this._up=void 0!==e?l.create(e):l.create([0,0,1]);this._padding=g.create()}Object.defineProperty(a.prototype,"eye",{get:function(){return this._eye},set:function(a){this._compareAndSetView(a,this._eye)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"center",{get:function(){return this._center},set:function(a){this._compareAndSetView(a,this._center)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"up",{get:function(){return this._up},
set:function(a){this._compareAndSetView(a,this._up)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"viewMatrix",{get:function(){this._ensureViewClean();return this._viewMatrix},set:function(a){c.set(a,this._viewMatrix);this._viewDirty=!1;this._frustumPlanesDirty=this._viewInverseTransposeMatrixDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"viewForward",{get:function(){this._ensureViewClean();return this._viewForward},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"viewUp",{get:function(){this._ensureViewClean();return this._viewUp},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"viewRight",{get:function(){this._ensureViewClean();return this._viewRight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"near",{get:function(){return this._near},set:function(a){this._near!==a&&(this._near=a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"far",{get:function(){return this._far},set:function(a){this._far!==a&&(this._far=a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"viewport",{get:function(){return this._viewport},set:function(a){this.x=a[0];this.y=a[1];this.width=a[2];this.height=a[3]},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"x",{get:function(){return this._viewport[0]},set:function(a){a+=this._padding[3];this._viewport[0]!==a&&(this._viewport[0]=
a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"y",{get:function(){return this._viewport[1]},set:function(a){a+=this._padding[2];this._viewport[1]!==a&&(this._viewport[1]=a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._viewport[2]},set:function(a){a-=this._padding[1]+this._padding[3];this._viewport[2]!==a&&(this._viewport[2]=
a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._viewport[3]},set:function(a){a-=this._padding[0]+this._padding[2];this._viewport[3]!==a&&(this._viewport[3]=a,this._frustumPlanesDirty=this._projectionDirty=!0)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fullWidth",{get:function(){return this._viewport[2]+this._padding[1]+this._padding[3]},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"fullHeight",{get:function(){return this._viewport[3]+this._padding[0]+this._padding[2]},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fullViewport",{get:function(){this._fullViewport||(this._fullViewport=g.create());this._fullViewport[0]=this._viewport[0]-this._padding[3];this._fullViewport[1]=this._viewport[1]-this._padding[2];this._fullViewport[2]=this.fullWidth;this._fullViewport[3]=this.fullHeight;return this._fullViewport},enumerable:!0,
configurable:!0});Object.defineProperty(a.prototype,"aspect",{get:function(){return this.width/this.height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"padding",{get:function(){return this._padding},set:function(a){if(this._padding[0]!==a[0]||this._padding[1]!==a[1]||this._padding[2]!==a[2]||this._padding[3]!==a[3])this._viewport[0]+=a[3]-this._padding[3],this._viewport[1]+=a[2]-this._padding[2],this._viewport[2]-=a[1]+a[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=
a[0]+a[2]-(this._padding[0]+this._padding[2]),g.set(a,this._padding),this._frustumPlanesDirty=this._projectionDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"projectionMatrix",{get:function(){if(this._projectionDirty){var a=this.width,b=this.height,e=this.near*Math.tan(this.fovY/2),g=e*this.aspect;c.frustum(-g*(1+2*this._padding[3]/a),g*(1+2*this._padding[1]/a),-e*(1+2*this._padding[2]/b),e*(1+2*this._padding[0]/b),this.near,this.far,this._projectionMatrix);this._projectionDirty=
!1}return this._projectionMatrix},set:function(a){c.set(a,this._projectionMatrix);this._projectionDirty=!1;this._frustumPlanesDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fov",{get:function(){return this._fov},set:function(a){this._fov=a;this._frustumPlanesDirty=this._projectionDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fovX",{get:function(){return p.fovd2fovx(this._fov,this.width,this.height)},set:function(a){this._fov=p.fovx2fovd(a,
this.width,this.height);this._frustumPlanesDirty=this._projectionDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fovY",{get:function(){return p.fovd2fovy(this._fov,this.width,this.height)},set:function(a){this._fov=p.fovy2fovd(a,this.width,this.height);this._frustumPlanesDirty=this._projectionDirty=!0},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"distance",{get:function(){return l.dist(this._center,this._eye)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"angleOfElevation",{get:function(){l.subtract(this._center,this._eye,b);l.normalize(b);var a=l.dot(this._center,b)/l.length(this._center);return Math.acos(p.clamp(a,-1,1))-.5*Math.PI},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"frustumPoints",{get:function(){return this.computeFrustumPoints()},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"frustumPlanes",{get:function(){this._frustumPlanesDirty&&(this._frustumPlanes=this._computeFrustumPlanes(this._frustumPlanes),
this._frustumPlanesDirty=!1);return this._frustumPlanes},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"viewInverseTransposeMatrix",{get:function(){if(this._viewInverseTransposeMatrixDirty||this._viewDirty)this._viewInverseTransposeMatrix||(this._viewInverseTransposeMatrix=c.create()),c.inverse(this.viewMatrix,this._viewInverseTransposeMatrix),c.transpose(this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1;return this._viewInverseTransposeMatrix},enumerable:!0,
configurable:!0});Object.defineProperty(a.prototype,"perPixelRatio",{get:function(){return Math.tan(this.fovX/2)/this.width},enumerable:!0,configurable:!0});a.prototype.copyFrom=function(a){l.set(a._eye,this._eye);l.set(a._center,this._center);l.set(a._up,this._up);g.set(a._viewport,this._viewport);g.set(a._padding,this._padding);this._near=a._near;this._far=a._far;this._fov=a._fov;this.aboveGround=a.aboveGround;a._viewDirty?this._frustumPlanesDirty=this._viewDirty=!0:(c.set(a._viewMatrix,this._viewMatrix),
l.set(a._viewRight,this._viewRight),l.set(a._viewUp,this._viewUp),l.set(a._viewForward,this._viewForward),this._viewDirty=!1);a._projectionDirty?this._frustumPlanesDirty=this._projectionDirty=!0:(c.set(a._projectionMatrix,this._projectionMatrix),this._projectionDirty=!1);return this};a.prototype.copy=function(){var b=new a;b.copyFrom(this);return b};a.prototype.equals=function(a){return f(this._eye,a._eye)&&f(this._center,a._center)&&f(this._up,a._up)&&e(this._viewport,a._viewport)&&e(this._padding,
a._padding)&&this._near===a._near&&this._far===a._far&&this._fov===a._fov};a.prototype.almostEquals=function(a,b){b=l.dist(this.eye,this.center)*(b||5E-4);b*=b;if(b=l.dist2(a.eye,this.eye)<b&&l.dist2(a.center,this.center)<b&&.001>Math.abs(a.fov-this.fov)){var c=a.padding,e=this.padding;a=e[0]-c[0];b=e[1]-c[1];var d=e[2]-c[2],c=e[3]-c[3];b=.5>a*a+b*b+d*d+c*c}return b};a.prototype.markViewDirty=function(){this._frustumPlanesDirty=this._viewDirty=!0};a.prototype.computePixelSizeAt=function(a){return 2*
l.dist(a,this._eye)*Math.tan(this.fovX/2)/this.width};a.prototype.computePixelSizeAtDist=function(a){return 2*a*Math.tan(this.fovX/2)/this.width};a.prototype.computeDistanceFromRadius=function(a,b){return a/Math.tan(Math.min(this.fovX,this.fovY)/(2*(b||1)))};a.prototype.copyFrustumPlanes=function(a){if(!a){a=Array(6);for(var b=0;6>b;++b)a[b]=g.create()}for(var c=this.frustumPlanes,b=0;6>b;b++)g.set(c[b],a[b]);return a};a.prototype.computeFrustumPoints=function(a){if(!a){a=Array(8);for(var b=0;8>b;++b)a[b]=
l.create()}p.matrix2frustum(this.viewMatrix,this.projectionMatrix,a);return a};a.prototype.setGLViewport=function(a){var b=this.viewport,c=this.padding;a.setViewport(b[0]-c[3],b[1]-c[2],b[2]+c[1]+c[3],b[3]+c[0]+c[2])};a.prototype.projectPoint=function(a,b,e){void 0===e&&(e=!1);g.set4(a[0],a[1],a[2],1,q);c.multiplyVec4(this.viewMatrix,q);e&&(b[2]=-q[2]);c.multiplyVec4(this.projectionMatrix,q);l.scale(q,1/Math.abs(q[3]));a=this.fullViewport;b[0]=p.lerp(0,a[0]+a[2],.5+.5*q[0]);b[1]=p.lerp(0,a[1]+a[3],
.5+.5*q[1]);e||(b[2]=.5*(q[2]+1));return b};a.prototype.unprojectPoint=function(a,b,e){void 0===e&&(e=!1);if(e)return console.error("Camera.unprojectPoint() not yet implemented for linear Z"),null;c.multiply(this.projectionMatrix,this.viewMatrix,x);if(!c.inverse(x))return null;e=this.fullViewport;q[0]=2*(a[0]-e[0])/e[2]-1;q[1]=2*(a[1]-e[1])/e[3]-1;q[2]=2*a[2]-1;q[3]=1;c.multiplyVec4(x,q);if(0===q[3])return null;b[0]=q[0]/q[3];b[1]=q[1]/q[3];b[2]=q[2]/q[3];return b};a.prototype.computeUpOnSphere=function(){l.subtract(this.center,
this.eye,y);var a=l.length(this.center);1>a?l.set3(0,0,1,this.up):Math.abs(l.dot(y,this.center))>.9999*l.length(y)*a||(l.cross(y,this.center,this.up),l.cross(this.up,y,this.up),l.normalize(this.up))};a.prototype._compareAndSetView=function(a,b){f(a,b)||(l.set(a,b),this._frustumPlanesDirty=this._viewDirty=!0)};a.prototype._computeFrustumPlanes=function(a){if(!a){a=Array(6);for(var b=0;6>b;++b)a[b]=g.create()}p.matrix2frustumPlanes(this.viewMatrix,this.projectionMatrix,a);return a};a.prototype._ensureViewClean=
function(){this._viewDirty&&(c.lookAt(this._eye,this._center,this._up,this._viewMatrix),l.set3(-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10],this._viewForward),l.set3(this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9],this._viewUp),l.set3(this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8],this._viewRight),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)};return a}();var b=l.create(),q=g.create(),x=c.create(),y=l.create();return a})},"esri/views/3d/webgl-engine/materials/internal/TexOnlyGLMaterial":function(){define("require exports dojo/text!./TexOnlyGLMaterial.xml ./MaterialUtil ../../lib/RenderSlot ../../lib/gl-matrix ../../../../webgl/Program ../../../../webgl/enums ../../lib/DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g,c){var b=e.vec4d.createFrom(1,1,1,1);return function(){function a(a,b,c,e,g){this.id=m.__GLMaterial_id++;this.program=a.get("texOnly");this.color=c;this.depthFunc=g;this.blend=e;this.texGLName=b}a.prototype.getId=function(){return this.id};a.prototype.beginSlot=function(a){return a===f.INTERNAL_MATERIAL};a.prototype.getProgram=function(){return this.program};a.prototype.setColor=function(a){this.color=a};a.prototype.bind=function(a,c){a.bindProgram(this.program);this.program.setUniformMatrix4fv("model",
m.IDENTITY);this.program.setUniformMatrix4fv("proj",c.proj);this.program.setUniform4fv("color",void 0!==this.color?this.color:b);this.program.setUniform1i("tex",0);a.bindTexture(this.texGLName,0);this.blend&&(a.setBlendingEnabled(!0),a.setBlendFunctionSeparate(a.gl.SRC_ALPHA,a.gl.ONE_MINUS_SRC_ALPHA,a.gl.ONE,a.gl.ONE_MINUS_SRC_ALPHA));a.setDepthTestEnabled(!0);void 0!==this.depthFunc&&a.setDepthFunction(this.depthFunc)};a.prototype.release=function(a){void 0!==this.depthFunc&&a.setDepthFunction(513);
this.blend&&a.setBlendingEnabled(!1)};a.prototype.bindView=function(a,b){m.bindView(b.origin,b.view,this.program)};a.prototype.bindInstance=function(a,b){this.program.setUniformMatrix4fv("model",b.transformation)};a.prototype.getDrawMode=function(a){return a.gl.TRIANGLES};a.loadShaders=function(a,b,e,g){a._parse(p);a=new l(g,a.vertexShaderTexOnly,a.fragmentShaderTexOnly,c.Default3D);e.add("texOnly",a)};return a}()})},"esri/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts":function(){define(["require",
"exports"],function(a,h){h.Pos3=[{name:"position",count:3,type:5126,offset:0,stride:12,normalized:!1}];h.Pos3Tex=[{name:"position",count:3,type:5126,offset:0,stride:20,normalized:!1},{name:"uv0",count:2,type:5126,offset:12,stride:20,normalized:!1}];h.Pos3Color=[{name:"position",count:3,type:5126,offset:0,stride:16,normalized:!1},{name:"color",count:4,type:5121,offset:12,stride:16,normalized:!1}];h.Pos3Norm=[{name:"position",count:3,type:5126,offset:0,stride:24,normalized:!1},{name:"normal",count:3,
type:5126,offset:12,stride:24,normalized:!1}];h.Pos3NormTex=[{name:"position",count:3,type:5126,offset:0,stride:32,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:32,normalized:!1},{name:"uv0",count:2,type:5126,offset:24,stride:32,normalized:!1}];h.Pos3NormCol=[{name:"position",count:3,type:5126,offset:0,stride:28,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:28,normalized:!1},{name:"color",count:4,type:5121,offset:24,stride:28,normalized:!1}];h.Pos3NormTexCol=
[{name:"position",count:3,type:5126,offset:0,stride:36,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:36,normalized:!1},{name:"uv0",count:2,type:5126,offset:24,stride:36,normalized:!1},{name:"color",count:4,type:5121,offset:32,stride:36,normalized:!1}];h.Pos3NormTexRegion=[{name:"position",count:3,type:5126,offset:0,stride:40,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:40,normalized:!1},{name:"uv0",count:2,type:5126,offset:24,stride:40,normalized:!1},{name:"region",
count:4,type:5123,offset:32,stride:40,normalized:!1}];h.Pos3NormTexRegionCol=[{name:"position",count:3,type:5126,offset:0,stride:44,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:44,normalized:!1},{name:"uv0",count:2,type:5126,offset:24,stride:44,normalized:!1},{name:"region",count:4,type:5123,offset:32,stride:44,normalized:!1},{name:"color",count:4,type:5121,offset:40,stride:44,normalized:!1}];h.Pos2=[{name:"position",count:2,type:5126,offset:0,stride:8,normalized:!1}];h.Pos2Tex=
[{name:"position",count:2,type:5126,offset:0,stride:16,normalized:!1},{name:"uv0",count:2,type:5126,offset:8,stride:16,normalized:!1}];h.Model=[{name:"model",count:16,type:5126,offset:0,stride:128,normalized:!1,divisor:1},{name:"modelNormal",count:16,type:5126,offset:64,stride:128,normalized:!1,divisor:1}];h.ModelCol=[{name:"model",count:16,type:5126,offset:0,stride:144,normalized:!1,divisor:1},{name:"modelNormal",count:16,type:5126,offset:64,stride:144,normalized:!1,divisor:1},{name:"instanceColor",
count:4,type:5126,offset:128,stride:144,normalized:!1,divisor:1}]})},"esri/views/3d/webgl-engine/lib/webgl-utils":function(){define([],function(){var a=function(a,p){for(var m=["webgl","experimental-webgl","webkit-3d","moz-webgl"],f=null,e=0;e<m.length;++e){try{f=a.getContext(m[e],p)}catch(l){}if(f)break}return f};return{create3DContext:a,setupWebGL:function(h,p){function m(a){var e=h.parentNode;e&&(e.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'+
a+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}if(!window.WebGLRenderingContext)return m('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'),[null,'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'];p=a(h,p);return p?[p]:(m('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'),
[null,'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'])},detectWebGL:function(){var h;try{h=window.WebGLRenderingContext}catch(m){h=[!1,0]}var p;try{p=a(document.createElement("canvas"))}catch(m){p=[!1,1]}h?p?(h=p,h=[!0,{VERSION:h.getParameter(h.VERSION),SHADING_LANGUAGE_VERSION:h.getParameter(h.SHADING_LANGUAGE_VERSION),VENDOR:h.getParameter(h.VENDOR),RENDERER:h.getParameter(h.RENDERER),
EXTENSIONS:h.getSupportedExtensions(),MAX_TEXTURE_SIZE:h.getParameter(h.MAX_TEXTURE_SIZE),MAX_RENDERBUFFER_SIZE:h.getParameter(h.MAX_RENDERBUFFER_SIZE),MAX_VERTEX_TEXTURE_IMAGE_UNITS:h.getParameter(h.MAX_VERTEX_TEXTURE_IMAGE_UNITS)}]):h=[!1,1]:h=[!1,0];return h}}})},"esri/views/3d/webgl-engine/parts/Viewport":function(){define("require exports dojo/has ../lib/PerformanceTimer ../lib/Camera ../lib/Util ../lib/BitSet ../lib/gl-matrix ./Visualizer".split(" "),function(a,h,p,m,f,e,l,g,c){var b=g.vec3;
a=g.vec4d;var q=g.mat4d,x=[0,0],y=q.create(),t=[a.create(),a.create(),a.create(),a.create(),a.create(),a.create()],u={get:function(a){return!0}};return function(){function a(a,e,d,k){this._content={};this._visibleContent=new l;this._frustumCullingEnabled=!0;this._maxFarNearRatio=2E4;this._stats={renderGeometriesTotal:0,renderGeometriesVisible:0,visualizerRenderTimer:null,viewportRenderTimer:null};this._needsRender=!0;this._rctx=k;this._gl=k.gl;this._visualizer=new c(a,e,d,this._rctx);this._camera=
new f(b.createFrom(0,100,-100),b.createFrom(0,0,0))}a.prototype.getCombinedStats=function(){var a={},b=this._visualizer.getCombinedStats(),d;for(d in b)a[d]=b[d];a.renderGeometriesTotal=this._stats.renderGeometriesTotal;a.renderGeometriesVisible=this._stats.renderGeometriesVisible;void 0!==this._gl.getUsedTextureMemory&&(a.textureMemory=this._gl.getUsedTextureMemory());void 0!==this._gl.getUsedRenderbufferMemory&&(a.renderbufferMemory=this._gl.getUsedRenderbufferMemory());void 0!==this._gl.getUsedVBOMemory&&
(a.VBOMemory=this._gl.getUsedVBOMemory());if(void 0!==this._gl.getUsedTextureMemoryStats){var b=this._gl.getUsedTextureMemoryStats(),c;for(c in b)a["texMem type: "+c]=b[c]}return a};a.prototype.dispose=function(){this._visualizer.dispose();this._visualizer=null};a.prototype.setLightingData=function(a){this._visualizer.setLightingData(a)};a.prototype.getLightingData=function(){return this._visualizer.getLightingData()};a.prototype.getViewParams=function(a){var b=this._visualizer.getViewParams(a);if(!a||
a.frustumCullingEnabled)b.frustumCullingEnabled=this._frustumCullingEnabled;if(!a||a.maxFarNearRatio)b.maxFarNearRatio=this._maxFarNearRatio;return b};a.prototype.setViewParams=function(a){void 0!==a.frustumCullingEnabled&&(this._frustumCullingEnabled=a.frustumCullingEnabled);void 0!==a.maxFarNearRatio&&(this._maxFarNearRatio=-1===a.maxFarNearRatio?2E4:a.maxFarNearRatio);this._visualizer.setViewParams(a);this._needsRender=!0};a.prototype.setRenderParams=function(a){this._visualizer.setRenderParams(a)};
a.prototype.getRenderParams=function(){return this._visualizer.getRenderParams()};a.prototype.getFrustumObjects=function(){var a={},b;for(b in this._content)this._visibleContent.get(this._content[b].idx)&&(a[this._content[b].name]=1);return a};a.prototype.modify=function(a,b,d,c){this._visualizer.modify(a,b,d,c);this._content=this._visualizer.getContent()};a.prototype.getContent=function(){return this._content};a.prototype.setSelectionObject=function(a,b){this._visualizer.setSelectionObject(a,b)};
a.prototype.setCamera=function(a){this._camera.copyFrom(a);this._computeVisibleContentAndUpdateNearFar();this._needsRender=!0};a.prototype.getCamera=function(){return this._camera};a.prototype.getPickRay=function(a,b,d){return this.pickRayWithBeginPoint(a,void 0,this._camera.viewMatrix,b,d)};a.prototype.pickRayWithBeginPoint=function(a,b,d,c,e){return this._visualizer.getPickRay(a,b,this._camera,d,c,e)};a.prototype.addExternalRenderer=function(a,b){return this._visualizer.addExternalRenderer(a,b)};
a.prototype.removeExternalRenderer=function(a){return this._visualizer.removeExternalRenderer(a)};a.prototype.getExternalRenderers=function(){return this._visualizer.getExternalRenderers()};a.prototype.render=function(a,b){var d=this._computeVisibleContentAndUpdateNearFar();this._visualizer.render(this._camera,a,d,b)};a.prototype.resetNeedsRender=function(){this._needsRender=!1;this._visualizer.resetNeedsRender()};a.prototype.needsRender=function(){return this._needsRender||this._visualizer.needsRender()};
a.prototype._computeVisibleContentAndUpdateNearFar=function(){return this._frustumCullingEnabled||0<this._maxFarNearRatio?(x[1]=0,this._computeFrustumCullingAndNearFar(this._camera.eye,this._visibleContent,x),0<this._maxFarNearRatio&&0<x[1]&&(this._camera.far=x[1],this._camera.near=Math.max(x[0],this._camera.far/this._maxFarNearRatio)),this._visibleContent):u};a.prototype._computeFrustumCullingAndNearFar=function(a,b,d){q.perspective(this._camera.fovY,this._camera.aspect,1,10,y);e.matrix2frustumPlanes(this._camera.viewMatrix,
y,t);b.clearAll();this._stats.renderGeometriesTotal=0;this._stats.renderGeometriesVisible=0;a=-Number.MAX_VALUE;var c=-Number.MAX_VALUE,g=t[0][0],f=t[0][1],n=t[0][2],l=t[0][3],m=t[1][0],h=t[1][1],r=t[1][2],w=t[1][3],u=t[2][0],p=t[2][1],x=t[2][2],P=t[2][3],I=t[3][0],J=t[3][1],Q=t[3][2],S=t[3][3],ga=t[4][0],L=t[4][1],R=t[4][2],U=t[4][3],T=t[5][3],N;for(N in this._content){var Z=this._content[N];this._stats.renderGeometriesTotal++;if(!Z.material.isBackdrop){var H=Z.center,O=H[0],aa=H[1],ba=H[2],H=Z.bsRadius;
if(g*O+f*aa+n*ba+l>H)continue;if(m*O+h*aa+r*ba+w>H)continue;if(u*O+p*aa+x*ba+P>H)continue;if(I*O+J*aa+Q*ba+S>H)continue;aa=ga*O+L*aa+R*ba;O=aa+H;H=-aa+H;O>a&&(a=O);H>c&&(c=H)}b.set(Z.idx);this._stats.renderGeometriesVisible++}b=a!==-Number.MAX_VALUE;0<this._stats.renderGeometriesVisible&&b&&(d[0]=.99*Math.max(1-(a+U),2),d[1]=1.01*Math.max(10+(c+T),d[0]+1))};return a}()})},"esri/views/3d/webgl-engine/lib/PerformanceTimer":function(){define(["require","exports","./Util"],function(a,h,p){return function(){function a(a){this._filterSampleIndex=
0;this._lastTime=NaN;this._numMeasurements=this._totalTime=0;this._filterSamples=Array(a);this.reset();this._filterSize=a}a.prototype.reset=function(){for(var a=this._filterSampleIndex=0;a<this._filterSize;a++)this._filterSamples[a]=NaN};a.prototype.start=function(){this._tsStart=p.performance.now()};a.prototype.stop=function(){this._lastTime=p.performance.now()-this._tsStart;this._totalTime+=this._lastTime;this._numMeasurements++;this._filterSize&&(this._filterSamples[this._filterSampleIndex]=this._lastTime,
this._filterSampleIndex=(this._filterSampleIndex+1)%this._filterSize);return this._lastTime};a.prototype.getLast=function(){return this._lastTime};a.prototype.getLastFiltered=function(){for(var a=0,e=0;e<this._filterSamples.length;e++)a+=this._filterSamples[e];return a/this._filterSamples.length};a.prototype.getAverage=function(){return this._totalTime/this._numMeasurements};a.prototype.getTotal=function(){return this._totalTime};a.prototype.getNumMeasurements=function(){return this._numMeasurements};
return a}()})},"esri/views/3d/webgl-engine/parts/Visualizer":function(){define("require exports ../lib/Renderer ../lib/SSAOHelperObscurance ../lib/ShadowMap ../lib/NearFarCalc ../lib/Util ../lib/gl-matrix ../lib/RenderPass ../lib/HighlightHelper ../lib/OffscreenRenderingHelper".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){var x=g.vec3d,y=g.mat4d,t=l.assert;return function(){function a(a,c,g,d){this._drawSSAOMapDebugQuad=this._drawShadowMapDebugQuad=!1;this._needsRender=!0;this._content={};this._rctx=
d;this._renderer=new p(a,c,g,this._rctx,!1);this._programRep=a;this._shadowMap=new f(a,this._rctx);this._ssaoHelper=new m(a,g,this._rctx,this.setNeedsRender.bind(this));this._nearFarCalc=new e;this._highlightHelper=new b(a,g,this._rctx);this._offscreenRenderingHelper=new q(a,this._rctx)}a.prototype.getCombinedStats=function(){return this._renderer.getCombinedStats()};a.prototype.dispose=function(){this._renderer.dispose();this._shadowMap.getEnableState()&&this._shadowMap.setEnableState(!1);this._shadowMap.dispose();
this._ssaoHelper.getEnableState()&&this._ssaoHelper.setEnableState(!1);this._ssaoHelper.dispose();this._highlightHelper.getEnableState()&&this._highlightHelper.setEnableState(!1);this._offscreenRenderingHelper.getEnableState()&&this._offscreenRenderingHelper.setEnableState(!1)};a.prototype.setLightingData=function(a){this._renderer.setLightingData(a)};a.prototype.getLightingData=function(){return this._renderer.getLightingData()};a.prototype.getViewParams=function(a){var b=a||{};if(!a||a.pixelRatio)b.pixelRatio=
this._renderer.getPixelRatio();return b};a.prototype.setViewParams=function(a){null!=a.pixelRatio&&this._renderer.setPixelRatio(a.pixelRatio)};a.prototype.setRenderParams=function(a){void 0!==a.shadowMapResolution&&!1===this._shadowMap.getEnableState()&&this._shadowMap.setTextureResolution(a.shadowMapResolution);void 0!==a.shadowMap&&a.shadowMap!==this._shadowMap.getEnableState()&&this._shadowMap.setEnableState(a.shadowMap);void 0!==a.shadowMapMaxCascades&&this._shadowMap.setMaxNumCascades(a.shadowMapMaxCascades);
!0!==this._highlightHelper.getEnableState()&&this._highlightHelper.setEnableState(!0);void 0!==a.ssao&&a.ssao!==this._ssaoHelper.getEnableState()&&this._ssaoHelper.setEnableState(a.ssao);void 0!==a.ssaoAttenuation&&this._ssaoHelper.setAttenuation(a.ssaoAttenuation);void 0!==a.ssaoRadius&&this._ssaoHelper.setRadius(a.ssaoRadius);void 0!==a.ssaoFilterRadius&&console.error("The property ssaoFilterRadius is no longer supported as a render parameter.");void 0!==a.ssaoSamples&&this._ssaoHelper.setSamples(a.ssaoSamples);
void 0!==a.drawShadowMapDebugQuad&&(this._drawShadowMapDebugQuad=a.drawShadowMapDebugQuad);void 0!==a.drawSSAODebugQuad&&(this._drawSSAOMapDebugQuad=a.drawSSAODebugQuad);this._ssaoHelper.getEnableState()?this._renderer.ssaoEnabled=!0:this._renderer.ssaoEnabled=!1;void 0!==a.offscreenRendering&&a.offscreenRendering!==this._offscreenRenderingHelper.getEnableState()&&this._offscreenRenderingHelper.setEnableState(a.offscreenRendering);void 0!==a.antialiasingEnabled&&(this._renderer.renderOptions.antialiasing=
a.antialiasingEnabled?"smaa":"none");void 0!==a.earlyOcclusionPixelDraw&&(this._renderer.renderOptions.earlyOcclusionPixelDraw=a.earlyOcclusionPixelDraw);this._needsRender=!0};a.prototype.getRenderParams=function(){var a={};this._shadowMap.getIsSupported()&&(a.shadowMap=this._shadowMap.getEnableState(),a.shadowMapResolution=this._shadowMap.getTextureResolution(),a.shadowMapMaxCascades=this._shadowMap.getMaxNumCascades());this._ssaoHelper.getIsSupported()&&(a.ssao=this._ssaoHelper.getEnableState(),
a.ssaoAttenuation=this._ssaoHelper.getAttenuation(),a.ssaoRadius=this._ssaoHelper.getRadius(),a.ssaoFilterRadius=this._ssaoHelper.getFilterRadius(),a.ssaoSamples=this._ssaoHelper.getSamples());return a};a.prototype.modify=function(a,b,c,d){this._renderer.modify(a,b,c,d);for(d=0;d<b.length;++d)delete this._content[b[d].uniqueName];for(d=0;d<a.length;++d)this._content[a[d].uniqueName]=a[d];for(d=0;d<c.length;++d)t(this._content[c[d].renderGeometry.uniqueName]===c[d].renderGeometry)};a.prototype.getContent=
function(){return this._content};a.prototype.getPickRay=function(a,b,c,d,e,g){x.unproject(x.createFrom(a[0],a[1],0),d,c.projectionMatrix,c.fullViewport,e);x.unproject(x.createFrom(a[0],a[1],1),d,c.projectionMatrix,c.fullViewport,g)};a.prototype.getProjectionMatrix=function(a,b,c,d,e){b=l.fovx2fovy(b,a[2],a[3]);y.perspective(180*b/Math.PI,a[2]/a[3],c,d,e)};a.prototype.setSelectionObject=function(a,b){this._renderer.setSelectionObject(a,b)};a.prototype.addExternalRenderer=function(a,b){return this._renderer.addExternalRenderer(a,
b)};a.prototype.removeExternalRenderer=function(a){return this._renderer.removeExternalRenderer(a)};a.prototype.getExternalRenderers=function(){return this._renderer.getExternalRenderers()};a.prototype.resetNeedsRender=function(){this._needsRender=!1;this._renderer.resetNeedsRender()};a.prototype.needsRender=function(){return this._needsRender||this._renderer.needsRender()};a.prototype.setNeedsRender=function(){this._needsRender=!0};a.prototype.render=function(a,b,e,d){var g=a.viewport,f;if(this._shadowMap.getEnableState()){f=
this._nearFarCalc.calculateSceneNearFar(a,this._content,e);this._shadowMap.prepare(a,b,this._content,e,f);b=this._shadowMap.getCascades();for(f=0;f<b.length;++f){var n=b[f];n.camera.setGLViewport(this._rctx);this._renderer.renderGeometryPass(c.MATERIAL_DEPTH_SHADOWMAP,n.camera,e)}this._shadowMap.finish(d);a.setGLViewport(this._rctx)}this._shadowMap.bindAll(this._programRep);this._renderer.renderAuxiliaryBuffers(a,e,this._shadowMap,this._ssaoHelper,d,this._offscreenRenderingHelper);this._renderer.render(a,
e,this._shadowMap,this._ssaoHelper,d,this._highlightHelper,this._offscreenRenderingHelper);this._drawShadowMapDebugQuad&&this._shadowMap.getEnableState()&&(a=y.ortho(g[0],g[2],g[1],g[3],-1,1),this._shadowMap.drawDebugQuad(a));this._drawSSAOMapDebugQuad&&this._ssaoHelper.getEnableState()&&(a=y.ortho(g[0],g[2],g[1],g[3],-1,1),this._ssaoHelper.drawQuad(a))};return a}()})},"esri/views/3d/webgl-engine/lib/SSAOHelperObscurance":function(){define("require exports ../../../../core/Logger ./Util ./gl-matrix dojo/text!../materials/internal/ssao.xml ../../../webgl/Program ../../../webgl/Texture ../../../webgl/FramebufferObject ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Util ../../../webgl/enums ./DefaultVertexBufferLayouts ./DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x,y,t,u){var r=f.vec3d,n=f.vec4d,w=p.getLogger("esri.views.3d.webgl-engine");a=function(){function a(a,b,d,c){this._enabled=!1;this._BLUR_F=2;this._attenuation=.5;this._radius=3;this._samples=16;this._viewportToRestore=n.create();this._rctx=d;this._programRep=a;this._textureRep=b;this._requestRender=c;this._emptyTexture=new g(d,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,width:4,height:4},null)}a.prototype.dispose=function(){this._emptyTexture.dispose();
this._emptyTexture=null};a.prototype.getIsSupported=function(){var a=this._rctx,b=-1!==a.parameters.versionString.indexOf("WebGL 0.93"),d=-1!==a.parameters.versionString.indexOf("WebGL 0.94");return a.extensions.standardDerivatives&&!(b||d)};a.prototype.setEnableState=function(a){a?this.enable():this.disable()};a.prototype.getEnableState=function(){return this._enabled};a.prototype.enable=function(){var a=this;if(!this.getEnableState())if(this.getIsSupported()){this._enabled=!0;var b={target:3553,
pixelFormat:6408,dataType:5121,samplingMode:9729,wrapMode:33071,width:0,height:0},d={colorTarget:0,depthStencilTarget:0};this._ssaoFBO=c.createWithAttachments(this._rctx,b,d);this._blur0FBO=c.createWithAttachments(this._rctx,b,d);this._blur1FBO=c.createWithAttachments(this._rctx,b,d);var e=new Image;e.src="data:image/png;base64,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\x3d\x3d";
e.onload=function(){a._noiseTexture=new g(a._rctx,{target:3553,pixelFormat:6408,dataType:5121,hasMipmap:!0,width:D,height:D},e);a._requestRender()}}else w.warn("SSAO is not supported for this browser or hardware")};a.prototype.getQuadVAO=function(){if(!this._quadVAO){var a=new Float32Array([-1,-1,1,-1,-1,1,1,1]);this._quadVAO=new b(this._rctx,u.Default3D,{geometry:t.Pos2},{geometry:q.createVertex(this._rctx,35044,a)})}return this._quadVAO};a.prototype.disable=function(){this.getEnableState()&&(this._enabled=
!1,this._quadVAO&&this._quadVAO.dispose(!0),this._noiseTexture&&this._noiseTexture.dispose(),this._blur1FBO.dispose(),this._blur0FBO.dispose(),this._ssaoFBO.dispose(),this._ssaoFBO=this._blur0FBO=this._blur1FBO=this._noiseTexture=this._quadVAO=null)};a.prototype.setAttenuation=function(a){this._attenuation=a};a.prototype.getAttenuation=function(){return this._attenuation};a.prototype.setRadius=function(a){this._radius=a};a.prototype.getRadius=function(){return this._radius};a.prototype.getFilterRadius=
function(){return 4};a.prototype.setSamples=function(a){this._samples=a};a.prototype.getSamples=function(){return this._samples};a.prototype.computeSSAO=function(a,b,c,e){if(this._noiseTexture){m.assert(this.getEnableState());var g=this._rctx,f=c.width,l=c.height,h=f/this._BLUR_F,q=l/this._BLUR_F;this._ssaoFBO.resize(f,l);this._blur0FBO.resize(h,q);this._blur1FBO.resize(h,q);h=1*f;q=1*l;g.bindFramebuffer(this._ssaoFBO);n.set(a.fullViewport,this._viewportToRestore);g.setViewport(0,0,f,l);var t=this._programRep.get(8>=
this._samples?"ssao8":16>=this._samples?"ssao16":32>=this._samples?"ssao32":"ssao64"),w=this._programRep.get("blur"),u=a.projectionMatrix;d[0]=-2/(h*u[0]);d[1]=-2/(q*u[5]);d[2]=(1-u[2])/u[0];d[3]=(1+u[6])/u[5];u=0===u[11];t.setUniform2f("rnmScale",f/D,l/D);t.setUniform3fv("pSphere",8>=this._samples?k:16>=this._samples?v:32>=this._samples?A:z);g.bindProgram(t);t.setUniform1f("numSpiralTurns",this._samples<B.length?B[this._samples]:5779);t.setUniform4fv("projInfo",new Float32Array(d));f=1/a.computePixelSizeAtDist(1);
t.setUniform1f("projScale",1*f);t.setUniform2f("screenDimensions",h,q);u?(t.setUniform2f("nearFar",a.near,a.far),t.setUniform2f("zScale",0,-1)):(t.setUniform2f("nearFar",a.near,a.far),t.setUniform2f("zScale",1,0));var p=2*this._radius,l=r.dist(a.eye,a.center),p=20*a.computePixelSizeAtDist(l),p=Math.max(.1,p);t.setUniform1f("radius",p);t.setUniform1f("intensity",4*this._attenuation/Math.pow(p,6));t.setUniform1i("rnm",0);t.setUniform1i("normalMap",1);t.setUniform1i("depthMap",2);g.bindTexture(this._noiseTexture,
0);g.bindTexture(e.colorTexture,1);g.bindTexture(c.colorTexture,2);c=this.getQuadVAO();g.bindVAO(c);g.drawArrays(5,0,x.vertexCount(c,"geometry"));g.bindTexture(this._ssaoFBO.colorTexture,0);g.setViewport(0,0,h/this._BLUR_F,q/this._BLUR_F);g.bindFramebuffer(this._blur0FBO);w.setUniform2f("screenDimensions",h,q);w.setUniform1i("tex",0);w.setUniform1i("normalMap",1);w.setUniform1i("depthMap",2);w.setUniform2f("blurSize",0,1*this._BLUR_F/q);w.setUniform1i("radius",4);w.setUniform1f("g_BlurFalloff",.08);
w.setUniform2f("nearFar",a.near,a.far);5E4<l&&(f=Math.max(0,f-(l-5E4)));w.setUniform1f("projScale",f);u?w.setUniform2f("zScale",0,-1):w.setUniform2f("zScale",1,0);g.drawArrays(5,0,x.vertexCount(c,"geometry"));w.setUniform2f("blurSize",1*this._BLUR_F/h,0);g.bindFramebuffer(this._blur1FBO);g.bindTexture(this._blur0FBO.colorTexture,0);g.drawArrays(5,0,x.vertexCount(c,"geometry"));g.bindFramebuffer(b);g.setViewport(this._viewportToRestore[0],this._viewportToRestore[1],this._viewportToRestore[2],this._viewportToRestore[3])}};
a.prototype.setUniforms=function(a){var b=this.getEnableState()&&this._noiseTexture,d=this._rctx;d.bindTexture(b?this._blur1FBO.colorTexture:this._emptyTexture,6);d.setActiveTexture(0);a.setUniform1i("ssaoTex",6);b?a.setUniform4f("viewportPixelSz",this._viewportToRestore[0],this._viewportToRestore[1],1/this._ssaoFBO.width,1/this._ssaoFBO.height):a.setUniform4f("viewportPixelSz",-1,-1,-1,-1)};a.prototype.bindAll=function(a){a=a.getProgramsUsingUniform("viewportPixelSz");for(var b=0;b<a.length;b++)this.setUniforms(a[b])};
a.prototype.drawQuad=function(a){m.assert(this.getEnableState());var d=this._programRep.get("showDepth");this._debugQuadVAO||(this._debugQuadVAO=new b(this._rctx,u.Default3D,{geometry:t.Pos2Tex},{geometry:q.createVertex(this._rctx,35044,C)}));var c=this._rctx;c.setDepthTestEnabled(!1);d.setUniformMatrix4fv("proj",new Float32Array(a));d.setUniform1i("depthTex",0);c.bindTexture(this._ssaoFBO.colorTexture,0);c.bindVAO(this._debugQuadVAO);c.drawArrays(5,0,x.vertexCount(this._debugQuadVAO,"geometry"));
c.setDepthTestEnabled(!0)};a.loadShaders=function(a,b,d,c){m.assert(null==a.samples);a.samples="samplesUNDEF";a._parse(e);b=new l(c,a.vertexShaderShowDepth,a.fragmentShaderShowDepth,u.Default3D);var g=a.createFsSSAOSrcObscurance,k=new l(c,a.vsUVQuad,g.replace("samplesUNDEF","8"),u.Default3D),f=new l(c,a.vsUVQuad,g.replace("samplesUNDEF","16"),u.Default3D),n=new l(c,a.vsUVQuad,g.replace("samplesUNDEF","32"),u.Default3D),g=new l(c,a.vsUVQuad,g.replace("samplesUNDEF","64"),u.Default3D);c=new l(c,a.vsUVQuad,
a.fsBlurEdgeAware,u.Default3D,["RADIUS "+(4).toString()]);d.add("showDepth",b);d.add("ssao8",k);d.add("ssao16",f);d.add("ssao32",n);d.add("ssao64",g);d.add("blur",c);delete a.samples};return a}();var d=n.create(),k=new Float32Array([.186937,0,0,.677503,0,0,-.782832,.128424,.557187,.248064,.460317,-.659755,.062892,.918659,.312829,-.241031,-.814826,.224206,-.642866,.132138,-.45016,.145727,-.590568,-.626141,.005017,-.002234,.012668]),v=new Float32Array([.186937,0,0,.700542,0,0,-.864858,-.481795,-.111713,
-.624773,.102853,-.730153,-.387172,.260319,.007229,-.222367,-.642631,-.707697,-.01336,-.014956,.169662,.122575,.1544,-.456944,-.177141,.85997,-.42346,-.131631,.814545,.524355,-.779469,.007991,.624833,.308092,.209288,.35969,.359331,-.184533,-.377458,.192633,-.482999,-.065284,.233538,.293706,-.055139,.417709,-.386701,.442449,-.301656,-.836426,.408344]),A=new Float32Array([.837372,0,0,.723531,-.467287,.034157,.169582,-.31169,-.881801,.696236,.455215,-.204568,-.304514,.528086,.626381,-.053116,.222507,
.037523,.199755,.311291,.916799,-.681552,-.516264,.501792,-.37127,.021088,.737477,-.029503,.209188,-.95298,-.573731,.009962,-.154202,-.257345,-.905958,.282747,.370779,.527867,-.669424,-.601758,-.191278,-.708243,.271796,.782684,.535565,-.006867,-.015312,-.017276,.419958,.265628,.233036,-.543898,.554747,-.174055,-.079242,.053475,-.099539,.372042,-.339267,-.357362,.015781,-.011352,.042707,-.340564,-.272507,-.067725,.799249,-.127948,.586808,.450015,.01965,-.416454,-.506524,.323229,.206546,-.087316,-.311097,
.466049,.146374,-.34528,-.045904,-.152614,-.926686,-.287529,-.665726,-.032904,.246643,.248703,.637193,-.062541,-.073706,.495925,-.315143,.05946,-.116042,.075586]),z=new Float32Array([.186937,0,0,.605726,-.313457,-.097616,.003541,.781245,.283011,-.225029,-.373279,.274442,-.047511,.04992,-.226365,.627629,-.623617,-.463628,.133094,-.318299,.528128,.262035,.100234,-.09012,.178335,-.426972,-.666048,-.27306,-.207352,.05514,-.613649,-.063395,.060608,-.283391,-.41382,-.087565,.136768,.506126,.484137,-.593808,
-.344603,.453164,.675326,.124799,-.697865,-.33502,.411337,-.09337,-.15271,.002908,-.063582,.366733,-.699739,.401148,-.519536,-.585625,-.508413,.106482,-.428709,-.260221,.012847,-.118806,.016962,-.188182,.49945,.452364,.586617,.722539,-.23302,.111295,.202827,.066695,-.036503,.315842,.896467,-.039109,-.270116,-.080062,.613435,.508787,.538656,-.352275,.566869,-.666275,.887876,-.138341,-.434135,-.444711,.269156,.119506,-.029457,-.077316,.754474,.274125,-.13876,-.37082,-.73268,.332723,.568545,-.203992,
.878922,-.430778,.541154,-.546752,.11786,-3.93E-4,-.083318,.059333,-.341406,-.117017,-.318568,-.262425,-.457913,.848753,.89229,-.30157,.322416,.742328,.032262,.643827,.048091,-.078044,-.49908,.064858,.549944,-.796252,-.230688,.88978,-.010153,.397241,-.27645,.405666,-.46593,.131187,-.600166,.333834,-.078219,.73837,-.870169,-.411658,-.222175,-.492421,.741454,.293757,-.591244,.389112,-.388324,.792346,.578552,.088459,-.121858,-.437241,-.472535,-.374835,.302427,.721264,.057485,.204085,-.126575,.510325,
.481492,-.579888,-.29411,-.82136,.156404,-.819717,-.042466,.456573,.079884,.07019,.179002,.220279,.970222,-.088025,-.299911,-.234627,-.820794,.912112,.243306,.317869,.241336,.161841,-.721568,.301135,-.635993,-.0939,-.514731,-.089673,.850964,-.905087,.314604,-.098397]),D=64,B=[1,1,1,2,3,2,5,2,3,2,3,3,5,5,3,4,7,5,5,7,9,8,5,5,7,7,7,8,5,8,11,12,7,10,13,8,11,8,7,14,11,11,13,12,13,19,17,13,11,18,19,11,11,14,17,21,15,16,17,18,13,17,11,17,19,18,25,18,19,19,29,21,19,27,31,29,21,18,17,29,31,31,23,18,25,26,
25,23,19,34,19,27,21,25,39,29,17,21,27,29],C=new Float32Array([0,0,0,0,512,0,1,0,0,512,0,1,512,512,1,1]);return a})},"esri/views/3d/webgl-engine/lib/ShadowMap":function(){define("./Camera ./Util ./gl-matrix ../../../../core/Logger ../../../webgl/Texture ../../../webgl/FramebufferObject ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ./DefaultVertexAttributeLocations ./DefaultVertexBufferLayouts ../../../webgl/Util".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){var x=p.vec2d,y=p.vec3d,t=
p.vec4d,u=p.mat3d,r=p.mat4d,n=p.mat4,w=m.getLogger("esri.views.3d.webgl-engine");return function(d,k){function m(a,b){y.set3(a[b],a[b+3],a[b+6],Fa);return Fa}var p=k.gl,z,D=4096,B,C=new f(k,{target:p.TEXTURE_2D,pixelFormat:p.RGBA,dataType:p.UNSIGNED_BYTE,samplingMode:p.NEAREST,width:4,height:4}),F=1,K=2,M=[0,0,0,0,0];this.dispose=function(){C.dispose();C=null};var E=function(){this.camera=new a;this.lightMat=r.create()},V=[],P,I,J;for(P=0;4>P;++P)V[P]=new E;this.getIsSupported=function(){return k.extensions.standardDerivatives};
this.setTextureResolution=function(a){D=a};this.getTextureResolution=function(){return D};this.setMaxNumCascades=function(a){K=h.clamp(Math.floor(a),1,4)};this.getMaxNumCascades=function(){return K};this.setEnableState=function(a){a?this.enable():this.disable()};this.getEnableState=function(){return void 0!==z};this.getDepthTexture=function(){return z};this.enable=function(){this.getEnableState()||(this.getIsSupported()?(z=new f(k,{target:p.TEXTURE_2D,pixelFormat:p.RGBA,dataType:p.UNSIGNED_BYTE,wrapMode:p.CLAMP_TO_EDGE,
samplingMode:p.NEAREST,flipped:!0,width:D,height:D}),B=e.createWithAttachments(k,z,{colorTarget:0,depthStencilTarget:1,width:D,height:D})):w.warn("Shadow maps are not supported for this browser or hardware"))};this.disable=function(){this.getEnableState()&&B&&(B.dispose(),z=B=void 0)};var Q=r.create(),S=r.create(),ga=t.create(),L=Array(8);for(P=0;8>P;++P)L[P]=t.create();var R=y.create(),U=y.create(),T=x.create(),N=x.create(),Z=x.create(),H=x.create(),O=x.create(),aa=r.create(),ba=y.create();this.prepare=
function(a,b,d,c,e){h.assert(this.getEnableState());r.multiply(a.projectionMatrix,a.viewMatrix,Q);var g=e[0],f=e[1];2>g&&(g=2);2>f&&(f=2);g>=f&&(g=2,f=4);F=Math.min(1+Math.floor(h.logWithBase(f/g,4)),K);d=Math.pow(f/g,1/F);for(e=0;e<F+1;++e)M[e]=g*Math.pow(d,e);r.inverse(Q,S);r.lookAt([0,0,0],[-b[0],-b[1],-b[2]],[0,1,0],aa);d=a.viewMatrix;a=a.projectionMatrix;for(e=0;e<F;++e){c=V[e];g=-M[e];f=-M[e+1];g=(a[10]*g+a[14])/Math.abs(a[11]*g+a[15]);f=(a[10]*f+a[14])/Math.abs(a[11]*f+a[15]);h.assert(g<f);
for(I=0;8>I;++I)for(t.set4(0===I%4||3==I%4?-1:1,0===I%4||1==I%4?-1:1,4>I?g:f,1,ga),r.multiplyVec4(S,ga,L[I]),J=0;3>J;++J)L[I][J]/=L[I][3];y.negate(L[0],ba);r.translate(aa,ba,c.camera.viewMatrix);for(I=0;8>I;++I)r.multiplyVec3(c.camera.viewMatrix,L[I]);y.set(L[0],R);y.set(L[0],U);for(I=1;8>I;++I)for(J=0;3>J;++J)R[J]=Math.min(R[J],L[I][J]),U[J]=Math.max(U[J],L[I][J]);R[2]-=200;U[2]+=200;c.camera.near=-U[2];c.camera.far=-R[2];g=1/L[0][3];f=1/L[4][3];h.assert(g<f);var n=g+Math.sqrt(g*f),l=Math.sin(Math.acos(d[2]*
b[0]+d[6]*b[1]+d[10]*b[2])),n=n/l,g=L,q=n,w=l,l=T,u=N,v=Z,A=H,n=O;x.set2(0,0,ma);for(var z=void 0,z=0;4>z;++z)x.add(ma,g[z],ma);x.scale(ma,.25);x.set2(0,0,wa);for(z=4;8>z;++z)x.add(wa,g[z],wa);x.scale(wa,.25);x.lerp(g[4],g[5],.5,na[0]);x.lerp(g[5],g[6],.5,na[1]);x.lerp(g[6],g[7],.5,na[2]);x.lerp(g[7],g[4],.5,na[3]);for(var E=0,C=x.dist2(na[0],ma),z=1;4>z;++z){var P=x.dist2(na[z],ma);P<C&&(C=P,E=z)}x.subtract(na[E],g[E+4],sa);z=sa[0];sa[0]=-sa[1];sa[1]=z;x.subtract(wa,ma,Ea);x.lerp(sa,Ea,w);x.normalize(sa);
E=w=void 0;w=E=x.dot(x.subtract(g[0],ma,pa),sa);for(z=1;8>z;++z)C=x.dot(x.subtract(g[z],ma,pa),sa),C<w?w=C:C>E&&(E=C);x.set(ma,l);x.scale(sa,w-q,pa);x.add(l,pa,l);for(var P=-1,X=1,z=q=C=0;8>z;++z){x.subtract(g[z],l,qa);x.normalize(qa);var ea=sa[0]*qa[1]-sa[1]*qa[0];0<ea?ea>P&&(P=ea,C=z):ea<X&&(X=ea,q=z)}h.verify(0<P,"leftArea");h.verify(0>X,"rightArea");x.scale(sa,w,ua);x.add(ua,ma,ua);x.scale(sa,E,va);x.add(va,ma,va);Ca[0]=-sa[1];Ca[1]=sa[0];u=h.rayRay2D(l,g[q],va,x.add(va,Ca,pa),1,u);v=h.rayRay2D(l,
g[C],va,pa,1,v);A=h.rayRay2D(l,g[C],ua,x.add(ua,Ca,pa),1,A);g=h.rayRay2D(l,g[q],ua,pa,1,n);h.verify(u,"rayRay");h.verify(v,"rayRay");h.verify(A,"rayRay");h.verify(g,"rayRay");v=T;g=N;l=H;A=O;n=c.camera.projectionMatrix;x.scale(x.subtract(l,A,Aa),.5);W[0]=Aa[0];W[1]=Aa[1];W[2]=0;W[3]=Aa[1];W[4]=-Aa[0];W[5]=0;W[6]=Aa[0]*Aa[0]+Aa[1]*Aa[1];W[7]=Aa[0]*Aa[1]-Aa[1]*Aa[0];W[8]=1;W[6]=-x.dot(m(W,0),v);W[7]=-x.dot(m(W,1),v);v=x.dot(m(W,0),l)+W[6];u=x.dot(m(W,1),l)+W[7];z=x.dot(m(W,0),A)+W[6];A=x.dot(m(W,1),
A)+W[7];v=-(v+z)/(u+A);W[0]+=W[1]*v;W[3]+=W[4]*v;W[6]+=W[7]*v;v=1/(x.dot(m(W,0),l)+W[6]);u=1/(x.dot(m(W,1),l)+W[7]);W[0]*=v;W[3]*=v;W[6]*=v;W[1]*=u;W[4]*=u;W[7]*=u;W[2]=W[1];W[5]=W[4];W[8]=W[7];W[7]+=1;v=x.dot(m(W,1),g)+W[7];u=x.dot(m(W,2),g)+W[8];z=x.dot(m(W,1),l)+W[7];A=x.dot(m(W,2),l)+W[8];v=-.5*(v/u+z/A);W[1]+=W[2]*v;W[4]+=W[5]*v;W[7]+=W[8]*v;v=x.dot(m(W,1),g)+W[7];u=x.dot(m(W,2),g)+W[8];z=-u/v;W[1]*=z;W[4]*=z;W[7]*=z;n[0]=W[0];n[1]=W[1];n[2]=0;n[3]=W[2];n[4]=W[3];n[5]=W[4];n[6]=0;n[7]=W[5];n[8]=
0;n[9]=0;n[10]=1;n[11]=0;n[12]=W[6];n[13]=W[7];n[14]=0;n[15]=W[8];c.camera.projectionMatrix[10]=2/(R[2]-U[2]);c.camera.projectionMatrix[14]=-(R[2]+U[2])/(R[2]-U[2]);r.multiply(c.camera.projectionMatrix,c.camera.viewMatrix,c.lightMat);g=D/2;c.camera.viewport[0]=0===e%2?0:g;c.camera.viewport[1]=0===Math.floor(e/2)?0:g;c.camera.viewport[2]=g;c.camera.viewport[3]=g}M[F]=100*f;k.bindFramebuffer(B);k.bindTexture(null,7);k.setClearColor(1,1,1,1);k.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT);k.setBlendingEnabled(!1)};
var X=[];this.getCascades=function(){for(var a=0;a<F;++a)X[a]=V[a];X.length=F;return X};this.finish=function(a){h.assert(this.getEnableState());k.bindFramebuffer(a)};this.bind=function(a){var b=this.getEnableState();k.bindTexture(b?z:C,7);k.bindProgram(a);a.setUniform1i("depthTex",7);a.setUniform1f("depthHalfPixelSz",b?.5/D:-1);a.setUniform1i("shadowMapNum",F);a.setUniform4f("shadowMapDistance",M[0],M[1],M[2],M[3])};this.bindAll=function(a){a=a.getProgramsUsingUniform("shadowMapDistance");for(var b=
0;b<a.length;b++)this.bind(a[b])};var ea=n.create(),la=new Float32Array(64);this.bindView=function(a,b){if(this.getEnableState()){var d;n.translate(V[0].lightMat,b,ea);for(d=0;16>d;++d)la[d]=ea[d];n.translate(V[1].lightMat,b,ea);for(d=0;16>d;++d)la[16+d]=ea[d];n.translate(V[2].lightMat,b,ea);for(d=0;16>d;++d)la[32+d]=ea[d];n.translate(V[3].lightMat,b,ea);for(d=0;16>d;++d)la[48+d]=ea[d];a.setUniformMatrix4fv("shadowMapMatrix",la)}};E=new Float32Array(16);E[0]=0;E[1]=0;E[2]=0;E[3]=0;E[4]=256;E[5]=0;
E[6]=1;E[7]=0;E[8]=0;E[9]=256;E[10]=0;E[11]=1;E[12]=256;E[13]=256;E[14]=1;E[15]=1;var ta=new l(k,c.Default3D,{geometry:b.Pos2Tex},{geometry:g.createVertex(k,p.STATIC_DRAW,E)});this.drawDebugQuad=function(a){h.assert(this.getEnableState());var b=d.get("showDepth");k.setDepthTestEnabled(!1);k.bindProgram(b);b.setUniformMatrix4fv("proj",a);b.setUniform1i("depthTex",0);k.bindTexture(z,0);k.bindVAO(ta);q.assertCompatibleVertexAttributeLocations(ta,b);k.drawArrays(p.TRIANGLE_STRIP,0,q.vertexCount(ta,"geometry"));
k.setDepthTestEnabled(!0)};var ma=x.create(),wa=x.create(),na=[x.create(),x.create(),x.create(),x.create()],sa=x.create(),Ea=x.create(),pa=x.create(),qa=x.create(),ua=x.create(),va=x.create(),Ca=x.create(),Fa=y.create(),Aa=x.create(),W=u.create()}})},"esri/views/3d/webgl-engine/lib/NearFarCalc":function(){define(["require","exports","./Util","./gl-matrix","./ComponentUtils"],function(a,h,p,m,f){a=m.vec3d;var e=m.vec4d,l=m.mat4d;m=function(){function a(){this._context={content:[],near:[],far:[],nearSpecial:[],
farSpecial:[],bestNear:0,bestFar:0,bestNear2:0,bestFar2:0};this._boundingInfoHelper=new g}a.prototype._resetContext=function(){var a=this._context;a.content.length=0;a.near.length=0;a.far.length=0;a.nearSpecial.length=0;a.farSpecial.length=0;a.bestNear=Number.MAX_VALUE;a.bestFar=-Number.MAX_VALUE;return this._context};a.prototype.calculateSceneNearFar=function(a,b,c){var e=this._resetContext(),g=a.viewMatrix,d=g[2],k=g[6],l=g[10],m=g[14],h=0,q;for(q in b)if(g=b[q],!f.isAllHidden(g.instanceParameters.componentVisibilities,
g.componentOffsets)&&g.castShadow&&c.get(g.idx)){var r=g.bsRadius,t=g.center,u=d*t[0]+k*t[1]+l*t[2]+m,t=u-r,r=u+r;e.content[h]=g;e.near[h]=-r;e.far[h]=-t;++h}if(0===h)return[e.bestNear,e.bestFar];for(b=0;b<h;++b)e.near[b]>e.bestFar&&(e.bestFar=e.near[b]),2<e.near[b]&&e.far[b]<e.bestNear&&(e.bestNear=e.far[b]);e.bestNear2=Math.max(.5*e.bestNear,2);e.bestFar2=2*e.bestFar;for(b=d=c=0;b<h;++b)e.near[b]<e.bestNear&&(e.near[b]>=e.bestNear2?e.bestNear=e.near[b]:e.nearSpecial[c++]=b),e.far[b]>e.bestFar&&
(e.far[b]<=e.bestFar2?e.bestFar=e.far[b]:e.farSpecial[d++]=b);if(0===c&&0===d)return[e.bestNear,e.bestFar];e.nearSpecial.length=c;e.farSpecial.length=d;e.nearSpecial.sort(function(a,b){return e.near[a]<e.near[b]?-1:e.near[a]>e.near[b]?1:0});e.farSpecial.sort(function(a,b){return e.far[a]<e.far[b]?1:e.far[a]>e.far[b]?-1:0});this._boundingInfoHelper.init(a,e);for(b=0;b<c;++b)e.near[e.nearSpecial[b]]<e.bestNear&&(g=e.content[e.nearSpecial[b]],a=g.boundingInfo,this._boundingInfoHelper.includeNearBoundingInfoRec(a,
g.transformation));for(b=0;b<d;++b)e.far[e.farSpecial[b]]>e.bestFar&&(g=e.content[e.farSpecial[b]],a=g.boundingInfo,this._boundingInfoHelper.includeFarBoundingInfoRec(a,g.transformation));return[e.bestNear,e.bestFar]};return a}();var g=function(){function a(){this._clippingHelper=new c;this._planes=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()];this._viewProj=l.create();this._view=l.create()}a.prototype.init=function(a,b){this._context=b;l.set(a.viewMatrix,this._view);l.multiply(a.projectionMatrix,
this._view,this._viewProj);a.copyFrustumPlanes(this._planes);this._clippingHelper.init(b)};a.prototype.includeNearBoundingInfoRec=function(a,b){var c=a.getBSRadius(),e=a.getCenter();l.multiplyVec3(b,e,q);var e=q[0],g=q[1],d=q[2],c=c*Math.sqrt(Math.max(Math.max(b[0]*b[0]+b[4]*b[4]+b[8]*b[8],b[1]*b[1]+b[5]*b[5]+b[9]*b[9]),b[2]*b[2]+b[6]*b[6]+b[10]*b[10]));if(!(this._planes[0][0]*e+this._planes[0][1]*g+this._planes[0][2]*d+this._planes[0][3]>c||this._planes[1][0]*e+this._planes[1][1]*g+this._planes[1][2]*
d+this._planes[1][3]>c||this._planes[2][0]*e+this._planes[2][1]*g+this._planes[2][2]*d+this._planes[2][3]>c||this._planes[3][0]*e+this._planes[3][1]*g+this._planes[3][2]*d+this._planes[3][3]>c||(e=this._view[2]*e+this._view[6]*g+this._view[10]*d+this._view[14],g=e+c,2>-(e-c)||-g>=this._context.bestNear)))if(-g>this._context.bestNear2)this._context.bestNear=-g;else{if(100<c&&(c=a.getChildren(),void 0!==c)){for(a=0;8>a;++a)void 0!==c[a]&&this.includeNearBoundingInfoRec(c[a],b);return}this._clippingHelper.intersectFrustumAABB(this._viewProj,
b,a.getBBMin(),a.getBBMax())}};a.prototype.includeFarBoundingInfoRec=function(a,b){var c=a.getBSRadius(),e=a.getCenter();l.multiplyVec3(b,e,q);var e=q[0],g=q[1],d=q[2],c=c*Math.sqrt(Math.max(Math.max(b[0]*b[0]+b[4]*b[4]+b[8]*b[8],b[1]*b[1]+b[5]*b[5]+b[9]*b[9]),b[2]*b[2]+b[6]*b[6]+b[10]*b[10]));if(!(this._planes[0][0]*e+this._planes[0][1]*g+this._planes[0][2]*d+this._planes[0][3]>c||this._planes[1][0]*e+this._planes[1][1]*g+this._planes[1][2]*d+this._planes[1][3]>c||this._planes[2][0]*e+this._planes[2][1]*
g+this._planes[2][2]*d+this._planes[2][3]>c||this._planes[3][0]*e+this._planes[3][1]*g+this._planes[3][2]*d+this._planes[3][3]>c||(e=this._view[2]*e+this._view[6]*g+this._view[10]*d+this._view[14]-c,-e<=this._context.bestFar)))if(-e<this._context.bestFar2)this._context.bestFar=-e;else{if(100<c&&(c=a.getChildren(),void 0!==c)){for(a=0;8>a;++a)void 0!==c[a]&&this.includeFarBoundingInfoRec(c[a],b);return}this._clippingHelper.intersectFrustumAABB(this._viewProj,b,a.getBBMin(),a.getBBMax())}};return a}(),
c=function(){function a(){this._clipP=Array(8);for(var a=0;8>a;++a)this._clipP[a]=e.create()}a.prototype.init=function(a){this._context=a};a.prototype.intersectFrustumAABB=function(a,c,e,g){l.multiply(a,c,x);for(a=0;8>a;++a){c=this._clipP[a];var f=0===a||3===a||4===a||7===a?e[0]:g[0],d=0===a||1===a||4===a||5===a?e[1]:g[1],k=4>a?e[2]:g[2];c[0]=x[0]*f+x[4]*d+x[8]*k+x[12];c[1]=x[1]*f+x[5]*d+x[9]*k+x[13];c[2]=x[2]*f+x[6]*d+x[10]*k+x[14];c[3]=x[3]*f+x[7]*d+x[11]*k+x[15]}for(a=0;12>a;++a){e=this._clipTriangle(this._clipP[b[a][0]],
this._clipP[b[a][1]],this._clipP[b[a][2]]);g=!0;for(c=0;c<e.length;++c)if(f=e[c][3],2<=f){g=!1;break}if(!g)for(c=0;c<e.length;++c)f=e[c][3],f<this._context.bestNear&&(this._context.bestNear=f),f>this._context.bestFar&&(this._context.bestFar=f)}};a.prototype._inside=function(a,b){if(0===b)return a[0]>=-a[3];if(1===b)return a[1]>=-a[3];if(2===b)return a[0]<=a[3];if(3===b)return a[1]<=a[3];p.assert(!1)};a.prototype._intersect=function(a,b,c){var g=0;0===c?g=(-a[3]-a[0])/(b[0]-a[0]+b[3]-a[3]):1===c?g=
(-a[3]-a[1])/(b[1]-a[1]+b[3]-a[3]):2===c?g=(a[3]-a[0])/(b[0]-a[0]-b[3]+a[3]):3===c&&(g=(a[3]-a[1])/(b[1]-a[1]-b[3]+a[3]));return e.lerp(a,b,g,e.create())};a.prototype._clipTriangle=function(a,b,c){a=[a,b,c];for(b=0;4>b;++b){c=a;a=[];for(var e=0;e<c.length;++e){var g=c[e],d=c[(e+1)%c.length];this._inside(d,b)?(this._inside(g,b)||a.push(this._intersect(g,d,b)),a.push(d)):this._inside(g,b)&&a.push(this._intersect(g,d,b))}}return a};return a}(),b=[[0,1,3],[2,3,1],[1,5,2],[6,2,5],[5,4,6],[7,6,4],[4,0,
7],[3,7,0],[3,2,7],[6,7,2],[4,5,0],[1,0,5]],q=a.create(),x=l.create();return m})},"esri/views/3d/webgl-engine/lib/HighlightHelper":function(){define("require exports ./Util ./gl-matrix dojo/text!../materials/internal/highlight.xml ../../../webgl/FramebufferObject ../../../webgl/Program ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Util ../../../webgl/enums ./DefaultVertexBufferLayouts ./DefaultVertexAttributeLocations".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x,y){var t=
m.vec4d;return function(){function a(a,b,c){this.blur1Fbo=this.blur0Fbo=this.quadVAO=null;this._rctx=c;this.viewportToRestore=t.create();this.programRep=a;this.color=t.create();this.exponent=.3;this.fill=.1;t.set4(1,0,.5,1,this.color)}a.prototype.createQuadVAO=function(){var a=this._rctx,b=new Float32Array([-1,-1,1,-1,-1,1,1,1]);return new g(a,y.Default3D,{geometry:x.Pos2},{geometry:c.createVertex(a,35044,b)})};a.prototype.getIsSupported=function(){return!0};a.prototype.setEnableState=function(a){a?
this.enable():this.disable()};a.prototype.getEnableState=function(){return null!==this.blur0Fbo};a.prototype.enable=function(){this.quadVAO=this.createQuadVAO();var a={colorTarget:0,depthStencilTarget:0,width:0,height:0};this.blur0Fbo=e.create(this._rctx,a);this.blur1Fbo=e.create(this._rctx,a)};a.prototype.disable=function(){this.getEnableState()&&(this.quadVAO.dispose(!0),this.blur1Fbo.dispose(),this.blur0Fbo.dispose(),this.blur1Fbo=this.blur0Fbo=this.quadVAO=null)};a.prototype.getHighlightFBO=function(){return this.blur0Fbo};
a.prototype.render=function(a,c,e){this.updateDebugData();var d=this._rctx;p.assert(this.getEnableState());t.set(a.fullViewport,this.viewportToRestore);a=Math.ceil(e.width/2);var g=Math.ceil(e.height/2);this.blur0Fbo.resize(a,g);this.blur1Fbo.resize(a,g);var f=this.programRep.get("highlight-blur"),n=this.programRep.get("highlight-apply");d.bindVAO(this.quadVAO);d.setDepthWriteEnabled(!1);d.setDepthTestEnabled(!1);d.setBlendingEnabled(!1);d.bindFramebuffer(this.blur0Fbo);d.bindTexture(e.colorTexture,
0);d.bindProgram(f);f.setUniform1i("tex",0);f.setUniform2f("blurSize",1/a,0);d.setViewport(0,0,a,g);d.drawArrays(5,0,b.vertexCount(this.quadVAO,"geometry"));d.bindFramebuffer(this.blur1Fbo);this.blur0Fbo.colorTexture.setSamplingMode(9729);d.bindTexture(this.blur0Fbo.colorTexture,0);f.setUniform2f("blurSize",0,1/g);d.drawArrays(5,0,b.vertexCount(this.quadVAO,"geometry"));d.bindFramebuffer(c);d.setBlendingEnabled(!0);d.setBlendFunctionSeparate(770,771,1,771);d.setViewport(this.viewportToRestore[0],
this.viewportToRestore[1],this.viewportToRestore[2],this.viewportToRestore[3]);d.bindProgram(n);n.setUniform1i("tex",0);this.blur1Fbo.colorTexture.setSamplingMode(9729);d.bindTexture(this.blur1Fbo.colorTexture,0);n.setUniform1i("origin",1);n.setUniform4fv("color",this.color);n.setUniform1f("exponent",this.exponent);n.setUniform1f("fill",this.fill);d.bindTexture(e.colorTexture,1);d.drawArrays(5,0,b.vertexCount(this.quadVAO,"geometry"));d.bindVAO(null);d.setDepthWriteEnabled(!0);d.setDepthTestEnabled(!0);
d.setBlendingEnabled(!1)};a.prototype.updateDebugData=function(){window.webglEngineHighlightColor?t.set(window.webglEngineHighlightColor,this.color):window.webglEngineHighlightColor=[this.color[0],this.color[1],this.color[2],this.color[3]];void 0!==window.webglEngineHighlightExponent?this.exponent=window.webglEngineHighlightExponent:window.webglEngineHighlightExponent=this.exponent;void 0!==window.webglEngineHighlightFill?this.fill=window.webglEngineHighlightFill:window.webglEngineHighlightFill=this.fill};
a.loadShaders=function(a,b,c,d){a._parse(f);b=new l(d,a.vsHighlightBlurG9,a.fsHighlightBlurG9,y.Default3D);a=new l(d,a.vsHighlightApply,a.fsHighlightApply,y.Default3D);c.add("highlight-blur",b);c.add("highlight-apply",a)};return a}()})},"esri/views/3d/webgl-engine/lib/OffscreenRenderingHelper":function(){define("require exports ./Util dojo/text!../materials/internal/offscreen.xml ../../../webgl/FramebufferObject ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ../../../webgl/Program ../../../webgl/Util ../../../webgl/enums ./DefaultVertexBufferLayouts ./DefaultVertexAttributeLocations".split(" "),
function(a,h,p,m,f,e,l,g,c,b,q,x){return function(){function a(a,b){this._enabled=!1;this.height=this.width=0;this._programRep=a;this._rctx=b;this.height=this.width=null}a.prototype.enable=function(){if(!this.getEnableState()){var a=this._rctx;this._enabled=!0;this.framebuffer=f.createWithAttachments(a,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9729,wrapMode:33071,width:0,height:0},{colorTarget:0,depthStencilTarget:a.extensions.depthTexture?4:3});this.quadVAO=this.createQuadVAO(a)}};
a.prototype.disable=function(){this.getEnableState()&&(this._enabled=!1,this.framebuffer.dispose(),this.quadVAO.dispose(!0),this._depthStencilTextureCached=this.quadVAO=this.framebuffer=null)};a.prototype.createQuadVAO=function(a){var b=new Float32Array([-1,-1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,1,1,1]);return new e(a,x.Default3D,{geometry:q.Pos2Tex},{geometry:l.createVertex(a,35044,b)})};a.prototype.setEnableState=function(a){a?this.enable():this.disable()};a.prototype.getEnableState=function(){return this._enabled};
a.prototype.getColorTexture=function(){return this.framebuffer.colorTexture};a.prototype.getDepthTexture=function(){return a.supportsDepthTexture(this._rctx.extensions)?this.framebuffer.depthStencilTexture||this._depthStencilTextureCached:null};a.supportsDepthTexture=function(a){return!!a.depthTexture};a.prototype.initializeFrame=function(a){p.assert(this.getEnableState());var b=this._rctx,c=b.gl;a=a.fullViewport;this.width=a[2];this.height=a[3];this.framebuffer.resize(this.width,this.height);b.bindFramebuffer(this.framebuffer);
b.setStencilWriteMask(255);b.setClearStencil(0);b.setClearColor(0,0,0,1);b.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT|c.STENCIL_BUFFER_BIT)};a.prototype.bindFramebuffer=function(){this._rctx.bindFramebuffer(this.framebuffer)};a.prototype.getFramebuffer=function(){return this.framebuffer};a.prototype.detachDepthTextureFromBuffer=function(){this._depthStencilTextureCached=this.framebuffer.depthStencilTexture;this.framebuffer.detachDepthStencilTexture()};a.prototype.restoreDepthTextureToBuffer=function(){this.framebuffer.attachDepthStencilTexture(this._depthStencilTextureCached);
this._depthStencilTextureCached=null};a.prototype.drawQuad=function(a){p.assert(this.getEnableState());a=this._rctx;var b=a.gl,e=this._programRep.get("offscreenProgram");a.bindFramebuffer();a.setDepthTestEnabled(!1);a.clear(b.COLOR_BUFFER_BIT);a.bindProgram(e);e.setUniform1i("tex",1);a.bindTexture(this.framebuffer.colorTexture,1);a.bindVAO(this.quadVAO);a.drawArrays(5,0,c.vertexCount(this.quadVAO,"geometry"));a.setDepthTestEnabled(!0)};a.loadShaders=function(a,b,c,e){a._parse(m);a=new g(e,a.vsOffscreenRenderer,
a.fsOffscreenRenderer,x.Default3D);c.add("offscreenProgram",a)};return a}()})},"esri/views/3d/webgl-engine/materials/repository":function(){define("dojo/text!./internal/util.xml ./BillboardMaterial ./ColorMaterial ./HUDMaterial ./LeafCardMaterial ./Material ./RibbonLineMaterial ./WaterMaterial ./internal/SimpleGLMaterial ./internal/TexOnlyGLMaterial ./internal/BlendLayers".split(" "),function(a,h,p,m,f,e,l,g,c,b,q){return{initializeShaders:function(x,y,t,u){x._parse(a);c.loadShaders(x,y,t,u);b.loadShaders(x,
y,t,u);e.loadShaders(x,y,t,u);h.loadShaders(x,y,t,u);m.loadShaders(x,y,t,u);f.loadShaders(x,y,t,u);l.loadShaders(x,y,t,u);g.loadShaders(x,y,t,u);q.loadShaders(x,y,t,u);p.loadShaders(x,y,t,u)}}})},"esri/views/3d/webgl-engine/materials/BillboardMaterial":function(){define("dojo/text!./BillboardMaterial.xml ./internal/MaterialUtil ../lib/RenderSlot ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../lib/DefaultVertexBufferLayouts ../../../webgl/Util".split(" "),function(a,h,p,m,f,e,l){var g=
function(a,g){h.basicMaterialConstructor(this,g);var f=e.Pos3NormTex;this.getSize=function(){return 1.05};this.dispose=function(){};this.getTextureId=function(){return a};this.getOutputAmount=function(a){var b=l.getStride(f)/4;return a*b*6};this.getVertexBufferLayout=function(){return f};this.fillInterleaved=function(a,b,c,e,d,g){e=h.fill;var f=a.faces.indices.va,k=a.vertexAttr.va.data,n=a.vertexAttr.tc4.data,l=a.vertexAttr.n0.data,m=a.vertexAttr.n1.data,q=a.vertexAttr.n2.data;a=a.vertexAttr.n3.data;
for(var r=0;r<f.length;++r){var t=4*f[r],w=3*f[r];g+=e(k,t,d,g,b,3);g+=e(l,w,d,g,c,3);d[g++]=n[t];d[g++]=n[t+1];g+=e(k,t,d,g,b,3);g+=e(m,w,d,g,c,3);d[g++]=n[t+2]+1;d[g++]=n[t+1];g+=e(k,t,d,g,b,3);g+=e(q,w,d,g,c,3);d[g++]=n[t+2]+1;d[g++]=n[t+3]+1;g+=e(k,t,d,g,b,3);g+=e(q,w,d,g,c,3);d[g++]=n[t+2]+1;d[g++]=n[t+3]+1;g+=e(k,t,d,g,b,3);g+=e(a,w,d,g,c,3);d[g++]=n[t];d[g++]=n[t+3]+1;g+=e(k,t,d,g,b,3);g+=e(l,w,d,g,c,3);d[g++]=n[t];d[g++]=n[t+1]}};this.intersect=function(){};this.getGLMaterials=function(){return{color:c,
depthShadowMap:q,normal:void 0,depth:b,highlight:void 0}};this.getAllTextureIds=function(){return[a]}},c=function(a,b,c){h.basicGLMaterialConstructor(this,a);var e=p.TRANSPARENT_MATERIAL,g=b.get("billboard");h.singleTextureGLMaterialConstructor(this,c,{textureId:a.getTextureId()});this.beginSlot=function(a){return e===a};this.getProgram=function(){return g};this.bind=function(a,b){a.bindProgram(g);this.bindTexture(a,g);a.setBlendingEnabled(!0);a.setBlendFunctionSeparate(a.gl.SRC_ALPHA,a.gl.ONE_MINUS_SRC_ALPHA,
a.gl.ONE,a.gl.ONE_MINUS_SRC_ALPHA);a.setDepthTestEnabled(!0)};this.release=function(a){};this.bindView=function(a,b){h.bindView(b.origin,b.view,g)};this.bindInstance=function(a,b){g.setUniformMatrix4fv("model",b.transformation);g.setUniformMatrix4fv("modelNormal",b.transformationNormal)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},b=function(a,b,c,e){h.basicGLMaterialConstructor(this,a);var g=p.TRANSPARENT_MATERIAL,f=null==e?b.get("billboardDepth"):b.get("billboardDepthShadowMap");h.singleTextureGLMaterialConstructor(this,
c,{textureId:a.getTextureId()});this.beginSlot=function(a){return g===a};this.getProgram=function(){return f};this.bind=function(a,b){a.bindProgram(f);this.bindTexture(a,f);f.setUniform2fv("nearFar",b.nearFar)};this.release=function(a){};this.bindView=function(a,b){h.bindView(b.origin,b.view,f)};this.bindInstance=function(a,b){f.detUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},q=function(a,c,e){b.call(this,a,c,e,!0)};g.loadShaders=function(b,c,e,
g){b._parse(a);var l=new m(g,b.vertexShaderBillboard,b.fragmentShaderBillboard,f.Default3D),n=c.get("fsDepthTextured");c=c.get("fsDepthTexturedShadowMap");n=new m(g,b.vertexShaderBillboardDepth,n.source,f.Default3D,n.defines);b=new m(g,b.vertexShaderBillboardDepth,c.source,f.Default3D,c.defines);e.add("billboard",l);e.add("billboardDepth",n);e.add("billboardDepthShadowMap",b)};return g})},"esri/views/3d/webgl-engine/materials/ColorMaterial":function(){define("dojo/_base/lang dojo/text!./ColorMaterial.xml ./internal/MaterialUtil ../lib/RenderSlot ../lib/Util ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../lib/DefaultVertexBufferLayouts ../../../webgl/Util".split(" "),
function(a,h,p,m,f,e,l,g,c){f=function(a,e){p.basicMaterialConstructor(this,e);a=a||{};a.color=a.color||[1,1,1,1];a.polygonOffset=a.polygonOffset||!1;a.vertexColors=a.vertexColors||!1;var f=g.Pos3Color;this.getParams=function(){return a};this.setColor=function(b){a.color=b;this.notifyDirty("matChanged")};this.getColor=function(){return a.color};this.setTransparent=function(b){a.transparent=b;this.notifyDirty("matChanged")};this.getTransparent=function(b){return a.transparent};this.dispose=function(){};
this.getOutputAmount=function(a){var b=c.getStride(f)/4;return a*b};this.getVertexBufferLayout=function(){return f};this.fillInterleaved=function(a,b,c,e,d,g,l){p.fillInterleaved(a,b,c,e,f,d,g,l)};this.intersect=p.intersectTriangleGeometry;this.getGLMaterials=function(){return{color:b,depthShadowMap:void 0,normal:void 0,depth:void 0,highlight:q}};this.getAllTextureIds=function(){return[]}};var b=function(b,c,e){p.basicGLMaterialConstructor(this,b);var g=a.clone(b.getParams()),f=c.get("colorMaterial"),
n=b.getColor();this.beginSlot=function(a){return a===(1>n[3]?m.TRANSPARENT_MATERIAL:m.OPAQUE_MATERIAL)};this.getProgram=function(){return f};this.updateParameters=function(){g.color=b.getColor();g.transparent=b.getTransparent()};this.bind=function(a,b){a.bindProgram(f);f.setUniform4fv("eColor",g.color);a.setFaceCullingEnabled(!1);g.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(1,1));g.transparent&&(a.setBlendingEnabled(!0),a.setBlendFunctionSeparate(a.gl.SRC_ALPHA,a.gl.ONE_MINUS_SRC_ALPHA,
a.gl.ONE,a.gl.ONE_MINUS_SRC_ALPHA));a.setDepthTestEnabled(!0)};this.release=function(a){a.setPolygonOffsetFillEnabled(!1);g.transparent&&a.setBlendingEnabled(!1)};this.bindView=function(a,b){p.bindView(b.origin,b.view,f)};this.bindInstance=function(a,b){f.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},q=function(b,c,e){p.basicGLMaterialConstructor(this,b);var g=a.clone(b.getParams()),f=c.get("colorMaterial"),n=[1,1,1,1];this.beginSlot=function(a){return a===
(1>n[3]?m.TRANSPARENT_MATERIAL:m.OPAQUE_MATERIAL)};this.getProgram=function(){return f};this.updateParameters=function(){g.color=b.getColor();g.transparent=b.getTransparent()};this.bind=function(a,b){a.bindProgram(f);f.setUniform4fv("eColor",g.color);a.setFaceCullingEnabled(!1);g.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(1,1))};this.release=function(a){a.setPolygonOffsetFillEnabled(!1)};this.bindView=function(a,b){p.bindView(b.origin,b.view,f)};this.bindInstance=function(a,
b){f.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}};f.programs=null;f.loadShaders=function(a,b,c,g){a._parse(h);a=new e(g,a.vertexShaderColorMaterial,a.fragmentShaderColorMaterial,l.Default3D);c.add("colorMaterial",a)};return f})},"esri/views/3d/webgl-engine/materials/HUDMaterial":function(){define("dojo/_base/lang dojo/text!./HUDMaterial.xml ./internal/MaterialUtil ../lib/ShaderVariations ../lib/Util ../lib/gl-matrix ../lib/RenderSlot ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../../../webgl/Util".split(" "),
function(a,h,p,m,f,e,l,g,c,b){function q(a,b,d){d[0]=a[0]*(b[2]-b[0])+b[0];d[1]=a[1]*(b[3]-b[1])+b[1]}var x=e.vec2d,y=e.vec3d,t=e.mat4d,u=f.assert,r=f.VertexAttrConstants,n={"bottom-left":[0,0],bottom:[.5,0],"bottom-right":[1,0],left:[0,.5],center:[.5,.5],right:[1,.5],"top-left":[0,1],top:[.5,1],"top-right":[1,1]},w=[253/255,231/255,229/255];f=function(a,c){p.basicMaterialConstructor(this,c);a=a||null;a.texCoordScale=a.texCoordScale||[1,1];a.occlusionTest=void 0!==a.occlusionTest?a.occlusionTest:
!0;a.color=a.color||[1,1,1,1];a.screenMinMaxSize=a.screenMinMaxSize||[0,1E5];a.outlineColor=a.outlineColor||[1,1,1,1];a.outlineSize=a.outlineSize||0;a.textureIsSignedDistanceField=a.textureIsSignedDistanceField?1:0;a.distanceFieldBoundingBox=a.distanceFieldBoundingBox;a.vvSizeEnabled=a.vvSizeEnabled||!1;a.vvSizeMinSize=a.vvSizeMinSize||[1,1,1];a.vvSizeMaxSize=a.vvSizeMaxSize||[100,100,100];a.vvSizeOffset=a.vvSizeOffset||[0,0,0];a.vvSizeFactor=a.vvSizeFactor||[1,1,1];a.vvColorEnabled=a.vvColorEnabled||
!1;a.vvColorValues=a.vvColorValues||[0,0,0,0,0,0,0,0];a.vvColorColors=a.vvColorColors||[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0];a.screenOffset?a.screenOffset.forEach(function(b,d){a.screenOffset[d]=2*b}):a.screenOffset=[0,0];"string"===typeof a.anchorPos?(u(n[a.anchorPos],"HUDMaterial: invalid anchorPos specified"),a.anchorPos=n[a.anchorPos]):a.anchorPos||(a.anchorPos=n.center);null==a.shaderPolygonOffset&&(a.shaderPolygonOffset=1E-5);var e=[{name:"position",count:3,type:5126,
offset:0,stride:76,normalized:!1},{name:"normal",count:3,type:5126,offset:12,stride:76,normalized:!1},{name:"uv0",count:2,type:5126,offset:24,stride:76,normalized:!1},{name:"color",count:4,type:5121,offset:32,stride:76,normalized:!1},{name:"size",count:2,type:5126,offset:36,stride:76,normalized:!1},{name:"auxpos1",count:4,type:5126,offset:44,stride:76,normalized:!1},{name:"auxpos2",count:4,type:5126,offset:60,stride:76,normalized:!1}],g=b.getStride(e),f=g/4;this.dispose=function(){};this.getParameterValues=
function(){var b={color:a.color,texCoordScale:a.texCoordScale,polygonOffset:a.polygonOffset,anchorPos:a.anchorPos,screenOffset:a.screenOffset,screenMinMaxSize:a.screenMinMaxSize,shaderPolygonOffset:a.shaderPolygonOffset,textureIsSignedDistanceField:a.textureIsSignedDistanceField,outlineColor:a.outlineColor,outlineSize:a.outlineSize,distanceFieldBoundingBox:a.distanceFieldBoundingBox,vvSizeEnabled:a.vvSizeEnabled,vvSizeMinSize:a.vvSizeMinSize,vvSizeMaxSize:a.vvSizeMaxSize,vvSizeOffset:a.vvSizeOffset,
vvSizeFactor:a.vvSizeFactor,vvColorEnabled:a.vvColorEnabled,vvColorValues:a.vvColorValues,vvColorColors:a.vvColorColors};a.textureId&&(b.textureId=a.textureId);a.direction&&(b.direction=a.direction);return b};this.setParameterValues=function(b){for(var d in b)"textureId"===d&&u(a.textureId,"Can only change texture of material that already has a texture"),"direction"===d&&u(a.direction,"Can only change direction of HUDMaterial which was initialized with a direction"),a[d]=b[d];this.notifyDirty("matChanged")};
this.getParams=function(){return a};this.getOutputAmount=function(a){return a*f*6};this.getVertexBufferLayout=function(){return e};this.fillInterleaved=function(d,c,k,n,l,m){var h=4*m;n=p.fill;for(var q=d.faces.indices[r.POSITION],t=d.vertexAttr[r.POSITION].data,w=m+b.findAttribute(e,r.POSITION).offset/4,v=0;v<q.length;++v){var u=3*q[v];n(t,u,l,w,c,3);w+=f;n(t,u,l,w,c,3);w+=f;n(t,u,l,w,c,3);w+=f;n(t,u,l,w,c,3);w+=f;n(t,u,l,w,c,3);w+=f;n(t,u,l,w,c,3);w+=f}c=d.faces.indices[r.NORMAL];t=d.vertexAttr[r.NORMAL].data;
w=m+b.findAttribute(e,r.NORMAL).offset/4;for(v=0;v<c.length;++v)u=3*c[v],n(t,u,l,w,k,3),w+=f,n(t,u,l,w,k,3),w+=f,n(t,u,l,w,k,3),w+=f,n(t,u,l,w,k,3),w+=f,n(t,u,l,w,k,3),w+=f,n(t,u,l,w,k,3),w+=f;w=m+b.findAttribute(e,r.UV0).offset/4;v=d.vertexAttr[r.UV0].data;null==v||3>=v.length?(k=u=0,c=a.texCoordScale[0],t=a.texCoordScale[1]):(u=d.vertexAttr[r.UV0].data[0],k=d.vertexAttr[r.UV0].data[1],c=d.vertexAttr[r.UV0].data[2],t=d.vertexAttr[r.UV0].data[3]);c=Math.min(1.99999,c+1);t=Math.min(1.99999,t+1);for(v=
0;v<q.length;++v)l[w]=u,l[w+1]=k,w+=f,l[w]=c,l[w+1]=k,w+=f,l[w]=c,l[w+1]=t,w+=f,l[w]=c,l[w+1]=t,w+=f,l[w]=u,l[w+1]=t,w+=f,l[w]=u,l[w+1]=k,w+=f;q=d.faces.indices[r.COLOR];k=d.vertexAttr[r.COLOR].data;w=h+b.findAttribute(e,r.COLOR).offset;h=new Uint8Array(l.buffer);for(v=0;v<q.length;++v)u=4*q[v],n(k,u,h,w,null,4),w+=g,n(k,u,h,w,null,4),w+=g,n(k,u,h,w,null,4),w+=g,n(k,u,h,w,null,4),w+=g,n(k,u,h,w,null,4),w+=g,n(k,u,h,w,null,4),w+=g;h=d.faces.indices[r.SIZE];u=d.vertexAttr[r.SIZE].data;w=m+b.findAttribute(e,
r.SIZE).offset/4;for(v=0;v<h.length;++v)q=u[2*h[v]],k=u[2*h[v]+1],l[w]=q,l[w+1]=k,w+=f,l[w]=q,l[w+1]=k,w+=f,l[w]=q,l[w+1]=k,w+=f,l[w]=q,l[w+1]=k,w+=f,l[w]=q,l[w+1]=k,w+=f,l[w]=q,l[w+1]=k,w+=f;if(null!=d.faces.indices[r.AUXPOS1]&&null!=d.vertexAttr[r.AUXPOS1])for(h=d.faces.indices[r.AUXPOS1],q=d.vertexAttr[r.AUXPOS1].data,w=m+b.findAttribute(e,"auxpos1").offset/4,v=0;v<h.length;++v)u=4*h[v],n(q,u,l,w,null,4),w+=f,n(q,u,l,w,null,4),w+=f,n(q,u,l,w,null,4),w+=f,n(q,u,l,w,null,4),w+=f,n(q,u,l,w,null,4),
w+=f,n(q,u,l,w,null,4),w+=f;if(null!=d.faces.indices[r.AUXPOS2]&&null!=d.vertexAttr[r.AUXPOS2])for(h=d.faces.indices[r.AUXPOS2],d=d.vertexAttr[r.AUXPOS2].data,w=m+b.findAttribute(e,"auxpos2").offset/4,v=0;v<h.length;++v)u=4*h[v],n(d,u,l,w,null,4),w+=f,n(d,u,l,w,null,4),w+=f,n(d,u,l,w,null,4),w+=f,n(d,u,l,w,null,4),w+=f,n(d,u,l,w,null,4),w+=f,n(d,u,l,w,null,4),w+=f};var l=y.create(),m=y.create(),h=t.create();t.identity(h);var w=[0,0],v=[0,0];this.intersect=function(b,d,c,e,g,f,k,n){if(e.isSelection&&
e.enableHUDSelection){g=d=1;n&&(g=n(h),d=g[0],g=g[5]);n=b.getData().getVertexAttr()[r.POSITION];b=b.getData().getVertexAttr()[r.SIZE];u(3<=n.size);f=e.point;var p=e.camera;a.textureIsSignedDistanceField?q(a.anchorPos,a.distanceFieldBoundingBox,v):x.set(a.anchorPos,v);for(var A=0;A<n.data.length/n.size;A++){var z=A*n.size;y.set3(n.data[z],n.data[z+1],n.data[z+2],l);t.multiplyVec3(c,l,l);z=A*b.size;w[0]=b.data[z]*d;w[1]=b.data[z+1]*g;p.projectPoint(l,m);if(-1<m[0]){var z=m[0]-1-(0<v[0]?w[0]*v[0]:0),
D=z+w[0]+2,B=m[1]-1-(0<v[1]?w[1]*v[1]:0),H=B+w[1]+2;if(a.textureIsSignedDistanceField)var O=a.outlineSize/2,E=a.distanceFieldBoundingBox,z=z+w[0]*E[0],B=B+w[1]*E[1],D=D-w[0]*(1-E[2]),H=H-w[1]*(1-E[3]),z=z-O,D=D+O,B=B-O,H=H+O;f[0]>z&&f[0]<D&&f[1]>B&&f[1]<H&&(D=e.p0,B=e.p1,m[0]=f[0],m[1]=f[1],p.unprojectPoint(m,l),z=y.negate(e.getDirection(),y.create()),D=y.dist(D,l)/y.dist(D,B),k(D,z,-1,1,!0))}}}};this.getGLMaterials=function(){return{color:d,depthShadowMap:void 0,normal:void 0,depth:void 0,highlight:k}};
this.getAllTextureIds=function(){return[a.textureId]};this._textureDirty=!1;this.setTextureDirty=function(){this._textureDirty=!0}};var d=function(b,d,c){function e(){return d.shaderVariators.HUDMaterial.getProgram([!!n.direction,!!n.worldScale,n.occlusionTest,n.textureIsSignedDistanceField,!!n.vvSizeEnabled,!!n.vvColorEnabled])}p.basicGLMaterialConstructor(this,b);var g=l.OCCLUSION_PIXELS,f=l.OVERLAY,k=0,n=a.clone(b.getParams()),m=d.get("hudOcclusionTestPixel"),h=e();p.singleTextureGLMaterialConstructor(this,
c,n);this.beginSlot=function(a){k=a;return n.occlusionTest?a===g||a===f:a===f};this.getProgram=function(){return k===g&&n.occlusionTest?m:h};this.getAllPrograms=function(){return[m,h]};this.updateParameters=function(){var a=b.getParams();n.color=a.color;n.texCoordScale=a.texCoordScale;n.polygonOffset=a.polygonOffset;n.anchorPos=a.anchorPos;n.screenOffset=a.screenOffset;n.screenMinMaxSize=a.screenMinMaxSize;n.direction=a.direction;n.shaderPolygonOffset=a.shaderPolygonOffset;n.textureIsSignedDistanceField=
a.textureIsSignedDistanceField;n.outlineColor=a.outlineColor;n.outlineSize=a.outlineSize;n.vvSizeEnabled=a.vvSizeEnabled;n.vvSizeMinSize=a.vvSizeMinSize;n.vvSizeMaxSize=a.vvSizeMaxSize;n.vvSizeOffset=a.vvSizeOffset;n.vvSizeFactor=a.vvSizeFactor;n.vvColorEnabled=a.vvColorEnabled;n.vvColorValues=a.vvColorValues;n.vvColorColors=a.vvColorColors;this.updateTexture(a.textureId);h=e()};var r=[0,0];this.bind=function(a,d){b._textureDirty&&(this.renderTexture(a),b._textureDirty=!1);var c=a.gl,e=d.cameraAboveGround?
1:-1;if(k===g&&n.occlusionTest)a.bindProgram(m),m.setUniform1f("cameraGroundRelative",e),m.setUniform1f("polygonOffset",n.shaderPolygonOffset),m.setUniform4fv("viewport",d.viewport),m.setUniform4f("color",w[0],w[1],w[2],1),a.setDepthFunction(c.LEQUAL);else{a.bindProgram(h);h.setUniform1f("cameraGroundRelative",e);this.bindTexture(a,h);h.setUniform1i("framebufferTex",1);a.bindTexture(d.framebufferTex,1);a.setActiveTexture(0);h.setUniform3fv("markerColor",w);h.setUniform4fv("viewport",d.viewport);h.setUniform4fv("overrideColor",
n.color);h.setUniform1f("pixelRatio",d.pixelRatio);h.setUniform1f("polygonOffset",n.shaderPolygonOffset);n.textureIsSignedDistanceField&&(h.setUniform4fv("outlineColor",n.outlineColor),h.setUniform1f("outlineSize",n.outlineSize));n.vvSizeEnabled&&(h.setUniform3fv("vvSizeMinSize",n.vvSizeMinSize),h.setUniform3fv("vvSizeMaxSize",n.vvSizeMaxSize),h.setUniform3fv("vvSizeOffset",n.vvSizeOffset),h.setUniform3fv("vvSizeFactor",n.vvSizeFactor));n.vvColorEnabled&&(h.setUniform1fv("vvColorValues",n.vvColorValues),
h.setUniform4fv("vvColorColors",n.vvColorColors));if(n.worldScale){var c=[-1,-1],e=n.screenMinMaxSize,f=d.proj;d=d.viewport[2]/d.pixelRatio;e&&(0!==f[11]?(d=Math.tan(2*Math.atan(1/f[0])/2)/d*2,c[0]=e[0]*d,c[1]=e[1]*d):x.scale(e,2/(f[0]*d),c));h.setUniform2fv("minMaxWorldSizeFactor",c)}n.direction&&h.setUniform3fv("direction",n.direction);h.setUniform2fv("texScale",n.texCoordScale);h.setUniform2fv("screenOffset",n.screenOffset);n.textureIsSignedDistanceField?(q(n.anchorPos,n.distanceFieldBoundingBox,
r),h.setUniform2fv("anchorPos",r)):h.setUniform2fv("anchorPos",n.anchorPos);n.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(0,-4));a.setBlendingEnabled(!0)}};this.release=function(a){var b=a.gl;k===g&&n.occlusionTest?a.setDepthFunction(b.LESS):(a.setPolygonOffsetFillEnabled(!1),a.setBlendingEnabled(!1))};this.bindView=function(a,b){a=b.origin;k===g&&n.occlusionTest?(p.bindView(a,b.view,m),p.bindCamPos(a,b.viewInvTransp,m)):(p.bindView(a,b.view,h),p.bindCamPos(a,b.viewInvTransp,
h))};this.bindInstance=function(a,b){k===g&&n.occlusionTest?(m.setUniformMatrix4fv("model",b.transformation),m.setUniformMatrix4fv("modelNormal",b.transformationNormal)):h.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){a=a.gl;return k===g&&n.occlusionTest?a.POINTS:a.TRIANGLES}},k=function(b,d,c){function e(){return d.shaderVariators.HUDMaterialHighlight.getProgram([!!g.direction,!!g.worldScale,g.occlusionTest,g.textureIsSignedDistanceField,!!g.vvSizeEnabled,!!g.vvColorEnabled])}
p.basicGLMaterialConstructor(this,b);var g=a.clone(b.getParams()),f=d.get("hudOcclusionTestPixel"),k=e();p.singleTextureGLMaterialConstructor(this,c,g);this.beginSlot=function(a){return a===l.OVERLAY};this.getProgram=function(){return k};this.getAllPrograms=function(){return[f,k]};this.updateParameters=function(){var a=b.getParams();g.color=a.color;g.texCoordScale=a.texCoordScale;g.polygonOffset=a.polygonOffset;g.anchorPos=a.anchorPos;g.screenOffset=a.screenOffset;g.screenMinMaxSize=a.screenMinMaxSize;
g.direction=a.direction;g.shaderPolygonOffset=a.shaderPolygonOffset;g.textureIsSignedDistanceField=a.textureIsSignedDistanceField;g.outlineColor=a.outlineColor;g.outlineSize=a.outlineSize;this.updateTexture(a.textureId);k=e()};var n=[0,0];this.bind=function(a,d){b._textureDirty&&(this.renderTexture(a),b._textureDirty=!1);a.bindProgram(k);this.bindTexture(a,k);k.setUniform1i("framebufferTex",1);a.bindTexture(d.framebufferTex,1);a.setActiveTexture(0);k.setUniform3fv("markerColor",w);k.setUniform4fv("viewport",
d.viewport);k.setUniform4fv("overrideColor",g.color);k.setUniform1f("pixelRatio",d.pixelRatio);k.setUniform1f("polygonOffset",g.shaderPolygonOffset);g.textureIsSignedDistanceField&&(k.setUniform4fv("outlineColor",g.outlineColor),k.setUniform1f("outlineSize",g.outlineSize));if(g.worldScale){var c=[-1,-1],e=g.screenMinMaxSize,f=d.proj;d=d.viewport[2]/d.pixelRatio;e&&(0!==f[11]?(f=Math.tan(2*Math.atan(1/f[0])/2)/d*2,c[0]=e[0]*f,c[1]=e[1]*f):x.scale(e,2/(f[0]*d),c));k.setUniform2fv("minMaxWorldSizeFactor",
c)}g.direction&&k.setUniform3fv("direction",g.direction);k.setUniform2fv("texScale",g.texCoordScale);k.setUniform2fv("screenOffset",g.screenOffset);g.textureIsSignedDistanceField?(q(g.anchorPos,g.distanceFieldBoundingBox,n),k.setUniform2fv("anchorPos",n)):k.setUniform2fv("anchorPos",g.anchorPos);g.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(0,-4));a.setBlendingEnabled(!0)};this.release=function(a){a.setPolygonOffsetFillEnabled(!1);a.setBlendingEnabled(!1)};this.bindView=function(a,
b){a=b.origin;p.bindView(a,b.view,k);p.bindCamPos(a,b.viewInvTransp,k)};this.bindInstance=function(a,b){k.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}};f.loadShaders=function(a,b,d,e){a._parse(h);var f=0<e.parameters.maxVertexTextureImageUnits,k=new m("hud",["vertexShaderHUD","fragmentShaderHUD"],null,d,b,a,e);k.addBinaryShaderSnippetSuffix("Direction","Direction",[!0,!1]);k.addBinaryShaderSnippetSuffix("WorldScale","WorldScale",[!0,!1]);k.addDefine("OcclTest",
f?"OCCL_TEST":"OCCL_PIXELSHADER");k.addDefine("SDF","SIGNED_DISTANCE_FIELD");k.addDefine("vvSize","VV_SIZE");k.addDefine("vvColor","VV_COLOR");d.shaderVariators.HUDMaterial=k;b=new m("hudHighlight",["vertexShaderHUD","fragmentShaderHUDHighlight"],null,d,b,a,e);b.addBinaryShaderSnippetSuffix("Direction","Direction",[!0,!1]);b.addBinaryShaderSnippetSuffix("WorldScale","WorldScale",[!0,!1]);b.addDefine("OcclTest",f?"OCCL_TEST":"OCCL_PIXELSHADER");b.addDefine("SDF","SIGNED_DISTANCE_FIELD");b.addDefine("vvSize",
"VV_SIZE");b.addDefine("vvColor","VV_COLOR");d.shaderVariators.HUDMaterialHighlight=b;a=new g(e,a.vertexShaderOcclusionTestPixel,a.fragmentShaderSimple,c.Default3D);d.add("hudOcclusionTestPixel",a)};return f})},"esri/views/3d/webgl-engine/lib/ShaderVariations":function(){define(["dojo/_base/lang","./Util","../../../webgl/Program","./DefaultVertexAttributeLocations"],function(a,h,p,m){var f=h.assert,e=function(a,e){return a+e.toString()};return function(l,g,c,b,h,x,y){f(2===g.length,"you must specify shader snippet prefixes for vertex and fragment shaders");
c&&0!==c.length||(c=[]);var q=[],u=!1,r={};this.addDefine=function(a,b,d,c){f(!u,"you cannot add another variable after the first program has been generated");f(a,"you must specify a program name suffix");q.push({programNameSuffixes:["",a],shaderNameSuffixes:c||a,defineStr:b,affectsShaderTypes:d||[!0,!0]})};this.addBinaryShaderSnippetSuffix=function(a,b,d){f(!u,"you cannot add another variable after the first program has been generated");f(a,"you must specify a program name suffix");q.push({programNameSuffixes:["",
a],shaderSnippetSuffixes:["",b],affectsShaderTypes:d||[!0,!0]})};this.addNaryShaderSnippetSuffix=function(a,b){f(!u,"you cannot add another variable after the first program has been generated");var d=a.map(function(a){f(null!=a.value,"value must always be specified");return a.value});q.push({values:d,programNameSuffixes:a.map(function(a,b){return null!=a.programNameSuffix?a.programNameSuffix:d[b]}),shaderSnippetSuffixes:a.map(function(a,b){return null!=a.shaderSnippetSuffix?a.shaderSnippetSuffix:
d[b]}),affectsShaderTypes:b||[!0,!0]})};this.getShaderVariation=function(b){f(b.length===q.length,"you must specify a value for each variable");for(var e=l,d=a.clone(g),k=a.clone(g),n=a.clone(c),h=0;h<q.length;h++){var m=q[h],r=b[h],t;m.values?(t=m.values.indexOf(r),f(0<=t,"invalid value "+r+" for variable "+h)):t=r?1:0;e+=m.programNameSuffixes[t];for(r=0;2>r;r++)m.affectsShaderTypes[r]&&(m.shaderSnippetSuffixes&&(d[r]+=m.shaderSnippetSuffixes[t],k[r]+=m.shaderSnippetSuffixes[t]),m.defineStr&&t&&
(n.push(m.defineStr),k[r]+=m.shaderNameSuffixes))}return{programName:e,shaderSnippetNames:d,shaderNames:k,defines:n}};this.getProgram=function(a,c,d){c=c||x;d=d||y;u=!0;var g=a.reduce(e,"");if(r[g])return r[g];a=this.getShaderVariation(a);var n=b.get(a.programName);if(n)return n;var l,n=a.shaderSnippetNames[0];l=c[n];f(null!=l,"shader snippet '"+n+"' does not exist");n=a.shaderSnippetNames[1];c=c[n];f(null!=c,"shader snippet '"+n+"' does not exist");n=new p(d,l,c,m.Default3D,a.defines);r[g]=n;b.add(a.programName,
n);return n}}})},"esri/views/3d/webgl-engine/materials/LeafCardMaterial":function(){define("dojo/text!./LeafCardMaterial.xml ./internal/MaterialUtil ../lib/Util ../lib/gl-matrix ../lib/RenderSlot ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../../../webgl/Util".split(" "),function(a,h,p,m,f,e,l,g){function c(){r=(9301*r+49297)%233280;return r/233280}var b=m.vec3,q=m.mat4,x=m.mat4d;m=function(a,e,d,f,l,m){h.basicMaterialConstructor(this,m);var k=[{name:"position",count:3,type:5126,
offset:0,stride:44,normalized:!1},{name:"normal",count:4,type:5126,offset:12,stride:44,normalized:!1},{name:"uv0",count:4,type:5126,offset:28,stride:44,normalized:!1}],n=g.getStride(k)/4;this.getAmbient=function(){return e};this.getDiffuse=function(){return d};this.getSpecular=function(){return f};this.getShininess=function(){return l};this.dispose=function(){};this.getTextureId=function(){return a};this.getOutputAmount=function(a){var b=0,d;for(d=0;d<a/6;d++)0===d%1&&(b+=6);a=b;for(d=b=0;d<a/6;d++)0===
d%1&&(b+=6);return b*n};this.getVertexBufferLayout=function(){return k};this.reduce=function(a,b){var d=a.position,c=a.normal;a=a.uv0;for(var e=[],g=[],f=[],k=0,n=0;n<d.length/6;n++)if(0===n%b)for(var l=0;6>l;l++)e[k]=d[6*n+l],g[k]=c[6*n+l],f[k]=a[6*n+l],k++;return{position:e,normal:g,uv0:f}};this.fillInterleaved=function(a,d,e,g,f,k){g=h.fill;var l=this.reduce(a.faces.indices,1),l=this.reduce(l,1),m=this.getOutputAmount(a.faces.indices.position.length);p.assert(m===l.position.length*n);var r=l.position,
t=l.normal,w=l.uv0,l=a.vertexAttr.position.data,u=a.vertexAttr.normal.data,v=a.vertexAttr.uv0.data,A=b.create();a=r.length/6;for(var m=k,y=b.createFrom(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),z=b.createFrom(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),D=0;D<a;++D){for(var B=b.create(),E=b.create(),H=[100,100,-100,-100],O=b.create(),C=0;6>C;++C){var M=6*D+C,F=3*r[M],K=3*t[M],M=2*w[M];B[0]+=l[F+0];B[1]+=l[F+1];B[2]+=l[F+2];E[0]+=u[K+0];E[1]+=u[K+1];E[2]+=u[K+2];K=v[M+0];M=v[M+
1];H[0]=Math.min(H[0],K);H[1]=Math.min(H[1],M);H[2]=Math.max(H[2],K);H[3]=Math.max(H[3],M);0===C&&b.set3(l[F+0],l[F+1],l[F+2],O)}B[0]/=6;B[1]/=6;B[2]/=6;E[0]/=6;E[1]/=6;E[2]/=6;B[0]+=.1*(2*c()-1);B[1]+=.1*(2*c()-1);B[2]+=.1*(2*c()-1);void 0!==d&&(x.multiplyVec3(d,O,O),x.multiplyVec3(d,B,B),x.multiplyVec3(e,E,E));b.add(B,A,A);b.max(y,B,y);b.min(z,B,z);H[0]+=.01;H[1]+=.01;H[2]-=.01;H[3]-=.01;for(C=0;4>C;C++)H[C]=Math.min(H[C],.99999);C=2*c()*Math.PI;O=1.41*b.dist(O,B);k+=g(B,0,f,k,void 0,3);k+=g(E,
0,f,k,void 0,3);f[k++]=0;f[k++]=H[0];f[k++]=H[1];f[k++]=C;f[k++]=O;k+=g(B,0,f,k,void 0,3);k+=g(E,0,f,k,void 0,3);f[k++]=0;f[k++]=H[2]+1;f[k++]=H[1];f[k++]=C;f[k++]=O;k+=g(B,0,f,k,void 0,3);k+=g(E,0,f,k,void 0,3);f[k++]=0;f[k++]=H[2]+1;f[k++]=H[3]+1;f[k++]=C;f[k++]=O;k+=g(B,0,f,k,void 0,3);k+=g(E,0,f,k,void 0,3);f[k++]=0;f[k++]=H[2]+1;f[k++]=H[3]+1;f[k++]=C;f[k++]=O;k+=g(B,0,f,k,void 0,3);k+=g(E,0,f,k,void 0,3);f[k++]=0;f[k++]=H[0];f[k++]=H[3]+1;f[k++]=C;f[k++]=O;k+=g(B,0,f,k,void 0,3);k+=g(E,0,f,
k,void 0,3);f[k++]=0;f[k++]=H[0];f[k++]=H[1];f[k++]=C;f[k++]=O}A[0]/=a;A[1]/=a;A[2]/=a;d=b.create();b.add(y,z,d);b.scale(d,.5,d);k=b.create();b.subtract(y,z,k);k[0]=Math.abs(k[0])/2;k[1]=Math.abs(k[1])/2;k[2]=Math.abs(k[2])/2;r=b.create(A);r[1]-=(y[1]-z[1])/3;y=b.create();z=b.create();l=b.create();t=[b.create(),b.create(),b.create(),b.create()];A=[0,0,0,0];w=q.create();for(D=0;D<a;++D){b.set3(f[m],f[m+1],f[m+2],l);b.subtract(l,r,y);b.normalize(y,y);z=b.subtract(l,d,z);b.normalize(z,z);v=Math.abs(b.dot(z,
[1,0,0]));C=Math.abs(b.dot(z,[0,1,0]));u=Math.abs(b.dot(z,[0,0,1]));v=v*Math.abs(d[0]-l[0])/k[0];v+=C*Math.abs(d[1]-l[1])/k[1];v+=u*Math.abs(d[2]-l[2])/k[2];for(C=0;4>C;C++)q.identity(w),q.rotate(w,.8*(2*c()-1),[0,1,0],w),q.rotate(w,.8*(2*c()-1),[1,0,0],w),q.multiplyVec3(w,y,t[C]),A[C]=.5+.5*v-.2*(2*c()-1);u=.8+.3*(2*c()-1);for(C=0;6>C;++C){var la;switch(C){case 0:la=0;break;case 1:la=1;break;case 2:la=2;break;case 3:la=2;break;case 4:la=3;break;case 5:la=0}m+=3;m+=g(t[la],0,f,m,e,3);f[m++]=A[la];
m+=3;f[m++]*=u}}};this.intersect=function(){};this.getGLMaterials=function(){return{color:y,depthShadowMap:u,normal:void 0,depth:t,highlight:void 0}};this.getAllTextureIds=function(){return[a]}};var y=function(a,b,d){h.basicGLMaterialConstructor(this,a);var c=f.TRANSPARENT_MATERIAL,e=b.get("leafCard");h.singleTextureGLMaterialConstructor(this,d,{textureId:a.getTextureId()});this.beginSlot=function(a){return c===a};this.getProgram=function(){return e};var g=a.getAmbient(),n=a.getDiffuse(),l=a.getSpecular(),
m=a.getShininess();this.bind=function(a,b){a.bindProgram(e);this.bindTexture(a,e);e.setUniform3fv("ambient",g);e.setUniform3fv("diffuse",n);e.setUniform3fv("specular",l);e.setUniform1f("shininess",m);e.setUniform1f("trafoScale",1);a.setBlendingEnabled(!1);a.setDepthTestEnabled(!0)};this.release=function(a){};this.bindView=function(a,b){h.bindView(b.origin,b.view,e);h.bindCamPos(b.origin,b.viewInvTransp,e)};this.bindInstance=function(a,b){e.setUniformMatrix4fv("model",b.transformation);e.setUniformMatrix4fv("modelNormal",
b.transformationNormal);a=b.transformation;e.setUniform1f("trafoScale",(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8])+Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])+Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))/3)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},t=function(a,b,d,c){h.basicGLMaterialConstructor(this,a);var e=f.TRANSPARENT_MATERIAL,g=null==c?b.get("leafCardDepth"):b.get("leafCardDepthShadowMap");h.singleTextureGLMaterialConstructor(this,d,{textureId:a.getTextureId()});this.beginSlot=function(a){return e===
a};this.getProgram=function(){return g};this.bind=function(a,b){a.bindProgram(g);this.bindTexture(a,g);g.setUniform2fv("nearFar",b.nearFar)};this.release=function(a){};this.bindView=function(a,b){h.bindView(b.origin,b.view,g)};this.bindInstance=function(a,b){g.setUniformMatrix4fv("model",b.transformation);a=b.transformation;g.setUniform1f("trafoScale",(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8])+Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])+Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))/3)};this.getDrawMode=
function(a){return a.gl.TRIANGLES}},u=function(a,b,d){t.call(this,a,b,d,!0)};m.loadShaders=function(b,c,d,g){b._parse(a);var f=new e(g,b.vertexShaderLeafCard,b.fragmentShaderLeafCard,l.Default3D),k=c.get("fsDepthTextured");c=c.get("fsDepthTexturedShadowMap");k=new e(g,b.vertexShaderLeafCardDepth,k.source,l.Default3D,k.defines);b=new e(g,b.vertexShaderLeafCardDepth,c.source,l.Default3D,c.defines);d.add("leafCard",f);d.add("leafCardDepth",k);d.add("leafCardDepthShadowMap",b)};var r=1234;return m})},
"esri/views/3d/webgl-engine/materials/Material":function(){define("dojo/_base/lang dojo/text!./Material.xml ./internal/MaterialUtil ../../../webgl/Program ../lib/ShaderVariations ../lib/Util ../lib/gl-matrix ../lib/RenderSlot ../lib/DefaultVertexAttributeLocations ../lib/DefaultVertexBufferLayouts ../../../webgl/Util ../../support/mathUtils".split(" "),function(a,h,p,m,f,e,l,g,c,b,q,x){function y(a,b){var d=b.vvSizeEnabled||b.vvRotationEnabled;b.vvSizeEnabled?(a.setUniform3fv("vvSizeMinSize",b.vvSizeMinSize),
a.setUniform3fv("vvSizeMaxSize",b.vvSizeMaxSize),a.setUniform3fv("vvSizeOffset",b.vvSizeOffset),a.setUniform3fv("vvSizeFactor",b.vvSizeFactor)):d&&a.setUniform3fv("vvSizeValue",b.vvSizeValue);d&&(a.setUniform3fv("vvAnchorValue",b.vvAnchorValue),b.vvRotationEnabled?a.setUniform1f("vvRotationValue",x.deg2rad(b.vvRotationValue)):a.setUniformMatrix4fv("vvRotationValue",u(b.vvRotationValue,v)));b.vvColorEnabled&&(a.setUniform1fv("vvColorValues",b.vvColorValues),a.setUniform4fv("vvColorColors",b.vvColorColors))}
function t(a,b){a.vvSizeEnabled=b.vvSizeEnabled;a.vvSizeMinSize=b.vvSizeMinSize;a.vvSizeMaxSize=b.vvSizeMaxSize;a.vvSizeOffset=b.vvSizeOffset;a.vvSizeFactor=b.vvSizeFactor;a.vvSizeValue=b.vvSizeValue;a.vvRotationValue=b.vvRotationValue;a.vvAnchorValue=b.vvAnchorValue}function u(a,b){w.identity(b);w.rotateZ(b,-x.deg2rad(a));return b}var r=e.assert,n=l.vec3,w=l.mat4,d,k=n.create(),v=w.create();e=function(a,d){p.basicMaterialConstructor(this,d);a=a||{};a.ambient=a.ambient||[.2,.2,.2];a.diffuse=a.diffuse||
[.8,.8,.8];a.specular=a.specular||[0,0,0];a.externalColor=a.externalColor||[1,1,1,1];a.externalColorMixMode=a.externalColorMixMode||p.externalColorMixModes.multiply;a.shininess=a.shininess||10;a.opacity=void 0!==a.opacity?a.opacity:1;a.blendModeOneOne=a.blendModeOneOne||!1;a.inverseWindingOrder=a.inverseWindingOrder||!1;a.vertexColors=a.vertexColors||!1;a.flipV=a.flipV||!1;a.doubleSided=a.doubleSided||!1;a.cullFace=a.cullFace||void 0;a.instanced=a.instanced||!1;this.instanced=!!a.instanced;a.writeStencil=
a.writeStencil||!1;a.textureId||(a.reflTextureId=void 0);a.receiveSSAO=void 0!==a.receiveSSAO?a.receiveSSAO:!0;a.vvSizeEnabled=a.vvSizeEnabled||!1;a.vvSizeMinSize=a.vvSizeMinSize||[1,1,1];a.vvSizeMaxSize=a.vvSizeMaxSize||[100,100,100];a.vvSizeOffset=a.vvSizeOffset||[0,0,0];a.vvSizeFactor=a.vvSizeFactor||[1,1,1];a.vvSizeValue=a.vvSizeValue||[1,1,1];a.vvAnchorValue=a.vvAnchorValue||[0,0,0];a.vvRotationEnabled=a.vvRotationEnabled||!1;a.vvRotationValue=a.vvRotationValue||0;a.vvColorEnabled=a.vvColorEnabled||
!1;a.vvColorValues=a.vvColorValues||[0,0,0,0,0,0,0,0];a.vvColorColors=a.vvColorColors||[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0];d=a.textureId?a.atlasRegions?"Pos3NormTexRegion":"Pos3NormTex":"Pos3Norm";a.vertexColors&&(d+="Col");var c=b[d],e=null;a.instanced&&(e=[],q.addDescriptor(e,"model",16,5126,!1,1),q.addDescriptor(e,"modelNormal",16,5126,!1,1),-1<a.instanced.indexOf("color")&&q.addDescriptor(e,"instanceColor",4,5126,!1,1),-1<a.instanced.indexOf("featureAttribute")&&
q.addDescriptor(e,"instanceFeatureAttribute",4,5126,!1,1));var g=this.isVisible.bind(this);this.isVisible=function(){return g()&&0<a.opacity};this.dispose=function(){};this.getParams=function(){return a};this.getParameterValues=function(){var b={ambient:a.ambient,diffuse:a.diffuse,specular:a.specular,externalColor:a.externalColor,externalColorMixMode:a.externalColorMixMode,shininess:a.shininess,opacity:a.opacity,transparent:a.transparent,polygonOffset:a.polygonOffset,reflectivity:a.reflectivity,atlasRegions:a.atlasRegions,
flipV:a.flipV,doubleSided:a.doubleSided,cullFace:a.cullFace,writeStencil:a.writeStencil,receiveSSAO:a.receiveSSAO,vvSizeEnabled:a.vvSizeEnabled,vvSizeMinSize:a.vvSizeMinSize,vvSizeMaxSize:a.vvSizeMaxSize,vvSizeOffset:a.vvSizeOffset,vvSizeFactor:a.vvSizeFactor,vvSizeValue:a.vvSizeValue,vvRotationEnabled:a.vvRotationEnabled,vvRotationValue:a.vvRotationValue,vvAnchorValue:a.vvAnchorValue,vvColorEnabled:a.vvColorEnabled,vvColorValues:a.vvColorValues,vvColorColors:a.vvColorColors};a.textureId&&(b.textureId=
a.textureId,b.initTexture=a.initTexture);return b};this.setParameterValues=function(b){for(var d in b)"textureId"===d&&r(a.textureId,"Can only change texture of material that already has a texture"),a[d]=b[d];this.notifyDirty("matChanged")};this.getOutputAmount=function(a){var b=q.getStride(c)/4;return a*b};this.getVertexBufferLayout=function(){return c};this.getInstanceBufferLayout=function(){return e};this.fillInterleaved=function(a,b,d,e,g,f,k){p.fillInterleaved(a,b,d,e,c,g,f,k)};this.intersect=
p.intersectTriangleGeometry;this.getGLMaterials=function(){return{color:B,depthShadowMap:F,normal:K,depth:C,highlight:M}};this.getAllTextureIds=function(){var b=[];a.textureId&&b.push(a.textureId);a.reflTextureId&&b.push(a.reflTextureId);return b}};e.paramsFromOldConstructor=function(a,b,d,c,e,g,f,k,n,l,m,h,q){return{textureId:a,transparent:b,ambient:d,diffuse:c,specular:e,shininess:g,opacity:f,polygonOffset:k,initTexture:n,reflTextureId:l,reflectivity:m,flipV:h,doubleSided:q,cullFace:void 0}};var A=
function(a,b){var d=a.gl;(b.cullFace?"none"===b.cullFace:b.transparent)?a.setFaceCullingEnabled(!1):(a.setFaceCullingEnabled(!0),"front"===b.cullFace&&a.setCullFace(d.FRONT))},z=function(a,b){var d=a.gl;(b.cullFace?"none"===b.cullFace:b.transparent)?a.setFaceCullingEnabled(!0):(a.setFaceCullingEnabled(!1),"front"===b.cullFace&&a.setCullFace(d.BACK))},D=function(a,b){return a?g.TRANSPARENT_MATERIAL:b?g.STENCIL_MATERIAL:g.OPAQUE_MATERIAL},B=function(b,c,e){p.basicGLMaterialConstructor(this,b);var g=
a.clone(b.getParams()),f=D(g.transparent,g.writeStencil);p.singleTextureGLMaterialConstructor(this,e,g);var l=p.aquireIfNotUndefined(g.reflTextureId,g.reflInitTexture,e);l&&(l=l.getGLTexture());r(!(g.atlasRegions&&g.reflTextureId),"Atlas texture with reflection is not yet supported");var m=g.textureId?g.atlasRegions?"AtlasTextured":"Textured":"none";this.instanced=d&&g.instanced;var h=!!this.instanced&&-1<this.instanced.indexOf("color");this._loadProgram=function(a,b){return c.shaderVariators.Material.getProgram([m,
!!g.reflTextureId,g.vertexColors,g.flipV,g.doubleSided,!!this.instanced,h,a,b,!!g.vvSizeEnabled,!!g.vvColorEnabled,!!g.vvRotationEnabled])};var q=this._loadProgram(!1,g.receiveSSAO),w=this._loadProgram(!0,g.receiveSSAO),u=null,v="AtlasTextured"===m,x=this.dispose;this.dispose=function(){x();p.releaseIfNotUndefined(g.reflTextureId,e)};this.beginSlot=function(a){return f===a};this.getProgram=function(){return u||q};this.getAllPrograms=function(){return[w,q]};this.updateParameters=function(){var a=b.getParams();
g.ambient=a.ambient;g.diffuse=a.diffuse;g.specular=a.specular;g.externalColor=a.externalColor;g.externalColorMixMode=a.externalColorMixMode;g.shininess=a.shininess;g.opacity=a.opacity;g.polygonOffset=a.polygonOffset;g.reflectivity=a.reflectivity;g.flipV=a.flipV;g.doubleSided=a.doubleSided;g.cullFace=a.cullFace;g.receiveSSAO=a.receiveSSAO;t(g,a);g.vvColorEnabled=a.vvColorEnabled;g.vvColorValues=a.vvColorValues;g.vvColorColors=a.vvColorColors;g.transparent!=a.transparent&&(f=D(a.transparent),g.transparent=
a.transparent);g.initTexture=a.initTexture;this.updateTexture(a.textureId);a.atlasRegions&&(g.atlasRegions=a.atlasRegions);g.blendModeOneOne=a.blendModeOneOne;g.inverseWindingOrder=a.inverseWindingOrder;q=this._loadProgram(!1,g.receiveSSAO);w=this._loadProgram(!0,g.receiveSSAO)};this.bind=function(a,b){var d=a.gl;u=b.shadowMap&&b.shadowMap.getEnableState()?w:q;a.bindProgram(u);u.setUniform3fv("ambient",g.ambient);u.setUniform3fv("diffuse",g.diffuse);u.setUniform3fv("specular",g.specular);u.setUniform4fv("externalColor",
g.externalColor);u.setUniform1i("externalColorMixMode",g.externalColorMixMode);u.setUniform1f("shininess",g.shininess);u.setUniform1f("opacity",g.opacity);b.shadowMap||u.setUniform1f("depthHalfPixelSz",-1);y(u,g);this.bindTexture(a,u);v&&this.bindTextureSize(a,u);a.setBlendFunctionSeparate(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA,d.ONE,d.ONE_MINUS_SRC_ALPHA);void 0!==l&&(u.setUniform1i("reflTex",1),a.bindTexture(l,1),u.setUniform1f("reflectivity",g.reflectivity));g.inverseWindingOrder&&a.setFrontFace(d.CW);
g.transparent?(a.setBlendingEnabled(!0),g.blendModeOneOne?(a.setBlendFunction(d.ONE,d.ONE),a.setDepthWriteEnabled(!1)):a.setBlendFunctionSeparate(d.SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA,d.ONE,d.ONE_MINUS_SRC_ALPHA)):a.setBlendingEnabled(!1);g.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(2,2));A(a,g);a.setDepthTestEnabled(!0)};this.release=function(a,b){b=a.gl;a.setPolygonOffsetFillEnabled(!1);z(a,g);a.setBlendingEnabled(!1);a.setBlendFunctionSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,
b.ONE,b.ONE_MINUS_SRC_ALPHA);a.setDepthWriteEnabled(!0);a.setFrontFace(b.CCW)};this.bindView=function(a,b){u=b.shadowMap&&b.shadowMap.getEnableState()?w:q;a=b.origin;p.bindView(a,b.view,u);p.bindCamPos(a,b.viewInvTransp,u);b.shadowMap&&b.shadowMap.bindView(u,a)};this.bindInstance=function(a,b){u.setUniformMatrix4fv("model",b.transformation);u.setUniformMatrix4fv("modelNormal",b.transformationNormal);h&&b.instanceParameters&&(a=b.instanceParameters.color)&&(n.multiply(g.ambient,a,k),u.setUniform3fv("ambient",
k),n.multiply(g.diffuse,a,k),u.setUniform3fv("diffuse",k),u.setUniform1f("opacity",g.opacity*a[3]))};this.getDrawMode=function(a){return a.gl.TRIANGLES}},C=function(b,c,e,g){p.basicGLMaterialConstructor(this,b);var f=a.clone(b.getParams());this.instanced=d&&f.instanced;var k=q.hasAttribute(b.getVertexBufferLayout(),"uv0")?"Textured":"none",n=c.shaderVariators.MaterialDepth.getProgram([k,f.flipV,!!this.instanced,!!g,!!f.vvSizeEnabled,!!f.vvRotationEnabled]),l=D(f.transparent,f.writeStencil);p.singleTextureGLMaterialConstructor(this,
e,f);this.beginSlot=function(a){return l===a};this.getProgram=function(){return n};this.updateParameters=function(){var a=b.getParams();f.initTexture=a.initTexture;f.cullFace=a.cullFace;f.inverseWindingOrder=a.inverseWindingOrder;f.flipV=a.flipV;t(f,a);this.updateTexture(a.textureId)};this.bind=function(a,b){var d=a.gl;a.bindProgram(n);n.setUniform2fv("nearFar",b.nearFar);f.inverseWindingOrder&&a.setFrontFace(d.CW);y(n,f);this.bindTexture(a,n);A(a,f);a.setDepthTestEnabled(!0)};this.release=function(a){var b=
a.gl;z(a,f);f.inverseWindingOrder&&a.setFrontFace(b.CCW)};this.bindView=function(a,b){p.bindView(b.origin,b.view,n)};this.bindInstance=function(a,b){n.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},F=function(a,b,d){C.call(this,a,b,d,!0)},K=function(b,c,e){p.basicGLMaterialConstructor(this,b);var g=a.clone(b.getParams()),f=q.hasAttribute(b.getVertexBufferLayout(),"uv0")?"Textured":"none";this.instanced=d&&g.instanced;var k=c.shaderVariators.MaterialNormal.getProgram([f,
g.flipV,!!this.instanced,!!g.vvSizeEnabled,!!g.vvRotationEnabled]),n=D(g.transparent,g.writeStencil);p.singleTextureGLMaterialConstructor(this,e,g);this.beginSlot=function(a){return n===a};this.getProgram=function(){return k};this.updateParameters=function(){var a=b.getParams();g.initTexture=a.initTexture;g.cullFace=a.cullFace;g.inverseWindingOrder=a.inverseWindingOrder;g.flipV=a.flipV;t(g,a);this.updateTexture(a.textureId)};this.bind=function(a,b){var d=a.gl;a.bindProgram(k);this.bindTexture(a,k);
k.setUniformMatrix4fv("viewNormal",b.viewInvTransp);y(k,g);A(a,g);g.inverseWindingOrder&&a.setFrontFace(d.CW);a.setDepthTestEnabled(!0)};this.release=function(a){var b=a.gl;z(a,g);g.inverseWindingOrder&&a.setFrontFace(b.CCW)};this.bindView=function(a,b){p.bindView(b.origin,b.view,k)};this.bindInstance=function(a,b){k.setUniformMatrix4fv("model",b.transformation);k.setUniformMatrix4fv("modelNormal",b.transformationNormal)};this.getDrawMode=function(a){return a.gl.TRIANGLES}},M=function(b,c,e,f){p.basicGLMaterialConstructor(this,
b);var k=a.clone(b.getParams());f=q.hasAttribute(b.getVertexBufferLayout(),"uv0")?"Textured":"none";this.instanced=d&&k.instanced;var n=c.shaderVariators.MaterialHighlight.getProgram([f,k.flipV,!!this.instanced,!!k.vvSizeEnabled,!!k.vvRotationEnabled]),l=g.OPAQUE_MATERIAL;p.singleTextureGLMaterialConstructor(this,e,k);this.beginSlot=function(a){return l===a};this.getProgram=function(){return n};this.updateParameters=function(){var a=b.getParams();k.initTexture=a.initTexture;k.cullFace=a.cullFace;
k.inverseWindingOrder=a.inverseWindingOrder;k.flipV=a.flipV;t(k,a);this.updateTexture(a.textureId)};this.bind=function(a,b){b=a.gl;a.bindProgram(n);this.bindTexture(a,n);y(n,k);A(a,k);k.inverseWindingOrder&&a.setFrontFace(b.CW);a.setDepthTestEnabled(!0)};this.release=function(a){var b=a.gl;z(a,k);k.inverseWindingOrder&&a.setFrontFace(b.CW)};this.bindView=function(a,b){p.bindView(b.origin,b.view,n)};this.bindInstance=function(a,b){n.setUniformMatrix4fv("model",b.transformation);n.setUniformMatrix4fv("modelNormal",
b.transformationNormal)};this.getDrawMode=function(a){return a.gl.TRIANGLES}};e.loadShaders=function(a,b,e,g){a._parse(h);d=g.extensions.angleInstancedArrays;g.extensions.shaderTextureLOD;g.extensions.standardDerivatives;var k=new f("phong",["vsPhong","fsPhong"],null,e,b,a,g);k.addNaryShaderSnippetSuffix([{value:"none",programNameSuffix:"",shaderSnippetSuffix:""},{value:"Textured"},{value:"AtlasTextured"}]);k.addBinaryShaderSnippetSuffix("Refl","Refl",[!1,!0]);k.addDefine("Color","VERTEXCOLORS");
k.addDefine("FlipV","FLIPV");k.addDefine("DoubleSided","DOUBLESIDED");k.addDefine("Instanced","INSTANCED");k.addDefine("InstColor","INSTANCEDCOLOR");k.addDefine("ReceiveShadows","RECEIVE_SHADOWS");k.addDefine("ReceiveSSAO","RECEIVE_SSAO");k.addDefine("vvSize","VV_SIZE");k.addDefine("vvColor","VV_COLOR");k.addDefine("vvRotation","VV_ROTATION");e.shaderVariators.Material=k;k=new f("depth",["vsDepth","fsDepth"],null,e,b,a,g);k.addNaryShaderSnippetSuffix([{value:"none",programNameSuffix:"",shaderSnippetSuffix:""},
{value:"Textured"},{value:"AtlasTextured"}]);k.addDefine("FlipV","FLIPV");k.addDefine("Instanced","INSTANCED");k.addDefine("ShadowMap","BIAS_SHADOWMAP");k.addDefine("vvSize","VV_SIZE");k.addDefine("vvRotation","VV_ROTATION");e.shaderVariators.MaterialDepth=k;k=new f("normal",["vsNormal","fsNormal"],null,e,b,a,g);k.addNaryShaderSnippetSuffix([{value:"none",programNameSuffix:"",shaderSnippetSuffix:""},{value:"Textured"},{value:"AtlasTextured"}]);k.addDefine("FlipV","FLIPV");k.addDefine("Instanced",
"INSTANCED");k.addDefine("vvSize","VV_SIZE");k.addDefine("vvRotation","VV_ROTATION");e.shaderVariators.MaterialNormal=k;k=new f("highlight",["vsNormal","fsNormal"],null,e,b,a,g);k.addNaryShaderSnippetSuffix([{value:"none",programNameSuffix:"",shaderSnippetSuffix:""},{value:"Textured"},{value:"AtlasTextured"}]);k.addDefine("FlipV","FLIPV");k.addDefine("Instanced","INSTANCED");k.addDefine("vvSize","VV_SIZE");k.addDefine("vvRotation","VV_ROTATION");e.shaderVariators.MaterialHighlight=k;var k=new m(g,
a.vsDepth,a.fsDepth,c.Default3D,["BIAS_SHADOWMAP 1"]),n=new m(g,a.vsDepthTextured,a.fsDepthTextured,c.Default3D,["BIAS_SHADOWMAP 1"]),l=new m(g,a.vsDepth,a.fsDepth,c.Default3D),q=new m(g,a.vsDepthTextured,a.fsDepthTextured,c.Default3D),r=new m(g,a.vsNormal,a.fsNormal,c.Default3D),t=new m(g,a.vsNormalTextured,a.fsNormalTextured,c.Default3D),w=new m(g,a.vsHighlight,a.fsHighlight,c.Default3D);g=new m(g,a.vsHighlightTextured,a.fsHighlightTextured,c.Default3D);e.add("depthShadowMap",k);e.add("depthTexturedShadowMap",
n);e.add("depth",l);e.add("depthTextured",q);e.add("normal",r);e.add("normalTextured",t);e.add("highlight",w);e.add("highlightTextured",g);b.add("fsDepth",{source:a.fsDepth});b.add("fsDepthTextured",{source:a.fsDepthTextured});b.add("fsDepthShadowMap",{source:a.fsDepthShadowMap,defines:["BIAS_SHADOWMAP 1"]});b.add("fsDepthTexturedShadowMap",{source:a.fsDepthTextured,defines:["BIAS_SHADOWMAP 1"]});b.add("vsDepth",{source:a.vsDepth});b.add("fsNormal",{source:a.fsNormal})};return e})},"esri/views/3d/webgl-engine/materials/RibbonLineMaterial":function(){define("dojo/_base/lang dojo/text!./RibbonLineMaterial.xml ./internal/MaterialUtil ../lib/Util ../lib/gl-matrix ../lib/RenderSlot ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../lib/DefaultVertexBufferLayouts ../../../webgl/Util".split(" "),
function(a,h,p,m,f,e,l,g,c,b){var q=[255,255,255,255],x=[0,0,0,0],y=f.vec3d,t=f.vec2d,u=f.mat4d,r=y.create(),n=y.create(),w=y.create(),d=y.create(),k=t.create(),v=t.create(),A=y.create(),z=y.create();f=function(a,e){p.basicMaterialConstructor(this,e);var g=m.VertexAttrConstants;a=a||{};a.color=a.color||[1,1,1,1];a.width=a.width||0;a.type=a.type||"screen";a.join=a.join||"miter";a.miterLimit="miter"===a.join?a.miterLimit||5:a.miterLimit;var f="wall"===a.type?2:4,l=c.Pos3Tex;"wall"!==a.type&&(l=[{name:"position",
count:3,type:5126,offset:0,stride:64,normalized:!1},{name:"uv0",count:2,type:5126,offset:12,stride:64,normalized:!1},{name:"auxpos1",count:3,type:5126,offset:20,stride:64,normalized:!1},{name:"auxpos2",count:3,type:5126,offset:32,stride:64,normalized:!1},{name:"color",count:4,type:5126,offset:44,stride:64,normalized:!1},{name:"size",count:1,type:5126,offset:60,stride:64,normalized:!1}]);this.canBeMerged=!1;this.getParams=function(){return a};this.getParameterValues=function(){var b={color:a.color,
width:a.width,type:a.type,join:a.join,polygonOffset:a.polygonOffset};"miter"===a.join&&(b.miterLimit=a.miterLimit);return b};this.setParameterValues=function(b){for(var d in b)b.hasOwnProperty(d)&&(m.assert("type"!==d,"RibbonLineMaterial: type cannot be changed after creation"),a[d]=b[d]);this.notifyDirty("matChanged")};this.dispose=function(){};this.getOutputAmount=function(a){return((a/2+1-2)*f+4)*b.getStride(l)/4};this.getVertexBufferLayout=function(){return l};this.fillInterleaved=function(b,
d,c,e,f,k){c=b.vertexAttr[g.POSITION].data;e=b.vertexAttr[g.COLOR]?b.vertexAttr[g.COLOR].data:q;var n=b.vertexAttr[g.SIZE]?b.vertexAttr[g.SIZE].data:x;(b=b.faces&&b.faces.indices&&b.faces.indices.position)&&b.length!=2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");if("wall"===a.type){e=k;n=c.length/3;k=0;b=c[0];for(var l=c[1],m=c[2],h,r,t,w=0;w<n;w++){var p=3*w;h=b;r=l;t=m;b=c[p];l=c[p+1];m=c[p+2];d&&(b=d[0]*b+d[4]*l+d[8]*m+d[12],l=d[1]*b+d[5]*l+d[9]*m+d[13],m=d[2]*b+
d[6]*l+d[10]*m+d[14]);k+=Math.sqrt((b-h)*(b-h)+(l-r)*(l-r)+(m-t)*(m-t));f[e++]=b;f[e++]=l;f[e++]=m;f[e++]=k;f[e++]=-1;f[e++]=b;f[e++]=l;f[e++]=m;f[e++]=k;f[e++]=1}}else{b=c.length/3;l=c[0];m=c[1];h=c[2];r=0;d&&(l=d[0]*l+d[4]*m+d[8]*h+d[12],m=d[1]*l+d[5]*m+d[9]*h+d[13],h=d[2]*l+d[6]*m+d[10]*h+d[14]);t=l;var w=m,p=h,u=c[3],v=c[4],A=c[5];d&&(u=d[0]*u+d[4]*v+d[8]*A+d[12],v=d[1]*u+d[5]*v+d[9]*A+d[13],A=d[2]*u+d[6]*v+d[10]*A+d[14]);for(var y=0;y<b;y++){var z=3*y;y<b-1&&(u=c[z+3],v=c[z+4],A=c[z+5],d&&(u=
d[0]*u+d[4]*v+d[8]*A+d[12],v=d[1]*u+d[5]*v+d[9]*A+d[13],A=d[2]*u+d[6]*v+d[10]*A+d[14]));r+=Math.sqrt((t-l)*(t-l)+(w-m)*(w-m)+(p-h)*(p-h));f[k++]=t;f[k++]=w;f[k++]=p;f[k++]=r;f[k++]=0===y?-1.2:-1;f[k++]=l;f[k++]=m;f[k++]=h;f[k++]=u;f[k++]=v;f[k++]=A;f[k++]=e[0];f[k++]=e[1];f[k++]=e[2];f[k++]=e[3];f[k++]=n[0];f[k++]=t;f[k++]=w;f[k++]=p;f[k++]=r;f[k++]=0===y?1.2:1;f[k++]=l;f[k++]=m;f[k++]=h;f[k++]=u;f[k++]=v;f[k++]=A;f[k++]=e[0];f[k++]=e[1];f[k++]=e[2];f[k++]=e[3];f[k++]=n[0];0<y&&y<b-1&&(f[k++]=t,f[k++]=
w,f[k++]=p,f[k++]=r,f[k++]=-1.2,f[k++]=l,f[k++]=m,f[k++]=h,f[k++]=u,f[k++]=v,f[k++]=A,f[k++]=e[0],f[k++]=e[1],f[k++]=e[2],f[k++]=e[3],f[k++]=n[0],f[k++]=t,f[k++]=w,f[k++]=p,f[k++]=r,f[k++]=1.2,f[k++]=l,f[k++]=m,f[k++]=h,f[k++]=u,f[k++]=v,f[k++]=A,f[k++]=e[0],f[k++]=e[1],f[k++]=e[2],f[k++]=e[3],f[k++]=n[0]);l=t;m=w;h=p;t=u;w=v;p=A}}};this.intersect=function(b,c,e,f,l,h,q){if(f.isSelection){c=b.getData().getVertexAttr(g.position).position.data;b=b.getData().getVertexAttr(g.SIZE).size;b=(b&&b.data[0])+
a.width;l=Number.MAX_VALUE;var t,p;h=f.camera;for(var x=f.point,D=0;D<c.length-5;D+=3){r[0]=c[D];r[1]=c[D+1];r[2]=c[D+2];u.multiplyVec3(e,r);n[0]=c[D+3];n[1]=c[D+4];n[2]=c[D+5];u.multiplyVec3(e,n);h.projectPoint(r,k);h.projectPoint(n,v);if(0>k[2]&&0<v[2])y.subtract(r,n,w),t=h.frustumPlanes,p=-(y.dot(t[4],r)+t[4][3]),t=p/y.dot(w,t[4]),y.scale(w,t,w),y.add(r,w,r),h.projectPoint(r,k);else if(0<k[2]&&0>v[2])y.subtract(n,r,w),t=h.frustumPlanes,p=-(y.dot(t[4],n)+t[4][3]),t=p/y.dot(w,t[4]),y.scale(w,t,w),
y.add(n,w,n),h.projectPoint(n,v);else if(0>k[2]&&0>v[2])continue;t=m.projectVectorVector2D(k,v,x);t<l&&(l=t,y.set(r,A),y.set(n,z))}e=f.p0;f=f.p1;l<b/2+4&&(c=m.linelineDistance3D(A,z,e,f),b=Number.MAX_VALUE,c[0]&&(y.subtract(c[2],e,d),b=y.length(d)/y.dist(e,f)),q(b,d))}};this.getGLMaterials=function(){return{color:D,depthShadowMap:void 0,normal:void 0,depth:void 0,highlight:void 0}};this.getAllTextureIds=function(){return[]}};var D=function(b,d){p.basicGLMaterialConstructor(this,b);var c=a.clone(b.getParams());
c.miterLimit="miter"===c.join?c.miterLimit:0;delete c.join;var g=d.get("ribbonLine_"+c.type);this.updateParameters=function(){var a=b.getParams();c.polygonOffset=a.polygonOffset;c.color=a.color;c.width=a.width;c.miterLimit="miter"===a.join?a.miterLimit:0};this.beginSlot=function(a){return a===e.TRANSPARENT_MATERIAL};this.getProgram=function(){return g};this.bind=function(a,b){a.bindProgram(g);g.setUniform4fv("eColor",c.color);g.setUniform1f("miterLimit",c.miterLimit);g.setUniform1f("nearPlane",b.nearFar[0]);
"screen"===c.type?(g.setUniform2fv("screenSize",[b.viewport[2],b.viewport[3]]),g.setUniform1f("extLineWidth",c.width*b.pixelRatio)):g.setUniform1f("extLineWidth",c.width);c.polygonOffset&&(a.setPolygonOffsetFillEnabled(!0),a.setPolygonOffset(0,-4));a.setFaceCullingEnabled(!1);a.setBlendingEnabled(!0);a.setBlendFunctionSeparate(a.gl.SRC_ALPHA,a.gl.ONE_MINUS_SRC_ALPHA,a.gl.ONE,a.gl.ONE_MINUS_SRC_ALPHA);a.setDepthTestEnabled(!0);a.setDepthWriteEnabled(1<=c.color[3])};this.release=function(a){c.polygonOffset&&
a.setPolygonOffsetFillEnabled(!1);a.setBlendingEnabled(!1);a.setDepthWriteEnabled(!0)};this.bindView=function(a,b){p.bindView(b.origin,b.view,g)};this.bindInstance=function(a,b){g.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLE_STRIP}};f.loadShaders=function(a,b,d,c){a._parse(h);b=new l(c,a.vsRibbonLine,a.fsRibbonLine,g.Default3D,["SCREENSCALE"]);var e=new l(c,a.vsRibbonLine,a.fsRibbonLine,g.Default3D);a=new l(c,a.vsRibbonLine,a.fsRibbonLine,g.Default3D,
["WALL"]);d.add("ribbonLine_screen",b);d.add("ribbonLine_strip",e);d.add("ribbonLine_wall",a)};return f})},"esri/views/3d/webgl-engine/materials/WaterMaterial":function(){define("dojo/text!./WaterMaterial.xml ./internal/MaterialUtil ../lib/RenderSlot ../../../webgl/Program ../lib/DefaultVertexAttributeLocations ../lib/DefaultVertexBufferLayouts ../../../webgl/Util".split(" "),function(a,h,p,m,f,e,l){var g=function(a,g,f,m,t,p){h.basicMaterialConstructor(this,p);var b=e.Pos3;this.dispose=function(){};
this.getNoiseTextureId=function(){return a};this.getReflTextureId=function(){return g};this.getColor=function(){return f};this.getScale=function(){return m};this.getSpeed=function(){return t};this.getOutputAmount=function(a){return a*l.getStride(b)/4};this.getVertexBufferLayout=function(){return b};this.fillInterleaved=function(a,c,d,e,g,f,l){h.fillInterleaved(a,c,d,e,b,g,f,l)};this.intersect=h.intersectTriangleGeometry;this.getGLMaterials=function(){return{color:c,depthShadowMap:void 0,normal:void 0,
depth:void 0,highlight:void 0}};this.getAllTextureIds=function(){return[a,g]}},c=function(a,c,e){h.basicGLMaterialConstructor(this,a);var b=p.TRANSPARENT_MATERIAL,g=c.get("water");c={noiseTextureId:a.getNoiseTextureId(),reflTextureId:a.getReflTextureId()};h.multiTextureGLMaterialConstructor(this,e,c,[["noiseTextureId",void 0,"noiseTex"],["reflTextureId",void 0,"reflTex"]]);var f=a.getColor(),l=a.getScale(),n=a.getSpeed(),m=Date.now();this.beginSlot=function(a){return b===a};this.getProgram=function(){return g};
this.bind=function(a,b){a.bindProgram(g);this.bindTextures(a,g);g.setUniform3fv("color",f);g.setUniform1f("scale",l);a=(Date.now()-m)/1E5*n;a-=Math.floor(a);g.setUniform1f("speed",a);b.shadowMap||g.setUniform1f("depthHalfPixelSz",-1)};this.release=function(a){};this.bindView=function(a,b){a=b.origin;h.bindView(a,b.view,g);h.bindCamPos(a,b.viewInvTransp,g);b.shadowMap&&b.shadowMap.bindView(g,a)};this.bindInstance=function(a,b){g.setUniformMatrix4fv("model",b.transformation)};this.getDrawMode=function(a){return a.gl.TRIANGLES}};
g.loadShaders=function(b,c,e,g){b._parse(a);b=new m(g,b.vertexShaderWater,b.fragmentShaderWater,f.Default3D);e.add("water",b)};return g})},"esri/views/3d/webgl-engine/materials/internal/BlendLayers":function(){define(["dojo/text!./BlendLayers.xml","../../../../webgl/Program","../../lib/DefaultVertexAttributeLocations"],function(a,h,p){return{loadShaders:function(m,f,e,l){m._parse(a);m=new h(l,m.vertexShaderBlendLayers,m.fragmentShaderBlendLayers,p.Default3D);e.add("blendLayers",m)}}})},"esri/views/3d/webgl-engine/lib/tracer":function(){define(["require",
"exports","./webgl-debug"],function(a,h,p){var m=null,f=[];h.enabled=!1;h.begin=function(){h.enabled&&(m=[])};h.trace=function(a){h.enabled&&null!=m&&m.push(a)};h.end=function(){if(h.enabled){var a=m;m=null;a&&(f.forEach(function(e){return e(a)}),f.length=0);return a}};h.instrumentContext=function(a){return h.enabled?p.makeDebugContext(a,void 0,function(a,e){h.enabled&&m&&m.push("gl."+a+"("+p.glFunctionArgsToString(a,e)+")")}):a};h.request=function(a){f.push(a)}})},"esri/views/3d/webgl-engine/lib/webgl-debug":function(){define([],
function(){function a(a){if(null==c){c={};b={};for(var e in a)"number"==typeof a[e]&&(c[a[e]]=e,b[e]=a[e])}}function h(){if(null==c)throw"WebGLDebugUtils.init(ctx) not called";}function p(a){h();var b=c[a];return void 0!==b?"gl."+b:"/*UNKNOWN WebGL ENUM*/ 0x"+a.toString(16)+""}function m(a,c,e,f){a=g[a];if(void 0!==a&&(a=a[c],void 0!==a&&a[e])){if("object"===typeof a[e]&&void 0!==a[e].enumBitwiseOr){c=a[e].enumBitwiseOr;e=0;a=[];for(var l=0;l<c.length;++l){var m=b[c[l]];0!==(f&m)&&(e|=m,a.push(p(m)))}return e===
f?a.join(" | "):p(f)}return p(f)}return null===f?"null":void 0===f?"undefined":f.toString()}function f(a,b,c){a.__defineGetter__(c,function(){return b[c]});a.__defineSetter__(c,function(a){b[c]=a})}function e(b,c,g,l){function h(a,b){return function(){g&&g(b,arguments);var d=a[b].apply(a,arguments),e=l.getError();0!=e&&(q[e]=!0,c(e,b,arguments));return d}}l=l||b;a(b);c=c||function(a,b,d){for(var c="",e=d.length,g=0;g<e;++g)c+=(0==g?"":", ")+m(b,e,g,d[g]);a="WebGL error "+p(a)+" in "+b+"("+c+")";window.console&&
window.console.error?window.console.error(a):window.console&&window.console.log&&window.console.log(a)};var q={},n={},t;for(t in b)if("function"==typeof b[t])if("getExtension"!=t)n[t]=h(b,t);else{var d=h(b,t);n[t]=function(){var a=d.apply(b,arguments);return e(a,c,g,l)}}else f(n,b,t);n.getError=function(){for(var a in q)if(q.hasOwnProperty(a)&&q[a])return q[a]=!1,a;return b.NO_ERROR};return n}function l(a){var b=a.getParameter(a.MAX_VERTEX_ATTRIBS),c=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,c);
for(var e=0;e<b;++e)a.disableVertexAttribArray(e),a.vertexAttribPointer(e,4,a.FLOAT,!1,0,0),a.vertexAttrib1f(e,0);a.deleteBuffer(c);b=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS);for(e=0;e<b;++e)a.activeTexture(a.TEXTURE0+e),a.bindTexture(a.TEXTURE_CUBE_MAP,null),a.bindTexture(a.TEXTURE_2D,null);a.activeTexture(a.TEXTURE0);a.useProgram(null);a.bindBuffer(a.ARRAY_BUFFER,null);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null);a.bindFramebuffer(a.FRAMEBUFFER,null);a.bindRenderbuffer(a.RENDERBUFFER,null);a.disable(a.BLEND);
a.disable(a.CULL_FACE);a.disable(a.DEPTH_TEST);a.disable(a.DITHER);a.disable(a.SCISSOR_TEST);a.blendColor(0,0,0,0);a.blendEquation(a.FUNC_ADD);a.blendFunc(a.ONE,a.ZERO);a.clearColor(0,0,0,0);a.clearDepth(1);a.clearStencil(-1);a.colorMask(!0,!0,!0,!0);a.cullFace(a.BACK);a.depthFunc(a.LESS);a.depthMask(!0);a.depthRange(0,1);a.frontFace(a.CCW);a.hint(a.GENERATE_MIPMAP_HINT,a.DONT_CARE);a.lineWidth(1);a.pixelStorei(a.PACK_ALIGNMENT,4);a.pixelStorei(a.UNPACK_ALIGNMENT,4);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,
!1);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);a.UNPACK_COLORSPACE_CONVERSION_WEBGL&&a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);a.polygonOffset(0,0);a.sampleCoverage(1,!1);a.scissor(0,0,a.canvas.width,a.canvas.height);a.stencilFunc(a.ALWAYS,0,4294967295);a.stencilMask(4294967295);a.stencilOp(a.KEEP,a.KEEP,a.KEEP);a.viewport(0,0,a.canvas.width,a.canvas.height);for(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT|a.STENCIL_BUFFER_BIT);a.getError(););}var g={enable:{1:{0:!0}},
disable:{1:{0:!0}},getParameter:{1:{0:!0}},drawArrays:{3:{0:!0}},drawElements:{4:{0:!0,2:!0}},createShader:{1:{0:!0}},getShaderParameter:{2:{1:!0}},getProgramParameter:{2:{1:!0}},getShaderPrecisionFormat:{2:{0:!0,1:!0}},getVertexAttrib:{2:{1:!0}},vertexAttribPointer:{6:{2:!0}},bindTexture:{2:{0:!0}},activeTexture:{1:{0:!0}},getTexParameter:{2:{0:!0,1:!0}},texParameterf:{3:{0:!0,1:!0}},texParameteri:{3:{0:!0,1:!0,2:!0}},texImage2D:{9:{0:!0,2:!0,6:!0,7:!0},6:{0:!0,2:!0,3:!0,4:!0}},texSubImage2D:{9:{0:!0,
6:!0,7:!0},7:{0:!0,4:!0,5:!0}},copyTexImage2D:{8:{0:!0,2:!0}},copyTexSubImage2D:{8:{0:!0}},generateMipmap:{1:{0:!0}},compressedTexImage2D:{7:{0:!0,2:!0}},compressedTexSubImage2D:{8:{0:!0,6:!0}},bindBuffer:{2:{0:!0}},bufferData:{3:{0:!0,2:!0}},bufferSubData:{3:{0:!0}},getBufferParameter:{2:{0:!0,1:!0}},pixelStorei:{2:{0:!0,1:!0}},readPixels:{7:{4:!0,5:!0}},bindRenderbuffer:{2:{0:!0}},bindFramebuffer:{2:{0:!0}},checkFramebufferStatus:{1:{0:!0}},framebufferRenderbuffer:{4:{0:!0,1:!0,2:!0}},framebufferTexture2D:{5:{0:!0,
1:!0,2:!0}},getFramebufferAttachmentParameter:{3:{0:!0,1:!0,2:!0}},getRenderbufferParameter:{2:{0:!0,1:!0}},renderbufferStorage:{4:{0:!0,1:!0}},clear:{1:{0:{enumBitwiseOr:["COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT"]}}},depthFunc:{1:{0:!0}},blendFunc:{2:{0:!0,1:!0}},blendFuncSeparate:{4:{0:!0,1:!0,2:!0,3:!0}},blendEquation:{1:{0:!0}},blendEquationSeparate:{2:{0:!0,1:!0}},stencilFunc:{3:{0:!0}},stencilFuncSeparate:{4:{0:!0,1:!0}},stencilMaskSeparate:{2:{0:!0}},stencilOp:{3:{0:!0,1:!0,
2:!0}},stencilOpSeparate:{4:{0:!0,1:!0,2:!0,3:!0}},cullFace:{1:{0:!0}},frontFace:{1:{0:!0}},drawArraysInstancedANGLE:{4:{0:!0}},drawElementsInstancedANGLE:{5:{0:!0,2:!0}},blendEquationEXT:{1:{0:!0}}},c=null,b=null;return{init:a,mightBeEnum:function(a){h();return void 0!==c[a]},glEnumToString:p,glFunctionArgToString:m,glFunctionArgsToString:function(a,b){for(var c="",e=b.length,g=0;g<e;++g)c+=(0==g?"":", ")+m(a,e,g,b[g]);return c},makeDebugContext:e,makeLostContextSimulatingCanvas:function(a){function b(a){return"function"==
typeof a?a:function(b){a.handleEvent(b)}}function c(){for(var a=Object.keys(M),b=0;b<a.length;++b)delete M[a]}function e(){++C;z||B==C&&a.loseContext()}function g(a,b){var d=a[b];return function(){e();if(!z)return d.apply(a,arguments)}}function m(a){return{statusMessage:a,preventDefault:function(){F=!0}}}function n(a){for(var b in a)"function"==typeof a[b]?d[b]=g(a,b):f(d,a,b);d.getError=function(){e();if(!z)for(var a;a=h.getError();)M[a]=!0;for(a in M)if(M[a])return delete M[a],a;return d.NO_ERROR};
var c="createBuffer createFramebuffer createProgram createRenderbuffer createShader createTexture".split(" ");for(b=0;b<c.length;++b){var k=c[b];d[k]=function(b){return function(){e();if(z)return null;var d=b.apply(a,arguments);d.__webglDebugContextLostId__=p;D.push(d);return d}}(a[k])}c="getActiveAttrib getActiveUniform getBufferParameter getContextAttributes getAttachedShaders getFramebufferAttachmentParameter getParameter getProgramParameter getProgramInfoLog getRenderbufferParameter getShaderParameter getShaderInfoLog getShaderSource getTexParameter getUniform getUniformLocation getVertexAttrib".split(" ");
for(b=0;b<c.length;++b)k=c[b],d[k]=function(b){return function(){e();return z?null:b.apply(a,arguments)}}(d[k]);c="isBuffer isEnabled isFramebuffer isProgram isRenderbuffer isShader isTexture".split(" ");for(b=0;b<c.length;++b)k=c[b],d[k]=function(b){return function(){e();return z?!1:b.apply(a,arguments)}}(d[k]);d.checkFramebufferStatus=function(b){return function(){e();return z?d.FRAMEBUFFER_UNSUPPORTED:b.apply(a,arguments)}}(d.checkFramebufferStatus);d.getAttribLocation=function(b){return function(){e();
return z?-1:b.apply(a,arguments)}}(d.getAttribLocation);d.getVertexAttribOffset=function(b){return function(){e();return z?0:b.apply(a,arguments)}}(d.getVertexAttribOffset);d.isContextLost=function(){return z};return d}var h,d,k=[],q=[];d={};var p=1,z=!1,D=[],B=0,C=0,F=!1,K=0,M={};a.getContext=function(b){return function(){var c=b.apply(a,arguments);if(c instanceof WebGLRenderingContext){if(c!=h){if(h)throw"got different context";h=c;d=n(h)}return d}return c}}(a.getContext);(function(a){var d=a.addEventListener;
a.addEventListener=function(c,e,g){switch(c){case "webglcontextlost":k.push(b(e));break;case "webglcontextrestored":q.push(b(e));break;default:d.apply(a,arguments)}}})(a);a.loseContext=function(){if(!z){z=!0;B=0;for(++p;h.getError(););c();M[h.CONTEXT_LOST_WEBGL]=!0;var b=m("context lost"),d=k.slice();setTimeout(function(){for(var c=0;c<d.length;++c)d[c](b);0<=K&&setTimeout(function(){a.restoreContext()},K)},0)}};a.restoreContext=function(){z&&q.length&&setTimeout(function(){if(!F)throw"can not restore. webglcontestlost listener did not call event.preventDefault";
for(var a=0;a<D.length;++a){var b=D[a];b instanceof WebGLBuffer?h.deleteBuffer(b):b instanceof WebGLFramebuffer?h.deleteFramebuffer(b):b instanceof WebGLProgram?h.deleteProgram(b):b instanceof WebGLRenderbuffer?h.deleteRenderbuffer(b):b instanceof WebGLShader?h.deleteShader(b):b instanceof WebGLTexture&&h.deleteTexture(b)}l(h);z=!1;C=0;F=!1;for(var a=q.slice(),b=m("context restored"),d=0;d<a.length;++d)a[d](b)},0)};a.loseContextInNCalls=function(a){if(z)throw"You can not ask a lost contet to be lost";
B=C+a};a.getNumCalls=function(){return C};a.setRestoreTimeout=function(a){K=a};return a},resetToInitialState:l}})},"esri/views/webgl/RenderingContext":function(){define(["require","exports","./enums","./Extensions"],function(a,h,p,m){a=function(){function a(a,f){this.gl=null;this._extensions=void 0;this._blendEnabled=!1;this._blendColorState={r:0,g:0,b:0,a:0};this._blendFunctionState={srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0};this._blendEquationState={mode:32774,modeAlpha:32774};this._colorMaskState=
{r:!0,g:!0,b:!0,a:!0};this._polygonCullingEnabled=!1;this._cullFace=1029;this._frontFace=2305;this._scissorTestEnabled=!1;this._scissorRect={x:0,y:0,width:0,height:0};this._depthTestEnabled=!1;this._depthFunction=513;this._clearDepth=1;this._depthWriteEnabled=!0;this._depthRange={zNear:0,zFar:1};this._viewport=null;this._polygonOffsetFillEnabled=this._stencilTestEnabled=!1;this._polygonOffset=[0,0];this._stencilFunction={face:1032,func:519,ref:0,mask:1};this._clearStencil=0;this._stencilWriteMask=
1;this._stencilOperation={face:1032,fail:7680,zFail:7680,zPass:7680};this._lineWidth=1;this._clearColor={r:0,g:0,b:0,a:0};this._activeFramebuffer=this._activeIndexBuffer=this._activeVertexBuffer=this._activeShaderProgram=null;this._activeTextureUnit=0;this._textureUnitMap={};this.gl=a;this._extensions=new m(a,f);f=a.getParameter(a.VIEWPORT);this._viewport={x:f[0],y:f[1],width:f[2],height:f[3]};f=this.extensions.textureFilterAnisotropic;this._parameters={versionString:a.getParameter(a.VERSION),maxVertexTextureImageUnits:a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),
maxVertexAttributes:a.getParameter(a.MAX_VERTEX_ATTRIBS),maxMaxAnisotropy:f?a.getParameter(f.MAX_TEXTURE_MAX_ANISOTROPY_EXT):void 0,maxTextureImageUnits:a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)};this.enforceState()}Object.defineProperty(a.prototype,"extensions",{get:function(){return this._extensions},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"contextAttributes",{get:function(){return this.gl.getContextAttributes()},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"parameters",{get:function(){return this._parameters},enumerable:!0,configurable:!0});a.prototype.setBlendingEnabled=function(a){this._blendEnabled!==a&&(!0===a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._blendEnabled=a)};a.prototype.setBlendColor=function(a,f,g,c){if(a!==this._blendColorState.r||f!==this._blendColorState.g||g!==this._blendColorState.b||c!==this._blendColorState.a)this.gl.blendColor(a,f,g,c),this._blendColorState.r=a,this._blendColorState.g=f,this._blendColorState.b=
g,this._blendColorState.a=c};a.prototype.setBlendFunction=function(a,f){if(a!==this._blendFunctionState.srcRGB||f!==this._blendFunctionState.dstRGB)this.gl.blendFunc(a,f),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=a,this._blendFunctionState.dstRGB=f,this._blendFunctionState.dstAlpha=f};a.prototype.setBlendFunctionSeparate=function(a,f,g,c){if(this._blendFunctionState.srcRGB!==a||this._blendFunctionState.srcAlpha!==g||this._blendFunctionState.dstRGB!==f||this._blendFunctionState.dstAlpha!==
c)this.gl.blendFuncSeparate(a,f,g,c),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=g,this._blendFunctionState.dstRGB=f,this._blendFunctionState.dstAlpha=c};a.prototype.setBlendEquation=function(a){this._blendEquationState.mode!==a&&(this.gl.blendEquation(a),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=a)};a.prototype.setBlendEquationSeparate=function(a,f){if(this._blendEquationState.mode!==a||this._blendEquationState.modeAlpha!==f)this.gl.blendEquationSeparate(a,
f),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=f};a.prototype.setColorMask=function(a,f,g,c){if(this._colorMaskState.r!==a||this._colorMaskState.g!==f||this._colorMaskState.b!==g||this._colorMaskState.a!==c)this.gl.colorMask(a,f,g,c),this._colorMaskState.r=a,this._colorMaskState.g=f,this._colorMaskState.b=g,this._colorMaskState.a=c};a.prototype.setClearColor=function(a,f,g,c){if(this._clearColor.r!==a||this._clearColor.g!==f||this._clearColor.b!==g||this._clearColor.a!==c)this.gl.clearColor(a,
f,g,c),this._clearColor.r=a,this._clearColor.g=f,this._clearColor.b=g,this._clearColor.a=c};a.prototype.setFaceCullingEnabled=function(a){this._polygonCullingEnabled!==a&&(!0===a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._polygonCullingEnabled=a)};a.prototype.setPolygonOffsetFillEnabled=function(a){this._polygonOffsetFillEnabled!==a&&(!0===a?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._polygonOffsetFillEnabled=a)};a.prototype.setPolygonOffset=
function(a,f){if(this._polygonOffset[0]!==a||this._polygonOffset[1]!==f)this._polygonOffset[0]=a,this._polygonOffset[1]=f,this.gl.polygonOffset(a,f)};a.prototype.setCullFace=function(a){this._cullFace!==a&&(this.gl.cullFace(a),this._cullFace=a)};a.prototype.setFrontFace=function(a){this._frontFace!==a&&(this.gl.frontFace(a),this._frontFace=a)};a.prototype.setScissorTestEnabled=function(a){this._scissorTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),
this._scissorTestEnabled=a)};a.prototype.setScissorRect=function(a,f,g,c){if(this._scissorRect.x!==a||this._scissorRect.y!==f||this._scissorRect.width!==g||this._scissorRect.height!==c)this.gl.scissor(a,f,g,c),this._scissorRect.x=a,this._scissorRect.y=f,this._scissorRect.width=g,this._scissorRect.height=c};a.prototype.setDepthTestEnabled=function(a){this._depthTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTestEnabled=a)};a.prototype.setClearDepth=
function(a){this._clearDepth!==a&&(this.gl.clearDepth(a),this._clearDepth=a)};a.prototype.setDepthFunction=function(a){this._depthFunction!==a&&(this.gl.depthFunc(a),this._depthFunction=a)};a.prototype.setDepthWriteEnabled=function(a){this._depthWriteEnabled!==a&&(this.gl.depthMask(a),this._depthWriteEnabled=a)};a.prototype.setDepthRange=function(a,f){if(this._depthRange.zNear!==a||this._depthRange.zFar!==f)this.gl.depthRange(a,f),this._depthRange.zNear=a,this._depthRange.zFar=f};a.prototype.setStencilTestEnabled=
function(a){this._stencilTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTestEnabled=a)};a.prototype.setClearStencil=function(a){a!==this._clearStencil&&(this.gl.clearStencil(a),this._clearStencil=a)};a.prototype.setStencilFunction=function(a,f,g){if(this._stencilFunction.func!==a||this._stencilFunction.ref!==f||this._stencilFunction.mask!==g)this.gl.stencilFunc(a,f,g),this._stencilFunction.face=1032,this._stencilFunction.func=a,this._stencilFunction.ref=
f,this._stencilFunction.mask=g};a.prototype.setStencilFunctionSeparate=function(a,f,g,c){if(this._stencilFunction.face!==a||this._stencilFunction.func!==f||this._stencilFunction.ref!==g||this._stencilFunction.mask!==c)this.gl.stencilFuncSeparate(a,f,g,c),this._stencilFunction.face=a,this._stencilFunction.func=f,this._stencilFunction.ref=g,this._stencilFunction.mask=c};a.prototype.setStencilWriteMask=function(a){this._stencilWriteMask!==a&&(this.gl.stencilMask(a),this._stencilWriteMask=a)};a.prototype.setStencilOp=
function(a,f,g){if(this._stencilOperation.fail!==a||this._stencilOperation.zFail!==f||this._stencilOperation.zPass!==g)this.gl.stencilOp(a,f,g),this._stencilOperation.face=1032,this._stencilOperation.fail=a,this._stencilOperation.zFail=f,this._stencilOperation.zPass=g};a.prototype.setStencilOpSeparate=function(a,f,g,c){if(this._stencilOperation.face!==a||this._stencilOperation.fail!==f||this._stencilOperation.zFail!==g||this._stencilOperation.zPass!==c)this.gl.stencilOpSeparate(a,f,g,c),this._stencilOperation.face=
a,this._stencilOperation.face=a,this._stencilOperation.fail=f,this._stencilOperation.zFail=g,this._stencilOperation.zPass=c};a.prototype.setLineWidth=function(a){var e=this._lineWidth;this._lineWidth!==a&&(this.gl.lineWidth(a),this._lineWidth=a);return e};a.prototype.setActiveTexture=function(a){var e=this._activeTextureUnit;0<=a&&a!==this._activeTextureUnit&&(this.gl.activeTexture(p.BASE_TEXTURE_UNIT+a),this._activeTextureUnit=a);return e};a.prototype.clear=function(a){a&&this.gl.clear(a)};a.prototype.drawArrays=
function(a,f,g){this.gl.drawArrays(a,f,g)};a.prototype.drawElements=function(a,f,g,c){5123===g?this.gl.drawElements(a,f,g,c):5125===g&&this._extensions.elementIndexUint?this.gl.drawElements(a,f,g,c):console.warn("Data type is uint however extension OES_Element_index_unit is not supported therefore this draw call cannot be made")};a.prototype.drawArraysInstanced=function(a,f,g,c){this._extensions.angleInstancedArrays?this._extensions.angleInstancedArrays.drawArraysInstancedANGLE(a,f,g,c):console.error("Extension ANGLE_instanced_arrays isn't supported!")};
a.prototype.drawElementsInstanced=function(a,f,g,c,b){this._extensions.angleInstancedArrays?this._extensions.angleInstancedArrays.drawElementsInstancedANGLE(a,f,g,c,b):console.error("Extension ANGLE_instanced_arrays isn't supported!")};a.prototype.setViewport=function(a,f,g,c){var b=this._viewport;if(b.x!==a||b.y!==f||b.width!==g||b.height!==c)b.x=a,b.y=f,b.width=g,b.height=c,this.gl.viewport(a,f,g,c)};a.prototype.getViewport=function(){return this._viewport};a.prototype.bindProgram=function(a){a?
this._activeShaderProgram!==a&&(a.initialize(),this.gl.useProgram(a.glName),this._activeShaderProgram=a):(this.gl.useProgram(null),this._activeShaderProgram=null)};a.prototype.bindTexture=function(e,f){void 0===f&&(f=0);-1===a._MAX_TEXTURE_IMAGE_UNITS&&(a._MAX_TEXTURE_IMAGE_UNITS=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS));(f>=a._MAX_TEXTURE_IMAGE_UNITS||0>f)&&console.error("Input texture unit is out of range of available units!");var g=this._textureUnitMap[f];this.setActiveTexture(f);
null==e?(null!=g&&this.gl.bindTexture(g.descriptor.target,null),this._textureUnitMap[f]=null):g&&g.id===e.id?e.applyChanges():(this.gl.bindTexture(e.descriptor.target,e.glName),e.applyChanges(),this._textureUnitMap[f]=e)};a.prototype.bindFramebuffer=function(a){a?this._activeFramebuffer!==a&&(a.initialize()||this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a.glName),this._activeFramebuffer=a):(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this._activeFramebuffer=null)};a.prototype.bindBuffer=function(e){e&&
(34962===e.bufferType?this._activeVertexBuffer=a._bindBuffer(this.gl,e,e.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=a._bindBuffer(this.gl,e,e.bufferType,this._activeIndexBuffer))};a.prototype.unbindBuffer=function(e){34962===e?this._activeVertexBuffer=a._bindBuffer(this.gl,null,e,this._activeVertexBuffer):this._activeIndexBuffer=a._bindBuffer(this.gl,null,e,this._activeIndexBuffer)};a.prototype.bindVAO=function(a){a?this._activeVertexArrayObject&&this._activeVertexArrayObject.id===
a.id||(a.bind(),this._activeVertexArrayObject=a):this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null)};a.prototype.getBoundTexture=function(a){return this._textureUnitMap[a]};a.prototype.getBoundFramebufferObject=function(){return this._activeFramebuffer};a.prototype.getBoundVAO=function(){return this._activeVertexArrayObject};a.prototype.resetState=function(){this.bindProgram(null);this.bindVAO(null);this.bindFramebuffer(null);this.unbindBuffer(34962);
this.unbindBuffer(34963);for(var a=0;a<this.parameters.maxTextureImageUnits;a++)this.bindTexture(null,a);this.setBlendingEnabled(!1);this.setBlendFunction(1,0);this.setBlendEquation(32774);this.setBlendColor(0,0,0,0);this.setFaceCullingEnabled(!1);this.setCullFace(1029);this.setFrontFace(2305);this.setPolygonOffsetFillEnabled(!1);this.setPolygonOffset(0,0);this.setScissorTestEnabled(!1);this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height);this.setDepthTestEnabled(!1);this.setDepthFunction(513);
this.setDepthRange(0,1);this.setStencilTestEnabled(!1);this.setStencilFunction(519,0,0);this.setStencilOp(7680,7680,7680);this.setClearColor(0,0,0,0);this.setClearDepth(1);this.setClearStencil(0);this.setColorMask(!0,!0,!0,!0);this.setStencilWriteMask(4294967295);this.setDepthWriteEnabled(!0);this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)};a.prototype.enforceState=function(){var a=this.gl,f=this._extensions.vao;f&&f.bindVertexArrayOES(null);for(var g=0;g<this.parameters.maxVertexAttributes;g++)a.disableVertexAttribArray(g);
this._activeVertexBuffer?a.bindBuffer(this._activeVertexBuffer.bufferType,this._activeVertexBuffer.glName):a.bindBuffer(34962,null);this._activeIndexBuffer?a.bindBuffer(this._activeIndexBuffer.bufferType,this._activeIndexBuffer.glName):a.bindBuffer(34963,null);if(f&&this._activeVertexArrayObject){if(f=this._activeVertexArrayObject)this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null;this.bindVAO(f)}a.bindFramebuffer(a.FRAMEBUFFER,this._activeFramebuffer?this._activeFramebuffer.glName:
null);a.useProgram(this._activeShaderProgram?this._activeShaderProgram.glName:null);a.blendColor(this._blendColorState.r,this._blendColorState.g,this._blendColorState.b,this._blendColorState.a);!0===this._blendEnabled?a.enable(this.gl.BLEND):a.disable(this.gl.BLEND);a.blendEquationSeparate(this._blendEquationState.mode,this._blendEquationState.modeAlpha);a.blendFuncSeparate(this._blendFunctionState.srcRGB,this._blendFunctionState.dstRGB,this._blendFunctionState.srcAlpha,this._blendFunctionState.dstAlpha);
a.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a);a.clearDepth(this._clearDepth);a.clearStencil(this._clearStencil);a.colorMask(this._colorMaskState.r,this._colorMaskState.g,this._colorMaskState.b,this._colorMaskState.a);a.cullFace(this._cullFace);a.depthFunc(this._depthFunction);a.depthRange(this._depthRange.zNear,this._depthRange.zFar);!0===this._depthTestEnabled?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST);a.depthMask(this._depthWriteEnabled);a.frontFace(this._frontFace);
a.lineWidth(this._lineWidth);!0===this._polygonCullingEnabled?a.enable(a.CULL_FACE):a.disable(a.CULL_FACE);a.polygonOffset(this._polygonOffset[0],this._polygonOffset[1]);!0===this._polygonOffsetFillEnabled?a.enable(a.POLYGON_OFFSET_FILL):a.disable(a.POLYGON_OFFSET_FILL);a.scissor(this._scissorRect.x,this._scissorRect.y,this._scissorRect.width,this._scissorRect.height);!0===this._scissorTestEnabled?a.enable(a.SCISSOR_TEST):a.disable(a.SCISSOR_TEST);a.stencilFunc(this._stencilFunction.func,this._stencilFunction.ref,
this._stencilFunction.mask);a.stencilOpSeparate(this._stencilOperation.face,this._stencilOperation.fail,this._stencilOperation.zFail,this._stencilOperation.zPass);!0===this._stencilTestEnabled?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST);a.stencilMask(this._stencilWriteMask);for(f=0;f<this.parameters.maxTextureImageUnits;f++)a.activeTexture(p.BASE_TEXTURE_UNIT+f),a.bindTexture(3553,null),(g=this._textureUnitMap[f])&&a.bindTexture(g.descriptor.target,g.glName);a.activeTexture(p.BASE_TEXTURE_UNIT+
this._activeTextureUnit);a.viewport(this._viewport.x,this._viewport.y,this._viewport.width,this._viewport.height)};a._bindBuffer=function(a,f,g,c){if(!f)return a.bindBuffer(g,null),null;if(c===f)return c;a.bindBuffer(g,f.glName);return f};return a}();a._MAX_TEXTURE_IMAGE_UNITS=-1;return a})},"esri/views/webgl/Extensions":function(){define(["require","exports"],function(a,h){return function(){function a(a,f){this._compressedTextureS3TCInit=this._shaderTextureLODInit=this._textureFilterAnisotropicInit=
this._depthTextureInit=this._elementIndexUintInit=this._standardDerivativesInit=this._angleInstancedArraysInit=this._vaoInit=!1;this._gl=a;f&&f.disabledExtensions&&(a=f.disabledExtensions,a.vao&&(this._vao=null,this._vaoInit=!0),a.angleInstancedArrays&&(this._angleInstancedArrays=null,this._angleInstancedArraysInit=!0),a.standardDerivatives&&(this._standardDerivatives=null,this._standardDerivativesInit=!0),a.elementIndexUint&&(this._elementIndexUint=null,this._elementIndexUintInit=!0),a.depthTexture&&
(this._depthTexture=null,this._depthTextureInit=!0),a.textureFilterAnisotropic&&(this._textureFilterAnisotropic=null,this._textureFilterAnisotropicInit=!0),a.compressedTextureS3TC&&(this._compressedTextureS3TC=null,this._compressedTextureS3TCInit=!0),a.shaderTextureLOD&&(this._shaderTextureLOD=null,this._shaderTextureLODInit=!0))}Object.defineProperty(a.prototype,"vao",{get:function(){this._vaoInit||(this._vao=this._gl.getExtension("OES_vertex_array_object")||this._gl.getExtension("MOZ_OES_vertex_array_object")||
this._gl.getExtension("WEBKIT_OES_vertex_array_object"),this._vaoInit=!0);return this._vao},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"angleInstancedArrays",{get:function(){this._angleInstancedArraysInit||(this._angleInstancedArrays=this._gl.getExtension("ANGLE_instanced_arrays"),this._angleInstancedArraysInit=!0);return this._angleInstancedArrays},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"standardDerivatives",{get:function(){this._standardDerivativesInit||
(this._standardDerivatives=this._gl.getExtension("OES_standard_derivatives"),this._standardDerivativesInit=!0);return this._standardDerivatives},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"elementIndexUint",{get:function(){this._elementIndexUintInit||(this._elementIndexUint=this._gl.getExtension("OES_element_index_uint"),this._elementIndexUintInit=!0);return this._elementIndexUint},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"depthTexture",{get:function(){this._depthTextureInit||
(this._depthTexture=this._gl.getExtension("WEBGL_depth_texture")||this._gl.getExtension("MOZ_WEBGL_depth_texture")||this._gl.getExtension("WEBKIT_WEBGL_depth_texture"),this._depthTextureInit=!0);return this._depthTexture},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textureFilterAnisotropic",{get:function(){this._textureFilterAnisotropicInit||(this._textureFilterAnisotropic=this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic")||
this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this._textureFilterAnisotropicInit=!0);return this._textureFilterAnisotropic},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"shaderTextureLOD",{get:function(){this._shaderTextureLODInit||(this._shaderTextureLOD=this._gl.getExtension("EXT_shader_texture_lod"),this._shaderTextureLODInit=!0);return this._shaderTextureLOD},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"compressedTextureS3TC",{get:function(){this._compressedTextureS3TCInit||
(this._compressedTextureS3TC=this._gl.getExtension("WEBGL_compressed_texture_s3tc"),this._compressedTextureS3TCInit=!0);return this._compressedTextureS3TC},enumerable:!0,configurable:!0});return a}()})},"esri/views/3d/webgl-engine/lib/ProgramRepository":function(){define(["require","exports","./Util"],function(a,h,p){return function(){function a(){this._nextId=0;this._programsByName={};this._namesById=[];this._programRefCount=[];this.shaderVariators={};this._commonUniforms={model:[],modelNormal:[],
lightDirection:[],proj:[],shadowMapDistance:[],viewportPixelSz:[]}}a.prototype.dispose=function(){for(var a in this._programsByName)this._programsByName[a].dispose();this._programRefCount=this._namesById=this._programsByName=null};a.prototype.add=function(a,e){p.assert(null==this._programsByName[a]);this._programsByName[a]=e;this._namesById[e.id]=a};a.prototype.get=function(a){return this._programsByName[a]};a.prototype.getProgramsUsingUniform=function(a){return this._commonUniforms[a]||[]};a.prototype.increaseRefCount=
function(a){var e=a.id;this._programRefCount[e]?this._programRefCount[e]++:(this._programRefCount[e]=1,this._findCommonUniforms(a))};a.prototype.decreaseRefCount=function(a){var e=a.id;1<this._programRefCount[e]?this._programRefCount[e]--:(this._forgetCommonUniforms(a),this._programRefCount[e]=0)};a.prototype._getNextId=function(){return this._nextId++};a.prototype._findCommonUniforms=function(a){for(var e in this._commonUniforms)a.hasUniform(e)&&(p.assert(-1===this._commonUniforms[e].indexOf(a),
"common uniforms of program have already been determined"),this._commonUniforms[e].push(a))};a.prototype._forgetCommonUniforms=function(a){for(var e in this._commonUniforms){var f=this._commonUniforms[e],g=f.indexOf(a);-1<g&&(f[g]=f[f.length-1],f.pop())}};return a}()})},"esri/views/support/screenshotUtils":function(){define(["require","exports","dojo/_base/lang"],function(a,h,p){h.adjustScreenshotSettings=function(a,f){a=p.mixin({format:"png",quality:100},a||{});var e,l;a.includePadding?(e=f.width,
l=f.height):(e=f.width-f.padding.left-f.padding.right,l=f.height-f.padding.top-f.padding.bottom);var g=e/l;void 0!==a.width&&void 0===a.height?a.height=a.width/g:void 0!==a.height&&void 0===a.width&&(a.width=g*a.height);void 0!==a.height&&(a.height=Math.floor(a.height));void 0!==a.width&&(a.width=Math.floor(a.width));a.area||a.includePadding||(a.area={x:f.padding.left,y:f.padding.top,width:e,height:l});return a};h.resampleHermite=function(a,f,e,l,g,c,b){void 0===b&&(b=!0);var h=f/g;e/=c;for(var m=
Math.ceil(h/2),p=Math.ceil(e/2),t=0;t<c;t++)for(var u=0;u<g;u++){for(var r=4*(u+(b?c-t-1:t)*g),n=0,w=0,d=0,k=0,v=0,A=0,z=0,D=(t+.5)*e,B=Math.floor(t*e);B<(t+1)*e;B++)for(var C=Math.abs(D-(B+.5))/p,F=(u+.5)*h,C=C*C,K=Math.floor(u*h);K<(u+1)*h;K++){var M=Math.abs(F-(K+.5))/m,n=Math.sqrt(C+M*M);-1<=n&&1>=n&&(n=2*n*n*n-3*n*n+1,0<n&&(M=4*(K+B*f),z+=n*a[M+3],d+=n,255>a[M+3]&&(n=n*a[M+3]/250),k+=n*a[M],v+=n*a[M+1],A+=n*a[M+2],w+=n))}l[r]=k/w;l[r+1]=v/w;l[r+2]=A/w;l[r+3]=z/d}}})},"esri/views/3d/webgl-engine/lib/Selector":function(){define("require exports dojo/has ./PerformanceTimer ./gl-matrix ./Object3D".split(" "),
function(a,h,p,m,f,e){var l=f.vec3d,g=f.mat4d,c=g.create(),b=l.create(),q=l.create();a=function(){function a(a,b,c,e,f,d,k){void 0===k&&(k=!1);this.dir=l.create();this.normalDir=null;this.minResult=new x;this.maxResult=new x;this.invertedM=g.create();this.enableHUDSelection=!0;this.enableInvisibleTerrain=!1;this.enableBackfacesTerrain=!0;this.performanceInfo={queryDuration:0,numObjectsTested:0};this.intersectObject=this.intersectObject.bind(this);this.init(a,b,c,e,f,d,k)}a.prototype.init=function(a,
b,c,e,g,d,f){b&&c&&l.subtract(c,b,this.dir);this.minResult.init(b,c);this.maxResult.init(b,c);this.numObjectsTested=0;this.point=e;this.camera=g;this.isSelection=f;this.layers=a;this.p0=b;this.p1=c;this.hudResults=[];null==d&&(d=1E-5);this.tolerance=d;if(this.layers)for(a=0;a<this.layers.length;++a)if(b=this.layers[a],c=b.getSpatialQueryAccelerator?b.getSpatialQueryAccelerator():void 0)c.forEachAlongRay(this.p0,this.dir,this.intersectObject);else for(b=b.getObjects(),c=0;c<b.length;++c)this.intersectObject(b[c])};
a.prototype.getDirection=function(){this.normalDir||(this.normalDir=l.create(),l.normalize(this.dir,this.normalDir));return this.normalDir};a.prototype.intersectObject=function(a){var e=this;this.numObjectsTested++;for(var f=a.getId(),n=a.getGeometryRecords(),l=a.getObjectTransformation(),d,k=0;k<n.length;k++){var h=n[k],m=h.geometry,t=h.materials,p=h.instanceParameters;d=m.getId();g.set(l,c);g.multiply(c,h.getShaderTransformation());g.inverse(c,this.invertedM);g.multiplyVec3(this.invertedM,this.p0,
b);g.multiplyVec3(this.invertedM,this.p1,q);t[0].intersect(m,p,c,this,b,q,function(b,c,g,k,n){0<=b&&(n?(n=new x,n.set(a,f,b,c,k,a.getCenter(),d,g),e.hudResults.push(n)):((null==e.minResult.priority||k>=e.minResult.priority)&&(null==e.minResult.dist||b<e.minResult.dist)&&e.minResult.set(a,f,b,c,k,null,d,g),(null==e.maxResult.priority||k>=e.maxResult.priority)&&(null==e.maxResult.dist||b>e.maxResult.dist)&&e.maxResult.set(a,f,b,c,k,null,d,g)))},h.customTransformation)}};a.prototype.getMinResult=function(){return this.minResult};
a.prototype.getMaxResult=function(){return this.maxResult};a.prototype.getHudResults=function(){return this.hudResults};return a}();a.DEFAULT_TOLERANCE=1E-5;a.Result=typeof x;var x=function(){function a(a,b){this.normal=l.create();this.init(a,b)}a.prototype.getIntersectionPoint=function(a){if(null==this.dist)return!1;l.lerp(this.p0,this.p1,this.dist,a);return!0};a.prototype.set=function(a,b,c,g,f,d,k,h){this.dist=c;l.set(g,this.normal);this.targetType=a?a instanceof e?"StageObject":"StagePoint":"None";
this.target=a;this.name=b;this.priority=f;this.center=d;this.geometryId=k;this.triangleNr=h};a.prototype.setIntersector=function(a){this.intersector=a};a.prototype.init=function(a,b){this.dist=void 0;this.targetType="None";this.priority=this.name=this.target=void 0;this.triangleNr=this.geometryId=this.center=null;this.intersector="stage";this.p0=a;this.p1=b};return a}();return a})},"esri/views/3d/webgl-engine/lib/Object3D":function(){define("require exports ./IdGen ./Util ./gl-matrix ./ComponentUtils ./ModelContentType ./GeometryRecord".split(" "),
function(a,h,p,m,f,e,l,g){var c=m.assert,b=f.mat4d,q=f.vec3d,x=m.VertexAttrConstants;a=function(){function a(c){void 0===c&&(c={});this._bvObjectSpace=new y;this._bvWorldSpace=new y;this._bvDirty=!0;this._hasVolatileTransformation=!1;this.id=a._idGen.gen(c.idHint);this.name=c.name;this.castShadow=null!=c.castShadow?c.castShadow:!0;this.metadata=c.metadata;this.objectTransformation=b.identity();this._initializeGeometryRecords(c.geometries,c.materials,c.transformations)}a.prototype._initializeGeometryRecords=
function(a,e,f){if(Array.isArray(a)){c(e.length===a.length,"Object3D: materials don't match geometries");c(f.length===a.length,"Object3D: transformations don't match geometries");this.geometryRecords=Array(a.length);this.geometries=a.slice();for(var n=0;n<a.length;n++)c(Array.isArray(e[n]),"Object3D: materials parameter must be array of array"),this.geometryRecords[n]=new g(a[n],e[n].slice(),b.create(f[n]),{});this._hasVolatileTransformation=!1}else this.geometryRecords=[],this.geometries=[]};a.prototype.getId=
function(){return this.id};Object.defineProperty(a.prototype,"parentLayer",{get:function(){return this._parentLayer},set:function(a){c(null==this._parentLayer||null==a,"Object3D can only be added to a single Layer");this._parentLayer=a},enumerable:!0,configurable:!0});a.prototype.getParentLayer=function(){return this.parentLayer};a.prototype.addParentLayer=function(a){this.parentLayer=a};a.prototype.removeParentLayer=function(a){this.parentLayer=null};a.prototype.getNumGeometryRecords=function(){return this.geometryRecords.length};
a.prototype.getFirstGeometryIndex=function(a){a=this.geometries.indexOf(a);c(-1<a,"Object3D.getFirstGeometryIndex: geometry not found");return a};a.prototype.findGeometryRecords=function(a){for(var b=[],c=0;c<this.geometries.length;c++)this.geometries[c]===a&&b.push(this.geometryRecords[c]);return b};a.prototype.getGeometryRecord=function(a){c(0<=a&&a<this.geometryRecords.length,"Object3d.getGeometryDataByIndex: index out of range");return this.geometryRecords[a]};a.prototype.getGeometryRecords=function(){return this.geometryRecords};
a.prototype.addGeometry=function(a,e,f,l,d,k){c(Array.isArray(e),"Object3D.addGeometry: materials must be array");this.geometries.push(a);a=new g(a,e.slice(),b.create(f),l||{},d,k);this.geometryRecords.push(a);this._hasVolatileTransformation=this.geometryRecords.some(function(a){return!!a.customTransformation});this._notifyDirty("objGeometryAdded",a);this._invalidateBoundingVolume();return a};a.prototype.hasGeometry=function(a){return-1<this.geometries.indexOf(a)};a.prototype.removeGeometry=function(a){var b=
this.geometryRecords.splice(a,1)[0];this._hasVolatileTransformation=this.geometryRecords.some(function(a){return!!a.customTransformation});this.geometries.splice(a,1);this._notifyDirty("objGeometryRemoved",b);this._invalidateBoundingVolume();return b};a.prototype.geometryVertexAttrsUpdated=function(a){this._notifyDirty("vertexAttrsUpdated",this.geometryRecords[a]);this._invalidateBoundingVolume()};a.prototype.geometryColorAttrsUpdated=function(a){this._notifyDirty("colorAttrsUpdated",this.geometryRecords[a])};
a.prototype.isAllHidden=function(){for(var a=0,b=this.geometryRecords;a<b.length;a++){var c=b[a],g=c.instanceParameters.componentVisibilities,c=c.geometry.getData().componentOffsets;if(!e.isAllHidden(g,c))return!1}return!0};a.prototype.isAllVisible=function(){for(var a=0,b=this.geometryRecords;a<b.length;a++){var c=b[a],g=c.instanceParameters.componentVisibilities,c=c.geometry.getData().componentOffsets;if(!e.isAllVisible(g,c))return!1}return!0};a.prototype.setFacerangeColors=function(a,b){var c=
this.geometryRecords;if(1!==c.length)console.warn("face range colors currently support only one geometry record");else{var c=c[0].geometry,e=c.data.vertexAttributes;if(null!=c.originalColors||!a.every(function(a){return null==a.color}))if(null==c.originalColors&&(c.originalColors=e[x.COLOR].data,e[x.COLOR].data=new c.originalColors.constructor(c.originalColors)),e=e[x.COLOR].data,null!=e){for(var d=0;d<a.length;d++){var g=a[d],f=null==g.faceRanges?0:12*g.faceRanges[0],l=null==g.faceRanges?e.length:
12*(g.faceRanges[1]+1);if(null!=g.color)if("blend"===b)for(var h=g.color[0],m=g.color[1],q=g.color[2],g=g.color[3];f<l;f+=4)e[f+0]=c.originalColors[f+0]*h,e[f+1]=c.originalColors[f+1]*m,e[f+2]=c.originalColors[f+2]*q,e[f+3]=c.originalColors[f+3]*g;else for(h=255*g.color[0],m=255*g.color[1],q=255*g.color[2],g=255*g.color[3];f<l;f+=4)e[f+0]=h,e[f+1]=m,e[f+2]=q,e[f+3]=g;else for(;f<l;f++)e[f]=c.originalColors[f]}this.geometryColorAttrsUpdated(0)}}};a.prototype.hasComponents=function(){for(var a=!1,b=
0;b<this.geometries.length&&!(a=this.geometries[b].getData(),a=e.hasComponents(a.componentOffsets));b++);return a};a.prototype.setComponentVisibility=function(a,b,c){var g=a.instanceParameters.componentVisibilities,d=a.geometry.getData().componentOffsets;b=e.updateVisibility(g,d,b,c);a.instanceParameters.componentVisibilities=b;this._notifyDirty("componentVisibilityChanged",a)};a.prototype.getComponentVisibility=function(a,b){return e.getVisibility(a.instanceParameters.componentVisibilities,b)};a.prototype.hideAllComponents=
function(){for(var a=0,b=this.geometryRecords;a<b.length;a++){var c=b[a],g=e.hideAllComponents(c.instanceParameters.componentVisibilities);c.instanceParameters.componentVisibilities=g}this._notifyDirty("componentVisibilityChanged")};a.prototype.unhideAllComponents=function(){for(var a=0,b=this.geometryRecords;a<b.length;a++){var c=b[a],g=e.unhideAllComponents(c.instanceParameters.componentVisibilities);c.instanceParameters.componentVisibilities=g}this._notifyDirty("componentVisibilityChanged")};a.prototype.getFaceRangeIndexFromTriangleNr=
function(a){var b=this.metadata.faceRanges;if(null!=b)for(var c=0;c<b.length;c++)if(b[c][0]<=a&&b[c][1]>=a)return c};a.prototype.getFaceRangeFromTriangleNr=function(a){a=this.getFaceRangeIndexFromTriangleNr(a);var b=this.metadata.faceRanges;return a?[b[a]]:null};a.prototype.setGeometryTransformation=function(a,e){c(0<=a&&a<this.geometryRecords.length,"Object3d.setGeometryTransformation: index out of range");var f=this.geometryRecords[a];e=new g(f.geometry,f.materials,b.create(e),f.instanceParameters);
this.geometryRecords[a]=e;this._notifyDirty("objGeometryReplaced",[f,e]);this._invalidateBoundingVolume()};a.prototype.getObjectTransformation=function(){return b.create(this.objectTransformation)};a.prototype.setObjectTransformation=function(a){b.set(a,this.objectTransformation);this._invalidateBoundingVolume();this._notifyDirty("objTransformation")};a.prototype.getCombinedStaticTransformation=function(a,c){c=c||b.create();b.multiply(this.objectTransformation,a.getStaticTransformation(),c);return c};
a.prototype.getCombinedShaderTransformation=function(a,c){c=c||b.create();b.multiply(this.objectTransformation,a.getShaderTransformation(),c);return c};a.prototype.hasVolativeTransformation=function(){return this._hasVolatileTransformation};a.prototype.getCastShadow=function(){return this.castShadow};a.prototype.setCastShadow=function(a){this.castShadow=a};a.prototype.getMetadata=function(){return this.metadata};a.prototype.getName=function(){return this.name};a.prototype.getBBMin=function(a){this._validateBoundingVolume();
return a?this._bvObjectSpace.bbMin:this._bvWorldSpace.bbMin};a.prototype.getBBMax=function(a){this._validateBoundingVolume();return a?this._bvObjectSpace.bbMax:this._bvWorldSpace.bbMax};a.prototype.getCenter=function(a){this._validateBoundingVolume();return a?this._bvObjectSpace.center:this._bvWorldSpace.center};a.prototype.getBSRadius=function(a){this._validateBoundingVolume();return a?this._bvObjectSpace.bsRadius:this._bvWorldSpace.bsRadius};a.prototype._validateBoundingVolume=function(){if(this._bvDirty||
this._hasVolatileTransformation){this._bvObjectSpace.init();this._bvWorldSpace.init();for(var a=q.create(),c=q.create(),e=0;e<this.geometryRecords.length;++e)for(var g=this.geometries[e],d=this.geometryRecords[e].getShaderTransformation(),f=g.getNumGroups(),l=0;l<f;++l){var h=g.getBoundingInfo(l);b.multiplyVec3(d,h.getBBMin(),a);b.multiplyVec3(d,h.getBBMax(),c);for(var m=0;3>m;++m)this._bvObjectSpace.bbMin[m]=Math.min(this._bvObjectSpace.bbMin[m],a[m],c[m]),this._bvObjectSpace.bbMax[m]=Math.max(this._bvObjectSpace.bbMax[m],
a[m],c[m]);b.multiplyVec3(this.objectTransformation,a);b.multiplyVec3(this.objectTransformation,c);for(m=0;3>m;++m)this._bvWorldSpace.bbMin[m]=Math.min(this._bvWorldSpace.bbMin[m],a[m],c[m]),this._bvWorldSpace.bbMax[m]=Math.max(this._bvWorldSpace.bbMax[m],a[m],c[m])}q.lerp(this._bvObjectSpace.bbMin,this._bvObjectSpace.bbMax,.5,this._bvObjectSpace.center);q.lerp(this._bvWorldSpace.bbMin,this._bvWorldSpace.bbMax,.5,this._bvWorldSpace.center);m=this._getScaleFactor(this.objectTransformation);for(e=0;e<
this.geometryRecords.length;++e)for(var g=this.geometries[e],d=this.geometryRecords[e].getShaderTransformation(),t=this._getScaleFactor(d),f=g.getNumGroups(),l=0;l<f;++l){h=g.getBoundingInfo(l);b.multiplyVec3(d,h.getCenter(),a);var p=q.dist(a,this._bvObjectSpace.center),h=h.getBSRadius()*t;this._bvObjectSpace.bsRadius=Math.max(this._bvObjectSpace.bsRadius,p+h);b.multiplyVec3(this.objectTransformation,a,c);p=q.dist(c,this._bvWorldSpace.center);this._bvWorldSpace.bsRadius=Math.max(this._bvWorldSpace.bsRadius,
p+h*m)}this._bvDirty=!1}};a.prototype._getScaleFactor=function(a){return Math.max(Math.max(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8]),Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])),Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))};a.prototype._invalidateBoundingVolume=function(){this._bvDirty=!0;this._parentLayer&&this._parentLayer.notifyObjectBBChanged(this,this._bvWorldSpace)};a.prototype._notifyDirty=function(a,b,c,e){this._parentLayer&&(c=c||l.OBJECT,this._parentLayer.notifyDirty(a,b,c,e||this))};return a}();
a._idGen=new p;var y=function(){function a(){this.bbMin=q.create();this.bbMax=q.create();this.center=q.create();this.bsRadius=0}a.prototype.init=function(){q.set3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,this.bbMin);q.set3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,this.bbMax);q.set3(0,0,0,this.center);this.bsRadius=0};a.prototype.getCenter=function(){return this.center};a.prototype.getBSRadius=function(){return this.bsRadius};return a}();return a})},"esri/views/3d/webgl-engine/lib/GeometryRecord":function(){define(["require",
"exports","./IdGen"],function(a,h,p){a=function(){function a(f,e,l,g,c,b){this.id=a._idGen.gen(f.getId());this.geometry=f;this.materials=e;this.transformation=l;this.instanceParameters=g;this.origin=c;this.customTransformation=b}a.prototype.getId=function(){return this.id};a.prototype.getStaticT