// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
(function(e,b){var a,m=function(){return"undefined"!==typeof q&&"function"!==typeof q?q:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this}(),l=function(){},k=function(a){for(var c in a)return 0;return 1},g={}.toString,f=function(a){return"[object Function]"==g.call(a)},c=function(a){return"[object String]"==g.call(a)},d=function(a){return"[object Array]"==g.call(a)},h=function(a,c){if(a)for(var d=0;d<a.length;)c(a[d++])},n=function(a,c){for(var d in c)a[d]=c[d];return a},p=function(a,
c){return n(Error(a),{src:"dojoLoader",info:c})},r=1,t=function(){return"_"+r++},v=function(a,c,d){return ba(a,c,d,0,v)},q=m,w=q.document,u=w&&w.createElement("DiV"),x=v.has=function(a){return f(y[a])?y[a]=y[a](q,w,u):y[a]},y=x.cache=b.hasCache;f(e)&&(e=e(m));x.add=function(a,c,d,h){(void 0===y[a]||h)&&(y[a]=c);return d&&x(a)};x.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);x("host-webworker")&&(n(b.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}),b.loaderPatch={injectUrl:function(a,c){try{importScripts(a),c()}catch(Ca){console.info("failed to load resource ("+a+")"),console.error(Ca)}}});for(var z in e.has)x.add(z,e.has[z],0,1);v.async=1;var A=x("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");v.eval=function(a,c){return A(a+"\r\n//# sourceURL\x3d"+c)};var C={},B=v.signal=function(a,c){a=C[a];h(a&&a.slice(0),function(a){a.apply(null,
d(c)?c:[c])})};z=v.on=function(a,c){var d=C[a]||(C[a]=[]);d.push(c);return{remove:function(){for(var a=0;a<d.length;a++)if(d[a]===c){d.splice(a,1);break}}}};var E=[],D={},I=[],J={},F=v.map={},G=[],K={},L="",H={},M={},m={},Q=0;if(!x("foreign-loader"))var N=function(a,c){c=!1!==c;var d,h,f,g;for(d in M)h=M[d],(f=d.match(/^url\:(.+)/))?H["url:"+Da(f[1],a)]=h:"*now"==d?g=h:"*noref"!=d&&(f=ha(d,a,!0),H[f.mid]=H["url:"+f.url]=h);g&&g(ea(a));c&&(M={})};var Z=function(a){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,
function(a){return"\\"+a})},T=function(a,c){c.splice(0,c.length);for(var d in a)c.push([d,a[d],new RegExp("^"+Z(d)+"(/|$)"),d.length]);c.sort(function(a,c){return c[3]-a[3]});return c},U=function(a,d){h(a,function(a){d.push([c(a[0])?new RegExp("^"+Z(a[0])+"$"):a[0],a[1]])})},W=function(a){var c=a.name;c||(c=a,a={name:c});a=n({main:"main"},a);a.location=a.location?a.location:c;a.packageMap&&(F[c]=a.packageMap);a.main.indexOf("./")||(a.main=a.main.substring(2));J[c]=a},da=[],Y=function(a,d,f){for(var g in a){"waitSeconds"==
g&&(v.waitms=1E3*(a[g]||0));"cacheBust"==g&&(L=a[g]?c(a[g])?a[g]:(new Date).getTime()+"":"");if("baseUrl"==g||"combo"==g)v[g]=a[g];a[g]!==y&&(v.rawConfig[g]=a[g],"has"!=g&&x.add("config-"+g,a[g],0,d))}v.baseUrl||(v.baseUrl="./");/\/$/.test(v.baseUrl)||(v.baseUrl+="/");for(g in a.has)x.add(g,a.has[g],0,d);h(a.packages,W);for(var p in a.packagePaths)h(a.packagePaths[p],function(a){var d=p+"/"+a;c(a)&&(a={name:a});a.location=d;W(a)});T(n(F,a.map),G);h(G,function(a){a[1]=T(a[1],[]);"*"==a[0]&&(G.star=
a)});T(n(D,a.paths),I);U(a.aliases,E);if(!x("foreign-loader")){if(d)da.push({config:a.config});else for(g in a.config)d=la(g,f),d.config=n(d.config||{},a.config[g]);a.cache&&(N(),M=a.cache,N(0,!!a.cache["*noref"]))}B("config",[a,v.rawConfig])};if(x("dojo-cdn")){var P=w.getElementsByTagName("script");a=0;for(var S,R,V,fa;a<P.length;)if(S=P[a++],(V=S.getAttribute("src"))&&(fa=V.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(R=fa[3]||"",b.baseUrl=b.baseUrl||R,Q=S),V=S.getAttribute("data-dojo-config")||S.getAttribute("djConfig"))m=
v.eval("({ "+V+" })","data-dojo-config"),Q=S}v.rawConfig={};Y(b,1);x("dojo-cdn")&&((J.dojo.location=R)&&(R+="/"),J.dijit.location=R+"../dijit/",J.dojox.location=R+"../dojox/");Y(e,1);Y(m,1);if(!x("foreign-loader"))var X=function(a){va(function(){h(a.deps,Ea)})},ba=function(a,h,f,g,r){var b;if(c(a)){if((b=la(a,g,!0))&&b.executed)return b.result;throw p("undefinedModule",a);}d(a)||(Y(a,0,g),a=h,h=f);if(d(a))if(a.length){f="require*"+t();for(var q,e=[],w=0;w<a.length;)q=a[w++],e.push(la(q,g));b=n(aa("",
f,0,""),{injected:2,deps:e,def:h||l,require:g?g.require:v,gc:1});K[b.mid]=b;X(b);var u=sa&&!0;va(function(){wa(b,u)});b.executed||ca.push(b);xa()}else h&&h();return r},ea=function(a){if(!a)return v;var c=a.require;c||(c=function(d,h,f){return ba(d,h,f,a,c)},a.require=n(c,v),c.module=a,c.toUrl=function(c){return Da(c,a)},c.toAbsMid=function(c){return qa(c,a)});return c},ca=[],ga=[],ia={},oa=function(a){a.injected=1;ia[a.mid]=1;a.url&&(ia[a.url]=a.pack||1);Ka()},pa=function(a){a.injected=2;delete ia[a.mid];
a.url&&delete ia[a.url];k(ia)&&La()},O=v.idle=function(){return!ga.length&&k(ia)&&!ca.length&&!sa};var ja=function(a,c){if(c)for(var d=0;d<c.length;d++)if(c[d][2].test(a))return c[d];return 0},ma=function(a){var c=[],d,h;for(a=a.replace(/\\/g,"/").split("/");a.length;)d=a.shift(),".."==d&&c.length&&".."!=h?(c.pop(),h=c[c.length-1]):"."!=d&&c.push(h=d);return c.join("/")},aa=function(a,c,d,h){return{pid:a,mid:c,pack:d,url:h,executed:0,def:0}},ka=function(a,c,d,g,n,t,r,b,v,q){var e,w,u,k;k=/^\./.test(a);
if(/(^\/)|(\:)|(\.js$)/.test(a)||k&&!c)return aa(0,a,0,a);a=ma(k?c.mid+"/../"+a:a);if(/^\./.test(a))throw p("irrationalPath",a);q||k||!t.star||(u=ja(a,t.star[1]));!u&&c&&(u=(u=ja(c.mid,t))&&ja(a,u[1]));u&&(a=u[1]+a.substring(u[3]));c=(fa=a.match(/^([^\/]+)(\/(.+))?$/))?fa[1]:"";(e=d[c])?a=c+"/"+(w=fa[3]||e.main):c="";var l=0;h(b,function(c){var d=a.match(c[0]);d&&0<d.length&&(l=f(c[1])?a.replace(c[0],c[1]):c[1])});if(l)return ka(l,0,d,g,n,t,r,b,v);if(d=g[a])return v?aa(d.pid,d.mid,d.pack,d.url):g[a];
g=(u=ja(a,r))?u[1]+a.substring(u[3]):c?("/"===e.location.slice(-1)?e.location.slice(0,-1):e.location)+"/"+w:a;/(^\/)|(\:)/.test(g)||(g=n+g);return aa(c,a,e,ma(g+".js"))},ha=function(a,c,d){return ka(a,c,J,K,v.baseUrl,G,I,E,void 0,d)};if(!x("foreign-loader"))var na=function(a,c,d){return a.normalize?a.normalize(c,function(a){return qa(a,d)}):qa(c,d)},ra=0,la=function(a,c,d){var h,f;(h=a.match(/^(.+?)\!(.*)$/))?(f=la(h[1],c,d),5!==f.executed||f.load||ya(f),f.load?(h=na(f,h[2],c),a=f.mid+"!"+(f.dynamic?
++ra+"!":"")+h):(h=h[2],a=f.mid+"!"+ ++ra+"!waitingForPlugin"),a={plugin:f,mid:a,req:ea(c),prid:h}):a=ha(a,c);return K[a.mid]||!d&&(K[a.mid]=a)};var qa=v.toAbsMid=function(a,c){return ha(a,c).mid},Da=v.toUrl=function(a,c){c=ha(a+"/x",c);var d=c.url;return Fa(0===c.pid?a:d.substring(0,d.length-5))};if(!x("foreign-loader")){var Ga={injected:2,executed:5,def:3,result:3};R=function(a){return K[a]=n({mid:a},Ga)};var Ma=R("require"),Na=R("exports"),Oa=R("module"),ta={},za=0,ya=function(a){var c=a.result;
a.dynamic=c.dynamic;a.normalize=c.normalize;a.load=c.load;return a},Pa=function(a){var c={};h(a.loadQ,function(d){var h=na(a,d.prid,d.req.module),f=a.dynamic?d.mid.replace(/waitingForPlugin$/,h):a.mid+"!"+h,h=n(n({},d),{mid:f,prid:h,injected:0});K[f]&&K[f].injected||Ha(K[f]=h);c[d.mid]=K[f];pa(d);delete K[d.mid]});a.loadQ=0;var d=function(a){for(var d=a.deps||[],h=0;h<d.length;h++)(a=c[d[h].mid])&&(d[h]=a)},f;for(f in K)d(K[f]);h(ca,d)},Aa=function(c){v.trace("loader-finish-exec",[c.mid]);c.executed=
5;c.defOrder=za++;c.loadQ&&(ya(c),Pa(c));for(a=0;a<ca.length;)ca[a]===c?ca.splice(a,1):a++;/^require\*/.test(c.mid)&&delete K[c.mid]},Qa=[],wa=function(a,c){if(4===a.executed)return v.trace("loader-circular-dependency",[Qa.concat(a.mid).join("-\x3e")]),!a.def||c?ta:a.cjs&&a.cjs.exports;if(!a.executed){if(!a.def)return ta;var d=a.mid,h=a.deps||[],g,n=[],p=0;for(a.executed=4;g=h[p++];){g=g===Ma?ea(a):g===Na?a.cjs.exports:g===Oa?a.cjs:wa(g,c);if(g===ta)return a.executed=0,v.trace("loader-exec-module",
["abort",d]),ta;n.push(g)}v.trace("loader-run-factory",[a.mid]);c=a.def;n=f(c)?c.apply(null,n):c;a.result=void 0===n&&a.cjs?a.cjs.exports:n;Aa(a)}return a.result},sa=0,va=function(a){try{sa++,a()}catch(Ja){throw Ja;}finally{sa--}O()&&B("idle",[])},xa=function(){sa||va(function(){for(var a,c,d=0;d<ca.length;)a=za,c=ca[d],wa(c),a!=za?d=0:d++})}}var Fa="function"==typeof e.fixupUrl?e.fixupUrl:function(a){a+="";return a+(L?(/\?/.test(a)?"\x26":"?")+L:"")};void 0===x("dojo-loader-eval-hint-url")&&x.add("dojo-loader-eval-hint-url",
1);var Ha=function(a){var c=a.plugin;5!==c.executed||c.load||ya(c);var d=function(c){a.result=c;pa(a);Aa(a);xa()};c.load?c.load(a.prid,a.req,d):c.loadQ?c.loadQ.push(a):(c.loadQ=[a],ca.unshift(c),Ea(c))},ua=0,Ra=function(a,c){x("config-stripStrict")&&(a=a.replace(/(["'])use strict\1/g,""));a===ua?ua.call(null):v.eval(a,x("dojo-loader-eval-hint-url")?c.url:c.mid)},Ea=function(a){var c=a.mid,d=a.url;if(!(a.executed||a.injected||ia[c]||a.url&&(a.pack&&ia[a.url]===a.pack||1==ia[a.url])))if(oa(a),a.plugin)Ha(a);
else{var h=function(){Sa(a);if(2!==a.injected){if(x("dojo-enforceDefine")){B("error",p("noDefine",a));return}pa(a);n(a,Ga);v.trace("loader-define-nonmodule",[a.url])}xa()};(ua=H[c]||H["url:"+a.url])?(v.trace("loader-inject",["cache",a.mid,d]),Ra(ua,a),h()):(v.trace("loader-inject",["script",a.mid,d]),v.injectUrl(Fa(d),h,a))}},Ia=function(a,c,d){v.trace("loader-define-module",[a.mid,c]);if(2===a.injected)return B("error",p("multipleDefine",a)),a;n(a,{deps:c,def:d,cjs:{id:a.mid,uri:a.url,exports:a.result=
{},setExports:function(c){a.cjs.exports=c},config:function(){return a.config}}});for(var h=0;c[h];h++)c[h]=la(c[h],a);pa(a);f(d)||c.length||(a.result=d,Aa(a));return a},Sa=function(a,c){for(var d=[],f,g;ga.length;)g=ga.shift(),c&&(g[0]=c.shift()),f=g[0]&&la(g[0])||a,d.push([f,g[1],g[2]]);N(a);h(d,function(a){X(Ia.apply(null,a))})},La=l,Ka=l;x("dom");if(x("dom")){var Ba=function(a,c,d,h){a.addEventListener(c,h,!1);return function(){a.removeEventListener(c,h,!1)}},Ta=Ba(window,"load","onload",function(){v.pageLoaded=
1;try{"complete"!=w.readyState&&(w.readyState="complete")}catch(Ua){}Ta()}),P=w.getElementsByTagName("script");for(a=0;!Q;)/^dojo/.test((S=P[a++])&&S.type)||(Q=S);v.injectUrl=function(a,c,d){d=d.node=w.createElement("script");var h=Ba(d,"load","onreadystatechange",function(a){a=a||window.event;var d=a.target||a.srcElement;if("load"===a.type||/complete|loaded/.test(d.readyState))h(),f(),c&&c()}),f=Ba(d,"error","onerror",function(c){h();f();B("error",p("scriptError: "+a,[a,c]))});d.type="text/javascript";
d.charset="utf-8";d.src=a;Q.parentNode.insertBefore(d,Q);return d}}v.log=l;v.trace=l;x("foreign-loader")?S=l:(S=function(a,d,h){var g=arguments.length,n=["require","exports","module"],p=[0,a,d];1==g?p=[0,f(a)?n:[],a]:2==g&&c(a)?p=[a,f(d)?n:[],d]:3==g&&(p=[a,d,h]);v.trace("loader-define",p.slice(0,2));(g=p[0]&&la(p[0]))&&!ia[g.mid]?X(Ia(g,p[1],p[2])):ga.push(p)},S.amd={vendor:"dojotoolkit.org"});n(n(v,b.loaderPatch),e.loaderPatch);z("error",function(a){try{if(console.error(a),a instanceof Error){for(var c in a)console.log(c+
":",a[c]);console.log(".")}}catch(Ca){}});n(v,{uid:t,cache:H,packs:J});q.define||(q.define=S,q.require=v,x("foreign-loader")||(h(da,function(a){Y(a)}),S=m.deps||e.deps||b.deps,e=m.callback||e.callback||b.callback,v.boot=S||e?[S||[],e]:0))})(function(e){return e.dojoConfig||e.djConfig||e.require||{}},{async:1,baseUrl:"https://js.arcgis.com/4.16/dojo",hasCache:{"config-selectorEngine":"lite","config-tlmSiblingOfDojo":1,"dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},map:{globalize:{cldr:"cldrjs/dist/cldr",
"cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",name:"esri"},{location:"../moment",main:"moment",name:"moment"},{location:"../@dojo",name:"@dojo"},{location:"../cldrjs",main:"dist/cldr",
name:"cldrjs"},{location:"../globalize",main:"dist/globalize",name:"globalize"},{location:"../intersection-observer",main:"intersection-observer",name:"intersection-observer"},{location:"../maquette-css-transitions",main:"dist/maquette-css-transitions.umd",name:"maquette-css-transitions"},{location:"../maquette-jsx",main:"dist/maquette-jsx.umd",name:"maquette-jsx"},{location:"../tslib",main:"tslib",name:"tslib"},{location:"../whatwg-fetch",main:"dist/fetch.umd",name:"whatwg-fetch"}]});
require({cache:{"esri/Map":function(){define("require exports tslib ./Basemap ./Ground ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./core/accessorSupport/decorators ./support/basemapUtils ./support/groundUtils ./support/LayersMixin".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p){var r=c.getLogger("esri.Map");return function(c){function f(a){a=c.call(this,a)||this;a.basemap=null;a.ground=new l;a._basemapCache=h.createCache();return a}a.__extends(f,c);Object.defineProperty(f.prototype,
"allLayers",{get:function(){return new g({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(a){return a.layers}})},enumerable:!0,configurable:!0});f.prototype.castBasemap=function(a){return h.ensureType(a,this._basemapCache)};f.prototype.castGround=function(a){a=n.ensureType(a);return a?a:(r.error("Map.ground may not be set to null or undefined"),this._get("ground"))};f.prototype.findLayerById=function(a){return this.allLayers.find(function(c){return c.id===
a})};a.__decorate([d.property({readOnly:!0})],f.prototype,"allLayers",null);a.__decorate([d.property({type:m})],f.prototype,"basemap",void 0);a.__decorate([d.cast("basemap")],f.prototype,"castBasemap",null);a.__decorate([d.property({type:l,nonNullable:!0})],f.prototype,"ground",void 0);a.__decorate([d.cast("ground")],f.prototype,"castGround",null);return f=a.__decorate([d.subclass("esri.Map")],f)}(p.LayersMixin(f.EventedMixin(k)))})},"tslib/tslib":function(){var e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,
w,u,x,y,z;(function(a){function c(a,c){a!==d&&("function"===typeof Object.create?Object.defineProperty(a,"__esModule",{value:!0}):a.__esModule=!0);return function(d,h){return a[d]=c?c(d,h):h}}var d="object"===typeof global?global:"object"===typeof self?self:"object"===typeof this?this:{};"function"===typeof define&&define.amd?define("tslib",["exports"],function(h){a(c(d,c(h)))}):"object"===typeof module&&"object"===typeof module.exports?a(c(d,c(module.exports))):a(c(d))})(function(A){var C=Object.setPrototypeOf||
{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])};e=function(a,c){function d(){this.constructor=a}C(a,c);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=Object.assign||function(a){for(var c,d=1,h=arguments.length;d<h;d++){c=arguments[d];for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(a[f]=c[f])}return a};a=function(a,c){var d={},h;for(h in a)Object.prototype.hasOwnProperty.call(a,h)&&0>c.indexOf(h)&&
(d[h]=a[h]);if(null!=a&&"function"===typeof Object.getOwnPropertySymbols){var f=0;for(h=Object.getOwnPropertySymbols(a);f<h.length;f++)0>c.indexOf(h[f])&&Object.prototype.propertyIsEnumerable.call(a,h[f])&&(d[h[f]]=a[h[f]])}return d};m=function(a,c,d,h){var f=arguments.length,g=3>f?c:null===h?h=Object.getOwnPropertyDescriptor(c,d):h,n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)g=Reflect.decorate(a,c,d,h);else for(var p=a.length-1;0<=p;p--)if(n=a[p])g=(3>f?n(g):3<f?n(c,d,g):
n(c,d))||g;return 3<f&&g&&Object.defineProperty(c,d,g),g};l=function(a,c){return function(d,h){c(d,h,a)}};k=function(a,c){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(a,c)};g=function(a,c,d,h){function f(a){return a instanceof d?a:new d(function(c){c(a)})}return new (d||(d=Promise))(function(d,g){function n(a){try{t(h.next(a))}catch(Q){g(Q)}}function p(a){try{t(h["throw"](a))}catch(Q){g(Q)}}function t(a){a.done?d(a.value):f(a.value).then(n,p)}t((h=h.apply(a,
c||[])).next())})};f=function(a,c){function d(a){return function(c){return h([a,c])}}function h(d){if(g)throw new TypeError("Generator is already executing.");for(;f;)try{if(g=1,n&&(p=d[0]&2?n["return"]:d[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,d[1])).done)return p;if(n=0,p)d=[d[0]&2,p.value];switch(d[0]){case 0:case 1:p=d;break;case 4:return f.label++,{value:d[1],done:!1};case 5:f.label++;n=d[1];d=[0];continue;case 7:d=f.ops.pop();f.trys.pop();continue;default:if(!(p=
f.trys,p=0<p.length&&p[p.length-1])&&(6===d[0]||2===d[0])){f=0;continue}if(3===d[0]&&(!p||d[1]>p[0]&&d[1]<p[3]))f.label=d[1];else if(6===d[0]&&f.label<p[1])f.label=p[1],p=d;else if(p&&f.label<p[2])f.label=p[2],f.ops.push(d);else{p[2]&&f.ops.pop();f.trys.pop();continue}}d=c.call(a,f)}catch(M){d=[6,M],n=0}finally{g=p=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}var f={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},g,n,p,t;return t={next:d(0),"throw":d(1),
"return":d(2)},"function"===typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t};c=function(a,c){for(var d in a)c.hasOwnProperty(d)||(c[d]=a[d])};d=function(a){var c="function"===typeof Symbol&&Symbol.iterator,d=c&&a[c],h=0;if(d)return d.call(a);if(a&&"number"===typeof a.length)return{next:function(){a&&h>=a.length&&(a=void 0);return{value:a&&a[h++],done:!a}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.");};h=function(a,c){var d="function"===typeof Symbol&&
a[Symbol.iterator];if(!d)return a;a=d.call(a);var h,f=[],g;try{for(;(void 0===c||0<c--)&&!(h=a.next()).done;)f.push(h.value)}catch(G){g={error:G}}finally{try{h&&!h.done&&(d=a["return"])&&d.call(a)}finally{if(g)throw g.error;}}return f};n=function(){for(var a=[],c=0;c<arguments.length;c++)a=a.concat(h(arguments[c]));return a};p=function(){for(var a=0,c=0,d=arguments.length;c<d;c++)a+=arguments[c].length;for(var a=Array(a),h=0,c=0;c<d;c++)for(var f=arguments[c],g=0,p=f.length;g<p;g++,h++)a[h]=f[g];
return a};r=function(a){return this instanceof r?(this.v=a,this):new r(a)};t=function(a,c,d){function h(a){t[a]&&(b[a]=function(c){return new Promise(function(d,h){1<v.push([a,c,d,h])||f(a,c)})})}function f(a,c){try{var d=t[a](c);d.value instanceof r?Promise.resolve(d.value.v).then(g,p):n(v[0][2],d)}catch(T){n(v[0][3],T)}}function g(a){f("next",a)}function p(a){f("throw",a)}function n(a,c){(a(c),v.shift(),v.length)&&f(v[0][0],v[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");
var t=d.apply(a,c||[]),b,v=[];return b={},h("next"),h("throw"),h("return"),b[Symbol.asyncIterator]=function(){return this},b};v=function(a){function c(c,f){d[c]=a[c]?function(d){return(h=!h)?{value:r(a[c](d)),done:"return"===c}:f?f(d):d}:f}var d,h;return d={},c("next"),c("throw",function(a){throw a;}),c("return"),d[Symbol.iterator]=function(){return this},d};q=function(a){function c(c){g[c]=a[c]&&function(d){return new Promise(function(f,g){d=a[c](d);h(f,g,d.done,d.value)})}}function h(a,c,d,h){Promise.resolve(h).then(function(c){a({value:c,
done:d})},c)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f=a[Symbol.asyncIterator],g;return f?f.call(a):(a="function"===typeof d?d(a):a[Symbol.iterator](),g={},c("next"),c("throw"),c("return"),g[Symbol.asyncIterator]=function(){return this},g)};w=function(a,c){Object.defineProperty?Object.defineProperty(a,"raw",{value:c}):a.raw=c;return a};u=function(a){if(a&&a.__esModule)return a;var c={};if(null!=a)for(var d in a)Object.hasOwnProperty.call(a,d)&&(c[d]=
a[d]);c["default"]=a;return c};x=function(a){return a&&a.__esModule?a:{"default":a}};y=function(a,c){if(!c.has(a))throw new TypeError("attempted to get private field on non-instance");return c.get(a)};z=function(a,c,d){if(!c.has(a))throw new TypeError("attempted to set private field on non-instance");c.set(a,d);return d};A("__extends",e);A("__assign",b);A("__rest",a);A("__decorate",m);A("__param",l);A("__metadata",k);A("__awaiter",g);A("__generator",f);A("__exportStar",c);A("__values",d);A("__read",
h);A("__spread",n);A("__spreadArrays",p);A("__await",r);A("__asyncGenerator",t);A("__asyncDelegator",v);A("__asyncValues",q);A("__makeTemplateObject",w);A("__importStar",u);A("__importDefault",x);A("__classPrivateFieldGet",y);A("__classPrivateFieldSet",z)})},"esri/Basemap":function(){define("require exports tslib ./geometry ./core/Collection ./core/collectionUtils ./core/JSONSupport ./core/lang ./core/Loadable ./core/loadAll ./core/Logger ./core/maybe ./core/promiseUtils ./core/urlUtils ./core/accessorSupport/decorators ./portal/Portal ./portal/PortalItem ./support/basemapDefinitions ./webdoc/support/writeUtils @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u){var x=0,y=h.getLogger("esri.Basemap");return function(c){function h(a){var d=c.call(this,a)||this;d.id=null;d.portalItem=null;d.spatialReference=null;d.thumbnailUrl=null;d.title="Basemap";d.id=Date.now().toString(16)+"-basemap-"+x++;d.baseLayers=new l;d.referenceLayers=new l;var h=function(a){a.parent&&a.parent!==d&&"remove"in a.parent&&a.parent.remove(a);a.parent=d;"elevation"===a.type&&y.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a basemap layer and will therefore be ignored.")};
d.baseLayers.on("after-add",function(a){return h(a.item)});d.referenceLayers.on("after-add",function(a){return h(a.item)});d.baseLayers.on("after-remove",function(a){a.item.parent=null});d.referenceLayers.on("after-remove",function(a){a.item.parent=null});return d}a.__extends(h,c);g=h;h.prototype.initialize=function(){var a=this;this.when().catch(function(c){y.error("#load()","Failed to load basemap (title: '"+a.title+"', id: '"+a.id+"')",c)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};
h.prototype.normalizeCtorArgs=function(c){c&&"resourceInfo"in c&&(this._set("resourceInfo",c.resourceInfo),c=a.__assign({},c),delete c.resourceInfo);return c};Object.defineProperty(h.prototype,"baseLayers",{set:function(a){this._set("baseLayers",k.referenceSetter(a,this._get("baseLayers")))},enumerable:!0,configurable:!0});h.prototype._writeBaseLayers=function(c,d,h){var f=[];c&&(h=a.__assign(a.__assign({},h),{layerContainerType:"basemap"}),this.baseLayers.forEach(function(a){a=u.getLayerJSON(a,h.webmap?
h.webmap.getLayerJSONFromResourceInfo(a):null,h);n.isSome(a)&&f.push(a)}),this.referenceLayers.forEach(function(a){a=u.getLayerJSON(a,h.webmap?h.webmap.getLayerJSONFromResourceInfo(a):null,h);n.isSome(a)&&(a.isReference=!0,f.push(a))}));d.baseMapLayers=f};Object.defineProperty(h.prototype,"referenceLayers",{set:function(a){this._set("referenceLayers",k.referenceSetter(a,this._get("referenceLayers")))},enumerable:!0,configurable:!0});h.prototype.writeTitle=function(a,c){c.title=a||"Basemap"};h.prototype.load=
function(a){this.addResolvingPromise(this._loadFromSource(a));return p.resolve(this)};h.prototype.loadAll=function(){var a=this;return d.loadAll(this,function(c){c(a.baseLayers,a.referenceLayers)})};h.prototype.clone=function(){var a={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};this.loaded&&(a.loadStatus="loaded");return(new g({resourceInfo:this.resourceInfo})).set(a)};h.prototype.read=function(a,d){this.resourceInfo||
this._set("resourceInfo",{data:a,context:d});c.prototype.read.call(this,a,d)};h.prototype.write=function(d,h){d=d||{};h&&h.origin||(h=a.__assign({origin:"web-map"},h));c.prototype.write.call(this,d,h);!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(d.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(function(a){a=f.clone(a);a.url&&r.isProtocolRelative(a.url)&&(a.url="https:"+a.url);a.templateUrl&&r.isProtocolRelative(a.templateUrl)&&(a.templateUrl="https:"+a.templateUrl);
return a}));return d};h.prototype._loadFromSource=function(c){return a.__awaiter(this,void 0,void 0,function(){var d,h,f,g,n,t,r=this;return a.__generator(this,function(a){switch(a.label){case 0:return d=this,h=d.resourceInfo,f=d.portalItem,p.throwIfAborted(c),g=[],h?(n=h.context?h.context.url:null,g.push(this._loadLayersFromJSON(h.data,n,c)),h.data.id&&!h.data.title&&(t=h.data.id,g.push(w.getBasemapTitle(t).then(function(a){a&&r.read({title:a},h.context)})))):f&&g.push(this._loadFromItem(f,c)),[4,
p.all(g)];case 1:return a.sent(),[2]}})})};h.prototype._loadLayersFromJSON=function(c,d,h){return a.__awaiter(this,void 0,void 0,function(){var f,g,n,t,r,b,v,q;return a.__generator(this,function(a){switch(a.label){case 0:return f=this.resourceInfo&&this.resourceInfo.context,g=this.portalItem&&this.portalItem.portal||f&&f.portal||null,n=f&&"web-scene"===f.origin?"web-scene":"web-map",[4,new Promise(function(a,c){e(["./portal/support/layersCreator"],a,c)})];case 1:return t=a.sent(),r=[],p.throwIfAborted(h),
c.baseMapLayers&&Array.isArray(c.baseMapLayers)&&(b={context:{origin:n,url:d,portal:g,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},v=t.populateOperationalLayers(this.baseLayers,c.baseMapLayers.filter(function(a){return!a.isReference}),b),r.push(v),q=t.populateOperationalLayers(this.referenceLayers,c.baseMapLayers.filter(function(a){return a.isReference}),b),r.push(q)),[4,p.eachAlways(r)];case 2:return a.sent(),[2]}})})};h.prototype._loadFromItem=function(c,d){return a.__awaiter(this,
void 0,void 0,function(){var h,f,g;return a.__generator(this,function(a){switch(a.label){case 0:return[4,c.load(d)];case 1:return h=a.sent(),[4,h.fetchData("json",d)];case 2:return f=a.sent(),g=r.urlToObject(c.itemUrl),this._set("resourceInfo",{data:f.baseMap,context:{origin:"web-map",portal:c.portal||v.getDefault(),url:g}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:f.spatialReference},this.resourceInfo.context),this.read({title:c.title,thumbnailUrl:c.thumbnailUrl},
{origin:"portal-item",portal:c.portal||v.getDefault(),url:g}),[2,this._loadLayersFromJSON(this.resourceInfo.data,g,d)]}})})};h.fromId=function(a){return(a=w.esriBasemapDefinitions[a])?g.fromJSON(a):null};var g;a.__decorate([t.property({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer:function(a,c,d,h){this._writeBaseLayers(a,c,h)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:l},elevationLayers:{type:l}},writer:function(a,c,d,h){this._writeBaseLayers(a,c,h)}}}}}})],
h.prototype,"baseLayers",null);a.__decorate([t.property({type:String,json:{origins:{"web-scene":{write:!0}}}})],h.prototype,"id",void 0);a.__decorate([t.property({type:q})],h.prototype,"portalItem",void 0);a.__decorate([t.property()],h.prototype,"referenceLayers",null);a.__decorate([t.property({readOnly:!0})],h.prototype,"resourceInfo",void 0);a.__decorate([t.property({type:m.SpatialReference})],h.prototype,"spatialReference",void 0);a.__decorate([t.property()],h.prototype,"thumbnailUrl",void 0);
a.__decorate([t.property({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],h.prototype,"title",void 0);a.__decorate([t.writer("title")],h.prototype,"writeTitle",null);return h=g=a.__decorate([t.subclass("esri.Basemap")],h)}(g.JSONSupportMixin(c))})},"esri/geometry":function(){define("require exports ./core/jsonMap ./core/accessorSupport/ensureType ./geometry/Extent ./geometry/Geometry ./geometry/Multipoint ./geometry/Point ./geometry/Polygon ./geometry/Polyline ./geometry/SpatialReference ./geometry/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){Object.defineProperty(b,"__esModule",{value:!0});b.Extent=l;b.BaseGeometry=k;b.Multipoint=g;b.Point=f;b.Polygon=c;b.Polyline=d;b.SpatialReference=h;b.isGeometry=function(a){return a instanceof k};b.fromJSON=n.fromJSON;b.typeKebabDictionary=a.strict()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"});b.isFeatureGeometryType=function(a){return"point"===
a||"multipoint"===a||"polyline"===a||"polygon"===a};b.featureGeometryTypeKebabDictionary=a.strict()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"});b.geometryTypes={base:k,key:"type",typeMap:{extent:l,multipoint:g,point:f,polyline:d,polygon:c}};b.ensureType=m.ensureOneOfType(b.geometryTypes)})},"esri/core/jsonMap":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=
function(){function a(a,b){var g=this;void 0===b&&(b={ignoreUnknown:!1});this.jsonToAPI=a;this.options=b;this.apiValues=[];this.jsonValues=[];this.apiToJSON=this.invertMap(a);this.apiValues=this.getKeysSorted(this.apiToJSON);this.jsonValues=this.getKeysSorted(this.jsonToAPI);this.read=function(a){return g.fromJSON(a)};this.write=function(a,c,d){a=g.toJSON(a);void 0!==a&&(c[d]=a)}}a.prototype.toJSON=function(a){return this.apiToJSON.hasOwnProperty(a)?this.apiToJSON[a]:this.options.ignoreUnknown?void 0:
a};a.prototype.fromJSON=function(a){return this.jsonToAPI.hasOwnProperty(a)?this.jsonToAPI[a]:this.options.ignoreUnknown?void 0:a};a.prototype.invertMap=function(a){var b={},g;for(g in a)b[a[g]]=g;return b};a.prototype.getKeysSorted=function(a){var b=[],g;for(g in a)b.push(g);b.sort();return b};return a}();b.JSONMap=a;b.strict=function(){return function(b){return new a(b,{ignoreUnknown:!0})}};b.default=a})},"esri/core/accessorSupport/ensureType":function(){define(["require","exports","../compilerUtils",
"../Logger"],function(e,b,a,m){function l(a){return null==a?a:new Date(a)}function k(a){return null==a?a:!!a}function g(a){return null==a?a:a.toString()}function f(a){if(null==a)return a;a=parseFloat(a);return isNaN(a)?0:a}function c(a){return null==a?a:Math.round(parseFloat(a))}function d(a){return a&&a.constructor&&void 0!==a.constructor.__accessorMetadata__}function h(a,c){return null!=c&&a&&!(c instanceof a)}function n(a){return a&&a.Type?"function"===typeof a.Type?a.Type:a.Type.base:null}function p(a,
c){var d;(d=!c||!c.constructor)||(d=c.constructor,d=!(d&&"isCollection"in d));if(d)return r(a,c)?c:new a(c);d=n(a.prototype.itemType);var h=n(c.constructor.prototype.itemType);if(!d)return c;if(!h)return new a(c);if(d===h)return c;if(d.prototype.isPrototypeOf(h.prototype))return new a(c);r(a,c);return c}function r(a,c){return d(c)?(I.error("Accessor#set","Assigning an instance of '"+(c.declaredClass||"unknown")+"' which is not a subclass of '"+v(a)+"'"),!0):!1}function t(a,c){return null==c?c:a&&
"isCollection"in a?p(a,c):h(a,c)?r(a,c)?c:new a(c):c}function v(a){return a&&a.prototype&&a.prototype.declaredClass||"unknown"}function q(a){switch(a){case Number:return f;case J:return c;case Boolean:return k;case String:return g;case Date:return l;default:return t.bind(null,a)}}function w(a,c){var d=q(a);return 1===arguments.length?d:d(c)}function u(a,c,d){return 1===arguments.length?u.bind(null,a):c?Array.isArray(c)?c.map(function(c){return a(c,d)}):[a(c,d)]:c}function x(a,c,d){return 0!==c&&Array.isArray(d)?
d.map(function(d){return x(a,c-1,d)}):a(d)}function y(a,c,d){if(2===arguments.length)return y.bind(null,a,c);if(!d)return d;d=x(a,c,d);for(var h=c,f=d;0<h&&Array.isArray(f);)h--,f=f[0];if(void 0!==f)for(f=0;f<h;f++)d=[d];return d}function z(a,c){if(2===arguments.length)return z(a).call(null,c);for(var d=new Set,f=a.filter(function(a){return"function"!==typeof a}),g=a.filter(function(a){return"function"===typeof a}),p=0;p<a.length;p++){var n=a[p];"string"!==typeof n&&"number"!==typeof n||d.add(n)}var t=
null,r=null;return function(a,c){if(null==a)return a;var p=typeof a,n="string"===p||"number"===p;if(n&&(d.has(a)||g.some(function(a){return"string"===p&&a===String||"number"===p&&a===Number}))||"object"===p&&g.some(function(c){return!h(a,c)}))return a;n&&f.length?(t||(t=f.map(function(a){return"string"===typeof a?"'"+a+"'":""+a}).join(", ")),I.error("Accessor#set","'"+a+"' is not a valid value for this property, only the following values are valid: "+t)):"object"===typeof a&&g.length?(r||(r=g.map(function(a){return v(a)}).join(", ")),
I.error("Accessor#set","'"+a+"' is not a valid value for this property, value must be one of "+r)):I.error("Accessor#set","'"+a+"' is not a valid value for this property");c&&(c.valid=!1);return null}}function A(a,c){if(2===arguments.length)return A(a).call(null,c);var f={},g=[],p=[],n;for(n in a.typeMap){var t=a.typeMap[n];f[n]=w(t);g.push(v(t));p.push(n)}var r="string"===typeof a.key?function(c){return c[a.key]}:a.key;return function(c){if(a.base&&!h(a.base,c)||null==c)return c;var n=r(c)||a.defaultKeyValue,
t=f[n];if(!t)return I.error("Accessor#set","Invalid property value, value needs to be one of "+("'"+g.join("', '")+"'")+", or a plain object that can autocast (having .type \x3d "+("'"+p.join("', '")+"'")+")"),null;if(!h(a.typeMap[n],c))return c;if("string"===typeof a.key&&!d(c)){var n={},b;for(b in c)b!==a.key&&(n[b]=c[b]);return t(n)}return t(c)}}function C(c){switch(c.type){case "native":return w(c.value);case "array":return u(C(c.value));case "one-of":return B(c);default:a.neverReached(c)}return null}
function B(a){var c=null;return function(d,h){if(D(d,a))return d;null==c&&(c=E(a));I.error("Accessor#set","Invalid property value, value needs to be of type "+c);h&&(h.valid=!1);return null}}function E(c){switch(c.type){case "native":switch(c.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case J:return"integer";case Date:return"date";default:return v(c.value)}case "array":return"array of "+E(c.value);case "one-of":return c=c.values.map(function(a){return E(a)}),
"one of "+c.slice(0,c.length-1)+" or "+c[c.length-1];default:a.neverReached(c)}return"unknown"}function D(a,c){if(null==a)return!0;switch(c.type){case "native":switch(c.value){case Number:case J:return"number"===typeof a;case Boolean:return"boolean"===typeof a;case String:return"string"===typeof a}return a instanceof c.value;case "array":return Array.isArray(a)?!a.some(function(a){return!D(a,c.value)}):!1;case "one-of":return c.values.some(function(c){return D(a,c)})}}Object.defineProperty(b,"__esModule",
{value:!0});var I=m.getLogger("esri.core.Accessor");b.ensureDate=l;b.ensureBoolean=k;b.ensureString=g;b.ensureNumber=f;b.ensureInteger=c;b.isClassedType=d;b.requiresType=h;b.ensureClass=t;b.ensureType=w;b.ensureArrayTyped=u;b.ensureArray=function(a,c){return 1===arguments.length?u(w.bind(null,a)):u(w.bind(null,a),c)};b.ensureNArrayTyped=y;b.ensureNArray=function(a,c,d){return 2===arguments.length?y(w.bind(null,a),c):y(w.bind(null,a),c,d)};b.isOneOf=function(a){return Array.isArray(a)?!a.some(function(c){c=
typeof c;return!("string"===c||"number"===c||"function"===c&&1<a.length)}):!1};b.ensureOneOf=z;b.ensureOneOfType=A;var J=function(){return function(){}}();b.Integer=J;b.types={native:function(a){return{type:"native",value:a}},array:function(a){return{type:"array",value:a}},oneOf:function(a){return{type:"one-of",values:a}}};b.isLongFormType=function(c){if(!(c&&"type"in c))return!1;switch(c.type){case "native":case "array":case "one-of":return!0;default:a.neverReachedSilent(c)}return!1};b.ensureLongFormType=
C;b.default=w})},"esri/core/compilerUtils":function(){define(["require","exports","./has"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.neverReached=function(a){};b.neverReachedSilent=function(a){};b.typeCast=function(a){return function(){return a}};b.tuple=function(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];return a}})},"esri/core/has":function(){define("require exports tslib ../config ./global ../views/webgl/context-util".split(" "),function(e,b,a,m,l,k){function g(a){return"function"===
typeof n[a]?n[a]=n[a](l):n[a]}function f(){if(p)return p;p={available:!1,majorPerformanceCaveat:!1,maxTextureSize:0,supportsHighPrecisionFragment:!1,supportsVertexShaderSamplers:!1,supportsElementIndexUint:!1,supportsStandardDerivatives:!1,supportsInstancedArrays:!1,supportsTextureFloat:!1,supportsColorBufferFloat:!1,version:0};var a=document.createElement("canvas");if(!a)return p;var c=k.createContext(a,{failIfMajorPerformanceCaveat:!0},"webgl");!c&&(c=k.createContext(a,{},"webgl"))&&(p.majorPerformanceCaveat=
!0);if(!c)return p;a=c.getParameter(c.VERSION);if(!a)return p;if(a=a.match(/^WebGL\s+([\d.]*)/)){p.version=parseFloat(a[1]);p.available=.94<=p.version;if(a=c.getShaderPrecisionFormat(c.FRAGMENT_SHADER,c.HIGH_FLOAT))p.supportsHighPrecisionFragment=0<a.precision;p.supportsVertexShaderSamplers=0<c.getParameter(c.MAX_VERTEX_TEXTURE_IMAGE_UNITS);p.supportsElementIndexUint=null!==c.getExtension("OES_element_index_uint");p.supportsStandardDerivatives=null!==c.getExtension("OES_standard_derivatives");p.supportsInstancedArrays=
null!==c.getExtension("ANGLE_instanced_arrays");p.supportsTextureFloat=null!==c.getExtension("OES_texture_float");p.supportsColorBufferFloat=null!==c.getExtension("WEBGL_color_buffer_float")}p.maxTextureSize=c.getParameter(c.MAX_TEXTURE_SIZE);return p}function c(){if(r)return r;r={available:!1,version:0};var a=document.createElement("canvas");if(!a)return r;a=k.createContext(a,{},"webgl2");if(!a)return r;r.available=!0;a=a.getParameter(a.VERSION);if(!a)return r;if(a=a.match(/^WebGL\s+([\d.]*)/))r.version=
parseFloat(a[1]);return r}var d,h,n;m.has||(null===(d=l.dojoConfig)||void 0===d?0:d.has)?(n=a.__assign(a.__assign({},null===(h=l.dojoConfig)||void 0===h?void 0:h.has),m.has),delete m.has):n={};g.add=function(a,c,d,h){if(h||"undefined"===typeof n[a])n[a]=c;return d&&g(a)};g.cache=n;(function(){g.add("host-webworker","undefined"!==typeof l.WorkerGlobalScope&&self instanceof l.WorkerGlobalScope);var a="undefined"!==typeof window&&"undefined"!==typeof location&&"undefined"!==typeof document&&window.location===
location&&window.document===document;g.add("host-browser",a);g.add("dom",a);if(g("host-browser")){var c=navigator,a=c.userAgent,c=c.appVersion,d=parseFloat(c);g.add("edge",parseFloat(a.split("Edge/")[1])||void 0);g.add("webkit",!g("edge")&&parseFloat(a.split("WebKit/")[1])||void 0);g.add("chrome",!g("edge")&&!0&&parseFloat(a.split("Chrome/")[1])||void 0);g.add("safari",0<=c.indexOf("Safari")&&!g("chrome")&&!g("edge")?parseFloat(c.split("Version/")[1]):void 0);g.add("mac",0<=c.indexOf("Macintosh"));
if(a.match(/(iPhone|iPod|iPad)/)){var h=RegExp.$1.replace(/P/,"p"),f=a.match(/OS ([\d_]+)/)?RegExp.$1:"1",f=parseFloat(f.replace(/_/,".").replace(/_/g,""));g.add(h,f);g.add("ios",f)}g.add("trident",parseFloat(c.split("Trident/")[1])||void 0);g("webkit")||(0<=a.indexOf("Opera")&&g.add("opera",9.8<=d?parseFloat(a.split("Version/")[1])||d:d),0<=a.indexOf("Gecko")&&!g("trident")&&!g("edge")&&g.add("mozilla",d),g("mozilla")&&g.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})();
g.add("esri-deprecation-warnings",!0);(function(){if(l.navigator){var a=navigator.userAgent,d=a.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i),a=a.match(/iPhone/i);d&&g.add("esri-mobile",d);a&&g.add("esri-iPhone",a);g.add("esri-geolocation",!!navigator.geolocation)}g.add("esri-canvas-svg-support",!g("trident"));g.add("esri-secure-context",function(){if("isSecureContext"in l)return l.isSecureContext;if(l.location&&l.location.origin)return 0===l.location.origin.indexOf("https:")});
g.add("esri-wasm","WebAssembly"in l);g.add("esri-shared-array-buffer",function(){var a=!1===l.crossOriginIsolated;return"SharedArrayBuffer"in l&&!a});g.add("esri-atomics","Atomics"in l);g.add("esri-workers","Worker"in l);g.add("esri-text-decoder","TextDecoder"in l);g.add("esri-text-encoder","TextEncoder"in l);g("host-webworker")||(g.add("esri-abortable-fetch","fetch"in l&&"signal"in new Request("https://www.arcgis.com")),g.add("csp-restrictions",function(){try{new Function}catch(q){return!0}return!1}),
g.add("esri-image-decode",function(){if("decode"in new Image){var a=new Image;a.src='data:image/svg+xml;charset\x3dUTF-8,\x3csvg version\x3d"1.1" xmlns\x3d"http://www.w3.org/2000/svg"\x3e\x3c/svg\x3e';a.decode().then(function(){g.add("esri-image-decode",!0,!0,!0)}).catch(function(){g.add("esri-image-decode",!1,!0,!0)})}else return!1}),g.add("esri-url-encodes-apostrophe",function(){var a=l.document.createElement("a");a.href="?'";return-1<a.href.indexOf("?%27")}),g.add("esri-webgl",function(){return f().available}),
g.add("esri-webgl-high-precision-fragment",function(){return f().supportsHighPrecisionFragment}),g.add("esri-webgl-vertex-shader-samplers",function(){return f().supportsVertexShaderSamplers}),g.add("esri-webgl-element-index-uint",function(){return f().supportsElementIndexUint}),g.add("esri-webgl-standard-derivatives",function(){return f().supportsStandardDerivatives}),g.add("esri-webgl-texture-float",function(){return f().supportsTextureFloat}),g.add("esri-webgl-color-buffer-float",function(){return f().supportsColorBufferFloat}),
g.add("esri-webgl-instanced-arrays",function(){return f().supportsInstancedArrays}),g.add("esri-webgl-major-performance-caveat",function(){return f().majorPerformanceCaveat}),g.add("esri-featurelayer-webgl",!0),g.add("esri-featurelayer-webgl-labeling",!0),g.add("esri-webgl2",function(){return c().available}),g.add("esri-webgl-max-texture-size",function(){return f().maxTextureSize}))})();var p=null,r=null;return g})},"esri/config":function(){define(["require","exports","@dojo/framework/has/has","./core/global",
"./core/object"],function(e,b,a,m,l){a.add("postmessage",!1,!0);e={applicationUrl:m.location&&m.location.href,fontsUrl:"https://static.arcgis.com/fonts",geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" "),
interceptors:[],maxUrlLength:2E3,proxyRules:[],proxyUrl:null,timeout:6E4,trustedServers:[],useIdentity:!0}};m.esriConfig&&l.deepMerge(e,m.esriConfig,!0);e.request.corsEnabledServers=[];e.request.corsEnabledServers.push=function(){console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664");return 0};return e})},"@dojo/framework/has/has":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?
(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","tslib","../shim/global"],e)})(function(e,b){function a(a){a=a.toLowerCase();return!!(a in f||a in b.testCache||b.testFunctions[a])}function m(c,h,g){void 0===g&&(g=!1);var d=c.toLowerCase();if(a(d)&&!g&&!(d in f))throw new TypeError('Feature "'+c+'" exists and overwrite not true.');"function"===typeof h?b.testFunctions[d]=h:(b.testCache[d]=h,delete b.testFunctions[d])}function l(a){var c=
a.toLowerCase();if(c in f)a=f[c];else if(b.testFunctions[c])a=b.testCache[c]=b.testFunctions[c].call(null),delete b.testFunctions[c];else if(c in b.testCache)a=b.testCache[c];else throw new TypeError('Attempt to detect unregistered has feature "'+a+'"');return a}Object.defineProperty(b,"__esModule",{value:!0});var k=e("tslib"),g=e("../shim/global");b.testCache={};b.testFunctions={};e=(g.default.DojoHasEnvironment||{}).staticFeatures;"DojoHasEnvironment"in g.default&&delete g.default.DojoHasEnvironment;
var f=e?"function"===typeof e?e.apply(g.default):e:{};b.load=function(a,c,f,g){a?c([a],f):f()};b.normalize=function(a,c){function d(a){var c=h[f++];if(":"===c)return null;if("?"===h[f++]){if(!a&&l(c))return d();d(!0);return d(a)}return c}var h=a.match(/[\?:]|[^:\?]*/g)||[],f=0;return(a=d())&&c(a)};b.exists=a;b.add=m;b.default=l;m("public-path",void 0);m("dojo-debug",!1);m("host-browser","undefined"!==typeof document&&"undefined"!==typeof location);m("host-node",function(){if("object"===typeof process&&
process.versions&&process.versions.node)return process.versions.node});m("fetch","fetch"in g.default&&"function"===typeof g.default.fetch,!0);m("es6-array",function(){return["from","of"].every(function(a){return a in g.default.Array})&&["findIndex","find","copyWithin"].every(function(a){return a in g.default.Array.prototype})},!0);m("es6-array-fill",function(){return"fill"in g.default.Array.prototype?1===[1].fill(9,Number.POSITIVE_INFINITY)[0]:!1},!0);m("es7-array",function(){return"includes"in g.default.Array.prototype},
!0);m("es6-map",function(){if("function"===typeof g.default.Map)try{var a=new g.default.Map([[0,1]]);return a.has(0)&&"function"===typeof a.keys&&l("es6-symbol")&&"function"===typeof a.values&&"function"===typeof a.entries}catch(h){}return!1},!0);m("es6-math",function(){return"clz32 sign log10 log2 log1p expm1 cosh sinh tanh acosh asinh atanh trunc fround cbrt hypot".split(" ").every(function(a){return"function"===typeof g.default.Math[a]})},!0);m("es6-math-imul",function(){return"imul"in g.default.Math?
-5===Math.imul(4294967295,5):!1},!0);m("es6-object",function(){return l("es6-symbol")&&["assign","is","getOwnPropertySymbols","setPrototypeOf"].every(function(a){return"function"===typeof g.default.Object[a]})},!0);m("es2017-object",function(){return["values","entries","getOwnPropertyDescriptors"].every(function(a){return"function"===typeof g.default.Object[a]})},!0);m("es-observable",function(){return"undefined"!==typeof g.default.Observable},!0);m("es6-promise",function(){return"undefined"!==typeof g.default.Promise&&
l("es6-symbol")},!0);m("es2018-promise-finally",function(){return l("es6-promise")&&"undefined"!==typeof g.default.Promise.prototype.finally},!0);m("es6-set",function(){if("function"===typeof g.default.Set){var a=new g.default.Set([1]);return a.has(1)&&"keys"in a&&"function"===typeof a.keys&&l("es6-symbol")}return!1},!0);m("es6-string",function(){return["fromCodePoint"].every(function(a){return"function"===typeof g.default.String[a]})&&"codePointAt normalize repeat startsWith endsWith includes".split(" ").every(function(a){return"function"===
typeof g.default.String.prototype[a]})},!0);m("es6-string-raw",function(){function a(a){for(var c=1;c<arguments.length;c++);c=k.__spread(a);c.raw=a.raw;return c}if("raw"in g.default.String){var h=a(c||(c=k.__makeTemplateObject(["a\n",""],["a\\n",""])),1);h.raw=["a\\n"];return"a\\n"===g.default.String.raw(h,42)}return!1},!0);m("es2017-string",function(){return["padStart","padEnd"].every(function(a){return"function"===typeof g.default.String.prototype[a]})},!0);m("es6-symbol",function(){return"undefined"!==
typeof g.default.Symbol&&"symbol"===typeof Symbol()},!0);m("es6-weakmap",function(){if("undefined"!==typeof g.default.WeakMap){var a={},c={},f=new g.default.WeakMap([[a,1]]);Object.freeze(a);return 1===f.get(a)&&f.set(c,2)===f&&l("es6-symbol")}return!1},!0);m("microtasks",function(){return l("es6-promise")||0||l("dom-mutationobserver")},!0);m("postmessage",function(){return"undefined"!==typeof g.default.window&&"function"===typeof g.default.postMessage},!0);m("raf",function(){return"function"===typeof g.default.requestAnimationFrame},
!0);m("setimmediate",function(){return"undefined"!==typeof g.default.setImmediate},!0);m("dom-mutationobserver",function(){if(l("host-browser")&&(g.default.MutationObserver||g.default.WebKitMutationObserver)){var a=document.createElement("div"),c=new (g.default.MutationObserver||g.default.WebKitMutationObserver)(function(){});c.observe(a,{attributes:!0});a.style.setProperty("display","block");return!!c.takeRecords().length}return!1},!0);m("dom-webanimation",function(){return l("host-browser")&&void 0!==
g.default.Animation&&void 0!==g.default.KeyframeEffect},!0);m("abort-controller",function(){return"undefined"!==typeof g.default.AbortController});m("abort-signal",function(){return"undefined"!==typeof g.default.AbortSignal});m("dom-intersection-observer",function(){return l("host-browser")&&void 0!==g.default.IntersectionObserver},!0);m("dom-resize-observer",function(){return l("host-browser")&&void 0!==g.default.ResizeObserver},!0);m("dom-pointer-events",function(){return l("host-browser")&&void 0!==
g.default.onpointerdown},!0);m("build-elide",!1);var c})},"@dojo/framework/shim/global":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports"],e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global}();
b.default=e})},"esri/core/global":function(){define(["require","exports"],function(e,b){return function(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof global)return global}()})},"esri/core/object":function(){define(["require","exports","./lang"],function(e,b,a){function m(a,g,f){for(var c=0;c<a.length;c++){var d=a[c];if(null==f)return;if(!(d in f))if(g)f[d]={};else return;f=f[d]}return f}
function l(b,g,f){return g?Object.keys(g).reduce(function(c,d){var h=c[d],n=g[d];if(h===n)return c;if(void 0===h)return c[d]=a.clone(n),c;if(Array.isArray(n)||Array.isArray(c))h=h?Array.isArray(h)?c[d]=h.concat():c[d]=[h]:c[d]=[],n&&(Array.isArray(n)||(n=[n]),f?n.forEach(function(a){-1===h.indexOf(a)&&h.push(a)}):c[d]=n.concat());else if(n&&"object"===typeof n)c[d]=l(h,n,f);else if(!c.hasOwnProperty(d)||g.hasOwnProperty(d))c[d]=n;return c},b||{}):b}Object.defineProperty(b,"__esModule",{value:!0});
b.deepMerge=function(a,g,f){void 0===f&&(f=!1);return l(a,g,f)};b.getDeepValue=function(a,g){if(null!=g)return g[a]||m(a.split("."),!1,g)};b.setDeepValue=function(a,g,f){var c=a.split(".");a=c.pop();(f=m(c,!0,f))&&a&&(f[a]=g)}})},"esri/core/lang":function(){define(["require","exports","./typedArrayUtil"],function(e,b,a){function m(a,f){var c;if(f)for(c in a)a.hasOwnProperty(c)&&(void 0===a[c]?delete a[c]:a[c]instanceof Object&&m(a[c],!0));else for(c in a)a.hasOwnProperty(c)&&void 0===a[c]&&delete a[c];
return a}function l(g){if(!g||"object"!==typeof g||"function"===typeof g)return g;if(a.isInt8Array(g)||a.isUint8Array(g)||a.isUint8ClampedArray(g)||a.isInt16Array(g)||a.isUint16Array(g)||a.isInt32Array(g)||a.isUint32Array(g)||a.isFloat32Array(g)||a.isFloat64Array(g))return a.slice(g);if(g instanceof Date)return new Date(g.getTime());if(g instanceof ArrayBuffer)return g.slice(0,g.byteLength);if(g instanceof Map){var f=new Map;g.forEach(function(a,c){f.set(c,l(a))});return f}if(g instanceof Set){var c=
new Set;g.forEach(function(a){c.add(l(a))});return c}return"function"===typeof g.clone?g.clone():"function"===typeof g.map&&"function"===typeof g.forEach?g.map(l):"function"===typeof g.notifyChange&&"function"===typeof g.watch?g.clone():k({},g,l)}function k(a,f,c){var d,h,g={};for(d in f){h=f[d];var p=!(d in g)||g[d]!==h;if(!(d in a)||a[d]!==h&&p)a[d]=c?c(h):h}return a}Object.defineProperty(b,"__esModule",{value:!0});b.fixJson=m;b.clone=l;b.equals=function(a,f){return a===f||"number"===typeof a&&
isNaN(a)&&"number"===typeof f&&isNaN(f)||"function"===typeof(a||{}).getTime&&"function"===typeof(f||{}).getTime&&a.getTime()===f.getTime()||!1};b.mixin=function(a){void 0===a&&(a={});for(var f=[],c=1;c<arguments.length;c++)f[c-1]=arguments[c];for(c=0;c<f.length;c++)k(a,f[c]);return a}})},"esri/core/typedArrayUtil":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.forEach=function(a,b){if(a.forEach)a.forEach(b);else for(var e=0;e<a.length;e++)b(a[e],
e,a)};b.slice=function(a,b,e){if(a.slice)return a.slice(b,e);void 0===b?b=0:(0>b&&(b+=a.length),b=Math.min(a.length,Math.max(0,b)));void 0===e?e=a.length:(0>e&&(e+=a.length),e=Math.min(a.length,Math.max(0,e)));e=Math.max(0,e-b);for(var k=new a.constructor(e),g=0;g<e;g++)k[g]=a[b+g];return k};b.isArrayBuffer=function(a){return a instanceof ArrayBuffer||a&&a.constructor&&"ArrayBuffer"===a.constructor.name};b.isInt8Array=function(a){return a instanceof Int8Array||a&&a.constructor&&"Int8Array"===a.constructor.name};
b.isUint8Array=function(a){return a instanceof Uint8Array||a&&a.constructor&&"Uint8Array"===a.constructor.name};b.isUint8ClampedArray=function(a){return a instanceof Uint8ClampedArray||a&&a.constructor&&"Uint8ClampedArray"===a.constructor.name};b.isInt16Array=function(a){return a instanceof Int16Array||a&&a.constructor&&"Int16Array"===a.constructor.name};b.isUint16Array=function(a){return a instanceof Uint16Array||a&&a.constructor&&"Uint16Array"===a.constructor.name};b.isInt32Array=function(a){return a instanceof
Int32Array||a&&a.constructor&&"Int32Array"===a.constructor.name};b.isUint32Array=function(a){return a instanceof Uint32Array||a&&a.constructor&&"Uint32Array"===a.constructor.name};b.isFloat32Array=function(a){return a instanceof Float32Array||a&&a.constructor&&"Float32Array"===a.constructor.name};b.isFloat64Array=function(a){return a instanceof Float64Array||a&&a.constructor&&"Float64Array"===a.constructor.name};b.toArray=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a[e];return b};
b.estimateSize=function(a){return a?128+a.buffer.byteLength+64:0}})},"esri/views/webgl/context-util":function(){define(["require","exports"],function(e,b){function a(a,f,c){void 0===f&&(f={});var d;switch(c){case "webgl":d=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case "webgl2":d=["webgl2"];break;default:d=["webgl","experimental-webgl","webkit-3d","moz-webgl"]}c=null;for(var h=0;h<d.length;h++){var g=d[h];try{c=a.getContext(g,f)}catch(p){}if(c)break}return c}function m(a,f){(a=
a.parentNode)&&(a.innerHTML='\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+f+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}Object.defineProperty(b,"__esModule",{value:!0});b.createContextOrErrorHTML=function(g,f,c){void 0===f&&(f={});if(!window.WebGLRenderingContext)return m(g,l),null;f=a(g,f,c);return f?f:(m(g,k),null)};b.createContext=
a;var l='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',k='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'})},"esri/core/Logger":function(){define("require exports tslib ./has ./string @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l){var k={info:0,warn:1,error:2};e=function(){function g(a){void 0===
a&&(a={});this._loggedMessages={error:new Map,warn:new Map,info:new Map};this.module=a.module||"";this.writer=a.writer||null;this.level=a.level||null;null!=a.enabled&&(this.enabled=!!a.enabled);g._loggers[this.module]=this;a=this.module.lastIndexOf(".");-1!==a&&(this.parent=g.getLogger(this.module.slice(0,a)))}g.prototype.log=function(f,c){for(var d=[],h=2;h<arguments.length;h++)d[h-2]=arguments[h];if(this._isEnabled()&&this._matchLevel(f)){if("always"!==c&&!g._throttlingDisabled){var h=this._argsToKey(d),
n=this._loggedMessages[f].get(h);if("once"===c&&null!=n||"oncePerTick"===c&&n>=g._tickCounter)return;this._loggedMessages[f].set(h,g._tickCounter);g._scheduleTickCounterIncrement()}(h=this._inheritedWriter())&&h.apply(void 0,a.__spreadArrays([f,this.module],d))}};g.prototype.error=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["error","always"],f))};g.prototype.warn=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,
a.__spreadArrays(["warn","always"],f))};g.prototype.info=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["info","always"],f))};g.prototype.errorOnce=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["error","once"],f))};g.prototype.warnOnce=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["warn","once"],f))};g.prototype.infoOnce=
function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["info","once"],f))};g.prototype.errorOncePerTick=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["error","oncePerTick"],f))};g.prototype.warnOncePerTick=function(){for(var f=[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["warn","oncePerTick"],f))};g.prototype.infoOncePerTick=function(){for(var f=
[],c=0;c<arguments.length;c++)f[c]=arguments[c];this.log.apply(this,a.__spreadArrays(["info","oncePerTick"],f))};g.prototype.getLogger=function(a){return g.getLogger(this.module+"."+a)};Object.defineProperty(g,"test",{get:function(){return{resetLoggers:function(a){void 0===a&&(a={});var c=g._loggers;g._loggers=a;return c},set throttlingDisabled(a){g._throttlingDisabled=a}}},enumerable:!0,configurable:!0});g.getLogger=function(a){var c=g._loggers[a];c||(c=new g({module:a}));return c};g.prototype._parentWithMember=
function(a,c){for(var d=this;d&&null==d[a];)d=d.parent;return d?d[a]:c};g.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};g.prototype._consoleWriter=function(f,c){for(var d=[],h=2;h<arguments.length;h++)d[h-2]=arguments[h];console[f].apply(console,a.__spreadArrays(["["+c+"]"],d))};g.prototype._matchLevel=function(a){return k[this._parentWithMember("level","error")]<=k[a]};g.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};
g.prototype._argsToKey=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return l.numericHash(JSON.stringify(a,function(a,c){return"object"!==typeof c||Array.isArray(c)?c:"[Object]"}))};g._scheduleTickCounterIncrement=function(){g._tickCounterScheduled||(g._tickCounterScheduled=!0,Promise.resolve().then(function(){g._tickCounter++;g._tickCounterScheduled=!1}))};g._loggers={};g._tickCounter=0;g._tickCounterScheduled=!1;g._throttlingDisabled=!1;return g}();e.getLogger("esri").level=
"warn";return e})},"esri/core/string":function(){define(["require","exports","./object","@dojo/framework/shim/string"],function(e,b,a,m){function l(a){return null==a?"":a}Object.defineProperty(b,"__esModule",{value:!0});var k=/\{([^\}]+)\}/g;b.endsWith=m.endsWith;b.startsWith=m.startsWith;b.padEnd=m.padEnd;b.padStart=m.padStart;b.includes=m.includes;b.replace=function(g,f){return g.replace(k,"object"===typeof f?function(c,d){return l(a.getDeepValue(d,f))}:function(a,d){return l(f(d))})};b.escapeRegExpString=
function(a,f){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(a){return f&&-1!==f.indexOf(a)?a:"\\"+a})};b.numericHash=function(a){for(var f=0,c=0;c<a.length;c++)f=(f<<5)-f+a.charCodeAt(c),f|=0;return f}})},"@dojo/framework/shim/string":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define("require exports tslib ./global ../has/has ./support/util".split(" "),
e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=e("tslib"),m=e("./global"),l=e("../has/has");e=e("./support/util");b.HIGH_SURROGATE_MIN=55296;b.HIGH_SURROGATE_MAX=56319;b.LOW_SURROGATE_MIN=56320;b.LOW_SURROGATE_MAX=57343;if(l.default("es6-string")&&l.default("es6-string-raw"))b.fromCodePoint=m.default.String.fromCodePoint,b.raw=m.default.String.raw,b.codePointAt=e.wrapNative(m.default.String.prototype.codePointAt),b.endsWith=e.wrapNative(m.default.String.prototype.endsWith),
b.includes=e.wrapNative(m.default.String.prototype.includes),b.normalize=e.wrapNative(m.default.String.prototype.normalize),b.repeat=e.wrapNative(m.default.String.prototype.repeat),b.startsWith=e.wrapNative(m.default.String.prototype.startsWith);else{var k=function(a,f,c,d,h){void 0===h&&(h=!1);if(null==f)throw new TypeError("string."+a+" requires a valid string to search against.");a=f.length;return[f,String(c),Math.min(Math.max(d!==d?h?a:0:d,0),a)]};b.fromCodePoint=function(){for(var a=0;a<arguments.length;a++);
a=arguments.length;if(!a)return"";for(var f=String.fromCharCode,c=[],d=-1,h="";++d<a;){var n=Number(arguments[d]);if(!(isFinite(n)&&Math.floor(n)===n&&0<=n&&1114111>=n))throw RangeError("string.fromCodePoint: Invalid code point "+n);65535>=n?c.push(n):(n-=65536,c.push((n>>10)+b.HIGH_SURROGATE_MIN,n%1024+b.LOW_SURROGATE_MIN));if(d+1===a||16384<c.length)h+=f.apply(null,c),c.length=0}return h};b.raw=function(a){for(var f=[],c=1;c<arguments.length;c++)f[c-1]=arguments[c];var c=a.raw,d="",h=f.length;if(null==
a||null==a.raw)throw new TypeError("string.raw requires a valid callSite object with a raw value");for(var g=0,p=c.length;g<p;g++)d+=c[g]+(g<h&&g<p-1?f[g]:"");return d};b.codePointAt=function(a,f){void 0===f&&(f=0);if(null==a)throw new TypeError("string.codePointAt requries a valid string.");var c=a.length;f!==f&&(f=0);if(!(0>f||f>=c)){var d=a.charCodeAt(f);return d>=b.HIGH_SURROGATE_MIN&&d<=b.HIGH_SURROGATE_MAX&&c>f+1&&(a=a.charCodeAt(f+1),a>=b.LOW_SURROGATE_MIN&&a<=b.LOW_SURROGATE_MAX)?1024*(d-
b.HIGH_SURROGATE_MIN)+a-b.LOW_SURROGATE_MIN+65536:d}};b.endsWith=function(g,f,c){if(""===f)return!0;if("undefined"===typeof c)c=g.length;else if(null===c||isNaN(c))return!1;c=a.__read(k("endsWith",g,f,c,!0),3);g=c[0];f=c[1];c=c[2];var d=c-f.length;return 0>d?!1:g.slice(d,c)===f};b.includes=function(g,f,c){void 0===c&&(c=0);c=a.__read(k("includes",g,f,c),3);g=c[0];f=c[1];c=c[2];return-1!==g.indexOf(f,c)};b.repeat=function(a,f){void 0===f&&(f=0);if(null==a)throw new TypeError("string.repeat requires a valid string.");
f!==f&&(f=0);if(0>f||Infinity===f)throw new RangeError("string.repeat requires a non-negative finite count.");for(var c="";f;)f%2&&(c+=a),1<f&&(a+=a),f>>=1;return c};b.startsWith=function(g,f,c){void 0===c&&(c=0);f=String(f);c=a.__read(k("startsWith",g,f,c),3);g=c[0];f=c[1];c=c[2];var d=c+f.length;return d>g.length?!1:g.slice(c,d)===f}}l.default("es2017-string")?(b.padEnd=e.wrapNative(m.default.String.prototype.padEnd),b.padStart=e.wrapNative(m.default.String.prototype.padStart)):(b.padEnd=function(a,
f,c){void 0===c&&(c=" ");if(null===a||void 0===a)throw new TypeError("string.repeat requires a valid string.");if(Infinity===f)throw new RangeError("string.padEnd requires a non-negative finite count.");if(null===f||void 0===f||0>f)f=0;a=String(a);f-=a.length;0<f&&(a+=b.repeat(c,Math.floor(f/c.length))+c.slice(0,f%c.length));return a},b.padStart=function(a,f,c){void 0===c&&(c=" ");if(null===a||void 0===a)throw new TypeError("string.repeat requires a valid string.");if(Infinity===f)throw new RangeError("string.padStart requires a non-negative finite count.");
if(null===f||void 0===f||0>f)f=0;a=String(a);f-=a.length;0<f&&(a=b.repeat(c,Math.floor(f/c.length))+c.slice(0,f%c.length)+a);return a})})},"@dojo/framework/shim/support/util":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports"],e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.getValueDescriptor=function(a,b,e,k){void 0===b&&(b=
!1);void 0===e&&(e=!0);void 0===k&&(k=!0);return{value:a,enumerable:b,writable:e,configurable:k}};b.wrapNative=function(a){return function(b){for(var e=[],k=1;k<arguments.length;k++)e[k-1]=arguments[k];return a.apply(b,e)}}})},"@dojo/framework/shim/Promise":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define("require exports tslib ./global ./support/queue ./Symbol ../has/has".split(" "),
e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=e("tslib"),m=e("./global"),l=e("./support/queue");e("./Symbol");e=e("../has/has");b.ShimPromise=m.default.Promise;b.isThenable=function(a){return a&&"function"===typeof a.then};e.default("es6-promise")||(m.default.Promise=b.ShimPromise=(k=function(){function g(a){var c=this;this.state=1;this[Symbol.toStringTag]="Promise";var d=!1,h=[],f=function(a){h&&h.push(a)},p=function(a,d){1===c.state&&(c.state=a,c.resolvedValue=d,f=l.queueMicroTask,
h&&0<h.length&&l.queueMicroTask(function(){if(h){for(var a=h.length,c=0;c<a;++c)h[c].call(null);h=null}}))},r=function(a,h){1!==c.state||d||(b.isThenable(h)?(h.then(p.bind(null,0),p.bind(null,2)),d=!0):p(a,h))};this.then=function(a,d){return new g(function(h,g){f(function(){var f=2===c.state?d:a;if("function"===typeof f)try{h(f(c.resolvedValue))}catch(x){g(x)}else 2===c.state?g(c.resolvedValue):h(c.resolvedValue)})})};try{a(r.bind(null,0),r.bind(null,2))}catch(t){p(2,t)}}g.all=function(f){return new this(function(c,
d){function h(a,d){p[a]=d;++r;e||r<t||c(p)}function n(a,c){++t;b.isThenable(c)?c.then(h.bind(null,a),d):g.resolve(c).then(h.bind(null,a))}var p=[],r=0,t=0,e=!0,q=0;try{for(var w=a.__values(f),u=w.next();!u.done;u=w.next())n(q,u.value),q++}catch(z){k={error:z}}finally{try{u&&!u.done&&(l=w.return)&&l.call(w)}finally{if(k)throw k.error;}}(e=!1,r<t)||c(p);var k,l})};g.race=function(f){return new this(function(c,d){try{for(var h=a.__values(f),n=h.next();!n.done;n=h.next()){var p=n.value;p instanceof g?
p.then(c,d):g.resolve(p).then(c)}}catch(v){b={error:v}}finally{try{n&&!n.done&&(t=h.return)&&t.call(h)}finally{if(b)throw b.error;}}var b,t})};g.reject=function(a){return new this(function(c,d){d(a)})};g.resolve=function(a){return new this(function(c){c(a)})};g.prototype.catch=function(a){return this.then(void 0,a)};return g}(),k[Symbol.species]=b.ShimPromise,k));e.default("es2018-promise-finally")||(m.default.Promise.prototype.finally=function(a){return this.then(a&&function(f){return Promise.resolve(a()).then(function(){return f})},
a&&function(f){return Promise.resolve(a()).then(function(){throw f;})})});b.default=b.ShimPromise;var k})},"@dojo/framework/shim/support/queue":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","../global","../../has/has"],e)})(function(e,b){function a(a){a&&a.isActive&&a.callback&&a.callback()}function m(a,c){return{destroy:function(){this.destroy=
function(){};a.isActive=!1;a.callback=null;c&&c()}}}Object.defineProperty(b,"__esModule",{value:!0});var l=e("../global"),k=e("../../has/has"),g,f;b.queueTask=function(){function c(a){a={isActive:!0,callback:a};var c=f(a);return m(a,h&&function(){h(c)})}var h,f;if(k.default("postmessage")){var p=[];l.default.addEventListener("message",function(c){c.source===l.default&&"dojo-queue-message"===c.data&&(c.stopPropagation(),p.length&&a(p.shift()))});f=function(a){p.push(a);l.default.postMessage("dojo-queue-message",
"*")}}else k.default("setimmediate")?(h=l.default.clearImmediate,f=function(c){return setImmediate(a.bind(null,c))}):(h=l.default.clearTimeout,f=function(c){return setTimeout(a.bind(null,c),0)});return k.default("microtasks")?c:function(a){g();return c(a)}}();if(!k.default("microtasks")){var c=!1;f=[];g=function(){c||(c=!0,b.queueTask(function(){c=!1;if(f.length)for(var d=void 0;d=f.shift();)a(d)}))}}b.queueAnimationTask=function(){function c(c){c={isActive:!0,callback:c};var d=requestAnimationFrame(a.bind(null,
c));return m(c,function(){cancelAnimationFrame(d)})}return k.default("raf")?k.default("microtasks")?c:function(a){g();return c(a)}:b.queueTask}();b.queueMicroTask=function(){var c;if(k.default("host-node"))c=function(c){l.default.process.nextTick(a.bind(null,c))};else if(k.default("es6-promise"))c=function(c){l.default.Promise.resolve(c).then(a)};else if(k.default("dom-mutationobserver")){var h=l.default.MutationObserver||l.default.WebKitMutationObserver,n=document.createElement("div"),p=[];(new h(function(){for(;0<
p.length;){var a=p.shift();a&&a.isActive&&a.callback&&a.callback()}})).observe(n,{attributes:!0});c=function(a){p.push(a);n.setAttribute("queueStatus","1")}}else c=function(a){g();f.push(a)};return function(a){a={isActive:!0,callback:a};c(a);return m(a)}}()})},"@dojo/framework/shim/Symbol":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","../has/has",
"./global","./support/util"],e)})(function(e,b){function a(a){return a&&("symbol"===typeof a||"Symbol"===a["@@toStringTag"])||!1}Object.defineProperty(b,"__esModule",{value:!0});var m=e("../has/has"),l=e("./global"),k=e("./support/util");b.Symbol=l.default.Symbol;if(!m.default("es6-symbol")){var g=function(c){if(!a(c))throw new TypeError(c+" is not a symbol");return c},f=Object.defineProperties,c=Object.defineProperty,d=Object.create,h=Object.prototype,n={},p=function(){var a=d(null);return function(d){for(var f=
0,g;a[String(d)+(f||"")];)++f;d+=String(f||"");a[d]=!0;g="@@"+d;Object.getOwnPropertyDescriptor(h,g)||c(h,g,{set:function(a){c(this,g,k.getValueDescriptor(a))}});return g}}(),r=function v(a){if(this instanceof r)throw new TypeError("TypeError: Symbol is not a constructor");return v(a)};b.Symbol=l.default.Symbol=function q(a){if(this instanceof q)throw new TypeError("TypeError: Symbol is not a constructor");var c=Object.create(r.prototype);a=void 0===a?"":String(a);return f(c,{__description__:k.getValueDescriptor(a),
__name__:k.getValueDescriptor(p(a))})};c(b.Symbol,"for",k.getValueDescriptor(function(a){return n[a]?n[a]:n[a]=b.Symbol(String(a))}));f(b.Symbol,{keyFor:k.getValueDescriptor(function(a){var c;g(a);for(c in n)if(n[c]===a)return c}),hasInstance:k.getValueDescriptor(b.Symbol.for("hasInstance"),!1,!1),isConcatSpreadable:k.getValueDescriptor(b.Symbol.for("isConcatSpreadable"),!1,!1),iterator:k.getValueDescriptor(b.Symbol.for("iterator"),!1,!1),match:k.getValueDescriptor(b.Symbol.for("match"),!1,!1),observable:k.getValueDescriptor(b.Symbol.for("observable"),
!1,!1),replace:k.getValueDescriptor(b.Symbol.for("replace"),!1,!1),search:k.getValueDescriptor(b.Symbol.for("search"),!1,!1),species:k.getValueDescriptor(b.Symbol.for("species"),!1,!1),split:k.getValueDescriptor(b.Symbol.for("split"),!1,!1),toPrimitive:k.getValueDescriptor(b.Symbol.for("toPrimitive"),!1,!1),toStringTag:k.getValueDescriptor(b.Symbol.for("toStringTag"),!1,!1),unscopables:k.getValueDescriptor(b.Symbol.for("unscopables"),!1,!1)});f(r.prototype,{constructor:k.getValueDescriptor(b.Symbol),
toString:k.getValueDescriptor(function(){return this.__name__},!1,!1)});f(b.Symbol.prototype,{toString:k.getValueDescriptor(function(){return"Symbol ("+g(this).__description__+")"}),valueOf:k.getValueDescriptor(function(){return g(this)})});c(b.Symbol.prototype,b.Symbol.toPrimitive,k.getValueDescriptor(function(){return g(this)}));c(b.Symbol.prototype,b.Symbol.toStringTag,k.getValueDescriptor("Symbol",!1,!1,!0));c(r.prototype,b.Symbol.toPrimitive,k.getValueDescriptor(b.Symbol.prototype[b.Symbol.toPrimitive],
!1,!1,!0));c(r.prototype,b.Symbol.toStringTag,k.getValueDescriptor(b.Symbol.prototype[b.Symbol.toStringTag],!1,!1,!0))}b.isSymbol=a;"hasInstance isConcatSpreadable iterator species replace search split match toPrimitive toStringTag unscopables observable".split(" ").forEach(function(a){b.Symbol[a]||Object.defineProperty(b.Symbol,a,k.getValueDescriptor(b.Symbol.for(a),!1,!1))});b.default=b.Symbol})},"esri/geometry/Extent":function(){define("require exports tslib ../core/maybe ../core/string ../core/accessorSupport/decorators ./Geometry ./Point ./SpatialReference ./support/contains ./support/intersects ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){function r(a,c,d){return null==c?d:null==d?c:a(c,d)}e=function(g){function b(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=g.apply(this,a)||this;a.type="extent";a.xmin=0;a.ymin=0;a.mmin=void 0;a.zmin=void 0;a.xmax=0;a.ymax=0;a.mmax=void 0;a.zmax=void 0;return a}a.__extends(b,g);t=b;b.prototype.normalizeCtorArgs=function(a,d,h,f,g){return!a||"esri.geometry.SpatialReference"!==a.declaredClass&&null==a.wkid?"object"===typeof a?(a.spatialReference=null==
a.spatialReference?c.WGS84:a.spatialReference,a):{xmin:a,ymin:d,xmax:h,ymax:f,spatialReference:null==g?c.WGS84:g}:{spatialReference:a,xmin:0,ymin:0,xmax:0,ymax:0}};b.fromBounds=function(a,c){return new t({xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3],spatialReference:c})};Object.defineProperty(b.prototype,"center",{get:function(){var a=new f({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});this.hasZ&&(a.z=.5*(this.zmin+this.zmax));this.hasM&&(a.m=.5*(this.mmin+
this.mmax));return a},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"extent",{get:function(){return this.clone()},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasM",{get:function(){return null!=this.mmin&&null!=this.mmax},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasZ",{get:function(){return null!=this.zmin&&null!=this.zmax},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"height",{get:function(){return Math.abs(this.ymax-
this.ymin)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"width",{get:function(){return Math.abs(this.xmax-this.xmin)},enumerable:!0,configurable:!0});b.prototype.centerAt=function(a){var c=this.center;return null!=a.z&&this.hasZ?this.offset(a.x-c.x,a.y-c.y,a.z-c.z):this.offset(a.x-c.x,a.y-c.y)};b.prototype.clone=function(){var a=new t;a.xmin=this.xmin;a.ymin=this.ymin;a.xmax=this.xmax;a.ymax=this.ymax;a.spatialReference=this.spatialReference;null!=this.zmin&&(a.zmin=this.zmin,
a.zmax=this.zmax);null!=this.mmin&&(a.mmin=this.mmin,a.mmax=this.mmax);return a};b.prototype.contains=function(a){if(!a)return!1;var c=this.spatialReference,h=a.spatialReference;c&&h&&!c.equals(h)&&p.canProject(c,h)&&(a=c.isWebMercator?p.geographicToWebMercator(a):p.webMercatorToGeographic(a,!0));return"point"===a.type?d.extentContainsPoint(this,a):"extent"===a.type?d.extentContainsExtent(this,a):!1};b.prototype.equals=function(a){if(!a)return!1;var c=this.spatialReference,d=a.spatialReference;c&&
d&&!c.equals(d)&&p.canProject(c,d)&&(a=c.isWebMercator?p.geographicToWebMercator(a):p.webMercatorToGeographic(a,!0));return this.xmin===a.xmin&&this.ymin===a.ymin&&this.zmin===a.zmin&&this.mmin===a.mmin&&this.xmax===a.xmax&&this.ymax===a.ymax&&this.zmax===a.zmax&&this.mmax===a.mmax};b.prototype.expand=function(a){a=.5*(1-a);var c=this.width*a,d=this.height*a;this.xmin+=c;this.ymin+=d;this.xmax-=c;this.ymax-=d;this.hasZ&&(c=(this.zmax-this.zmin)*a,this.zmin+=c,this.zmax-=c);this.hasM&&(a*=this.mmax-
this.mmin,this.mmin+=a,this.mmax-=a);return this};b.prototype.intersects=function(a){if(m.isNone(a))return!1;var c=this.spatialReference,d=a.spatialReference;c&&d&&!c.equals(d)&&p.canProject(c,d)&&(a=c.isWebMercator?p.geographicToWebMercator(a):p.webMercatorToGeographic(a,!0));c=h.getExtentIntersector(a.type);return"mesh"!==a.type?c(this,a):c(this,a.extent)};b.prototype.normalize=function(){var a=this._normalize(!1,!0);return Array.isArray(a)?a:[a]};b.prototype.offset=function(a,c,d){this.xmin+=a;
this.ymin+=c;this.xmax+=a;this.ymax+=c;null!=d&&(this.zmin+=d,this.zmax+=d);return this};b.prototype.shiftCentralMeridian=function(){return this._normalize(!0)};b.prototype.union=function(a){this.xmin=Math.min(this.xmin,a.xmin);this.ymin=Math.min(this.ymin,a.ymin);this.xmax=Math.max(this.xmax,a.xmax);this.ymax=Math.max(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=r(Math.min,this.zmin,a.zmin),this.zmax=r(Math.max,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=r(Math.min,this.mmin,a.mmin),this.mmax=
r(Math.max,this.mmax,a.mmax);return this};b.prototype.intersection=function(a){if(!this.intersects(a))return null;this.xmin=Math.max(this.xmin,a.xmin);this.ymin=Math.max(this.ymin,a.ymin);this.xmax=Math.min(this.xmax,a.xmax);this.ymax=Math.min(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=r(Math.max,this.zmin,a.zmin),this.zmax=r(Math.min,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=r(Math.max,this.mmin,a.mmin),this.mmax=r(Math.min,this.mmax,a.mmax);return this};b.prototype.toJSON=function(a){return this.write(null,
a)};b.prototype._shiftCM=function(a){void 0===a&&(a=n.getInfo(this.spatialReference));if(!a||!this.spatialReference)return this;var d=this.spatialReference,h=this._getCM(a);if(h){var f=d.isWebMercator?p.webMercatorToGeographic(h):h;this.xmin-=h.x;this.xmax-=h.x;d.isWebMercator||(f.x=this._normalizeX(f.x,a).x);this.spatialReference=new c(l.replace(d.isWGS84?a.altTemplate:a.wkTemplate,{Central_Meridian:f.x}))}return this};b.prototype._getCM=function(a){var c=null,d=a.valid;a=d[0];var d=d[1],h=this.xmin,
f=this.xmax;h>=a&&h<=d&&f>=a&&f<=d||(c=this.center);return c};b.prototype._normalize=function(a,c,d){var h=this.spatialReference;if(!h)return this;d=d||n.getInfo(h);if(!d)return this;var f=this._getParts(d).map(function(a){return a.extent});if(2>f.length)return f[0]||this;if(2<f.length)return a?this._shiftCM(d):this.set({xmin:d.valid[0],xmax:d.valid[1]});if(a)return this._shiftCM(d);if(c)return f;var g=!0,p=!0;f.forEach(function(a){a.hasZ||(g=!1);a.hasM||(p=!1)});return{rings:f.map(function(a){var c=
[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(g)for(var d=(a.zmax-a.zmin)/2,h=0;h<c.length;h++)c[h].push(d);if(p)for(a=(a.mmax-a.mmin)/2,h=0;h<c.length;h++)c[h].push(a);return c}),hasZ:g,hasM:p,spatialReference:h}};b.prototype._getParts=function(a){var c=this.cache._parts;if(!c){var c=[],d=this.ymin,h=this.ymax,f=this.spatialReference,g=this.width,p=this.xmin,b=this.xmax,r=void 0;a=a||n.getInfo(f);var e=a.valid,v=e[0],q=e[1],r=this._normalizeX(this.xmin,a),w=
r.x,e=r.frameId,r=this._normalizeX(this.xmax,a),k=r.x;a=r.frameId;r=w===k&&0<g;if(g>2*q){g=new t(p<b?w:k,d,q,h,f);p=new t(v,d,p<b?k:w,h,f);b=new t(0,d,q,h,f);d=new t(v,d,0,h,f);h=[];f=[];g.contains(b)&&h.push(e);g.contains(d)&&f.push(e);p.contains(b)&&h.push(a);p.contains(d)&&f.push(a);for(v=e+1;v<a;v++)h.push(v),f.push(v);c.push({extent:g,frameIds:[e]},{extent:p,frameIds:[a]},{extent:b,frameIds:h},{extent:d,frameIds:f})}else w>k||r?c.push({extent:new t(w,d,q,h,f),frameIds:[e]},{extent:new t(v,d,
k,h,f),frameIds:[a]}):c.push({extent:new t(w,d,k,h,f),frameIds:[e]});this.cache._parts=c}a=this.hasZ;d=this.hasM;if(a||d)for(e={},a&&(e.zmin=this.zmin,e.zmax=this.zmax),d&&(e.mmin=this.mmin,e.mmax=this.mmax),a=0;a<c.length;a++)c[a].extent.set(e);return c};b.prototype._normalizeX=function(a,c){var d=c.valid;c=d[0];var h=d[1],d=2*h,f=0;a>h?(c=Math.ceil(Math.abs(a-h)/d),a-=c*d,f=c):a<c&&(c=Math.ceil(Math.abs(a-c)/d),a+=c*d,f=-c);return{x:a,frameId:f}};var t;a.__decorate([k.property({dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax spatialReference".split(" ")})],
b.prototype,"cache",void 0);a.__decorate([k.property({readOnly:!0,dependsOn:["cache"]})],b.prototype,"center",null);a.__decorate([k.property({readOnly:!0,dependsOn:["cache"]})],b.prototype,"extent",null);a.__decorate([k.property({readOnly:!0,dependsOn:["mmin","mmax"],json:{write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null);a.__decorate([k.property({readOnly:!0,dependsOn:["zmin","zmax"],json:{write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null);a.__decorate([k.property({readOnly:!0,
dependsOn:["ymin","ymax"]})],b.prototype,"height",null);a.__decorate([k.property({readOnly:!0,dependsOn:["xmin","xmax"]})],b.prototype,"width",null);a.__decorate([k.property({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],b.prototype,"xmin",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"ymin",void 0);a.__decorate([k.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],
b.prototype,"mmin",void 0);a.__decorate([k.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],b.prototype,"zmin",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"xmax",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"ymax",void 0);a.__decorate([k.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],
b.prototype,"mmax",void 0);a.__decorate([k.property({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],b.prototype,"zmax",void 0);return b=t=a.__decorate([k.subclass("esri.geometry.Extent")],b)}(g);e.prototype.toJSON.isDefaultToJSON=!0;return e})},"esri/core/maybe":function(){define(["require","exports"],function(e,b){function a(a,b,e){return null!=a?e(a):b}Object.defineProperty(b,"__esModule",{value:!0});b.isSome=function(a){return null!=
a};b.isNone=function(a){return null==a};b.isUndefined=function(a){return void 0===a};b.applySome=function(a,b){return null!=a?b(a):null};b.unwrap=function(a){return a};b.unwrapOr=function(a,b){return null!=a?a:"function"===typeof b?b():b};b.destroyMaybe=function(a){null!=a&&a.destroy();return null};b.mapSome=function(a,b){var e=[];a.forEach(function(a){a=b(a);null!=a&&e.push(a)});return e};b.mapMany=function(b,e){for(var k=[],g=0;g<b.length;g++)k.push(a(b[g],null,e));return k};b.forEachSome=function(b,
e){for(var k=0;k<b.length;k++)a(b[k],null,e)};b.mapOr=a;b.andThen=function(a,b){return null!=a?b(a):null};b.mapSomeFirst=function(a,b){for(var e=0;e<a.length;e++){var g=b(a[e]);if(null!=g)return g}return null};b.get=function(a){for(var b=[],e=1;e<arguments.length;e++)b[e-1]=arguments[e];for(var e=a,g=0;g<b.length&&e;)e=e[b[g++]];return e}})},"esri/core/accessorSupport/decorators":function(){define("require exports tslib ./decorators/aliasOf ./decorators/autoDestroy ./decorators/cast ./decorators/declared ./decorators/enumeration ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer ./decorators/persistable".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r){Object.defineProperty(b,"__esModule",{value:!0});a.__exportStar(m,b);a.__exportStar(l,b);a.__exportStar(k,b);a.__exportStar(g,b);a.__exportStar(f,b);a.__exportStar(c,b);a.__exportStar(d,b);a.__exportStar(h,b);a.__exportStar(n,b);a.__exportStar(p,b);a.__exportStar(r,b)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","tslib","./property"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.aliasOf=function(b,
e){b=e?a.__assign(a.__assign({},e),{source:b}):b;return m.property({aliasOf:b})}})},"esri/core/accessorSupport/decorators/property":function(){define("require exports ../../Logger ../ensureType ../get ../metadata ../set".split(" "),function(e,b,a,m,l,k,g){function f(a){var c=0,d=a;if(m.isLongFormType(a))return m.ensureLongFormType(a);for(;Array.isArray(d)&&1===d.length&&"string"!==typeof d[0]&&"number"!==typeof d[0];)d=d[0],c++;return m.isOneOf(d)?0===c?m.ensureOneOf(d):m.ensureNArrayTyped(m.ensureOneOf(d),
c):1===c?m.ensureArray(d):1<c?m.ensureNArray(d,c):a.from?a.from:m.default(a)}function c(a,c){return function(d){d=+a(d);null!=c.step&&(d=Math.round(d/c.step)*c.step);null!=c.min&&(d=Math.max(c.min,d));null!=c.max&&(d=Math.min(c.max,d));return d}}Object.defineProperty(b,"__esModule",{value:!0});var d=a.getLogger("esri.core.accessorSupport.decorators.property");b.property=function(a){void 0===a&&(a={});return function(h,p,b){if(h===Function.prototype)throw Error("Inappropriate use of @property() on a static field: "+
h.name+"."+p+". Accessor does not support static properties.");var n=k.getOwnPropertyMetadata(h,p);b&&(b.get||b.set?(n.get=b.get||n.get,n.set=b.set||n.set):"value"in b&&("value"in a&&d.warn('@property() will redefine the value of "'+p+'" on "'+h.constructor.name+'" already defined in the metadata',a),n.value=a.value=b.value));"readOnly"in a&&(n.readOnly=a.readOnly);if(h=a.aliasOf){var r="string"===typeof h?h:h.source;h="string"===typeof h?null:!0===h.overridable;var e;n.dependsOn=[r];n.get=function(){var a=
l.default(this,r);if("function"===typeof a){e||(e=r.split(".").slice(0,-1).join("."));var c=l.default(this,e);c&&(a=a.bind(c))}return a};n.readOnly||(n.set=h?function(a){void 0!==a?this._override(p,a):this._clearOverride(p)}:function(a){g.default(this,r,a)})}h=a.type;b=a.types;n.cast||(h?n.cast=f(h):b&&(Array.isArray(b)?n.cast=m.ensureArrayTyped(m.ensureOneOfType(b[0])):n.cast=m.ensureOneOfType(b)));a.range&&(n.cast=c(n.cast,a.range));k.mergeProperty(n,a)}};b.propertyJSONMeta=function(a,c,d){a=k.getOwnPropertyMetadata(a,
d);a.json||(a.json={});a=a.json;void 0!==c&&(a.origins||(a.origins={}),a.origins[c]||(a.origins[c]={}),a=a.origins[c]);return a}})},"esri/core/accessorSupport/get":function(){define(["require","exports","./utils"],function(e,b,a){function m(f,c,d){f="?"===f[f.length-1]?f.slice(0,-1):f;if(null!=d.getItemAt||Array.isArray(d)){var h=parseInt(f,10);if(!isNaN(h))return Array.isArray(d)?d[h]:d.getItemAt(h)}h=a.getProperties(d);return c?a.isPropertyDeclared(h,f)?h.get(f):d[f]:a.isPropertyDeclared(h,f)?h.internalGet(f):
d[f]}function l(a,c,d,h){if(null==a)return a;if((a=m(c[h],d,a))||!(h<c.length-1))return h===c.length-1?a:l(a,c,d,h+1)}function k(f,c,d,h){void 0===d&&(d=!1);void 0===h&&(h=0);return"string"===typeof c&&-1===c.indexOf(".")?m(c,d,f):l(f,a.pathToArray(c),d,h)}function g(a,c){return k(a,c,!0)}Object.defineProperty(b,"__esModule",{value:!0});b.valueOf=k;b.get=g;b.exists=function(a,c){return void 0!==k(c,a,!0)};b.default=g})},"esri/core/accessorSupport/utils":function(){define(["require","exports","../handleUtils",
"../lang"],function(e,b,a,m){function l(a,c,d){return c?Object.keys(c).reduce(function(a,f){var h=null,g="merge";d&&(h=d.path?d.path+"."+f:f,g=d.policy(h));if("replace"===g)return a[f]=c[f],a;if(void 0===a[f])return a[f]=m.clone(c[f]),a;var b=a[f],g=c[f];if(b===g)return a;if(Array.isArray(g)||Array.isArray(a))b=b?Array.isArray(b)?a[f]=b.concat():a[f]=[b]:a[f]=[],g&&(Array.isArray(g)||(g=[g]),g.forEach(function(a){-1===b.indexOf(a)&&b.push(a)}));else if(g&&"object"===typeof g)if(d){var n=d.path;d.path=
h;a[f]=l(b,g,d);d.path=n}else a[f]=l(b,g,null);else if(!a.hasOwnProperty(f)||c.hasOwnProperty(f))a[f]=g;return a},a||{}):a}function k(a){return Array.isArray(a)?a:a.split(".")}function g(a){if(Array.isArray(a)||-1<a.indexOf(",")){a=Array.isArray(a)?a:a.split(",");for(var c=0;c<a.length;c++)a[c]=a[c].trim();return 1===a.length?a[0]:a}return a.trim()}Object.defineProperty(b,"__esModule",{value:!0});b.getProperties=function(a){return a?a.__accessor__?a.__accessor__:a.propertyInvalidated?a:null:null};
b.isPropertyDeclared=function(a,c){return a&&a.metadatas&&null!=a.metadatas[c]};b.merge=function(a,c,d){return d?l(a,c,{policy:d,path:""}):l(a,c,null)};b.pathToStringOrArray=function(a){return!a||"string"===typeof a&&-1===a.indexOf(".")?a:k(a)};b.pathToArray=k;b.splitPath=g;b.parseConditionalPath=function(a){if(-1===a.indexOf("?"))return null;a=k(a);for(var c=Array(a.length),d=0;d<a.length;d++){var h=a[d];c[d]="?"===h[h.length-1];c[d]&&(a[d]=h.slice(0,-1))}return{fullPath:a.join("."),conditional:c}};
b.parse=function(f,c,d,h){c=g(c);return Array.isArray(c)?(c=c.map(function(a){return h(f,a.trim(),d)}),a.handlesGroup(c)):h(f,c.trim(),d)};b.once=function(a){var c=!1;return function(){c||(c=!0,a())}}})},"esri/core/handleUtils":function(){define(["require","exports","./maybe"],function(e,b,a){function m(a){return{remove:function(){a&&(a(),a=null)}}}Object.defineProperty(b,"__esModule",{value:!0});b.handlesGroup=function(b){return m(function(){return b.forEach(function(b){return a.isSome(b)&&b.remove()})})};
b.makeHandle=m;b.refHandle=function(b){return m(function(){var e=b();a.isSome(e)&&e.remove()})};b.destroyHandle=function(a){return m(function(){return a.destroy()})};b.timeoutHandle=function(a,b){var g=setTimeout(a,b);return{remove:function(){return clearTimeout(g)}}}})},"esri/core/accessorSupport/metadata":function(){define(["require","exports","../lang","./utils"],function(e,b,a,m){function l(d){var h=d.constructor.__accessorMetadata__,f=Object.getPrototypeOf(d).constructor.__accessorMetadata__;
if(!h)Object.defineProperty(d.constructor,"__accessorMetadata__",{value:new c({}),enumerable:!1,configurable:!1,writable:!1});else if(h===f){var h=Object.create(f.properties),g;for(g in h)h[g]=a.clone(h[g]);h=new c(h);h.autoDestroy=f.autoDestroy;Object.defineProperty(d.constructor,"__accessorMetadata__",{value:h,enumerable:!1,configurable:!1,writable:!1})}return d.constructor.__accessorMetadata__}function k(a){return l(a).properties}function g(a){return d.test(a)?"replace":"merge"}function f(a){return h.test(a)?
g(a.slice(11)):"merge"}Object.defineProperty(b,"__esModule",{value:!0});var c=function(){return function(a){this.autoDestroy=!1;this.properties=a}}();b.ClassMetadata=c;b.getOwnClassMetadata=l;b.getOwnPropertiesMetadata=k;b.getOwnPropertyMetadata=function(a,c){a=k(a);var d=a[c];d||(d=a[c]={});return d};b.setPropertyMetadata=function(a,c,d){k(a)[c]=d};b.merge=function(a,c){return m.merge(a,c,f)};b.mergeProperty=function(a,c){return m.merge(a,c,g)};var d=/^[^.]+\.(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/,
h=/^properties\./})},"esri/core/accessorSupport/set":function(){define(["require","exports","../has","../Logger","./get"],function(e,b,a,m,l){function k(a,f,c){if(a&&f)if("object"===typeof f){c=0;for(var d=Object.getOwnPropertyNames(f);c<d.length;c++){var h=d[c];k(a,h,f[h])}}else-1!==f.indexOf(".")?(f=f.split("."),h=f.splice(f.length-1,1)[0],k(l.default(a,f),h,c)):a[f]=c}Object.defineProperty(b,"__esModule",{value:!0});m.getLogger("esri.core.accessorSupport.set");b.set=k;b.default=k})},"esri/core/accessorSupport/decorators/autoDestroy":function(){define(["require",
"exports","../metadata"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.autoDestroy=function(){return function(b,e){a.getOwnClassMetadata(b).autoDestroy=!0;return b[e]}}})},"esri/core/accessorSupport/decorators/cast":function(){define(["require","exports","../ensureType","../metadata"],function(e,b,a,m){function l(c){var d="__accessorMetadata__"in c?a.ensureType(c):c;return function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a.push(d);if("number"===typeof a[2])throw Error("Using @cast has parameter decorator is not supported since 4.16");
return k.apply(this,a)}}function k(a,d,h,f){m.getOwnPropertyMetadata(a,d).cast=f}function g(a){return function(c,h){m.getOwnPropertyMetadata(c,a).cast=c[h]}}Object.defineProperty(b,"__esModule",{value:!0});var f=Object.prototype.toString;b.cast=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];if(3!==a.length||"string"!==typeof a[1]){if(1===a.length&&"[object Function]"===f.call(a[0]))return l(a[0]);if(1===a.length&&"string"===typeof a[0])return g(a[0])}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require",
"exports","../../deprecate","../../has","../../Logger"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});b.declared=function(b){for(var g=[],f=1;f<arguments.length;f++)g[f-1]=arguments[f];if(0<g.length)throw Error("Multi-inheritance unsupported since 4.16");m("esri-deprecation-warnings")&&a.deprecated(l.getLogger("esri.core.accessorSupport.decorators"),"'extends declared(superclass)' syntax",{version:"4.16",see:"https://arcg.is/T8fr4"});return b}})},"esri/core/deprecate":function(){define(["require",
"exports","./has"],function(e,b,a){function m(b,g,f){void 0===f&&(f={});if(a("esri-deprecation-warnings")){var c=f.replacement,d=f.version,h=f.see;f=f.warnOnce;c&&(g+="\n\t\ud83d\udee0\ufe0f Replacement: "+c);d&&(g+="\n\t\u2699\ufe0f Version: "+d);h&&(g+="\n\t\ud83d\udd17 See "+h+" for more details.");c=g;d=f;void 0===d&&(d=!1);d&&l.has(c)||(d&&l.add(c),b.warn("\ud83d\uded1 DEPRECATED - "+c))}}Object.defineProperty(b,"__esModule",{value:!0});var l=new Set;b.deprecatedModule=function(b,g,f){void 0===
f&&(f={});a("esri-deprecation-warnings")&&m(b,"Module: "+g,f)};b.deprecatedFunction=function(b,g,f){void 0===f&&(f={});if(a("esri-deprecation-warnings")){var c=f.moduleName;m(b,"Function: "+((c?c+"::":"")+g+"()"),f)}};b.deprecatedProperty=function(b,g,f){void 0===f&&(f={});if(a("esri-deprecation-warnings")){var c=f.moduleName;m(b,"Property: "+((c?c+"::":"")+g),f)}};b.deprecated=m})},"esri/core/accessorSupport/decorators/enumeration":function(){define(["require","exports","../../jsonMap","./property"],
function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.enumeration=function(b,e){void 0===e&&(e={ignoreUnknown:!0});b=b instanceof a.JSONMap?b:new a.JSONMap(b,e);return m.property({type:e&&e.ignoreUnknown?b.apiValues:String,json:{type:b.jsonValues,read:{reader:b.read},write:{writer:b.write}}})}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","../../object","./property"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.reader=
function(b,e,g){var f,c;void 0===e||Array.isArray(e)?(c=b,g=e,f=[void 0]):(c=e,f=Array.isArray(b)?b:[b]);return function(d,h){var b=d.constructor.prototype;f.forEach(function(f){f=m.propertyJSONMeta(d,f,c);f.read&&"object"!==typeof f.read&&(f.read={});a.setDeepValue("read.reader",b[h],f);g&&(f.read.source=(f.read.source||[]).concat(g))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.shared=
function(a){return function(b,e){b[e]=a}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require","exports","tslib","../extensions","../metadata"],function(e,b,a,m,l){function k(a,c){return null==c.get?function(){return this.__accessor__?this.__accessor__.getterStatic(a,c):c.value}:function(){return this.__accessor__?this.__accessor__.getterComputed(a,c):c.value}}function g(a){var c=a.prototype,d=c.declaredClass,f=l.getOwnClassMetadata(c).properties;m.processClassMetadatas(f,
d);for(var g={},c=function(a){var c=f[a];g[a]={enumerable:!0,configurable:!0,get:k(a,c),set:function(d){var h=this.__accessor__;if(!h)Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:d});else if(!Object.isFrozen(this)){if(h.initialized&&c.readOnly)throw new TypeError("[accessor] cannot assign to read-only property '"+a+"' of "+this.declaredClass);if(2===h.lifecycle&&c.constructOnly)throw new TypeError("[accessor] cannot assign to construct-only property '"+a+"' of "+this.declaredClass);
h.set(a,d)}}}},d=0,b=Object.getOwnPropertyNames(f);d<b.length;d++)c(b[d]);Object.defineProperties(a.prototype,g)}Object.defineProperty(b,"__esModule",{value:!0});var f=new Set,c=new Set;b.subclass=function(d){return function(h){h.prototype.declaredClass=d;m.processPrototypeMetadatas(l.getOwnClassMetadata(h.prototype).properties,d);g(h);for(var b=[],p=[],r=h.prototype;r;)r.hasOwnProperty("initialize")&&!f.has(r.initialize)&&(f.add(r.initialize),b.push(r.initialize)),r.hasOwnProperty("destroy")&&!c.has(r.destroy)&&
(c.add(r.destroy),p.push(r.destroy)),r=Object.getPrototypeOf(r);f.clear();c.clear();r=function(c){function d(){for(var a=[],h=0;h<arguments.length;h++)a[h]=arguments[h];h=c.apply(this,a)||this;h.constructor===d&&"function"===typeof h.postscript&&(b.length&&Object.defineProperty(h,"initialize",{enumerable:!1,configurable:!0,value:function(){for(var a=b.length-1;0<=a;a--)b[a].call(this)}}),p.length&&Object.defineProperty(h,"destroy",{enumerable:!1,configurable:!0,value:function(){for(var a=0;a<p.length;a++)p[a].call(this)}}),
h.postscript.apply(h,a));return h}a.__extends(d,c);return d}(h);r.__accessorMetadata__=l.getOwnClassMetadata(h.prototype);r.prototype.declaredClass=d;return r}};b.processClass=g})},"esri/core/accessorSupport/extensions":function(){define(["require","exports","./extensions/computedProperty","./extensions/serializableProperty"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});var l=[a.default,m.default];b.processPrototypeMetadatas=function(a,g){for(var f=0;f<l.length;f++){var c=l[f];
if(c.processPrototypePropertyMetadata)for(var d in a)c.processPrototypePropertyMetadata(d,a[d],a,g)}};b.processClassMetadatas=function(a,g){for(var f=0;f<l.length;f++){var c=l[f];if(c.processClassPropertyMetadata)for(var d in a)c.processClassPropertyMetadata(d,a[d],a,g)}};b.instanceCreated=function(a,g){for(var f=Object.getOwnPropertyNames(g),c=0;c<l.length;c++){var d=l[c];d.instanceCreated&&d.instanceCreated(a,g,f)}}})},"esri/core/accessorSupport/extensions/computedProperty":function(){define("require exports ../../has ../../Logger ../utils ../wire".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});m.getLogger("esri.core.accessorSupport.extensions.computedProperty");b.ComputedPropertyExtension={processClassPropertyMetadata:function(a,f,c,d){f.dependsOn&&f.dependsOn.length&&(f.wire=k.create(f.dependsOn,function(c){return l.getProperties(c).propertyInvalidated(a)}))},instanceCreated:function(a,f,c){for(var d=0;d<c.length;d++){var h=f[c[d]];h.wire&&h.wire(a)}}};b.default=b.ComputedPropertyExtension})},"esri/core/accessorSupport/wire":function(){define(["require",
"exports","./utils"],function(e,b,a){function m(d,h,g){h=a.splitPath(h);if(Array.isArray(h)){for(var b=[],n=0;n<h.length;n++)b.push((new l(h[n],g)).install(d));return new f(b)}d=(new l(h,g)).install(d);return new c(d)}Object.defineProperty(b,"__esModule",{value:!0});var l=function(){function c(c,d){this.path=c;this.callback=d;this.conditional=this.chain=null;if(-1<c.indexOf(".")){if(c=a.parseConditionalPath(c))this.path=c.fullPath,this.conditional=c.conditional;this.chain=a.pathToArray(this.path)}else"?"===
c[c.length-1]&&(this.path=c.slice(0,c.length-1),this.conditional=[!0],this.chain=[this.path]);this.callback=d;return this}c.prototype.install=function(a){a=this.chain?new g(this,a):new k(this,a);return a};c.prototype.notify=function(a){this.callback(a,this.path)};return c}(),k=function(){function c(c,d){this.binding=c;this.target=d;a.getProperties(d).addCursor(this.binding.path,this)}c.prototype.destroy=function(){this.target&&(a.getProperties(this.target).removeCursor(this.binding.path,this),this.target=
this.binding=null)};c.prototype.propertyDestroyed=function(c,d){a.getProperties(this.target).removeCursor(d,this)};c.prototype.propertyInvalidated=function(){this.binding&&this.binding.notify(this.target)};c.prototype.propertyCommitted=function(){this.binding&&this.binding.notify(this.target)};return c}(),g=function(){function c(c,d){this.binding=c;this.target=d;this.stack=[];this.properties=a.getProperties(d);this.stack.push({properties:this.properties,propertyName:c.chain[0]});this.properties.addCursor(c.chain[0],
this);this.moveForward();return this}c.prototype.destroy=function(){for(;;){var a=this.stack.pop();if(null==a)break;a.properties.removeCursor(a.propertyName,this)}this.target=this.binding=null};c.prototype.propertyDestroyed=function(a,c){this.moveBackward(a,c)};c.prototype.propertyInvalidated=function(){this.binding&&this.binding.notify(this.target)};c.prototype.propertyCommitted=function(a,c){this.binding&&(this.moveBackward(a,c),this.moveForward(),this.binding.notify(this.target))};c.prototype.moveBackward=
function(a,c){for(var d=this.stack,h=d[d.length-1];h.properties!==a&&h.propertyName!==c;)h.properties.removeCursor(h.propertyName,this),d.pop(),h=d[d.length-1]};c.prototype.moveForward=function(){var c=this.stack,d=c[c.length-1];if(1!==c.length||!this.binding.conditional||!this.binding.conditional[c.length-1]||d.properties.metadatas[d.propertyName])if(d=d.properties.internalGet(d.propertyName),(d=a.getProperties(d))&&c.length<this.binding.chain.length){var f=this.binding.chain[c.length];this.binding.conditional&&
this.binding.conditional[c.length]&&!d.metadatas[f]||(this.stack.push({properties:d,propertyName:f}),d.addCursor(f,this),this.moveForward())}};return c}(),f=function(){function a(a){this.cursors=a}a.prototype.remove=function(){for(var a=this.cursors;0<a.length;)a.pop().destroy();this.cursors=null};return a}(),c=function(){function a(a){this.cursor=a}a.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return a}();b.create=function(d,h){d=a.splitPath(d);if(Array.isArray(d)){for(var g=
[],b=0;b<d.length;b++)g.push(new l(d[b],h));return function(a){for(var c=[],d=0;d<g.length;d++)c[d]=g[d].install(a);return new f(c)}}var r=new l(d,h);return function(a){return new c(r.install(a))}};b.wire=m;b.default=m})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ../ensureType ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/shorthands ./serializableProperty/writer".split(" "),function(e,b,a,m,l,k,g){function f(a,
d,h){var c=a&&a.json;a&&a.json&&a.json.origins&&h&&(a=a.json.origins[h.origin])&&("any"===d||d in a)&&(c=a);return c}Object.defineProperty(b,"__esModule",{value:!0});b.originSpecificReadPropertyDefinition=function(a,d){return f(a,"read",d)};b.originSpecificWritePropertyDefinition=function(a,d){return f(a,"write",d)};b.originSpecificPropertyDefinition=f;b.SerializablePropertyExtension={processPrototypePropertyMetadata:function(c,d){if(k.process(d)){m.process(d);for(var h=d.type,f=0;Array.isArray(h)&&
!a.isOneOf(h);)h=h[0],f++;if(d.json.origins)for(var b in d.json.origins){var r=d.json.origins[b];l.create(h,f,c,r);g.create(h,f,c,r)}l.create(h,f,c,d.json);g.create(h,f,c,d.json)}}};b.default=b.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.process=function(a){if(a.json&&a.json.origins){var b=a.json.origins,e={"web-document":["web-scene",
"web-map"]};a=function(a){if(b[a]){var f=b[a];e[a].forEach(function(a){b[a]=f});delete b[a]}};for(var k in e)a(k)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports","../../../Logger","../../../object","./type"],function(e,b,a,m,l){function k(a,f){if(1<f)return c(a,f);if(1===f)return d(a);if(h(a)){var b=d(a.prototype.itemType.Type);return function(c,d,h){return(c=b(c,d,h))?new a(c):c}}return g(a)}function g(a){return a.prototype.read?function(c,
d,h){if(null==c)return c;d=typeof c;if("object"!==d)p.error("Expected JSON value of type 'object' to deserialize type '"+a.prototype.declaredClass+"', but got '"+d+"'");else return d=new a,d.read(c,h),d}:a.fromJSON}function f(a,c,d,h){return 0!==h&&Array.isArray(c)?c.map(function(c){return f(a,c,d,h-1)}):a(c,null,d)}function c(a,c){a=g(a);var d=f.bind(null,a);return function(a,h,f){if(null==a)return a;a=d(a,f,c);h=c;for(f=a;0<h&&Array.isArray(f);)h--,f=f[0];if(void 0!==f)for(f=0;f<h;f++)a=[a];return a}}
function d(a){var c=g(a);return function(a,d,h){return null==a?a:Array.isArray(a)?a.map(function(a){return c(a,null,h)}):[c(a,null,h)]}}function h(a){return l.isCollection(a)?(a=a.prototype.itemType)&&a.Type&&"function"===typeof a.Type?n(a.Type):!1:!1}function n(a){return Array.isArray(a)?!1:!!a&&a.prototype&&("read"in a.prototype||"fromJSON"in a||h(a))}Object.defineProperty(b,"__esModule",{value:!0});var p=a.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");b.create=function(a,
c,d,h){(!h.read||!h.read.reader&&!1!==h.read.enabled)&&n(a)&&m.setDeepValue("read.reader",k(a,c),h)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.isCollection=function(a){return!!a&&a.prototype&&a.prototype.declaredClass&&0===a.prototype.declaredClass.indexOf("esri.core.Collection")}})},"esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require",
"exports"],function(e,b){function a(a){a.name&&(a.read?"object"===typeof a.read?void 0===a.read.source&&(a.read.source=a.name):a.read={source:a.name}:a.read={source:a.name},a.write?"object"===typeof a.write?void 0===a.write.target&&(a.write.target=a.name):a.write={target:a.name}:a.write={target:a.name})}function m(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 l(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)}Object.defineProperty(b,"__esModule",{value:!0});b.process=function(b){b.json||(b.json={});m(b.json);l(b.json);a(b.json);if(b.json.origins)for(var g in b.json.origins)m(b.json.origins[g]),l(b.json.origins[g]),a(b.json.origins[g]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require",
"exports","../../../object","./type"],function(e,b,a,m){function l(c,d,f,g){a.setDeepValue(f,k(c,g),d)}function k(a,c){return a&&"function"===typeof a.write?a.write({},c):a&&"function"===typeof a.toJSON?a.toJSON():"number"===typeof a?g(a):a}function g(a){return-Infinity===a?-Number.MAX_VALUE:Infinity===a?Number.MAX_VALUE:isNaN(a)?null:a}function f(c,d,f,g){null===c?c=null:c&&"function"===typeof c.map?(c=c.map(function(a){return k(a,g)}),"function"===typeof c.toArray&&(c=c.toArray())):c=[k(c,g)];a.setDeepValue(f,
c,d)}function c(a,d,f){return 0!==f&&Array.isArray(a)?a.map(function(a){return c(a,d,f-1)}):k(a,d)}function d(d){return function(f,h,g,b){if(null===f)f=null;else{f=c(f,b,d);b=d;for(var p=f;0<b&&Array.isArray(p);)b--,p=p[0];if(void 0!==p)for(p=0;p<b;p++)f=[f]}a.setDeepValue(g,f,h)}}Object.defineProperty(b,"__esModule",{value:!0});b.create=function(a,c,g,b){!b.write||b.write.writer||!1===b.write.enabled&&!b.write.overridePolicy||(1===c||m.isCollection(a)?b.write.writer=f:b.write.writer=1<c?d(c):l)};
b.numberToJSON=g})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","../../object","./property"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.writer=function(b,e,g){var f,c;void 0===e?(c=b,f=[void 0]):"string"!==typeof e?(c=b,f=[void 0],g=e):(c=e,f=Array.isArray(b)?b:[b]);return function(d,h){var b=d.constructor.prototype;f.forEach(function(f){f=m.propertyJSONMeta(d,f,c);f.write&&"object"!==typeof f.write&&(f.write={});g&&a.setDeepValue("write.target",
g,f);a.setDeepValue("write.writer",b[h],f)})}}})},"esri/core/accessorSupport/decorators/persistable":function(){define("require exports tslib ../../maybe ../../multiOriginJSONSupportUtils ../../urlUtils ../../uuid ../metadata ../PropertyOrigin ./property ../../../portal/support/resourceUtils ../../../support/persistableUrlUtils @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n){function p(d,g,b){var p=f.getOwnPropertyMetadata(g,b);return{read:function(a,c,d){a=n.read(a,c,d);
if(p.type===String)return a;if("function"===typeof p.type)return new p.type({url:a})},write:{writer:function(f,g,e,q){if(q&&q.resources){var u;u=m.isNone(f)?null:"string"===typeof f?f:f.url;u=u?n.toJSON(u,a.__assign(a.__assign({},q),{verifyItemRelativeUrls:q&&q.verifyItemRelativeUrls?{writtenUrls:q.verifyItemRelativeUrls.writtenUrls,rootPath:null}:null})):null;var w=p.type!==String&&(!l.isMultiOriginJSONMixin(this)||q&&q.origin&&this.originIdOf(b)>c.nameToId(q.origin));if(q&&q.portalItem&&m.isSome(u)&&
!k.isAbsolute(u))if(w){var w=q.portalItem.resourceFromPath(u),x=v(f,u,q),y=h.resourceContentExtension(x),B=k.getPathExtension(w.path);y!==B?r(this,b,f,u,g,e,q,d):(t(this,b,w,x,q.resources.toUpdate),g[e]=u)}else q.resources.toKeep.push({resource:q.portalItem.resourceFromPath(u)}),g[e]=u;else q&&q.portalItem&&(m.isNone(u)||m.isSome(n.itemIdFromResourceUrl(u))||k.isBlobProtocol(u)||w)?r(this,b,f,u,g,e,q,d):g[e]=u}else g[e]="string"===typeof f?n.toJSON(f,q):f.write({},q)}}}}function r(a,c,d,f,b,p,n,r){var e=
g.generateUUID();d=v(d,f,n);var u=k.join(m.get(r,"prefix"),e);r=u+"."+h.resourceContentExtension(d);var w=n.portalItem.resourceFromPath(r);k.isBlobProtocol(f)&&n.resources.pendingOperations.push(q(f).then(function(a){w.path=u+"."+h.resourceContentExtension(a);b[p]=w.itemRelativeUrl}).catch(function(){}));t(a,c,w,d,n.resources.toAdd);b[p]=w.itemRelativeUrl}function t(a,c,d,f,h){h.push({resource:d,content:f,finish:function(d){"string"===typeof a[c]?a[c]=d.url:a[c].url=d.url}})}function v(a,c,d){return"string"===
typeof a?{url:c}:new Blob([JSON.stringify(a.toJSON(d))],{type:"application/json"})}function q(c){return a.__awaiter(this,void 0,void 0,function(){var d,f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["../../../request"],a,c)})];case 1:return d=a.sent(),[4,d(c,{responseType:"blob"})];case 2:return f=a.sent().data,[2,f]}})})}Object.defineProperty(b,"__esModule",{value:!0});b.persistable=function(a){var c=m.isSome(a)&&a.origins?a.origins:[void 0];
return function(f,h){var g;a:if(m.isSome(a)&&"resource"===a.type)g=p(a,f,h);else{switch(m.isSome(a)&&a.type?a.type:"other"){case "other":g={read:!0,write:!0};break a;case "url":g={read:n.read,write:n.write};break a}g=void 0}for(var b=0;b<c.length;b++){var t=d.propertyJSONMeta(f,c[b],h),r;for(r in g)t[r]=g[r]}}}})},"esri/core/multiOriginJSONSupportUtils":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.isMultiOriginJSONMixin=function(a){return a&&
"getAtOrigin"in a&&"originOf"in a}})},"esri/core/urlUtils":function(){define("require exports tslib ../config ../kernel ./Error ./global ./Logger ./maybe ./string".split(" "),function(e,b,a,m,l,k,g,f,c,d){function h(a){var c={path:null,query:null},d=new X(a),f=a.indexOf("?");null===d.query?c.path=a:(c.path=a.substring(0,f),c.query=n(d.query));d.fragment&&(c.hash=d.fragment,null===d.query&&(c.path=c.path.substring(0,c.path.length-(d.fragment.length+1))));return c}function n(a){var c={},d=0;for(a=a.split("\x26");d<
a.length;d++){var f=a[d];if(f){var h=f.indexOf("\x3d"),g=void 0,b=void 0;0>h?(g=decodeURIComponent(f),b=""):(g=decodeURIComponent(f.slice(0,h)),b=decodeURIComponent(f.slice(h+1)));f=c[g];"string"===typeof f&&(f=c[g]=[f]);Array.isArray(f)?f.push(b):c[g]=b}}return c}function p(a){return a&&"object"===typeof a&&"toJSON"in a&&"function"===typeof a.toJSON}function r(a,c){return a?c&&"function"===typeof c?Object.keys(a).map(function(d){return encodeURIComponent(d)+"\x3d"+encodeURIComponent(c(d,a[d]))}).join("\x26"):
Object.keys(a).map(function(d){var f=a[d];if(null==f)return"";var h=encodeURIComponent(d)+"\x3d";return(d=c&&c[d])?h+encodeURIComponent(d(f)):Array.isArray(f)?f.map(function(a){return p(a)?h+encodeURIComponent(JSON.stringify(a)):h+encodeURIComponent(a)}).join("\x26"):p(f)?h+encodeURIComponent(JSON.stringify(f)):h+encodeURIComponent(f)}).filter(function(a){return a}).join("\x26"):""}function t(a){var c=a.indexOf("?");-1!==c?(ba.path=a.slice(0,c),ba.query=a.slice(c+1)):(ba.path=a,ba.query=null);return ba}
function v(a){a=t(a).path;a&&"/"===a[a.length-1]||(a+="/");a=M(a,!0);return a=a.toLowerCase()}function q(a){var c=U.proxyRules;a=v(a);for(var d=0;d<c.length;d++)if(0===a.indexOf(c[d].urlPrefix))return c[d]}function w(a){a=y(a);var c=a.indexOf("/sharing");return 0<c?a.substring(0,c):a.replace(/\/+$/,"")}function u(a,c,d){void 0===d&&(d=!1);a=N(a);c=N(c);return d||a.scheme===c.scheme?a.host.toLowerCase()===c.host.toLowerCase()&&a.port===c.port:!1}function x(a,c,d){void 0===c&&(c=b.appBaseUrl);if(F(a))return d&&
d.preserveProtocolRelative?a:"http"===b.appUrl.scheme&&b.appUrl.authority===A(a).slice(2)?"http:"+a:"https:"+a;if(!G(a)){d=z;if("/"===a[0]){var f=c.indexOf("//"),f=c.indexOf("/",f+2);c=-1===f?c:c.slice(0,f)}return d(c,a)}return a}function y(a){a=a.trim();a=x(a);if(/^https?:\/\//i.test(a)){var c=t(a);a=c.path.replace(/\/{2,}/g,"/");a=a.replace("/","//");c.query&&(a+="?"+c.query)}a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2");return a=Q(a)}function z(){for(var a=[],d=0;d<arguments.length;d++)a[d]=
arguments[d];if((d=a.filter(c.isSome))&&d.length){a=[];if(C(d[0])){var f=d[0],h=f.indexOf("//");-1!==h&&(a.push(f.slice(0,h+1)),P.test(d[0])&&(a[0]+="/"),d[0]=f.slice(h+2))}else"/"===d[0][0]&&a.push("");d=d.reduce(function(a,c){return c?a.concat(c.split("/")):a},[]);for(f=0;f<d.length;f++)h=d[f],".."===h&&0<a.length&&".."!==a[a.length-1]?a.pop():(!h&&f===d.length-1||h&&("."!==h||0===a.length))&&a.push(h);return a.join("/")}}function A(a,c){void 0===c&&(c=!1);if(B(a)||E(a))return null;var d=a.indexOf("://");
if(-1===d&&F(a))d=2;else if(-1!==d)d+=3;else return null;d=a.indexOf("/",d);-1!==d&&(a=a.slice(0,d));c&&(a=M(a,!0));return a}function C(a){return F(a)||G(a)}function B(a){return a&&"blob:"===a.slice(0,5)}function E(a){return"data:"===a.slice(0,5)}function D(a){a=I(a);if(!a||!a.isBase64)return null;a=atob(a.data);for(var c=new Uint8Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c.buffer}function I(a){return(a=a.match(ea))?{mediaType:a[1],isBase64:!!a[2],data:a[3]}:null}function J(a){var c=
D(a);if(!c)return null;a=I(a);return new Blob([c],{type:a.mediaType})}function F(a){return a&&"/"===a[0]&&"/"===a[1]}function G(a){return W.test(a)}function K(a){return da.test(a)||"http"===b.appUrl.scheme&&F(a)}function L(a){return F(a)?"https:"+a:a.replace(da,"https:")}function H(){return"https"===b.appUrl.scheme}function M(a,c){void 0===c&&(c=!1);if(F(a))return a.slice(2);a=a.replace(W,"");c&&1<a.length&&"/"===a[0]&&"/"===a[1]&&(a=a.slice(2));return a}function Q(a){var c=U.httpsDomains;if(!K(a))return a;
var f=a.indexOf("/",7),h;h=-1===f?a:a.slice(0,f);h=h.toLowerCase().slice(7);if(S.test(h))if(d.endsWith(h,":80"))h=h.slice(0,-3),a=a.replace(":80","");else return a;if("http"===b.appUrl.scheme&&h===b.appUrl.authority&&!R.test(a))return a;if(H()&&h===b.appUrl.authority||c&&c.some(function(a){return h===a||d.endsWith(h,"."+a)})||H()&&!q(a))a=L(a);return a}function N(a){if("string"===typeof a)return new X(x(a));a.scheme||(a.scheme=b.appUrl.scheme);return a}function Z(a,c,d){a=h(a);var f=a.query||{};f[c]=
String(d);return a.path+"?"+r(f)}Object.defineProperty(b,"__esModule",{value:!0});var T=f.getLogger("esri.core.urlUtils"),U=m.request,W=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,da=/^\s*http:/i,Y=/^\s*https:/i,P=/^\s*file:/i,S=/:\d+$/,R=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,V=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,fa=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,X=function(){function a(a){void 0===a&&(a="");this.uri=a;this.port=this.host=this.password=
this.user=this.fragment=this.query=this.path=this.authority=this.scheme=null;a=this.uri.match(V);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(fa),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null)}a.prototype.toString=function(){return this.uri};return a}();b.Url=X;b.appUrl=new X(m.applicationUrl);b.trustedServersUrlCache=
{};b.appBaseUrl=function(){var a=b.appUrl.path,a=a.substring(0,a.lastIndexOf(a.split("/")[a.split("/").length-1]));return""+(b.appUrl.scheme+"://"+b.appUrl.host+(null!=b.appUrl.port?":"+b.appUrl.port:""))+a}();b.urlToObject=h;b.queryToObject=n;b.objectToQuery=r;b.getProxyUrl=function(a){void 0===a&&(a=!1);var c,d=U.proxyUrl;if("string"===typeof a){if(c=a,c=Y.test(c)||"https"===b.appUrl.scheme&&F(c),a=q(a))d=a.proxyUrl}else c=!!a;if(!d)throw T.warn("esri/config: esriConfig.request.proxyUrl is not set."),
new k("urlutils:proxy-not-set","esri/config: esriConfig.request.proxyUrl is not set.");c&&H()&&(d=L(d));return h(d)};b.addProxy=function(c){var d=q(c),f,g;d&&(g=t(d.proxyUrl),f=g.path,g=g.query?n(g.query):null);f&&(d=h(c),c=f+"?"+d.path,(f=r(a.__assign(a.__assign({},g),d.query)))&&(c=c+"?"+f));return c};var ba={path:"",query:""};b.addProxyRule=function(a){a={proxyUrl:a.proxyUrl,urlPrefix:v(a.urlPrefix)};for(var c=U.proxyRules,d=a.urlPrefix,f=c.length,h=0;h<c.length;h++){var g=c[h].urlPrefix;if(0===
d.indexOf(g)){if(d.length===g.length)return-1;f=h;break}0===g.indexOf(d)&&(f=h+1)}c.splice(f,0,a);return f};b.getProxyRule=q;b.hasSamePortal=function(a,c){a=w(a);c=w(c);return M(a)===M(c)};b.getInterceptor=function(a){var c=function(c){return null==c||c instanceof RegExp&&c.test(a)||"string"===typeof c&&d.startsWith(a,c)},f=U.interceptors;if(f)for(var h=0;h<f.length;h++){var g=f[h];if(Array.isArray(g.urls)){if(g.urls.some(c))return g}else if(c(g.urls))return g}return null};b.hasSameOrigin=u;b.isTrustedServer=
function(a){if("string"===typeof a)if(C(a))a=N(a);else return!0;if(u(a,b.appUrl))return!0;for(var c=U.trustedServers||[],d=0;d<c.length;d++){var f;f=c[d];b.trustedServersUrlCache[f]||(G(f)||F(f)?b.trustedServersUrlCache[f]=[new X(x(f))]:b.trustedServersUrlCache[f]=[new X("http://"+f),new X("https://"+f)]);f=b.trustedServersUrlCache[f];for(var h=0;h<f.length;h++)if(u(a,f[h]))return!0}return!1};b.makeAbsolute=x;b.makeRelative=function(a,c,d){void 0===c&&(c=b.appBaseUrl);if(!C(a))return a;var f=y(a),
h=f.toLowerCase();c=y(c).toLowerCase().replace(/\/+$/,"");if((d=d?y(d).toLowerCase().replace(/\/+$/,""):null)&&0!==c.indexOf(d))return a;for(var g=function(a,c,d){d=a.indexOf(c,d);return-1===d?a.length:d},p=g(h,"/",h.indexOf("//")+2),n=-1;h.slice(0,p+1)===c.slice(0,p)+"/";){n=p+1;if(p===h.length)break;p=g(h,"/",p+1)}if(-1===n||d&&n<d.length)return a;a=f.slice(n);f=c.slice(n-1).replace(/[^/]+/g,"").length;if(0<f)for(h=0;h<f;h++)a="../"+a;else a="./"+a;return a};b.normalize=y;b.join=z;b.getOrigin=A;
b.isAbsolute=C;b.isBlobProtocol=B;b.isDataProtocol=E;b.dataToArrayBuffer=D;var ea=/^data:(.*?)(;base64)?,(.*)$/;b.dataComponents=I;b.makeData=function(a){return a.isBase64?"data:"+a.mediaType+";base64,"+a.data:"data:"+a.mediaType+","+a.data};b.dataToBlob=J;b.downloadDataAsFile=function(a,c){var d;a:if(d=document.createElement("a"),"download"in d){var f=null;if(g.URL&&g.URL.createObjectURL){f=J(a);if(!f){d=!1;break a}f=g.URL.createObjectURL(f)}d.download=c;d.href=f||a;d.style.display="none";document.body.appendChild(d);
d.click();document.body.removeChild(d);f&&g.URL.revokeObjectURL(f);d=void 0}else d=!1;d||window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(J(a),c)};b.isProtocolRelative=F;b.hasProtocol=G;b.toHTTP=function(a){return F(a)?"http:"+a:a.replace(Y,"http:")};b.toHTTPS=L;b.isAppHTTPS=H;b.removeFile=function(a){var c=0;if(C(a)){var d=a.indexOf("//");-1!==d&&(c=d+2)}d=a.lastIndexOf("/");return d<c?a:a.slice(0,d+1)};b.removeTrailingSlash=function(a){return a.replace(/\/+$/,"")};b.changeDomain=
function(a,c,d){if(!(c&&d&&a&&C(a)))return a;var f=a.indexOf("//"),h=a.indexOf("/",f+2),g=a.indexOf(":",f+2),h=Math.min(0>h?a.length:h,0>g?a.length:g);if(a.slice(f+2,h).toLowerCase()!==c.toLowerCase())return a;c=a.slice(0,f+2);a=a.slice(h);return""+c+d+a};b.isSVG=function(a){return ga.test(a)};b.removeQueryParameters=function(a,c){a=h(a);var d=Object.keys(a.query||{});0<d.length&&c&&c.warn("removeQueryParameters()","Url query parameters are not supported, the following parameters have been removed: "+
d.join(", ")+".");return a.path};b.addQueryParameter=Z;b.addQueryParameters=function(a,c){a=h(a);var d=a.query||{},f;for(f in c)d[f]=c[f];return(c=r(d))?a.path+"?"+c:a.path};b.removeQueryParameter=function(a,c){var d=h(a),f=d.path,d=d.query;if(!d)return a;delete d[c];return(a=r(d))?f+"?"+a:f};b.addTokenParameter=function(a){var c=l.id&&l.id.findCredential(a);return c&&c.token?Z(a,"token",c.token):a};b.getPathExtension=function(a){return c.isNone(a)?null:(a=a.match(ca))?a[1]:null};var ca=/.*?\.([^\/]*)$/,
ga=/(^data:image\/svg|\.svg$)/i})},"esri/kernel":function(){define(["require","exports","./core/has","./support/revision","@dojo/framework/shim/Promise"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.revision=m.commitHash;b.version="4.16";b.workerMessages={request:function(a,b){return(new Promise(function(a,f){e(["./request"],a,f)})).then(function(g){var f=a.options||{};f.responseType="array-buffer";f.signal=null===b||void 0===b?void 0:b.signal;return g(a.url,f)}).then(function(a){return{result:{data:a.data,
ssl:a.ssl},transferList:[a.data]}})}};b.setId=function(a){b.id=a};a("host-webworker")||console.debug("Using ArcGIS API for JavaScript "+b.version+" [Date: "+m.buildDate+", Revision: "+m.commitHash.slice(0,8)+"]")})},"esri/support/revision":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.buildDate="20200707";b.commitHash="6f2427b036ad167e94c96fa38af6b5ad63823ef9"})},"esri/core/Error":function(){define("require exports tslib ./lang ./Logger ./Message".split(" "),
function(e,b,a,m,l,k){e=function(g){function f(a,d,h){var c=g.call(this,a,d,h)||this;return c instanceof f?c:new f(a,d,h)}a.__extends(f,g);f.prototype.toJSON=function(){if(null!=this.details)try{var a=m.clone(this.details);return{name:this.name,message:this.message,details:a}}catch(d){throw l.getLogger("esri.core.Error").error(d),d;}return{name:this.name,message:this.message,details:this.details}};f.fromJSON=function(a){return new f(a.name,a.message,a.details)};return f}(k);e.prototype.type="error";
return e})},"esri/core/Message":function(){define(["require","exports","./object"],function(e,b,a){function m(b,e){return b.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(g,f){if(""===f)return"$";g=a.getDeepValue(f,e);g=null==g?"":g;if("undefined"===typeof g)throw Error('could not find key "'+f+'" in template');return g.toString()})}return function(){function a(b,g,f){this instanceof a&&(this.name=b,this.message=g&&m(g,f)||"",this.details=f)}a.prototype.toString=function(){return"["+this.name+
"]: "+this.message};return a}()})},"esri/core/uuid":function(){define(["require","exports","./global"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.generateUUID=function(){var a=m.getRandomValues(new Uint16Array(8));a[3]=a[3]&4095|16384;a[4]=a[4]&16383|32768;var b=function(g){return a[g].toString(16)};return b(0)+b(1)+"-"+b(2)+"-"+b(3)+"-"+b(4)+"-"+b(5)+b(6)+b(7)};var m=a.crypto||a.msCrypto})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require","exports"],
function(e,b){function a(a){switch(a){case "defaults":return 0;case "service":return 2;case "portal-item":return 3;case "web-scene":return 4;case "web-map":return 5;case "user":return 6}}function m(a){switch(a){case 0:return"defaults";case 2:return"service";case 3:return"portal-item";case 4:return"web-scene";case 5:return"web-map";case 6:return"user"}}Object.defineProperty(b,"__esModule",{value:!0});b.nameToId=a;b.idToName=m;b.readableNameToId=function(b){return a(b)};b.idToReadableName=function(a){return m(a)};
b.writableNameToId=function(b){return a(b)};b.idToWritableName=function(a){return m(a)}})},"esri/portal/support/resourceUtils":function(){define("require exports tslib ../../request ../../core/Error ../../core/maybe ../../core/urlUtils ../../core/urlUtils".split(" "),function(e,b,a,m,l,k,g,f){function c(a){var c=a.lastIndexOf("/");return-1===c?[".",a]:[a.slice(0,c),a.slice(c+1)]}function d(a){var d;d=f.getPathExtension(a);d=k.isNone(d)?[a,""]:[a.slice(0,a.length-d.length-1),"."+d];a=d[1];d=c(d[0]);
return[d[0],d[1],a]}function h(c){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return c instanceof Blob?[2,c]:[4,m(c.url,{responseType:"blob"})];case 1:return d=a.sent(),[2,d.data]}})})}function n(a){if(a instanceof Blob)return a.type;a=f.getPathExtension(a.url);return p[a]||v}Object.defineProperty(b,"__esModule",{value:!0});b.fetchResources=function(c,d,f){void 0===d&&(d={});return a.__awaiter(this,void 0,void 0,function(){var h,
b,p,n,t,r,e,v,q,u,w;return a.__generator(this,function(a){switch(a.label){case 0:return[4,c.load(f)];case 1:return a.sent(),h=g.join(c.itemUrl,"resources"),b=d.start,p=void 0===b?1:b,n=d.num,t=void 0===n?10:n,r=d.sortOrder,e=void 0===r?"asc":r,v=d.sortField,q=void 0===v?"created":v,u={query:{start:p,num:t,sortOrder:e,sortField:q},signal:k.get(f,"signal")},[4,c.portal._request(h,u)];case 2:return w=a.sent(),[2,{total:w.total,nextStart:w.nextStart,resources:w.resources.map(function(a){return{created:new Date(a.created),
size:a.size,resource:c.resourceFromPath(a.resource)}})}]}})})};b.addOrUpdateResource=function(d,f,b,p){return a.__awaiter(this,void 0,void 0,function(){var n,t,r,e,v,q;return a.__generator(this,function(a){switch(a.label){case 0:if(!d.hasPath())throw new l("portal-item-resource-"+f+":invalid-path","Resource does not have a valid path");return[4,d.portalItem.load(p)];case 1:return a.sent(),n=g.join(d.portalItem.userItemUrl,"add"===f?"addResources":"updateResources"),t=c(d.path),r=t[0],e=t[1],[4,h(b)];
case 2:return v=a.sent(),q=new FormData,r&&"."!==r&&q.append("resourcesPrefix",r),q.append("fileName",e),q.append("file",v,e),q.append("f","json"),k.isSome(p)&&p.access&&q.append("access",p.access),[4,d.portalItem.portal._request(n,{method:"post",body:q,signal:k.get(p,"signal")})];case 3:return a.sent(),[2,d]}})})};b.removeResource=function(c,d,f){return a.__awaiter(this,void 0,void 0,function(){var h;return a.__generator(this,function(a){switch(a.label){case 0:if(!d.hasPath())throw new l("portal-item-resources-remove:invalid-path",
"Resource does not have a valid path");return[4,c.load(f)];case 1:return a.sent(),h=g.join(c.userItemUrl,"removeResources"),[4,c.portal._request(h,{method:"post",query:{resource:d.path},signal:k.get(f,"signal")})];case 2:return a.sent(),d.portalItem=null,[2]}})})};b.removeAllResources=function(c,d){return a.__awaiter(this,void 0,void 0,function(){var f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,c.load(d)];case 1:return a.sent(),f=g.join(c.userItemUrl,"removeResources"),
[2,c.portal._request(f,{method:"post",query:{deleteAll:!0},signal:k.get(d,"signal")})]}})})};b.splitPrefixFileNameAndExtension=d;b.contentToBlob=h;b.getSiblingOfSameType=function(a,c){if(!a.hasPath())return null;var f=d(a.path);return a.portalItem.resourceFromPath(g.join(f[0],c+f[2]))};b.resourceContentType=n;b.resourceContentExtension=function(a){return r[n(a)]||q};var p={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",
svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip"},r={},t;for(t in p)r[p[t]]=t;var v="text/plain",q=r[v]})},"esri/request":function(){define("require exports tslib ./config ./kernel ./core/Error ./core/global ./core/has ./core/lang ./core/maybe ./core/promiseUtils ./core/string ./core/urlUtils ./support/requestUtils @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p,r){function t(c,g){return a.__awaiter(this,void 0,void 0,
function(){var b,n,t,r,e,v,q,k;return a.__generator(this,function(l){switch(l.label){case 0:return b=p.isDataProtocol(c),(n=p.isBlobProtocol(c))||b||(c=p.normalize(c)),t={url:c,requestOptions:a.__assign({},d.unwrap(g))},(r=p.getInterceptor(c))?[4,C(r,t)]:[3,2];case 1:e=l.sent();if(null!=e)return[2,{data:e,getHeader:Q,requestOptions:t.requestOptions,url:t.url}];r.after||r.error||(r=null);l.label=2;case 2:c=t.url;g=t.requestOptions;if("image"===g.responseType){if(f("host-webworker"))throw w("request:invalid-parameters",
Error("responseType 'image' is not supported in Web Workers or Node environment"),t);}else if(b)throw w("request:invalid-parameters",Error("Data URLs are not supported for responseType \x3d "+g.responseType),t);if("head"===g.method){if(g.body)throw w("request:invalid-parameters",Error("body parameter cannot be set when method is 'head'"),t);if(b||n)throw w("request:invalid-parameters",Error("data and blob URLs are not supported for method 'head'"),t);}return[4,u()];case 3:l.sent();if(F)return[2,F.execute(c,
g)];v=h.createAbortController();h.onAbort(g,function(){return v.abort()});q={controller:v,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:r,params:t,redoRequest:!1,useIdentity:G.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1};return[4,D(q)];case 4:return k=l.sent(),r&&r.after&&r.after(k),[2,k]}})})}function v(a){p.isBlobProtocol(a)||p.isDataProtocol(a)||(a=p.getOrigin(a))&&-1===t._corsServers.indexOf(a)&&t._corsServers.push(a)}function q(a){a=p.getOrigin(a);return!a||
n.endsWith(a,".arcgis.com")||-1!==t._corsServers.indexOf(a)||p.isTrustedServer(a)}function w(a,d,f,g){var b="Error",p={url:f.url,requestOptions:f.requestOptions,getHeader:Q,ssl:!1};if(d instanceof k)return d.details?(d.details=c.clone(d.details),d.details.url=f.url,d.details.requestOptions=f.requestOptions):d.details=p,d;if(d){f=g&&function(a){return g.headers.get(a)};var n=g&&g.status,t=d.message;t&&(b=t);f&&(p.getHeader=f);p.httpStatus=(null!=d.httpCode?d.httpCode:d.code)||n||0;p.subCode=d.subcode;
p.messageCode=d.messageCode;p.messages="string"===typeof d.details?[d.details]:d.details}return h.isAbortError(d)?h.createAbortError():new k(a,b,p)}function u(){return a.__awaiter(this,void 0,void 0,function(){var c;return a.__generator(this,function(a){switch(a.label){case 0:return f("host-webworker")?F?[3,2]:[4,new Promise(function(a,c){e(["./core/workers/request"],a,c)})]:[3,3];case 1:F=a.sent(),a.label=2;case 2:return[3,6];case 3:if(t._abortableFetch)return[3,6];if(!f("esri-abortable-fetch"))return[3,
4];t._abortableFetch=g.fetch.bind(g);return[3,6];case 4:return c=t,[4,new Promise(function(a,c){e(["whatwg-fetch"],a,c)})];case 5:c._abortableFetch=a.sent().fetch,a.label=6;case 6:return[2]}})})}function x(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return l.id?[3,2]:[4,new Promise(function(a,c){e(["./identity/IdentityManager"],a,c)})];case 1:a.sent(),a.label=2;case 2:return[2]}})})}function y(c){return a.__awaiter(this,void 0,void 0,
function(){var d,f,b,p,n,r,e,v;return a.__generator(this,function(a){switch(a.label){case 0:d=c.params.url;f=c.params.requestOptions;b=c.controller.signal;p=f.body;e=r=n=null;K&&"HTMLFormElement"in g&&(p instanceof FormData?n=p:p instanceof HTMLFormElement&&(r=p,n=new FormData(r)));"string"===typeof p&&(e=p);c.fetchOptions={cache:f.cacheBust&&!t._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:f.headers||{},method:"head"===f.method?"HEAD":"GET",mode:"cors",redirect:"follow",
signal:b};if(n||e)c.fetchOptions.body=n||e;"anonymous"===f.authMode&&(c.useIdentity=!1);c.hasToken=!!(/token=/i.test(d)||f.query&&f.query.token||n&&n.get&&n.get("token")||r&&r.elements.token);if(!c.useIdentity||c.hasToken||c.credentialToken||z(d)||h.isAborted(b))return[3,11];v=void 0;return"immediate"!==f.authMode?[3,3]:[4,x()];case 1:return a.sent(),[4,l.id.getCredential(d,{signal:b})];case 2:return v=a.sent(),c.credential=v,[3,10];case 3:return"no-prompt"!==f.authMode?[3,9]:[4,x()];case 4:a.sent(),
a.label=5;case 5:return a.trys.push([5,7,,8]),[4,l.id.getCredential(d,{prompt:!1,signal:b})];case 6:return v=a.sent(),c.credential=v,[3,8];case 7:return a.sent(),[3,8];case 8:return[3,10];case 9:l.id&&(v=l.id.findCredential(d)),a.label=10;case 10:v&&(c.credentialToken=v.token,c.useSSL=!!v.ssl),a.label=11;case 11:return[2]}})})}function z(a){return M.some(function(c){return c.test(a)})}function A(c){return a.__awaiter(this,void 0,void 0,function(){var d,g,b,n,r,e,u,k,m,y,x,z,D,C,A,I,F,M,N,Q,H,L,aa;
return a.__generator(this,function(P){switch(P.label){case 0:d=c.params.url;g=c.params.requestOptions;b=c.fetchOptions;n=p.isBlobProtocol(d)||p.isDataProtocol(d);r=g.responseType||"json";e=n?0:null!=g.timeout?g.timeout:G.timeout;u=!1;if(!n){c.useSSL&&(d=p.toHTTPS(d));g.cacheBust&&"default"===b.cache&&(d=p.addQueryParameter(d,"request.preventCache",Date.now()));k=a.__assign({},g.query);c.credentialToken&&(k.token=c.credentialToken);m=p.objectToQuery(k);f("esri-url-encodes-apostrophe")&&(m=m.replace(/'/g,
"%27"));y=d.length+1+m.length;x=void 0;u="post"===g.method||!!g.body||y>G.maxUrlLength;if(z=g.useProxy||!!p.getProxyRule(d))D=p.getProxyUrl(d),x=D.path,!u&&x.length+1+y>G.maxUrlLength&&(u=!0),D.query&&(k=a.__assign(a.__assign({},D.query),k));if("HEAD"===b.method&&(u||z)){if(u){if(y>G.maxUrlLength)throw w("request:invalid-parameters",Error("URL exceeds maximum length"),c.params);throw w("request:invalid-parameters",Error("cannot use POST request when method is 'head'"),c.params);}if(z)throw w("request:invalid-parameters",
Error("cannot use proxy when method is 'head'"),c.params);}u?(b.method="POST",g.body?d=p.addQueryParameters(d,k):(b.body=p.objectToQuery(k),b.headers["Content-Type"]="application/x-www-form-urlencoded")):d=p.addQueryParameters(d,k);z&&(c.useProxy=!0,d=x+"?"+d);k.token&&K&&b.body instanceof FormData&&(C=b.body,C.set?C.set("token",k.token):C.append("token",k.token));g.hasOwnProperty("withCredentials")?c.withCredentials=g.withCredentials:p.isTrustedServer(d)?c.withCredentials=!0:l.id&&(A=l.id.findServerInfo(d))&&
A.webTierAuth&&(c.withCredentials=!0);c.withCredentials&&(b.credentials="include")}I=0;F=!1;0<e&&(I=setTimeout(function(){F=!0;c.controller.abort()},e));P.label=1;case 1:return P.trys.push([1,18,19,20]),"image"!==g.responseType||"default"!==b.cache||"GET"!==b.method||u||B(g.headers)||!n&&!c.useProxy&&G.proxyUrl&&!q(d)?[3,3]:[4,J(d,c)];case 2:return N=P.sent(),[3,17];case 3:return[4,t._abortableFetch(d,b)];case 4:M=P.sent();c.useProxy||v(d);if(!M.ok||"HEAD"===b.method)return[3,17];Q=r;switch(Q){case "array-buffer":return[3,
5];case "blob":return[3,7];case "image":return[3,7]}return[3,9];case 5:return[4,M.arrayBuffer()];case 6:return N=P.sent(),[3,11];case 7:return[4,M.blob()];case 8:return N=P.sent(),[3,11];case 9:return[4,M.text()];case 10:return N=P.sent(),[3,11];case 11:I&&(clearTimeout(I),I=0);if("json"===r||"xml"===r||"document"===r)if(N)switch(r){case "json":N=JSON.parse(N);break;case "xml":N=E(N,"application/xml");break;case "document":N=E(N,"text/html")}else N=null;if(!N)return[3,17];if("array-buffer"!==r&&"blob"!==
r)return[3,15];H=M.headers.get("Content-Type");if(!(/application\/json|text\/plain/i.test(H)&&750>=N["blob"===r?"size":"byteLength"]))return[3,15];P.label=12;case 12:return P.trys.push([12,14,,15]),[4,(new Response(N)).json()];case 13:return L=P.sent(),L.error&&(N=L),[3,15];case 14:return P.sent(),[3,15];case 15:return"image"===r&&N instanceof Blob?[4,J(URL.createObjectURL(N),c,!0)]:[3,17];case 16:N=P.sent(),P.label=17;case 17:return[3,20];case 18:aa=P.sent();if("AbortError"===aa.name){if(F)throw Error("Timeout exceeded");
throw h.createAbortError("Request canceled");}if(!M&&aa instanceof TypeError&&G.proxyUrl&&!g.body&&"post"!==g.method&&"head"!==g.method&&!c.useProxy)c.redoRequest=!0,p.addProxyRule({proxyUrl:G.proxyUrl,urlPrefix:p.removeFile(p.urlToObject(d).path)});else throw aa;return[3,20];case 19:return I&&clearTimeout(I),[7];case 20:return[2,[M,N]]}})})}function C(c,d){return a.__awaiter(this,void 0,void 0,function(){var f,h,g;return a.__generator(this,function(b){switch(b.label){case 0:if(null!=c.responseData)return[2,
c.responseData];c.headers&&(d.requestOptions.headers=a.__assign(a.__assign({},d.requestOptions.headers),c.headers));c.query&&(d.requestOptions.query=a.__assign(a.__assign({},d.requestOptions.query),c.query));if(!c.before)return[3,5];h=f=void 0;b.label=1;case 1:return b.trys.push([1,3,,4]),[4,c.before(d)];case 2:return h=b.sent(),[3,4];case 3:return g=b.sent(),f=w("request:interceptor",g,d),[3,4];case 4:if(h instanceof Error||h instanceof k)f=w("request:interceptor",h,d);if(f)throw c.error&&c.error(f),
f;return[2,h];case 5:return[2]}})})}function B(a){if(a)for(var c=0,d=Object.getOwnPropertyNames(a);c<d.length;c++)if(a[d[c]])return!0;return!1}function E(a,c){var d;try{d=(new DOMParser).parseFromString(a,c)}catch(U){}if(!d||d.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return d}function D(c){return a.__awaiter(this,void 0,void 0,function(){var d,f,h,g,b,n,t,r,e,v,q;return a.__generator(this,function(a){switch(a.label){case 0:return[4,y(c)];case 1:a.sent(),
a.label=2;case 2:a.trys.push([2,8,,9]),a.label=3;case 3:return[4,A(c)];case 4:q=a.sent(),d=q[0],f=q[1],a.label=5;case 5:return[4,I(c,d,f)];case 6:if(!a.sent())return[3,3];a.label=7;case 7:return[3,9];case 8:throw h=a.sent(),g=w("request:server",h,c.params,d),g.details.ssl=c.useSSL,c.interceptor&&c.interceptor.error&&c.interceptor.error(g),g;case 9:return b=c.params.url,/\/sharing\/rest\/(accounts|portals)\/self/i.test(b)&&!c.hasToken&&!c.credentialToken&&f&&f.user&&f.user.username&&!p.isTrustedServer(b)&&
(n=p.getOrigin(b,!0))&&G.trustedServers.push(n),(t=c.credential)&&l.id&&(e=(r=l.id.findServerInfo(t.server))&&r.owningSystemUrl)&&(e=e.replace(/\/?$/,"/sharing"),(v=l.id.findCredential(e,t.userId))&&-1===l.id._getIdenticalSvcIdx(e,v)&&v.resources.unshift(e)),[2,{data:f,getHeader:d?function(a){return d.headers.get(a)}:Q,requestOptions:c.params.requestOptions,ssl:c.useSSL,url:c.params.url}]}})})}function I(d,f,h){return a.__awaiter(this,void 0,void 0,function(){var g,b,p,n,t,r,e;return a.__generator(this,
function(a){switch(a.label){case 0:if(d.redoRequest)return d.redoRequest=!1,[2,!1];if(!f)return[2,!0];if(!f.ok)throw Error("Unable to load "+f.url+" status: "+f.status);h&&h.error&&(g=c.mixin(Error(),h.error));g&&(b=Number(g.code),p=g.hasOwnProperty("subcode")?Number(g.subcode):null,n=(n=g.messageCode)&&n.toUpperCase());t=d.params.requestOptions.authMode;return 403===b&&(4===p||g.message&&-1<g.message.toLowerCase().indexOf("ssl")&&-1===g.message.toLowerCase().indexOf("permission"))?d.useSSL?[3,6]:
(d.useSSL=!0,[2,!1]):[3,1];case 1:return!d.useIdentity||"no-prompt"===t&&498!==b||-1===L.indexOf(b)||z(d.params.url)||!(403!==b||-1===H.indexOf(n)&&(null==p||2===p&&d.credentialToken))?[3,6]:[4,x()];case 2:a.sent(),a.label=3;case 3:return a.trys.push([3,5,,6]),[4,l.id.getCredential(d.params.url,{error:w("request:server",g,d.params),prompt:"no-prompt"!==t,signal:d.controller.signal,token:d.credentialToken})];case 4:return r=a.sent(),d.credential=r,d.credentialToken=r.token,d.useSSL=d.useSSL||r.ssl,
[2,!1];case 5:e=a.sent();if("no-prompt"===t)return d.credential=null,d.credentialToken=null,[2,!1];g=e;return[3,6];case 6:if(g)throw g;return[2,!0]}})})}function J(a,c,d){void 0===d&&(d=!1);var f=c.controller.signal,h=new Image;h.crossOrigin=c.withCredentials?"use-credentials":"anonymous";h.alt="";h.src=a;return r.loadImageAsync(h,a,d,f)}var F,G=m.request,K="FormData"in g,L=[499,498,403,401],H=["COM_0056","COM_0057","SB_0008"],M=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],
Q=function(){return null};t._abortableFetch=null;t._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];return t})},"esri/core/promiseUtils":function(){define("require exports tslib @dojo/framework/shim/AbortController ./clock ./Error ./events ./Logger ./maybe @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c){function d(a){return Promise.all(a)}function h(a){return new Promise(function(c,d){try{a(c,d)}catch(I){Promise.resolve().then(function(){return d(I)})}})}
function n(a){void 0===a&&(a="Aborted");return new k("AbortError",a)}function p(){return new m.default}function r(a){if(v(a))throw n();}function t(a){return c.isSome(a)?"aborted"in a?a:a.signal:a}function v(a){a=t(a);return c.isSome(a)&&a.aborted}function q(a,d){a=t(a);if(!c.isNone(a))if(a.aborted)d();else return g.once(a,"abort",function(){return d()})}function w(a){return a&&"AbortError"===a.name}function u(){var a=null,c=h(function(c,d){a={resolve:c,reject:d}});a.promise=c;return a}function x(a){if(a){if("function"!==
typeof a.forEach){var c=Object.keys(a),d=c.map(function(c){return a[c]});return x(d).then(function(a){var d={};c.forEach(function(c,f){return d[c]=a[f]});return d})}var f=y;return h(function(c){var d=[],h=a.length;0===h&&c(d);a.forEach(function(a){var g={promise:a||f(a)};d.push(g);g.promise.then(function(a){g.value=a}).catch(function(a){g.error=a}).then(function(){--h;0===h&&c(d)})})})}}function y(a){void 0===a&&(a=void 0);return Promise.resolve(a)}function z(a,c,d){void 0===c&&(c=void 0);var f=p();
q(d,function(){return f.abort()});return h(function(d,h){var g=setTimeout(function(){g=0;d(c)},a);q(f,function(){g&&(clearTimeout(g),h(n()))})})}function A(a){return a&&"object"===typeof a&&"then"in a&&"function"===typeof a.then?a:y(a)}Object.defineProperty(b,"__esModule",{value:!0});var C=f.getLogger("esri");b.all=d;b.filter=function(a,c){var f=a.slice();return d(a.map(function(a,d){return c(a,d)})).then(function(a){return f.filter(function(c,d){return a[d]})})};b.create=h;b.createAbortError=n;b.createAbortController=
p;b.throwIfAborted=r;b.isAborted=v;b.throwIfAbortError=function(a){if(w(a))throw a;};b.throwIfNotAbortError=function(a){if(!w(a))throw a;};b.onAbort=q;b.onAbortOrThrow=function(a,d){a=t(a);if(!c.isNone(a))return r(a),g.once(a,"abort",function(){return d(n())})};b.isAbortError=w;b.ignoreAbortErrors=function(a){return a.catch(function(a){if(!w(a))throw a;})};b.logOnError=function(a,d){return a.catch(function(a){w(a)||(d=c.isSome(d)?d:C,d.error(a))})};b.createDeferred=u;b.eachAlways=x;b.isThenable=function(a){return a&&
"function"===typeof a.then};b.eachAlwaysValues=function(a){return x(a).then(function(a){return a.filter(function(a){return!!a.value}).map(function(a){return a.value})})};b.first=function(a){return a&&a.length?h(function(c,d){for(var f=0;f<a.length;f++)a[f].then(c,d)}):y()};b.reject=function(a){return Promise.reject(a)};b.resolve=y;b.after=z;b.timeout=function(a,c,d,f){var h=d&&"abort"in d?d:null;null!=f||h||(f=d);var g=setTimeout(function(){g=0;h&&h.abort()},c),b=function(){throw f||new k("promiseUtils:timeout",
"The wrapped promise did not resolve within "+c+" ms");};return a.then(function(a){if(0===g)throw b();clearTimeout(g);return a},function(a){clearTimeout(g);throw 0===g?b():a;})};b.isPromiseLike=function(a){return a&&"function"===typeof a.then};b.when=A;b.debounce=function(c,d){void 0===d&&(d=-1);var f,h,g,b,t=null,r=function(){for(var e=[],v=0;v<arguments.length;v++)e[v]=arguments[v];if(f)return h=e,b&&b.reject(n()),b=u(),e=b.promise,t&&(v=t,t=null,v.abort()),e;g=b||u();b=null;if(0<d){var q=p(),w=
f=A(c.apply(void 0,a.__spreadArrays(e,[q.signal])));z(d).then(function(){f===w&&(b?q.abort():t=q)})}else f=1,f=A(c.apply(void 0,e));var e=function(){var a=h;h=g=f=t=null;null!=a&&r.apply(void 0,a)},v=f,k=g;v.then(e,e);v.then(k.resolve,k.reject);return k.promise};return r};b.createResolver=function(){var a,c,d=h(function(d,f){a=d;c=f}),f=function(c){a(c)};f.resolve=function(c){return a(c)};f.reject=function(a){return c(a)};f.timeout=function(a,c){return l.default.setTimeout(function(){return f.reject(c)},
a)};f.promise=d;return f};b.always=function(a,c){return a.then(c,c)}})},"@dojo/framework/shim/AbortController":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","./global","../has/has","./array"],e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=e("./global"),m=e("../has/has"),l=e("./array");b.ShimAbortSignal=a.default.AbortSignal;
m.default("abort-signal")||(a.default.AbortSignal=b.ShimAbortSignal=function(){function a(){this._aborted=!1;this.listeners={}}Object.defineProperty(a.prototype,"aborted",{get:function(){return this._aborted},enumerable:!0,configurable:!0});a.prototype.addEventListener=function(a,f){a in this.listeners||(this.listeners[a]=[]);this.listeners[a].push(f)};a.prototype.removeEventListener=function(a,f){if(a in this.listeners){var c=l.findIndex(this.listeners[a],function(a){return a===f});0<=c&&this.listeners[a].splice(c,
1)}};a.prototype.dispatchEvent=function(a){var f=this,c=a.type;"abort"===c&&(this._aborted=!0,"function"===typeof this.onabort&&this.onabort.call(this,a));if(!(c in this.listeners))return!1;this.listeners[c].forEach(function(c){setTimeout(function(){return c.call(f,a)},0)});return!a.preventDefault};return a}());b.ShimAbortController=a.default.AbortController;m.default("abort-controller")||(a.default.AbortController=b.ShimAbortController=function(){function a(){this.signal=new b.ShimAbortSignal}a.prototype.abort=
function(){var a;try{a=new Event("abort")}catch(f){"undefined"!==typeof document?(a=document.createEvent("Event"),a.initEvent("abort",!1,!1)):a={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(a)};return a}());b.default=b.ShimAbortController})},"@dojo/framework/shim/array":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define("require exports tslib ./global ./iterator ./number ../has/has ./support/util".split(" "),
e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=e("tslib"),m=e("./global"),l=e("./iterator"),k=e("./number"),g=e("../has/has");e=e("./support/util");if(g.default("es6-array")&&g.default("es6-array-fill"))b.from=m.default.Array.from,b.of=m.default.Array.of,b.copyWithin=e.wrapNative(m.default.Array.prototype.copyWithin),b.fill=e.wrapNative(m.default.Array.prototype.fill),b.find=e.wrapNative(m.default.Array.prototype.find),b.findIndex=e.wrapNative(m.default.Array.prototype.findIndex);
else{var f=function(a){if(isNaN(a))return 0;a=Number(a);isFinite(a)&&(a=Math.floor(a));return Math.min(Math.max(a,0),k.MAX_SAFE_INTEGER)},c=function(a){a=Number(a);return isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a},d=function(a,c){return 0>a?Math.max(c+a,0):Math.min(a,c)};b.from=function(c,d,g){if(null==c)throw new TypeError("from: requires an array-like object");d&&g&&(d=d.bind(g));g=f(c.length);var h="function"===typeof this?Object(new this(g)):Array(g);if(!l.isArrayLike(c)&&
!l.isIterable(c))return h;if(l.isArrayLike(c)){if(0===g)return[];for(var b=0;b<c.length;b++)h[b]=d?d(c[b],b):c[b]}else{b=0;try{for(var p=a.__values(c),n=p.next();!n.done;n=p.next()){var e=n.value;h[b]=d?d(e,b):e;b++}}catch(y){u={error:y}}finally{try{n&&!n.done&&(k=p.return)&&k.call(p)}finally{if(u)throw u.error;}}}void 0!==c.length&&(h.length=g);return h;var u,k};b.of=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];return Array.prototype.slice.call(a)};b.copyWithin=function(a,
g,b,r){if(null==a)throw new TypeError("copyWithin: target must be an array-like object");var h=f(a.length);g=d(c(g),h);b=d(c(b),h);r=d(void 0===r?h:c(r),h);r=Math.min(r-b,h-g);h=1;g>b&&g<b+r&&(h=-1,b+=r-1,g+=r-1);for(;0<r;)b in a?a[g]=a[b]:delete a[g],g+=h,b+=h,r--;return a};b.fill=function(a,g,b,r){var h=f(a.length);b=d(c(b),h);for(r=d(void 0===r?h:c(r),h);b<r;)a[b++]=g;return a};b.find=function(a,c,d){c=b.findIndex(a,c,d);return-1!==c?a[c]:void 0};b.findIndex=function(a,c,d){var h=f(a.length);if(!c)throw new TypeError("find: second argument must be a function");
d&&(c=c.bind(d));for(d=0;d<h;d++)if(c(a[d],d,a))return d;return-1}}g.default("es7-array")?b.includes=e.wrapNative(m.default.Array.prototype.includes):b.includes=function(a,c,d){void 0===d&&(d=0);var f;f=a.length;f=Number(f);isNaN(f)?f=0:(isFinite(f)&&(f=Math.floor(f)),f=Math.min(Math.max(f,0),k.MAX_SAFE_INTEGER));for(;d<f;++d){var h=a[d];if(c===h||c!==c&&h!==h)return!0}return!1}})},"@dojo/framework/shim/iterator":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=
e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","./Symbol","./string"],e)})(function(e,b){function a(a){return a&&"function"===typeof a[Symbol.iterator]}function m(a){return a&&"number"===typeof a.length}function l(c){if(a(c))return c[Symbol.iterator]();if(m(c))return new f(c)}Object.defineProperty(b,"__esModule",{value:!0});e("./Symbol");var k=e("./string"),g={done:!0,value:void 0},f=function(){function c(c){this._nextIndex=-1;
a(c)?this._nativeIterator=c[Symbol.iterator]():this._list=c}c.prototype.next=function(){return this._nativeIterator?this._nativeIterator.next():this._list?++this._nextIndex<this._list.length?{done:!1,value:this._list[this._nextIndex]}:g:g};c.prototype[Symbol.iterator]=function(){return this};return c}();b.ShimIterator=f;b.isIterable=a;b.isArrayLike=m;b.get=l;b.forOf=function(a,d,f){function c(){h=!0}var h=!1;if(m(a)&&"string"===typeof a)for(var g=a.length,b=0;b<g;++b){var e=a[b];if(b+1<g){var q=e.charCodeAt(0);
q>=k.HIGH_SURROGATE_MIN&&q<=k.HIGH_SURROGATE_MAX&&(e+=a[++b])}d.call(f,e,a,c);if(h)break}else if(g=l(a))for(b=g.next();!b.done;){d.call(f,b.value,a,c);if(h)break;b=g.next()}}})},"@dojo/framework/shim/number":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(["require","exports","./global"],e)})(function(e,b){function a(a){return"number"===typeof a&&l.default.isFinite(a)}
function m(b){return a(b)&&Math.floor(b)===b}Object.defineProperty(b,"__esModule",{value:!0});var l=e("./global");b.EPSILON=1;b.MAX_SAFE_INTEGER=Math.pow(2,53)-1;b.MIN_SAFE_INTEGER=-b.MAX_SAFE_INTEGER;b.isNaN=function(a){return"number"===typeof a&&l.default.isNaN(a)};b.isFinite=a;b.isInteger=m;b.isSafeInteger=function(a){return m(a)&&Math.abs(a)<=b.MAX_SAFE_INTEGER}})},"esri/core/clock":function(){define(["require","exports","./global"],function(e,b,a){function m(a){return{setTimeout:function(b,g){var f=
a.setTimeout(b,g);return{remove:function(){return a.clearTimeout(f)}}}}}Object.defineProperty(b,"__esModule",{value:!0});b.wrap=m;b.default=m(a)})},"esri/core/events":function(){define(["require","exports"],function(e,b){function a(a){return a&&("function"===typeof a.on||"function"===typeof a.addEventListener)}function m(b,e,g){if(!a(b))throw new TypeError("target is not a Evented or EventTarget object");if("on"in b)return b.on(e,g);if(Array.isArray(e)){for(var f=e.slice(),c=0;c<f.length;c++)b.addEventListener(f[c],
g);return{remove:function(){for(var a=0;a<f.length;a++)b.removeEventListener(f[a],g)}}}b.addEventListener(e,g);return{remove:function(){b.removeEventListener(e,g)}}}Object.defineProperty(b,"__esModule",{value:!0});b.isEventTarget=a;b.on=m;b.once=function(b,e,g){if(!a(b))throw new TypeError("target is not a Evented or EventTarget object");if("once"in b)return b.once(e,g);var f=m(b,e,function(a){f.remove();g.call(b,a)});return{remove:function(){f.remove()}}};b.pausable=function(a,b,g){var f=!1,c=m(a,
b,function(c){f||g.call(a,c)});return{resume:function(){f=!1},pause:function(){f=!0},remove:function(){c.remove()}}};b.ieKeyNormalizationMap={Win:"Meta",Scroll:"ScrollLock",Spacebar:" ",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Del:"Delete",Apps:"ContextMenu",Esc:"Escape",Multiply:"*",Add:"+",Subtract:"-",Decimal:".",Divide:"/"};b.eventKey=function(a){a=a.key;return b.ieKeyNormalizationMap[a]||a}})},"esri/support/requestUtils":function(){define(["require","exports","../core/has",
"../core/maybe","../core/promiseUtils"],function(e,b,a,m,l){function k(){try{return new DOMException("Aborted","AbortError")}catch(f){var a=Error();a.name="AbortError";return a}}Object.defineProperty(b,"__esModule",{value:!0});b.loadImageAsync=function(g,f,c,d){void 0===c&&(c=!1);return l.create(function(h,b){if(l.isAborted(d))b(k());else{var p=function(){e();b(Error("Unable to load "+f))},n=function(){var a=g;e();h(a)},t=function(){if(g){var a=g;e();a.src="";b(k())}},e=function(){a("esri-image-decode")||
(g.removeEventListener("error",p),g.removeEventListener("load",n));g=n=p=null;m.isSome(d)&&d.removeEventListener("abort",t);t=null;c&&URL.revokeObjectURL(f)};m.isSome(d)&&d.addEventListener("abort",t);a("esri-image-decode")?g.decode().then(n,p):(g.addEventListener("error",p),g.addEventListener("load",n))}})}})},"esri/support/persistableUrlUtils":function(){define(["require","exports","../core/maybe","../core/urlUtils"],function(e,b,a,m){function l(a,f){var d=f&&f.url&&f.url.path;a&&d&&(a=m.makeAbsolute(a,
d,{preserveProtocolRelative:!0}),f.portalItem&&f.readResourcePaths&&(d=m.makeRelative(a,f.portalItem.itemUrl),c.test(d)&&f.readResourcePaths.push(f.portalItem.resourceFromPath(d).path)));return g(a,f&&f.portal)}function k(a,c){if(!a)return a;!m.isAbsolute(a)&&c&&c.blockedRelativeUrls&&c.blockedRelativeUrls.push(a);var d=m.makeAbsolute(a);if(c){var f=c.verifyItemRelativeUrls&&c.verifyItemRelativeUrls.rootPath||c.url&&c.url.path;f&&(f=g(f,c.portal),d=m.makeRelative(g(d,c.portal),f,f),d!==a&&c.verifyItemRelativeUrls&&
c.verifyItemRelativeUrls.writtenUrls.push(d))}a=d;d=(c=c&&c.portal)&&!c.isPortal&&c.urlKey&&c.customBaseUrl?m.changeDomain(a,c.urlKey+"."+c.customBaseUrl,c.portalHostname):a;m.isAbsolute(d)&&(d=m.normalize(d));return d}function g(a,c){if(!c||c.isPortal||!c.urlKey||!c.customBaseUrl)return a;var d=c.urlKey+"."+c.customBaseUrl;return m.hasSameOrigin(m.appUrl,m.appUrl.scheme+"://"+d)?m.changeDomain(a,c.portalHostname,d):m.changeDomain(a,d,c.portalHostname)}Object.defineProperty(b,"__esModule",{value:!0});
b.fromJSON=l;b.toJSON=k;b.read=function(a,c,f){return l(a,f)};b.write=function(a,c,f,b){a=k(a,b);void 0!==a&&(c[f]=a)};var f=/\/items\/([^\/]+)\/resources\//,c=/^\.\/resources\//;b.itemIdFromResourceUrl=function(c){c=a.isSome(c)?c.match(f):null;return a.isSome(c)?c[1]:null}})},"esri/geometry/Geometry":function(){define("require exports tslib ../core/JSONSupport ../core/accessorSupport/decorators ./SpatialReference".split(" "),function(e,b,a,m,l,k){return function(b){function f(){for(var a=[],d=0;d<
arguments.length;d++)a[d]=arguments[d];a=b.apply(this,a)||this;a.type=null;a.extent=null;a.hasM=!1;a.hasZ=!1;a.spatialReference=k.WGS84;return a}a.__extends(f,b);Object.defineProperty(f.prototype,"cache",{get:function(){return{}},enumerable:!0,configurable:!0});f.prototype.readSpatialReference=function(a,d){if(a instanceof k)return a;if(null!=a){var c=new k;c.read(a,d);return c}return a};f.prototype.clone=function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null};
f.prototype.clearCache=function(){this.notifyChange("cache")};f.prototype.getCacheValue=function(a){return this.cache[a]};f.prototype.setCacheValue=function(a,d){this.cache[a]=d};a.__decorate([l.property()],f.prototype,"type",void 0);a.__decorate([l.property({readOnly:!0,dependsOn:["spatialReference"]})],f.prototype,"cache",null);a.__decorate([l.property({readOnly:!0,dependsOn:["spatialReference"]})],f.prototype,"extent",void 0);a.__decorate([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],
f.prototype,"hasM",void 0);a.__decorate([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],f.prototype,"hasZ",void 0);a.__decorate([l.property({type:k,json:{write:!0}})],f.prototype,"spatialReference",void 0);a.__decorate([l.reader("spatialReference")],f.prototype,"readSpatialReference",null);return f=a.__decorate([l.subclass("esri.geometry.Geometry")],f)}(m.JSONSupport)})},"esri/core/JSONSupport":function(){define("require exports tslib ./Accessor ./accessorSupport/decorators ./accessorSupport/read ./accessorSupport/write".split(" "),
function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});b.JSONSupportMixin=function(f){f=function(c){function d(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];return c.apply(this,a)||this}a.__extends(d,c);d.prototype.read=function(a,c){k.default(this,a,c)};d.prototype.write=function(a,c){return g.default(this,a||{},c)};d.prototype.toJSON=function(a){return this.write(null,a)};d.fromJSON=function(a,c){if(a){if(a.declaredClass)throw Error("JSON object is already hydrated");
var d=new this;d.read(a,c);a=d}else a=null;return a};return d=a.__decorate([l.subclass("esri.core.JSONSupport")],d)}(f);f.prototype.toJSON.isDefaultToJSON=!0;return f};b.isJSONSupport=function(a){return a&&"read"in a&&"write"in a&&"toJSON"in a};e=function(f){function c(){return null!==f&&f.apply(this,arguments)||this}a.__extends(c,f);return c=a.__decorate([l.subclass("esri.core.JSONSupport")],c)}(b.JSONSupportMixin(m));b.JSONSupport=e})},"esri/core/Accessor":function(){define("require exports tslib ./deprecate ./Logger ./accessorSupport/decorators ./accessorSupport/get ./accessorSupport/Properties ./accessorSupport/set ./accessorSupport/testSupport ./accessorSupport/watch".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h){function n(a){var c=typeof a;if(null==a)return{value:a};if(Array.isArray(a))return{type:[a[0]],value:null};if("object"===c)return a.constructor&&a.constructor.__accessorMetadata__||a instanceof Date?{type:a.constructor,value:a}:a;if("boolean"===c)return{type:Boolean,value:a};if("string"===c)return{type:String,value:a};if("number"===c)return{type:Number,value:a};if("function"===c)return{type:a,value:null}}return function(){function b(){for(var a=[],c=0;c<arguments.length;c++)a[c]=
arguments[c];if(this.constructor===b)throw Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{enumerable:!1,value:new f.default(this)});0<a.length&&this.normalizeCtorArgs&&(this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,a));if(d.interceptor)d.interceptor.onInstanceConstruct(this)}b.createSubclass=function(c){void 0===c&&(c={});if(Array.isArray(c))throw Error("Multi-inheritance unsupported since 4.16");
var d=c.properties,f=c.declaredClass,h=c.constructor;delete c.declaredClass;delete c.properties;delete c.constructor;var b=this,g=function(c){function d(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];d=c.apply(this,a)||this;h&&h.apply(d,a);return d}a.__extends(d,c);return d}(b);g.__accessorMetadata__=b.__accessorMetadata__;var p=function(a){var d=c[a];g.prototype[a]="function"===typeof d?function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];this.inherited=function(){if(b.prototype[a])return b.prototype[a].apply(this,
c)};f=d.apply(this,c);this.inherited=null;return f}:c[a]},r;for(r in c)p(r);for(r in d)p=n(d[r]),k.property(p)(g.prototype,r);return k.subclass(f)(g)};b.prototype.postscript=function(a){var c=this.__accessor__;a=c.ctorArgs||a;c.initialize();a&&(this.set(a),c.ctorArgs=null);c.constructed();this.initialize()};b.prototype.initialize=function(){};b.prototype.destroy=function(){if(this.destroyed)try{throw Error("instance is already destroyed");}catch(r){console.warn(r.stack)}else if(h.removeTarget(this),
this.__accessor__.destroy(),d.interceptor)d.interceptor.onInstanceDestroy(this)};Object.defineProperty(b.prototype,"initialized",{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"constructed",{get:function(){return this.__accessor__&&2===this.__accessor__.lifecycle||!1},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"destroyed",{get:function(){return this.__accessor__&&this.__accessor__.destroyed||
!1},enumerable:!0,configurable:!0});b.prototype.get=function(a){return g.default(this,a)};b.prototype.hasOwnProperty=function(a){return this.__accessor__?this.__accessor__.has(a):Object.prototype.hasOwnProperty.call(this,a)};b.prototype.isInstanceOf=function(a){m.deprecatedFunction(l.getLogger(this.declaredClass),"isInstanceOf",{replacement:"Use instanceof directly",version:"4.16"});return this instanceof a};b.prototype.keys=function(){return this.__accessor__?this.__accessor__.keys():[]};b.prototype.set=
function(a,d){c.default(this,a,d);return this};b.prototype.watch=function(a,c,d){return h.default(this,a,c,d)};b.prototype._clearOverride=function(a){return this.__accessor__.clearOverride(a)};b.prototype._override=function(a,c){return this.__accessor__.override(a,c)};b.prototype._isOverridden=function(a){return this.__accessor__.isOverridden(a)};b.prototype.notifyChange=function(a){this.__accessor__.propertyInvalidated(a)};b.prototype._get=function(a){return this.__accessor__.internalGet(a)};b.prototype._set=
function(a,c){this.__accessor__.internalSet(a,c);return this};return b}()})},"esri/core/accessorSupport/Properties":function(){define("require exports ../has ../lang ../Logger ../ObjectPool ./extensions ./PropertyOrigin ./Store".split(" "),function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});l.getLogger("esri.core.accessorSupport.Properties");e=function(){function a(a){this.host=a;this._origin=6;this.ctorArgs=this.cursors=null;this.destroyed=!1;this.dirties={};this.lifecycle=
0;this.overridden=null;this.store=new c.Store;a=this.host.constructor.__accessorMetadata__;this.metadatas=a.properties;this.autoDestroy=a.autoDestroy}a.prototype.initialize=function(){this.lifecycle=1;g.instanceCreated(this.host,this.metadatas)};a.prototype.constructed=function(){this.lifecycle=2};a.prototype.destroy=function(){this.destroyed=!0;var a=this.cursors;if(a)for(var c=0,d=Object.getOwnPropertyNames(a);c<d.length;c++){var f=d[c],h=a[f];if(h){for(;0<h.length;)h.pop().propertyDestroyed(this,
f);a[f]=null}}if(this.autoDestroy)for(f in this.metadatas)(a=this.internalGet(f))&&a&&"function"===typeof a.destroy&&(a.destroy(),this.metadatas[f].nonNullable||this.internalSet(f,null))};Object.defineProperty(a.prototype,"initialized",{get:function(){return 0!==this.lifecycle},enumerable:!0,configurable:!0});a.prototype.clearOverride=function(a){this.isOverridden(a)&&(this.overridden[a]=!1,this.propertyInvalidated(a))};a.prototype.get=function(a){var c=this.metadatas[a],d=c.get;return!this.store.has(a)||
d&&this.dirties[a]?d?(c=d.call(this.host),this.store.set(a,c,1),this.propertyCommitted(a),c):c.value:this.store.get(a)};a.prototype.getterStatic=function(a,c){return this.store.has(a)?this.store.get(a):c.value};a.prototype.getterComputed=function(a,c){if(this.store.has(a)&&!this.dirties[a])return this.store.get(a);c=c.get.call(this.host);this.store.set(a,c,1);this.propertyCommitted(a);return c};a.prototype.originOf=function(a){var c=this.store.originOf(a);return void 0===c&&(a=this.metadatas[a])&&
a.hasOwnProperty("value")?"defaults":f.idToName(c)};a.prototype.has=function(a){return this.metadatas[a]?this.store.has(a):!1};a.prototype.internalGet=function(a){if(this.metadatas[a]){var c=this.store;return c.has(a)?c.get(a):this.metadatas[a].value}};a.prototype.internalSet=function(a,c){return this.setAtOrigin(a,c,this.initialized?this._origin:0)};a.prototype.setAtOrigin=function(a,c,d){if(this.metadatas[a]){var f=this.store.get(a);m.equals(c,f)&&d===this.store.originOf(a)&&this.store.has(a,d)&&
!this.isOverridden(a)||(this.propertyInvalidated(a),this.store.set(a,c,d),this.propertyCommitted(a))}};a.prototype.isOverridden=function(a){return null!=this.overridden&&!0===this.overridden[a]};a.prototype.keys=function(){return Object.keys(this.metadatas)};a.prototype.override=function(a,c){if(this.metadatas[a]){this.overridden||(this.overridden={});var f=this.metadatas[a];if(!f.nonNullable||null!=c){if(f=f.cast){c=this.cast(f,c);var f=c.valid,h=c.value;d.release(c);if(!f)return;c=h}this.overridden[a]=
!0;this.internalSet(a,c)}}};a.prototype.set=function(a,c){if(this.metadatas[a]){var f=this.metadatas[a];if(!f.nonNullable||null!=c){var h=f.set;if(f=f.cast){c=this.cast(f,c);var f=c.valid,b=c.value;d.release(c);if(!f)return;c=b}h?h.call(this.host,c):this.internalSet(a,c)}}};a.prototype.setDefaultOrigin=function(a){this._origin=f.nameToId(a)};a.prototype.getDefaultOrigin=function(){return f.idToName(this._origin)};a.prototype.propertyInvalidated=function(a){var c=this.dirties;this.isOverridden(a)||
(c[a]=!0);if(c=this.cursors&&this.cursors[a])for(var d=0;d<c.length;d++)c[d].propertyInvalidated(this,a)};a.prototype.propertyCommitted=function(a){var c=this.cursors&&this.cursors[a];this.dirties[a]=!1;if(c)for(var d=0;d<c.length;d++)c[d].propertyCommitted(this,a)};a.prototype.addCursor=function(a,c){this.cursors||(this.cursors={});var d=this.cursors[a];d||(this.cursors[a]=d=[]);d.push(c)};a.prototype.removeCursor=function(a,c){var d=this.cursors[a];this.cursors[a]&&(d.splice(d.indexOf(c),1),0===
d.length&&(this.cursors[a]=null))};a.prototype.cast=function(a,c){var f=d.acquire();f.valid=!0;f.value=c;a&&(f.value=a.call(this.host,c,f));return f};return a}();a=function(){function a(){this.value=null;this.valid=!0}a.prototype.acquire=function(){this.valid=!0};a.prototype.release=function(){this.value=null};return a}();var d=new k(a);b.default=e})},"esri/core/ObjectPool":function(){define(["require","exports","tslib"],function(e,b,a){return function(){function b(a,b,g,f,c){void 0===f&&(f=1);void 0===
c&&(c=0);this.ctor=a;this.acquireFunction=b;this.releaseFunction=g;this.allocationSize=f;this._pool=Array(c);this._initialSize=c;if(this.ctor)for(a=0;a<c;a++)this._pool[a]=new this.ctor;this.allocationSize=Math.max(f,1)}b.prototype.destroy=function(){this.prune(0)};b.prototype.acquire=function(){for(var e=[],k=0;k<arguments.length;k++)e[k]=arguments[k];k=this.ctor;if(b.test.disabled)k=new k;else{if(0===this._pool.length)for(var g=this.allocationSize,f=0;f<g;f++)this._pool[f]=new k;k=this._pool.pop()}this.acquireFunction?
this.acquireFunction.apply(this,a.__spreadArrays([k],e)):k&&k.acquire&&"function"===typeof k.acquire&&k.acquire.apply(k,e);return k};b.prototype.release=function(a){a&&!b.test.disabled&&(this.releaseFunction?this.releaseFunction(a):a&&a.release&&"function"===typeof a.release&&a.release(),this._pool.push(a))};b.prototype.prune=function(a){void 0===a&&(a=this._initialSize);if(!(a>=this._pool.length)){for(var b=a;b<this._pool.length;++b)this._dispose(this._pool[b]);this._pool.length=a}};b.prototype._dispose=
function(a){a.dispose&&"function"===typeof a.dispose&&a.dispose()};b.test={disabled:!1};return b}()})},"esri/core/accessorSupport/Store":function(){define(["require","exports","../arrayUtils","../lang"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function b(){this._values=new Map}b.prototype.clone=function(a){var g=new b;this._values.forEach(function(f,c){a&&a.has(c)||g.set(c,m.clone(f))});return g};b.prototype.get=function(a){return this._values.get(a)};b.prototype.originOf=
function(){return 6};b.prototype.keys=function(){return a.keysOfMap(this._values)};b.prototype.set=function(a,b){this._values.set(a,b)};b.prototype.delete=function(a){this._values.delete(a)};b.prototype.has=function(a){return this._values.has(a)};b.prototype.forEach=function(a){this._values.forEach(a)};return b}();b.Store=e})},"esri/core/arrayUtils":function(){define(["require","exports","@dojo/framework/shim/array","./RandomLCG"],function(e,b,a,m){function l(a,c,f,h){h=h||d;for(var b=Math.max(0,
h.last-10),g=b;g<f;++g)if(a[g]===c)return h.last=g;f=Math.min(b,f);for(g=0;g<f;++g)if(a[g]===c)return h.last=g;return-1}function k(a,c){return-1===a.indexOf(c)}function g(a,c,d){return!a.some(c.bind(null,d))}function f(a){return a}Object.defineProperty(b,"__esModule",{value:!0});b.find=a.find;b.findIndex=a.findIndex;b.from=a.from;b.includes=a.includes;b.unique=function(c,d){return d?c.filter(function(c,f,h){return a.findIndex(h,d.bind(null,c))===f}):c.filter(function(a,c,d){return d.indexOf(a)===
c})};b.equals=function(a,c,d){if(!a&&!c)return!0;if(!a||!c||a.length!==c.length)return!1;if(d)for(var f=0;f<a.length;f++){if(!d(a[f],c[f]))return!1}else for(f=0;f<a.length;f++)if(a[f]!==c[f])return!1;return!0};b.difference=function(a,c,d){var f;d?(f=c.filter(g.bind(null,a,d)),a=a.filter(g.bind(null,c,d))):(f=c.filter(k.bind(null,a)),a=a.filter(k.bind(null,c)));return{added:f,removed:a}};b.intersect=function(c,d,f){return c&&d?f?c.filter(function(c){return-1<a.findIndex(d,function(a){return f(c,a)})}):
c.filter(function(a){return-1<d.indexOf(a)}):[]};var c=!!Array.prototype.fill;b.constant=function(a,d){if(c)return Array(a).fill(d);for(var f=Array(a),h=0;h<a;h++)f[h]=d;return f};b.range=function(a,c){void 0===c&&(c=a,a=0);for(var d=Array(c-a),f=a;f<c;f++)d[f-a]=f;return d};b.binaryIndexOf=function(a,c,d){for(var f=a.length,h=0,b=f-1;h<b;){var g=h+Math.floor((b-h)/2);c>a[g]?h=g+1:b=g}b=a[h];return d?c>=a[f-1]?-1:b===c?h:h-1:b===c?h:-1};b.flatten=function(a){return a.reduce(function(a,c){return a.concat(c||
[])},[])};e=function(){return function(){this.last=0}}();b.PositionHint=e;var d=new e;b.indexOf=l;b.removeUnordered=function(a,c,d,f){var h=null==d?a.length:d;f=l(a,c,h,f);if(-1!==f)return a[f]=a[h-1],null==d&&a.pop(),c};var h=new Set;b.removeUnorderedMany=function(a,c,f,b,g,n){void 0===f&&(f=a.length);void 0===b&&(b=c.length);if(0===b||0===f)return f;h.clear();for(var p=0;p<b;++p)h.add(c[p]);g=g||d;for(p=c=Math.max(0,g.last-10);p<f;++p)if(h.has(a[p])&&(n&&n.push(a[p]),h.delete(a[p]),a[p]=a[f-1],
--f,--p,0===h.size||0===f))return h.clear(),f;for(p=0;p<c;++p)if(h.has(a[p])&&(n&&n.push(a[p]),h.delete(a[p]),a[p]=a[f-1],--f,--p,0===h.size||0===f))return h.clear(),f;h.clear();return f};b.pickRandom=function(a,c,d){var f=a.length;if(c>=f)return a.slice(0);d=(n.seed=d)?function(){return n.getFloat()}:Math.random;for(var h=new Set,b=[];b.length<c;){var g=Math.floor(d()*f);h.has(g)||(h.add(g),b.push(a[g]))}return b};b.shuffle=function(a,c){c=(n.seed=c)?function(){return n.getFloat()}:Math.random;for(var d=
a.length-1;0<d;d--){var f=Math.floor(c()*(d+1)),h=a[d];a[d]=a[f];a[f]=h}return a};var n=new m;b.keysOfMap=function(a){var c=Array(a.size),d=0;a.forEach(function(a,f){return c[d++]=f});return c};b.keysOfSet=function(a,c){void 0===c&&(c=f);var d=Array(a.size),h=0;a.forEach(function(a){return d[h++]=c(a)});return d};b.fromMapValues=function(a){if(Array.from)return Array.from(a.values());var c=Array(a.size),d=0;a.forEach(function(a){return c[d++]=a});return c};b.remove=function(a,c){var d=a.indexOf(c);
return-1!==d?(a.splice(d,1),c):null}})},"esri/core/RandomLCG":function(){define(["require","exports"],function(e,b){return function(){function a(a){void 0===a&&(a=1);this._seed=a}Object.defineProperty(a.prototype,"seed",{set:function(b){this._seed=null==b?Math.random()*a._m:b},enumerable:!0,configurable:!0});a.prototype.getInt=function(){return this._seed=(a._a*this._seed+a._c)%a._m};a.prototype.getFloat=function(){return this.getInt()/(a._m-1)};a.prototype.getIntRange=function(a,b){return Math.round(this.getFloatRange(a,
b))};a.prototype.getFloatRange=function(b,e){e-=b;var k=this.getInt()/a._m;return b+Math.floor(k*e)};a._m=2147483647;a._a=48271;a._c=0;return a}()})},"esri/core/accessorSupport/testSupport":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.interceptor=null})},"esri/core/accessorSupport/watch":function(){define("require exports ../ArrayPool ../lang ../ReentrantObjectPool ../scheduling ./get ./utils ./wire".split(" "),function(e,b,a,m,l,k,g,f,c){function d(a){w.has(a)?
u.splice(u.indexOf(a),1):w.add(a);u.push(a);x||(x=k.schedule(n))}function h(a){if(!a.removed){var c=a.callback,d=a.path,f=a.oldValue,h=a.target,b=g.valueOf(h,a.propertyPath,!0);m.equals(f,b)||(a.oldValue=b,c.call(h,b,f,d,h))}}function n(){for(var a=10;x&&a--;){x=null;var c=u;u=q.acquire();w.clear();for(var d=q.acquire(),f=0,b=c;f<b.length;f++){var g=b[f],p=g.uid;h(g);p===g.uid&&g.removed&&d.push(g)}for(f=0;f<u.length;f++)g=u[f],g.removed&&(d.push(g),w.delete(g),u.splice(f,1),--f);for(f=0;f<d.length;f++)v.pool.release(d[f]);
q.release(c);q.release(d);y.forEach(function(a){return a()})}}function p(a,h,b){var p=f.parse(a,h,b,function(a,h,b){var n=g.valueOf(a,h,!0),e,t,r=c.wire(a,h,function(a,c){a.__accessor__.destroyed||e&&e.uid!==t?p.remove():(e||(e=v.pool.acquire(a,c,n,b),t=e.uid,n=null),d(e))});return{remove:f.once(function(){r.remove();e&&(e.uid!==t||e.removed||(e.removed=!0,d(e)),e=null);p=r=n=null})}});return p}function r(a,d,h){var b=f.parse(a,d,h,function(a,d,f){var h=g.valueOf(a,d,!0),p=!1;return c.wire(a,d,function(a,
c){if(a.__accessor__.destroyed)b.remove();else if(!p){p=!0;var d=g.valueOf(a,c,!0);m.equals(h,d)||f.call(a,d,h,c,a);h=g.valueOf(a,c,!0);p=!1}})});return b}function t(a,c,d,f){void 0===f&&(f=!1);return!a.__accessor__||a.__accessor__.destroyed?{remove:function(){}}:f?r(a,c,d):p(a,c,d)}Object.defineProperty(b,"__esModule",{value:!0});var v=function(){function a(){this.uid=0;this.callback=this.oldValue=this.path=this.target=null;this.removed=!1;this.propertyPath=null}a.prototype.acquire=function(c,d,
h,b){this.target=c;this.path=d;this.oldValue=h;this.callback=b;this.propertyPath=f.pathToStringOrArray(d);this.uid=++a.uid;this.removed=!1};a.prototype.release=function(){this.target=this.path=this.propertyPath=this.callback=this.oldValue=null;this.uid=++a.uid;this.removed=!0};a.pool=new l.ReentrantObjectPool(a);a.uid=0;return a}(),q=new a,w=new Set,u=q.acquire(),x;b.dispatchTarget=function(a){for(var c=q.copy(u),d=0;d<c.length;d++){var f=c[d];f.target===a&&(h(f),w.delete(f),u.splice(u.indexOf(f),
1))}};b.removeTarget=function(a){for(var c=0;c<u.length;c++){var d=u[c];d.target===a&&(d.removed=!0)}};b.dispatch=n;var y=new Set;b.afterDispatch=function(a){y.add(a);return{remove:function(){y.delete(a)}}};b.watch=t;b.isValueInUse=function(a){return u.some(function(c){return c.oldValue===a})};b.default=t})},"esri/core/ArrayPool":function(){define(["require","exports","./ObjectPool"],function(e,b,a){function m(a){a.length=0}var l=Array.prototype.splice;e=function(){function b(f,c){void 0===f&&(f=
50);void 0===c&&(c=50);this._pool=new a(Array,void 0,m,c,f)}b.prototype.acquire=function(){return this._pool.acquire()};b.prototype.copy=function(a){var c=this.acquire();a.unshift(0,0);l.apply(c,a);a.splice(0,2);return c};b.prototype.release=function(a){this._pool.release(a)};b.prototype.prune=function(){this._pool.prune(0)};b.acquire=function(){return k.acquire()};b.copy=function(a){return k.copy(a)};b.release=function(a){return k.release(a)};b.prune=function(){k.prune()};return b}();var k=new e(100);
return e})},"esri/core/ReentrantObjectPool":function(){define(["require","exports","tslib","./ObjectPool"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a._set=new Set;return a}a.__extends(e,b);e.prototype.destroy=function(){b.prototype.destroy.call(this);this._set=null};e.prototype.acquire=function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];a=b.prototype.acquire.apply(this,a);this._set.delete(a);
return a};e.prototype.release=function(a){a&&!this._set.has(a)&&(b.prototype.release.call(this,a),this._set.add(a))};e.prototype._dispose=function(a){this._set.delete(a);b.prototype._dispose.call(this,a)};return e}(m);b.ReentrantObjectPool=e})},"esri/core/scheduling":function(){define(["require","exports","./nextTick","./PooledArray","./promiseUtils"],function(e,b,a,m,l){function k(a){void 0===a&&(a=performance.now());b.debug.rafId=null;0<w.length&&(b.debug.rafId=g());b.debug.executeFrameTasks(a)}
function g(){return b.debug.requestNextFrame?b.debug.requestNextFrame(d):d()}function f(){w.forEach(function(a){a.removed&&x.push(a)});w.removeUnorderedMany(x.data,x.length);x.clear()}function c(){for(;q.length;){var a=q.shift();a.isActive&&(a.isActive=!1,a.callback())}b.debug.willDispatch=!1}function d(){return requestAnimationFrame(k)}Object.defineProperty(b,"__esModule",{value:!0});var h=function(){return function(a){this.phases=a;this.paused=!1;this.ticks=-1;this.removed=!1}}(),n=function(){function a(a){this.callback=
a;this.isActive=!0}a.prototype.remove=function(){this.isActive=!1};return a}(),p=-1,r=0,t={time:0,deltaTime:0,elapsedFrameTime:0,frameDuration:0},v=["prepare","preRender","render","postRender","update"],q=[],w=new m,u=function(){function a(a){this._task=a}a.prototype.remove=function(){this._task.removed=!0};a.prototype.pause=function(){this._task.paused=!0};a.prototype.resume=function(){this._task.paused=!1};return a}();b.FrameTaskHandle=u;b.debug={frameTasks:w,rafId:null,requestNextFrame:null,willDispatch:!1,
clearFrameTasks:function(a){void 0===a&&(a=!1);w.forEach(function(a){a.removed=!0});a&&f()},dispatch:c,executeFrameTasks:function(a){void 0===a&&(a=performance.now());0>p&&(p=a);var c=a-p,d=0<r?r:1E3/60,b=Math.max(0,c-d);p=a;for(var h=function(f){var h=v[f];w.forEach(function(g){g.paused||g.removed||(0===f&&g.ticks++,g.phases[h]&&(t.time=a,t.deltaTime=0===g.ticks?0:c,t.elapsedFrameTime=performance.now()-a,t.frameDuration=d-b,g.phases[h].call(g,t)))})},g=0;g<v.length;g++)h(g);f()}};b.schedule=function(d){d=
new n(d);q.push(d);b.debug.willDispatch||(b.debug.willDispatch=!0,a(c));return d};b.addFrameTask=function(a){a=new h(a);w.push(a);b.debug.rafId||(p=-1,b.debug.rafId=g());return new u(a)};b.setFrameDuration=function(a){r=Math.max(0,a)};b.requestNextFrame=g;var x=new m;b.waitTicks=function(c,d){void 0===c&&(c=1);var f=l.createResolver(),b=function(){l.isAborted(d)?f.reject(l.createAbortError()):0===c?f():(--c,a(function(){return b()}))};b();return f.promise}})},"esri/core/nextTick":function(){define(["require",
"exports","./global","@dojo/framework/shim/Promise"],function(e,b,a){function m(a){k.push(a);1===k.length&&l(function(){for(var a=0,d=g;a<d.length;a++)(0,d[a])();a=k.slice();for(d=k.length=0;d<a.length;d++)(0,a[d])()})}var l=function(){return a.queueMicrotask?a.queueMicrotask:function(f){a.Promise.resolve().then(f)}}(),k=[],g=[];(function(a){a.before=function(a){g.push(a);return{remove:function(){g=g.filter(function(c){return c!==a})}}}})(m||(m={}));return m})},"esri/core/PooledArray":function(){define(["require",
"exports","tslib","./arrayUtils","./HeapSort"],function(e,b,a,m,l){return function(){function b(a){var f=this;this.data=[];this._length=0;this._allocator=null;this._deallocator=function(){};this._shrink=function(){};this._hint=new m.PositionHint;a&&(a.initialSize&&(this.data=Array(a.initialSize)),a.allocator?(this._allocator=a.allocator,this._deallocator=a.deallocator):"deallocator"in a&&(this._deallocator=a.deallocator),a.shrink&&(this._shrink=function(){f.data.length>1.5*f.length&&(f.data.length=
Math.floor(1.1*f.length))}))}b.prototype.toArray=function(){return this.data.slice(0,this.length)};b.prototype.getItemAt=function(a){if(!(0>a||a>=this._length))return this.data[a]};Object.defineProperty(b.prototype,"length",{get:function(){return this._length},set:function(a){if(a>this._length)if(this._allocator)for(;this._length<a;)this.data[this._length++]=this._allocator(this.data[this._length]);else this._length=a;else{if(this._deallocator)for(var f=a;f<this._length;++f)this.data[f]=this._deallocator(this.data[f]);
this._length=a;this._shrink()}},enumerable:!0,configurable:!0});b.prototype.clear=function(){this.length=0};b.prototype.prune=function(){this.clear();this.data=[]};b.prototype.push=function(a){this.data[this._length++]=a};b.prototype.pushArray=function(a,f){void 0===f&&(f=a.length);for(var c=0;c<f;c++)this.data[this._length++]=a[c]};b.prototype.fill=function(a,f){for(var c=0;c<f;c++)this.data[this._length++]=a};b.prototype.pushNew=function(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));
++this._length;return this.back()};b.prototype.pop=function(){if(0!==this.length){var a=this.data[this.length-1];--this.length;this._shrink();return a}};b.prototype.iterableRemoveMany=function(b){var f,c;return a.__generator(this,function(a){switch(a.label){case 0:f=[],c=0,a.label=1;case 1:if(!(c<this.length)||c>=this.length)return[3,4];0>m.indexOf(b.data,this.data[c],b.length,b._hint)&&f.push(this.data[c]);return[4];case 2:a.sent(),a.label=3;case 3:return++c,[3,1];case 4:return this.data=f,this._length=
this.data.length,[2]}})};b.prototype.remove=function(a){var f=m.indexOf(this.data,a,this.length,this._hint);if(-1!==f)return this.data.splice(f,1),--this.length,a};b.prototype.removeUnordered=function(a){a=m.removeUnordered(this.data,a,this.length,this._hint);void 0!==a&&--this.length;return a};b.prototype.removeUnorderedIndex=function(a){if(!(a>=this.length||0>a))return this.swapElements(a,this.length-1),this.pop()};b.prototype.removeUnorderedMany=function(a,f,c){void 0===f&&(f=a.length);this.length=
m.removeUnorderedMany(this.data,a,this.length,f,this._hint,c)};b.prototype.front=function(){if(0!==this.length)return this.data[0]};b.prototype.back=function(){if(0!==this.length)return this.data[this.length-1]};b.prototype.swapElements=function(a,f){var c;a>=this.length||f>=this.length||a===f||(c=[this.data[f],this.data[a]],this.data[a]=c[0],this.data[f]=c[1])};b.prototype.sort=function(a){l.sort(this.data,0,this.length,a)};b.prototype.iterableSort=function(a){return l.iterableSort(this.data,0,this.length,
a)};b.prototype.some=function(a,f){for(var c=0;c<this.length;++c)if(a.call(f,this.data[c],c,this.data))return!0;return!1};b.prototype.filterInPlace=function(a,f){for(var c=0,d=0;d<this._length;++d){var b=this.data[d];a.call(f,b,d,this.data)&&(this.data[d]=this.data[c],this.data[c]=b,c++)}if(this._deallocator)for(d=c;d<this._length;d++)this.data[d]=this._deallocator(this.data[d]);this._length=c;return this};b.prototype.forEach=function(a,f){for(var c=this.length,d=0;d<Math.min(this.length,c);++d)a.call(f,
this.data[d],d,this.data)};b.prototype.iterableForEach=function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:b=0,a.label=1;case 1:return b<this.length?[4,this.data[b]]:[3,4];case 2:a.sent(),a.label=3;case 3:return++b,[3,1];case 4:return[2]}})};b.prototype.map=function(a,f){for(var c=Array(this.length),d=0;d<this.length;++d)c[d]=a.call(f,this.data[d],d,this.data);return c};b.prototype.reduce=function(a,f){for(var c=0;c<this.length;++c)f=a(f,this.data[c],c,this.data);return f};
return b}()})},"esri/core/HeapSort":function(){define(["require","exports","tslib"],function(e,b,a){var m;(function(b){function e(a,c,d,b){for(var f=c,h=d>>>1,g=a[f-1];c<=h;){c=f<<1;c<d&&0>b(a[c-1],a[c])&&++c;var e=a[c-1];if(0>=b(e,g))break;a[f-1]=e;f=c}a[f-1]=g}function g(a,c){return a<c?-1:a>c?1:0}b.sort=function(a,c,d,b){void 0===c&&(c=0);void 0===d&&(d=a.length);void 0===b&&(b=g);for(var f=d>>>1;f>c;f--)e(a,f,d,b);for(var h=c+1,f=d-1;f>c;f--)d=a[c],a[c]=a[f],a[f]=d,e(a,h,f,b)};b.iterableSort=
function(f,c,d,b){var h,p,r;return a.__generator(this,function(a){switch(a.label){case 0:void 0===c&&(c=0),void 0===d&&(d=f.length),void 0===b&&(b=g),h=d>>>1,a.label=1;case 1:if(!(h>c))return[3,4];e(f,h,d,b);return[4];case 2:a.sent(),a.label=3;case 3:return h--,[3,1];case 4:p=c+1,h=d-1,a.label=5;case 5:if(!(h>c))return[3,8];r=f[c];f[c]=f[h];f[h]=r;e(f,p,h,b);return[4];case 6:a.sent(),a.label=7;case 7:return h--,[3,5];case 8:return[2]}})}})(m||(m={}));return m})},"esri/core/accessorSupport/read":function(){define("require exports tslib ./get ./utils ./extensions/serializableProperty".split(" "),
function(e,b,a,m,l,k){function g(a,d,b){void 0===b&&(b=f);if(d&&"object"===typeof d){for(var c=l.getProperties(a),h=c.metadatas,g={},e=0,v=Object.getOwnPropertyNames(d);e<v.length;e++){var q=g,w=h,u=v[e],x=d,y=b,z=k.originSpecificReadPropertyDefinition(w[u],y);z&&(!z.read||!1!==z.read.enabled&&!z.read.source)&&(q[u]=!0);for(var A=0,C=Object.getOwnPropertyNames(w);A<C.length;A++){var B=C[A],z=k.originSpecificReadPropertyDefinition(w[B],y),E;a:{E=u;var D=x;if(z&&z.read&&!1!==z.read.enabled&&z.read.source)if(z=
z.read.source,"string"===typeof z){if(z===E||-1<z.indexOf(".")&&0===z.indexOf(E)&&m.exists(z,D)){E=!0;break a}}else for(var I=0;I<z.length;I++){var J=z[I];if(J===E||-1<J.indexOf(".")&&0===J.indexOf(E)&&m.exists(J,D)){E=!0;break a}}E=!1}E&&(q[B]=!0)}}c.setDefaultOrigin(b.origin);v=0;for(q=Object.getOwnPropertyNames(g);v<q.length;v++)e=q[v],u=(w=k.originSpecificReadPropertyDefinition(h[e],b).read)&&w.source,x=void 0,x=u&&"string"===typeof u?m.valueOf(d,u):d[e],w&&w.reader&&(x=w.reader.call(a,x,d,b)),
void 0!==x&&c.set(e,x);if(!b||!b.ignoreDefaults)for(d=0,h=Object.getOwnPropertyNames(h);d<h.length;d++)e=h[d],g[e]||(v=a,q=c,w=b,u=(u=k.originSpecificPropertyDefinition(q.metadatas[e],"any",w))&&u.default,void 0!==u&&(v="function"===typeof u?u.call(v,e,w):u,void 0!==v&&q.set(e,v)));c.setDefaultOrigin("user")}}Object.defineProperty(b,"__esModule",{value:!0});var f={origin:"service"};b.read=g;b.readLoadable=function(c,d,b,g){void 0===g&&(g=f);d=a.__assign(a.__assign({},g),{messages:[]});b(d);d.messages.forEach(function(a){"warning"!==
a.type||c.loaded?g&&g.messages.push(a):c.loadWarnings.push(a)})};b.default=g})},"esri/core/accessorSupport/write":function(){define("require exports ../arrayUtils ../Error ../Logger ../promiseUtils ./PropertyOrigin ./utils ./extensions/serializableProperty".split(" "),function(e,b,a,m,l,k,g,f,c){function d(a,c,d,f,b){var h={};c.write.writer.call(a,f,h,d,b);return h}function h(c,d,f,b,h,e){if(!b||!b.write)return!1;var n=c.get(f);if(!h&&b.write.overridePolicy){var t=b.write.overridePolicy.call(c,n,
f,e);void 0!==t&&(h=t)}h||(h=b.write);if(!h||!1===h.enabled)return!1;if((null===n&&!h.allowNull||void 0===n)&&h.isRequired)return(d=new m("web-document-write:property-required","Missing value for required property '"+f+"' on '"+c.declaredClass+"'",{propertyName:f,target:c}),e)&&e.messages?e.messages.push(d):d&&!e&&p.error(d.name,d.message),!1;if(void 0===n||null===n&&!h.allowNull)return!1;t=b.default;void 0===t?n=!1:null!=b.defaultEquals?n=b.defaultEquals(n):"function"===typeof t?Array.isArray(n)?
(c=t.call(c,f,e),n=a.equals(c,n)):n=!1:n=t===n;return n?!1:void 0!==b.default?!0:!h.ignoreOrigin&&e&&e.origin&&d.store.originOf(f)<g.nameToId(e.origin)?!1:!0}function n(a,b,e){if(a&&"function"===typeof a.toJSON&&(!a.toJSON.isDefaultToJSON||!a.write))return f.merge(b,a.toJSON());var p=f.getProperties(a),n=p.metadatas,t=function(t){var r=c.originSpecificWritePropertyDefinition(n[t],e);if(!h(a,p,t,r,null,e))return"continue";var q=a.get(t),v=d(a,r,"string"===typeof r.write.target?r.write.target:t,q,e);
0<Object.keys(v).length&&(b=f.merge(b,v),e&&e.resources&&e.resources.pendingOperations&&e.resources.pendingOperations.length&&k.all(e.resources.pendingOperations).then(function(){return f.merge(b,v)}),e&&e.writtenProperties&&e.writtenProperties.push({target:a,propName:t,oldOrigin:g.idToReadableName(p.store.originOf(t)),newOrigin:e.origin}))},r;for(r in n)t(r);return b}Object.defineProperty(b,"__esModule",{value:!0});var p=l.getLogger("esri.core.accessorSupport.write");b.willPropertyWrite=function(a,
d,b,g){var e=f.getProperties(a),p=c.originSpecificWritePropertyDefinition(e.metadatas[d],g);return p?h(a,e,d,p,b,g):!1};b.write=n;b.default=n})},"esri/geometry/SpatialReference":function(){define("require exports tslib ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/spatialReferenceUtils".split(" "),function(e,b,a,m,l,k,g){e=function(f){function c(a){a=f.call(this,a)||this;a.latestWkid=null;a.wkid=null;a.wkt=null;a.imageCoordinateSystem=null;return a}a.__extends(c,f);
d=c;c.fromJSON=function(a){if(!a)return null;if(a.wkid){if(102100===a.wkid)return d.WebMercator;if(4326===a.wkid)return d.WGS84}var c=new d;c.read(a);return c};c.prototype.normalizeCtorArgs=function(a){var c;return a&&"object"===typeof a?a:(c={},c["string"===typeof a?"wkt":"wkid"]=a,c)};Object.defineProperty(c.prototype,"isWGS84",{get:function(){return g.isWGS84(this)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isWebMercator",{get:function(){return g.isWebMercator(this)},enumerable:!0,
configurable:!0});Object.defineProperty(c.prototype,"isGeographic",{get:function(){return g.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isWrappable",{get:function(){return g.isWrappable(this)},enumerable:!0,configurable:!0});c.prototype.writeWkt=function(a,c){this.wkid||(c.wkt=a)};c.prototype.clone=function(){if(this===d.WGS84)return d.WGS84;if(this===d.WebMercator)return d.WebMercator;var a=new d;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);this.imageCoordinateSystem&&(a.imageCoordinateSystem=l.clone(this.imageCoordinateSystem));return a};c.prototype.equals=function(a){if(null==a)return!1;if(this.imageCoordinateSystem||a.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==a.imageCoordinateSystem)return!1;var c=a.imageCoordinateSystem,d=c.id,c=c.referenceServiceName,
f=a.imageCoordinateSystem.geodataXform,b=this.imageCoordinateSystem;return null==d||f?JSON.stringify(b)===JSON.stringify(a.imageCoordinateSystem):c?b.id===d&&b.referenceServiceName===c:b.id===d}return g.equals(this,a)};c.prototype.toJSON=function(a){return this.write(null,a)};var d;c.GCS_NAD_1927=null;c.WGS84=null;c.WebMercator=null;a.__decorate([k.property({dependsOn:["wkid"],readOnly:!0})],c.prototype,"isWGS84",null);a.__decorate([k.property({dependsOn:["wkid"],readOnly:!0})],c.prototype,"isWebMercator",
null);a.__decorate([k.property({dependsOn:["wkid","wkt"],readOnly:!0})],c.prototype,"isGeographic",null);a.__decorate([k.property({dependsOn:["wkid"],readOnly:!0})],c.prototype,"isWrappable",null);a.__decorate([k.property({type:Number,json:{write:!0}})],c.prototype,"latestWkid",void 0);a.__decorate([k.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?!0:!1}}}}}}})],c.prototype,"wkid",void 0);a.__decorate([k.property({type:String,
json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],c.prototype,"wkt",void 0);a.__decorate([k.writer("wkt"),k.writer("web-scene","wkt")],c.prototype,"writeWkt",null);a.__decorate([k.property({type:Number,json:{write:!0}})],c.prototype,"vcsWkid",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],c.prototype,"latestVcsWkid",void 0);a.__decorate([k.property()],c.prototype,"imageCoordinateSystem",void 0);return c=d=a.__decorate([k.subclass("esri.geometry.SpatialReference")],
c)}(m.JSONSupport);e.prototype.toJSON.isDefaultToJSON=!0;e.GCS_NAD_1927=new e({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'});e.WGS84=new e(g.WGS84);e.WebMercator=new e(g.WebMercator);Object.freeze&&(Object.freeze(e.GCS_NAD_1927),Object.freeze(e.WGS84),Object.freeze(e.WebMercator));return e})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require",
"exports","../../core/string","./WKIDUnitConversion"],function(e,b,a,m){function l(a){return g(a)&&a.wkid?h[a.wkid]:null}function k(a){return g(a)&&!0===f[a.wkid]}function g(a){return null!=a&&(null!=a.wkid&&2E3<=a.wkid||null!=a.wkt)}Object.defineProperty(b,"__esModule",{value:!0});var f={102113:!0,102100:!0,3857:!0,3785:!0},c={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0};e=[-2.0037508342788905E7,2.0037508342788905E7];var d=[-2.0037508342787E7,2.0037508342787E7],h={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:e,origin:d,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:e,origin:d,
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:e,origin:d,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:e,origin:d,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}};b.equals=function(a,c){return a&&c?a===c?!0:null!=a.wkid||null!=c.wkid?a.wkid===c.wkid||k(a)&&k(c)||null!=c.latestWkid&&a.wkid===c.latestWkid||null!=a.latestWkid&&c.wkid===a.latestWkid:a.wkt&&c.wkt?a.wkt.toUpperCase()===c.wkt.toUpperCase():!1:!1};b.getInfo=l;b.isGeographic=function(a){return g(a)?a.wkid?null==m[a.wkid]:a.wkt?!!/^\s*GEOGCS/i.test(a.wkt):!1:!1};b.isWGS84=function(a){return g(a)&&4326===a.wkid};b.isWebMercator=k;b.isWrappable=function(a){return g(a)&&
!0===c[a.wkid]};b.isValid=g;b.WGS84={wkid:4326,wkt:a.replace(l({wkid:4326}).wkTemplate,{Central_Meridian:"0.0"})};b.WebMercator={wkid:102100,latestWkid:3857}})},"esri/geometry/support/WKIDUnitConversion":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define(e)})(function(){var e,b={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,
20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),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,7142:0,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,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,
8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,
8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,
9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,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,53048:0,53049:0,54090:0,54091: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,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2};for(e=2E3;2045>=e;e++)b[e]=0;for(e=2056;2065>=e;e++)b[e]=0;for(e=2067;2135>=e;e++)b[e]=0;for(e=2137;2154>=e;e++)b[e]=0;for(e=2161;2170>=e;e++)b[e]=0;for(e=2172;2193>=e;e++)b[e]=0;for(e=2195;2198>=e;e++)b[e]=0;for(e=2200;2203>=e;e++)b[e]=0;for(e=2205;2217>=e;e++)b[e]=0;for(e=2222;2224>=
e;e++)b[e]=1;for(e=2225;2250>=e;e++)b[e]=2;for(e=2251;2253>=e;e++)b[e]=1;for(e=2257;2264>=e;e++)b[e]=2;for(e=2274;2279>=e;e++)b[e]=2;for(e=2280;2282>=e;e++)b[e]=1;for(e=2283;2289>=e;e++)b[e]=2;for(e=2290;2292>=e;e++)b[e]=0;for(e=2308;2313>=e;e++)b[e]=0;for(e=2315;2491>=e;e++)b[e]=0;for(e=2494;2866>=e;e++)b[e]=0;for(e=2867;2869>=e;e++)b[e]=1;for(e=2870;2888>=e;e++)b[e]=2;for(e=2891;2895>=e;e++)b[e]=2;for(e=2896;2898>=e;e++)b[e]=1;for(e=2902;2908>=e;e++)b[e]=2;for(e=2915;2920>=e;e++)b[e]=2;for(e=2921;2923>=
e;e++)b[e]=1;for(e=2924;2930>=e;e++)b[e]=2;for(e=2931;2962>=e;e++)b[e]=0;for(e=2964;2968>=e;e++)b[e]=2;for(e=2969;2973>=e;e++)b[e]=0;for(e=2975;2991>=e;e++)b[e]=0;for(e=2995;3051>=e;e++)b[e]=0;for(e=3054;3079>=e;e++)b[e]=0;for(e=3081;3088>=e;e++)b[e]=0;for(e=3092;3101>=e;e++)b[e]=0;for(e=3106;3138>=e;e++)b[e]=0;for(e=3146;3151>=e;e++)b[e]=0;for(e=3153;3166>=e;e++)b[e]=0;for(e=3168;3172>=e;e++)b[e]=0;for(e=3174;3203>=e;e++)b[e]=0;for(e=3294;3358>=e;e++)b[e]=0;for(e=3367;3403>=e;e++)b[e]=0;for(e=3408;3416>=
e;e++)b[e]=0;for(e=3417;3438>=e;e++)b[e]=2;for(e=3441;3446>=e;e++)b[e]=2;for(e=3447;3450>=e;e++)b[e]=0;for(e=3451;3459>=e;e++)b[e]=2;for(e=3460;3478>=e;e++)b[e]=0;for(e=3554;3559>=e;e++)b[e]=0;for(e=3560;3570>=e;e++)b[e]=2;for(e=3571;3581>=e;e++)b[e]=0;for(e=3594;3597>=e;e++)b[e]=0;for(e=3601;3604>=e;e++)b[e]=0;for(e=3637;3639>=e;e++)b[e]=0;for(e=3665;3667>=e;e++)b[e]=0;for(e=3693;3695>=e;e++)b[e]=0;for(e=3701;3727>=e;e++)b[e]=0;for(e=3728;3739>=e;e++)b[e]=2;for(e=3740;3751>=e;e++)b[e]=0;for(e=3753;3760>=
e;e++)b[e]=2;for(e=3761;3773>=e;e++)b[e]=0;for(e=3775;3777>=e;e++)b[e]=0;for(e=3779;3781>=e;e++)b[e]=0;for(e=3783;3785>=e;e++)b[e]=0;for(e=3788;3791>=e;e++)b[e]=0;for(e=3797;3802>=e;e++)b[e]=0;for(e=3814;3816>=e;e++)b[e]=0;for(e=3825;3829>=e;e++)b[e]=0;for(e=3832;3841>=e;e++)b[e]=0;for(e=3844;3852>=e;e++)b[e]=0;for(e=3873;3885>=e;e++)b[e]=0;for(e=3890;3893>=e;e++)b[e]=0;for(e=3907;3912>=e;e++)b[e]=0;for(e=3942;3950>=e;e++)b[e]=0;for(e=3968;3970>=e;e++)b[e]=0;for(e=3973;3976>=e;e++)b[e]=0;for(e=3986;3989>=
e;e++)b[e]=0;for(e=3994;3997>=e;e++)b[e]=0;for(e=4048;4051>=e;e++)b[e]=0;for(e=4056;4063>=e;e++)b[e]=0;for(e=4093;4096>=e;e++)b[e]=0;for(e=4390;4398>=e;e++)b[e]=0;for(e=4399;4413>=e;e++)b[e]=2;for(e=4418;4433>=e;e++)b[e]=2;for(e=4455;4457>=e;e++)b[e]=2;for(e=4484;4489>=e;e++)b[e]=0;for(e=4491;4554>=e;e++)b[e]=0;for(e=4568;4589>=e;e++)b[e]=0;for(e=4652;4656>=e;e++)b[e]=0;for(e=4766;4800>=e;e++)b[e]=0;for(e=5014;5016>=e;e++)b[e]=0;for(e=5069;5072>=e;e++)b[e]=0;for(e=5105;5130>=e;e++)b[e]=0;for(e=5173;5188>=
e;e++)b[e]=0;for(e=5253;5259>=e;e++)b[e]=0;for(e=5269;5275>=e;e++)b[e]=0;for(e=5292;5311>=e;e++)b[e]=0;for(e=5329;5331>=e;e++)b[e]=0;for(e=5343;5349>=e;e++)b[e]=0;for(e=5355;5357>=e;e++)b[e]=0;for(e=5387;5389>=e;e++)b[e]=0;for(e=5459;5463>=e;e++)b[e]=0;for(e=5479;5482>=e;e++)b[e]=0;for(e=5518;5520>=e;e++)b[e]=0;for(e=5530;5539>=e;e++)b[e]=0;for(e=5550;5552>=e;e++)b[e]=0;for(e=5562;5583>=e;e++)b[e]=0;for(e=5623;5625>=e;e++)b[e]=2;for(e=5631;5639>=e;e++)b[e]=0;for(e=5649;5653>=e;e++)b[e]=0;for(e=5663;5680>=
e;e++)b[e]=0;for(e=5682;5685>=e;e++)b[e]=0;for(e=5875;5877>=e;e++)b[e]=0;for(e=5896;5899>=e;e++)b[e]=0;for(e=5921;5940>=e;e++)b[e]=0;for(e=6050;6125>=e;e++)b[e]=0;for(e=6244;6275>=e;e++)b[e]=0;for(e=6328;6348>=e;e++)b[e]=0;for(e=6350;6356>=e;e++)b[e]=0;for(e=6366;6372>=e;e++)b[e]=0;for(e=6381;6387>=e;e++)b[e]=0;for(e=6393;6404>=e;e++)b[e]=0;for(e=6480;6483>=e;e++)b[e]=0;for(e=6511;6514>=e;e++)b[e]=0;for(e=6579;6581>=e;e++)b[e]=0;for(e=6619;6624>=e;e++)b[e]=0;for(e=6625;6627>=e;e++)b[e]=2;for(e=6628;6632>=
e;e++)b[e]=0;for(e=6634;6637>=e;e++)b[e]=0;for(e=6669;6692>=e;e++)b[e]=0;for(e=6707;6709>=e;e++)b[e]=0;for(e=6720;6723>=e;e++)b[e]=0;for(e=6732;6738>=e;e++)b[e]=0;for(e=6931;6933>=e;e++)b[e]=0;for(e=6956;6959>=e;e++)b[e]=0;for(e=7005;7007>=e;e++)b[e]=0;for(e=7057;7070>=e;e++)b[e]=2;for(e=7074;7082>=e;e++)b[e]=0;for(e=7109;7118>=e;e++)b[e]=0;for(e=7119;7127>=e;e++)b[e]=1;for(e=7374;7376>=e;e++)b[e]=0;for(e=7528;7586>=e;e++)b[e]=0;for(e=7587;7645>=e;e++)b[e]=2;for(e=7692;7696>=e;e++)b[e]=0;for(e=7755;7787>=
e;e++)b[e]=0;for(e=7791;7795>=e;e++)b[e]=0;for(e=7799;7801>=e;e++)b[e]=0;for(e=7803;7805>=e;e++)b[e]=0;for(e=7825;7831>=e;e++)b[e]=0;for(e=7845;7859>=e;e++)b[e]=0;for(e=8013;8032>=e;e++)b[e]=0;for(e=8065;8068>=e;e++)b[e]=1;for(e=8518;8529>=e;e++)b[e]=2;for(e=8533;8536>=e;e++)b[e]=2;for(e=8538;8540>=e;e++)b[e]=2;for(e=8677;8679>=e;e++)b[e]=0;for(e=8836;8840>=e;e++)b[e]=0;for(e=8857;8859>=e;e++)b[e]=0;for(e=8908;8910>=e;e++)b[e]=0;for(e=9154;9159>=e;e++)b[e]=0;for(e=9205;9218>=e;e++)b[e]=0;for(e=9271;9273>=
e;e++)b[e]=0;for(e=20002;20032>=e;e++)b[e]=0;for(e=20062;20092>=e;e++)b[e]=0;for(e=20135;20138>=e;e++)b[e]=0;for(e=20248;20258>=e;e++)b[e]=0;for(e=20348;20358>=e;e++)b[e]=0;for(e=20436;20440>=e;e++)b[e]=0;for(e=20822;20824>=e;e++)b[e]=0;for(e=20934;20936>=e;e++)b[e]=0;for(e=21035;21037>=e;e++)b[e]=0;for(e=21095;21097>=e;e++)b[e]=0;for(e=21148;21150>=e;e++)b[e]=0;for(e=21413;21423>=e;e++)b[e]=0;for(e=21453;21463>=e;e++)b[e]=0;for(e=21473;21483>=e;e++)b[e]=0;for(e=21780;21782>=e;e++)b[e]=0;for(e=21891;21894>=
e;e++)b[e]=0;for(e=21896;21899>=e;e++)b[e]=0;for(e=22171;22177>=e;e++)b[e]=0;for(e=22181;22187>=e;e++)b[e]=0;for(e=22191;22197>=e;e++)b[e]=0;for(e=22234;22236>=e;e++)b[e]=0;for(e=22521;22525>=e;e++)b[e]=0;for(e=22991;22994>=e;e++)b[e]=0;for(e=23028;23038>=e;e++)b[e]=0;for(e=23830;23853>=e;e++)b[e]=0;for(e=23866;23872>=e;e++)b[e]=0;for(e=23877;23884>=e;e++)b[e]=0;for(e=23886;23894>=e;e++)b[e]=0;for(e=23946;23948>=e;e++)b[e]=0;for(e=24311;24313>=e;e++)b[e]=0;for(e=24342;24347>=e;e++)b[e]=0;for(e=24370;24374>=
e;e++)b[e]=10;for(e=24375;24381>=e;e++)b[e]=0;for(e=24718;24721>=e;e++)b[e]=0;for(e=24817;24821>=e;e++)b[e]=0;for(e=24877;24882>=e;e++)b[e]=0;for(e=24891;24893>=e;e++)b[e]=0;for(e=25391;25395>=e;e++)b[e]=0;for(e=25828;25838>=e;e++)b[e]=0;for(e=26191;26195>=e;e++)b[e]=0;for(e=26391;26393>=e;e++)b[e]=0;for(e=26701;26722>=e;e++)b[e]=0;for(e=26729;26799>=e;e++)b[e]=2;for(e=26801;26803>=e;e++)b[e]=2;for(e=26811;26813>=e;e++)b[e]=2;for(e=26847;26870>=e;e++)b[e]=2;for(e=26891;26899>=e;e++)b[e]=0;for(e=26901;26923>=
e;e++)b[e]=0;for(e=26929;26946>=e;e++)b[e]=0;for(e=26948;26998>=e;e++)b[e]=0;for(e=27037;27040>=e;e++)b[e]=0;for(e=27205;27232>=e;e++)b[e]=0;for(e=27258;27260>=e;e++)b[e]=0;for(e=27391;27398>=e;e++)b[e]=0;for(e=27561;27564>=e;e++)b[e]=0;for(e=27571;27574>=e;e++)b[e]=0;for(e=27581;27584>=e;e++)b[e]=0;for(e=27591;27594>=e;e++)b[e]=0;for(e=28191;28193>=e;e++)b[e]=0;for(e=28348;28358>=e;e++)b[e]=0;for(e=28402;28432>=e;e++)b[e]=0;for(e=28462;28492>=e;e++)b[e]=0;for(e=29118;29122>=e;e++)b[e]=0;for(e=29168;29172>=
e;e++)b[e]=0;for(e=29177;29185>=e;e++)b[e]=0;for(e=29187;29195>=e;e++)b[e]=0;for(e=29900;29903>=e;e++)b[e]=0;for(e=30161;30179>=e;e++)b[e]=0;for(e=30491;30494>=e;e++)b[e]=0;for(e=30729;30732>=e;e++)b[e]=0;for(e=31251;31259>=e;e++)b[e]=0;for(e=31265;31268>=e;e++)b[e]=0;for(e=31275;31279>=e;e++)b[e]=0;for(e=31281;31297>=e;e++)b[e]=0;for(e=31461;31469>=e;e++)b[e]=0;for(e=31491;31495>=e;e++)b[e]=0;for(e=31917;31922>=e;e++)b[e]=0;for(e=31965;32E3>=e;e++)b[e]=0;for(e=32001;32003>=e;e++)b[e]=2;for(e=32005;32031>=
e;e++)b[e]=2;for(e=32033;32060>=e;e++)b[e]=2;for(e=32064;32067>=e;e++)b[e]=2;for(e=32074;32077>=e;e++)b[e]=2;for(e=32081;32086>=e;e++)b[e]=0;for(e=32107;32130>=e;e++)b[e]=0;for(e=32133;32158>=e;e++)b[e]=0;for(e=32164;32167>=e;e++)b[e]=2;for(e=32180;32199>=e;e++)b[e]=0;for(e=32201;32260>=e;e++)b[e]=0;for(e=32301;32360>=e;e++)b[e]=0;for(e=32601;32662>=e;e++)b[e]=0;for(e=32664;32667>=e;e++)b[e]=2;for(e=32701;32761>=e;e++)b[e]=0;for(e=53001;53004>=e;e++)b[e]=0;for(e=53008;53019>=e;e++)b[e]=0;for(e=53021;53032>=
e;e++)b[e]=0;for(e=53034;53037>=e;e++)b[e]=0;for(e=53042;53046>=e;e++)b[e]=0;for(e=53074;53080>=e;e++)b[e]=0;for(e=54001;54004>=e;e++)b[e]=0;for(e=54008;54019>=e;e++)b[e]=0;for(e=54021;54032>=e;e++)b[e]=0;for(e=54034;54037>=e;e++)b[e]=0;for(e=54042;54046>=e;e++)b[e]=0;for(e=54048;54053>=e;e++)b[e]=0;for(e=54074;54080>=e;e++)b[e]=0;for(e=54098;54101>=e;e++)b[e]=0;for(e=102001;102040>=e;e++)b[e]=0;for(e=102042;102063>=e;e++)b[e]=0;for(e=102065;102067>=e;e++)b[e]=0;for(e=102070;102117>=e;e++)b[e]=0;
for(e=102122;102216>=e;e++)b[e]=0;for(e=102221;102377>=e;e++)b[e]=0;for(e=102382;102388>=e;e++)b[e]=0;for(e=102389;102398>=e;e++)b[e]=2;for(e=102399;102444>=e;e++)b[e]=0;for(e=102445;102447>=e;e++)b[e]=2;for(e=102448;102458>=e;e++)b[e]=0;for(e=102459;102468>=e;e++)b[e]=2;for(e=102469;102499>=e;e++)b[e]=0;for(e=102500;102519>=e;e++)b[e]=1;for(e=102520;102524>=e;e++)b[e]=0;for(e=102525;102529>=e;e++)b[e]=2;for(e=102530;102588>=e;e++)b[e]=0;for(e=102590;102598>=e;e++)b[e]=0;for(e=102601;102603>=e;e++)b[e]=
0;for(e=102605;102628>=e;e++)b[e]=0;for(e=102629;102646>=e;e++)b[e]=2;for(e=102648;102700>=e;e++)b[e]=2;for(e=102701;102703>=e;e++)b[e]=0;for(e=102707;102730>=e;e++)b[e]=2;for(e=102733;102758>=e;e++)b[e]=2;for(e=102767;102900>=e;e++)b[e]=0;for(e=102965;102969>=e;e++)b[e]=0;for(e=102971;102973>=e;e++)b[e]=0;for(e=102975;102989>=e;e++)b[e]=0;for(e=102990;102992>=e;e++)b[e]=1;for(e=102997;103002>=e;e++)b[e]=0;for(e=103003;103008>=e;e++)b[e]=2;for(e=103009;103011>=e;e++)b[e]=0;for(e=103012;103014>=e;e++)b[e]=
2;for(e=103019;103021>=e;e++)b[e]=0;for(e=103022;103024>=e;e++)b[e]=2;for(e=103029;103031>=e;e++)b[e]=0;for(e=103032;103034>=e;e++)b[e]=2;for(e=103065;103068>=e;e++)b[e]=0;for(e=103074;103076>=e;e++)b[e]=0;for(e=103077;103079>=e;e++)b[e]=1;for(e=103080;103082>=e;e++)b[e]=0;for(e=103083;103085>=e;e++)b[e]=2;for(e=103090;103093>=e;e++)b[e]=0;for(e=103097;103099>=e;e++)b[e]=0;for(e=103100;103102>=e;e++)b[e]=2;for(e=103107;103109>=e;e++)b[e]=0;for(e=103110;103112>=e;e++)b[e]=2;for(e=103113;103116>=e;e++)b[e]=
0;for(e=103117;103120>=e;e++)b[e]=2;for(e=103153;103157>=e;e++)b[e]=0;for(e=103158;103162>=e;e++)b[e]=2;for(e=103163;103165>=e;e++)b[e]=0;for(e=103166;103168>=e;e++)b[e]=1;for(e=103169;103171>=e;e++)b[e]=2;for(e=103186;103188>=e;e++)b[e]=0;for(e=103189;103191>=e;e++)b[e]=2;for(e=103192;103195>=e;e++)b[e]=0;for(e=103196;103199>=e;e++)b[e]=2;for(e=103200;103224>=e;e++)b[e]=0;for(e=103225;103227>=e;e++)b[e]=1;for(e=103232;103237>=e;e++)b[e]=0;for(e=103238;103243>=e;e++)b[e]=2;for(e=103244;103246>=e;e++)b[e]=
0;for(e=103247;103249>=e;e++)b[e]=2;for(e=103254;103256>=e;e++)b[e]=0;for(e=103257;103259>=e;e++)b[e]=2;for(e=103264;103266>=e;e++)b[e]=0;for(e=103267;103269>=e;e++)b[e]=2;for(e=103300;103375>=e;e++)b[e]=0;for(e=103381;103383>=e;e++)b[e]=0;for(e=103384;103386>=e;e++)b[e]=1;for(e=103387;103389>=e;e++)b[e]=0;for(e=103390;103392>=e;e++)b[e]=2;for(e=103397;103399>=e;e++)b[e]=0;for(e=103400;103471>=e;e++)b[e]=2;for(e=103476;103478>=e;e++)b[e]=0;for(e=103479;103481>=e;e++)b[e]=2;for(e=103486;103488>=e;e++)b[e]=
0;for(e=103489;103491>=e;e++)b[e]=2;for(e=103492;103495>=e;e++)b[e]=0;for(e=103496;103499>=e;e++)b[e]=2;for(e=103528;103543>=e;e++)b[e]=0;for(e=103544;103548>=e;e++)b[e]=2;for(e=103549;103551>=e;e++)b[e]=0;for(e=103552;103554>=e;e++)b[e]=1;for(e=103555;103557>=e;e++)b[e]=2;for(e=103558;103560>=e;e++)b[e]=0;for(e=103571;103573>=e;e++)b[e]=0;for(e=103574;103576>=e;e++)b[e]=2;for(e=103577;103580>=e;e++)b[e]=0;for(e=103581;103583>=e;e++)b[e]=2;for(e=103595;103598>=e;e++)b[e]=0;for(e=103600;103694>=e;e++)b[e]=
0;for(e=103696;103699>=e;e++)b[e]=0;for(e=103700;103793>=e;e++)b[e]=2;for(e=103794;103871>=e;e++)b[e]=0;for(e=103900;103971>=e;e++)b[e]=2;return b})},"esri/geometry/Point":function(){define("require exports tslib ../core/Logger ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ./Geometry ./SpatialReference ./support/offset ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){function n(a){return a&&("esri.geometry.SpatialReference"===
a.declaredClass||null!=a.wkid)}var p=[0,0],r=m.getLogger("esri.geometry.Point");e=function(b){function g(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a.x=0;a.y=0;a.z=void 0;a.m=void 0;a.type="point";return a}a.__extends(g,b);e=g;g.copy=function(a,c){c._set("x",a._get("x"));c._set("y",a._get("y"));c._set("z",a._get("z"));c._set("m",a._get("m"));a=a._get("spatialReference");c._set("spatialReference",Object.isFrozen(a)?a:a.clone())};g.distance=function(a,c){var d=
a.x-c.x,f=a.y-c.y;a=a.hasZ&&c.hasZ?a.z-c.z:0;return Math.sqrt(d*d+f*f+a*a)};g.prototype.normalizeCtorArgs=function(a,c,d,b,g){var e;if(Array.isArray(a))e=a,g=c,a=e[0],c=e[1],d=e[2],b=e[3];else if(a&&"object"===typeof a){if(e=a,a=null!=e.x?e.x:e.longitude,c=null!=e.y?e.y:e.latitude,d=null!=e.z?e.z:e.altitude,b=e.m,(g=e.spatialReference)&&"esri.geometry.SpatialReference"!==g.declaredClass&&(g=new f(g)),null!=e.longitude||null!=e.latitude)null==e.longitude?r.warn(".longitude\x3d","Latitude was defined without longitude"):
null==e.latitude?r.warn(".latitude\x3d","Longitude was defined without latitude"):!e.declaredClass&&g&&g.isWebMercator&&(c=h.lngLatToXY(e.longitude,e.latitude,p),a=c[0],c=c[1])}else n(d)?(g=d,d=null):n(b)&&(g=b,b=null);a={x:a,y:c};null==a.x&&null!=a.y?r.warn(".y\x3d","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&r.warn(".x\x3d","X coordinate was defined without a Y coordinate");null!=g&&(a.spatialReference=g);null!=d&&(a.z=d);null!=b&&(a.m=b);return a};Object.defineProperty(g.prototype,
"hasM",{get:function(){return void 0!==this.m},set:function(a){a!==this.hasM&&(this._set("m",a?0:void 0),this._set("hasM",a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"hasZ",{get:function(){return void 0!==this.z},set:function(a){a!==this.hasZ&&(this._set("z",a?0:void 0),this._set("hasZ",a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"latitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return h.xyToLngLat(this.x,
this.y,p)[1];if(a.isGeographic)return this._get("y")}return null},set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("y",h.lngLatToXY(this.x,a,p)[1]):c.isGeographic&&this._set("y",a),this._set("latitude",a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"longitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return h.xyToLngLat(this._get("x"),this._get("y"),p)[0];if(a.isGeographic)return this._get("x")}return null},
set:function(a){var c=this._get("spatialReference");c&&(c.isWebMercator?this._set("x",h.lngLatToXY(a,this._get("y"),p)[0]):c.isGeographic&&this._set("x",a),this._set("longitude",a))},enumerable:!0,configurable:!0});g.prototype.writeX=function(a,c,d){c[d]=isNaN(a)?"NaN":a};g.prototype.readX=function(a){return"string"===typeof a?NaN:a};g.prototype.clone=function(){var a=new e;a.x=this.x;a.y=this.y;a.z=this.z;a.m=this.m;a.spatialReference=this.spatialReference;return a};g.prototype.copy=function(a){e.copy(a,
this);return this};g.prototype.equals=function(a){var c;if(!a)return!1;var d=this.x,f=this.y,b=this.z,g=this.m,e=this.spatialReference,p=a.z,n=a.m,t=a.x;c=a.y;a=a.spatialReference;if(!e.equals(a))if(e.isWebMercator&&a.isWGS84)c=h.lngLatToXY(t,c),t=c[0],c=c[1],a=e;else if(e.isWGS84&&a.isWebMercator)c=h.xyToLngLat(t,c),t=c[0],c=c[1],a=e;else return!1;return d===t&&f===c&&b===p&&g===n&&e.wkid===a.wkid};g.prototype.offset=function(a,d,f){return c.offsetPoint(this,a,d,f)};g.prototype.normalize=function(){if(!this.spatialReference)return this;
var a=d.getInfo(this.spatialReference);if(!a)return this;var c=this.x,f=a.valid,a=f[0],b=f[1],f=2*b;c>b?(a=Math.ceil(Math.abs(c-b)/f),c-=a*f):c<a&&(a=Math.ceil(Math.abs(c-a)/f),c+=a*f);this._set("x",c);return this};g.prototype.distance=function(a){return e.distance(this,a)};g.prototype.toArray=function(){var a=this.hasZ,c=this.hasM;return a&&c?[this.x,this.y,this.z,this.m]:a?[this.x,this.y,this.z]:c?[this.x,this.y,this.m]:[this.x,this.y]};g.prototype.toJSON=function(a){return this.write(null,a)};
var e;a.__decorate([l.property({dependsOn:["x","y","z","m","spatialReference"]})],g.prototype,"cache",void 0);a.__decorate([l.property({type:Boolean,dependsOn:["m"],json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],g.prototype,"hasM",null);a.__decorate([l.property({type:Boolean,dependsOn:["z"],json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],g.prototype,"hasZ",null);a.__decorate([l.property({type:Number,dependsOn:["y"]})],g.prototype,"latitude",null);a.__decorate([l.property({type:Number,
dependsOn:["x"]})],g.prototype,"longitude",null);a.__decorate([l.property({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),l.cast(function(a){return isNaN(a)?a:k.ensureNumber(a)})],g.prototype,"x",void 0);a.__decorate([l.writer("x")],g.prototype,"writeX",null);a.__decorate([l.reader("x")],g.prototype,"readX",null);a.__decorate([l.property({type:Number,json:{write:!0}})],g.prototype,"y",void 0);a.__decorate([l.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],
g.prototype,"z",void 0);a.__decorate([l.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],g.prototype,"m",void 0);return g=e=a.__decorate([l.subclass("esri.geometry.Point")],g)}(g);e.prototype.toJSON.isDefaultToJSON=!0;return e})},"esri/geometry/support/offset":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.offsetPoint=function(a,b,e,k){a.x+=b;a.y+=e;null!=k&&null!=a.z&&(a.z+=k);return a};b.offsetCoordsX=
function(a,b){a[0]+=b;return a}})},"esri/geometry/support/webMercatorUtils":function(){define("require exports ../../core/lang ../../core/wgs84Constants ../SpatialReference ./spatialReferenceUtils".split(" "),function(e,b,a,m,l,k){function g(a,c,d,f,b){var h;if("x"in a&&"x"in b)c=c(a.x,a.y,p,f),b.x=c[0],b.y=c[1];else if("xmin"in a&&"xmin"in b)h=c(a.xmin,a.ymin,p,f),b.xmin=h[0],b.ymin=h[1],c=c(a.xmax,a.ymax,p,f),b.xmax=c[0],b.ymax=c[1];else if("paths"in a&&"paths"in b||"rings"in a&&"rings"in b){h=
"paths"in a?a.paths:a.rings;var g=[],e=void 0;for(a=0;a<h.length;a++){var n=h[a],e=[];g.push(e);for(var t=0;t<n.length;t++)e.push(c(n[t][0],n[t][1],[0,0],f)),2<n[t].length&&e[t].push(n[t][2]),3<n[t].length&&e[t].push(n[t][3])}"paths"in b?b.paths=g:b.rings=g}else if("points"in a&&"points"in b){h=a.points;g=[];for(a=0;a<h.length;a++)g[a]=c(h[a][0],h[a][1],[0,0],f),2<h[a].length&&g[a].push(h[a][2]),3<h[a].length&&g[a].push(h[a][3]);b.points=g}else if("type"in a&&"mesh"===a.type&&"type"in b&&"mesh"===
b.type&&(h=a.vertexAttributes&&a.vertexAttributes.position,g=b.vertexAttributes&&b.vertexAttributes.position,h))for(e=[0,0],a=0;a<h.length;a+=3)c(h[a],h[a+1],e,f),g[a]=e[0],g[a+1]=e[1];b.spatialReference=d;return b}function f(a,c){a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);c=c&&(null!=c.wkid||null!=c.wkt?c:c.spatialReference);return a&&c?k.equals(c,a)?!0:k.isWebMercator(c)&&k.isWGS84(a)||k.isWebMercator(a)&&k.isWGS84(c):!1}function c(a,c,d){void 0===d&&(d=[0,0]);89.99999<c?c=89.99999:-89.99999>
c&&(c=-89.99999);c*=.017453292519943;d[0]=.017453292519943*a*h;d[1]=n*Math.log((1+Math.sin(c))/(1-Math.sin(c)));return d}function d(a,c,d,f){void 0===d&&(d=[0,0]);void 0===f&&(f=!1);a=a/h*57.29577951308232;d[0]=f?a:a-360*Math.floor((a+180)/360);d[1]=57.29577951308232*(Math.PI/2-2*Math.atan(Math.exp(-1*c/h)));return d}Object.defineProperty(b,"__esModule",{value:!0});var h=m.wgs84Radius,n=h/2,p=[0,0];b.canProject=f;b.project=function(b,h){var e=b&&b.spatialReference;h=h&&(null!=h.wkid||null!=h.wkt?
h:h.spatialReference);return f(e,h)?k.equals(e,h)?a.clone(b):k.isWebMercator(h)?g(b,c,l.WebMercator,!1,a.clone(b)):k.isWGS84(h)?g(b,d,l.WGS84,!1,a.clone(b)):null:null};b.lngLatToXY=c;b.xyToLngLat=d;b.geographicToWebMercator=function(d,f,b){void 0===f&&(f=!1);void 0===b&&(b=a.clone(d));return g(d,c,l.WebMercator,f,b)};b.webMercatorToGeographic=function(c,f,b){void 0===f&&(f=!1);void 0===b&&(b=a.clone(c));return g(c,d,l.WGS84,f,b)}})},"esri/core/wgs84Constants":function(){define(["require","exports"],
function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.wgs84Radius=6378137;b.wgs84InverseFlattening=298.257223563;b.wgs84Flattening=1/b.wgs84InverseFlattening;b.wgs84PolarRadius=b.wgs84Radius*(1-b.wgs84Flattening);b.wgs84Eccentricity=.0818191908426215})},"esri/geometry/support/contains":function(){define(["require","exports"],function(e,b){function a(a,c){return m(a,c[0],c[1])}function m(a,c,d,b){return c>=a.xmin&&c<=a.xmax&&d>=a.ymin&&d<=a.ymax?null!=b&&a.hasZ?b>=a.zmin&&b<=a.zmax:!0:!1}
function l(a,c){if(a=a.rings)if(Array.isArray(a[0][0])){for(var d=!1,f=0,b=a.length;f<b;f++)d=k(d,a[f],c);c=d}else c=k(!1,a,c);else c=!1;return c}function k(a,c,d){var f=d[0];d=d[1];for(var b=0,g=0,e=c.length;g<e;g++){b++;b===e&&(b=0);var t=c[g],v=t[0],t=t[1],q=c[b],k=q[0],q=q[1];(t<d&&q>=d||q<d&&t>=d)&&v+(d-t)/(q-t)*(k-v)<f&&(a=!a)}return a}Object.defineProperty(b,"__esModule",{value:!0});var g=[0,0];b.extentContainsPoint=function(a,c){return m(a,c.x,c.y,c.z)};b.extentContainsMultipoint=function(f,
c){if(!c.points||c.points.length)return!1;var d=0;for(c=c.points;d<c.length;d++)if(!a(f,c[d]))return!1;return!0};b.extentContainsExtent=function(a,c){var d=c.xmin,f=c.ymin,b=c.zmin,g=c.xmax,e=c.ymax,t=c.zmax;return a.hasZ&&c.hasZ?m(a,d,f,b)&&m(a,d,e,b)&&m(a,g,e,b)&&m(a,g,f,b)&&m(a,d,f,t)&&m(a,d,e,t)&&m(a,g,e,t)&&m(a,g,f,t):m(a,d,f)&&m(a,d,e)&&m(a,g,e)&&m(a,g,f)};b.extentContainsCoords2D=a;b.extentContainsCoords3D=function(a,c){return m(a,c[0],c[1],c[2])};b.polygonContainsPoint=function(a,c){g[1]=
c.y;g[0]=c.x;return l(a,g)};b.polygonContainsCoords=l})},"esri/geometry/support/intersects":function(){define(["require","exports","./contains"],function(e,b,a){function m(c,d){return a.extentContainsPoint(c,d)}function l(a,c){var d=a.hasZ&&c.hasZ,f;if(a.xmin<=c.xmin){if(f=c.xmin,a.xmax<f)return!1}else if(f=a.xmin,c.xmax<f)return!1;if(a.ymin<=c.ymin){if(f=c.ymin,a.ymax<f)return!1}else if(f=a.ymin,c.ymax<f)return!1;if(d&&c.hasZ)if(a.zmin<=c.zmin){if(d=c.zmin,a.zmax<d)return!1}else if(d=a.zmin,c.zmax<
d)return!1;return!0}function k(c,d){var f=d.hasZ?a.extentContainsCoords3D:a.extentContainsCoords2D,b=0;for(d=d.points;b<d.length;b++)if(f(c,d[b]))return!0;return!1}function g(d,f){h[0]=d.xmin;h[1]=d.ymax;n[0]=d.xmax;n[1]=d.ymax;p[0]=d.xmin;p[1]=d.ymin;r[0]=d.xmax;r[1]=d.ymin;for(var b=0,g=t;b<g.length;b++)if(a.polygonContainsCoords(f,g[b]))return!0;b=0;for(f=f.rings;b<f.length;b++)if(g=f[b],g.length){var e=g[0];if(a.extentContainsCoords2D(d,e))return!0;for(var q=1;q<g.length;q++){var u=g[q];if(a.extentContainsCoords2D(d,
u)||c(e,u,v))return!0;e=u}}return!1}function f(d,f){h[0]=d.xmin;h[1]=d.ymax;n[0]=d.xmax;n[1]=d.ymax;p[0]=d.xmin;p[1]=d.ymin;r[0]=d.xmax;r[1]=d.ymin;f=f.paths;for(var b=0;b<f.length;b++){var g=f[b];if(f.length){var e=g[0];if(a.extentContainsCoords2D(d,e))return!0;for(var t=1;t<g.length;t++){var q=g[t];if(a.extentContainsCoords2D(d,q)||c(e,q,v))return!0;e=q}}}return!1}function c(a,c,f){for(var b=0;b<f.length;b++)if(d(a,c,f[b][0],f[b][1]))return!0;return!1}function d(a,c,d,f,b){var h=a[0];a=a[1];var g=
c[0];c=c[1];var e=d[0],p=d[1];d=f[0]-e;var e=h-e,n=g-h;f=f[1]-p;var p=a-p,t=c-a,r=f*n-d*t;if(0===r)return!1;d=(d*p-f*e)/r;e=(n*p-t*e)/r;return 0<=d&&1>=d&&0<=e&&1>=e?(b&&(b[0]=h+d*(g-h),b[1]=a+d*(c-a)),!0):!1}Object.defineProperty(b,"__esModule",{value:!0});b.extentIntersectsPoint=m;b.extentIntersectsExtent=l;b.extentIntersectsMultipoint=k;var h=[0,0],n=[0,0],p=[0,0],r=[0,0],t=[h,n,p,r],v=[[p,h],[h,n],[n,r],[r,p]];b.extentIntersectsPolygon=g;b.extentIntersectsPolyline=f;var q=[0,0];b.isSelfIntersecting=
function(a){for(var c=0;c<a.length;c++){for(var f=a[c],b=0;b<f.length-1;b++)for(var h=f[b],g=f[b+1],e=c+1;e<a.length;e++)for(var p=0;p<a[e].length-1;p++){var n=a[e][p],t=a[e][p+1],r=d(h,g,n,t,q);if(r&&!(q[0]===h[0]&&q[1]===h[1]||q[0]===n[0]&&q[1]===n[1]||q[0]===g[0]&&q[1]===g[1]||q[0]===t[0]&&q[1]===t[1]))return!0}p=f.length;if(!(4>=p))for(b=0;b<p-3;b++){var v=p-1;0===b&&(v=p-2);h=f[b];g=f[b+1];for(e=b+2;e<v;e++)if(n=f[e],t=f[e+1],(r=d(h,g,n,t,q))&&!(q[0]===h[0]&&q[1]===h[1]||q[0]===n[0]&&q[1]===
n[1]||q[0]===g[0]&&q[1]===g[1]||q[0]===t[0]&&q[1]===t[1]))return!0}}return!1};b.segmentIntersects=d;b.getExtentIntersector=function(a){switch(a){case "esriGeometryEnvelope":case "extent":return l;case "esriGeometryMultipoint":case "multipoint":return k;case "esriGeometryPoint":case "point":return m;case "esriGeometryPolygon":case "polygon":return g;case "esriGeometryPolyline":case "polyline":return f;case "mesh":return l}}})},"esri/geometry/Multipoint":function(){define("require exports tslib ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./support/zmUtils".split(" "),
function(e,b,a,m,l,k,g,f,c){function d(a){return function(c,d){return null==c?d:null==d?c:a(c,d)}}e=function(b){function h(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a.points=[];a.type="multipoint";return a}a.__extends(h,b);g=h;h.prototype.normalizeCtorArgs=function(a,c){if(!a&&!c)return null;var d={};Array.isArray(a)?(d.points=a,d.spatialReference=c):!a||"esri.geometry.SpatialReference"!==a.declaredClass&&null==a.wkid?(a.points&&(d.points=a.points),a.spatialReference&&
(d.spatialReference=a.spatialReference),a.hasZ&&(d.hasZ=a.hasZ),a.hasM&&(d.hasM=a.hasM)):d.spatialReference=a;if(a=d.points&&d.points[0])void 0===d.hasZ&&void 0===d.hasM?(d.hasZ=2<a.length,d.hasM=!1):void 0===d.hasZ?d.hasZ=3<a.length:void 0===d.hasM&&(d.hasM=3<a.length);return d};Object.defineProperty(h.prototype,"extent",{get:function(){var a=this.points;if(!a.length)return null;for(var c=new k,f=this.hasZ,b=this.hasM,h=f?3:2,g=a[0],e=d(Math.min),p=d(Math.max),n=g[0],m=g[1],l=g[0],g=g[1],B,E,D,I,
J=0,F=a.length;J<F;J++){var G=a[J],K=G[0],L=G[1],n=e(n,K),m=e(m,L),l=p(l,K),g=p(g,L);f&&2<G.length&&(K=G[2],B=e(B,K),D=p(D,K));b&&G.length>h&&(G=G[h],E=e(E,G),I=p(I,G))}c.xmin=n;c.ymin=m;c.xmax=l;c.ymax=g;c.spatialReference=this.spatialReference;f?(c.zmin=B,c.zmax=D):(c.zmin=null,c.zmax=null);b?(c.mmin=E,c.mmax=I):(c.mmin=null,c.mmax=null);return c},enumerable:!0,configurable:!0});h.prototype.writePoints=function(a,c){c.points=m.clone(this.points)};h.prototype.addPoint=function(a){this.clearCache();
c.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this};h.prototype.clone=function(){var a={points:m.clone(this.points),spatialReference:this.spatialReference};this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return new g(a)};h.prototype.getPoint=function(a){if(!this._validateInputs(a))return null;a=this.points[a];var c={x:a[0],y:a[1],spatialReference:this.spatialReference},d=2;this.hasZ&&(c.z=a[2],d=3);this.hasM&&(c.m=a[d]);return new f(c)};h.prototype.removePoint=
function(a){if(!this._validateInputs(a))return null;this.clearCache();return new f(this.points.splice(a,1)[0],this.spatialReference)};h.prototype.setPoint=function(a,d){if(!this._validateInputs(a))return this;this.clearCache();c.updateSupportFromPoint(this,d);Array.isArray(d)||(d=d.toArray());this.points[a]=d;return this};h.prototype.toJSON=function(a){return this.write(null,a)};h.prototype._validateInputs=function(a){return null!=a&&0<=a&&a<this.points.length};var g;a.__decorate([l.property({dependsOn:["points",
"hasZ","hasM","spatialReference"]})],h.prototype,"cache",void 0);a.__decorate([l.property({dependsOn:["cache"]})],h.prototype,"extent",null);a.__decorate([l.property({type:[[Number]],json:{write:{isRequired:!0}}})],h.prototype,"points",void 0);a.__decorate([l.writer("points")],h.prototype,"writePoints",null);return h=g=a.__decorate([l.subclass("esri.geometry.Multipoint")],h)}(g);e.prototype.toJSON.isDefaultToJSON=!0;return e})},"esri/geometry/support/zmUtils":function(){define(["require","exports"],
function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.updateSupportFromPoint=function(a,b,e){void 0===e&&(e=!1);var k=a.hasM,g=a.hasZ;Array.isArray(b)?4!==b.length||k||g?3===b.length&&e&&!k?(g=!0,k=!1):3===b.length&&k&&g&&(g=k=!1):g=k=!0:(g=!g&&b.hasZ&&(!k||b.hasM),k=!k&&b.hasM&&(!g||b.hasZ));a.hasZ=g;a.hasM=k}})},"esri/geometry/Polygon":function(){define("require exports tslib ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/centroid ./support/contains ./support/coordsUtils ./support/extentUtils ./support/intersects ./support/webMercatorUtils ./support/zmUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v){e=function(b){function g(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a.rings=[];a.type="polygon";return a}a.__extends(g,b);e=g;g.fromExtent=function(a){var c=a.clone().normalize();a=a.spatialReference;var d=!1,f=!1;c.map(function(a){a.hasZ&&(d=!0);a.hasM&&(f=!0)});c={rings:c.map(function(a){var c=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(d&&a.hasZ)for(var b=a.zmin+.5*(a.zmax-
a.zmin),h=0;h<c.length;h++)c[h].push(b);if(f&&a.hasM)for(a=a.mmin+.5*(a.mmax-a.mmin),h=0;h<c.length;h++)c[h].push(a);return c}),spatialReference:a};d&&(c.hasZ=!0);f&&(c.hasM=!0);return new e(c)};g.prototype.normalizeCtorArgs=function(a,d){var f=null,b,h,g=null;a&&!Array.isArray(a)?(f=a.rings?a.rings:null,d||(a.spatialReference?d=a.spatialReference:a.rings||(d=a)),b=a.hasZ,h=a.hasM):f=a;f=f||[];d=d||c.WGS84;f.length&&f[0]&&null!=f[0][0]&&"number"===typeof f[0][0]&&(f=[f]);if(g=f[0]&&f[0][0])void 0===
b&&void 0===h?(b=2<g.length,h=!1):void 0===b?b=!h&&3<g.length:void 0===h&&(h=!b&&3<g.length);return{rings:f,spatialReference:d,hasZ:b,hasM:h}};Object.defineProperty(g.prototype,"centroid",{get:function(){var a=d.polygonCentroid(this);if(!a||isNaN(a[0])||isNaN(a[1])||this.hasZ&&isNaN(a[2]))return null;var c=new f;c.x=a[0];c.y=a[1];c.spatialReference=this.spatialReference;this.hasZ&&(c.z=a[2]);return c},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"extent",{get:function(){var a=
this.spatialReference,c=p.getPolygonExtent(this);if(!c)return null;c=new k(c);c.spatialReference=a;return c},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"isSelfIntersecting",{get:function(){return r.isSelfIntersecting(this.rings)},enumerable:!0,configurable:!0});g.prototype.writePaths=function(a,c){c.rings=m.clone(this.rings)};g.prototype.addRing=function(a){if(a){this.clearCache();var c=this.rings,d=c.length;if(Array.isArray(a[0]))c[d]=a.concat();else{for(var f=[],b=0,h=a.length;b<
h;b++)f[b]=a[b].toArray();c[d]=f}return this}};g.prototype.clone=function(){var a=new e;a.spatialReference=this.spatialReference;a.rings=m.clone(this.rings);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};g.prototype.contains=function(a){if(!a)return!1;t.canProject(a,this.spatialReference)&&(a=t.project(a,this.spatialReference));return h.polygonContainsPoint(this,a)};g.prototype.isClockwise=function(a){var c=this;a=Array.isArray(a[0])?a:a.map(function(a){return c.hasZ?c.hasM?[a.x,a.y,a.z,a.m]:[a.x,a.y,
a.z]:[a.x,a.y]});return n.isClockwise(a,this.hasM,this.hasZ)};g.prototype.getPoint=function(a,c){if(!this._validateInputs(a,c))return null;a=this.rings[a][c];c=this.hasZ;var d=this.hasM;return c&&!d?new f(a[0],a[1],a[2],void 0,this.spatialReference):d&&!c?new f(a[0],a[1],void 0,a[2],this.spatialReference):c&&d?new f(a[0],a[1],a[2],a[3],this.spatialReference):new f(a[0],a[1],this.spatialReference)};g.prototype.insertPoint=function(a,c,d){if(!this._validateInputs(a,c,!0))return this;this.clearCache();
v.updateSupportFromPoint(this,d);Array.isArray(d)||(d=d.toArray());this.rings[a].splice(c,0,d);return this};g.prototype.removePoint=function(a,c){if(!this._validateInputs(a,c))return null;this.clearCache();return new f(this.rings[a].splice(c,1)[0],this.spatialReference)};g.prototype.removeRing=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=this.rings.splice(a,1)[0];var c=this.spatialReference;return a.map(function(a){return new f(a,c)})};g.prototype.setPoint=function(a,
c,d){if(!this._validateInputs(a,c))return this;this.clearCache();v.updateSupportFromPoint(this,d);Array.isArray(d)||(d=d.toArray());this.rings[a][c]=d;return this};g.prototype._validateInputs=function(a,c,d){void 0===d&&(d=!1);return null==a||0>a||a>=this.rings.length||null!=c&&(a=this.rings[a],d&&(0>c||c>a.length)||!d&&(0>c||c>=a.length))?!1:!0};g.prototype.toJSON=function(a){return this.write(null,a)};var e;a.__decorate([l.property({dependsOn:["hasM","hasZ","rings"]})],g.prototype,"cache",void 0);
a.__decorate([l.property({readOnly:!0,dependsOn:["cache"]})],g.prototype,"centroid",null);a.__decorate([l.property({dependsOn:["cache"],readOnly:!0})],g.prototype,"extent",null);a.__decorate([l.property({dependsOn:["cache"],readOnly:!0})],g.prototype,"isSelfIntersecting",null);a.__decorate([l.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],g.prototype,"rings",void 0);a.__decorate([l.writer("rings")],g.prototype,"writePaths",null);return g=e=a.__decorate([l.subclass("esri.geometry.Polygon")],
g)}(g);e.prototype.toJSON.isDefaultToJSON=!0;return e})},"esri/geometry/support/centroid":function(){define(["require","exports","./coordsUtils"],function(e,b,a){function m(a,f){if(!a||!a.length)return null;for(var c=[],d=[],b=f?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,-Infinity],g=0,e=a.length;g<e;g++){var r=l(a[g],f,b);r&&d.push(r)}d.sort(function(a,c){var d=a[2]-c[2];0===d&&f&&(d=a[4]-c[4]);return d});d.length&&(g=6*d[0][2],c[0]=d[0][0]/g,c[1]=d[0][1]/
g,f&&(g=6*d[0][4],c[2]=0!==g?d[0][3]/g:0),c[0]<b[0]||c[0]>b[1]||c[1]<b[2]||c[1]>b[3]||f&&(c[2]<b[4]||c[2]>b[5]))&&(c.length=0);if(!c.length)if(a=a[0]&&a[0].length?k(a[0],f):null)c[0]=a[0],c[1]=a[1],f&&2<a.length&&(c[2]=a[2]);else return null;return c}function l(a,f,c){for(var d=0,b=0,g=0,e=0,r=0,t=0;t<a.length;t++){var v=a[t],q=v[0],k=v[1],u=v[2],m=a[(t+1)%a.length],l=m[0],z=m[1],A=m[2],C=q*z-l*k,e=e+C,d=d+(q+l)*C,b=b+(k+z)*C;f&&2<v.length&&2<m.length&&(C=q*A-l*u,g+=(u+A)*C,r+=C);q<c[0]&&(c[0]=q);
q>c[1]&&(c[1]=q);k<c[2]&&(c[2]=k);k>c[3]&&(c[3]=k);f&&(u<c[4]&&(c[4]=u),u>c[5]&&(c[5]=u))}0<e&&(e*=-1);0<r&&(r*=-1);if(!e)return null;a=[d,b,.5*e];f&&(a[3]=g,a[4]=.5*r);return a}function k(b,f){for(var c=f?[0,0,0]:[0,0],d=f?[0,0,0]:[0,0],h=0,g=0,e=0,r=0,t=0,v=b.length;t<v-1;t++){var q=b[t],k=b[t+1];if(q&&k){c[0]=q[0];c[1]=q[1];d[0]=k[0];d[1]=k[1];f&&2<q.length&&2<k.length&&(c[2]=q[2],d[2]=k[2]);var u=a.getLength(c,d);u&&(h+=u,q=a.getMidpoint(q,k),g+=u*q[0],e+=u*q[1],f&&2<q.length&&(r+=u*q[2]))}}return 0<
h?f?[g/h,e/h,r/h]:[g/h,e/h]:b.length?b[0]:null}Object.defineProperty(b,"__esModule",{value:!0});b.extentCentroid=function(a){return a?a.hasZ?[a.xmax-a.xmin/2,a.ymax-a.ymin/2,a.zmax-a.zmin/2]:[a.xmax-a.xmin/2,a.ymax-a.ymin/2]:null};b.polygonCentroid=function(a){return a?m(a.rings,a.hasZ):null};b.ringsCentroid=m;b.lineCentroid=k})},"esri/geometry/support/coordsUtils":function(){define(["require","exports","./spatialReferenceUtils"],function(e,b,a){function m(a,c){var d=c[0]-a[0],f=c[1]-a[1];return 2<
a.length&&2<c.length?(a=a[2]-c[2],Math.sqrt(d*d+f*f+a*a)):Math.sqrt(d*d+f*f)}function l(a,c,d){var f=a[0]+d*(c[0]-a[0]),b=a[1]+d*(c[1]-a[1]);return 2<a.length&&2<c.length?[f,b,a[2]+d*(c[2]-a[2])]:[f,b]}function k(a,c,d){for(var f=a.length,b=0,g=0,e=0,t=0;t<f;t++){var v=a[t],q=a[(t+1)%f],k=2,b=b+(v[0]*q[1]-q[0]*v[1]);2<v.length&&2<q.length&&d&&(g+=v[0]*q[2]-q[0]*v[2],k=3);v.length>k&&q.length>k&&c&&(e+=v[0]*q[k]-q[0]*v[k])}return 0>=b&&0>=g&&0>=e}function g(f,c){if(c=a.getInfo(c)){var d=c.valid[0],
b=c.valid[1],g=b-d;c=function(a){var c=Infinity,f=-Infinity;a.forEach(function(a){for(var h=a[0];h<d;)h+=g;for(;h>b;)h-=g;c=Math.min(c,h);f=Math.max(f,h);a[0]=h});var h=f-c;g-h<h&&a.forEach(function(a){0>a[0]&&(a[0]+=g)})};for(var e=0;e<f.length;e++)c(f[e])}}Object.defineProperty(b,"__esModule",{value:!0});b.geometryToCoordinates=function(a){if(!a)return null;if(Array.isArray(a))return a;var c=a.hasZ,d=a.hasM;if("point"===a.type)return d&&c?[a.x,a.y,a.z,a.m]:c?[a.x,a.y,a.z]:d?[a.x,a.y,a.m]:[a.x,a.y];
if("polygon"===a.type)return a.rings.slice(0);if("polyline"===a.type)return a.paths.slice(0);if("multipoint"===a.type)return a.points.slice(0);if("extent"===a.type){a=a.clone().normalize();if(!a)return null;var f=!1,b=!1;a.forEach(function(a){a.hasZ&&(f=!0);a.hasM&&(b=!0)});return a.map(function(a){var c=[[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 d=.5*(a.zmax-a.zmin),h=0;h<c.length;h++)c[h].push(d);if(b&&a.hasM)for(a=.5*(a.mmax-a.mmin),h=
0;h<c.length;h++)c[h].push(a);return c})}return null};b.getLength=m;b.getMidpoint=function(a,c){return l(a,c,.5)};b.getPathLength=function(a){for(var c=a.length,d=0,f=0;f<c-1;++f)d+=m(a[f],a[f+1]);return d};b.getPointOnPath=function(a,c){if(0>=c)return a[0];for(var d=a.length,f=0,b=0;b<d-1;++b){var g=m(a[b],a[b+1]);if(c-f<g)return l(a[b],a[b+1],(c-f)/g);f+=g}return a[d-1]};b.isClockwise=k;b.closeRingsAndFixWinding=function(a){if("rings"in a){for(var c=0,d=a.rings;c<d.length;c++){var f=d[c];3>f.length||
f[0][0]===f[f.length-1][0]&&f[0][1]===f[f.length-1][1]||f.push([f[0][0],f[0][1]])}if(0<a.rings.length&&!k(a.rings[0],a.hasM,a.hasZ))for(c=0;c<a.rings.length;++c)a.rings[c]=a.rings[c].reverse()}};b.closeRings=function(a){if("rings"in a){var c=0;for(a=a.rings;c<a.length;c++){var d=a[c];3>d.length||d[0][0]===d[d.length-1][0]&&d[0][1]===d[d.length-1][1]||d.push([d[0][0],d[0][1]])}}};b.getRingArea=function(a){for(var c=a.length,d=0,f=0;f<c;f++)var b=a[f],g=a[(f+1)%c],d=d+(b[0]*g[1]-g[0]*b[1]);return d};
b.unnormalizeGeometryOnDatelineCrossing=function(a){if("polygon"!==a.type&&"polyline"!==a.type)return a;g("polygon"===a.type?a.rings:a.paths,a.spatialReference);return a};b.unnormalizeVerticesOnDatelineCrossing=g;b.computeUnnormalizedVertexPositionsOnDateLineCrossing=function(a,c,d,b){var f=Infinity,h=-Infinity;a.forEach(function(a){for(var g=a.pos[0];g<c;)g+=b;for(;g>d;)g-=b;f=Math.min(f,g);h=Math.max(h,g);a.unnormalizedPos[0]=g;a.unnormalizedPos[1]=a.pos[1];2<a.pos.length&&(a.unnormalizedPos[2]=
a.pos[2]);3<a.pos.length&&(a.unnormalizedPos[3]=a.pos[3])});var g=h-f;b-g<g&&a.forEach(function(a){0>a.unnormalizedPos[0]&&(a.unnormalizedPos[0]+=b)})}})},"esri/geometry/support/extentUtils":function(){define(["require","exports","./boundsUtils"],function(e,b,a){function m(a,c,f){void 0===c&&(c=!1);void 0===f&&(f=!1);return c?f?{xmin:a[0],ymin:a[1],zmin:a[2],mmin:a[3],xmax:a[4],ymax:a[5],zmax:a[6],mmax:a[7]}:{xmin:a[0],ymin:a[1],zmin:a[2],xmax:a[3],ymax:a[4],zmax:a[5]}:f?{xmin:a[0],ymin:a[1],mmin:a[2],
xmax:a[3],ymax:a[4],mmax:a[5]}:{xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3]}}function l(d){var f=d.hasZ,b=d.hasM;return m(a.getPointsBounds(c,d.points,f,b),f,b)}function k(a){var c=a.x,d=a.y,f=a.z;a=a.m;var b=null!=a;return null!=f?b?{xmin:c,ymin:d,zmin:f,mmin:a,xmax:c,ymax:d,zmax:f,mmax:a}:{xmin:c,ymin:d,zmin:f,xmax:c,ymax:d,zmax:f}:b?{xmin:c,ymin:d,mmin:a,xmax:c,ymax:d,mmax:a}:{xmin:c,ymin:d,xmax:c,ymax:d}}function g(d){var f=d.hasZ,b=d.hasM;return(d=a.getRingsOrPathsBounds(c,d.rings,f,b))?m(d,f,b):
null}function f(d){var f=d.hasZ,b=d.hasM;return(d=a.getRingsOrPathsBounds(c,d.paths,f,b))?m(d,f,b):null}Object.defineProperty(b,"__esModule",{value:!0});var c=[];b.getGeometryExtent=function(a){return a?void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax?a:void 0!==a.x&&void 0!==a.y?k(a):void 0!==a.rings?g(a):void 0!==a.paths?f(a):void 0!==a.points?l(a):null:null};b.getMultipointExtent=l;b.getPointExtent=k;b.getPolygonExtent=g;b.getPolylineExtent=f})},"esri/geometry/support/boundsUtils":function(){define(["require",
"exports"],function(e,b){function a(a){return void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax}function m(a){return function(c,d){return null==c?d:null==d?c:a(c,d)}}function l(a,b,g,e){var d=g?3:2;if(!b.length||!b[0].length)return null;for(var h=b[0][0],p=h[0],h=h[1],n=b[0][0],k=n[0],n=n[1],u=void 0,m=void 0,l=void 0,z=void 0,A=0;A<b.length;A++)for(var C=b[A],B=0;B<C.length;B++){var E=C[B],D=E[0],I=E[1],p=f(p,D),h=f(h,I),k=c(k,D),n=c(n,I);g&&2<E.length&&(D=E[2],u=f(u,D),m=c(m,D));
e&&E.length>d&&(z=E[d],l=f(u,z),z=c(m,z))}if(g){if(e)return a[0]=p,a[1]=h,a[2]=u,a[3]=l,a[4]=k,a[5]=n,a[6]=m,a[7]=z,a.length=8,a;a[0]=p;a[1]=h;a[2]=u;a[3]=k;a[4]=n;a[5]=m;a.length=6;return a}if(e)return a[0]=p,a[1]=h,a[2]=l,a[3]=k,a[4]=n,a[5]=z,a.length=6,a;a[0]=p;a[1]=h;a[2]=k;a[3]=n;a.length=4;return a}function k(a,c,f,b,g,e){f=c.xmin;b=c.xmax;var d=c.ymin,h=c.ymax,p=c.zmin,n=c.zmax,t=c.mmin;c=c.mmax;if(g){p=p||0;n=n||0;if(e)return a[0]=f,a[1]=d,a[2]=p,a[3]=t||0,a[4]=b,a[5]=h,a[6]=n,a[7]=c||0,a;
a[0]=f;a[1]=d;a[2]=p;a[3]=b;a[4]=h;a[5]=n;return a}if(e)return a[0]=f,a[1]=d,a[2]=t||0,a[3]=b,a[4]=h,a[5]=c||0,a;a[0]=f;a[1]=d;a[2]=b;a[3]=h;return a}function g(a,b,g,e,r,t){var d=g?3:2;e=e&&t;g=g&&r;if(!b.length||!b[0].length)return null;for(var h=b[0],p=h[0],h=h[1],n=b[0],k=n[0],n=n[1],m=void 0,l=void 0,A=void 0,C=void 0,B=0;B<b.length;B++){var E=b[B],D=E[0],I=E[1],p=f(p,D),h=f(h,I),k=c(k,D),n=c(n,I);g&&2<E.length&&(D=E[2],m=f(m,D),l=c(l,D));e&&E.length>d&&(C=E[d],A=f(m,C),C=c(l,C))}if(r){m=m||
0;l=l||0;if(t)return a[0]=p,a[1]=h,a[2]=m,a[3]=A||0,a[4]=k,a[5]=n,a[6]=l,a[7]=C||0,a;a[0]=p;a[1]=h;a[2]=m;a[3]=k;a[4]=n;a[5]=l;return a}if(t)return a[0]=p,a[1]=h,a[2]=A||0,a[3]=k,a[4]=n,a[5]=C||0,a;a[0]=p;a[1]=h;a[2]=k;a[3]=n;return a}Object.defineProperty(b,"__esModule",{value:!0});var f=m(Math.min),c=m(Math.max);b.getBoundsXY=function(c,f){if(void 0!==f.paths)return l(c,f.paths,!1,!1);if(void 0!==f.rings)return l(c,f.rings,!1,!1);if(void 0!==f.points)return g(c,f.points,!1,!1,!1,!1);if(a(f))return k(c,
f);void 0!==f.x&&void 0!==f.y&&(c[0]=f.x,c[1]=f.y,c[2]=f.x,c[3]=f.y);return c};b.getBoundsXYZ=function(c,f){if(void 0!==f.paths)return l(c,f.paths,!0,!1);if(void 0!==f.rings)return l(c,f.rings,!0,!1);if(void 0!==f.points)return g(c,f.points,!0,!1,!0,!1);if(a(f))return k(c,f,!0,!1,!0,!1);void 0!==f.x&&void 0!==f.y&&(c[0]=f.x,c[1]=f.y,c[2]=f.z,c[3]=f.x,c[4]=f.y,c[5]=f.z);return c};b.getRingsOrPathsBounds=l;b.getExtentBounds=k;b.getPointsBounds=g;b.getPointsBoundsWidth=function(a){if(!a.length||!a[0].length)return null;
for(var d=a[0][0],b=a[0][0],g=0;g<a.length;g++)var e=a[g][0],d=f(d,e),b=c(b,e);return b-d};b.getPointsBoundsCenterX=function(a){if(!a.length||!a[0].length)return null;for(var d=a[0][0],b=a[0][0],g=0;g<a.length;g++)var e=a[g][0],d=f(d,e),b=c(b,e);return d+.5*(b-d)}})},"esri/geometry/Polyline":function(){define("require exports tslib ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./SpatialReference ./support/extentUtils ./support/zmUtils".split(" "),function(e,b,a,m,l,k,
g,f,c,d,h){e=function(b){function g(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a.paths=[];a.type="polyline";return a}a.__extends(g,b);e=g;g.prototype.normalizeCtorArgs=function(a,d){var f=null,b,g,h=null;a&&!Array.isArray(a)?(f=a.paths?a.paths:null,d||(a.spatialReference?d=a.spatialReference:a.paths||(d=a)),b=a.hasZ,g=a.hasM):f=a;f=f||[];d=d||c.WGS84;f.length&&f[0]&&null!=f[0][0]&&"number"===typeof f[0][0]&&(f=[f]);if(h=f[0]&&f[0][0])void 0===b&&void 0===g?
(b=2<h.length,g=!1):void 0===b?b=!g&&3<h.length:void 0===g&&(g=!b&&3<h.length);return{paths:f,spatialReference:d,hasZ:b,hasM:g}};Object.defineProperty(g.prototype,"extent",{get:function(){var a=this.spatialReference,c=d.getPolylineExtent(this);if(!c)return null;c=new k(c);c.spatialReference=a;return c},enumerable:!0,configurable:!0});g.prototype.writePaths=function(a,c){c.paths=m.clone(this.paths)};g.prototype.addPath=function(a){if(a){this.clearCache();var c=this.paths,d=c.length;if(Array.isArray(a[0]))c[d]=
a.concat();else{for(var f=[],b=0,g=a.length;b<g;b++)f[b]=a[b].toArray();c[d]=f}return this}};g.prototype.clone=function(){var a=new e;a.spatialReference=this.spatialReference;a.paths=m.clone(this.paths);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};g.prototype.getPoint=function(a,c){if(!this._validateInputs(a,c))return null;a=this.paths[a][c];c=this.hasZ;var d=this.hasM;return c&&!d?new f(a[0],a[1],a[2],void 0,this.spatialReference):d&&!c?new f(a[0],a[1],void 0,a[2],this.spatialReference):c&&d?new f(a[0],
a[1],a[2],a[3],this.spatialReference):new f(a[0],a[1],this.spatialReference)};g.prototype.insertPoint=function(a,c,d){if(!this._validateInputs(a,c,!0))return this;this.clearCache();h.updateSupportFromPoint(this,d);Array.isArray(d)||(d=d.toArray());this.paths[a].splice(c,0,d);return this};g.prototype.removePath=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=this.paths.splice(a,1)[0];var c=this.spatialReference;return a.map(function(a){return new f(a,c)})};g.prototype.removePoint=
function(a,c){if(!this._validateInputs(a,c))return null;this.clearCache();return new f(this.paths[a].splice(c,1)[0],this.spatialReference)};g.prototype.setPoint=function(a,c,d){if(!this._validateInputs(a,c))return this;this.clearCache();h.updateSupportFromPoint(this,d);Array.isArray(d)||(d=d.toArray());this.paths[a][c]=d;return this};g.prototype._validateInputs=function(a,c,d){void 0===d&&(d=!1);return null==a||0>a||a>=this.paths.length||null!=c&&(a=this.paths[a],d&&(0>c||c>a.length)||!d&&(0>c||c>=
a.length))?!1:!0};g.prototype.toJSON=function(a){return this.write(null,a)};var e;a.__decorate([l.property({dependsOn:["hasM","hasZ","paths"]})],g.prototype,"cache",void 0);a.__decorate([l.property({dependsOn:["cache"],readOnly:!0})],g.prototype,"extent",null);a.__decorate([l.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],g.prototype,"paths",void 0);a.__decorate([l.writer("paths")],g.prototype,"writePaths",null);return g=e=a.__decorate([l.subclass("esri.geometry.Polyline")],g)}(g);e.prototype.toJSON.isDefaultToJSON=
!0;return e})},"esri/geometry/support/jsonUtils":function(){define("require exports ../Extent ../Geometry ../Multipoint ../Point ../Polygon ../Polyline".split(" "),function(e,b,a,m,l,k,g,f){function c(a){return void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax}function d(a){return void 0!==a.points}function h(a){return void 0!==a.x&&void 0!==a.y}function n(a){return void 0!==a.paths}function p(a){return void 0!==a.rings}function r(b){return b?b instanceof m?b:h(b)?k.fromJSON(b):n(b)?
f.fromJSON(b):p(b)?g.fromJSON(b):d(b)?l.fromJSON(b):c(b)?a.fromJSON(b):null:null}Object.defineProperty(b,"__esModule",{value:!0});b.fromJson=function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(q){console.warn(q.stack)}return r(a)};b.isExtent=c;b.isMultipoint=d;b.isPoint=h;b.isPolyline=n;b.isPolygon=p;b.isMesh=function(a){return void 0!==a.vertexAttributes};b.fromJSON=r;b.getJsonType=function(a){return a?h(a)?"esriGeometryPoint":n(a)?"esriGeometryPolyline":p(a)?"esriGeometryPolygon":
c(a)?"esriGeometryEnvelope":d(a)?"esriGeometryMultipoint":null:null};var t={esriGeometryPoint:k,esriGeometryPolyline:f,esriGeometryPolygon:g,esriGeometryEnvelope:a,esriGeometryMultipoint:l};b.getGeometryType=function(a){return a&&t[a]||null}})},"esri/core/Collection":function(){define("require exports tslib ./ArrayPool ./arrayUtils ./Evented ./lang ./ObjectPool ./scheduling ./accessorSupport/decorators ./accessorSupport/ensureType".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){function n(a){return a?
a instanceof z?a.toArray():a.length?Array.prototype.slice.apply(a):[]:[]}function p(a){if(a&&a.length)return a[0]}function r(a,c,d,f){c&&c.forEach(function(c,b,g){a.push(c);r(a,d.call(f,c,b,g),d,f)})}e=function(){function a(){this.target=null;this.defaultPrevented=this.cancellable=!1}a.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};a.prototype.reset=function(a){this.defaultPrevented=!1;this.item=a};return a}();var t=new f(e,null,function(a){a.item=null;a.target=
null;a.defaultPrevented=!1;a.cancellable=!1}),v=function(){},q=new Set,w=new Set,u=new Set,x=new Map,y=0,z=function(f){function b(a){a=f.call(this,a)||this;a._chgListeners=[];a._notifications=null;a._timer=null;a.length=0;a._items=[];Object.defineProperty(a,"uid",{value:y++});return a}a.__extends(b,f);e=b;b.isCollection=function(a){return null!=a&&a instanceof e};b.prototype.normalizeCtorArgs=function(a){return a?Array.isArray(a)||a instanceof e?{items:a}:a:{}};Object.defineProperty(b.prototype,"items",
{get:function(){return this._items},set:function(c){this._emitBeforeChanges(1)||(this._splice.apply(this,a.__spreadArrays([0,this.length],n(c))),this._emitAfterChanges(1))},enumerable:!0,configurable:!0});b.prototype.hasEventListener=function(a){return"change"===a?0<this._chgListeners.length:this._emitter.hasEventListener(a)};b.prototype.on=function(a,c){if("change"===a){var d=this._chgListeners,f={removed:!1,callback:c};d.push(f);this._notifications&&this._notifications.push({listeners:d.slice(),
items:this._items.slice(),changes:[]});return{remove:function(){this.remove=v;f.removed=!0;d.splice(d.indexOf(f),1)}}}return this._emitter.on(a,c)};b.prototype.once=function(a,c){var d=this.on(a,c);return{remove:function(){d.remove()}}};b.prototype.add=function(a,c){if(this._emitBeforeChanges(1))return this;c=this.getNextIndex(c);this._splice(c,0,a);this._emitAfterChanges(1);return this};b.prototype.addMany=function(c,d){void 0===d&&(d=this._items.length);if(!c||!c.length||this._emitBeforeChanges(1))return this;
d=this.getNextIndex(d);this._splice.apply(this,a.__spreadArrays([d,0],n(c)));this._emitAfterChanges(1);return this};b.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges(2))return[];var a=this._splice(0,this.length)||[];this._emitAfterChanges(2);return a};b.prototype.clone=function(){return this._createNewInstance({items:this._items.map(g.clone)})};b.prototype.concat=function(){for(var a,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];c=c.map(n);return this._createNewInstance({items:(a=
this._items).concat.apply(a,c)})};b.prototype.drain=function(a,c){if(this.length&&!this._emitBeforeChanges(2)){for(var d=this._splice(0,this.length),f=d.length,b=0;b<f;b++)a.call(c,d[b],b,d);this._emitAfterChanges(2)}};b.prototype.every=function(a,c){return this._items.every(a,c)};b.prototype.filter=function(a,c){var d;d=2===arguments.length?this._items.filter(a,c):this._items.filter(a);return this._createNewInstance({items:d})};b.prototype.find=function(a,c){return l.find(this._items,a,c)};b.prototype.findIndex=
function(a,c){return l.findIndex(this._items,a,c)};b.prototype.flatten=function(a,c){var d=[];r(d,this,a,c);return new e(d)};b.prototype.forEach=function(a,c){return this._items.forEach(a,c)};b.prototype.getItemAt=function(a){return this._items[a]};b.prototype.getNextIndex=function(a){var c=this.length;a=null==a?c:a;0>a?a=0:a>c&&(a=c);return a};b.prototype.includes=function(a,c){void 0===c&&(c=0);return arguments.length?-1!==this._items.indexOf(a,c):!1};b.prototype.indexOf=function(a,c){void 0===
c&&(c=0);return this._items.indexOf(a,c)};b.prototype.join=function(a){void 0===a&&(a=",");return this._items.join(a)};b.prototype.lastIndexOf=function(a,c){void 0===c&&(c=this.length-1);return this._items.lastIndexOf(a,c)};b.prototype.map=function(a,c){a=this._items.map(a,c);return new e({items:a})};b.prototype.reorder=function(a,c){void 0===c&&(c=this.length-1);var d=this.indexOf(a);if(-1!==d){0>c?c=0:c>=this.length&&(c=this.length-1);if(d!==c){if(this._emitBeforeChanges(4))return a;this._splice(d,
1);this._splice(c,0,a);this._emitAfterChanges(4)}return a}};b.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges(2)){var a=p(this._splice(this.length-1,1));this._emitAfterChanges(2);return a}};b.prototype.push=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];if(this._emitBeforeChanges(1))return this.length;this._splice.apply(this,a.__spreadArrays([this.length,0],c));this._emitAfterChanges(1);return this.length};b.prototype.reduce=function(a,c){var d=this._items;
return 2===arguments.length?d.reduce(a,c):d.reduce(a)};b.prototype.reduceRight=function(a,c){var d=this._items;return 2===arguments.length?d.reduceRight(a,c):d.reduceRight(a)};b.prototype.remove=function(a){return this.removeAt(this.indexOf(a))};b.prototype.removeAt=function(a){if(!(0>a||a>=this.length||this._emitBeforeChanges(2)))return a=p(this._splice(a,1)),this._emitAfterChanges(2),a};b.prototype.removeMany=function(a){if(!a||!a.length||this._emitBeforeChanges(2))return[];a=a instanceof e?a.toArray():
a;for(var c=this._items,d=[],f=a.length,b=0;b<f;b++){var g=c.indexOf(a[b]);if(-1<g){for(var h=b+1,p=g+1,n=Math.min(a.length-h,c.length-p),t=0;t<n&&a[h+t]===c[p+t];)t++;h=1+t;(g=this._splice(g,h))&&0<g.length&&d.push.apply(d,g);b+=h-1}}this._emitAfterChanges(2);return d};b.prototype.reverse=function(){if(this._emitBeforeChanges(4))return this;var c=this._splice(0,this.length);c&&(c.reverse(),this._splice.apply(this,a.__spreadArrays([0,0],c)));this._emitAfterChanges(4);return this};b.prototype.shift=
function(){if(this.length&&!this._emitBeforeChanges(2)){var a=p(this._splice(0,1));this._emitAfterChanges(2);return a}};b.prototype.slice=function(a,c){void 0===a&&(a=0);void 0===c&&(c=this.length);return this._createNewInstance({items:this._items.slice(a,c)})};b.prototype.some=function(a,c){return this._items.some(a,c)};b.prototype.sort=function(c){if(!this.length||this._emitBeforeChanges(4))return this;var d=this._splice(0,this.length);arguments.length?d.sort(c):d.sort();this._splice.apply(this,
a.__spreadArrays([0,0],d));this._emitAfterChanges(4);return this};b.prototype.splice=function(c,d){for(var f=[],b=2;b<arguments.length;b++)f[b-2]=arguments[b];b=(d?2:0)|(f.length?1:0);if(this._emitBeforeChanges(b))return[];f=this._splice.apply(this,a.__spreadArrays([c,d],f))||[];this._emitAfterChanges(b);return f};b.prototype.toArray=function(){return this._items.slice()};b.prototype.toJSON=function(){return this.toArray()};b.prototype.toLocaleString=function(){return this._items.toLocaleString()};
b.prototype.toString=function(){return this._items.toString()};b.prototype.unshift=function(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];if(!c.length||this._emitBeforeChanges(1))return this.length;this._splice.apply(this,a.__spreadArrays([0,0],c));this._emitAfterChanges(1);return this.length};b.prototype._createNewInstance=function(a){return new this.constructor(a)};b.prototype._splice=function(d,f){for(var b=this,g=[],h=2;h<arguments.length;h++)g[h-2]=arguments[h];var h=this._items,
e=this.constructor.prototype.itemType,p,n;!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=c.schedule(function(){return b._dispatchChange()}));if(f){n=h.splice(d,f);if(this.hasEventListener("before-remove")){var r=t.acquire();r.target=this;r.cancellable=!0;for(var q=0,v=n.length;q<v;q++)p=n[q],r.reset(p),this.emit("before-remove",r),r.defaultPrevented&&
(n.splice(q,1),h.splice(d,0,p),d+=1,--q,--v);t.release(r)}this.length=this._items.length;if(this.hasEventListener("after-remove")){p=t.acquire();p.target=this;p.cancellable=!1;v=n.length;for(q=0;q<v;q++)p.reset(n[q]),this.emit("after-remove",p);t.release(p)}}if(g&&g.length){if(e){q=[];for(v=0;v<g.length;v++)p=g[v],r=e.ensureType(p),null==r&&null!=p||q.push(r);g=q}e=this.hasEventListener("before-add");q=this.hasEventListener("after-add");v=d===this.length;if(e||q){p=t.acquire();p.target=this;p.cancellable=
!0;r=t.acquire();r.target=this;r.cancellable=!1;for(var u=0,k=g;u<k.length;u++){var m=k[u];e?(p.reset(m),this.emit("before-add",p),p.defaultPrevented||(v?h.push(m):h.splice(d++,0,m),this._set("length",h.length),q&&(r.reset(m),this.emit("after-add",r)))):(v?h.push(m):h.splice(d++,0,m),this._set("length",h.length),r.reset(m),this.emit("after-add",r))}t.release(r);t.release(p)}else{if(v)for(e=0,q=g;e<q.length;e++)h.push(q[e]);else h.splice.apply(h,a.__spreadArrays([d,0],g));this._set("length",h.length)}}(g&&
g.length||n&&n.length)&&this._notifyChangeEvent(g,n);return n};b.prototype._emitBeforeChanges=function(a){var c=!1;if(this.hasEventListener("before-changes")){var d=t.acquire();d.target=this;d.cancellable=!0;d.type=a;this.emit("before-changes",d);c=d.defaultPrevented;t.release(d)}return c};b.prototype._emitAfterChanges=function(a){if(this.hasEventListener("after-changes")){var c=t.acquire();c.target=this;c.cancellable=!1;c.type=a;this.emit("after-changes",c);t.release(c)}};b.prototype._notifyChangeEvent=
function(a,c){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:a,removed:c})};b.prototype._dispatchChange=function(){this._timer&&(this._timer.remove(),this._timer=null);if(this._notifications){var a=this._notifications;this._notifications=null;for(var c=function(a){var c=a.changes;q.clear();w.clear();u.clear();for(var f=0;f<c.length;f++){var b=c[f],g=b.added,b=b.removed;if(g)if(0===u.size&&0===w.size)for(var h=0,e=g;h<e.length;h++)g=e[h],q.add(g);
else for(h=0,e=g;h<e.length;h++)g=e[h],w.has(g)?(u.add(g),w.delete(g)):u.has(g)||q.add(g);if(b)if(0===u.size&&0===q.size)for(h=0;h<b.length;h++)g=b[h],w.add(g);else for(h=0;h<b.length;h++)g=b[h],q.has(g)?q.delete(g):(u.delete(g),w.add(g))}var p=m.acquire();q.forEach(function(a){p.push(a)});var n=m.acquire();w.forEach(function(a){n.push(a)});var t=d._items,r=a.items,v=m.acquire();u.forEach(function(a){r.indexOf(a)!==t.indexOf(a)&&v.push(a)});if(a.listeners&&(p.length||n.length||v.length))for(c={target:d,
added:p,removed:n,moved:v},f=a.listeners.length,g=0;g<f;g++)b=a.listeners[g],b.removed||b.callback.call(d,c);m.release(p);m.release(n);m.release(v)},d=this,f=0;f<a.length;f++)c(a[f]);q.clear();w.clear();u.clear()}};var e;b.ofType=function(c){if(!c)return e;if(x.has(c))return x.get(c);var f;if("function"===typeof c)f=c.prototype.declaredClass;else if(c.base)f=c.base.prototype.declaredClass;else for(var b in c.typeMap){var g=c.typeMap[b].prototype.declaredClass;f=f?f+(" | "+g):g}b=function(c){function b(){return null!==
c&&c.apply(this,arguments)||this}a.__extends(b,c);return b=a.__decorate([d.subclass("esri.core.Collection\x3c"+f+"\x3e")],b)}(e);g={Type:c,ensureType:"function"===typeof c?h.ensureType(c):h.ensureOneOfType(c)};Object.defineProperty(b.prototype,"itemType",{value:g});x.set(c,b);return b};a.__decorate([d.property()],b.prototype,"length",void 0);a.__decorate([d.property()],b.prototype,"items",null);return b=e=a.__decorate([d.subclass("esri.core.Collection")],b)}(k.EventedAccessor);return z})},"esri/core/Evented":function(){define("require exports tslib ./Accessor ./handleUtils ./accessorSupport/decorators".split(" "),
function(e,b,a,m,l,k){var g=function(){function a(){this._emitter=new a.EventEmitter}a.prototype.emit=function(a,d){return this._emitter.emit(a,d)};a.prototype.on=function(a,d){return this._emitter.on(a,d)};a.prototype.once=function(a,d){return this._emitter.once(a,d)};a.prototype.hasEventListener=function(a){return this._emitter.hasEventListener(a)};return a}();(function(f){var c=function(){function c(){}c.prototype.clear=function(){this._listenersMap&&this._listenersMap.clear()};c.prototype.emit=
function(c,d){c=this._listenersMap&&this._listenersMap.get(c);if(!c)return!1;a.__spreadArrays(c).forEach(function(a){a.call(null,d)});return 0<c.length};c.prototype.on=function(a,c){var d=this;if(Array.isArray(a)){var f=a.map(function(a){return d.on(a,c)});return l.handlesGroup(f)}if(-1<a.indexOf(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);f=this._listenersMap.get(a)||[];f.push(c);this._listenersMap.set(a,
f);return{remove:function(){var f=d._listenersMap&&d._listenersMap.get(a)||[];0<=f.indexOf(c)&&f.splice(f.indexOf(c),1)}}};c.prototype.once=function(a,c){var d;return d=this.on(a,function(a){d.remove();c.call(null,a)})};c.prototype.hasEventListener=function(a){a=this._listenersMap&&this._listenersMap.get(a);return null!=a&&0<a.length};return c}();f.EventEmitter=c;f.EventedMixin=function(d){return function(d){function f(){var a=null!==d&&d.apply(this,arguments)||this;a._emitter=new c;return a}a.__extends(f,
d);f.prototype.emit=function(a,c){return this._emitter.emit(a,c)};f.prototype.on=function(a,c){return this._emitter.on(a,c)};f.prototype.once=function(a,c){return this._emitter.once(a,c)};f.prototype.hasEventListener=function(a){return this._emitter.hasEventListener(a)};return f=a.__decorate([k.subclass("esri.core.Evented")],f)}(d)};var d=function(c){function d(){var a=null!==c&&c.apply(this,arguments)||this;a._emitter=new g.EventEmitter;return a}a.__extends(d,c);d.prototype.emit=function(a,c){return this._emitter.emit(a,
c)};d.prototype.on=function(a,c){return this._emitter.on(a,c)};d.prototype.once=function(a,c){return this._emitter.once(a,c)};d.prototype.hasEventListener=function(a){return this._emitter.hasEventListener(a)};return d=a.__decorate([k.subclass("esri.core.Evented")],d)}(m);f.EventedAccessor=d})(g||(g={}));return g})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.referenceSetter=function(b,e,k){void 0===
k&&(k=a);e||(e=new k);if(e===b)return e;e.removeAll();b&&(Array.isArray(b)||"items"in b&&Array.isArray(b.items))?e.addMany(b):b&&e.add(b);return e};b.castForReferenceSetter=function(a){return a}})},"esri/core/Loadable":function(){define("require exports tslib ./Error ./Promise ./promiseUtils ./Warning ./accessorSupport/decorators".split(" "),function(e,b,a,m,l,k,g,f){var c=function(c){return function(c){function d(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];var f=c.apply(this,a)||
this;f.loadError=null;f.loadStatus="not-loaded";f.loadWarnings=null;f._set("loadWarnings",[]);f.addResolvingPromise(k.create(function(a){var c=f.load.bind(f);f.load=function(d){var b=k.create(function(a,c){k.onAbortOrThrow(d,c);f.destroyed&&c(new m("load:instance-destroyed","Instance is destroyed",{instance:f}));f._promiseProps.when(a,c)});if("not-loaded"===f.loadStatus){f._set("loadStatus","loading");var g=f._loadController=k.createAbortController();c({signal:g.signal});k.onAbort(g.signal,function(){f._promiseProps.abort()})}a();
return b}}));f.when(function(){f._set("loadStatus","loaded");f._loadController=null},function(a){f._set("loadStatus","failed");f._set("loadError",a);f._loadController=null});return f}a.__extends(d,c);Object.defineProperty(d.prototype,"loaded",{get:function(){return"loaded"===this.loadStatus},enumerable:!0,configurable:!0});d.prototype.load=function(){return null};d.prototype.cancelLoad=function(){if(this.isFulfilled())return this;this._set("loadError",new m("load:cancelled","Cancelled"));this._loadController.abort();
return this};a.__decorate([f.property({readOnly:!0,dependsOn:["loadStatus"]})],d.prototype,"loaded",null);a.__decorate([f.property({readOnly:!0})],d.prototype,"loadError",void 0);a.__decorate([f.property()],d.prototype,"loadStatus",void 0);a.__decorate([f.property({type:[g],readOnly:!0})],d.prototype,"loadWarnings",void 0);return d=a.__decorate([f.subclass("esri.core.Loadable")],d)}(c)};e=function(c){function d(){return null!==c&&c.apply(this,arguments)||this}a.__extends(d,c);return d=a.__decorate([f.subclass("esri.core.Loadable")],
d)}(c(l.EsriPromise));(function(a){a.LoadableMixin=c;a.isLoadable=function(a){return!(!a||!a.load)}})(e||(e={}));return e})},"esri/core/Promise":function(){define("require exports tslib ./Accessor ./promiseUtils ./accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});var g=function(){function f(a){var c=this;this.instance=a;this._resolver=l.createDeferred();this._status=void 0;this._resolvingPromises=[];this._resolver.promise.then(function(){c._status=
0;c._cleanUp()},function(){c._status=1;c._cleanUp()})}f.prototype.addResolvingPromise=function(a){this._resolvingPromises.push(a);this._tryResolve()};f.prototype.isResolved=function(){return 0===this._status};f.prototype.isRejected=function(){return 1===this._status};f.prototype.isFulfilled=function(){return null!=this._status};f.prototype.abort=function(){this._resolver.reject(l.createAbortError())};f.prototype.when=function(a,d){return this._resolver.promise.then(a,d)};f.prototype._cleanUp=function(){this._allPromise=
this._resolvingPromises=this._allPromise=null};f.prototype._tryResolve=function(){var c=this;if(!this.isFulfilled()){var d=l.createDeferred(),f=a.__spreadArrays(this._resolvingPromises,[d.promise]),b=this._allPromise=l.all(f);b.then(function(){c.isFulfilled()||c._allPromise!==b||c._resolver.resolve(c.instance)},function(a){c.isFulfilled()||c._allPromise!==b||l.isAbortError(a)||c._resolver.reject(a)});d.resolve()}};return f}();b.EsriPromiseMixin=function(f){return function(c){function d(){for(var a=
[],d=0;d<arguments.length;d++)a[d]=arguments[d];a=c.apply(this,a)||this;a._promiseProps=new g(a);a.addResolvingPromise(l.resolve());return a}a.__extends(d,c);d.prototype.isResolved=function(){return this._promiseProps.isResolved()};d.prototype.isRejected=function(){return this._promiseProps.isRejected()};d.prototype.isFulfilled=function(){return this._promiseProps.isFulfilled()};d.prototype.when=function(a,c){var d=this;return l.create(function(a,c){d._promiseProps.when(a,c)}).then(a,c)};d.prototype.catch=
function(a){return this.when(null,a)};d.prototype.addResolvingPromise=function(a){a&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in a?a.when():a)};return d=a.__decorate([k.subclass("esri.core.Promise")],d)}(f)};e=function(f){function c(){return null!==f&&f.apply(this,arguments)||this}a.__extends(c,f);return c=a.__decorate([k.subclass("esri.core.Promise")],c)}(b.EsriPromiseMixin(m));b.EsriPromise=e})},"esri/core/Warning":function(){define(["require","exports",
"tslib","./Message"],function(e,b,a,m){e=function(b){function e(a,f,c){var d=b.call(this,a,f,c)||this;return d instanceof e?d:new e(a,f,c)}a.__extends(e,b);return e}(m);e.prototype.type="warning";return e})},"esri/core/loadAll":function(){define("require exports tslib ./asyncUtils ./Collection ./Loadable ./maybe".split(" "),function(e,b,a,m,l,k,g){function f(d,f){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return[4,d.load()];case 1:return a.sent(),
[2,c(d,f)]}})})}function c(c,f){return a.__awaiter(this,void 0,void 0,function(){var d,b,h,e=this;return a.__generator(this,function(p){switch(p.label){case 0:return d=[],b=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];for(c=0;c<a.length;c++){var f=a[c];g.isNone(f)||(Array.isArray(f)?b.apply(void 0,f):l.isCollection(f)?f.forEach(function(a){return b(a)}):k.isLoadable(f)&&d.push(f))}},f(b),h=null,[4,m.map(d,function(c){return a.__awaiter(e,void 0,void 0,function(){var d;return a.__generator(this,
function(a){switch(a.label){case 0:return[4,m.result("loadAll"in c&&"function"===typeof c.loadAll?c.loadAll():c.load())];case 1:return d=a.sent(),!1!==d.ok||h||(h=c),[2]}})})})];case 1:p.sent();if(h)throw h.loadError;return[2,c]}})})}Object.defineProperty(b,"__esModule",{value:!0});b.loadAll=f;b.loadAllChildren=c;b.default=f})},"esri/core/asyncUtils":function(){define(["require","exports","./promiseUtils"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.forEach=function(b,e,k){return a.eachAlways(b.map(function(a,
f){return e.apply(k,[a,f])}))};b.map=function(b,e,k){return a.eachAlways(b.map(function(a,f){return e.apply(k,[a,f])})).then(function(a){return a.map(function(a){return a.value})})};b.result=function(a){return a.then(function(a){return{ok:!0,value:a}}).catch(function(a){return{ok:!1,error:a}})};b.assertResult=function(a){if(!0===a.ok)return a.value;throw a.error;}})},"esri/portal/Portal":function(){define("require exports tslib ../config ../intl ../kernel ../request ../core/Error ../core/JSONSupport ../core/lang ../core/Loadable ../core/maybe ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ../geometry/Extent ./PortalQueryParams ./PortalQueryResult ./PortalUser @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u){var x,y={PortalGroup:function(){return new Promise(function(a,c){e(["./PortalGroup"],a,c)})},PortalItem:function(){return new Promise(function(a,c){e(["./PortalItem"],a,c)})},PortalUser:function(){return new Promise(function(a,c){e(["./PortalUser"],a,c)})}};return function(c){function b(a){a=c.call(this,a)||this;a.access=null;a.allSSL=!1;a.authMode="auto";a.authorizedCrossOriginDomains=null;a.basemapGalleryGroupQuery=null;a.bingKey=null;a.canListApps=
!1;a.canListData=!1;a.canListPreProvisionedItems=!1;a.canProvisionDirectPurchase=!1;a.canSearchPublic=!0;a.canShareBingPublic=!1;a.canSharePublic=!1;a.canSignInArcGIS=!1;a.canSignInIDP=!1;a.colorSetsGroupQuery=null;a.commentsEnabled=!1;a.created=null;a.culture=null;a.customBaseUrl=null;a.defaultBasemap=null;a.defaultExtent=null;a.defaultVectorBasemap=null;a.description=null;a.eueiEnabled=null;a.featuredGroups=null;a.featuredItemsGroupQuery=null;a.galleryTemplatesGroupQuery=null;a.livingAtlasGroupQuery=
null;a.hasCategorySchema=!1;a.helperServices=null;a.homePageFeaturedContent=null;a.homePageFeaturedContentCount=null;a.httpPort=null;a.httpsPort=null;a.id=null;a.ipCntryCode=null;a.isPortal=!1;a.isReadOnly=!1;a.layerTemplatesGroupQuery=null;a.maxTokenExpirationMinutes=null;a.modified=null;a.name=null;a.portalHostname=null;a.portalMode=null;a.portalProperties=null;a.region=null;a.rotatorPanels=null;a.showHomePageDescription=!1;a.sourceJSON=null;a.supportsHostedServices=!1;a.symbolSetsGroupQuery=null;
a.templatesGroupQuery=null;a.units=null;a.url=m.portalUrl;a.urlKey=null;a.user=null;a.useStandardizedQuery=!1;a.useVectorBasemaps=!1;a.vectorBasemapGalleryGroupQuery=null;return a}a.__extends(b,c);h=b;b.prototype.normalizeCtorArgs=function(a){return"string"===typeof a?{url:a}:a};b.prototype.destroy=function(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};b.prototype.readAuthorizedCrossOriginDomains=function(a){if(a)for(var c=
0;c<a.length;c++){var d=a[c];-1===m.request.trustedServers.indexOf(d)&&m.request.trustedServers.push(d)}return a};b.prototype.readDefaultBasemap=function(a){return a?(a=x.fromJSON(a),a.portalItem={portal:this},a):null};b.prototype.readDefaultVectorBasemap=function(a){return a?(a=x.fromJSON(a),a.portalItem={portal:this},a):null};Object.defineProperty(b.prototype,"extraQuery",{get:function(){var a=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!a?" AND orgid:"+this.id:null},enumerable:!0,
configurable:!0});Object.defineProperty(b.prototype,"isOrganization",{get:function(){return!!this.access},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"restUrl",{get:function(){var a=this.url;if(a)var c=a.indexOf("/sharing"),a=0<c?a.substring(0,c):this.url.replace(/\/+$/,""),a=a+"/sharing/rest";return a},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"thumbnailUrl",{get:function(){var a=this.restUrl,c=this.thumbnail;return a&&c?this._normalizeSSL(a+"/portals/self/resources/"+
c):null},enumerable:!0,configurable:!0});b.prototype.readUrlKey=function(a){return a?a.toLowerCase():a};b.prototype.readUser=function(a){var c=null;a&&(c=u.fromJSON(a),c.portal=this);return c};b.prototype.load=function(a){var c=this,d=(new Promise(function(a,c){e(["../Basemap"],a,c)})).then(function(c){p.throwIfAborted(a);x=c}).then(function(){return c.sourceJSON?c.sourceJSON:c._fetchSelf(c.authMode,!1,a)}).then(function(a){if(k.id){var d=k.id;c.credential=d.findCredential(c.restUrl);c.credential||
c.authMode!==h.AUTH_MODE_AUTO||(c._esriId_credentialCreateHandle=d.on("credential-create",function(){d.findCredential(c.restUrl)&&c._signIn()}))}c.sourceJSON=a;c.read(a)});this.addResolvingPromise(d);return p.resolve(this)};b.prototype.createClosestFacilityTask=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.load()];case 1:return a.sent(),c=this._getHelperServiceUrl("closestFacility"),[4,new Promise(function(a,
c){e(["../tasks/ClosestFacilityTask"],a,c)})];case 2:return d=a.sent(),[2,new d(c)]}})})};b.prototype.createElevationLayers=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.load()];case 1:return a.sent(),c=this._getHelperService("defaultElevationLayers"),[4,new Promise(function(a,c){e(["../layers/ElevationLayer"],a,c)})];case 2:return d=a.sent(),[2,c?c.map(function(a){return new d({id:a.id,url:a.url})}):
[]]}})})};b.prototype.createGeometryService=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.load()];case 1:return a.sent(),c=this._getHelperServiceUrl("geometry"),[4,new Promise(function(a,c){e(["../tasks/GeometryService"],a,c)})];case 2:return d=a.sent(),[2,new d({url:c})]}})})};b.prototype.createPrintTask=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,
this.load()];case 1:return a.sent(),c=this._getHelperServiceUrl("printTask"),[4,new Promise(function(a,c){e(["../tasks/PrintTask"],a,c)})];case 2:return d=a.sent(),[2,new d(c)]}})})};b.prototype.createRouteTask=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.load()];case 1:return a.sent(),c=this._getHelperServiceUrl("route"),[4,new Promise(function(a,c){e(["../tasks/RouteTask"],a,c)})];case 2:return d=a.sent(),
[2,new d(c)]}})})};b.prototype.createServiceAreaTask=function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.load()];case 1:return a.sent(),c=this._getHelperServiceUrl("serviceArea"),[4,new Promise(function(a,c){e(["../tasks/ServiceAreaTask"],a,c)})];case 2:return d=a.sent(),[2,new d(c)]}})})};b.prototype.fetchBasemaps=function(a,c){var d=new q;d.query=a||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:
this.basemapGalleryGroupQuery);d.disableExtraQuery=!0;return this.queryGroups(d,c).then(function(a){d.num=100;d.query='type:"Web Map" -type:"Web Application"';return a.total?(a=a.results[0],d.sortField=a.sortField||"name",d.sortOrder=a.sortOrder||"desc",a.queryItems(d,c)):null}).then(function(a){return a&&a.total?a.results.filter(function(a){return"Web Map"===a.type}).map(function(a){return new x({portalItem:a})}):[]})};b.prototype.fetchCategorySchema=function(a){return this.hasCategorySchema?this._request(this.restUrl+
"/portals/self/categorySchema",a).then(function(a){return a.categorySchema}):p.isAborted(a)?p.reject(p.createAbortError()):p.resolve([])};b.prototype.fetchFeaturedGroups=function(a){var c=this.featuredGroups,d=new q;d.num=100;d.sortField="title";if(c&&c.length){for(var b=[],f=0;f<c.length;f++){var g=c[f];b.push('(title:"'+g.title+'" AND owner:'+g.owner+")")}d.query=b.join(" OR ");return this.queryGroups(d,a).then(function(a){return a.results})}return p.isAborted(a)?p.reject(p.createAbortError()):
p.resolve([])};b.prototype.fetchRegions=function(c){var d=this.user&&this.user.culture||this.culture||l.getLocale();return this._request(this.restUrl+"/portals/regions",a.__assign(a.__assign({},c),{query:{culture:d}}))};b.getDefault=function(){if(!h._default||h._default.destroyed)h._default=new h;return h._default};b.prototype.queryGroups=function(a,c){return this._queryPortal("/community/groups",a,"PortalGroup",c)};b.prototype.queryItems=function(a,c){return this._queryPortal("/search",a,"PortalItem",
c)};b.prototype.queryUsers=function(a,c){a.sortField||(a.sortField="username");return this._queryPortal("/community/users",a,"PortalUser",c)};b.prototype.toJSON=function(){throw new f("internal:not-yet-implemented","Portal.toJSON is not yet implemented");};b.fromJSON=function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");return new h({sourceJSON:a})};b.prototype._getHelperService=function(a){var c=this.helperServices&&this.helperServices[a];if(!c)throw new f("portal:service-not-found",
'The `helperServices` do not include an entry named "'+a+'"');return c};b.prototype._getHelperServiceUrl=function(a){var c=this._getHelperService(a);if(!c.url)throw new f("portal:service-url-not-found",'The `helperServices` entry "'+a+'" does not include a `url` value');return c.url};b.prototype._fetchSelf=function(c,d,b){void 0===c&&(c=this.authMode);void 0===d&&(d=!1);var f=this.restUrl+"/portals/self";c=a.__assign({authMode:c,query:{culture:l.getLocale().toLowerCase()}},b);"auto"===c.authMode&&
(c.authMode="no-prompt");d&&(c.query.default=!0);return this._request(f,c)};b.prototype._queryPortal=function(c,d,b,f){var g=this,e=t.ensureType(q,d),n=function(d){return g._request(g.restUrl+c,a.__assign(a.__assign({},e.toRequestOptions(g)),f)).then(function(a){var c=e.clone();c.start=a.nextStart;return new w({nextQueryParams:c,queryParams:e,total:a.total,results:h._resultsToTypedArray(d,{portal:g},a,f)})}).then(function(a){return p.all(a.results.map(function(c){return"function"===typeof c.when?
c.when():a})).then(function(){return a},function(c){p.throwIfAbortError(c);return a})})};return b&&y[b]?y[b]().then(function(a){p.throwIfAborted(f);return n(a)}):n()};b.prototype._signIn=function(){var a=this;if(this.authMode===h.AUTH_MODE_ANONYMOUS)return p.reject(new f("portal:invalid-auth-mode",'Current "authMode"\' is "'+this.authMode+'"'));if("failed"===this.loadStatus)return p.reject(this.loadError);var c=function(c){return p.resolve().then(function(){if("not-loaded"===a.loadStatus)return c||
(a.authMode="immediate"),a.load().then(function(){return null});if("loading"===a.loadStatus)return a.load().then(function(){if(a.credential)return null;a.credential=c;return a._fetchSelf("immediate")});if(a.user&&a.credential===c)return null;a.credential=c;return a._fetchSelf("immediate")}).then(function(c){c&&(a.sourceJSON=c,a.read(c))})};return k.id?k.id.getCredential(this.restUrl).then(function(a){return c(a)}):c(this.credential)};b.prototype._normalizeSSL=function(a){return a.replace(/^http:/i,
"https:").replace(":7080",":7443")};b.prototype._normalizeUrl=function(a){var c=this.credential&&this.credential.token;return this._normalizeSSL(c?a+(-1<a.indexOf("?")?"\x26":"?")+"token\x3d"+c:a)};b.prototype._requestToTypedArray=function(a,c,d){var b=this,f=function(d){return b._request(a,c).then(function(a){var c=h._resultsToTypedArray(d,{portal:b},a);return p.all(c.map(function(c){return"function"===typeof c.when?c.when():a})).then(function(){return c},function(){return c})})};return d?(new Promise(function(a,
c){e(["./"+d],a,c)})).then(function(a){return f(a)}):f()};b.prototype._request=function(c,d){void 0===d&&(d={});var b=a.__assign({f:"json"},d.query),f=d.authMode,e=d.body,p=d.cacheBust,n=d.method,t=d.responseType;d={authMode:void 0===f?this.authMode===h.AUTH_MODE_ANONYMOUS?"anonymous":"auto":f,body:void 0===e?null:e,cacheBust:void 0===p?!1:p,method:void 0===n?"auto":n,query:b,responseType:void 0===t?"json":t,timeout:0,signal:d.signal};return g(this._normalizeSSL(c),d).then(function(a){return a.data})};
b._resultsToTypedArray=function(a,c,b,f){if(b){var g=n.isSome(f)?f.signal:null;b=b.listings||b.notifications||b.userInvitations||b.tags||b.items||b.groups||b.comments||b.provisions||b.results||b.relatedItems||b;if(a||c)b=b.map(function(b){b=d.mixin(a?a.fromJSON(b):b,c);"function"===typeof b.load&&b.load(g);return b})}else b=[];return b};var h;b.AUTH_MODE_ANONYMOUS="anonymous";b.AUTH_MODE_AUTO="auto";b.AUTH_MODE_IMMEDIATE="immediate";a.__decorate([r.property()],b.prototype,"access",void 0);a.__decorate([r.property()],
b.prototype,"allSSL",void 0);a.__decorate([r.property()],b.prototype,"authMode",void 0);a.__decorate([r.property()],b.prototype,"authorizedCrossOriginDomains",void 0);a.__decorate([r.reader("authorizedCrossOriginDomains")],b.prototype,"readAuthorizedCrossOriginDomains",null);a.__decorate([r.property()],b.prototype,"basemapGalleryGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"bingKey",void 0);a.__decorate([r.property()],b.prototype,"canListApps",void 0);a.__decorate([r.property()],b.prototype,
"canListData",void 0);a.__decorate([r.property()],b.prototype,"canListPreProvisionedItems",void 0);a.__decorate([r.property()],b.prototype,"canProvisionDirectPurchase",void 0);a.__decorate([r.property()],b.prototype,"canSearchPublic",void 0);a.__decorate([r.property()],b.prototype,"canShareBingPublic",void 0);a.__decorate([r.property()],b.prototype,"canSharePublic",void 0);a.__decorate([r.property()],b.prototype,"canSignInArcGIS",void 0);a.__decorate([r.property()],b.prototype,"canSignInIDP",void 0);
a.__decorate([r.property()],b.prototype,"colorSetsGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"commentsEnabled",void 0);a.__decorate([r.property({type:Date})],b.prototype,"created",void 0);a.__decorate([r.property()],b.prototype,"credential",void 0);a.__decorate([r.property()],b.prototype,"culture",void 0);a.__decorate([r.property()],b.prototype,"currentVersion",void 0);a.__decorate([r.property()],b.prototype,"customBaseUrl",void 0);a.__decorate([r.property()],b.prototype,"defaultBasemap",
void 0);a.__decorate([r.reader("defaultBasemap")],b.prototype,"readDefaultBasemap",null);a.__decorate([r.property({type:v})],b.prototype,"defaultExtent",void 0);a.__decorate([r.property()],b.prototype,"defaultVectorBasemap",void 0);a.__decorate([r.reader("defaultVectorBasemap")],b.prototype,"readDefaultVectorBasemap",null);a.__decorate([r.property()],b.prototype,"description",void 0);a.__decorate([r.property()],b.prototype,"eueiEnabled",void 0);a.__decorate([r.property({dependsOn:["user","id","canSearchPublic"],
readOnly:!0})],b.prototype,"extraQuery",null);a.__decorate([r.property()],b.prototype,"featuredGroups",void 0);a.__decorate([r.property()],b.prototype,"featuredItemsGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"galleryTemplatesGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"livingAtlasGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"hasCategorySchema",void 0);a.__decorate([r.property()],b.prototype,"helpBase",void 0);a.__decorate([r.property()],b.prototype,
"helperServices",void 0);a.__decorate([r.property()],b.prototype,"helpMap",void 0);a.__decorate([r.property()],b.prototype,"homePageFeaturedContent",void 0);a.__decorate([r.property()],b.prototype,"homePageFeaturedContentCount",void 0);a.__decorate([r.property()],b.prototype,"httpPort",void 0);a.__decorate([r.property()],b.prototype,"httpsPort",void 0);a.__decorate([r.property()],b.prototype,"id",void 0);a.__decorate([r.property()],b.prototype,"ipCntryCode",void 0);a.__decorate([r.property({dependsOn:["access"],
readOnly:!0})],b.prototype,"isOrganization",null);a.__decorate([r.property()],b.prototype,"isPortal",void 0);a.__decorate([r.property()],b.prototype,"isReadOnly",void 0);a.__decorate([r.property()],b.prototype,"layerTemplatesGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"maxTokenExpirationMinutes",void 0);a.__decorate([r.property({type:Date})],b.prototype,"modified",void 0);a.__decorate([r.property()],b.prototype,"name",void 0);a.__decorate([r.property()],b.prototype,"portalHostname",
void 0);a.__decorate([r.property()],b.prototype,"portalMode",void 0);a.__decorate([r.property()],b.prototype,"portalProperties",void 0);a.__decorate([r.property()],b.prototype,"region",void 0);a.__decorate([r.property({dependsOn:["url"],readOnly:!0})],b.prototype,"restUrl",null);a.__decorate([r.property()],b.prototype,"rotatorPanels",void 0);a.__decorate([r.property()],b.prototype,"showHomePageDescription",void 0);a.__decorate([r.property()],b.prototype,"sourceJSON",void 0);a.__decorate([r.property()],
b.prototype,"staticImagesUrl",void 0);a.__decorate([r.property()],b.prototype,"stylesGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"supportsHostedServices",void 0);a.__decorate([r.property()],b.prototype,"symbolSetsGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"templatesGroupQuery",void 0);a.__decorate([r.property()],b.prototype,"thumbnail",void 0);a.__decorate([r.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],b.prototype,"thumbnailUrl",null);a.__decorate([r.property()],
b.prototype,"units",void 0);a.__decorate([r.property()],b.prototype,"url",void 0);a.__decorate([r.property()],b.prototype,"urlKey",void 0);a.__decorate([r.reader("urlKey")],b.prototype,"readUrlKey",null);a.__decorate([r.property()],b.prototype,"user",void 0);a.__decorate([r.reader("user")],b.prototype,"readUser",null);a.__decorate([r.property()],b.prototype,"useStandardizedQuery",void 0);a.__decorate([r.property()],b.prototype,"useVectorBasemaps",void 0);a.__decorate([r.property()],b.prototype,"vectorBasemapGalleryGroupQuery",
void 0);return b=h=a.__decorate([r.subclass("esri.portal.Portal")],b)}(c.JSONSupportMixin(h))})},"esri/intl":function(){define("require exports ./intl/date ./intl/number ./intl/substitute ./intl/locale ./intl/messages".split(" "),function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});b.formatDate=a.formatDate;b.convertDateFormatToIntlOptions=a.convertDateFormatToIntlOptions;b.formatNumber=m.formatNumber;b.convertNumberFormatToIntlOptions=m.convertNumberFormatToIntlOptions;b.substitute=
l.substitute;b.getLocale=k.getLocale;b.setLocale=k.setLocale;b.onLocaleChange=k.onLocaleChange;b.prefersRTL=k.prefersRTL;b.loadMessageBundle=g.loadMessageBundle;b.getKnownMessageBundleLocale=g.getKnownMessageBundleLocale})},"esri/intl/date":function(){define("require exports tslib @dojo/framework/shim/WeakMap ../core/jsonMap ./locale".split(" "),function(e,b,a,m,l,k){function g(a){a=a||v;if(!t.has(a)){var c=k.getLocale(),c=r[k.getLocale()]||c;t.set(a,new Intl.DateTimeFormat(c,a))}return t.get(a)}
Object.defineProperty(b,"__esModule",{value:!0});e={year:"numeric",month:"numeric",day:"numeric"};var f={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},n=a.__assign(a.__assign({},h),{second:"numeric"}),p={"short-date":e,"short-date-short-time":a.__assign(a.__assign({},e),h),"short-date-short-time-24":a.__assign(a.__assign(a.__assign({},e),h),{hour12:!1}),"short-date-long-time":a.__assign(a.__assign({},
e),n),"short-date-long-time-24":a.__assign(a.__assign(a.__assign({},e),n),{hour12:!1}),"short-date-le":e,"short-date-le-short-time":a.__assign(a.__assign({},e),h),"short-date-le-short-time-24":a.__assign(a.__assign(a.__assign({},e),h),{hour12:!1}),"short-date-le-long-time":a.__assign(a.__assign({},e),n),"short-date-le-long-time-24":a.__assign(a.__assign(a.__assign({},e),n),{hour12:!1}),"long-month-day-year":f,"long-month-day-year-short-time":a.__assign(a.__assign({},f),h),"long-month-day-year-short-time-24":a.__assign(a.__assign(a.__assign({},
f),h),{hour12:!1}),"long-month-day-year-long-time":a.__assign(a.__assign({},f),n),"long-month-day-year-long-time-24":a.__assign(a.__assign(a.__assign({},f),n),{hour12:!1}),"day-short-month-year":c,"day-short-month-year-short-time":a.__assign(a.__assign({},c),h),"day-short-month-year-short-time-24":a.__assign(a.__assign(a.__assign({},c),h),{hour12:!1}),"day-short-month-year-long-time":a.__assign(a.__assign({},c),n),"day-short-month-year-long-time-24":a.__assign(a.__assign(a.__assign({},c),n),{hour12:!1}),
"long-date":d,"long-date-short-time":a.__assign(a.__assign({},d),h),"long-date-short-time-24":a.__assign(a.__assign(a.__assign({},d),h),{hour12:!1}),"long-date-long-time":a.__assign(a.__assign({},d),n),"long-date-long-time-24":a.__assign(a.__assign(a.__assign({},d),n),{hour12:!1}),"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":n};b.dictionary=l.strict()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",
shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",
longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",
longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"});b.dateFormats=b.dictionary.apiValues;b.toJSON=b.dictionary.toJSON.bind(b.dictionary);b.fromJSON=b.dictionary.fromJSON.bind(b.dictionary);var r={ar:"ar-u-nu-latn-ca-gregory"},t=new m.default,v=p["short-date-short-time"];k.beforeLocaleChange(function(){t=new m.default;v=p["short-date-short-time"]});b.getDateTimeFormatter=g;b.convertDateFormatToIntlOptions=
function(a){return p[a]||null};b.formatDate=function(a,c){return g(c).format(a)}})},"@dojo/framework/shim/WeakMap":function(){(function(e){"object"===typeof module&&"object"===typeof module.exports?(e=e(require,exports),void 0!==e&&(module.exports=e)):"function"===typeof define&&define.amd&&define("require exports tslib ./global ./iterator ../has/has ./Symbol".split(" "),e)})(function(e,b){Object.defineProperty(b,"__esModule",{value:!0});var a=e("tslib"),m=e("./global"),l=e("./iterator"),k=e("../has/has");
e("./Symbol");b.WeakMap=m.default.WeakMap;if(!k.default("es6-weakmap")){var g={},f=function(){var a=Math.floor(Date.now()%1E8);return function(){return"__wm"+Math.floor(1E8*Math.random())+(a++ +"__")}}();b.WeakMap=function(){function c(c){this[Symbol.toStringTag]="WeakMap";this._name=f();this._frozenEntries=[];if(c)if(l.isArrayLike(c))for(var d=0;d<c.length;d++){var b=c[d];this.set(b[0],b[1])}else try{for(d=a.__values(c),b=d.next();!b.done;b=d.next()){var g=a.__read(b.value,2);this.set(g[0],g[1])}}catch(v){e=
{error:v}}finally{try{b&&!b.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error;}}var e,t}c.prototype._getFrozenEntryIndex=function(a){for(var c=0;c<this._frozenEntries.length;c++)if(this._frozenEntries[c].key===a)return c;return-1};c.prototype.delete=function(a){if(void 0===a||null===a)return!1;var c=a[this._name];if(c&&c.key===a&&c.value!==g)return c.value=g,!0;a=this._getFrozenEntryIndex(a);return 0<=a?(this._frozenEntries.splice(a,1),!0):!1};c.prototype.get=function(a){if(void 0!==a&&null!==
a){var c=a[this._name];if(c&&c.key===a&&c.value!==g)return c.value;a=this._getFrozenEntryIndex(a);if(0<=a)return this._frozenEntries[a].value}};c.prototype.has=function(a){if(void 0===a||null===a)return!1;var c=a[this._name];return c&&c.key===a&&c.value!==g||0<=this._getFrozenEntryIndex(a)?!0:!1};c.prototype.set=function(a,c){if(!a||"object"!==typeof a&&"function"!==typeof a)throw new TypeError("Invalid value used as weak map key");var d=a[this._name];d&&d.key===a||(d=Object.create(null,{key:{value:a}}),
Object.isFrozen(a)?this._frozenEntries.push(d):Object.defineProperty(a,this._name,{value:d}));d.value=c;return this};return c}()}b.default=b.WeakMap})},"esri/intl/locale":function(){define(["require","exports","tslib","../core/global"],function(e,b,a,m){function l(){var a,c;return null!==(c=null!==r&&void 0!==r?r:null===(a=m.navigator)||void 0===a?void 0:a.language)&&void 0!==c?c:"en"}function k(){void 0===p&&(p=l());return p}function g(){var c=null!==n&&void 0!==n?n:l();p!==c&&(p=c,a.__spreadArrays(q).forEach(function(a){a.call(null,
c)}),a.__spreadArrays(v).forEach(function(a){a.call(null,c)}))}var f,c,d,h;Object.defineProperty(b,"__esModule",{value:!0});var n=void 0,p=void 0,r=null!==(c=null===(f=m.esriConfig)||void 0===f?void 0:f.locale)&&void 0!==c?c:null===(d=m.dojoConfig)||void 0===d?void 0:d.locale;b.getDefaultLocale=l;b.getLocale=k;b.setLocale=function(a){n=a?a:void 0;g()};var t={he:!0,ar:!0};b.prefersRTL=function(a){void 0===a&&(a=k());a=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(a);a=null===a||void 0===a?void 0:a[1].toLowerCase();
return t[a]||!1};var v=[];b.onLocaleChange=function(a){v.push(a);return{remove:function(){v.splice(v.indexOf(a),1)}}};var q=[];b.beforeLocaleChange=function(a){q.push(a);return{remove:function(){v.splice(q.indexOf(a),1)}}};null===(h=m.addEventListener)||void 0===h?void 0:h.call(m,"languagechange",g)})},"esri/intl/number":function(){define(["require","exports","@dojo/framework/shim/WeakMap","./locale"],function(e,b,a,m){function l(a){var c=a||f;if(!g.has(c)){var b=m.getLocale(),b=k[m.getLocale()]||
b;g.set(c,new Intl.NumberFormat(b,a))}return g.get(c)}Object.defineProperty(b,"__esModule",{value:!0});var k={ar:"ar-u-nu-latn"},g=new a.default,f={};m.beforeLocaleChange(function(){g=new a.default;f={}});b.getFormatter=l;b.convertNumberFormatToIntlOptions=function(a){void 0===a&&(a={});var c={};null!=a.digitSeparator&&(c.useGrouping=a.digitSeparator);null!=a.places&&(c.minimumFractionDigits=c.maximumFractionDigits=a.places);return c};b.formatNumber=function(a,d){return l(d).format(a)}})},"esri/intl/substitute":function(){define("require exports ../core/Logger ../core/object ../core/string ./date ./number".split(" "),
function(e,b,a,m,l,k,g){function f(a){switch(typeof a){case "string":return a;case "number":return g.formatNumber(a);case "boolean":return""+a;default:return a instanceof Date?k.formatDate(a):""}}Object.defineProperty(b,"__esModule",{value:!0});var c=a.getLogger("esri.intl");b.substitute=function(a,b,e){void 0===e&&(e={});e=e.format;var d=void 0===e?{}:e;return l.replace(a,function(a){var h;var e,p=a.indexOf(":");-1===p?e=a.trim():(e=a.slice(0,p).trim(),h=a.slice(p+1).trim());if(e)if(a=m.getDeepValue(e,
b),null==a)h="";else if(e=d[h]||d[e])b:switch(e.type){case "date":h=k.formatDate(a,e.intlOptions);break b;case "number":h=g.formatNumber(a,e.intlOptions);break b;default:c.warn("missing format descriptor for key {key}"),h=f(a)}else if(h)b:switch(h.toLowerCase()){case "dateformat":h=k.formatDate(a);break b;case "numberformat":h=g.formatNumber(a);break b;default:c.warn("inline format is unsupported since 4.12: "+h),h=/^(dateformat|datestring)/i.test(h)?k.formatDate(a):/^numberformat/i.test(h)?g.formatNumber(a):
f(a)}else h=f(a);else h="";return h})}})},"esri/intl/messages":function(){define("require exports tslib ../assets ../core/Error ../core/maybe ../core/promiseUtils ../core/SetUtils ./locale @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c){function d(a){if(!p.test(a))return null;var c=p.exec(a);a=c[1];c=c[2];c=a+(c?"-"+c.toUpperCase():"");return r.has(c)?c:r.has(a)?a:null}function h(b){return a.__awaiter(this,void 0,void 0,function(){var f,g,h,e,p,t,r,q,v;return a.__generator(this,
function(a){switch(a.label){case 0:f=/^(.*)\/t9n\/(.*)$/g.exec(b);if(!f)throw new l("esri-intl:invalid-bundle",'Missing "t9n" folder in locale bundle path "'+b+'"');g=f[1]+"/t9n/";h=f[2];e=c.getLocale();p=d(e);t=""+g+h+".json";r=p?""+g+h+"_"+p+".json":t;a.label=1;case 1:return a.trys.push([1,3,,8]),[4,n(r)];case 2:return q=a.sent(),[3,8];case 3:v=a.sent();if(r===t)throw v;a.label=4;case 4:return a.trys.push([4,6,,7]),[4,n(t)];case 5:return q=a.sent(),[3,7];case 6:throw a.sent(),new l("esri-intl:unknown-bundle",
'Bundle "'+b+'" cannot be loaded',{error:v});case 7:return[3,8];case 8:return[2,q]}})})}function n(c){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return k.isSome(b.test.fetchBundleAsset)?[2,b.test.fetchBundleAsset(c)]:[4,m.fetchAsset(c,{responseType:"json"})];case 1:return d=a.sent(),[2,d.data]}})})}Object.defineProperty(b,"__esModule",{value:!0});var p=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,r=f.SetFromValues("ar bs ca cs da de el en es et fi fr he hi hr hu id it ja ko lt lv nb nl pl pt-BR pt-PT ro ru sl sr sv th tr uk vi zh-CN zh-HK zh-TW".split(" ")),
t=new Map;c.beforeLocaleChange(function(){t.clear()});b.loadMessageBundle=function(c){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return t.has(c)||t.set(c,h(c)),d=t.get(c),[4,v.add(d)];case 1:return a.sent(),[2,d]}})})};b.getKnownMessageBundleLocale=d;var v=new (function(){function c(){this._numLoading=0}c.prototype.waitForAll=function(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return this._dfd?
[4,this._dfd.promise]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})};c.prototype.add=function(a){var c=this;this._increase();a.then(function(){return c._decrease()},function(){return c._decrease()});return this.waitForAll()};c.prototype._increase=function(){this._numLoading++;this._dfd||(this._dfd=g.createDeferred())};c.prototype._decrease=function(){this._numLoading=Math.max(this._numLoading-1,0);this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)};return c}());b.test={cache:t}})},
"esri/assets":function(){define(["require","exports","./request","./core/urlUtils"],function(e,b,a,m){function l(a){return m.join(e.toUrl("."),"../",a)}Object.defineProperty(b,"__esModule",{value:!0});b.fetchAsset=function(b,g){return a(l(b),g)};b.getAssetUrl=l})},"esri/core/SetUtils":function(){define(["require","exports"],function(e,b){function a(a){if(0===a.size)throw Error("Set is empty");return a.values().next().value}function m(a){if(0===a.size)throw Error("Set is empty");var b,f=!1;a.forEach(function(a){f||
(b=a,f=!0)});return b}Object.defineProperty(b,"__esModule",{value:!0});b.someSet=Set.prototype.entries?function(a,b){a=a.entries();for(var f=a.next();!f.done;f=a.next())if(b(f.value[0]))return!0;return!1}:function(a,b){var f=!0;a.forEach(function(a){f&&(f=!b(a))});return!f};e=!!Set.prototype.values;var l=!!Array.from;b.valuesOfSet=e&&l?function(a){return Array.from(a.values())}:function(a){var b=Array(a.size),f=0;a.forEach(function(a){return b[f++]=a});return b};b.SetFromValues=e?function(a){return new Set(a)}:
function(a){for(var b=new Set,f=0;f<a.length;f++)b.add(a[f]);return b};b.firstOfSet=e?a:m;b.reduceSet=function(a,b,f){var c=f;a.forEach(function(a){return c=b(a,c)});return c}})},"esri/portal/PortalQueryParams":function(){define("require exports tslib ../core/Accessor ../core/jsonMap ../core/lang ../core/accessorSupport/decorators ../geometry/Extent ../geometry/SpatialReference ../geometry/support/webMercatorUtils".split(" "),function(e,b,a,m,l,k,g,f,c,d){var h=new l.default({avgRating:"avg-rating",
numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});return function(b){function e(a){a=b.call(this,a)||this;a.categories=null;a.disableExtraQuery=!1;a.extent=null;a.num=10;a.query=null;a.sortField=null;a.start=1;return a}a.__extends(e,b);n=e;Object.defineProperty(e.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(a){"asc"!==a&&"desc"!==a||this._set("sortOrder",a)},enumerable:!0,configurable:!0});e.prototype.clone=function(){return new n({categories:this.categories?
k.clone(this.categories):null,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(b,f){var g;this.categories&&(g=this.categories.map(function(a){return Array.isArray(a)?JSON.stringify(a):a}));var e;if(this.extent){var p=d.project(this.extent,c.WGS84);p&&(e=p.xmin+","+p.ymin+","+p.xmax+","+p.ymax)}p=this.query;!this.disableExtraQuery&&
b.extraQuery&&(p="("+p+")"+b.extraQuery);b={categories:g,bbox:e,q:p,num:this.num,sortField:null,sortOrder:null,start:this.start};this.sortField&&(b.sortField=this.sortField.split(",").map(function(a){return h.toJSON(a.trim())}).join(","),b.sortOrder=this.sortOrder);return{query:a.__assign(a.__assign({},f),b)}};var n;a.__decorate([g.property()],e.prototype,"categories",void 0);a.__decorate([g.property()],e.prototype,"disableExtraQuery",void 0);a.__decorate([g.property({type:f})],e.prototype,"extent",
void 0);a.__decorate([g.property()],e.prototype,"num",void 0);a.__decorate([g.property()],e.prototype,"query",void 0);a.__decorate([g.property()],e.prototype,"sortField",void 0);a.__decorate([g.property()],e.prototype,"sortOrder",null);a.__decorate([g.property()],e.prototype,"start",void 0);return e=n=a.__decorate([g.subclass("esri.portal.PortalQueryParams")],e)}(m)})},"esri/portal/PortalQueryResult":function(){define(["require","exports","tslib","../core/Accessor","../core/accessorSupport/decorators"],
function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.nextQueryParams=null;a.queryParams=null;a.results=null;a.total=null;return a}a.__extends(g,b);a.__decorate([l.property()],g.prototype,"nextQueryParams",void 0);a.__decorate([l.property()],g.prototype,"queryParams",void 0);a.__decorate([l.property()],g.prototype,"results",void 0);a.__decorate([l.property()],g.prototype,"total",void 0);return g=a.__decorate([l.subclass("esri.portal.PortalQueryResult")],g)}(m)})},"esri/portal/PortalUser":function(){define("require exports tslib ../core/Error ../core/JSONSupport ../core/promiseUtils ../core/accessorSupport/decorators ./PortalFolder ./PortalGroup @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c){return function(d){function b(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=d.apply(this,a)||this;a.access=null;a.created=null;a.culture=null;a.description=null;a.email=null;a.fullName=null;a.modified=null;a.orgId=null;a.portal=null;a.preferredView=null;a.privileges=null;a.region=null;a.role=null;a.roleId=null;a.sourceJSON=null;a.units=null;a.username=null;a.userType=null;return a}a.__extends(b,d);n=b;Object.defineProperty(b.prototype,"thumbnailUrl",{get:function(){var a=
this.url,c=this.thumbnail;return a&&c?this.portal._normalizeUrl(a+"/info/"+c+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"userContentUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});b.prototype.addItem=
function(a){var c=this,d=a&&a.item,b=a&&a.data;a=a&&a.folder;var f={method:"post"};d&&(f.query=d.createPostQuery(),null!=b&&("string"===typeof b?f.query.text=b:"object"===typeof b&&(f.query.text=JSON.stringify(b))));b=this.userContentUrl;a&&(b+="/"+("string"===typeof a?a:a.id));return this.portal._request(b+"/addItem",f).then(function(a){d.id=a.id;d.portal=c.portal;return d.loaded?d.reload():d.load()})};b.prototype.deleteItem=function(a){var c=this.userContentUrl;a.ownerFolder&&(c+="/"+a.ownerFolder);
return this.portal._request(c+("/items/"+a.id+"/delete"),{method:"post"}).then(function(){a.id=null;a.portal=null})};b.prototype.deleteItems=function(a){var c=this.userContentUrl+"/deleteItems",d=a.map(function(a){return a.id});return d.length?(d={method:"post",query:{items:d.join(",")}},this.portal._request(c,d).then(function(){a.forEach(function(a){a.id=null;a.portal=null})})):k.resolve(void 0)};b.prototype.fetchFolders=function(){var a=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(c){return c&&
c.folders?c.folders.map(function(c){c=f.fromJSON(c);c.portal=a.portal;return c}):[]})};b.prototype.fetchGroups=function(){var a=this;return this.portal._request(this.url).then(function(d){return d&&d.groups?d.groups.map(function(d){d=c.fromJSON(d);d.portal=a.portal;return d}):[]})};b.prototype.fetchItems=function(a){var c=this;a||(a={});var d=this.userContentUrl;a.folder&&(d+="/"+a.folder.id);var b;return(new Promise(function(a,c){e(["./PortalItem"],a,c)})).then(function(f){b=f;return c.portal._request(d,
{query:{folders:!1,num:a.num||10,start:a.start||1,sortField:a.sortField||"created",sortOrder:a.sortOrder||"asc"}})}).then(function(a){var d;return a&&a.items?(d=a.items.map(function(a){a=b.fromJSON(a);a.portal=c.portal;return a}),k.all(d.map(function(a){return a.load()})).catch(function(a){return a}).then(function(){return{items:d,nextStart:a.nextStart,total:a.total}})):{items:[],nextStart:-1,total:0}})};b.prototype.fetchTags=function(){return this.portal._request(this.url+"/tags").then(function(a){return a.tags})};
b.prototype.getThumbnailUrl=function(a){var c=this.thumbnailUrl;c&&a&&(c+="\x26w\x3d"+a);return c};b.prototype.queryFavorites=function(a){return this.favGroupId?(this._favGroup||(this._favGroup=new c({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(a)):k.reject(new m("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};b.prototype.toJSON=function(){throw new m("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};b.fromJSON=
function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");var c=new n;c.sourceJSON=a;c.read(a);return c};var n;a.__decorate([g.property()],b.prototype,"access",void 0);a.__decorate([g.property({type:Date})],b.prototype,"created",void 0);a.__decorate([g.property()],b.prototype,"culture",void 0);a.__decorate([g.property()],b.prototype,"description",void 0);a.__decorate([g.property()],b.prototype,"email",void 0);a.__decorate([g.property()],b.prototype,"favGroupId",
void 0);a.__decorate([g.property()],b.prototype,"fullName",void 0);a.__decorate([g.property({type:Date})],b.prototype,"modified",void 0);a.__decorate([g.property()],b.prototype,"orgId",void 0);a.__decorate([g.property()],b.prototype,"portal",void 0);a.__decorate([g.property()],b.prototype,"preferredView",void 0);a.__decorate([g.property()],b.prototype,"privileges",void 0);a.__decorate([g.property()],b.prototype,"region",void 0);a.__decorate([g.property()],b.prototype,"role",void 0);a.__decorate([g.property()],
b.prototype,"roleId",void 0);a.__decorate([g.property()],b.prototype,"sourceJSON",void 0);a.__decorate([g.property()],b.prototype,"thumbnail",void 0);a.__decorate([g.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],b.prototype,"thumbnailUrl",null);a.__decorate([g.property()],b.prototype,"units",void 0);a.__decorate([g.property({dependsOn:["portal.restUrl"],readOnly:!0})],b.prototype,"userContentUrl",null);a.__decorate([g.property({dependsOn:["portal.restUrl"],readOnly:!0})],
b.prototype,"url",null);a.__decorate([g.property()],b.prototype,"username",void 0);a.__decorate([g.property()],b.prototype,"userType",void 0);return b=n=a.__decorate([g.subclass("esri.portal.PortalUser")],b)}(l.JSONSupport)})},"esri/portal/PortalFolder":function(){define("require exports tslib ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.created=null;a.id=null;a.portal=null;a.title=
null;a.username=null;return a}a.__extends(f,b);Object.defineProperty(f.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username+"/"+this.id:null},enumerable:!0,configurable:!0});f.prototype.toJSON=function(){throw new m("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};a.__decorate([k.property({type:Date})],f.prototype,"created",void 0);a.__decorate([k.property()],f.prototype,"id",void 0);a.__decorate([k.property()],f.prototype,
"portal",void 0);a.__decorate([k.property()],f.prototype,"title",void 0);a.__decorate([k.property({dependsOn:["portal.restUrl"],readOnly:!0})],f.prototype,"url",null);a.__decorate([k.property()],f.prototype,"username",void 0);return f=a.__decorate([k.subclass("esri.portal.PortalFolder")],f)}(l.JSONSupport)})},"esri/portal/PortalGroup":function(){define("require exports tslib ../core/Error ../core/JSONSupport ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ./PortalQueryParams".split(" "),
function(e,b,a,m,l,k,g,f){return function(c){function d(a){a=c.call(this,a)||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}a.__extends(d,c);Object.defineProperty(d.prototype,"thumbnailUrl",{get:function(){var a=this.url,c=this.thumbnail;return a&&c?this.portal._normalizeUrl(a+"/info/"+c+"?f\x3djson"):null},enumerable:!0,configurable:!0});
Object.defineProperty(d.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/groups/"+this.id:null},enumerable:!0,configurable:!0});d.prototype.fetchCategorySchema=function(a){var c=this;return this.portal._request(this.url+"/categorySchema",a).then(function(d){d=d.categorySchema||[];return d.some(function(a){return"contentCategorySetsGroupQuery.LivingAtlas"===a.source})?c._fetchCategorySchemaSet("LivingAtlas",a):d})};d.prototype.fetchMembers=function(a){return this.portal._request(this.url+
"/users",a)};d.prototype.getThumbnailUrl=function(a){var c=this.thumbnailUrl;c&&a&&(c+="\x26w\x3d"+a);return c};d.prototype.toJSON=function(){throw new m("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};d.prototype.queryItems=function(a,c){a=g.ensureType(f,a);if(5<parseFloat(this.portal.currentVersion))return a=a||new f,this.portal._queryPortal("/content/groups/"+this.id+"/search",a,"PortalItem",c);a=a?a.clone():new f;a.query="group:"+this.id+(a.query?" "+a.query:"");
return this.portal.queryItems(a,c)};d.prototype._fetchCategorySchemaSet=function(a,c){var d=this;return this.portal._fetchSelf(this.portal.authMode,!0,c).then(function(a){if(a=a.contentCategorySetsGroupQuery){var b=new f;b.disableExtraQuery=!0;b.num=1;b.query=a;return d.portal.queryGroups(b,c)}throw new m("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found");}).then(function(d){if(d.total){d=d.results[0];var b=new f;b.num=1;b.query='typekeywords:"'+a+'"';return d.queryItems(b,
c)}throw new m("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found");}).then(function(a){return a.total?a.results[0].fetchData("json",c).then(function(a){return(a=a&&a.categorySchema)&&a.length?a:[]}):[]})};a.__decorate([k.property()],d.prototype,"access",void 0);a.__decorate([k.property({type:Date})],d.prototype,"created",void 0);a.__decorate([k.property()],d.prototype,"description",void 0);a.__decorate([k.property()],d.prototype,"id",void 0);a.__decorate([k.property()],
d.prototype,"isInvitationOnly",void 0);a.__decorate([k.property({type:Date})],d.prototype,"modified",void 0);a.__decorate([k.property()],d.prototype,"owner",void 0);a.__decorate([k.property()],d.prototype,"portal",void 0);a.__decorate([k.property()],d.prototype,"snippet",void 0);a.__decorate([k.property()],d.prototype,"sortField",void 0);a.__decorate([k.property()],d.prototype,"sortOrder",void 0);a.__decorate([k.property()],d.prototype,"tags",void 0);a.__decorate([k.property()],d.prototype,"thumbnail",
void 0);a.__decorate([k.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],d.prototype,"thumbnailUrl",null);a.__decorate([k.property()],d.prototype,"title",void 0);a.__decorate([k.property({dependsOn:["portal.restUrl"],readOnly:!0})],d.prototype,"url",null);return d=a.__decorate([k.subclass("esri.portal.PortalGroup")],d)}(l.JSONSupport)})},"esri/portal/PortalItem":function(){define("require exports tslib ../assets ../core/Error ../core/JSONSupport ../core/lang ../core/Loadable ../core/maybe ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ../geometry/Extent ./Portal ./PortalItemResource ./PortalRating @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q){return function(b){function f(a){a=b.call(this,a)||this;a.access=null;a.accessInformation=null;a.applicationProxies=null;a.avgRating=null;a.categories=null;a.created=null;a.culture=null;a.description=null;a.extent=null;a.groupCategories=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.ownerFolder=null;a.portal=null;a.screenshots=null;a.size=null;a.snippet=
null;a.sourceJSON=null;a.tags=null;a.title=null;a.type=null;a.typeKeywords=null;a.url=null;return a}a.__extends(f,b);k=f;f.from=function(a){return p.ensureClass(k,a)};Object.defineProperty(f.prototype,"displayName",{get:function(){var a=this.type,c=this.typeKeywords||[],d=a;"Feature Service"===a||"Feature Collection"===a?d=-1<c.indexOf("Table")?"Table":-1<c.indexOf("Route Layer")?"Route Layer":-1<c.indexOf("Markup")?"Markup":"Feature Layer":"Image Service"===a?d=-1<c.indexOf("Elevation 3D Layer")?
"Elevation Layer":-1<c.indexOf("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===a?d="Scene Layer":"Scene Package"===a?d="Scene Layer Package":"Stream Service"===a?d="Feature Layer":"Geoprocessing Service"===a&&this.portal&&this.portal.isPortal?d=-1<c.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===a?d="Locator":"Microsoft Powerpoint"===a?d="Microsoft PowerPoint":"GeoJson"===a?d="GeoJSON":"Globe Service"===a?d="Globe Layer":"Vector Tile Service"===a?
d="Tile Layer":"netCDF"===a?d="NetCDF":"Map Service"===a?d=-1===c.indexOf("Spatiotemporal")&&(-1<c.indexOf("Hosted Service")||-1<c.indexOf("Tiled"))&&-1===c.indexOf("Relational")?"Tile Layer":"Map Image Layer":a&&-1<a.toLowerCase().indexOf("add in")?d=a.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===a?d="Big Data File Share":"Compact Tile Package"===a&&(d="Tile Package (tpkx)");return d},enumerable:!0,configurable:!0});f.prototype.readExtent=function(a){return a&&a.length?new r(a[0][0],
a[0][1],a[1][0],a[1][1]):null};Object.defineProperty(f.prototype,"iconUrl",{get:function(){var a=this.type&&this.type.toLowerCase()||"",c=this.typeKeywords||[],d=!1,b=!1,f=!1,g=!1,h=!1;0<a.indexOf("service")||"feature collection"===a||"kml"===a||"wms"===a||"wmts"===a||"wfs"===a?(d=-1<c.indexOf("Hosted Service"),"feature service"===a||"feature collection"===a||"kml"===a||"wfs"===a?(b=-1<c.indexOf("Table"),f=-1<c.indexOf("Route Layer"),g=-1<c.indexOf("Markup"),a=(h=-1!==c.indexOf("Spatiotemporal"))&&
b?"spatiotemporaltable":b?"table":f?"routelayer":g?"markup":h?"spatiotemporal":d?"featureshosted":"features"):a="map service"===a||"wms"===a||"wmts"===a?d||-1<c.indexOf("Tiled")||"wmts"===a?"maptiles":"mapimages":"scene service"===a?-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":
-1<c.indexOf("Building")?"sceneweblayerbuilding":"sceneweblayer":"image service"===a?-1<c.indexOf("Elevation 3D Layer")?"elevationlayer":-1<c.indexOf("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===a?"streamlayer":"vector tile service"===a?"vectortile":"datastore catalog service"===a?"datastorecollection":"geocoding service"===a?"geocodeservice":"geoprocessing service"===a?-1<c.indexOf("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"layers"):a="web map"===a||"cityengine web scene"===
a?"maps":"web scene"===a?-1<c.indexOf("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===a||"mobile application"===a||"application"===a||"operation view"===a||"desktop application"===a?"apps":"map document"===a||"map package"===a||"published map"===a||"scene document"===a||"globe document"===a||"basemap package"===a||"mobile basemap package"===a||"mobile map package"===a||"project package"===a||"project template"===a||"pro map"===a||"layout"===a||"layer"===a&&-1<c.indexOf("ArcGIS Pro")||
"explorer map"===a&&c.indexOf("Explorer Document")?"mapsgray":"service definition"===a||"csv"===a||"shapefile"===a||"cad drawing"===a||"geojson"===a||"360 vr experience"===a||"netcdf"===a||"administrative report"===a?"datafiles":"explorer add in"===a||"desktop add in"===a||"windows viewer add in"===a||"windows viewer configuration"===a?"appsgray":"arcgis pro add in"===a||"arcgis pro configuration"===a?"addindesktop":"rule package"===a||"file geodatabase"===a||"sqlite geodatabase"===a||"csv collection"===
a||"kml collection"===a||"windows mobile package"===a||"map template"===a||"desktop application template"===a||"gml"===a||"arcpad package"===a||"code sample"===a||"form"===a||"document link"===a||"operations dashboard add in"===a||"rules package"===a||"image"===a||"workflow manager package"===a||"explorer map"===a&&-1<c.indexOf("Explorer Mapping Application")||-1<c.indexOf("Document")?"datafilesgray":"network analysis service"===a||"geoprocessing service"===a||"geodata service"===a||"geometry service"===
a||"geoprocessing package"===a||"locator package"===a||"geoprocessing sample"===a||"workflow manager service"===a?"toolsgray":"layer"===a||"layer package"===a||"explorer layer"===a?"layersgray":"scene package"===a?"scenepackage":"mobile scene package"===a?"mobilescenepackage":"tile package"===a||"compact tile package"===a?"tilepackage":"task file"===a?"taskfile":"report template"===a?"report-template":"statistical data collection"===a?"statisticaldatacollection":"insights workbook"===a?"workbook":
"insights model"===a?"insightsmodel":"insights page"===a?"insightspage":"insights theme"===a?"insightstheme":"hub initiative"===a?"hubinitiative":"hubpage"===a?"hubpage":"hub site application"===a?"hubsite":"relational database connection"===a?"relationaldatabaseconnection":"big data file share"===a?"datastorecollection":"image collection"===a?"imagecollection":"style"===a?"style":"desktop style"===a?"desktopstyle":"dashboard"===a?"dashboard":"raster function template"===a?"rasterprocessingtemplate":
"vector tile package"===a?"vectortilepackage":"ortho mapping project"===a?"orthomappingproject":"ortho mapping template"===a?"orthomappingtemplate":"solution"===a?"solutions":"geopackage"===a?"geopackage":"deep learning package"===a?"deeplearningpackage":"real time analytic"===a?"realtimeanalytics":"big data analytic"===a?"bigdataanalytics":"feed"===a?"feed":"excalibur imagery project"===a?"excaliburimageryproject":"notebook"===a?"notebook":"storymap"===a?"storymap":"survey123 add in"===a?"survey123addin":
"mission"===a?"mission":"mission report"===a?"missionreport":"quickcapture project"===a?"quickcaptureproject":"pro report"===a?"proreport":"urban model"===a?"urbanmodel":"web experience"===a?"experiencebuilder":"web experience template"===a?"webexperiencetemplate":"workflow"===a?"workflow":"insights script"===a?"insightsscript":"kernel gateway connection"===a?"kernelgatewayconnection":"hub initiative template"===a?"hubinitiativetemplate":"storymap theme"===a?"storymaptheme":"maps";return a?m.getAssetUrl("esri/images/portal/"+
a+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service;WMTS;WMS".split(";").indexOf(this.type)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"itemUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,
"thumbnailUrl",{get:function(){var a=this.itemUrl,c=this.thumbnail;return a&&c?this.portal._normalizeUrl(a+"/info/"+c+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"userItemUrl",{get:function(){var a=this.get("portal.restUrl");if(!a)return null;var c=this.owner||this.get("portal.user.username");return c?a+"/content/users/"+(this.ownerFolder?c+"/"+this.ownerFolder:c)+"/items/"+this.id:null},enumerable:!0,configurable:!0});f.prototype.load=function(a){var b=this;
this.portal||(this.portal=t.getDefault());var f=this.portal.load(a).then(function(){return b.sourceJSON?b.sourceJSON:b.id&&b.itemUrl?b.portal._request(b.itemUrl,{signal:c.isSome(a)?a.signal:null}):{}}).then(function(a){b.sourceJSON=a;b.read(a)});this.addResolvingPromise(f);return d.resolve(this)};f.prototype.addRating=function(a){var c={method:"post",query:{}};a instanceof q&&(a=a.rating);isNaN(a)||"number"!==typeof a||(c.query.rating=a);return this.portal._request(this.itemUrl+"/addRating",c).then(function(){return new q({rating:a,
created:new Date})})};f.prototype.clone=function(){var a={access:this.access,accessInformation:this.accessInformation,applicationProxies:g.clone(this.applicationProxies),avgRating:this.avgRating,categories:g.clone(this.categories),created:g.clone(this.created),culture:this.culture,description:this.description,extent:g.clone(this.extent),groupCategories:g.clone(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:g.clone(this.modified),name:this.name,
numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:g.clone(this.screenshots),size:this.size,snippet:this.snippet,tags:g.clone(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:g.clone(this.typeKeywords),url:this.url};this.loaded&&(a.loadStatus="loaded");return(new k({sourceJSON:this.sourceJSON})).set(a)};f.prototype.createPostQuery=function(){var a=this.toJSON(),
c;for(c in a)"tags"===c&&null!==a[c]&&(a[c]=a[c].join(", ")),"typeKeywords"===c&&null!==a[c]&&(a[c]=a[c].join(", ")),"extent"===c&&a[c]&&(a[c]=JSON.stringify(a[c]));return a};f.prototype.deleteRating=function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};f.prototype.fetchData=function(c,d){void 0===c&&(c="json");return this.portal._request(this.itemUrl+"/data",a.__assign({responseType:c},d))};f.prototype.fetchRating=function(a){return this.portal._request(this.itemUrl+
"/rating",a).then(function(a){return null!=a.rating?(a.created=new Date(a.created),new q(a)):null})};f.prototype.fetchRelatedItems=function(c,d){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",a.__assign({query:c},d),"PortalItem")};f.prototype.getThumbnailUrl=function(a){var c=this.thumbnailUrl;c&&a&&(c+="\x26w\x3d"+a);return c};f.prototype.reload=function(){var a=this;return this.portal._request(this.itemUrl,{cacheBust:!0}).then(function(c){a.sourceJSON=c;a.read(c);return a})};
f.prototype.update=function(a){var c=this;return this.id?this.load().then(function(){return c.portal._signIn()}).then(function(){var d=a&&a.data,b={method:"post"};b.query=c.createPostQuery();for(var f in b.query)null===b.query[f]&&(b.query[f]="");b.query.clearEmptyFields=!0;null!=d&&("string"===typeof d?b.query.text=d:"object"===typeof d&&(b.query.text=JSON.stringify(d)));return c.portal._request(c.userItemUrl+"/update",b).then(function(){return c.reload()})}):d.reject(new l("portal:item-does-not-exist",
"The item does not exist yet and cannot be updated"))};f.prototype.updateThumbnail=function(a){var b=this;return this.id?this.load().then(function(){return b.portal._signIn()}).then(function(){var d=a.thumbnail,f=a.filename,g={method:"post"};if("string"===typeof d)h.isDataProtocol(d)?g.query={data:d}:g.query={url:h.makeAbsolute(d)},c.isSome(f)&&(g.query.filename=f);else{var e=new FormData;c.isSome(f)?e.append("file",d,f):e.append("file",d);g.body=e}return b.portal._request(b.userItemUrl+"/updateThumbnail",
g).then(function(){return b.reload()})}):d.reject(new l("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};f.prototype.fetchResources=function(c,d){void 0===c&&(c={});return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./support/resourceUtils"],a,c)})];case 1:return b=a.sent(),[2,b.fetchResources(this,c,d)]}})})};f.prototype.addResource=function(c,d,b){return a.__awaiter(this,
void 0,void 0,function(){var f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./support/resourceUtils"],a,c)})];case 1:return f=a.sent(),c.portalItem=this,[2,f.addOrUpdateResource(c,"add",d,b)]}})})};f.prototype.removeResource=function(c,d){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./support/resourceUtils"],a,c)})];case 1:b=a.sent();
if(c.portalItem&&c.portalItem.itemUrl!==this.itemUrl)throw new l("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return[2,b.removeResource(this,c,d)]}})})};f.prototype.removeAllResources=function(c){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./support/resourceUtils"],a,c)})];case 1:return d=a.sent(),[2,d.removeAllResources(this,
c)]}})})};f.prototype.resourceFromPath=function(a){return new v({portalItem:this,path:a})};f.prototype.toJSON=function(){var a=this.extent,a={created:this.created&&this.created.getTime(),description:this.description,extent:a&&[[a.xmin,a.ymin],[a.xmax,a.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 g.fixJson(a)};f.fromJSON=function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");return new k({sourceJSON:a})};f.prototype._getPostQuery=function(){var a=this.toJSON(),c;for(c in a)"tags"===c&&null!==a[c]&&(a[c]=a[c].join(", ")),"typeKeywords"===c&&null!==a[c]&&(a[c]=a[c].join(", ")),"extent"===c&&a[c]&&(a[c]=JSON.stringify(a[c]));return a};var k;a.__decorate([n.property({type:["private","shared","org","public"]})],f.prototype,"access",
void 0);a.__decorate([n.property()],f.prototype,"accessInformation",void 0);a.__decorate([n.property({json:{read:{source:"appProxies"}}})],f.prototype,"applicationProxies",void 0);a.__decorate([n.property()],f.prototype,"avgRating",void 0);a.__decorate([n.property()],f.prototype,"categories",void 0);a.__decorate([n.property({type:Date})],f.prototype,"created",void 0);a.__decorate([n.property()],f.prototype,"culture",void 0);a.__decorate([n.property()],f.prototype,"description",void 0);a.__decorate([n.property({dependsOn:["type",
"typeKeywords"],readOnly:!0})],f.prototype,"displayName",null);a.__decorate([n.property({type:r})],f.prototype,"extent",void 0);a.__decorate([n.reader("extent")],f.prototype,"readExtent",null);a.__decorate([n.property()],f.prototype,"groupCategories",void 0);a.__decorate([n.property({dependsOn:["type","typeKeywords"],readOnly:!0})],f.prototype,"iconUrl",null);a.__decorate([n.property()],f.prototype,"id",void 0);a.__decorate([n.property({dependsOn:["type"],readOnly:!0})],f.prototype,"isLayer",null);
a.__decorate([n.property()],f.prototype,"itemControl",void 0);a.__decorate([n.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],f.prototype,"itemUrl",null);a.__decorate([n.property()],f.prototype,"licenseInfo",void 0);a.__decorate([n.property({type:Date})],f.prototype,"modified",void 0);a.__decorate([n.property()],f.prototype,"name",void 0);a.__decorate([n.property()],f.prototype,"numComments",void 0);a.__decorate([n.property()],f.prototype,"numRatings",void 0);a.__decorate([n.property()],
f.prototype,"numViews",void 0);a.__decorate([n.property()],f.prototype,"owner",void 0);a.__decorate([n.property()],f.prototype,"ownerFolder",void 0);a.__decorate([n.property({type:t})],f.prototype,"portal",void 0);a.__decorate([n.property()],f.prototype,"screenshots",void 0);a.__decorate([n.property()],f.prototype,"size",void 0);a.__decorate([n.property()],f.prototype,"snippet",void 0);a.__decorate([n.property()],f.prototype,"sourceJSON",void 0);a.__decorate([n.property()],f.prototype,"tags",void 0);
a.__decorate([n.property()],f.prototype,"thumbnail",void 0);a.__decorate([n.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],f.prototype,"thumbnailUrl",null);a.__decorate([n.property()],f.prototype,"title",void 0);a.__decorate([n.property()],f.prototype,"type",void 0);a.__decorate([n.property()],f.prototype,"typeKeywords",void 0);a.__decorate([n.property()],f.prototype,"url",void 0);a.__decorate([n.property({dependsOn:["portal.restUrl","portal.user.username","owner",
"ownerFolder","id"],readOnly:!0})],f.prototype,"userItemUrl",null);return f=k=a.__decorate([n.subclass("esri.portal.PortalItem")],f)}(k.JSONSupportMixin(f))})},"esri/portal/PortalItemResource":function(){define("require exports tslib ../core/Accessor ../core/Error ../core/Logger ../core/maybe ../core/urlUtils ../core/accessorSupport/decorators @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c){var d=k.getLogger("esri.portal.PortalItemResource");return function(b){function h(a){a=
b.call(this,a)||this;a.portalItem=null;return a}a.__extends(h,b);h.prototype.normalizeCtorArgs=function(c){return c&&c.portalItem&&c.path?a.__assign(a.__assign({},c),{path:this.normalizePath(c.path,c.portalItem)}):c};Object.defineProperty(h.prototype,"path",{set:function(a){g.isSome(a)&&f.isAbsolute(a)?d.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",a)},enumerable:!0,configurable:!0});h.prototype._castPath=function(a){return this.normalizePath(a,
this.portalItem)};Object.defineProperty(h.prototype,"url",{get:function(){return this.portalItem&&this.path?this.portalItem.itemUrl+"/resources/"+this.path:null},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"itemRelativeUrl",{get:function(){return this.portalItem&&this.path?"./resources/"+this.path:null},enumerable:!0,configurable:!0});h.prototype.fetch=function(a,c){void 0===a&&(a="json");var d=this.url;if(g.isNone(d))throw new l("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");
return this.portalItem.portal._request(d,{responseType:a,signal:g.get(c,"signal")})};h.prototype.update=function(c,d){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./support/resourceUtils"],a,c)})];case 1:return b=a.sent(),[2,b.addOrUpdateResource(this,"update",c,d)]}})})};h.prototype.hasPath=function(){return g.isSome(this.path)};h.prototype.normalizePath=function(a,c){if(g.isNone(a))return a;
a=a.replace(/^\/+/,"");g.isSome(c)&&f.isAbsolute(a)&&(a=f.makeRelative(a,c.itemUrl));return a.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,"")};a.__decorate([c.property()],h.prototype,"portalItem",void 0);a.__decorate([c.property({type:String,value:null})],h.prototype,"path",null);a.__decorate([c.cast("path")],h.prototype,"_castPath",null);a.__decorate([c.property({type:String,readOnly:!0,dependsOn:["portalItem","path"]})],h.prototype,"url",null);a.__decorate([c.property({type:String,readOnly:!0,
dependsOn:["portalItem","path"]})],h.prototype,"itemRelativeUrl",null);return h=a.__decorate([c.subclass("esri.portal.PortalItemResource")],h)}(m)})},"esri/portal/PortalRating":function(){define(["require","exports","tslib","../core/Accessor","../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.created=null;a.rating=null;return a}a.__extends(g,b);a.__decorate([l.property()],g.prototype,"created",void 0);a.__decorate([l.property()],g.prototype,
"rating",void 0);return g=a.__decorate([l.subclass("esri.portal.PortalRating")],g)}(m)})},"esri/support/basemapDefinitions":function(){define(["require","exports","tslib","../assets","../intl/messages"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});b.getBasemapTitle=function(b){return a.__awaiter(this,void 0,void 0,function(){var g,f;return a.__generator(this,function(a){switch(a.label){case 0:if(!b)return[2,void 0];g=-1<b.indexOf("-vector")?b.slice(0,b.indexOf("-vector")):
b;return[4,l.loadMessageBundle("esri/t9n/basemaps")];case 1:return f=a.sent(),[2,f[b]||f[g]]}})})};b.esriBasemapDefinitions={streets:{id:"streets",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/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",thumbnailUrl:m.getAssetUrl("esri/images/basemap/dark-gray-vector.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",
styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",thumbnailUrl:m.getAssetUrl("esri/images/basemap/gray-vector.jpg"),baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",
title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",thumbnailUrl:m.getAssetUrl("esri/images/basemap/streets-vector.jpg"),baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",thumbnailUrl:m.getAssetUrl("esri/images/basemap/topo-vector.jpg"),baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",thumbnailUrl:m.getAssetUrl("esri/images/basemap/streets-night.jpg"),baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",thumbnailUrl:m.getAssetUrl("esri/images/basemap/streets-relief.jpg"),
baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",showLegend:!1,visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",
thumbnailUrl:m.getAssetUrl("esri/images/basemap/streets-navigation.jpg"),baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/webdoc/support/writeUtils":function(){define("require exports ../../core/Error ../../core/lang ../../core/maybe ../../core/object ../../core/accessorSupport/extensions/serializableProperty/writer".split(" "),
function(e,b,a,m,l,k,g){function f(a){return!("feature"!==a.type||a.url||!a.source||"memory"!==a.source.type)}Object.defineProperty(b,"__esModule",{value:!0});var c=new Set;"bing-maps open-street-map tile unknown unsupported vector-tile web-tile".split(" ").forEach(function(a){return c.add(a)});var d=new Set;"feature group tile unknown unsupported vector-tile web-tile".split(" ").forEach(function(a){return d.add(a)});b.enableRestrictedWriting=function(a){c.delete(a);d.delete(a)};b.disableRestrictedWriting=
function(a){c.add(a);d.add(a)};b.getLayerJSON=function(b,e,p){if(!("write"in b&&b.write))return p&&p.messages&&p.messages.push(new a("layer:unsupported","Layers ("+b.title+", "+b.id+") of type '"+b.declaredClass+"' cannot be persisted",{layer:b})),null;var h;p.restrictedWebMapWriting?(h="basemap"===p.layerContainerType?c:"operational-layers"===p.layerContainerType?d:null,h=l.isSome(h)?h.has(b.type)&&!f(b):!0):h=!0;if(h)return e={},b.write(e,p)?e:null;if(l.isSome(e)){p=e=m.clone(e);if(f(b)){if(h=(h=
k.getDeepValue("featureCollection.layers",p))&&h[0]&&h[0].layerDefinition)"maxScale"in b&&(h.maxScale=g.numberToJSON(b.maxScale)),"minScale"in b&&(h.minScale=g.numberToJSON(b.minScale))}else"group"!==b.type&&("maxScale"in b&&(p.maxScale=g.numberToJSON(b.maxScale)),"minScale"in b&&(p.minScale=g.numberToJSON(b.minScale)));"blendMode"in b&&(p.blendMode=b.blendMode,"normal"===p.blendMode&&delete p.blendMode);p.opacity=g.numberToJSON(b.opacity);p.title=b.title||"Layer";p.visibility=b.visible;if("legendEnabled"in
b&&"wmts"!==b.type)if(f(b)){if(p=p.featureCollection)p.showLegend=b.legendEnabled}else p.showLegend=b.legendEnabled}return e}})},"esri/Ground":function(){define("require exports tslib ./Color ./core/Collection ./core/collectionUtils ./core/compilerUtils ./core/Error ./core/JSONSupport ./core/lang ./core/Loadable ./core/loadAll ./core/Logger ./core/promiseUtils ./core/accessorSupport/decorators ./core/accessorSupport/ensureType ./ground/NavigationConstraint ./webdoc/support/opacityUtils @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w){function u(a){return"elevation"===a.type||a&&"createElevationSampler"in a}var x=p.getLogger("esri.Ground");return function(c){function b(a){var d=c.call(this,a)||this;d.opacity=1;d.surfaceColor=null;d.navigationConstraint=null;d.layers=new l;d.layers.on("after-add",function(a){a=a.item;a.parent&&a.parent!==d&&"remove"in a.parent&&a.parent.remove(a);a.parent=d;"elevation"!==a.type&&"base-elevation"!==a.type&&x.error("Layer '"+a.title+", id:"+a.id+"' of type '"+
a.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});d.layers.on("after-remove",function(a){a.item.parent=null});return d}a.__extends(b,c);h=b;b.prototype.initialize=function(){this.when().catch(function(a){x.error("#load()","Failed to load ground",a)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};b.prototype.normalizeCtorArgs=function(c){c&&"resourceInfo"in c&&(this._set("resourceInfo",c.resourceInfo),
c=a.__assign({},c),delete c.resourceInfo);return c};Object.defineProperty(b.prototype,"layers",{set:function(a){this._set("layers",k.referenceSetter(a,this._get("layers")))},enumerable:!0,configurable:!0});b.prototype.writeLayers=function(c,d,b,h){var e=[];c&&(h=a.__assign(a.__assign({},h),{layerContainerType:"ground"}),c.forEach(function(a){if("write"in a){var c={};g.typeCast(a)().write(c,h)&&e.push(c)}else h&&h.messages&&h.messages.push(new f("layer:unsupported","Layers ("+a.title+", "+a.id+") of type '"+
a.declaredClass+"' cannot be persisted in the ground",{layer:a}))}));d.layers=e};b.prototype.load=function(a){this.addResolvingPromise(this._loadFromSource(a));return r.resolve(this)};b.prototype.loadAll=function(){var a=this;return n.loadAll(this,function(c){c(a.layers)})};b.prototype.queryElevation=function(a,c){var d=this;return this._importElevationQuery().then(function(b){b=new b.ElevationQuery;var f=d.layers.filter(u).toArray();return b.queryAll(f,a,c)})};b.prototype.createElevationSampler=
function(a,c){var d=this.layers.filter(u).toArray();return 1===d.length?d[0].createElevationSampler(a,c):this._importElevationQuery().then(function(b){return(new b.ElevationQuery).createSamplerAll(d,a,c)})};b.prototype.clone=function(){var a={opacity:this.opacity,surfaceColor:d.clone(this.surfaceColor),navigationConstraint:d.clone(this.navigationConstraint),layers:this.layers.slice()};this.loaded&&(a.loadStatus="loaded");return(new h({resourceInfo:this.resourceInfo})).set(a)};b.prototype.read=function(a,
d){this.resourceInfo||this._set("resourceInfo",{data:a,context:d});c.prototype.read.call(this,a,d)};b.prototype._loadFromSource=function(a){var c=this.resourceInfo;return c?this._loadLayersFromJSON(c.data,c.context,a):r.resolve(null)};b.prototype._loadLayersFromJSON=function(a,c,d){var b=this,f=c&&c.origin||"web-scene",g=c&&c.portal||null,h=c&&c.url||null;return(new Promise(function(a,c){e(["./portal/support/layersCreator"],a,c)})).then(function(c){r.throwIfAborted(d);var e=[];a.layers&&Array.isArray(a.layers)&&
e.push(c.populateOperationalLayers(b.layers,a.layers,{context:{origin:f,url:h,portal:g,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"}));return r.eachAlways(e)}).then(function(){})};b.prototype._importElevationQuery=function(){return new Promise(function(a,c){e(["./layers/support/ElevationQuery"],a,c)})};var h;a.__decorate([t.property({json:{read:!1}})],b.prototype,"layers",null);a.__decorate([t.writer("layers")],b.prototype,"writeLayers",null);a.__decorate([t.property({readOnly:!0})],
b.prototype,"resourceInfo",void 0);a.__decorate([t.property({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:v.Integer,read:{reader:w.transparencyToOpacity,source:"transparency"},write:{writer:function(a,c){c.transparency=w.opacityToTransparency(a)},target:"transparency"}}})],b.prototype,"opacity",void 0);a.__decorate([t.property({type:m,json:{type:[v.Integer],write:function(a,c){c.surfaceColor=a.toJSON().slice(0,3)}}})],b.prototype,"surfaceColor",void 0);a.__decorate([t.property({type:q.NavigationConstraint,
json:{write:!0}})],b.prototype,"navigationConstraint",void 0);return b=h=a.__decorate([t.subclass("esri.Ground")],b)}(c.JSONSupportMixin(h))})},"esri/Color":function(){define(["require","exports","./core/mathUtils","./core/maybe","./core/accessorSupport/ensureType"],function(e,b,a,m,l){function k(c){return a.clamp(l.ensureInteger(c),0,255)}function g(a,d,b){a=Number(a);return isNaN(a)?b:a<d?d:a>b?b:a}function f(a,d,b){0>b&&++b;1<b&&--b;var c=6*b;return 1>c?a+(d-a)*c:1>2*b?d:2>3*b?a+(d-a)*(2/3-b)*
6:a}e=function(){function a(a){this.b=this.g=this.r=255;this.a=1;a&&this.setColor(a)}a.blendColors=function(c,b,f,g){void 0===g&&(g=new a);g.r=Math.round(c.r+(b.r-c.r)*f);g.g=Math.round(c.g+(b.g-c.g)*f);g.b=Math.round(c.b+(b.b-c.b)*f);g.a=c.a+(b.a-c.a)*f;return g._sanitize()};a.fromRgb=function(c,b){var d=c.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(d){c=d[2].split(/\s*,\s*/);d=d[1];if("rgb"===d&&3===c.length||"rgba"===d&&4===c.length)return d=c[0],"%"===d.charAt(d.length-1)?(d=
c.map(function(a){return 2.56*parseFloat(a)}),4===c.length&&(d[3]=parseFloat(c[3])),a.fromArray(d,b)):a.fromArray(c.map(function(a){return parseFloat(a)}),b);if("hsl"===d&&3===c.length||"hsla"===d&&4===c.length){var d=(parseFloat(c[0])%360+360)%360/360,g=parseFloat(c[1])/100,h=parseFloat(c[2])/100,g=.5>=h?h*(g+1):h+g-h*g,h=2*h-g,d=[256*f(h,g,d+1/3),256*f(h,g,d),256*f(h,g,d-1/3),1];4===c.length&&(d[3]=parseFloat(c[3]));return a.fromArray(d,b)}}return null};a.fromHex=function(c,b){void 0===b&&(b=new a);
var d=4===c.length?4:8,f=(1<<d)-1,g=Number("0x"+c.substr(1));if(isNaN(g))return null;["b","g","r"].forEach(function(a){var c=g&f;g>>=d;b[a]=4===d?17*c:c});b.a=1;return b};a.fromArray=function(c,b){void 0===b&&(b=new a);b._set(Number(c[0]),Number(c[1]),Number(c[2]),Number(c[3]));isNaN(b.a)&&(b.a=1);return b._sanitize()};a.fromString=function(c,b){var d=a.named[c];return d&&a.fromArray(d,b)||a.fromRgb(c,b)||a.fromHex(c,b)};a.fromJSON=function(c){return c&&new a([c[0],c[1],c[2],c[3]/255])};a.toUnitRGB=
function(a){return m.isSome(a)?[a.r/255,a.g/255,a.b/255]:null};a.toUnitRGBA=function(a){return m.isSome(a)?[a.r/255,a.g/255,a.b/255,null!=a.a?a.a:1]:null};Object.defineProperty(a.prototype,"isBright",{get:function(){return 127<=.299*this.r+.587*this.g+.114*this.b},enumerable:!0,configurable:!0});a.prototype.setColor=function(c){"string"===typeof c?a.fromString(c,this):Array.isArray(c)?a.fromArray(c,this):(this._set(c.r,c.g,c.b,c.a),c instanceof a||this._sanitize());return this};a.prototype.toRgb=
function(){return[this.r,this.g,this.b]};a.prototype.toRgba=function(){return[this.r,this.g,this.b,this.a]};a.prototype.toHex=function(){var a=this.r.toString(16),c=this.g.toString(16),b=this.b.toString(16);return"#"+(2>a.length?"0"+a:a)+(2>c.length?"0"+c:c)+(2>b.length?"0"+b:b)};a.prototype.toCss=function(a){void 0===a&&(a=!1);var c=this.r+", "+this.g+", "+this.b;return a?"rgba("+c+", "+this.a+")":"rgb("+c+")"};a.prototype.toString=function(){return this.toCss(!0)};a.prototype.toJSON=function(){return this.toArray()};
a.prototype.toArray=function(a){void 0===a&&(a=0);var c=k(this.r),d=k(this.g),b=k(this.b);return 0===a||1!==this.a?[c,d,b,k(255*this.a)]:[c,d,b]};a.prototype.clone=function(){return new a(this.toRgba())};a.prototype.hash=function(){return this.r<<24|this.g<<16|this.b<<8|255*this.a};a.prototype._sanitize=function(){this.r=Math.round(g(this.r,0,255));this.g=Math.round(g(this.g,0,255));this.b=Math.round(g(this.b,0,255));this.a=g(this.a,0,1);return this};a.prototype._set=function(a,c,b,f){this.r=a;this.g=
c;this.b=b;this.a=f};a.named={transparent:[0,0,0,0],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],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],rebeccapurple:[102,51,153],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 a}();e.prototype.declaredClass="esri.Color";return e})},"esri/core/mathUtils":function(){define(["require",
"exports"],function(e,b){function a(a,b,c){return a<b?b:a>c?c:a}function m(a,b,c){return a+(b-a)*c}function l(a){k[0]=a;return k[0]}Object.defineProperty(b,"__esModule",{value:!0});var k=new Float32Array(1);b.isFinite=Number.isFinite||function(a){return"number"===typeof a&&window.isFinite(a)};b.isNaN=Number.isNaN||function(a){return a!==a};b.nextHighestPowerOfTwo=function(a){--a;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1};b.clamp=a;b.glClamp=function(a,b,c){return Math.min(Math.max(a,b),c)};b.isPowerOfTwo=
function(a){return 0===(a&a-1)};b.nextHighestPowerOfTen=function(a){return Math.pow(10,Math.ceil(Math.LOG10E*Math.log(a)))};b.sign=Math.sign||function(a){return+(0<a)-+(0>a)||+a};b.log2=Math.log2||function(a){return Math.log(a)/Math.LN2};b.lerp=m;b.scale=function(a,b,c,d,h){return m(d,h,(a-b)/(c-b))};b.deg2rad=function(a){return a*Math.PI/180};b.rad2deg=function(a){return 180*a/Math.PI};b.reciprocalClamped=function(a,b){void 0===b&&(b=1E-6);return(0>a?-1:1)/Math.max(Math.abs(a),b)};b.acosClamped=
function(b){return Math.acos(a(b,-1,1))};b.asinClamped=function(b){return Math.asin(a(b,-1,1))};b.floatEqualRelative=function(a,f,c){void 0===c&&(c=1E-6);if(b.isNaN(a)||b.isNaN(f))return!1;if(a===f)return!0;var d=Math.abs(a-f),g=Math.abs(a),e=Math.abs(f);if(0===a||0===f||1E-12>g&&1E-12>e){if(d>.01*c)return!1}else if(d/(g+e)>c)return!1;return!0};b.floatEqualAbsolute=function(a,f,c){void 0===c&&(c=1E-6);return b.isNaN(a)||b.isNaN(f)?!1:(a>f?a-f:f-a)<=c};b.clampFloat32=function(a){return l(Math.max(-b.NUMBER_MAX_FLOAT32,
Math.min(a,b.NUMBER_MAX_FLOAT32)))};b.NUMBER_MAX_FLOAT32=l(3.4028234663852886E38)})},"esri/ground/NavigationConstraint":function(){define(["require","exports","tslib","../core/JSONSupport","../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function g(a){a=b.call(this,a)||this;a.type="none";return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({type:this.type})};var f;a.__decorate([l.enumeration({none:"none",stayAbove:"stay-above"})],
g.prototype,"type",void 0);return g=f=a.__decorate([l.subclass("esri.ground.NavigationConstraint")],g)}(m.JSONSupport);b.NavigationConstraint=e})},"esri/webdoc/support/opacityUtils":function(){define(["require","exports","../../core/accessorSupport/ensureType"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.opacityToTransparency=function(b){b=a.ensureInteger(100*(1-b));return Math.max(0,Math.min(b,100))};b.transparencyToOpacity=function(a){return Math.max(0,Math.min(1-a/100,1))}})},
"esri/core/CollectionFlattener":function(){define("require exports tslib ./Collection ./Handles ./accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a._handles=new l;a.root=null;return a}a.__extends(f,b);f.prototype.initialize=function(){var a=this;this._handles.add(this.rootCollectionNames.map(function(c){return a.watch("root."+c,function(){return a.updateCollections()},!0)}));this.updateCollections()};f.prototype.destroy=function(){this.root=
null;this.refresh();this._handles.destroy();this._handles=null};f.prototype.updateCollections=function(){var a=this;this._collections=this.rootCollectionNames.map(function(c){return a.get("root."+c)}).filter(function(a){return null!=a});this.refresh()};f.prototype.refresh=function(){var a=this,d=this._handles;d.remove("collections");this.removeAll();for(var b=[],f=[],g=0,e=this._collections;g<e.length;g++)this._processCollection(b,f,e[g]);this.push.apply(this,f);for(f=0;f<b.length;f++)d.add(b[f].on("after-changes",
function(){return a.refresh()}),"collections")};f.prototype._createNewInstance=function(a){return new m(a)};f.prototype._processCollection=function(a,d,b){var c=this;b&&(a.push(b),b.forEach(function(b){b&&(d.push(b),c._processCollection(a,d,c.getChildrenFunction(b)))}))};a.__decorate([k.property()],f.prototype,"rootCollectionNames",void 0);a.__decorate([k.property()],f.prototype,"root",void 0);a.__decorate([k.property()],f.prototype,"getChildrenFunction",void 0);return f=a.__decorate([k.subclass("esri.core.CollectionFlattener")],
f)}(m)})},"esri/core/Handles":function(){define("require exports tslib ./Accessor ./Collection ./accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a._groups=new Map;return a}a.__extends(f,b);f.prototype.destroy=function(){this.removeAll()};Object.defineProperty(f.prototype,"size",{get:function(){var a=0;this._groups.forEach(function(c){a+=c.length});return a},enumerable:!0,configurable:!0});f.prototype.add=function(a,d){var c=this;
if(!this._isHandle(a)&&!Array.isArray(a)&&!l.isCollection(a))return this;var b=this._getOrCreateGroup(d);Array.isArray(a)||l.isCollection(a)?a.forEach(function(a){return c._isHandle(a)&&b.push(a)}):b.push(a);this.notifyChange("size");return this};f.prototype.forEach=function(a,d){if("function"===typeof a)this._groups.forEach(function(c){return c.forEach(a)});else{var c=this._getGroup(a);c&&c.forEach(d)}};f.prototype.has=function(a){return this._groups.has(this._ensureGroupKey(a))};f.prototype.remove=
function(a){if(Array.isArray(a)||l.isCollection(a))return a.forEach(this.remove,this),this;if(!this.has(a))return this;for(var c=this._getGroup(a),b=0;b<c.length;b++)c[b].remove();this._deleteGroup(a);this.notifyChange("size");return this};f.prototype.removeAll=function(){this._groups.forEach(function(a){for(var c=0;c<a.length;c++)a[c].remove()});this._groups.clear();this.notifyChange("size");return this};f.prototype._isHandle=function(a){return a&&!!a.remove};f.prototype._getOrCreateGroup=function(a){if(this.has(a))return this._getGroup(a);
var c=[];this._groups.set(this._ensureGroupKey(a),c);return c};f.prototype._getGroup=function(a){return this._groups.get(this._ensureGroupKey(a))};f.prototype._deleteGroup=function(a){return this._groups.delete(this._ensureGroupKey(a))};f.prototype._ensureGroupKey=function(a){return a||"_default_"};a.__decorate([k.property({readOnly:!0})],f.prototype,"size",null);return f=a.__decorate([k.subclass("esri.core.Handles")],f)}(m)})},"esri/support/basemapUtils":function(){define("require exports ../Basemap ../core/Collection ../core/Logger ../core/urlUtils ../core/accessorSupport/ensureType ./basemapDefinitions".split(" "),
function(e,b,a,m,l,k,g,f){function c(c,d){var b;if("string"===typeof c){if(!(c in f.esriBasemapDefinitions))return d=Object.keys(f.esriBasemapDefinitions).map(function(a){return'"'+a+'"'}).join(", "),x.warn("Unable to find basemap definition for: "+c+". Try one of these: "+d),null;d&&(b=d[c]);b||(b=a.fromId(c),d&&(d[c]=b))}else b=g.default(a,c);return b}function d(a,c){var d=new m;a.forEach(function(a){var b=c.find(function(c){return w(p(a),p(c))})||a;d.some(function(a){return a===b})?d.push(a):d.push(b)});
return d}function h(a){return a?!a.loaded&&a.resourceInfo?r(a.resourceInfo.data):{baseLayers:n(a.baseLayers),referenceLayers:n(a.referenceLayers)}:null}function n(a){return(m.isCollection(a)?a.toArray():a).map(p)}function p(a){return{type:a.type,url:u("urlTemplate"in a&&a.urlTemplate||a.url||"styleUrl"in a&&a.styleUrl),minScale:"minScale"in a&&null!=a.minScale?a.minScale:0,maxScale:"maxScale"in a&&null!=a.maxScale?a.maxScale:0,opacity:null!=a.opacity?a.opacity:1,visible:null!=a.visible?!!a.visible:
!0}}function r(a){return a?{baseLayers:t(a.baseMapLayers.filter(function(a){return!a.isReference})),referenceLayers:t(a.baseMapLayers.filter(function(a){return a.isReference}))}:null}function t(a){return a.map(function(a){var c;switch(a.layerType){case "VectorTileLayer":c="vector-tile";break;case "ArcGISTiledMapServiceLayer":c="tile";break;default:c="unknown"}return{type:c,url:u(a.templateUrl||a.urlTemplate||a.styleUrl||a.url),minScale:null!=a.minScale?a.minScale:0,maxScale:null!=a.maxScale?a.maxScale:
0,opacity:null!=a.opacity?a.opacity:1,visible:null!=a.visibility?!!a.visibility:!0}})}function v(a,c,d){return null!=a!==(null!=c)?"not-equal":a?q(a.baseLayers,c.baseLayers)?q(a.referenceLayers,c.referenceLayers)?"equal":d.mustMatchReferences?"not-equal":"base-layers-equal":"not-equal":"equal"}function q(a,c){if(a.length!==c.length)return!1;for(var d=0;d<a.length;d++)if(!w(a[d],c[d]))return!1;return!0}function w(a,c){return a.type===c.type&&a.url===c.url&&a.minScale===c.minScale&&a.maxScale===c.maxScale&&
a.visible===c.visible&&a.opacity===c.opacity}function u(a){return a?k.normalize(a).replace(/^\s*https?:/i,"").toLowerCase():""}Object.defineProperty(b,"__esModule",{value:!0});var x=l.getLogger("esri.support.basemapUtils");b.createCache=function(){return{}};b.ensureType=c;b.clonePreservingTiledLayers=function(b,f){void 0===f&&(f=null);b=c(b);if(!b)return null;var g=new a({id:b.id,title:b.title,baseLayers:b.baseLayers.slice(),referenceLayers:b.referenceLayers.slice()});f&&(g.baseLayers=d(g.baseLayers,
f.baseLayers),g.referenceLayers=d(g.referenceLayers,f.referenceLayers));g.load().catch(function(){});g.portalItem=b.portalItem;return g};b.getWellKnownBasemapId=function(a){var c=null;a=h(a);for(var d in f.esriBasemapDefinitions){var b=r(f.esriBasemapDefinitions[d]),b=v(a,b,{mustMatchReferences:!1});if("equal"===b){c=d;break}"base-layers-equal"===b&&(c=d)}return c};b.contentEquals=function(a,c){if(a===c)return!0;a=h(a);c=h(c);return"equal"===v(a,c,{mustMatchReferences:!0})}})},"esri/support/groundUtils":function(){define(["require",
"exports","../Ground","../core/Logger","../core/accessorSupport/ensureType"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});var k=m.getLogger("esri.support.groundUtils");b.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"},"world-topobathymetry":{id:"worldTopoBathymetry",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer",
layerType:"ArcGISTiledElevationServiceLayer"}};b.ensureType=function(g){var f;"string"===typeof g?g in b.groundElevationLayers?f=new a({resourceInfo:{data:{layers:[b.groundElevationLayers[g]]}}}):k.warn("Unable to find ground definition for: "+g+'. Try "world-elevation"'):f=l.default(a,g);return f}})},"esri/support/LayersMixin":function(){define("require exports tslib ../core/Collection ../core/collectionUtils ../core/Logger ../core/promiseUtils ../core/accessorSupport/decorators ../layers/Layer".split(" "),
function(e,b,a,m,l,k,g,f,c){function d(a,c,b){var f;if(a)for(var g=0,h=a.length;g<h;g++)if(f=a.getItemAt(g),f[c]===b||f&&"group"===f.type&&(f=d(f.layers,c,b)))return f}Object.defineProperty(b,"__esModule",{value:!0});var h=k.getLogger("esri.support.LayersMixin");b.LayersMixin=function(b){return function(b){function e(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var d=b.apply(this,a)||this;d.layers=new m;d.layers.on("after-add",function(a){a=a.item;a.parent&&a.parent!==d&&"remove"in
a.parent&&a.parent.remove(a);a.parent=d;d.layerAdded(a);"elevation"===a.type&&h.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as an operational layer and will therefore be ignored.")});d.layers.on("after-remove",function(a){a=a.item;a.parent=null;d.layerRemoved(a)});return d}a.__extends(e,b);e.prototype.destroy=function(){this.layers.drain(this.layerRemoved,this)};Object.defineProperty(e.prototype,"layers",{set:function(a){this._set("layers",l.referenceSetter(a,this._get("layers")))},
enumerable:!0,configurable:!0});e.prototype.add=function(a,d){var b=this,f=this.layers;d=f.getNextIndex(d);a instanceof c?(a.parent===this&&this.reorder(a,d),f.add(a,d)):g.isPromiseLike(a)?a.then(function(a){b.destroyed||b.add(a,d)}):h.error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")};e.prototype.addMany=function(a,c){var d=this,b=this.layers;c=b.getNextIndex(c);a.slice().forEach(function(a){a.parent===d?d.reorder(a,c):(b.add(a,c),c+=1)})};e.prototype.findLayerById=
function(a){return d(this.layers,"id",a)};e.prototype.findLayerByUid=function(a){return d(this.layers,"uid",a)};e.prototype.remove=function(a){return this.layers.remove(a)};e.prototype.removeMany=function(a){return this.layers.removeMany(a)};e.prototype.removeAll=function(){return this.layers.removeAll()};e.prototype.reorder=function(a,c){return this.layers.reorder(a,c)};e.prototype.layerAdded=function(a){};e.prototype.layerRemoved=function(a){};a.__decorate([f.property()],e.prototype,"layers",null);
return e=a.__decorate([f.subclass("esri.support.LayersMixin")],e)}(b)}})},"esri/layers/Layer":function(){define("require exports tslib ../config ../geometry ../request ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/Logger ../core/urlUtils ../core/accessorSupport/decorators @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p){var r=0,t=h.getLogger("esri.layers.Layer");return function(c){function d(){var a=null!==c&&c.apply(this,arguments)||this;
a.attributionDataUrl=null;a.fullExtent=new l.Extent(-180,-90,180,90,l.SpatialReference.WGS84);a.legendEnabled=!0;a.listMode="show";a.blendMode="normal";a.opacity=1;a.parent=null;a.popupEnabled=!0;a.attributionVisible=!0;a.spatialReference=l.SpatialReference.WGS84;a.title=null;a.type=null;a.url=null;a.visible=!0;return a}a.__extends(d,c);d.fromArcGISServerUrl=function(c){return a.__awaiter(this,void 0,void 0,function(){var d,b,f;return a.__generator(this,function(a){switch(a.label){case 0:return d=
"string"===typeof c?{url:c}:c,[4,new Promise(function(a,c){e(["./support/arcgisLayers"],a,c)})];case 1:b=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,b.fromUrl(d)];case 3:return[2,a.sent()];case 4:throw f=a.sent(),t.error("#fromArcGISServerUrl({ url: '"+d.url+"'})","Failed to create layer from arcgis server url",f),f;case 5:return[2]}})})};d.fromPortalItem=function(c){return a.__awaiter(this,void 0,void 0,function(){var d,b,f,g,h,p;return a.__generator(this,function(a){switch(a.label){case 0:return d=
"portalItem"in c?c:{portalItem:c},[4,new Promise(function(a,c){e(["../portal/support/portalLayers"],a,c)})];case 1:b=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,b.fromItem(d)];case 3:return[2,a.sent()];case 4:throw f=a.sent(),h=(g=d&&d.portalItem)&&g.id||"unset",p=g&&g.portal&&g.portal.url||m.portalUrl,t.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+p+"', id: '"+h+"')",f),f;case 5:return[2]}})})};d.prototype.initialize=function(){var a=this;this.when().catch(function(c){h.getLogger(a.declaredClass).error("#load()",
"Failed to load layer (title: '"+a.title+"', id: '"+a.id+"')",c)})};Object.defineProperty(d.prototype,"hasAttributionData",{get:function(){return null!=this.attributionDataUrl},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"id",{get:function(){return Date.now().toString(16)+"-layer-"+r++},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"parsedUrl",{get:function(){var a=this._get("url");return a?n.urlToObject(a):null},enumerable:!0,configurable:!0});d.prototype.fetchAttributionData=
function(){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(a){switch(a.label){case 0:return c=this.attributionDataUrl,this.hasAttributionData&&c?[4,k(c,{query:{f:"json"},responseType:"json"})]:[3,2];case 1:return d=a.sent(),[2,d.data];case 2:throw new g("layer:no-attribution-data","Layer does not have attribution data");}})})};a.__decorate([p.property({type:String})],d.prototype,"attributionDataUrl",void 0);a.__decorate([p.property({type:l.Extent})],d.prototype,
"fullExtent",void 0);a.__decorate([p.property({readOnly:!0,dependsOn:["attributionDataUrl"]})],d.prototype,"hasAttributionData",null);a.__decorate([p.property({type:String})],d.prototype,"id",null);a.__decorate([p.property({type:Boolean,nonNullable:!0})],d.prototype,"legendEnabled",void 0);a.__decorate([p.property({type:["show","hide","hide-children"]})],d.prototype,"listMode",void 0);a.__decorate([p.property({type:"average color-burn color-dodge color darken destination-atop destination-in destination-out destination-over difference exclusion hard-light hue invert lighten lighter luminosity minus multiply normal overlay plus reflect saturation screen soft-light source-atop source-in source-out vivid-light xor".split(" "),
nonNullable:!0})],d.prototype,"blendMode",void 0);a.__decorate([p.property({type:Number,range:{min:0,max:1},nonNullable:!0})],d.prototype,"opacity",void 0);a.__decorate([p.property()],d.prototype,"parent",void 0);a.__decorate([p.property({readOnly:!0,dependsOn:["url"]})],d.prototype,"parsedUrl",null);a.__decorate([p.property({type:Boolean})],d.prototype,"popupEnabled",void 0);a.__decorate([p.property({type:Boolean})],d.prototype,"attributionVisible",void 0);a.__decorate([p.property({type:l.SpatialReference})],
d.prototype,"spatialReference",void 0);a.__decorate([p.property({type:String})],d.prototype,"title",void 0);a.__decorate([p.property({type:String,readOnly:!0,json:{read:!1}})],d.prototype,"type",void 0);a.__decorate([p.property()],d.prototype,"url",void 0);a.__decorate([p.property({type:Boolean,nonNullable:!0})],d.prototype,"visible",void 0);return d=a.__decorate([p.subclass("esri.layers.Layer")],d)}(f.EventedMixin(c.IdentifiableMixin(d)))})},"esri/core/Identifiable":function(){define(["require",
"exports","tslib","./accessorSupport/decorators"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});var l=0;b.IdentifiableMixin=function(b){return function(b){function f(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];a=b.apply(this,a)||this;Object.defineProperty(a,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++});return a}a.__extends(f,b);return f=a.__decorate([m.subclass("esri.core.Identifiable")],f)}(b)};e=function(b){function g(){return null!==
b&&b.apply(this,arguments)||this}a.__extends(g,b);return g=a.__decorate([m.subclass("esri.core.Identifiable")],g)}(b.IdentifiableMixin(function(){return function(){}}()));b.Identifiable=e})},"esri/Viewpoint":function(){define("require exports tslib ./Camera ./geometry ./core/JSONSupport ./core/accessorSupport/decorators ./geometry/support/jsonUtils".split(" "),function(e,b,a,m,l,k,g,f){function c(){return{enabled:!this.camera}}return function(d){function b(a){a=d.call(this,a)||this;a.rotation=0;a.scale=
0;a.targetGeometry=null;a.camera=null;return a}a.__extends(b,d);e=b;b.prototype.castRotation=function(a){a%=360;0>a&&(a+=360);return a};b.prototype.clone=function(){return new e({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry?this.targetGeometry.clone():null,camera:this.camera?this.camera.clone():null})};var e;a.__decorate([g.property({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:c}}}}})],b.prototype,"rotation",void 0);
a.__decorate([g.cast("rotation")],b.prototype,"castRotation",null);a.__decorate([g.property({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:c}}}}})],b.prototype,"scale",void 0);a.__decorate([g.property({types:l.geometryTypes,json:{read:f.fromJSON,write:!0,origins:{"web-scene":{read:f.fromJSON,write:{overridePolicy:c}}}}})],b.prototype,"targetGeometry",void 0);a.__decorate([g.property({type:m,json:{write:!0}})],b.prototype,"camera",void 0);return b=
e=a.__decorate([g.subclass("esri.Viewpoint")],b)}(k.JSONSupport)})},"esri/Camera":function(){define("require exports tslib ./core/JSONSupport ./core/mathUtils ./core/accessorSupport/decorators ./core/accessorSupport/ensureType ./geometry/Point ./views/3d/support/mathUtils".split(" "),function(e,b,a,m,l,k,g,f,c){return function(d){function b(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=d.apply(this,a)||this;a.position=new f([0,0,0]);a.heading=0;a.tilt=0;a.fov=55;return a}a.__extends(b,
d);e=b;b.prototype.normalizeCtorArgs=function(a,c,d,b){a&&"object"===typeof a&&("x"in a||Array.isArray(a))&&(a={position:a},null!=c&&(a.heading=c),null!=d&&(a.tilt=d),null!=b&&(a.fov=b));return a};b.prototype.writePosition=function(a,c,d,b){var f=a.clone();f.x=g.ensureNumber(a.x||0);f.y=g.ensureNumber(a.y||0);f.z=a.hasZ?g.ensureNumber(a.z||0):a.z;c[d]=f.write(null,b)};b.prototype.readPosition=function(a,c){var d=new f;d.read(a,c);d.x=g.ensureNumber(d.x||0);d.y=g.ensureNumber(d.y||0);d.z=d.hasZ?g.ensureNumber(d.z||
0):d.z;return d};b.prototype.equals=function(a){return a?this.tilt===a.tilt&&this.heading===a.heading&&this.fov===a.fov&&this.position.equals(a.position):!1};b.prototype.clone=function(){return new e({position:this.position.clone(),heading:this.heading,tilt:this.tilt,fov:this.fov})};var e;a.__decorate([k.property({type:f,json:{write:{isRequired:!0}}})],b.prototype,"position",void 0);a.__decorate([k.writer("position")],b.prototype,"writePosition",null);a.__decorate([k.reader("position")],b.prototype,
"readPosition",null);a.__decorate([k.property({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),k.cast(function(a){return c.cyclicalDeg.normalize(g.ensureNumber(a))})],b.prototype,"heading",void 0);a.__decorate([k.property({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),k.cast(function(a){return l.clamp(g.ensureNumber(a),-180,180)})],b.prototype,"tilt",void 0);a.__decorate([k.property({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],b.prototype,"fov",void 0);return b=e=a.__decorate([k.subclass("esri.Camera")],
b)}(m.JSONSupport)})},"esri/views/3d/support/mathUtils":function(){define(["require","exports","../../../core/mathUtils","../../../core/libs/gl-matrix-2/vec3","../../../core/libs/gl-matrix-2/vec3f64"],function(e,b,a,m,l){function k(a){for(var c in a){var d=a[c];d instanceof Function&&(a[c]=d.bind(a))}return a}Object.defineProperty(b,"__esModule",{value:!0});b.cosCapped=function(a,c){return a>c?Math.cos(c):Math.cos(a)};b.fovx2fovy=function(a,c,d){return 2*Math.atan(d*Math.tan(.5*a)/c)};b.fovy2fovx=
function(a,c,d){return 2*Math.atan(c*Math.tan(.5*a)/d)};b.maxScale=function(a){return Math.sqrt(Math.max(Math.max(a[0]*a[0]+a[4]*a[4]+a[8]*a[8],a[1]*a[1]+a[5]*a[5]+a[9]*a[9]),a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))};b.scaleFromMatrix=function(a,c){m.vec3.set(a,Math.sqrt(c[0]*c[0]+c[4]*c[4]+c[8]*c[8]),Math.sqrt(c[1]*c[1]+c[5]*c[5]+c[9]*c[9]),Math.sqrt(c[2]*c[2]+c[6]*c[6]+c[10]*c[10]));return a};b.makeOrthonormal=function(a,c,d){d=d||a;var b=m.vec3.dot(a,c);m.vec3.set(d,a[0]-b*c[0],a[1]-b*c[1],a[2]-b*c[2]);
m.vec3.normalize(d,d)};b.tangentFrame=function(a,c,d){Math.abs(a[0])>Math.abs(a[1])?m.vec3.set(c,0,1,0):m.vec3.set(c,1,0,0);m.vec3.cross(d,a,c);m.vec3.normalize(c,c);m.vec3.cross(c,d,a);m.vec3.normalize(d,d)};b.moduloPositive=function(a,c){return(a%c+c)%c};b.cartesianToSpherical=function(c,d){var b=m.vec3.length(c),f=a.asinClamped(c[2]/b);m.vec3.set(d,b,f,Math.atan2(c[1]/b,c[0]/b));return d};b.sphericalToCartesian=function(a,c){var d=a[0],b=a[1];a=a[2];var f=Math.cos(b);m.vec3.set(c,d*f*Math.cos(a),
d*f*Math.sin(a),d*Math.sin(b))};b.directionFromTo=function(a,c,d){var b=d[0]-c[0],f=d[1]-c[1];c=d[2]-c[2];d=b*b+f*f+c*c;if(!d)return a[0]=0,a[1]=0,a[2]=0,a;d=1/Math.sqrt(d);a[0]=b*d;a[1]=f*d;a[2]=c*d;return a};b.bilerp=function(a,c,d,b,f,g){a+=(c-a)*f;return a+(d+(b-d)*f-a)*g};b.slerp=function(a,c,b,f){void 0===f&&(f=l.vec3f64.create());var g=m.vec3.length(a),e=m.vec3.length(c),p=m.vec3.dot(a,c)/(g*e);if(.9999999999999999>p){var p=Math.acos(p),n=((1-b)*g+b*e)/Math.sin(p),e=n/e*Math.sin(b*p);m.vec3.scale(d,
a,n/g*Math.sin((1-b)*p));m.vec3.scale(h,c,e);return m.vec3.add(f,d,h)}return m.vec3.lerp(f,a,c,b)};b.angle=function(b,f,g){b=m.vec3.normalize(d,b);f=m.vec3.normalize(h,f);var e=a.acosClamped(m.vec3.dot(b,f));return g&&(b=m.vec3.cross(c,b,f),0>m.vec3.dot(b,g))?-e:e};b.makePiecewiseLinearFunction=function(a){var c=a.length;return function(d){if(d<=a[0][0])return a[0][1];if(d>=a[c-1][0])return a[c-1][1];for(var b=1;d>a[b][0];)b++;var f=a[b][0];d=(f-d)/(f-a[b-1][0]);return d*a[b-1][1]+(1-d)*a[b][1]}};
b.vectorEquals=function(a,c){if(null==a||null==c)return a!==c;if(a.length!==c.length)return!1;for(var d=0;d<a.length;d++)if(a[d]!==c[d])return!1;return!0};e=function(){function c(a,c){this.min=a;this.max=c;this.range=c-a}c.prototype.ndiff=function(a,c){void 0===c&&(c=0);return Math.ceil((a-c)/this.range)*this.range+c};c.prototype._normalize=function(a,c,d,b,f){void 0===b&&(b=0);void 0===f&&(f=!1);d-=b;d<a?d+=this.ndiff(a-d):d>c&&(d-=this.ndiff(d-c));f&&d===c&&(d=a);return d+b};c.prototype.normalize=
function(a,c,d){void 0===c&&(c=0);void 0===d&&(d=!1);return this._normalize(this.min,this.max,a,c,d)};c.prototype.clamp=function(c,d){void 0===d&&(d=0);return a.clamp(c-d,this.min,this.max)+d};c.prototype.monotonic=function(a,c,d){return a<c?c:c+this.ndiff(a-c,d)};c.prototype.minimalMonotonic=function(a,c,d){return this._normalize(a,a+this.range,c,d)};c.prototype.center=function(a,c,d){c=this.monotonic(a,c,d);return this.normalize((a+c)/2,d)};c.prototype.diff=function(a,c,d){return this.monotonic(a,
c,d)-a};c.prototype.shortestSignedDiff=function(a,c){a=this.normalize(a);c=this.normalize(c);var d=c-a;a=c<a?this.minimalMonotonic(a,c)-a:c-this.minimalMonotonic(c,a);return Math.abs(d)<Math.abs(a)?d:a};c.prototype.contains=function(a,c,d){c=this.minimalMonotonic(a,c);d=this.minimalMonotonic(a,d);return d>a&&d<c};return c}();b.Cyclical=e;b.planeFromPoints=function(a,c,d,b){m.vec3.subtract(g,c,a);m.vec3.subtract(f,d,a);m.vec3.cross(b,g,f);m.vec3.normalize(b,b);b[3]=-m.vec3.dot(a,b)};var g=l.vec3f64.create(),
f=l.vec3f64.create();b.cyclical2PI=k(new e(0,2*Math.PI));b.cyclicalPI=k(new e(-Math.PI,Math.PI));b.cyclicalDeg=k(new e(0,360));var c=l.vec3f64.create(),d=l.vec3f64.create(),h=l.vec3f64.create()})},"esri/core/libs/gl-matrix-2/vec3":function(){define(["require","exports","./math/vec3"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.vec3=a})},"esri/core/libs/gl-matrix-2/math/vec3":function(){define(["require","exports","../factories/vec3f64","./common"],function(e,b,a,m){function l(a){var c=
a[0],d=a[1];a=a[2];return Math.sqrt(c*c+d*d+a*a)}function k(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];return a}function g(a,c,d){a[0]=c[0]-d[0];a[1]=c[1]-d[1];a[2]=c[2]-d[2];return a}function f(a,c,d){a[0]=c[0]*d[0];a[1]=c[1]*d[1];a[2]=c[2]*d[2];return a}function c(a,c,d){a[0]=c[0]/d[0];a[1]=c[1]/d[1];a[2]=c[2]/d[2];return a}function d(a,c){var d=c[0]-a[0],b=c[1]-a[1];a=c[2]-a[2];return Math.sqrt(d*d+b*b+a*a)}function h(a,c){var d=c[0]-a[0],b=c[1]-a[1];a=c[2]-a[2];return d*d+b*b+a*a}function n(a){var c=
a[0],d=a[1];a=a[2];return c*c+d*d+a*a}function p(a,c){var d=c[0],b=c[1],f=c[2],d=d*d+b*b+f*f;0<d&&(d=1/Math.sqrt(d),a[0]=c[0]*d,a[1]=c[1]*d,a[2]=c[2]*d);return a}function r(a,c){return a[0]*c[0]+a[1]*c[1]+a[2]*c[2]}Object.defineProperty(b,"__esModule",{value:!0});b.length=l;b.copy=k;b.set=function(a,c,d,b){a[0]=c;a[1]=d;a[2]=b;return a};b.add=function(a,c,d){a[0]=c[0]+d[0];a[1]=c[1]+d[1];a[2]=c[2]+d[2];return a};b.subtract=g;b.multiply=f;b.divide=c;b.ceil=function(a,c){a[0]=Math.ceil(c[0]);a[1]=Math.ceil(c[1]);
a[2]=Math.ceil(c[2]);return a};b.floor=function(a,c){a[0]=Math.floor(c[0]);a[1]=Math.floor(c[1]);a[2]=Math.floor(c[2]);return a};b.min=function(a,c,d){a[0]=Math.min(c[0],d[0]);a[1]=Math.min(c[1],d[1]);a[2]=Math.min(c[2],d[2]);return a};b.max=function(a,c,d){a[0]=Math.max(c[0],d[0]);a[1]=Math.max(c[1],d[1]);a[2]=Math.max(c[2],d[2]);return a};b.round=function(a,c){a[0]=Math.round(c[0]);a[1]=Math.round(c[1]);a[2]=Math.round(c[2]);return a};b.scale=function(a,c,d){a[0]=c[0]*d;a[1]=c[1]*d;a[2]=c[2]*d;
return a};b.scaleAndAdd=function(a,c,d,b){a[0]=c[0]+d[0]*b;a[1]=c[1]+d[1]*b;a[2]=c[2]+d[2]*b;return a};b.distance=d;b.squaredDistance=h;b.squaredLength=n;b.negate=function(a,c){a[0]=-c[0];a[1]=-c[1];a[2]=-c[2];return a};b.inverse=function(a,c){a[0]=1/c[0];a[1]=1/c[1];a[2]=1/c[2];return a};b.normalize=p;b.dot=r;b.cross=function(a,c,d){var b=c[0],f=c[1];c=c[2];var g=d[0],h=d[1];d=d[2];a[0]=f*d-c*h;a[1]=c*g-b*d;a[2]=b*h-f*g;return a};b.lerp=function(a,c,d,b){var f=c[0],g=c[1];c=c[2];a[0]=f+b*(d[0]-f);
a[1]=g+b*(d[1]-g);a[2]=c+b*(d[2]-c);return a};b.hermite=function(a,c,d,b,f,g){var h=g*g,e=h*(2*g-3)+1,p=h*(g-2)+g,n=h*(g-1);g=h*(3-2*g);a[0]=c[0]*e+d[0]*p+b[0]*n+f[0]*g;a[1]=c[1]*e+d[1]*p+b[1]*n+f[1]*g;a[2]=c[2]*e+d[2]*p+b[2]*n+f[2]*g;return a};b.bezier=function(a,c,d,b,f,g){var h=1-g,e=h*h,p=g*g,n=e*h,e=3*g*e,h=3*p*h;g*=p;a[0]=c[0]*n+d[0]*e+b[0]*h+f[0]*g;a[1]=c[1]*n+d[1]*e+b[1]*h+f[1]*g;a[2]=c[2]*n+d[2]*e+b[2]*h+f[2]*g;return a};b.random=function(a,c){c=c||1;var d=2*m.RANDOM()*Math.PI,b=2*m.RANDOM()-
1,f=Math.sqrt(1-b*b)*c;a[0]=Math.cos(d)*f;a[1]=Math.sin(d)*f;a[2]=b*c;return a};b.transformMat4=function(a,c,d){var b=c[0],f=c[1];c=c[2];a[0]=d[0]*b+d[4]*f+d[8]*c+d[12];a[1]=d[1]*b+d[5]*f+d[9]*c+d[13];a[2]=d[2]*b+d[6]*f+d[10]*c+d[14];return a};b.transformMat3=function(a,c,d){var b=c[0],f=c[1];c=c[2];a[0]=b*d[0]+f*d[3]+c*d[6];a[1]=b*d[1]+f*d[4]+c*d[7];a[2]=b*d[2]+f*d[5]+c*d[8];return a};b.transformQuat=function(a,c,d){var b=d[0],f=d[1],g=d[2],h=c[0],e=c[1];c=c[2];var p=f*c-g*e,n=g*h-b*c,t=b*e-f*h;
d=2*d[3];a[0]=h+p*d+2*(f*t-g*n);a[1]=e+n*d+2*(g*p-b*t);a[2]=c+t*d+2*(b*n-f*p);return a};b.rotateX=function(a,c,d,b){var f=[],g=[];f[0]=c[0]-d[0];f[1]=c[1]-d[1];f[2]=c[2]-d[2];g[0]=f[0];g[1]=f[1]*Math.cos(b)-f[2]*Math.sin(b);g[2]=f[1]*Math.sin(b)+f[2]*Math.cos(b);a[0]=g[0]+d[0];a[1]=g[1]+d[1];a[2]=g[2]+d[2];return a};b.rotateY=function(a,c,d,b){var f=[],g=[];f[0]=c[0]-d[0];f[1]=c[1]-d[1];f[2]=c[2]-d[2];g[0]=f[2]*Math.sin(b)+f[0]*Math.cos(b);g[1]=f[1];g[2]=f[2]*Math.cos(b)-f[0]*Math.sin(b);a[0]=g[0]+
d[0];a[1]=g[1]+d[1];a[2]=g[2]+d[2];return a};b.rotateZ=function(a,c,d,b){var f=[],g=[];f[0]=c[0]-d[0];f[1]=c[1]-d[1];f[2]=c[2]-d[2];g[0]=f[0]*Math.cos(b)-f[1]*Math.sin(b);g[1]=f[0]*Math.sin(b)+f[1]*Math.cos(b);g[2]=f[2];a[0]=g[0]+d[0];a[1]=g[1]+d[1];a[2]=g[2]+d[2];return a};b.angle=function(a,c){k(t,a);k(v,c);p(t,t);p(v,v);a=r(t,v);return 1<a?0:-1>a?Math.PI:Math.acos(a)};var t=a.create(),v=a.create();b.str=function(a){return"vec3("+a[0]+", "+a[1]+", "+a[2]+")"};b.exactEquals=function(a,c){return a[0]===
c[0]&&a[1]===c[1]&&a[2]===c[2]};b.equals=function(a,c){var d=a[0],b=a[1];a=a[2];var f=c[0],g=c[1];c=c[2];return Math.abs(d-f)<=m.EPSILON*Math.max(1,Math.abs(d),Math.abs(f))&&Math.abs(b-g)<=m.EPSILON*Math.max(1,Math.abs(b),Math.abs(g))&&Math.abs(a-c)<=m.EPSILON*Math.max(1,Math.abs(a),Math.abs(c))};b.sub=g;b.mul=f;b.div=c;b.dist=d;b.sqrDist=h;b.len=l;b.sqrLen=n})},"esri/core/libs/gl-matrix-2/factories/vec3f64":function(){define(["require","exports"],function(e,b){function a(){return[0,0,0]}function m(){return[1,
1,1]}function l(){return[1,0,0]}function k(){return[0,1,0]}function g(){return[0,0,1]}Object.defineProperty(b,"__esModule",{value:!0});b.create=a;b.clone=function(a){return[a[0],a[1],a[2]]};b.fromValues=function(a,c,d){return[a,c,d]};b.fromArray=function(b){for(var c=a(),d=Math.min(3,b.length),f=0;f<d;++f)c[f]=b[f];return c};b.createView=function(a,c){return new Float64Array(a,c,3)};b.zeros=function(){return a()};b.ones=m;b.unitX=l;b.unitY=k;b.unitZ=g;b.ZEROS=a();b.ONES=m();b.UNIT_X=l();b.UNIT_Y=
k();b.UNIT_Z=g()})},"esri/core/libs/gl-matrix-2/math/common":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.EPSILON=1E-6;b.RANDOM=Math.random;var a=Math.PI/180,m=180/Math.PI;b.toRadian=function(b){return b*a};b.toDegree=function(a){return a*m};b.equals=function(a,e){return Math.abs(a-e)<=b.EPSILON*Math.max(1,Math.abs(a),Math.abs(e))}})},"esri/core/libs/gl-matrix-2/vec3f64":function(){define(["require","exports","./factories/vec3f64"],function(e,
b,a){Object.defineProperty(b,"__esModule",{value:!0});b.vec3f64=a})},"esri/layers/mixins/OperationalLayer":function(){define("require exports tslib ../../core/Error ../../core/accessorSupport/decorators ../../core/accessorSupport/read ../../core/accessorSupport/write ./operationalLayers ../support/commonProperties @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});b.OperationalLayer=function(d){return function(d){function b(){var a=
null!==d&&d.apply(this,arguments)||this;a.title="Layer";return a}a.__extends(b,d);b.prototype.writeListMode=function(a,c,d,b){b&&"ground"===b.layerContainerType?c[d]=a:a&&g.willPropertyWrite(this,d,{},b)&&(c[d]=a)};b.prototype.writeOperationalLayerType=function(a,c){a&&(c.layerType=a)};b.prototype.writeTitle=function(a,c){c.title=a||"Layer"};b.prototype.read=function(a,c){var b=this;c&&(c.layer=this);k.readLoadable(this,a,function(c){return d.prototype.read.call(b,a,c)},c)};b.prototype.write=function(c,
b){if(b&&b.origin){var g=b.origin+"/"+(b.layerContainerType||"operational-layers"),h=f.supportedTypes[g],h=h&&h[this.operationalLayerType];"ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===g&&(h=!1);if(!h)return b.messages&&b.messages.push(new m("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' are not supported in the context of '"+g+"'",{layer:this})),null}c=d.prototype.write.call(this,c,a.__assign(a.__assign({},
b),{layer:this}));b=!!b&&!!b.messages&&!!b.messages.filter(function(a){return a instanceof m&&"web-document-write:property-required"===a.name}).length;return!this.url&&b?null:c};b.prototype.beforeSave=function(){};a.__decorate([l.property({json:{read:!1,write:!1,origins:{"web-map":{default:"normal",read:!0,write:!0}}}})],b.prototype,"blendMode",void 0);a.__decorate([l.property({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],
b.prototype,"id",void 0);a.__decorate([l.property({json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}})],b.prototype,"listMode",void 0);a.__decorate([l.writer("listMode")],b.prototype,"writeListMode",null);a.__decorate([l.property({type:String,readOnly:!0,json:{write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],b.prototype,"operationalLayerType",void 0);a.__decorate([l.writer("operationalLayerType")],b.prototype,"writeOperationalLayerType",null);a.__decorate([l.property(c.opacity)],
b.prototype,"opacity",void 0);a.__decorate([l.property({type:String,json:{write:{ignoreOrigin:!0,allowNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],b.prototype,"title",void 0);a.__decorate([l.writer("title")],b.prototype,"writeTitle",null);a.__decorate([l.property({type:Boolean,json:{name:"visibility",origins:{"web-document":{name:"visibility",default:!0},"portal-item":{name:"visibility",read:{source:["visible","visibility"]}}}}})],b.prototype,
"visible",void 0);return b=a.__decorate([l.subclass("esri.layers.mixins.OperationalLayer")],b)}(d)}})},"esri/layers/mixins/operationalLayers":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.supportedTypes={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,
GroupLayer:!0,IntegratedMeshLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,VectorTileLayer:!0,WMS:!0,KML:!0,RasterDataLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,
ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISFeatureLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0,CSV:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,VectorTileLayer:!0,WFS:!0,SubtypeGroupLayer:!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,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"portal-item/operational-layers":{ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}}})},"esri/layers/support/commonProperties":function(){define("require exports tslib ../../core/accessorSupport/utils ../../core/accessorSupport/write ../../support/persistableUrlUtils ../../symbols/support/ElevationInfo ../../webdoc/support/opacityUtils".split(" "),function(e,b,a,m,l,k,g,f){Object.defineProperty(b,
"__esModule",{value:!0});b.screenSizePerspectiveEnabled={type:Boolean,value:!0,json:{origins:{"web-scene":{read:{source:["id","url","layerType"],reader:function(a,d){if(null==d.screenSizePerspective&&"defaults"===this.originOf("screenSizePerspectiveEnabled"))m.getProperties(this).store.set("screenSizePerspectiveEnabled",!1,0);else return d.screenSizePerspective}},write:{ignoreOrigin:!0,target:"screenSizePerspective",writer:function(a,d,b,f){"defaults"===this.originOf("screenSizePerspectiveEnabled")&&
a?d[b]=a:l.willPropertyWrite(this,"screenSizePerspectiveEnabled",{},f)&&(d[b]=a)}}}}}};b.popupEnabled={type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:function(a,d){return!d.disablePopup}},write:{target:"disablePopup",writer:function(a,d,b){d[b]=!a}}}};b.labelsVisible={type:Boolean,value:!0,json:{read:{source:"showLabels"},write:{target:"showLabels"}}};b.url={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:k.write}}};b.legendEnabled=
{type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}};b.elevationInfo={value:null,type:g,json:{origins:{service:{read:{source:"elevationInfo"},write:{target:"elevationInfo",enabled:!1}}},read:{source:"layerDefinition.elevationInfo"},write:{target:"layerDefinition.elevationInfo"}}};b.readOnlyService=function(a){return{type:a,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}};b.opacity={type:Number,json:{origins:{"web-document":{default:1,
write:!0,read:!0},"portal-item":{write:!0}}}};b.opacityDrawingInfo=a.__assign(a.__assign({},b.opacity),{json:a.__assign(a.__assign({},b.opacity.json),{origins:{"web-document":a.__assign(a.__assign({},b.opacity.json.origins["web-document"]),{write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}})},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:function(a,d,b){if((!b||"service"===b.origin)&&d.drawingInfo&&
void 0!==d.drawingInfo.transparency)return f.transparencyToOpacity(d.drawingInfo.transparency);if(d.layerDefinition&&d.layerDefinition.drawingInfo&&void 0!==d.layerDefinition.drawingInfo.transparency)return f.transparencyToOpacity(d.layerDefinition.drawingInfo.transparency)}}})})})},"esri/symbols/support/ElevationInfo":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/maybe ../../core/accessorSupport/decorators ./FeatureExpressionInfo ./unitConversionUtils".split(" "),
function(e,b,a,m,l,k,g,f,c){var d=m.strict()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),h=new m.JSONMap({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});return function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.offset=null;return a}a.__extends(e,b);n=e;e.prototype.readFeatureExpressionInfo=function(a,c){if(null!=a)return a;if(c.featureExpression&&
0===c.featureExpression.value)return{expression:"0"}};e.prototype.writeFeatureExpressionInfo=function(a,c,d,b){c[d]=a.write(null,b);"0"===a.expression&&(c.featureExpression={value:0})};Object.defineProperty(e.prototype,"mode",{get:function(){return this._isOverridden("mode")?this._get("mode"):k.isSome(this.offset)||this.featureExpressionInfo?"relative-to-ground":"on-the-ground"},set:function(a){this._override("mode",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"unit",{set:function(a){this._set("unit",
a)},enumerable:!0,configurable:!0});e.prototype.write=function(a,c){return this.offset||this.mode||this.featureExpressionInfo||this.unit?b.prototype.write.call(this,a,c):null};e.prototype.clone=function(){return new n({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})};var n;a.__decorate([g.property({type:f,json:{write:!0}})],e.prototype,"featureExpressionInfo",void 0);a.__decorate([g.reader("featureExpressionInfo",
["featureExpressionInfo","featureExpression"])],e.prototype,"readFeatureExpressionInfo",null);a.__decorate([g.writer("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],e.prototype,"writeFeatureExpressionInfo",null);a.__decorate([g.property({type:d.apiValues,dependsOn:["offset","featureExpressionInfo"],nonNullable:!0,json:{type:d.jsonValues,read:d.read,write:{writer:d.write,isRequired:!0}}})],e.prototype,"mode",null);a.__decorate([g.property({type:Number,
json:{write:!0}})],e.prototype,"offset",void 0);a.__decorate([g.property({type:c.supportedUnits,json:{type:String,read:h.read,write:h.write}})],e.prototype,"unit",null);return e=n=a.__decorate([g.subclass("esri.layers.support.ElevationInfo")],e)}(l.JSONSupport)})},"esri/symbols/support/FeatureExpressionInfo":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators ../../layers/support/fieldUtils".split(" "),function(e,b,a,m,l,k){return function(b){function f(){return null!==
b&&b.apply(this,arguments)||this}a.__extends(f,b);c=f;f.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2,k.collectArcadeFieldNames(c,b,this.expression)]})})};f.prototype.clone=function(){return new c({expression:this.expression,title:this.title})};var c;a.__decorate([l.property({type:String,json:{write:!0}})],f.prototype,"expression",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],f.prototype,
"title",void 0);return f=c=a.__decorate([l.subclass("esri.layers.support.FeatureExpressionInfo")],f)}(m.JSONSupport)})},"esri/layers/support/fieldUtils":function(){define("require exports tslib @dojo/framework/shim/array ../../core/Error ../../core/maybe ../../core/object ../../core/promiseUtils ../../core/SetUtils ./domains ../../support/arcadeOnDemand @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){function n(a,c,d){if(a)for(var b=0;b<a.length;b++){var f=a[b],h=g.getDeepValue(f,
c);(h=h&&"function"!==typeof h&&v(d,h))&&g.setDeepValue(f,h.name,c)}}function p(a,d){if(!a||!d)return[];M.clear();r(M,a,d);return c.valuesOfSet(M).sort()}function r(a,c,d){if(d)if(c&&c.length)if(m.includes(d,"*"))for(d=0;d<c.length;d++)a.add(c[d].name);else for(var b=0;b<d.length;b++)f=d[b],t(a,c,f);else if(m.includes(d,"*"))a.clear(),a.add("*");else for(c=0;c<d.length;c++){var f=d[c];a.add(f)}}function t(a,c,d){c&&c.length?(c=v(c,d))&&a.add(c.name):"string"===typeof d&&a.add(d)}function v(a,c){if("string"!==
typeof c)return null;if(null!=a){c=c.toLowerCase();for(var d=0;d<a.length;d++){var b=a[d];if(b&&b.name.toLowerCase()===c)return b}}return null}function q(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g,e,p,n;return a.__generator(this,function(a){switch(a.label){case 0:return b?[4,h.loadArcade()]:[2];case 1:f=a.sent().arcadeUtils;g=f.extractFieldNames(b);e=0;for(p=g;e<p.length;e++)n=p[e],t(c,d,n);return[2]}})})}function w(a,c){for(var d=0;d<a.length;d++){var b=a[d];if(b&&b.valueType&&
b.valueType===c)return b.name}return null}function u(c,d){return a.__awaiter(this,void 0,void 0,function(){var b,f;return a.__generator(this,function(a){if(!d)return[2];b=d.fields;return(f=g.getDeepValue("elevationInfo.featureExpressionInfo",d))?[2,f.collectRequiredFields(c,b)]:[2]})})}function x(c,d,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){b.outStatistic.onStatisticValueExpression?q(c,d,b.outStatistic.onStatisticValueExpression):c.add(b.outStatistic.onStatisticField);
return[2]})})}function y(c,d){return a.__awaiter(this,void 0,void 0,function(){var b,g;return a.__generator(this,function(a){switch(a.label){case 0:return b=d.labelingInfo,g=d.fields,b&&b.length?[4,f.all(b.map(function(a){return z(c,g,a)}))]:[2];case 1:return a.sent(),[2]}})})}function z(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g,h,e,p;return a.__generator(this,function(a){switch(a.label){case 0:if(!b)return[2];f=b.getLabelExpression();g=b.where;return"arcade"!==f.type?[3,2]:
[4,q(c,d,f.expression)];case 1:return a.sent(),[3,3];case 2:(h=f.expression.match(/{[^}]*}/g))&&h.forEach(function(a){t(c,d,a.slice(1,-1))}),a.label=3;case 3:return e=/['"]+/g,g&&(p=g.split(" "),3===p.length&&t(c,d,p[0].replace(e,"")),7===p.length&&(t(c,d,p[0].replace(e,"")),t(c,d,p[4].replace(e,"")))),[2]}})})}function A(a){return"number"===typeof a&&!isNaN(a)&&isFinite(a)}function C(a){return null===a||A(a)}function B(a){return null===a||Q(a)}function E(a){return null!=a&&"string"===typeof a}function D(a){return null===
a||E(a)}function I(){return!0}function J(a,c){var d;switch(a.type){case "date":case "integer":case "long":case "small-integer":case "esriFieldTypeDate":case "esriFieldTypeInteger":case "esriFieldTypeLong":case "esriFieldTypeSmallInteger":d=a.nullable?B:Q;break;case "double":case "single":case "esriFieldTypeSingle":case "esriFieldTypeDouble":d=a.nullable?C:A;break;case "string":case "esriFieldTypeString":d=a.nullable?D:E;break;default:d=I}return 1===arguments.length?d:d(c)}function F(a){return null!=
a&&N.has(a.type)}function G(a,c){return a.nullable&&null===c?null:F(a)&&!K(a.type,Number(c))?Z.OUT_OF_RANGE:J(a,c)?a.domain?d.validateDomainValue(a.domain,c):null:T.INVALID_TYPE}function K(a,c){return(a="string"===typeof a?L(a):a)?a.isInteger?Q(c)&&c>=a.min&&c<=a.max:c>=a.min&&c<=a.max:!1}function L(a){switch(a){case "esriFieldTypeSmallInteger":case "small-integer":return b.smallIntegerRange;case "esriFieldTypeInteger":case "integer":return b.integerRange;case "esriFieldTypeSingle":case "single":return b.singleRange;
case "esriFieldTypeDouble":case "double":return b.doubleRange}}function H(a,c,d){if(!c||!c.attributes||!a){if(k.isSome(d))for(var b=0;b<a.length;b++)c=a[b],d.add(c);return!0}for(var b=c.attributes,f=!1,g=0;g<a.length;g++)if(c=a[g],!(c in b))if(f=!0,k.isSome(d))d.add(c);else break;return f}Object.defineProperty(b,"__esModule",{value:!0});b.rendererFields="field field2 field3 normalizationField rotationInfo.field proportionalSymbolInfo.field proportionalSymbolInfo.normalizationField colorInfo.field colorInfo.normalizationField".split(" ");
b.visualVariableFields=["field","normalizationField"];b.fixRendererFields=function(a,c){if(null!=a&&null!=c){var d=0;for(a=Array.isArray(a)?a:[a];d<a.length;d++){var f=a[d];n(b.rendererFields,f,c);if("visualVariables"in f&&f.visualVariables)for(var g=0,f=f.visualVariables;g<f.length;g++)n(b.visualVariableFields,f[g],c)}}};b.fixTimeInfoFields=function(a,c){if(null!=a&&null!=c)if("startField"in a){var d=v(c,a.startField);c=v(c,a.endField);a.startField=d&&d.name||null;a.endField=c&&c.name||null}else d=
v(c,a.startTimeField),c=v(c,a.endTimeField),a.startTimeField=d&&d.name||null,a.endTimeField=c&&c.name||null};var M=new Set;b.fixFields=p;b.collectFields=r;b.collectField=t;b.unpackFieldNames=function(a,c){return c&&a?m.includes(c,"*")?a.map(function(a){return a.name}):c:[]};b.packFields=function(a,c,d){void 0===d&&(d=1);if(!c||!a)return[];if(m.includes(c,"*"))return["*"];c=p(a,c);return c.length/a.length>=d?["*"]:c};b.getField=v;b.hasField=function(a,c){if(!a||!c||"string"!==typeof c)return!1;c=c.toLowerCase();
for(var d=0;d<a.length;d++){var b=a[d];if(b&&b.name.toLowerCase()===c)return!0}return!1};b.collectArcadeFieldNames=q;b.getDisplayFieldName=function(a){var c=a.displayField;a=a.fields;if(c)return c;if(!a||!a.length)return null;if(!(c=w(a,"name-or-title")||w(a,"unique-identifier")||w(a,"type-or-category")))a:{for(c=0;c<a.length;c++){var d=a[c];if(d&&d.name){var b=d.name.toLowerCase();if(-1<b.indexOf("name")||-1<b.indexOf("title")){c=d.name;break a}}}c=null}return c};b.getElevationFields=function(d){return a.__awaiter(this,
void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:if(!d)return[2,[]];b=new Set;return[4,u(b,d)];case 1:return a.sent(),[2,c.valuesOfSet(b).sort()]}})})};b.collectElevationFields=u;b.collectFeatureReductionFields=function(c,d,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return d&&b&&"cluster"===b.type&&b.fields?[4,f.all(b.fields.map(function(a){return x(c,d.fields,a)}))]:[2];case 1:return a.sent(),
[2]}})})};b.collectFilterFields=function(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g;return a.__generator(this,function(a){switch(a.label){case 0:if(!d||!b||!(b.where&&"1\x3d1"!==b.where||b.timeExtent))return[2];d.timeInfo&&b.timeExtent&&r(c,d.fields,[d.timeInfo.startField,d.timeInfo.endField]);return b.where?[4,new Promise(function(a,c){e(["../../core/sql/WhereClause"],a,c)})]:[3,2];case 1:f=a.sent();g=f.WhereClause.create(b.where,d.fieldsIndex);if(!g.isStandardized)throw new l("fieldUtils:collectFilterFields",
"Where clause is not standardized");r(c,d.fields,g.fieldNames);a.label=2;case 2:return[2]}})})};b.getTimeFields=function(c){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){return c?(d="timeInfo"in c&&c.timeInfo)?[2,p(c.fields,[c.trackIdField,d.startField,d.endField])]:[2,[]]:[2,[]]})})};b.getFeatureEditFields=function(a){if(!a)return[];var c="editFieldsInfo"in a&&a.editFieldsInfo;return c?p(a.fields,[c&&c.creatorField,c&&c.creationDateField,c&&c.editorField,
c&&c.editDateField]):[]};b.getFeatureGeometryFields=function(a){if(!a)return[];var c="geometryProperties"in a&&a.geometryProperties;return c?p(a.fields,[c&&c.shapeAreaFieldName,c&&c.shapeLengthFieldName]):[]};b.getLabelingFields=function(d){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:if(!d)return[2,[]];b=new Set;return[4,y(b,d)];case 1:return a.sent(),[2,c.valuesOfSet(b).sort()]}})})};b.collectLabelingFields=y;b.getFieldDefaultValue=
function(a){var c=a.defaultValue;if(void 0!==c&&J(a,c))return c;if(a.nullable)return null};var Q=function(){return"isInteger"in Number?Number.isInteger:function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}}();b.isValueMatchingFieldType=J;b.numericTypes=["integer","small-integer","single","double"];var N=c.SetFromValues(a.__spreadArrays(b.numericTypes,["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]));b.isNumericField=F;b.isStringField=
function(a){return null!=a&&("string"===a.type||"esriFieldTypeString"===a.type)};b.isDateField=function(a){return null!=a&&("date"===a.type||"esriFieldTypeDate"===a.type)};b.isValidFieldValue=function(a,c){return null===G(a,c)};var Z;(Z=b.NumericRangeValidationError||(b.NumericRangeValidationError={})).OUT_OF_RANGE="numeric-range-validation-error::out-of-range";var T;(T=b.TypeValidationError||(b.TypeValidationError={})).INVALID_TYPE="type-validation-error::invalid-type";b.sanitizeNullFieldValue=function(a){return null==
a||"number"===typeof a&&isNaN(a)?null:a};b.validateFieldValue=G;b.isNumberInRange=K;b.getFieldRange=function(a){var c=d.getDomainRange(a.domain);if(c)return c;if(F(a))return L(a.type)};b.getNumericTypeForValue=function(a){if(!A(a))return null;if(Q(a)){if(a>=b.smallIntegerRange.min&&a<=b.smallIntegerRange.max)return"esriFieldTypeSmallInteger";if(a>=b.integerRange.min&&a<=b.integerRange.max)return"esriFieldTypeInteger"}return a>=b.singleRange.min&&a<=b.singleRange.max?"esriFieldTypeSingle":"esriFieldTypeDouble"};
b.smallIntegerRange={min:-32768,max:32767,isInteger:!0};b.integerRange={min:-2147483648,max:2147483647,isInteger:!0};b.singleRange={min:-3.4E38,max:1.2E38,isInteger:!1};b.doubleRange={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};b.validationErrorToString=function(a,c,b){switch(a){case d.DomainValidationError.INVALID_CODED_VALUE:return"Value "+b+" is not in the coded domain - field: "+c.name+", domain: "+JSON.stringify(c.domain);case d.DomainValidationError.VALUE_OUT_OF_RANGE:return"Value "+
b+" is out of the range of valid values - field: "+c.name+", domain: "+JSON.stringify(c.domain);case T.INVALID_TYPE:return"Value "+b+" is not a valid value for the field type - field: "+c.name+", type: "+c.type+", nullable: "+c.nullable;case Z.OUT_OF_RANGE:return a=L(c.type),"Value "+b+" is out of range for the number type - field: "+c.name+", type: "+c.type+", value range is "+a.min+" to "+a.max}};b.featureHasFields=function(a,c){return!H(a,c,null)};b.populateMissingFields=H;b.getExpressionFields=
function(d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g,h,e;return a.__generator(this,function(a){switch(a.label){case 0:f=new Set,g=0,h=b,a.label=1;case 1:if(!(g<h.length))return[3,4];e=h[g];return[4,q(f,d.fields,e)];case 2:a.sent(),a.label=3;case 3:return g++,[3,1];case 4:return[2,c.valuesOfSet(f).sort()]}})})}})},"esri/layers/support/domains":function(){define("require exports ../../core/compilerUtils ./CodedValueDomain ./Domain ./InheritedDomain ./RangeDomain".split(" "),function(e,
b,a,m,l,k,g){function f(a,b){switch(a.type){case "range":var d="range"in a?a.range[1]:a.maxValue;if(+b<("range"in a?a.range[0]:a.minValue)||+b>d)return c.VALUE_OUT_OF_RANGE;break;case "coded-value":case "codedValue":if(null==a.codedValues||a.codedValues.every(function(a){return null==a||a.code!==b}))return c.INVALID_CODED_VALUE}return null}Object.defineProperty(b,"__esModule",{value:!0});b.CodedValueDomain=m;b.DomainBase=l;b.InheritedDomain=k;b.RangeDomain=g;var c;(function(a){a.VALUE_OUT_OF_RANGE=
"domain-validation-error::value-out-of-range";a.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"})(c=b.DomainValidationError||(b.DomainValidationError={}));b.isValidDomainValue=function(a,c){return null===f(a,c)};b.validateDomainValue=f;b.types={key:"type",base:l,typeMap:{range:g,"coded-value":m,inherited:k}};b.getDomainRange=function(a){if(a&&"range"===a.type)return{min:"range"in a?a.range[0]:a.minValue,max:"range"in a?a.range[1]:a.maxValue}};b.fromJSON=function(c){if(!c||!c.type)return null;
switch(c.type){case "range":return g.fromJSON(c);case "codedValue":return m.fromJSON(c);case "inherited":return k.fromJSON(c);default:a.neverReached(c)}return null}})},"esri/layers/support/CodedValueDomain":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ./CodedValue ./Domain".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.codedValues=null;a.type="coded-value";return a}a.__extends(c,b);d=c;c.prototype.getName=
function(a){var c=null;if(this.codedValues){var d=String(a);this.codedValues.some(function(a){String(a.code)===d&&(c=a.name);return!!c})}return c};c.prototype.clone=function(){return new d({codedValues:m.clone(this.codedValues),name:this.name})};var d;a.__decorate([l.property({type:[k.default],json:{write:!0}})],c.prototype,"codedValues",void 0);a.__decorate([l.enumeration({codedValue:"coded-value"})],c.prototype,"type",void 0);return c=d=a.__decorate([l.subclass("esri.layers.support.CodedValueDomain")],
c)}(g)})},"esri/layers/support/CodedValue":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function g(a){a=b.call(this,a)||this;a.name=null;a.code=null;return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({name:this.name,code:this.code})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"name",void 0);a.__decorate([l.property({type:[String,
Number],json:{write:!0}})],g.prototype,"code",void 0);return g=f=a.__decorate([l.subclass("esri.layers.support.CodedValue")],g)}(m.JSONSupport);b.CodedValue=e;b.default=e})},"esri/layers/support/Domain":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){var g=new m.default({inherited:"inherited",codedValue:"coded-value",range:"range"});return function(b){function c(a){a=b.call(this,a)||this;a.name=
null;a.type=null;return a}a.__extends(c,b);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"name",void 0);a.__decorate([k.enumeration(g)],c.prototype,"type",void 0);return c=a.__decorate([k.subclass("esri.layers.support.Domain")],c)}(l.JSONSupport)})},"esri/layers/support/InheritedDomain":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Domain"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.type="inherited";
return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f};var f;a.__decorate([m.enumeration({inherited:"inherited"})],g.prototype,"type",void 0);return g=f=a.__decorate([m.subclass("esri.layers.support.InheritedDomain")],g)}(l)})},"esri/layers/support/RangeDomain":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Domain"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.maxValue=null;a.minValue=null;a.type="range";
return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({maxValue:this.maxValue,minValue:this.minValue,name:this.name})};var f;a.__decorate([m.property({type:Number,json:{type:[Number],read:{source:"range",reader:function(a,d){return d.range&&d.range[1]}},write:{enabled:!1,overridePolicy:function(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer:function(a,d,b){d[b]=[this.minValue||0,a]}}}})],g.prototype,"maxValue",void 0);a.__decorate([m.property({type:Number,
json:{type:[Number],read:{source:"range",reader:function(a,d){return d.range&&d.range[0]}},write:{target:"range",writer:function(a,d,b){d[b]=[a,this.maxValue||0]}}}})],g.prototype,"minValue",void 0);a.__decorate([m.enumeration({range:"range"})],g.prototype,"type",void 0);return g=f=a.__decorate([m.subclass("esri.layers.support.RangeDomain")],g)}(l)})},"esri/support/arcadeOnDemand":function(){define("require exports tslib ../geometry ../core/maybe ../core/promiseUtils @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k){function g(){return a.__awaiter(this,void 0,void 0,function(){var c=this;return a.__generator(this,function(d){f||(f=function(){return a.__awaiter(c,void 0,void 0,function(){var c;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,c){e(["./arcadeUtils"],a,c)})];case 1:return c=a.sent(),[4,c.arcade.load()];case 2:return a.sent(),[2,{arcade:c.arcade,arcadeUtils:c,Dictionary:c.Dictionary,Feature:c.arcadeFeature}]}})})}());return[2,f]})})}
Object.defineProperty(b,"__esModule",{value:!0});var f;b.loadArcade=g;b.createLabelExpression=function(a,b,f){return c.create(a,b,f,null,["$feature"])};b.createVVExpression=function(a,b,f){return c.create(a,b,f,null,["$feature","$view"])};b.createRendererExpression=function(a,b,f){return c.create(a,b,f,null,["$feature","$view"])};b.createDictionaryExpression=function(a,b,f,g){return c.create(a,b,f,g,["$feature","$view"])};var c=function(){function c(a,c,d,b,f,g,e){this.evaluate=b;this._syntaxTree=
d;this._arcade=a;this._arcadeDictionary=c;this._arcadeFeature=f;this._fields=g;this._spatialReference=e;this._referencesGeometry=a.scriptTouchesGeometry(this._syntaxTree);this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}c.create=function(d,b,f,e,t,v){return a.__awaiter(this,void 0,void 0,function(){var h,p,n,r,y,z,A,C,B,E,D,I,J,F,G;return a.__generator(this,function(q){switch(q.label){case 0:return[4,g()];case 1:return h=q.sent(),p=h.arcade,n=h.Feature,r=h.Dictionary,
y=m.SpatialReference.fromJSON(b),z=p.parseScript(d,v),A=t.reduce(function(c,d){var b;return a.__assign(a.__assign({},c),(b={},b[d]=null,b))},{}),C=null,l.isSome(e)&&(C=new r(e),C.immutable=!0,A.$config=null),B=p.scriptUsesGeometryEngine(z)&&p.enableGeometrySupport(),E=p.scriptUsesFeatureSet(z)&&p.enableFeatureSetSupport(),D=p.scriptIsAsync(z)&&p.enableAsyncSupport(),I={vars:A,spatialReference:y,useAsync:!!D},J=new r,J.immutable=!1,J.setField("scale",0),F=p.compileScript(z,I),G=function(a){"$view"in
a&&a.$view&&(J.setField("scale",a.$view.scale),a.$view=J);C&&(a.$config=C);return F({vars:a,spatialReference:y})},[4,k.all([B,E,D])];case 2:return q.sent(),[2,new c(p,r,z,G,new n,f,y)]}})})};c.prototype.repurposeFeature=function(a){a.geometry&&!a.geometry.spatialReference&&(a.geometry.spatialReference=this._spatialReference);this._arcadeFeature.repurposeFromGraphicLikeObject(a.geometry,a.attributes,{fields:this._fields});return this._arcadeFeature};c.prototype.createDictionary=function(){return new this._arcadeDictionary};
c.prototype.referencesMember=function(a){return this._arcade.referencesMember(this._syntaxTree,a)};c.prototype.referencesFunction=function(a){return this._arcade.referencesFunction(this._syntaxTree,a)};c.prototype.referencesGeometry=function(){return this._referencesGeometry};c.prototype.referencesScale=function(){return this._referencesScale};c.prototype.extractFieldLiterals=function(a){return this._arcade.extractFieldLiterals(this._syntaxTree,a)};return c}();b.ArcadeExpression=c;b.default=c})},
"esri/symbols/support/unitConversionUtils":function(){define(["require","exports","../../renderers/support/utils"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.supportsUnit=function(b){return null!=a.meterIn[b]};b.getMetersPerUnit=function(b){return 1/(a.meterIn[b]||1)};b.supportedUnits=function(){var b=Object.keys(a.meterIn);b.sort();return b}()})},"esri/renderers/support/utils":function(){define("require exports ../../core/arrayUtils ../../core/Logger ../../core/unitUtils ../../intl/date ./numberUtils ../visualVariables/support/ColorStop".split(" "),
function(e,b,a,m,l,k,g,f){function c(a,c,d){var b="";0===c?b=p.lt+" ":c===d&&(b=p.gt+" ");return b+a}function d(a){var c=a.minValue,d=a.maxValue,b=a.isFirstBreak?"":p.gt+" ";a="percent-of-total"===a.normalizationType?p.pct:"";c=null==c?"":g.format(c);d=null==d?"":g.format(d);return b+c+a+" "+p.ld+" "+d+a}function h(a,c){return"normalizationField"in a&&a.normalizationField?{type:"normalized-field",field:a.field,normalizationField:a.normalizationField}:"field"in a&&a.field?{type:"field",field:a.field}:
"valueExpression"in a&&a.valueExpression?{type:"expression",expression:a.valueExpression,title:a.valueExpressionTitle,returnType:c}:null}Object.defineProperty(b,"__esModule",{value:!0});var n=m.getLogger("esri.renderers.support.utils"),p={lte:"\x3c\x3d",gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%",ld:"\u2013"},r={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},t={millisecond:"long-month-day-year-long-time",second:"long-month-day-year-long-time",minute:"long-month-day-year-short-time",hour:"long-month-day-year-short-time",
day:"long-month-day-year",month:"long-month-day-year",year:"year"};b.meterIn={inches:l.convertUnit(1,"meters","inches"),feet:l.convertUnit(1,"meters","feet"),"us-feet":l.convertUnit(1,"meters","us-feet"),yards:l.convertUnit(1,"meters","yards"),miles:l.convertUnit(1,"meters","miles"),"nautical-miles":l.convertUnit(1,"meters","nautical-miles"),millimeters:l.convertUnit(1,"meters","millimeters"),centimeters:l.convertUnit(1,"meters","centimeters"),decimeters:l.convertUnit(1,"meters","decimeters"),meters:l.convertUnit(1,
"meters","meters"),kilometers:l.convertUnit(1,"meters","kilometers"),"decimal-degrees":1/l.lengthToDegrees(1,"meters")};b.timelineDateFormatOptions=k.convertDateFormatToIntlOptions("short-date");b.createColorStops=function(a){var d=a.values,b=a.colors,e=a.labelIndexes,h=a.isDate,p=a.dateFormatOptions;return d.map(function(a,n){var t=null;if(!e||-1<e.indexOf(n)){var r=void 0;(r=h?k.formatDate(a,p):g.format(a))&&(t=c(r,n,d.length-1))}return new f({value:a,color:b[n],label:t})})};b.updateColorStops=
function(a){var d=a.stops,b=a.changes,f=a.isDate,e=a.dateFormatOptions,h=d.map(function(a){return a.value});a=[];for(var p=0;p<b.length;p++){var n=b[p];a.push(n.index);h[n.index]=n.value}var t=g.round(h,{indexes:a});d.forEach(function(a,b){a.value=h[b];if(null!=a.label){var p=void 0,n=null;(p=f?k.formatDate(t[b],e):g.format(t[b]))&&(n=c(p,b,d.length-1));a.label=n}})};b.createClassBreakLabel=d;b.setLabelsForClassBreaks=function(a){var c=a.classBreakInfos,b=a.normalizationType,f=[];if(c&&c.length)if("standard-deviation"===
a.classificationMethod)n.warn("setLabelsForClassBreaks","cannot set labels for class breaks generated using 'standard-deviation' method.");else if(a.round){f.push(c[0].minValue);for(a=0;a<c.length;a++)f.push(c[a].maxValue);f=g.round(f);c.forEach(function(a,c){a.label=d({minValue:0===c?f[0]:f[c],maxValue:f[c+1],isFirstBreak:0===c,normalizationType:b})})}else c.forEach(function(a,c){a.label=d({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===c,normalizationType:b})})};b.updateClassBreak=function(a){if("standard-deviation"===
a.classificationMethod)n.warn("updateClassBreak","cannot update labels for class breaks generated using 'standard-deviation' method.");else{var c=a.classBreaks,b=a.change,f=b.index,b=b.value,g=c.length,e=-1,h=-1;0===f?e=f:f===g?h=f-1:(h=f-1,e=f);a=a.normalizationType;f=null;-1<e&&e<g&&(f=c[e],f.minValue=b,f.label=d({minValue:f.minValue,maxValue:f.maxValue,isFirstBreak:0===e,normalizationType:a}));-1<h&&h<g&&(f=c[h],f.maxValue=b,f.label=d({minValue:f.minValue,maxValue:f.maxValue,isFirstBreak:0===h,
normalizationType:a}))}};b.calculateDateFormatInterval=function(a){a=a.map(function(a){return new Date(a)});for(var c=a.length,d=Infinity,b=null,f=0;f<c-1;f++){for(var g=a[f],e=[],h=Infinity,p=null,n=f+1;n<c;n++){var t=a[n],t=g.getFullYear()!==t.getFullYear()&&"year"||g.getMonth()!==t.getMonth()&&"month"||g.getDate()!==t.getDate()&&"day"||g.getHours()!==t.getHours()&&"hour"||g.getMinutes()!==t.getMinutes()&&"minute"||g.getSeconds()!==t.getSeconds()&&"second"||"millisecond",v=r[t];v<h&&(h=v,p=t);e.push(t)}h<
d&&(d=h,b=p)}return b};b.createUniqueValueLabel=function(a){var c=a.value,d=a.domain,b=a.fieldInfo;a=a.dateFormatInterval;var f=String(c);(d=d&&"codedValues"in d&&d.codedValues?d.getName(c):null)?f=d:"number"===typeof c&&(f=b&&"date"===b.type?k.formatDate(c,a&&k.convertDateFormatToIntlOptions(t[a])):g.format(c));return f};b.getAttribute=h;b.getAttributes=function(c,d){var b=[];if("class-breaks"===c.type||"heatmap"===c.type)b.push(h(c,"number"));else if("unique-value"===c.type){var f=c.authoringInfo;
if(f&&"relationship"===f.type){if(f.field1&&f.field2){var g=f.field2.field,e=f.field2.normalizationField;b.push(h({field:f.field1.field,normalizationField:f.field1.normalizationField}));b.push(h({field:g,normalizationField:e}))}}else g=c.uniqueValueInfos[0],f=null,g&&g.value&&(g=typeof c.uniqueValueInfos[0].value,"string"===g||"number"===g)&&(f=g),b.push(h(c,f)),[c.field2,c.field3].forEach(function(a){return a&&b.push({type:"field",field:a})})}else"dot-density"===c.type&&c.attributes.forEach(function(a){return b.push(h(a,
"number"))});(c=d?d(c):"visualVariables"in c?c.visualVariables:null)&&c.forEach(function(a){return b.push(h(a,"number"))});return a.unique(b.filter(Boolean),function(a,c){return"field"===a.type&&"field"===c.type?a.field===c.field:"normalized-field"===a.type&&"normalized-field"===c.type?a.field===c.field&&a.normalizationField===c.normalizationField:"expression"===a.type&&"expression"===c.type?a.expression===c.expression:!1})}})},"esri/core/unitUtils":function(){define("require exports ./compilerUtils ./jsonMap ./SetUtils ./wgs84Constants ../geometry/support/WKIDUnitConversion".split(" "),
function(e,b,a,m,l,k,g){function f(a){if(a=A[a])return a;throw Error("unknown measure");}function c(a){return z[a].baseUnit}function d(a,c){void 0===c&&(c=null);c=c||f(a);return z[c].baseUnit===a}function h(a,c,b){if(c===b)return a;var g=f(c);if(g!==f(b))throw Error("incompatible units");a=d(c,g)?a:a*z[g].units[c].inBaseUnits;return d(b,g)?a:a/z[g].units[b].inBaseUnits}function n(a){return y.fromJSON(a.toLowerCase())||null}function p(a,c){void 0===c&&(c=v);return r(a,!0)||c}function r(a,c){void 0===
c&&(c=!1);var d,b,f;null!=a&&("object"===typeof a?(d=a.wkid,b=a.wkt):"number"===typeof a?d=a:"string"===typeof a&&(b=a));d?(f=u.values[u[d]],!f&&c&&x.has(d)&&(f=q)):b&&-1!==b.search(/^PROJCS/i)&&(a=w.exec(b))&&a[1]&&(f=parseFloat(a[1].split(",")[1]));return f}function t(a){var c,d,b;null!=a&&("object"===typeof a?(c=a.wkid,d=a.wkt):"number"===typeof a?c=a:"string"===typeof a&&(d=a));c?b=u.units[u[c]]:d&&-1!==d.search(/^PROJCS/i)&&(a=w.exec(d))&&a[1]&&(b=(a=/[\\"\\']{1}([^\\"\\']+)/.exec(a[1]))&&a[1]);
return b?n(b):null}Object.defineProperty(b,"__esModule",{value:!0});b.inchesPerMeter=39.37;var v=k.wgs84Radius*Math.PI/180,q=k.wgs84Radius*Math.PI/200,w=/UNIT\[([^\]]+)\]\]$/i,u=g,x=l.SetFromValues([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),y=m.strict()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",
yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"});e={millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1E3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},
"us-feet":{inBaseUnits:1200/3937}};m={"square-millimeters":{inBaseUnits:1E-6},"square-centimeters":{inBaseUnits:1E-4},"square-decimeters":{inBaseUnits:.1*.1},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:1E6},"square-inches":{inBaseUnits:6.4516E-4},"square-feet":{inBaseUnits:.09290304},"square-yards":{inBaseUnits:.83612736},"square-miles":{inBaseUnits:2589988.110336},"square-us-feet":{inBaseUnits:function(a){return a*a}(1200/3937)},acres:{inBaseUnits:4046.8564224},ares:{inBaseUnits:100},
hectares:{inBaseUnits:1E4}};var z={length:{baseUnit:"meters",units:e},area:{baseUnit:"square-meters",units:m},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1E3*1E-9},"cubic-centimeters":{inBaseUnits:.001},"cubic-decimeters":{inBaseUnits:1},"cubic-meters":{inBaseUnits:1E3},"cubic-kilometers":{inBaseUnits:1E12},"cubic-inches":{inBaseUnits:.016387064},"cubic-feet":{inBaseUnits:.09290304*304.8},"cubic-yards":{inBaseUnits:764.554857984},"cubic-miles":{inBaseUnits:4.16818182544058E12}}},
angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},A=function(){var a={},c;for(c in z)for(var d in z[c].units)a[d]=c;return a}();b.measurementAreaUnits="metric imperial square-inches square-feet square-yards square-miles square-us-feet square-meters square-kilometers acres ares hectares".split(" ");b.measurementLengthUnits="metric imperial inches feet yards miles nautical-miles us-feet meters kilometers".split(" ");b.measureForUnit=f;b.baseUnitForMeasure=
c;b.baseUnitForUnit=function(a){return c(f(a))};b.isBaseUnit=d;b.convertUnit=h;b.preferredMetricLengthUnit=function(a,c){return 3E3>h(a,c,"meters")?"meters":"kilometers"};b.preferredMetricVerticalLengthUnit=function(a,c){return 1E5>h(a,c,"meters")?"meters":"kilometers"};b.preferredImperialLengthUnit=function(a,c){return 1E3>h(a,c,"feet")?"feet":"miles"};b.preferredImperialVerticalLengthUnit=function(a,c){return 1E5>h(a,c,"feet")?"feet":"miles"};b.preferredMetricAreaUnit=function(a,c){return 3E6>h(a,
c,"square-meters")?"square-meters":"square-kilometers"};b.preferredImperialAreaUnit=function(a,c){return 1E6>h(a,c,"square-feet")?"square-feet":"square-miles"};b.lengthToDegrees=function(a,c,d){void 0===d&&(d=k.wgs84Radius);return h(a,c,"meters")/(d*Math.PI/180)};b.unitFromRESTJSON=n;b.unitToRESTJSON=function(a){return y.toJSON(a)||null};b.getMetersPerVerticalUnitForSR=function(a){a=p(a);return 1E5<a?1:a};b.getVerticalUnitStringForSR=function(a){return 1E5<p(a)?"meters":t(a)};b.getMetersPerUnitForSR=
p;b.getMetersPerUnit=r;b.getUnitString=t;b.getDefaultUnitSystem=function(c){if(!c)return null;c=t(c);switch(c){case "feet":case "us-feet":case "clarke-feet":case "clarke-yards":case "clarke-links":case "sears-yards":case "sears-feet":case "sears-chains":case "benoit-1895-b-chains":case "indian-yards":case "indian-1937-yards":case "gold-coast-feet":case "sears-1922-truncated-chains":return"imperial";case "50-kilometers":case "150-kilometers":case "meters":return"metric";case null:case void 0:break;
default:a.neverReached(c)}return null}})},"esri/renderers/support/numberUtils":function(){define(["require","exports","../../intl"],function(e,b,a){function m(a,c){return a-c}function l(a,c){var d;d=Number(a.toFixed(c));d<a?a=d+1/Math.pow(10,c):(a=d,d-=1/Math.pow(10,c));d=Number(d.toFixed(c));a=Number(a.toFixed(c));return[d,a]}function k(a,c,d,b,g){a=f(a,c,d,b);c=null==a.next||a.next<=g;return(null==a.previous||a.previous<=g)&&c||a.previous+a.next<=2*g}function g(a){a=String(a);var d=a.match(c);if(d&&
d[1])return{integer:d[1].split("").length,fractional:d[3]?d[3].split("").length:0};if(-1<a.toLowerCase().indexOf("e")&&(d=a.split("e"),a=d[0],d=d[1],a&&d)){a=Number(a);var d=Number(d),b=0<d;b||(d=Math.abs(d));a=g(a);b?(a.integer+=d,a.fractional=d>a.fractional?0:a.fractional-d):(a.fractional+=d,a.integer=d>a.integer?1:a.integer-d);return a}return{integer:0,fractional:0}}function f(a,c,d,b){var f={previous:null,next:null};if(null!=d){var g=a-d;f.previous=Math.floor(Math.abs(100*(c-d-g)/g))}null!=b&&
(g=b-a,f.next=Math.floor(Math.abs(100*(b-c-g)/g)));return f}Object.defineProperty(b,"__esModule",{value:!0});var c=/^-?(\d+)(\.(\d+))?$/i;b.numDigits=g;b.percentChange=f;b.round=function(a,c){void 0===c&&(c={});a=a.slice(0);var d=c.tolerance,d=void 0===d?2:d,b=c.strictBounds,b=void 0===b?!1:b;c=c.indexes;c=void 0===c?a.map(function(a,c){return c}):c;c.sort(m);for(var f=0;f<c.length;f++){var e=c[f],h=a[e],n=0===e?null:a[e-1],u=e===a.length-1?null:a[e+1],x=g(h).fractional;if(x){for(var y=0,z=!1,A=void 0;y<=
x&&!z;)z=l(h,y),A=b&&0===f?z[1]:z[0],z=k(h,A,n,u,d),y++;z&&(a[e]=A)}}return a};var d={maximumFractionDigits:20};b.format=function(c){return a.formatNumber(c,d)}})},"esri/renderers/visualVariables/support/ColorStop":function(){define("require exports tslib ../../../Color ../../../core/JSONSupport ../../../core/accessorSupport/decorators ../../../core/accessorSupport/ensureType".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.color=null;a.label=null;a.value=
null;return a}a.__extends(c,b);d=c;c.prototype.writeValue=function(a,c,d){c[d]=null==a?0:a};c.prototype.clone=function(){return new d({color:this.color&&this.color.clone(),label:this.label,value:this.value})};var d;a.__decorate([k.property({type:m,json:{type:[g.Integer],write:!0}})],c.prototype,"color",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"label",void 0);a.__decorate([k.property({type:Number,json:{write:{allowNull:!0}}})],c.prototype,"value",void 0);a.__decorate([k.writer("value")],
c.prototype,"writeValue",null);return c=d=a.__decorate([k.subclass("esri.renderers.visualVariables.support.ColorStop")],c)}(l.JSONSupport)})},"esri/layers/mixins/PortalLayer":function(){define("require exports tslib ../../core/Error ../../core/Logger ../../core/promiseUtils ../../core/urlUtils ../../core/accessorSupport/decorators ../../portal/Portal ../../portal/PortalItem @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d){Object.defineProperty(b,"__esModule",{value:!0});var h=
l.getLogger("esri.layers.mixins.PortalLayer");b.PortalLayer=function(b){return function(b){function p(){var a=null!==b&&b.apply(this,arguments)||this;a.resourceReferences={portalItem:null,paths:[]};return a}a.__extends(p,b);Object.defineProperty(p.prototype,"portalItem",{set:function(a){a!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",a))},enumerable:!0,configurable:!0});p.prototype.readPortalItem=function(a,c,b){if(c.itemId)return new d({id:c.itemId,portal:b&&
b.portal})};p.prototype.writePortalItem=function(a,c){a&&a.id&&(c.itemId=a.id)};p.prototype.loadFromPortal=function(c,d){return a.__awaiter(this,void 0,void 0,function(){var b,f;return a.__generator(this,function(a){switch(a.label){case 0:if(!this.portalItem||!this.portalItem.id)return[2];a.label=1;case 1:return a.trys.push([1,4,,5]),[4,new Promise(function(a,c){e(["../../portal/support/layersLoader"],a,c)})];case 2:return b=a.sent(),k.throwIfAborted(d),[4,b.load({instance:this,supportedTypes:c.supportedTypes,
validateItem:c.validateItem,supportsData:c.supportsData},d)];case 3:return[2,a.sent()];case 4:throw f=a.sent(),h.warn("Failed to load layer ("+this.title+", "+this.id+") portal item ("+this.portalItem.id+")\n  "+f),f;case 5:return[2]}})})};p.prototype.read=function(a,c){c&&(c.layer=this);b.prototype.read.call(this,a,c)};p.prototype.write=function(d,f){var e=f&&f.portal,h=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||c.getDefault());return e&&h&&!g.hasSamePortal(h.restUrl,e.restUrl)?
(f.messages&&f.messages.push(new m("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):b.prototype.write.call(this,d,a.__assign(a.__assign({},f),{layer:this}))};a.__decorate([f.property({type:d})],p.prototype,"portalItem",null);a.__decorate([f.reader("web-document",
"portalItem",["itemId"])],p.prototype,"readPortalItem",null);a.__decorate([f.writer("web-document","portalItem",{itemId:{type:String}})],p.prototype,"writePortalItem",null);a.__decorate([f.property()],p.prototype,"resourceReferences",void 0);return p=a.__decorate([f.subclass("esri.layers.mixins.PortalLayer")],p)}(b)}})},"esri/layers/mixins/ScaleRangeLayer":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators"],function(e,b,a,m){Object.defineProperty(b,"__esModule",
{value:!0});b.ScaleRangeLayer=function(b){return function(b){function g(){var a=null!==b&&b.apply(this,arguments)||this;a.minScale=0;a.maxScale=0;return a}a.__extends(g,b);Object.defineProperty(g.prototype,"scaleRangeId",{get:function(){return this.minScale+","+this.maxScale},enumerable:!0,configurable:!0});a.__decorate([m.property({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"minScale",void 0);a.__decorate([m.property({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"maxScale",
void 0);a.__decorate([m.property({readOnly:!0,dependsOn:["minScale","maxScale"]})],g.prototype,"scaleRangeId",null);return g=a.__decorate([m.subclass("esri.layers.mixins.ScaleRangeLayer")],g)}(b)}})},"esri/layers/mixins/RefreshableLayer":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.RefreshableLayer=function(b){return function(b){function g(){var a=null!==b&&b.apply(this,arguments)||this;
a.refreshInterval=0;return a}a.__extends(g,b);g.prototype.refresh=function(){this.emit("refresh")};a.__decorate([m.property({type:Number,cast:function(a){return.1<=a?a:0>=a?0:.1},json:{write:!0,origins:{"web-document":{write:!0}}}})],g.prototype,"refreshInterval",void 0);return g=a.__decorate([m.subclass("esri.layers.mixins.RefreshableLayer")],g)}(b)}})},"esri/portal/support/layersCreator":function(){define("require exports tslib ../../core/Collection ../../core/has ../../core/promiseUtils ../../layers/support/lazyLayerLoader ../PortalItem ./featureCollectionUtils ./portalLayers ../../renderers/support/styleUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h){function n(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f;return a.__generator(this,function(a){switch(a.label){case 0:return f=new c,f.read(d,b.context),"group"===f.type&&t(d)?[4,q(f,d,b.context)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[4,h.loadStyleRenderer(f,b.context)];case 3:return a.sent(),[2,f]}})})}function p(c,d){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return[4,
r(c,d)];case 1:return b=a.sent(),[2,n(b,c,d)]}})})}function r(b,e){return a.__awaiter(this,void 0,void 0,function(){var h,p,n,r,v,q,k,m,l;return a.__generator(this,function(a){switch(a.label){case 0:h=e.context;switch(h.origin){case "web-scene":switch(h.layerContainerType){case "basemap":a=y;break;case "ground":a=x;break;default:a=u}break;default:switch(h.layerContainerType){case "basemap":a=A;break;default:a=z}}p=a;n=b.layerType||b.type;!n&&e&&e.defaultLayerType&&(n=e.defaultLayerType);v=(r=p[n])?
g.layerLookupMap[r]:g.layerLookupMap.UnknownLayer;q=h&&h.portal;if("Feature Collection"!==b.type)return[3,4];if(!b.itemId)return[3,3];k=new f({id:b.itemId,portal:q});return[4,k.load()];case 1:return a.sent(),[4,d.selectLayerClassPath(k)];case 2:m=a.sent(),l=m.className||"UnknownLayer",v=g.layerLookupMap[l],a.label=3;case 3:return[3,8];case 4:return"ArcGISFeatureLayer"!==n?[3,8]:[4,c.isMapNotesLayer(b,q)];case 5:if(!a.sent())return[3,6];v=g.layerLookupMap.MapNotesLayer;return[3,8];case 6:return[4,
c.isRouteLayer(b,q)];case 7:a.sent()?v=g.layerLookupMap.RouteLayer:t(b)&&(v=g.layerLookupMap.GroupLayer),a.label=8;case 8:return b.wmtsInfo&&b.wmtsInfo.url&&b.wmtsInfo.layerIdentifier&&(v=g.layerLookupMap.WMTSLayer),[2,v()]}})})}function t(a){if("ArcGISFeatureLayer"!==a.layerType||"Feature Collection"===a.type)return!1;a=a.featureCollection;return!!(a&&a.layers&&1<a.layers.length)}function v(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g,e;return a.__generator(this,function(a){switch(a.label){case 0:return f=
new m,g=w(f,Array.isArray(d.layers)?d.layers:[],b),[4,c];case 1:return e=a.sent(),[4,g];case 2:return a.sent(),"group"===e.type?(e.layers.addMany(f),[2,e]):[2,void 0]}})})}function q(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,e,h,p,n;return a.__generator(this,function(a){switch(a.label){case 0:return f=g.layerLookupMap.FeatureLayer,[4,f()];case 1:return e=a.sent(),h=d.featureCollection,p=h.showLegend,n=h.layers.map(function(a){var c=new e;c.read(a,b);null!=p&&c.read({showLegend:p},
b);return c}),c.layers.addMany(n),[2]}})})}function w(c,d,b){return a.__awaiter(this,void 0,void 0,function(){var f,g,e,h,n,t,r,q,m;return a.__generator(this,function(a){switch(a.label){case 0:if(!d)return[2];f=[];g=0;for(e=d;g<e.length;g++)h=e[g],n=p(h,b),"GroupLayer"===h.layerType?f.push(v(n,h,b)):f.push(n);return[4,k.eachAlways(f)];case 1:t=a.sent();r=0;for(q=t;r<q.length;r++)m=q[r],!m.value||b.filter&&!b.filter(m.value)||c.add(m.value);return[2]}})})}Object.defineProperty(b,"__esModule",{value:!0});
var u={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",
WMS:"WMSLayer",DefaultTileLayer:"TileLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer"},x={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},y={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",
DefaultTileLayer:"TileLayer"},z={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WFS:"UnsupportedLayer",SubtypeGroupLayer:"UnsupportedLayer",
WMS:"WMSLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",DefaultTileLayer:"TileLayer"},A={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",
BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};b.createLayer=p;b.populateOperationalLayers=function(c,d,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2,w(c,d,b)]})})}})},"esri/layers/support/lazyLayerLoader":function(){define(["require","exports","@dojo/framework/shim/Promise"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.layerLookupMap={BingMapsLayer:function(){return new Promise(function(a,b){e(["../BingMapsLayer"],
a,b)})},BuildingSceneLayer:function(){return new Promise(function(a,b){e(["../BuildingSceneLayer"],a,b)})},CSVLayer:function(){return new Promise(function(a,b){e(["../CSVLayer"],a,b)})},ElevationLayer:function(){return new Promise(function(a,b){e(["../ElevationLayer"],a,b)})},FeatureLayer:function(){return new Promise(function(a,b){e(["../FeatureLayer"],a,b)})},GroupLayer:function(){return new Promise(function(a,b){e(["../GroupLayer"],a,b)})},GeoRSSLayer:function(){return new Promise(function(a,b){e(["../GeoRSSLayer"],
a,b)})},ImageryLayer:function(){return new Promise(function(a,b){e(["../ImageryLayer"],a,b)})},ImageryTileLayer:function(){return new Promise(function(a,b){e(["../ImageryTileLayer"],a,b)})},IntegratedMeshLayer:function(){return new Promise(function(a,b){e(["../IntegratedMeshLayer"],a,b)})},KMLLayer:function(){return new Promise(function(a,b){e(["../KMLLayer"],a,b)})},MapImageLayer:function(){return new Promise(function(a,b){e(["../MapImageLayer"],a,b)})},MapNotesLayer:function(){return new Promise(function(a,
b){e(["../MapNotesLayer"],a,b)})},OpenStreetMapLayer:function(){return new Promise(function(a,b){e(["../OpenStreetMapLayer"],a,b)})},PointCloudLayer:function(){return new Promise(function(a,b){e(["../PointCloudLayer"],a,b)})},RouteLayer:function(){return new Promise(function(a,b){e(["../RouteLayer"],a,b)})},SceneLayer:function(){return new Promise(function(a,b){e(["../SceneLayer"],a,b)})},StreamLayer:function(){return new Promise(function(a,b){e(["../StreamLayer"],a,b)})},TileLayer:function(){return new Promise(function(a,
b){e(["../TileLayer"],a,b)})},UnknownLayer:function(){return new Promise(function(a,b){e(["../UnknownLayer"],a,b)})},UnsupportedLayer:function(){return new Promise(function(a,b){e(["../UnsupportedLayer"],a,b)})},VectorTileLayer:function(){return new Promise(function(a,b){e(["../VectorTileLayer"],a,b)})},WebTileLayer:function(){return new Promise(function(a,b){e(["../WebTileLayer"],a,b)})},WMSLayer:function(){return new Promise(function(a,b){e(["../WMSLayer"],a,b)})},WMTSLayer:function(){return new Promise(function(a,
b){e(["../WMTSLayer"],a,b)})}}})},"esri/portal/support/featureCollectionUtils":function(){define(["require","exports","tslib","../PortalItem","./portalItemUtils"],function(e,b,a,m,l){function k(b,f,c,d){return a.__awaiter(this,void 0,void 0,function(){var g;return a.__generator(this,function(a){switch(a.label){case 0:if(!b.layerType||"ArcGISFeatureLayer"!==b.layerType||b.url)return[2,!1];if(b.featureCollectionType&&b.featureCollectionType===c)return[2,!0];if(!b.itemId)return[3,2];g=new m({id:b.itemId,
portal:f});return[4,g.load()];case 1:return a.sent(),[2,"Feature Collection"===g.type&&l.hasTypeKeyword(g,d)];case 2:return[2,!1]}})})}Object.defineProperty(b,"__esModule",{value:!0});b.isMapNotesLayer=function(a,b){return k(a,b,"notes","Map Notes")};b.isRouteLayer=function(a,b){return k(a,b,"route","Route Layer")}})},"esri/portal/support/portalItemUtils":function(){define(["require","exports"],function(e,b){function a(a,b){return a.typeKeywords?-1<a.typeKeywords.indexOf(b):!1}Object.defineProperty(b,
"__esModule",{value:!0});b.addTypeKeyword=function(b,e){if(!a(b,e)){var k=b.typeKeywords;k?k.push(e):b.typeKeywords=[e]}};b.hasTypeKeyword=a;b.removeTypeKeyword=function(a,b){if(a=a.typeKeywords)b=a.indexOf(b),-1<b&&a.splice(b,1)}})},"esri/portal/support/portalLayers":function(){define("require exports tslib ../../request ../../core/Error ../../core/promiseUtils ../../layers/support/lazyLayerLoader ../PortalItem ./portalItemUtils".split(" "),function(e,b,a,m,l,k,g,f,c){function d(a){switch(a.type){case "Map Service":return n(a);
case "Feature Service":return p(a);case "Feature Collection":return t(a);case "Scene Service":return r(a);case "Image Service":return v(a);case "Stream Service":return{className:"StreamLayer"};case "Vector Tile Service":return{className:"VectorTileLayer"};case "KML":return{className:"KMLLayer"};case "WMTS":return{className:"WMTSLayer"};case "WMS":return{className:"WMSLayer"};default:return k.reject(new l("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type}))}}function h(a){return(0,g.layerLookupMap[a.className])().then(function(c){return{constructor:c,
properties:a.properties}})}function n(a){return q(a).then(function(a){return a?{className:"TileLayer"}:{className:"MapImageLayer"}})}function p(a){return w(a).then(function(a){if("object"===typeof a){var c={};null!=a.id&&(c.layerId=a.id);return{className:"FeatureLayer",properties:c}}return{className:"GroupLayer"}})}function r(a){return w(a).then(function(c){if("object"===typeof c){var d={},b=void 0;null!=c.id?(d.layerId=c.id,b=a.url+"/layers/"+c.id):b=a.url;if(Array.isArray(a.typeKeywords)&&0<a.typeKeywords.length){c=
{IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};for(var f=0,g=Object.keys(c);f<g.length;f++){var e=g[f];if(-1!==a.typeKeywords.indexOf(e))return{className:c[e]}}}return u(b).then(function(a){var c="SceneLayer",b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};a&&a.layerType&&b[a.layerType]&&(c=b[a.layerType]);return{className:c,
properties:d}})}return{className:"GroupLayer"}})}function t(d){return a.__awaiter(this,void 0,void 0,function(){var b,f,g;return a.__generator(this,function(a){switch(a.label){case 0:return[4,d.load()];case 1:return a.sent(),(b=c.hasTypeKeyword(d,"Map Notes"))?[2,{className:"MapNotesLayer"}]:(f=c.hasTypeKeyword(d,"Route Layer"))?[2,{className:"RouteLayer"}]:[4,d.fetchData()];case 2:return(g=a.sent())&&Array.isArray(g.layers)&&1===g.layers.length?[2,{className:"FeatureLayer"}]:[2,{className:"GroupLayer"}]}})})}
function v(c){var d,b,f;return a.__awaiter(this,void 0,void 0,function(){var g,e,h,p,n;return a.__generator(this,function(a){switch(a.label){case 0:return[4,c.load()];case 1:return a.sent(),g=null!==(b=null===(d=c.typeKeywords)||void 0===d?void 0:d.map(function(a){return a.toLowerCase()}))&&void 0!==b?b:[],-1<g.indexOf("elevation 3d layer")?[2,{className:"ElevationLayer"}]:-1<g.indexOf("tiled imagery")?[2,{className:"ImageryTileLayer"}]:[4,c.fetchData()];case 2:return e=a.sent(),h=null===e||void 0===
e?void 0:e.layerType,"ArcGISTiledImageServiceLayer"===h?[2,{className:"ImageryTileLayer"}]:"ArcGISImageServiceLayer"===h?[2,{className:"ImageryLayer"}]:[4,u(c.url)];case 3:return p=a.sent(),n=null===(f=p.cacheType)||void 0===f?void 0:f.toLowerCase(),"map"===n?[2,{className:"ImageryTileLayer"}]:[2,{className:"ImageryLayer"}]}})})}function q(a){return u(a.url).then(function(a){return a.tileInfo})}function w(a){return!a.url||a.url.match(/\/\d+$/)?k.resolve({}):a.load().then(function(){return a.fetchData()}).then(function(c){return c&&
Array.isArray(c.layers)?1===c.layers.length?{id:c.layers[0].id}:!1:u(a.url).then(function(a){return a&&Array.isArray(a.layers)?1===a.layers.length?{id:a.layers[0].id}:!1:{}})})}function u(a){return m(a,{responseType:"json",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(b,"__esModule",{value:!0});b.fromItem=function(c){!c.portalItem||c.portalItem instanceof f||(c=a.__assign(a.__assign({},c),{portalItem:new f(c.portalItem)}));return c.portalItem.load().then(d).then(h).then(function(d){var b=
a.__assign({portalItem:c.portalItem},d.properties);return k.resolve(new d.constructor(b))})};b.selectLayerClassPath=d})},"esri/renderers/support/styleUtils":function(){define("require exports tslib ../../core/asyncUtils ../../core/promiseUtils ../../core/Warning".split(" "),function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});b.loadStyleRenderer=function(b,f,c){return a.__awaiter(this,void 0,void 0,function(){var d,g,e;return a.__generator(this,function(a){switch(a.label){case 0:return(d=
b&&b.getAtOrigin&&b.getAtOrigin("renderer",f.origin))&&"unique-value"===d.type&&d.styleOrigin?[4,m.result(d.populateFromStyle())]:[3,2];case 1:g=a.sent(),l.throwIfAborted(c),!1===g.ok&&(e=g.error,f&&f.messages&&f.messages.push(new k("renderer:style-reference","Failed to create unique value renderer from style reference: "+e.message,{error:e,context:f})),b.clear("renderer",f.origin)),a.label=2;case 2:return[2]}})})}})},"esri/layers/FeatureLayer":function(){define("require exports tslib ../PopupTemplate ../renderers ../request ../symbols ../core/Collection ../core/Error ../core/Handles ../core/has ../core/jsonMap ../core/Logger ../core/maybe ../core/MultiOriginJSONSupport ../core/object ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators ../form/FormTemplate ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ./Layer ./graphics/sources/MemorySource ./mixins/ArcGISService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./mixins/TemporalLayer ./support/arcgisLayerUrl ./support/commonProperties ./support/FeatureIndex ./support/FeatureReduction ./support/FeatureReductionCluster ./support/FeatureReductionSelection ./support/featureReductionUtils ./support/FeatureTemplate ./support/FeatureType ./support/fieldProperties ./support/FieldsIndex ./support/fieldUtils ./support/LabelClass ./support/labelingInfo ./support/layerSourceUtils ./support/Relationship ./support/TimeInfo ../renderers/support/jsonUtils ../renderers/support/styleUtils ../support/popupUtils ../symbols/support/jsonUtils ../tasks/support/AttachmentQuery ../tasks/support/FeatureSet ../tasks/support/Query ../tasks/support/RelationshipQuery @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y,z,A,C,B,E,D,I,J,F,G,K,L,H,M,Q,N,Z,T,U,W,da,Y,P,S,R,V,fa,X,ba,ea,ca,ga,ia,oa,pa){function O(a,c,d){return!(a&&a.hasOwnProperty(c)?!a[c]:!d)}function ja(a,c,d){return a&&a.hasOwnProperty(c)?a[c]:d}var ma=h("featurelayer-advanced-symbols")?"?returnAdvancedSymbols\x3dtrue":"",aa=new n.default({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),
ka={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},ha=p.getLogger("esri.layers.FeatureLayer"),na=W.defineFieldProperties();return function(b){function h(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a._handles=new d;a.capabilities=null;a.copyright=null;a.displayField=null;a.definitionExpression=null;a.dynamicDataSource=null;a.editFieldsInfo=null;a.editingEnabled=!0;a.editingInfo=
null;a.elevationInfo=null;a.featureReduction=null;a.fields=null;a.formTemplate=null;a.fullExtent=null;a.gdbVersion=null;a.geometryProperties=null;a.geometryType=null;a.hasM=void 0;a.hasZ=void 0;a.heightModelInfo=null;a.historicMoment=null;a.isTable=!1;a.labelsVisible=!0;a.labelingInfo=null;a.layerId=void 0;a.legendEnabled=!0;a.minScale=0;a.maxScale=0;a.globalIdField=null;a.objectIdField=null;a.outFields=null;a.path=null;a.popupEnabled=!0;a.popupTemplate=null;a.relationships=null;a.sourceJSON=null;
a.returnM=void 0;a.returnZ=void 0;a.screenSizePerspectiveEnabled=!0;a.serviceDefinitionExpression=null;a.spatialReference=A.WGS84;a.templates=null;a.timeInfo=null;a.title=null;a.sublayerTitleMode="item-title";a.trackIdField=null;a.type="feature";a.typeIdField=null;a.types=null;a.indexes=new (f.ofType(H.FeatureIndex));a.userIsAdmin=!1;a.version=void 0;a.visible=!0;return a}a.__extends(h,b);h.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};h.prototype.normalizeCtorArgs=
function(c,d){return"string"===typeof c?a.__assign({url:c},d):c};h.prototype.load=function(d){var b=this,f=r.isSome(d)?d.signal:null;if(this.portalItem&&this.portalItem.loaded&&this.source)this.addResolvingPromise(this.createGraphicsSource(f).then(function(a){return b._initLayerProperties(a)}));else return d=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},d).catch(function(a){return a}).then(function(){return a.__awaiter(b,void 0,void 0,function(){var d,b;return a.__generator(this,
function(a){switch(a.label){case 0:return this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)?[4,this._fetchFirstLayerId(f)]:[3,2];case 1:d=a.sent(),null!=d&&(this.layerId=d),a.label=2;case 2:if(!this.url&&!this._hasMemorySource())throw new c("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");b=this._initLayerProperties;return[4,this.createGraphicsSource(f)];case 3:return[2,b.apply(this,[a.sent()])]}})})}),this.addResolvingPromise(d),
q.resolve(this)};h.prototype.readCapabilities=function(a,c){c=c.layerDefinition||c;return{attachment:this._readAttachmentCapabilities(c.attachmentProperties),data:this._readDataCapabilities(c),metadata:this._readMetadataCapabilities(c),operations:this._readOperationsCapabilities(c.capabilities||a,c),query:this._readQueryCapabilities(c),queryRelated:this._readQueryRelatedCapabilities(c),editing:this._readEditingCapabilities(c)}};Object.defineProperty(h.prototype,"createQueryVersion",{get:function(){this.definitionExpression;
this.timeExtent;this.timeOffset;this.geometryType;this.gdbVersion;this.historicMoment;this.returnZ;this.capabilities;this.returnM;return(this._get("createQueryVersion")||0)+1},enumerable:!0,configurable:!0});h.prototype.readEditingEnabled=function(a,c){return c.layerDefinition&&"Query"===c.layerDefinition.capabilities?!1:!0};h.prototype.writeEditingEnabled=function(a,c){a||v.setDeepValue("layerDefinition.capabilities","Query",c)};h.prototype.readEditingInfo=function(a,c){return(a=c.editingInfo)?{lastEditDate:null!=
a.lastEditDate?new Date(a.lastEditDate):null}:null};h.prototype.readFeatureReduction=function(a,c){return Z.read(a,c)};h.prototype.writeWebSceneFeatureReduction=function(a,c,d,b){Z.writeTarget(a,c,"layerDefinition.featureReduction",b)};Object.defineProperty(h.prototype,"fieldsIndex",{get:function(){return new da(this.fields||[])},enumerable:!0,configurable:!0});h.prototype.readIsTable=function(a,c){c=c&&c.layerDefinition||c;return"Table"===c.type};Object.defineProperty(h.prototype,"hasService",{get:function(){return!this._hasMemorySource()},
enumerable:!0,configurable:!0});h.prototype.readMinScale=function(a,c){return c.effectiveMinScale||a||0};h.prototype.readMaxScale=function(a,c){return c.effectiveMaxScale||a||0};h.prototype.readGlobalIdFieldFromService=function(a,c){c=c.layerDefinition||c;if(c.globalIdField)return c.globalIdField;if(c.fields)for(a=0,c=c.fields;a<c.length;a++){var d=c[a];if("esriFieldTypeGlobalID"===d.type)return d.name}};h.prototype.readObjectIdFieldFromService=function(a,c){c=c.layerDefinition||c;if(c.objectIdField)return c.objectIdField;
if(c.fields)for(a=0,c=c.fields;a<c.length;a++){var d=c[a];if("esriFieldTypeOID"===d.type)return d.name}};Object.defineProperty(h.prototype,"parsedUrl",{get:function(){var a=this.url?w.urlToObject(this.url):null;if(null!=a)if(null!=this.layerId)a.path=w.join(a.path,this.layerId.toString())+ma;else if(null!=this.dynamicDataSource){var c={source:R.sourceToJSON(this.dynamicDataSource)};a.query={layer:JSON.stringify(c)}}return a},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"defaultPopupTemplate",
{get:function(){return this.createPopupTemplate()},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"renderer",{set:function(a){Y.fixRendererFields(a,this.fields);this._set("renderer",a)},enumerable:!0,configurable:!0});h.prototype.readRenderer=function(a,c,d){c=c.layerDefinition||c;var b=c.drawingInfo&&c.drawingInfo.renderer||void 0,f,h;if(b)(f=X.read(b,c,d)||void 0)||ha.error("Failed to create renderer",{rendererDefinition:c.drawingInfo.renderer,layer:this,context:d});else if(c.defaultSymbol)ca.read(c.defaultSymbol,
c,d),c.types&&c.types.length?(f=new l.UniqueValueRenderer({defaultSymbol:h,field:c.typeIdField}),c.types.forEach(function(a){b.addUniqueValueInfo(a.id,ca.read(a.symbol,a,d))})):f=new l.SimpleRenderer({symbol:h});else if("Table"!==c.type){switch(c.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":h=new g.SimpleMarkerSymbol;break;case "esriGeometryPolyline":h=new g.SimpleLineSymbol;break;case "esriGeometryPolygon":h=new g.SimpleFillSymbol}f=h&&new l.SimpleRenderer({symbol:h})}return f};
h.prototype.writeRenderer=function(a,c,d,b){X.writeTarget(a,c,d,b)};h.prototype.writeWebSceneRenderer=function(a,c,d,b){X.writeTarget(a,c,"layerDefinition.drawingInfo.renderer",b)};Object.defineProperty(h.prototype,"source",{set:function(a){var c=this._get("source");c!==a&&(c&&c instanceof f&&this._resetMemorySource(c),a&&a instanceof f&&this._initMemorySource(a),this._set("source",a))},enumerable:!0,configurable:!0});h.prototype.castSource=function(a){return a?Array.isArray(a)||a instanceof f?new B.default({layer:this,
items:a}):a:null};h.prototype.readSource=function(a,c){a=ia.fromJSON(c.featureSet);return new B.default({layer:this,items:a&&a.features||[]})};h.prototype.readServiceDefinitionExpression=function(a,c){return c.definitionQuery||c.definitionExpression};h.prototype.readTemplates=function(a,c){var d=c.editFieldsInfo;c=d&&d.creatorField;d=d&&d.editorField;a=a&&a.map(function(a){return T.fromJSON(a)});this._fixTemplates(a,c);this._fixTemplates(a,d);return a};h.prototype.readTitle=function(a,c){a=c.layerDefinition&&
c.layerDefinition.name||c.name;c=c.title||c.layerDefinition&&c.layerDefinition.title;if(a){c=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?K.titleFromUrlAndName(this.url,a):a;a=a||this.url&&K.parse(this.url).title;if(!a)return;"item-title-and-service-name"===this.sublayerTitleMode&&c&&c!==a&&(a=c+" - "+a);return K.cleanTitle(a)}if("item-title"===this.sublayerTitleMode&&c)return c};h.prototype.readTitleFromWebMap=function(a,c){return c.title||c.layerDefinition&&
c.layerDefinition.name};h.prototype.readTypeIdField=function(a,c){c=c.layerDefinition||c;if(a=c.typeIdField)if(c=Y.getField(c.fields,a))a=c.name;return a};h.prototype.readTypes=function(a,c){var d=this;c=c.layerDefinition||c;a=c.types;var b=(c=c.editFieldsInfo)&&c.creatorField,f=c&&c.editorField;return a&&a.map(function(a){a=U.fromJSON(a);d._fixTemplates(a.templates,b);d._fixTemplates(a.templates,f);return a})};Object.defineProperty(h.prototype,"url",{set:function(a){a=K.sanitizeUrlWithLayerId(this,
a,ha);this._set("url",a.url);null!=a.layerId&&this._set("layerId",a.layerId)},enumerable:!0,configurable:!0});h.prototype.writeUrl=function(a,c,d,b){K.writeUrlWithLayerId(this,a,null,c,b)};h.prototype.readVersion=function(a,c){return c.currentVersion?c.currentVersion:c.hasOwnProperty("capabilities")||c.hasOwnProperty("drawingInfo")||c.hasOwnProperty("hasAttachments")||c.hasOwnProperty("htmlPopupType")||c.hasOwnProperty("relationships")||c.hasOwnProperty("timeInfo")||c.hasOwnProperty("typeIdField")||
c.hasOwnProperty("types")?10:9.3};h.prototype.readVisible=function(a,c){if(c.layerDefinition&&null!=c.layerDefinition.defaultVisibility)return!!c.layerDefinition.defaultVisibility;if(null!=c.visibility)return!!c.visibility};h.prototype.addAttachment=function(a,d){var b=this;return this.load().then(function(){return b._checkAttachmentSupport(a)}).then(function(){if(!("addAttachment"in b.source))throw new c("FeatureLayer","Layer source does not support addAttachment capability");return b.source.addAttachment(a,
d)})};h.prototype.updateAttachment=function(a,d,b){var f=this;return this.load().then(function(){return f._checkAttachmentSupport(a)}).then(function(){if(!("updateAttachment"in f.source))throw new c("FeatureLayer","Layer source does not support updateAttachment capability");return f.source.updateAttachment(a,d,b)})};h.prototype.applyEdits=function(c,d){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return[4,new Promise(function(a,
c){e(["./graphics/editingSupport"],a,c)})];case 1:return b=a.sent(),[2,b.applyEdits(this,c,d)]}})})};h.prototype.on=function(a,c){return b.prototype.on.call(this,a,c)};h.prototype.createPopupTemplate=function(a){return ea.createPopupTemplate(this,a)};h.prototype.createGraphicsSource=function(c){return a.__awaiter(this,void 0,void 0,function(){var d,b;return a.__generator(this,function(a){switch(a.label){case 0:return this._hasMemorySource()?(this.emit("graphics-source-create",{graphicsSource:this.source}),
[2,this.source.load({signal:c})]):[4,new Promise(function(a,c){e(["./graphics/sources/FeatureLayerSource"],a,c)})];case 1:return d=a.sent(),q.throwIfAborted(c),[4,(new d.default({layer:this})).load({signal:c})];case 2:return b=a.sent(),this.emit("graphics-source-create",{graphicsSource:b}),[2,b]}})})};h.prototype.createQuery=function(){var a=new oa,c=this.get("capabilities.data");a.gdbVersion=this.gdbVersion;a.historicMoment=this.historicMoment;a.returnGeometry=!0;c&&(c.supportsZ&&null!=this.returnZ&&
(a.returnZ=this.returnZ),c.supportsM&&null!=this.returnM&&(a.returnM=this.returnM));a.outFields=["*"];a.where=this.definitionExpression||"1\x3d1";var c=this.timeOffset,d=this.timeExtent;a.timeExtent=null!=c&&null!=d?d.offset(-c.value,c.unit):d||null;a.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null;return a};h.prototype.deleteAttachments=function(a,d){var b=this;return this.load().then(function(){return b._checkAttachmentSupport(a)}).then(function(){if(!("deleteAttachments"in
b.source))throw new c("FeatureLayer","Layer source does not support deleteAttachments capability");return b.source.deleteAttachments(a,d)})};h.prototype.getFeatureType=function(a){var c=this.typeIdField;if(!c||!a)return null;var d=a.attributes?a.attributes[c]:void 0;if(null==d)return null;var b=null;this.types.some(function(a){var c=a.id;if(null==c)return!1;c.toString()===d.toString()&&(b=a);return!!b});return b};h.prototype.getFieldDomain=function(a,c){return(c=this.getFeatureType(c&&c.feature))&&
(c=c.domains&&c.domains[a])&&"inherited"!==c.type?c:this._getLayerDomain(a)};h.prototype.getField=function(a){return this.fieldsIndex.get(a)};h.prototype.queryAttachments=function(a,d){var b=this;a=ga.from(a);return this.load().then(function(){if(!b.get("capabilities.data.supportsAttachment"))throw new c("FeatureLayer","this layer doesn't support attachments");var d=a.attachmentTypes,f=a.objectIds,g=a.globalIds,h=a.num,e=a.size,p=a.start,n=a.where;if(!b.get("capabilities.operations.supportsQueryAttachments")&&
(d=d&&d.length,g=g&&g.length,e=e&&e.length,f&&1<f.length||d||g||e||h||p||n))throw new c("FeatureLayer","when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",a);if(!(f&&f.length||n))throw new c("FeatureLayer","'objectIds' or 'where' are required to perform attachment query",a);if(!("queryAttachments"in b.source))throw new c("FeatureLayer","Layer source does not support queryAttachments capability",a);return b.source.queryAttachments(a)})};h.prototype.queryFeatures=function(a,
c){var d=this;return this.load().then(function(){return d.source.queryFeatures(oa.from(a)||d.createQuery(),c)}).then(function(a){if(a&&a.features)for(var c=0,b=a.features;c<b.length;c++){var f=b[c];f.layer=f.sourceLayer=d}return a})};h.prototype.queryObjectIds=function(a,d){var b=this;return this.load().then(function(){if(b.source.queryObjectIds)return b.source.queryObjectIds(oa.from(a)||b.createQuery(),d);throw new c("FeatureLayer","Layer source does not support queryObjectIds capability");})};h.prototype.queryFeatureCount=
function(a,d){var b=this;return this.load().then(function(){if(b.source.queryFeatureCount)return b.source.queryFeatureCount(oa.from(a)||b.createQuery(),d);throw new c("FeatureLayer","Layer source does not support queryFeatureCount capability");})};h.prototype.queryExtent=function(a,d){var b=this;return this.load().then(function(){if(b.source.queryExtent)return b.source.queryExtent(oa.from(a)||b.createQuery(),d);throw new c("FeatureLayer","Layer source does not support queryExtent capability");})};
h.prototype.queryRelatedFeatures=function(a,d){var b=this;return this.load().then(function(){if("queryRelatedFeatures"in b.source)return b.source.queryRelatedFeatures(pa.from(a),d);throw new c("FeatureLayer","Layer source does not support queryRelatedFeatures capability");})};h.prototype.read=function(a,c){var d=a.featureCollection;if(d){var f=d.layers;f&&1===f.length&&(b.prototype.read.call(this,f[0],c),null!=d.showLegend&&b.prototype.read.call(this,{showLegend:d.showLegend},c))}b.prototype.read.call(this,
a,c);c&&"service"===c.origin&&this.revert(["objectIdField","fields","timeInfo"],"service")};h.prototype.write=function(a,d){return d&&("web-scene"===d.origin||"web-map"===d.origin)&&d.messages&&this.isTable?(d.messages.push(new c("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' using a Table source cannot written to web scenes and web maps",{layer:this})),null):b.prototype.write.call(this,a,d)};h.prototype._checkAttachmentSupport=function(a){var d=a.attributes,
b=this.objectIdField;if(!this.get("capabilities.data.supportsAttachment"))return q.reject(new c("FeatureLayer","this layer doesn't support attachments"));if(!a)return q.reject(new c("FeatureLayer","A feature is required to add/delete/update attachments"));if(!d)return q.reject(new c("FeatureLayer","'attributes' are required on a feature to query attachments"));if(!d[b])return q.reject(new c("FeatureLayer","feature is missing the identifying attribute "+b))};h.prototype._getLayerDomain=function(a){return(a=
this.fieldsIndex.get(a))?a.domain:null};h.prototype._fetchFirstLayerId=function(a){return k(this.url,{query:{f:"json"},responseType:"json",signal:a}).then(function(a){if(a=a.data){if(Array.isArray(a.layers)&&0<a.layers.length)return a.layers[0].id;if(Array.isArray(a.tables)&&0<a.tables.length)return a.tables[0].id}})};h.prototype._initLayerProperties=function(c){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){this._set("source",c);c.sourceJSON&&(this.sourceJSON=
c.sourceJSON,this.read(c.sourceJSON,{origin:"service",url:this.parsedUrl}));this._verifySource();this._verifyFields();Y.fixRendererFields(this.renderer,this.fields);Y.fixTimeInfoFields(this.timeInfo,this.fields);return[2,ba.loadStyleRenderer(this,{origin:"service"})]})})};h.prototype._verifyFields=function(){var a=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+a+")");this.isTable||this._hasMemorySource()||
-1!==a.search(/\/FeatureServer\//i)||this.fields&&this.fields.some(function(a){return"geometry"===a.type})||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+a+")")};h.prototype._fixTemplates=function(a,c){a&&a.forEach(function(a){(a=a.prototype&&a.prototype.attributes)&&c&&delete a[c]})};h.prototype._verifySource=function(){if(this._hasMemorySource()){if(this.url)throw new c("feature-layer:mixed-source-and-url",
"FeatureLayer cannot be created with both an in-memory source and a url");}else if(!this.url)throw new c("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source");};h.prototype._initMemorySource=function(a){var c=this;a.forEach(function(a){a.layer=c;a.sourceLayer=c});this._handles.add([a.on("after-add",function(a){a.item.layer=c;a.item.sourceLayer=c}),a.on("after-remove",function(a){a.item.layer=null;a.item.sourceLayer=null})],"fl-source")};h.prototype._resetMemorySource=
function(a){a.forEach(function(a){a.layer=null;a.sourceLayer=null});this._handles.remove("fl-source")};h.prototype._hasMemorySource=function(){return!(this.url||!this.source)};h.prototype._readAttachmentCapabilities=function(a){var c={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1};a&&Array.isArray(a)&&a.forEach(function(a){var d=ka[a.name];d&&(c[d]=!!a.isEnabled)});return c};h.prototype._readDataCapabilities=function(a){return{isVersioned:O(a,"isDataVersioned",
!1),supportsAttachment:O(a,"hasAttachments",!1),supportsM:O(a,"hasM",!1),supportsZ:O(a,"hasZ",!1)}};h.prototype._readMetadataCapabilities=function(a){return{supportsAdvancedFieldProperties:O(a,"supportsFieldDescriptionProperty",!1)}};h.prototype._readOperationsCapabilities=function(a,c){a=a?a.toLowerCase().split(",").map(function(a){return a.trim()}):[];var d=-1!==a.indexOf("editing"),b=d&&-1!==a.indexOf("create"),f=d&&-1!==a.indexOf("delete"),g=d&&-1!==a.indexOf("update");!d||b||f||g||(b=f=g=!0);
return{supportsCalculate:O(c,"supportsCalculate",!1),supportsTruncate:O(c,"supportsTruncate",!1),supportsValidateSql:O(c,"supportsValidateSql",!1),supportsAdd:b,supportsDelete:f,supportsEditing:d,supportsQuery:-1!==a.indexOf("query"),supportsQueryAttachments:O(c.advancedQueryCapabilities,"supportsQueryAttachments",!1),supportsResizeAttachments:O(c,"supportsAttachmentsResizing",!1),supportsSync:-1!==a.indexOf("sync"),supportsUpdate:g,supportsExceedsLimitStatistics:O(c,"supportsExceedsLimitStatistics",
!1)}};h.prototype._readQueryCapabilities=function(a){var c=a.advancedQueryCapabilities,d=a.ownershipBasedAccessControlForFeatures,b=a.archivingInfo,f=(a.supportedQueryFormats||"").split(",").reduce(function(a,c){(c=c.toLowerCase().trim())&&a.add(c);return a},new Set);return{supportsStatistics:O(c,"supportsStatistics",a.supportsStatistics),supportsPercentileStatistics:O(c,"supportsPercentileStatistics",!1),supportsCentroid:O(c,"supportsReturningGeometryCentroid",!1),supportsDistance:O(c,"supportsQueryWithDistance",
!1),supportsDistinct:O(c,"supportsDistinct",a.supportsAdvancedQueries),supportsExtent:O(c,"supportsReturningQueryExtent",!1),supportsGeometryProperties:O(c,"supportsReturningGeometryProperties",!1),supportsHavingClause:O(c,"supportsHavingClause",!1),supportsOrderBy:O(c,"supportsOrderBy",a.supportsAdvancedQueries),supportsPagination:O(c,"supportsPagination",!1),supportsQuantization:O(a,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:O(a,"supportsQuantizationEditMode",!1),supportsQueryGeometry:O(a,
"supportsReturningQueryGeometry",!1),supportsResultType:O(c,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:O(c,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:O(c,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:O(a,"useStandardizedQueries",!1),supportsQueryByOthers:O(d,"allowOthersToQuery",!0),supportsHistoricMoment:O(b,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:f.has("pbf"),supportsDisjointSpatialRelationship:O(c,"supportsDisjointSpatialRel",!1),
supportsCacheHint:O(c,"supportsQueryWithCacheHint",!1),maxRecordCountFactor:ja(a,"maxRecordCountFactor",void 0),maxRecordCount:ja(a,"maxRecordCount",void 0),standardMaxRecordCount:ja(a,"standardMaxRecordCount",void 0),tileMaxRecordCount:ja(a,"tileMaxRecordCount",void 0)}};h.prototype._readQueryRelatedCapabilities=function(a){a=a.advancedQueryCapabilities;var c=O(a,"supportsAdvancedQueryRelated",!1);return{supportsPagination:O(a,"supportsQueryRelatedPagination",!1),supportsCount:c,supportsOrderBy:c}};
h.prototype._readEditingCapabilities=function(a){var c=a.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:O(a,"allowGeometryUpdates",!0),supportsGlobalId:O(a,"supportsApplyEditsWithGlobalIds",!1),supportsRollbackOnFailure:O(a,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:O(a,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:O(a,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:O(c,"allowAnonymousToDelete",!0),supportsDeleteByOthers:O(c,"allowOthersToDelete",
!0),supportsUpdateByAnonymous:O(c,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:O(c,"allowOthersToUpdate",!0)}};a.__decorate([u.property({readOnly:!0,json:{read:!1}})],h.prototype,"capabilities",void 0);a.__decorate([u.reader("service","capabilities","advancedQueryCapabilities allowGeometryUpdates allowUpdateWithoutMValues archivingInfo capabilities hasAttachments hasM hasZ maxRecordCount maxRecordCountFactor ownershipBasedAccessControlForFeatures standardMaxRecordCount supportedQueryFormats supportsAdvancedQueries supportsApplyEditsWithGlobalIds supportsAttachmentsByUploadId supportsAttachmentsResizing supportsCalculate supportsCoordinatesQuantization supportsExceedsLimitStatistics supportsFieldDescriptionProperty supportsQuantizationEditMode supportsRollbackOnFailureParameter supportsStatistics supportsTruncate supportsValidateSql tileMaxRecordCount useStandardizedQueries".split(" "))],
h.prototype,"readCapabilities",null);a.__decorate([u.property({readOnly:!0,dependsOn:"definitionExpression timeExtent timeOffset geometryType gdbVersion historicMoment returnZ capabilities returnM".split(" ")})],h.prototype,"createQueryVersion",null);a.__decorate([u.property({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],h.prototype,"copyright",void 0);a.__decorate([u.property({type:String,json:{read:{source:"layerDefinition.displayField"},
origins:{service:{read:{source:"displayField"}}}}})],h.prototype,"displayField",void 0);a.__decorate([u.property({type:String,json:{origins:{service:{read:!1,write:!1}},read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}})],h.prototype,"definitionExpression",void 0);a.__decorate([u.property({readOnly:!0,json:{read:ca.read}})],h.prototype,"defaultSymbol",void 0);a.__decorate([u.property()],h.prototype,"dynamicDataSource",void 0);a.__decorate([u.property({readOnly:!0})],
h.prototype,"editFieldsInfo",void 0);a.__decorate([u.property({type:Boolean})],h.prototype,"editingEnabled",void 0);a.__decorate([u.reader(["portal-item","web-map","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],h.prototype,"readEditingEnabled",null);a.__decorate([u.writer(["portal-item","web-map","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],h.prototype,"writeEditingEnabled",null);a.__decorate([u.property({readOnly:!0})],h.prototype,"editingInfo",
void 0);a.__decorate([u.reader("editingInfo")],h.prototype,"readEditingInfo",null);a.__decorate([u.property(L.elevationInfo)],h.prototype,"elevationInfo",void 0);a.__decorate([u.property({types:{key:"type",base:M.default,typeMap:{selection:N,cluster:Q}},json:{write:{target:"layerDefinition.featureReduction"}}})],h.prototype,"featureReduction",void 0);a.__decorate([u.reader("featureReduction",["layerDefinition.featureReduction"])],h.prototype,"readFeatureReduction",null);a.__decorate([u.writer("web-scene",
"featureReduction",{"layerDefinition.featureReduction":{types:Z.webSceneFeatureReductionTypes}})],h.prototype,"writeWebSceneFeatureReduction",null);a.__decorate([u.property(a.__assign(a.__assign({},na.fields),{json:{origins:{service:{read:!0}},read:{source:"layerDefinition.fields"}}}))],h.prototype,"fields",void 0);a.__decorate([u.property({readOnly:!0,dependsOn:["fields"]})],h.prototype,"fieldsIndex",null);a.__decorate([u.property({type:x,json:{read:{source:"formInfo"},write:{target:"formInfo"}}})],
h.prototype,"formTemplate",void 0);a.__decorate([u.property({type:y,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],h.prototype,"fullExtent",void 0);a.__decorate([u.property()],h.prototype,"gdbVersion",void 0);a.__decorate([u.property({readOnly:!0})],h.prototype,"geometryProperties",void 0);a.__decorate([u.property({type:"point polygon polyline multipoint multipatch mesh".split(" "),json:{origins:{service:{read:aa.read}},read:{source:"layerDefinition.geometryType",
reader:aa.read}}})],h.prototype,"geometryType",void 0);a.__decorate([u.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],h.prototype,"hasM",void 0);a.__decorate([u.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],h.prototype,"hasZ",void 0);a.__decorate([u.property({readOnly:!0,type:z})],h.prototype,"heightModelInfo",void 0);a.__decorate([u.property({type:Date})],h.prototype,"historicMoment",void 0);a.__decorate([u.property({json:{origins:{service:{read:!1},
"portal-item":{read:!1}}}})],h.prototype,"id",void 0);a.__decorate([u.property({readOnly:!0})],h.prototype,"isTable",void 0);a.__decorate([u.reader("service","isTable",["type"]),u.reader("isTable",["layerDefinition.type"])],h.prototype,"readIsTable",null);a.__decorate([u.property({dependsOn:["loaded","url","source"],readOnly:!0})],h.prototype,"hasService",null);a.__decorate([u.property(L.labelsVisible)],h.prototype,"labelsVisible",void 0);a.__decorate([u.property({type:[P],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",
reader:S.reader},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:S.reader},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],h.prototype,"labelingInfo",void 0);a.__decorate([u.property(L.opacityDrawingInfo)],h.prototype,"opacity",void 0);a.__decorate([u.property({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],h.prototype,"layerId",void 0);a.__decorate([u.property(L.legendEnabled)],h.prototype,"legendEnabled",
void 0);a.__decorate([u.property({type:["show","hide"]})],h.prototype,"listMode",void 0);a.__decorate([u.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}})],h.prototype,"minScale",void 0);a.__decorate([u.reader("service","minScale",["minScale","effectiveMinScale"])],h.prototype,"readMinScale",null);a.__decorate([u.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},
write:{target:"layerDefinition.maxScale"}}})],h.prototype,"maxScale",void 0);a.__decorate([u.reader("service","maxScale",["maxScale","effectiveMaxScale"])],h.prototype,"readMaxScale",null);a.__decorate([u.property({type:String})],h.prototype,"globalIdField",void 0);a.__decorate([u.reader("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),u.reader("service","globalIdField",["globalIdField","fields"])],h.prototype,"readGlobalIdFieldFromService",null);a.__decorate([u.property({type:String})],
h.prototype,"objectIdField",void 0);a.__decorate([u.reader("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),u.reader("service","objectIdField",["objectIdField","fields"])],h.prototype,"readObjectIdFieldFromService",null);a.__decorate([u.property({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],h.prototype,"operationalLayerType",void 0);a.__decorate([u.property(na.outFields)],h.prototype,"outFields",void 0);a.__decorate([u.property({readOnly:!0,dependsOn:["layerId"]})],
h.prototype,"parsedUrl",null);a.__decorate([u.property({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],h.prototype,"path",void 0);a.__decorate([u.property(L.popupEnabled)],h.prototype,"popupEnabled",void 0);a.__decorate([u.property({type:m,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],h.prototype,"popupTemplate",void 0);a.__decorate([u.property({readOnly:!0,dependsOn:["fields","title"]})],h.prototype,"defaultPopupTemplate",null);a.__decorate([u.property({type:[V],
readOnly:!0})],h.prototype,"relationships",void 0);a.__decorate([u.property({types:l.rendererTypes,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],h.prototype,"renderer",null);a.__decorate([u.reader("service","renderer",["drawingInfo.renderer","defaultSymbol","type"]),u.reader("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol","layerDefinition.type"])],h.prototype,"readRenderer",null);
a.__decorate([u.writer("renderer")],h.prototype,"writeRenderer",null);a.__decorate([u.writer("web-scene","renderer",{"layerDefinition.drawingInfo.renderer":{types:l.webSceneRendererTypes}})],h.prototype,"writeWebSceneRenderer",null);a.__decorate([u.property()],h.prototype,"sourceJSON",void 0);a.__decorate([u.property({type:Boolean})],h.prototype,"returnM",void 0);a.__decorate([u.property({type:Boolean})],h.prototype,"returnZ",void 0);a.__decorate([u.property(L.screenSizePerspectiveEnabled)],h.prototype,
"screenSizePerspectiveEnabled",void 0);a.__decorate([u.property()],h.prototype,"source",null);a.__decorate([u.cast("source")],h.prototype,"castSource",null);a.__decorate([u.reader("portal-item","source",["featureSet"]),u.reader("web-map","source",["featureSet"])],h.prototype,"readSource",null);a.__decorate([u.property({readOnly:!0})],h.prototype,"serviceDefinitionExpression",void 0);a.__decorate([u.reader("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],h.prototype,
"readServiceDefinitionExpression",null);a.__decorate([u.property({type:A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],h.prototype,"spatialReference",void 0);a.__decorate([u.property({type:[T]})],h.prototype,"templates",void 0);a.__decorate([u.reader("templates",["editFieldsInfo","creatorField","editorField","templates"])],h.prototype,"readTemplates",null);a.__decorate([u.property({type:fa})],h.prototype,"timeInfo",void 0);
a.__decorate([u.property()],h.prototype,"title",void 0);a.__decorate([u.reader("service","title",["name"]),u.reader("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],h.prototype,"readTitle",null);a.__decorate([u.reader("web-map","title",["layerDefinition.name","title"])],h.prototype,"readTitleFromWebMap",null);a.__decorate([u.property({type:String})],h.prototype,"sublayerTitleMode",void 0);a.__decorate([u.property({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],
h.prototype,"trackIdField",void 0);a.__decorate([u.property({json:{read:!1}})],h.prototype,"type",void 0);a.__decorate([u.property({type:String})],h.prototype,"typeIdField",void 0);a.__decorate([u.reader("service","typeIdField"),u.reader("typeIdField",["layerDefinition.typeIdField"])],h.prototype,"readTypeIdField",null);a.__decorate([u.property({type:[U]})],h.prototype,"types",void 0);a.__decorate([u.reader("service","types",["types"]),u.reader("types",["layerDefinition.types"])],h.prototype,"readTypes",
null);a.__decorate([u.property({type:f.ofType(H.FeatureIndex),readOnly:!0})],h.prototype,"indexes",void 0);a.__decorate([u.property(L.url)],h.prototype,"url",null);a.__decorate([u.writer("url")],h.prototype,"writeUrl",null);a.__decorate([u.property({readOnly:!0})],h.prototype,"userIsAdmin",void 0);a.__decorate([u.property({json:{origins:{service:{read:!0}},read:!1}})],h.prototype,"version",void 0);a.__decorate([u.reader("service","version","currentVersion capabilities drawingInfo hasAttachments htmlPopupType relationships timeInfo typeIdField types".split(" "))],
h.prototype,"readVersion",null);a.__decorate([u.property({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],h.prototype,"visible",void 0);a.__decorate([u.reader("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],h.prototype,"readVisible",null);return h=a.__decorate([u.subclass("esri.layers.FeatureLayer")],h)}(G.TemporalLayer(F.ScaleRangeLayer(J.RefreshableLayer(E.ArcGISService(D.OperationalLayer(I.PortalLayer(t.MultiOriginJSONMixin(C))))))))})},
"esri/PopupTemplate":function(){define("require exports tslib ./core/arrayUtils ./core/Collection ./core/JSONSupport ./core/lang ./core/Logger ./core/promiseUtils ./core/SetUtils ./core/accessorSupport/decorators ./core/accessorSupport/ensureType ./layers/support/fieldUtils ./popup/content ./popup/ExpressionInfo ./popup/FieldInfo ./popup/LayerOptions ./popup/RelatedRecordsInfo ./popup/content/AttachmentsContent ./popup/content/Content ./popup/content/CustomContent ./popup/content/FieldsContent ./popup/content/MediaContent ./popup/content/TextContent ./popup/content/support/mediaInfoTypes ./support/actions/ActionBase ./support/actions/ActionButton ./support/actions/ActionToggle".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y,z,A,C,B,E,D,I){var J=l.ofType({key:"type",defaultKeyValue:"button",base:E,typeMap:{button:D,toggle:I}}),F={base:x,key:"type",typeMap:{media:A,custom:y,text:C,attachments:u,fields:z}},G=f.getLogger("esri.PopupTemplate"),K=["attachments","fields","media","text"];return function(b){function f(){var a=null!==b&&b.apply(this,arguments)||this;a.actions=null;a.content="";a.expressionInfos=null;a.fieldInfos=null;a.layerOptions=null;a.lastEditInfoEnabled=
!0;a.outFields=null;a.overwriteActions=!1;a.title="";a.relatedRecordsInfo=null;return a}a.__extends(f,b);e=f;f.prototype.castContent=function(a){if(Array.isArray(a))return a.map(function(a){return n.ensureOneOfType(F,a)});if("string"===typeof a||"function"===typeof a||a instanceof HTMLElement||c.isPromiseLike(a))return a;G.error("content error","unsupported content value",{value:a});return null};f.prototype.readContent=function(a,c){a=c.popupElements;return Array.isArray(a)&&0<a.length?this._readPopupInfoElements(c):
this._readPopupInfo(c)};f.prototype.writeContent=function(a,c){var d=this;"string"===typeof a?c.description=a:Array.isArray(a)&&(c.popupElements=a.filter(function(a){return-1!==K.indexOf(a.type)}).map(function(a){return a&&a.toJSON()}),c.popupElements.forEach(function(a){"attachments"===a.type?d._writeAttachmentContent(c):"media"===a.type?d._writeMediaContent(a,c):"text"===a.type&&d._writeTextContent(a,c)}))};f.prototype.writeFieldInfos=function(a,c){var d=this.content,d=Array.isArray(d)?d:null;if(a){var b=
d?d.some(function(a){return"fields"===a.type&&(!a.fieldInfos||0===a.fieldInfos.length)}):!1;c.fieldInfos=a.filter(Boolean).map(function(a){a=a.toJSON();b||(a.visible=!1);return a})}if(d)for(a=0;a<d.length;a++){var f=d[a];"fields"===f.type&&this._writeFieldsContent(f,c)}};f.prototype.writeLayerOptions=function(a,c){c.layerOptions=!a||null===a.showNoDataRecords&&null===a.returnTopmostRaster?null:a.toJSON()};f.prototype.writeTitle=function(a,c){c.title=a||""};f.prototype.clone=function(){var a=this.actions,
a=a?g.clone(a.toArray()):[];return new e({actions:a,content:Array.isArray(this.content)?g.clone(this.content):this.content,expressionInfos:Array.isArray(this.expressionInfos)?g.clone(this.expressionInfos):null,fieldInfos:Array.isArray(this.fieldInfos)?g.clone(this.fieldInfos):null,layerOptions:this.layerOptions?g.clone(this.layerOptions):null,lastEditInfoEnabled:this.lastEditInfoEnabled,outFields:Array.isArray(this.outFields)?g.clone(this.outFields):null,overwriteActions:this.overwriteActions,title:this.title,
relatedRecordsInfo:this.relatedRecordsInfo?g.clone(this.relatedRecordsInfo):null})};f.prototype.collectRequiredFields=function(c,d){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(b){switch(b.label){case 0:return[4,this._collectExpressionInfoFields(c,d,this.expressionInfos)];case 1:return b.sent(),p.collectFields(c,d,a.__spreadArrays(this.outFields||[],this._getActionsFields(this.actions),this._getTitleFields(this.title),this._getContentFields(this.content))),[2]}})})};
f.prototype.getRequiredFields=function(c){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:return b=new Set,[4,this.collectRequiredFields(b,c)];case 1:return a.sent(),[2,d.valuesOfSet(b).sort()]}})})};f.prototype._writeFieldsContent=function(a,c){Array.isArray(a.fieldInfos)&&a.fieldInfos.length&&(a=g.clone(a.fieldInfos),Array.isArray(c.fieldInfos)?a.forEach(function(a){var d=m.find(c.fieldInfos,function(c){return c.fieldName.toLowerCase()===
a.fieldName.toLowerCase()});d?d.visible=!0:c.fieldInfos.push(a)}):c.fieldInfos=a)};f.prototype._writeAttachmentContent=function(a){a.showAttachments||(a.showAttachments=!0)};f.prototype._writeTextContent=function(a,c){!c.description&&a.text&&(c.description=a.text)};f.prototype._writeMediaContent=function(c,d){Array.isArray(c.mediaInfos)&&c.mediaInfos.length&&(c=g.clone(c.mediaInfos),Array.isArray(d.mediaInfos)?d.mediaInfos=a.__spreadArrays(d.mediaInfos,c):d.mediaInfos=c)};f.prototype._readPopupInfoElements=
function(a){var c=a.description,d=a.mediaInfos,b=!1,f=!1;return a.popupElements.map(function(a){if("media"===a.type)return a.mediaInfos||!d||f||(a.mediaInfos=d,f=!0),A.fromJSON(a);if("text"===a.type)return a.text||!c||b||(a.text=c,b=!0),C.fromJSON(a);if("attachments"===a.type)return u.fromJSON(a);if("fields"===a.type)return z.fromJSON(a)}).filter(Boolean)};f.prototype._readPopupInfo=function(a){var c=a.description,d=a.mediaInfos;a=a.showAttachments;var b=[];c?b.push(new C({text:c})):b.push(new z);
Array.isArray(d)&&d.length&&b.push(A.fromJSON({mediaInfos:d}));a&&b.push(u.fromJSON({displayType:"list"}));return b.length?b:c};f.prototype._getContentElementFields=function(c){var d=this;if(!c||"attachments"===c.type)return[];if("custom"===c.type)return c.outFields||[];if("fields"===c.type)return this._getFieldInfoFields(c.fieldInfos||this.fieldInfos);if("media"===c.type)return(c.mediaInfos||[]).reduce(function(c,b){return a.__spreadArrays(c,d._getMediaInfoFields(b))},[]);if("text"===c.type)return this._extractFieldNames(c.text)};
f.prototype._getMediaInfoFields=function(c){var d=c.caption,b=c.value||{},f=b.fields,g=void 0===f?[]:f,f=b.normalizeField,h=b.tooltipField,e=b.sourceURL,b=b.linkURL;c=a.__spreadArrays(this._extractFieldNames(c.title),this._extractFieldNames(d),this._extractFieldNames(e),this._extractFieldNames(b),g);f&&c.push(f);h&&c.push(h);return c};f.prototype._getContentFields=function(c){var d=this;return"string"===typeof c?this._extractFieldNames(c):Array.isArray(c)?c.reduce(function(c,b){return a.__spreadArrays(c,
d._getContentElementFields(b))},[]):[]};f.prototype._collectExpressionInfoFields=function(d,b,f){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return f?[4,c.all(f.map(function(a){return p.collectArcadeFieldNames(d,b,a.expression)}))]:[2];case 1:return a.sent(),[2]}})})};f.prototype._getFieldInfoFields=function(a){return a?a.filter(function(a){return"undefined"===typeof a.visible?!0:!!a.visible}).map(function(a){return a.fieldName}).filter(function(a){return-1===
a.indexOf("relationships/")&&-1===a.indexOf("expression/")}):[]};f.prototype._getActionsFields=function(c){var d=this;return c?c.toArray().reduce(function(c,b){return a.__spreadArrays(c,d._getActionFields(b))},[]):[]};f.prototype._getActionFields=function(c){var d=c.className,b=c.type,b="button"===b||"toggle"===b?c.image:"";return a.__spreadArrays(this._extractFieldNames(c.title),this._extractFieldNames(d),this._extractFieldNames(b))};f.prototype._getTitleFields=function(a){return"string"===typeof a?
this._extractFieldNames(a):[]};f.prototype._extractFieldNames=function(a){if(!a||"string"!==typeof a)return[];a=a.match(/{[^}]*}/g);if(!a)return[];var c=/\{(\w+):.+\}/;return(a=a.filter(function(a){return!(0===a.indexOf("{relationships/")||0===a.indexOf("{expression/"))}).map(function(a){return a.replace(c,"{$1}")}))?a.map(function(a){return a.slice(1,-1)}):[]};var e;a.__decorate([h.property({type:J})],f.prototype,"actions",void 0);a.__decorate([h.property()],f.prototype,"content",void 0);a.__decorate([h.cast("content")],
f.prototype,"castContent",null);a.__decorate([h.reader("content",["description","popupElements","mediaInfos","showAttachments"])],f.prototype,"readContent",null);a.__decorate([h.writer("content",{popupElements:{type:l.ofType(r.types)},showAttachments:{type:Boolean},mediaInfos:{type:l.ofType(B.types)},description:{type:String}})],f.prototype,"writeContent",null);a.__decorate([h.property({type:[t],json:{write:!0}})],f.prototype,"expressionInfos",void 0);a.__decorate([h.property({type:[v]})],f.prototype,
"fieldInfos",void 0);a.__decorate([h.writer("fieldInfos")],f.prototype,"writeFieldInfos",null);a.__decorate([h.property({type:q})],f.prototype,"layerOptions",void 0);a.__decorate([h.writer("layerOptions")],f.prototype,"writeLayerOptions",null);a.__decorate([h.property({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],f.prototype,"lastEditInfoEnabled",void 0);a.__decorate([h.property()],f.prototype,"outFields",void 0);a.__decorate([h.property()],
f.prototype,"overwriteActions",void 0);a.__decorate([h.property({json:{type:String}})],f.prototype,"title",void 0);a.__decorate([h.writer("title")],f.prototype,"writeTitle",null);a.__decorate([h.property({type:w,json:{write:!0}})],f.prototype,"relatedRecordsInfo",void 0);return f=e=a.__decorate([h.subclass("esri.PopupTemplate")],f)}(k.JSONSupport)})},"esri/popup/content":function(){define("require exports ./content/AttachmentsContent ./content/Content ./content/CustomContent ./content/FieldsContent ./content/MediaContent ./content/TextContent".split(" "),
function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});b.AttachmentsContent=a;b.BaseContent=m;b.CustomContent=l;b.FieldsContent=k;b.MediaContent=g;b.TextContent=f;b.isContent=function(a){return a instanceof m};b.types={base:null,key:"type",typeMap:{attachment:a,custom:l,fields:k,media:g,text:f}}})},"esri/popup/content/AttachmentsContent":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Content"],function(e,b,a,m,l){return function(b){function g(a){a=
b.call(this,a)||this;a.displayType=null;a.type="attachments";return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({displayType:this.displayType})};var f;a.__decorate([m.property({type:["preview","list"],json:{write:!0}})],g.prototype,"displayType",void 0);a.__decorate([m.property({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0);return g=f=a.__decorate([m.subclass("esri.popup.content.AttachmentsContent")],g)}(l)})},"esri/popup/content/Content":function(){define(["require",
"exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.type=null;return a}a.__extends(g,b);a.__decorate([l.property({type:["attachments","custom","fields","media","text"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0);return g=a.__decorate([l.subclass("esri.popup.content.Content")],g)}(m.JSONSupport)})},"esri/popup/content/CustomContent":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ./Content".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.creator=null;a.destroyer=null;a.outFields=null;a.type="custom";return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?m.clone(this.outFields):null})};var c;a.__decorate([l.property()],f.prototype,"creator",void 0);a.__decorate([l.property()],f.prototype,"destroyer",void 0);a.__decorate([l.property()],f.prototype,"outFields",
void 0);a.__decorate([l.property({type:["custom"],readOnly:!0})],f.prototype,"type",void 0);return f=c=a.__decorate([l.subclass("esri.popup.content.CustomContent")],f)}(k)})},"esri/popup/content/FieldsContent":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ../FieldInfo ./Content".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.fieldInfos=null;a.type="fields";return a}a.__extends(c,b);d=c;c.prototype.writeFieldInfos=
function(a,c){c.fieldInfos=a&&a.map(function(a){return a.toJSON()})};c.prototype.clone=function(){return new d({fieldInfos:Array.isArray(this.fieldInfos)?m.clone(this.fieldInfos):null})};var d;a.__decorate([l.property({type:[k]})],c.prototype,"fieldInfos",void 0);a.__decorate([l.writer("fieldInfos")],c.prototype,"writeFieldInfos",null);a.__decorate([l.property({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],c.prototype,"type",void 0);return c=d=a.__decorate([l.subclass("esri.popup.content.FieldsContent")],
c)}(g)})},"esri/popup/FieldInfo":function(){define("require exports tslib ../core/jsonMap ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/FieldInfoFormat".split(" "),function(e,b,a,m,l,k,g,f){var c=new m.default({richtext:"rich-text",textarea:"text-area",textbox:"text-box"});return function(d){function b(a){a=d.call(this,a)||this;a.fieldName=null;a.format=null;a.isEditable=!1;a.label=null;a.stringFieldOption="text-box";a.statisticType=null;a.tooltip=null;a.visible=!0;
return a}a.__extends(b,d);e=b;b.prototype.writeStringFieldOption=function(a,b){b.stringFieldOption=c.toJSON(a)};b.prototype.readStringFieldOption=function(a){if(a)return c.fromJSON(a)};b.prototype.clone=function(){return new e({fieldName:this.fieldName,format:this.format?k.clone(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})};var e;a.__decorate([g.property({type:String,
json:{write:!0}})],b.prototype,"fieldName",void 0);a.__decorate([g.property({type:f,json:{write:!0}})],b.prototype,"format",void 0);a.__decorate([g.property({type:Boolean,json:{write:!0,default:!1}})],b.prototype,"isEditable",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);a.__decorate([g.property({type:c.apiValues,json:{write:!0,default:"text-box",type:c.jsonValues}})],b.prototype,"stringFieldOption",void 0);a.__decorate([g.writer("stringFieldOption")],
b.prototype,"writeStringFieldOption",null);a.__decorate([g.reader("stringFieldOption")],b.prototype,"readStringFieldOption",null);a.__decorate([g.property({type:"count sum min max avg stddev var".split(" "),json:{write:!0}})],b.prototype,"statisticType",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],b.prototype,"tooltip",void 0);a.__decorate([g.property({type:Boolean,json:{write:!0}})],b.prototype,"visible",void 0);return b=e=a.__decorate([g.subclass("esri.popup.FieldInfo")],b)}(l.JSONSupport)})},
"esri/popup/support/FieldInfoFormat":function(){define("require exports tslib ../../core/date ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ../../intl/date ../../intl/number".split(" "),function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=b.call(this,a)||this;a.dateFormat=null;a.digitSeparator=!1;a.places=null;return a}a.__extends(d,b);e=d;d.prototype.clone=function(){return new e({dateFormat:this.dateFormat,digitSeparator:this.digitSeparator,
places:this.places})};d.prototype.format=function(a){return this.dateFormat?f.formatDate(a,f.convertDateFormatToIntlOptions(this.dateFormat)):c.formatNumber(a,c.convertNumberFormatToIntlOptions(this))};var e;a.__decorate([k.enumeration(m.dictionary)],d.prototype,"dateFormat",void 0);a.__decorate([k.property({type:Boolean,json:{write:!0}})],d.prototype,"digitSeparator",void 0);a.__decorate([k.property({type:g.Integer,json:{write:!0}})],d.prototype,"places",void 0);return d=e=a.__decorate([k.subclass("esri.popup.support.FieldInfoFormat")],
d)}(l.JSONSupport)})},"esri/core/date":function(){define(["require","exports","./jsonMap"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.formats={"short-date":"(datePattern: 'M/d/y', selector: 'date')","short-date-short-time":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-short-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')","short-date-long-time":"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",
"short-date-long-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')","short-date-le":"(datePattern: 'd/M/y', selector: 'date')","short-date-le-short-time":"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-le-short-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')","short-date-le-long-time":"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-le-long-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')",
"long-month-day-year":"(datePattern: 'MMMM d, y', selector: 'date')","long-month-day-year-short-time":"(datePattern: 'MMMM d, y', timePattern: 'h:mm a', selector: 'date and time')","long-month-day-year-short-time-24":"(datePattern: 'MMMM d, y', timePattern: 'H:mm', selector: 'date and time')","long-month-day-year-long-time":"(datePattern: 'MMMM d, y', timePattern: 'h:mm:ss a', selector: 'date and time')","long-month-day-year-long-time-24":"(datePattern: 'MMMM d, y', timePattern: 'H:mm:ss', selector: 'date and time')",
"day-short-month-year":"(datePattern: 'd MMM y', selector: 'date')","day-short-month-year-short-time":"(datePattern: 'd MMM y', timePattern: 'h:mm a', selector: 'date and time')","day-short-month-year-short-time-24":"(datePattern: 'd MMM y', timePattern: 'H:mm', selector: 'date and time')","day-short-month-year-long-time":"(datePattern: 'd MMM y', timePattern: 'h:mm:ss a', selector: 'date and time')","day-short-month-year-long-time-24":"(datePattern: 'd MMM y', timePattern: 'H:mm:ss', selector: 'date and time')",
"long-date":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')","long-date-short-time":"(datePattern: 'EEEE, MMMM d, y', timePattern: 'h:mm a', selector: 'date and time')","long-date-short-time-24":"(datePattern: 'EEEE, MMMM d, y', timePattern: 'H:mm', selector: 'date and time')","long-date-long-time":"(datePattern: 'EEEE, MMMM d, y', timePattern: 'h:mm:ss a', selector: 'date and time')","long-date-long-time-24":"(datePattern: 'EEEE, MMMM d, y', timePattern: 'H:mm:ss', selector: 'date and time')",
"long-month-year":"(datePattern: 'MMMM y', selector: 'date')","short-month-year":"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"};b.dictionary=a.strict()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",
shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",
dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"});b.toJSON=b.dictionary.toJSON.bind(b.dictionary);b.fromJSON=b.dictionary.fromJSON.bind(b.dictionary);b.getFormat=
function(a){return b.formats[a]}})},"esri/popup/content/MediaContent":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ./BarChartMediaInfo ./ColumnChartMediaInfo ./Content ./ImageMediaInfo ./LineChartMediaInfo ./PieChartMediaInfo ./support/mediaInfoTypes".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n){return function(b){function f(a){a=b.call(this,a)||this;a.mediaInfos=null;a.type="media";return a}a.__extends(f,b);e=f;f.prototype.readMediaInfos=function(a){return a&&
a.map(function(a){if("image"===a.type)return c.fromJSON(a);if("barchart"===a.type)return k.fromJSON(a);if("columnchart"===a.type)return g.fromJSON(a);if("linechart"===a.type)return d.fromJSON(a);if("piechart"===a.type)return h.fromJSON(a)}).filter(Boolean)};f.prototype.writeMediaInfos=function(a,c){c.mediaInfos=a&&a.map(function(a){return a.toJSON()})};f.prototype.clone=function(){return new e({mediaInfos:this.mediaInfos?m.clone(this.mediaInfos):null})};var e;a.__decorate([l.property({types:[n.types]})],
f.prototype,"mediaInfos",void 0);a.__decorate([l.reader("mediaInfos")],f.prototype,"readMediaInfos",null);a.__decorate([l.writer("mediaInfos")],f.prototype,"writeMediaInfos",null);a.__decorate([l.property({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0);return f=e=a.__decorate([l.subclass("esri.popup.content.MediaContent")],f)}(f)})},"esri/popup/content/BarChartMediaInfo":function(){define("require exports tslib ../../core/accessorSupport/decorators ./mixins/ChartMediaInfo ./support/chartMediaInfoUtils".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="bar-chart";return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({title:this.title,caption:this.caption,value:this.value?this.value.clone():null})};var c;a.__decorate([m.property({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:k.chartTypeKebabDict.write}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.popup.content.BarChartMediaInfo")],f)}(l)})},"esri/popup/content/mixins/ChartMediaInfo":function(){define("require exports tslib ../../../core/accessorSupport/decorators ./MediaInfo ../support/ChartMediaInfoValue".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type=null;a.value=null;return a}a.__extends(f,b);a.__decorate([m.property({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0);a.__decorate([m.property({type:k,json:{write:!0}})],f.prototype,"value",void 0);return f=a.__decorate([m.subclass("esri.popup.content.mixins.ChartMediaInfo")],f)}(l)})},"esri/popup/content/mixins/MediaInfo":function(){define(["require",
"exports","tslib","../../../core/JSONSupport","../../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.altText=null;a.caption="";a.title="";a.type=null;return a}a.__extends(g,b);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"altText",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"caption",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"title",void 0);
a.__decorate([l.property({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0);return g=a.__decorate([l.subclass("esri.popup.content.mixins.MediaInfo")],g)}(m.JSONSupport)})},"esri/popup/content/support/ChartMediaInfoValue":function(){define("require exports tslib ../../../core/JSONSupport ../../../core/lang ../../../core/accessorSupport/decorators ./ChartMediaInfoValueSeries".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=
b.call(this,a)||this;a.fields=[];a.normalizeField=null;a.series=[];a.tooltipField=null;return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({fields:l.clone(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})};var d;a.__decorate([k.property({type:[String],json:{write:!0}})],c.prototype,"fields",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"normalizeField",void 0);a.__decorate([k.property({type:[g],json:{read:!1}})],c.prototype,
"series",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"tooltipField",void 0);return c=d=a.__decorate([k.subclass("esri.popup.content.support.ChartMediaInfoValue")],c)}(m.JSONSupport)})},"esri/popup/content/support/ChartMediaInfoValueSeries":function(){define(["require","exports","tslib","../../../core/Accessor","../../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.tooltip=null;a.x=null;a.y=null;return a}
a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({tooltip:this.tooltip,x:this.x,y:this.y})};var f;a.__decorate([l.property()],g.prototype,"tooltip",void 0);a.__decorate([l.property()],g.prototype,"x",void 0);a.__decorate([l.property()],g.prototype,"y",void 0);return g=f=a.__decorate([l.subclass("esri.popup.content.support.ChartMediaInfoValueSeries")],g)}(m)})},"esri/popup/content/support/chartMediaInfoUtils":function(){define(["require","exports","../../../core/jsonMap"],function(e,
b,a){Object.defineProperty(b,"__esModule",{value:!0});b.chartTypeKebabDict=a.strict()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})})},"esri/popup/content/ColumnChartMediaInfo":function(){define("require exports tslib ../../core/accessorSupport/decorators ./mixins/ChartMediaInfo ./support/chartMediaInfoUtils".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="column-chart";return a}a.__extends(f,b);c=f;
f.prototype.clone=function(){return new c({title:this.title,caption:this.caption,value:this.value?this.value.clone():null})};var c;a.__decorate([m.property({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:k.chartTypeKebabDict.write}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.popup.content.ColumnChartMediaInfo")],f)}(l)})},"esri/popup/content/ImageMediaInfo":function(){define("require exports tslib ../../core/accessorSupport/decorators ./mixins/MediaInfo ./support/ImageMediaInfoValue".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.refreshInterval=null;a.type="image";a.value=null;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})};var c;a.__decorate([m.property({type:Number,json:{write:!0}})],f.prototype,"refreshInterval",void 0);a.__decorate([m.property({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],
f.prototype,"type",void 0);a.__decorate([m.property({type:k,json:{write:!0}})],f.prototype,"value",void 0);return f=c=a.__decorate([m.subclass("esri.popup.content.ImageMediaInfo")],f)}(l)})},"esri/popup/content/support/ImageMediaInfoValue":function(){define(["require","exports","tslib","../../../core/JSONSupport","../../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.linkURL=null;a.sourceURL=null;return a}a.__extends(g,b);f=g;g.prototype.clone=
function(){return new f({linkURL:this.linkURL,sourceURL:this.sourceURL})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"linkURL",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"sourceURL",void 0);return g=f=a.__decorate([l.subclass("esri.popup.content.support.ImageMediaInfoValue")],g)}(m.JSONSupport)})},"esri/popup/content/LineChartMediaInfo":function(){define("require exports tslib ../../core/accessorSupport/decorators ./mixins/ChartMediaInfo ./support/chartMediaInfoUtils".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="line-chart";return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({title:this.title,caption:this.caption,value:this.value?this.value.clone():null})};var c;a.__decorate([m.property({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:k.chartTypeKebabDict.write}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.popup.content.LineChartMediaInfo")],f)}(l)})},
"esri/popup/content/PieChartMediaInfo":function(){define("require exports tslib ../../core/accessorSupport/decorators ./mixins/ChartMediaInfo ./support/chartMediaInfoUtils".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="pie-chart";return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({title:this.title,caption:this.caption,value:this.value?this.value.clone():null})};var c;a.__decorate([m.property({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],
read:!1,write:k.chartTypeKebabDict.write}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.popup.content.PieChartMediaInfo")],f)}(l)})},"esri/popup/content/support/mediaInfoTypes":function(){define("require exports ../BarChartMediaInfo ../ColumnChartMediaInfo ../ImageMediaInfo ../LineChartMediaInfo ../PieChartMediaInfo ../mixins/MediaInfo".split(" "),function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});b.types={base:f,key:"type",defaultKeyValue:"image",
typeMap:{"bar-chart":a,"column-chart":m,"line-chart":k,"pie-chart":g,image:l}};b.default=b.types})},"esri/popup/content/TextContent":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Content"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.text=null;a.type="text";return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({text:this.text})};var f;a.__decorate([m.property({type:String,json:{write:!0}})],g.prototype,
"text",void 0);a.__decorate([m.property({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0);return g=f=a.__decorate([m.subclass("esri.popup.content.TextContent")],g)}(l)})},"esri/popup/ExpressionInfo":function(){define(["require","exports","tslib","../core/JSONSupport","../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.name=null;a.title=null;a.expression=null;a.returnType=null;return a}a.__extends(g,b);f=
g;g.prototype.clone=function(){return new f({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"name",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"title",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"expression",void 0);a.__decorate([l.property({type:["string","number"],json:{write:!0}})],g.prototype,"returnType",void 0);
return g=f=a.__decorate([l.subclass("esri.popup.ExpressionInfo")],g)}(m.JSONSupport)})},"esri/popup/LayerOptions":function(){define(["require","exports","tslib","../core/JSONSupport","../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.returnTopmostRaster=null;a.showNoDataRecords=null;return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})};
var f;a.__decorate([l.property({type:Boolean,json:{write:!0}})],g.prototype,"returnTopmostRaster",void 0);a.__decorate([l.property({type:Boolean,json:{write:!0}})],g.prototype,"showNoDataRecords",void 0);return g=f=a.__decorate([l.subclass("esri.popup.LayerOptions")],g)}(m.JSONSupport)})},"esri/popup/RelatedRecordsInfo":function(){define("require exports tslib ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ./support/RelatedRecordsInfoFieldOrder".split(" "),function(e,b,a,m,l,
k,g){return function(b){function c(a){a=b.call(this,a)||this;a.showRelatedRecords=null;a.orderByFields=null;return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?l.clone(this.orderByFields):null})};var d;a.__decorate([k.property({type:Boolean,json:{write:!0}})],c.prototype,"showRelatedRecords",void 0);a.__decorate([k.property({type:[g],json:{write:!0}})],c.prototype,"orderByFields",void 0);return c=d=a.__decorate([k.subclass("esri.popup.RelatedRecordsInfo")],
c)}(m.JSONSupport)})},"esri/popup/support/RelatedRecordsInfoFieldOrder":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.field=null;a.order=null;return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({field:this.field,order:this.order})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],g.prototype,"field",void 0);a.__decorate([l.property({type:["asc",
"desc"],json:{write:!0}})],g.prototype,"order",void 0);return g=f=a.__decorate([l.subclass("esri.popup.support.RelatedRecordsInfoFieldOrder")],g)}(m.JSONSupport)})},"esri/support/actions/ActionBase":function(){define("require exports tslib ../../core/Accessor ../../core/Identifiable ../../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.active=!1;a.className=null;a.disabled=!1;a.id=null;a.indicator=!1;a.title=null;a.type=null;
a.visible=!0;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})};var c;a.__decorate([k.property()],f.prototype,"active",void 0);a.__decorate([k.property()],f.prototype,"className",void 0);a.__decorate([k.property()],f.prototype,"disabled",void 0);a.__decorate([k.property()],f.prototype,"id",void 0);a.__decorate([k.property()],f.prototype,
"indicator",void 0);a.__decorate([k.property()],f.prototype,"title",void 0);a.__decorate([k.property()],f.prototype,"type",void 0);a.__decorate([k.property()],f.prototype,"visible",void 0);return f=c=a.__decorate([k.subclass("esri.support.actions.ActionBase")],f)}(l.IdentifiableMixin(m))})},"esri/support/actions/ActionButton":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./ActionBase"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||
this;a.image=null;a.type="button";return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})};var f;a.__decorate([m.property()],g.prototype,"image",void 0);return g=f=a.__decorate([m.subclass("esri.support.Action.ActionButton")],g)}(l)})},"esri/support/actions/ActionToggle":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators",
"./ActionBase"],function(e,b,a,m,l){return function(b){function g(a){a=b.call(this,a)||this;a.image=null;a.type="toggle";a.value=!1;return a}a.__extends(g,b);f=g;g.prototype.clone=function(){return new f({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})};var f;a.__decorate([m.property()],g.prototype,"image",void 0);a.__decorate([m.property()],g.prototype,"value",void 0);
return g=f=a.__decorate([m.subclass("esri.support.Action.ActionToggle")],g)}(l)})},"esri/renderers":function(){define("require exports ./renderers/ClassBreaksRenderer ./renderers/DictionaryRenderer ./renderers/DotDensityRenderer ./renderers/HeatmapRenderer ./renderers/Renderer ./renderers/SimpleRenderer ./renderers/UniqueValueRenderer ./renderers/support/jsonUtils".split(" "),function(e,b,a,m,l,k,g,f,c,d){Object.defineProperty(b,"__esModule",{value:!0});b.ClassBreaksRenderer=a;b.DictionaryRenderer=
m;b.DotDensityRenderer=l;b.HeatmapRenderer=k;b.BaseRenderer=g;b.SimpleRenderer=f;b.UniqueValueRenderer=c;b.isRenderer=function(a){return a instanceof g};b.read=d.read;b.write=d.write;b.fromJSON=d.fromJSON;b.rendererTypes={key:"type",base:g,typeMap:{heatmap:k,simple:f,"unique-value":c,"class-breaks":a,"dot-density":l,dictionary:m}};b.webSceneRendererTypes={key:"type",base:g,typeMap:{simple:f,"unique-value":c,"class-breaks":a}}})},"esri/renderers/ClassBreaksRenderer":function(){define("require exports tslib ../symbols ../symbols ../core/jsonMap ../core/lang ../core/Logger ../core/maybe ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ../layers/support/fieldUtils ./Renderer ./mixins/VisualVariablesMixin ./support/ClassBreakInfo ./support/LegendOptions ../support/arcadeOnDemand ../symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u){var x=f.getLogger("esri.renderers.ClassBreaksRenderer"),y=new k.default({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"}),z=n.ensureType(v);return function(b){function f(a){a=b.call(this,a)||this;a.backgroundFillSymbol=null;a.classBreakInfos=null;a.defaultLabel=null;a.defaultSymbol=null;a.field=null;a.isMaxInclusive=!0;a.legendOptions=null;a.normalizationField=null;a.normalizationTotal=null;a.type=
"class-breaks";a.valueExpression=null;a.valueExpressionTitle=null;a._set("classBreakInfos",[]);return a}a.__extends(f,b);e=f;Object.defineProperty(f.prototype,"_cache",{get:function(){return{compiledFunc:null}},enumerable:!0,configurable:!0});f.prototype.readClassBreakInfos=function(a,c,b){if(Array.isArray(a)){var d=c.minValue;return a.map(function(a){var c=new v;c.read(a,b);null==c.minValue&&(c.minValue=d);null==c.maxValue&&(c.maxValue=c.minValue);d=c.maxValue;return c})}};f.prototype.writeClassBreakInfos=
function(a,c,b,d){a=a.map(function(a){return a.write({},d)});this._areClassBreaksConsecutive()&&a.forEach(function(a){return delete a.classMinValue});c[b]=a};f.prototype.readDefaultSymbol=function(a,c,b){return u.read(a,c,b)};f.prototype.writeDefaultSymbolWebScene=function(a,c,b,d){u.writeTarget(a,c,b,d)};f.prototype.writeDefaultSymbol=function(a,c,b,d){u.writeTarget(a,c,b,d)};f.prototype.castField=function(a){return null==a?a:"function"===typeof a?(x.error(".field: field must be a string value"),
null):n.ensureString(a)};Object.defineProperty(f.prototype,"minValue",{get:function(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"normalizationType",{get:function(){var a=this._get("normalizationType"),c=!!this.normalizationField,b=null!=this.normalizationTotal;if(c||b)a=c&&"field"||b&&"percent-of-total"||null,c&&b&&x.warn("warning: both normalizationField and normalizationTotal are set!");
else if("field"===a||"percent-of-total"===a)a=null;return a},set:function(a){this._set("normalizationType",a)},enumerable:!0,configurable:!0});f.prototype.addClassBreakInfo=function(a,c,b){var d=null,d="number"===typeof a?new v({minValue:a,maxValue:c,symbol:l.ensureType(b)}):z(g.clone(a));this.classBreakInfos.push(d);1===this.classBreakInfos.length&&this.notifyChange("minValue")};f.prototype.removeClassBreakInfo=function(a,c){for(var b=this.classBreakInfos.length,d=0;d<b;d++){var f=[this.classBreakInfos[d].minValue,
this.classBreakInfos[d].maxValue];if(f[0]===a&&f[1]===c){this.classBreakInfos.splice(d,1);break}}};f.prototype.getBreakIndex=function(a,b){this.valueExpression&&(c.isNone(b)||c.isNone(b.arcade))&&x.warn("");return this.valueExpression?this._getBreakIndexForExpression(a,b):this._getBreakIndexForField(a)};f.prototype.getClassBreakInfo=function(b,d){return a.__awaiter(this,void 0,void 0,function(){var f,g,e,h;return a.__generator(this,function(p){switch(p.label){case 0:f=d;if(!this.valueExpression||
!c.isNone(d)&&!c.isNone(d.arcade))return[3,2];g=[a.__assign({},f)];e={};return[4,w.loadArcade()];case 1:f=a.__assign.apply(void 0,g.concat([(e.arcade=p.sent(),e)])),p.label=2;case 2:return h=this.getBreakIndex(b,f),[2,-1!==h?this.classBreakInfos[h]:null]}})})};f.prototype.getSymbol=function(a,b){if(this.valueExpression&&(c.isNone(b)||c.isNone(b.arcade)))x.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");else return a=this.getBreakIndex(a,b),-1<a?this.classBreakInfos[a].symbol:
this.defaultSymbol};f.prototype.getSymbolAsync=function(b,d){return a.__awaiter(this,void 0,void 0,function(){var f,g,e,h;return a.__generator(this,function(p){switch(p.label){case 0:f=d;if(!this.valueExpression||!c.isNone(d)&&!c.isNone(d.arcade))return[3,2];g=[a.__assign({},f)];e={};return[4,w.loadArcade()];case 1:f=a.__assign.apply(void 0,g.concat([(e.arcade=p.sent(),e)])),p.label=2;case 2:return h=this.getBreakIndex(b,f),[2,-1<h?this.classBreakInfos[h].symbol:this.defaultSymbol]}})})};f.prototype.getSymbols=
function(){var a=[];this.classBreakInfos.forEach(function(c){c.symbol&&a.push(c.symbol)});this.defaultSymbol&&a.push(this.defaultSymbol);return a};f.prototype.getAttributeHash=function(){return this.visualVariables&&this.visualVariables.reduce(function(a,c){return a+c.getAttributeHash()},"")};f.prototype.getMeshHash=function(){var a=JSON.stringify(this.backgroundFillSymbol),c=JSON.stringify(this.defaultSymbol),b=this.normalizationField+"."+this.normalizationType+"."+this.normalizationTotal,d=this.classBreakInfos.reduce(function(a,
c){return a+c.getMeshHash()},"");return a+"."+c+"."+d+"."+b+"."+this.field+"."+this.valueExpression};Object.defineProperty(f.prototype,"arcadeRequired",{get:function(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new e({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.clone(),
valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:g.clone(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:g.clone(this.visualVariables),legendOptions:g.clone(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})};f.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,
void 0,void 0,function(){var f;return a.__generator(this,function(a){switch(a.label){case 0:return f=[this.collectVVRequiredFields(c,b),this.collectSymbolFields(c,b)],[4,d.all(f)];case 1:return a.sent(),[2]}})})};f.prototype.collectSymbolFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var f;return a.__generator(this,function(g){switch(g.label){case 0:return f=a.__spreadArrays(this.getSymbols().map(function(a){return a.collectRequiredFields(c,b)}),[p.collectArcadeFieldNames(c,
b,this.valueExpression)]),p.collectField(c,b,this.field),p.collectField(c,b,this.normalizationField),[4,d.all(f)];case 1:return g.sent(),[2]}})})};f.prototype._getBreakIndexForExpression=function(a,b){var d=c.unwrapOr(b,{});b=d.viewingMode;var f=d.scale,g=d.spatialReference,e=this._cache.compiledFunc,d=c.unwrap(d.arcade).arcadeUtils;e||(e=d.createSyntaxTree(this.valueExpression),e=d.createFunction(e),this._cache.compiledFunc=e);a=d.executeFunction(e,d.createExecContext(a,d.getViewInfo({viewingMode:b,
scale:f,spatialReference:g})));return this._getBreakIndexfromInfos(a)};f.prototype._getBreakIndexForField=function(a){var c=a.attributes;a=this.normalizationType;var b=parseFloat(c[this.field]);if(a){var d=this.normalizationTotal,c=parseFloat(c[this.normalizationField]);if("log"===a)b=Math.log(b)*Math.LOG10E;else if("percent-of-total"===a&&!isNaN(d))b=b/d*100;else if("field"===a&&!isNaN(c)){if(isNaN(b)||isNaN(c))return-1;b/=c}}return this._getBreakIndexfromInfos(b)};f.prototype._getBreakIndexfromInfos=
function(a){var c=this.isMaxInclusive;if(null!=a&&"number"===typeof a&&!isNaN(a))for(var b=0;b<this.classBreakInfos.length;b++){var d=[this.classBreakInfos[b].minValue,this.classBreakInfos[b].maxValue];if(d[0]<=a&&(c?a<=d[1]:a<d[1]))return b}return-1};f.prototype._areClassBreaksConsecutive=function(){for(var a=this.classBreakInfos,c=a.length,b=1;b<c;b++)if(a[b-1].maxValue!==a[b].minValue)return!1;return!0};var e;a.__decorate([h.property({readOnly:!0,dependsOn:["valueExpression"]})],f.prototype,"_cache",
null);a.__decorate([h.property({types:{base:m.BaseSymbol,key:"type",typeMap:{"simple-fill":l.symbolTypesRenderer.typeMap["simple-fill"],"picture-fill":l.symbolTypesRenderer.typeMap["picture-fill"],"polygon-3d":l.symbolTypesRenderer.typeMap["polygon-3d"]}},json:{origins:{"web-scene":{type:m.PolygonSymbol3D,read:u.read,write:u.writeTarget}},read:u.read,write:u.writeTarget}})],f.prototype,"backgroundFillSymbol",void 0);a.__decorate([h.property({type:[v]})],f.prototype,"classBreakInfos",void 0);a.__decorate([h.reader("classBreakInfos")],
f.prototype,"readClassBreakInfos",null);a.__decorate([h.writer("classBreakInfos")],f.prototype,"writeClassBreakInfos",null);a.__decorate([h.property({type:String,json:{write:!0}})],f.prototype,"defaultLabel",void 0);a.__decorate([h.property({types:l.symbolTypesRenderer})],f.prototype,"defaultSymbol",void 0);a.__decorate([h.reader("defaultSymbol")],f.prototype,"readDefaultSymbol",null);a.__decorate([h.writer("web-scene","defaultSymbol",{defaultSymbol:{types:l.symbolTypesRenderer3D}})],f.prototype,
"writeDefaultSymbolWebScene",null);a.__decorate([h.writer("defaultSymbol")],f.prototype,"writeDefaultSymbol",null);a.__decorate([h.property({type:String,json:{write:!0}})],f.prototype,"field",void 0);a.__decorate([h.cast("field")],f.prototype,"castField",null);a.__decorate([h.property({type:Boolean})],f.prototype,"isMaxInclusive",void 0);a.__decorate([h.property({type:q.default,json:{write:!0}})],f.prototype,"legendOptions",void 0);a.__decorate([h.property({type:Number,readOnly:!0,value:null,dependsOn:["classBreakInfos"],
json:{read:!1,write:{overridePolicy:function(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],f.prototype,"minValue",null);a.__decorate([h.property({type:String,json:{write:!0}})],f.prototype,"normalizationField",void 0);a.__decorate([h.property({type:Number,cast:function(a){return n.ensureNumber(a)},json:{write:!0}})],f.prototype,"normalizationTotal",void 0);a.__decorate([h.property({type:y.apiValues,value:null,dependsOn:["normalizationField",
"normalizationTotal"],json:{type:y.jsonValues,read:y.read,write:y.write}})],f.prototype,"normalizationType",null);a.__decorate([h.enumeration({classBreaks:"class-breaks"})],f.prototype,"type",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],f.prototype,"valueExpression",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],f.prototype,"valueExpressionTitle",void 0);return f=e=a.__decorate([h.subclass("esri.renderers.ClassBreaksRenderer")],f)}(t.VisualVariablesMixin(r))})},
"esri/symbols":function(){define("require exports ./core/accessorSupport/ensureType ./symbols/CIMSymbol ./symbols/ExtrudeSymbol3DLayer ./symbols/FillSymbol ./symbols/FillSymbol3DLayer ./symbols/Font ./symbols/IconSymbol3DLayer ./symbols/LabelSymbol3D ./symbols/LineSymbol3D ./symbols/LineSymbol3DLayer ./symbols/MarkerSymbol ./symbols/MeshSymbol3D ./symbols/ObjectSymbol3DLayer ./symbols/PathSymbol3DLayer ./symbols/PictureFillSymbol ./symbols/PictureMarkerSymbol ./symbols/PointSymbol3D ./symbols/PolygonSymbol3D ./symbols/SimpleFillSymbol ./symbols/SimpleLineSymbol ./symbols/SimpleMarkerSymbol ./symbols/Symbol ./symbols/Symbol3D ./symbols/Symbol3DLayer ./symbols/TextSymbol ./symbols/TextSymbol3DLayer ./symbols/WaterSymbol3DLayer ./symbols/WebStyleSymbol ./symbols/callouts/LineCallout3D ./symbols/callouts/LineCallout3DBorder ./symbols/support/Symbol3DVerticalOffset ./symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y,z,A,C,B,E,D,I,J,F,G,K,L,H){Object.defineProperty(b,"__esModule",{value:!0});b.CIMSymbol=m;b.ExtrudeSymbol3DLayer=l;b.BaseFillSymbol=k;b.FillSymbol3DLayer=g;b.Font=f;b.IconSymbol3DLayer=c;b.LabelSymbol3D=d;b.LineSymbol3D=h;b.LineSymbol3DLayer=n;b.BaseMarkerSymbol=p;b.MeshSymbol3D=r;b.ObjectSymbol3DLayer=t;b.PathSymbol3DLayer=v;b.PictureFillSymbol=q;b.PictureMarkerSymbol=w;b.PointSymbol3D=u;b.PolygonSymbol3D=x;b.SimpleFillSymbol=y;b.SimpleLineSymbol=
z;b.SimpleMarkerSymbol=A;b.BaseSymbol=C;b.BaseSymbol3D=B;b.BaseSymbol3DLayer=E;b.TextSymbol=D;b.TextSymbol3DLayer=I;b.WaterSymbol3DLayer=J;b.WebStyleSymbol=F;b.LineCallout3D=G;b.LineCallout3DBorder=K;b.Symbol3DVerticalOffset=L.Symbol3DVerticalOffset;b.fromJSON=H.fromJSON;b.isSymbol=function(a){return a instanceof C};b.isSymbol2D=function(a){if(!a)return!1;switch(a.type){case "picture-fill":case "picture-marker":case "simple-fill":case "simple-line":case "simple-marker":case "text":case "cim":return!0;
default:return!1}};b.isSymbol3D=function(a){if(!a)return!1;switch(a.type){case "label-3d":case "line-3d":case "mesh-3d":case "point-3d":case "polygon-3d":return!0;default:return!1}};b.symbolTypes={base:C,key:"type",typeMap:{"simple-fill":y,"picture-fill":q,"picture-marker":w,"simple-line":z,"simple-marker":A,text:D,"label-3d":d,"line-3d":h,"mesh-3d":r,"point-3d":u,"polygon-3d":x,"web-style":F,cim:m}};b.symbolTypesRenderer={base:C,key:"type",typeMap:{"simple-fill":y,"picture-fill":q,"picture-marker":w,
"simple-line":z,"simple-marker":A,text:D,"line-3d":h,"mesh-3d":r,"point-3d":u,"polygon-3d":x,"web-style":F,cim:m}};b.symbolTypesLabel={base:C,key:"type",typeMap:{text:D,"label-3d":d}};b.symbolTypes3D={base:C,key:"type",typeMap:{"label-3d":d,"line-3d":h,"mesh-3d":r,"point-3d":u,"polygon-3d":x,"web-style":F}};b.symbolTypesRenderer3D={base:C,key:"type",typeMap:{"line-3d":h,"mesh-3d":r,"point-3d":u,"polygon-3d":x,"web-style":F}};b.symbolTypesLabel3D={base:C,key:"type",typeMap:{"label-3d":d}};b.ensureType=
a.ensureOneOfType(b.symbolTypes)})},"esri/symbols/CIMSymbol":function(){define("require exports tslib ../core/lang ../core/promiseUtils ../core/accessorSupport/decorators ../layers/support/fieldUtils ../portal/Portal ./Symbol ./cim/cimSymbolUtils".split(" "),function(e,b,a,m,l,k,g,f,c,d){return function(c){function b(a){a=c.call(this,a)||this;a.data=null;a.portal=null;a.styleUrl="";a.type="cim";return a}a.__extends(b,c);e=b;b.prototype.readData=function(a,c){return c};b.prototype.writeData=function(a,
c){if(a)for(var b in a)c[b]=a[b]};b.prototype.readStyleUrl=function(a,c){return c.symbolUrl?c.symbolUrl:a};b.prototype.writeStyleUrl=function(a,c){a&&(c.symbolUrl=a)};b.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var f,e,h;return a.__generator(this,function(a){switch(a.label){case 0:return[4,d.fetchSymbol(this)];case 1:a.sent();if("CIMSymbolReference"!==this.data.type)return[3,3];f=this.data;e=f.primitiveOverrides;if(!e)return[3,3];h=e.map(function(a){return g.collectArcadeFieldNames(c,
b,a.valueExpressionInfo.expression)});return[4,l.all(h)];case 2:a.sent(),a.label=3;case 3:return[2]}})})};b.prototype.clone=function(){return new e({color:this.color.clone(),data:m.clone(this.data),portal:this.portal,styleName:this.styleName,styleUrl:this.styleUrl})};b.prototype.hash=function(){return this.color.hash()+"."+this.data+"."+this.portal+"."+this.styleName+"."+this.styleUrl};var e;a.__decorate([k.property({json:{write:!1}})],b.prototype,"color",void 0);a.__decorate([k.property({json:{write:!0}})],
b.prototype,"data",void 0);a.__decorate([k.reader("data",["symbol"])],b.prototype,"readData",null);a.__decorate([k.writer("data")],b.prototype,"writeData",null);a.__decorate([k.property({type:f,json:{write:!1}})],b.prototype,"portal",void 0);a.__decorate([k.property({json:{write:!0}})],b.prototype,"styleName",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],b.prototype,"styleUrl",void 0);a.__decorate([k.reader("styleUrl",["styleUrl","symbolUrl"])],b.prototype,"readStyleUrl",null);
a.__decorate([k.writer("styleUrl")],b.prototype,"writeStyleUrl",null);a.__decorate([k.enumeration({CIMSymbolReference:"cim"})],b.prototype,"type",void 0);return b=e=a.__decorate([k.subclass("esri.symbols.CIMSymbol")],b)}(c)})},"esri/symbols/Symbol":function(){define("require exports tslib ../Color ../core/jsonMap ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k,g){var f=new l.default({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",
esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"}),c=0;return function(b){function d(a){a=b.call(this,a)||this;a.id="sym"+c++;a.type=null;return a}a.__extends(d,b);Object.defineProperty(d.prototype,"color",{set:function(a){this._set("color",a)},enumerable:!0,configurable:!0});d.prototype.readColor=function(a){return a&&
null!=a[0]?[a[0],a[1],a[2],a[3]/255]:a};d.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2]})})};d.prototype.hash=function(){return JSON.stringify(this.toJSON())};d.prototype.clone=function(){};a.__decorate([g.property({type:f.apiValues,json:{read:f.read,write:{ignoreOrigin:!0,writer:f.write}}})],d.prototype,"type",void 0);a.__decorate([g.property({type:m,value:new m([0,0,0,1]),json:{write:{allowNull:!0}}})],
d.prototype,"color",null);a.__decorate([g.reader("color")],d.prototype,"readColor",null);return d=a.__decorate([g.subclass("esri.symbols.Symbol")],d)}(k.JSONSupport)})},"esri/symbols/cim/cimSymbolUtils":function(){define("require exports tslib ../../request ../../core/Logger ../../core/promiseUtils ./cimAnalyzer".split(" "),function(e,b,a,m,l,k,g){function f(b,d){return a.__awaiter(this,void 0,void 0,function(){var f,g;return a.__generator(this,function(a){switch(a.label){case 0:if(b.data||!b.styleUrl||
!b.styleName)return[2,b];f=b.styleName;g=b;return[4,c(f,b.styleUrl,d)];case 1:return g.data=a.sent(),[2,b]}})})}function c(c,d,f){return a.__awaiter(this,void 0,void 0,function(){var g,e;return a.__generator(this,function(p){if(r.has(c))return[2,r.get(c).then(function(a){return b.makeSymbolRef(a.data)})];try{return g=d+"/resources/styles/cim/"+c+".json",e=m(g,a.__assign({responseType:"json",query:{f:"json"}},f)),r.set(c,e),[2,e.then(function(a){return b.makeSymbolRef(a.data)})]}catch(y){return h.error("error requesting "+
c+", reason is "+y.message),r.has(c)&&r.delete(c),[2,null]}})})}var d=this;Object.defineProperty(b,"__esModule",{value:!0});var h=l.getLogger("esri/symbols/support/cimSymbolUtils"),n=function(){function a(a,c){this.layers=a;this.data=c}Object.defineProperty(a.prototype,"type",{get:function(){return"expanded-cim"},enumerable:!0,configurable:!0});a.prototype.hash=function(){for(var a="",c=0,b=this.layers;c<b.length;c++)a+=b[c].templateHash;return a};return a}();b.expandSymbols=function(c,f,g){return a.__awaiter(d,
void 0,void 0,function(){return a.__generator(this,function(a){return[2,k.all(c.map(function(a){return b.expandSymbol(a,f,g)}))]})})};var p=function(c,b){return a.__awaiter(d,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return d=n.bind,[4,g.analyzeCIMSymbol(c.data,b)];case 1:return[2,new (d.apply(n,[void 0,a.sent(),c.data]))]}})})};b.expandSymbol=function(c,b,g){return a.__awaiter(d,void 0,void 0,function(){var d,e;return a.__generator(this,function(a){switch(a.label){case 0:if(!c)return[2,
null];if("cim"!==c.type)return[3,2];d=p;return[4,f(c,g)];case 1:return[2,d.apply(void 0,[a.sent(),b])];case 2:if("web-style"!==c.type)return[3,4];e=p;return[4,c.fetchCIMSymbol(g)];case 3:return[2,e.apply(void 0,[a.sent(),b])];case 4:return[2,c]}})})};b.fetchSymbol=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return c?"cim"===c.type?[2,f(c,b)]:"web-style"===c.type?[2,c.fetchCIMSymbol(b)]:[2,c]:[2,null]})})};b.fetchCIMData=f;b.makeSymbolRef=function(a,
c){return null===a?null:"CIMSymbolReference"===a.type?a:{type:"CIMSymbolReference",symbol:a,primitiveOverrides:c}};var r=new Map})},"esri/symbols/cim/cimAnalyzer":function(){define("require exports tslib ../../Color ../../core/Logger ../../core/promiseUtils ../../core/screenUtils ../../core/string ../../support/arcadeOnDemand ./CIMSymbolHelper ./SDFHelper ./utils ../../views/2d/arcade/utils".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p){function r(a){switch(a){case "Butt":return 0;case "Square":return 2;
default:return 1}}function t(a){switch(a){case "Bevel":return 0;case "Miter":return 2;default:return 1}}function v(a){switch(a){default:return"left";case "Right":return"right";case "Center":return"center";case "Justify":return"justify"}}function q(a){switch(a){default:return"top";case "Center":return"middle";case "Baseline":return"baseline";case "Bottom":return"bottom"}}function w(a){var c="normal",b="normal";a&&(a=a.toLowerCase(),-1!==a.indexOf("italic")?c="italic":-1!==a.indexOf("oblique")&&(c=
"oblique"),-1!==a.indexOf("bold")?b="bold":-1!==a.indexOf("light")&&(b="lighter"));return{style:c,weight:b}}function u(a,c,b,d){var f;a[c]?f=a[c]:(f={},a[c]=f);f[b]=d}function x(a){return(a=a.markerPlacement)&&a.angleToLine?1:0}function y(a,c,b,g,e,h){if(a){var p=a.symbolLayers;if(p){var n,v=d.CIMSymbolHelper.getSize(a);"CIMPointSymbol"===a.type&&"Map"===a.angleAlignment&&(n=1);for(var q=p.length;q--;){var k=p[q];if(k&&!1!==k.enable){var l=[];d.OverrideHelper.findApplicableOverrides(k,c,l);switch(k.type){case "CIMSolidFill":z(k,
b,l,g,e);break;case "CIMPictureFill":A(k,b,l,g,e);break;case "CIMHatchFill":C(k,b,l,g,e);break;case "CIMGradientFill":var m=b,u=g,w=e,y=f.numericHash(JSON.stringify(k)).toString();w.push({type:"fill",templateHash:y,materialHash:0===l.length?y:M(y,m,l,u),cim:k,materialOverrides:null,colorLocked:k.colorLocked,effects:k.effects,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1});break;case "CIMSolidStroke":B(k,b,l,g,e,"CIMPolygonSymbol"===a.type,v);break;case "CIMPictureStroke":E(k,
b,l,g,e,"CIMPolygonSymbol"===a.type,v);break;case "CIMGradientStroke":var m=b,u=g,w=e,y="CIMPolygonSymbol"===a.type,G=v,N=k.primitiveName,L=void 0!==k.width?k.width:4,Z=r(k.capStyle),O=t(k.joinStyle),T=k.miterLimit,U=f.numericHash(JSON.stringify(k)).toString();w.push({type:"line",templateHash:U,materialHash:0===l.length?U:M(U,m,l,u),cim:k,materialOverrides:null,isOutline:y,colorLocked:k.colorLocked,effects:k.effects,color:{r:128,g:128,b:128,a:1},width:H(N,m,"Width",u,L),cap:H(N,m,"CapStyle",u,Z),
join:H(N,m,"JoinStyle",u,O),miterLimit:H(N,m,"MiterLimit",u,T),referenceWidth:G,zOrder:K(k.name),isDashed:!1});break;case "CIMCharacterMarker":D(k,b,l,g,e);break;case "CIMPictureMarker":if(D(k,b,l,g,e))break;"CIMLineSymbol"===a.type&&(n=x(k));I(k,b,l,g,e,n,v);break;case "CIMVectorMarker":if(D(k,b,l,g,e))break;"CIMLineSymbol"===a.type&&(n=x(k));m=l;l=b;u=g;w=e;y=n;G=v;N=h;if(O=k.markerGraphics)for(L=0,k.scaleSymbolsProportionally&&(Z=k.frame)&&(L=Z.ymax-Z.ymin),Z=0;Z<O.length;Z++)if(T=O[Z])if(U=T.symbol)switch(U.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":F(k,
T,m,l,u,w,y,G,L,N);break;case "CIMTextSymbol":J(k,T,l,m,u,w,y,G,L)}break;default:Q.error("Cannot analyze CIM layer",k.type)}}}}}}function z(a,c,b,d,g){var e=a.primitiveName,h=n.fromCIMColor(a.color),p=f.numericHash(JSON.stringify(a)).toString();g.push({type:"fill",templateHash:p,materialHash:0===b.length?p:function(){return p},cim:a,materialOverrides:null,colorLocked:a.colorLocked,color:H(e,c,"Color",d,h,L),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:a.effects})}function A(a,c,b,d,g){var e=
a.primitiveName,h=a.tintColor?n.fromCIMColor(a.tintColor):{r:255,g:255,b:255,a:1},p=f.numericHash(JSON.stringify(a)).toString(),t=f.numericHash(""+a.url+JSON.stringify(a.colorSubstitutions)).toString();g.push({type:"fill",templateHash:p,materialHash:0===b.length?t:function(){return t},cim:a,materialOverrides:null,colorLocked:a.colorLocked,effects:a.effects,color:H(e,c,"TintColor",d,h,L),height:H(e,c,"Height",d,a.height),scaleX:H(e,c,"ScaleX",d,a.scaleX),angle:H(e,c,"Rotation",d,a.rotation),offsetX:H(e,
c,"OffsetX",d,a.offsetX),offsetY:H(e,c,"OffsetY",d,a.offsetY)})}function C(a,c,b,d,g){var e=["Rotation","OffsetX","OffsetY"],h=b.filter(function(c){return c.primitiveName!==a.primitiveName&&-1===e.indexOf(c.propertyName)}),p=a.primitiveName,n=f.numericHash(JSON.stringify(a)).toString(),t=f.numericHash(""+a.separation+JSON.stringify(a.lineSymbol)).toString();g.push({type:"fill",templateHash:n,materialHash:0===b.length?t:M(t,c,h,d),cim:a,materialOverrides:h,colorLocked:a.colorLocked,effects:a.effects,
color:{r:255,g:255,b:255,a:1},height:H(p,c,"Separation",d,a.separation),scaleX:1,angle:H(p,c,"Rotation",d,a.rotation),offsetX:H(p,c,"OffsetX",d,a.offsetX),offsetY:H(p,c,"OffsetY",d,a.offsetY)})}function B(a,c,b,d,g,e,h){var p=f.numericHash(JSON.stringify(a)).toString(),v=a.primitiveName,q=n.fromCIMColor(a.color),k=void 0!==a.width?a.width:4,l=r(a.capStyle),m=t(a.joinStyle),u=a.miterLimit;g.push({type:"line",templateHash:p,materialHash:0===b.length?p:function(){return p},cim:a,materialOverrides:null,
isOutline:e,colorLocked:a.colorLocked,effects:a.effects,color:H(v,c,"Color",d,q,L),width:H(v,c,"Width",d,k),cap:H(v,c,"CapStyle",d,l),join:H(v,c,"JoinStyle",d,m),miterLimit:H(v,c,"MiterLimit",d,u),referenceWidth:h,zOrder:K(a.name),isDashed:!1})}function E(a,c,b,d,g,e,h){var p=f.numericHash(""+a.url+JSON.stringify(a.colorSubstitutions)).toString(),v=a.primitiveName,q=n.fromCIMColor(a.tintColor),k=void 0!==a.width?a.width:4,l=r(a.capStyle),m=t(a.joinStyle),u=a.miterLimit,w=f.numericHash(JSON.stringify(a)).toString();
g.push({type:"line",templateHash:w,materialHash:0===b.length?p:function(){return p},cim:a,materialOverrides:null,isOutline:e,colorLocked:a.colorLocked,effects:a.effects,color:H(v,c,"TintColor",d,q,L),width:H(v,c,"Width",d,k),cap:H(v,c,"CapStyle",d,l),join:H(v,c,"JoinStyle",d,m),miterLimit:H(v,c,"MiterLimit",d,u),referenceWidth:h,zOrder:K(a.name),isDashed:!1})}function D(a,c,b,d,g){var e=a.markerPlacement;if(!e||"CIMMarkerPlacementInsidePolygon"!==e.type)return!1;var h=["Rotation","OffsetX","OffsetY"],
p=b.filter(function(c){return c.primitiveName!==a.primitiveName&&-1===h.indexOf(c.propertyName)}),n=f.numericHash(JSON.stringify(a)).toString();g.push({type:"fill",templateHash:n,materialHash:0===b.length?n:M(n,c,p,d),cim:a,materialOverrides:p,colorLocked:a.colorLocked,effects:a.effects,color:{r:255,g:255,b:255,a:1},height:H(e.primitiveName,c,"StepY",d,e.stepY),scaleX:1,angle:H(e.primitiveName,c,"GridAngle",d,e.gridAngle),offsetX:H(e.primitiveName,c,"OffsetX",d,e.offsetX),offsetY:H(e.primitiveName,
c,"OffsetY",d,e.offsetY)});return!0}function I(a,c,b,d,g,e,h){for(var p=a.primitiveName,t=a.size,r=a.scaleX,v=a.rotation,q=a.offsetX,k=a.offsetY,l=n.fromCIMColor(a.tintColor),m=f.numericHash(""+a.url+JSON.stringify(a.colorSubstitutions)).toString(),u=!1,w="",x=0;x<b.length;x++){var D=b[x];D.primitiveName===p&&(void 0!==D.value?w+="-"+D.primitiveName+"-"+D.propertyName+"-"+JSON.stringify(D.value):D.valueExpressionInfo&&(u=!0))}g.push({type:"marker",templateHash:f.numericHash(JSON.stringify(a)+w).toString(),
materialHash:u?function(){return m}:m,cim:a,materialOverrides:null,colorLocked:a.colorLocked,effects:a.effects,scaleSymbolsProportionally:!1,alignment:e,size:H(p,c,"Size",d,t),scaleX:H(p,c,"ScaleX",d,r),rotation:H(p,c,"Rotation",d,v),offsetX:H(p,c,"OffsetX",d,q),offsetY:H(p,c,"OffsetY",d,k),color:H(p,c,"TintColor",d,l,L),anchorPoint:a.anchorPoint,isAbsoluteAnchorPoint:"Relative"!==a.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:a.rotateClockwise,referenceSize:h,
sizeRatio:1,markerPlacement:a.markerPlacement})}function J(c,b,g,e,h,p,t,r,k){d.OverrideHelper.findApplicableOverrides(b,e,[]);var l=b.geometry;if("x"in l&&"y"in l){var m=b.symbol,u;u=m.underline?"underline":m.strikethrough?"line-through":"none";var x=w(m.fontStyleName);m.font=a.__assign({family:m.fontFamilyName,decoration:u},x);var D=c.frame,B=c.size/k;k=c.primitiveName;u=(m.height||0)*B;var x=m.angle||0,z=((m.offsetX||0)+(l.x-.5*(D.xmin+D.xmax)))*B,l=((m.offsetY||0)+(l.y-.5*(D.ymin+D.ymax)))*B,
D=n.fromCIMColor(d.CIMSymbolHelper.getFillColor(m)),C=n.fromCIMColor(d.CIMSymbolHelper.getStrokeColor(m)),y=d.CIMSymbolHelper.getStrokeWidth(m);y||(C=n.fromCIMColor(d.CIMSymbolHelper.getFillColor(m.haloSymbol)),y=m.haloSize*B);for(var B="",A=0;A<e.length;A++){var I=e[A];I.primitiveName===k&&void 0!==I.value&&(B+="-"+I.primitiveName+"-"+I.propertyName+"-"+JSON.stringify(I.value))}e=Number(c.colorLocked)+JSON.stringify(c.anchorPoint)+c.anchorPointUnits;p.push({type:"text",templateHash:f.numericHash(JSON.stringify(b)+
e+B).toString(),materialHash:function(){return f.numericHash(JSON.stringify(m.font)).toString()},cim:m,materialOverrides:null,colorLocked:c.colorLocked,effects:c.effects,alignment:t,anchorPoint:{x:c.anchorPoint?c.anchorPoint.x:0,y:c.anchorPoint?c.anchorPoint.y:0},isAbsoluteAnchorPoint:"Relative"!==c.anchorPointUnits,fontName:m.fontFamilyName,decoration:"none",weight:"normal",style:"normal",size:H(k,g,"Size",h,u),angle:H(k,g,"Rotation",h,x),offsetX:H(k,g,"OffsetX",h,z),offsetY:H(k,g,"OffsetY",h,l),
horizontalAlignment:v(m.horizontalAlignment),verticalAlignment:q(m.verticalAlignment),text:H(b.primitiveName,g,"TextString",h,b.textString,n._adjustTextCase,m.textCase),color:D,outlineColor:C,outlineSize:y,referenceSize:r,sizeRatio:1,markerPlacement:c.markerPlacement})}}function F(c,b,g,e,p,t,r,v,q,k){var l=b.geometry;if(l){var m=b.symbol.symbolLayers;if(m)if(k)G(c,b,e,g,p,t,r,v,q);else{var u=m.length;for(k=function(){var k=m[u];if(!k||!1===k.enable)return"continue";switch(k.type){case "CIMSolidFill":case "CIMSolidStroke":var w=
h.getExtent(l),x=h.getSDFMetrics(w,c.frame,c.size,c.anchorPoint,"Relative"!==c.anchorPointUnits),w=x[0],D=x[1],x=x[2],B="CIMSolidFill"===k.type,z={type:"sdf",geom:l,asFill:B},C=c.primitiveName,y=c.size,A=c.rotation||0,I=c.offsetX,E=c.offsetY,F=k.primitiveName,M=B?n.fromCIMColor(d.CIMSymbolHelper.getFillColor(k)):n.fromCIMColor(d.CIMSymbolHelper.getStrokeColor(k)),J=B?{r:0,g:0,b:0,a:0}:n.fromCIMColor(d.CIMSymbolHelper.getStrokeColor(k)),P=d.CIMSymbolHelper.getStrokeWidth(k);if(!B&&!P)break;for(var B=
!1,K="",Q=0;Q<g.length;Q++){var N=g[Q];if(N.primitiveName===F||N.primitiveName===C)void 0!==N.value?K+="-"+N.primitiveName+"-"+N.propertyName+"-"+JSON.stringify(N.value):N.valueExpressionInfo&&(B=!0)}var C=JSON.stringify(a.__assign(a.__assign({},c),{markerGraphics:null})),S=f.numericHash(JSON.stringify(z)).toString(),k={type:"marker",templateHash:f.numericHash(JSON.stringify(b)+JSON.stringify(k)+C+K).toString(),materialHash:B?function(){return S}:S,cim:z,materialOverrides:null,colorLocked:c.colorLocked,
effects:c.effects,scaleSymbolsProportionally:c.scaleSymbolsProportionally,alignment:r,anchorPoint:{x:D,y:x},isAbsoluteAnchorPoint:!1,size:H(c.primitiveName,e,"Size",p,y),rotation:H(c.primitiveName,e,"Rotation",p,A),offsetX:H(c.primitiveName,e,"OffsetX",p,I),offsetY:H(c.primitiveName,e,"OffsetY",p,E),scaleX:1,frameHeight:q,rotateClockwise:c.rotateClockwise,referenceSize:v,sizeRatio:w,color:H(F,e,"Color",p,M,L),outlineColor:H(F,e,"Color",p,J,L),outlineWidth:H(F,e,"Width",p,P),markerPlacement:c.markerPlacement};
t.push(k);break;default:G(c,b,e,g,p,t,r,v,q)}};u--;)k()}}}function G(a,c,b,e,h,p,n,t,r){c={type:a.type,enable:!0,name:a.name,colorLocked:a.colorLocked,primitiveName:a.primitiveName,anchorPoint:a.anchorPoint,anchorPointUnits:a.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:a.rotateClockwise,rotation:0,size:a.size,billboardMode3D:a.billboardMode3D,depth3D:a.depth3D,frame:a.frame,markerGraphics:[c],scaleSymbolsProportionally:a.scaleSymbolsProportionally,respectFrame:a.respectFrame,clippingPath:a.clippingPath,
effects:a.effects};for(var v=[],q=["Rotation","OffsetX","OffsetY"],v=e.filter(function(c){return c.primitiveName!==a.primitiveName||-1===q.indexOf(c.propertyName)}),k="",l=0;l<e.length;l++){var m=e[l];void 0!==m.value&&(k+="-"+m.primitiveName+"-"+m.propertyName+"-"+JSON.stringify(m.value))}m=d.CIMSymbolHelper.getTextureAnchor(c);e=m[0];var l=m[1],m=m[2],u=a.primitiveName,w=a.rotation||0,x=a.offsetX||0,D=a.offsetY||0,k=f.numericHash(JSON.stringify(c)+k).toString();b={type:"marker",templateHash:k,materialHash:0===
v.length?k:M(k,b,v,h),cim:c,materialOverrides:v,colorLocked:a.colorLocked,effects:a.effects,scaleSymbolsProportionally:a.scaleSymbolsProportionally,alignment:n,anchorPoint:{x:e,y:l},isAbsoluteAnchorPoint:!1,size:a.size,rotation:H(u,b,"Rotation",h,w),offsetX:H(u,b,"OffsetX",h,x),offsetY:H(u,b,"OffsetY",h,D),color:{r:0,g:0,b:0,a:0},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:r,rotateClockwise:a.rotateClockwise,referenceSize:t,sizeRatio:m/g.pt2px(a.size),markerPlacement:a.markerPlacement};
p.push(b)}function K(a){return a&&0===a.indexOf("Level_")?parseInt(a.substr(6),10):0}function L(a){if(!a||0===a.length)return null;a=(new m(a)).toRgba();return{r:a[0],g:a[1],b:a[2],a:a[3]}}function H(a,b,d,f,g,e,h){if(a=b[a]){var n=a[d];if("string"===typeof n||"number"===typeof n||n instanceof Array)return e?e.call(null,n,h):n;if(null!=n&&n instanceof c.default)return function(a,c,b){a=p.callWithFeature(n,a,{$view:b},f.geometryType,c);null!==a&&e&&(a=e.call(null,a,h));return null!==a?a:g}}return g}
function M(a,b,g,e){for(var h=function(a){if(a.valueExpressionInfo){var d=b[a.primitiveName]&&b[a.primitiveName][a.propertyName];d instanceof c.default&&(a.fn=function(a,c,b){return p.callWithFeature(d,a,{$view:b},e.geometryType,c)})}},n=0;n<g.length;n++)h(g[n]);return function(c,b,e){for(var h=0;h<g.length;h++){var p=g[h];p.fn&&(p.value=p.fn(c,b,e))}return f.numericHash(a+d.OverrideHelper.buildOverrideKey(g)).toString()}}Object.defineProperty(b,"__esModule",{value:!0});var Q=l.getLogger("esri.symbols.cim.cimAnalyzer");
b.analyzeCIMSymbol=function(b,d,f,g){return a.__awaiter(this,void 0,void 0,function(){var e,h,p,n,t,r,v,q,l;return a.__generator(this,function(a){switch(a.label){case 0:e=f?f:[];if(!b)return[2,e];n={};if("CIMSymbolReference"!==b.type)return[3,3];h=b.symbol;p=b.primitiveOverrides;if(!p)return[3,2];t=[];r=function(a){var b=a.valueExpressionInfo;b?(b=c.createRendererExpression(b.expression,d.spatialReference,d.fields).then(function(c){c&&u(n,a.primitiveName,a.propertyName,c)}),t.push(b)):null!=a.value&&
u(n,a.primitiveName,a.propertyName,a.value)};v=0;for(q=p;v<q.length;v++)l=q[v],r(l);return[4,k.all(t)];case 1:a.sent(),a.label=2;case 2:return[3,4];case 3:return Q.error("Expect cim type to be 'CIMSymbolReference'"),[2,e];case 4:switch(h.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":y(h,p,n,d,e,g)}return[2,e]}})})};b.analyzeCIMResource=function(a,c){if(!c||0===c.length)return a;a=JSON.parse(JSON.stringify(a));d.OverrideHelper.applyOverrides(a,c);return a}})},"esri/core/screenUtils":function(){define(["require",
"exports","./compilerUtils"],function(e,b,a){function m(a){return a?72*a/96:0}function l(a,c){void 0===a&&(a=0);void 0===c&&(c=0);return{x:a,y:c}}function k(a,c){void 0===a&&(a=0);void 0===c&&(c=0);return[a,c]}function g(a,c){void 0===a&&(a=0);void 0===c&&(c=0);return{x:a,y:c}}function f(a,c){void 0===a&&(a=0);void 0===c&&(c=0);return[a,c]}function c(a,c){return c?(c[0]=a.x,c[1]=a.y,2<c.length&&(c[2]=0),c):[a.x,a.y]}function d(a){return l(a.x,a.y)}function h(a,c){a=(a instanceof HTMLElement?a:a.surface).getBoundingClientRect();
return l(c.clientX-a.left,c.clientY-a.top)}Object.defineProperty(b,"__esModule",{value:!0});var n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;b.pt2px=function(a){return a?a/72*96:0};b.px2pt=m;b.toPt=function(a){if("string"===typeof a){if(n.test(a)){var c=a.match(n),b=Number(c[1]),c=c[3]&&c[3].toLowerCase();a="-"===a.charAt(0);b="px"===c?m(b):b;return a?-b:b}console.warn("screenUtils.toPt: input not recognized!");return null}return a};b.createScreenPoint=l;b.createScreenPointArray=k;b.createRenderScreenPoint=
g;b.createRenderScreenPointArray=f;b.createRenderScreenPointArray3=function(a,c,b){void 0===a&&(a=0);void 0===c&&(c=0);void 0===b&&(b=0);return[a,c,b]};b.castRenderScreenPointArray=function(a){return a};b.castRenderScreenPointArray3=function(a){return a};b.castScreenPointArray=function(a){return a};b.screenToRender=function(a,b,d){var f,e;switch(a.type){case "2d":a=window.devicePixelRatio||1;f=b.x*a;e=b.y*a;break;case "3d":c(b,r),a.state.camera.screenToRender(r,p),f=p[0],e=p[1]}return d?(d.x=f,d.y=
e,d):g(f,e)};b.renderToScreen=function(a,b,d){var f,g;switch(a.type){case "2d":a=window.devicePixelRatio||1;f=b.x/a;g=b.y/a;break;case "3d":c(b,p),a.state.camera.renderToScreen(p,r),f=r[0],g=r[1]}return d?(d.x=f,d.y=g,d):l(f,g)};b.screenArrayToRender=function(a,c,b){var d,g;switch(a.type){case "2d":a=window.devicePixelRatio||1;d=c[0]*a;g=c[1]*a;break;case "3d":a.state.camera.screenToRender(c,p),d=p[0],g=p[1]}return b?(b[0]=d,b[1]=g,2<b.length&&(b[2]=0),b):f(d,g)};b.renderArrayToScreen=function(a,
c,b){var d,f;switch(a.type){case "2d":a=window.devicePixelRatio||1;d=c[0]/a;f=c[0]/a;break;case "3d":a.state.camera.renderToScreen(c,r),d=r[0],f=r[1]}return b?(b[0]=d,b[1]=f,b):k(d,f)};b.screenPointArrayToObject=function(a,c){return c?(c.x=a[0],c.y=a[1],c):{x:a[0],y:a[1]}};b.screenPointObjectToArray=c;b.createScreenPointFromEvent=d;b.createScreenPointFromNativeEvent=h;b.createScreenPointFromSupportedEvent=function(a,c){return c instanceof Event?h(a,c):d(c)};b.isSupportedScreenPointEvent=function(c){if(c instanceof
Event)return!0;if("object"===typeof c&&"type"in c)switch(c=c.type,c){case "click":case "double-click":case "pointer-down":case "pointer-drag":case "pointer-enter":case "pointer-leave":case "pointer-up":case "pointer-move":case "immediate-click":case "immediate-double-click":case "hold":case "drag":case "mouse-wheel":return!0;case "key-down":case "key-up":case "gamepad":case "focus":case "blur":break;default:a.neverReachedSilent(c)}return!1};var p=f(),r=k()})},"esri/symbols/cim/CIMSymbolHelper":function(){define("require exports tslib ../../Color ../../core/Logger ../cim/CIMPlacements ./CIMSymbolDrawHelper ./packingUtils".split(" "),
function(e,b,a,m,l,k,g,f){function c(a,c){switch(c.type){case "CIMSymbolReference":var b={type:"point",x:0,y:0};a.drawSymbol(c.symbol,b);break;case "CIMPointSymbol":b={type:"point",x:0,y:0};a.drawSymbol(c,b);break;case "CIMVectorMarker":b=new k.Placement,a.drawMarker(c,b)}return a.envelope()}Object.defineProperty(b,"__esModule",{value:!0});var d=Math.PI,h=d/2,n=l.getLogger("esri.symbols.cim.CIMSymbolHelper");e=function(){function b(){}b.getEnvelope=function(a){var b=new g.EnvDrawHelper;if(Array.isArray(a)){for(var d=
void 0,f=0;f<a.length;f++){var e=a[f];d?d.union(c(b,e)):d=c(b,e)}return d}return c(b,a)};b.getTextureAnchor=function(a){a=this.getEnvelope(a);if(!a||0>=a.width||0>=a.height)return[0,0,0];var c=96/72,b=a.height*c+2;return[(a.x+.5*a.width)*c/(a.width*c+2),-(a.y+.5*a.height)*c/b,b]};b.rasterize=function(a,c,b,d){void 0===d&&(d=!0);var f=b||this.getEnvelope(c);if(!f||0>=f.width||0>=f.height)return[null,0,0,0,0];var e=96/72,h=(f.x+.5*f.width)*e,p=(f.y+.5*f.height)*e;a.width=f.width*e;a.height=f.height*
e;b||(a.width+=2,a.height+=2);b=a.getContext("2d");e=g.Transformation.createScale(e,-e);e.translate(.5*a.width-h,.5*a.height+p);e=new g.CanvasDrawHelper(b,e);switch(c.type){case "CIMPointSymbol":e.drawSymbol(c,{type:"point",x:0,y:0});break;case "CIMVectorMarker":f=new k.Placement,e.drawMarker(c,f)}c=b.getImageData(0,0,a.width,a.height);c=new Uint8Array(c.data);if(d)for(d=void 0,b=0;b<c.length;b+=4)d=c[b+3]/255,c[b]*=d,c[b+1]*=d,c[b+2]*=d;return[c,a.width,a.height,-h/a.width,-p/a.height]};b.fromSimpleMarker=
function(a){var c,b,f=a.style;if("circle"===f||"esriSMSCircle"===f){c=Math.acos(.995);b=Math.ceil(d/c/4);0===b&&(b=1);c=h/b;b*=4;f=[];f.push([50,0]);for(var g=1;g<b;g++)f.push([50*Math.cos(g*c),-50*Math.sin(g*c)]);f.push([50,0]);c={rings:[f]};b={xmin:-50,ymin:-50,xmax:50,ymax:50}}else if("cross"===f||"esriSMSCross"===f)c=0,c={rings:[[[c,50],[c,c],[50,c],[50,-c],[c,-c],[c,-50],[-c,-50],[-c,-c],[-50,-c],[-50,c],[-c,c],[-c,50],[c,50]]]},b={xmin:-50,ymin:-50,xmax:50,ymax:50};else if("diamond"===f||"esriSMSDiamond"===
f)c={rings:[[[-50,0],[0,50],[50,0],[0,-50],[-50,0]]]},b={xmin:-50,ymin:-50,xmax:50,ymax:50};else if("square"===f||"esriSMSSquare"===f)c={rings:[[[-50,-50],[-50,50],[50,50],[50,-50],[-50,-50]]]},b={xmin:-50,ymin:-50,xmax:50,ymax:50};else if("x"===f||"esriSMSX"===f)c=0,c={rings:[[[0,c],[50-c,50],[50,50-c],[c,0],[50,c-50],[50-c,-50],[0,-c],[c-50,-50],[-50,c-50],[-c,0],[-50,50-c],[c-50,50],[0,c]]]},b={xmin:-50,ymin:-50,xmax:50,ymax:50};else if("triangle"===f||"esriSMSTriangle"===f)b=2/3*100,f=b-100,c=
{rings:[[[-57.735026918962575,f],[0,b],[57.735026918962575,f],[-57.735026918962575,f]]]},b={xmin:-57.735026918962575,ymin:f,xmax:57.735026918962575,ymax:b};else if("arrow"===f||"esriSMSArrow"===f)c={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},b={xmin:-50,ymin:-50,xmax:50,ymax:50};var e;c&&b&&(e=[{type:"CIMSolidFill",enable:!0,color:a.color}],a.outline&&e.push({type:"CIMSolidStroke",enable:!0,width:a.outline.width,color:a.outline.color}),e={type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",
enable:!0,rotation:a.angle,size:a.size,offsetX:a.xoffset,offsetY:a.yoffset,frame:b,markerGraphics:[{type:"CIMMarkerGraphic",geometry:c,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]});return e};b.fromCIMHatchFill=function(a){for(var c=void 0!==a.separation?a.separation:4,b=c/2,d=this._getLineSymbolPeriod(a.lineSymbol)||4;4>d;)d*=2;d/=2;return{type:"CIMVectorMarker",frame:{xmin:-d,xmax:d,ymin:-b,ymax:b},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-d,0],[d,0]]]},symbol:a.lineSymbol}],
size:c}};b._getLineSymbolPeriod=function(a){if(a){var c=this._getEffectsRepeat(a.effects);if(c)return c;if(a.symbolLayers)for(c=0,a=a.symbolLayers;c<a.length;c++){var b=a[c],d=this._getEffectsRepeat(b.effects);if(d)return d;if(b&&(b=this._getPlacementRepeat(b.markerPlacement)))return b}}return 0};b._getEffectsRepeat=function(a){if(a)for(var c=0;c<a.length;c++){var b=a[c];if(b)switch(b.type){case "CIMGeometricEffectDashes":if((b=b.dashTemplate)&&b.length){for(var c=a=0,d=b;c<d.length;c++)a+=d[c];b.length&
1&&(a*=2);return a}break;case "CIMGeometricEffectWave":return b.period;default:n.error("unsupported geometric effect type "+b.type)}}return 0};b._getPlacementRepeat=function(a){if(a)switch(a.type){case "CIMMarkerPlacementAlongLineSameSize":case "CIMMarkerPlacementAlongLineRandomSize":case "CIMMarkerPlacementAlongLineVariableSize":if((a=a.placementTemplate)&&a.length){for(var c=0,b=0;b<a.length;b++)c+=a[b];a.length&1&&(c*=2);return c}}return 0};b.fromCIMInsidePolygon=function(c){var b=c.markerPlacement,
d=b.stepX/2,f=b.stepY/2,d={xmin:-d,xmax:d,ymin:-f,ymax:f};c=a.__assign({type:c.type},c);c.markerPlacement=null;c.anchorPoint=null;return{type:"CIMVectorMarker",frame:d,markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:{type:"CIMPointSymbol",symbolLayers:[c]}}],size:b.stepY}};b.getFillColor=function(a){if(!a)return null;switch(a.type){case "CIMPolygonSymbol":if(a.symbolLayers){var c=0;for(a=a.symbolLayers;c<a.length;c++){var d=b.getFillColor(a[c]);if(null!=d)return d}}break;case "CIMTextSymbol":return b.getFillColor(a.symbol);
case "CIMSolidFill":return a.color}};b.getStrokeColor=function(a){if(a)switch(a.type){case "CIMPolygonSymbol":case "CIMLineSymbol":if(a.symbolLayers){var c=0;for(a=a.symbolLayers;c<a.length;c++){var d=b.getStrokeColor(a[c]);if(void 0!==d)return d}}break;case "CIMTextSymbol":return b.getStrokeColor(a.symbol);case "CIMSolidStroke":return a.color}};b.getStrokeWidth=function(a){if(a)switch(a.type){case "CIMPolygonSymbol":case "CIMLineSymbol":if(a.symbolLayers){var c=0;for(a=a.symbolLayers;c<a.length;c++){var d=
b.getStrokeWidth(a[c]);if(void 0!==d)return d}}break;case "CIMTextSymbol":return b.getStrokeWidth(a.symbol);case "CIMSolidStroke":case "CIMGradientStroke":case "CIMPictureStroke":return a.width}};b.getSize=function(a){if(a)switch(a.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":var c=0;if(a.symbolLayers){var d=0;for(a=a.symbolLayers;d<a.length;d++){var f=b.getSize(a[d]);f>c&&(c=f)}}return c;case "CIMSolidStroke":case "CIMPictureStroke":case "CIMGradientStroke":return a.width;
case "CIMCharacterMarker":case "CIMPictureMarker":case "CIMVectorMarker":return a.size}};b.getMarkerScaleRatio=function(a){if(a)switch(a.type){case "CIMVectorMarker":if(!1!==a.scaleSymbolsProportionally&&a.frame)return a.size/(a.frame.ymax-a.frame.ymin)}return 1};return b}();b.CIMSymbolHelper=e;e=function(){function a(){}a.rasterizeSimpleFill=function(a,c){"solid"!==c&&"none"!==c&&"esriSFSSolid"!==c&&"esriSFSNull"!==c||console.error("Unexpected: style does not require rasterization");a.width=8;a.height=
8;var b=a.getContext("2d");b.strokeStyle="#FFFFFF";b.lineWidth=1;b.beginPath();if("vertical"===c||"cross"===c||"esriSFSCross"===c||"esriSFSVertical"===c)b.moveTo(0,0),b.lineTo(0,8);if("horizontal"===c||"cross"===c||"esriSFSCross"===c||"esriSFSHorizontal"===c)b.moveTo(0,0),b.lineTo(8,0);if("forward-diagonal"===c||"diagonal-cross"===c||"esriSFSDiagonalCross"===c||"esriSFSForwardDiagonal"===c)b.moveTo(0,0),b.lineTo(8,8);if("backward-diagonal"===c||"diagonal-cross"===c||"esriSFSBackwardDiagonal"===c||
"esriSFSDiagonalCross"===c)b.moveTo(8,0),b.lineTo(0,8);b.stroke();c=b.getImageData(0,0,a.width,a.height);c=new Uint8Array(c.data);for(var d=0;d<c.length;d+=4)b=c[d+3]/255,c[d]*=b,c[d+1]*=b,c[d+2]*=b;return[c,a.width,a.height]};a.rasterizeSimpleLine=function(a,c){switch(c){case "butt":c="Butt";break;case "square":c="Square";break;default:c="Round"}var b="Butt"===c;switch(a){case "dash":case "esriSLSDash":a=b?[4,3]:[3,4];break;case "dash-dot":case "esriSLSDashDot":a=b?[4,3,1,3]:[3,4,0,4];break;case "dot":case "esriSLSDot":a=
b?[1,3]:[0,4];break;case "long-dash":case "esriSLSLongDash":a=b?[8,3]:[7,4];break;case "long-dash-dot":case "esriSLSLongDashDot":a=b?[8,3,1,3]:[7,4,0,4];break;case "long-dash-dot-dot":case "esriSLSDashDotDot":a=b?[8,3,1,3,1,3]:[7,4,0,4,0,4];break;case "short-dash":case "esriSLSShortDash":a=b?[4,1]:[3,2];break;case "short-dash-dot":case "esriSLSShortDashDot":a=b?[4,1,1,1]:[3,2,0,2];break;case "short-dash-dot-dot":case "esriSLSShortDashDotDot":a=b?[4,1,1,1,1,1]:[3,2,0,2,0,2];break;case "short-dot":case "esriSLSShortDot":a=
b?[1,1]:[0,2];break;case "solid":case "esriSLSSolid":case "none":n.error("Unexpected: style does not require rasterization");a=[0,0];break;default:n.error("Tried to rasterize SLS, but found an unexpected style: "+a+"!"),a=[0,0]}return this.rasterizeDash(a,c)};a.rasterizeDash=function(a,c){var b="Butt"===c,d="Square"===c;c=!b&&!d;for(var g=0,e=0;e<a.length;e++)var h=a[e],g=g+h;for(var g=15*g,p=31*g,e=new Float32Array(p),n=c?225:15,h=0;h<p;++h)e[h]=n;for(var n=p=0,t=!0,k=0;k<a.length;k++){for(var h=
a[k],p=n,n=n+15*h,r=p;r<n;){for(var l=0;31>l;){var h=l*g+r,m=c?(l-15)*(l-15):Math.abs(l-15);e[h]=t?b?Math.max(Math.max(p+7.5-r,m),Math.max(r-n+7.5,m)):m:c?Math.min((r-p)*(r-p)+m,(r-n)*(r-n)+m):d?Math.min(Math.max(r-p,m),Math.max(n-r,m)):Math.min(Math.max(r-p+7.5,m),Math.max(n+7.5-r,m));l++}r++}t=!t}a=e.length;b=new Uint8Array(4*a);for(h=0;h<a;++h)f.packFloatRGBA((c?Math.sqrt(e[h]):e[h])/15,b,4*h);return[b,g,31]};return a}();b.SymbolHelper=e;e=function(){function a(){}a.findApplicableOverrides=function(c,
b,d){if(b){if(c.primitiveName){for(var f=!1,g=0;g<d.length;g++){var e=d[g];if(e.primitiveName===c.primitiveName){f=!0;break}}if(!f)for(f=0;f<b.length;f++)e=b[f],e.primitiveName===c.primitiveName&&d.push(e)}switch(c.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":if(c.effects)for(f=0,g=c.effects;f<g.length;f++)e=g[f],a.findApplicableOverrides(e,b,d);if(c.symbolLayers)for(e=0,c=c.symbolLayers;e<c.length;e++)a.findApplicableOverrides(c[e],b,d);break;case "CIMSolidStroke":case "CIMPictureStroke":case "CIMGradientStroke":case "CIMSolidFill":case "CIMPictureFill":case "CIMHatchFill":case "CIMGradientFill":case "CIMVectorMarker":case "CIMCharacterMarker":case "CIMPictureMarker":if(c.effects)for(f=
0,g=c.effects;f<g.length;f++)e=g[f],a.findApplicableOverrides(e,b,d);c.markerPlacement&&a.findApplicableOverrides(c.markerPlacement,b,d);if("CIMVectorMarker"===c.type){if(c.markerGraphics)for(e=0,c=c.markerGraphics;e<c.length;e++)f=c[e],a.findApplicableOverrides(f,b,d),a.findApplicableOverrides(f.symbol,b,d)}else"CIMCharacterMarker"===c.type?a.findApplicableOverrides(c.symbol,b,d):"CIMHatchFill"===c.type&&a.findApplicableOverrides(c.lineSymbol,b,d)}}};a.applyOverrides=function(c,b,d,f){if(b){if(c.primitiveName)for(var g=
0;g<b.length;g++){var e=b[g];if(e.primitiveName===c.primitiveName){var h;h=(h=e.propertyName)?h.charAt(0).toLowerCase()+h.substr(1):h;f&&f.push({cim:c,nocapPropertyName:h,value:c[h]});e.expression&&(e.value=a.toValue(e.propertyName,e.expression));if(d){for(var p=!1,n=0,k=d;n<k.length;n++)k[n].primitiveName===c.primitiveName&&(p=!0);p||d.push(e)}c[h]=e.value}}switch(c.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":if(c.effects)for(e=0,h=c.effects;e<h.length;e++)g=h[e],a.applyOverrides(g,
b,d,f);if(c.symbolLayers)for(g=0,c=c.symbolLayers;g<c.length;g++)a.applyOverrides(c[g],b,d,f);break;case "CIMSolidStroke":case "CIMSolidFill":case "CIMVectorMarker":if(c.effects)for(e=0,h=c.effects;e<h.length;e++)g=h[e],a.applyOverrides(g,b,d,f);if("CIMVectorMarker"===c.type&&c.markerGraphics)for(g=0,c=c.markerGraphics;g<c.length;g++)e=c[g],a.applyOverrides(e,b,d,f),a.applyOverrides(e.symbol,b,d,f)}}};a.restoreOverrides=function(a){for(var c=0;c<a.length;c++){var b=a[c];b.cim[b.nocapPropertyName]=
b.value}};a.buildOverrideKey=function(a){for(var c="",b=0;b<a.length;b++){var d=a[b];void 0!==d.value&&(c+=""+d.primitiveName+d.propertyName+JSON.stringify(d.value))}return c};a.toValue=function(a,c){return"DashTemplate"===a?c.split(" ").map(function(a){return Number(a)}):"Color"===a?(a=(new m(c)).toRgba(),a[3]*=255,a):c};return a}();b.OverrideHelper=e})},"esri/symbols/cim/CIMPlacements":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){this.setIdentity()}
a.prototype.getAngle=function(){if(null==this.rz||0===this.rz&&1!==this.rz_c&&0!==this.rz_s)this.rz=Math.atan2(this.rz_s,this.rz_c);return this.rz};a.prototype.setIdentity=function(){this.tz=this.ty=this.tx=0;this.s=1;this.rz=this.ry=this.rx=0;this.rz_c=1;this.rz_s=0};a.prototype.setTranslate=function(a,b){this.tx=a;this.ty=b};a.prototype.setTranslateZ=function(a){this.tz=a};a.prototype.setRotateCS=function(a,b){this.rz=void 0;this.rz_c=a;this.rz_s=b};a.prototype.setRotate=function(a){this.rz=a;this.rz_s=
this.rz_c=void 0};a.prototype.setRotateY=function(a){this.ry=a};a.prototype.setScale=function(a){this.s=a};a.prototype.setMeasure=function(a){this.m=a};return a}();b.Placement=e;e=function(){function a(){}a.prototype.next=function(){return null};return a}();b.EmptyPlacementCursor=e})},"esri/symbols/cim/CIMSymbolDrawHelper":function(){define("require exports tslib ../../core/Logger ../../geometry/support/jsonUtils ../cim/CIMEffects ../cim/CIMOperators ../cim/CIMPlacements ./Rect".split(" "),function(e,
b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});b.C_DEG_TO_RAD=Math.PI/180;var d=m.getLogger("esri.symbols.cim.CIMSymbolDrawHelper"),h=function(){function a(a){this._t=a}a.createIdentity=function(){return new a([1,0,0,0,1,0])};a.prototype.clone=function(){return new a(this._t.slice())};a.prototype.transform=function(a){var c=this._t;return[c[0]*a[0]+c[1]*a[1]+c[2],c[3]*a[0]+c[4]*a[1]+c[5]]};a.createScale=function(c,b){return new a([c,0,0,0,b,0])};a.prototype.scale=function(a,c){var b=
this._t;b[0]*=a;b[1]*=a;b[2]*=a;b[3]*=c;b[4]*=c;b[5]*=c;return this};a.prototype.scaleRatio=function(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])};a.createTranslate=function(c,b){return new a([0,0,c,0,0,b])};a.prototype.translate=function(a,c){var b=this._t;b[2]+=a;b[5]+=c;return this};a.createRotate=function(c){var b=Math.cos(c);c=Math.sin(c);return new a([b,-c,0,c,b,0])};a.prototype.rotate=function(c){return this.multiply(a.createRotate(c))};a.prototype.multiply=function(a){var c=
this._t;a=a._t;var b=c[1]*a[0]+c[4]*a[1],d=c[2]*a[0]+c[5]*a[1]+a[2],f=c[0]*a[3]+c[3]*a[4],g=c[1]*a[3]+c[4]*a[4],e=c[2]*a[3]+c[5]*a[4]+a[5];c[0]=c[0]*a[0]+c[3]*a[1];c[1]=b;c[2]=d;c[3]=f;c[4]=g;c[5]=e;return this};return a}();b.Transformation=h;e=function(){function a(a){this._transfos=[];this._sizeTransfos=[];this._transfos.push(a||h.createIdentity());this._sizeTransfos.push(a?a.scaleRatio():1)}a.prototype.transformPt=function(a){return this._transfos[this._transfos.length-1].transform(a)};a.prototype.transformSize=
function(a){return a*this._sizeTransfos[this._sizeTransfos.length-1]};a.prototype.back=function(){return this._transfos[this._transfos.length-1]};a.prototype.push=function(a,c){c=c?a.scaleRatio():1;a.multiply(this.back());this._transfos.push(a);this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*c)};a.prototype.pop=function(){this._transfos.splice(-1,1);this._sizeTransfos.splice(-1,1)};a.prototype.drawSymbol=function(a,c){if(a)switch(a.type){case "CIMPointSymbol":case "CIMLineSymbol":case "CIMPolygonSymbol":this.drawMultiLayerSymbol(a,
c)}};a.prototype.drawMultiLayerSymbol=function(a,c){if(a){var b=a.symbolLayers;if(b)if(a=a.effects){if(c=this.executeEffects(a,c))for(a=c.next();a;)this.drawSymbolLayers(b,a),a=c.next()}else this.drawSymbolLayers(b,c)}};a.prototype.executeEffects=function(a,c){c=new k.SimpleGeometryCursor(c);for(var b=0;b<a.length;b++){var d=a[b],f=g.getEffectOperator(d);f&&(c=f.execute(c,d,1))}return c};a.prototype.drawSymbolLayers=function(a,c){for(var b=a.length;b--;){var d=a[b];if(d&&!1!==d.enable){var f=d.effects;
if(f){if(f=this.executeEffects(f,c))for(var g=f.next();g;)this.drawSymbolLayer(d,g),g=f.next()}else this.drawSymbolLayer(d,c)}}};a.prototype.drawSymbolLayer=function(a,c){switch(a.type){case "CIMSolidFill":this.drawSolidFill(c,a.color);break;case "CIMSolidStroke":this.drawSolidStroke(c,a.color,a.width,a.capStyle,a.joinStyle,a.miterLimit);break;case "CIMCharacterMarker":case "CIMPictureMarker":case "CIMVectorMarker":this.drawMarkerLayer(a,c)}};a.prototype.drawMarkerLayer=function(a,c){var b=a.markerPlacement;
if(b){var d=g.getPlacementOperator(b);if(d&&(c=d.execute(c,b,1)))for(b=c.next();b;)this.drawMarker(a,b),b=c.next()}else b=new f.Placement,b.tx=c.x,b.ty=c.y,this.drawMarker(a,b)};a.prototype.drawMarker=function(a,c){switch(a.type){case "CIMCharacterMarker":case "CIMPictureMarker":this.drawPictureMarker(a,c);break;case "CIMVectorMarker":this.drawVectorMarker(a,c)}};a.prototype.drawPictureMarker=function(a,c){};a.prototype.drawVectorMarker=function(a,c){if(a){var f=a.markerGraphics;if(f){var g=a.size,
e=a.frame,p=e?e.ymax-e.ymin:0,g=g&&p?g/p:1,p=h.createIdentity();e&&p.translate(.5*-(e.xmax+e.xmin),.5*-(e.ymax+e.ymin));var n=a.anchorPoint;if(n){var k=n.x,n=n.y;"Absolute"!==a.anchorPointUnits&&e&&(k*=e.xmax-e.xmin,n*=e.ymax-e.ymin);p.translate(-k,-n)}1!==g&&p.scale(g,g);a.rotation&&p.rotate(a.rotation*b.C_DEG_TO_RAD);p.translate(a.offsetX||0,a.offsetY||0);p.translate(c.tx,c.ty);this.push(p,a.scaleSymbolsProportionally);for(a=0;a<f.length;a++)(c=f[a])&&c.symbol&&c.geometry||d.error("Invalid marker graphic",
c),this.drawSymbol(c.symbol,c.geometry);this.pop()}}};return a}();b.CIMSymbolDrawHelper=e;m=function(b){function d(){var a=b.call(this)||this;a.reset();return a}a.__extends(d,b);d.prototype.reset=function(){this._xmin=this._ymin=Infinity;this._xmax=this._ymax=-Infinity};d.prototype.envelope=function(){return new c.default(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)};d.prototype._merge=function(a,c){a[0]-c<this._xmin&&(this._xmin=a[0]-c);a[0]+c>this._xmax&&(this._xmax=a[0]+c);
a[1]-c<this._ymin&&(this._ymin=a[1]-c);a[1]+c>this._ymax&&(this._ymax=a[1]+c)};d.prototype.drawSolidFill=function(a){if(a&&a.rings){var c=0;for(a=a.rings;c<a.length;c++){var b=a[c],d=b?b.length:0;if(2<d){this._merge(this.transformPt(b[0]),0);for(var f=1;f<d;++f)this._merge(this.transformPt(b[f]),0)}}}};d.prototype.drawSolidStroke=function(a,c,b){c=.5*this.transformSize(b);if(a=l.isPolygon(a)?a.rings:a.paths)for(b=0;b<a.length;b++){var d=a[b],f=d?d.length:0;if(1<f){this._merge(this.transformPt(d[0]),
c);for(var g=1;g<f;++g)this._merge(this.transformPt(d[g]),c)}}};return d}(e);b.EnvDrawHelper=m;e=function(c){function b(a,b){b=c.call(this,b)||this;b._ctx=a;return b}a.__extends(b,c);b.prototype.drawSolidFill=function(a,c){if(a&&a.rings){var b=this._ctx;b.fillStyle="string"===typeof c?c:"rgba("+Math.round(c[0])+","+Math.round(c[1])+","+Math.round(c[2])+","+c[3]/255+")";b.beginPath();c=0;for(a=a.rings;c<a.length;c++){var d=a[c],f=d?d.length:0;if(2<f){var g=this.transformPt(d[0]);b.moveTo(g[0],g[1]);
for(var e=1;e<f;++e)g=this.transformPt(d[e]),b.lineTo(g[0],g[1]);b.closePath()}}b.fill("evenodd")}};b.prototype.drawSolidStroke=function(a,c,b,d,f,g){if(c&&0!==b){var e=this._ctx;e.strokeStyle="string"===typeof c?c:"rgba("+Math.round(c[0])+","+Math.round(c[1])+","+Math.round(c[2])+","+c[3]/255+")";e.lineWidth=this.transformSize(b)+.5;this._setCapStyle(d);this._setJoinStyle(f);e.miterLimit=g;e.beginPath();c=!1;l.isPolygon(a)?(b=a.rings,c=!0):b=a.paths;for(a=0;a<b.length;a++)if(f=(d=b[a])?d.length:
0,1<f){g=this.transformPt(d[0]);e.moveTo(g[0],g[1]);for(var h=1;h<f;++h)g=this.transformPt(d[h]),e.lineTo(g[0],g[1]);c&&e.closePath()}e.stroke()}};b.prototype._setCapStyle=function(a){switch(a){case "Butt":this._ctx.lineCap="butt";break;case "Round":this._ctx.lineCap="round";break;case "Square":this._ctx.lineCap="square"}};b.prototype._setJoinStyle=function(a){switch(a){case "Bevel":this._ctx.lineJoin="bevel";break;case "Round":this._ctx.lineJoin="round";break;case "Miter":this._ctx.lineJoin="miter"}};
return b}(e);b.CanvasDrawHelper=e})},"esri/symbols/cim/CIMEffects":function(){define(["require","exports","../../core/lang"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(a){this._geometry=a}a.prototype.next=function(){var a=this._geometry;this._geometry=null;return a};return a}();b.SimpleGeometryCursor=e;b.clone=function(b){return a.clone(b)}})},"esri/symbols/cim/CIMOperators":function(){define("require exports ./effects/EffectAddControlPoints ./effects/EffectArrow ./effects/EffectBuffer ./effects/EffectCut ./effects/EffectDashes ./effects/EffectDonut ./effects/EffectJog ./effects/EffectMove ./effects/EffectOffset ./effects/EffectReverse ./effects/EffectRotate ./effects/EffectScale ./effects/EffectWave ./placements/PlacementAlongLineSameSize ./placements/PlacementAtExtremities ./placements/PlacementAtRatioPositions ./placements/PlacementOnLine ./placements/PlacementOnVertices ./placements/PlacementPolygonCenter".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y){Object.defineProperty(b,"__esModule",{value:!0});b.getEffectOperator=function(b){if(!b)return null;switch(b.type){case "CIMGeometricEffectAddControlPoints":return a.EffectAddControlPoints.local();case "CIMGeometricEffectArrow":return m.EffectArrow.local();case "CIMGeometricEffectBuffer":return l.EffectBuffer.local();case "CIMGeometricEffectCut":return k.EffectCut.local();case "CIMGeometricEffectDashes":return g.EffectDashes.local();case "CIMGeometricEffectDonut":return f.EffectDonut.local();
case "CIMGeometricEffectJog":return c.EffectJog.local();case "CIMGeometricEffectMove":return d.EffectMove.local();case "CIMGeometricEffectOffset":return h.EffectOffset.local();case "CIMGeometricEffectReverse":return n.EffectReverse.local();case "CIMGeometricEffectRotate":return p.EffectRotate.local();case "CIMGeometricEffectScale":return r.EffectScale.local();case "CIMGeometricEffectWave":return t.EffectWave.local()}return null};b.getPlacementOperator=function(a){if(!a)return null;switch(a.type){case "CIMMarkerPlacementAlongLineSameSize":return v.PlacementAlongLineSameSize.local();
case "CIMMarkerPlacementAtExtremities":return q.PlacementAtExtremities.local();case "CIMMarkerPlacementAtRatioPositions":return w.PlacementAtRatioPositions.local();case "CIMMarkerPlacementOnLine":return u.PlacementOnLine.local();case "CIMMarkerPlacementOnVertices":return x.PlacementOnVertices.local();case "CIMMarkerPlacementPolygonCenter":return y.PlacementPolygonCenter.local()}return null}})},"esri/symbols/cim/effects/EffectAddControlPoints":function(){define(["require","exports","../../../core/lang",
"../../../geometry/support/jsonUtils","../CIMCursor"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectAddControlPoints=e;var k=function(){function b(a,c,b){this._inputGeometries=a;this._angleTolerance=void 0!==c.angleTolerance?c.angleTolerance:120;this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/
180)*Math.PI)}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(m.isPolygon(b))return this._isClosed=!0,b=a.clone(b),this._processMultipath(b.rings),b;if(m.isPolyline(b))return this._isClosed=!1,b=a.clone(b),this._processMultipath(b.paths),b;if(m.isExtent(b)){if(this._maxCosAngle)return b;this._isClosed=!0;b=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];this._processPath(b);return{rings:[b]}}b=this._inputGeometries.next()}return null};b.prototype._processMultipath=
function(a){if(a)for(var c=0;c<a.length;c++)this._processPath(a[c])};b.prototype._processPath=function(a){if(a){var c=a.length,b=a[0],f=void 0,g=void 0,e=void 0,k=void 0,t=void 0,m=void 0;this._isClosed&&++c;for(var q=1;q<c;++q){var w=void 0,w=this._isClosed&&q===c-1?a[0]:a[q],u=w[0]-b[0],x=w[1]-b[1],y=Math.sqrt(u*u+x*x);1<q&&0<y&&0<e&&(f*u+g*x)/y/e<=this._maxCosAngle&&l.setId(b,1);1===q&&(k=u,t=x,m=y);0<y&&(b=w,f=u,g=x,e=y)}this._isClosed&&0<e&&0<m&&(f*k+g*t)/m/e<=this._maxCosAngle&&l.setId(a[0],
1)}};return b}()})},"esri/symbols/cim/CIMCursor":function(){define(["require","exports","../../core/lang","../../geometry/support/jsonUtils","./CIMPlacements"],function(e,b,a,m,l){function k(a){if(a)for(var c=a.length-1;0<c;--c)a[c][0]-=a[c-1][0],a[c][1]-=a[c-1][1]}function g(a){if(a)for(var c=0;c<a.length;c++)k(a[c])}function f(a){if(a)for(var c=a.length,b=1;b<c;++b)a[b][0]+=a[b-1][0],a[b][1]+=a[b-1][1]}function c(a){if(a)for(var c=0;c<a.length;c++)f(a[c])}function d(a){a&&(m.isPolygon(a)?c(a.rings):
m.isPolyline(a)?c(a.paths):m.isMultipoint(a)&&f(a.points))}function h(a){a&&a.reverse()}function n(a){return{rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]]}}Object.defineProperty(b,"__esModule",{value:!0});b.cloneAndDecodeGeometry=function(c){c=a.clone(c);d(c);return c};b.deltaDecodeGeometry=d;b.deltaEncodeGeometry=function(a){a&&(m.isPolygon(a)?g(a.rings):m.isPolyline(a)?g(a.paths):m.isMultipoint(a)&&k(a.points))};b.reverseMultipath=function(a){if(a)for(var c=
0;c<a.length;c++)h(a[c])};b.reversePath=h;b.getCoord2D=function(a,c,b){return[a[0]+(c[0]-a[0])*b,a[1]+(c[1]-a[1])*b]};b.isClosedPath=function(a){return a&&0!==a.length?a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]:!1};b.getId=function(a){return a[4]};b.setId=function(a,c){a[4]=c};e=function(){function a(a,c,b,d){this.acceptPolygon=c;this.acceptPolyline=b;this.geomUnitsPerPoint=d;this.pathIndex=this.pathCount=-1;this.iteratePath=!1;a&&(m.isPolygon(a)?c&&(this.multiPath=a.rings,this.isClosed=
!0):m.isPolyline(a)?b&&(this.multiPath=a.paths,this.isClosed=!1):m.isExtent(a)&&c&&(this.multiPath=n(a).rings,this.isClosed=!0),this.multiPath&&(this.pathCount=this.multiPath.length));this.internalPlacement=new l.Placement}a.prototype.next=function(){if(!this.multiPath)return null;for(;this.iteratePath||this.pathIndex<this.pathCount-1;){this.iteratePath||this.pathIndex++;var a=this.processPath(this.multiPath[this.pathIndex]);if(a)return a}this.pathIndex=this.pathCount=-1;return this.multiPath=null};
return a}();b.PathTransformationCursor=e;e=function(){function a(a,c,b,d){this.inputGeometries=a;this.acceptPolygon=c;this.acceptPolyline=b;this.geomUnitsPerPoint=d;this.pathIndex=this.pathCount=-1;this.iteratePath=!1}a.prototype.next=function(){for(;;){if(!this.multiPath){for(var a=this.inputGeometries.next();a;)if(m.isPolygon(a)?this.acceptPolygon&&(this.multiPath=a.rings,this.isClosed=!0):m.isPolyline(a)?this.acceptPolyline&&(this.multiPath=a.paths,this.isClosed=!1):m.isExtent(a)&&this.acceptPolygon&&
(this.multiPath=n(a).rings,this.isClosed=!0),this.multiPath){this.pathCount=this.multiPath.length;this.pathIndex=-1;break}else a=this.inputGeometries.next();if(!this.multiPath)return null}for(;this.iteratePath||this.pathIndex<this.pathCount-1;)if(this.iteratePath||this.pathIndex++,a=this.processPath(this.multiPath[this.pathIndex]))return a;this.pathIndex=this.pathCount=-1;this.multiPath=null}};return a}();b.PathGeometryCursor=e})},"esri/symbols/cim/effects/EffectArrow":function(){define(["require",
"exports","tslib","../CIMCursor","../CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectArrow=e;var k=function(b){function f(a,d,f){a=b.call(this,a,!1,!0)||this;a._curveHelper=new l.CurveHelper;a._width=(void 0!==d.width?d.width:5)*f;a._arrowType=d.geometricEffectArrowType;
a._offsetFlattenError=l.PIXEL_TOLERANCE*f;return a}a.__extends(f,b);f.prototype.processPath=function(a){switch(this._arrowType){default:return this._constructSimpleArrow(a,!0);case "Block":return this._constructSimpleArrow(a,!1);case "Crossed":return this._constructCrossedArrow(a)}};f.prototype._constructSimpleArrow=function(a,b){var c=this._curveHelper.calculatePathLength(a),d=this._width;c<2*d&&(d=c/2);c=this._curveHelper.getSubCurve(a,0,c-d);if(!c)return null;var f=d/2;if(this._curveHelper.isEmpty(c,
!1))return null;d=this._constructOffset(c,-f);if(!d)return null;c=this._constructOffset(c,f);if(!c)return null;var g=this._constructArrowBasePoint(d,-f);if(!g)return null;f=this._constructArrowBasePoint(c,f);if(!f)return null;a=a[a.length-1];b||(this._makeControlPoint(c,!0),this._makeControlPoint(d,!0));var e=new l.PathHelper;e.addPath(c,!0);e.lineTo(f);this._makeControlPoint(e.path());e.lineTo(a);this._makeControlPoint(e.path());e.lineTo(g);this._makeControlPoint(e.path());e.addPath(d,!1);return b?
{paths:[e.path()]}:(e.close(),{rings:[e.path()]})};f.prototype._constructCrossedArrow=function(a){var c=this._curveHelper.calculatePathLength(a),b=this._width;c<3.732050807568877*b&&(b=c/3.732050807568877);var f=this._curveHelper.getSubCurve(a,0,c-2.732050807568877*b);if(!f)return null;var g=b/2;if(this._curveHelper.isEmpty(f,!1))return null;var e=this._constructOffset(f,g);if(!e)return null;f=this._constructOffset(f,-g);if(!f)return null;c=this._curveHelper.getSubCurve(a,0,c-b);if(!c||this._curveHelper.isEmpty(c,
!1))return null;b=this._constructOffset(c,g);if(!b)return null;var k=this._constructOffset(c,-g);if(!k)return null;c=b[b.length-1];b=this._constructArrowBasePoint(b,g);if(!b)return null;var m=k[k.length-1],g=this._constructArrowBasePoint(k,-g);if(!g)return null;a=a[a.length-1];this._makeControlPoint(e,!1);this._makeControlPoint(f,!1);k=new l.PathHelper;k.addPath(e,!0);this._makeControlPoint(k.path());k.lineTo(m);k.lineTo(g);this._makeControlPoint(k.path());k.lineTo(a);this._makeControlPoint(k.path());
k.lineTo(b);this._makeControlPoint(k.path());k.lineTo(c);this._makeControlPoint(k.path());k.addPath(f,!1);return{paths:[k.path()]}};f.prototype._constructOffset=function(a,b){return this._curveHelper.offset(a,b,"Rounded",4,this._offsetFlattenError)};f.prototype._constructArrowBasePoint=function(a,b){if(!a||2>a.length)return null;var c=a[a.length-2];a=a[a.length-1];c=[a[0]-c[0],a[1]-c[1]];this._curveHelper.normalize(c);return[a[0]+c[1]*b,a[1]-c[0]*b]};f.prototype._makeControlPoint=function(a,b){void 0===
b&&(b=!1);b?m.setId(a[0],1):m.setId(a[a.length-1],1)};return f}(m.PathGeometryCursor)})},"esri/symbols/cim/CurveHelper":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.PIXEL_TOLERANCE=.03;e=function(){function a(){this._path=[]}a.prototype.path=function(){return this._path};a.prototype.addPath=function(a,b){b||a.reverse();Array.prototype.push.apply(this._path,a);b||a.reverse()};a.mergePath=function(a,b){b&&Array.prototype.push.apply(a,b)};a.prototype.startPath=
function(a){this._path.push(a)};a.prototype.lineTo=function(a){this._path.push(a)};a.prototype.close=function(){var a=this._path;1<a.length&&(a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]||a.push([a[0][0],a[0][1]]))};return a}();b.PathHelper=e;e=function(){function a(a,b){void 0===a&&(a=0);void 0===b&&(b=!1)}a.prototype.normalize=function(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]);a[0]/=b;a[1]/=b};a.prototype.calculateLength=function(a,b){var e=b[0]-a[0];a=b[1]-a[1];return Math.sqrt(e*e+a*a)};
a.prototype.calculateSegLength=function(a,b){return this.calculateLength(a[b],a[b+1])};a.prototype.calculatePathLength=function(a){for(var b=0,e=a?a.length:0,g=0;g<e-1;++g)b+=this.calculateSegLength(a,g);return b};a.prototype.calculatePathArea=function(a){for(var b=0,e=a?a.length:0,g=0;g<e-1;++g)b+=(a[g+1][0]-a[g][0])*(a[g+1][1]+a[g][1]);return b/2};a.prototype.getCoord2D=function(a,b,e){return[a[0]+(b[0]-a[0])*e,a[1]+(b[1]-a[1])*e]};a.prototype.getSegCoord2D=function(a,b,e){return this.getCoord2D(a[b],
a[b+1],e)};a.prototype.getAngle=function(a,b,e){return Math.atan2(b[1]-a[1],b[0]-a[0])};a.prototype.getSegAngle=function(a,b,e){return this.getAngle(a[b],a[b+1],e)};a.prototype.getAngleCS=function(a,b,e){e=b[0]-a[0];a=b[1]-a[1];b=Math.sqrt(e*e+a*a);return 0<b?[e/b,a/b]:[1,0]};a.prototype.getSegAngleCS=function(a,b,e){return this.getAngleCS(a[b],a[b+1],e)};a.prototype.cut=function(a,b,e,g){e=0>=e?a[b]:this.getSegCoord2D(a,b,e);a=1<=g?a[b+1]:this.getSegCoord2D(a,b,g);return[e,a]};a.prototype.addSegment=
function(a,b,e){e&&a.push(b[0]);a.push(b[1])};a.prototype.getSubCurve=function(a,b,e){var g=[];return this.appendSubCurve(g,a,b,e)?g:null};a.prototype.appendSubCurve=function(a,b,e,g){for(var f=b?b.length-1:0,c=0,d=!0,h=0;h<f;){var n=this.calculateSegLength(b,h);if(0!==n){if(d){if(c+n>e){var p=(e-c)/n,k=1,t=!1;c+n>=g&&(k=(g-c)/n,t=!0);(p=this.cut(b,h,p,k))&&this.addSegment(a,p,d);if(t)break;d=!1}}else{if(c+n>g){(p=this.cut(b,h,0,(g-c)/n))&&this.addSegment(a,p,d);break}this.addSegment(a,[b[h],b[h+
1]],d)}c+=n}++h}return!0};a.prototype.getCIMPointAlong=function(a,b){for(var e=a?a.length-1:0,g=0,f=-1;f<e;){++f;var c=this.calculateSegLength(a,f);if(0!==c){if(g+c>b)return this.getCoord2D(a[f],a[f+1],(b-g)/c);g+=c}}return null};a.prototype.isEmpty=function(a,b){if(!a||1>=a.length)return!0;for(var e=a?a.length-1:0,g=-1;g<e;)if(++g,a[g+1][0]!==a[g][0]||a[g+1][1]!==a[g][1]||b&&a[g+1][2]!==a[g][2])return!1;return!0};a.prototype.offset=function(a,b,e,g,f){f;if(!a||2>a.length)return null;f=a.length;var c=
a[0][0]===a[f-1][0]&&a[0][1]===a[f-1][1];if(c){if(3>a.length)return null;--f}for(var d=[],h=c?a[f-1]:null,n=a[0],p=0;p<f;p++){var k=p===f-1?c?a[0]:null:a[p+1];if(h)if(k){var t=[k[0]-n[0],k[1]-n[1]];this.normalize(t);h=[n[0]-h[0],n[1]-h[1]];this.normalize(h);var v=h[0]*t[1]-h[1]*t[0],q=h[0]*t[0]+h[1]*t[1];if(0<=v===0>=b)v=[t[0]-h[0],t[1]-h[1]],this.normalize(v),q=Math.sqrt((1+q)/2),t=-Math.abs(b)/q,d.push([n[0]-v[0]*t,n[1]-v[1]*t]);else switch(e){case "Mitered":if(q=Math.sqrt((1+q)/2),0<q&&1/q<g){v=
[t[0]-h[0],t[1]-h[1]];this.normalize(v);t=Math.abs(b)/q;d.push([n[0]-v[0]*t,n[1]-v[1]*t]);break}case "Bevelled":d.push([n[0]+h[1]*b,n[1]-h[0]*b]);d.push([n[0]+t[1]*b,n[1]-t[0]*b]);break;case "Rounded":d.push([n[0]+h[1]*b,n[1]-h[0]*b]);for(var q=.2,l=1;5>l;l++,q+=.2)v=[h[1]*(1-q)+t[1]*q,-h[0]*(1-q)-t[0]*q],this.normalize(v),d.push([n[0]+v[0]*b,n[1]+v[1]*b]);d.push([n[0]+t[1]*b,n[1]-t[0]*b]);break;default:0>v?(d.push([n[0]+(h[1]+h[0])*b,n[1]+(h[1]-h[0])*b]),d.push([n[0]+(t[1]-t[0])*b,n[1]-(t[0]+t[1])*
b])):(q=Math.sqrt((1+Math.abs(q))/2),v=[t[0]-h[0],t[1]-h[1]],this.normalize(v),t=b/q,d.push([n[0]-v[0]*t,n[1]-v[1]*t]))}}else v=[n[0]-h[0],n[1]-h[1]],this.normalize(v),d.push([n[0]+v[1]*b,n[1]-v[0]*b]);else v=[k[0]-n[0],k[1]-n[1]],this.normalize(v),d.push([n[0]+v[1]*b,n[1]-v[0]*b]);h=n;n=k}c&&d.push([d[0][0],d[0][1]]);return d};return a}();b.CurveHelper=e})},"esri/symbols/cim/effects/EffectBuffer":function(){define(["require","exports","../../../geometry/support/jsonUtils","../CurveHelper"],function(e,
b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,c){return new l(a,b,c)};a.instance=null;return a}();b.EffectBuffer=e;var l=function(){function b(a,b,c){this._inputGeometries=a;this._curveHelper=new m.CurveHelper;this._size=(void 0!==b.size?b.size:1)*c;this._offsetFlattenError=m.PIXEL_TOLERANCE*c}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(a.isExtent(b))if(0<
this._size){var f=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];if(f=this._curveHelper.offset(f,this._size,"Rounded",4,this._offsetFlattenError))return{rings:[f]}}else if(0>this._size){if(0<Math.min(b.xmax-b.xmin,b.ymax-b.ymin)+2*this._size)return{xmin:b.xmin-this._size,xmax:b.xmax+this._size,ymin:b.ymin-this._size,ymax:b.ymax+this._size}}else return b;if(a.isPolygon(b)){if(0===this._size)return b;for(var c=[],d=0,e=b.rings;d<e.length;d++)f=e[d],(f=this._curveHelper.offset(f,
this._size,"Rounded",4,this._offsetFlattenError))&&c.push(f);if(c.length)return{rings:c}}if(a.isPolyline(b)&&0<this._size){c=[];d=0;for(e=b.paths;d<e.length;d++){var n=e[d];if(n&&1<n.length&&(f=this._curveHelper.offset(n,this._size,"Rounded",4,this._offsetFlattenError),n=this._curveHelper.offset(n,-this._size,"Rounded",4,this._offsetFlattenError),f&&n)){for(var p=n.length-1;0<=p;p--)f.push(n[p]);f.push([f[0][0],f[0][1]]);c.push(f)}}if(c.length)return{rings:c}}a.isPoint(b);b=this._inputGeometries.next()}return null};
return b}()})},"esri/symbols/cim/effects/EffectCut":function(){define(["require","exports","tslib","../CIMCursor","../CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectCut=e;var k=function(b){function f(a,d,f){a=b.call(this,a,!0,!0)||this;a._curveHelper=new l.CurveHelper;
a._beginCut=(void 0!==d.beginCut?d.beginCut:1)*f;a._endCut=(void 0!==d.endCut?d.endCut:1)*f;a._middleCut=(void 0!==d.middleCut?d.middleCut:0)*f;a._invert=void 0!==d.invert?d.invert:!1;0>a._beginCut&&(a._beginCut=0);0>a._endCut&&(a._endCut=0);0>a._middleCut&&(a._middleCut=0);return a}a.__extends(f,b);f.prototype.processPath=function(a){var c=this._beginCut,b=this._endCut,f=this._middleCut,g=this._curveHelper.calculatePathLength(a),e=[];if(!this._invert)0===c&&0===b&&0===f?e.push(a):c+b+f>=g||(0===
f?c=this._curveHelper.getSubCurve(a,c,g-b):((c=this._curveHelper.getSubCurve(a,c,.5*(g-f)))&&e.push(c),c=this._curveHelper.getSubCurve(a,.5*(g+f),g-b)),c&&e.push(c));else if(0!==c||0!==b||0!==f)c+b+f>=g?e.push(a):((c=this._curveHelper.getSubCurve(a,0,c))&&e.push(c),(c=this._curveHelper.getSubCurve(a,.5*(g-f),.5*(g+f)))&&e.push(c),(c=this._curveHelper.getSubCurve(a,g-b,b))&&e.push(c));return 0===e.length?null:{paths:e}};return f}(m.PathGeometryCursor)})},"esri/symbols/cim/effects/EffectDashes":function(){define("require exports tslib ../CIMCursor ../CurveHelper ../GeometryWalker".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,f){return new g(a,b,f)};a.instance=null;return a}();b.EffectDashes=e;var g=function(b){function c(a,c,f){a=b.call(this,a,!0,!0)||this;a._walker=new k.GeometryWalker;a._walker.updateTolerance(f);a._endings=c.lineDashEnding;a._customDashPos=void 0!==c.offsetAlongLine?c.offsetAlongLine*f:0;a._offsetAtEnd=
void 0!==c.customEndingOffset?c.customEndingOffset*f:0;a._pattern=new k.DashPattern;a._pattern.init(c.dashTemplate,!0);a._pattern.scale(f);return a}a.__extends(c,b);c.prototype.processPath=function(a){if(0===this._pattern.length())return this.iteratePath=!1,{paths:[a]};if(!this.iteratePath){var c=!0;switch(this._endings){default:this._pattern.extPtGap=0;break;case "FullPattern":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case "FullGap":this.isClosed||(this._pattern.extPtGap=
.5*this._pattern.lastValue());break;case "NoConstraint":this.isClosed||(c=!1);break;case "Custom":this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}var b=this._walker.calculatePathLength(a);if(this._pattern.isEmpty()||b<.1*this._pattern.length()||!this._walker.init(a,this._pattern,c))return{paths:[a]}}if(this.iteratePath)a=this._pattern.nextValue();else{c=void 0;switch(this._endings){default:c=.5*this._pattern.firstValue();break;case "HalfGap":c=.5*-this._pattern.lastValue();break;case "FullGap":c=
-this._pattern.lastValue();break;case "FullPattern":c=0;break;case "NoConstraint":case "Custom":c=-this._customDashPos}a=c/this._pattern.length();a-=Math.floor(a);c=a*this._pattern.length();this._pattern.reset();a=this._pattern.nextValue();for(b=!1;c>=a;)c-=a,a=this._pattern.nextValue(),b=!b;a-=c;b?(this._walker.nextPosition(a),a=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(a),a=this._pattern.nextValue(),this._walker.nextPosition(a),a=this._pattern.nextValue())}(c=
this._walker.nextCurve(a))?this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(this._firstCurve.splice(0,1),l.PathHelper.mergePath(c,this._firstCurve),this._firstCurve=null)):(a=this._pattern.nextValue(),!this._walker.nextPosition(a)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(c=this._firstCurve,this._firstCurve=null)):this.iteratePath=!0):(this.iteratePath=!1,c=this._firstCurve,this._firstCurve=null);return{paths:[c]}};return c}(m.PathGeometryCursor)})},"esri/symbols/cim/GeometryWalker":function(){define(["require",
"exports","tslib","./CIMCursor","./CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){this._values=[];this._currentValue=this._length=this.ctrlPtGap=this.extPtGap=0}a.prototype.isEmpty=function(){return 0===this._values.length};a.prototype.size=function(){return this._values.length};a.prototype.init=function(a,c,b){void 0===b&&(b=!0);this._setEmpty();if(!a||0===a.length)return!1;for(var d=0;d<a.length;d++){var f=Math.abs(a[d]);b&&1E-7>f&&(f=
1E-7);this._values.push(f);this._length+=f}c&&a.length&1&&(this._length*=2);if(0===this._length)return!1;this.ctrlPtGap=this.extPtGap=0;this._currentValue=-1;return!0};a.prototype.scale=function(a){for(var c=this._values?this._values.length:0,b=0;b<c;++b)this._values[b]*=a;this._length*=a;this.extPtGap*=a;this.ctrlPtGap*=a};a.prototype.addValue=function(a){this._length+=a;this._values.push(a)};a.prototype.firstValue=function(){return this._values[0]};a.prototype.lastValue=function(){return this._values[this._values.length-
1]};a.prototype.nextValue=function(){this._currentValue++;this._currentValue===this._values.length&&(this._currentValue=0);return this._values[this._currentValue]};a.prototype.reset=function(){this._currentValue=-1};a.prototype.length=function(){return this._length};a.prototype._setEmpty=function(){this.extPtGap=this.ctrlPtGap=this._length=0;this._currentValue=-1;this._values.length=0};return a}();b.DashPattern=e;var k=function(){function a(){this.reset()}a.prototype.reset=function(){this.segment=
-1;this.abscissa=this.segmentLength=0;this.isPartEnd=this.isPathEnd=!1};a.prototype.isValid=function(){return-1!==this.segment};a.prototype.copyTo=function(a){a.segment=this.segment;a.segmentLength=this.segmentLength;a.abscissa=this.abscissa;a.isPathEnd=this.isPathEnd;a.isPartEnd=this.isPartEnd};return a}();e=function(b){function f(a,d){void 0===a&&(a=0);void 0===d&&(d=!1);a=b.call(this,a,d)||this;a._tolerance=l.PIXEL_TOLERANCE;a._currentPosition=new k;return a}a.__extends(f,b);f.prototype.updateTolerance=
function(a){this._tolerance=l.PIXEL_TOLERANCE*a};f.prototype.init=function(a,b,f){void 0===f&&(f=!0);f?(this._patternLength=b.length(),this._partExtPtGap=b.extPtGap,this._partCtrlPtGap=b.ctrlPtGap):this._partCtrlPtGap=this._partExtPtGap=this._patternLength=0;this._currentPosition.reset();this._partSegCount=0;this._path=a;this._seg=-1;return this.setPosAtNextPart()};f.prototype.curPositionIsValid=function(){return this._currentPosition.isValid()};f.prototype.nextPosition=function(a,b){void 0===b&&
(b=0);var c=new k;if(!this._nextPosition(a,c,null,b))return!1;c.copyTo(this._currentPosition);return!0};f.prototype.curPointAndAngle=function(a){a.pt=this._getPoint(this._currentPosition);var c=this._getAngle(this._currentPosition),b=c[1];a.ca=c[0];a.sa=b};f.prototype.nextPointAndAngle=function(a,b,f){void 0===f&&(f=0);var c=new k;if(!this._nextPosition(a,c,null,f))return!1;c.copyTo(this._currentPosition);b.pt=this._getPoint(c);a=this._getAngle(c);f=a[1];b.ca=a[0];b.sa=f;return!0};f.prototype.nextCurve=
function(a){if(0===a)return null;var c=[],b=new k;if(!this._nextPosition(a,b,c,1))return null;b.copyTo(this._currentPosition);return c};f.prototype.isPathEnd=function(){return this._currentPosition.isPathEnd};f.prototype.getPathEnd=function(){if(-1===this._currentPosition.segment)throw Error("missing segment");return this._path[this._currentPosition.segment+1]};f.prototype._nextPosition=function(a,b,f,g){if(this._currentPosition.isPathEnd)return!1;var c=this._currentPosition.abscissa;0<this._currentPosition.segmentLength&&
(c/=this._currentPosition.segmentLength);for(this._currentPosition.copyTo(b);b.abscissa+a*this._partLengthRatio>b.segmentLength+this._tolerance;)if(f&&(0===f.length&&(0===c?(c=this._path[b.segment],f.push([c[0],c[1]])):f.push(this.getSegCoord2D(this._path,b.segment,c))),c=this._path[b.segment+1],f.push([c[0],c[1]])),c=0,a-=(b.segmentLength-b.abscissa)/this._partLengthRatio,this._partSegCount)b.segment=this.nextSegment(),b.segmentLength=this.calculateSegLength(this._path,b.segment),b.abscissa=0,this._partSegCount--;
else{if(!this.setPosAtNextPart()){if(0===g)return!1;b.segmentLength=this.calculateSegLength(this._path,b.segment);b.isPartEnd=!0;1===g?(b.abscissa=b.segmentLength,b.isPathEnd=!0):b.abscissa=b.segmentLength+a;return!0}this._currentPosition.copyTo(b)}b.abscissa+=a*this._partLengthRatio;f&&(0===f.length&&(0===c?(c=this._path[b.segment],f.push([c[0],c[1]])):f.push(this.getSegCoord2D(this._path,b.segment,c))),a=b.abscissa/b.segmentLength,1===a?(c=this._path[b.segment+1],f.push([c[0],c[1]])):f.push(this.getSegCoord2D(this._path,
b.segment,a)));!this._partSegCount&&Math.abs(b.abscissa-b.segmentLength)<this._tolerance&&(b.isPathEnd=this._partIsLast,b.isPartEnd=!0);return!0};f.prototype._getPoint=function(a){if(-1===a.segment)throw Error("missing segment");return this.getSegCoord2D(this._path,a.segment,0>=a.segmentLength?0:a.abscissa/a.segmentLength)};f.prototype._getAngle=function(a){if(-1===a.segment)throw Error("missing segment");return this.getSegAngleCS(this._path,a.segment,0>=a.segmentLength?0:a.abscissa/a.segmentLength)};
f.prototype.setPosAtNextPart=function(){for(;this._partSegCount;)this.hasNextSegment()&&this.nextSegment(),this._partSegCount--;if(!this.hasNextSegment())return!1;this._partLength=0;this._partIsLast=!0;for(this._partSegCount=0;this.hasNextSegment();)if(this._partLength+=this.calculateSegLength(this._path,this.nextSegment()),this._partSegCount++,1===m.getId(this._path[this.getEndPointIndex()])){this._partIsLast=!this.hasNextSegment();break}for(var a=this._partSegCount;a;)this.previousSegment(),--a;
this._currentPosition.segment=this.nextSegment();this._currentPosition.segmentLength=this.calculateSegLength(this._path,this._currentPosition.segment);this._currentPosition.abscissa=0;this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1;--this._partSegCount;a=this.getStartPointIndex();this._ctrlPtBegin=1===m.getId(this._path[a]);a=a+this._partSegCount+1;a>=this._path.length&&(a=0);this._ctrlPtEnd=1===m.getId(this._path[a]);if(0<this._patternLength){var a=this._ctrlPtBegin?this._partCtrlPtGap:
this._partExtPtGap,b=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap,f=Math.round((this._partLength-(a+b))/this._patternLength);0>=f&&(f=0<a+b?0:1);this._partLengthRatio=this._partLength/(a+b+f*this._patternLength);.01>this._partLengthRatio&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0};f.prototype.hasNextSegment=function(){return this._seg<this._path.length-2};f.prototype.previousSegment=function(){return--this._seg};f.prototype.nextSegment=function(){return++this._seg};
f.prototype.getStartPointIndex=function(){return this._seg};f.prototype.getEndPointIndex=function(){return this._seg+1};return f}(l.CurveHelper);b.GeometryWalker=e})},"esri/symbols/cim/effects/EffectDonut":function(){define(["require","exports","../../../geometry/support/jsonUtils","../CurveHelper"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,
b,c){return new l(a,b,c)};a.instance=null;return a}();b.EffectDonut=e;var l=function(){function b(a,b,c){this._inputGeometries=a;this._curveHelper=new m.CurveHelper;this._width=(void 0!==b.width?b.width:2)*c;switch(b.method){default:this._method="Mitered";break;case "Bevelled":this._method="Bevelled";break;case "Rounded":case "TrueBuffer":this._method="Rounded";break;case "Square":this._method="Square"}this._option=b.option;this._offsetFlattenError=m.PIXEL_TOLERANCE*c;this._option}b.prototype.next=
function(){for(var b=this._inputGeometries.next();b;){if(a.isExtent(b)&&0<this._width){if(0>Math.min(b.xmax-b.xmin,b.ymax-b.ymin)-2*this._width)return b;var f=[];f.push([[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]]);f.push([[b.xmin+this._width,b.ymin+this._width],[b.xmax-this._width,b.ymin+this._width],[b.xmax-this._width,b.ymax-this._width],[b.xmin+this._width,b.ymax-this._width],[b.xmin+this._width,b.ymin+this._width]]);return{rings:f}}if(a.isPolygon(b)&&0<this._width){for(var c=
[],f=[],d=0,b=b.rings;d<b.length;d++){var e=b[d],n=this._curveHelper.calculatePathLength(e);0<n&&c.push(e);var p=this._curveHelper.offset(e,this._width,this._method,4,this._offsetFlattenError);p&&(0>n&&p.reverse(),f.push(p));0>n&&c.push(e)}if(f.length)return{rings:f}}b=this._inputGeometries.next()}return null};return b}()})},"esri/symbols/cim/effects/EffectJog":function(){define(["require","exports","tslib","../CIMCursor","../CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",
{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectJog=e;var k=function(b){function f(a,d,f){a=b.call(this,a,!1,!0)||this;a._curveHelper=new l.CurveHelper;a._length=(void 0!==d.length?d.length:20)*f;a._angle=void 0!==d.angle?d.angle:225;a._position=void 0!==d.position?d.position:50;0>a._length&&(a._length=-a._length);20>a._position&&(a._position=
20);80<a._position&&(a._position=80);a._mirror=!1;return a}a.__extends(f,b);f.prototype.processPath=function(a){if(this._curveHelper.isEmpty(a,!1))return null;var c=a[0];a=a[a.length-1];this._curveHelper.normalize([a[0]-c[0],a[1]-c[1]]);var b=[c[0]+(a[0]-c[0])*this._position/100,c[1]+(a[1]-c[1])*this._position/100],f=Math.cos((90-this._angle)/180*Math.PI),g=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(g=-g);this._mirror=!this._mirror;return{paths:[[c,[b[0]-this._length/2*f,b[1]-this._length/
2*g],[b[0]+this._length/2*f,b[1]+this._length/2*g],a]]}};return f}(m.PathGeometryCursor)})},"esri/symbols/cim/effects/EffectMove":function(){define(["require","exports","../../../core/lang","../../../geometry/support/jsonUtils"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,c){return new l(a,b,c)};a.instance=null;return a}();b.EffectMove=e;var l=
function(){function b(a,b,c){this._inputGeometries=a;this._offsetX=void 0!==b.offsetX?b.offsetX*c:0;this._offsetY=void 0!==b.offsetY?-b.offsetY*c:0}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(m.isExtent(b))return{xmin:b.xmin+this._offsetX,xmax:b.xmax+this._offsetX,ymin:b.ymin+this._offsetY,ymax:b.ymax+this._offsetY};if(m.isPolygon(b))return b=a.clone(b),this._moveMultipath(b.rings,this._offsetX,this._offsetY),b;if(m.isPolyline(b))return b=a.clone(b),this._moveMultipath(b.paths,
this._offsetX,this._offsetY),b;if(m.isMultipoint(b))return b=a.clone(b),this._movePath(b.points,this._offsetX,this._offsetY),b;if(m.isPoint(b))return{x:b.x+this._offsetX,y:b.y+this._offsetY};b=this._inputGeometries.next()}return null};b.prototype._moveMultipath=function(a,b,c){if(a)for(var d=0;d<a.length;d++)this._movePath(a[d],b,c)};b.prototype._movePath=function(a,b,c){if(a)for(var d=0;d<a.length;d++){var f=a[d];f[0]+=b;f[1]+=c}};return b}()})},"esri/symbols/cim/effects/EffectOffset":function(){define(["require",
"exports","../../../geometry/support/jsonUtils","../CurveHelper"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,c){return new l(a,b,c)};a.instance=null;return a}();b.EffectOffset=e;var l=function(){function b(a,b,c){this._inputGeometries=a;this._curveHelper=new m.CurveHelper;this._offset=(void 0!==b.offset?b.offset:1)*c;this._method=b.method;
this._option=b.option;this._offsetFlattenError=m.PIXEL_TOLERANCE*c;this._option}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(0===this._offset)return b;if(a.isExtent(b)){if("Rounded"===this._method&&0<this._offset){var f=[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]];return(f=this._curveHelper.offset(f,this._offset,this._method,4,this._offsetFlattenError))?{rings:[f]}:null}if(0<Math.min(b.xmax-b.xmin,b.ymax-b.ymin)+2*this._offset)return{xmin:b.xmin-
this._offset,xmax:b.xmax+this._offset,ymin:b.ymin-this._offset,ymax:b.ymax+this._offset}}if(a.isPolygon(b)){for(var c=[],d=0,e=b.rings;d<e.length;d++)f=e[d],(f=this._curveHelper.offset(f,this._offset,this._method,4,this._offsetFlattenError))&&c.push(f);if(c.length)return{rings:c}}if(a.isPolyline(b)){c=[];d=0;for(b=b.paths;d<b.length;d++)(e=this._curveHelper.offset(b[d],this._offset,this._method,4,this._offsetFlattenError))&&c.push(e);if(c.length)return{paths:c}}b=this._inputGeometries.next()}return null};
return b}()})},"esri/symbols/cim/effects/EffectReverse":function(){define(["require","exports","../../../core/lang","../../../geometry/support/jsonUtils","../CIMCursor"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectReverse=e;var k=function(){function b(a,c,b){this._inputGeometries=
a;this._reverse=void 0!==c.reverse?c.reverse:!0;b}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(!this._reverse)return b;if(m.isPolyline(b))return b=a.clone(b),l.reverseMultipath(b.paths),b;b=this._inputGeometries.next()}return null};return b}()})},"esri/symbols/cim/effects/EffectRotate":function(){define("require exports ../../../core/lang ../../../geometry/support/aaBoundingRect ../../../geometry/support/boundsUtils ../../../geometry/support/jsonUtils".split(" "),function(e,
b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,f){return new g(a,b,f)};a.instance=null;return a}();b.EffectRotate=e;var g=function(){function b(a,b,f){this._inputGeometries=a;this._rotateAngle=void 0!==b.angle?-b.angle*Math.PI/180:0;f}b.prototype.next=function(){for(var c=this._inputGeometries.next();c;){if(0===this._rotateAngle)return c;var b=m.create();
l.getBoundsXY(b,c);var f=(b[2]+b[0])/2,b=(b[3]+b[1])/2;if(k.isExtent(c))return c={rings:[[[c.xmin,c.ymin],[c.xmin,c.ymax],[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin]]]},this._rotateMultipath(c.rings,f,b),c;if(k.isPolygon(c))return c=a.clone(c),this._rotateMultipath(c.rings,f,b),c;if(k.isPolyline(c))return c=a.clone(c),this._rotateMultipath(c.paths,f,b),c;if(k.isMultipoint(c))return c=a.clone(c),this._rotatePath(c.points,f,b),c;if(k.isPoint(c))return c;c=this._inputGeometries.next()}return null};
b.prototype._rotateMultipath=function(a,b,f){if(a)for(var c=0;c<a.length;c++)this._rotatePath(a[c],b,f)};b.prototype._rotatePath=function(a,b,f){if(a)for(var c=Math.cos(this._rotateAngle),d=Math.sin(this._rotateAngle),e=0;e<a.length;e++){var g=a[e],h=g[0]-b,k=g[1]-f;g[0]=b+h*c-k*d;g[1]=f+h*d+k*c}};return b}()})},"esri/geometry/support/aaBoundingRect":function(){define(["require","exports","../../core/compilerUtils","../Extent"],function(e,b,a,m){function l(a){void 0===a&&(a=b.ZERO);return[a[0],a[1],
a[2],a[3]]}function k(a){return a[0]>=a[2]?0:a[2]-a[0]}function g(a){return a[1]>=a[3]?0:a[3]-a[1]}function f(a,c,b){return c>=a[0]&&b>=a[1]&&c<=a[2]&&b<=a[3]}function c(a,c){a[0]=c[0];a[1]=c[1];a[2]=c[2];a[3]=c[3];return a}function d(a){return 4===a.length}function h(a,c,b){return a<c?c:a>b?b:a}Object.defineProperty(b,"__esModule",{value:!0});b.create=l;b.clone=function(a){return[a[0],a[1],a[2],a[3]]};b.fromValues=function(a,c,b,d,f){void 0===f&&(f=l());f[0]=a;f[1]=c;f[2]=b;f[3]=d;return f};b.fromExtent=
function(a,c){void 0===c&&(c=l());c[0]=a.xmin;c[1]=a.ymin;c[2]=a.xmax;c[3]=a.ymax;return c};b.toExtent=function(a,c){return new m({xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3],spatialReference:c})};b.expandPointInPlace=function(a,c){c[0]<a[0]&&(a[0]=c[0]);c[0]>a[2]&&(a[2]=c[0]);c[1]<a[1]&&(a[1]=c[1]);c[1]>a[3]&&(a[3]=c[1])};b.expand=function(c,b,f){void 0===f&&(f=c);if("length"in b)if(d(b))f[0]=Math.min(c[0],b[0]),f[1]=Math.min(c[1],b[1]),f[2]=Math.max(c[2],b[2]),f[3]=Math.max(c[3],b[3]);else{if(2===b.length||
3===b.length)f[0]=Math.min(c[0],b[0]),f[1]=Math.min(c[1],b[1]),f[2]=Math.max(c[2],b[0]),f[3]=Math.max(c[3],b[1])}else switch(b.type){case "extent":f[0]=Math.min(c[0],b.xmin);f[1]=Math.min(c[1],b.ymin);f[2]=Math.max(c[2],b.xmax);f[3]=Math.max(c[3],b.ymax);break;case "point":f[0]=Math.min(c[0],b.x);f[1]=Math.min(c[1],b.y);f[2]=Math.max(c[2],b.x);f[3]=Math.max(c[3],b.y);break;default:a.neverReached(b)}return f};b.expandWithNestedArray=function(a,c,b){void 0===b&&(b=a);var d=c.length,f=a[0],e=a[1],g=
a[2];a=a[3];for(var h=0;h<d;h++){var n=c[h],f=Math.min(f,n[0]),e=Math.min(e,n[1]),g=Math.max(g,n[0]);a=Math.max(a,n[1])}b[0]=f;b[1]=e;b[2]=g;b[3]=a;return b};b.allFinite=function(a){for(var c=0;4>c;c++)if(!isFinite(a[c]))return!1;return!0};b.width=k;b.height=g;b.diameter=function(a){var c=k(a);a=g(a);return Math.sqrt(c*c+a*a)};b.area=function(a){return k(a)*g(a)};b.center=function(a,c){void 0===c&&(c=[0,0]);c[0]=(a[0]+a[2])/2;c[1]=(a[1]+a[3])/2;return c};b.containsPoint=function(a,c){return f(a,c[0],
c[1])};b.containsPointObject=function(a,c){return f(a,c.x,c.y)};b.containsXY=f;b.containsPointWithMargin=function(a,c,b){return c[0]>=a[0]-b&&c[1]>=a[1]-b&&c[0]<=a[2]+b&&c[1]<=a[3]+b};b.intersects=function(a,c){return Math.max(c[0],a[0])<=Math.min(c[2],a[2])&&Math.max(c[1],a[1])<=Math.min(c[3],a[3])};b.contains=function(a,c){return c[0]>=a[0]&&c[2]<=a[2]&&c[1]>=a[1]&&c[3]<=a[3]};b.intersection=function(a,c,b){void 0===b&&(b=a);var d=c[0],f=c[1],e=c[2];c=c[3];b[0]=h(a[0],d,e);b[1]=h(a[1],f,c);b[2]=
h(a[2],d,e);b[3]=h(a[3],f,c);return b};b.distance=function(a,c){var b=(a[1]+a[3])/2,d=Math.max(Math.abs(c[0]-(a[0]+a[2])/2)-k(a)/2,0);a=Math.max(Math.abs(c[1]-b)-g(a)/2,0);return Math.sqrt(d*d+a*a)};b.size=function(a,c){c[0]=a[2]-a[0];c[1]=a[3]-a[1]};b.offset=function(a,c,b,d){void 0===d&&(d=a);d[0]=a[0]+c;d[1]=a[1]+b;d[2]=a[2]+c;d[3]=a[3]+b;return d};b.pad=function(a,c,b){void 0===b&&(b=a);b[0]=a[0]-c;b[1]=a[1]-c;b[2]=a[2]+c;b[3]=a[3]+c;return b};b.setMin=function(a,c,b){void 0===b&&(b=a);b[0]=c[0];
b[1]=c[1];b!==a&&(b[2]=a[2],b[3]=a[3]);return b};b.setMax=function(a,c,b){void 0===b&&(b=a);b[2]=c[0];b[3]=c[1];b!==a&&(b[0]=a[0],b[1]=a[1]);return a};b.set=c;b.empty=function(a){return a?c(a,b.NEGATIVE_INFINITY):l(b.NEGATIVE_INFINITY)};b.is=d;b.isPoint=function(a){return(0===k(a)||!isFinite(a[0]))&&(0===g(a)||!isFinite(a[1]))};b.equals=function(a,c,b){if(null==a||null==c)return a===c;if(!d(a)||!d(c))return!1;if(b)for(var f=0;f<a.length;f++){if(!b(a[f],c[f]))return!1}else for(f=0;f<a.length;f++)if(a[f]!==
c[f])return!1;return!0};b.POSITIVE_INFINITY=[-Infinity,-Infinity,Infinity,Infinity];b.NEGATIVE_INFINITY=[Infinity,Infinity,-Infinity,-Infinity];b.ZERO=[0,0,0,0];b.UNIT=[0,0,1,1]})},"esri/symbols/cim/effects/EffectScale":function(){define("require exports ../../../core/lang ../../../geometry/support/aaBoundingRect ../../../geometry/support/boundsUtils ../../../geometry/support/jsonUtils".split(" "),function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=
function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,f){return new g(a,b,f)};a.instance=null;return a}();b.EffectScale=e;var g=function(){function b(a,b,f){this._inputGeometries=a;this._xFactor=void 0!==b.xScaleFactor?b.xScaleFactor:1.15;this._yFactor=void 0!==b.yScaleFactor?b.yScaleFactor:1.15;f}b.prototype.next=function(){for(var c=this._inputGeometries.next();c;){if(1===this._xFactor&&1===this._yFactor)return c;var b=m.create();l.getBoundsXY(b,c);
var f=(b[2]+b[0])/2,b=(b[3]+b[1])/2;if(k.isExtent(c))return c={rings:[[[c.xmin,c.ymin],[c.xmin,c.ymax],[c.xmax,c.ymax],[c.xmax,c.ymin],[c.xmin,c.ymin]]]},this._scaleMultipath(c.rings,f,b),c;if(k.isPolygon(c))return c=a.clone(c),this._scaleMultipath(c.rings,f,b),c;if(k.isPolyline(c))return c=a.clone(c),this._scaleMultipath(c.paths,f,b),c;if(k.isMultipoint(c))return c=a.clone(c),this._scalePath(c.points,f,b),c;if(k.isPoint(c))return c;c=this._inputGeometries.next()}return null};b.prototype._scaleMultipath=
function(a,b,f){if(a)for(var c=0;c<a.length;c++)this._scalePath(a[c],b,f)};b.prototype._scalePath=function(a,b,f){if(a)for(var c=0;c<a.length;c++){var d=a[c],e=(d[1]-f)*this._yFactor;d[0]=b+(d[0]-b)*this._xFactor;d[1]=f+e}};return b}()})},"esri/symbols/cim/effects/EffectWave":function(){define(["require","exports","../../../geometry/support/jsonUtils","../CurveHelper","../GeometryWalker"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===
a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.EffectWave=e;var k=function(){function b(a,c,b){this._inputGeometries=a;this._height=(void 0!==c.amplitude?c.amplitude:2)*b;this._period=(void 0!==c.period?c.period:3)*b;this._style=c.waveform;0>=this._height&&(this._height=Math.abs(this._height));0>=this._period&&(this._period=Math.abs(this._period));this._pattern=new l.DashPattern;this._pattern.addValue(this._period);
this._pattern.addValue(this._period);this._walker=new l.GeometryWalker;this._walker.updateTolerance(b)}b.prototype.next=function(){for(var b=this._inputGeometries.next();b;){if(0===this._height||0===this._period)return b;if(a.isPolyline(b)){var c=this._processGeom(b.paths);if(c.length)return{paths:c}}if(a.isPolygon(b)&&(b=this._processGeom(b.rings),b.length))return{rings:b};b=this._inputGeometries.next()}return null};b.prototype._processGeom=function(a){for(var c=[],b=0;b<a.length;b++){var f=a[b];
if(this._walker.init(f,this._pattern))switch(this._style){default:c.push(this._constructCurve(f,!1));break;case "Square":c.push(this._constructSquare(f));break;case "Triangle":c.push(this._constructTriangle(f));break;case "Random":c.push(this._constructCurve(f,!0))}else c.push(f)}return c};b.prototype._constructCurve=function(a,c){var b=new m.PathHelper,f=this._walker.calculatePathLength(a),e=Math.round(f/this._period);0===e&&(e=1);var g=this._period/16,k=1/(16*e+1),f=2*Math.PI*f/(f/e),e=2*Math.PI*
Math.random(),t=2*Math.PI*Math.random(),l=2*Math.PI*Math.random(),q=.75-Math.random()/2,w=.75-Math.random()/2,u={};this._walker.curPointAndAngle(u);b.startPath(u.pt);for(var x=0;;)if(this._walker.nextPointAndAngle(g,u)){var y=x,x=x+k,z=void 0;if(c)var A=this._height/2*(1+.3*Math.sin(q*f*y+e)),z=A*Math.sin(f*y+t),z=z+A*Math.sin(w*f*y+l),z=z/2;else z=.5*this._height*Math.sin(.5*f*y);b.lineTo([u.pt[0]-z*u.sa,u.pt[1]+z*u.ca])}else{b.lineTo(a[a.length-1]);break}return b.path()};b.prototype._constructSquare=
function(a){var c=new m.PathHelper;a=this._walker.calculatePathLength(a);a=Math.round(a/this._period);0===a&&(a=1);for(a=!0;;){var b=!1;if(this._walker.curPositionIsValid()){var f={};this._walker.curPointAndAngle(f);var e={};if(this._walker.nextPointAndAngle(this._period,e)){var g={};this._walker.nextPointAndAngle(this._period,g)&&(a?(c.startPath(f.pt),a=!1):c.lineTo(f.pt),c.lineTo([f.pt[0]-this._height/2*f.sa,f.pt[1]+this._height/2*f.ca]),c.lineTo([e.pt[0]-this._height/2*e.sa,e.pt[1]+this._height/
2*e.ca]),c.lineTo([e.pt[0]+this._height/2*e.sa,e.pt[1]-this._height/2*e.ca]),c.lineTo([g.pt[0]+this._height/2*g.sa,g.pt[1]-this._height/2*g.ca]),b=!0)}}if(!b){c.lineTo(this._walker.getPathEnd());break}}return c.path()};b.prototype._constructTriangle=function(a){var c=new m.PathHelper;a=this._walker.calculatePathLength(a);a=Math.round(a/this._period);0===a&&(a=1);for(a=!0;;){var b=!1;if(this._walker.curPositionIsValid()){var f={};this._walker.curPointAndAngle(f);var e={};if(this._walker.nextPointAndAngle(this._period/
2,e)){var g={};this._walker.nextPointAndAngle(this._period,g)&&(this._walker.nextPosition(this._period/2)&&(a?(c.startPath(f.pt),a=!1):c.lineTo(f.pt),c.lineTo([e.pt[0]-this._height/2*e.sa,e.pt[1]+this._height/2*e.ca]),c.lineTo([g.pt[0]+this._height/2*g.sa,g.pt[1]-this._height/2*g.ca])),b=!0)}}if(!b){c.lineTo(this._walker.getPathEnd());break}}return c.path()};return b}()})},"esri/symbols/cim/placements/PlacementAlongLineSameSize":function(){define("require exports tslib ../CIMCursor ../enums ../GeometryWalker".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,f){return new g(a,b,f)};a.instance=null;return a}();b.PlacementAlongLineSameSize=e;var g=function(b){function c(a,c,f){a=b.call(this,a,!0,!0)||this;a._grometryWalker=new k.GeometryWalker;a._grometryWalker.updateTolerance(f);a._angleToLine=void 0!==c.angleToLine?c.angleToLine:!0;a._offset=void 0!==
c.offset?c.offset*f:0;a._originalEndings=c.endings;a._offsetAtEnd=void 0!==c.customEndingOffset?c.customEndingOffset*f:0;a._position=void 0!==c.offsetAlongLine?c.offsetAlongLine*f:0;a._pattern=new k.DashPattern;a._pattern.init(c.placementTemplate,!1);a._pattern.scale(f);a._endings=a._originalEndings;return a}a.__extends(c,b);c.prototype.processPath=function(a){if(this._pattern.isEmpty())return null;var c;if(this.iteratePath)c=this._pattern.nextValue();else{this._endings=this._originalEndings===l.PlacementEndings.WithFullGap&&
this.isClosed?l.PlacementEndings.WithMarkers:this._originalEndings;this._pattern.extPtGap=0;var b=!0;c=void 0;switch(this._endings){case l.PlacementEndings.NoConstraint:c=-this._position;c=this._adjustPosition(c);b=!1;break;default:c=-this._pattern.lastValue()/2;break;case l.PlacementEndings.WithFullGap:c=-this._pattern.lastValue();this._pattern.extPtGap=this._pattern.lastValue();break;case l.PlacementEndings.WithMarkers:c=0;break;case l.PlacementEndings.Custom:c=-this._position,c=this._adjustPosition(c),
this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._grometryWalker.init(a,this._pattern,b))return null;this._pattern.reset();for(a=0;c>a;)c-=a,a=this._pattern.nextValue();c=a-c;this.iteratePath=!0}a={};if(!this._grometryWalker.nextPointAndAngle(c,a)||this._endings===l.PlacementEndings.WithFullGap&&this._grometryWalker.isPathEnd())return this.iteratePath=!1,null;if(this._endings===l.PlacementEndings.WithMarkers&&this._grometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed))return null;this.internalPlacement.setTranslate(a.pt[0]+
this._offset*a.sa,a.pt[1]-this._offset*a.ca);this._angleToLine&&this.internalPlacement.setRotateCS(a.ca,a.sa);return this.internalPlacement};c.prototype._adjustPosition=function(a){a/=this._pattern.length();a-=Math.floor(a);return a*this._pattern.length()};return c}(m.PathTransformationCursor)})},"esri/symbols/cim/enums":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=b.PlacementEndings||(b.PlacementEndings={});e.NoConstraint="NoConstraint";
e.WithMarkers="WithMarkers";e.WithFullGap="WithFullGap";e.WithHalfGap="WithHalfGap";e.Custom="Custom"})},"esri/symbols/cim/placements/PlacementAtExtremities":function(){define(["require","exports","tslib","../CIMCursor","../CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.PlacementAtExtremities=
e;var k=function(b){function f(a,d,f){a=b.call(this,a,!1,!0)||this;a._curveHelper=new l.CurveHelper;a._angleToLine=void 0!==d.angleToLine?d.angleToLine:!0;a._offset=void 0!==d.offset?d.offset*f:0;a._type=d.extremityPlacement;a._position=void 0!==d.offsetAlongLine?d.offsetAlongLine*f:0;a._beginProcessed=!1;return a}a.__extends(f,b);f.prototype.processPath=function(a){var c;switch(this._type){default:this._beginProcessed?(m.reversePath(a),c=this._atExtremities(a,this._position),m.reversePath(a),this.iteratePath=
this._beginProcessed=!1):(c=this._atExtremities(a,this._position),this.iteratePath=this._beginProcessed=!0);break;case "JustBegin":c=this._atExtremities(a,this._position);break;case "JustEnd":m.reversePath(a),c=this._atExtremities(a,this._position),m.reversePath(a);case "None":}return c};f.prototype._atExtremities=function(a,b){for(var c=a.length,d=0,f,e=a[0],g=1;g<c;++g){f=e;var e=a[g],k=this._curveHelper.calculateLength(f,e);if(d+k>b)return b=(b-d)/k,c=this._curveHelper.getAngleCS(f,e,b),a=c[0],
c=c[1],f=m.getCoord2D(f,e,b),this.internalPlacement.setTranslate(f[0]-this._offset*c,f[1]+this._offset*a),this._angleToLine&&this.internalPlacement.setRotateCS(-a,-c),this.internalPlacement;d+=k}return null};return f}(m.PathTransformationCursor)})},"esri/symbols/cim/placements/PlacementAtRatioPositions":function(){define(["require","exports","tslib","../CIMCursor","../GeometryWalker"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===
a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.PlacementAtRatioPositions=e;var k=function(b){function f(a,d,f){a=b.call(this,a,!0,!0)||this;a._walker=new l.GeometryWalker;a._walker.updateTolerance(f);a._angleToLine=void 0!==d.angleToLine?d.angleToLine:!0;a._offset=void 0!==d.offset?d.offset*f:0;a._beginGap=void 0!==d.beginPosition?d.beginPosition*f:0;a._endGap=void 0!==d.endPosition?d.endPosition*f:0;a._flipFirst=
void 0!==d.flipFirst?d.flipFirst:!0;a._pattern=new l.DashPattern;a._pattern.init(d.positionArray,!1,!1);a._subPathLen=0;a._posCount=a._pattern.size();a._isFirst=!0;a._prevPos=0;return a}a.__extends(f,b);f.prototype.processPath=function(a){if(this._pattern.isEmpty())return null;var c;if(this.iteratePath)a=this._pattern.nextValue()*this._subPathLen,a=this._beginGap+a,c=a-this._prevPos,this._prevPos=a;else{this._posCount=this._pattern.size();this._isFirst=!0;this._prevPos=0;this._subPathLen=this._walker.calculatePathLength(a)-
this._beginGap-this._endGap;if(0>this._subPathLen)return this.iteratePath=!1,null;if(!this._walker.init(a,this._pattern,!1))return null;this._pattern.reset();a=this._pattern.nextValue()*this._subPathLen;a=this._beginGap+a;c=a-this._prevPos;this._prevPos=a;this.iteratePath=!0}a={};if(!this._walker.nextPointAndAngle(c,a,1))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(a.pt[0]+this._offset*a.sa,a.pt[1]-this._offset*a.ca);c=this._isFirst&&this._flipFirst;var b;this._angleToLine?
(b=a.ca,a=a.sa):(b=1,a=0);c&&(b=-b,a=-a);this.internalPlacement.setRotateCS(b,a);this._isFirst=!1;this._posCount--;0===this._posCount&&(this.iteratePath=!1);return this.internalPlacement};return f}(m.PathTransformationCursor)})},"esri/symbols/cim/placements/PlacementOnLine":function(){define(["require","exports","tslib","../CIMCursor","../CurveHelper"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=
new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.PlacementOnLine=e;var k=function(b){function f(a,d,f){a=b.call(this,a,!0,!0)||this;a._curveHelper=new l.CurveHelper;a._angleToLine=void 0!==d.angleToLine?d.angleToLine:!0;a._offset=void 0!==d.offset?d.offset*f:0;a._relativeTo=d.relativeTo;a._position=void 0!==d.startPointOffset?d.startPointOffset*f:0;a._epsilon=.001*f;return a}a.__extends(f,b);f.prototype.processPath=function(a){var c=
this._position;if("SegmentMidpoint"===this._relativeTo){this.iteratePath||(this._segmentCount=a.length,this._curSegment=1,this.iteratePath=!0);for(;this._curSegment<this._segmentCount;){var b=this._curSegment;this._curSegment++;var c=a[b-1],b=a[b],f=this._curveHelper.calculateLength(c,b);if(!(f<this._epsilon)){var f=.5+this._position/f,e=this._curveHelper.getAngleCS(c,b,f);a=e[0];e=e[1];c=m.getCoord2D(c,b,f);this.internalPlacement.setTranslate(c[0]-this._offset*e,c[1]+this._offset*a);this._angleToLine&&
this.internalPlacement.setRotateCS(a,e);return this.internalPlacement}}this.iteratePath=!1;return null}"LineEnd"===this._relativeTo&&m.reversePath(a);c=this.onLine(a,c);"LineEnd"===this._relativeTo&&m.reversePath(a);return c};f.prototype.onLine=function(a,b){var c,d=!1;switch(this._relativeTo){default:c=this._curveHelper.calculatePathLength(a)/2+b;break;case "LineBeginning":c=b;break;case "LineEnd":c=b,d=!0}for(var f=a.length,e=0,g=a[0],k=1;k<f;++k){b=g;var g=a[k],q=this._curveHelper.calculateLength(b,
g);if(e+q>c)return c=(c-e)/q,f=this._curveHelper.getAngleCS(b,g,c),a=f[0],f=f[1],b=m.getCoord2D(b,g,c),this.internalPlacement.setTranslate(b[0]-this._offset*f,b[1]+this._offset*a),this._angleToLine&&(d?this.internalPlacement.setRotateCS(-a,-f):this.internalPlacement.setRotateCS(a,f)),this.internalPlacement;e+=q}return null};return f}(m.PathTransformationCursor)})},"esri/symbols/cim/placements/PlacementOnVertices":function(){define(["require","exports","tslib","../CIMCursor","../CurveHelper"],function(e,
b,a,m,l){function k(a,c){for(var b=Math.PI;Math.abs(c-a)>b+2E-15;)c=c-a>b?c-2*b:c+2*b;return(a+c)/2}Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,b,f){return new g(a,b,f)};a.instance=null;return a}();b.PlacementOnVertices=e;var g=function(b){function c(a,c,f){a=b.call(this,a,!0,!0)||this;a._curveHelper=new l.CurveHelper;a._angleToLine=void 0!==c.angleToLine?c.angleToLine:
!0;a._offset=void 0!==c.offset?c.offset*f:0;a._endPoints=void 0!==c.placeOnEndPoints?c.placeOnEndPoints:!0;a._controlPoints=void 0!==c.placeOnControlPoints?c.placeOnControlPoints:!0;a._regularVertices=void 0!==c.placeOnRegularVertices?c.placeOnRegularVertices:!0;a._tags=[];a._tagIterator=0;return a}a.__extends(c,b);c.prototype.processPath=function(a){this.iteratePath||(this._preparePath(a),this.iteratePath=!0);if(this._tagIterator>=this._tags.length)return this._tagIterator=this._tags.length=0,this.iteratePath=
!1,null;a=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(a[2]);var c=a[0],b=a[1];if(0!==this._offset)var d=Math.cos(a[2]),c=c-this._offset*Math.sin(a[2]),b=b+this._offset*d;this.internalPlacement.setTranslate(c,b);this._tagIterator++;return this.internalPlacement};c.prototype._preparePath=function(a){this._tagIterator=this._tags.length=0;for(var c=m.isClosedPath(a),b=a.length-1,d=0,f=0,e=0,g=0,q=0,l,u;d<b;){d++;l=a[d-1];u=a[d];var x=m.getId(l),y=m.getId(u);if(this._angleToLine||
0!==this._offset)g=this._curveHelper.getAngle(l,u,0);1===d?c?(f=g,e=x):this._endPoints&&this._tags.push([l[0],l[1],g]):1===x?this._controlPoints&&this._tags.push([l[0],l[1],k(q,g)]):this._regularVertices&&this._tags.push([l[0],l[1],k(q,g)]);if(this._angleToLine||0!==this._offset)q=this._curveHelper.getAngle(l,u,1);d===b&&(c?1===y||1===e?this._controlPoints&&this._tags.push([u[0],u[1],k(q,f)]):this._regularVertices&&this._tags.push([u[0],u[1],k(q,f)]):this._endPoints&&this._tags.push([u[0],u[1],q]))}this._tagIterator=
0};return c}(m.PathTransformationCursor)})},"esri/symbols/cim/placements/PlacementPolygonCenter":function(){define(["require","exports","../../../geometry/support/aaBoundingRect","../../../geometry/support/boundsUtils","../CIMPlacements"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(){}a.local=function(){null===a.instance&&(a.instance=new a);return a.instance};a.prototype.execute=function(a,c,b){return new k(a,c,b)};a.instance=null;return a}();b.PlacementPolygonCenter=
e;var k=function(){function b(a,c,b){this._geometry=a;this._offsetX=void 0!==c.offsetX?c.offsetX*b:0;this._offsetY=void 0!==c.offsetY?c.offsetY*b:0;this._method=c.method;this._clipping=c.clipAtBoundary;this._internalPlacement=new l.Placement;this._clipping}b.prototype.next=function(){var a=this._geometry;this._geometry=null;return a&&void 0!==a.rings?this._polygonCenter(a):null};b.prototype._polygonCenter=function(b){switch(this._method){default:case "CenterOfMass":case "BoundingBoxCenter":var c=
a.create();m.getBoundsXY(c,b);this._internalPlacement.setTranslate((c[2]+c[0])/2+this._offsetX,(c[3]+c[1])/2-this._offsetY)}return this._internalPlacement};return b}()})},"esri/symbols/cim/Rect":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function a(a,b,e,g){void 0===a&&(a=0);void 0===b&&(b=0);void 0===e&&(e=0);void 0===g&&(g=0);this.x=a;this.y=b;this.width=e;this.height=g}Object.defineProperty(a.prototype,"isEmpty",{get:function(){return 0>=
this.width||0>=this.height},enumerable:!0,configurable:!0});a.prototype.union=function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.width=Math.max(this.width,a.width);this.height=Math.max(this.height,a.height)};return a}();b.default=e})},"esri/symbols/cim/packingUtils":function(){define(["require","exports"],function(e,b){function a(a){return a-Math.floor(a)}Object.defineProperty(b,"__esModule",{value:!0});var m=[1,256,65536,16777216],l=[1/256,1/65536,1/16777216,1/4294967296],k=
function(a,b){void 0===b&&(b=0);for(var c=0,d=0;4>d;d++)c+=a[b+d]*l[d];return c}(new Uint8ClampedArray([255,255,255,255]));b.packFloatRGBA=function(b,f,c){void 0===c&&(c=0);b=0>b?0:b>k?k:b;for(var d=0;4>d;d++)f[c+d]=Math.floor(256*a(b*m[d]))}})},"esri/symbols/cim/SDFHelper":function(){define(["require","exports","../../geometry/support/jsonUtils","./packingUtils","./Rect"],function(e,b,a,m,l){function k(a){if(!a)return null;switch(a.type){case "CIMPointSymbol":a=a.symbolLayers;if(!a||1!==a.length)break;
return k(a[0]);case "CIMVectorMarker":a=a.markerGraphics;if(!a||1!==a.length)break;var c=a[0];if(!c)break;a=c.geometry;if(!a)break;c=c.symbol;if(!c||"CIMPolygonSymbol"!==c.type&&"CIMLineSymbol"!==c.type)break;return{geom:a,asFill:"CIMPolygonSymbol"===c.type};case "sdf":return{geom:a.geom,asFill:a.asFill}}return null}function g(a){for(var c=Infinity,b=-Infinity,f=Infinity,e=-Infinity,g=0;g<a.length;g++)for(var k=0,l=a[g];k<l.length;k++){var v=l[k];v[0]<c&&(c=v[0]);v[0]>b&&(b=v[0]);v[1]<f&&(f=v[1]);
v[1]>e&&(e=v[1])}return[c,f,b,e]}Object.defineProperty(b,"__esModule",{value:!0});b.getSDFInfo=k;b.getSDFSymbol=function(a){a=a.markerGraphics;if(!a||1!==a.length)return null;a=a[0];if(!a)return null;a=a.symbol;return!a||"CIMPolygonSymbol"!==a.type&&"CIMLineSymbol"!==a.type?null:a};b.getExtent=function(b){return b?b.rings?g(b.rings):b.paths?g(b.paths):a.isExtent(b)?[b.xmin,b.ymin,b.xmax,b.ymax]:null:null};b.getSDFMetrics=function(a,c,b,e,g){var d=a[0],f=a[1],h=a[2];a=a[3];if(h<d||a<f)return[0,0,0];
var n=h-d,k=a-f,h=Math.floor(31.5);a=(128-2*(h+1))/Math.max(n,k);var n=Math.round(n*a),k=Math.round(k*a)+2*h,l=1;c&&(l=k/a/(c.ymax-c.ymin));var m=0,x=0;e&&(g?c&&b&&0<c.ymax-c.ymin&&(m=e.x/((c.xmax-c.xmin)/(c.ymax-c.ymin)*b),x=e.y/b):(m=e.x,x=e.y));m=.5*(c.xmax+c.xmin)+m*(c.xmax-c.xmin);x=.5*(c.ymax+c.ymin)+x*(c.ymax-c.ymin);m=(m-d)*a+h;x=(x-f)*a+h;return[l,m/(n+2*h)-.5,-(x/k-.5)]};b.buildSDF=function(a){var c,b=a.geom;c=b?b.rings?b.rings:b.paths?b.paths:void 0!==b.xmin&&void 0!==b.ymin&&void 0!==
b.xmax&&void 0!==b.ymax?[[[b.xmin,b.ymin],[b.xmin,b.ymax],[b.xmax,b.ymax],[b.xmax,b.ymin],[b.xmin,b.ymin]]]:null:null;var f,b=Infinity,e=-Infinity,g=Infinity,k=-Infinity;for(f=0;f<c.length;f++)for(var t=0,v=c[f];t<v.length;t++){var q=v[t];q[0]<b&&(b=q[0]);q[0]>e&&(e=q[0]);q[1]<g&&(g=q[1]);q[1]>k&&(k=q[1])}f=new l.default(b,g,e-b,k-g);g=Math.floor(31.5);t=(128-2*(g+1))/Math.max(f.width,f.height);b=Math.round(f.width*t)+2*g;e=Math.round(f.height*t)+2*g;k=[];for(v=0;v<c.length;v++){var w=c[v];if(w&&
1<w.length){for(var q=[],u=0;u<w.length;u++){var x=w[u],y=x[0],x=x[1],y=y-f.x,x=x-f.y,y=y*t,x=x*t,y=y+(g-.5),x=x+(g-.5);q.push([y,x])}a.asFill&&(u=q.length-1,q[0][0]===q[u][0]&&q[0][1]===q[u][1]||q.push(q[0]));k.push(q)}}f=b*e;c=Array(f);v=g*g+1;for(t=0;t<f;++t)c[t]=v;for(v=0;v<k.length;v++)for(q=k[v],u=q.length,t=1;t<u;++t){var w=q[t-1],y=q[t],z=void 0,x=void 0;w[0]<y[0]?(z=w[0],x=y[0]):(z=y[0],x=w[0]);var A=void 0,C=void 0;w[1]<y[1]?(A=w[1],C=y[1]):(A=y[1],C=w[1]);var B=Math.floor(z)-g,x=Math.floor(x)+
g,A=Math.floor(A)-g,C=Math.floor(C)+g;0>B&&(B=0);x>b&&(x=b);0>A&&(A=0);C>e&&(C=e);for(var z=y[0]-w[0],E=y[1]-w[1],D=z*z+E*E;B<x;B++)for(var I=A;I<C;I++){var J=(B-w[0])*z+(I-w[1])*E,F=void 0,G=void 0;0>J?(F=w[0],G=w[1]):J>D?(F=y[0],G=y[1]):(J/=D,F=w[0]+J*z,G=w[1]+J*E);J=(B-F)*(B-F)+(I-G)*(I-G);F=(e-I-1)*b+B;J<c[F]&&(c[F]=J)}}for(t=0;t<f;++t)c[t]=Math.sqrt(c[t]);if(a.asFill)for(a=0;a<k.length;a++)for(f=k[a],t=f.length,v=1;v<t;++v)for(q=f[v-1],u=f[v],y=w=void 0,q[0]<u[0]?(w=q[0],y=u[0]):(w=u[0],y=q[0]),
x=A=void 0,q[1]<u[1]?(A=q[1],x=u[1]):(A=u[1],x=q[1]),w=Math.floor(w),y=Math.floor(y)+1,A=Math.floor(A),x=Math.floor(x)+1,w<g&&(w=g),y>b-g&&(y=b-g),A<g&&(A=g),x>e-g&&(x=e-g);A<x;++A)if(q[1]>A!==u[1]>A){C=(e-A-1)*b;for(z=w;z<y;++z)z<(u[0]-q[0])*(A-q[1])/(u[1]-q[1])+q[0]&&(c[C+z]=-c[C+z]);for(z=g;z<w;++z)c[C+z]=-c[C+z]}g*=2;k=c.length;a=new Uint8Array(4*k);for(f=0;f<k;++f)m.packFloatRGBA(.5-c[f]/g,a,4*f);return[a,b,e]}})},"esri/symbols/cim/utils":function(){define(["require","exports"],function(e,b){function a(a,
b){"string"!==typeof a&&(a=String(a));switch(b){case "LowerCase":return a.toLowerCase();case "Allcaps":return a.toUpperCase();default:return a}}Object.defineProperty(b,"__esModule",{value:!0});b.evaluateValueOrFunction=function(a,b,e,g){return"function"===typeof a?a(b,e,g):a};b.colorToArray=function(a){return[a.r,a.g,a.b,a.a]};b.createLabelOverrideFunction=function(b,e,k){var g=function(a){for(var c=a.length;c--;)if(-1===" /-,\n".indexOf(a.charAt(c)))return!1;return!0},f=[],c=0,d=-1;do d=e.indexOf("[",
c),d>=c&&(d>c&&(c=e.substr(c,d-c),f.push([c,null,g(c)])),c=d+1,d=e.indexOf("]",c),d>=c&&(d>c&&(c=e.substr(c,d-c),(c=b[c])&&f.push([null,c,!1])),c=d+1));while(-1!==d);c<e.length-1&&(c=e.substr(c),f.push([c,null,g(c)]));return function(c){for(var b="",d=null,e=0;e<f.length;e++){var g=f[e],h=g[0],q=g[1],g=g[2];if(h)g?d=h:(d&&(b+=d,d=null),b+=h);else if(h=c.attributes[q])d&&(b+=d,d=null),b+=h}return a(b,k)}};b._adjustTextCase=a;b.resampleHermite=function(a,b,e,g,f,c,d){void 0===d&&(d=!0);var h=b/f;e/=
c;for(var k=Math.ceil(h/2),p=Math.ceil(e/2),l=0;l<c;l++)for(var t=0;t<f;t++){for(var v=4*(t+(d?c-l-1:l)*f),q=0,m=0,u=0,x=0,y=0,z=0,A=0,C=(l+.5)*e,B=Math.floor(l*e);B<(l+1)*e;B++)for(var E=Math.abs(C-(B+.5))/p,D=(t+.5)*h,E=E*E,I=Math.floor(t*h);I<(t+1)*h;I++){var J=Math.abs(D-(I+.5))/k,q=Math.sqrt(E+J*J);-1<=q&&1>=q&&(q=2*q*q*q-3*q*q+1,0<q&&(J=4*(I+B*b),A+=q*a[J+3],u+=q,255>a[J+3]&&(q=q*a[J+3]/250),x+=q*a[J],y+=q*a[J+1],z+=q*a[J+2],m+=q))}g[v]=x/m;g[v+1]=y/m;g[v+2]=z/m;g[v+3]=A/u}};b.fromCIMColor=
function(a){return a?{r:a[0],g:a[1],b:a[2],a:a[3]/255}:{r:0,g:0,b:0,a:0}};b.toCIMSymbolJSON=function(a){var b;return null===(b=a.data)||void 0===b?void 0:b.symbol};b.isCIMMarker=function(a){return"CIMVectorMarker"===a.type||"CIMPictureMarker"===a.type||"CIMBarChartMarker"===a.type||"CIMCharacterMarker"===a.type||"CIMPieChartMarker"===a.type||"CIMStackedBarChartMarker"===a.type};b.isCIMStroke=function(a){return"CIMGradientStroke"===a.type||"CIMPictureStroke"===a.type||"CIMSolidStroke"===a.type};b.isCIMFill=
function(a){return"CIMGradientFill"===a.type||"CIMHatchFill"===a.type||"CIMPictureFill"===a.type||"CIMSolidFill"===a.type||"CIMWaterFill"===a.type};b.isCIMMarkerStrokePlacement=function(a){return"CIMMarkerPlacementAlongLineRandomSize"===a.type||"CIMMarkerPlacementAlongLineSameSize"===a.type||"CIMMarkerPlacementAlongLineVariableSize"===a.type||"CIMMarkerPlacementAtExtremities"===a.type||"CIMMarkerPlacementAtMeasuredUnits"===a.type||"CIMMarkerPlacementAtRatioPositions"===a.type||"CIMMarkerPlacementOnLine"===
a.type||"CIMMarkerPlacementOnVertices"===a.type}})},"esri/views/2d/arcade/utils":function(){define("require exports tslib @dojo/framework/shim/WeakMap ../../../core/Error ../../../core/Logger ../../../geometry/support/quantizationUtils ../../../layers/graphics/featureConversionUtils".split(" "),function(e,b,a,m,l,k,g,f){function c(c,b,f,e){var g=e.transform,h=e.hasZ;e=e.hasM;n.has(c)||n.set(c,d(f));c=n.get(c)(b.geometry,g,h,e);return a.__assign(a.__assign({},b),{geometry:c})}function d(a){var c={};
switch(a){case "esriGeometryPoint":return function(a,b,d,f){return g.hydratePoint(b,c,a,d,f)};case "esriGeometryPolygon":return function(a,b,d,f){return g.hydratePolygon(b,c,a,d,f)};case "esriGeometryPolyline":return function(a,b,d,f){return g.hydratePolyline(b,c,a,d,f)};case "esriGeometryMultipoint":return function(a,b,d,f){return g.hydrateMultipoint(b,c,a,d,f)};default:return h.error(new l("mapview-arcade","Unable to handle geometryType: "+a)),function(a){return a}}}Object.defineProperty(b,"__esModule",
{value:!0});var h=k.getLogger("esri.views.2d.support.arcadeOnDemand");b.callWithOptimizedFeature=function(b,d,e,g,k){var n=g.geometryType,p=g.hasZ;g=g.hasM;d=b.referencesGeometry()?k?c(b,f.convertToFeature(d,n,p,g),n,k):f.convertToFeature(d,n,p,g):d;d=b.repurposeFeature(d);try{return b.evaluate(a.__assign(a.__assign({},e),{$feature:d}))}catch(x){return h.warn("Feature arcade evaluation failed:",x),null}};b.callWithFeature=function(b,d,f,e,g){d=b.referencesGeometry()&&g?c(b,d,e,g):d;d=b.repurposeFeature(d);
try{return b.evaluate(a.__assign(a.__assign({},f),{$feature:d}))}catch(w){return h.warn("Feature arcade evaluation failed:",w),null}};var n=new m.default;b.createHydrateFactory=d})},"esri/geometry/support/quantizationUtils":function(){define(["require","exports","./jsonUtils"],function(e,b,a){function m(a,c){return Math.round((c-a.translate[0])/a.scale[0])}function l(a,c){return Math.round((a.translate[1]-c)/a.scale[1])}function k(a,c,b){for(var d=[],f,e,g,h,k=0;k<b.length;k++){var n=b[k];if(0<k){if(g=
m(a,n[0]),h=l(a,n[1]),g!==f||h!==e)d.push(c(n,g-f,h-e)),f=g,e=h}else f=m(a,n[0]),e=l(a,n[1]),d.push(c(n,f,e))}return 0<d.length?d:null}function g(a,c,b,d){return k(a,b?d?E:B:d?B:C,c)}function f(a,c,b,d){var f=[];b=b?d?E:B:d?B:C;for(d=0;d<c.length;d++){var e=k(a,b,c[d]);e&&3<=e.length&&f.push(e)}return f.length?f:null}function c(a,c,b,d){var f=[];b=b?d?E:B:d?B:C;for(d=0;d<c.length;d++){var e=k(a,b,c[d]);e&&2<=e.length&&f.push(e)}return f.length?f:null}function d(a,c){return c*a.scale[0]+a.translate[0]}
function h(a,c){return a.translate[1]-c*a.scale[1]}function n(a,c,b){var f=Array(b.length);if(!b.length)return f;var e=a.scale,g=e[0],e=e[1],k=d(a,b[0][0]);a=h(a,b[0][1]);f[0]=c(b[0],k,a);for(var n=1;n<b.length;n++){var p=b[n],k=k+p[0]*g;a-=p[1]*e;f[n]=c(p,k,a)}return f}function p(a,c,b){for(var d=Array(b.length),f=0;f<b.length;f++)d[f]=n(a,c,b[f]);return d}function r(a,c,b,d){return n(a,b?d?E:B:d?B:C,c)}function t(a,c,b,d){return p(a,b?d?E:B:d?B:C,c)}function v(a,c,b,d){return p(a,b?d?E:B:d?B:C,
c)}function q(a,c,b){var d=b[0],f=d[0],d=d[1],e=Math.min(f,c[0]),g=Math.min(d,c[1]),h=Math.max(f,c[2]);c=Math.max(d,c[3]);for(var k=1;k<b.length;k++){var n=b[k],p=n[0],n=n[1],f=f+p,d=d+n;0>p&&(e=Math.min(e,f));0<p&&(h=Math.max(h,f));0>n?g=Math.min(g,d):0<n&&(c=Math.max(c,d))}a[0]=e;a[1]=g;a[2]=h;a[3]=c;return a}function w(a,c){if(!c.length)return null;a[0]=a[1]=Number.POSITIVE_INFINITY;a[2]=a[3]=Number.NEGATIVE_INFINITY;for(var b=0;b<c.length;b++)q(a,a,c[b]);return a}function u(a,c,b,d,f){c.xmin=
m(a,b.xmin);c.ymin=l(a,b.ymin);c.xmax=m(a,b.xmax);c.ymax=l(a,b.ymax);c!==b&&(d&&(c.zmin=b.zmin,c.zmax=b.zmax),f&&(c.mmin=b.mmin,c.mmax=b.mmax));return c}function x(a,c,b,d,f){c.points=g(a,b.points,d,f);return c}function y(a,c,b,d,f){c.x=m(a,b.x);c.y=l(a,b.y);c!==b&&(d&&(c.z=b.z),f&&(c.m=b.m));return c}function z(a,c,b,d,e){a=f(a,b.rings,d,e);if(!a)return null;c.rings=a;return c}function A(a,b,d,f,e){a=c(a,d.paths,f,e);if(!a)return null;b.paths=a;return b}Object.defineProperty(b,"__esModule",{value:!0});
var C=function(a,c,b){return[c,b]},B=function(a,c,b){return[c,b,a[2]]},E=function(a,c,b){return[c,b,a[2],a[3]]};b.toQuantizationTransform=function(a){return a?{originPosition:"upper-left"===a.originPosition?"upperLeft":"lower-left"===a.originPosition?"lowerLeft":a.originPosition,scale:[a.tolerance,a.tolerance],translate:[a.extent.xmin,a.extent.ymax]}:null};b.equals=function(a,c){if(a===c||null==a&&null==c)return!0;if(null==a||null==c)return!1;var b,d,f,e;a&&"upperLeft"===a.originPosition?(b=a.translate[0],
d=a.translate[1],a=a.scale[0]):(b=a.extent.xmin,d=a.extent.ymax,a=a.tolerance);c&&"upperLeft"===c.originPosition?(f=c.translate[0],e=c.translate[1],c=c.scale[0]):(f=c.extent.xmin,e=c.extent.ymax,c=c.tolerance);return b===f&&d===e&&a===c};b.quantizeX=m;b.quantizeY=l;b.quantizeBounds=function(a,c,b){c[0]=m(a,b[0]);c[3]=l(a,b[1]);c[2]=m(a,b[2]);c[1]=l(a,b[3]);return c};b.quantizePoints=g;b.quantizeRings=f;b.quantizePaths=c;b.hydrateX=d;b.hydrateY=h;b.hydrateCoordsArray=n;b.hydrateCoordsArrayArray=p;
b.hydrateBounds=function(a,c,b){return b?(c[0]=d(a,b[0]),c[1]=h(a,b[3]),c[2]=d(a,b[2]),c[3]=h(a,b[1]),c):[d(a,c[0]),h(a,c[3]),d(a,c[2]),h(a,c[1])]};b.hydratePoints=r;b.hydratePaths=t;b.hydrateRings=v;b.getQuantizedBoundsCoordsArray=q;b.getQuantizedBoundsCoordsArrayArray=w;b.getQuantizedBoundsPoints=function(a){var c=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];return q(c,c,a)};b.getQuantizedBoundsPaths=function(a){return w([0,0,0,0],a)};b.getQuantizedBoundsRings=
function(a){return w([0,0,0,0],a)};b.quantizeExtent=u;b.quantizeMultipoint=x;b.quantizePoint=y;b.quantizePolygon=z;b.quantizePolyline=A;b.quantizeGeometry=function(c,b){return c&&b?a.isPoint(b)?y(c,{},b,!1,!1):a.isPolyline(b)?A(c,{},b,!1,!1):a.isPolygon(b)?z(c,{},b,!1,!1):a.isMultipoint(b)?x(c,{},b,!1,!1):a.isExtent(b)?u(c,{},b,!1,!1):null:null};b.hydrateExtent=function(a,c,b,f,e){c.xmin=d(a,b.xmin);c.ymin=h(a,b.ymin);c.xmax=d(a,b.xmax);c.ymax=h(a,b.ymax);c!==b&&(f&&(c.zmin=b.zmin,c.zmax=b.zmax),
e&&(c.mmin=b.mmin,c.mmax=b.mmax));return c};b.hydrateMultipoint=function(a,c,b,d,f){c.points=r(a,b.points,d,f);return c};b.hydratePoint=function(a,c,b,f,e){c.x=d(a,b.x);c.y=h(a,b.y);c!==b&&(f&&(c.z=b.z),e&&(c.m=b.m));return c};b.hydratePolygon=function(a,c,b,d,f){c.rings=v(a,b.rings,d,f);return c};b.hydratePolyline=function(a,c,b,d,f){c.paths=t(a,b.paths,d,f);return c}})},"esri/layers/graphics/featureConversionUtils":function(){define("require exports ../../core/Error ../../core/Logger ../../geometry/support/jsonUtils ./OptimizedFeature ./OptimizedFeatureSet ./OptimizedGeometry".split(" "),
function(e,b,a,m,l,k,g,f){function c(a,c){return a?c?4:3:c?3:2}function d(a,c,b,d){if(a){if(b)return c&&d?W:T;if(c&&d)return U}else if(c&&d)return T;return Z}function h(a,c){return Math.round((c-a.translate[0])/a.scale[0])}function n(a,c){return Math.round((a.translate[1]-c)/a.scale[1])}function p(a,c){return c*a.scale[0]+a.translate[0]}function r(a,c){return a.translate[1]-c*a.scale[1]}function t(a){a=a.coords;return{x:a[0],y:a[1]}}function v(a,c){a.coords[0]=c.x;a.coords[1]=c.y;return a}function q(a){a=
a.coords;return{x:a[0],y:a[1],z:a[2]}}function w(a,c){a.coords[0]=c.x;a.coords[1]=c.y;a.coords[2]=c.z;return a}function u(a){a=a.coords;return{x:a[0],y:a[1],m:a[2]}}function x(a,c){a.coords[0]=c.x;a.coords[1]=c.y;a.coords[2]=c.m;return a}function y(a){a=a.coords;return{x:a[0],y:a[1],z:a[2],m:a[3]}}function z(a,c){a.coords[0]=c.x;a.coords[1]=c.y;a.coords[2]=c.z;a.coords[3]=c.m;return a}function A(a,c){return a&&c?z:a?w:c?x:v}function C(a,b,d){if(!a)return null;for(var f=c(b,d),e=[],g=0;g<a.coords.length;g+=
f){for(var h=[],k=0;k<f;k++)h.push(a.coords[g+k]);e.push(h)}return b?d?{points:e,hasZ:b,hasM:d}:{points:e,hasZ:b}:d?{points:e,hasM:d}:{points:e}}function B(a,b,d){void 0===d&&(d=c(b.hasZ,b.hasM));a.lengths[0]=b.points.length;var f=a.coords,e=0,g=0;for(b=b.points;g<b.length;g++)for(var h=b[g],k=0;k<d;k++)f[e++]=h[k];return a}function E(a,b,d){if(!a)return null;var f=c(b,d),e=a.coords,g=[],h=0,k=0;for(a=a.lengths;k<a.length;k++){for(var n=a[k],p=[],q=0;q<n;q++){for(var l=[],t=0;t<f;t++)l.push(e[h++]);
p.push(l)}g.push(p)}return b?d?{paths:g,hasZ:b,hasM:d}:{paths:g,hasZ:b}:d?{paths:g,hasM:d}:{paths:g}}function D(a,b,d){void 0===d&&(d=c(b.hasZ,b.hasM));var f=a.lengths,e=a.coords,g=0,h=0;for(b=b.paths;h<b.length;h++){for(var k=b[h],n=0,p=k;n<p.length;n++)for(var q=p[n],l=0;l<d;l++)e[g++]=q[l];f.push(k.length)}return a}function I(a,b,d){if(!a)return null;var f=c(b,d),e=a.coords,g=[],h=0,k=0;for(a=a.lengths;k<a.length;k++){for(var n=a[k],p=[],q=0;q<n;q++){for(var l=[],t=0;t<f;t++)l.push(e[h++]);p.push(l)}g.push(p)}return b?
d?{rings:g,hasZ:b,hasM:d}:{rings:g,hasZ:b}:d?{rings:g,hasM:d}:{rings:g}}function J(a,c,b,d){void 0===b&&(b=c.hasZ);void 0===d&&(d=c.hasM);F(a,c.rings,b,d);return a}function F(a,b,d,f){d=c(d,f);f=a.lengths;for(var e=a.coords,g=0,h=f.length=e.length=0;h<b.length;h++){for(var k=b[h],n=0,p=k;n<p.length;n++)for(var q=p[n],l=0;l<d;l++)e[g++]=q[l];f.push(k.length)}return a}function G(b,d,e,g,h,n){b.length=0;if(!e){for(g=0;g<d.length;g++)h=d[g],b.push(new k.default(null,h.attributes,null,h.attributes[n]));
return b}switch(e){case "esriGeometryPoint":g=A(g,h);for(h=0;h<d.length;h++){var p=d[h];e=p.geometry;var p=p.attributes,q=void 0;e&&(q=g(new f.default,e));b.push(new k.default(q,p,null,p[n]))}break;case "esriGeometryMultipoint":g=c(g,h);for(h=0;h<d.length;h++)p=d[h],e=p.geometry,p=p.attributes,q=void 0,e&&(q=B(new f.default,e,g)),b.push(new k.default(q,p,null,p[n]));break;case "esriGeometryPolyline":g=c(g,h);for(h=0;h<d.length;h++)p=d[h],e=p.geometry,p=p.attributes,q=void 0,e&&(q=D(new f.default,
e,g)),b.push(new k.default(q,p,null,p[n]));break;case "esriGeometryPolygon":for(e=0;e<d.length;e++){var l=d[e],p=l.geometry,q=l.centroid,l=l.attributes,t=void 0;p&&(t=J(new f.default,p,g,h));q?b.push(new k.default(t,l,v(new f.default,q),l[n])):b.push(new k.default(t,l,null,l[n]))}break;default:Q.error("convertToFeatureSet:unknown-geometry",new a("Unable to parse unknown geometry type '"+e+"'")),b.length=0}return b}function K(c,b,d,f,e){c.length=0;switch(d){case "esriGeometryPoint":d=t;f&&e?d=y:f?
d=q:e&&(d=u);for(f=0;f<b.length;f++){var g=b[f];e=g.geometry;g=g.attributes;e=e?d(e):null;c.push({attributes:g,geometry:e})}break;case "esriGeometryMultipoint":for(d=0;d<b.length;d++){var h=b[d],g=h.geometry,h=h.attributes,k=void 0;g&&(k=C(g,f,e));c.push({attributes:h,geometry:k})}break;case "esriGeometryPolyline":for(d=0;d<b.length;d++)h=b[d],g=h.geometry,h=h.attributes,k=void 0,g&&(k=E(g,f,e)),c.push({attributes:h,geometry:k});break;case "esriGeometryPolygon":for(d=0;d<b.length;d++){var k=b[d],
h=k.geometry,g=k.attributes,n=k.centroid,k=void 0;h&&(k=I(h,f,e));n?(h=t(n),c.push({attributes:g,centroid:h,geometry:k})):c.push({attributes:g,geometry:k})}break;default:Q.error("convertToFeatureSet:unknown-geometry",new a("Unable to parse unknown geometry type '"+d+"'"))}return c}function L(a,b,f,e,g,k,p,q){void 0===p&&(p=f);void 0===q&&(q=e);a.lengths.length&&(a.lengths.length=0);a.coords.length&&(a.coords.length=0);if(!b||!b.coords.length)return null;g=N[g];var l=b.coords;b=b.lengths;var t=c(f,
e),v=c(f&&p,e&&q);f=d(f,e,p,q);if(!b.length)return f(a.coords,l,0,0,h(k,l[0]),n(k,l[1])),a.lengths.length&&(a.lengths.length=0),a.coords.length=t,a;for(var m,u=0,r,w=0,x=0;x<b.length;x++){var B=b[x];if(!(B<g)){var z=0;r=w;q=e=h(k,l[u]);m=p=n(k,l[u+1]);f(a.coords,l,r,u,q,m);z++;u+=t;r+=v;for(var C=1;C<B;C++,u+=t)if(q=h(k,l[u]),m=n(k,l[u+1]),q!==e||m!==p)f(a.coords,l,r,u,q-e,m-p),r+=v,z++,e=q,p=m;z>=g&&(a.lengths.push(z),w=r)}}a.coords.length=w;return a.coords.length?a:null}function H(a,c,b,d,f,e,g){for(var h=
d,k=0,n,p=e+b;p<g;p+=b){n=c[p];var q=c[p+1],l=c[g],t=c[g+1],v=c[e],m=c[e+1],u=l-v,r=t-m;if(0!==u||0!==r){var w=((n-v)*u+(q-m)*r)/(u*u+r*r);1<w?(v=l,m=t):0<w&&(v+=u*w,m+=r*w)}u=n-v;r=q-m;n=u*u+r*r;n>h&&(k=p,h=n)}h>d&&(k-e>b&&H(a,c,b,d,f,e,k),f(a,c,a.length,k,c[k],c[k+1]),g-k>b&&H(a,c,b,d,f,k,g))}function M(a,b,d,f,e){var g=b.coords,h=b.lengths,k=d?f?W:T:f?T:Z;d=c(d,f);if(!g.length)return a!==b&&(a.lengths.length=0,a.coords.length=0),a;if(!h.length)return k(a.coords,g,0,0,p(e,g[0]),r(e,g[1])),a!==b&&
(a.lengths.length=0,a.coords.length=d),a;var n=e.scale;f=n[0];for(var n=n[1],q=0,l=0;l<h.length;l++){var t=h[l];a.lengths[l]=t;var v=p(e,g[q]),m=r(e,g[q+1]);k(a.coords,g,q,q,v,m);for(var q=q+d,u=1;u<t;u++,q+=d)v+=g[q]*f,m-=g[q+1]*n,k(a.coords,g,q,q,v,m)}a!==b&&(a.lengths.length=h.length,a.coords.length=g.length);return a}Object.defineProperty(b,"__esModule",{value:!0});var Q=m.getLogger("esri.tasks.support.optimizedFeatureSet"),N={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0},
Z=function(a,c,b,d,f,e){a[b]=f;a[b+1]=e},T=function(a,c,b,d,f,e){a[b]=f;a[b+1]=e;a[b+2]=c[d+2]},U=function(a,c,b,d,f,e){a[b]=f;a[b+1]=e;a[b+2]=c[d+3]},W=function(a,c,b,d,f,e){a[b]=f;a[b+1]=e;a[b+2]=c[d+2];a[b+3]=c[d+3]};b.quantizeX=h;b.quantizeY=n;b.hydrateX=p;b.hydrateY=r;b.convertToPoint=function(a,c,b){return a?c?b?y(a):q(a):b?u(a):t(a):null};b.convertFromPoint=function(a,c,b){void 0===b&&(b=A(null!=c.z,null!=c.m));return b(a,c)};b.convertToMultipoint=C;b.convertFromMultipoint=B;b.convertToPolyline=
E;b.convertFromPolyline=D;b.convertToPolygon=I;b.convertFromPolygon=J;b.convertFromNestedArray=F;var da=[],Y=[];b.convertFromFeature=function(a,c,b,d,f){da[0]=a;a=G(Y,da,c,b,d,f)[0];da.length=Y.length=0;return a};b.convertFromFeatures=G;b.convertToFeature=function(a,c,b,d){Y[0]=a;K(da,Y,c,b,d);a=da[0];da.length=Y.length=0;return a};b.convertFromGeometry=function(b,d,e){if(!b)return null;var g=new f.default;"hasZ"in b&&null==d&&(d=b.hasZ);"hasM"in b&&null==e&&(e=b.hasM);if(l.isPoint(b))return A(null!=
d?d:null!=b.z,null!=e?e:null!=b.m)(g,b);if(l.isPolygon(b))return J(g,b,d,e);if(l.isPolyline(b))return D(g,b,c(d,e));if(l.isMultipoint(b))return B(g,b,c(d,e));Q.error("convertFromGeometry:unknown-geometry",new a("Unable to parse unknown geometry type '"+b+"'"))};b.convertToGeometry=function(c,b,d,f){c=c&&("coords"in c?c:c.geometry);if(!c)return null;switch(b){case "esriGeometryPoint":return b=t,d&&f?b=y:d?b=q:f&&(b=u),b(c);case "esriGeometryMultipoint":return C(c,d,f);case "esriGeometryPolyline":return E(c,
d,f);case "esriGeometryPolygon":return I(c,d,f);default:Q.error("convertToGeometry:unknown-geometry",new a("Unable to parse unknown geometry type '"+b+"'"))}};b.convertToFeatures=K;b.convertToFeatureSet=function(a){var c=a.objectIdFieldName,b=a.spatialReference,d=a.transform,f=a.fields,e=a.hasM,g=a.hasZ,h=a.geometryType,k=a.exceededTransferLimit;a={features:K([],a.features,h,g,e),fields:f,geometryType:h,objectIdFieldName:c,spatialReference:b};d&&(a.transform=d);k&&(a.exceededTransferLimit=k);e&&(a.hasM=
e);g&&(a.hasZ=g);return a};b.convertFromFeatureSet=function(c,b){var d=new g.default,f=c.hasM,e=c.hasZ,h=c.features,k=c.objectIdFieldName,n=c.spatialReference,p=c.geometryType,q=c.exceededTransferLimit,l=c.transform;d.fields=c.fields;d.geometryType=p;d.objectIdFieldName=k||b;d.spatialReference=n;if(!d.objectIdFieldName)return Q.error(new a("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),d;h&&G(d.features,h,p,e,f,d.objectIdFieldName);q&&(d.exceededTransferLimit=q);f&&
(d.hasM=f);e&&(d.hasZ=e);l&&(d.transform=l);return d};b.hydrateOptimizedFeatureSet=function(a){var c=a.transform,b=a.hasM,d=a.hasZ;if(!c)return a;for(var f=0,e=a.features;f<e.length;f++){var g=e[f];g.geometry&&M(g.geometry,g.geometry,b,d,c);g.centroid&&M(g.centroid,g.centroid,b,d,c)}a.transform=null;return a};b.quantizeOptimizedFeatureSet=function(a,c){var b=c.geometryType,d=c.features,e=c.hasM,g=c.hasZ;if(!a)return c;for(var h=0;h<d.length;h++){var n=d[h],p=new k.default(new f.default,n.attributes);
L(p.geometry,n.geometry,e,g,b,a);n.centroid&&(p.centroid=new f.default,L(p.centroid,n.centroid,e,g,"esriGeometryPoint",a));d[h]=p}c.transform=a;return c};b.quantizeOptimizedGeometry=L;b.generalizeOptimizedGeometry=function(a,b,f,e,g,h,k,n){void 0===k&&(k=f);void 0===n&&(n=e);a.lengths.length&&(a.lengths.length=0);a.coords.length&&(a.coords.length=0);if(!b||!b.coords.length)return null;g=N[g];var p=b.coords;b=b.lengths;var q=c(f,e),l=c(f&&k,e&&n);f=d(f,e,k,n);if(!b.length)return f(a.coords,p,0,0,p[0],
p[1]),a.lengths.length&&(a.lengths.length=0),a.coords.length=q,a;e=0;h*=h;for(k=0;k<b.length;k++){n=b[k];if(!(n<g)){var t=a.coords.length/l,v=e,m=e+(n-1)*q;f(a.coords,p,a.coords.length,v,p[v],p[v+1]);H(a.coords,p,q,h,f,v,m);f(a.coords,p,a.coords.length,m,p[m],p[m+1]);v=a.coords.length/l-t;v>=g?a.lengths.push(v):a.coords.length=t*l}e+=n*q}return a.coords.length?a:null};b.getBoundsOptimizedGeometry=function(a,b,d,f){d=c(d,f);var e=f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;
if(b&&b.coords){b=b.coords;for(var k=0;k<b.length;k+=d){var n=b[k],p=b[k+1];f=Math.min(f,n);g=Math.max(g,n);e=Math.min(e,p);h=Math.max(h,p)}}a[0]=f;a[1]=e;a[2]=g;a[3]=h;return a};b.getQuantizedBoundsOptimizedGeometry=function(a,b,d,f){d=c(d,f);f=b.coords;var e=Number.POSITIVE_INFINITY,g=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,k=Number.NEGATIVE_INFINITY,n=0,p=0;for(b=b.lengths;p<b.length;p++)for(var q=b[p],l=f[n],t=f[n+1],e=Math.min(l,e),g=Math.min(t,g),h=Math.max(l,h),k=Math.max(t,k),
n=n+d,v=1;v<q;v++,n+=d){var m=f[n],u=f[n+1],l=l+m,t=t+u;0>m&&(e=Math.min(e,l));0<m&&(h=Math.max(h,l));0>u?g=Math.min(g,t):0<u&&(k=Math.max(k,t))}a[0]=e;a[1]=g;a[2]=h;a[3]=k;return a};b.hydrateOptimizedGeometry=M;b.removeZMValues=function(a,b,f,e,g,h){var k,n=c(f,e);f=d(f,e,g,h);e=b.coords;a.coords.length=0;a.lengths.length=0;(k=a.lengths).push.apply(k,b.lengths);for(b=0;b<e.length;b+=n)f(a.coords,e,a.coords.length,b,e[b],e[b+1]);return a};b.removeCollinearVectices=function(a,b,f,e,g){if(!b||!b.coords||
!b.coords.length)return null;f=N[f];var h=b.coords;b=b.lengths;var k=d(e,g,e,g);e=c(e,g);for(var n=g=0,p=0,q=0,l=0;l<b.length;l++){var t=b[l],n=q;k(a.coords,h,n,g,h[g],h[g+1]);g+=e;var v=h[g],m=h[g+1],u=v,r=m,w=m/v,n=n+e;k(a.coords,h,n,g,u,r);g+=e;for(var x=2;x<t;x++){var v=h[g],m=h[g+1],B=m/v,z=w===B||!isFinite(w)&&!isFinite(B),w=z&&isFinite(B)?0<=w&&0<=B||0>=w&&0>=B:0<=r&&0<=m||0>=r&&0>=m;z&&w?(u+=v,r+=m):(u=v,r=m,n+=e);k(a.coords,h,n,g,u,r);g+=e;w=B}n+=e;t=(n-q)/e;t>=f&&(a.lengths[p]=t,q=n,p++)}a.coords.length>
q&&(a.coords.length=q);a.lengths.length>p&&(a.lengths.length=p);return a.coords.length&&a.lengths.length?a:null}})},"esri/layers/graphics/OptimizedFeature":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){return function(a,b,e,k){void 0===a&&(a=null);void 0===b&&(b={});this.localId=0;this.geohashIndexed=!1;this.geohashY=this.geohashX=0;this.geometry=a;b&&(this.attributes=b);e&&(this.centroid=e);null!=k&&(this.objectId=k)}}();b.default=
e})},"esri/layers/graphics/OptimizedFeatureSet":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){return function(){this.spatialReference=this.geometryType=this.geometryProperties=this.geohashFieldName=this.globalIdFieldName=this.objectIdFieldName=null;this.hasM=this.hasZ=!1;this.features=[];this.fields=[];this.transform=null;this.exceededTransferLimit=!1}}();b.default=e})},"esri/layers/graphics/OptimizedGeometry":function(){define(["require",
"exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});e=function(){return function(a,b){void 0===a&&(a=[]);void 0===b&&(b=[]);this.lengths=a;this.coords=b}}();b.default=e})},"esri/symbols/ExtrudeSymbol3DLayer":function(){define("require exports tslib ../core/maybe ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils ./support/Symbol3DMaterial".split(" "),function(e,b,a,m,l,k,g,f){return function(c){function b(a){a=c.call(this,a)||this;a.type="extrude";a.size=void 0;
a.material=null;a.castShadows=!0;a.edges=null;return a}a.__extends(b,c);e=b;b.prototype.clone=function(){return new e({edges:this.edges&&this.edges.clone(),enabled:this.enabled,material:m.isSome(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size})};var e;a.__decorate([l.enumeration({Extrude:"extrude"})],b.prototype,"type",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],b.prototype,"size",void 0);a.__decorate([l.property({type:f.default,json:{write:!0}})],
b.prototype,"material",void 0);a.__decorate([l.property({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],b.prototype,"castShadows",void 0);a.__decorate([l.property(g.symbol3dEdgesProperty)],b.prototype,"edges",void 0);return b=e=a.__decorate([l.subclass("esri.symbols.ExtrudeSymbol3DLayer")],b)}(k)})},"esri/symbols/Symbol3DLayer":function(){define("require exports tslib ../core/jsonMap ../core/JSONSupport ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){var g=m.strict()({Icon:"icon",
Object:"object",Line:"line",Path:"path",Fill:"fill",Extrude:"extrude",Text:"text",Water:"water"});e=function(b){function c(a){a=b.call(this,a)||this;a.enabled=!0;a.type=null;return a}a.__extends(c,b);c.prototype.writeEnabled=function(a,c,b){a||(c[b]=a)};a.__decorate([k.property({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],c.prototype,"enabled",void 0);a.__decorate([k.writer("enabled")],c.prototype,"writeEnabled",null);a.__decorate([k.property({type:g.apiValues,readOnly:!0,
json:{read:!1,write:{ignoreOrigin:!0,writer:g.write}}})],c.prototype,"type",void 0);return c=a.__decorate([k.subclass("esri.symbols.Symbol3DLayer")],c)}(l.JSONSupport);(e||(e={})).typeJSONDictionary=g;return e})},"esri/symbols/edges/utils":function(){define(["require","exports","./Edges3D","./SketchEdges3D","./SolidEdges3D"],function(e,b,a,m,l){function k(a,b,c){if(!a)return a;switch(a.type){case "solid":return b=new l,b.read(a,c),b;case "sketch":return b=new m,b.read(a,c),b}}Object.defineProperty(b,
"__esModule",{value:!0});b.read=k;b.symbol3dEdgesProperty={types:{key:"type",base:a,typeMap:{solid:l,sketch:m}},json:{read:k,write:!0}}})},"esri/symbols/edges/Edges3D":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=b.call(this,a)||this;a.color=new m([0,0,0,1]);a.extensionLength=0;a.size=g.px2pt(1);
return a}a.__extends(d,b);d.prototype.normalizeCtorArgs=function(c){c&&c.type&&(c=a.__assign({},c),delete c.type);return c};d.prototype.clone=function(){};d.prototype.cloneProperties=function(){return{color:k.clone(this.color),size:this.size,extensionLength:this.extensionLength}};a.__decorate([f.property({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],d.prototype,"type",void 0);a.__decorate([f.property(c.colorAndTransparencyProperty)],d.prototype,"color",void 0);a.__decorate([f.property(a.__assign(a.__assign({},
c.screenSizeProperty),{json:{write:{overridePolicy:function(a){return{enabled:!!a}}}}}))],d.prototype,"extensionLength",void 0);a.__decorate([f.property(c.screenSizeProperty)],d.prototype,"size",void 0);return d=a.__decorate([f.subclass("esri.symbols.edges.Edges3D")],d)}(l.JSONSupport)})},"esri/symbols/support/materialUtils":function(){define("require exports ../../Color ../../core/screenUtils ../../core/accessorSupport/ensureType ../../webdoc/support/opacityUtils".split(" "),function(e,b,a,m,l,k){Object.defineProperty(b,
"__esModule",{value:!0});b.colorAndTransparencyProperty={type:a,json:{type:[l.Integer],default:null,read:{source:["color","transparency"],reader:function(b,f){b=null!=f.transparency?k.transparencyToOpacity(f.transparency):1;return(f=f.color)&&Array.isArray(f)?new a([f[0]||0,f[1]||0,f[2]||0,b]):null}},write:{target:{color:{type:[l.Integer]},transparency:{type:l.Integer}},writer:function(a,b){b.color=a.toJSON().slice(0,3);a=k.opacityToTransparency(a.a);0!==a&&(b.transparency=a)}}}};b.screenSizeProperty=
{type:Number,cast:m.toPt,json:{write:!0}};b.stipplePatternProperty={type:[Number],cast:function(a){return null!=a?a:Array.isArray(a)?a.map(m.toPt):null},json:{read:!1,write:!1}}})},"esri/symbols/edges/SketchEdges3D":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Edges3D"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="sketch";return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f(this.cloneProperties())};
var f;a.__decorate([m.property({type:["sketch"]})],e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.symbols.edges.SketchEdges3D")],e)}(l)})},"esri/symbols/edges/SolidEdges3D":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./Edges3D"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="solid";return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f(this.cloneProperties())};var f;a.__decorate([m.property({type:["solid"]})],
e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.symbols.support.SolidEdges3D")],e)}(l)})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports tslib ../../core/JSONSupport ../../core/maybe ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.color=null;return a}a.__extends(c,b);d=c;c.prototype.clone=
function(){return new d({color:l.isSome(this.color)?this.color.clone():null})};var d;a.__decorate([k.property(g.colorAndTransparencyProperty)],c.prototype,"color",void 0);return c=d=a.__decorate([k.subclass("esri.symbols.support.Symbol3DMaterial")],c)}(m.JSONSupport);b.Symbol3DMaterial=e;b.default=e})},"esri/symbols/FillSymbol":function(){define("require exports tslib ../core/jsonMap ../core/accessorSupport/decorators ./SimpleLineSymbol ./Symbol".split(" "),function(e,b,a,m,l,k,g){var f=new m.default({esriSFS:"simple-fill",
esriPFS:"picture-fill"});return function(c){function b(a){a=c.call(this,a)||this;a.outline=null;a.type=null;return a}a.__extends(b,c);b.prototype.hash=function(){return this.type+"."+(this.outline&&this.outline.hash())};a.__decorate([l.property({type:k,json:{default:null,write:!0}})],b.prototype,"outline",void 0);a.__decorate([l.property({type:f.apiValues,readOnly:!0,json:{type:f.jsonValues}})],b.prototype,"type",void 0);return b=a.__decorate([l.subclass("esri.symbols.FillSymbol")],b)}(g)})},"esri/symbols/SimpleLineSymbol":function(){define("require exports tslib ../core/jsonMap ../core/lang ../core/screenUtils ../core/accessorSupport/decorators ./LineSymbol ./LineSymbolMarker".split(" "),
function(e,b,a,m,l,k,g,f,c){var d=new m.default({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSInsideFrame:"inside-frame",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});return function(b){function f(){for(var a=[],c=0;c<arguments.length;c++)a[c]=
arguments[c];a=b.apply(this,a)||this;a.type="simple-line";a.style="solid";a.cap="round";a.join="round";a.marker=null;a.miterLimit=2;return a}a.__extends(f,b);e=f;f.prototype.normalizeCtorArgs=function(a,c,b,d,f,e){if(a&&"string"!==typeof a)return a;var g={};null!=a&&(g.style=a);null!=c&&(g.color=c);null!=b&&(g.width=k.toPt(b));null!=d&&(g.cap=d);null!=f&&(g.join=f);null!=e&&(g.miterLimit=k.toPt(e));return g};f.prototype.clone=function(){var a;return new e({color:l.clone(this.color),style:this.style,
width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:null===(a=this.marker)||void 0===a?void 0:a.clone()})};f.prototype.hash=function(){var a,c;return b.prototype.hash.call(this)+"."+(null===(a=this.color)||void 0===a?void 0:a.hash())+"."+this.style+"."+this.cap+"."+this.join+"."+this.miterLimit+"."+(null===(c=this.marker)||void 0===c?void 0:c.hash())};var e;a.__decorate([g.enumeration({esriSLS:"simple-line"})],f.prototype,"type",void 0);a.__decorate([g.property({type:d.apiValues,
json:{read:d.read,write:d.write}})],f.prototype,"style",void 0);a.__decorate([g.property({type:["butt","round","square"],json:{write:{overridePolicy:function(a,c,b){return{enabled:"round"!==a&&(null==b||null==b.origin)}}}}})],f.prototype,"cap",void 0);a.__decorate([g.property({type:["miter","round","bevel"],json:{write:{overridePolicy:function(a,c,b){return{enabled:"round"!==a&&(null==b||null==b.origin)}}}}})],f.prototype,"join",void 0);a.__decorate([g.property({type:c,json:{write:!0,origins:{"web-scene":{write:!1}}}})],
f.prototype,"marker",void 0);a.__decorate([g.property({type:Number,json:{read:!1,write:!1}})],f.prototype,"miterLimit",void 0);return f=e=a.__decorate([g.subclass("esri.symbols.SimpleLineSymbol")],f)}(f)})},"esri/symbols/LineSymbol":function(){define("require exports tslib ../core/screenUtils ../core/accessorSupport/decorators ./Symbol".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="simple-line";a.width=.75;return a}a.__extends(f,b);f.prototype.hash=
function(){return this.type+"."+this.width};a.__decorate([l.enumeration({esriSLS:"simple-line"})],f.prototype,"type",void 0);a.__decorate([l.property({type:Number,cast:m.toPt,json:{write:!0}})],f.prototype,"width",void 0);return f=a.__decorate([l.subclass("esri.symbols.LineSymbol")],f)}(k)})},"esri/symbols/LineSymbolMarker":function(){define("require exports tslib ../Color ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=
b.call(this,a)||this;a.placement="begin-end";a.type="line-marker";a.style="arrow";return a}a.__extends(c,b);d=c;c.prototype.writeType=function(a,c,b,d){"web-map"!==(null===d||void 0===d?void 0:d.origin)&&(c[b]=a)};c.prototype.writeStyle=function(a,c,b,d){c[b]="web-map"===(null===d||void 0===d?void 0:d.origin)?"arrow":a};Object.defineProperty(c.prototype,"color",{set:function(a){this._set("color",a)},enumerable:!0,configurable:!0});c.prototype.readColor=function(a){return a&&null!=a[0]?[a[0],a[1],
a[2],a[3]/255]:a};c.prototype.writeColor=function(a,c,b,d){"web-map"!==(null===d||void 0===d?void 0:d.origin)&&(c[b]=a)};c.prototype.clone=function(){return new d({color:k.clone(this.color),placement:this.placement,style:this.style})};c.prototype.hash=function(){var a;return this.placement+"."+(null===(a=this.color)||void 0===a?void 0:a.hash())+"."+this.style};var d;a.__decorate([g.property({type:["begin","end","begin-end"],json:{default:"begin-end",write:!0}})],c.prototype,"placement",void 0);a.__decorate([g.property({type:String,
readOnly:!0})],c.prototype,"type",void 0);a.__decorate([g.writer("type")],c.prototype,"writeType",null);a.__decorate([g.property({type:"arrow circle square diamond cross x".split(" ")})],c.prototype,"style",void 0);a.__decorate([g.writer("style")],c.prototype,"writeStyle",null);a.__decorate([g.property({type:m,value:null,json:{write:{allowNull:!0}}})],c.prototype,"color",null);a.__decorate([g.reader("color")],c.prototype,"readColor",null);a.__decorate([g.writer("color")],c.prototype,"writeColor",
null);return c=d=a.__decorate([g.subclass("esri.symbols.LineSymbolMarker")],c)}(l.JSONSupport)})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports tslib ../core/maybe ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils ./support/colors ./support/Symbol3DFillMaterial ./support/Symbol3DOutline".split(" "),function(e,b,a,m,l,k,g,f,c,d){return function(b){function e(a){a=b.call(this,a)||this;a.type="fill";a.material=null;a.castShadows=!0;a.outline=null;a.edges=null;return a}
a.__extends(e,b);h=e;e.prototype.clone=function(){return new h({edges:m.isSome(this.edges)?this.edges.clone():null,enabled:this.enabled,material:m.isSome(this.material)?this.material.clone():null,castShadows:this.castShadows,outline:m.isSome(this.outline)?this.outline.clone():null})};e.fromSimpleFillSymbol=function(a){return new h({material:{color:(a.color||f.transparentWhite).clone()},outline:a.outline?new d.default({size:a.outline.width||0,color:(a.outline.color||f.white).clone()}):null})};var h;
a.__decorate([l.enumeration({Fill:"fill"})],e.prototype,"type",void 0);a.__decorate([l.property({type:c.default,json:{write:!0}})],e.prototype,"material",void 0);a.__decorate([l.property({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],e.prototype,"castShadows",void 0);a.__decorate([l.property({type:d.default,json:{write:!0}})],e.prototype,"outline",void 0);a.__decorate([l.property(g.symbol3dEdgesProperty)],e.prototype,"edges",void 0);return e=h=a.__decorate([l.subclass("esri.symbols.FillSymbol3DLayer")],
e)}(k)})},"esri/symbols/support/colors":function(){define(["require","exports","../../Color"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.white=new a("white");b.black=new a("black");b.transparentWhite=new a([255,255,255,0]);b.isBlack=function(a){return 0===a.r&&0===a.g&&0===a.b}})},"esri/symbols/support/Symbol3DFillMaterial":function(){define("require exports tslib ../../core/maybe ../../core/accessorSupport/decorators ./Symbol3DMaterial".split(" "),function(e,b,a,m,l,k){Object.defineProperty(b,
"__esModule",{value:!0});e=function(b){function f(){return null!==b&&b.apply(this,arguments)||this}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({color:m.isSome(this.color)?this.color.clone():null,colorMixMode:this.colorMixMode})};var c;a.__decorate([l.enumeration({multiply:"multiply",replace:"replace",tint:"tint"})],f.prototype,"colorMixMode",void 0);return f=c=a.__decorate([l.subclass("esri.symbols.support.Symbol3DFillMaterial")],f)}(k.default);b.Symbol3DFillMaterial=e;b.default=
e})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/maybe ../../core/screenUtils ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new m([0,0,0,1]);a.size=g.px2pt(1);a.stipplePattern=null;a.stippleOffColor=null;return a}a.__extends(d,b);e=d;d.prototype.clone=
function(){return new e({color:k.isSome(this.color)?this.color.clone():null,size:this.size,stipplePattern:this.stipplePattern?this.stipplePattern.slice():null,stippleOffColor:this.stippleOffColor?this.stippleOffColor.clone():null})};var e;a.__decorate([f.property(c.colorAndTransparencyProperty)],d.prototype,"color",void 0);a.__decorate([f.property(c.screenSizeProperty)],d.prototype,"size",void 0);a.__decorate([f.property(c.stipplePatternProperty)],d.prototype,"stipplePattern",void 0);a.__decorate([f.property({type:m})],
d.prototype,"stippleOffColor",void 0);return d=e=a.__decorate([f.subclass("esri.symbols.support.Symbol3DOutline")],d)}(l.JSONSupport);b.Symbol3DOutline=e;b.default=e})},"esri/symbols/Font":function(){define("require exports tslib ../core/JSONSupport ../core/screenUtils ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.decoration="none";a.family="sans-serif";a.size=9;a.style="normal";a.weight="normal";return a}a.__extends(f,
b);c=f;f.prototype.castSize=function(a){return l.toPt(a)};f.prototype.clone=function(){return new c({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})};f.prototype.hash=function(){return this.decoration+"."+this.family+"."+this.size+"."+this.style+"."+this.weight};var c;a.__decorate([k.property({type:["underline","line-through","none"],json:{default:"none",write:!0}})],f.prototype,"decoration",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],
f.prototype,"family",void 0);a.__decorate([k.property({type:Number,json:{write:{overridePolicy:function(a,c,b){return{enabled:!b||!b.textSymbol3D}}}}})],f.prototype,"size",void 0);a.__decorate([k.cast("size")],f.prototype,"castSize",null);a.__decorate([k.property({type:["normal","italic","oblique"],json:{default:"normal",write:!0}})],f.prototype,"style",void 0);a.__decorate([k.property({type:["normal","bold","bolder","lighter"],json:{default:"normal",write:!0}})],f.prototype,"weight",void 0);return f=
c=a.__decorate([k.subclass("esri.symbols.Font")],f)}(m.JSONSupport)})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports tslib ../core/Logger ../core/maybe ../core/urlUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/colors ./support/IconSymbol3DLayerResource ./support/materialUtils ./support/Symbol3DAnchorPosition2D ./support/Symbol3DMaterial ./support/Symbol3DOutline".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p,r){function t(a){var c="width"in a?a.width:a.size,
b="height"in a?a.height:a.size,d=v(a.xoffset);a=v(a.yoffset);return(d||a)&&c&&b?{x:-d/c,y:a/b}:null}function v(a){return isFinite(a)?a:0}var q=m.getLogger("esri.symbols.IconSymbol3DLayer"),w={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};return function(b){function f(a){a=b.call(this,a)||this;a.material=null;a.resource=null;a.type="icon";a.size=12;a.anchor="center";a.anchorPosition=void 0;a.outline=void 0;return a}a.__extends(f,b);e=f;f.prototype.clone=
function(){return new e({anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),enabled:this.enabled,material:l.isSome(this.material)?this.material.clone():null,outline:l.isSome(this.outline)?this.outline.clone():null,resource:this.resource&&this.resource.clone(),size:this.size})};f.fromSimpleMarkerSymbol=function(a){var b=a.color||c.white,d=t(a),f=a.outline&&0<a.outline.width?{size:a.outline.width,color:(a.outline.color||c.white).clone()}:null,g=e,h=a.size;a=a.style;var k=
w[a];k?a=k:(q.warn(a+' cannot be mapped to Icon symbol. Fallback to "circle"'),a="circle");return new g({size:h,resource:{primitive:a},material:{color:b},outline:f,anchor:d?"relative":void 0,anchorPosition:d})};f.fromPictureMarkerSymbol=function(a){var b=!a.color||c.isBlack(a.color)?c.white:a.color,d=t(a);return new e({size:a.width<=a.height?a.height:a.width,resource:{href:a.url},material:{color:b.clone()},anchor:d?"relative":void 0,anchorPosition:d})};f.fromCIMSymbol=function(a){return new e({resource:{href:k.makeData({mediaType:"application/json",
data:JSON.stringify(a.data)})}})};var e;a.__decorate([g.property({type:p.default,json:{write:!0}})],f.prototype,"material",void 0);a.__decorate([g.property({type:d.default,json:{write:!0}})],f.prototype,"resource",void 0);a.__decorate([g.enumeration({Icon:"icon"})],f.prototype,"type",void 0);a.__decorate([g.property(h.screenSizeProperty)],f.prototype,"size",void 0);a.__decorate([g.enumeration({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",
bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),g.property({json:{default:"center"}})],f.prototype,"anchor",void 0);a.__decorate([g.property({type:n.Symbol3DAnchorPosition2D,json:{type:[Number],read:{reader:function(a){return new n.Symbol3DAnchorPosition2D({x:a[0],y:a[1]})}},write:{writer:function(a,c){c.anchorPosition=[a.x,a.y]},overridePolicy:function(){return{enabled:"relative"===this.anchor}}}}})],f.prototype,"anchorPosition",void 0);a.__decorate([g.property({type:r.default,
json:{write:!0}})],f.prototype,"outline",void 0);return f=e=a.__decorate([g.subclass("esri.symbols.IconSymbol3DLayer")],f)}(f)})},"esri/symbols/support/IconSymbol3DLayerResource":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/urlUtils ../../core/accessorSupport/decorators ../../support/persistableUrlUtils".split(" "),function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});var c=m.strict()({circle:"circle",square:"square",cross:"cross",
x:"x",kite:"kite",triangle:"triangle"});e=function(b){function d(a){return b.call(this,a)||this}a.__extends(d,b);e=d;d.prototype.readHref=function(a,c,b){return a?f.fromJSON(a,b):c.dataURI};d.prototype.writeHref=function(a,c,b,d){a&&(k.isDataProtocol(a)?c.dataURI=a:(c.href=f.toJSON(a,d),k.isAbsolute(c.href)&&(c.href=k.normalize(c.href))))};d.prototype.clone=function(){return new e({href:this.href,primitive:this.primitive})};var e;a.__decorate([g.property({type:String,json:{write:!0,read:{source:["href",
"dataURI"]}}})],d.prototype,"href",void 0);a.__decorate([g.reader("href")],d.prototype,"readHref",null);a.__decorate([g.writer("href",{href:{type:String},dataURI:{type:String}})],d.prototype,"writeHref",null);a.__decorate([g.enumeration(c)],d.prototype,"primitive",void 0);return d=e=a.__decorate([g.subclass("esri.symbols.support.IconSymbol3DLayerResource")],d)}(l.JSONSupport);b.IconSymbol3DLayerResource=e;b.defaultPrimitive="circle";b.default=e})},"esri/symbols/support/Symbol3DAnchorPosition2D":function(){define(["require",
"exports","tslib","../../core/Accessor","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.x=0;a.y=0;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({x:this.x,y:this.y})};var f;a.__decorate([l.property({type:Number})],e.prototype,"x",void 0);a.__decorate([l.property({type:Number})],e.prototype,"y",void 0);return e=f=a.__decorate([l.subclass("esri.symbols.support.Symbol3DAnchorPosition2D")],
e)}(m);b.Symbol3DAnchorPosition2D=e;b.default=e})},"esri/symbols/LabelSymbol3D":function(){define("require exports tslib ../core/Collection ../core/lang ../core/accessorSupport/decorators ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),function(e,b,a,m,l,k,g,f,c,d){var h=m.ofType({base:null,key:"type",typeMap:{text:f}});return function(b){function e(a){a=b.call(this,a)||this;a.verticalOffset=null;a.callout=null;a.styleOrigin=null;a.symbolLayers=
new h;a.type="label-3d";return a}a.__extends(e,b);g=e;e.prototype.supportsCallout=function(){return!0};e.prototype.hasVisibleCallout=function(){return c.hasVisibleCallout(this)};e.prototype.hasVisibleVerticalOffset=function(){return c.hasVisibleVerticalOffset(this)};e.prototype.clone=function(){return new g({styleOrigin:l.clone(this.styleOrigin),symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail),callout:l.clone(this.callout),verticalOffset:l.clone(this.verticalOffset)})};e.fromTextSymbol=
function(a){return new g({symbolLayers:[f.fromTextSymbol(a)]})};var g;a.__decorate([k.property({type:d.default,json:{write:!0}})],e.prototype,"verticalOffset",void 0);a.__decorate([k.property(c.calloutProperty)],e.prototype,"callout",void 0);a.__decorate([k.property({json:{read:!1,write:!1}})],e.prototype,"styleOrigin",void 0);a.__decorate([k.property({type:h})],e.prototype,"symbolLayers",void 0);a.__decorate([k.enumeration({LabelSymbol3D:"label-3d"})],e.prototype,"type",void 0);return e=g=a.__decorate([k.subclass("esri.symbols.LabelSymbol3D")],
e)}(g)})},"esri/symbols/Symbol3D":function(){define("require exports tslib ../core/Collection ../core/collectionUtils ../core/jsonMap ../core/Logger ../core/urlUtils ../core/Warning ../core/accessorSupport/decorators ../portal/Portal ../support/persistableUrlUtils ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./PathSymbol3DLayer ./Symbol ./Symbol3DLayer ./TextSymbol3DLayer ./WaterSymbol3DLayer ./support/StyleOrigin ./support/Thumbnail".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y,z,A,C){var B={icon:t,object:q,line:v,path:w,fill:r,extrude:p,text:y,water:z},E=m.ofType({base:x,key:"type",typeMap:B}),D=k.strict()({PointSymbol3D:"point-3d",PolygonSymbol3D:"polygon-3d",LineSymbol3D:"line-3d",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"}),I=g.getLogger("esri.symbols.Symbol3D");return function(b){function e(a){a=b.call(this,a)||this;a.styleOrigin=null;a.thumbnail=null;a.type=null;var c=a.__accessor__&&a.__accessor__.metadatas&&
a.__accessor__.metadatas.symbolLayers;a._set("symbolLayers",new (c&&c.type||m));return a}a.__extends(e,b);Object.defineProperty(e.prototype,"color",{get:function(){return null},set:function(a){I.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"symbolLayers",{set:function(a){l.referenceSetter(a,this._get("symbolLayers"))},enumerable:!0,configurable:!0});
e.prototype.readSymbolLayers=function(a,b,d){b=[];for(var f=0;f<a.length;f++){var e=a[f],g=x.typeJSONDictionary.read(e.type),h=g&&B[g];h?(e=new h,e.read(a[f],d),b.push(e)):(I.warn("Unknown symbol layer type: "+g),d&&d.messages&&d.messages.push(new c("symbol-layer:unsupported","Symbol layers of type '"+(g||e.type||"unknown")+"' are not supported",{definition:e,context:d})))}return b};e.prototype.readStyleOrigin=function(a,b,d){if(a.styleUrl&&a.name)return b=n.fromJSON(a.styleUrl,d),new A({styleUrl:b,
name:a.name});if(a.styleName&&a.name)return new A({portal:d&&d.portal||h.getDefault(),styleName:a.styleName,name:a.name});d&&d.messages&&d.messages.push(new c("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:d,definition:a}))};e.prototype.writeStyleOrigin=function(a,b,d,e){a.styleUrl&&a.name?(d=n.toJSON(a.styleUrl,e),f.isAbsolute(d)&&(d=f.normalize(d)),b.styleOrigin={styleUrl:d,name:a.name}):a.styleName&&a.name&&(a.portal&&
e&&e.portal&&!f.hasSamePortal(a.portal.restUrl,e.portal.restUrl)?e&&e.messages&&e.messages.push(new c("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})):b.styleOrigin={styleName:a.styleName,name:a.name})};e.prototype.normalizeCtorArgs=function(a){return a instanceof x||a&&B[a.type]?{symbolLayers:[a]}:Array.isArray(a)?{symbolLayers:a}:a};a.__decorate([d.property({json:{read:!1,write:!1}})],
e.prototype,"color",null);a.__decorate([d.property({type:E,nonNullable:!0,json:{write:!0}}),d.cast(l.castForReferenceSetter)],e.prototype,"symbolLayers",null);a.__decorate([d.reader("symbolLayers")],e.prototype,"readSymbolLayers",null);a.__decorate([d.property({type:A})],e.prototype,"styleOrigin",void 0);a.__decorate([d.reader("styleOrigin")],e.prototype,"readStyleOrigin",null);a.__decorate([d.writer("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],
e.prototype,"writeStyleOrigin",null);a.__decorate([d.property({type:C.default,json:{read:!1}})],e.prototype,"thumbnail",void 0);a.__decorate([d.property({type:D.apiValues,readOnly:!0,json:{type:D.jsonValues,read:!1}})],e.prototype,"type",void 0);return e=a.__decorate([d.subclass("esri.symbols.Symbol3D")],e)}(u)})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports tslib ../Color ../core/maybe ../core/screenUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/colors ./support/materialUtils ./support/Symbol3DMaterial".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h){return function(b){function f(a){a=b.call(this,a)||this;a.material=null;a.type="line";a.join="miter";a.cap="butt";a.size=k.px2pt(1);a.stipplePattern=null;a.stippleOffColor=null;return a}a.__extends(f,b);e=f;f.prototype.clone=function(){return new e({enabled:this.enabled,material:l.isSome(this.material)?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,stipplePattern:this.stipplePattern?this.stipplePattern.slice():null,stippleOffColor:this.stippleOffColor?
this.stippleOffColor.clone():null})};f.fromSimpleLineSymbol=function(a){return new e({size:a.width||1,cap:a.cap||"butt",join:a.join||"miter",material:{color:(a.color||c.white).clone()}})};var e;a.__decorate([g.property({type:h.default,json:{write:!0}})],f.prototype,"material",void 0);a.__decorate([g.enumeration({Line:"line"})],f.prototype,"type",void 0);a.__decorate([g.property({type:["miter","bevel","round"],json:{write:!0,default:"miter"}})],f.prototype,"join",void 0);a.__decorate([g.property({type:["butt",
"square","round"],json:{write:!0,default:"butt"}})],f.prototype,"cap",void 0);a.__decorate([g.property(d.screenSizeProperty)],f.prototype,"size",void 0);a.__decorate([g.property(d.stipplePatternProperty)],f.prototype,"stipplePattern",void 0);a.__decorate([g.property({type:m})],f.prototype,"stippleOffColor",void 0);return f=e=a.__decorate([g.subclass("esri.symbols.LineSymbol3DLayer")],f)}(f)})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports tslib ../core/maybe ../core/accessorSupport/decorators ./Symbol3DLayer ./support/ObjectSymbol3DLayerResource ./support/Symbol3DAnchorPosition3D ./support/Symbol3DMaterial".split(" "),
function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=b.call(this,a)||this;a.material=null;a.castShadows=!0;a.resource=null;a.type="object";a.width=void 0;a.height=void 0;a.depth=void 0;a.anchor=void 0;a.anchorPosition=void 0;a.heading=void 0;a.tilt=void 0;a.roll=void 0;return a}a.__extends(d,b);e=d;d.prototype.clone=function(){return new e({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),depth:this.depth,
enabled:this.enabled,height:this.height,material:m.isSome(this.material)?this.material.clone():null,castShadows:this.castShadows,resource:this.resource&&this.resource.clone(),width:this.width})};Object.defineProperty(d.prototype,"isPrimitive",{get:function(){return!this.resource||"string"!==typeof this.resource.href},enumerable:!0,configurable:!0});var e;a.__decorate([l.property({type:c.default,json:{write:!0}})],d.prototype,"material",void 0);a.__decorate([l.property({type:Boolean,nonNullable:!0,
json:{write:!0,default:!0}})],d.prototype,"castShadows",void 0);a.__decorate([l.property({type:g.default,json:{write:!0}})],d.prototype,"resource",void 0);a.__decorate([l.enumeration({Object:"object"})],d.prototype,"type",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"width",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"height",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"depth",void 0);a.__decorate([l.enumeration({center:"center",
top:"top",bottom:"bottom",origin:"origin",relative:"relative"}),l.property({json:{default:"origin"}})],d.prototype,"anchor",void 0);a.__decorate([l.property({type:f.Symbol3DAnchorPosition3D,json:{type:[Number],read:{reader:function(a){return new f.Symbol3DAnchorPosition3D({x:a[0],y:a[1],z:a[2]})}},write:{writer:function(a,c){c.anchorPosition=[a.x,a.y,a.z]},overridePolicy:function(){return{enabled:"relative"===this.anchor}}}}})],d.prototype,"anchorPosition",void 0);a.__decorate([l.property({type:Number,
json:{write:!0}})],d.prototype,"heading",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"tilt",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],d.prototype,"roll",void 0);a.__decorate([l.property({readOnly:!0,dependsOn:["resource","resource.href"]})],d.prototype,"isPrimitive",null);return d=e=a.__decorate([l.subclass("esri.symbols.ObjectSymbol3DLayer")],d)}(k)})},"esri/symbols/support/ObjectSymbol3DLayerResource":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators ../../support/persistableUrlUtils".split(" "),
function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});var f=m.strict()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});e=function(c){function b(){return null!==c&&c.apply(this,arguments)||this}a.__extends(b,c);e=b;b.prototype.clone=function(){return new e({href:this.href,primitive:this.primitive})};var e;a.__decorate([k.property({type:String,json:{read:g.read,write:g.write}})],b.prototype,"href",
void 0);a.__decorate([k.enumeration(f)],b.prototype,"primitive",void 0);return b=e=a.__decorate([k.subclass("esri.symbols.support.ObjectSymbol3DLayerResource")],b)}(l.JSONSupport);b.ObjectSymbol3DLayerResource=e;b.defaultPrimitive="sphere";b.default=e})},"esri/symbols/support/Symbol3DAnchorPosition3D":function(){define(["require","exports","tslib","../../core/Accessor","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=
null!==b&&b.apply(this,arguments)||this;a.x=0;a.y=0;a.z=0;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({x:this.x,y:this.y,z:this.z})};var f;a.__decorate([l.property({type:Number})],e.prototype,"x",void 0);a.__decorate([l.property({type:Number})],e.prototype,"y",void 0);a.__decorate([l.property({type:Number})],e.prototype,"z",void 0);return e=f=a.__decorate([l.subclass("esri.symbols.support.Symbol3DAnchorPosition3D")],e)}(m);b.Symbol3DAnchorPosition3D=e;b.default=e})},"esri/symbols/PathSymbol3DLayer":function(){define("require exports tslib ../core/maybe ../core/accessorSupport/decorators ./Symbol3DLayer ./support/Symbol3DMaterial".split(" "),
function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.material=null;a.castShadows=!0;a.type="path";a.profile="circle";a.join="miter";a.cap="butt";a.width=void 0;a.height=void 0;a.anchor="center";a.profileRotation="all";return a}a.__extends(c,b);d=c;Object.defineProperty(c.prototype,"size",{get:function(){if(this.width&&this.height){if(this.width===this.height)return this.width}else{if(this.width)return this.width;if(this.height)return this.height}},set:function(a){this.height=
this.width=a},enumerable:!0,configurable:!0});c.prototype.readSize=function(a,c){return c.height||c.width?a:c.size};c.prototype.clone=function(){return new d({enabled:this.enabled,material:m.isSome(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})};var d;a.__decorate([l.property({type:g.default,json:{write:!0}})],c.prototype,
"material",void 0);a.__decorate([l.property({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],c.prototype,"castShadows",void 0);a.__decorate([l.enumeration({Path:"path"})],c.prototype,"type",void 0);a.__decorate([l.property({type:Number})],c.prototype,"size",null);a.__decorate([l.reader("size")],c.prototype,"readSize",null);a.__decorate([l.property({type:["circle","quad"],json:{write:!0,default:"circle"}})],c.prototype,"profile",void 0);a.__decorate([l.property({type:["miter","bevel","round"],
json:{write:!0,default:"miter"}})],c.prototype,"join",void 0);a.__decorate([l.property({type:["none","butt","square","round"],json:{write:!0,default:"butt"}})],c.prototype,"cap",void 0);a.__decorate([l.property({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],c.prototype,"width",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],c.prototype,"height",void 0);a.__decorate([l.property({type:["center","bottom","top"],json:{write:!0,default:"center"}})],
c.prototype,"anchor",void 0);a.__decorate([l.property({type:["heading","all"],json:{write:!0,default:"all"}})],c.prototype,"profileRotation",void 0);return c=d=a.__decorate([l.subclass("esri.symbols.PathSymbol3DLayer")],c)}(k)})},"esri/symbols/TextSymbol3DLayer":function(){define("require exports tslib ../core/lang ../core/maybe ../core/accessorSupport/decorators ./Font ./Symbol3DLayer ./support/materialUtils ./support/Symbol3DHalo ./support/Symbol3DMaterial".split(" "),function(e,b,a,m,l,k,g,f,c,
d,h){return function(b){function f(a){a=b.call(this,a)||this;a._userSize=void 0;a.halo=null;a.material=null;a.text=void 0;a.type="text";return a}a.__extends(f,b);e=f;Object.defineProperty(f.prototype,"font",{get:function(){return this._get("font")||null},set:function(a){a&&this._userSize&&(a.size=this._userSize);this._set("font",a)},enumerable:!0,configurable:!0});f.prototype.writeFont=function(c,b,d,f){d=a.__assign(a.__assign({},f),{textSymbol3D:!0});b.font=c.write({},d);delete b.font.size};Object.defineProperty(f.prototype,
"size",{get:function(){return null!=this._userSize?this._userSize:this.font&&null!=this.font.size?this.font.size:9},set:function(a){this._userSize=a;this.font&&(this.font.size=this._userSize);this.notifyChange("size")},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new e({enabled:this.enabled,font:this.font&&m.clone(this.font),halo:this.halo&&m.clone(this.halo),material:l.isSome(this.material)?this.material.clone():null,size:this.size,text:this.text})};f.fromTextSymbol=function(a){var c;
c=a.haloColor;var b=a.haloSize;c=c&&0<b?{color:m.clone(c),size:b}:null;b=a.font?a.font.clone():new g;return new e({size:b.size,font:b,halo:c,material:a.color?{color:a.color.clone()}:null,text:a.text})};var e;a.__decorate([k.property({type:g,json:{write:!0}})],f.prototype,"font",null);a.__decorate([k.writer("font")],f.prototype,"writeFont",null);a.__decorate([k.property({type:d.default,json:{write:!0}})],f.prototype,"halo",void 0);a.__decorate([k.property({type:h.default,json:{write:!0}})],f.prototype,
"material",void 0);a.__decorate([k.property(c.screenSizeProperty),k.property({dependsOn:["font.size"]})],f.prototype,"size",null);a.__decorate([k.property({type:String,json:{write:!0}})],f.prototype,"text",void 0);a.__decorate([k.enumeration({Text:"text"})],f.prototype,"type",void 0);return f=e=a.__decorate([k.subclass("esri.symbols.TextSymbol3DLayer")],f)}(f)})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});e=function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a.color=new m([0,0,0,1]);a.size=0;return a}a.__extends(b,c);e=b;b.prototype.clone=function(){return new e({color:k.clone(this.color),size:this.size})};var e;a.__decorate([g.property(f.colorAndTransparencyProperty)],b.prototype,"color",void 0);a.__decorate([g.property(f.screenSizeProperty)],b.prototype,"size",void 0);return b=e=a.__decorate([g.subclass("esri.symbols.support.Symbol3DHalo")],
b)}(l.JSONSupport);b.Symbol3DHalo=e;b.default=e})},"esri/symbols/WaterSymbol3DLayer":function(){define("require exports tslib ../Color ../core/lang ../core/accessorSupport/decorators ../core/accessorSupport/ensureType ./Symbol3DLayer".split(" "),function(e,b,a,m,l,k,g,f){e=function(b){function d(a){a=b.call(this,a)||this;a.color=c.clone();a.type="water";a.waterbodySize="medium";a.waveDirection=null;a.waveStrength="moderate";return a}a.__extends(d,b);f=d;d.prototype.clone=function(){return new f({color:l.clone(this.color),
waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})};var f;a.__decorate([k.property({type:m,nonNullable:!0,json:{type:[g.Integer],write:function(a,c,b){return c[b]=a.toArray(1)},default:function(){return c.clone()},defaultEquals:function(a){return a.toCss(!0)===c.toCss(!0)}}})],d.prototype,"color",void 0);a.__decorate([k.enumeration({Water:"water"})],d.prototype,"type",void 0);a.__decorate([k.property({type:["small","medium","large"],json:{write:!0,default:"medium"}})],
d.prototype,"waterbodySize",void 0);a.__decorate([k.property({type:Number,json:{write:!0,default:null}})],d.prototype,"waveDirection",void 0);a.__decorate([k.property({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],d.prototype,"waveStrength",void 0);return d=f=a.__decorate([k.subclass("esri.symbols.WaterSymbol3DLayer")],d)}(f);var c=new m([0,119,190]);return e})},"esri/symbols/support/StyleOrigin":function(){define("require exports tslib ../../core/Accessor ../../core/accessorSupport/decorators ../../portal/Portal".split(" "),
function(e,b,a,m,l,k){return function(b){function f(){var a=null!==b&&b.apply(this,arguments)||this;a.portal=null;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};var c;a.__decorate([l.property({type:String})],f.prototype,"name",void 0);a.__decorate([l.property({type:String})],f.prototype,"styleUrl",void 0);a.__decorate([l.property({type:String})],f.prototype,"styleName",void 0);a.__decorate([l.property({type:k})],
f.prototype,"portal",void 0);return f=c=a.__decorate([l.subclass("esri.symbols.support.StyleOrigin")],f)}(m)})},"esri/symbols/support/Thumbnail":function(){define(["require","exports","tslib","../../core/Accessor","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){return null!==b&&b.apply(this,arguments)||this}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({url:this.url})};var f;a.__decorate([l.property({type:String})],
e.prototype,"url",void 0);return e=f=a.__decorate([l.subclass("esri.symbols.support.Thumbnail")],e)}(m);b.Thumbnail=e;b.default=e})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(e,b,a,m){function l(a){if(!a)return!1;a=a.verticalOffset;return!a||0>=a.screenLength||0>=a.maxWorldLength?!1:!0}function k(a,b,c){if(!a)return a;switch(a.type){case "line":return b=new m,b.read(a,c),b}}Object.defineProperty(b,"__esModule",{value:!0});
b.hasVisibleVerticalOffset=l;b.hasVisibleCallout=function(a){if(!a||!a.supportsCallout||!a.supportsCallout())return!1;var b=a.callout;return b&&b.visible?l(a)?!0:!1:!1};b.isCalloutSupport=function(a){return"point-3d"===a.type||"label-3d"===a.type};b.read=k;b.calloutProperty={types:{key:"type",base:a,typeMap:{line:m}},json:{read:k,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,
b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.visible=!0;return a}a.__extends(e,b);e.prototype.normalizeCtorArgs=function(b){b&&b.type&&(b=a.__assign({},b),delete b.type);return b};e.prototype.clone=function(){};a.__decorate([l.property({type:["line"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],e.prototype,"type",void 0);a.__decorate([l.property({readOnly:!0})],e.prototype,"visible",void 0);return e=a.__decorate([l.subclass("esri.symbols.callouts.Callout3D")],e)}(m.JSONSupport)})},
"esri/symbols/callouts/LineCallout3D":function(){define("require exports tslib ../../Color ../../core/lang ../../core/maybe ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ./LineCallout3DBorder ../support/materialUtils".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){return function(c){function b(a){a=c.call(this,a)||this;a.type="line";a.color=new m([0,0,0,1]);a.size=g.px2pt(1);a.border=null;return a}a.__extends(b,c);e=b;Object.defineProperty(b.prototype,"visible",{get:function(){return 0<
this.size&&k.isSome(this.color)&&0<this.color.a},enumerable:!0,configurable:!0});b.prototype.clone=function(){return new e({color:l.clone(this.color),size:this.size,border:l.clone(this.border)})};var e;a.__decorate([f.property({type:["line"]})],b.prototype,"type",void 0);a.__decorate([f.property(h.colorAndTransparencyProperty)],b.prototype,"color",void 0);a.__decorate([f.property(h.screenSizeProperty)],b.prototype,"size",void 0);a.__decorate([f.property({type:d.default,json:{write:!0}})],b.prototype,
"border",void 0);a.__decorate([f.property({dependsOn:["size","color"],readOnly:!0})],b.prototype,"visible",null);return b=e=a.__decorate([f.subclass("esri.symbols.callouts.LineCallout3D")],b)}(c)})},"esri/symbols/callouts/LineCallout3DBorder":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});e=function(c){function b(){var a=
null!==c&&c.apply(this,arguments)||this;a.color=new m("white");return a}a.__extends(b,c);e=b;b.prototype.clone=function(){return new e({color:k.clone(this.color)})};var e;a.__decorate([g.property(f.colorAndTransparencyProperty)],b.prototype,"color",void 0);return b=e=a.__decorate([g.subclass("esri.symbols.callouts.LineCallout3DBorder")],b)}(l.JSONSupport);b.LineCallout3DBorder=e;b.default=e})},"esri/symbols/support/Symbol3DVerticalOffset":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function f(){var a=null!==b&&b.apply(this,arguments)||this;a.screenLength=0;a.minWorldLength=0;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})};var c;a.__decorate([l.property(k.screenSizeProperty)],f.prototype,"screenLength",void 0);a.__decorate([l.property({type:Number,json:{write:!0,default:0}})],
f.prototype,"minWorldLength",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],f.prototype,"maxWorldLength",void 0);return f=c=a.__decorate([l.subclass("esri.symbols.support.Symbol3DVerticalOffset")],f)}(m.JSONSupport);b.Symbol3DVerticalOffset=e;b.default=e})},"esri/symbols/LineSymbol3D":function(){define("require exports tslib ../core/Collection ../core/lang ../core/accessorSupport/decorators ./LineSymbol3DLayer ./PathSymbol3DLayer ./Symbol3D".split(" "),function(e,b,a,m,l,k,g,f,c){var d=
m.ofType({base:null,key:"type",typeMap:{line:g,path:f}}),h=m.ofType({base:null,key:"type",typeMap:{line:g,path:f}});return function(c){function b(a){a=c.call(this,a)||this;a.symbolLayers=new d;a.type="line-3d";return a}a.__extends(b,c);f=b;b.prototype.clone=function(){return new f({styleOrigin:l.clone(this.styleOrigin),symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail)})};b.fromSimpleLineSymbol=function(a){return new f({symbolLayers:[g.fromSimpleLineSymbol(a)]})};var f;a.__decorate([k.property({type:d,
json:{type:h}})],b.prototype,"symbolLayers",void 0);a.__decorate([k.enumeration({LineSymbol3D:"line-3d"})],b.prototype,"type",void 0);return b=f=a.__decorate([k.subclass("esri.symbols.LineSymbol3D")],b)}(c)})},"esri/symbols/MarkerSymbol":function(){define("require exports tslib ../core/jsonMap ../core/screenUtils ../core/accessorSupport/decorators ./Symbol".split(" "),function(e,b,a,m,l,k,g){var f=new m.default({esriSMS:"simple-marker",esriPMS:"picture-marker"});return function(c){function b(a){a=
c.call(this,a)||this;a.angle=0;a.type=null;a.xoffset=0;a.yoffset=0;a.size=9;return a}a.__extends(b,c);b.prototype.hash=function(){return this.type+"."+this.angle+"."+this.size+"."+this.xoffset+"."+this.yoffset};a.__decorate([k.property({type:Number,json:{read:function(a){return a&&-1*a},write:function(a,c){return c.angle=a&&-1*a}}})],b.prototype,"angle",void 0);a.__decorate([k.property({type:f.apiValues,readOnly:!0,json:{type:f.jsonValues}})],b.prototype,"type",void 0);a.__decorate([k.property({type:Number,
cast:l.toPt,json:{write:!0}})],b.prototype,"xoffset",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"yoffset",void 0);a.__decorate([k.property({type:Number,cast:function(a){return"auto"===a?a:l.toPt(a)},json:{write:!0}})],b.prototype,"size",void 0);return b=a.__decorate([k.subclass("esri.symbols.MarkerSymbol")],b)}(g)})},"esri/symbols/MeshSymbol3D":function(){define("require exports tslib ../core/Collection ../core/lang ../core/accessorSupport/decorators ./FillSymbol3DLayer ./Symbol3D".split(" "),
function(e,b,a,m,l,k,g,f){var c=m.ofType({base:null,key:"type",typeMap:{fill:g}});return function(b){function d(a){a=b.call(this,a)||this;a.symbolLayers=new c;a.type="mesh-3d";return a}a.__extends(d,b);f=d;d.prototype.clone=function(){return new f({styleOrigin:l.clone(this.styleOrigin),symbolLayers:l.clone(this.symbolLayers),thumbnail:l.clone(this.thumbnail)})};var f;a.__decorate([k.property({type:c})],d.prototype,"symbolLayers",void 0);a.__decorate([k.enumeration({MeshSymbol3D:"mesh-3d"})],d.prototype,
"type",void 0);return d=f=a.__decorate([k.subclass("esri.symbols.MeshSymbol3D")],d)}(f)})},"esri/symbols/PictureFillSymbol":function(){define("require exports tslib ../core/lang ../core/screenUtils ../core/accessorSupport/decorators ./FillSymbol ./support/urlUtils".split(" "),function(e,b,a,m,l,k,g,f){return function(c){function b(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=c.apply(this,a)||this;a.type="picture-fill";a.url=null;a.xscale=1;a.yscale=1;a.width=12;a.height=12;a.xoffset=
0;a.yoffset=0;a.source=null;return a}a.__extends(b,c);e=b;b.prototype.normalizeCtorArgs=function(a,c,b,d){if(a&&"string"!==typeof a&&null==a.imageData)return a;var f={};a&&(f.url=a);c&&(f.outline=c);null!=b&&(f.width=l.toPt(b));null!=d&&(f.height=l.toPt(d));return f};b.prototype.clone=function(){var a=new e({color:m.clone(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});
a._set("source",m.clone(this.source));return a};b.prototype.hash=function(){return c.prototype.hash.call(this)+"."+this.color.hash()+"."+this.height+"."+this.url+"."+this.width+"."+this.xoffset+"."+this.xscale+"."+this.yoffset+"."+this.yscale};var e;a.__decorate([k.enumeration({esriPFS:"picture-fill"})],b.prototype,"type",void 0);a.__decorate([k.property(f.urlPropertyDefinition)],b.prototype,"url",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"xscale",void 0);a.__decorate([k.property({type:Number,
json:{write:!0}})],b.prototype,"yscale",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"width",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"height",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"xoffset",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"yoffset",void 0);a.__decorate([k.property(f.sourcePropertyDefinition)],b.prototype,
"source",void 0);return b=e=a.__decorate([k.subclass("esri.symbols.PictureFillSymbol")],b)}(g)})},"esri/symbols/support/urlUtils":function(){define(["require","exports","../../core/urlUtils","../../support/persistableUrlUtils"],function(e,b,a,m){function l(b,c,d){return c.imageData?a.makeData({mediaType:c.contentType||"image/png",isBase64:!0,data:c.imageData}):k(c.url,d)}function k(b,c){return!c||"service"!==c.origin&&"portal-item"!==c.origin||!c.layer||"feature"!==c.layer.type&&"stream"!==c.layer.type||
a.isAbsolute(b)||!c.layer.parsedUrl?m.fromJSON(b,c):a.join(c.layer.parsedUrl.path,"images",b)}function g(b,c,d,e){a.isDataProtocol(b)?(b=a.dataComponents(b),c.contentType=b.mediaType,c.imageData=b.data,d&&d.imageData===c.imageData&&d.url&&m.write(d.url,c,"url",e)):m.write(b,c,"url",e)}Object.defineProperty(b,"__esModule",{value:!0});b.readImageDataOrUrl=l;b.read=k;b.writeImageDataAndUrl=g;b.urlPropertyDefinition={json:{read:{source:["imageData","url"],reader:l},write:{writer:function(a,c,b,e){g(a,
c,this.source,e)}}}};b.sourcePropertyDefinition={readOnly:!0,json:{read:{source:["imageData","url"],reader:function(a,c,b){a={};c.imageData&&(a.imageData=c.imageData);c.contentType&&(a.contentType=c.contentType);c.url&&(a.url=k(c.url,b));return a}}}}})},"esri/symbols/PictureMarkerSymbol":function(){define("require exports tslib ../core/lang ../core/screenUtils ../core/accessorSupport/decorators ./MarkerSymbol ./support/urlUtils".split(" "),function(e,b,a,m,l,k,g,f){return function(c){function b(){for(var a=
[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=c.apply(this,a)||this;a.color=null;a.type="picture-marker";a.url=null;a.source=null;a.height=12;a.width=12;a.size=null;return a}a.__extends(b,c);e=b;b.prototype.normalizeCtorArgs=function(a,c,b){if(a&&"string"!==typeof a&&null==a.imageData)return a;var d={};a&&(d.url=a);null!=c&&(d.width=l.toPt(c));null!=b&&(d.height=l.toPt(b));return d};b.prototype.readHeight=function(a,c){return c.size||a};b.prototype.readWidth=function(a,c){return c.size||a};b.prototype.clone=
function(){var a=new e({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});a._set("source",m.clone(this.source));return a};b.prototype.hash=function(){return c.prototype.hash.call(this)+"."+this.height+"."+this.url+"."+this.width};var e;a.__decorate([k.property({json:{write:!1}})],b.prototype,"color",void 0);a.__decorate([k.enumeration({esriPMS:"picture-marker"})],b.prototype,"type",void 0);a.__decorate([k.property(f.urlPropertyDefinition)],
b.prototype,"url",void 0);a.__decorate([k.property(f.sourcePropertyDefinition)],b.prototype,"source",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"height",void 0);a.__decorate([k.reader("height",["height","size"])],b.prototype,"readHeight",null);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],b.prototype,"width",void 0);a.__decorate([k.property({json:{write:!1}})],b.prototype,"size",void 0);return b=e=a.__decorate([k.subclass("esri.symbols.PictureMarkerSymbol")],
b)}(g)})},"esri/symbols/PointSymbol3D":function(){define("require exports tslib ../core/Collection ../core/Error ../core/lang ../core/accessorSupport/decorators ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer ./callouts/calloutUtils ./support/Symbol3DVerticalOffset".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p){var r=m.ofType({base:null,key:"type",typeMap:{icon:f,object:c,text:h}}),t=m.ofType({base:null,key:"type",typeMap:{icon:f,object:c}});return function(c){function b(a){a=
c.call(this,a)||this;a.verticalOffset=null;a.callout=null;a.symbolLayers=new r;a.type="point-3d";return a}a.__extends(b,c);d=b;b.prototype.writeSymbolLayers=function(a,c,b,d){var f=a.filter(function(a){return"text"!==a.type});d&&d.messages&&f.length<a.length&&(a=a.find(function(a){return"text"===a.type}),d.messages.push(new l("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PointSymbol3D",{symbolLayer:a})));c[b]=f.map(function(a){return a.write({},d)}).toArray()};b.prototype.supportsCallout=
function(){if(1>(this.symbolLayers?this.symbolLayers.length:0))return!1;for(var a=0,c=this.symbolLayers.items;a<c.length;a++)switch(c[a].type){case "icon":case "text":case "object":continue;default:return!1}return!0};b.prototype.hasVisibleCallout=function(){return n.hasVisibleCallout(this)};b.prototype.hasVisibleVerticalOffset=function(){return n.hasVisibleVerticalOffset(this)};b.prototype.clone=function(){return new d({verticalOffset:k.clone(this.verticalOffset),callout:k.clone(this.callout),styleOrigin:k.clone(this.styleOrigin),
symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};b.fromSimpleMarkerSymbol=function(a){return new d({symbolLayers:[f.fromSimpleMarkerSymbol(a)]})};b.fromPictureMarkerSymbol=function(a){return new d({symbolLayers:[f.fromPictureMarkerSymbol(a)]})};b.fromCIMSymbol=function(a){return new d({symbolLayers:[f.fromCIMSymbol(a)],callout:{type:"line",size:.5,color:[0,0,0]},verticalOffset:{screenLength:40}})};b.fromTextSymbol=function(a){return new d({symbolLayers:[h.fromTextSymbol(a)]})};
var d;a.__decorate([g.property({type:p.default,json:{write:!0}})],b.prototype,"verticalOffset",void 0);a.__decorate([g.property(n.calloutProperty)],b.prototype,"callout",void 0);a.__decorate([g.property({type:r,json:{type:t,origins:{"web-scene":{type:t}}}})],b.prototype,"symbolLayers",void 0);a.__decorate([g.writer("web-scene","symbolLayers")],b.prototype,"writeSymbolLayers",null);a.__decorate([g.enumeration({PointSymbol3D:"point-3d"})],b.prototype,"type",void 0);return b=d=a.__decorate([g.subclass("esri.symbols.PointSymbol3D")],
b)}(d)})},"esri/symbols/PolygonSymbol3D":function(){define("require exports tslib ../core/Collection ../core/Error ../core/lang ../core/maybe ../core/accessorSupport/decorators ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./Symbol3D ./TextSymbol3DLayer ./WaterSymbol3DLayer".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v){var q=m.ofType({base:null,key:"type",typeMap:{extrude:c,fill:d,icon:h,line:n,object:p,text:t,water:v}}),w=m.ofType({base:null,
key:"type",typeMap:{extrude:c,fill:d,icon:h,line:n,object:p,water:v}});return function(c){function b(a){a=c.call(this,a)||this;a.type="polygon-3d";return a}a.__extends(b,c);e=b;b.prototype.writeSymbolLayers=function(a,c,b,d){var f=a.filter(function(a){return"text"!==a.type});d&&d.messages&&f.length<a.length&&(a=a.find(function(a){return"text"===a.type}),d.messages.push(new l("symbol-layer:unsupported","Symbol layers of type 'text' cannot be persisted in PolygonSymbol3D",{symbolLayer:a})));c[b]=f.map(function(a){return a.write({},
d)}).toArray()};b.prototype.clone=function(){return new e({styleOrigin:k.clone(this.styleOrigin),symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};b.fromJSON=function(a){var c=new e;c.read(a);if(2===c.symbolLayers.length&&"fill"===c.symbolLayers.getItemAt(0).type&&"line"===c.symbolLayers.getItemAt(1).type){var b=c.symbolLayers.getItemAt(0),d=c.symbolLayers.getItemAt(1);!d.enabled||a.symbolLayers&&a.symbolLayers[1]&&!1===a.symbolLayers[1].enable||(b.outline={size:d.size,
color:g.isSome(d.material)?d.material.color:null});c.symbolLayers.removeAt(1)}return c};b.fromSimpleFillSymbol=function(a){return new e({symbolLayers:[d.fromSimpleFillSymbol(a)]})};var e;a.__decorate([f.property({type:q,json:{type:w}})],b.prototype,"symbolLayers",void 0);a.__decorate([f.writer("web-scene","symbolLayers")],b.prototype,"writeSymbolLayers",null);a.__decorate([f.enumeration({PolygonSymbol3D:"polygon-3d"})],b.prototype,"type",void 0);return b=e=a.__decorate([f.subclass("esri.symbols.PolygonSymbol3D")],
b)}(r)})},"esri/symbols/SimpleFillSymbol":function(){define("require exports tslib ../Color ../core/jsonMap ../core/lang ../core/accessorSupport/decorators ./FillSymbol ./SimpleLineSymbol".split(" "),function(e,b,a,m,l,k,g,f,c){var d=new l.default({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});return function(b){function f(){for(var a=
[],d=0;d<arguments.length;d++)a[d]=arguments[d];a=b.apply(this,a)||this;a.color=new m([0,0,0,.25]);a.outline=new c;a.type="simple-fill";a.style="solid";return a}a.__extends(f,b);e=f;f.prototype.normalizeCtorArgs=function(a,c,b){if(a&&"string"!==typeof a)return a;var d={};a&&(d.style=a);c&&(d.outline=c);b&&(d.color=b);return d};f.prototype.clone=function(){return new e({color:k.clone(this.color),outline:this.outline&&this.outline.clone(),style:this.style})};f.prototype.hash=function(){return""+b.prototype.hash.call(this)+
this.style+"."+(this.color&&this.color.hash())};var e;a.__decorate([g.property()],f.prototype,"color",void 0);a.__decorate([g.property()],f.prototype,"outline",void 0);a.__decorate([g.enumeration({esriSFS:"simple-fill"})],f.prototype,"type",void 0);a.__decorate([g.property({type:d.apiValues,json:{read:d.read,write:d.write}})],f.prototype,"style",void 0);return f=e=a.__decorate([g.subclass("esri.symbols.SimpleFillSymbol")],f)}(f)})},"esri/symbols/SimpleMarkerSymbol":function(){define("require exports tslib ../Color ../core/jsonMap ../core/lang ../core/screenUtils ../core/accessorSupport/decorators ./MarkerSymbol ./SimpleLineSymbol".split(" "),
function(e,b,a,m,l,k,g,f,c,d){var h=new l.default({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});return function(c){function b(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=c.apply(this,a)||this;a.color=new m([255,255,255,.25]);a.type="simple-marker";a.size=12;a.style="circle";a.outline=new d;return a}a.__extends(b,c);e=b;b.prototype.normalizeCtorArgs=function(a,c,b,d){if(a&&
"string"!==typeof a)return a;var f={};a&&(f.style=a);null!=c&&(f.size=g.toPt(c));b&&(f.outline=b);d&&(f.color=d);return f};b.prototype.writeColor=function(a,c){a&&"x"!==this.style&&"cross"!==this.style&&(c.color=a.toJSON());null===a&&(c.color=null)};Object.defineProperty(b.prototype,"path",{set:function(a){this.style="path";this._set("path",a)},enumerable:!0,configurable:!0});b.prototype.clone=function(){return new e({angle:this.angle,color:k.clone(this.color),outline:this.outline&&this.outline.clone(),
path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})};b.prototype.hash=function(){var a;return c.prototype.hash.call(this)+"."+(this.color&&this.color.hash())+"."+this.path+"."+this.style+"."+(null===(a=this.outline)||void 0===a?void 0:a.hash())};var e;a.__decorate([f.property()],b.prototype,"color",void 0);a.__decorate([f.writer("color")],b.prototype,"writeColor",null);a.__decorate([f.enumeration({esriSMS:"simple-marker"})],b.prototype,"type",void 0);a.__decorate([f.property()],
b.prototype,"size",void 0);a.__decorate([f.property({type:h.apiValues,json:{read:h.read,write:h.write}})],b.prototype,"style",void 0);a.__decorate([f.property({type:String,json:{write:!0}})],b.prototype,"path",null);a.__decorate([f.property({type:d,json:{default:null,write:!0}})],b.prototype,"outline",void 0);return b=e=a.__decorate([f.subclass("esri.symbols.SimpleMarkerSymbol")],b)}(c)})},"esri/symbols/TextSymbol":function(){define("require exports tslib ../Color ../core/lang ../core/screenUtils ../core/accessorSupport/decorators ./Font ./Symbol".split(" "),
function(e,b,a,m,l,k,g,f,c){return function(c){function b(){for(var a=[],b=0;b<arguments.length;b++)a[b]=arguments[b];a=c.apply(this,a)||this;a.backgroundColor=null;a.borderLineColor=null;a.borderLineSize=null;a.font=new f;a.horizontalAlignment="center";a.kerning=!0;a.haloColor=null;a.haloSize=null;a.rightToLeft=null;a.rotated=!1;a.text="";a.type="text";a.verticalAlignment=null;a.xoffset=0;a.yoffset=0;a.angle=0;a.width=null;a.lineWidth=192;a.lineHeight=1;return a}a.__extends(b,c);d=b;b.prototype.normalizeCtorArgs=
function(a,c,b){if(a&&"string"!==typeof a)return a;var d={};a&&(d.text=a);c&&(d.font=c);b&&(d.color=b);return d};b.prototype.writeLineWidth=function(a,c,b,d){d&&"string"!==typeof d||(c[b]=a)};b.prototype.castLineWidth=function(a){return k.toPt(a)};b.prototype.writeLineHeight=function(a,c,b,d){d&&"string"!==typeof d||(c[b]=a)};b.prototype.clone=function(){return new d({angle:this.angle,backgroundColor:l.clone(this.backgroundColor),borderLineColor:l.clone(this.borderLineColor),borderLineSize:this.borderLineSize,
color:l.clone(this.color),font:this.font&&this.font.clone(),haloColor:l.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})};b.prototype.hash=function(){return(this.backgroundColor&&this.backgroundColor.hash())+"."+this.borderLineColor+
"."+this.borderLineSize+"."+this.color.hash()+"."+(this.font&&this.font.hash())+"."+(this.haloColor&&this.haloColor.hash())+"."+this.haloSize+"."+this.horizontalAlignment+"."+this.kerning+"."+this.rightToLeft+"."+this.rotated+"."+this.text+"."+this.verticalAlignment+"."+this.width+"."+this.xoffset+"."+this.yoffset+"."+this.lineHeight+"."+this.lineWidth+"."+this.angle};var d;a.__decorate([g.property({type:m,json:{write:!0}})],b.prototype,"backgroundColor",void 0);a.__decorate([g.property({type:m,json:{write:!0}})],
b.prototype,"borderLineColor",void 0);a.__decorate([g.property({type:Number,json:{write:!0}})],b.prototype,"borderLineSize",void 0);a.__decorate([g.property({type:f,json:{write:!0}})],b.prototype,"font",void 0);a.__decorate([g.property({type:["left","right","center","justify"],json:{write:!0}})],b.prototype,"horizontalAlignment",void 0);a.__decorate([g.property({type:Boolean,json:{write:!0}})],b.prototype,"kerning",void 0);a.__decorate([g.property({type:m,json:{write:!0}})],b.prototype,"haloColor",
void 0);a.__decorate([g.property({type:Number,cast:k.toPt,json:{write:!0}})],b.prototype,"haloSize",void 0);a.__decorate([g.property({type:Boolean,json:{write:!0}})],b.prototype,"rightToLeft",void 0);a.__decorate([g.property({type:Boolean,json:{write:!0}})],b.prototype,"rotated",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],b.prototype,"text",void 0);a.__decorate([g.property({type:String,readOnly:!0})],b.prototype,"type",void 0);a.__decorate([g.property({type:["baseline","top",
"middle","bottom"],json:{write:!0}})],b.prototype,"verticalAlignment",void 0);a.__decorate([g.property({type:Number,cast:k.toPt,json:{write:!0}})],b.prototype,"xoffset",void 0);a.__decorate([g.property({type:Number,cast:k.toPt,json:{write:!0}})],b.prototype,"yoffset",void 0);a.__decorate([g.property({type:Number,json:{read:function(a){return a&&-1*a},write:function(a,c){return c.angle=a&&-1*a}}})],b.prototype,"angle",void 0);a.__decorate([g.property({type:Number,json:{write:!0}})],b.prototype,"width",
void 0);a.__decorate([g.property({type:Number})],b.prototype,"lineWidth",void 0);a.__decorate([g.writer("lineWidth")],b.prototype,"writeLineWidth",null);a.__decorate([g.cast("lineWidth")],b.prototype,"castLineWidth",null);a.__decorate([g.property({type:Number})],b.prototype,"lineHeight",void 0);a.__decorate([g.writer("lineHeight")],b.prototype,"writeLineHeight",null);return b=d=a.__decorate([g.subclass("esri.symbols.TextSymbol")],b)}(c)})},"esri/symbols/WebStyleSymbol":function(){define("require exports tslib ../core/jsonMap ../core/Logger ../core/promiseUtils ../core/accessorSupport/decorators ../portal/Portal ../support/persistableUrlUtils ./Symbol ./support/Thumbnail @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h){function n(){return new Promise(function(a,c){e(["./support/styleUtils"],a,c)})}var p=l.getLogger("esri.symbols.WebStyleSymbol"),r=m.strict()({styleSymbolReference:"web-style"});return function(b){function d(a){a=b.call(this,a)||this;a.styleName=null;a.portal=null;a.styleUrl=null;a.thumbnail=null;a.name=null;a.type="web-style";return a}a.__extends(d,b);e=d;d.prototype.read=function(a,c){this.portal=c?c.portal:void 0;b.prototype.read.call(this,a,c)};d.prototype.clone=
function(){return new e({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};d.prototype.fetchSymbol=function(a){return this._fetchSymbol("webRef",a)};d.prototype.fetchCIMSymbol=function(a){return this._fetchSymbol("cimRef",a)};d.prototype._fetchSymbol=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,n()];case 1:return d=a.sent(),k.throwIfAborted(b),f=d.resolveWebStyleSymbol(this,
{portal:this.portal},c,b),f.catch(function(a){p.error("#fetchSymbol()","Failed to create symbol from style",a)}),[2,f]}})})};var e;a.__decorate([g.property({json:{write:!1}})],d.prototype,"color",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"styleName",void 0);a.__decorate([g.property({type:f,json:{write:!1}})],d.prototype,"portal",void 0);a.__decorate([g.property({type:String,json:{read:c.read,write:c.write}})],d.prototype,"styleUrl",void 0);a.__decorate([g.property({type:h.default,
json:{read:!1}})],d.prototype,"thumbnail",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"name",void 0);a.__decorate([g.property({type:r.apiValues,readOnly:!0,json:{type:r.jsonValues,read:!1,write:r.write}})],d.prototype,"type",void 0);return d=e=a.__decorate([g.subclass("esri.symbols.WebStyleSymbol")],d)}(d)})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Logger ../../core/Warning ../CIMSymbol ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PictureFillSymbol ../PictureMarkerSymbol ../PointSymbol3D ../PolygonSymbol3D ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../Symbol3D ../TextSymbol ../WebStyleSymbol ../callouts/LineCallout3D ./symbolConversion".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y){function z(a,c,b){c=a?C[a.type]||null:null;if(c)return c=new c,c.read(a,b),c;a&&(c="Symbols of type '"+(a.type||"unknown")+"' are not supported",b&&b.messages&&b.messages.push(new l("symbol:unsupported",c,{definition:a,context:b})),B.error(c));return null}function A(c,b,d){if(!c)return null;if(!(!d||"web-scene"!==d.origin||c instanceof q||c instanceof u)){var f="cim"!==c.type?y.to3D(c):{symbol:null,error:new a("symbol-conversion:unsupported-cim-symbol",
"CIM symbol is unsupported in web scenes",{symbol:c})};if(f.symbol)return f.symbol.write(b,d);d.messages&&d.messages.push(new a("symbol:unsupported","Symbols of type '"+c.declaredClass+"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView",{symbol:c,context:d,error:f.error}));return null}return d&&"web-map"===d.origin&&"web-style"===c.type?(d.messages&&d.messages.push(new a("symbol:unsupported","Symbols of type '"+c.declaredClass+"' are not supported in webmaps. Use CIMSymbol instead when working with WebMap in MapView.",
{symbol:c,context:d})),null):c.write(b,d)}Object.defineProperty(b,"__esModule",{value:!0});var C={esriSMS:v,esriPMS:h,esriTS:w,esriSLS:t,esriSFS:r,esriPFS:d,PointSymbol3D:n,LineSymbol3D:f,PolygonSymbol3D:p,MeshSymbol3D:c,LabelSymbol3D:g,styleSymbolReference:u,CIMSymbolReference:k},B=m.getLogger("esri.symbols.support.jsonUtils");b.read=z;b.writeTarget=function(a,c,b,d){(a=A(a,{},d))&&(c[b]=a)};b.write=A;b.fromJSON=function(a,c){return z(a,null,c)};b.readCallout3D=function(a,c){if(!a||!a.type)return null;
var b=null;switch(a.type){case "line":b=new x}b&&b.read(a,c);return b}})},"esri/symbols/support/symbolConversion":function(){define(["require","exports","../../symbols","../../core/Error"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});b.to3D=function(b,e,g,f){void 0===e&&(e=!1);void 0===g&&(g=!1);void 0===f&&(f=!0);if(!b)return{symbol:null};if(a.isSymbol3D(b)||b instanceof a.WebStyleSymbol)f=b.clone();else if("cim"===b.type)f=a.PointSymbol3D.fromCIMSymbol(b);else if(b instanceof
a.SimpleLineSymbol)f=a.LineSymbol3D.fromSimpleLineSymbol(b);else if(b instanceof a.SimpleMarkerSymbol)f=a.PointSymbol3D.fromSimpleMarkerSymbol(b);else if(b instanceof a.PictureMarkerSymbol)f=a.PointSymbol3D.fromPictureMarkerSymbol(b);else if(b instanceof a.SimpleFillSymbol)f=a.PolygonSymbol3D.fromSimpleFillSymbol(b);else if(b instanceof a.TextSymbol)f=f?a.LabelSymbol3D.fromTextSymbol(b):a.PointSymbol3D.fromTextSymbol(b);else return{error:new m("symbol-conversion:unsupported-2d-symbol","2D symbol of type '"+
(b.type||b.declaredClass)+"' is unsupported in 3D",{symbol:b})};e&&(f.id=b.id);if(g&&a.isSymbol3D(f))for(b=0;b<f.symbolLayers.length;++b)f.symbolLayers.getItemAt(b)._ignoreDrivers=!0;return{symbol:f}}})},"esri/renderers/Renderer":function(){define("require exports tslib ../core/jsonMap ../core/JSONSupport ../core/SetUtils ../core/accessorSupport/decorators ./support/AuthoringInfo".split(" "),function(e,b,a,m,l,k,g,f){var c=new m.default({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",
heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary"},{ignoreUnknown:!0});return function(b){function d(a){a=b.call(this,a)||this;a.authoringInfo=null;a.type=null;return a}a.__extends(d,b);d.prototype.getRequiredFields=function(c){return a.__awaiter(this,void 0,void 0,function(){var b;return a.__generator(this,function(a){switch(a.label){case 0:if(!this.collectRequiredFields)return[2,[]];b=new Set;return[4,this.collectRequiredFields(b,c)];case 1:return a.sent(),[2,k.valuesOfSet(b).sort()]}})})};
d.prototype.getSymbol=function(a,c){};d.prototype.getSymbolAsync=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2]})})};d.prototype.getSymbols=function(){return[]};d.prototype.getAttributeHash=function(){return JSON.stringify(this)};d.prototype.getMeshHash=function(){return JSON.stringify(this)};a.__decorate([g.property({type:f,json:{write:!0}})],d.prototype,"authoringInfo",void 0);a.__decorate([g.property({type:c.apiValues,readOnly:!0,
json:{type:c.jsonValues,read:!1,write:{writer:c.write,ignoreOrigin:!0}}})],d.prototype,"type",void 0);return d=a.__decorate([g.subclass("esri.renderers.Renderer")],d)}(l.JSONSupport)})},"esri/renderers/support/AuthoringInfo":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./AuthoringInfoFieldInfo ./AuthoringInfoVisualVariable ../../tasks/support/colorRamps".split(" "),function(e,
b,a,m,l,k,g,f,c,d,h){var n=new m.default({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),p=new m.default({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),r="inches feet yards miles nautical-miles millimeters centimeters decimeters meters kilometers decimal-degrees".split(" ");
return function(b){function e(a){a=b.call(this,a)||this;a.colorRamp=null;a.lengthUnit=null;a.maxSliderValue=null;a.minSliderValue=null;a.visualVariables=null;return a}a.__extends(e,b);q=e;Object.defineProperty(e.prototype,"classificationMethod",{get:function(){var a=this._get("classificationMethod"),c=this.type;return c&&"relationship"!==c?"class-breaks-size"===c||"class-breaks-color"===c?a||"manual":null:a},set:function(a){this._set("classificationMethod",a)},enumerable:!0,configurable:!0});e.prototype.readColorRamp=
function(a){if(a)return h.fromJSON(a)};Object.defineProperty(e.prototype,"fields",{get:function(){return this.type&&"predominance"!==this.type?null:this._get("fields")},set:function(a){this._set("fields",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"field1",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("field1")},set:function(a){this._set("field1",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"field2",{get:function(){return this.type&&
"relationship"!==this.type?null:this._get("field2")},set:function(a){this._set("field2",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"focus",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("focus")},set:function(a){this._set("focus",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"numClasses",{get:function(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")},set:function(a){this._set("numClasses",a)},
enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"standardDeviationInterval",{get:function(){var a=this.type;return a&&"relationship"!==a&&"class-breaks-size"!==a&&"class-breaks-color"!==a?null:this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")},set:function(a){this._set("standardDeviationInterval",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"type",{get:function(){return this._get("type")},
set:function(a){var c=a;"classed-size"===a?c="class-breaks-size":"classed-color"===a&&(c="class-breaks-color");this._set("type",c)},enumerable:!0,configurable:!0});e.prototype.clone=function(){return new q({classificationMethod:this.classificationMethod,colorRamp:k.clone(this.colorRamp),fields:this.fields&&this.fields.slice(0),field1:k.clone(this.field1),field2:k.clone(this.field2),focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,
standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(function(a){return a.clone()})})};var q;a.__decorate([g.property({type:n.apiValues,value:null,dependsOn:["type"],json:{type:n.jsonValues,read:n.read,write:n.write,origins:{"web-document":{default:"manual",type:n.jsonValues,read:n.read,write:n.write}}}})],e.prototype,"classificationMethod",null);a.__decorate([g.property({types:h.types,json:{write:!0}})],e.prototype,
"colorRamp",void 0);a.__decorate([g.reader("colorRamp")],e.prototype,"readColorRamp",null);a.__decorate([g.property({type:[String],value:null,dependsOn:["type"],json:{write:!0}})],e.prototype,"fields",null);a.__decorate([g.property({type:c.default,value:null,dependsOn:["type"],json:{write:!0}})],e.prototype,"field1",null);a.__decorate([g.property({type:c.default,value:null,dependsOn:["type"],json:{write:!0}})],e.prototype,"field2",null);a.__decorate([g.property({type:["HH","HL","LH","LL"],value:null,
dependsOn:["type"],json:{write:!0}})],e.prototype,"focus",null);a.__decorate([g.property({type:Number,value:null,dependsOn:["type"],json:{type:f.Integer,write:!0}})],e.prototype,"numClasses",null);a.__decorate([g.property({type:r,json:{type:r,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],e.prototype,"lengthUnit",void 0);a.__decorate([g.property({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],e.prototype,"maxSliderValue",void 0);a.__decorate([g.property({type:Number,
json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],e.prototype,"minSliderValue",void 0);a.__decorate([g.property({type:[.25,.33,.5,1],value:null,dependsOn:["classificationMethod","type"],json:{type:[.25,.33,.5,1],write:!0}})],e.prototype,"standardDeviationInterval",null);a.__decorate([g.property({type:String,value:null,json:{type:p.jsonValues,read:p.read,write:p.write,origins:{"web-scene":{type:p.jsonValues.filter(function(a){return"dotDensity"!==a}),read:p.read,write:p.write}}}})],e.prototype,
"type",null);a.__decorate([g.property({type:[d],json:{write:!0}})],e.prototype,"visualVariables",void 0);return e=q=a.__decorate([g.subclass("esri.renderers.support.AuthoringInfo")],e)}(l.JSONSupport)})},"esri/renderers/support/AuthoringInfoFieldInfo":function(){define("require exports tslib ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./AuthoringInfoClassBreakInfo".split(" "),function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function c(a){a=
b.call(this,a)||this;a.field="";a.normalizationField="";a.label="";a.classBreakInfos=[];return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:l.clone(this.classBreakInfos)})};var d;a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"field",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"normalizationField",void 0);a.__decorate([k.property({type:String,
json:{write:!0}})],c.prototype,"label",void 0);a.__decorate([k.property({type:[g.default],json:{write:!0}})],c.prototype,"classBreakInfos",void 0);return c=d=a.__decorate([k.subclass("esri.renderers.support.AuthoringInfoFieldInfo")],c)}(m.JSONSupport);b.AuthoringInfoFieldInfo=e;b.default=e})},"esri/renderers/support/AuthoringInfoClassBreakInfo":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,
"__esModule",{value:!0});e=function(b){function e(a){a=b.call(this,a)||this;a.minValue=0;a.maxValue=0;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({minValue:this.minValue,maxValue:this.maxValue})};var f;a.__decorate([l.property({type:Number,json:{write:!0}})],e.prototype,"minValue",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],e.prototype,"maxValue",void 0);return e=f=a.__decorate([l.subclass("esri.renderer.support.AuthoringInfoClassBreakInfo")],e)}(m.JSONSupport);
b.AuthoringInfoClassBreakInfo=e;b.default=e})},"esri/renderers/support/AuthoringInfoVisualVariable":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/decorators/cast".split(" "),function(e,b,a,m,l,k,g){var f=new m.default({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),c=new m.default({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),d={key:function(a){return"number"===
typeof a?"number":"string"},typeMap:{number:Number,string:String},base:null},h=["high-to-low","above-and-below","centered-on","extremes"],n="seconds minutes hours days months years".split(" ");return function(b){function e(a){a=b.call(this,a)||this;a.endTime=null;a.field=null;a.maxSliderValue=null;a.minSliderValue=null;a.startTime=null;a.type=null;a.units=null;return a}a.__extends(e,b);l=e;e.prototype.castEndTime=function(a){return"string"===typeof a||"number"===typeof a?a:null};e.prototype.castStartTime=
function(a){return"string"===typeof a||"number"===typeof a?a:null};Object.defineProperty(e.prototype,"style",{get:function(){return"color"===this.type?this._get("style"):null},set:function(a){this._set("style",a)},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"theme",{get:function(){return"color"===this.type?this._get("theme")||"high-to-low":null},set:function(a){this._set("theme",a)},enumerable:!0,configurable:!0});e.prototype.clone=function(){return new l({endTime:this.endTime,
field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})};var l;a.__decorate([k.property({types:d,json:{write:!0}})],e.prototype,"endTime",void 0);a.__decorate([g.cast("endTime")],e.prototype,"castEndTime",null);a.__decorate([k.property({type:String,json:{write:!0}})],e.prototype,"field",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],e.prototype,"maxSliderValue",
void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],e.prototype,"minSliderValue",void 0);a.__decorate([k.property({types:d,json:{write:!0}})],e.prototype,"startTime",void 0);a.__decorate([g.cast("startTime")],e.prototype,"castStartTime",null);a.__decorate([k.property({type:f.apiValues,value:null,dependsOn:["type"],json:{type:f.jsonValues,read:f.read,write:f.write}})],e.prototype,"style",null);a.__decorate([k.property({type:h,value:null,dependsOn:["type"],json:{type:h,write:!0}})],e.prototype,
"theme",null);a.__decorate([k.property({type:c.apiValues,json:{type:c.jsonValues,read:c.read,write:c.write}})],e.prototype,"type",void 0);a.__decorate([k.property({type:n,json:{type:n,write:!0}})],e.prototype,"units",void 0);return e=l=a.__decorate([k.subclass("esri.renderers.support.AuthoringInfoVisualVariable")],e)}(l.JSONSupport)})},"esri/tasks/support/colorRamps":function(){define(["require","exports","./AlgorithmicColorRamp","./ColorRamp","./MultipartColorRamp"],function(e,b,a,m,l){Object.defineProperty(b,
"__esModule",{value:!0});b.types={key:"type",base:m,typeMap:{algorithmic:a,multipart:l}};b.fromJSON=function(b){return b&&b.type?"algorithmic"===b.type?a.fromJSON(b):"multipart"===b.type?l.fromJSON(b):null:null}})},"esri/tasks/support/AlgorithmicColorRamp":function(){define("require exports tslib ../../Color ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./ColorRamp".split(" "),function(e,b,a,m,l,k,g,f){return function(c){function b(a){a=c.call(this,a)||
this;a.algorithm=null;a.fromColor=null;a.toColor=null;a.type="algorithmic";return a}a.__extends(b,c);f=b;b.prototype.clone=function(){return new f({fromColor:l.clone(this.fromColor),toColor:l.clone(this.toColor),algorithm:this.algorithm})};var f;a.__decorate([k.enumeration({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],b.prototype,"algorithm",void 0);a.__decorate([k.property({type:m,json:{type:[g.Integer],write:!0}})],b.prototype,"fromColor",void 0);a.__decorate([k.property({type:m,
json:{type:[g.Integer],write:!0}})],b.prototype,"toColor",void 0);a.__decorate([k.property({type:["algorithmic"]})],b.prototype,"type",void 0);return b=f=a.__decorate([k.subclass("esri.tasks.support.AlgorithmicColorRamp")],b)}(f)})},"esri/tasks/support/ColorRamp":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type=null;return a}a.__extends(e,b);a.__decorate([l.property({readOnly:!0,
json:{read:!1,write:!0}})],e.prototype,"type",void 0);return e=a.__decorate([l.subclass("esri.tasks.support.ColorRamp")],e)}(m.JSONSupport)})},"esri/tasks/support/MultipartColorRamp":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ./AlgorithmicColorRamp ./ColorRamp".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.colorRamps=null;a.type="multipart";return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({colorRamps:m.clone(this.colorRamps)})};
var d;a.__decorate([l.property({type:[k],json:{write:!0}})],c.prototype,"colorRamps",void 0);a.__decorate([l.property({type:["multipart"]})],c.prototype,"type",void 0);return c=d=a.__decorate([l.subclass("esri.tasks.support.MultipartColorRamp")],c)}(g)})},"esri/renderers/mixins/VisualVariablesMixin":function(){define("require exports tslib ../../core/accessorSupport/decorators ../../layers/support/fieldUtils ../visualVariables/ColorVariable ../visualVariables/OpacityVariable ../visualVariables/RotationVariable ../visualVariables/SizeVariable ../visualVariables/VisualVariable ../visualVariables/VisualVariableFactory".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h){Object.defineProperty(b,"__esModule",{value:!0});var n={base:d,key:"type",typeMap:{opacity:g,color:k,rotation:f,size:c}};b.VisualVariablesMixin=function(c){return function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a._vvFactory=new h;return a}a.__extends(b,c);Object.defineProperty(b.prototype,"visualVariables",{set:function(a){this._vvFactory.visualVariables=a;this._set("visualVariables",this._vvFactory.visualVariables)},enumerable:!0,configurable:!0});
b.prototype.readVisualVariables=function(a,c,b){return this._vvFactory.readVariables(a,c,b)};b.prototype.writeVisualVariables=function(a,c,b,d){c[b]=this._vvFactory.writeVariables(a,d)};Object.defineProperty(b.prototype,"arcadeRequiredForVisualVariables",{get:function(){if(!this.visualVariables)return!1;for(var a=0,c=this.visualVariables;a<c.length;a++)if(c[a].arcadeRequired)return!0;return!1},enumerable:!0,configurable:!0});b.prototype.hasVisualVariables=function(a,c){return a?!!this.getVisualVariablesForType(a,
c):!!(this.getVisualVariablesForType("size",c)||this.getVisualVariablesForType("color",c)||this.getVisualVariablesForType("opacity",c)||this.getVisualVariablesForType("rotation",c))};b.prototype.getVisualVariablesForType=function(a,c){var b=this.visualVariables;if(b&&(b=b.filter(function(b){return b.type===a&&("string"===typeof c?b.target===c:!1===c?!b.target:!0)}),!b||0!==b.length))return b};b.prototype.collectVVRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,
f,e,g;return a.__generator(this,function(a){switch(a.label){case 0:d=[],this.visualVariables&&(d=d.concat(this.visualVariables)),f=0,e=d,a.label=1;case 1:if(!(f<e.length))return[3,4];g=e[f];if(!g)return[3,3];g.field&&l.collectField(c,b,g.field);g.normalizationField&&l.collectField(c,b,g.normalizationField);return g.valueExpression?[4,l.collectArcadeFieldNames(c,b,g.valueExpression)]:[3,3];case 2:a.sent(),a.label=3;case 3:return f++,[3,1];case 4:return[2]}})})};a.__decorate([m.property({types:[n],
value:null,json:{write:!0}})],b.prototype,"visualVariables",null);a.__decorate([m.reader("visualVariables",["visualVariables","rotationType","rotationExpression"])],b.prototype,"readVisualVariables",null);a.__decorate([m.writer("visualVariables")],b.prototype,"writeVisualVariables",null);return b=a.__decorate([m.subclass("esri.renderers.mixins.VisualVariablesMixin")],b)}(c)}})},"esri/renderers/visualVariables/ColorVariable":function(){define("require exports tslib ../../core/accessorSupport/decorators ./VisualVariable ./support/ColorStop".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="color";a.normalizationField=null;return a}a.__extends(f,b);c=f;Object.defineProperty(f.prototype,"cache",{get:function(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"stops",{set:function(a){a&&Array.isArray(a)&&(a=a.filter(function(a){return!!a}),a.sort(function(a,c){return a.value-c.value}));this._set("stops",
a)},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new c({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(function(a){return a.clone()}),legendOptions:this.legendOptions&&this.legendOptions.clone()})};f.prototype.getAttributeHash=function(){return b.prototype.getAttributeHash.call(this)+"-"+this.normalizationField};f.prototype._interpolateData=function(){return this.stops&&
this.stops.map(function(a){return a.value||0})};var c;a.__decorate([m.property({readOnly:!0,dependsOn:["valueExpression","stops"]})],f.prototype,"cache",null);a.__decorate([m.property({type:["color"],json:{type:["colorInfo"]}})],f.prototype,"type",void 0);a.__decorate([m.property({type:String,json:{write:!0}})],f.prototype,"normalizationField",void 0);a.__decorate([m.property({type:[k],json:{write:!0}})],f.prototype,"stops",null);return f=c=a.__decorate([m.subclass("esri.renderers.visualVariables.ColorVariable")],
f)}(l)})},"esri/renderers/visualVariables/VisualVariable":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/Logger ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./support/VisualVariableLegendOptions".split(" "),function(e,b,a,m,l,k,g,f,c){var d=k.getLogger("esri.renderers.visualVariables.VisualVariable"),h=new m.default({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});return function(b){function e(a){a=
b.call(this,a)||this;a.index=null;a.type=null;a.field=null;a.valueExpression=null;a.valueExpressionTitle=null;a.legendOptions=null;return a}a.__extends(e,b);e.prototype.castField=function(a){return null==a?a:"function"===typeof a?(d.error(".field: field must be a string value"),null):f.ensureString(a)};Object.defineProperty(e.prototype,"arcadeRequired",{get:function(){return!!this.valueExpression},enumerable:!0,configurable:!0});e.prototype.clone=function(){};e.prototype.getAttributeHash=function(){return this.type+
"-"+this.field+"-"+this.valueExpression};a.__decorate([g.property()],e.prototype,"index",void 0);a.__decorate([g.property({type:h.apiValues,readOnly:!0,json:{read:h.read,write:h.write}})],e.prototype,"type",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],e.prototype,"field",void 0);a.__decorate([g.cast("field")],e.prototype,"castField",null);a.__decorate([g.property({type:String,json:{write:!0}})],e.prototype,"valueExpression",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],
e.prototype,"valueExpressionTitle",void 0);a.__decorate([g.property({readOnly:!0,dependsOn:["valueExpression"]})],e.prototype,"arcadeRequired",null);a.__decorate([g.property({type:c,json:{write:!0}})],e.prototype,"legendOptions",void 0);return e=a.__decorate([g.subclass("esri.renderers.visualVariables.VisualVariable")],e)}(l.JSONSupport)})},"esri/renderers/visualVariables/support/VisualVariableLegendOptions":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators",
"../../support/LegendOptions"],function(e,b,a,m,l){return function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.showLegend=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({title:this.title,showLegend:this.showLegend})};var f;a.__decorate([m.property({type:Boolean,json:{write:!0}})],e.prototype,"showLegend",void 0);return e=f=a.__decorate([m.subclass("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],e)}(l.default)})},"esri/renderers/support/LegendOptions":function(){define(["require",
"exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.title=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({title:this.title})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"title",void 0);return e=f=a.__decorate([l.subclass("esri.renderers.support.LegendOptions")],e)}(m.JSONSupport);
b.LegendOptions=e;b.default=e})},"esri/renderers/visualVariables/OpacityVariable":function(){define("require exports tslib ../../core/accessorSupport/decorators ./VisualVariable ./support/OpacityStop".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.type="opacity";a.normalizationField=null;return a}a.__extends(f,b);c=f;Object.defineProperty(f.prototype,"cache",{get:function(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}},
enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"stops",{set:function(a){a&&Array.isArray(a)&&(a=a.filter(function(a){return!!a}),a.sort(function(a,c){return a.value-c.value}));this._set("stops",a)},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new c({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(function(a){return a.clone()}),legendOptions:this.legendOptions&&
this.legendOptions.clone()})};f.prototype.getAttributeHash=function(){return b.prototype.getAttributeHash.call(this)+"-"+this.normalizationField};f.prototype._interpolateData=function(){return this.stops&&this.stops.map(function(a){return a.value||0})};var c;a.__decorate([m.property({readOnly:!0,dependsOn:["valueExpression","stops"]})],f.prototype,"cache",null);a.__decorate([m.property({type:["opacity"],json:{type:["transparencyInfo"]}})],f.prototype,"type",void 0);a.__decorate([m.property({type:String,
json:{write:!0}})],f.prototype,"normalizationField",void 0);a.__decorate([m.property({type:[k],json:{write:!0}})],f.prototype,"stops",null);return f=c=a.__decorate([m.subclass("esri.renderers.visualVariables.OpacityVariable")],f)}(l)})},"esri/renderers/visualVariables/support/OpacityStop":function(){define("require exports tslib ../../../core/JSONSupport ../../../core/accessorSupport/decorators ../../../core/accessorSupport/ensureType ../../../webdoc/support/opacityUtils".split(" "),function(e,b,
a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.label=null;a.opacity=null;a.value=null;return a}a.__extends(c,b);d=c;c.prototype.readOpacity=function(a,c){return g.transparencyToOpacity(c.transparency)};c.prototype.writeOpacity=function(a,c,b){c[b]=g.opacityToTransparency(a)};c.prototype.clone=function(){return new d({label:this.label,opacity:this.opacity,value:this.value})};var d;a.__decorate([l.property({type:String,json:{write:!0}})],c.prototype,"label",void 0);a.__decorate([l.property({type:Number,
json:{type:k.Integer,write:{target:"transparency"}}})],c.prototype,"opacity",void 0);a.__decorate([l.reader("opacity",["transparency"])],c.prototype,"readOpacity",null);a.__decorate([l.writer("opacity")],c.prototype,"writeOpacity",null);a.__decorate([l.property({type:Number,json:{write:!0}})],c.prototype,"value",void 0);return c=d=a.__decorate([l.subclass("esri.renderers.visualVariables.support.OpacityStop")],c)}(m.JSONSupport)})},"esri/renderers/visualVariables/RotationVariable":function(){define("require exports tslib ../../core/Error ../../core/accessorSupport/decorators ./VisualVariable".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.axis=null;a.type="rotation";a.rotationType="geographic";a.valueExpressionTitle=null;return a}a.__extends(f,b);c=f;Object.defineProperty(f.prototype,"cache",{get:function(){return{hasExpression:!!this.valueExpression,compiledFunc:null}},enumerable:!0,configurable:!0});f.prototype.writeValueExpressionTitleWebScene=function(a,c,b,f){f&&f.messages&&f.messages.push(new m("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",
{instance:this,propertyName:"visualVariables["+this.index+"].valueExpressionTitle",context:f}))};f.prototype.clone=function(){return new c({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions&&this.legendOptions.clone()})};var c;a.__decorate([l.property({readOnly:!0,dependsOn:["valueExpression"]})],f.prototype,"cache",null);a.__decorate([l.property({type:["heading","tilt",
"roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],f.prototype,"axis",void 0);a.__decorate([l.property({type:["rotation"],json:{type:["rotationInfo"]}})],f.prototype,"type",void 0);a.__decorate([l.property({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],f.prototype,"rotationType",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],f.prototype,"valueExpressionTitle",void 0);a.__decorate([l.writer("web-scene",
"valueExpressionTitle")],f.prototype,"writeValueExpressionTitleWebScene",null);return f=c=a.__decorate([l.subclass("esri.renderers.visualVariables.RotationVariable")],f)}(k)})},"esri/renderers/visualVariables/SizeVariable":function(){define("require exports tslib ../../core/Error ../../core/jsonMap ../../core/Logger ../../core/screenUtils ../../core/accessorSupport/decorators ./VisualVariable ./support/SizeStop ./support/SizeVariableLegendOptions ./support/sizeVariableUtils ./support/visualVariableUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){function r(c){if(null!=c){if("string"===typeof c||"number"===typeof c)return g.toPt(c);if("size"===c.type){if(n.isSizeVariable(c))return c;c=a.__assign({},c);delete c.type;return new u(c)}}}function t(a,c,b){if("object"!==typeof a)return a;c=new u;c.read(a,b);return c}var v=k.getLogger("esri.renderers.visualVariables.SizeVariable"),q=new l.default({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new l.default({unknown:"unknown",
inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"}),u=function(c){function b(a){a=c.call(this,a)||this;a.axis=null;a.legendOptions=null;a.normalizationField=null;a.scaleBy=null;a.target=null;a.type="size";a.useSymbolValue=null;a.valueExpression=null;a.valueRepresentation=null;a.valueUnit=null;return a}a.__extends(b,c);
e=b;Object.defineProperty(b.prototype,"cache",{get:function(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:p.viewScaleRE.test(this.valueExpression)}},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"expression",{set:function(a){v.warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'.");"view.scale"===a?(this.valueExpression="$view.scale",this._set("expression",
a)):this._set("expression",null)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"index",{set:function(a){n.isSizeVariable(this.maxSize)&&(this.maxSize.index="visualVariables["+a+"].maxSize");n.isSizeVariable(this.minSize)&&(this.minSize.index="visualVariables["+a+"].minSize");this._set("index",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"inputValueType",{get:function(){return n.getInputValueType(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
"maxDataValue",{set:function(a){a&&this.stops&&(v.warn("cannot set maxDataValue when stops is not null."),a=null);this._set("maxDataValue",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"maxSize",{set:function(a){a&&this.stops&&(v.warn("cannot set maxSize when stops is not null."),a=null);this._set("maxSize",a)},enumerable:!0,configurable:!0});b.prototype.castMaxSize=function(a){return r(a)};b.prototype.readMaxSize=function(a,c,b){return t(a,c,b)};Object.defineProperty(b.prototype,
"minDataValue",{set:function(a){a&&this.stops&&(v.warn("cannot set minDataValue when stops is not null."),a=null);this._set("minDataValue",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"minSize",{set:function(a){a&&this.stops&&(v.warn("cannot set minSize when stops is not null."),a=null);this._set("minSize",a)},enumerable:!0,configurable:!0});b.prototype.castMinSize=function(a){return r(a)};b.prototype.readMinSize=function(a,c,b){return t(a,c,b)};Object.defineProperty(b.prototype,
"arcadeRequired",{get:function(){return this.valueExpression?!0:this.minSize&&"object"===typeof this.minSize&&this.minSize.arcadeRequired||this.maxSize&&"object"===typeof this.maxSize&&this.maxSize.arcadeRequired},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"stops",{set:function(a){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?a&&Array.isArray(a)&&(a=a.filter(function(a){return!!a}),a.sort(function(a,c){return a.value-c.value})):a&&
(v.warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),a=null);this._set("stops",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"transformationType",{get:function(){return n.getTransformationType(this,this.inputValueType)},enumerable:!0,configurable:!0});b.prototype.readValueExpression=function(a,c){return a||c.expression&&"$view.scale"};b.prototype.writeValueExpressionWebScene=function(a,c,b,d){"$view.scale"===a?d&&d.messages&&(a=
this.index,d.messages.push(new m("property:unsupported",this.type+"VisualVariable.valueExpression \x3d '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:("string"===typeof a?a:"visualVariables["+a+"]")+".valueExpression",context:d}))):c[b]=a};b.prototype.readValueUnit=function(a){return a?w.read(a):null};b.prototype.clone=function(){return new e({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,
maxDataValue:this.maxDataValue,maxSize:n.isSizeVariable(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:n.isSizeVariable(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map(function(a){return a.clone()}),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone()})};
b.prototype.flipSizes=function(){if("clamped-linear"===this.transformationType){var a=this.minSize;this.minSize=this.maxSize;this.maxSize=a;return this}if("stops"===this.transformationType)for(var a=this.stops,c=a.map(function(a){return a.size}).reverse(),b=a.length,d=0;d<b;d++)a[d].size=c[d];return this};b.prototype.getAttributeHash=function(){return c.prototype.getAttributeHash.call(this)+"-"+this.target+"-"+this.normalizationField};b.prototype._interpolateData=function(){return this.stops&&this.stops.map(function(a){return a.value||
0})};var e;a.__decorate([f.property({readOnly:!0,dependsOn:["valueExpression","stops"]})],b.prototype,"cache",null);a.__decorate([f.property({type:q.apiValues,json:{type:q.jsonValues,origins:{"web-map":{read:!1}},read:q.read,write:q.write}})],b.prototype,"axis",void 0);a.__decorate([f.property({type:String,value:null,json:{read:!1}})],b.prototype,"expression",null);a.__decorate([f.property()],b.prototype,"index",null);a.__decorate([f.property({type:String,readOnly:!0,dependsOn:["field","valueExpression"]})],
b.prototype,"inputValueType",null);a.__decorate([f.property({type:h,json:{write:!0}})],b.prototype,"legendOptions",void 0);a.__decorate([f.property({type:Number,value:null,json:{write:!0}})],b.prototype,"maxDataValue",null);a.__decorate([f.property({type:Number,value:null,json:{write:!0}})],b.prototype,"maxSize",null);a.__decorate([f.cast("maxSize")],b.prototype,"castMaxSize",null);a.__decorate([f.reader("maxSize")],b.prototype,"readMaxSize",null);a.__decorate([f.property({type:Number,value:null,
json:{write:!0}})],b.prototype,"minDataValue",null);a.__decorate([f.property({type:Number,value:null,json:{write:!0}})],b.prototype,"minSize",null);a.__decorate([f.cast("minSize")],b.prototype,"castMinSize",null);a.__decorate([f.reader("minSize")],b.prototype,"readMinSize",null);a.__decorate([f.property({type:String,json:{write:!0}})],b.prototype,"normalizationField",void 0);a.__decorate([f.property({readOnly:!0,dependsOn:["valueExpression","minSize.arcadeRequired","maxSize.arcadeRequired"]})],b.prototype,
"arcadeRequired",null);a.__decorate([f.property({type:String})],b.prototype,"scaleBy",void 0);a.__decorate([f.property({type:[d],value:null,json:{write:!0}})],b.prototype,"stops",null);a.__decorate([f.property({type:["outline"],json:{write:!0}})],b.prototype,"target",void 0);a.__decorate([f.property({type:String,readOnly:!0,dependsOn:"minDataValue maxDataValue minSize maxSize valueUnit inputValueType stops".split(" ")})],b.prototype,"transformationType",null);a.__decorate([f.property({type:["size"],
json:{type:["sizeInfo"]}})],b.prototype,"type",void 0);a.__decorate([f.property({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],b.prototype,"useSymbolValue",void 0);a.__decorate([f.property({type:String,json:{write:!0}})],b.prototype,"valueExpression",void 0);a.__decorate([f.reader("valueExpression",["valueExpression","expression"])],b.prototype,"readValueExpression",null);a.__decorate([f.writer("web-scene","valueExpression")],b.prototype,"writeValueExpressionWebScene",null);a.__decorate([f.property({type:["radius",
"diameter","area","width","distance"],json:{write:!0}})],b.prototype,"valueRepresentation",void 0);a.__decorate([f.property({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0}}}})],b.prototype,"valueUnit",void 0);a.__decorate([f.reader("valueUnit")],b.prototype,"readValueUnit",null);return b=e=a.__decorate([f.subclass("esri.renderers.visualVariables.SizeVariable")],b)}(c);return u})},"esri/renderers/visualVariables/support/SizeStop":function(){define("require exports tslib ../../../core/JSONSupport ../../../core/screenUtils ../../../core/accessorSupport/decorators".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.label=null;a.size=null;a.value=null;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({label:this.label,size:this.size,value:this.value})};var c;a.__decorate([k.property({type:String,json:{write:!0}})],f.prototype,"label",void 0);a.__decorate([k.property({type:Number,cast:l.toPt,json:{write:!0}})],f.prototype,"size",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],f.prototype,"value",
void 0);return f=c=a.__decorate([k.subclass("esri.renderers.visualVariables.support.SizeStop")],f)}(m.JSONSupport)})},"esri/renderers/visualVariables/support/SizeVariableLegendOptions":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./VisualVariableLegendOptions"],function(e,b,a,m,l){return function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.customValues=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({title:this.title,
showLegend:this.showLegend,customValues:this.customValues&&this.customValues.slice(0)})};var f;a.__decorate([m.property({type:[Number],json:{write:!0}})],e.prototype,"customValues",void 0);return e=f=a.__decorate([m.subclass("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],e)}(l)})},"esri/renderers/visualVariables/support/sizeVariableUtils":function(){define(["require","exports"],function(e,b){function a(a){return a.valueExpression?"expression":a.field&&"string"===typeof a.field?
"field":"unknown"}Object.defineProperty(b,"__esModule",{value:!0});b.isSizeVariable=function(a){return a&&"esri.renderers.visualVariables.SizeVariable"===a.declaredClass};b.isValidNumber=function(a){return null!=a&&!isNaN(a)&&isFinite(a)};b.getInputValueType=a;b.getTransformationType=function(b,e){return"unknown"===(e||a(b))?"constant":b.stops?"stops":null!=b.minSize&&null!=b.maxSize&&null!=b.minDataValue&&null!=b.maxDataValue?"clamped-linear":"unknown"===(b.valueUnit||"unknown")?null!=b.minSize&&
null!=b.minDataValue?b.minSize&&b.minDataValue?"proportional":"additive":"identity":"real-world-size"}})},"esri/renderers/visualVariables/support/visualVariableUtils":function(){define("require exports ../../../Color ../../../Graphic ../../../core/compilerUtils ../../../core/Logger ../../../core/maybe ../../support/utils ./sizeVariableUtils".split(" "),function(e,b,a,m,l,k,g,f,c){function d(c,b,d){if(c="visualVariables"in c&&c.visualVariables?c.visualVariables.filter(function(a){return"color"===a.type})[0]:
c)if("esri.renderers.visualVariables.ColorVariable"!==c.declaredClass)u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");else{var f="number"===typeof b,e=f?null:b,h=e&&e.attributes,k=f?b:null,n=c.field,l=c.cache;b=l.ipData;var q=l.hasExpression,l=c.cache.compiledFunc;if(!n&&!q)return(d=c.stops)&&d[0]&&d[0].color;if("number"!==typeof k)if(q){if(!g.isSome(d)||!g.isSome(d.arcade)){u.error("Use of arcade expressions requires an arcade context");return}k=
d.arcade.arcadeUtils;n=k.getViewInfo({viewingMode:d.viewingMode,scale:d.scale,spatialReference:d.spatialReference});e=k.createExecContext(e,n);l||(l=k.createSyntaxTree(c.valueExpression),l=k.createFunction(l),c.cache.compiledFunc=l);k=k.executeFunction(l,e)}else h&&(k=h[n]);e=c.normalizationField;h=h?parseFloat(h[e]):void 0;if(null!=k&&(!e||f||!isNaN(h)&&0!==h)&&(isNaN(h)||f||(k/=h),f=w(k,b)))return h=f[0],b=f[1],d=h===b?c.stops[h].color:a.blendColors(c.stops[h].color,c.stops[b].color,f[2],g.isSome(d)?
d.color:void 0),new a(d)}}function h(a,c,b){if(a="visualVariables"in a&&a.visualVariables?a.visualVariables.filter(function(a){return"opacity"===a.type})[0]:a)if("esri.renderers.visualVariables.OpacityVariable"!==a.declaredClass)u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");else{var d="number"===typeof c,f=d?null:c,e=f&&f.attributes,h=d?c:null,k=a.field,l=a.cache;c=l.ipData;var n=l.hasExpression,l=a.cache.compiledFunc;if(!k&&!n)return(a=a.stops)&&
a[0]&&a[0].opacity;if("number"!==typeof h)if(n){if(g.isNone(b)||g.isNone(b.arcade)){u.error("Use of arcade expressions requires an arcade context");return}h=b.arcade.arcadeUtils;b=h.getViewInfo({viewingMode:b.viewingMode,scale:b.scale,spatialReference:b.spatialReference});b=h.createExecContext(f,b);l||(f=h.createSyntaxTree(a.valueExpression),l=h.createFunction(f),a.cache.compiledFunc=l);h=h.executeFunction(l,b)}else e&&(h=e[k]);b=a.normalizationField;e=e?parseFloat(e[b]):void 0;if(null!=h&&(!b||d||
!isNaN(e)&&0!==e)&&(isNaN(e)||d||(h/=e),d=w(h,c))){c=d[0];e=d[1];if(c===e)return a.stops[c].opacity;c=a.stops[c].opacity;return c+(a.stops[e].opacity-c)*d[2]}}}function n(a,c,b){if(a="visualVariables"in a&&a.visualVariables?a.visualVariables.filter(function(a){return"rotation"===a.type})[0]:a)if("esri.renderers.visualVariables.RotationVariable"!==a.declaredClass)u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");else{var d=a.axis||"heading",f="heading"===
d&&"arithmetic"===a.rotationType?90:0,d="heading"===d&&"arithmetic"===a.rotationType?-1:1,e="number"===typeof c?null:c,h=e&&e.attributes,k=a.field,l=a.cache.hasExpression;c=a.cache.compiledFunc;var n=0;if(!k&&!l)return n;if(l){if(g.isNone(b)||g.isNone(b.arcade)){u.error("Use of arcade expressions requires an arcade context");return}h=b.arcade.arcadeUtils;b=h.getViewInfo({viewingMode:b.viewingMode,scale:b.scale,spatialReference:b.spatialReference});b=h.createExecContext(e,b);c||(c=h.createSyntaxTree(a.valueExpression),
c=h.createFunction(c),a.cache.compiledFunc=c);n=h.executeFunction(c,b)}else h&&(n=h[k]||0);return n="number"!==typeof n||isNaN(n)?null:f+d*n}}function p(a,b,d){var f="number"===typeof b,e=f?null:b,h=e&&e.attributes,k=f?b:null;b=a.cache.compiledFunc;if(a.cache.isScaleDriven)e=g.isSome(d)?d.scale:void 0,d=g.isSome(d)?d.view:void 0,null==e||d&&"3d"===d.type?(e=d=null,(e=a.stops)?(d=e[0].value,e=e[e.length-1].value):(d=a.minDataValue||0,e=a.maxDataValue||0),d=(d+e)/2):d=e,k=d;else if(!f)switch(a.inputValueType){case "expression":if(g.isNone(d)||
g.isNone(d.arcade)){u.error("Use of arcade expressions requires an arcade context");return}k=d.arcade.arcadeUtils;d=k.getViewInfo({viewingMode:d.viewingMode,scale:d.scale,spatialReference:d.spatialReference});d=k.createExecContext(e,d);b||(e=k.createSyntaxTree(a.valueExpression),b=k.createFunction(e),a.cache.compiledFunc=b);k=k.executeFunction(b,d);break;case "field":h&&(k=h[a.field]);break;case "unknown":k=null}if(!c.isValidNumber(k))return null;if(f||!a.normalizationField)return k;a=h?parseFloat(h[a.normalizationField]):
null;return c.isValidNumber(a)&&0!==a?k/a:null}function r(a,c,b){if(a="visualVariables"in a&&a.visualVariables?a.visualVariables.filter(function(a){return"size"===a.type})[0]:a)if("esri.renderers.visualVariables.SizeVariable"!==a.declaredClass)u.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");else{var d=p(a,c,b);c=q(d,a,c,b,a.cache.ipData);return null===c||void 0===c||isNaN(c)?0:c}}function t(a,b,d){return null==a?null:c.isSizeVariable(a)?r(a,b,d):c.isValidNumber(a)?
a:null}function v(a,b,d){return c.isValidNumber(d)&&a>d?d:c.isValidNumber(b)&&a<b?b:a}function q(a,c,b,d,e){switch(c.transformationType){case "additive":return d=t(c.minSize,b,d),a+(d||c.minDataValue);case "constant":return a=(a=c.stops)&&a.length&&a[0].size,null==a&&(a=c.minSize),t(a,b,d);case "clamped-linear":e=(a-c.minDataValue)/(c.maxDataValue-c.minDataValue);var h=t(c.minSize,b,d);b=t(c.maxSize,b,d);d=g.isSome(d)?d.shape:void 0;a<=c.minDataValue?c=h:a>=c.maxDataValue?c=b:"area"===c.scaleBy&&
d?(d=(c="circle"===d)?y*Math.pow(h/2,2):h*h,d+=e*((c?y*Math.pow(b/2,2):b*b)-d),c=c?2*Math.sqrt(d/y):Math.sqrt(d)):c=h+e*(b-h);return c;case "proportional":return e=g.isSome(d)?d.shape:void 0,a/=c.minDataValue,h=t(c.minSize,b,d),c=t(c.maxSize,b,d),d=null,d="circle"===e?2*Math.sqrt(a*Math.pow(h/2,2)):"square"===e||"diamond"===e||"image"===e?Math.sqrt(a*Math.pow(h,2)):a*h,v(d,h,c);case "stops":return e=w(a,e),h=e[0],a=e[1],e=e[2],h===a?c=t(c.stops[h].size,b,d):(h=t(c.stops[h].size,b,d),c=t(c.stops[a].size,
b,d),c=h+(c-h)*e),c;case "real-world-size":return e=(g.isSome(d)&&d.resolution?d.resolution:1)*f.meterIn[c.valueUnit],h=t(c.minSize,b,d),d=t(c.maxSize,b,d),c=c.valueRepresentation,b=null,b="area"===c?2*Math.sqrt(a/y)/e:"radius"===c||"distance"===c?2*a/e:a/e,v(b,h,d);case "identity":return a;case "unknown":return null}}function w(a,c){if(c){var b=0,d=c.length-1;c.some(function(c,f){if(a<c)return d=f,!0;b=f;return!1});return[b,d,(a-c[b])/(c[d]-c[b])]}}Object.defineProperty(b,"__esModule",{value:!0});
var u=k.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),x=new m,y=Math.PI;b.viewScaleRE=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;b.getColor=d;b.getOpacity=h;b.getRotationAngle=n;b.getSize=r;b.getSizeFromNumberOrVariable=t;b.getSizeForValue=q;b.getSizeRangeAtScale=function(a,c,b){var d=b&&"3d"===b.type;if(!(a.cache.isScaleDriven&&d||c))return null;b={scale:c,view:b};c=t(a.minSize,x,b);a=t(a.maxSize,x,b);if(null!=c||null!=a)return c>a&&(b=a,a=c,c=b),{minSize:c,maxSize:a}};
b.getVisualVariableValues=function(a,c,b){if(a.visualVariables){var f=[],e=[],g=[],k=[],l=[],q=0;for(a=a.visualVariables;q<a.length;q++){var p=a[q];switch(p.type){case "color":e.push(p);break;case "opacity":g.push(p);break;case "rotation":l.push(p);break;case "size":k.push(p)}}e.forEach(function(a){var e=d(a,c,b);f.push({variable:a,value:e})});g.forEach(function(a){var d=h(a,c,b);f.push({variable:a,value:d})});l.forEach(function(a){var d=n(a,c,b);f.push({variable:a,value:d})});k.forEach(function(a){var d=
r(a,c,b);f.push({variable:a,value:d})});return f.filter(function(a){return null!=a.value})}};b.getAllSizes=function(a,c,b){for(var d=["proportional","proportional","proportional"],f=0;f<a.length;f++){var e=a[f],g=e.useSymbolValue?"symbol-value":r(e,c,b);switch(e.axis){case "width":d[0]=g;break;case "depth":d[1]=g;break;case "height":d[2]=g;break;case "width-and-depth":d[0]=g;d[1]=g;break;case "all":case void 0:case null:d[0]=g;d[1]=g;d[2]=g;break;default:l.neverReached(e.axis)}}return d}})},"esri/Graphic":function(){define("require exports tslib ./geometry ./PopupTemplate ./symbols ./core/JSONSupport ./core/lang ./core/maybe ./core/accessorSupport/decorators ./geometry/support/jsonUtils ./symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){e=function(b){function e(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a=b.apply(this,a)||this;a.layer=null;a.popupTemplate=null;a.sourceLayer=null;Object.defineProperty(a,"uid",{value:g.generateUID()});return a}a.__extends(e,b);g=e;e.prototype.normalizeCtorArgs=function(a,c,b,d){return a&&!a.declaredClass?a:{geometry:a,symbol:c,attributes:b,popupTemplate:d}};Object.defineProperty(e.prototype,"attributes",{set:function(a){var c=this._get("attributes");
c!==a&&(this._set("attributes",a),this._notifyLayer("attributes",c,a))},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"geometry",{set:function(a){var c=this._get("geometry");c!==a&&(this._set("geometry",a),this._notifyLayer("geometry",c,a))},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"symbol",{set:function(a){var c=this._get("symbol");c!==a&&(this._set("symbol",a),this._notifyLayer("symbol",c,a))},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,
"visible",{set:function(a){var c=this._get("visible");c!==a&&(this._set("visible",a),this._notifyLayer("visible",c,a))},enumerable:!0,configurable:!0});e.prototype.getEffectivePopupTemplate=function(a){void 0===a&&(a=!1);return this.popupTemplate?this.popupTemplate:this.sourceLayer?this.sourceLayer.popupTemplate?this.sourceLayer.popupTemplate:a&&c.isSome(this.sourceLayer.defaultPopupTemplate)?this.sourceLayer.defaultPopupTemplate:null:null};e.prototype.getAttribute=function(a){return this.attributes&&
this.attributes[a]};e.prototype.setAttribute=function(a,c){var b;this.attributes?(b=this.getAttribute(a),this.attributes[a]=c,this._notifyLayer("attributes",b,c,a)):(this.attributes=(b={},b[a]=c,b),this._notifyLayer("attributes",void 0,c,a))};e.prototype.getObjectId=function(){return this.sourceLayer?this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null:null};e.prototype.toJSON=function(){return{geometry:c.isSome(this.geometry)?this.geometry.toJSON():null,symbol:c.isSome(this.symbol)?
this.symbol.toJSON():null,attributes:a.__assign({},this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};e.prototype.clone=function(){return new g(this.cloneProperties())};e.prototype.cloneProperties=function(){return{attributes:f.clone(this.attributes),geometry:f.clone(this.geometry),layer:this.layer,popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),sourceLayer:this.sourceLayer,symbol:f.clone(this.symbol),visible:this.visible}};e.prototype._notifyLayer=function(a,
c,b,d){this.layer&&this.layer.graphicChanged&&(c={graphic:this,property:a,oldValue:c,newValue:b},"attributes"===a&&(c.attributeName=d),this.layer.graphicChanged(c))};var g;a.__decorate([d.property({value:null})],e.prototype,"attributes",null);a.__decorate([d.property({value:null,types:m.geometryTypes,json:{read:h.fromJSON}})],e.prototype,"geometry",null);a.__decorate([d.property()],e.prototype,"layer",void 0);a.__decorate([d.property({type:l})],e.prototype,"popupTemplate",void 0);a.__decorate([d.property()],
e.prototype,"sourceLayer",void 0);a.__decorate([d.property({value:null,types:k.symbolTypes,json:{read:n.read}})],e.prototype,"symbol",null);a.__decorate([d.property({type:Boolean,value:!0})],e.prototype,"visible",null);return e=g=a.__decorate([d.subclass("esri.Graphic")],e)}(g.JSONSupport);var p=0;(function(a){a.generateUID=function(){return p++}})(e||(e={}));return e})},"esri/renderers/visualVariables/VisualVariableFactory":function(){define("require exports tslib ../../core/Accessor ../../core/jsonMap ../../core/Logger ../../core/Warning ../../core/accessorSupport/decorators ./ColorVariable ./OpacityVariable ./RotationVariable ./SizeVariable".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){var p=k.getLogger("esri.renderers.visualVariables.VisualVariableFactory"),r={color:c,size:n,opacity:d,rotation:h},t=new l.default({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),v=/^\[([^\]]+)\]$/i;return function(c){function b(){var a=null!==c&&c.apply(this,arguments)||this;a.colorVariables=null;a.opacityVariables=null;a.rotationVariables=null;a.sizeVariables=null;return a}a.__extends(b,c);Object.defineProperty(b.prototype,
"visualVariables",{set:function(a){this._resetVariables();if((a=a&&a.filter(function(a){return!!a}))&&a.length){for(var c=0,b=a;c<b.length;c++){var d=b[c];switch(d.type){case "color":this.colorVariables.push(d);break;case "opacity":this.opacityVariables.push(d);break;case "rotation":this.rotationVariables.push(d);break;case "size":this.sizeVariables.push(d)}}this.sizeVariables.length&&this.sizeVariables.some(function(a){return!!a.target})&&a.sort(function(a,c){var b=null;return b=a.target===c.target?
0:a.target?1:-1});for(c=0;c<a.length;c++)d=a[c],d.index=c}this._set("visualVariables",a)},enumerable:!0,configurable:!0});b.prototype.readVariables=function(a,c,b){var d=c.rotationExpression;c=c.rotationType;if(d=(d=d&&d.match(v))&&d[1])a||(a=[]),a.push({type:"rotationInfo",rotationType:c,field:d});if(a)return a.map(function(a){var c=t.read(a.type),d=r[c];d||(p.warn("Unknown variable type: "+c),b&&b.messages&&b.messages.push(new g("visual-variable:unsupported","visualVariable of type '"+c+"' is not supported",
{definition:a,context:b})));c=new d;c.read(a,b);return c})};b.prototype.writeVariables=function(a,c){for(var b=[],d=0;d<a.length;d++){var f=a[d].toJSON(c);f&&b.push(f)}return b};b.prototype._resetVariables=function(){this.colorVariables=[];this.opacityVariables=[];this.rotationVariables=[];this.sizeVariables=[]};a.__decorate([f.property()],b.prototype,"visualVariables",null);return b=a.__decorate([f.subclass("esri.renderers.visualVariables.VisualVariableFactory")],b)}(m)})},"esri/renderers/support/ClassBreakInfo":function(){define("require exports tslib ../../symbols ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.description=null;a.label=null;a.minValue=null;a.maxValue=0;a.symbol=null;return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})};c.prototype.getMeshHash=function(){var a=JSON.stringify(this.symbol);return this.minValue+"."+this.maxValue+"."+a};var d;a.__decorate([k.property({type:String,
json:{write:!0}})],c.prototype,"description",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"label",void 0);a.__decorate([k.property({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],c.prototype,"minValue",void 0);a.__decorate([k.property({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],c.prototype,"maxValue",void 0);a.__decorate([k.property({types:m.symbolTypesRenderer,json:{origins:{"web-scene":{types:m.symbolTypesRenderer3D,
read:g.read,write:g.writeTarget}},read:g.read,write:g.writeTarget}})],c.prototype,"symbol",void 0);return c=d=a.__decorate([k.subclass("esri.renderers.support.ClassBreakInfo")],c)}(l.JSONSupport)})},"esri/renderers/DictionaryRenderer":function(){define("require exports tslib ../Color ../request ../core/Error ../core/lang ../core/Logger ../core/LRUCache ../core/maybe ../core/promiseUtils ../core/SetUtils ../core/string ../core/accessorSupport/decorators ../layers/support/fieldUtils ./Renderer ./mixins/VisualVariablesMixin ../support/arcadeOnDemand ../symbols/CIMSymbol".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u){var x=f.getLogger("esri.renderers.DictionaryRenderer");return function(b){function f(a){a=b.call(this,a)||this;a._ongoingRequests=new Map;a._symbolCache=new c(100);a.config=null;a.description=null;a.fieldMap=null;a.label=null;a.scaleExpression=null;a.url=null;a.type="dictionary";return a}a.__extends(f,b);e=f;f.prototype.clone=function(){return new e({config:g.clone(this.config),scaleExpression:g.clone(this.scaleExpression),description:g.clone(this.description),
fieldMap:g.clone(this.fieldMap),label:g.clone(this.label),url:g.clone(this.url),visualVariables:g.clone(this.visualVariables)})};f.prototype.getSymbolAsync=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,f,e,g,k,l,n,q,t,v,u,r,w,x,B,y,C,z,A,S,R,V,fa,X,ba,ea,ca=this;return a.__generator(this,function(a){switch(a.label){case 0:this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(b)),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this._dictionaryPromise];case 2:return d=
a.sent(),[3,4];case 3:return f=a.sent(),h.isAbortError(f)?(this._dictionaryPromise=null,[2,null]):[3,4];case 4:e={};g=0;for(k=this._symbolAttributes;g<k.length;g++)l=k[g],(n=this.fieldMap[l])&&null!==c.attributes[n]&&void 0!==c.attributes[n]?(q=""+c.attributes[n],e[l]=q):e[l]="";t=d(e,b);if(!t||"string"!==typeof t)return[2,null];v=p.numericHash(t).toString();if(u=this._symbolCache.get(v))return u.catch(function(){ca._symbolCache.pop(v)}),[2,u];r=t.split(";");w=[];x=[];B=0;for(y=r;B<y.length;B++)if((C=
y[B])&&0!==C.length)if(-1!==C.indexOf("po:"))z=C.substr(3).split("|"),3===z.length&&(A=z[0],S=z[1],R=z[2],"DashTemplate"===S?R=R.split(" ").map(function(a){return Number(a)}):"Color"===S?(V=(new m(R)).toRgba(),R=[V[0],V[1],V[2],255*V[3]]):R=Number(R),x.push({primitiveName:A,propertyName:S,value:R}));else if(-1!==C.indexOf("|"))for(fa=0,X=C.split("|");fa<X.length;fa++)ba=X[fa],this._itemNames.has(ba)&&w.push(ba);else this._itemNames.has(C)&&w.push(C);ea=this._cimPartsToCIMSymbol(w,x,b);this._symbolCache.put(v,
ea,1);return[2,ea]}})})};f.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.collectVVRequiredFields(c,b)];case 1:return a.sent(),this.scaleExpression?[4,t.collectArcadeFieldNames(c,b,this.scaleExpression)]:[3,3];case 2:a.sent(),a.label=3;case 3:d=b.map(function(a){return a.name});for(f in this.fieldMap)0>d.indexOf(this.fieldMap[f])||c.add(this.fieldMap[f]);return[2]}})})};
Object.defineProperty(f.prototype,"arcadeRequired",{get:function(){return!0},enumerable:!0,configurable:!0});f.prototype.fetchResources=function(c){return a.__awaiter(this,void 0,void 0,function(){var b,f,e,g,q,p,m,t,v,u,r,y,C,z,A,U,W;return a.__generator(this,function(B){switch(B.label){case 0:if(!this.url)return x.error("no valid URL!"),[2,void 0];b=d.isSome(c)?c.abortOptions:null;f=l(this.url+"/resources/styles/dictionary-info.json",a.__assign({responseType:"json",query:{f:"json"}},b));return[4,
h.all([f,w.loadArcade()])];case 1:e=B.sent()[0].data;if(!e)throw new k("esri.renderers.DictionaryRenderer","Bad dictionary data!");g=e.expression;q=e.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+e.cimRefTemplateUrl;this._itemNames=n.SetFromValues(e.itemsNames);this._symbolAttributes=q.symbol;p={};if(this.config)for(t in m=this.config,m)p[t]=m[t];v=0;for(u=q.configuration;v<u.length;v++)t=u[v],p.hasOwnProperty(t.name)||(p[t.name]=t.value);r=[];if(d.isSome(c)&&c.fields)for(y=function(b){var d=
C.fieldMap[b],f=c.fields.filter(function(a){return a.name===d});0<f.length&&r.push(a.__assign(a.__assign({},f[0]),{name:b}))},C=this,z=0,A=this._symbolAttributes;z<A.length;z++)t=A[z],y(t);return[4,w.createDictionaryExpression(g,d.isSome(c)?c.spatialReference:null,r,p)];case 2:return U=B.sent(),W={scale:0},[2,function(a,c){a=U.repurposeFeature({geometry:null,attributes:a});W.scale=d.isSome(c)?c.scale:void 0;return U.evaluate({$feature:a,$view:W})}]}})})};f.prototype.getSymbol=function(){return null};
f.prototype.getSymbols=function(){return[]};f.prototype.getAttributeHash=function(){return this.visualVariables&&this.visualVariables.reduce(function(a,c){return a+c.getAttributeHash()},"")};f.prototype.getMeshHash=function(){return this.url+"-"+JSON.stringify(this.fieldMap)};f.prototype._getSymbolPart=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,f,e,g;return a.__generator(this,function(k){switch(k.label){case 0:if(this._ongoingRequests.has(c))return[2,this._ongoingRequests.get(c).then(function(a){return a.data})];
d=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,c);f=l(d,a.__assign({responseType:"json",query:{f:"json"}},b));this._ongoingRequests.set(c,f);k.label=1;case 1:return k.trys.push([1,3,,4]),[4,f];case 2:return e=k.sent(),[2,e.data];case 3:return g=k.sent(),this._ongoingRequests.delete(c),[2,h.reject(g)];case 4:return[2]}})})};f.prototype._combineSymbolParts=function(c,b){var d;if(!c||0===c.length)return null;if(1===c.length)return{type:"CIMSymbolReference",symbol:c[0],primitiveOverrides:b};var f=
a.__assign({},c[0]);f.symbolLayers=[];for(var e=0;e<c.length;e++){var g=c[e];(d=f.symbolLayers).unshift.apply(d,g.symbolLayers)}return{type:"CIMSymbolReference",symbol:f,primitiveOverrides:b}};f.prototype._cimPartsToCIMSymbol=function(c,b,d){return a.__awaiter(this,void 0,void 0,function(){var f,e,g;return a.__generator(this,function(a){switch(a.label){case 0:f=Array(c.length);for(e=0;e<c.length;e++)f[e]=this._getSymbolPart(c[e],d);return[4,h.all(f)];case 1:return g=a.sent(),[2,new u({data:this._combineSymbolParts(g,
b)})]}})})};var e;a.__decorate([r.property({type:Object,json:{write:!0}})],f.prototype,"config",void 0);a.__decorate([r.property({type:String,json:{write:!0}})],f.prototype,"description",void 0);a.__decorate([r.property({type:Object,json:{write:!0}})],f.prototype,"fieldMap",void 0);a.__decorate([r.property({type:String,json:{write:!0}})],f.prototype,"label",void 0);a.__decorate([r.property({type:String,json:{write:!0}})],f.prototype,"scaleExpression",void 0);a.__decorate([r.property({type:String,
json:{write:!0}})],f.prototype,"url",void 0);return f=e=a.__decorate([r.subclass("esri.renderers.DictionaryRenderer")],f)}(q.VisualVariablesMixin(v))})},"esri/core/LRUCache":function(){define(["require","exports","./MemCache"],function(e,b,a){return function(){function b(b,e){this._storage=new a.MemCacheStorage;this._storage.maxSize=b;e&&this._storage.registerRemoveFunc("",e)}b.prototype.put=function(a,b,e){this._storage.put(a,b,e,1)};b.prototype.pop=function(a){return this._storage.pop(a)};b.prototype.get=
function(a){return this._storage.get(a)};b.prototype.clear=function(){this._storage.clearAll()};b.prototype.destroy=function(){this._storage.clearAll()};Object.defineProperty(b.prototype,"maxSize",{get:function(){return this._storage.maxSize},set:function(a){this._storage.maxSize=a},enumerable:!0,configurable:!0});return b}()})},"esri/core/MemCache":function(){define(["require","exports","./MapUtils","./PooledArray","./string"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});
b.MIN_PRIORITY=-3;e=function(){function a(a,b,c){this._namespace=a;this._storage=b;this._removeFunc=!1;this._miss=this._hit=0;this._storage.register(this);this._namespace+=":";c&&(this._storage.registerRemoveFunc(this._namespace,c),this._removeFunc=!0)}Object.defineProperty(a.prototype,"namespace",{get:function(){return this._namespace.slice(0,-1)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"hitRate",{get:function(){return this._hit/(this._hit+this._miss)},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"size",{get:function(){return this._storage.size},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"maxSize",{get:function(){return this._storage.maxSize},enumerable:!0,configurable:!0});a.prototype.resetHitRate=function(){this._hit=this._miss=0};a.prototype.destroy=function(){this._storage.clear(this._namespace);this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace);this._storage.deregister(this)};a.prototype.put=function(a,b,c,d){void 0===
d&&(d=0);this._storage.put(this._namespace+a,b,c,d)};a.prototype.get=function(a){a=this._storage.get(this._namespace+a);void 0===a?++this._miss:++this._hit;return a};a.prototype.pop=function(a){a=this._storage.pop(this._namespace+a);void 0===a?++this._miss:++this._hit;return a};a.prototype.updateSize=function(a,b,c){this._storage.updateSize(this._namespace+a,b,c)};a.prototype.clear=function(){this._storage.clear(this._namespace)};a.prototype.clearAll=function(){this._storage.clearAll()};a.prototype.getStats=
function(){return this._storage.getStats()};a.prototype.resetStats=function(){this._storage.resetStats()};return a}();b.MemCache=e;e=function(){function e(a){void 0===a&&(a=10485760);this._maxSize=a;this._db=new Map;this._miss=this._hit=this._size=0;this._removeFuncs=[];this._users=new m}e.prototype.register=function(a){this._users.push(a)};e.prototype.deregister=function(a){this._users.removeUnordered(a)};e.prototype.registerRemoveFunc=function(a,b){this._removeFuncs.push([a,b])};e.prototype.deregisterRemoveFunc=
function(a){this._removeFuncs=this._removeFuncs.filter(function(b){return b[0]!==a})};Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"maxSize",{get:function(){return this._maxSize},set:function(a){this._maxSize=Math.max(a,0);this._checkSizeLimit()},enumerable:!0,configurable:!0});e.prototype.put=function(a,f,c,d){var e=this._db.get(a);e&&(this._size-=e.size,this._db.delete(a),e.entry!==f&&this._notifyRemoved(a,
e.entry));c>this._maxSize?this._notifyRemoved(a,f):void 0===f?console.warn("Refusing to cache undefined entry "):!c||0>c?console.warn("Refusing to cache entry with invalid size "+c):(d=1+Math.max(d,b.MIN_PRIORITY)-b.MIN_PRIORITY,this._db.set(a,{entry:f,size:c,lifetime:d,lives:d}),this._size+=c,this._checkSizeLimit())};e.prototype.updateSize=function(a,b,c){var d=this._db.get(a);d&&d.entry===b&&(this._size-=d.size,c>this._maxSize?this._notifyRemoved(a,b):(d.size=c,this._size+=c,this._checkSizeLimit()))};
e.prototype.pop=function(a){var b=this._db.get(a);if(b)return this._size-=b.size,this._db.delete(a),++this._hit,b.entry;++this._miss};e.prototype.get=function(a){var b=this._db.get(a);if(void 0===b)++this._miss;else return this._db.delete(a),b.lives=b.lifetime,this._db.set(a,b),++this._hit,b.entry};e.prototype.getStats=function(){var a=this,f={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},
c={},d=[];this._db.forEach(function(b,f){var e=b.lifetime;d[e]=(d[e]||0)+b.size;a._users.forEach(function(a){a=a.namespace;l.startsWith(f,a)&&(c[a]=(c[a]||0)+b.size)})});var e={};this._users.forEach(function(a){var b=a.namespace;!isNaN(a.hitRate)&&0<a.hitRate?(c[b]=c[b]||0,e[b]=Math.round(100*a.hitRate)+"%"):e[b]="0%"});var k=Object.keys(c);k.forEach(function(b){return c[b]=c[b]/a._size*100});k.sort(function(a,b){return c[b]-c[a]});k.forEach(function(a){return f[a]=Math.round(c[a])+"% / "+e[a]});
for(k=d.length-1;0<=k;--k){var p=d[k];p&&(f["Priority "+(k+b.MIN_PRIORITY-1)]=Math.round(p/this.size*100)+"%")}return f};e.prototype.resetStats=function(){this._hit=this._miss=0;this._users.forEach(function(a){return a.resetHitRate()})};e.prototype.clear=function(a){var b=this;this._db.forEach(function(c,d){l.startsWith(d,a)&&(b._size-=c.size,b._db.delete(d),b._notifyRemoved(d,c.entry))})};e.prototype.clearAll=function(){var a=this;this._db.forEach(function(b,c){a._notifyRemoved(c,b.entry)});this._size=
0;this._db.clear()};e.prototype._getHitRate=function(){return this._hit/(this._hit+this._miss)};e.prototype._notifyRemoved=function(a,b){this._removeFuncs.forEach(function(c){if(l.startsWith(a,c[0]))c[1](b)})};e.prototype._checkSizeLimit=function(){var b=this;this._size<=this._maxSize||a.someMap(this._db,function(a,c){b._db.delete(c);1>=a.lives?(b._size-=a.size,b._notifyRemoved(c,a.entry)):(--a.lives,b._db.set(c,a));return b._size<=.9*b.maxSize})};return e}();b.MemCacheStorage=e})},"esri/core/MapUtils":function(){define(["require",
"exports"],function(e,b){function a(a){if(0===a.size)throw Error("Map is empty");return a.keys().next().value}function m(a){if(0===a.size)throw Error("Map is empty");var c,b=!1;a.forEach(function(a,d){b||(c=d,b=!0)});return c}function l(a){if(0===a.size)throw Error("Map is empty");return a.values().next().value}function k(a){if(0===a.size)throw Error("Map is empty");var c,b=!1;a.forEach(function(a){b||(c=a,b=!0)});return c}Object.defineProperty(b,"__esModule",{value:!0});b.someMap=Map.prototype.entries?
function(a,b){a=a.entries();for(var c=a.next();!c.done;c=a.next())if(b(c.value[1],c.value[0]))return!0;return!1}:function(a,b){var c=!0;a.forEach(function(a,d){c&&(c=!b(a,d))});return!c};e=!!Map.prototype.values;var g=!!Map.prototype.keys,f=!!Array.from;b.pairsOfMap=function(a){var c=[];a.forEach(function(a,b){return c.push([b,a])});return c};b.valuesOfMap=e&&f?function(a){return Array.from(a.values())}:function(a){var c=Array(a.size),b=0;a.forEach(function(a){return c[b++]=a});return c};b.keysOfMap=
g&&f?function(a){return Array.from(a.keys())}:function(a){var c=Array(a.size),b=0;a.forEach(function(a,d){return c[b++]=d});return c};b.MapFromValues=e?function(a){return new Map(a)}:function(a){for(var c=new Map,b=0;b<a.length;b++){var f=a[b];c.set(f[0],f[1])}return c};b.firstKeyOfMap=g?a:m;b.firstValueOfMap=e?l:k;b.test={firstKeyOfMapFallback:m,firstValueOfMapFallback:k}})},"esri/renderers/DotDensityRenderer":function(){define("require exports tslib ../Color ../core/lang ../core/accessorSupport/decorators ../layers/support/fieldUtils ./Renderer ./mixins/VisualVariablesMixin ./support/AttributeColorInfo ./support/DotDensityLegendOptions ../symbols/SimpleFillSymbol ../symbols/SimpleLineSymbol".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){return function(c){function b(a){a=c.call(this,a)||this;a.attributes=null;a.backgroundColor=new m([0,0,0,0]);a.blendDots=!0;a.dotBlendingEnabled=!0;a.dotShape="square";a.dotSize=1;a.legendOptions=null;a.outline=new p;a.dotValue=null;a.referenceDotValue=null;a.referenceScale=null;a.seed=1;a.type="dot-density";return a}a.__extends(b,c);f=b;b.prototype.calculateDotValue=function(a){if(null==this.referenceScale)return this.dotValue;a=a/this.referenceScale*this.dotValue;
return 1>a?1:a};b.prototype.getSymbol=function(){return new n({outline:this.outline})};b.prototype.getSymbolAsync=function(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2,this.getSymbol()]})})};b.prototype.getSymbols=function(){return[this.getSymbol()]};b.prototype.getAttributeHash=function(){return this.attributes&&this.attributes.reduce(function(a,c){return a+c.getAttributeHash()},"")};b.prototype.getMeshHash=function(){return JSON.stringify(this.outline)};
b.prototype.clone=function(){return new f({attributes:l.clone(this.attributes),backgroundColor:l.clone(this.backgroundColor),dotBlendingEnabled:l.clone(this.dotBlendingEnabled),dotShape:l.clone(this.dotShape),dotSize:l.clone(this.dotSize),dotValue:l.clone(this.dotValue),legendOptions:l.clone(this.legendOptions),outline:l.clone(this.outline),referenceScale:l.clone(this.referenceScale),visualVariables:l.clone(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})};b.prototype.getControllerHash=
function(){var a=this.attributes.map(function(a){return a.field||a.valueExpression||""}),c=this.outline&&JSON.stringify(this.outline.toJSON())||"";return a+"-"+c};b.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d,f,e;return a.__generator(this,function(a){switch(a.label){case 0:return[4,this.collectVVRequiredFields(c,b)];case 1:a.sent(),d=0,f=this.attributes,a.label=2;case 2:if(!(d<f.length))return[3,6];e=f[d];return e.valueExpression?[4,g.collectArcadeFieldNames(c,
b,e.valueExpression)]:[3,4];case 3:a.sent(),a.label=4;case 4:e.field&&c.add(e.field),a.label=5;case 5:return d++,[3,2];case 6:return[2]}})})};var f;a.__decorate([k.property({type:[d],json:{write:!0}})],b.prototype,"attributes",void 0);a.__decorate([k.property({type:m,json:{write:!0}})],b.prototype,"backgroundColor",void 0);a.__decorate([k.property({type:Boolean}),k.aliasOf("dotBlendingEnabled")],b.prototype,"blendDots",void 0);a.__decorate([k.property({type:Boolean,json:{write:!0}})],b.prototype,
"dotBlendingEnabled",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],b.prototype,"dotShape",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"dotSize",void 0);a.__decorate([k.property({type:h,json:{write:!0}})],b.prototype,"legendOptions",void 0);a.__decorate([k.property({type:p,json:{default:null,write:!0}})],b.prototype,"outline",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"dotValue",void 0);a.__decorate([k.property({type:Number}),
k.aliasOf("dotValue")],b.prototype,"referenceDotValue",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"referenceScale",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],b.prototype,"seed",void 0);a.__decorate([k.enumeration({dotDensity:"dot-density"})],b.prototype,"type",void 0);return b=f=a.__decorate([k.subclass("esri.renderers.DotDensityRenderer")],b)}(c.VisualVariablesMixin(f))})},"esri/renderers/support/AttributeColorInfo":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/Logger ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType".split(" "),
function(e,b,a,m,l,k,g,f){var c=k.getLogger("esri.renderers.support.AttributeColorInfo");return function(b){function d(a){a=b.call(this,a)||this;a.color=null;a.field=null;a.label=null;a.valueExpression=null;a.valueExpressionTitle=null;return a}a.__extends(d,b);e=d;d.prototype.castField=function(a){return null==a?a:"function"===typeof a?(c.error(".field: field must be a string value"),null):f.ensureString(a)};d.prototype.getAttributeHash=function(){return this.field+"-"+this.valueExpression};d.prototype.clone=
function(){return new e({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})};var e;a.__decorate([g.property({type:m,json:{type:[Number],write:!0}})],d.prototype,"color",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"field",void 0);a.__decorate([g.cast("field")],d.prototype,"castField",null);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"label",
void 0);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],d.prototype,"valueExpressionTitle",void 0);return d=e=a.__decorate([g.subclass("esri.renderers.support.AttributeColorInfo")],d)}(l.JSONSupport)})},"esri/renderers/support/DotDensityLegendOptions":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(){var a=
null!==b&&b.apply(this,arguments)||this;a.unit=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({unit:this.unit})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"unit",void 0);return e=f=a.__decorate([l.subclass("esri.renderers.support.DotDensityLegendOptions")],e)}(m.JSONSupport)})},"esri/renderers/HeatmapRenderer":function(){define("require exports tslib ../Color ../core/lang ../core/accessorSupport/decorators ../layers/support/fieldUtils ./Renderer ./support/HeatmapColorStop".split(" "),
function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=b.call(this,a)||this;a.blurRadius=10;a.colorStops=[new c({ratio:0,color:new m("rgba(255, 140, 0, 0)")}),new c({ratio:.75,color:new m("rgba(255, 140, 0, 1)")}),new c({ratio:.9,color:new m("rgba(255, 0,   0, 1)")})];a.field=null;a.fieldOffset=0;a.maxPixelIntensity=100;a.minPixelIntensity=0;a.type="heatmap";return a}a.__extends(d,b);f=d;d.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d;
return a.__generator(this,function(a){(d=this.field)&&"string"===typeof d&&g.collectField(c,b,d);return[2]})})};d.prototype.getAttributeHash=function(){return null};d.prototype.getMeshHash=function(){return JSON.stringify(this.colorStops)+"."+this.blurRadius+"."+this.field};d.prototype.clone=function(){return new f({blurRadius:this.blurRadius,colorStops:l.clone(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})};var f;a.__decorate([k.property({type:Number,
json:{write:!0}})],d.prototype,"blurRadius",void 0);a.__decorate([k.property({type:[c],json:{write:!0}})],d.prototype,"colorStops",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],d.prototype,"field",void 0);a.__decorate([k.property({type:Number,json:{write:{overridePolicy:function(a,c,b){return{enabled:null==b}}}}})],d.prototype,"fieldOffset",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],d.prototype,"maxPixelIntensity",void 0);a.__decorate([k.property({type:Number,
json:{write:!0}})],d.prototype,"minPixelIntensity",void 0);a.__decorate([k.enumeration({heatmap:"heatmap"})],d.prototype,"type",void 0);return d=f=a.__decorate([k.subclass("esri.renderers.HeatmapRenderer")],d)}(f)})},"esri/renderers/support/HeatmapColorStop":function(){define("require exports tslib ../../Color ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.color=null;a.ratio=null;return a}a.__extends(f,
b);c=f;f.prototype.clone=function(){return new c({color:this.color,ratio:this.ratio})};var c;a.__decorate([k.property({type:m,json:{write:!0}})],f.prototype,"color",void 0);a.__decorate([k.property({type:Number,json:{write:!0}})],f.prototype,"ratio",void 0);return f=c=a.__decorate([k.subclass("esri.renderers.support.HeatmapColorStop")],f)}(l.JSONSupport)})},"esri/renderers/SimpleRenderer":function(){define("require exports tslib ../symbols ../core/lang ../core/promiseUtils ../core/accessorSupport/decorators ./Renderer ./mixins/VisualVariablesMixin ../symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d){return function(c){function b(a){a=c.call(this,a)||this;a.description=null;a.label=null;a.symbol=null;a.type="simple";return a}a.__extends(b,c);f=b;b.prototype.writeSymbolWebScene=function(a,c,b,f){d.writeTarget(a,c,b,f)};b.prototype.writeSymbol=function(a,c,b,f){d.writeTarget(a,c,b,f)};b.prototype.readSymbol=function(a,c,b){return d.read(a,c,b)};b.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,
function(a){switch(a.label){case 0:return[4,k.all([this.collectSymbolFields(c,b),this.collectVVRequiredFields(c,b)])];case 1:return a.sent(),[2]}})})};b.prototype.collectSymbolFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return[4,k.all(this.getSymbols().map(function(a){return a.collectRequiredFields(c,b)}))];case 1:return a.sent(),[2]}})})};b.prototype.getSymbol=function(a,c){return this.symbol};b.prototype.getSymbolAsync=
function(c,b){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){return[2,this.symbol]})})};b.prototype.getSymbols=function(){return this.symbol?[this.symbol]:[]};b.prototype.getAttributeHash=function(){return this.visualVariables&&this.visualVariables.reduce(function(a,c){return a+c.getAttributeHash()},"")};b.prototype.getMeshHash=function(){return this.getSymbols().reduce(function(a,c){return a+=JSON.stringify(c)},"")};Object.defineProperty(b.prototype,"arcadeRequired",
{get:function(){return this.arcadeRequiredForVisualVariables},enumerable:!0,configurable:!0});b.prototype.clone=function(){return new f({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:l.clone(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})};var f;a.__decorate([g.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],b.prototype,"label",
void 0);a.__decorate([g.property({types:m.symbolTypesRenderer})],b.prototype,"symbol",void 0);a.__decorate([g.writer("web-scene","symbol",{symbol:{types:m.symbolTypesRenderer3D}})],b.prototype,"writeSymbolWebScene",null);a.__decorate([g.writer("symbol")],b.prototype,"writeSymbol",null);a.__decorate([g.reader("symbol")],b.prototype,"readSymbol",null);a.__decorate([g.enumeration({simple:"simple"})],b.prototype,"type",void 0);return b=f=a.__decorate([g.subclass("esri.renderers.SimpleRenderer")],b)}(c.VisualVariablesMixin(f))})},
"esri/renderers/UniqueValueRenderer":function(){define("require exports tslib ../symbols ../symbols ../core/arrayUtils ../core/Error ../core/lang ../core/Logger ../core/maybe ../core/promiseUtils ../core/accessorSupport/decorators ../core/accessorSupport/diffUtils ../core/accessorSupport/ensureType ../layers/support/fieldUtils ../portal/Portal ./Renderer ./mixins/VisualVariablesMixin ./support/LegendOptions ./support/UniqueValueInfo ../support/arcadeOnDemand ../support/persistableUrlUtils ../symbols/support/jsonUtils ../symbols/support/styleUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w,u,x,y,z,A,C){var B=c.getLogger("esri.renderers.UniqueValueRenderer"),E=r.ensureType(x);return function(c){function b(a){a=c.call(this,a)||this;a._valueInfoMap={};a._isDefaultSymbolDerived=!1;a.type="unique-value";a.backgroundFillSymbol=null;a.field=null;a.field2=null;a.field3=null;a.valueExpression=null;a.valueExpressionTitle=null;a.legendOptions=null;a.defaultLabel=null;a.fieldDelimiter=null;a.portal=null;a.styleOrigin=null;a.diff={uniqueValueInfos:function(a,
c){if(a||c){if(!a||!c)return{type:"complete",oldValue:a,newValue:c};for(var b=!1,d={type:"collection",added:[],removed:[],changed:[],unchanged:[]},f=function(f){var e=k.find(a,function(a){return a.value===c[f].value});e?p.diff(e,c[f])?(d.changed.push({type:"complete",oldValue:e,newValue:c[f]}),b=!0):d.unchanged.push({oldValue:e,newValue:c[f]}):(d.added.push(c[f]),b=!0)},e=0;e<c.length;e++)f(e);f=function(f){k.find(c,function(c){return c.value===a[f].value})||(d.removed.push(a[f]),b=!0)};for(e=0;e<
a.length;e++)f(e);return b?d:void 0}}};a._set("uniqueValueInfos",[]);return a}a.__extends(b,c);e=b;Object.defineProperty(b.prototype,"_cache",{get:function(){return{compiledFunc:null}},enumerable:!0,configurable:!0});b.prototype.writeBackgroundFillSymbolWebScene=function(a,c,b,d){A.writeTarget(a,c,b,d)};b.prototype.castField=function(a){return null==a||"function"===typeof a?a:r.ensureString(a)};b.prototype.writeField=function(a,c,b,d){"string"===typeof a?c[b]=a:d&&d.messages?d.messages.push(new g("property:unsupported",
"UniqueValueRenderer.field set to a function cannot be written to JSON")):B.error(".field: cannot write field to JSON since it's not a string value")};Object.defineProperty(b.prototype,"defaultSymbol",{set:function(a){this._isDefaultSymbolDerived=!1;this._set("defaultSymbol",a)},enumerable:!0,configurable:!0});b.prototype.readDefaultSymbol=function(a,c,b){return A.read(a,c,b)};b.prototype.writeDefaultSymbolWebScene=function(a,c,b,d){this._isDefaultSymbolDerived||A.writeTarget(a,c,b,d)};b.prototype.writeDefaultSymbol=
function(a,c,b,d){this._isDefaultSymbolDerived||A.writeTarget(a,c,b,d)};b.prototype.readPortal=function(a,c,b){return b.portal||v.getDefault()};b.prototype.readStyleOrigin=function(a,c,b){if(c.styleName)return Object.freeze({styleName:c.styleName});if(c.styleUrl)return a=z.fromJSON(c.styleUrl,b),Object.freeze({styleUrl:a})};b.prototype.writeStyleOrigin=function(a,c,b,d){a.styleName?c.styleName=a.styleName:a.styleUrl&&(c.styleUrl=z.toJSON(a.styleUrl,d))};Object.defineProperty(b.prototype,"uniqueValueInfos",
{set:function(a){this.styleOrigin?B.error("#uniqueValueInfos\x3d","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",a),this._updateValueInfoMap())},enumerable:!0,configurable:!0});b.prototype.addUniqueValueInfo=function(a,c){this.styleOrigin?B.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(a="object"===typeof a?E(a):new x({value:a,symbol:l.ensureType(c)}),this.uniqueValueInfos.push(a),
this._valueInfoMap[a.value]=a)};b.prototype.removeUniqueValueInfo=function(a){if(this.styleOrigin)B.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");else for(var c=0;c<this.uniqueValueInfos.length;c++)if(this.uniqueValueInfos[c].value===a+""){delete this._valueInfoMap[a];this.uniqueValueInfos.splice(c,1);break}};b.prototype.getUniqueValueInfo=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var f,e,g;return a.__generator(this,
function(h){switch(h.label){case 0:f=b;if(!this.valueExpression||!d.isNone(b)&&!d.isNone(b.arcade))return[3,2];e=[a.__assign({},f)];g={};return[4,y.loadArcade()];case 1:f=a.__assign.apply(void 0,e.concat([(g.arcade=h.sent(),g)])),h.label=2;case 2:return[2,this._getUniqueValueInfo(c,f)]}})})};b.prototype.getSymbol=function(a,c){if(this.valueExpression&&(d.isNone(c)||d.isNone(c.arcade)))B.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");else return(a=this._getUniqueValueInfo(a,
c))&&a.symbol||this.defaultSymbol};b.prototype.getSymbolAsync=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var f,e,g,h;return a.__generator(this,function(k){switch(k.label){case 0:f=b;if(!this.valueExpression||!d.isNone(f)&&!d.isNone(f.arcade))return[3,2];e=[a.__assign({},f)];g={};return[4,y.loadArcade()];case 1:f=a.__assign.apply(void 0,e.concat([(g.arcade=k.sent(),g)])),k.label=2;case 2:return h=this._getUniqueValueInfo(c,f),[2,h&&h.symbol||this.defaultSymbol]}})})};b.prototype.getSymbols=
function(){for(var a=[],c=0,b=this.uniqueValueInfos;c<b.length;c++){var d=b[c];d.symbol&&a.push(d.symbol)}this.defaultSymbol&&a.push(this.defaultSymbol);return a};b.prototype.getAttributeHash=function(){return this.visualVariables&&this.visualVariables.reduce(function(a,c){return a+c.getAttributeHash()},"")};b.prototype.getMeshHash=function(){var a=JSON.stringify(this.backgroundFillSymbol),c=JSON.stringify(this.defaultSymbol),b=this.uniqueValueInfos.reduce(function(a,c){return a+c.getMeshHash()},
"");return a+"."+c+"."+b+"."+(this.field+"."+this.field2+"."+this.field3+"."+this.fieldDelimiter)+"."+this.valueExpression};b.prototype.clone=function(){var a=new e({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:f.clone(this.defaultSymbol),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:f.clone(this.visualVariables),legendOptions:f.clone(this.legendOptions),
authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:f.clone(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(a._isDefaultSymbolDerived=!0);a._set("portal",this.portal);var c=f.clone(this.uniqueValueInfos);this.styleOrigin&&(a._set("styleOrigin",Object.freeze(f.clone(this.styleOrigin))),Object.freeze(c));a._set("uniqueValueInfos",c);a._updateValueInfoMap();return a};Object.defineProperty(b.prototype,"arcadeRequired",{get:function(){return this.arcadeRequiredForVisualVariables||
!!this.valueExpression},enumerable:!0,configurable:!0});b.prototype.collectRequiredFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return d=[this.collectVVRequiredFields(c,b),this.collectSymbolFields(c,b)],[4,h.all(d)];case 1:return a.sent(),[2]}})})};b.prototype.collectSymbolFields=function(c,b){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(f){switch(f.label){case 0:return d=
a.__spreadArrays(this.getSymbols().map(function(a){return a.collectRequiredFields(c,b)}),[t.collectArcadeFieldNames(c,b,this.valueExpression)]),t.collectField(c,b,this.field),t.collectField(c,b,this.field2),t.collectField(c,b,this.field3),[4,h.all(d)];case 1:return f.sent(),[2]}})})};b.prototype.populateFromStyle=function(){var a=this;return C.fetchStyle(this.styleOrigin,{portal:this.portal}).then(function(c){var b=[];a._valueInfoMap={};c&&c.data&&Array.isArray(c.data.items)&&c.data.items.forEach(function(d){var f=
new m.WebStyleSymbol({styleUrl:c.styleUrl,styleName:c.styleName,portal:a.portal,name:d.name});a.defaultSymbol||d.name!==c.data.defaultItem||(a.defaultSymbol=f,a._isDefaultSymbolDerived=!0);f=new x({value:d.name,symbol:f});b.push(f);a._valueInfoMap[d.name]=f});a._set("uniqueValueInfos",Object.freeze(b));!a.defaultSymbol&&a.uniqueValueInfos.length&&(a.defaultSymbol=a.uniqueValueInfos[0].symbol,a._isDefaultSymbolDerived=!0);return a})};b.prototype._updateValueInfoMap=function(){var a=this;this._valueInfoMap=
{};this.uniqueValueInfos.forEach(function(c){return a._valueInfoMap[c.value+""]=c})};b.prototype._getUniqueValueInfo=function(a,c){return this.valueExpression?this._getUnqiueValueInfoForExpression(a,c):this._getUnqiueValueInfoForFields(a)};b.prototype._getUnqiueValueInfoForExpression=function(a,c){var b=d.unwrapOr(c,{});c=b.viewingMode;var f=b.scale,e=b.spatialReference,g=this._cache.compiledFunc,b=d.unwrap(b.arcade).arcadeUtils;g||(g=b.createSyntaxTree(this.valueExpression),g=b.createFunction(g),
this._cache.compiledFunc=g);a=b.executeFunction(g,b.createExecContext(a,b.getViewInfo({viewingMode:c,scale:f,spatialReference:e})));return this._valueInfoMap[a+""]};b.prototype._getUnqiueValueInfoForFields=function(a){var c=this.field,b=a.attributes,d;if("function"!==typeof c&&this.field2){a=this.field2;d=this.field3;var f=[];c&&f.push(b[c]);a&&f.push(b[a]);d&&f.push(b[d]);d=f.join(this.fieldDelimiter||"")}else"function"===typeof c?d=c(a):c&&(d=b[c]);return this._valueInfoMap[d+""]};b.fromPortalStyle=
function(a,c){var b=new e(c&&c.properties);b._set("styleOrigin",Object.freeze({styleName:a}));b._set("portal",c&&c.portal||v.getDefault());c=b.populateFromStyle();c.catch(function(c){B.error("#fromPortalStyle('"+a+"'[, ...])","Failed to create unique value renderer from style name",c)});return c};b.fromStyleUrl=function(a,c){c=new e(c&&c.properties);c._set("styleOrigin",Object.freeze({styleUrl:a}));c=c.populateFromStyle();c.catch(function(c){B.error("#fromStyleUrl('"+a+"'[, ...])","Failed to create unique value renderer from style URL",
c)});return c};var e;a.__decorate([n.property({readOnly:!0,dependsOn:["valueExpression"]})],b.prototype,"_cache",null);a.__decorate([n.enumeration({uniqueValue:"unique-value"})],b.prototype,"type",void 0);a.__decorate([n.property({types:{base:m.BaseSymbol,key:"type",typeMap:{"simple-fill":l.symbolTypesRenderer.typeMap["simple-fill"],"picture-fill":l.symbolTypesRenderer.typeMap["picture-fill"],"polygon-3d":l.symbolTypesRenderer.typeMap["polygon-3d"]}},json:{read:A.read,write:A.writeTarget}})],b.prototype,
"backgroundFillSymbol",void 0);a.__decorate([n.writer("web-scene","backgroundFillSymbol",{backgroundFillSymbol:{type:m.PolygonSymbol3D}})],b.prototype,"writeBackgroundFillSymbolWebScene",null);a.__decorate([n.property({json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],b.prototype,"field",void 0);a.__decorate([n.cast("field")],b.prototype,"castField",null);a.__decorate([n.writer("field")],b.prototype,"writeField",null);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,
"field2",void 0);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,"field3",void 0);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,"valueExpression",void 0);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,"valueExpressionTitle",void 0);a.__decorate([n.property({type:u.default,json:{write:!0}})],b.prototype,"legendOptions",void 0);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,"defaultLabel",void 0);a.__decorate([n.property({types:l.symbolTypesRenderer})],
b.prototype,"defaultSymbol",null);a.__decorate([n.reader("defaultSymbol")],b.prototype,"readDefaultSymbol",null);a.__decorate([n.writer("web-scene","defaultSymbol",{defaultSymbol:{types:l.symbolTypesRenderer3D}})],b.prototype,"writeDefaultSymbolWebScene",null);a.__decorate([n.writer("defaultSymbol")],b.prototype,"writeDefaultSymbol",null);a.__decorate([n.property({type:String,json:{write:!0}})],b.prototype,"fieldDelimiter",void 0);a.__decorate([n.property({type:v,readOnly:!0})],b.prototype,"portal",
void 0);a.__decorate([n.reader("portal",["styleName"])],b.prototype,"readPortal",null);a.__decorate([n.property({readOnly:!0,json:{write:{enabled:!1,overridePolicy:function(){return{enabled:!0}}}}})],b.prototype,"styleOrigin",void 0);a.__decorate([n.reader("styleOrigin",["styleName","styleUrl"])],b.prototype,"readStyleOrigin",null);a.__decorate([n.writer("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],b.prototype,"writeStyleOrigin",null);a.__decorate([n.property({type:[x],json:{write:{overridePolicy:function(){return this.styleOrigin?
{enabled:!1}:{enabled:!0}}}}})],b.prototype,"uniqueValueInfos",null);return b=e=a.__decorate([n.subclass("esri.renderers.UniqueValueRenderer")],b)}(w.VisualVariablesMixin(q))})},"esri/core/accessorSupport/diffUtils":function(){define("require exports ../Accessor ../Collection ../maybe ./utils".split(" "),function(e,b,a,m,l,k){function g(c){return c instanceof m?Object.keys(c.items):c instanceof a?k.getProperties(c).keys():c?Object.keys(c):[]}function f(a,c){return a instanceof m?a.items[c]:a[c]}function c(a,
c){return Array.isArray(a)&&Array.isArray(c)?a.length!==c.length:!1}function d(a){return a?a.declaredClass:null}function h(b,e){var k,n=b.diff;if(n&&"function"===typeof n)return n(b,e);var m=g(b),t=g(e);if(0!==m.length||0!==t.length){if(!m.length||!t.length||c(b,e))return{type:"complete",oldValue:b,newValue:e};var r=t.filter(function(a){return-1===m.indexOf(a)}),y=m.filter(function(a){return-1===t.indexOf(a)}),r=m.filter(function(a){return-1<t.indexOf(a)&&f(b,a)!==f(e,a)}).concat(r,y).sort();if((y=
d(b))&&-1<p.indexOf(y)&&r.length)return{type:"complete",oldValue:b,newValue:e};for(var z,y=b instanceof a&&e instanceof a,A=0;A<r.length;A++){var C=r[A],B=f(b,C),E=f(e,C),D=void 0;!(y||"function"!==typeof B&&"function"!==typeof E)||B===E||null==B&&null==E||(D=n&&n[C]&&"function"===typeof n[C]?n[C](B,E):"object"===typeof B&&"object"===typeof E&&d(B)===d(E)?h(B,E):{type:"complete",oldValue:B,newValue:E},l.isSome(D)&&(l.isSome(z)?z.diff[C]=D:z={type:"partial",diff:(k={},k[C]=D,k)}))}return z}}function n(a){if(l.isNone(a))return!0;
switch(a.type){case "complete":return!1;case "collection":for(var c=0,b=a.added;c<b.length;c++){var d=b[c];if(!n(d))return!1}c=0;for(b=a.removed;c<b.length;c++)if(d=b[c],!n(d))return!1;c=0;for(a=a.changed;c<a.length;c++)if(d=a[c],!n(d))return!1;return!0;case "partial":for(c in a.diff)if(d=a.diff[c],!n(d))return!1;return!0}}Object.defineProperty(b,"__esModule",{value:!0});var p=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];
b.diff=function(a,c){if("function"!==typeof a&&"function"!==typeof c&&(a||c))return!a||!c||"object"===typeof a&&"object"===typeof c&&d(a)!==d(c)?{type:"complete",oldValue:a,newValue:c}:h(a,c)};b.isEmpty=n})},"esri/renderers/support/UniqueValueInfo":function(){define("require exports tslib ../../symbols ../../core/JSONSupport ../../core/accessorSupport/decorators ../../symbols/support/jsonUtils".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.description=
null;a.label=null;a.symbol=null;a.value=null;return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})};c.prototype.getMeshHash=function(){var a=JSON.stringify(this.symbol&&this.symbol.toJSON());return this.value+"."+a};var d;a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"description",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,
"label",void 0);a.__decorate([k.property({types:m.symbolTypesRenderer,json:{origins:{"web-scene":{types:m.symbolTypesRenderer3D,read:g.read,write:g.writeTarget}},read:g.read,write:g.writeTarget}})],c.prototype,"symbol",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],c.prototype,"value",void 0);return c=d=a.__decorate([k.subclass("esri.renderers.support.UniqueValueInfo")],c)}(l.JSONSupport)})},"esri/symbols/support/styleUtils":function(){define("require exports tslib ../../request ../../symbols ../../core/arrayUtils ../../core/devEnvironmentUtils ../../core/Error ../../core/promiseUtils ../../core/urlUtils ../../portal/Portal ../../portal/PortalQueryParams ../../support/featureFlags ../../support/persistableUrlUtils ./jsonUtils ./StyleOrigin ./Thumbnail".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q){function w(a,c){return E(a,c).then(function(c){return{data:c.data,baseUrl:d.removeFile(a),styleUrl:a}})}function u(a,c,b){c=c.portal||h.getDefault();var d,f=c.url+" - "+(c.user&&c.user.username)+" - "+a;D[f]||(D[f]=x(a,c,b).then(function(a){d=a;return a.fetchData()}).then(function(c){return{data:c,baseUrl:d.itemUrl,styleName:a}}));return D[f]}function x(a,c,b){return c.load(b).then(function(){var d=new n({disableExtraQuery:!0,query:"owner:"+I+" AND type:"+
J+' AND typekeywords:"'+a+'"'});return c.queryItems(d,b)}).then(function(c){c=c.results;var d=null,e=a.toLowerCase();if(c&&Array.isArray(c))for(var g=0;g<c.length;g++){var h=c[g];if(h.typeKeywords.some(function(a){return a.toLowerCase()===e})&&h.type===J&&h.owner===I){d=h;break}}if(!d)throw new f("symbolstyleutils:style-not-found","The style '"+a+"' could not be found",{styleName:a});return d.load(b)})}function y(a,b,d){return a.styleUrl?w(a.styleUrl,d):a.styleName?u(a.styleName,b,d):c.reject(new f("symbolstyleutils:style-url-and-name-missing",
"Either styleUrl or styleName is required to resolve a style"))}function z(a,b,e,h,n){var p=a.data,m={portal:e.portal,url:d.urlToObject(a.baseUrl),origin:"portal-item"},p=k.find(p.items,function(a){return a.name===b});if(!p)return c.reject(new f("symbolstyleutils:symbol-name-not-found","The symbol name '"+b+"' could not be found",{symbolName:b}));var u=r.fromJSON(C(p,h),m),w=p.thumbnail&&p.thumbnail.href,x=p.thumbnail&&p.thumbnail.imageData;g.isDevEnvironment()&&(u=g.adjustStaticAGOUrl(u),w=g.adjustStaticAGOUrl(w));
var B={portal:e.portal,url:d.urlToObject(d.removeFile(u)),origin:"portal-item"};return E(u,n).then(function(c){c="cimRef"===h?A(c.data):c.data;if((c=t.fromJSON(c,B))&&l.isSymbol3D(c)){if(w){var d=r.fromJSON(w,m);c.thumbnail=new q.default({url:d})}else x&&(c.thumbnail=new q.default({url:"data:image/png;base64,"+x}));a.styleUrl?c.styleOrigin=new v({portal:e.portal,styleUrl:a.styleUrl,name:b}):a.styleName&&(c.styleOrigin=new v({portal:e.portal,styleName:a.styleName,name:b}))}return c})}function A(a){return null===
a||"CIMSymbolReference"===a.type?a:{type:"CIMSymbolReference",symbol:a}}function C(a,c){if("cimRef"===c)return a.cimRef;if(a.formatInfos&&!p.enableWebStyleForceWOSR()){c=0;for(var b=a.formatInfos;c<b.length;c++){var d=b[c];if("gltf"===d.type)return d.href}}return a.webRef}function B(a,c,b){var f=F.replace(/\{SymbolName\}/gi,a.name);return E(f,b).then(function(a){a=A(a.data);return t.fromJSON(a,{portal:c.portal,url:d.urlToObject(d.removeFile(f)),origin:"portal-item"})})}function E(c,b){b=a.__assign({responseType:"json",
query:{f:"json"}},b);return m(d.normalize(c),b)}Object.defineProperty(b,"__esModule",{value:!0});var D={};b.fetchStyle=y;b.resolveWebStyleSymbol=function(a,b,d,e){return a.name?a.styleName&&"Esri2DPointSymbolsStyle"===a.styleName?B(a,b,e):y(a,b,e).then(function(c){return z(c,a.name,b,d,e)}):c.reject(new f("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))};b.fetchSymbolFromStyle=z;b.styleNameFromItem=function(a){var c=0;for(a=a.typeKeywords;c<a.length;c++){var b=
a[c];if(/^Esri.*Style$/.test(b)&&"Esri Style"!==b)return b}};var I="esri_en",J="Style",F="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f\x3djson"})},"esri/core/devEnvironmentUtils":function(){define(["require","exports","./global"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.isDevEnvironment=function(c){c=c||a.location.hostname;return f.some(function(a){return null!=c.match(a)})};b.adjustStaticAGOUrl=
function(c,b){if(!c)return c;b=b||a.location.hostname;return null!=b.match(m)||null!=b.match(k)?c.replace("static.arcgis.com","staticdev.arcgis.com"):null!=b.match(l)||null!=b.match(g)?c.replace("static.arcgis.com","staticqa.arcgis.com"):c};b.isTelemetryDevEnvironment=function(c){c=c||a.location.hostname;return[/^zrh-.+?\.esri\.com$/].concat(f).some(function(a){return null!=c.match(a)})};var m=/^devext.arcgis.com$/,l=/^qaext.arcgis.com$/,k=/^[\w-]*\.mapsdevext.arcgis.com$/,g=/^[\w-]*\.mapsqa.arcgis.com$/,
f=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local.esri.com$/,m,l,/^jsapps.esri.com$/,k,g]})},"esri/support/featureFlags":function(){define(["require","exports","../core/has"],function(e,b,a){function m(b,e){return!!a("enable-feature:"+b+"/"+e)}Object.defineProperty(b,"__esModule",{value:!0});b.hasEnableFeature=m;b.enableWebStyleForceWOSR=function(){return m("jschmid","force-wosr")}})},"esri/renderers/support/jsonUtils":function(){define("require exports ../../core/compilerUtils ../../core/Error ../../core/object ../../core/Warning ../ClassBreaksRenderer ../DictionaryRenderer ../DotDensityRenderer ../HeatmapRenderer ../SimpleRenderer ../UniqueValueRenderer".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){function p(a,c,b){if(!a)return null;if(a&&(a.styleName||a.styleUrl)&&"uniqueValue"!==a.type)return b&&b.messages&&b.messages.push(new k("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+a.type+"'",{definition:a,context:b})),null;c=a?v[a.type]||null:null;if(c)return c=new c,c.read(a,b),c;b&&b.messages&&a&&b.messages.push(new k("renderer:unsupported","Renderers of type '"+(a.type||"unknown")+"' are not supported",{definition:a,
context:b}));return null}function r(c,b){if(!b||"web-scene"!==b.origin)return!0;switch(c.type){case "simple":case "unique-value":case "class-breaks":return!0;case "heatmap":case "dictionary":case "dot-density":return!1;default:return a.neverReached(c),!1}}function t(a,c,b){return a?r(a,b)?a.write(c,b):(b.messages&&b.messages.push(new m("renderer:unsupported","Renderer of type '"+a.declaredClass+"' are not supported in scenes.",{renderer:a,context:b})),null):null}Object.defineProperty(b,"__esModule",
{value:!0});var v={simple:h,uniqueValue:n,classBreaks:g,heatmap:d,dotDensity:c,dictionary:f};b.read=p;b.writeTarget=function(a,c,b,d){(a=t(a,{},d))&&l.setDeepValue(b,a,c)};b.write=t;b.fromJSON=function(a,c){return p(a,null,c)}})},"esri/core/MultiOriginJSONSupport":function(){define("require exports tslib ./Accessor ./accessorSupport/decorators ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin ./accessorSupport/read ./accessorSupport/utils ./accessorSupport/write".split(" "),function(e,
b,a,m,l,k,g,f,c,d){function h(a){return c.getProperties(a).store}Object.defineProperty(b,"__esModule",{value:!0});b.MultiOriginJSONMixin=function(b){b=function(b){function e(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];var a=b.apply(this,a)||this,f=c.getProperties(a),d=f.metadatas,e=f.store,g=new k.default;f.store=g;e.keys().forEach(function(a){g.set(a,e.get(a),0)});Object.keys(d).forEach(function(a){f.internalGet(a)&&g.set(a,f.internalGet(a),0)});return a}a.__extends(e,b);e.prototype.clear=
function(a,c){void 0===c&&(c="user");return h(this).delete(a,g.nameToId(c))};e.prototype.read=function(a,c){f.default(this,a,c)};e.prototype.write=function(a,c){a=a||{};d.default(this,a,c);return a};e.prototype.getAtOrigin=function(a,c){var b=h(this),d=g.nameToId(c);if("string"===typeof a)return b.get(a,d);var f={};a.forEach(function(a){f[a]=b.get(a,d)});return f};e.prototype.setAtOrigin=function(a,b,d){c.getProperties(this).setAtOrigin(a,b,g.nameToId(d))};e.prototype.originOf=function(a){return g.idToName(this.originIdOf(a))};
e.prototype.originIdOf=function(a){return h(this).originOf(a)};e.prototype.revert=function(a,b){var d=h(this),f=g.nameToId(b),e=c.getProperties(this);("string"===typeof a?"*"===a?d.keys(f):[a]:a).forEach(function(a){e.propertyInvalidated(a);d.revert(a,f);e.propertyCommitted(a)})};e.prototype.removeOrigin=function(a){var c=h(this);a=g.nameToId(a);for(var b=0,d=c.keys(a);b<d.length;b++){var f=d[b];c.originOf(f)===a&&c.set(f,c.get(f,a),6)}};e.prototype.updateOrigin=function(a,c){var b=h(this);c=g.nameToId(c);
for(var d=this.get(a),f=c+1;7>f;++f)b.delete(a,f);b.set(a,d,c)};e.prototype.toJSON=function(a){return this.write(null,a)};return e=a.__decorate([l.subclass("esri.core.MultiOriginJSONSupport")],e)}(b);b.prototype.toJSON.isDefaultToJSON=!0;return b};e=function(c){function b(){return null!==c&&c.apply(this,arguments)||this}a.__extends(b,c);return b=a.__decorate([l.subclass("esri.core.MultiOriginJSONSupport")],b)}(b.MultiOriginJSONMixin(m));b.MultiOriginJSONSupport=e})},"esri/core/accessorSupport/MultiOriginStore":function(){define(["require",
"exports","../arrayUtils","../lang"],function(e,b,a,m){Object.defineProperty(b,"__esModule",{value:!0});e=function(){function b(){this._propertyOriginMap=new Map;this._originStores=Array(7);this._values=new Map}b.prototype.clone=function(a){var e=new b,f=this._originStores[0];f&&f.forEach(function(a,c){e.set(c,m.clone(a),0)});for(var f=function(b){var d=c._originStores[b];d&&d.forEach(function(c,d){a&&a.has(d)||e.set(d,m.clone(c),b)})},c=this,d=2;7>d;d++)f(d);return e};b.prototype.get=function(a,
b){return(b=void 0===b?this._values:this._originStores[b])?b.get(a):void 0};b.prototype.keys=function(b){return(b=null==b?this._values:this._originStores[b])?a.keysOfMap(b):[]};b.prototype.set=function(a,b,f){void 0===f&&(f=6);var c=this._originStores[f];c||(c=new Map,this._originStores[f]=c);c.set(a,b);return!this._values.has(a)||this._propertyOriginMap.get(a)<=f?(c=this._values.get(a),this._values.set(a,b),this._propertyOriginMap.set(a,f),c!==b):!1};b.prototype.delete=function(a,b){void 0===b&&
(b=6);var f=this._originStores[b];if(f){var c=f.get(a);f.delete(a);if(this._values.has(a)&&this._propertyOriginMap.get(a)===b)for(this._values.delete(a),--b;0<=b;b--)if((f=this._originStores[b])&&f.has(a)){this._values.set(a,f.get(a));this._propertyOriginMap.set(a,b);break}return c}};b.prototype.has=function(a,b){return(b=void 0===b?this._values:this._originStores[b])?b.has(a):!1};b.prototype.revert=function(a,b){for(;0<b&&!this.has(a,b);)--b;var f=this._originStores[b],f=f&&f.get(a),c=this._values.get(a);
this._values.set(a,f);this._propertyOriginMap.set(a,b);return c!==f};b.prototype.originOf=function(a){return this._propertyOriginMap.get(a)||0};b.prototype.forEach=function(a){this._values.forEach(a)};return b}();b.default=e})},"esri/form/FormTemplate":function(){define("require exports tslib ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators ../core/accessorSupport/decorators/reader ./ExpressionInfo ./support/elements".split(" "),function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=
b.call(this,a)||this;a.description=null;a.elements=null;a.expressionInfos=null;a.title=null;return a}a.__extends(d,b);e=d;d.prototype.castElements=function(a){return c.ensureType(a)};d.prototype.readElements=function(a,b){return c.fromJSON(b.formElements)};d.prototype.writeElements=function(a,b){b.formElements=c.toJSON(a)};d.prototype.clone=function(){return new e({description:this.description,expressionInfos:l.clone(this.expressionInfos),elements:l.clone(this.elements),title:this.title})};var e;
a.__decorate([k.property({type:String,json:{write:!0}})],d.prototype,"description",void 0);a.__decorate([k.property({json:{write:!0}})],d.prototype,"elements",void 0);a.__decorate([k.cast("elements")],d.prototype,"castElements",null);a.__decorate([g.reader("elements",["formElements"])],d.prototype,"readElements",null);a.__decorate([k.writer("elements")],d.prototype,"writeElements",null);a.__decorate([k.property({type:[f],json:{write:!0}})],d.prototype,"expressionInfos",void 0);a.__decorate([k.property({type:String,
json:{write:!0}})],d.prototype,"title",void 0);return d=e=a.__decorate([k.subclass("esri.form.FormTemplate")],d)}(m.JSONSupport)})},"esri/form/ExpressionInfo":function(){define(["require","exports","tslib","../core/JSONSupport","../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.expression=null;a.name=null;a.returnType="boolean";a.title=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({name:this.name,title:this.title,
expression:this.expression,returnType:this.returnType})};var f;a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"expression",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"name",void 0);a.__decorate([l.property({type:["boolean"],json:{write:!0}})],e.prototype,"returnType",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"title",void 0);return e=f=a.__decorate([l.subclass("esri.form.ExpressionInfo")],e)}(m.JSONSupport)})},
"esri/form/support/elements":function(){define("require exports ../../core/accessorSupport/ensureType ../elements/AttachmentElement ../elements/Element ../elements/FieldElement ../elements/GroupElement ../elements/RelationshipElement".split(" "),function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});var c={base:l.Element,key:"type",typeMap:{attachment:m,field:k,group:g,relationship:f}},d={base:c.base,key:c.key,typeMap:{attachment:c.typeMap.attachment,field:c.typeMap.field,relationship:c.typeMap.relationship}};
b.fromJSON=function(a,b){void 0===b&&(b=!0);if(!a)return null;var f=b?c.typeMap:d.typeMap;return a.filter(function(a){return f[a.type]}).map(function(a){return f[a.type].fromJSON(a)})};b.toJSON=function(a,b){void 0===b&&(b=!0);if(!a)return null;var f=b?c.typeMap:d.typeMap;return a.filter(function(a){return f[a.type]}).map(function(a){return a.toJSON()})};b.ensureType=function(b,f){void 0===f&&(f=!0);return b?b.map(function(b){return a.ensureOneOfType(f?c:d,b)}):null}})},"esri/form/elements/AttachmentElement":function(){define("require exports tslib ../../core/accessorSupport/decorators ./Element ./inputs/AttachmentInput".split(" "),
function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.attachmentKeyword=null;a.editable=!0;a.input=null;a.type="attachment";return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({attachmentKeyword:this.attachmentKeyword,description:this.description,editable:this.editable,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})};var c;a.__decorate([m.property({type:String,json:{write:!0}})],f.prototype,"attachmentKeyword",void 0);
a.__decorate([m.property({type:Boolean,json:{default:!0,write:!0}})],f.prototype,"editable",void 0);a.__decorate([m.property({type:k,json:{read:{source:"inputType"},write:{target:"inputType"}}})],f.prototype,"input",void 0);a.__decorate([m.property({type:["attachment"],json:{read:!1,write:!0}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.form.elements.AttachmentElement")],f)}(l.Element)})},"esri/form/elements/Element":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/subclass".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});b.ElementMixin=function(b){return function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.description=null;a.label=null;a.visibilityExpression=null;return a}a.__extends(c,b);a.__decorate([l.property({type:String,json:{write:!0}})],c.prototype,"description",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],c.prototype,"label",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],c.prototype,
"visibilityExpression",void 0);return c=a.__decorate([k.subclass("esri.form.elements.ElementMixin")],c)}(b)};e=function(b){function f(a){a=b.call(this,a)||this;a.type=null;return a}a.__extends(f,b);a.__decorate([l.property()],f.prototype,"type",void 0);return f=a.__decorate([k.subclass("esri.form.elements.Element")],f)}(b.ElementMixin(m.JSONSupport));b.Element=e})},"esri/form/elements/inputs/AttachmentInput":function(){define(["require","exports","tslib","../../../core/JSONSupport","../../../core/accessorSupport/decorators"],
function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({type:this.type})};var f;a.__decorate([l.property({type:"attachment audio document image signature video".split(" "),json:{write:!0}})],e.prototype,"type",void 0);return e=f=a.__decorate([l.subclass("esri.form.elements.inputs.AttachmentInput")],e)}(m.JSONSupport)})},"esri/form/elements/FieldElement":function(){define("require exports tslib ../../core/accessorSupport/decorators ./Element ./support/inputs ../../layers/support/domains".split(" "),
function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.domain=null;a.editable=!0;a.fieldName=null;a.hint=null;a.input=null;a.requiredExpression=null;a.type="field";return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({description:this.description,domain:this.domain,editable:this.editable,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,visibilityExpression:this.visibilityExpression})};
var d;a.__decorate([m.property({types:g.types,json:{read:{reader:g.fromJSON},write:!0}})],c.prototype,"domain",void 0);a.__decorate([m.property({type:Boolean,json:{default:!0,write:!0}})],c.prototype,"editable",void 0);a.__decorate([m.property({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0);a.__decorate([m.property({type:String,json:{write:!0}})],c.prototype,"hint",void 0);a.__decorate([m.property({types:k.types,json:{read:{source:"inputType"},write:{target:"inputType"}}})],c.prototype,
"input",void 0);a.__decorate([m.property({type:String,json:{write:!0}})],c.prototype,"requiredExpression",void 0);a.__decorate([m.property({type:String,json:{read:!1,write:!0}})],c.prototype,"type",void 0);return c=d=a.__decorate([m.subclass("esri.form.elements.FieldElement")],c)}(l.Element)})},"esri/form/elements/support/inputs":function(){define("require exports ../inputs/BarcodeScannerInput ../inputs/ComboBoxInput ../inputs/DateTimePickerInput ../inputs/Input ../inputs/RadioButtonsInput ../inputs/TextAreaInput ../inputs/TextBoxInput".split(" "),
function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});b.types={base:k,key:"type",typeMap:{"barcode-scanner":a,"combo-box":m,"datetime-picker":l,"radio-buttons":g,"text-area":f,"text-box":c}}})},"esri/form/elements/inputs/BarcodeScannerInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./Input"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="barcode-scanner";return a}a.__extends(e,b);f=e;e.prototype.clone=
function(){return new f};var f;a.__decorate([m.property({type:["barcode-scanner"],json:{read:!1,write:!0}})],e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.form.elements.inputs.BarcodeScannerInput")],e)}(l)})},"esri/form/elements/inputs/Input":function(){define(["require","exports","tslib","../../../core/JSONSupport","../../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type=null;return a}a.__extends(e,b);a.__decorate([l.property()],
e.prototype,"type",void 0);return e=a.__decorate([l.subclass("esri.form.elements.inputs.Input")],e)}(m.JSONSupport)})},"esri/form/elements/inputs/ComboBoxInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./Input"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="combo-box";return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f};var f;a.__decorate([m.property({type:["combo-box"],json:{read:!1,write:!0}})],
e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.form.elements.inputs.ComboBoxInput")],e)}(l)})},"esri/form/elements/inputs/DateTimePickerInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./Input"],function(e,b,a,m,l){function k(a){return null!=a?new Date(a):null}return function(b){function f(a){a=b.call(this,a)||this;a.includeTime=null;a.max=null;a.min=null;a.type="datetime-picker";return a}a.__extends(f,b);c=f;f.prototype.readMax=
function(a,c){return k(c.max)};f.prototype.writeMax=function(a,c){c.max=a?a.getTime():null};f.prototype.readMin=function(a,c){return k(c.min)};f.prototype.writeMin=function(a,c){c.min=a?a.getTime():null};f.prototype.clone=function(){return new c({includeTime:this.includeTime,max:this.max,min:this.min,type:this.type})};var c;a.__decorate([m.property({type:Boolean,json:{write:!0}})],f.prototype,"includeTime",void 0);a.__decorate([m.property({type:Date,json:{type:Number,write:!0}})],f.prototype,"max",
void 0);a.__decorate([m.reader("max")],f.prototype,"readMax",null);a.__decorate([m.writer("max")],f.prototype,"writeMax",null);a.__decorate([m.property({type:Date,json:{type:Number,write:!0}})],f.prototype,"min",void 0);a.__decorate([m.reader("min")],f.prototype,"readMin",null);a.__decorate([m.writer("min")],f.prototype,"writeMin",null);a.__decorate([m.property({type:["datetime-picker"],json:{read:!1,write:!0}})],f.prototype,"type",void 0);return f=c=a.__decorate([m.subclass("esri.form.elements.inputs.DateTimePickerInput")],
f)}(l)})},"esri/form/elements/inputs/RadioButtonsInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./Input"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="radio-buttons";return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f};var f;a.__decorate([m.property({type:["radio-buttons"],json:{read:!1,write:!0}})],e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.form.elements.inputs.RadioButtonsInput")],
e)}(l)})},"esri/form/elements/inputs/TextAreaInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./TextInput"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="text-area";return a}a.__extends(e,b);a.__decorate([m.property({type:["text-area"],json:{read:!1,write:!0}})],e.prototype,"type",void 0);return e=a.__decorate([m.subclass("esri.form.elements.inputs.TextAreaInput")],e)}(l)})},"esri/form/elements/inputs/TextInput":function(){define(["require",
"exports","tslib","../../../core/accessorSupport/decorators","./Input"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.maxLength=null;a.minLength=null;a.type=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({maxLength:this.maxLength,minLength:this.minLength,type:this.type})};var f;a.__decorate([m.property({type:Number,json:{write:!0}})],e.prototype,"maxLength",void 0);a.__decorate([m.property({type:Number,json:{write:!0}})],e.prototype,"minLength",
void 0);a.__decorate([m.property()],e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.form.elements.inputs.support.TextInput")],e)}(l)})},"esri/form/elements/inputs/TextBoxInput":function(){define(["require","exports","tslib","../../../core/accessorSupport/decorators","./TextInput"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="text-box";return a}a.__extends(e,b);a.__decorate([m.property({type:["text-box"],json:{read:!1,write:!0}})],e.prototype,
"type",void 0);return e=a.__decorate([m.subclass("esri.form.elements.inputs.TextBoxInput")],e)}(l)})},"esri/form/elements/GroupElement":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/decorators/cast ../../core/accessorSupport/decorators/writer ./Element ../support/elements".split(" "),function(e,b,a,m,l,k,g,f,c){return function(b){function d(a){a=b.call(this,a)||this;a.elements=null;a.initialState="expanded";a.type="group";
return a}a.__extends(d,b);f=d;d.prototype.castElements=function(a){return c.ensureType(a,!1)};d.prototype.readElements=function(a,b){return c.fromJSON(b.formElements,!1)};d.prototype.writeElements=function(a,b){b.formElements=c.toJSON(a,!1)};d.prototype.clone=function(){return new f({description:this.description,elements:m.clone(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})};var f;a.__decorate([l.property({json:{write:!0}})],d.prototype,
"elements",void 0);a.__decorate([k.cast("elements")],d.prototype,"castElements",null);a.__decorate([l.reader("elements",["formElements"])],d.prototype,"readElements",null);a.__decorate([g.writer("elements")],d.prototype,"writeElements",null);a.__decorate([l.property({type:["collapsed","expanded"],json:{default:"expanded",write:!0}})],d.prototype,"initialState",void 0);a.__decorate([l.property({type:String,json:{read:!1,write:!0}})],d.prototype,"type",void 0);return d=f=a.__decorate([l.subclass("esri.form.elements.GroupElement")],
d)}(f.Element)})},"esri/form/elements/RelationshipElement":function(){define("require exports tslib ../../core/lang ../../core/accessorSupport/decorators ./Element ../../popup/support/RelatedRecordsInfoFieldOrder".split(" "),function(e,b,a,m,l,k,g){return function(b){function c(a){a=b.call(this,a)||this;a.displayCount=null;a.displayType="list";a.editable=!0;a.orderByFields=null;a.relationshipId=null;a.type="relationship";return a}a.__extends(c,b);d=c;c.prototype.clone=function(){return new d({description:this.description,
displayCount:this.displayCount,displayType:this.displayType,editable:this.editable,label:this.label,orderByFields:m.clone(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})};var d;a.__decorate([l.property({type:Number,json:{write:!0}})],c.prototype,"displayCount",void 0);a.__decorate([l.property({type:["list"],json:{write:!0}})],c.prototype,"displayType",void 0);a.__decorate([l.property({type:Boolean,json:{default:!0,write:!0}})],c.prototype,"editable",
void 0);a.__decorate([l.property({type:[g],json:{write:!0}})],c.prototype,"orderByFields",void 0);a.__decorate([l.property({type:Number,json:{write:!0}})],c.prototype,"relationshipId",void 0);a.__decorate([l.property({type:["relationship"],json:{read:!1,write:!0}})],c.prototype,"type",void 0);return c=d=a.__decorate([l.subclass("esri.form.elements.RelationshipElement")],c)}(k.Element)})},"esri/geometry/HeightModelInfo":function(){define("require exports tslib ../core/arrayUtils ../core/jsonMap ../core/JSONSupport ../core/unitUtils ../core/Warning ../core/accessorSupport/decorators".split(" "),
function(e,b,a,m,l,k,g,f,c){function d(a,c){return new f("height-unit:unsupported","Height unit of value '"+a+"' is not supported",c)}function h(a,c){return new f("height-model:unsupported","Height model of value '"+a+"' is not supported",c)}var n=l.strict()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),p=n.jsonValues.slice();m.removeUnordered(p,"orthometric");var r=l.strict()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet",
"clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});return function(b){function f(a){a=b.call(this,a)||this;a.heightModel="gravity-related-height";
a.heightUnit="meters";a.vertCRS=null;return a}a.__extends(f,b);e=f;f.prototype.writeHeightModel=function(a,c,b){return n.write(a,c,b)};f.prototype.readHeightModel=function(a,c,b){if(c=n.read(a))return c;b&&b.messages&&b.messages.push(h(a,{context:b}));return null};f.prototype.readHeightUnit=function(a,c,b){if(c=r.read(a))return c;b&&b.messages&&b.messages.push(d(a,{context:b}));return null};f.prototype.readHeightUnitService=function(a,c,b){if(c=g.unitFromRESTJSON(a)||r.read(a))return c;b&&b.messages&&
b.messages.push(d(a,{context:b}));return null};f.prototype.readVertCRS=function(a,c){return c.vertCRS||c.ellipsoid||c.geoid};f.prototype.clone=function(){return new e({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};f.prototype.equals=function(a){return a?this===a?!0:this.heightModel===a.heightModel&&this.heightUnit===a.heightUnit&&this.vertCRS===a.vertCRS:!1};f.deriveUnitFromSR=function(a,c){c=g.getVerticalUnitStringForSR(c);return new e({heightModel:a.heightModel,
heightUnit:c,vertCRS:a.vertCRS})};f.prototype.write=function(c,d){d=a.__assign({origin:"web-scene"},d);return b.prototype.write.call(this,c,d)};f.fromJSON=function(a){if(!a)return null;var c=new e;c.read(a,{origin:"web-scene"});return c};var e;a.__decorate([c.property({type:n.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:p,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0);a.__decorate([c.writer("web-scene","heightModel")],f.prototype,"writeHeightModel",null);a.__decorate([c.reader(["web-scene",
"service"],"heightModel")],f.prototype,"readHeightModel",null);a.__decorate([c.property({type:r.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:r.jsonValues,write:r.write}}}})],f.prototype,"heightUnit",void 0);a.__decorate([c.reader("web-scene","heightUnit")],f.prototype,"readHeightUnit",null);a.__decorate([c.reader("service","heightUnit")],f.prototype,"readHeightUnitService",null);a.__decorate([c.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,
"vertCRS",void 0);a.__decorate([c.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null);return f=e=a.__decorate([c.subclass("esri.geometry.HeightModelInfo")],f)}(k.JSONSupport)})},"esri/layers/graphics/sources/MemorySource":function(){define("require exports tslib ../../../geometry ../../../Graphic ../../../core/Collection ../../../core/Error ../../../core/has ../../../core/Loadable ../../../core/Logger ../../../core/maybe ../../../core/Promise ../../../core/promiseUtils ../../../core/workers ../../../core/accessorSupport/decorators ../../../core/accessorSupport/ensureType ../../../tasks/operations/zscale ../../../tasks/support/FeatureSet".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v,q,w){Object.defineProperty(b,"__esModule",{value:!0});var u=0,x=d.getLogger("esri.layers.graphics.sources.MemorySource");e=function(c){function b(a){a=c.call(this,a)||this;a._idToClientGraphic=null;a.type="memory";return a}a.__extends(b,c);b.prototype.load=function(a){a=h.isSome(a)?a.signal:null;this.addResolvingPromise(this._startWorker(a));return p.resolve(this)};Object.defineProperty(b.prototype,"workerGeometryType",{get:function(){var a=this.layer&&this.layer.geometryType;
return a?this._geometryTypeRequiresClientGraphicMapping(a)?"polygon":a:null},enumerable:!0,configurable:!0});b.prototype.applyEdits=function(a){var c=this;return this.load().then(function(){return c._applyEdits(a)})};b.prototype.openPorts=function(){var a=this;return this.load().then(function(){return a._connection.openPorts()})};b.prototype.queryFeatures=function(c,b){void 0===b&&(b={});return a.__awaiter(this,void 0,void 0,function(){var d,f,e,g,h,k,l,n;return a.__generator(this,function(a){switch(a.label){case 0:return[4,
this.load(b)];case 1:return a.sent(),[4,this._connection.invoke("queryFeatures",c?c.toJSON():null,b)];case 2:d=a.sent();q.applyFeatureSetZUnitScaling(c,this.layer.spatialReference,d);f=w.fromJSON(d);if(!this._requiresClientGraphicMapping())return[2,f];e=this.layer.objectIdField;g=0;for(h=f.features;g<h.length;g++)if(k=h[g],l=k.attributes[e],n=this._idToClientGraphic.get(l))k.geometry=n.geometry;f.geometryType=this.layer.geometryType;return[2,f]}})})};b.prototype.queryFeaturesJSON=function(c,b){void 0===
b&&(b={});return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return this._requiresClientGraphicMapping()?[2,p.reject(new g("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)"))]:[4,this.load(b)];case 1:return a.sent(),[4,this._connection.invoke("queryFeatures",c?c.toJSON():null,b)];case 2:return d=a.sent(),q.applyFeatureSetZUnitScaling(c,this.layer.spatialReference,d),[2,d]}})})};
b.prototype.queryFeatureCount=function(a,c){var b=this;void 0===c&&(c={});return this.load(c).then(function(){return b._connection.invoke("queryFeatureCount",a?a.toJSON():null,c)})};b.prototype.queryObjectIds=function(a,c){var b=this;void 0===c&&(c={});return this.load(c).then(function(){return b._connection.invoke("queryObjectIds",a?a.toJSON():null,c)})};b.prototype.queryExtent=function(a,c){var b=this;void 0===c&&(c={});return this.load(c).then(function(){return b._connection.invoke("queryExtent",
a?a.toJSON():null,c)}).then(function(a){return{count:a.count,extent:m.Extent.fromJSON(a.extent)}})};b.prototype._applyEdits=function(a){var c=this;if(!this._connection)throw new g("feature-layer-source:edit-failure","Memory source not loaded");var b=this.layer.objectIdField,d=null,f=[],e=[],h=function(a){return"objectId"in a&&null!=a.objectId?a.objectId:"attributes"in a&&null!=a.attributes[b]?a.attributes[b]:null};a.addFeatures&&(d=this._prepareAddFeatures(a.addFeatures));if(a.deleteFeatures)for(var k=
0,l=a.deleteFeatures;k<l.length;k++){var n=l[k],m=h(n);null!=m&&f.push(m)}var p=a.updateFeatures&&this._idToClientGraphic?new Map:null;if(a.updateFeatures)for(k=0,a=a.updateFeatures;k<a.length;k++)n=a[k],e.push(this._serializeFeature(n)),p&&(m=h(n),null!=m&&p.set(m,n));q.unapplyEditsZUnitScaling(d?d.features:null,e,this.layer.spatialReference);return this._connection.invoke("applyEdits",{adds:d?d.features:[],updates:e,deletes:f}).then(function(a){var b=a.featureEditResults;c.fullExtent=a.fullExtent;
d&&d.finish(b.uidToObjectId);if(c._idToClientGraphic){if(p){a=0;for(var f=b.updateResults;a<f.length;a++){var e=f[a];e.success&&(e=p.get(e.objectId),null!=e&&c._addIdToClientGraphic(e))}}a=0;for(f=b.deleteResults;a<f.length;a++)e=f[a],e.success&&c._idToClientGraphic.delete(e.objectId)}return c._createEditsResult(b)})};b.prototype._createEditsResult=function(a){return{addFeatureResults:a.addResults?a.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:a.updateResults?a.updateResults.map(this._createFeatureEditResult,
this):[],deleteFeatureResults:a.deleteResults?a.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}};b.prototype._createFeatureEditResult=function(a){var c=!0===a.success?null:a.error||{code:void 0,description:void 0};return{objectId:a.objectId,globalId:a.globalId,error:c?new g("feature-layer-source:edit-failure",c.description,{code:c.code}):null}};b.prototype._prepareAddFeatures=function(a){for(var c=new Map,b=Array(a.length),
d=null,f=0;f<a.length;f++){var e=a[f],g=this._serializeFeature(e);!d&&h.isSome(e.geometry)&&(d=e.geometry.type);b[f]=g;c.set(""+g.uid,e)}var k=this;return{features:b,inferredGeometryType:d,finish:function(a){var b=k.sourceJSON.objectIdField,d;for(d in a){var f=a[d],e=c.get(d);e&&(e.attributes||(e.attributes={}),-1===f?delete e.attributes[b]:e.attributes[b]=f,k._addIdToClientGraphic(e))}}}};b.prototype._addIdToClientGraphic=function(a){if(this._idToClientGraphic){var c=this.sourceJSON.objectIdField,
c=a.attributes&&a.attributes[c];null!=c&&this._idToClientGraphic.set(c,a)}};b.prototype._requiresClientGraphicMapping=function(){return this._geometryTypeRequiresClientGraphicMapping(this.layer.geometryType||this.sourceJSON.geometryType)};b.prototype._geometryRequiresClientGraphicMapping=function(a){return this._geometryTypeRequiresClientGraphicMapping(a.type)};b.prototype._geometryTypeRequiresClientGraphicMapping=function(a){return"mesh"===a||"multipatch"===a||"extent"===a};b.prototype._serializeFeature=
function(a){var c=a.attributes;a=this._geometryForSerialization(a);var b=(u++).toString();return a?{uid:b,geometry:a.toJSON(),attributes:c}:{uid:b,attributes:c}};b.prototype._geometryForSerialization=function(a){a=a.geometry;return h.isNone(a)?null:this._geometryRequiresClientGraphicMapping(a)?m.Polygon.fromExtent(a.extent):a};b.prototype._startWorker=function(c){return a.__awaiter(this,void 0,void 0,function(){var b,d,e,g,h,k,l,n,q,p,v,t,u,w,y,z;return a.__generator(this,function(a){switch(a.label){case 0:return b=
this,[4,r.open("MemorySourceWorker",{strategy:f("esri-workers-for-memory-layers")?"dedicated":"local",signal:c})];case 1:return b._connection=a.sent(),d=this.layer,e=d.fields,g=d.spatialReference,h=d.objectIdField,k=d.hasM,l=d.hasZ,n=d.timeInfo,q="defaults"===this.layer.originOf("spatialReference"),p=this._prepareAddFeatures(this.items),this.on("before-changes",function(a){x.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead");a.preventDefault()}),
v={features:p.features,fields:e&&e.map(function(a){return a.toJSON()}),geometryType:m.typeKebabDictionary.toJSON(this.workerGeometryType),hasM:k,hasZ:l,objectIdField:h,spatialReference:q?null:g&&g.toJSON(),timeInfo:n?n.toJSON():null},[4,this._connection.invoke("load",v,{signal:c})];case 2:t=a.sent();u=0;for(w=t.warnings;u<w.length;u++)y=w[u],x.warn(y.message,{layer:this.layer,warning:y});t.featureErrors.length&&x.warn("Encountered "+t.featureErrors.length+" validation errors while loading features",
t.featureErrors);z=t.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(p.inferredGeometryType)&&(z.geometryType=m.typeKebabDictionary.toJSON(p.inferredGeometryType));this.sourceJSON=z;this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map);p.finish(t.assignedObjectIds);return[2]}})})};a.__decorate([t.shared({Type:l,ensureType:v.ensureType(l)})],b.prototype,"itemType",void 0);a.__decorate([t.property()],b.prototype,"type",void 0);a.__decorate([t.property({constructOnly:!0})],
b.prototype,"layer",void 0);a.__decorate([t.property({readOnly:!0,dependsOn:["layer.geometryType"]})],b.prototype,"workerGeometryType",null);a.__decorate([t.property()],b.prototype,"sourceJSON",void 0);return b=a.__decorate([t.subclass("esri.layers.graphics.sources.MemorySource")],b)}(c.LoadableMixin(n.EsriPromiseMixin(k)));b.MemorySource=e;b.default=e})},"esri/core/workers":function(){define(["require","exports","tslib","./workers/workers"],function(e,b,a,m){Object.defineProperty(b,"__esModule",
{value:!0});a.__exportStar(m,b)})},"esri/core/workers/workers":function(){define("require exports tslib ../Error ../has ../Logger ../promiseUtils ./Connection ./RemoteClient ./WorkerOwner @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k,g,f,c,d){function h(c,b){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){switch(a.label){case 0:return d=new f,[4,d.open(c,b)];case 1:return a.sent(),[2,d]}})})}function n(){return a.__awaiter(this,void 0,void 0,
function(){var c,b,f;return a.__generator(this,function(a){if(q)return[2,q];w=g.createAbortController();c=[];b=function(a){var b=d.create(a).then(function(c){return t[a]=c});c.push(b)};for(f=0;f<p;f++)b(f);q=g.all(c);return[2,q]})})}Object.defineProperty(b,"__esModule",{value:!0});b.Connection=f;b.RemoteClient=c;var p=l("esri-workers-debug")?1:l("host-browser")?navigator.hardwareConcurrency-1:0;p||(p=l("safari")&&l("mac")||l("trident")?7:2);var r=0,t=[],v=k.getLogger("esri.core.workers");b.initialize=
function(a){void 0===a&&(a={});if(a.maxNumWorkers&&0<a.maxNumWorkers){a=Math.min(a.maxNumWorkers,p);if(q){a!==p&&v.warn("Web workers already initialized, can't set requested number of workers");return}p=a}n()};b.openWithPorts=function(a,c){return h(a,{client:c})};b.open=function(b,d){void 0===d&&(d={});return a.__awaiter(this,void 0,void 0,function(){var f,k,q,v,u,w;return a.__generator(this,function(x){switch(x.label){case 0:if("string"!==typeof b)throw new m("workers:undefined-module","modulePath is missing");
f=d.strategy||"distributed";l("host-webworker")&&!l("esri-workers")&&(f="local");return"local"!==f?[3,4]:[4,c.loadWorker(b)];case 1:return(k=x.sent())?[3,3]:[4,new Promise(function(a,c){e([b],a,c)})];case 2:k=x.sent(),x.label=3;case 3:return g.throwIfAborted(d.signal),q=d.client||k,v=c.connect(k),[2,h([v],a.__assign(a.__assign({},d),{client:q}))];case 4:return[4,n()];case 5:x.sent();g.throwIfAborted(d.signal);if("dedicated"!==f)return[3,7];u=r++;r%=p;return[4,t[u].open(b,d)];case 6:return v=x.sent(),
[2,h([v],d)];case 7:return w=t.map(function(a){return a.open(b,d)}),[2,h(w,d)]}})})};b.terminate=function(){q&&(w.abort(),q=null);for(var a=0;a<t.length;a++)t[a]&&t[a].terminate();t.length=0};var q=null,w})},"esri/core/workers/Connection":function(){define("require exports ../handleUtils ../Logger ../promiseUtils ./RemoteClient".split(" "),function(e,b,a,m,l,k){var g=m.getLogger("esri.core.workers.Connection");return function(){function b(){this._clients=[];this._clientPromises=[];this._clientIdx=
0}Object.defineProperty(b.prototype,"closed",{get:function(){return!this._clients||!this._clients.length},enumerable:!0,configurable:!0});b.prototype.open=function(a,b){var c=this;return l.create(function(d,f){var e=!0,g=function(a){l.throwIfAborted(b.signal);e&&(e=!1,a())};c._clients.length=a.length;c._clientPromises.length=a.length;for(var h=function(e){var h=a[e];if(l.isThenable(h))return c._clientPromises[e]=h.then(function(a){c._clients[e]=new k(a,b);g(d);return c._clients[e]},function(){g(f);
return null}),"continue";c._clients[e]=new k(h,b);c._clientPromises[e]=l.resolve(c._clients[e]);g(d)},n=0;n<a.length;++n)h(n)})};b.prototype.broadcast=function(a,b,f){for(var c=Array(this._clientPromises.length),d=0;d<this._clientPromises.length;++d)c[d]=this._clientPromises[d].then(function(c){return c.invoke(a,b,f)});return c};b.prototype.close=function(){for(var a=0,b=this._clientPromises;a<b.length;a++)b[a].then(function(a){return a.close()});this._clients.length=0;this._clientPromises.length=
0};b.prototype.getAvailableClient=function(){for(var a,b=0;b<this._clients.length;++b){var f=this._clients[b];if(!f)a=a||[],a.push(this._clientPromises[b]);else if(!f.isBusy())return l.resolve(f)}return a?l.first(a):(this._clientIdx=(this._clientIdx+1)%this._clients.length,l.resolve(this._clients[this._clientIdx]))};b.prototype.invoke=function(a,b,f){var c=null;Array.isArray(f)?(g.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),c={transferList:f}):c=f;return this.closed?
l.reject(Error("Connection closed")):this.getAvailableClient().then(function(d){return d.invoke(a,b,c)})};b.prototype.on=function(c,b){var d=this;return l.all(this._clientPromises).then(function(){return a.handlesGroup(d._clients.map(function(a){return a.on(c,b)}))})};b.prototype.openPorts=function(){var a=this;return l.create(function(c){for(var b=Array(a._clientPromises.length),d=b.length,f=function(f){a._clientPromises[f].then(function(a){b[f]=a.openPort();0===--d&&c(b)})},e=0;e<a._clientPromises.length;++e)f(e)})};
return b}()})},"esri/core/workers/RemoteClient":function(){define("require exports ../Error ../events ../promiseUtils ./registry ./utils ../../views/support/Scheduler".split(" "),function(e,b,a,m,l,k,g,f){var c=g.MessageType.CLOSE,d=g.MessageType.ABORT,h=g.MessageType.INVOKE,n=g.MessageType.RESPONSE,p=g.MessageType.OPEN_PORT,r=g.MessageType.ON,t=function(){function a(a){this._timer=null;this._cancelledJobIds=new Set;this._invokeMessages=[];this._invoke=a;this._timer=null;this._process=this._process.bind(this)}
a.prototype.push=function(a){a.type===g.MessageType.ABORT?this._cancelledJobIds.add(a.jobId):(this._invokeMessages.push(a),null===this._timer&&(this._timer=setTimeout(this._process,0)))};a.prototype.clear=function(){this._invokeMessages.length=0;this._cancelledJobIds.clear();this._timer=null};a.prototype._process=function(){this._timer=null;for(var a=0,c=this._invokeMessages;a<c.length;a++){var b=c[a];this._cancelledJobIds.has(b.jobId)||this._invoke(b)}this._cancelledJobIds.clear();this._invokeMessages.length=
0};return a}();return function(){function b(a,c){var b=this;this._port=a;this._outJobs=new Map;this._inJobs=new Map;this._invokeQueue=new t(function(a){return b._onInvokeMessage(a)});this._responseQueue=[];this._client=c.client;this._onMessage=this._onMessage.bind(this);this._channel=c.channel;c.scheduler&&(this._frameTask=c.scheduler.registerTask(f.Task.REMOTE_CLIENT,function(a){return b._update(a)},function(){return 0<b._responseQueue.length}));this._port.addEventListener("message",this._onMessage);
this._port.start()}b.connect=function(a){var c=new MessageChannel;a="function"===typeof a?new a:"default"in a&&"function"===typeof a.default?new a.default:a;var d=new b(c.port1,{channel:c,client:a});"object"===typeof a&&"remoteClient"in a&&(a.remoteClient=d);b.clients.set(d,a);return c.port2};b.loadWorker=function(a){return(a=k.registry[a])?a():l.resolve(null)};b.prototype.close=function(){this._post({type:c});this._close()};b.prototype.isBusy=function(){return 0<this._outJobs.size};b.prototype.invoke=
function(c,b,f){var e=this,k=f&&f.signal,n=f&&f.transferList;if(!this._port)return l.reject(new a("remote-client:port-closed","Can't invoke(), port is closed"));var m=g.newJobId();return l.create(function(a,f){l.onAbortOrThrow(k,function(){e._outJobs.get(m)&&(e._outJobs.delete(m),e._post({type:d,jobId:m}),f(l.createAbortError()))});e._outJobs.set(m,{resolve:a,reject:f});e._post({type:h,jobId:m,methodName:c,abortable:null!=k},b,n)})};b.prototype.on=function(a,c){function b(a){c(a.data)}var d=new MessageChannel;
this._port.postMessage({type:g.MessageType.ON,eventType:a,port:d.port2},[d.port2]);d.port1.addEventListener("message",b);d.port1.start();return{remove:function(){d.port1.postMessage({type:g.MessageType.CLOSE});d.port1.close();d.port1.removeEventListener("message",b)}}};b.prototype.openPort=function(){var a=new MessageChannel;this._post({type:p,port:a.port2});return a.port1};b.prototype._close=function(){this._channel&&(this._channel=null);this._port.removeEventListener("message",this._onMessage);
this._port.close();this._outJobs.forEach(function(a){return a.reject(l.createAbortError("Abort job: worker closing"))});this._inJobs.clear();this._outJobs.clear();this._invokeQueue.clear();this._port=this._client=null;this._frameTask&&this._frameTask.remove();this._responseQueue=this._frameTask=null};b.prototype._onMessage=function(a){if(a=g.receiveMessage(a))switch(a.type){case n:this._onResponseMessage(a);break;case h:this._invokeQueue.push(a);break;case d:this._onAbortMessage(a);break;case c:this._onCloseMessage();
break;case p:this._onOpenPortMessage(a);break;case r:this._onOnMessage(a)}};b.prototype._onAbortMessage=function(a){var c=this._inJobs,b=a.jobId,d=c.get(b);this._invokeQueue.push(a);d&&(d.controller&&d.controller.abort(),c.delete(b))};b.prototype._onCloseMessage=function(){var a=this._client;this._close();a&&"destroy"in a&&b.clients.get(this)===a&&a.destroy();b.clients.delete(this);a&&a.remoteClient&&(a.remoteClient=null)};b.prototype._onInvokeMessage=function(a){var c=this,b=a.methodName,d=a.jobId,
f=a.data;a=a.abortable?l.createAbortController():null;var e=this._inJobs,h=this._client,k=h[b],m;try{if(!k&&b&&-1!==b.indexOf("."))for(var p=b.split("."),q=0;q<p.length-1;q++)h=h[p[q]],k=h[p[q+1]];if("function"!==typeof k)throw new TypeError(b+" is not a function");m=k.call(h,f,{client:this,signal:a?a.signal:null})}catch(I){this._post({type:n,jobId:d,error:g.toInvokeError(I)});return}l.isPromiseLike(m)?(e.set(d,{controller:a,promise:m}),m.then(function(a){e.has(d)&&(e.delete(d),c._post({type:n,jobId:d},
a))},function(a){e.has(d)&&(e.delete(d),l.isAbortError(a)||c._post({type:n,jobId:d,error:g.toInvokeError(a||{message:"Error encountered at method "+b})}))})):this._post({type:n,jobId:d},m)};b.prototype._onOpenPortMessage=function(a){new b(a.port,{client:this._client})};b.prototype._onOnMessage=function(a){var c=a.port,b=this._client.on(a.eventType,function(a){c.postMessage(a)}),d=m.on(a.port,"message",function(a){g.receiveMessage(a).type===g.MessageType.CLOSE&&(d.remove(),b.remove(),c.close())})};
b.prototype._onResponseMessage=function(a){this._frameTask?this._responseQueue.push(a):this._handleResponse(a)};b.prototype._update=function(a){for(;!a.done&&0<this._responseQueue.length;)this._handleResponse(this._responseQueue.shift()),a.madeProgress()};b.prototype._handleResponse=function(c){var b=c.jobId,d=c.error;c=c.data;var f=this._outJobs;if(f.has(b)){var e=f.get(b);f.delete(b);d?e.reject(a.fromJSON(JSON.parse(d))):e.resolve(c)}};b.prototype._post=function(a,c,b){return g.postMessage(this._port,
a,c,b)};b.clients=new Map;return b}()})},"esri/core/workers/registry":function(){define(["require","exports","@dojo/framework/shim/Promise"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.registry={geometryEngineWorker:function(){return new Promise(function(a,b){e(["../../geometry/geometryEngineWorker"],a,b)})},CSVSourceWorker:function(){return new Promise(function(a,b){e(["../../layers/graphics/sources/support/CSVSourceWorker"],a,b)})},EdgeProcessingWorker:function(){return new Promise(function(a,
b){e(["../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker"],a,b)})},ElevationSamplerWorker:function(){return new Promise(function(a,b){e(["../../geometry/support/meshUtils/ElevationSamplerWorker"],a,b)})},GeoJSONSourceWorker:function(){return new Promise(function(a,b){e(["../../layers/graphics/sources/geojson/GeoJSONSourceWorker"],a,b)})},LercWorker:function(){return new Promise(function(a,b){e(["../../layers/support/LercWorker"],a,b)})},MemorySourceWorker:function(){return new Promise(function(a,
b){e(["../../layers/graphics/sources/support/MemorySourceWorker"],a,b)})},PBFDecoderWorker:function(){return new Promise(function(a,b){e(["../../views/3d/support/PBFDecoderWorker"],a,b)})},Pipeline:function(){return new Promise(function(a,b){e(["../../views/2d/layers/features/Pipeline"],a,b)})},PointCloudWorker:function(){return new Promise(function(a,b){e(["../../views/3d/layers/PointCloudWorker"],a,b)})},RasterWorker:function(){return new Promise(function(a,b){e(["../../layers/support/RasterWorker"],
a,b)})},SceneLayerWorker:function(){return new Promise(function(a,b){e(["../../views/3d/layers/SceneLayerWorker"],a,b)})},WorkerTileHandler:function(){return new Promise(function(a,b){e(["../../views/2d/engine/vectorTiles/WorkerTileHandler"],a,b)})}}})},"esri/core/workers/utils":function(){define(["require","exports","../has"],function(e,b,a){function m(a){return a&&"object"===typeof a&&("result"in a||"transferList"in a)}function l(b){if(!b||!b.length)return null;if(a("esri-workers-arraybuffer-transfer"))return b;
b=b.filter(function(a){return!(a instanceof ArrayBuffer||a&&a.constructor&&"ArrayBuffer"===a.constructor.name)});return b.length?b:null}Object.defineProperty(b,"__esModule",{value:!0});var k;(function(a){a[a.HANDSHAKE=0]="HANDSHAKE";a[a.CONFIGURE=1]="CONFIGURE";a[a.CONFIGURED=2]="CONFIGURED";a[a.OPEN=3]="OPEN";a[a.OPENED=4]="OPENED";a[a.RESPONSE=5]="RESPONSE";a[a.INVOKE=6]="INVOKE";a[a.ABORT=7]="ABORT";a[a.CLOSE=8]="CLOSE";a[a.OPEN_PORT=9]="OPEN_PORT";a[a.ON=10]="ON"})(k=b.MessageType||(b.MessageType=
{}));var g=0;b.newJobId=function(){return g++};b.isTranferableResult=m;b.toInvokeError=function(a){return a?"string"===typeof a?JSON.stringify({name:"message",message:a}):a.toJSON?JSON.stringify(a):JSON.stringify({name:a.name,message:a.message,details:a.details,stack:a.stack}):null};b.postMessage=function(a,c,b,e){c.type===k.OPEN_PORT?a.postMessage(c,[c.port]):c.type!==k.INVOKE&&c.type!==k.RESPONSE?a.postMessage(c):(m(b)?(e=l(b.transferList),c.data=b.result):(e=l(e),c.data=b),e?a.postMessage(c,e):
a.postMessage(c))};b.receiveMessage=function(a){return a?(a=a.data)?"string"===typeof a?JSON.parse(a):a:null:null}})},"esri/views/support/Scheduler":function(){define("require exports @dojo/framework/shim/number ../../core/Logger ../../core/maybe ../../core/PooledArray ../../core/watchUtils ./debugFlags".split(" "),function(e,b,a,m,l,k,g,f){function c(a){return a in b.taskPriorities?b.taskPriorities[a]:"number"===typeof a?a:1}var d;Object.defineProperty(b,"__esModule",{value:!0});var h=m.getLogger("esri.views.support.Scheduler");
b.newScheduler=function(a){return new p.Scheduler(a)};(function(a){a.REMOTE_CLIENT="remote client";a.STREAM_DATA_LOADER="stream data loader";a.TERRAIN_SURFACE="terrain surface";a.SURFACE_GEOMETRY_UPDATES="surface geometry updates";a.I3S_CONTROLLER="I3S controller";a.POINT_CLOUD_LAYER="point cloud";a.FEATURE_TILE_FETCHER="feature fetcher";a.FEATURE_FETCH_QUEUE="feature fetch queue";a.GRAPHICS_CORE="Graphics3D";a.LABELER="labeler";a.GRAPHICS_DECONFLICTOR="graphics deconflictor";a.FILTER_VISIBILITY=
"Graphics3D filter visibility";a.FEATURE_QUERY_ENGINE="feature query";a.SCALE_VISIBILITY="Graphics3D scale visibility";a.FRUSTUM_VISIBILITY="Graphics3D frustum visibility";a.POINT_OF_INTEREST_FREQUENT="POI frequent";a.POINT_OF_INTEREST_INFREQUENT="POI infrequent";a.FEATURE_TILE_TREE="feature tile tree";a.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree";a.ELEVATION_ALIGNMENT="elevation alignment";a.TEXT_TEXTURE_ATLAS="text texture atlas";a.OVERLAY_MANAGER="overlay manager";a.LINE_OF_SIGHT_TOOL="line of sight tool";
a.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool";a[a.TEST_PRIO=1]="TEST_PRIO"})(e=b.Task||(b.Task={}));b.taskPriorities=(d={},d[e.REMOTE_CLIENT]=1,d[e.STREAM_DATA_LOADER]=1,d[e.FEATURE_FETCH_QUEUE]=1,d[e.TERRAIN_SURFACE]=2,d[e.SURFACE_GEOMETRY_UPDATES]=2,d[e.I3S_CONTROLLER]=4,d[e.POINT_CLOUD_LAYER]=4,d[e.FEATURE_TILE_FETCHER]=4,d[e.GRAPHICS_CORE]=6,d[e.LABELER]=6,d[e.GRAPHICS_DECONFLICTOR]=6,d[e.FILTER_VISIBILITY]=8,d[e.FEATURE_QUERY_ENGINE]=8,d[e.SCALE_VISIBILITY]=8,d[e.FRUSTUM_VISIBILITY]=
8,d[e.POINT_OF_INTEREST_FREQUENT]=6,d[e.POINT_OF_INTEREST_INFREQUENT]=30,d[e.FEATURE_TILE_TREE]=16,d[e.FEATURE_TILE_TREE_ACTIVE]=1,d[e.ELEVATION_ALIGNMENT]=12,d[e.TEXT_TEXTURE_ATLAS]=12,d[e.OVERLAY_MANAGER]=12,d[e.LINE_OF_SIGHT_TOOL]=16,d[e.LINE_OF_SIGHT_TOOL_INTERACTIVE]=1,d);b.getTaskPriority=c;var n=1E3/30,p;(function(a){var b=function(){function b(c){var b=this;this._now=c;this._budget=null;this._state=1;this._tasks=new k;this._runQueue=new k;this._load=0;this._idleStateCallbacks=new k;this._idleUpdatesStartFired=
!1;this._maxReschedule=t;this._forceTask=!1;this._safetyBudget=0;this._debug=!1;this._debugHandle=g.init(f,"SCHEDULER_LOG_SLOW_TASKS",function(a){return b._debug=a});this._budget=new a.Budget(c);var d=this,e;this._test={get state(){return l.isNone(e)?d._state:e},set state(a){e=a},FRAME_SAFETY_BUDGET:5,idleBudget:100,get budget(){return d._budget.budget},usedBudget:0,startTime:0,updateTask:function(a){return b._updateTask(a)},getState:function(a){return b._getState(a)},getRuntime:function(a){return b._getRuntime(a)}}}
b.prototype.destroy=function(){this._debugHandle&&this._debugHandle.remove()};b.prototype.registerTask=function(a,b,f){var e=this,g=c(a),h=new d(a,b,f,g);this._tasks.push(h);return{remove:function(){return e._removeTask(h)},set task(a){h.setPriority(a)}}};b.prototype.registerIdleStateCallbacks=function(a,c){var b=this,d={idleBegin:a,idleEnd:c};this._idleStateCallbacks.push(d);2===this.state&&this._idleUpdatesStartFired&&d.idleBegin();var f=this;return{remove:function(){return b._removeIdleStateCallbacks(d)},
set idleBegin(a){f._idleUpdatesStartFired&&(d.idleEnd(),2===f._state&&a());d.idleBegin=a},set idleEnd(a){d.idleEnd=a}}};Object.defineProperty(b.prototype,"now",{get:function(){return this._now()},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"load",{get:function(){return this._load},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"state",{get:function(){return l.isNone(this._test.state)?this._state:this._test.state},set:function(a){this._state!==a&&(this._state=
a,2!==this.state&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forEach(function(a){return a.idleEnd()})))},enumerable:!0,configurable:!0});b.prototype.updateBudget=function(a){this._test.usedBudget=0;this._test.startTime=a.elapsedFrameTime;this._safetyBudget=5;var c=a.frameDuration,b=1;switch(this.state){case 2:this._safetyBudget=0;c=Math.max(100,a.frameDuration);b=30;break;case 1:c=Math.max(n,a.frameDuration)}c-=a.elapsedFrameTime+this._safetyBudget;if(2!==
this.state&&0>c&&!this._forceTask)return this._forceTask=!0,!1;c=Math.max(c,b);this._budget.reset(c,this.state);this._maxReschedule=t;this._updateLoad();return this._schedule()};b.prototype.frame=function(){this._forceTask=!1;switch(this.state){case 2:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forEach(function(a){return a.idleBegin()}));this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed};
b.prototype._removeIdleStateCallbacks=function(a){this._idleUpdatesStartFired&&a.idleEnd();this._idleStateCallbacks.removeUnordered(a)};b.prototype._removeTask=function(a){this._tasks.removeUnordered(a);this._runQueue.removeUnordered(a)};b.prototype._updateTask=function(a){this._tasks.forEach(function(c){c.name===a&&c.setPriority(a)})};b.prototype._getState=function(a){if(this._runQueue.some(function(c){return c.name===a}))return r.SCHEDULED;var c=r.IDLE;this._tasks.forEach(function(b){b.name===a&&
b.needsUpdate()&&(1>=b.schedule?c=r.READY:c!==r.READY&&(c=r.WAITING))});return c};b.prototype._getRuntime=function(a){var c=0;this._tasks.forEach(function(b){b.name===a&&(c+=b.runtime)});return c};b.prototype._runIdle=function(){this._run()};b.prototype._runInteracting=function(){this._run()};b.prototype._runAnimating=function(){this._run()};b.prototype._updateLoad=function(){var a=0;this._tasks.forEach(function(c){return c.needsUpdate()?++a:a});this._load=.9*this._load+a*(1-.9)};b.prototype._schedule=
function(){var a=this;if(0>=this._maxReschedule)return!1;this._runQueue.filterInPlace(function(a){if(a.needsUpdate())return!0;a.schedule=a.priority;return!1});for(var c=function(){var c=!1,d=0;b._tasks.forEach(function(b){if(0!==b.schedule&&b.needsUpdate())switch(c=!0,d=Math.max(d,b.priority),b.schedule){case 1:b.schedule=0;a._runQueue.push(b);break;default:--b.schedule}});if(!c)return{value:!1};b._maxReschedule===t&&(b._maxReschedule=d);--b._maxReschedule},b=this;0===this._runQueue.length;){var d=
c();if("object"===typeof d)return d.value}return!0};b.prototype._run=function(){do for(;0<this._runQueue.length;){var a=this._runQueue.pop();this._budget.resetProgress();var c=this._budget.now();try{a.update(this._budget)}catch(z){h.error('Exception in task "'+a.name+'"',z)}a.schedule=a.priority;a.runtime+=this._budget.now()-c;this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",a.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms");if(0>=this._budget.remaining)return}while(this._schedule())};
Object.defineProperty(b.prototype,"test",{get:function(){return this._test},enumerable:!0,configurable:!0});return b}();a.Scheduler=b;var d=function(){function a(a,c,b,d){this.name=a;this.update=c;this.needsUpdate=b;this._priority=d;this.runtime=0;this.schedule=this._priority}Object.defineProperty(a.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0});a.prototype.setPriority=function(a){this.name=a;this._priority=c(a);0!==this.schedule&&(this.schedule=this._priority)};
return a}(),b=function(){function a(a){this.now=a;this._budget=this._begin=0;this._state=2;this._didWork=!1;this._enabled=!0}a.prototype.run=function(a){if(this.done)return!1;!0===a()&&(this._didWork=!0);return!0};Object.defineProperty(a.prototype,"done",{get:function(){return this._didWork&&this.elapsed>=this._budget&&this._enabled},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"budget",{get:function(){return this._budget},enumerable:!0,configurable:!0});a.prototype.madeProgress=
function(){this._didWork=!0};Object.defineProperty(a.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"enabled",{get:function(){return this._enabled},set:function(a){this._enabled=a},enumerable:!0,configurable:!0});a.prototype.reset=function(a,c){this._begin=this.now();this._budget=a;this._state=c;this._didWork=!1};Object.defineProperty(a.prototype,"remaining",{get:function(){return Math.max(this._budget-this.elapsed,0)},enumerable:!0,
configurable:!0});Object.defineProperty(a.prototype,"elapsed",{get:function(){return this.now()-this._begin},enumerable:!0,configurable:!0});a.prototype.resetProgress=function(){this._didWork=!1};Object.defineProperty(a.prototype,"hasProgressed",{get:function(){return this._didWork},enumerable:!0,configurable:!0});return a}();a.Budget=b})(p||(p={}));var r;(function(a){a.SCHEDULED="s";a.READY="r";a.WAITING="w";a.IDLE="i"})(r=b.TaskState||(b.TaskState={}));b.noBudget=function(){var a=new p.Budget(function(){return performance.now()});
a.enabled=!1;return a}();var t=a.MAX_SAFE_INTEGER})},"esri/core/watchUtils":function(){define(["require","exports","./events","./lang","./promiseUtils"],function(e,b,a,m,l){function k(a,c,b,d,f){f=a.watch(c,function(c,f,e,g){b&&!b(c)||d.call(a,c,f,e,g)},f);if(Array.isArray(c))for(var e=0;e<c.length;e++){var g=a.get(c[e]);b&&b(g)&&d.call(a,g,g,c,a)}else g=a.get(c),b&&b(g)&&d.call(a,g,g,c,a);return f}function g(a,c,b,d,f){function e(){m&&(m.remove(),m=null)}var g="function"===typeof d?d:null,h="object"===
typeof d?d:null;"boolean"===typeof d&&(f=d);var n=!1,m,p=l.createDeferred();l.onAbort(h,function(){e();p.reject(l.createAbortError())});d={then:p.promise.then.bind(p.promise),catch:p.promise.catch.bind(p.promise),remove:e};Object.freeze(d);m=k(a,c,b,function(c,b,d,f){n=!0;e();g&&g.call(a,c,b,d,f);p.resolve({value:c,oldValue:b,propertyName:d,target:f})},f);n&&e();return d}function f(a){return!!a}function c(a){return!a}function d(a){return!0===a}function h(a){return!1===a}function n(a){return void 0!==
a}function p(a){return void 0===a}function r(a,c,b,d){var f=Array.isArray(c)?c:-1<c.indexOf(",")?c.split(","):[c];c=a.watch(c,b,d);for(d=0;d<f.length;d++){var e=f[d].trim().replace(t,"$1"),g=a.get(e);b.call(a,g,g,e,a)}return c}Object.defineProperty(b,"__esModule",{value:!0});b.whenValidOnce=g;var t=/\?(\.|$)/g;b.init=r;b.watch=function(a,c,b,d){return a.watch(c,b,d)};b.once=function(a,c,b,d){return g(a,c,null,b,d)};b.when=function(a,c,b,d){return k(a,c,f,b,d)};b.whenOnce=function(a,c,b,d){return g(a,
c,f,b,d)};b.whenNot=function(a,b,d,f){return k(a,b,c,d,f)};b.whenNotOnce=function(a,b,d,f){return g(a,b,c,d,f)};b.whenTrue=function(a,c,b,f){return k(a,c,d,b,f)};b.whenTrueOnce=function(a,c,b,f){return g(a,c,d,b,f)};b.whenFalse=function(a,c,b,d){return k(a,c,h,b,d)};b.whenFalseOnce=function(a,c,b,d){return g(a,c,h,b,d)};b.whenDefined=function(a,c,b,d){return k(a,c,n,b,d)};b.whenDefinedOnce=function(a,c,b,d){return g(a,c,n,b,d)};b.whenUndefined=function(a,c,b,d){return k(a,c,p,b,d)};b.whenUndefinedOnce=
function(a,c,b,d){return g(a,c,p,b,d)};b.whenEqual=function(a,c,b,d,f){return k(a,c,function(a){return m.equals(b,a)},d,f)};b.whenEqualOnce=function(a,c,b,d,f){return g(a,c,function(a){return m.equals(b,a)},d,f)};b.pausable=function(a,c,b,d){var f=!1,e=a.watch(c,function(c,d,e,g){f||b.call(a,c,d,e,g)},d);return{remove:function(){e.remove()},pause:function(){f=!0},resume:function(){f=!1}}};b.on=function(c,b,d,f,e,g,h){function k(a){var b=l[a];b&&(g&&g(b.target,a,c,d),b.handle.remove(),delete l[a])}
var l={},n=r(c,b,function(b,g,h){k(h);a.isEventTarget(b)&&(l[h]={handle:a.on(b,d,f),target:b},e&&e(b,h,c,d))},h);return{remove:function(){n.remove();for(var a in l)k(a)}}}})},"esri/views/support/debugFlags":function(){define(["require","exports","tslib","../../core/Accessor","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return new (function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.SCHEDULER_LOG_SLOW_TASKS=!1;return a}a.__extends(e,b);a.__decorate([l.property()],
e.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0);return e=a.__decorate([l.subclass("esri.views.support.DebugFlags")],e)}(m))})},"esri/core/workers/WorkerOwner":function(){define("require exports tslib ../../kernel ../Error ../Logger ../promiseUtils ./utils ./workerFactory".split(" "),function(e,b,a,m,l,k,g,f,c){var d=k.getLogger("esri.core.workers"),h=f.MessageType.ABORT,n=f.MessageType.INVOKE,p=f.MessageType.OPEN,r=f.MessageType.OPENED,t=f.MessageType.RESPONSE;return function(){function b(a,c){this._outJobs=
new Map;this._inJobs=new Map;this.worker=a;this.id=c;a.addEventListener("message",this._onMessage.bind(this));a.addEventListener("error",function(a){a.preventDefault();d.error(a)})}b.create=function(d){return a.__awaiter(this,void 0,void 0,function(){var f;return a.__generator(this,function(a){switch(a.label){case 0:return[4,c.createWorker()];case 1:return f=a.sent(),[2,new b(f,d)]}})})};b.prototype.terminate=function(){this.worker.terminate()};b.prototype.open=function(c,b){void 0===b&&(b={});return a.__awaiter(this,
void 0,void 0,function(){var d,e,k=this;return a.__generator(this,function(a){d=b.signal;e=f.newJobId();return[2,g.create(function(a,b){a={resolve:a,reject:b};g.onAbortOrThrow(d,function(){k._outJobs.delete(e);k._post({type:h,jobId:e})});k._outJobs.set(e,a);k._post({type:p,jobId:e,modulePath:c})})]})})};b.prototype._onMessage=function(a){if(a=f.receiveMessage(a))switch(a.type){case r:this._onOpenedMessage(a);break;case t:this._onResponseMessage(a);break;case h:this._onAbortMessage(a);break;case n:this._onInvokeMessage(a)}};
b.prototype._onAbortMessage=function(a){var c=this._inJobs;a=a.jobId;var b=c.get(a);b&&(b.controller&&b.controller.abort(),c.delete(a))};b.prototype._onInvokeMessage=function(a){var c=this,b=a.methodName,d=a.jobId,e=a.data;a=a.abortable?g.createAbortController():null;var h=this._inJobs,k=m.workerMessages[b],l;try{if("function"!==typeof k)throw new TypeError(b+" is not a function");l=k.call(null,e,{signal:a?a.signal:null})}catch(B){this._post({type:t,jobId:d,error:f.toInvokeError(B)});return}g.isPromiseLike(l)?
(h.set(d,{controller:a,promise:l}),l.then(function(a){h.has(d)&&(h.delete(d),c._post({type:t,jobId:d},a))},function(a){h.has(d)&&(h.delete(d),a||(a={message:"Error encountered at method"+b}),g.isAbortError(a)||c._post({type:t,jobId:d,error:f.toInvokeError(a||{message:"Error encountered at method "+b})}))})):this._post({type:t,jobId:d},l)};b.prototype._onOpenedMessage=function(a){var c=a.jobId;a=a.data;var b=this._outJobs.get(c);b&&(this._outJobs.delete(c),b.resolve(a))};b.prototype._onResponseMessage=
function(a){var c=a.jobId,b=a.error;a=a.data;var d=this._outJobs.get(c);d&&(this._outJobs.delete(c),b?d.reject(l.fromJSON(JSON.parse(b))):d.resolve(a))};b.prototype._post=function(a,c,b){return f.postMessage(this.worker,a,c,b)};return b}()})},"esri/core/workers/workerFactory":function(){define("require exports tslib ../../config ../../intl ../has ../Logger ../promiseUtils ./loaderConfig ./utils ./WorkerFallback".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){function n(b){return a.__awaiter(this,void 0,
void 0,function(){return a.__generator(this,function(e){return[2,f.create(function(f){function e(h){if(h=d.receiveMessage(h))switch(h.type){case v:h=b;var n=m.workers.loaderUrl||c.DEFAULT_LOADER_URL,p;null!=m["default"]?(p=a.__assign({},m),delete p["default"],p=JSON.parse(JSON.stringify(p))):p=JSON.parse(JSON.stringify(m));p.locale=l.getLocale();p.has={"csp-restrictions":k("csp-restrictions"),"esri-2d-debug":0,"esri-atomics":k("esri-atomics"),"esri-secure-context":k("esri-secure-context"),"esri-shared-array-buffer":k("esri-shared-array-buffer"),
"esri-webgl-max-texture-size":k("esri-webgl-max-texture-size"),"esri-webgl-texture-float":k("esri-webgl-texture-float"),"esri-workers-arraybuffer-transfer":k("esri-workers-arraybuffer-transfer"),"host-webworker":1};var q=m.workers.loaderConfig,q=c.default({baseUrl:q.baseUrl,locale:l.getLocale(),has:a.__assign({"csp-restrictions":k("csp-restrictions"),"dojo-test-sniff":0,"host-webworker":1},q.has),map:a.__assign({},q.map),paths:a.__assign({},q.paths),packages:q.packages||[]});h.postMessage({type:t,
configure:{esriConfig:p,loaderUrl:n,loaderConfig:q}});break;case r:b.removeEventListener("message",e),b.removeEventListener("error",g),f(b)}}function g(a){a.preventDefault();b.removeEventListener("message",e);b.removeEventListener("error",g);p.warn("Failed to create Worker. Fallback to execute module in main thread",a);b=new h;b.addEventListener("message",e);b.addEventListener("error",g)}b.addEventListener("message",e);b.addEventListener("error",g)})]})})}Object.defineProperty(b,"__esModule",{value:!0});
var p=g.getLogger("esri.core.workers");k.add("esri-workers-arraybuffer-transfer",!k("safari")||12<=k("safari"));var r=d.MessageType.CONFIGURED,t=d.MessageType.CONFIGURE,v=d.MessageType.HANDSHAKE,q;try{q=URL.createObjectURL(new Blob(['var globalId\x3d0,outgoing\x3dnew Map,configured\x3d!1,HANDSHAKE\x3d0,CONFIGURE\x3d1,CONFIGURED\x3d2,OPEN\x3d3,OPENED\x3d4,RESPONSE\x3d5,INVOKE\x3d6,ABORT\x3d7;function createAbortError(){var error\x3dnew Error("Aborted");return error.name\x3d"AbortError",error}function receiveMessage(event){return event\x26\x26event.data?"string"\x3d\x3dtypeof event.data?JSON.parse(event.data):event.data:null}function invokeStaticMessage(methodName,data,options){var signal\x3doptions\x26\x26options.signal,jobId\x3dglobalId++;return new Promise((function(resolve,reject){if(signal){if(signal.aborted)return reject(createAbortError());signal.addEventListener("abort",(function(){outgoing.get(jobId)\x26\x26(outgoing.delete(jobId),self.postMessage({type:ABORT,jobId:jobId}),reject(createAbortError()))}))}outgoing.set(jobId,{resolve:resolve,reject:reject}),self.postMessage({type:INVOKE,jobId:jobId,methodName:methodName,abortable:null!\x3dsignal,data:data})}))}function messageHandler(event){var message\x3dreceiveMessage(event);if(message){var jobId\x3dmessage.jobId;switch(message.type){case CONFIGURE:var configuration\x3dmessage.configure;if(configured)return;configured\x3d!0,self.dojoConfig\x3dconfiguration.loaderConfig,self.importScripts(configuration.loaderUrl),"function"\x3d\x3dtypeof require.config\x26\x26require.config(configuration.loaderConfig),self.esriConfig\x3dconfiguration.esriConfig,self.postMessage({type:CONFIGURED});break;case OPEN:var modulePath\x3dmessage.modulePath;require(["esri/core/workers/RemoteClient"],(function(RemoteClient){RemoteClient.loadWorker(modulePath).then((function(Module){return Module||new Promise((function(resolve){require([modulePath],resolve)}))})).then((function(Module){var port\x3dRemoteClient.connect(Module);self.postMessage({type:OPENED,jobId:jobId,data:port},[port])}))}));break;case RESPONSE:if(outgoing.has(jobId)){var deferred\x3doutgoing.get(jobId);outgoing.delete(jobId),message.error?deferred.reject(JSON.parse(message.error)):deferred.resolve(message.data)}}}}self.addEventListener("message",messageHandler),self.postMessage({type:HANDSHAKE});'],
{type:"text/javascript"}))}catch(w){}b.createWorker=function(){return a.__awaiter(this,void 0,void 0,function(){var c;return a.__generator(this,function(a){if(!k("esri-workers"))return[2,n(new h)];if(q)try{c=new Worker(q)}catch(x){p.warn("Failed to create Worker. Fallback to execute module in main thread",event),c=new h}else p.warn("Failed to create Worker. Fallback to execute module in main thread",event),c=new h;return[2,n(c)]})})}})},"esri/core/workers/loaderConfig":function(){define(["require",
"exports","tslib","../has","../urlUtils"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});b.DEFAULT_LOADER_URL=l.makeAbsolute(l.removeQueryParameters(e.toUrl("dojo/dojo-lite.js")));b.DEFAULT_CONFIG={baseUrl:function(){var a=l.removeQueryParameters(e.toUrl("dojo/x.js"));return l.makeAbsolute(a.slice(0,a.length-5))}(),packages:[{name:"esri"},{name:"dojo"},{name:"dojox"},{name:"dstore"},{name:"moment",main:"moment"},{name:"@dojo"},{name:"cldrjs",main:"dist/cldr"},{name:"globalize",
main:"dist/globalize"},{name:"maquette-css-transitions",main:"dist/maquette-css-transitions.umd"},{name:"maquette-jsx",main:"dist/maquette-jsx.umd"},{name:"tslib",main:"tslib"}],map:{globalize:{cldr:"cldrjs/dist/cldr","cldr/event":"cldrjs/dist/cldr/event","cldr/supplemental":"cldrjs/dist/cldr/supplemental","cldr/unresolved":"cldrjs/dist/cldr/unresolved"}}};b.default=function(k){var g={async:k.async,isDebug:k.isDebug,locale:k.locale,baseUrl:k.baseUrl,has:a.__assign({},k.has),map:a.__assign({},k.map),
packages:k.packages&&k.packages.concat()||[],paths:a.__assign({},k.paths)};k.hasOwnProperty("async")||(g.async=!0);k.hasOwnProperty("isDebug")||(g.isDebug=!1);k.baseUrl||(g.baseUrl=b.DEFAULT_CONFIG.baseUrl);b.DEFAULT_CONFIG.packages.forEach(function(c){a:{for(var b=g.packages,d=0;d<b.length;d++)if(b[d].name===c.name)break a;c=a.__assign({},c);d=l.removeQueryParameters(e.toUrl(c.name+"/x.js"));d=d.slice(0,d.length-5);c.location=l.makeAbsolute(d);b.push(c)}});k=g.map=g.map||{};for(var f=0,c=Object.keys(b.DEFAULT_CONFIG.map);f<
c.length;f++){var d=c[f];k[d]||(k[d]=b.DEFAULT_CONFIG.map[d])}return g}})},"esri/core/workers/WorkerFallback":function(){define("require exports tslib ../global ./RemoteClient ./utils @dojo/framework/shim/Promise".split(" "),function(e,b,a,m,l,k){var g=function(){return function(){var a=this,c=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(function(b){a[b]=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];return c[b].apply(c,
a)}})}}(),f=m.MutationObserver||m.WebKitMutationObserver,c=function(){var a;if(m.process&&m.process.nextTick)a=function(a){m.process.nextTick(a)};else if(m.Promise)a=function(a){m.Promise.resolve().then(a)};else if(f){var c=[],b=document.createElement("div");(new f(function(){for(;0<c.length;)c.shift()()})).observe(b,{attributes:!0});a=function(a){c.push(a);b.setAttribute("queueStatus","1")}}return a}(),d=function(){var a=m.MessageEvent;try{new a("message",{data:null})}catch(n){return function(a,
c){void 0===c&&(c={});var b=c.data,d=c.bubbles,d=void 0===d?!1:d;c=c.cancelable;c=void 0===c?!1:c;var f=document.createEvent("Event");f.initEvent(a,d,c);f.data=b;return f}}return function(c,b){return new a(c,b)}}();return function(){function b(){this._dispatcher=new g;this._isInitialized=!1;this._workerPostMessage({type:k.MessageType.HANDSHAKE})}b.prototype.terminate=function(){};Object.defineProperty(b.prototype,"onmessage",{get:function(){return this._onmessageHandler},set:function(a){this._onmessageHandler&&
this.removeEventListener("message",this._onmessageHandler);(this._onmessageHandler=a)&&this.addEventListener("message",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"onerror",{get:function(){return this._onerrorHandler},set:function(a){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler);(this._onerrorHandler=a)&&this.addEventListener("error",a)},enumerable:!0,configurable:!0});b.prototype.postMessage=function(a){var b=this;c(function(){b._workerMessageHandler(d("message",
{data:a}))})};b.prototype.dispatchEvent=function(a){return this._dispatcher.dispatchEvent(a)};b.prototype.addEventListener=function(a,c,b){this._dispatcher.addEventListener(a,c,b)};b.prototype.removeEventListener=function(a,c,b){this._dispatcher.removeEventListener(a,c,b)};b.prototype._workerPostMessage=function(a){var b=this;c(function(){b.dispatchEvent(d("message",{data:a}))})};b.prototype._workerMessageHandler=function(c){return a.__awaiter(this,void 0,void 0,function(){var b,d,f,g,h,n;return a.__generator(this,
function(a){switch(a.label){case 0:b=k.receiveMessage(c);if(!b)return[2];d=b.type;switch(d){case k.MessageType.CONFIGURE:return[3,1];case k.MessageType.OPEN:return[3,2]}return[3,6];case 1:return this._isInitialized||this._workerPostMessage({type:k.MessageType.CONFIGURED}),[3,6];case 2:return f=b.modulePath,g=b.jobId,[4,l.loadWorker(f)];case 3:return(h=a.sent())?[3,5]:[4,new Promise(function(a,c){e([f],a,c)})];case 4:h=a.sent(),a.label=5;case 5:return n=l.connect(h),this._workerPostMessage({type:k.MessageType.OPENED,
jobId:g,data:n}),[3,6];case 6:return[2]}})})};return b}()})},"esri/tasks/operations/zscale":function(){define(["require","exports","../../core/unitUtils","../../geometry/support/spatialReferenceUtils"],function(e,b,a,m){function l(b,c,d){if(!c||!d||d.vcsWkid||m.equals(c,d))return null;c=a.getMetersPerVerticalUnitForSR(c);d=a.getMetersPerVerticalUnitForSR(d);var f=c/d;if(1===f)return null;switch(b){case "point":case "esriGeometryPoint":return function(a){a&&null!=a.z&&(a.z*=f)};case "polyline":case "esriGeometryPolyline":return function(a){if(a){var c=
0;for(a=a.paths;c<a.length;c++)for(var b=0,d=a[c];b<d.length;b++){var e=d[b];2<e.length&&(e[2]*=f)}}};case "polygon":case "esriGeometryPolygon":return function(a){if(a){var c=0;for(a=a.rings;c<a.length;c++)for(var b=0,d=a[c];b<d.length;b++){var e=d[b];2<e.length&&(e[2]*=f)}}};case "multipoint":case "esriGeometryMultipoint":return function(a){if(a){var c=0;for(a=a.points;c<a.length;c++){var b=a[c];2<b.length&&(b[2]*=f)}}};default:return null}}function k(a,c,b){if(null==a.hasM||a.hasZ)for(a=0;a<c.length;a++)for(var d=
0,f=c[a];d<f.length;d++){var e=f[d];2<e.length&&(e[2]*=b)}}function g(b,c,d){if(b)for(var f=0;f<b.length;f++){var e=b[f].geometry,g=d;if(e&&e.spatialReference&&!m.equals(e.spatialReference,c)&&(g=a.getMetersPerVerticalUnitForSR(e.spatialReference)/g,1!==g))if("x"in e)null!=e.z&&(e.z*=g);else if("rings"in e)k(e,e.rings,g);else if("paths"in e)k(e,e.paths,g);else if("points"in e&&(null==e.hasM||e.hasZ))for(var l=0,e=e.points;l<e.length;l++){var t=e[l];2<t.length&&(t[2]*=g)}}}Object.defineProperty(b,
"__esModule",{value:!0});b.getGeometryZScaler=l;b.applyFeatureSetZUnitScaling=function(a,c,b){if(b&&b.features&&b.hasZ&&(a=l(b.geometryType,c,a.outSpatialReference)))for(c=0,b=b.features;c<b.length;c++)a(b[c].geometry)};b.unapplyEditsZUnitScaling=function(b,c,d){if((b||c)&&d){var f=a.getMetersPerVerticalUnitForSR(d);g(b,d,f);g(c,d,f)}}})},"esri/tasks/support/FeatureSet":function(){define("require exports tslib ../../geometry ../../Graphic ../../core/jsonMap ../../core/JSONSupport ../../core/maybe ../../core/accessorSupport/decorators ../../geometry/SpatialReference ../../geometry/support/jsonUtils ../../layers/support/Field".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){var p=new k.default({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"});e=function(b){function e(a){a=b.call(this,a)||this;a.displayFieldName=null;a.exceededTransferLimit=!1;a.features=[];a.fields=null;a.geometryType=null;a.hasM=!1;a.hasZ=!1;a.queryGeometry=null;a.spatialReference=null;return a}a.__extends(e,b);e.prototype.readFeatures=function(a,c){c=
d.fromJSON(c.spatialReference);for(var b=[],e=0;e<a.length;e++){var g=a[e],h=l.fromJSON(g),g=g.geometry&&g.geometry.spatialReference;f.isSome(h.geometry)&&!g&&(h.geometry.spatialReference=c);b.push(h)}return b};e.prototype.writeGeometryType=function(a,c,b,d){if(a)p.write(a,c,b,d);else if(a=this.features)for(var e=0;e<a.length;e++){var g=a[e];if(g&&f.isSome(g.geometry)){p.write(g.geometry.type,c,b,d);break}}};e.prototype.writeSpatialReference=function(a,c){if(a)c.spatialReference=a.toJSON();else if(a=
this.features)for(var b=0;b<a.length;b++){var d=a[b];d&&f.isSome(d.geometry)&&d.geometry.spatialReference&&(c.spatialReference=d.geometry.spatialReference.toJSON())}};e.prototype.toJSON=function(a){var c=this.write(null);if(c.features&&Array.isArray(a)&&0<a.length)for(var b=0;b<c.features.length;b++){var d=c.features[b];if(d.geometry){var f=a&&a[b];d.geometry=f&&f.toJSON()||d.geometry}}return c};e.prototype.quantize=function(a){for(var c=a.scale,b=c[0],d=c[1],c=a.translate,e=c[0],g=c[1],c=this.features,
h=this._getQuantizationFunction(this.geometryType,function(a){return Math.round((a-e)/b)},function(a){return Math.round((g-a)/d)}),k=0,l=c.length;k<l;k++)h(f.unwrap(c[k].geometry))||(c.splice(k,1),k--,l--);this.transform=a;return this};e.prototype.unquantize=function(){var a=this.features,c=this.transform;if(!c)return this;for(var b=c.translate,d=b[0],e=b[1],c=c.scale,g=c[0],h=c[1],c=this._getHydrationFunction(this.geometryType,function(a){return a*g+d},function(a){return e-a*h}),b=0;b<a.length;b++){var k=
a[b].geometry;f.isSome(k)&&c(k)}return this};e.prototype._quantizePoints=function(a,c,b){for(var d,f,e=[],g=0,h=a.length;g<h;g++){var k=a[g];if(0<g){var l=c(k[0]),k=b(k[1]);if(l!==d||k!==f)e.push([l-d,k-f]),d=l,f=k}else d=c(k[0]),f=b(k[1]),e.push([d,f])}return 0<e.length?e:null};e.prototype._getQuantizationFunction=function(a,c,b){var d=this;return"point"===a?function(a){a.x=c(a.x);a.y=b(a.y);return a}:"polyline"===a||"polygon"===a?function(a){for(var f=h.isPolygon(a)?a.rings:a.paths,e=[],g=0,k=f.length;g<
k;g++){var l=d._quantizePoints(f[g],c,b);l&&e.push(l)}return 0<e.length?(h.isPolygon(a)?a.rings=e:a.paths=e,a):null}:"multipoint"===a?function(a){var f;f=d._quantizePoints(a.points,c,b);return 0<f.length?(a.points=f,a):null}:"extent"===a?function(a){return a}:null};e.prototype._getHydrationFunction=function(a,c,b){if("point"===a)return function(a){a.x=c(a.x);a.y=b(a.y)};if("polyline"===a||"polygon"===a)return function(a){a=h.isPolygon(a)?a.rings:a.paths;for(var d,f,e=0,g=a.length;e<g;e++)for(var k=
a[e],l=0,n=k.length;l<n;l++){var m=k[l];0<l?(d+=m[0],f+=m[1]):(d=m[0],f=m[1]);m[0]=c(d);m[1]=b(f)}};if("extent"===a)return function(a){a.xmin=c(a.xmin);a.ymin=b(a.ymin);a.xmax=c(a.xmax);a.ymax=b(a.ymax)};if("multipoint"===a)return function(a){a=a.points;for(var d,f,e=0,g=a.length;e<g;e++){var h=a[e];0<e?(d+=h[0],f+=h[1]):(d=h[0],f=h[1]);h[0]=c(d);h[1]=b(f)}}};a.__decorate([c.property({type:String,json:{write:!0}})],e.prototype,"displayFieldName",void 0);a.__decorate([c.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],
e.prototype,"exceededTransferLimit",void 0);a.__decorate([c.property({type:[l],json:{write:!0}})],e.prototype,"features",void 0);a.__decorate([c.reader("features")],e.prototype,"readFeatures",null);a.__decorate([c.property({type:[n],json:{write:!0}})],e.prototype,"fields",void 0);a.__decorate([c.property({type:"point multipoint polyline polygon extent mesh".split(" "),json:{read:{reader:p.read}}})],e.prototype,"geometryType",void 0);a.__decorate([c.writer("geometryType")],e.prototype,"writeGeometryType",
null);a.__decorate([c.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],e.prototype,"hasM",void 0);a.__decorate([c.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],e.prototype,"hasZ",void 0);a.__decorate([c.property({types:m.geometryTypes,json:{read:h.fromJSON,write:!0}})],e.prototype,"queryGeometry",void 0);a.__decorate([c.property({type:d,json:{write:!0}})],e.prototype,"spatialReference",void 0);a.__decorate([c.writer("spatialReference")],
e.prototype,"writeSpatialReference",null);a.__decorate([c.property({json:{write:!0}})],e.prototype,"transform",void 0);return e=a.__decorate([c.subclass("esri.tasks.support.FeatureSet")],e)}(g.JSONSupport);e.prototype.toJSON.isDefaultToJSON=!0;(function(a){})(e||(e={}));return e})},"esri/layers/support/Field":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./domains ./fieldType".split(" "),
function(e,b,a,m,l,k,g,f,c){var d=new m.default({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});return function(b){function e(a){a=b.call(this,a)||this;a.alias=null;
a.defaultValue=void 0;a.description=null;a.domain=null;a.editable=!0;a.length=-1;a.name=null;a.nullable=!0;a.type=null;a.valueType=null;return a}a.__extends(e,b);h=e;e.prototype.readDescription=function(a,c){a=c.description;var b;try{b=JSON.parse(a)}catch(q){}return b?b.value:null};e.prototype.readValueType=function(a,c){a=c.description;var b;try{b=JSON.parse(a)}catch(q){}return b?d.fromJSON(b.fieldValueType):null};e.prototype.clone=function(){return new h({alias:this.alias,defaultValue:this.defaultValue,
description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})};var h;a.__decorate([k.property({type:String,json:{write:!0}})],e.prototype,"alias",void 0);a.__decorate([k.property({type:[String,Number],json:{write:{allowNull:!0}}})],e.prototype,"defaultValue",void 0);a.__decorate([k.property()],e.prototype,"description",void 0);a.__decorate([k.reader("description")],
e.prototype,"readDescription",null);a.__decorate([k.property({types:f.types,json:{read:{reader:f.fromJSON},write:!0}})],e.prototype,"domain",void 0);a.__decorate([k.property({type:Boolean,json:{write:!0}})],e.prototype,"editable",void 0);a.__decorate([k.property({type:g.Integer,json:{write:!0}})],e.prototype,"length",void 0);a.__decorate([k.property({type:String,json:{write:!0}})],e.prototype,"name",void 0);a.__decorate([k.property({type:Boolean,json:{write:!0}})],e.prototype,"nullable",void 0);a.__decorate([k.enumeration(c.kebabDict)],
e.prototype,"type",void 0);a.__decorate([k.property()],e.prototype,"valueType",void 0);a.__decorate([k.reader("valueType",["description"])],e.prototype,"readValueType",null);return e=h=a.__decorate([k.subclass("esri.layers.support.Field")],e)}(l.JSONSupport)})},"esri/layers/support/fieldType":function(){define(["require","exports","../../core/jsonMap"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.kebabDict=new a.default({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",
esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})})},"esri/layers/mixins/ArcGISService":function(){define("require exports tslib ../../core/Logger ../../core/accessorSupport/decorators ../support/arcgisLayerUrl".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});b.ArcGISService=function(b){return function(b){function c(){return null!==b&&b.apply(this,arguments)||this}a.__extends(c,b);Object.defineProperty(c.prototype,"title",{get:function(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var a=k.parse(this.url);if(a&&a.title)return a.title}return this._get("title")||""},set:function(a){this._set("title",a)},enumerable:!0,configurable:!0});
Object.defineProperty(c.prototype,"url",{set:function(a){this._set("url",k.sanitizeUrl(a,m.getLogger(this.declaredClass)))},enumerable:!0,configurable:!0});a.__decorate([l.property({dependsOn:["url"]})],c.prototype,"title",null);a.__decorate([l.property({type:String})],c.prototype,"url",null);return c=a.__decorate([l.subclass("esri.layers.mixins.ArcGISService")],c)}(b)}})},"esri/layers/support/arcgisLayerUrl":function(){define(["require","exports","../../core/urlUtils","../../support/persistableUrlUtils"],
function(e,b,a,m){function l(c){c=a.urlToObject(c);var b=c.path.match(g)||c.path.match(f);if(!b)return null;c=b[1];var e=b[2],l=b[3],b=b[4],m=e.indexOf("/");return{title:k(-1!==m?e.slice(m+1):e),serverType:l,sublayer:null!=b&&""!==b?parseInt(b,10):null,url:{path:c}}}function k(a){a=a.replace(/\s*[/_]+\s*/g," ");return a[0].toUpperCase()+a.slice(1)}Object.defineProperty(b,"__esModule",{value:!0});b.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");
var g=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+b.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i"),f=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/("+b.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");b.isArcGISUrl=function(a){return!!g.test(a)};b.parse=l;b.cleanTitle=k;b.titleFromUrlAndName=function(a,b){var c=[];a&&(a=l(a))&&a.title&&c.push(a.title);b&&(b=k(b),c.push(b));if(2===c.length){if(-1!==c[0].toLowerCase().indexOf(c[1].toLowerCase()))return c[0];
if(-1!==c[1].toLowerCase().indexOf(c[0].toLowerCase()))return c[1]}return c.join(" - ")};b.isHostedAgolService=function(a){if(!a)return!1;a=a.toLowerCase();var b=-1!==a.indexOf(".arcgis.com/");a=-1!==a.indexOf("//services")||-1!==a.indexOf("//tiles")||-1!==a.indexOf("//features");return b&&a};b.isHostedSecuredProxyService=function(a,b){return b&&a&&-1!==a.toLowerCase().indexOf(b.toLowerCase())};b.sanitizeUrl=function(b,d){return b?a.removeTrailingSlash(a.removeQueryParameters(b,d)):b};b.sanitizeUrlWithLayerId=
function(b,d,f){if(!d)return{url:d};d=a.removeQueryParameters(d,f);f=a.urlToObject(d);f=l(f.path);var c;f&&null!=f.sublayer&&(null==b.layerId&&(c=f.sublayer),d=f.url.path);return{url:a.removeTrailingSlash(d),layerId:c}};b.writeUrlWithLayerId=function(b,d,f,e,g){m.write(d,e,"url",g);e.url&&null!=b.layerId&&(e.url=a.join(e.url,f,b.layerId.toString()))};b.isWmsServer=function(a){if(!a)return!1;var b=a.toLowerCase();a=-1!==b.indexOf("/services/");var c=-1!==b.indexOf("/mapserver/wmsserver"),f=-1!==b.indexOf("/imageserver/wmsserver"),
b=-1!==b.indexOf("/wmsserver");return a&&(c||f||b)};b.isServerOrServicesAGOLUrl=function(b){if(!b)return!1;b=(new a.Url(a.makeAbsolute(b))).authority.toLowerCase();return"server.arcgisonline.com"===b||"services.arcgisonline.com"===b}})},"esri/layers/mixins/TemporalLayer":function(){define("require exports tslib ../../TimeExtent ../../TimeInterval ../../core/accessorSupport/decorators ../../layers/support/TimeInfo ../support/fieldUtils ../support/timeUtils".split(" "),function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,
"__esModule",{value:!0});b.TemporalLayer=function(b){return function(b){function d(){var a=null!==b&&b.apply(this,arguments)||this;a.timeExtent=null;a.timeOffset=null;a.useViewTime=!0;return a}a.__extends(d,b);d.prototype.readOffset=function(a,b){b=b.timeInfo.exportOptions;if(!b)return null;a=b.timeOffset;b=c.timeUnitKebabDictionary.fromJSON(b.timeOffsetUnits);return a&&b?new l({value:a,unit:b}):null};Object.defineProperty(d.prototype,"timeInfo",{set:function(a){f.fixTimeInfoFields(a,this.fields);
this._set("timeInfo",a)},enumerable:!0,configurable:!0});a.__decorate([k.property({type:m,json:{write:!1}})],d.prototype,"timeExtent",void 0);a.__decorate([k.property({type:l})],d.prototype,"timeOffset",void 0);a.__decorate([k.reader("service","timeOffset",["timeInfo.exportOptions"])],d.prototype,"readOffset",null);a.__decorate([k.property({value:null,type:g,json:{write:!0,origins:{"web-document":{read:!1,write:!1}}}})],d.prototype,"timeInfo",null);a.__decorate([k.property({type:Boolean,json:{read:{source:"timeAnimation"},
write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],d.prototype,"useViewTime",void 0);return d=a.__decorate([k.subclass("esri.layers.mixins.TemporalLayer")],d)}(b)}})},"esri/TimeExtent":function(){define("require exports tslib ./core/JSONSupport ./core/accessorSupport/decorators ./layers/support/timeUtils".split(" "),function(e,b,a,m,l,k){e=function(b){function c(a){a=b.call(this,a)||this;a.end=null;a.start=null;return a}a.__extends(c,b);e=c;Object.defineProperty(c,"allTime",
{get:function(){return g},enumerable:!0,configurable:!0});Object.defineProperty(c,"empty",{get:function(){return f},enumerable:!0,configurable:!0});c.prototype.readEnd=function(a,b){return null!=b.end?new Date(b.end):null};c.prototype.writeEnd=function(a,b){b.end=a?a.getTime():null};Object.defineProperty(c.prototype,"isAllTime",{get:function(){return this.equals(e.allTime)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isEmpty",{get:function(){return this.equals(e.empty)},enumerable:!0,
configurable:!0});c.prototype.readStart=function(a,b){return null!=b.start?new Date(b.start):null};c.prototype.writeStart=function(a,b){b.start=a?a.getTime():null};c.prototype.clone=function(){return new e({end:this.end,start:this.start})};c.prototype.intersection=function(a){var b,c,d,f,g,h,k,l;if(!a)return this.clone();if(this.isEmpty||a.isEmpty)return e.empty;if(this.isAllTime)return a.clone();if(a.isAllTime)return this.clone();var m=null!==(c=null===(b=this.start)||void 0===b?void 0:b.getTime())&&
void 0!==c?c:-Infinity;b=null!==(f=null===(d=this.end)||void 0===d?void 0:d.getTime())&&void 0!==f?f:Infinity;d=null!==(h=null===(g=a.start)||void 0===g?void 0:g.getTime())&&void 0!==h?h:-Infinity;a=null!==(l=null===(k=a.end)||void 0===k?void 0:k.getTime())&&void 0!==l?l:Infinity;var n,A;d>=m&&d<=b?n=d:m>=d&&m<=a&&(n=m);b>=d&&b<=a?A=b:a>=m&&a<=b&&(A=a);return isNaN(n)||isNaN(A)?e.empty:(k=new e,k.start=-Infinity===n?null:new Date(n),k.end=Infinity===A?null:new Date(A),k)};c.prototype.offset=function(a,
b){if(this.isEmpty||this.isAllTime)return this.clone();var c=new e,d=this.start,f=this.end;d&&(c.start=k.offsetDate(d,a,b));f&&(c.end=k.offsetDate(f,a,b));return c};c.prototype.equals=function(a){if(!a)return!1;var b=this.start?this.start.getTime():this.start,c=this.end?this.end.getTime():this.end,d=a.start?a.start.getTime():a.start;a=a.end?a.end.getTime():a.end;return b===d&&c===a};var e;a.__decorate([l.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0);a.__decorate([l.reader("end")],
c.prototype,"readEnd",null);a.__decorate([l.writer("end")],c.prototype,"writeEnd",null);a.__decorate([l.property({dependsOn:["start","end"],readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null);a.__decorate([l.property({dependsOn:["start","end"],readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null);a.__decorate([l.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0);a.__decorate([l.reader("start")],c.prototype,"readStart",null);a.__decorate([l.writer("start")],
c.prototype,"writeStart",null);return c=e=a.__decorate([l.subclass("esri.TimeExtent")],c)}(m.JSONSupport);var g=new e,f=new e({start:void 0,end:void 0});return e})},"esri/layers/support/timeUtils":function(){define(["require","exports","../../TimeExtent","../../core/compilerUtils","../../core/jsonMap"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});b.Milliseconds=function(a){return a};var k={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",
setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",
multiplier:100}};b.timeUnitKebabDictionary=l.strict()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:null});b.offsetDate=function(a,b,c){a=new Date(a.getTime());if(b&&c){c=k[c];var d=c.multiplier;a[c.setter](a[c.getter]()+
b*d)}return a};b.combinedViewLayerTimeExtentProperty={type:a,dependsOn:"view.timeExtent layer.timeExtent layer.timeInfo layer.timeOffset layer.timeOffset.value layer.timeOffset.unit layer.useViewTime".split(" "),readOnly:!0,get:function(){var a,b;if(null===(a=this.layer)||void 0===a||!a.timeInfo)return null;a=null===(b=this.view)||void 0===b?void 0:b.timeExtent;b=this.layer.timeExtent;b=this.layer.useViewTime?a&&b?a.intersection(b):a||b:b;if(!b||b.isEmpty)return b;b=(a=this.layer.timeOffset)?b.offset(-a.value,
a.unit):b;a=this._get("timeExtent");return b.equals(a)?a:b}};b.millisecondsPerTimeUnit={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5,months:26784E5,years:31536E6,decades:31536E7,centuries:31536E8};b.truncateDate=function(a,b){switch(b){case "milliseconds":return new Date(a.getTime());case "seconds":return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds());case "minutes":return new Date(a.getFullYear(),a.getMonth(),a.getDate(),
a.getHours(),a.getMinutes());case "hours":return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours());case "days":return new Date(a.getFullYear(),a.getMonth(),a.getDate());case "weeks":return new Date(a.getFullYear(),a.getMonth(),a.getDate()-a.getDay());case "months":return new Date(a.getFullYear(),a.getMonth(),1);case "years":return new Date(a.getFullYear(),0,1);case "decades":return new Date(a.getFullYear()-a.getFullYear()%10,0,1);case "centuries":return new Date(a.getFullYear()-a.getFullYear()%
100,0,1);default:return m.neverReached(b),null}}})},"esri/TimeInterval":function(){define("require exports tslib ./core/JSONSupport ./core/accessorSupport/decorators ./layers/support/timeUtils".split(" "),function(e,b,a,m,l,k){return function(b){function f(a){a=b.call(this,a)||this;a.value=0;a.unit="milliseconds";return a}a.__extends(f,b);c=f;f.prototype.toMilliseconds=function(){return this.value*k.millisecondsPerTimeUnit[this.unit]};f.prototype.clone=function(){return new c({value:this.value,unit:this.unit})};
var c;a.__decorate([l.property({type:Number,json:{write:!0},nonNullable:!0})],f.prototype,"value",void 0);a.__decorate([l.property({type:k.timeUnitKebabDictionary.apiValues,json:{type:k.timeUnitKebabDictionary.jsonValues,read:k.timeUnitKebabDictionary.read,write:k.timeUnitKebabDictionary.write},nonNullable:!0})],f.prototype,"unit",void 0);return f=c=a.__decorate([l.subclass("esri.TimeInterval")],f)}(m.JSONSupport)})},"esri/layers/support/TimeInfo":function(){define("require exports tslib ../../TimeExtent ../../TimeInterval ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./TimeReference ./timeUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d){return function(b){function e(a){a=b.call(this,a)||this;a.cumulative=!1;a.endField=null;a.fullTimeExtent=null;a.hasLiveData=!1;a.interval=null;a.startField=null;a.timeReference=null;a.trackIdField=null;a.useTime=!0;return a}a.__extends(e,b);h=e;e.prototype.readFullTimeExtent=function(a,b){return b.timeExtent&&Array.isArray(b.timeExtent)&&2===b.timeExtent.length?new m({start:b.timeExtent[0],end:b.timeExtent[1]}):null};e.prototype.writeFullTimeExtent=function(a,b){b.timeExtent=
a&&a.start&&a.end?[a.start.getTime(),a.end.getTime()]:null};e.prototype.readInterval=function(a,b){return b.timeInterval&&b.timeIntervalUnits?new l({value:b.timeInterval,unit:d.timeUnitKebabDictionary.fromJSON(b.timeIntervalUnits)}):b.defaultTimeInterval&&b.defaultTimeIntervalUnits?new l({value:b.defaultTimeInterval,unit:d.timeUnitKebabDictionary.fromJSON(b.defaultTimeIntervalUnits)}):null};e.prototype.writeInterval=function(a,b){a?(a=a.toJSON(),b.timeInterval=a.value,b.timeIntervalUnits=a.unit):
(b.timeInterval=null,b.timeIntervalUnits=null)};e.prototype.clone=function(){var a=this.fullTimeExtent,b=this.trackIdField,c=this.useTime;return new h({cumulative:this.cumulative,endField:this.endField,hasLiveData:this.hasLiveData,interval:this.interval,startField:this.startField,timeReference:g.clone(this.timeReference),fullTimeExtent:g.clone(a),trackIdField:b,useTime:c})};var h;a.__decorate([f.property({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],
e.prototype,"cumulative",void 0);a.__decorate([f.property({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],e.prototype,"endField",void 0);a.__decorate([f.property({type:m,json:{write:{enabled:!0,allowNull:!0}}})],e.prototype,"fullTimeExtent",void 0);a.__decorate([f.reader("fullTimeExtent",["timeExtent"])],e.prototype,"readFullTimeExtent",null);a.__decorate([f.writer("fullTimeExtent")],e.prototype,"writeFullTimeExtent",null);a.__decorate([f.property({type:Boolean,
json:{write:!0}})],e.prototype,"hasLiveData",void 0);a.__decorate([f.property({type:l,json:{write:{enabled:!0,allowNull:!0}}})],e.prototype,"interval",void 0);a.__decorate([f.reader("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],e.prototype,"readInterval",null);a.__decorate([f.writer("interval")],e.prototype,"writeInterval",null);a.__decorate([f.property({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],
e.prototype,"startField",void 0);a.__decorate([f.property({type:c,json:{write:{enabled:!0,allowNull:!0}}})],e.prototype,"timeReference",void 0);a.__decorate([f.property({type:String,json:{write:{enabled:!0,allowNull:!0}}})],e.prototype,"trackIdField",void 0);a.__decorate([f.property({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],e.prototype,"useTime",void 0);return e=h=a.__decorate([f.subclass("esri.layers.support.TimeInfo")],e)}(k.JSONSupport)})},
"esri/layers/support/TimeReference":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.respectsDaylightSaving=!1;a.timezone=null;return a}a.__extends(e,b);f=e;e.prototype.readRespectsDaylightSaving=function(a,b){return void 0!==b.respectsDaylightSaving?b.respectsDaylightSaving:void 0!==b.respectDaylightSaving?b.respectDaylightSaving:!1};e.prototype.clone=function(){return new f({respectsDaylightSaving:this.respectsDaylightSaving,
timezone:this.timezone})};var f;a.__decorate([l.property({type:Boolean,json:{write:!0}})],e.prototype,"respectsDaylightSaving",void 0);a.__decorate([l.reader("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],e.prototype,"readRespectsDaylightSaving",null);a.__decorate([l.property({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],e.prototype,"timezone",void 0);return e=f=a.__decorate([l.subclass("esri.layers.support.TimeReference")],e)}(m.JSONSupport)})},
"esri/layers/support/FeatureIndex":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(a){return b.call(this,a)||this}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({name:this.name,fields:this.fields,isAscending:this.isAscending,isUnique:this.isUnique,description:this.description})};var f;a.__decorate([l.property({constructOnly:!0})],
e.prototype,"name",void 0);a.__decorate([l.property({constructOnly:!0})],e.prototype,"fields",void 0);a.__decorate([l.property({constructOnly:!0})],e.prototype,"isAscending",void 0);a.__decorate([l.property({constructOnly:!0})],e.prototype,"isUnique",void 0);a.__decorate([l.property({constructOnly:!0})],e.prototype,"description",void 0);return e=f=a.__decorate([l.subclass("esri.layers.support.FeatureIndex")],e)}(m.JSONSupport);b.FeatureIndex=e;b.default=e})},"esri/layers/support/FeatureReduction":function(){define(["require",
"exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.type=null;return a}a.__extends(e,b);a.__decorate([l.property({type:["selection","cluster"],readOnly:!0,json:{read:!1,write:!0}})],e.prototype,"type",void 0);return e=a.__decorate([l.subclass("esri.layers.support.FeatureReduction")],e)}(m.JSONSupport);b.FeatureReduction=e;b.default=
e})},"esri/layers/support/FeatureReductionCluster":function(){define("require exports tslib ../../PopupTemplate ../../core/JSONSupport ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./AggregateField ./commonProperties ./LabelClass".split(" "),function(e,b,a,m,l,k,g,f,c,d,h){return function(b){function e(a){a=b.call(this,a)||this;a.type="cluster";a.clusterRadius=g.toPt("80px");a.clusterMinSize=g.toPt("12px");a.clusterMaxSize=g.toPt("50px");a.popupEnabled=!0;a.popupTemplate=
null;a.labelingInfo=null;a.labelsVisible=!0;a.fields=null;return a}a.__extends(e,b);l=e;e.prototype.clone=function(){return new l({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:k.clone(this.labelingInfo),labelsVisible:this.labelsVisible,fields:k.clone(this.fields),popupEnabled:this.popupEnabled,popupTemplate:k.clone(this.popupTemplate)})};var l;a.__decorate([f.property({type:["cluster"],readOnly:!0,json:{write:!0}})],e.prototype,
"type",void 0);a.__decorate([f.property({type:Number,cast:function(a){return"auto"===a?a:g.toPt(a)},json:{write:!0}})],e.prototype,"clusterRadius",void 0);a.__decorate([f.property({type:Number,cast:g.toPt,json:{write:!0}})],e.prototype,"clusterMinSize",void 0);a.__decorate([f.property({type:Number,cast:g.toPt,json:{write:!0}})],e.prototype,"clusterMaxSize",void 0);a.__decorate([f.property(d.popupEnabled)],e.prototype,"popupEnabled",void 0);a.__decorate([f.property({type:m,json:{read:{source:"popupInfo"},
write:{target:"popupInfo"}}})],e.prototype,"popupTemplate",void 0);a.__decorate([f.property({type:[h],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],e.prototype,"labelingInfo",void 0);a.__decorate([f.property(d.labelsVisible)],e.prototype,"labelsVisible",void 0);a.__decorate([f.property({type:[c],json:{write:!0}})],e.prototype,"fields",void 0);return e=l=a.__decorate([f.subclass("esri.layers.support.FeatureReductionCluster")],e)}(l.JSONSupport)})},"esri/layers/support/AggregateField":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators ./OutStatistic".split(" "),
function(e,b,a,m,l,k){return function(b){function f(){var a=null!==b&&b.apply(this,arguments)||this;a.name=null;return a}a.__extends(f,b);c=f;f.prototype.clone=function(){return new c({name:this.name,outStatistic:this.outStatistic.clone()})};var c;a.__decorate([l.property({type:String,json:{write:!0}})],f.prototype,"name",void 0);a.__decorate([l.property({type:k,json:{write:!0}})],f.prototype,"outStatistic",void 0);return f=c=a.__decorate([l.subclass("esri.layers.support.AggregateField")],f)}(m.JSONSupport)})},
"esri/layers/support/OutStatistic":function(){define(["require","exports","tslib","../../core/JSONSupport","../../core/accessorSupport/decorators"],function(e,b,a,m,l){return function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.statisticType=null;a.onStatisticField=null;a.onStatisticValueExpression=null;return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f({statisticType:this.statisticType,onStatisticField:this.onStatisticField,onStatisticValueExpression:this.onStatisticValueExpression})};
var f;a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"statisticType",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"onStatisticField",void 0);a.__decorate([l.property({type:String,json:{write:!0}})],e.prototype,"onStatisticValueExpression",void 0);return e=f=a.__decorate([l.subclass("esri.layers.support.OutStatistic")],e)}(m.JSONSupport)})},"esri/layers/support/LabelClass":function(){define("require exports tslib ../../symbols ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./LabelExpressionInfo ./labelUtils ../../symbols/support/defaults ../../symbols/support/jsonUtils".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n){function p(a){return a?"service"===a.origin?!1:!a.layer||"map-image"!==a.layer.type:!0}var r=new l.default({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",
esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",
esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});return function(b){function e(a){a=b.call(this,a)||this;a.name=null;a.deconflictionStrategy="static";a.labelExpression=null;a.labelExpressionInfo=
null;a.labelPlacement=null;a.maxScale=0;a.minScale=0;a.symbol=h.defaultTextSymbol2D;a.useCodedValues=void 0;a.where=null;return a}a.__extends(e,b);k=e;e.evaluateWhere=function(a,b){var c=function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=c?!0:!1}return!1};try{if(null==a)return!0;var d=a.split(" ");if(3===d.length)return c(b[d[0]],d[1],d[2]);if(7===
d.length){var f=c(b[d[0]],d[1],d[2]),e=d[3],g=c(b[d[4]],d[5],d[6]);switch(e){case "AND":return f&&g;case "OR":return f||g}}return!1}catch(B){console.log("Error.: can't parse \x3d "+a)}};e.prototype.writeDeconflictionStrategy=function(a,b,c,d){"static"!==a&&(b[c]=a)};e.prototype.readLabelExpression=function(a,b){b=b.labelExpressionInfo;if(!b||!b.value&&!b.expression)return a};e.prototype.writeLabelExpression=function(a,b,c,f){this.labelExpressionInfo&&(p(f)||f&&"service"===f.origin)&&(null!=this.labelExpressionInfo.value?
a=this.labelExpressionInfo.value.replace(/\{/g,"[").replace(/\}/g,"]"):null!=this.labelExpressionInfo.expression&&(f=d.getSingleFieldArcadeExpression(this.labelExpressionInfo.expression))&&(a="["+f+"]"));null!=a&&(b[c]=a)};e.prototype.writeLabelExpressionInfo=function(a,b,d,f){if(null==a&&null!=this.labelExpression&&p(f))a=new c({expression:this.getLabelExpressionArcade()});else if(!a)return;a=a.toJSON(f);a.expression&&(b[d]=a)};e.prototype.writeMaxScale=function(a,b){if(a||this.minScale)b.maxScale=
a};e.prototype.writeMinScale=function(a,b){if(a||this.maxScale)b.minScale=a};e.prototype.getLabelExpression=function(){var a={expression:"",type:"none"};this.labelExpressionInfo?this.labelExpressionInfo.value?(a.expression=this.labelExpressionInfo.value,a.type="conventional"):this.labelExpressionInfo.expression&&(a.expression=this.labelExpressionInfo.expression,a.type="arcade"):null!=this.labelExpression&&(a.expression=this.labelExpression.replace(/\[/g,"{").replace(/\]/g,"}"),a.type="conventional");
return a};e.prototype.getLabelExpressionArcade=function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return d.convertTemplatedStringToArcade(a.expression);case "arcade":return a.expression}return null};e.prototype.getLabelExpressionSingleField=function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return d.getSingleFieldTemplatedString(a.expression);case "arcade":return d.getSingleFieldArcadeExpression(a.expression)}return null};
e.prototype.clone=function(){return new k({deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:g.clone(this.labelExpressionInfo),labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,symbol:g.clone(this.symbol),where:this.where,useCodedValues:this.useCodedValues})};var k;a.__decorate([f.property({type:String,json:{write:!0}})],e.prototype,"name",void 0);a.__decorate([f.property({type:String})],e.prototype,
"deconflictionStrategy",void 0);a.__decorate([f.writer("deconflictionStrategy")],e.prototype,"writeDeconflictionStrategy",null);a.__decorate([f.property({type:String,json:{write:{allowNull:!0}}})],e.prototype,"labelExpression",void 0);a.__decorate([f.reader("labelExpression")],e.prototype,"readLabelExpression",null);a.__decorate([f.writer("labelExpression")],e.prototype,"writeLabelExpression",null);a.__decorate([f.property({type:c,json:{write:{overridePolicy:function(a,b,c){return p(c)?{allowNull:!0}:
{enabled:!1}}}}})],e.prototype,"labelExpressionInfo",void 0);a.__decorate([f.writer("labelExpressionInfo")],e.prototype,"writeLabelExpressionInfo",null);a.__decorate([f.property({type:r.apiValues,json:{type:r.jsonValues,read:r.read,write:r.write}})],e.prototype,"labelPlacement",void 0);a.__decorate([f.property({type:Number})],e.prototype,"maxScale",void 0);a.__decorate([f.writer("maxScale")],e.prototype,"writeMaxScale",null);a.__decorate([f.property({type:Number})],e.prototype,"minScale",void 0);
a.__decorate([f.writer("minScale")],e.prototype,"writeMinScale",null);a.__decorate([f.property({types:m.symbolTypesLabel,json:{origins:{"web-scene":{types:m.symbolTypesLabel3D,read:n.read,write:n.writeTarget,default:null}},read:n.read,write:n.writeTarget,default:null}})],e.prototype,"symbol",void 0);a.__decorate([f.property({type:Boolean,json:{write:!0}})],e.prototype,"useCodedValues",void 0);a.__decorate([f.property({type:String,json:{write:!0}})],e.prototype,"where",void 0);return e=k=a.__decorate([f.subclass("esri.layers.support.LabelClass")],
e)}(k.JSONSupport)})},"esri/layers/support/LabelExpressionInfo":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators ./labelUtils".split(" "),function(e,b,a,m,l,k){return function(b){function f(){var a=null!==b&&b.apply(this,arguments)||this;a.value=null;a.expression=null;return a}a.__extends(f,b);c=f;f.prototype.readExpression=function(a,b){return b.value?k.convertTemplatedStringToArcade(b.value):a};f.prototype.writeExpression=function(a,b,c){null!=
this.value&&(a=k.convertTemplatedStringToArcade(this.value));b[c]=a};f.prototype.clone=function(){return new c({value:this.value,expression:this.expression})};var c;a.__decorate([l.property({json:{read:!1,write:!1}})],f.prototype,"value",void 0);a.__decorate([l.property({type:String,json:{write:{allowNull:!0}}})],f.prototype,"expression",void 0);a.__decorate([l.reader("expression",["expression","value"])],f.prototype,"readExpression",null);a.__decorate([l.writer("expression")],f.prototype,"writeExpression",
null);return f=c=a.__decorate([l.subclass("esri.layers.support.LabelExpressionInfo")],f)}(m.JSONSupport)})},"esri/layers/support/labelUtils":function(){define(["require","exports","../../core/string"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});var m=/__begin__/ig,l=/__end__/ig,k=/^__begin__/i,g=/__end__$/i;b.convertTemplatedStringToArcade=function(b){b?(b=a.replace(b,function(a){return'__begin__$feature["'+a+'"]__end__'}),b=k.test(b)?b.replace(k,""):'"'+b,b=g.test(b)?b.replace(g,
""):b+'"',b=b.replace(m,'" + ').replace(l,' + "')):b='""';return b};var f=/^\s*\{([^}]+)\}\s*$/i;b.getSingleFieldTemplatedString=function(a){return(a=a.match(f))&&a[1].trim()||null};var c=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,d=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,h=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;b.getSingleFieldArcadeExpression=
function(a){if(!a)return null;var b=c.exec(a)||d.exec(a);return b?b[1]||b[3]:(b=h.exec(a))?b[2]:null}})},"esri/symbols/support/defaults":function(){define("require exports ../../core/compilerUtils ../../core/maybe ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../TextSymbol ./defaultsJSON".split(" "),function(e,b,a,m,l,k,g,f,c){Object.defineProperty(b,"__esModule",{value:!0});b.defaultPointSymbol2D=g.fromJSON(c.defaultPointSymbolJSON);b.defaultPolylineSymbol2D=k.fromJSON(c.defaultPolylineSymbolJSON);
b.defaultPolygonSymbol2D=l.fromJSON(c.defaultPolygonSymbolJSON);b.defaultTextSymbol2D=f.fromJSON(c.defaultTextSymbolJSON);b.getDefaultSymbol2D=function(c){if(m.isNone(c))return null;switch(c.type){case "mesh":break;case "point":case "multipoint":return b.defaultPointSymbol2D;case "polyline":return b.defaultPolylineSymbol2D;case "polygon":case "extent":return b.defaultPolygonSymbol2D;default:a.neverReached(c)}return null};b.errorPointSymbol2D=g.fromJSON(c.errorPointSymbolJSON);b.errorPolylineSymbol2D=
k.fromJSON(c.errorPolylineSymbolJSON);b.errorPolygonSymbol2D=l.fromJSON(c.errorPolygonSymbolJSON)})},"esri/symbols/support/defaultsJSON":function(){define(["require","exports"],function(e,b){Object.defineProperty(b,"__esModule",{value:!0});b.defaultColor=[252,146,31,255];b.defaultOutlineColor=[153,153,153,255];b.defaultPointSymbolJSON={type:"esriSMS",style:"esriSMSCircle",size:6,color:b.defaultColor,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}};b.defaultPolylineSymbolJSON=
{type:"esriSLS",style:"esriSLSSolid",width:.75,color:b.defaultColor};b.defaultPolygonSymbolJSON={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}};b.defaultTextSymbolJSON={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0};b.errorPointSymbolJSON={type:"esriSMS",
style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5};b.errorPolylineSymbolJSON={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5};b.errorPolygonSymbolJSON={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}})},"esri/layers/support/FeatureReductionSelection":function(){define(["require","exports","tslib","../../core/accessorSupport/decorators","./FeatureReduction"],function(e,b,a,m,l){return function(b){function e(a){a=b.call(this,a)||this;a.type="selection";
return a}a.__extends(e,b);f=e;e.prototype.clone=function(){return new f};var f;a.__decorate([m.property({type:["selection"]})],e.prototype,"type",void 0);return e=f=a.__decorate([m.subclass("esri.layers.support.FeatureReductionSelection")],e)}(l.default)})},"esri/layers/support/featureReductionUtils":function(){define("require exports ../../core/Error ../../core/object ./FeatureReduction ./FeatureReductionCluster ./FeatureReductionSelection".split(" "),function(e,b,a,m,l,k,g){function f(b,d,f){return b?
"selection"!==b.type?(f.messages&&f.messages.push(new a("featureReduction:unsupported","FeatureReduction of type '"+b.declaredClass+"' are not supported in scenes.",{featureReduction:b,context:f})),null):b.write(d,f):null}Object.defineProperty(b,"__esModule",{value:!0});b.webSceneFeatureReductionTypes={key:"type",base:l.default,typeMap:{selection:g}};b.read=function(a,b){b=b.layerDefinition||b;if(a=b.featureReduction)switch(a.type){case "selection":return g.fromJSON(a);case "cluster":return k.fromJSON(a)}return null};
b.writeTarget=function(a,b,e,g){(a=f(a,{},g))&&m.setDeepValue(e,a,b)};b.write=f})},"esri/layers/support/FeatureTemplate":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k,g){var f=new m.default({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",
esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});return function(b){function c(a){a=b.call(this,a)||this;a.name=null;a.description=null;a.drawingTool=null;a.prototype=null;
a.thumbnail=null;return a}a.__extends(c,b);c.prototype.writeDrawingTool=function(a,b){b.drawingTool=f.toJSON(a)};c.prototype.writePrototype=function(a,b){b.prototype=k.fixJson(k.clone(a),!0)};c.prototype.writeThumbnail=function(a,b){b.thumbnail=k.fixJson(k.clone(a))};a.__decorate([g.property({json:{write:!0}})],c.prototype,"name",void 0);a.__decorate([g.property({json:{write:!0}})],c.prototype,"description",void 0);a.__decorate([g.property({json:{read:f.read,write:f.write}})],c.prototype,"drawingTool",
void 0);a.__decorate([g.writer("drawingTool")],c.prototype,"writeDrawingTool",null);a.__decorate([g.property({json:{write:!0}})],c.prototype,"prototype",void 0);a.__decorate([g.writer("prototype")],c.prototype,"writePrototype",null);a.__decorate([g.property({json:{write:!0}})],c.prototype,"thumbnail",void 0);a.__decorate([g.writer("thumbnail")],c.prototype,"writeThumbnail",null);return c=a.__decorate([g.subclass("esri.layers.support.FeatureTemplate")],c)}(l.JSONSupport)})},"esri/layers/support/FeatureType":function(){define("require exports tslib ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./domains ./FeatureTemplate".split(" "),
function(e,b,a,m,l,k,g,f){return function(b){function c(a){a=b.call(this,a)||this;a.id=null;a.name=null;a.domains=null;a.templates=null;return a}a.__extends(c,b);c.prototype.readDomains=function(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];switch(d.type){case "range":b[c]=g.RangeDomain.fromJSON(d);break;case "codedValue":b[c]=g.CodedValueDomain.fromJSON(d);break;case "inherited":b[c]=g.InheritedDomain.fromJSON(d)}}return b};c.prototype.writeDomains=function(a,b){var c={},d;for(d in a)a.hasOwnProperty(d)&&
(c[d]=a[d]&&a[d].toJSON());l.fixJson(c);b.domains=c};c.prototype.readTemplates=function(a){return a&&a.map(function(a){return new f(a)})};c.prototype.writeTemplates=function(a,b){b.templates=a&&a.map(function(a){return a.toJSON()})};a.__decorate([k.property({json:{write:!0}})],c.prototype,"id",void 0);a.__decorate([k.property({json:{write:!0}})],c.prototype,"name",void 0);a.__decorate([k.property({json:{write:!0}})],c.prototype,"domains",void 0);a.__decorate([k.reader("domains")],c.prototype,"readDomains",
null);a.__decorate([k.writer("domains")],c.prototype,"writeDomains",null);a.__decorate([k.property({json:{write:!0}})],c.prototype,"templates",void 0);a.__decorate([k.reader("templates")],c.prototype,"readTemplates",null);a.__decorate([k.writer("templates")],c.prototype,"writeTemplates",null);return c=a.__decorate([k.subclass("esri.layers.support.FeatureType")],c)}(m.JSONSupport)})},"esri/layers/support/fieldProperties":function(){define("require exports @dojo/framework/shim/array ../../core/Logger ./Field ./fieldUtils".split(" "),
function(e,b,a,m,l,k){Object.defineProperty(b,"__esModule",{value:!0});var g=m.getLogger("esri.layers.support.fieldProperties");b.defineFieldProperties=function(){return{fields:{type:[l],value:null},outFields:{type:[String],dependsOn:["fields"],json:{read:!1},set:function(a){this._userOutFields=a;this.notifyChange("outFields")},get:function(){var b=this._userOutFields;if(!b||!b.length)return null;if(a.includes(b,"*"))return["*"];if(!this.fields)return b;for(var c=0;c<b.length;c++){var d=b[c];k.hasField(this.fields,
d)||g.error("field-attributes-layer:invalid-field","Invalid field "+d+" found in outFields",{layer:this,outFields:b})}return k.fixFields(this.fields,b)}}}}})},"esri/layers/support/FieldsIndex":function(){define(["require","exports"],function(e,b){return function(){function a(a){this.fields=a;this._fieldsMap=new Map;this._dateFieldsSet=new Set;this.dateFields=[];if(a){for(var b=[],e=0;e<a.length;e++){var g=a[e],f=g&&g.name;if(f){var c=f.toLowerCase().trim();this._fieldsMap.set(f,g);this._fieldsMap.set(c,
g);b.push(c);if("date"===g.type||"esriFieldTypeDate"===g.type)this.dateFields.push(g),this._dateFieldsSet.add(g)}}b.sort();this.uid=b.join(",")}}a.prototype.destroy=function(){this._fieldsMap.clear()};a.prototype.has=function(a){return null!=this.get(a)};a.prototype.get=function(a){return null!=a?this._fieldsMap.get(a)||this._fieldsMap.get(a.toLowerCase().trim()):void 0};a.prototype.isDateField=function(a){return this._dateFieldsSet.has(this.get(a))};a.prototype.normalizeFieldName=function(a){if(a=
this.get(a))return a.name};return a}()})},"esri/layers/support/labelingInfo":function(){define(["require","exports","./LabelClass"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});var m=/\[([^\[\]]+)\]/gi;b.reader=function(b,e,g){var f=this;return b?b.map(function(b){var c=new a;c.read(b,g);if(c.labelExpression){var h=e.fields||e.layerDefinition&&e.layerDefinition.fields||f.fields;c.labelExpression=c.labelExpression.replace(m,function(a,b){a:if(h){a=b.toLowerCase();for(var c=0;c<
h.length;c++){var d=h[c].name;if(d.toLowerCase()===a){b=d;break a}}}return"["+b+"]"})}return c}):null}})},"esri/layers/support/layerSourceUtils":function(){define(["require","exports","../../core/jsonMap","../../core/lang"],function(e,b,a,m){function l(a){return null!=a&&a.hasOwnProperty("mapLayerId")}function k(a){return null!=a&&a.hasOwnProperty("dataSource")}function g(a){if(!a)return a;l(a)&&(a.type=b.MAPLAYER);if(k(a)&&(a.type=b.DATALAYER,!a.dataSource.type)){var c=a.dataSource;c.workspaceId?
c.type=c.gdbVersion?"table":c.query||c.oidFields?"query-table":"raster":c.leftTableKey&&c.rightTableKey&&c.leftTableSource&&c.rightTableSource&&(c.type="join-table",c.leftTableSource=g(c.leftTableSource),c.rightTableSource=g(c.rightTableSource))}return a}function f(a){var c={};if(a.type===b.MAPLAYER)c.mapLayerId=a.mapLayerId,a.gdbVersion&&(c.gdbVersion=a.gdbVersion);else if(a.type===b.DATALAYER){a.fields&&(c.fields=a.fields);var e;e=a.dataSource;var g;switch(e.type){case "table":g={dataSourceName:e.dataSourceName,
workspaceId:e.workspaceId,gdbVersion:e.gdbVersion};break;case "query-table":g={geometryType:d.toJSON(e.geometryType),workspaceId:e.workspaceId,query:e.query,oidFields:e.oidFields,spatialReference:e.spatialReference};break;case "join-table":g={leftTableSource:f(e.leftTableSource),rightTableSource:f(e.rightTableSource),leftTableKey:e.leftTableKey,rightTableKey:e.rightTableKey,joinType:p.toJSON(e.joinType)};break;case "raster":g={workspaceId:e.workspaceId,dataSourceName:e.dataSourceName}}g.type=n.toJSON(e.type);
e=m.fixJson(g);c.dataSource=e}c.type=h.toJSON(a.type);return m.fixJson(c)}function c(a){var f={};if(h.fromJSON(a.type)===b.MAPLAYER)f.mapLayerId=a.mapLayerId,a.gdbVersion&&(f.gdbVersion=a.gdbVersion);else if(h.fromJSON(a.type)===b.DATALAYER){a.fields&&(f.fields=a.fields);var e;e=a.dataSource;var g;switch(e.type){case "table":g={dataSourceName:e.dataSourceName,workspaceId:e.workspaceId,gdbVersion:e.gdbVersion};break;case "queryTable":g={geometryType:d.fromJSON(e.geometryType),workspaceId:e.workspaceId,
query:e.query,oidFields:e.oidFields,spatialReference:e.spatialReference};break;case "joinTable":g={leftTableSource:c(e.leftTableSource),rightTableSource:c(e.rightTableSource),leftTableKey:e.leftTableKey,rightTableKey:e.rightTableKey,joinType:p.fromJSON(e.joinType)};break;case "raster":g={workspaceId:e.workspaceId,dataSourceName:e.dataSourceName}}g.type=n.fromJSON(e.type);e=m.fixJson(g);f.dataSource=e}f.type=h.fromJSON(a.type);return m.fixJson(f)}Object.defineProperty(b,"__esModule",{value:!0});b.MAPLAYER=
"map-layer";b.DATALAYER="data-layer";var d=new a.default({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),h=new a.default({mapLayer:b.MAPLAYER,dataLayer:b.DATALAYER}),n=new a.default({joinTable:"join-table",queryTable:"query-table",raster:"raster",table:"table"}),p=new a.default({esriLeftOuterJoin:"left-outer-join",esriLeftInnerJoin:"left-inner-join"});b.isMapLayerSource=l;b.isDataLayerSource=
k;b.castSource=g;b.sourceToJSON=f;b.sourceFromJSON=c})},"esri/layers/support/Relationship":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){var g=new m.default({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),f=new m.default({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});return function(b){function c(a){a=
b.call(this,a)||this;a.cardinality=null;a.composite=null;a.id=null;a.keyField=null;a.keyFieldInRelationshipTable=null;a.name=null;a.relatedTableId=null;a.relationshipTableId=null;a.role=null;return a}a.__extends(c,b);a.__decorate([k.property({json:{read:g.read,write:g.write}})],c.prototype,"cardinality",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"composite",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"id",void 0);a.__decorate([k.property({json:{read:!0,
write:!0}})],c.prototype,"keyField",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"name",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0);a.__decorate([k.property({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0);a.__decorate([k.property({json:{read:f.read,write:f.write}})],c.prototype,"role",void 0);
return c=a.__decorate([k.subclass("esri.layers.support.Relationship")],c)}(l.JSONSupport)})},"esri/support/popupUtils":function(){define("require exports ../PopupTemplate ../layers/support/fieldUtils ../popup/content ../popup/FieldInfo ../popup/support/FieldInfoFormat".split(" "),function(e,b,a,m,l,k,g){function f(a,b){var d=a;b&&(a=a.filter(function(a){return-1===b.indexOf(a.type)}));a===d&&(a=a.slice());a.sort(c);return a}function c(a,b){return"oid"===a.type?-1:"oid"===b.type?1:p(a)?-1:p(b)?1:(a.alias||
a.name).toLocaleLowerCase().localeCompare((b.alias||b.name).toLocaleLowerCase())}function d(a,b){if(!a||!b)return!1;var c=b.creationDateField,d=b.creatorField,f=b.editDateField;b=b.editorField;return-1!==[c&&c.toLowerCase(),d&&d.toLowerCase(),f&&f.toLowerCase(),b&&b.toLowerCase()].indexOf(a.toLowerCase())}function h(a,b){var c=a.editFieldsInfo,e=a.objectIdField;return f(a.fields,(null===b||void 0===b?void 0:b.ignoreFieldTypes)||w).map(function(a){var f=a.name,g;g=a.editable&&-1===t.indexOf(a.type)&&
!d(a.name,c);return new k({fieldName:f,isEditable:g,label:a.alias,format:n(a),visible:q(a,{editFieldsInfo:c,objectIdField:e,visibleFieldNames:null===b||void 0===b?void 0:b.visibleFieldNames})})})}function n(a){switch(a.type){case "small-integer":case "integer":case "single":return new g({digitSeparator:!0,places:0});case "double":return new g({digitSeparator:!0,places:2});case "date":return new g({dateFormat:"long-month-day-year"});default:return null}}function p(a){if("name"===(a.name&&a.name.toLowerCase())||
"name"===(a.alias&&a.alias.toLowerCase()))return!0}Object.defineProperty(b,"__esModule",{value:!0});var r=["oid","global-id"],t=["oid","global-id","guid"];b.createPopupTemplate=function(b,c){var d=b.displayField,f=b.fields,e=b.title;if(!f)return null;b=h({editFieldsInfo:b.editFieldsInfo,fields:f,objectIdField:b.objectIdField},c);if(!b.length)return null;f={titleBase:e,fields:f,displayField:d};d=m.getDisplayFieldName(f);f=f.titleBase;d=d?f+": {"+d.trim()+"}":f;f=[new l.FieldsContent,new l.AttachmentsContent];
return new a({title:d,content:f,fieldInfos:b})};var v=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],q=function(a,b){var c=b.editFieldsInfo,f=b.objectIdField;return(b=b.visibleFieldNames)?b.has(a.name):d(a.name,c)?!1:f&&a.name===f?!1:-1<r.indexOf(a.type)?!1:!v.some(function(b){return b.test(a.name)})};b.createFieldsContent=function(a,b){return new l.FieldsContent({fieldInfos:h(a,b).filter(function(a){return a.visible})})};
b.createFieldInfos=h;var w=["geometry","blob","raster","guid","xml"]})},"esri/tasks/support/AttachmentQuery":function(){define("require exports tslib ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType".split(" "),function(e,b,a,m,l,k,g){e=function(b){function c(a){a=b.call(this,a)||this;a.attachmentTypes=null;a.attachmentsWhere=null;a.keywords=null;a.globalIds=null;a.name=null;a.num=null;a.objectIds=null;a.returnMetadata=!1;a.size=null;
a.start=null;a.where=null;return a}a.__extends(c,b);d=c;c.prototype.writeStart=function(a,b){b.resultOffset=this.start;b.resultRecordCount=this.num||10};c.prototype.clone=function(){return new d(l.clone({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))};var d;a.__decorate([k.property({type:[String],
json:{write:!0}})],c.prototype,"attachmentTypes",void 0);a.__decorate([k.property({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0);a.__decorate([k.property({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0);a.__decorate([k.property({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0);a.__decorate([k.property({json:{write:!0}})],c.prototype,"name",void 0);a.__decorate([k.property({type:Number,
json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0);a.__decorate([k.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);a.__decorate([k.property({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0);a.__decorate([k.property({type:[Number],json:{write:!0}})],c.prototype,"size",void 0);a.__decorate([k.property({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0);a.__decorate([k.writer("start"),k.writer("num")],
c.prototype,"writeStart",null);a.__decorate([k.property({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0);return c=d=a.__decorate([k.subclass("esri.tasks.support.AttachmentQuery")],c)}(m.JSONSupport);e.from=g.default(e);return e})},"esri/tasks/support/Query":function(){define("require exports tslib ../../geometry ../../geometry ../../symbols ../../TimeExtent ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ../../geometry/support/jsonUtils ../../symbols/support/jsonUtils ./QuantizationParameters ./StatisticDefinition".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v){var q=new f.default({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new f.default({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",
esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});return function(b){function c(a){a=b.call(this,a)||this;a.cacheHint=void 0;a.datumTransformation=null;a.distance=void 0;a.gdbVersion=null;a.geometry=null;a.geometryPrecision=void 0;a.groupByFieldsForStatistics=null;a.having=null;a.historicMoment=null;a.maxAllowableOffset=void 0;a.maxRecordCountFactor=1;a.multipatchOption=null;a.num=void 0;a.objectIds=null;
a.orderByFields=null;a.outFields=null;a.outSpatialReference=null;a.outStatistics=null;a.parameterValues=null;a.pixelSize=null;a.quantizationParameters=null;a.rangeValues=null;a.relationParameter=null;a.resultType=null;a.returnCentroid=!1;a.returnDistinctValues=!1;a.returnExceededLimitFeatures=!0;a.returnGeometry=!1;a.returnQueryGeometry=!1;a.returnM=void 0;a.returnZ=void 0;a.source=null;a.spatialRelationship="intersects";a.start=void 0;a.sqlFormat=null;a.text=null;a.timeExtent=null;a.units=null;a.where=
null;return a}a.__extends(c,b);f=c;c.from=function(a){return n.ensureClass(f,a)};c.prototype.castDatumTransformation=function(a){return"number"===typeof a||"object"===typeof a?a:null};c.prototype.writeHistoricMoment=function(a,b){b.historicMoment=a&&a.getTime()};c.prototype.writeParameterValues=function(a,b){if(a){var c={},d;for(d in a){var f=a[d];Array.isArray(f)?c[d]=f.map(function(a){return a instanceof Date?a.getTime():a}):c[d]=f instanceof Date?f.getTime():f}b.parameterValues=c}};c.prototype.writeStart=
function(a,b){b.resultOffset=this.start;b.resultRecordCount=this.num||10;b.where="1\x3d1"};c.prototype.writeWhere=function(a,b){b.where=a||"1\x3d1"};c.prototype.clone=function(){return new f(d.clone({cacheHint:this.cacheHint,datumTransformation:this.datumTransformation,distance:this.distance,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:this.historicMoment?new Date(this.historicMoment.getTime()):
null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,
returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,source:this.source,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,units:this.units,where:this.where}))};var f;c.MAX_MAX_RECORD_COUNT_FACTOR=5;a.__decorate([h.property({type:Boolean,
json:{write:{writer:function(a,b){null!=a&&(b.cacheHint=a)}}}})],c.prototype,"cacheHint",void 0);a.__decorate([h.property({json:{write:!0}})],c.prototype,"datumTransformation",void 0);a.__decorate([h.cast("datumTransformation")],c.prototype,"castDatumTransformation",null);a.__decorate([h.property({type:Number,json:{write:{overridePolicy:function(a){return{enabled:0<a}}}}})],c.prototype,"distance",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"gdbVersion",void 0);a.__decorate([h.property({types:l.geometryTypes,
json:{read:p.fromJSON,write:!0}})],c.prototype,"geometry",void 0);a.__decorate([h.property({type:Number,json:{write:!0}})],c.prototype,"geometryPrecision",void 0);a.__decorate([h.property({type:[String],json:{write:!0}})],c.prototype,"groupByFieldsForStatistics",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"having",void 0);a.__decorate([h.property({type:Date})],c.prototype,"historicMoment",void 0);a.__decorate([h.writer("historicMoment")],c.prototype,"writeHistoricMoment",
null);a.__decorate([h.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",void 0);a.__decorate([h.property({type:Number,cast:function(a){return 1>a?1:a>f.MAX_MAX_RECORD_COUNT_FACTOR?f.MAX_MAX_RECORD_COUNT_FACTOR:a},json:{write:{overridePolicy:function(a){return{enabled:1<a}}}}})],c.prototype,"maxRecordCountFactor",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"multipatchOption",void 0);a.__decorate([h.property({type:Number,json:{read:{source:"resultRecordCount"}}})],
c.prototype,"num",void 0);a.__decorate([h.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);a.__decorate([h.property({type:[String],json:{write:!0}})],c.prototype,"orderByFields",void 0);a.__decorate([h.property({type:[String],json:{write:!0}})],c.prototype,"outFields",void 0);a.__decorate([h.property({type:m.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],c.prototype,"outSpatialReference",void 0);a.__decorate([h.property({type:[v],json:{write:!0}})],
c.prototype,"outStatistics",void 0);a.__decorate([h.property({json:{write:!0}})],c.prototype,"parameterValues",void 0);a.__decorate([h.writer("parameterValues")],c.prototype,"writeParameterValues",null);a.__decorate([h.property({types:k.symbolTypes,json:{read:r.read,write:!0}})],c.prototype,"pixelSize",void 0);a.__decorate([h.property({type:t.default,json:{write:!0}})],c.prototype,"quantizationParameters",void 0);a.__decorate([h.property({type:[Object],json:{write:!0}})],c.prototype,"rangeValues",
void 0);a.__decorate([h.property({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy:function(){return{enabled:"relation"===this.spatialRelationship}}}}})],c.prototype,"relationParameter",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"resultType",void 0);a.__decorate([h.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnCentroid",void 0);a.__decorate([h.property({type:Boolean,
json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnDistinctValues",void 0);a.__decorate([h.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:!a}}}}})],c.prototype,"returnExceededLimitFeatures",void 0);a.__decorate([h.property({type:Boolean,json:{write:!0}})],c.prototype,"returnGeometry",void 0);a.__decorate([h.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnQueryGeometry",void 0);
a.__decorate([h.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnM",void 0);a.__decorate([h.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnZ",void 0);a.__decorate([h.property({json:{write:!0}})],c.prototype,"source",void 0);a.__decorate([h.property({type:String,json:{read:{source:"spatialRel",reader:q.read},write:{target:"spatialRel",writer:q.write}}})],c.prototype,"spatialRelationship",
void 0);a.__decorate([h.property({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0);a.__decorate([h.writer("start"),h.writer("num")],c.prototype,"writeStart",null);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"sqlFormat",void 0);a.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"text",void 0);a.__decorate([h.property({type:g,json:{write:!0}})],c.prototype,"timeExtent",void 0);a.__decorate([h.property({type:String,json:{read:w.read,
write:{writer:w.write,overridePolicy:function(a){return{enabled:a&&0<this.distance}}}}})],c.prototype,"units",void 0);a.__decorate([h.property({type:String,json:{write:{overridePolicy:function(a){return{enabled:null!=a||0<this.start}}}}})],c.prototype,"where",void 0);a.__decorate([h.writer("where")],c.prototype,"writeWhere",null);return c=f=a.__decorate([h.subclass("esri.tasks.support.Query")],c)}(c.JSONSupport)})},"esri/tasks/support/QuantizationParameters":function(){define("require exports tslib ../../geometry ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "),
function(e,b,a,m,l,k,g,f){Object.defineProperty(b,"__esModule",{value:!0});var c=new l.default({upperLeft:"upper-left",lowerLeft:"lower-left"});e=function(b){function d(a){a=b.call(this,a)||this;a.extent=null;a.mode="view";a.originPosition="upper-left";a.tolerance=1;return a}a.__extends(d,b);e=d;d.prototype.clone=function(){return new e(g.clone({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))};var e;a.__decorate([f.property({type:m.Extent,json:{write:!0}})],
d.prototype,"extent",void 0);a.__decorate([f.property({type:["view","edit"],json:{write:!0}})],d.prototype,"mode",void 0);a.__decorate([f.property({type:String,json:{read:c.read,write:c.write}})],d.prototype,"originPosition",void 0);a.__decorate([f.property({type:Number,json:{write:!0}})],d.prototype,"tolerance",void 0);return d=e=a.__decorate([f.subclass("esri.tasks.support.QuantizationParameters")],d)}(k.JSONSupport);b.default=e})},"esri/tasks/support/StatisticDefinition":function(){define("require exports tslib ../../core/jsonMap ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "),
function(e,b,a,m,l,k,g){var f=new m.default({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete"});return function(b){function c(a){a=b.call(this,a)||this;a.maxPointCount=void 0;a.maxRecordCount=void 0;a.maxVertexCount=void 0;a.onStatisticField=null;a.outStatisticFieldName=null;a.statisticType=null;a.statisticParameters=null;return a}a.__extends(c,b);e=c;c.prototype.writeStatisticParameters=
function(a,b){if("percentile-continuous"===this.statisticType||"percentile-discrete"===this.statisticType)b.statisticParameters=k.clone(a)};c.prototype.clone=function(){return new e({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:k.clone(this.statisticParameters)})};var e;a.__decorate([g.property({type:Number,
json:{write:!0}})],c.prototype,"maxPointCount",void 0);a.__decorate([g.property({type:Number,json:{write:!0}})],c.prototype,"maxRecordCount",void 0);a.__decorate([g.property({type:Number,json:{write:!0}})],c.prototype,"maxVertexCount",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],c.prototype,"onStatisticField",void 0);a.__decorate([g.property({type:String,json:{write:!0}})],c.prototype,"outStatisticFieldName",void 0);a.__decorate([g.property({type:String,json:{read:{source:"statisticType",
reader:f.read},write:{target:"statisticType",writer:f.write}}})],c.prototype,"statisticType",void 0);a.__decorate([g.property({type:Object})],c.prototype,"statisticParameters",void 0);a.__decorate([g.writer("statisticParameters")],c.prototype,"writeStatisticParameters",null);return c=e=a.__decorate([g.subclass("esri.tasks.support.StatisticDefinition")],c)}(l.JSONSupport)})},"esri/tasks/support/RelationshipQuery":function(){define("require exports tslib ../../geometry ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType".split(" "),
function(e,b,a,m,l,k,g,f){e=function(b){function c(a){a=b.call(this,a)||this;a.gdbVersion=null;a.geometryPrecision=void 0;a.historicMoment=null;a.maxAllowableOffset=void 0;a.objectIds=null;a.outFields=null;a.outSpatialReference=null;a.relationshipId=void 0;a.returnGeometry=!1;a.returnM=void 0;a.returnZ=void 0;a.source=null;a.where=null;return a}a.__extends(c,b);f=c;c.prototype._writeHistoricMoment=function(a,b){b.historicMoment=a&&a.getTime()};c.prototype.clone=function(){return new f(k.clone({gdbVersion:this.gdbVersion,
geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&this.historicMoment.getTime(),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,source:this.source,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))};var f;a.__decorate([g.property({type:String,json:{write:!0}})],c.prototype,"gdbVersion",void 0);a.__decorate([g.property({type:Number,
json:{write:!0}})],c.prototype,"geometryPrecision",void 0);a.__decorate([g.property({type:Date})],c.prototype,"historicMoment",void 0);a.__decorate([g.writer("historicMoment")],c.prototype,"_writeHistoricMoment",null);a.__decorate([g.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",void 0);a.__decorate([g.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);a.__decorate([g.property({type:[String],json:{write:!0}})],c.prototype,"outFields",void 0);a.__decorate([g.property({type:m.SpatialReference,
json:{read:{source:"outSR"},write:{target:"outSR"}}})],c.prototype,"outSpatialReference",void 0);a.__decorate([g.property({json:{write:!0}})],c.prototype,"relationshipId",void 0);a.__decorate([g.property({json:{write:!0}})],c.prototype,"returnGeometry",void 0);a.__decorate([g.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnM",void 0);a.__decorate([g.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,
"returnZ",void 0);a.__decorate([g.property({json:{write:!0}})],c.prototype,"source",void 0);a.__decorate([g.property({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0);return c=f=a.__decorate([g.subclass("esri.tasks.support.RelationshipQuery")],c)}(l.JSONSupport);e.from=f.default(e);return e})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("require exports tslib ../../../request ../../../core/Error ../../../core/Loadable ../../../core/maybe ../../../core/promiseUtils ../../../core/urlUtils ../../../core/accessorSupport/decorators ../../../tasks/QueryTask ../../../tasks/operations/queryAttachments ../../../tasks/operations/zscale".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){function r(b){return a.__awaiter(this,void 0,void 0,function(){var d;return a.__generator(this,function(a){return"string"===typeof b?(d=c.dataComponents(b),[2,d?d:{data:b}]):[2,f.create(function(a,d){var f=new FileReader;f.readAsDataURL(b);f.onload=function(){return a(c.dataComponents(f.result))};f.onerror=function(a){return d(a)}})]})})}Object.defineProperty(b,"__esModule",{value:!0});e=function(b){function e(){var a=null!==b&&b.apply(this,arguments)||this;a.type=
"feature-layer";return a}a.__extends(e,b);e.prototype.load=function(a){a=g.isSome(a)?a.signal:null;this.addResolvingPromise(this._fetchService(a));return f.resolve(this)};Object.defineProperty(e.prototype,"queryTask",{get:function(){var a=this.layer,b=a.parsedUrl,d=a.gdbVersion,f=a.spatialReference;return new h({url:null!=a.dynamicDataSource?b.path+"?"+c.objectToQuery(b.query):b.path,gdbVersion:d,sourceSpatialReference:f})},enumerable:!0,configurable:!0});e.prototype.addAttachment=function(b,c){var d=
this;return this.load().then(function(){var f=b.attributes[d.layer.objectIdField],e=d.layer.parsedUrl.path+"/"+f+"/addAttachment",g=a.__assign(a.__assign({f:"json"},d.layer.parsedUrl.query),{gdbVersion:d.layer.gdbVersion}),g=d._getFormDataForAttachment(c,g);return m(e,{body:g}).then(function(a){return d._createFeatureEditResult(a.data.addAttachmentResult)}).catch(function(a){throw d._createAttachmentErrorResult(f,a);})})};e.prototype.updateAttachment=function(b,c,d){var f=this;return this.load().then(function(){var e=
b.attributes[f.layer.objectIdField],g=f.layer.parsedUrl.path+"/"+e+"/updateAttachment",h=a.__assign(a.__assign({f:"json"},f.layer.parsedUrl.query),{gdbVersion:f.layer.gdbVersion,attachmentId:c}),h=f._getFormDataForAttachment(d,h);return m(g,{body:h}).then(function(a){return f._createFeatureEditResult(a.data.updateAttachmentResult)}).catch(function(a){throw f._createAttachmentErrorResult(e,a);})})};e.prototype.applyEdits=function(b,c){return a.__awaiter(this,void 0,void 0,function(){var d,f,e,g,h,
k,l,n,q,t,v,r,w,K,L,H,M,Q;return a.__generator(this,function(u){switch(u.label){case 0:return[4,this.load()];case 1:u.sent(),d=b.addFeatures.map(this._serializeFeature,this),f=b.updateFeatures.map(this._serializeFeature,this),e=this._getFeatureIds(b.deleteFeatures),p.unapplyEditsZUnitScaling(d,f,this.layer.spatialReference),g=[],h=[],k=a.__spreadArrays(b.deleteAttachments),l=0,n=b.addAttachments,u.label=2;case 2:if(!(l<n.length))return[3,5];q=n[l];v=(t=g).push;return[4,this._serializeAttachment(q)];
case 3:v.apply(t,[u.sent()]),u.label=4;case 4:return l++,[3,2];case 5:r=0,w=b.updateAttachments,u.label=6;case 6:if(!(r<w.length))return[3,9];q=w[r];L=(K=h).push;return[4,this._serializeAttachment(q)];case 7:L.apply(K,[u.sent()]),u.label=8;case 8:return r++,[3,6];case 9:return H=g.length||h.length||k.length?{adds:g,updates:h,deletes:k}:null,M={f:"json",adds:d.length?JSON.stringify(d):null,updates:f.length?JSON.stringify(f):null,deletes:e.length?e.join(","):null,gdbVersion:c&&c.gdbVersion||this.layer.gdbVersion,
rollbackOnFailure:c&&c.rollbackOnFailureEnabled,useGlobalIds:c&&c.globalIdUsed,attachments:H&&JSON.stringify(H)},[4,m(this.layer.parsedUrl.path+"/applyEdits",{query:M,method:"post",responseType:"json"})];case 10:return Q=u.sent(),[2,this._createEditsResult(Q)]}})})};e.prototype.deleteAttachments=function(b,c){var d=this;return this.load().then(function(){var f=b.attributes[d.layer.objectIdField];return m(d.layer.parsedUrl.path+"/"+f+"/deleteAttachments",{query:a.__assign(a.__assign({f:"json"},d.layer.parsedUrl.query),
{gdbVersion:d.layer.gdbVersion,attachmentIds:c.join(",")}),method:"post",responseType:"json"}).then(function(a){return a.data.deleteAttachmentResults.map(d._createFeatureEditResult)}).catch(function(a){throw d._createAttachmentErrorResult(f,a);})})};e.prototype.queryAttachments=function(b,c){var d=this;void 0===c&&(c={});var e=this.layer.parsedUrl,g=e.path;return this.load().then(function(){var h=a.__assign(a.__assign({},c),{query:a.__assign(a.__assign({},e.query),{gdbVersion:d.layer.gdbVersion,f:"json"}),
responseType:"json"});if(!d.layer.get("capabilities.operations.supportsQueryAttachments")){for(var k=b.objectIds,l=[],p=0;p<k.length;p++)l.push(m(g+"/"+k[p]+"/attachments",h));return f.all(l).then(function(a){return k.map(function(b,c){return{parentObjectId:b,attachmentInfos:a[c].data.attachmentInfos}})}).then(function(a){return n.processAttachmentQueryResult(a,g)})}return d.queryTask.executeAttachmentQuery(b,h)})};e.prototype.queryFeatures=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.execute(a,
b)})};e.prototype.queryFeaturesJSON=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.executeJSON(a,b)})};e.prototype.queryObjectIds=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.executeForIds(a,b)})};e.prototype.queryFeatureCount=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.executeForCount(a,b)})};e.prototype.queryExtent=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.executeForExtent(a,
b)})};e.prototype.queryRelatedFeatures=function(a,b){var c=this;return this.load().then(function(){return c.queryTask.executeRelationshipQuery(a,b)})};e.prototype._fetchService=function(b){return a.__awaiter(this,void 0,void 0,function(){var c,d;return a.__generator(this,function(f){switch(f.label){case 0:return(c=this.layer.sourceJSON)?(this.sourceJSON=c,[2]):[4,m(this.layer.parsedUrl.path,{query:a.__assign({f:"json"},this.layer.parsedUrl.query),responseType:"json",signal:b})];case 1:return this.sourceJSON=
d=f.sent().data,[2]}})})};e.prototype._serializeFeature=function(a){var b=a.geometry;a=a.attributes;return g.isNone(b)?{attributes:a}:"mesh"===b.type||"extent"===b.type?null:{geometry:b.toJSON(),attributes:a}};e.prototype._serializeAttachment=function(b){return a.__awaiter(this,void 0,void 0,function(){var c,d,f,e,g,h,k,l,m;return a.__generator(this,function(a){switch(a.label){case 0:c=b.feature;d=b.attachment;f=d.globalId;e=d.name;g=d.contentType;h=d.data;k=d.uploadId;l={globalId:f,parentGlobalId:null,
contentType:null,name:null,uploadId:null,data:null};c&&(l.parentGlobalId="attributes"in c?c.attributes&&c.attributes[this.layer.globalIdField]:c.globalId);if(!k)return[3,1];l.uploadId=k;return[3,3];case 1:return h?[4,r(h)]:[3,3];case 2:m=a.sent(),l.contentType=m.mediaType,l.data=m.data,h instanceof File&&(l.name=h.name),a.label=3;case 3:return e&&(l.name=e),g&&(l.contentType=g),[2,l]}})})};e.prototype._getFeatureIds=function(a){var b=a[0];return b?"objectId"in b?this._getIdsFromFeatureIdentifier(a):
this._getIdsFromFeatures(a):[]};e.prototype._getIdsFromFeatures=function(a){var b=this.layer.objectIdField;return a.map(function(a){return a.attributes&&a.attributes[b]})};e.prototype._getIdsFromFeatureIdentifier=function(a){return a.map(function(a){return a.objectId})};e.prototype._createEditsResult=function(a){var b=a.data;a=a.data&&a.data.attachments;return{addFeatureResults:b.addResults?b.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:b.updateResults?b.updateResults.map(this._createFeatureEditResult,
this):[],deleteFeatureResults:b.deleteResults?b.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:a&&a.addResults?a.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:a&&a.updateResults?a.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:a&&a.deleteResults?a.deleteResults.map(this._createFeatureEditResult,this):[]}};e.prototype._createFeatureEditResult=function(a){var b=!0===a.success?null:a.error||{code:void 0,
description:void 0};return{objectId:a.objectId,globalId:a.globalId,error:b?new l("feature-layer-source:edit-failure",b.description,{code:b.code}):null}};e.prototype._createAttachmentErrorResult=function(a,b){return{objectId:a,globalId:null,error:new l("feature-layer-source:attachment-failure",b.details.messages&&b.details.messages[0]||b.message,{code:b.details.httpStatus||b.details.messageCode})}};e.prototype._getFormDataForAttachment=function(a,b){if(a=a instanceof FormData?a:a&&a.elements?new FormData(a):
null)for(var c in b){var d=b[c];null!=d&&(a.set?a.set(c,d):a.append(c,d))}return a};a.__decorate([d.property()],e.prototype,"type",void 0);a.__decorate([d.property({constructOnly:!0})],e.prototype,"layer",void 0);a.__decorate([d.property({readOnly:!0,dependsOn:["layer.parsedUrl","layer.gdbVersion","layer.dynamicDataSource"]})],e.prototype,"queryTask",null);return e=a.__decorate([d.subclass("esri.layers.graphics.sources.FeatureLayerSource")],e)}(k);b.default=e})},"esri/tasks/QueryTask":function(){define("require exports tslib ../geometry ../core/accessorSupport/decorators ./Task ./operations/query ./operations/queryAttachments ./operations/queryRelatedRecords ./support/AttachmentQuery ./support/FeatureSet ./support/Query ./support/RelationshipQuery".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){return function(b){function e(a){a=b.call(this,a)||this;a.gdbVersion=null;a.source=null;a.sourceSpatialReference=null;return a}a.__extends(e,b);e.prototype.execute=function(a,b){return this.executeJSON(a,b).then(function(a){return h.fromJSON(a)})};e.prototype.executeJSON=function(b,c){return g.executeQuery(this.parsedUrl,this._normalizeQuery(b),this.sourceSpatialReference,a.__assign(a.__assign({},this.requestOptions),c)).then(function(a){return a.data})};e.prototype.executeForCount=
function(b,c){return g.executeQueryForCount(this.parsedUrl,this._normalizeQuery(b),a.__assign(a.__assign({},this.requestOptions),c)).then(function(a){return a.data.count})};e.prototype.executeForExtent=function(b,c){return g.executeQueryForExtent(this.parsedUrl,this._normalizeQuery(b),a.__assign(a.__assign({},this.requestOptions),c)).then(function(a){return{count:a.data.count,extent:m.Extent.fromJSON(a.data.extent)}})};e.prototype.executeForIds=function(b,c){return g.executeQueryForIds(this.parsedUrl,
this._normalizeQuery(b),a.__assign(a.__assign({},this.requestOptions),c)).then(function(a){return a.data.objectIds})};e.prototype.executeRelationshipQuery=function(b,d){b=p.from(b);if(this.gdbVersion||this.source)b=b.clone().set({gdbVersion:this.gdbVersion||b.gdbVersion,source:this.source||b.source});return c.executeRelationshipQuery(this.parsedUrl,b,a.__assign(a.__assign({},this.requestOptions),d)).then(function(a){var b=a.data,c={};Object.keys(b).forEach(function(a){return c[a]=h.fromJSON(b[a])});
return c})};e.prototype.executeAttachmentQuery=function(b,c){var e=this;return f.executeAttachmentQuery(this.parsedUrl,d.from(b),a.__assign(a.__assign({},this.requestOptions),c)).then(function(a){return f.processAttachmentQueryResult(a.data.attachmentGroups,e.parsedUrl.path)})};e.prototype._normalizeQuery=function(a){var b=n.from(a);return this.gdbVersion||this.source?(b===a?b.clone():b).set({gdbVersion:this.gdbVersion||a.gdbVersion,source:this.source||a.source}):b};a.__decorate([l.property()],e.prototype,
"gdbVersion",void 0);a.__decorate([l.property()],e.prototype,"source",void 0);a.__decorate([l.property()],e.prototype,"sourceSpatialReference",void 0);return e=a.__decorate([l.subclass("esri.tasks.QueryTask")],e)}(k)})},"esri/tasks/Task":function(){define("require exports tslib ../core/Accessor ../core/urlUtils ../core/accessorSupport/decorators".split(" "),function(e,b,a,m,l,k){return function(b){function f(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];a=b.apply(this,a)||this;a.requestOptions=
null;a.url=null;return a}a.__extends(f,b);f.prototype.normalizeCtorArgs=function(b,d){return"string"!==typeof b?b:a.__assign({url:b},d)};Object.defineProperty(f.prototype,"parsedUrl",{get:function(){return this._parseUrl(this.url)},enumerable:!0,configurable:!0});f.prototype._parseUrl=function(a){return a?l.urlToObject(a):null};f.prototype._encode=function(a,b,f){var c={},d;for(d in a)if("declaredClass"!==d){var e=a[d];if(null!=e&&"function"!==typeof e)if(Array.isArray(e)){c[d]=[];for(var g=0;g<e.length;g++)c[d][g]=
this._encode(e[g])}else"object"===typeof e?(e.toJSON&&(e=e.toJSON(f&&f[d])),c[d]=b?e:JSON.stringify(e)):c[d]=e}return c};a.__decorate([k.property({readOnly:!0,dependsOn:["url"]})],f.prototype,"parsedUrl",null);a.__decorate([k.property()],f.prototype,"requestOptions",void 0);a.__decorate([k.property({type:String})],f.prototype,"url",void 0);return f=a.__decorate([k.subclass("esri.tasks.Task")],f)}(m)})},"esri/tasks/operations/query":function(){define("require exports tslib ../../request ../../core/maybe ../../core/promiseUtils ../../core/urlUtils ../../geometry/support/jsonUtils ../../geometry/support/normalizeUtils ../../layers/graphics/OptimizedFeatureSet ./pbfQueryUtils ./urlUtils ./zscale @dojo/framework/shim/Promise".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p){function r(a,b){var c=a.geometry;a=a.toJSON();c&&(a.geometry=JSON.stringify(c),a.geometryType=f.getJsonType(c),a.inSR=c.spatialReference.wkid||JSON.stringify(c.spatialReference));a.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(","));a.objectIds&&(a.objectIds=a.objectIds.join(","));a.orderByFields&&(a.orderByFields=a.orderByFields.join(","));!a.outFields||b&&(b.returnCountOnly||b.returnExtentOnly||b.returnIdsOnly)?delete a.outFields:
-1!==a.outFields.indexOf("*")?a.outFields="*":a.outFields=a.outFields.join(",");a.outSR?a.outSR=a.outSR.wkid||JSON.stringify(a.outSR):c&&(a.returnGeometry||a.returnCentroid)&&(a.outSR=a.inSR);a.returnGeometry&&delete a.returnGeometry;a.outStatistics&&(a.outStatistics=JSON.stringify(a.outStatistics));a.pixelSize&&(a.pixelSize=JSON.stringify(a.pixelSize));a.quantizationParameters&&(a.quantizationParameters=JSON.stringify(a.quantizationParameters));a.source&&(a.layer=JSON.stringify({source:a.source}),
delete a.source);if(a.timeExtent){c=a.timeExtent;b=c.start;c=c.end;if(null!=b||null!=c)a.time=b===c?b:(null==b?"null":b)+","+(null==c?"null":c);delete a.timeExtent}return a}function t(b,d,f,e,h){void 0===e&&(e={});var k="string"===typeof b?g.urlToObject(b):b;b=d.geometry?[d.geometry]:[];e.responseType="pbf"===f?"array-buffer":"json";return c.normalizeCentralMeridian(b,null,e).then(function(b){b=b&&b[0];l.isSome(b)&&(d=d.clone(),d.geometry=b);b=n.mapParameters(a.__assign(a.__assign(a.__assign(a.__assign({},
k.query),{f:f}),h),r(d,h)));return m(k.path+"/query",a.__assign(a.__assign({},e),{query:b}))})}Object.defineProperty(b,"__esModule",{value:!0});b.queryToQueryStringParameters=r;b.executeQuery=function(b,c,d,f){var e;return a.__awaiter(this,void 0,void 0,function(){var g,h;return a.__generator(this,function(a){switch(a.label){case 0:if(null===(e=c.timeExtent)||void 0===e||!e.isEmpty)return[3,1];h={data:{features:[]}};return[3,3];case 1:return[4,t(b,c,"json",f)];case 2:h=a.sent(),a.label=3;case 3:return g=
h,p.applyFeatureSetZUnitScaling(c,d,g.data),[2,g]}})})};b.executeQueryPBF=function(a,b,c,f){var e;return(null===(e=b.timeExtent)||void 0===e?0:e.isEmpty)?k.resolve({data:new d.default}):t(a,b,"pbf",f).then(function(a){var b=h.parsePBFFeatureQuery(a.data,c);a.data=b;return a})};b.executeQueryForIds=function(a,b,c){var d;return(null===(d=b.timeExtent)||void 0===d?0:d.isEmpty)?k.resolve({data:{objectIds:[]}}):t(a,b,"json",c,{returnIdsOnly:!0})};b.executeQueryForCount=function(a,b,c){var d;return(null===
(d=b.timeExtent)||void 0===d?0:d.isEmpty)?k.resolve({data:{count:0}}):t(a,b,"json",c,{returnIdsOnly:!0,returnCountOnly:!0})};b.executeQueryForExtent=function(a,b,c){var d;return(null===(d=b.timeExtent)||void 0===d?0:d.isEmpty)?k.resolve({data:{count:0,extent:null}}):t(a,b,"json",c,{returnExtentOnly:!0,returnCountOnly:!0}).then(function(a){var b=a.data;if(b.hasOwnProperty("extent"))return a;if(b.features)throw Error("Layer does not support extent calculation.");if(b.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");
return a})};b.runQuery=t})},"esri/geometry/support/normalizeUtils":function(){define("require exports tslib ../../config ../../core/Error ../../core/Logger ../../core/maybe ../../core/promiseUtils ../Polygon ../Polyline ../SpatialReference ./spatialReferenceUtils ./webMercatorUtils ../../tasks/geometry/cut ../../tasks/geometry/simplify".split(" "),function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t){function v(a){return"polygon"===a.type?a.rings:a.paths}function q(a,b){return Math.ceil((a-b)/(2*b))}function w(a,
b){for(var c=0,d=v(a);c<d.length;c++)for(var f=0,e=d[c];f<e.length;f++)e[f][0]+=b;return a}function u(a){for(var b=[],c=0,d=0,f=0;f<a.length;f++){for(var e=a[f],g=null,h=0;h<e.length;h++)g=e[h],b.push(g),0===h?d=c=g[0]:(c=Math.min(c,g[0]),d=Math.max(d,g[0]));g&&b.push([(c+d)/2,0])}return b}function x(a,b){if(!(a instanceof d||a instanceof c))throw B.error("straightLineDensify: the input geometry is neither polyline nor polygon"),new l("straightLineDensify: the input geometry is neither polyline nor polygon");
for(var f=[],e=0,g=v(a);e<g.length;e++){var h=g[e],k=[];f.push(k);k.push([h[0][0],h[0][1]]);for(var m=0;m<h.length-1;m++){var p=h[m][0],n=h[m][1],t=h[m+1][0],q=h[m+1][1],r=Math.sqrt((t-p)*(t-p)+(q-n)*(q-n)),u=(q-n)/r,w=(t-p)/r,D=r/b;if(1<D){for(var x=1;x<=D-1;x++){var C=x*b;k.push([w*C+p,u*C+n])}r=(r+Math.floor(D-1)*b)/2;k.push([w*r+p,u*r+n])}k.push([t,q])}}return"polygon"===a.type?new c({rings:f,spatialReference:a.spatialReference}):new d({paths:f,spatialReference:a.spatialReference})}function y(a,
b,c){b&&(a=x(a,1E6),a=p.webMercatorToGeographic(a,!0));c&&(a=w(a,c));return a}function z(a,b,c){if(Array.isArray(a)){var d=a[0];if(d>b){var f=q(d,b);a[0]=d+-2*f*b}else d<c&&(f=q(d,c),a[0]=d+-2*f*c)}else d=a.x,d>b?(f=q(d,b),a=a.clone().offset(-2*f*b,0)):d<c&&(f=q(d,c),a=a.clone().offset(-2*f*c,0));return a}function A(a,b){for(var c=-1,d=function(d){var f=b.cutIndexes[d],e=b.geometries[d],g=v(e);d=function(a){var b=g[a];b.some(function(c){if(180>c[0])return!0;for(var d=c=0;d<b.length;d++){var f=b[d][0];
c=f>c?f:c}c=Number(c.toFixed(9));c=-360*q(c,180);for(d=0;d<b.length;d++)f=e.getPoint(a,d),e.setPoint(a,d,f.clone().offset(c,0));return!0})};for(var h=0;h<g.length;h++)d(h);if(f===c)if("polygon"===a[0].type)for(d=0,h=v(e);d<h.length;d++)a[f]=a[f].addRing(h[d]);else{if("polyline"===a[0].type)for(d=0,h=v(e);d<h.length;d++)a[f]=a[f].addPath(h[d])}else c=f,a[f]=e},f=0;f<b.cutIndexes.length;f++)d(f);return a}function C(b,e,h){return a.__awaiter(this,void 0,void 0,function(){var k,l,v,u,B,x,D,I,J,T,U,W,
da,Y,P,S,R,V,fa,X,ba,ea,ca,ga,ia,oa,pa,O,ja,ma,aa,ka,ha,na,ra,la,qa;return a.__generator(this,function(a){switch(a.label){case 0:if(!Array.isArray(b))return[2,C([b],e)];k=e?e.url:m.geometryServiceUrl;T=0;U=[];W=[];da=0;for(Y=b;da<Y.length;da++)P=Y[da],g.isNone(P)?W.push(P):(l||(l=P.spatialReference,v=n.getInfo(l),D=(u=l.isWebMercator)?102100:4326,B=E[D].maxX,x=E[D].minX,I=E[D].plus180Line,J=E[D].minus180Line),v?"mesh"===P.type?W.push(P):"point"===P.type?W.push(z(P.clone(),B,x)):"multipoint"===P.type?
(S=P.clone(),S.points=S.points.map(function(a){return z(a,B,x)}),W.push(S)):"extent"===P.type?(R=P.clone(),V=R._normalize(!1,!1,v),W.push(V.rings?new c(V):V)):P.extent?(R=P.extent,fa=q(R.xmin,x),X=2*fa*B,ba=0===X?P.clone():w(P.clone(),X),R.offset(X,0),R.intersects(I)&&R.xmax!==B?(T=R.xmax>T?R.xmax:T,ba=y(ba,u),U.push(ba),W.push("cut")):R.intersects(J)&&R.xmin!==x?(T=2*R.xmax*B>T?2*R.xmax*B:T,ba=y(ba,u,360),U.push(ba),W.push("cut")):W.push(ba)):W.push(P.clone()):W.push(P));ea=q(T,B);ca=-90;ga=ea;for(ia=
new d;0<ea;)oa=-180+360*ea,ia.addPath([[oa,ca],[oa,-1*ca]]),ca*=-1,ea--;return 0<U.length&&0<ga?[4,r.cut(k,U,ia,h)]:[3,3];case 1:pa=a.sent();O=A(U,pa);ja=[];ma=[];for(aa=0;aa<W.length;aa++)ka=W[aa],"cut"!==ka?ma.push(ka):(ha=O.shift(),na=b[aa],g.isSome(na)&&"polygon"===na.type&&na.rings&&1<na.rings.length&&ha.rings.length>=na.rings.length?(ja.push(ha),ma.push("simplify")):ma.push(u?p.geographicToWebMercator(ha):ha));return ja.length?[4,t.simplify(k,ja,h)]:[2,ma];case 2:ra=a.sent();la=[];for(aa=0;aa<
ma.length;aa++)ka=ma[aa],"simplify"!==ka?la.push(ka):la.push(u?p.geographicToWebMercator(ra.shift()):ra.shift());return[2,la];case 3:qa=[];for(aa=0;aa<W.length;aa++)ka=W[aa],"cut"!==ka?qa.push(ka):(ha=U.shift(),qa.push(!0===u?p.geographicToWebMercator(ha):ha));return[2,f.resolve(qa)]}})})}Object.defineProperty(b,"__esModule",{value:!0});var B=k.getLogger("esri.geometry.support.normalizeUtils"),E={102100:{maxX:2.0037508342788905E7,minX:-2.0037508342788905E7,plus180Line:new d({paths:[[[2.0037508342788905E7,
-2.0037508342788905E7],[2.0037508342788905E7,2.0037508342788905E7]]],spatialReference:h.WebMercator}),minus180Line:new d({paths:[[[-2.0037508342788905E7,-2.0037508342788905E7],[-2.0037508342788905E7,2.0037508342788905E7]]],spatialReference:h.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new d({paths:[[[180,-180],[180,180]]],spatialReference:h.WGS84}),minus180Line:new d({paths:[[[-180,-180],[-180,180]]],spatialReference:h.WGS84})}};b.straightLineDensify=x;b.normalizeCentralMeridian=C;b.getDenormalizedExtent=
function(a){var b;if(!a)return null;var c=a.extent;if(!c)return null;var d=a.spatialReference&&n.getInfo(a.spatialReference);if(!d)return c;var d=d.valid,f=d[0],d=d[1],e=c.width,g=c.xmin;b=c.xmax;b=[b,g];g=b[0];b=b[1];if("extent"===a.type||0===e||e<=d||e>2*d||g<f||b>d)return c;var h;switch(a.type){case "polygon":if(1<a.rings.length)h=u(a.rings);else return c;break;case "polyline":if(1<a.paths.length)h=u(a.paths);else return c;break;case "multipoint":h=a.points}a=c.clone();for(f=0;f<h.length;f++){var k=
h[f][0];0>k?(k+=d,b=Math.max(k,b)):(k-=d,g=Math.min(k,g))}a.xmin=g;a.xmax=b;return a.width<e?(a.xmin-=d,a.xmax-=d,a):c};b.normalizeMapX=function(a,b){if(b=n.getInfo(b)){var c=b.valid;b=c[0];var c=c[1],d=c-b;if(a<b)for(;a<b;)a+=d;if(a>c)for(;a>c;)a-=d}return a}})},"esri/tasks/geometry/cut":function(){define("require exports tslib ../../geometry ../../request ../../core/urlUtils ../../geometry/support/jsonUtils".split(" "),function(e,b,a,m,l,k,g){Object.defineProperty(b,"__esModule",{value:!0});b.cut=
function(b,c,d,e){return a.__awaiter(this,void 0,void 0,function(){var f,h,r,t,v,q,w,u;return a.__generator(this,function(p){switch(p.label){case 0:return f="string"===typeof b?k.urlToObject(b):b,h=c[0].spatialReference,r=a.__assign(a.__assign({},e),{query:a.__assign(a.__assign({},f.query),{f:"json",sr:JSON.stringify(h),target:JSON.stringify({geometryType:g.getJsonType(c[0]),geometries:c}),cutter:JSON.stringify(d)})}),[4,l(f.path+"/cut",r)];case 1:return t=p.sent(),v=t.data,q=v.cutIndexes,w=v.geometries,
u=void 0===w?[]:w,[2,{cutIndexes:q,geometries:u.map(function(a){return m.fromJSON(a).set(h)})}]}})})}})},"esri/tasks/geometry/simplify":function(){define("require exports tslib ../../request ../../core/urlUtils ../../geometry/support/jsonUtils".split(" "),function(e,b,a,m,l,k){function g(a){return{geometryType:k.getJsonType(a[0]),geometries:a.map(function(a){return a.toJSON()})}}function f(a,b,f){var c=k.getGeometryType(b);return a.map(function(a){a=c.fromJSON(a);a.spatialReference=f;return a})}Object.defineProperty(b,
"__esModule",{value:!0});b.simplify=function(b,d,e){return a.__awaiter(this,void 0,void 0,function(){var c,h,r,t,v;return a.__generator(this,function(p){switch(p.label){case 0:return c="string"===typeof b?l.urlToObject(b):b,h=d[0].spatialReference,r=k.getJsonType(d[0]),t=a.__assign(a.__assign({},e),{query:a.__assign(a.__assign({},c.query),{f:"json",sr:h.wkid?h.wkid:JSON.stringify(h),geometries:JSON.stringify(g(d))})}),[4,m(c.path+"/simplify",t)];case 1:return v=p.sent(),[2,f(v.data,r,h)]}})})}})},
"esri/tasks/operations/pbfQueryUtils":function(){define(["require","exports","./pbfFeatureServiceParser"],function(e,b,a){Object.defineProperty(b,"__esModule",{value:!0});b.parsePBFFeatureQuery=function(b,e){if((b=a.parseFeatureQuery(b,e).queryResult.featureResult)&&b.features&&b.features.length&&b.objectIdFieldName){e=b.objectIdFieldName;for(var k=0,g=b.features;k<g.length;k++){var f=g[k];f.attributes&&(f.objectId=f.attributes[e])}}return b}})},"esri/tasks/operations/pbfFeatureServiceParser":function(){define("require exports ../../core/Error ../../core/Logger ../../core/pbf ./pbfDehydratedFeatureSet ./pbfOptimizedFeatureSet".split(" "),
function(e,b,a,m,l,k,g){function f(a,b,c){for(c=b.createPointGeometry(c);a.next();)switch(a.tag()){case 3:for(var d=a.getUInt32(),d=a.pos()+d,f=0;a.pos()<d;)b.addCoordinatePoint(c,a.getSInt64(),0,f++);break;default:a.skip()}return c}function c(a,b,c){var d=b.createGeometry(c);for(c=2+(c.hasZ?1:0)+(c.hasM?1:0);a.next();)switch(a.tag()){case 2:for(var f=a.getUInt32(),f=a.pos()+f,e=0;a.pos()<f;)b.addLength(d,a.getUInt32(),e++);break;case 3:for(var f=a.getUInt32(),f=a.pos()+f,g=e=0;a.pos()<f;)b.addCoordinate(d,
a.getSInt64(),g,e),e++,e===c&&(g++,e=0);break;default:a.skip()}return d}function d(a){for(;a.next();)switch(a.tag()){case 1:return a.getString();case 2:return a.getFloat();case 3:return a.getDouble();case 4:return a.getSInt32();case 5:return a.getUInt32();case 6:return a.getInt64();case 7:return a.getUInt64();case 8:return a.getSInt64();case 9:return a.getBool();default:return a.skip(),null}return null}function h(a){for(var b={type:0>=y.length?null:y[0]};a.next();)switch(a.tag()){case 1:b.name=a.getString();
break;case 2:var c=a.getEnum();b.type=c>=y.length?null:y[c];break;case 3:b.alias=a.getString();break;case 4:c=a.getEnum();c=c>=z.length?null:z[c];b.sqlType=c;break;default:a.skip()}return b}function n(a,b,e,g){for(var h=b.createFeature(e),k=0;a.next();)switch(a.tag()){case 1:var l=g[k++].name;h.attributes[l]=a.processMessage(d);break;case 2:h.geometry=a.processMessageWithArgs(c,b,e);break;case 4:h.centroid=a.processMessageWithArgs(f,b,e);break;default:a.skip()}return h}function p(a){for(var b=[1,
1,1,1];a.next();)switch(a.tag()){case 1:b[0]=a.getDouble();break;case 2:b[1]=a.getDouble();break;case 4:b[2]=a.getDouble();break;case 3:b[3]=a.getDouble();break;default:a.skip()}return b}function r(a){for(var b=[0,0,0,0];a.next();)switch(a.tag()){case 1:b[0]=a.getDouble();break;case 2:b[1]=a.getDouble();break;case 4:b[2]=a.getDouble();break;case 3:b[3]=a.getDouble();break;default:a.skip()}return b}function t(a){for(var b={originPosition:0>=A.length?null:A[0]};a.next();)switch(a.tag()){case 1:var c=
a.getEnum();b.originPosition=c>=A.length?null:A[c];break;case 2:b.scale=a.processMessage(p);break;case 3:b.translate=a.processMessage(r);break;default:a.skip()}return b}function v(a){for(var b={};a.next();)switch(a.tag()){case 1:b.shapeAreaFieldName=a.getString();break;case 2:b.shapeLengthFieldName=a.getString();break;case 3:b.units=a.getString();break;default:a.skip()}return b}function q(a,b){for(b=b.createSpatialReference();a.next();)switch(a.tag()){case 1:b.wkid=a.getUInt32();break;case 5:b.wkt=
a.getString();break;default:a.skip()}return b}function w(a,b){var c=b.createFeatureResult();c.geometryType=0>=b.geometryTypes.length?null:b.geometryTypes[0];for(var d=!1;a.next();)switch(a.tag()){case 1:c.objectIdFieldName=a.getString();break;case 3:c.globalIdFieldName=a.getString();break;case 4:c.geohashFieldName=a.getString();break;case 5:c.geometryProperties=a.processMessage(v);break;case 7:var f=a.getEnum();c.geometryType=f>=b.geometryTypes.length?null:b.geometryTypes[f];break;case 8:c.spatialReference=
a.processMessageWithArgs(q,b);break;case 10:c.hasZ=a.getBool();break;case 11:c.hasM=a.getBool();break;case 12:c.transform=a.processMessage(t);break;case 9:f=a.getBool();c.exceededTransferLimit=f;break;case 13:b.addField(c,a.processMessage(h));break;case 15:d||(b.prepareFeatures(c),d=!0);b.addFeature(c,a.processMessageWithArgs(n,b,c,c.fields));break;default:a.skip()}b.finishFeatureResult(c);return c}function u(a,b){for(var c={};a.next();)switch(a.tag()){case 1:c.featureResult=a.processMessageWithArgs(w,
b);break;default:a.skip()}return c}Object.defineProperty(b,"__esModule",{value:!0});var x=m.getLogger("esri.tasks.operations.pbfFeatureServiceParser"),y="esriFieldTypeSmallInteger esriFieldTypeInteger esriFieldTypeSingle esriFieldTypeDouble esriFieldTypeString esriFieldTypeDate esriFieldTypeOID esriFieldTypeGeometry esriFieldTypeBlob esriFieldTypeRaster esriFieldTypeGUID esriFieldTypeGlobalID esriFieldTypeXML".split(" "),z="sqlTypeBigInt sqlTypeBinary sqlTypeBit sqlTypeChar sqlTypeDate sqlTypeDecimal sqlTypeDouble sqlTypeFloat sqlTypeGeometry sqlTypeGUID sqlTypeInteger sqlTypeLongNVarchar sqlTypeLongVarbinary sqlTypeLongVarchar sqlTypeNChar sqlTypeNVarchar sqlTypeOther sqlTypeReal sqlTypeSmallInt sqlTypeSqlXml sqlTypeTime sqlTypeTimestamp sqlTypeTimestamp2 sqlTypeTinyInt sqlTypeVarbinary sqlTypeVarchar".split(" "),
A=["upperLeft","lowerLeft"];b.parseFeatureQuery=function(b,c){c=c&&"dehydrated"===c.type?new k.Context(c):new g.Context(c);try{var d=new l(new Uint8Array(b),new DataView(b));for(b={};d.next();)switch(d.tag()){case 2:b.queryResult=d.processMessageWithArgs(u,c);break;default:d.skip()}return b}catch(D){return d=new a("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:D}),x.error(d),{queryResult:{featureResult:c.createFeatureResult()}}}}})},"esri/core/pbf":function(){define(["require",
"exports","./has","./ObjectPool"],function(e,b,a,m){var l=a("esri-text-decoder")?new TextDecoder("utf-8"):null,k=a("safari")||a("ios")?6:a("ff")?12:32;return function(){function a(a,b,d,e){void 0===d&&(d=0);void 0===e&&(e=a?a.byteLength:0);this._tag=0;this._dataType=99;this.init(a,b,d,e)}a.prototype.init=function(a,b,d,e){this._data=a;this._dataView=b;this._pos=d;this._end=e};a.prototype.clone=function(){return new a(this._data,this._dataView,this._pos,this._end)};a.prototype.pos=function(){return this._pos};
a.prototype.next=function(a){for(;;){if(this._pos===this._end)return!1;var b=this._decodeVarint();this._tag=b>>3;this._dataType=b&7;if(!a||a===this._tag)break;this.skip()}return!0};a.prototype.empty=function(){return this._pos>=this._end};a.prototype.tag=function(){return this._tag};a.prototype.getInt32=function(){return this._decodeVarint()};a.prototype.getInt64=function(){return this._decodeVarint()};a.prototype.getUInt32=function(){var a=4294967295,a=(this._data[this._pos]&127)>>>0;if(128>this._data[this._pos++])return a;
a=(a|(this._data[this._pos]&127)<<7)>>>0;if(128>this._data[this._pos++])return a;a=(a|(this._data[this._pos]&127)<<14)>>>0;if(128>this._data[this._pos++])return a;a=(a|(this._data[this._pos]&127)<<21)>>>0;if(128>this._data[this._pos++])return a;a=(a|(this._data[this._pos]&15)<<28)>>>0;if(128>this._data[this._pos++])return a};a.prototype.getUInt64=function(){return this._decodeVarint()};a.prototype.getSInt32=function(){var a=this.getUInt32();return a>>>1^-(a&1)|0};a.prototype.getSInt64=function(){return this._decodeSVarint()};
a.prototype.getBool=function(){var a=0!==this._data[this._pos];this._skip(1);return a};a.prototype.getEnum=function(){return this._decodeVarint()};a.prototype.getFixed64=function(){var a=this._dataView,b=this._pos,a=a.getUint32(b,!0)+4294967296*a.getUint32(b+4,!0);this._skip(8);return a};a.prototype.getSFixed64=function(){var a=this._dataView,b=this._pos,a=a.getUint32(b,!0)+4294967296*a.getInt32(b+4,!0);this._skip(8);return a};a.prototype.getDouble=function(){var a=this._dataView.getFloat64(this._pos,
!0);this._skip(8);return a};a.prototype.getFixed32=function(){var a=this._dataView.getUint32(this._pos,!0);this._skip(4);return a};a.prototype.getSFixed32=function(){var a=this._dataView.getInt32(this._pos,!0);this._skip(4);return a};a.prototype.getFloat=function(){var a=this._dataView.getFloat32(this._pos,!0);this._skip(4);return a};a.prototype.getString=function(){var a=this._getLength(),b=this._pos,b=this._toString(this._data,b,b+a);this._skip(a);return b};a.prototype.getBytes=function(){var a=
this._getLength(),b=this._pos,b=this._toBytes(this._data,b,b+a);this._skip(a);return b};a.prototype.processMessageWithArgs=function(a,b,d,e){var c=this.getMessage();a=a(c,b,d,e);c.release();return a};a.prototype.processMessage=function(a){var b=this.getMessage();a=a(b);b.release();return a};a.prototype.getMessage=function(){var b=this._getLength(),c=a.pool.acquire();c.init(this._data,this._dataView,this._pos,this._pos+b);this._skip(b);return c};a.prototype.release=function(){a.pool.release(this)};
a.prototype.skip=function(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw Error("Invalid data type!");}};a.prototype._skip=function(a){if(this._pos+a>this._end)throw Error("Attempt to skip past the end of buffer!");this._pos+=a};a.prototype._decodeVarint=function(){var a=this._data,b=this._pos,d=0,e;if(10<=this._end-b){if(e=a[b++],d|=e&127,0!==(e&128)&&(e=a[b++],d|=(e&127)<<7,
0!==(e&128)&&(e=a[b++],d|=(e&127)<<14,0!==(e&128)&&(e=a[b++],d|=(e&127)<<21,0!==(e&128)&&(e=a[b++],d+=268435456*(e&127),0!==(e&128)&&(e=a[b++],d+=34359738368*(e&127),0!==(e&128)&&(e=a[b++],d+=4398046511104*(e&127),0!==(e&128)&&(e=a[b++],d+=562949953421312*(e&127),0!==(e&128)&&(e=a[b++],d+=72057594037927936*(e&127),0!==(e&128)&&(e=a[b++],d+=0x7fffffffffffffff*(e&127),0!==(e&128)))))))))))throw Error("Varint too long!");}else{for(var g=1;b!==this._end;){e=a[b];if(0===(e&128))break;++b;d+=(e&127)*g;
g*=128}if(b===this._end)throw Error("Varint overrun!");++b;d+=e*g}this._pos=b;return d};a.prototype._decodeSVarint=function(){var a=this._decodeVarint();return a%2?-(a+1)/2:a/2};a.prototype._getLength=function(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()};a.prototype._toString=function(a,b,d){d=Math.min(this._end,d);if(d-b>k&&l)return a=a.subarray(b,d),l.decode(a);for(var c="",e="";b<d;++b){var f=a[b];f&128?e+="%"+f.toString(16):(c+=decodeURIComponent(e)+
String.fromCharCode(f),e="")}e.length&&(c+=decodeURIComponent(e));return c};a.prototype._toBytes=function(a,b,d){d=Math.min(this._end,d);return new Uint8Array(a.buffer,b,d-b)};a.pool=new m(a,null,function(a){a._data=null;a._dataView=null});return a}()})},"esri/tasks/operations/pbfDehydratedFeatureSet":function(){define("require exports ../../Graphic ../../core/compilerUtils ../../geometry/SpatialReference ../../layers/graphics/dehydratedFeatures ../../layers/support/Field ./zscale".split(" "),function(e,
b,a,m,l,k,g,f){function c(a,b){return b}function d(a,b,c,d){switch(c){case 0:return r(a,b+d,0);case 1:return("lowerLeft"===a.originPosition?r:t)(a,b+d,1)}}function h(a,b,c,d){switch(c){case 0:return r(a,b+d,0);case 1:return("lowerLeft"===a.originPosition?r:t)(a,b+d,1);case 2:return r(a,b,2)}}function n(a,b,c,d){switch(c){case 0:return r(a,b+d,0);case 1:return("lowerLeft"===a.originPosition?r:t)(a,b+d,1);case 2:return r(a,b,3)}}function p(a,b,c,d){switch(c){case 0:return r(a,b+d,0);case 1:return("lowerLeft"===
a.originPosition?r:t)(a,b+d,1);case 2:return r(a,b,2);case 3:return r(a,b,3)}}function r(a,b,c){return a.translate[c]+b*a.scale[c]}function t(a,b,c){return a.translate[c]-b*a.scale[c]}Object.defineProperty(b,"__esModule",{value:!0});e=function(){function b(a){this.options=a;this.geometryTypes=["point","multipoint","polyline","polygon"];this.previousCoordinate=[0,0];this.transform=null;this.applyTransform=c;this.lengths=[];this.vertexDimension=this.toAddInCurrentPath=this.currentLengthIndex=0;this.coordinateBuffer=
null;this.coordinateBufferPtr=0;this.AttributesConstructor=function(){}}b.prototype.createFeatureResult=function(){return new k.DehydratedFeatureSetClass};b.prototype.finishFeatureResult=function(a){this.options.applyTransform&&(a.transform=null);this.AttributesConstructor=function(){};this.coordinateBuffer=null;this.lengths.length=0;if(a.hasZ){var b=f.getGeometryZScaler(a.geometryType,this.options.sourceSpatialReference,a.spatialReference);if(b){var c=0;for(a=a.features;c<a.length;c++)b(a[c].geometry)}}};
b.prototype.createSpatialReference=function(){return new l};b.prototype.addField=function(a,b){a.fields.push(g.fromJSON(b));var c=a.fields.map(function(a){return a.name});this.AttributesConstructor=function(){for(var a=0;a<c.length;a++)this[c[a]]=null}};b.prototype.addFeature=function(a,b){var c=this.options.maxStringAttributeLength?this.options.maxStringAttributeLength:0;if(0<c)for(var d in b.attributes){var e=b.attributes[d];"string"===typeof e&&e.length>c&&(b.attributes[d]="")}a.features.push(b)};
b.prototype.prepareFeatures=function(a){var b=this;this.options.applyTransform&&a.transform&&(this.transform=a.transform,this.applyTransform=this.deriveApplyTransform(a));this.vertexDimension=2;a.hasZ&&this.vertexDimension++;a.hasM&&this.vertexDimension++;switch(a.geometryType){case "point":this.addCoordinate=function(a,c,d,e){return b.addCoordinatePoint(a,c,e)};this.createGeometry=function(a){return b.createPointGeometry(a)};break;case "polygon":this.addCoordinate=function(a,c,d,e){return b.addCoordinatePolygon(a,
c,e)};this.createGeometry=function(a){return b.createPolygonGeometry(a)};break;case "polyline":this.addCoordinate=function(a,c,d,e){return b.addCoordinatePolyline(a,c,e)};this.createGeometry=function(a){return b.createPolylineGeometry(a)};break;case "multipoint":this.addCoordinate=function(a,c,d,e){return b.addCoordinateMultipoint(a,c,e)};this.createGeometry=function(a){return b.createMultipointGeometry(a)};break;default:m.neverReached(a.geometryType)}};b.prototype.createFeature=function(){this.currentLengthIndex=
this.lengths.length=0;this.previousCoordinate[0]=0;this.previousCoordinate[1]=0;this.coordinateBuffer=null;this.coordinateBufferPtr=0;return new k.DehydratedFeatureClass(a.generateUID(),null,new this.AttributesConstructor)};b.prototype.addLength=function(a,b,c){0===this.lengths.length&&(this.toAddInCurrentPath=b);this.lengths.push(b)};b.prototype.createPointGeometry=function(a){a={type:"point",x:0,y:0,spatialReference:a.spatialReference,hasZ:!!a.hasZ,hasM:!!a.hasM};a.hasZ&&(a.z=0);a.hasM&&(a.m=0);
return a};b.prototype.addCoordinatePoint=function(a,b,c){b=this.applyTransform(this.transform,b,c,0);switch(c){case 0:a.x=b;break;case 1:a.y=b;break;case 2:a.hasZ?a.z=b:a.m=b;break;case 3:a.m=b}};b.prototype.transformPathLikeValue=function(a,b){var c=0;1>=b&&(c=this.previousCoordinate[b],this.previousCoordinate[b]+=a);return this.applyTransform(this.transform,a,b,c)};b.prototype.addCoordinatePolyline=function(a,b,c){this.dehydratedAddPointsCoordinate(a.paths,b,c)};b.prototype.addCoordinatePolygon=
function(a,b,c){this.dehydratedAddPointsCoordinate(a.rings,b,c)};b.prototype.addCoordinateMultipoint=function(a,b,c){0===c&&a.points.push([]);b=this.transformPathLikeValue(b,c);a.points[a.points.length-1].push(b)};b.prototype.createPolygonGeometry=function(a){return{type:"polygon",rings:[[]],spatialReference:a.spatialReference,hasZ:!!a.hasZ,hasM:!!a.hasM}};b.prototype.createPolylineGeometry=function(a){return{type:"polyline",paths:[[]],spatialReference:a.spatialReference,hasZ:!!a.hasZ,hasM:!!a.hasM}};
b.prototype.createMultipointGeometry=function(a){return{type:"multipoint",points:[],spatialReference:a.spatialReference,hasZ:!!a.hasZ,hasM:!!a.hasM}};b.prototype.dehydratedAddPointsCoordinate=function(a,b,c){if(null===this.coordinateBuffer){var d=this.lengths.reduce(function(a,b){return a+b},0);this.coordinateBuffer=new Float64Array(d*this.vertexDimension)}0===c&&0===this.toAddInCurrentPath--&&(a.push([]),this.toAddInCurrentPath=this.lengths[++this.currentLengthIndex]-1,this.previousCoordinate[0]=
0,this.previousCoordinate[1]=0);b=this.transformPathLikeValue(b,c);a=a[a.length-1];0===c&&a.push(new Float64Array(this.coordinateBuffer.buffer,this.coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT,this.vertexDimension));this.coordinateBuffer[this.coordinateBufferPtr++]=b};b.prototype.deriveApplyTransform=function(a){var b=a.hasZ;a=a.hasM;return b&&a?p:b?h:a?n:d};return b}();b.Context=e})},"esri/layers/graphics/dehydratedFeatures":function(){define("require exports ../../geometry ../../Graphic ../../core/compilerUtils ../../core/has ../../core/lang ../../core/maybe ../../core/typedArrayUtil ../../geometry/SpatialReference ../../geometry/support/aaBoundingBox ../../geometry/support/aaBoundingRect ../../geometry/support/jsonUtils ../../geometry/support/quantizationUtils ../support/Field ./dehydratedFeatureComparison".split(" "),
function(e,b,a,m,l,k,g,f,c,d,h,n,p,r,t,v){function q(a,b,c){if(!a)return null;switch(b){case "point":return a={x:a.x,y:a.y,z:a.z,m:a.m,hasZ:null!=a.z,hasM:null!=a.m,type:"point",spatialReference:c};case "polyline":return a={paths:a.paths,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polyline",spatialReference:c};case "polygon":return a={rings:a.rings,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"polygon",spatialReference:c};case "multipoint":return a={points:a.points,hasZ:!!a.hasZ,hasM:!!a.hasM,type:"multipoint",spatialReference:c}}}
function w(a,b,c,d){return{x:a,y:b,z:c,hasZ:null!=c,hasM:!1,spatialReference:d,type:"point"}}function u(a){return"declaredClass"in a}function x(a){return"declaredClass"in a}function y(a){return"declaredClass"in a}function z(a){return f.isNone(a)?null:u(a)?a:p.fromJSON(B(a))}function A(a){if(!a)return 0;var b=32,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];switch(typeof d){case "string":b+=K(d);break;default:case "number":b+=16}}return b}function C(a){if(f.isNone(a))return 0;var b=32;switch(a.type){case "point":b+=
42;break;case "polyline":case "polygon":var d=0,e=2+(a.hasZ?1:0)+(a.hasM?1:0);a="polyline"===a.type?a.paths:a.rings;for(var g=0;g<a.length;g++)d+=a[g].length;b=b+(8*d*e+64)+128*d+34;b+=32*(a.length+1);break;case "multipoint":d=a.points.length;b+=8*d*(2+(a.hasZ?1:0)+(a.hasM?1:0))+64;b+=128*d;b+=34;b+=32;break;case "extent":b+=98;a.hasM&&(b+=32);a.hasZ&&(b+=32);break;case "mesh":b+=c.estimateSize(a.vertexAttributes.position);b+=c.estimateSize(a.vertexAttributes.normal);b+=c.estimateSize(a.vertexAttributes.uv);
b+=c.estimateSize(a.vertexAttributes.tangent);break;default:l.neverReached(a)}return b}function B(a){var b=a.spatialReference.toJSON();switch(a.type){case "point":return{x:a.x,y:a.y,z:a.z,m:a.m,spatialReference:b};case "polygon":var c=a.hasZ,d=a.hasM;return{rings:E(a.rings),hasZ:c,hasM:d,spatialReference:b};case "polyline":var e=a.paths,c=a.hasZ,d=a.hasM;return{paths:E(e),hasZ:c,hasM:d,spatialReference:b};case "extent":var e=a.xmin,f=a.xmax,g=a.ymin,h=a.ymax,k=a.zmin,m=a.zmax,p=a.mmin,n=a.mmax,c=
a.hasZ,d=a.hasM;return{xmin:e,xmax:f,ymin:g,ymax:h,zmin:k,zmax:m,mmin:p,mmax:n,hasZ:c,hasM:d,spatialReference:b};case "multipoint":return e=a.points,c=a.hasZ,d=a.hasM,{points:J(e)?D(e):e,hasZ:c,hasM:d,spatialReference:b};default:l.neverReached(a)}}function E(a){return I(a)?a.map(function(a){return D(a)}):a}function D(a){return a.map(function(a){return c.toArray(a)})}function I(a){for(var b=0;b<a.length;b++){var c=a[b];if(0!==c.length)return J(c)}return!1}function J(a){return a.length&&(c.isFloat32Array(a[0])||
c.isFloat64Array(a[0]))}function F(a,b){h.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[3]=a.x;b[1]=b[4]=a.y;a.hasZ&&(b[2]=b[5]=a.z);break;case "polyline":for(var c=0;c<a.paths.length;c++)h.expandWithNestedArray(b,a.paths[c],a.hasZ);break;case "polygon":for(c=0;c<a.rings.length;c++)h.expandWithNestedArray(b,a.rings[c],a.hasZ);break;case "multipoint":h.expandWithNestedArray(b,a.points,a.hasZ);break;case "extent":b[0]=a.xmin;b[1]=a.ymin;b[3]=a.xmax;b[4]=a.ymax;null!=a.zmin&&
(b[2]=a.zmin);null!=a.zmax&&(b[5]=a.zmax);break;default:l.neverReached(a)}}function G(a,b){n.empty(b);"mesh"===a.type&&(a=a.extent);switch(a.type){case "point":b[0]=b[2]=a.x;b[1]=b[3]=a.y;break;case "polyline":for(var c=0;c<a.paths.length;c++)n.expandWithNestedArray(b,a.paths[c]);break;case "polygon":for(c=0;c<a.rings.length;c++)n.expandWithNestedArray(b,a.rings[c]);break;case "multipoint":n.expandWithNestedArray(b,a.points);break;case "extent":b[0]=a.xmin;b[1]=a.ymin;b[2]=a.xmax;b[3]=a.ymax;break;
default:l.neverReached(a)}}Object.defineProperty(b,"__esModule",{value:!0});b.equals=v.equals;e=function(){return function(a,b,c){this.uid=a;this.geometry=b;this.attributes=c;this.visible=!0;this.centroid=this.objectId=null}}();b.DehydratedFeatureClass=e;b.hasGeometry=function(a){return f.isSome(a.geometry)};b.isFeatureGeometry=function(b){return a.isFeatureGeometryType(b.type)};e=function(){return function(){this.exceededTransferLimit=!1;this.features=[];this.fields=[];this.hasZ=this.hasM=!1;this.transform=
this.spatialReference=this.geohashFieldName=this.geometryProperties=this.globalIdFieldName=this.objectIdFieldName=this.geometryType=null}}();b.DehydratedFeatureSetClass=e;b.isPoint=function(a){return"point"===a.type};b.fromFeatureSetJSON=function(b){var c=a.featureGeometryTypeKebabDictionary.fromJSON(b.geometryType),e=d.fromJSON(b.spatialReference),f=b.transform,g=b.features.map(function(a){var d=b.objectIdFieldName;a={uid:m.generateUID(),objectId:d&&a.attributes?a.attributes[d]:null,attributes:a.attributes,
geometry:q(a.geometry,c,e),visible:!0};if((d=a.geometry)&&f)switch(d.type){case "point":a.geometry=r.hydratePoint(f,d,d,d.hasZ,d.hasM);break;case "multipoint":a.geometry=r.hydrateMultipoint(f,d,d,d.hasZ,d.hasM);break;case "polygon":a.geometry=r.hydratePolygon(f,d,d,d.hasZ,d.hasM);break;case "polyline":a.geometry=r.hydratePolyline(f,d,d,d.hasZ,d.hasM);break;default:l.neverReached(d)}return a});return{geometryType:c,features:g,spatialReference:e,fields:b.fields?b.fields.map(function(a){return t.fromJSON(a)}):
null,objectIdFieldName:b.objectIdFieldName,globalIdFieldName:b.globalIdFieldName,geohashFieldName:b.geohashFieldName,geometryProperties:b.geometryProperties,hasZ:b.hasZ,hasM:b.hasM,exceededTransferLimit:b.exceededTransferLimit,transform:null}};b.fromJSONGeometry=q;b.makeDehydratedPoint=w;b.isHydratedGeometry=u;b.isHydratedPoint=x;b.isHydratedGraphic=y;b.hydrateGraphic=function(a,b){if(!a)return null;if(y(a))return a;b=new m({layer:b,sourceLayer:b});b.visible=a.visible;b.symbol=g.clone(a.symbol);b.attributes=
g.clone(a.attributes);b.geometry=z(a.geometry);return b};b.hydrateGeometry=z;b.clonePoint=function(a,b){if(!a)return null;if(x(a)){if(null==b)return a.clone();if(x(b))return b.copy(a)}null!=b?(b.x=a.x,b.y=a.y,b.spatialReference=a.spatialReference,a.hasZ?(b.z=a.z,b.hasZ=a.hasZ):(b.z=null,b.hasZ=!1),a.hasM?(b.m=a.m,b.hasM=!0):(b.m=null,b.hasM=!1)):(b=w(a.x,a.y,a.z,a.spatialReference),a.hasM&&(b.m=a.m,b.hasM=!0));return b};var K=k("esri-text-decoder")?function(a){return 32+a.length}:function(a){return 32*
a.length};b.estimateAttributesObjectSize=A;b.estimateGeometryObjectSize=C;b.estimateSize=function(a){var b;b=32+A(a.attributes);return b=b+3+(8+C(a.geometry))};b.numVertices=function(a){if(f.isNone(a))return 0;switch(a.type){case "point":return 1;case "polyline":var b=0,c=0;for(a=a.paths;c<a.length;c++)b+=a[c].length;return b;case "polygon":c=b=0;for(a=a.rings;c<a.length;c++)b+=a[c].length;return b;case "multipoint":return a.points.length;case "extent":return 2;case "mesh":return(b=a.vertexAttributes&&
a.vertexAttributes.position)?b.length/3:0;default:l.neverReached(a)}};b.hasVertices=function(a){if(!a)return!1;switch(a.type){case "extent":case "point":return!0;case "polyline":var b=0;for(a=a.paths;b<a.length;b++)if(0<a[b].length)return!0;return!1;case "polygon":b=0;for(a=a.rings;b<a.length;b++)if(0<a[b].length)return!0;return!1;case "multipoint":return 0<a.points.length;case "mesh":return a.vertexAttributes&&a.vertexAttributes.position&&0<a.vertexAttributes.position.length;default:l.neverReached(a)}};
b.computeAABB=F;b.expandAABB=function(a,b){F(a,L);h.expand(b,L)};b.computeAABR=G;b.expandAABR=function(a,b){G(a,H);n.expand(b,H)};b.getObjectId=function(a,b){return null!=a.objectId?a.objectId:a.attributes&&b?a.attributes[b]:null};var L=h.create(),H=n.create()})},"esri/geometry/support/aaBoundingBox":function(){define(["require","exports","../../core/maybe","../Extent","./aaBoundingRect"],function(e,b,a,m,l){function k(a){void 0===a&&(a=b.ZERO);return[a[0],a[1],a[2],a[3],a[4],a[5]]}function g(a,b,
c,d,e,f,g){void 0===g&&(g=k());g[0]=a;g[1]=b;g[2]=c;g[3]=d;g[4]=e;g[5]=f;return g}function f(a){return a[0]>=a[3]?0:a[3]-a[0]}function c(a){return a[1]>=a[4]?0:a[4]-a[1]}function d(a){return a[2]>=a[5]?0:a[5]-a[2]}function h(a,b){return Math.max(b[0],a[0])<=Math.min(b[3],a[3])&&Math.max(b[1],a[1])<=Math.min(b[4],a[4])&&Math.max(b[2],a[2])<=Math.min(b[5],a[5])}function n(a,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];return a}function p(a){return 6===a.length}Object.defineProperty(b,
"__esModule",{value:!0});b.create=k;b.fromValues=g;b.fromExtent=function(a,b){void 0===b&&(b=k());b[0]=a.xmin;b[1]=a.ymin;b[2]=a.zmin;b[3]=a.xmax;b[4]=a.ymax;b[5]=a.zmax;return b};b.toExtent=function(a,b){return isFinite(a[2])||isFinite(a[5])?new m({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],zmin:a[2],zmax:a[5],spatialReference:b}):new m({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],spatialReference:b})};b.fromMinMax=function(a,b,c){void 0===c&&(c=k());c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=b[0];c[4]=b[1];c[5]=
b[2];return c};b.expandPointInPlace=function(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[3]&&(a[3]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[4]&&(a[4]=b[1]);b[2]<a[2]&&(a[2]=b[2]);b[2]>a[5]&&(a[5]=b[2])};b.expand=function(a,b,c){void 0===c&&(c=a);p(b)?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[2]=Math.min(a[2],b[2]),c[3]=Math.max(a[3],b[3]),c[4]=Math.max(a[4],b[4]),c[5]=Math.max(a[5],b[5])):l.is(b)?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[3]=Math.max(a[3],b[2]),c[4]=Math.max(a[4],b[3])):2===
b.length?(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[3]=Math.max(a[3],b[0]),c[4]=Math.max(a[4],b[1])):3===b.length&&(c[0]=Math.min(a[0],b[0]),c[1]=Math.min(a[1],b[1]),c[2]=Math.min(a[2],b[2]),c[3]=Math.max(a[3],b[0]),c[4]=Math.max(a[4],b[1]),c[5]=Math.max(a[5],b[2]));return c};b.expandWithBuffer=function(a,b,c,d,e){void 0===c&&(c=0);void 0===d&&(d=b.length/3);void 0===e&&(e=a);var f=a[0],g=a[1],h=a[2],k=a[3],l=a[4];a=a[5];for(var m=0;m<d;m++)f=Math.min(f,b[c+3*m]),g=Math.min(g,b[c+3*m+1]),
h=Math.min(h,b[c+3*m+2]),k=Math.max(k,b[c+3*m]),l=Math.max(l,b[c+3*m+1]),a=Math.max(a,b[c+3*m+2]);e[0]=f;e[1]=g;e[2]=h;e[3]=k;e[4]=l;e[5]=a;return e};b.expandWithOffset=function(a,b,c,d,e){void 0===e&&(e=a);e[0]=Math.min(a[0],a[0]+b);e[3]=Math.max(a[3],a[3]+b);e[1]=Math.min(a[1],a[1]+c);e[4]=Math.max(a[4],a[4]+c);e[2]=Math.min(a[2],a[2]+d);e[5]=Math.max(a[5],a[5]+d);return e};b.expandWithNestedArray=function(a,b,c,d){void 0===d&&(d=a);var e=b.length,f=a[0],g=a[1],h=a[2],k=a[3],l=a[4];a=a[5];if(c)for(c=
0;c<e;c++){var m=b[c],f=Math.min(f,m[0]),g=Math.min(g,m[1]),h=Math.min(h,m[2]),k=Math.max(k,m[0]),l=Math.max(l,m[1]);a=Math.max(a,m[2])}else for(c=0;c<e;c++)m=b[c],f=Math.min(f,m[0]),g=Math.min(g,m[1]),k=Math.max(k,m[0]),l=Math.max(l,m[1]);d[0]=f;d[1]=g;d[2]=h;d[3]=k;d[4]=l;d[5]=a;return d};b.allFinite=function(a){for(var b=0;6>b;b++)if(!isFinite(a[b]))return!1;return!0};b.width=f;b.depth=c;b.height=d;b.diameter=function(a){var b=f(a),e=d(a);a=c(a);return Math.sqrt(b*b+e*e+a*a)};b.center=function(a,
b){void 0===b&&(b=[0,0,0]);b[0]=a[0]+f(a)/2;b[1]=a[1]+c(a)/2;b[2]=a[2]+d(a)/2;return b};b.size=function(a,b){void 0===b&&(b=[0,0,0]);b[0]=f(a);b[1]=c(a);b[2]=d(a);return b};b.maximumDimension=function(a){return Math.max(f(a),d(a),c(a))};b.containsPoint=function(a,b){return b[0]>=a[0]&&b[1]>=a[1]&&b[2]>=a[2]&&b[0]<=a[3]&&b[1]<=a[4]&&b[2]<=a[5]};b.containsPointWithMargin=function(a,b,c){return b[0]>=a[0]-c&&b[1]>=a[1]-c&&b[2]>=a[2]-c&&b[0]<=a[3]+c&&b[1]<=a[4]+c&&b[2]<=a[5]+c};b.contains=function(a,
b){return b[0]>=a[0]&&b[1]>=a[1]&&b[2]>=a[2]&&b[3]<=a[3]&&b[4]<=a[4]&&b[5]<=a[5]};b.intersects=h;b.intersectsClippingArea=function(b,c){return a.isNone(c)?!0:h(b,c)};b.offset=function(a,b,c,d,e){void 0===e&&(e=a);e[0]=a[0]+b;e[1]=a[1]+c;e[2]=a[2]+d;e[3]=a[3]+b;e[4]=a[4]+c;e[5]=a[5]+d;return e};b.getMin=function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b};b.getMax=function(a,b){b[0]=a[3];b[1]=a[4];b[2]=a[5];return b};b.setMin=function(a,b,c){void 0===c&&(c=a);c[0]=b[0];c[1]=b[1];c[2]=b[2];c!==a&&
(c[3]=a[3],c[4]=a[4],c[5]=a[5]);return c};b.setMax=function(a,b,c){void 0===c&&(c=a);c[3]=b[0];c[4]=b[1];c[5]=b[2];c!==a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);return a};b.set=n;b.empty=function(a){return a?n(a,b.NEGATIVE_INFINITY):k(b.NEGATIVE_INFINITY)};b.toRect=function(a,b){b||(b=l.create());b[0]=a[0];b[1]=a[1];b[2]=a[3];b[3]=a[4];return b};b.fromRect=function(a,b){a[0]=b[0];a[1]=b[1];a[2]=Number.NEGATIVE_INFINITY;a[3]=b[2];a[4]=b[3];a[5]=Number.POSITIVE_INFINITY;return a};b.is=p;b.isPoint=function(a){return 0===
f(a)&&0===c(a)&&0===d(a)};b.equals=function(b,c,d){if(a.isNone(b)||a.isNone(c))return b===c;if(!p(b)||!p(c))return!1;if(d)for(var e=0;e<b.length;e++){if(!d(b[e],c[e]))return!1}else for(e=0;e<b.length;e++)if(b[e]!==c[e])return!1;return!0};b.wrap=function(a,b,c,d,e,f){return g(a,b,c,d,e,f,r)};b.POSITIVE_INFINITY=[-Infinity,-Infinity,-Infinity,Infinity,Infinity,Infinity];b.NEGATIVE_INFINITY=[Infinity,Infinity,Infinity,-Infinity,-Infinity,-Infinity];b.ZERO=[0,0,0,0,0,0];var r=k()})},"esri/layers/graphics/dehydratedFeatureComparison":function(){define(["require",
"exports","../../core/compilerUtils","../../core/maybe"],function(e,b,a,m){function l(a,b){if(a===b)return!0;if(null==a||null==b||a.length!==b.length)return!1;for(var c=0;c<a.length;c++){var d=a[c],e=b[c];if(d.length!==e.length)return!1;for(var f=0;f<d.length;f++)if(d[f]!==e[f])return!1}return!0}function k(a,b){if(a===b)return!0;if(null==a||null==b||a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!l(a[c],b[c]))return!1;return!0}function g(a,b){return a===b||a&&b&&a.equals(b)}function f(b,
c){if(b===c)return!0;if(m.isNone(b)||m.isNone(c)||b.type!==c.type)return!1;switch(b.type){case "point":return b=g(b.spatialReference,c.spatialReference)?b.x===c.x&&b.y===c.y&&b.z===c.z&&b.m===c.m:!1,b;case "extent":return b=b.hasZ!==c.hasZ||b.hasM!==c.hasM?!1:g(b.spatialReference,c.spatialReference)?b.xmin===c.xmin&&b.ymin===c.ymin&&b.zmin===c.zmin&&b.xmax===c.xmax&&b.ymax===c.ymax&&b.zmax===c.zmax:!1,b;case "polyline":return b=b.hasZ!==c.hasZ||b.hasM!==c.hasM?!1:g(b.spatialReference,c.spatialReference)?
k(b.paths,c.paths):!1,b;case "polygon":return b=b.hasZ!==c.hasZ||b.hasM!==c.hasM?!1:g(b.spatialReference,c.spatialReference)?k(b.rings,c.rings):!1,b;case "multipoint":return b=b.hasZ!==c.hasZ||b.hasM!==c.hasM?!1:g(b.spatialReference,c.spatialReference)?l(b.points,c.points):!1,b;case "mesh":return!1;default:a.neverReached(b)}}function c(a,b){if(a===b)return!0;if(!a||!b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(a[e]!==b[e])return!1}return!0}
Object.defineProperty(b,"__esModule",{value:!0});b.equals=function(a,b){return a===b?!0:null!=a&&null!=b&&a.objectId===b.objectId&&f(a.geometry,b.geometry)&&c(a.attributes,b.attributes)?!0:!1}})},"esri/tasks/operations/pbfOptimizedFeatureSet":function(){define("require exports ../../core/unitUtils ../../geometry/support/spatialReferenceUtils ../../layers/graphics/OptimizedFeature ../../layers/graphics/OptimizedFeatureSet ../../layers/graphics/OptimizedGeometry".split(" "),function(e,b,a,m,l,k,g){Object.defineProperty(b,
"__esModule",{value:!0});e=function(){function b(a){this.options=a;this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"]}b.prototype.createFeatureResult=function(){return new k.default};b.prototype.prepareFeatures=function(){};b.prototype.finishFeatureResult=function(b){if(b&&b.features&&b.hasZ&&this.options.sourceSpatialReference&&b.spatialReference&&!m.equals(b.spatialReference,this.options.sourceSpatialReference)&&!b.spatialReference.vcsWkid){var c=
a.getMetersPerVerticalUnitForSR(this.options.sourceSpatialReference),e=a.getMetersPerVerticalUnitForSR(b.spatialReference),c=c/e;if(1!==c)for(e=0,b=b.features;e<b.length;e++){var f=b[e];if(f.geometry&&f.geometry.coords)for(var f=f.geometry.coords,g=2;g<f.length;g+=3)f[g]*=c}}};b.prototype.addFeature=function(a,b){a.features.push(b)};b.prototype.createFeature=function(){return new l.default};b.prototype.createSpatialReference=function(){return{wkid:0}};b.prototype.createGeometry=function(){return new g.default};
b.prototype.addField=function(a,b){a.fields.push(b)};b.prototype.addCoordinate=function(a,b){a.coords.push(b)};b.prototype.addCoordinatePoint=function(a,b){a.coords.push(b)};b.prototype.addLength=function(a,b){a.lengths.push(b)};b.prototype.createPointGeometry=function(){return new g.default};return b}();b.Context=e})},"esri/tasks/operations/urlUtils":function(){define(["require","exports"],function(e,b){function a(b){var e={},k;for(k in b)if("declaredClass"!==k){var g=b[k];if(null!=g&&"function"!==
typeof g)if(Array.isArray(g)){e[k]=[];for(var f=0;f<g.length;f++)e[k][f]=a(g[f])}else"object"===typeof g?g.toJSON&&(e[k]=JSON.stringify(g)):e[k]=g}return e}Object.defineProperty(b,"__esModule",{value:!0});b.mapParameters=a})},"esri/tasks/operations/queryAttachments":function(){define("require exports tslib ../../request ../../core/urlUtils ../../layers/support/AttachmentInfo ./urlUtils".split(" "),function(e,b,a,m,l,k,g){function f(a){a=a.toJSON();a.attachmentTypes&&(a.attachmentTypes=a.attachmentTypes.join(","));
a.keywords&&(a.keywords=a.keywords.join(","));a.globalIds&&(a.globalIds=a.globalIds.join(","));a.objectIds&&(a.objectIds=a.objectIds.join(","));a.size&&(a.size=a.size.join(","));return a}Object.defineProperty(b,"__esModule",{value:!0});b.processAttachmentQueryResult=function(a,b){for(var c={},d=0;d<a.length;d++)for(var e=a[d],f=e.parentObjectId,g=e.parentGlobalId,m=0,e=e.attachmentInfos;m<e.length;m++){var q=e[m],w=l.addProxy(l.addTokenParameter(b+"/"+f+"/attachments/"+q.id)),q=k.fromJSON(q);q.set({url:w,
parentObjectId:f,parentGlobalId:g});c[f]?c[f].push(q):c[f]=[q]}return c};b.executeAttachmentQuery=function(b,d,e){d={query:g.mapParameters(a.__assign(a.__assign(a.__assign({},b.query),{f:"json"}),f(d)))};e&&(d=a.__assign(a.__assign({},e),d));return m(b.path+"/queryAttachments",d)}})},"esri/layers/support/AttachmentInfo":function(){define("require exports tslib ../../core/JSONSupport ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ./exifUtils".split(" "),function(e,b,a,
m,l,k,g){var f={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};return function(b){function c(a){a=b.call(this,a)||this;a.contentType=null;a.exifInfo=null;a.id=null;a.globalId=null;a.keywords=null;a.name=null;a.parentGlobalId=null;a.parentObjectId=null;a.size=null;a.url=null;return a}
a.__extends(c,b);e=c;Object.defineProperty(c.prototype,"orientationInfo",{get:function(){var a=g.getExifValue({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:this.exifInfo});return f[a]||null},enumerable:!0,configurable:!0});c.prototype.clone=function(){return new e({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})};var e;
a.__decorate([l.property({type:String})],c.prototype,"contentType",void 0);a.__decorate([l.property()],c.prototype,"exifInfo",void 0);a.__decorate([l.property({readOnly:!0,dependsOn:["exifInfo"]})],c.prototype,"orientationInfo",null);a.__decorate([l.property({type:k.Integer})],c.prototype,"id",void 0);a.__decorate([l.property({type:String})],c.prototype,"globalId",void 0);a.__decorate([l.property({type:String})],c.prototype,"keywords",void 0);a.__decorate([l.property({type:String})],c.prototype,"name",
void 0);a.__decorate([l.property({json:{read:!1}})],c.prototype,"parentGlobalId",void 0);a.__decorate([l.property({json:{read:!1}})],c.prototype,"parentObjectId",void 0);a.__decorate([l.property({type:k.Integer})],c.prototype,"size",void 0);a.__decorate([l.property({json:{read:!1}})],c.prototype,"url",void 0);return c=e=a.__decorate([l.subclass("esri.layers.support.AttachmentInfo")],c)}(m.JSONSupport)})},"esri/layers/support/exifUtils":function(){define(["require","exports","../../core/arrayUtils"],
function(e,b,a){function m(b){var e=b.tagName;b=b.tags;return b&&e?(b=a.find(b,function(a){return a.name===e}))&&b.value||null:null}Object.defineProperty(b,"__esModule",{value:!0});b.getExifValue=function(b){var e=b.exifInfo,g=b.exifName;b=b.tagName;return e&&g&&b?(e=a.find(e,function(a){return a.name===g}))?m({tagName:b,tags:e.tags}):null:null}})},"esri/tasks/operations/queryRelatedRecords":function(){define(["require","exports","tslib","../../request","./urlUtils"],function(e,b,a,m,l){function k(a){a=
a.toJSON();a.objectIds&&(a.objectIds=a.objectIds.join(","));a.outFields&&(a.outFields=a.outFields.join(","));a.outSpatialReference&&(a.outSR=a.outSR.wkid||JSON.stringify(a.outSR.toJSON()),delete a.outSpatialReference);a.source&&(a.layer=JSON.stringify({source:a.source}),delete a.source);return a}Object.defineProperty(b,"__esModule",{value:!0});b.toQueryStringParameters=k;b.executeRelationshipQuery=function(b,e,c){e={query:l.mapParameters(a.__assign(a.__assign(a.__assign({},b.query),{f:"json"}),k(e)))};
c&&(e=a.__assign(a.__assign({},c),e));return m(b.path+"/queryRelatedRecords",e).then(function(a){for(var b=a.data,c=b.geometryType,d=b.spatialReference,e={},f=0,g=b.relatedRecordGroups;f<g.length;f++){var k=g[f],l={fields:void 0,objectIdFieldName:void 0,geometryType:c,spatialReference:d,hasZ:!!b.hasZ,hasM:!!b.hasM,features:k.relatedRecords};if(null!=k.objectId)e[k.objectId]=l;else for(var m in k)k.hasOwnProperty(m)&&"relatedRecords"!==m&&(e[k[m]]=l)}a.data=e;return a})}})},"esri/views/View":function(){define("require exports tslib ../Map ../TimeExtent ../core/Accessor ../core/Collection ../core/CollectionFlattener ../co