// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.9/esri/copyright.txt for details. //>>built (function(b,e){var n,h=function(){return"undefined"!==typeof w&&"function"!==typeof w?w:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this}(),l=function(){},m=function(g){for(var c in g)return 0;return 1},k={}.toString,a=function(g){return"[object Function]"==k.call(g)},f=function(g){return"[object String]"==k.call(g)},d=function(g){return"[object Array]"==k.call(g)},c=function(g,c){if(g)for(var a=0;an.attributes.length));h.clearElement=function(a){a.innerHTML="";return a};h.normalize=function(a,f){var d=a.match(/[\?:]|[^:\?]*/g),c=0,q=function(a){var f=d[c++];if(":"==f)return 0;if("?"==d[c++]){if(!a&&h(f))return q();q(!0);return q(a)}return f||0};return(a=q())&&f(a)};h.load=function(a,f,d){a?f([a],d):d()};return h})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "), function(b){return b})},"dojo/ready":function(){define(["./_base/kernel","./has","require","./has!host-browser?./domReady","./_base/lang"],function(b,e,n,h,l){var m=0,k=[],a=0;e=function(){m=1;b._postLoad=b.config.afterOnLoad=!0;f()};var f=function(){if(!a){for(a=1;m&&(!h||0==h._Q.length)&&(n.idle?n.idle():1)&&k.length;){var c=k.shift();try{c()}catch(r){if(r.info=r.message,n.signal)n.signal("error",r);else throw r;}}a=0}};n.on&&n.on("idle",f);h&&(h._onQEmpty=f);var d=b.ready=b.addOnLoad=function(a, c,d){var q=l._toArray(arguments);"number"!=typeof a?(d=c,c=a,a=1E3):q.shift();d=d?l.hitch.apply(b,q):function(){c()};d.priority=a;for(q=0;q=k[q].priority;q++);k.splice(q,0,d);f()},c=b.config.addOnLoad;if(c)d[l.isArray(c)?"apply":"call"](b,c);h?h(e):e();return d})},"dojo/_base/kernel":function(){define(["../global","../has","./config","require","module"],function(b,e,n,h,l){var m,k={},a={},f={config:n,global:b,dijit:k,dojox:a},k={dojo:["dojo",f],dijit:["dijit",k],dojox:["dojox",a]};l= h.map&&h.map[l.id.match(/[^\/]+/)[0]];for(m in l)k[m]?k[m][0]=l[m]:k[m]=[l[m],{}];for(m in k)l=k[m],l[1]._scopeName=l[0],n.noGlobals||(b[l[0]]=l[1]);f.scopeMap=k;f.baseUrl=f.config.baseUrl=h.baseUrl;f.isAsync=h.async;f.locale=n.locale;b="$Rev: b27d4da $".match(/[0-9a-f]{7,}/);f.version={major:1,minor:14,patch:0,flag:"",revision:b?b[0]:NaN,toString:function(){var a=f.version;return a.major+"."+a.minor+"."+a.patch+a.flag+" ("+a.revision+")"}};e("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(f); f.exit=function(){};e("host-webworker");"undefined"!=typeof console||(console={});b="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var d;for(e=0;d=b[e++];)console[d]?console[d]=Function.prototype.bind.call(console[d],console):function(){var a=d+"";console[a]="log"in console?function(){var c=Array.prototype.slice.call(arguments);c.unshift(a+":");console.log(c.join(" "))}:function(){};console[a]._fake=!0}();f.deprecated=f.experimental= function(){};f._hasResource={};return f})},"dojo/_base/config":function(){define(["../global","../has","require"],function(b,e,n){b={};n=n.rawConfig;for(var h in n)b[h]=n[h];!b.locale&&"undefined"!=typeof navigator&&(h=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(b.locale=h.toLowerCase());return b})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(b,e){var n=function(a,f,d){d||(d=a[0]&&b.scopeMap[a[0]]? b.scopeMap[a.shift()][1]:b.global);try{for(var c=0;ca||90a||111a||192a||222p?p-48:!g.shiftKey&&65<=p&&90>=p?p+32:c[p]||p}a=r(g,{type:"keypress",faux:!0,charCode:p});d.call(g.currentTarget,a);if(k("ie"))try{g.keyCode=a.keyCode}catch(A){}}}),f=e(a,"keypress",function(g){var a=g.charCode;g=r(g,{charCode:32<=a?a:0,faux:!0});return d.call(this, g)});return{remove:function(){p.remove();f.remove()}}}:k("opera")?function(a,c){return e(a,"keypress",function(a){var d=a.which;3==d&&(d=99);d=32>d&&!a.shiftKey?0:d;a.ctrlKey&&!a.shiftKey&&65<=d&&90>=d&&(d+=32);return c.call(this,r(a,{charCode:d}))})}:function(a,c){return e(a,"keypress",function(a){d(a);return c.call(this,a)})};var z={_keypress:x,connect:function(a,c,d,q,g){var p=arguments,t=[],b=0;t.push("string"==typeof p[0]?null:p[b++],p[b++]);var y=p[b+1];t.push("string"==typeof y||"function"== typeof y?p[b++]:null,p[b++]);for(y=p.length;bc.clientHeight&&(d+=c.clientLeft);return 8>f?d+c.clientWidth-c.scrollWidth:-d}return d};a.position=function(d,c){d=n.byId(d);e.body(d.ownerDocument);var f=d.getBoundingClientRect(),f={x:f.left,y:f.top,w:f.right-f.left,h:f.bottom-f.top};9>b("ie")&&(f.x-=0,f.y-=0);c&&(d=a.docScroll(d.ownerDocument),f.x+=d.x,f.y+=d.y);return f};a.getMarginSize=function(d,c){d=n.byId(d); c=a.getMarginExtents(d,c||h.getComputedStyle(d));d=d.getBoundingClientRect();return{w:d.right-d.left+c.w,h:d.bottom-d.top+c.h}};a.normalizeEvent=function(d){"layerX"in d||(d.layerX=d.offsetX,d.layerY=d.offsetY);if(!("pageX"in d)){var c=d.target,c=c&&c.ownerDocument||document,f=c.documentElement;d.pageX=d.clientX+a.fixIeBiDiScrollLeft(f.scrollLeft||0,c);d.pageY=d.clientY+(f.scrollTop||0)}};return a})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(b,e,n){var h={global:b.global, doc:b.global.document||null,body:function(h){h=h||b.doc;return h.body||h.getElementsByTagName("body")[0]},setContext:function(e,m){b.global=h.global=e;b.doc=h.doc=m},withGlobal:function(e,m,k,a){var f=b.global;try{return b.global=h.global=e,h.withDoc.call(null,e.document,m,k,a)}finally{b.global=h.global=f}},withDoc:function(e,m,k,a){var f=h.doc,d=n("ie"),c,q,r;try{return b.doc=h.doc=e,b.isQuirks=0,n("ie")&&(r=e.parentWindow)&&r.navigator&&(c=parseFloat(r.navigator.appVersion.split("MSIE ")[1])||void 0, (q=e.documentMode)&&5!=q&&Math.floor(c)!=q&&(c=q),b.isIE=n.add("ie",c,!0,!0)),k&&"string"==typeof m&&(m=k[m]),m.apply(k,a||[])}finally{b.doc=h.doc=f,b.isQuirks=0,b.isIE=n.add("ie",d,!0,!0)}}};e.mixin(b,h);return h})},"dojo/dom":function(){define(["./sniff","./_base/window","./_base/kernel"],function(b,e,n){if(7>=b("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(m){}var h={};b("ie")?h.byId=function(b,h){if("string"!=typeof b)return b;var a=h||e.doc;h=b&&a.getElementById(b);if(!h|| h.attributes.id.value!=b&&h.id!=b){a=a.all[b];if(!a||a.nodeName)a=[a];for(var f=0;h=a[f++];)if(h.attributes&&h.attributes.id&&h.attributes.id.value==b||h.id==b)return h}else return h}:h.byId=function(b,h){return("string"==typeof b?(h||e.doc).getElementById(b):b)||null};n=n.global.document||null;b.add("dom-contains",!(!n||!n.contains));h.isDescendant=b("dom-contains")?function(b,k){return!(!(k=h.byId(k))||!k.contains(h.byId(b)))}:function(b,k){try{for(b=h.byId(b),k=h.byId(k);b;){if(b==k)return!0;b= b.parentNode}}catch(a){}return!1};b.add("css-user-select",function(b,h,a){if(!a)return!1;b=a.style;h=["Khtml","O","Moz","Webkit"];a=h.length;var f="userSelect";do if("undefined"!==typeof b[f])return f;while(a--&&(f=h[a]+"UserSelect"));return!1});var l=b("css-user-select");h.setSelectable=l?function(b,k){h.byId(b).style[l]=k?"":"none"}:function(b,k){b=h.byId(b);var a=b.getElementsByTagName("*"),f=a.length;if(k)for(b.removeAttribute("unselectable");f--;)a[f].removeAttribute("unselectable");else for(b.setAttribute("unselectable", "on");f--;)a[f].setAttribute("unselectable","on")};return h})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(b,e,n){function h(a,d,f){d=d.toLowerCase();if("auto"==f){if("height"==d)return a.offsetHeight;if("width"==d)return a.offsetWidth}if("fontweight"==d)switch(f){case 700:return"bold";default:return"normal"}d in c||(c[d]=q.test(d));return c[d]?k(a,f):f}var l,m={};l=b("webkit")?function(a){var c;if(1==a.nodeType){var d=a.ownerDocument.defaultView;c=d.getComputedStyle(a, null);!c&&a.style&&(a.style.display="",c=d.getComputedStyle(a,null))}return c||{}}:b("ie")&&9>b("ie")?function(a){return 1==a.nodeType&&a.currentStyle?a.currentStyle:{}}:function(a){if(1===a.nodeType){var c=a.ownerDocument.defaultView;return(c.opener?c:n.global.window).getComputedStyle(a,null)}return{}};m.getComputedStyle=l;var k;k=b("ie")?function(a,c){if(!c)return 0;if("medium"==c)return 4;if(c.slice&&"px"==c.slice(-2))return parseFloat(c);var d=a.style,f=a.runtimeStyle,p=d.left,b=f.left;f.left= a.currentStyle.left;try{d.left=c,c=d.pixelLeft}catch(g){c=0}d.left=p;f.left=b;return c}:function(a,c){return parseFloat(c)||0};m.toPixelValue=k;var a=function(a,c){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(v){return c?{}:null}},f=9>b("ie")||(b("ie"),0)?function(c){try{return a(c).Opacity/100}catch(z){return 1}}:function(a){return l(a).opacity},d=9>b("ie")||(b("ie"),0)?function(c,f){""===f&&(f=1);var b=100*f;1===f?(c.style.zoom="",a(c)&&(c.style.filter=c.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i, ""))):(c.style.zoom=1,a(c)?a(c,1).Opacity=b:c.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+b+")",a(c,1).Enabled=!0);if("tr"==c.tagName.toLowerCase())for(c=c.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&d(c,f);return f}:function(a,c){return a.style.opacity=c},c={left:!0,top:!0},q=/margin|padding|width|height|max|min|offset/,r={cssFloat:1,styleFloat:1,"float":1};m.get=function(a,c){var d=e.byId(a),b=arguments.length;if(2==b&&"opacity"==c)return f(d);c=r[c]?"cssFloat"in d.style?"cssFloat":"styleFloat":c;var p=m.getComputedStyle(d);return 1==b?p:h(d,c,p[c]||d.style[c])};m.set=function(a,c,f){var b=e.byId(a),p=arguments.length,q="opacity"==c;c=r[c]?"cssFloat"in b.style?"cssFloat":"styleFloat":c;if(3==p)return q?d(b,f):b.style[c]=f;for(var g in c)m.set(a,g,c[g]);return m.getComputedStyle(b)};return m})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(b,e,n,h,l){function m(b,a){var f=function(d,c){return e(d,b,function(f){if(a)return a(f, c);if(!h.isDescendant(f.relatedTarget,d))return c.call(this,f)})};f.bubble=function(a){return m(b,function(c,d){var f=a(c.target),b=c.relatedTarget;if(f&&f!=(b&&1==b.nodeType&&a(b)))return d.call(f,c)})};return f}n={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(b,a){return b.button==a},isLeft:function(b){return 0==b.button},isMiddle:function(b){return 1==b.button},isRight:function(b){return 2==b.button}};b.mouseButtons=n;return{_eventHandler:m,enter:m("mouseover"),leave:m("mouseout"),wheel:"mousewheel", isLeft:n.isLeft,isMiddle:n.isMiddle,isRight:n.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(b,e,n){if(!n("host-browser"))return n;b._name="browser";e.mixin(b,{isBrowser:!0,isFF:n("ff"),isIE:n("ie"),isKhtml:0,isWebKit:n("webkit"),isMozilla:n("mozilla"),isMoz:n("mozilla"),isOpera:n("opera"),isSafari:n("safari"),isChrome:n("chrome"),isMac:n("mac"),isIos:n("ios"),isAndroid:0,isWii:0,isQuirks:0,isAir:0});return n})},"dojo/keys":function(){define(["./_base/kernel", "./sniff"],function(b,e){return b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:e("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108, NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:e("mac")?e("safari")?91:224:17}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(b,e,n){var h=window,l={addOnWindowUnload:function(l,k){b.windowUnloaded||n(h,"unload",b.windowUnloaded=function(){});n(h,"unload",e.hitch(l, k))},addOnUnload:function(b,k){n(h,"beforeunload",e.hitch(b,k))}};b.addOnWindowUnload=l.addOnWindowUnload;b.addOnUnload=l.addOnUnload;return l})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(b,e,n,h,l,m,k,a){b.byId=e.byId;b.isDescendant=e.isDescendant;b.setSelectable=e.setSelectable;b.getAttr=h.get;b.setAttr=h.set;b.hasAttr=h.has;b.removeAttr=h.remove;b.getNodeProp=h.getNodeProp;b.attr= function(a,d,c){return 2==arguments.length?h["string"==typeof d?"get":"set"](a,d):h.set(a,d,c)};b.hasClass=m.contains;b.addClass=m.add;b.removeClass=m.remove;b.toggleClass=m.toggle;b.replaceClass=m.replace;b._toDom=b.toDom=k.toDom;b.place=k.place;b.create=k.create;b.empty=function(a){k.empty(a)};b._destroyElement=b.destroy=function(a){k.destroy(a)};b._getPadExtents=b.getPadExtents=a.getPadExtents;b._getBorderExtents=b.getBorderExtents=a.getBorderExtents;b._getPadBorderExtents=b.getPadBorderExtents= a.getPadBorderExtents;b._getMarginExtents=b.getMarginExtents=a.getMarginExtents;b._getMarginSize=b.getMarginSize=a.getMarginSize;b._getMarginBox=b.getMarginBox=a.getMarginBox;b.setMarginBox=a.setMarginBox;b._getContentBox=b.getContentBox=a.getContentBox;b.setContentSize=a.setContentSize;b._isBodyLtr=b.isBodyLtr=a.isBodyLtr;b._docScroll=b.docScroll=a.docScroll;b._getIeDocumentElementOffset=b.getIeDocumentElementOffset=a.getIeDocumentElementOffset;b._fixIeBiDiScrollLeft=b.fixIeBiDiScrollLeft=a.fixIeBiDiScrollLeft; b.position=a.position;b.marginBox=function(f,d){return d?a.setMarginBox(f,d):a.getMarginBox(f)};b.contentBox=function(f,d){return d?a.setContentSize(f,d):a.getContentBox(f)};b.coords=function(f,d){b.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");f=e.byId(f);var c=n.getComputedStyle(f),c=a.getMarginBox(f,c);f=a.position(f,d);c.x=f.x;c.y=f.y;return c};b.getProp=l.get;b.setProp=l.set;b.prop=function(a,d,c){return 2==arguments.length?l["string"==typeof d?"get":"set"](a,d):l.set(a, d,c)};b.getStyle=n.get;b.setStyle=n.set;b.getComputedStyle=n.getComputedStyle;b.__toPixelValue=b.toPixelValue=n.toPixelValue;b.style=function(a,d,c){switch(arguments.length){case 1:return n.get(a);case 2:return n["string"==typeof d?"get":"set"](a,d)}return n.set(a,d,c)};return b})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(b,e,n,h,l,m){function k(a,c){a=a.getAttributeNode&&a.getAttributeNode(c);return!!a&&a.specified}var a={innerHTML:1, textContent:1,className:1,htmlFor:e("ie"),value:1},f={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};b.has=function(d,c){var b=c.toLowerCase();return a[m.names[b]||c]||k(h.byId(d),f[b]||c)};b.get=function(d,c){d=h.byId(d);var b=c.toLowerCase(),r=m.names[b]||c,e=d[r];if(a[r]&&"undefined"!=typeof e)return e;if("textContent"==r)return m.get(d,r);if("href"!=r&&("boolean"==typeof e||n.isFunction(e)))return e;c=f[b]||c;return k(d,c)?d.getAttribute(c):null};b.set=function(d,c,q){d= h.byId(d);if(2==arguments.length){for(var r in c)b.set(d,r,c[r]);return d}r=c.toLowerCase();var k=m.names[r]||c,e=a[k];if("style"==k&&"string"!=typeof q)return l.set(d,q),d;if(e||"boolean"==typeof q||n.isFunction(q))return m.set(d,c,q);d.setAttribute(f[r]||c,q);return d};b.remove=function(a,c){h.byId(a).removeAttribute(f[c.toLowerCase()]||c)};b.getNodeProp=function(a,c){a=h.byId(a);var d=c.toLowerCase(),b=m.names[d]||c;if(b in a&&"href"!=b)return a[b];c=f[d]||c;return k(a,c)?a.getAttribute(c):null}})}, "dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),function(b,e,n,h,l,m,k,a){var f={},d=1,c=e._scopeName+"attrid";b.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};b.get=function(a,c){a=l.byId(a);var d=c.toLowerCase();return a[b.names[d]||c]};b.set=function(q,r,e){q= l.byId(q);if(2==arguments.length&&"string"!=typeof r){for(var x in r)b.set(q,x,r[x]);return q}x=r.toLowerCase();x=b.names[x]||r;if("style"==x&&"string"!=typeof e)return m.set(q,e),q;if("innerHTML"==x)return n("ie")&&q.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(k.empty(q),q.appendChild(k.toDom(e,q.ownerDocument))):q[x]=e,q;if(h.isFunction(e)){var v=q[c];v||(v=d++,q[c]=v);f[v]||(f[v]={});var w=f[v][x];if(w)a.disconnect(w);else try{delete q[x]}catch(p){}e? f[v][x]=a.connect(q,x,e):q[x]=null;return q}q[x]=e;return q}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),function(b,e,n,h,l,m){function k(a,c){var g=c.parentNode;g&&g.insertBefore(a,c)}function a(a){if("innerHTML"in a)try{a.innerHTML="";return}catch(g){}for(var c;c=a.lastChild;)a.removeChild(c)}var f={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table", "thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},d=/<\s*([\w\:]+)/,c={},q=0,r="__"+e._scopeName+"ToDomId",x;for(x in f)f.hasOwnProperty(x)&&(e=f[x],e.pre="option"==x?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+e.join("\x3e\x3c")+"\x3e",e.post="\x3c/"+e.reverse().join("\x3e\x3c/")+"\x3e");var z;8>=n("ie")&&(z=function(a){a.__dojo_html5_tested="yes";var c=v("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},a.body);1!== c.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(g){a.createElement(g)});w(c)});b.toDom=function(a,b){b=b||h.doc;var g=b[r];g||(b[r]=g=++q+"",c[g]=b.createElement("div"));8>=n("ie")&&!b.__dojo_html5_tested&&b.body&&z(b);a+="";var p=a.match(d),t=p?p[1].toLowerCase():"",g=c[g];if(p&&f[t])for(p=f[t],g.innerHTML=p.pre+a+p.post,a=p.length;a;--a)g=g.firstChild;else g.innerHTML= a;if(1==g.childNodes.length)return g.removeChild(g.firstChild);for(a=b.createDocumentFragment();b=g.firstChild;)a.appendChild(b);return a};b.place=function(a,c,g){c=l.byId(c);"string"==typeof a&&(a=/^\s*g?0:g])}else switch(g){case "before":k(a,c);break;case "after":g=a;(d=c.parentNode)&&(d.lastChild==c?d.appendChild(g):d.insertBefore(g,c.nextSibling));break;case "replace":c.parentNode.replaceChild(a, c);break;case "only":b.empty(c);c.appendChild(a);break;case "first":if(c.firstChild){k(a,c.firstChild);break}default:c.appendChild(a)}return a};var v=b.create=function(a,c,g,d){var p=h.doc;g&&(g=l.byId(g),p=g.ownerDocument);"string"==typeof a&&(a=p.createElement(a));c&&m.set(a,c);g&&b.place(a,g,d);return a};b.empty=function(c){a(l.byId(c))};var w=b.destroy=function(c){if(c=l.byId(c)){var d=c;c=c.parentNode;d.firstChild&&a(d);c&&(n("ie")&&c.canHaveChildren&&"removeNode"in d?d.removeNode(!1):c.removeChild(d))}}})}, "dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(b,e,n){function h(a){if("string"==typeof a||a instanceof String){if(a&&!m.test(a))return k[0]=a,k;a=a.split(m);a.length&&!a[0]&&a.shift();a.length&&!a[a.length-1]&&a.pop();return a}return a?e.filter(a,function(a){return a}):[]}var l,m=/\s+/,k=[""],a={};return l={contains:function(a,d){return 0<=(" "+n.byId(a).className+" ").indexOf(" "+d+" ")},add:function(a,d){a=n.byId(a);d=h(d);var c=a.className,f,c=c?" "+c+" ": " ";f=c.length;for(var b=0,k=d.length,e;bc.indexOf(" "+e+" ")&&(c+=e+" ");fr?(r=e+r,0>r&&(r=b)):r=r>=e?e+h:r;for(e&&"string"==typeof q&&(q=q.split(""));r!=p;r+=c)if(q[r]==k)return r;return-1}}var k={},a,f={every:l(!1),some:l(!0),indexOf:m(!0),lastIndexOf:m(!1),forEach:function(a,c,f){var d=0,b=a&&a.length||0;b&&"string"==typeof a&&(a=a.split(""));"string"== typeof c&&(c=k[c]||h(c));if(f)for(;dg&&(g=this.length+g);this[g]&&a.push(this[g])},this);return a._stash(this)}});var p=f(a,z);b.query=f(a,function(a){return z(a)});p.load=function(a, g,c){k.load(a,g,function(g){c(f(g,z))})};b._filterQueryResult=p._filterResult=function(a,g,c){return new z(p.filter(a,g,c))};b.NodeList=p.NodeList=z;return p})},"dojo/selector/_loader":function(){define(["../has","require"],function(b,e){"undefined"!==typeof document&&document.createElement("div");var n;return{load:function(h,l,m,k){if(k&&k.isBuild)m();else{k=e;h="default"==h?b("config-selectorEngine")||"css3":h;h="css2"==h||"lite"==h?"./lite":"css2.1"==h?"./lite":"css3"==h?"./lite":"acme"==h?"./acme": (k=l)&&h;if("?"==h.charAt(h.length-1)){h=h.substring(0,h.length-1);var a=!0}if(a&&(b("dom-compliant-qsa")||n))return m(n);k([h],function(a){"./lite"!=h&&(n=a);m(a)})}}}})},"dojo/selector/lite":function(){define(["../has","../_base/kernel"],function(b,e){var n=document.createElement("div"),h=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector,l=n.querySelectorAll,m=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g,k=function(f,d){var c=d?d.ownerDocument|| d:e.doc||document,q=(l?/^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/:/^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/).exec(f);d=d||c;if(q){var h=(b("ie"),null!==d.parentNode&&9!==d.nodeType&&d.parentNode===c);if(q[2]&&h){var x=e.byId?e.byId(q[2],c):c.getElementById(q[2]);if(!x||q[1]&&q[1]!=x.tagName.toLowerCase())return[];if(d!=c)for(f=x;f!=d;)if(f=f.parentNode,!f)return[];return q[3]?k(q[3],x):[x]}if(q[3]&&d.getElementsByClassName)return d.getElementsByClassName(q[4]);if(q[5])if(x= d.getElementsByTagName(q[5]),q[4]||q[6])f=(q[4]||"")+q[6];else return x}if(l)return 1===d.nodeType&&"object"!==d.nodeName.toLowerCase()?a(d,f,d.querySelectorAll):d.querySelectorAll(f);x||(x=d.getElementsByTagName("*"));q=[];c=0;for(h=x.length;c=t&&(t=0,w.ioPublish&&b.publish&&(!g||g&&!1!==g.ioArgs.args.ioPublish)&&b.publish("/dojo/io/stop"))},t=0;r.after(x,"_onAction",function(){--t});r.after(x,"_onInFlight",u);b._ioCancelAll=x.cancelAll;b._ioNotifyStart=function(g){w.ioPublish&&b.publish&&!1!==g.ioArgs.args.ioPublish&&(t||b.publish("/dojo/io/start"),t+=1,b.publish("/dojo/io/send",[g]))};b._ioWatch=function(g,a,c,p){g.ioArgs.options=g.ioArgs.args;d.mixin(g,{response:g.ioArgs,isValid:function(c){return a(g)},isReady:function(a){return c(g)}, handleResponse:function(a){return p(g)}});x(g);u(g)};b._ioAddQueryToUrl=function(g){g.query.length&&(g.url+=(-1==g.url.indexOf("?")?"?":"\x26")+g.query,g.query=null)};b.xhr=function(a,c,d){var p,f=b._ioSetArgs(c,function(g){p&&p.cancel()},y,g),u=f.ioArgs;"postData"in c?u.query=c.postData:"putData"in c?u.query=c.putData:"rawBody"in c?u.query=c.rawBody:(2d?(m=h(k),k=""):(m=h(k.slice(0,d)),k=h(k.slice(d+1)));"string"==typeof l[m]&&(l[m]=[l[m]]);b.isArray(l[m])?l[m].push(k): l[m]=k}return l}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(b,e,n,h){var l={fieldToObject:function(b){var h=null;if(b=e.byId(b)){var a=b.name,f=(b.type||"").toLowerCase();if(a&&f&&!b.disabled)if("radio"==f||"checkbox"==f)b.checked&&(h=b.value);else if(b.multiple)for(h=[],b=[b.firstChild];b.length;)for(a=b.pop();a;a=a.nextSibling)if(1==a.nodeType&&"option"==a.tagName.toLowerCase())a.selected&&h.push(a.value);else{a.nextSibling&&b.push(a.nextSibling); a.firstChild&&b.push(a.firstChild);break}else h=b.value}return h},toObject:function(h){var k={};h=e.byId(h).elements;for(var a=0,f=h.length;a"file|submit|image|reset|button".indexOf(q)&&!d.disabled){var r=k,x=c,d=l.fieldToObject(d);if(null!==d){var m=r[x];"string"==typeof m?r[x]=[m,d]:b.isArray(m)?m.push(d):r[x]=d}"image"==q&&(k[c+".x"]=k[c+".y"]=k[c].x=k[c].y=0)}}return k},toQuery:function(b){return n.objectToQuery(l.toObject(b))}, toJson:function(b,k){return h.stringify(l.toObject(b),null,k?4:0)}};return l})},"dojo/json":function(){define(["./has"],function(b){return JSON})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(b,e,n,h,l,m,k){var a=function(){},f=Object.freeze||function(){},d=b.Deferred=function(c){function b(g){if(z)throw Error("This deferred has already been resolved");x=g;z=!0;k()}function k(){for(var c;!c&&g;){var d= g;g=g.next;if(c=d.progress==a)z=!1;var f=p?d.error:d.resolved;l("config-useDeferredInstrumentation")&&p&&e.instrumentRejected&&e.instrumentRejected(x,!!f);if(f)try{var u=f(x);u&&"function"===typeof u.then?u.then(m.hitch(d.deferred,"resolve"),m.hitch(d.deferred,"reject"),m.hitch(d.deferred,"progress")):(f=c&&void 0===u,c&&!f&&(p=u instanceof Error),d.deferred[f&&p?"reject":"resolve"](f?x:u))}catch(D){d.deferred.reject(D)}else p?d.deferred.reject(x):d.deferred.resolve(x)}}var x,z,v,w,p,y,g,u=this.promise= new n;this.isResolved=u.isResolved=function(){return 0==w};this.isRejected=u.isRejected=function(){return 1==w};this.isFulfilled=u.isFulfilled=function(){return 0<=w};this.isCanceled=u.isCanceled=function(){return v};this.resolve=this.callback=function(g){this.fired=w=0;this.results=[g,null];b(g)};this.reject=this.errback=function(a){p=!0;this.fired=w=1;l("config-useDeferredInstrumentation")&&e.instrumentRejected&&e.instrumentRejected(a,!!g);b(a);this.results=[null,a]};this.progress=function(a){for(var c= g;c;){var d=c.progress;d&&d(a);c=c.next}};this.addCallbacks=function(g,c){this.then(g,c,a);return this};u.then=this.then=function(c,p,f){var t=f==a?this:new d(u.cancel);c={resolved:c,error:p,progress:f,deferred:t};g?y=y.next=c:g=y=c;z&&k();return t.promise};var t=this;u.cancel=this.cancel=function(){if(!z){var g=c&&c(t);z||(g instanceof Error||(g=new h(g)),g.log=!1,t.reject(g))}v=!0};f(u)};m.extend(d,{addCallback:function(a){return this.addCallbacks(m.hitch.apply(b,arguments))},addErrback:function(a){return this.addCallbacks(null, m.hitch.apply(b,arguments))},addBoth:function(a){var c=m.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1});d.when=b.when=k;return d})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./has!config-deferredInstrumentation?./promise/instrumentation"],function(b,e,n,h,l){var m=Object.freeze||function(){},k=function(d,f,h,k,e){b("config-deferredInstrumentation")&&2===f&&c.instrumentRejected&&0===d.length&&c.instrumentRejected(h,!1, k,e);for(e=0;ea||304===a||1223===a||!a}})},"dojo/errors/RequestError":function(){define(["./create"],function(b){return b("RequestError",function(b,n){this.response=n})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(b,e){return b("RequestTimeoutError",null,e,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(b,e,n,h,l){function m(a,c){var d= a.xhr;a.status=a.xhr.status;try{a.text=d.responseText}catch(g){}"xml"===a.options.handleAs&&(a.data=d.responseXML);var f;if(c)this.reject(c);else{try{n(a)}catch(g){f=g}h.checkStatus(d.status)?f?this.reject(f):this.resolve(a):(c=f?new b("Unable to load "+a.url+" status: "+d.status+" and an error in handleAs: transformation of response",a):new b("Unable to load "+a.url+" status: "+d.status,a),this.reject(c))}}function k(a){return this.xhr.getResponseHeader(a)}function a(v,w,p){var y=w&&w.data&&w.data instanceof FormData,g=h.parseArgs(v,h.deepCreate(z,w),y);v=g.url;w=g.options;var u=!w.data&&"POST"!==w.method&&"PUT"!==w.method;10>=l("ie")&&(v=v.split("#")[0]);var t,A=h.deferred(g,r,d,c,m,function(){t&&t()}),C=g.xhr=a._create();if(!C)return A.cancel(new b("XHR was not created")),p?A:A.promise;g.getHeader=k;q&&(t=q(C,A,g,w.uploadProgress));var B="undefined"===typeof w.data?null:w.data,n=!w.sync,D=w.method;try{C.open(D,v,n,w.user||x,w.password||x);w.withCredentials&&(C.withCredentials=w.withCredentials);w.handleAs in f&&(C.responseType=f[w.handleAs]);var H=w.headers;v=y||u?!1:"application/x-www-form-urlencoded";if(H)for(var aa in H)"content-type"===aa.toLowerCase()?v=H[aa]:H[aa]&&C.setRequestHeader(aa,H[aa]);v&&!1!==v&&C.setRequestHeader("Content-Type",v);H&&"X-Requested-With"in H||C.setRequestHeader("X-Requested-With","XMLHttpRequest");h.notify&&h.notify.emit("send",g,A.promise.cancel);C.send(B)}catch(ga){A.reject(ga)}e(A);C=null;return p?A:A.promise}l.add("dojo-force-activex-xhr",function(){return 0});var f= {blob:"blob",document:"document",arraybuffer:"arraybuffer"},d,c,q,r;d=function(a){return!this.isFulfilled()};r=function(a,c){c.xhr.abort()};q=function(a,c,d,f){function g(g){c.handleResponse(d)}function p(g){g=new b("Unable to load "+d.url+" status: "+g.target.status,d);c.handleResponse(d,g)}function t(g,a){d.transferType=g;a.lengthComputable?(d.loaded=a.loaded,d.total=a.total,c.progress(d)):3===d.xhr.readyState&&(d.loaded="loaded"in a?a.loaded:a.position,c.progress(d))}function q(g){return t("download", g)}function h(g){return t("upload",g)}a.addEventListener("load",g,!1);a.addEventListener("error",p,!1);a.addEventListener("progress",q,!1);f&&a.upload&&a.upload.addEventListener("progress",h,!1);return function(){a.removeEventListener("load",g,!1);a.removeEventListener("error",p,!1);a.removeEventListener("progress",q,!1);a.upload.removeEventListener("progress",h,!1);a=null}};var x,z={data:null,query:null,sync:!1,method:"GET"};a._create=function(){throw Error("XMLHTTP not available");};l("dojo-force-activex-xhr")|| (a._create=function(){return new XMLHttpRequest});h.addCommonMethods(a);return a})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has","../has!dom?../selector/_loader"],function(b,e,n,h){function l(b){var a=m[b.options.handleAs];b.data=a?a(b):b.data||b.text;return b}n=function(b){return b.xhr.response};var m={javascript:function(b){return e.eval(b.text||"")},json:function(h){return b.parse(h.text||null)},xml:void 0,blob:n,arraybuffer:n,document:n};l.register= function(b,a){m[b]=a};return l})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(b,e,n,h,l,m,k,a,f){var d=n.mixin,c={},q=c._Line=function(a,g){this.start=a;this.end=g};q.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};var r=c.Animation=function(a){d(this,a);n.isArray(this.curve)&&(this.curve=new q(this.curve[0],this.curve[1]))};r.prototype=new h;n.extend(r,{duration:350,repeat:0,rate:20, _percent:0,_startRepeatCount:0,_getStep:function(){var a=this._percent,g=this.easing;return g?g(a):a},_fire:function(a,g){g=g||[];if(this[a])if(e.debugAtAllCosts)this[a].apply(this,g);else try{this[a].apply(this,g)}catch(u){console.error("exception in animation handler for:",a),console.error(u)}return this},play:function(a,g){this._delayTimer&&this._clearTimer();if(g)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin", [this.node]);a=a||this.delay;g=n.hitch(this,"_play",g);if(0this._percent?this._startTimer():(this._active=!1,0=x&&(clearInterval(z),z=null,x=0)}});var w=k("ie")?function(a){var g=a.style;g.width.length||"auto"!=f.get(a,"width")||(g.width="auto")}:function(){};c._fade=function(p){p.node=a.byId(p.node);var g=d({properties:{}},p);p=g.properties.opacity={};p.start="start"in g?g.start:function(){return+f.get(g.node,"opacity")||0};p.end=g.end;p=c.animateProperty(g);m.after(p,"beforeBegin",n.partial(w,g.node),!0);return p};c.fadeIn=function(a){return c._fade(d({end:1},a))};c.fadeOut=function(a){return c._fade(d({end:0}, a))};c._defaultEasing=function(a){return.5+Math.sin((a+1.5)*Math.PI)/2};var p=function(a){this._properties=a;for(var g in a){var c=a[g];c.start instanceof l&&(c.tempColor=new l)}};p.prototype.getValue=function(a){var g={},c;for(c in this._properties){var d=this._properties[c],f=d.start;f instanceof l?g[c]=l.blendColors(f,d.end,a,d.tempColor).toCss():n.isArray(f)||(g[c]=(d.end-f)*a+f+("opacity"!=c?d.units||"px":0))}return g};c.animateProperty=function(c){var g=c.node=a.byId(c.node);c.easing||(c.easing= b._defaultEasing);c=new r(c);m.after(c,"beforeBegin",n.hitch(c,function(){var a={},c;for(c in this.properties){var b=function(g,a){var c={height:g.offsetHeight,width:g.offsetWidth}[a];if(void 0!==c)return c;c=f.get(g,a);return"opacity"==a?+c:h?c:parseFloat(c)};if("width"==c||"height"==c)this.node.display="block";var q=this.properties[c];n.isFunction(q)&&(q=q(g));q=a[c]=d({},n.isObject(q)?q:{end:q});n.isFunction(q.start)&&(q.start=q.start(g));n.isFunction(q.end)&&(q.end=q.end(g));var h=0<=c.toLowerCase().indexOf("color"); "end"in q?"start"in q||(q.start=b(g,c)):q.end=b(g,c);h?(q.start=new l(q.start),q.end=new l(q.end)):q.start="opacity"==c?+q.start:parseFloat(q.start)}this.curve=new p(a)}),!0);m.after(c,"onAnimate",n.hitch(f,"set",c.node),!0);return c};c.anim=function(a,g,d,f,p,b){return c.animateProperty({node:a,duration:d||r.prototype.duration,properties:g,easing:f,onEnd:p}).play(b||0)};d(b,c);b._Animation=r;return c})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(b,e, n,h){var l=b.Color=function(b){b&&this.setColor(b)};l.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:h.transparentColor||[0,0,0,0]};e.extend(l,{r:255,g:255,b:255,a:1,_set:function(b,h,a,f){this.r=b;this.g=h;this.b=a;this.a=f},setColor:function(b){e.isString(b)? l.fromString(b,this):e.isArray(b)?l.fromArray(b,this):(this._set(b.r,b.g,b.b,b.a),b instanceof l||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+n.map(["r","g","b"],function(b){b=this[b].toString(16);return 2>b.length?"0"+b:b},this).join("")},toCss:function(b){var h=this.r+", "+this.g+", "+this.b;return(b?"rgba("+h+", "+this.a:"rgb("+h)+")"},toString:function(){return this.toCss(!0)}}); l.blendColors=b.blendColors=function(b,h,a,f){f=f||new l;f.r=Math.round(b.r+(h.r-b.r)*a);f.g=Math.round(b.g+(h.g-b.g)*a);f.b=Math.round(b.b+(h.b-b.b)*a);f.a=b.a+(h.a-b.a)*a;return f.sanitize()};l.fromRgb=b.colorFromRgb=function(b,h){return(b=b.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&l.fromArray(b[1].split(/\s*,\s*/),h)};l.fromHex=b.colorFromHex=function(b,h){var a=h||new l,f=4==b.length?4:8,d=(1<>=f;a[c]=4==f?17*q:q});a.a=1;return a};l.fromArray=b.colorFromArray=function(b,h){h=h||new l;h._set(Number(b[0]),Number(b[1]),Number(b[2]),Number(b[3]));isNaN(h.a)&&(h.a=1);return h.sanitize()};l.fromString=b.colorFromString=function(b,h){var a=l.named[b];return a&&l.fromArray(a,h)||l.fromRgb(b,h)||l.fromHex(b,h)};return l})},"dojo/request":function(){define(["./request/default!"],function(b){return b})},"dojo/request/default":function(){define(["exports","require","../has"],function(b,e,n){var h= n("config-requestProvider"),l;if(n("host-browser")||n("host-webworker"))l="./xhr";h||(h=l);b.getPlatformDefaultId=function(){return l};b.load=function(b,k,a,f){e(["platform"==b?l:h],function(d){a(d)})}})},"esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./Basemap ./Ground ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./core/accessorSupport/decorators ./support/basemapUtils ./support/groundUtils ./support/LayersMixin".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r,x){var z=d.getLogger("esri.Map");return function(d){function f(a){a=d.call(this)||this;a.basemap=null;a.ground=new m;a._basemapCache=q.createCache();return a}n(f,d);Object.defineProperty(f.prototype,"allLayers",{get:function(){return new a({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 q.ensureType(a, this._basemapCache)};f.prototype.castGround=function(a){a=r.ensureType(a);return a?a:(z.error("Map.ground may not be set to null or undefined"),this._get("ground"))};h([c.property({readOnly:!0})],f.prototype,"allLayers",null);h([c.property({type:l})],f.prototype,"basemap",void 0);h([c.cast("basemap")],f.prototype,"castBasemap",null);h([c.property({type:m})],f.prototype,"ground",void 0);h([c.cast("ground")],f.prototype,"castGround",null);return f=h([c.subclass("esri.Map")],f)}(c.declared(k,f,x))})}, "esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(b,e){return function(b,h){b.__bases__=h.__bases__}})},"esri/core/tsSupport/decorateHelper":function(){define([],function(){return function(b,e,n,h){var l=arguments.length,m=3>l?e:null===h?h=Object.getOwnPropertyDescriptor(e,n):h,k;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)m=Reflect.decorate(b,e,n,h);else for(var a=b.length-1;0<=a;a--)if(k=b[a])m=(3>l?k(m):3a[0]&&d[1]c)a.places=Infinity;return n.format(f,a);case "DateString":f=new Date(f);if(k.local||k.systemLocale)return k.systemLocale?f.toLocaleDateString()+ (k.hideTime?"":" "+f.toLocaleTimeString()):f.toDateString()+(k.hideTime?"":" "+f.toTimeString());f=f.toUTCString();k.hideTime&&(f=f.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return f;case "DateFormat":return f=new Date(f),null!=p&&(f=e.add(f,"minute",f.getTimezoneOffset()-p)),h.format(f,k)}return null!=f?f:""}function a(c,d){var f;if(d)for(f in c)c.hasOwnProperty(f)&&(void 0===c[f]?delete c[f]:c[f]instanceof Object&&a(c[f],!0));else for(f in c)c.hasOwnProperty(f)&&void 0===c[f]&&delete c[f]; return c}function f(a){return a&&"object"==typeof a&&"function"!==typeof a?a instanceof Int8Array||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Int32Array||a instanceof Uint16Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array||a instanceof Date?new a.constructor(a):a instanceof ArrayBuffer?a.slice(0,a.byteLength):"function"===typeof a.clone?a.clone():"function"===typeof a.map&&"function"===typeof a.forEach?a.map(f): "function"===typeof a.notifyChange&&"function"===typeof a.watch?a.clone():m({},a,f):a}var d=["NumberFormat","DateString","DateFormat"],c=/<\/?[^>]+>/g,q={equals:function(a,c){return a===c||"number"===typeof a&&isNaN(a)&&"number"===typeof c&&isNaN(c)||"function"===typeof(a||{}).getTime&&"function"===typeof(c||{}).getTime&&a.getTime()==c.getTime()||"function"===typeof(a||{}).equals&&a.equals(c)||"function"===typeof(c||{}).equals&&c.equals(a)||!1},mixin:function(a){a||(a={});for(var c=1,d=arguments.length;c< d;c++)m(a,arguments[c]);return a},valueOf:function(a,c){for(var d in a)if(a[d]==c)return d;return null},stripTags:function(a){if(a){var d=typeof a;if("string"===d)a=a.replace(c,"");else if("object"===d)for(var f in a)(d=a[f])&&"string"===typeof d&&(d=d.replace(c,"")),a[f]=d}return a},substitute:function(a,c,d){var f,b,p;null!=d&&("object"===typeof d?(f=d.first,b=d.dateFormat,p=d.numberFormat):f=d);if(c&&"{*}"!==c)return c.replace(/\{([^\}]+)\}/g,function(g,a){g=a.split(":");if(1a.length)d=a.length;d-=c.length;a=a.indexOf(c,d);return-1!==a&&a===d},fixJson:a,clone:f};return q})},"esri/core/global":function(){define(["require","exports"],function(b,e){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},"dojo/date":function(){define(["./has","./_base/lang"],function(b,e){var n={getDaysInMonth:function(b){var h=b.getMonth();return 1== h&&n.isLeapYear(b)?29:[31,28,31,30,31,30,31,31,30,31,30,31][h]},isLeapYear:function(b){b=b.getFullYear();return!(b%400)||!(b%4)&&!!(b%100)},getTimezoneName:function(b){var h=b.toString(),e="",k=h.indexOf("(");if(-1e?1:bm&&(q=-1);c+=e;if(0==c||6==c)q=0h)switch(!0){case 6==f:a=0;break;case 0==f:a=1;break;case 6==d:a=2;break;case 0==d:a=1;break;case 0>b+e:a=2}h=h+a-2*m}a=h;break;case "year":a=h;break;case "month":a=e.getMonth()-b.getMonth()+12*h;break;case "week":a=parseInt(n.difference(b,e,"day")/7);break;case "day":a/=24;case "hour":a/=60;case "minute":a/=60;case "second":a/=1E3;case "millisecond":a*=e.getTime()-b.getTime()}return Math.round(a)}}; e.mixin(e.getObject("dojo.date",!0),n);return n})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(b,e,n,h,l){var m={};b.setObject("dojo.number",m);m.format=function(a,f){f=b.mixin({},f||{});var d=e.normalizeLocale(f.locale),d=e.getLocalization("dojo.cldr","number",d);f.customs=d;d=f.pattern||d[(f.type||"decimal")+"Format"];return isNaN(a)||Infinity==Math.abs(a)?null:m._applyPattern(a,d,f)};m._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/; m._applyPattern=function(a,f,d){d=d||{};var c=d.customs.group,b=d.customs.decimal;f=f.split(";");var h=f[0];f=f[0>a?1:0]||"-"+h;if(-1!=f.indexOf("%"))a*=100;else if(-1!=f.indexOf("\u2030"))a*=1E3;else if(-1!=f.indexOf("\u00a4"))c=d.customs.currencyGroup||c,b=d.customs.currencyDecimal||b,f=f.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(a,c,f,b){return(a=d[["symbol","currency","displayName"][f.length-1]]||d.currency||"")?c+a+b:""});else if(-1!=f.indexOf("E"))throw Error("exponential notation not supported"); var e=m._numberPatternRE,h=h.match(e);if(!h)throw Error("unable to find a number expression in pattern: "+f);!1===d.fractional&&(d.places=0);return f.replace(e,m._formatAbsolute(a,h[0],{decimal:b,group:c,places:d.places,round:d.round}))};m.round=function(a,f,d){d=10/(d||10);return(d*+a).toFixed(f)/d};if(0==(.9).toFixed()){var k=m.round;m.round=function(a,f,d){var c=Math.pow(10,-f||0),b=Math.abs(a);if(!a||b>=c)c=0;else if(b/=c,.5>b||.95<=b)c=0;return k(a,f,d)+(0d.round||(a=m.round(a,b,d.round));a=String(Math.abs(a)).split(".");var e=a[1]||"";f[1]||d.places?(c&&(d.places=d.places.substring(0,c)),c=void 0!==d.places?d.places:f[1]&&f[1].lastIndexOf("0")+1,c>e.length&&(a[1]=h.pad(e,c,"0",!0)),ba[0].length&&(a[0]=h.pad(a[0],c)),-1==b.indexOf("#")&&(a[0]=a[0].substr(a[0].length-c)));var b=f[0].lastIndexOf(","),k,l;-1!=b&&(k=f[0].length-b-1,f=f[0].substr(0,b),b=f.lastIndexOf(","),-1!=b&&(l=f.length-b-1));f=[];for(b=a[0];b;)c=b.length-k,f.push(0'"\/]/g,h={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},l={};e.setObject("dojo.string",l);l.escape=function(b){return b?b.replace(n,function(b){return h[b]}):""};l.rep=function(b,h){if(0>=h||!b)return"";for(var a=[];;){h&1&&a.push(b);if(!(h>>=1))break;b+=b}return a.join("")};l.pad=function(b,h,a,f){a||(a="0");b=String(b);h=l.rep(a,Math.ceil((h-b.length)/ a.length));return f?b+h:h+b};l.substitute=function(h,k,a,f){f=f||b.global;a=a?e.hitch(f,a):function(a){return a};return h.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(d,c,b){if(""==c)return"$";d=e.getObject(c,!1,k);b&&(d=e.getObject(b,!1,f).call(f,d,c));b=a(d,c);if("undefined"===typeof b)throw Error('string.substitute could not find key "'+c+'" in template');return b.toString()})};l.trim=String.prototype.trim?e.trim:function(b){b=b.replace(/^\s+/,"");for(var h=b.length-1;0<=h;h--)if(/\S/.test(b.charAt(h))){b= b.substring(0,h+1);break}return b};return l})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(b,e){var n={};e.setObject("dojo.regexp",n);n.escapeString=function(b,e){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(b){return e&&-1!=e.indexOf(b)?b:"\\"+b})};n.buildGroupRE=function(b,e,m){if(!(b instanceof Array))return e(b);for(var h=[],a=0;ab?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;case "y":f=a.getFullYear();switch(b){case 1:break;case 2:if(!d.fullYear){f=String(f);f=f.substr(f.length- 2);break}default:p=!0}break;case "Q":case "q":f=Math.ceil((a.getMonth()+1)/3);p=!0;break;case "M":case "L":f=a.getMonth();3>b?(f+=1,p=!0):(u=["months","L"==u?"standAlone":"format",q[b-3]].join("-"),f=c[u][f]);break;case "w":f=r._getWeekOfYear(a,0);p=!0;break;case "d":f=a.getDate();p=!0;break;case "D":f=r._getDayOfYear(a);p=!0;break;case "e":case "c":if(f=a.getDay(),2>b){f=(f-h.getFirstDayOfWeek(d.locale)+8)%7;break}case "E":f=a.getDay();3>b?(f+=1,p=!0):(u=["days","c"==u?"standAlone":"format",q[b- 3]].join("-"),f=c[u][f]);break;case "a":u=12>a.getHours()?"am":"pm";f=d[u]||c["dayPeriods-format-wide-"+u];break;case "h":case "H":case "K":case "k":p=a.getHours();switch(u){case "h":f=p%12||12;break;case "H":f=p;break;case "K":f=p%12;break;case "k":f=p||24}p=!0;break;case "m":f=a.getMinutes();p=!0;break;case "s":f=a.getSeconds();p=!0;break;case "S":f=Math.round(a.getMilliseconds()*Math.pow(10,b-3));p=!0;break;case "v":case "z":if(f=r._getZone(a,!0,d))break;b=4;case "Z":u=r._getZone(a,!1,d);u=[0>= u?"+":"-",k.pad(Math.floor(Math.abs(u)/60),2),k.pad(Math.abs(u)%60,2)];4==b&&(u.splice(0,0,"GMT"),u.splice(3,0,":"));f=u.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+g);}p&&(f=k.pad(f,b));return f})}function c(a,c,d,g){var f=function(g){return g};c=c||f;d=d||f;g=g||f;var b=a.match(/(''|[^'])+/g),p="'"==a.charAt(0);e.forEach(b,function(g,a){g?(b[a]=(p?d:c)(g.replace(/''/g,"'")),p=!p):b[a]=""});return g(b.join(""))}function q(a,c,d,g){g=m.escapeString(g);d.strict|| (g=g.replace(" a"," ?a"));return g.replace(/([a-z])\1*/ig,function(g){var f;f=g.charAt(0);var b=g.length,p="",u="";d.strict?(1g)g=Number(g),d=""+(new Date).getFullYear(),a=100*d.substring(0,2),d=Math.min(Number(d.substring(2,4))+20,99),h[0]=gd?h[3]=d+12:"a"===q&&12==d&&(h[3]=0);d=new Date(h[0],h[1],h[2],h[3],h[4],h[5],h[6]);c.strict&&d.setFullYear(h[0]);var k=f.join(""),g=-1!=k.indexOf("d"),k=-1!=k.indexOf("M");if(!a||k&&d.getMonth()>h[1]||g&&d.getDate()>h[2])return null;if(k&&d.getMonth()=c.start&&a<=c.end};r._getDayOfYear=function(a){return n.difference(new Date(a.getFullYear(),0,1,a.getHours()),a)+1};r._getWeekOfYear=function(a,c){1==arguments.length&&(c=0);var d=(new Date(a.getFullYear(),0,1)).getDay(),g=(d-c+7)%7,g=Math.floor((r._getDayOfYear(a)+g-1)/7);d==c&&g++;return g};return r})},"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(b, e){var n={};b.setObject("dojo.cldr.supplemental",n);n.getFirstDayOfWeek=function(b){b={bd:5,mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[n._region(b)];return void 0=== b?1:b};n._region=function(b){b=e.normalizeLocale(b);b=b.split("-");var h=b[1];h?4==h.length&&(h=b[2]):h={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb", ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no", no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id", ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf", ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru", kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph", pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv", twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[b[0]];return h};n.getWeekend=function(b){var h=n._region(b);b={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[h];h={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[h];void 0===b&&(b=6);void 0===h&&(h=0);return{start:b,end:h}}; return n})},"esri/core/Message":function(){define(["require","exports","dojo/string"],function(b,e,n){return function(){function b(h,e,k){this instanceof b&&(this.name=h,this.message=e&&n.substitute(e,k,function(a){return null==a?"":a})||"",this.details=k)}b.prototype.toString=function(){return"["+this.name+"]: "+this.message};return b}()})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./Accessor ./ArrayPool ./Evented ./lang ./ObjectPool ./scheduling ./accessorSupport/decorators ./accessorSupport/ensureType".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r){function x(g){return g?g.isInstanceOf&&g.isInstanceOf(B):!1}function z(g){return g?x(g)?g.toArray():g.length?Array.prototype.slice.apply(g):[]:[]}function v(g){if(g&&g.length)return g[0]}function w(g,a,c,d){a&&a.forEach(function(a,f,b){g.push(a);w(g,c.call(d,a,f,b),c,d)})}b=function(){function g(){this.target=null;this.defaultPrevented=this.cancellable=!1}g.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};g.prototype.reset=function(g){this.defaultPrevented= !1;this.item=g};return g}();var p=function(){},y=new d(b,!0,function(g){g.item=null;g.target=null}),g=new Set,u=new Set,t=new Set,A=new Map,C=0,B=function(a){function d(g){g=a.call(this,g)||this;g._boundDispatch=g._dispatchColChange.bind(g);g._chgListeners=[];g._notifications=null;g._timer=null;g.length=0;g._items=[];Object.defineProperty(g,"uid",{value:C++});return g}n(d,a);b=d;d.ofType=function(g){if(!g)return b;if(A.has(g))return A.get(g);var a;if("function"===typeof g)a=g.prototype.declaredClass; else if(g.base)a=g.base.prototype.declaredClass;else for(var c in g.typeMap){var d=g.typeMap[c].prototype.declaredClass;a=a?a+(" | "+d):d}a=b.createSubclass({declaredClass:"esri.core.Collection\x3c"+a+"\x3e"});a.isCollection=x;c={Type:g,ensureType:"function"===typeof g?r.ensureType(g):r.ensureOneOfType(g)};Object.defineProperty(a.prototype,"itemType",{value:c});A.set(g,a);return a};d.prototype.normalizeCtorArgs=function(g){return g?Array.isArray(g)||x(g)?{items:g}:g:{}};Object.defineProperty(d.prototype, "items",{get:function(){return this._items},set:function(g){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(z(g))),this._emitAfterChanges())},enumerable:!0,configurable:!0});d.prototype.on=function(g,a){var c;Array.isArray(g)?c=g:-1g?g=0:g>a&&(g=a);return g};d.prototype.includes=function(g,a){void 0===a&&(a=0);return arguments.length?-1!==this._items.indexOf(g,a):!1};d.prototype.indexOf=function(g,a){void 0===a&&(a=0);return this._items.indexOf(g,a)};d.prototype.join=function(g){void 0===g&&(g=",");return this._items.join(g)};d.prototype.lastIndexOf=function(g, a){void 0===a&&(a=this.length-1);return this._items.lastIndexOf(g,a)};d.prototype.map=function(g,a){g=this._items.map(g,a);return new b({items:g})};d.prototype.reorder=function(g,a){void 0===a&&(a=this.length-1);var c=this.indexOf(g);if(-1!==c){0>a?a=0:a>=this.length&&(a=this.length-1);if(c!==a){if(this._emitBeforeChanges())return g;this._splice(c,1);this._splice(a,0,g);this._emitAfterChanges()}return g}};d.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var g=v(this._splice(this.length- 1,1));this._emitAfterChanges();return g}};d.prototype.push=function(){for(var g=[],a=0;ag||g>=this.length||this._emitBeforeChanges()))return g=v(this._splice(g,1)),this._emitAfterChanges(),g};d.prototype.removeMany=function(g){if(!g||!g.length||this._emitBeforeChanges())return[];g=x(g)?g.toArray():g;for(var a=this._items,c=[],d=g.length,f=0;fthis._pool.length;)h=this._pool.shift(),this._set.delete(h),h.dispose&&"function"===typeof h.dispose&&h.dispose()};b.prototype._constructorAcquireFunction=function(b){for(var h=[],e=1;er&&(r=c);var d=c-r,b=0=a)z=x=0;else{var g=1.05*v;a=Math.ceil(1E3/a/g);x=(a-1)*g;z=a*v}};var A=0;e.requestNextFrame=k})},"esri/core/nextTick":function(){define(["require","exports","./global"],function(b,e,n){function h(){if(n.postMessage&&!n.importScripts){var b=n.onmessage,h=!0;n.onmessage=function(){h=!1};n.postMessage("","*");n.onmessage=b;return h}return!1}var l=n.MutationObserver||n.WebKitMutationObserver; return function(){var b;if(n.process&&n.process.nextTick)b=function(a){n.process.nextTick(a)};else if(n.Promise)b=function(a){n.Promise.resolve().then(a)};else if(l){var e=[],a=document.createElement("div");(new l(function(){for(;0d?a.length:d,0>f?a.length:f);if(a.slice(c+ 2,d).toLowerCase()!==g.toLowerCase())return a;g=a.slice(0,c+2);a=a.slice(d);return""+g+b+a}function M(a){if("string"===typeof a)return new l(w(a));a.scheme||(a.scheme=e.appUrl.scheme);return a}Object.defineProperty(e,"__esModule",{value:!0});var X=d.getLogger("esri.core.urlUtils"),O=m.request,L=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,Q=/^\s*http:/i,G=/^\s*https:/i,V=/^\s*file:/i,U=/:\d+$/,Y=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;e.appUrl=new l(a.location);e.trustedServersUrlCache={};e.appBaseUrl= function(){var a=e.appUrl.path,a=a.substring(0,a.lastIndexOf(a.split("/")[a.split("/").length-1]));return""+(e.appUrl.scheme+"://"+e.appUrl.host+(null!=e.appUrl.port?":"+e.appUrl.port:""))+a}();e.urlToObject=c;e.getProxyUrl=function(a){void 0===a&&(a=!1);var g,b=O.proxyUrl;if("string"===typeof a){if(g=a,g=G.test(g)||"https"===e.appUrl.scheme&&F(g),a=x(a))b=a.proxyUrl}else g=!!a;if(!b)throw X.warn("esri/config: esriConfig.request.proxyUrl is not set."),new k("urlutils:proxy-not-set","esri/config: esriConfig.request.proxyUrl is not set."); g&&ga()&&(b=aa(b));return c(b)};e.addProxy=function(a){var g=x(a),b,d;g&&(d=q(g.proxyUrl),b=d.path,d=d.query?h.queryToObject(d.query):null);b&&(g=c(a),a=b+"?"+g.path,(b=h.objectToQuery(n({},d,g.query)))&&(a=a+"?"+b));return a};var N={path:"",query:""};e.addProxyRule=function(a){a={proxyUrl:a.proxyUrl,urlPrefix:r(a.urlPrefix)};for(var g=O.proxyRules,b=a.urlPrefix,c=g.length,d=0;da?0:1D.maxUrlLength),y=!u&&(b||!!w.getProxyRule(a.url)),l;if(l=!y&&"image"===a.handleAs&&D.proxyUrl&&!u){var r=w.getOrigin(a.url);l=!(!r||z.endsWith(r,".arcgis.com")||w.hasSameOrigin(r,w.appUrl)||-1!==F._corsServers.indexOf(r)||w.isTrustedServer(r))}l&& (a.handleAs="blob");y&&(x("host-browser")||x("host-webworker"))&&(e=w.getProxyUrl(d),q=e.path,!k&&q.length+1+t>D.maxUrlLength&&(k=!0),e.query&&(a.content=n({},e.query,a.content)),k||(a.preventCache&&(a.content["request.preventCache"]=Date.now(),a.preventCache=!1),a.url=w.addQueryParameters(a.url,a.content),a.content=null),a.url=q+"?"+a.url);if(!u){var A=a.headers;!x("host-browser")&&!x("host-webworker")||A&&A.hasOwnProperty("X-Requested-With")||(A=a.headers=A||{},A["X-Requested-With"]=null);if(x("host-browser")&& g){var v=a.content&&a.content.token;v&&(g.set?g.set("token",v):g.append("token",v));a.contentType=!1}if(!a.hasOwnProperty("withCredentials"))if(b=y?q:d,w.isTrustedServer(b))a.withCredentials=!0;else if(P){var B=P.findServerInfo(b);B&&B.webTierAuth&&(a.withCredentials=!0)}}if(k)return"image"===a.handleAs&&(a.handleAs="blob"),a.body?(a.data=g||a.body,a.query=a.content):a.data=a.content,delete a.body,delete a.content,!y&&x("safari")&&(a.url+=(-1===a.url.indexOf("?")?"?":"\x26")+"_ts\x3d"+(new Date).getTime()+ aa++),f.post(a.url,a);if("image"===a.handleAs)return p(a);a.query=a.content;delete a.content;return f.get(a.url,a)}catch(ha){return a=new h,a.reject(ha),a.promise}}function t(a,g,b,c){function d(a){a._pendingDfd=u(b,l);var g=!!a._pendingDfd.response;(a._pendingDfd.response||a._pendingDfd).then(function(a){if(!g||!a.data)return a;D.proxyUrl&&!z.startsWith(a.url,D.proxyUrl)&&B(a.url);var b=a.getHeader("Content-Type");if(b&&(b=b.toLowerCase(),-1===b.indexOf("text/plain")&&-1===b.indexOf("application/json")))return a; b=a.data;if(b instanceof ArrayBuffer&&750>=b.byteLength)b=new Blob([b]);else if(!(b instanceof Blob&&750>=b.size))return a;var c=new h,d=new FileReader;d.readAsText(b);d.onloadend=function(){if(!d.error)try{var g=JSON.parse(d.result);g.error&&(Object.isExtensible(a)||(a=n({},a)),a._jsonData=g)}catch(Ca){}c.resolve(a)};return c.promise}).then(function(a){return g&&!a._jsonData&&"image"===c.requestOptions.responseType&&a.data instanceof Blob?(g=!1,b.url=URL.createObjectURL(a.data),p(b,!0)):a}).then(function(b){var d= g?b.data:b,f=g?b.getHeader.bind(b):ga;if(d&&(b=g&&b._jsonData||d,b.error||"error"===b.status))throw d=z.mixin(Error(),b.error||b),d.getHeader=f,d;a.resolve({data:d,url:c.url,requestOptions:c.requestOptions,getHeader:f});a._pendingDfd=null}).catch(function(g){var d,p,u,h;g&&(d=Number(g.code),p=g.hasOwnProperty("subcode")?Number(g.subcode):null,u=(u=g.messageCode)&&u.toUpperCase(),h=g.response);if(h&&0===h.status&&D.proxyUrl&&!f&&"post"!==b.method&&h.url&&!z.startsWith(h.url,D.proxyUrl))w.addProxyRule({proxyUrl:D.proxyUrl, urlPrefix:w.removeFile(w.urlToObject(b.url).path)}),t(a,!0,b,c);else{if(403===d&&(4===p||g.message&&-1=b;b++)e[b]=0;for(b=2056;2065>=b;b++)e[b]=0;for(b=2067;2135>=b;b++)e[b]=0;for(b=2137;2154>=b;b++)e[b]=0;for(b=2161;2170>=b;b++)e[b]=0;for(b=2172;2193>=b;b++)e[b]=0;for(b=2195;2198>=b;b++)e[b]=0;for(b=2200;2203>=b;b++)e[b]=0;for(b=2205;2217>=b;b++)e[b]=0;for(b=2222;2224>=b;b++)e[b]=1;for(b=2225;2250>=b;b++)e[b]=2; for(b=2251;2253>=b;b++)e[b]=1;for(b=2257;2264>=b;b++)e[b]=2;for(b=2274;2279>=b;b++)e[b]=2;for(b=2280;2282>=b;b++)e[b]=1;for(b=2283;2289>=b;b++)e[b]=2;for(b=2290;2292>=b;b++)e[b]=0;for(b=2308;2313>=b;b++)e[b]=0;for(b=2315;2491>=b;b++)e[b]=0;for(b=2494;2866>=b;b++)e[b]=0;for(b=2867;2869>=b;b++)e[b]=1;for(b=2870;2888>=b;b++)e[b]=2;for(b=2891;2895>=b;b++)e[b]=2;for(b=2896;2898>=b;b++)e[b]=1;for(b=2902;2908>=b;b++)e[b]=2;for(b=2915;2920>=b;b++)e[b]=2;for(b=2921;2923>=b;b++)e[b]=1;for(b=2924;2930>=b;b++)e[b]= 2;for(b=2931;2962>=b;b++)e[b]=0;for(b=2964;2968>=b;b++)e[b]=2;for(b=2969;2973>=b;b++)e[b]=0;for(b=2975;2991>=b;b++)e[b]=0;for(b=2995;3051>=b;b++)e[b]=0;for(b=3054;3079>=b;b++)e[b]=0;for(b=3081;3088>=b;b++)e[b]=0;for(b=3092;3101>=b;b++)e[b]=0;for(b=3106;3138>=b;b++)e[b]=0;for(b=3146;3151>=b;b++)e[b]=0;for(b=3153;3166>=b;b++)e[b]=0;for(b=3168;3172>=b;b++)e[b]=0;for(b=3174;3203>=b;b++)e[b]=0;for(b=3294;3358>=b;b++)e[b]=0;for(b=3367;3403>=b;b++)e[b]=0;for(b=3408;3416>=b;b++)e[b]=0;for(b=3417;3438>=b;b++)e[b]= 2;for(b=3441;3446>=b;b++)e[b]=2;for(b=3447;3450>=b;b++)e[b]=0;for(b=3451;3459>=b;b++)e[b]=2;for(b=3460;3478>=b;b++)e[b]=0;for(b=3554;3559>=b;b++)e[b]=0;for(b=3560;3570>=b;b++)e[b]=2;for(b=3571;3581>=b;b++)e[b]=0;for(b=3594;3597>=b;b++)e[b]=0;for(b=3601;3604>=b;b++)e[b]=0;for(b=3637;3639>=b;b++)e[b]=0;for(b=3665;3667>=b;b++)e[b]=0;for(b=3693;3695>=b;b++)e[b]=0;for(b=3701;3727>=b;b++)e[b]=0;for(b=3728;3739>=b;b++)e[b]=2;for(b=3740;3751>=b;b++)e[b]=0;for(b=3753;3760>=b;b++)e[b]=2;for(b=3761;3773>=b;b++)e[b]= 0;for(b=3775;3777>=b;b++)e[b]=0;for(b=3779;3781>=b;b++)e[b]=0;for(b=3783;3785>=b;b++)e[b]=0;for(b=3788;3791>=b;b++)e[b]=0;for(b=3797;3802>=b;b++)e[b]=0;for(b=3814;3816>=b;b++)e[b]=0;for(b=3825;3829>=b;b++)e[b]=0;for(b=3832;3841>=b;b++)e[b]=0;for(b=3844;3852>=b;b++)e[b]=0;for(b=3873;3885>=b;b++)e[b]=0;for(b=3890;3893>=b;b++)e[b]=0;for(b=3907;3912>=b;b++)e[b]=0;for(b=3942;3950>=b;b++)e[b]=0;for(b=3968;3970>=b;b++)e[b]=0;for(b=3973;3976>=b;b++)e[b]=0;for(b=3986;3989>=b;b++)e[b]=0;for(b=3994;3997>=b;b++)e[b]= 0;for(b=4048;4051>=b;b++)e[b]=0;for(b=4056;4063>=b;b++)e[b]=0;for(b=4093;4096>=b;b++)e[b]=0;for(b=4390;4398>=b;b++)e[b]=0;for(b=4399;4413>=b;b++)e[b]=2;for(b=4418;4433>=b;b++)e[b]=2;for(b=4455;4457>=b;b++)e[b]=2;for(b=4484;4489>=b;b++)e[b]=0;for(b=4491;4554>=b;b++)e[b]=0;for(b=4568;4589>=b;b++)e[b]=0;for(b=4652;4656>=b;b++)e[b]=0;for(b=4766;4800>=b;b++)e[b]=0;for(b=5014;5016>=b;b++)e[b]=0;for(b=5069;5072>=b;b++)e[b]=0;for(b=5105;5130>=b;b++)e[b]=0;for(b=5173;5188>=b;b++)e[b]=0;for(b=5253;5259>=b;b++)e[b]= 0;for(b=5269;5275>=b;b++)e[b]=0;for(b=5292;5311>=b;b++)e[b]=0;for(b=5329;5331>=b;b++)e[b]=0;for(b=5343;5349>=b;b++)e[b]=0;for(b=5355;5357>=b;b++)e[b]=0;for(b=5387;5389>=b;b++)e[b]=0;for(b=5459;5463>=b;b++)e[b]=0;for(b=5479;5482>=b;b++)e[b]=0;for(b=5518;5520>=b;b++)e[b]=0;for(b=5530;5539>=b;b++)e[b]=0;for(b=5550;5552>=b;b++)e[b]=0;for(b=5562;5583>=b;b++)e[b]=0;for(b=5623;5625>=b;b++)e[b]=2;for(b=5631;5639>=b;b++)e[b]=0;for(b=5649;5653>=b;b++)e[b]=0;for(b=5663;5680>=b;b++)e[b]=0;for(b=5682;5685>=b;b++)e[b]= 0;for(b=5875;5877>=b;b++)e[b]=0;for(b=5921;5940>=b;b++)e[b]=0;for(b=6050;6125>=b;b++)e[b]=0;for(b=6244;6275>=b;b++)e[b]=0;for(b=6328;6348>=b;b++)e[b]=0;for(b=6350;6356>=b;b++)e[b]=0;for(b=6366;6372>=b;b++)e[b]=0;for(b=6381;6387>=b;b++)e[b]=0;for(b=6393;6404>=b;b++)e[b]=0;for(b=6480;6483>=b;b++)e[b]=0;for(b=6511;6514>=b;b++)e[b]=0;for(b=6579;6581>=b;b++)e[b]=0;for(b=6619;6624>=b;b++)e[b]=0;for(b=6625;6627>=b;b++)e[b]=2;for(b=6628;6632>=b;b++)e[b]=0;for(b=6634;6637>=b;b++)e[b]=0;for(b=6669;6692>=b;b++)e[b]= 0;for(b=6707;6709>=b;b++)e[b]=0;for(b=6720;6723>=b;b++)e[b]=0;for(b=6732;6738>=b;b++)e[b]=0;for(b=6931;6933>=b;b++)e[b]=0;for(b=6956;6959>=b;b++)e[b]=0;for(b=7005;7007>=b;b++)e[b]=0;for(b=7057;7070>=b;b++)e[b]=2;for(b=7074;7082>=b;b++)e[b]=0;for(b=7109;7118>=b;b++)e[b]=0;for(b=7119;7127>=b;b++)e[b]=1;for(b=7374;7376>=b;b++)e[b]=0;for(b=7528;7586>=b;b++)e[b]=0;for(b=7587;7645>=b;b++)e[b]=2;for(b=7755;7787>=b;b++)e[b]=0;for(b=7791;7795>=b;b++)e[b]=0;for(b=7799;7801>=b;b++)e[b]=0;for(b=7803;7805>=b;b++)e[b]= 0;for(b=7825;7831>=b;b++)e[b]=0;for(b=7845;7859>=b;b++)e[b]=0;for(b=8013;8032>=b;b++)e[b]=0;for(b=20002;20032>=b;b++)e[b]=0;for(b=20062;20092>=b;b++)e[b]=0;for(b=20135;20138>=b;b++)e[b]=0;for(b=20248;20258>=b;b++)e[b]=0;for(b=20348;20358>=b;b++)e[b]=0;for(b=20436;20440>=b;b++)e[b]=0;for(b=20822;20824>=b;b++)e[b]=0;for(b=20934;20936>=b;b++)e[b]=0;for(b=21035;21037>=b;b++)e[b]=0;for(b=21095;21097>=b;b++)e[b]=0;for(b=21148;21150>=b;b++)e[b]=0;for(b=21413;21423>=b;b++)e[b]=0;for(b=21473;21483>=b;b++)e[b]= 0;for(b=21780;21782>=b;b++)e[b]=0;for(b=21891;21894>=b;b++)e[b]=0;for(b=21896;21899>=b;b++)e[b]=0;for(b=22171;22177>=b;b++)e[b]=0;for(b=22181;22187>=b;b++)e[b]=0;for(b=22191;22197>=b;b++)e[b]=0;for(b=22234;22236>=b;b++)e[b]=0;for(b=22521;22525>=b;b++)e[b]=0;for(b=22991;22994>=b;b++)e[b]=0;for(b=23028;23038>=b;b++)e[b]=0;for(b=23830;23853>=b;b++)e[b]=0;for(b=23866;23872>=b;b++)e[b]=0;for(b=23877;23884>=b;b++)e[b]=0;for(b=23886;23894>=b;b++)e[b]=0;for(b=23946;23948>=b;b++)e[b]=0;for(b=24311;24313>= b;b++)e[b]=0;for(b=24342;24347>=b;b++)e[b]=0;for(b=24370;24374>=b;b++)e[b]=10;for(b=24375;24381>=b;b++)e[b]=0;for(b=24718;24721>=b;b++)e[b]=0;for(b=24817;24821>=b;b++)e[b]=0;for(b=24877;24882>=b;b++)e[b]=0;for(b=24891;24893>=b;b++)e[b]=0;for(b=25391;25395>=b;b++)e[b]=0;for(b=25828;25838>=b;b++)e[b]=0;for(b=26191;26195>=b;b++)e[b]=0;for(b=26391;26393>=b;b++)e[b]=0;for(b=26701;26722>=b;b++)e[b]=0;for(b=26729;26799>=b;b++)e[b]=2;for(b=26801;26803>=b;b++)e[b]=2;for(b=26811;26813>=b;b++)e[b]=2;for(b=26847;26870>= b;b++)e[b]=2;for(b=26891;26899>=b;b++)e[b]=0;for(b=26901;26923>=b;b++)e[b]=0;for(b=26929;26946>=b;b++)e[b]=0;for(b=26948;26998>=b;b++)e[b]=0;for(b=27037;27040>=b;b++)e[b]=0;for(b=27205;27232>=b;b++)e[b]=0;for(b=27258;27260>=b;b++)e[b]=0;for(b=27391;27398>=b;b++)e[b]=0;for(b=27561;27564>=b;b++)e[b]=0;for(b=27571;27574>=b;b++)e[b]=0;for(b=27581;27584>=b;b++)e[b]=0;for(b=27591;27594>=b;b++)e[b]=0;for(b=28191;28193>=b;b++)e[b]=0;for(b=28348;28358>=b;b++)e[b]=0;for(b=28402;28432>=b;b++)e[b]=0;for(b=28462;28492>= b;b++)e[b]=0;for(b=29118;29122>=b;b++)e[b]=0;for(b=29168;29172>=b;b++)e[b]=0;for(b=29177;29185>=b;b++)e[b]=0;for(b=29187;29195>=b;b++)e[b]=0;for(b=29900;29903>=b;b++)e[b]=0;for(b=30161;30179>=b;b++)e[b]=0;for(b=30491;30494>=b;b++)e[b]=0;for(b=30729;30732>=b;b++)e[b]=0;for(b=31251;31259>=b;b++)e[b]=0;for(b=31265;31268>=b;b++)e[b]=0;for(b=31275;31279>=b;b++)e[b]=0;for(b=31281;31297>=b;b++)e[b]=0;for(b=31461;31469>=b;b++)e[b]=0;for(b=31491;31495>=b;b++)e[b]=0;for(b=31917;31922>=b;b++)e[b]=0;for(b=31965;32E3>= b;b++)e[b]=0;for(b=32001;32003>=b;b++)e[b]=2;for(b=32005;32031>=b;b++)e[b]=2;for(b=32033;32060>=b;b++)e[b]=2;for(b=32064;32067>=b;b++)e[b]=2;for(b=32074;32077>=b;b++)e[b]=2;for(b=32081;32086>=b;b++)e[b]=0;for(b=32107;32130>=b;b++)e[b]=0;for(b=32133;32158>=b;b++)e[b]=0;for(b=32164;32167>=b;b++)e[b]=2;for(b=32180;32199>=b;b++)e[b]=0;for(b=32201;32260>=b;b++)e[b]=0;for(b=32301;32360>=b;b++)e[b]=0;for(b=32601;32662>=b;b++)e[b]=0;for(b=32664;32667>=b;b++)e[b]=2;for(b=32701;32761>=b;b++)e[b]=0;for(b=53001;53004>= b;b++)e[b]=0;for(b=53008;53019>=b;b++)e[b]=0;for(b=53021;53032>=b;b++)e[b]=0;for(b=53042;53046>=b;b++)e[b]=0;for(b=53074;53080>=b;b++)e[b]=0;for(b=54001;54004>=b;b++)e[b]=0;for(b=54008;54019>=b;b++)e[b]=0;for(b=54021;54032>=b;b++)e[b]=0;for(b=54042;54046>=b;b++)e[b]=0;for(b=54048;54053>=b;b++)e[b]=0;for(b=54074;54080>=b;b++)e[b]=0;for(b=102001;102040>=b;b++)e[b]=0;for(b=102042;102063>=b;b++)e[b]=0;for(b=102065;102067>=b;b++)e[b]=0;for(b=102070;102117>=b;b++)e[b]=0;for(b=102122;102216>=b;b++)e[b]= 0;for(b=102221;102377>=b;b++)e[b]=0;for(b=102382;102388>=b;b++)e[b]=0;for(b=102389;102398>=b;b++)e[b]=2;for(b=102399;102444>=b;b++)e[b]=0;for(b=102445;102447>=b;b++)e[b]=2;for(b=102448;102458>=b;b++)e[b]=0;for(b=102459;102468>=b;b++)e[b]=2;for(b=102469;102497>=b;b++)e[b]=0;for(b=102500;102519>=b;b++)e[b]=1;for(b=102520;102524>=b;b++)e[b]=0;for(b=102525;102529>=b;b++)e[b]=2;for(b=102530;102568>=b;b++)e[b]=0;for(b=102570;102588>=b;b++)e[b]=0;for(b=102590;102598>=b;b++)e[b]=0;for(b=102601;102603>=b;b++)e[b]= 0;for(b=102605;102628>=b;b++)e[b]=0;for(b=102629;102646>=b;b++)e[b]=2;for(b=102648;102700>=b;b++)e[b]=2;for(b=102701;102703>=b;b++)e[b]=0;for(b=102707;102730>=b;b++)e[b]=2;for(b=102733;102758>=b;b++)e[b]=2;for(b=102767;102900>=b;b++)e[b]=0;for(b=102965;102969>=b;b++)e[b]=0;for(b=102971;102973>=b;b++)e[b]=0;for(b=102975;102989>=b;b++)e[b]=0;for(b=102990;102992>=b;b++)e[b]=1;for(b=102997;103002>=b;b++)e[b]=0;for(b=103003;103008>=b;b++)e[b]=2;for(b=103009;103011>=b;b++)e[b]=0;for(b=103012;103014>=b;b++)e[b]= 2;for(b=103019;103021>=b;b++)e[b]=0;for(b=103022;103024>=b;b++)e[b]=2;for(b=103029;103031>=b;b++)e[b]=0;for(b=103032;103034>=b;b++)e[b]=2;for(b=103065;103068>=b;b++)e[b]=0;for(b=103074;103076>=b;b++)e[b]=0;for(b=103077;103079>=b;b++)e[b]=1;for(b=103080;103082>=b;b++)e[b]=0;for(b=103083;103085>=b;b++)e[b]=2;for(b=103090;103093>=b;b++)e[b]=0;for(b=103097;103099>=b;b++)e[b]=0;for(b=103100;103102>=b;b++)e[b]=2;for(b=103107;103109>=b;b++)e[b]=0;for(b=103110;103112>=b;b++)e[b]=2;for(b=103113;103116>=b;b++)e[b]= 0;for(b=103117;103120>=b;b++)e[b]=2;for(b=103153;103157>=b;b++)e[b]=0;for(b=103158;103162>=b;b++)e[b]=2;for(b=103163;103165>=b;b++)e[b]=0;for(b=103166;103168>=b;b++)e[b]=1;for(b=103169;103171>=b;b++)e[b]=2;for(b=103186;103188>=b;b++)e[b]=0;for(b=103189;103191>=b;b++)e[b]=2;for(b=103192;103195>=b;b++)e[b]=0;for(b=103196;103199>=b;b++)e[b]=2;for(b=103200;103224>=b;b++)e[b]=0;for(b=103225;103227>=b;b++)e[b]=1;for(b=103232;103237>=b;b++)e[b]=0;for(b=103238;103243>=b;b++)e[b]=2;for(b=103244;103246>=b;b++)e[b]= 0;for(b=103247;103249>=b;b++)e[b]=2;for(b=103254;103256>=b;b++)e[b]=0;for(b=103257;103259>=b;b++)e[b]=2;for(b=103264;103266>=b;b++)e[b]=0;for(b=103267;103269>=b;b++)e[b]=2;for(b=103300;103375>=b;b++)e[b]=0;for(b=103381;103383>=b;b++)e[b]=0;for(b=103384;103386>=b;b++)e[b]=1;for(b=103387;103389>=b;b++)e[b]=0;for(b=103390;103392>=b;b++)e[b]=2;for(b=103397;103399>=b;b++)e[b]=0;for(b=103400;103471>=b;b++)e[b]=2;for(b=103476;103478>=b;b++)e[b]=0;for(b=103479;103481>=b;b++)e[b]=2;for(b=103486;103488>=b;b++)e[b]= 0;for(b=103489;103491>=b;b++)e[b]=2;for(b=103492;103495>=b;b++)e[b]=0;for(b=103496;103499>=b;b++)e[b]=2;for(b=103528;103543>=b;b++)e[b]=0;for(b=103544;103548>=b;b++)e[b]=2;for(b=103549;103551>=b;b++)e[b]=0;for(b=103552;103554>=b;b++)e[b]=1;for(b=103555;103557>=b;b++)e[b]=2;for(b=103558;103560>=b;b++)e[b]=0;for(b=103571;103573>=b;b++)e[b]=0;for(b=103574;103576>=b;b++)e[b]=2;for(b=103577;103580>=b;b++)e[b]=0;for(b=103581;103583>=b;b++)e[b]=2;for(b=103600;103694>=b;b++)e[b]=0;for(b=103700;103793>=b;b++)e[b]= 2;for(b=103794;103871>=b;b++)e[b]=0;for(b=103900;103971>=b;b++)e[b]=2;return e})},"esri/geometry/Extent":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Geometry ./Point ./SpatialReference ./support/contains ./support/intersects ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(b,e,n,h,l,m,k,a,f,d,c,q,r){function x(a,b,c){return null==b?c:null==c?b:a(b,c)}b=function(b){function e(){for(var a= 0;a=a&&c<=g&&d>=a&&d<=g||(b=this.center);return b};e.prototype._normalize=function(a,b,g){var c=this.spatialReference;if(!c)return this;g=g||q.getInfo(c);if(!g)return this;var d=this._getParts(g).map(function(a){return a.extent});if(2>d.length)return d[0]|| this;if(22*x){f=new k(pv||e?b.push({extent:new k(m,g,x,c,d),frameIds:[l]},{extent:new k(r,g,v,c,d),frameIds:[a]}):b.push({extent:new k(m,g,v,c,d),frameIds:[l]});this.cache._parts=b}a=this.hasZ;g=this.hasM;if(a||g)for(l={},a&&(l.zmin=this.zmin,l.zmax=this.zmax),g&&(l.mmin=this.mmin,l.mmax=this.mmax),a=0;ac?(b=Math.ceil(Math.abs(a-c)/g),a-=b*g,d=b):ag?(a=Math.ceil(Math.abs(b-g)/c),b-=a*c):bb&&(b=-89.99999);b*=.017453292519943;d[f]=.017453292519943*a*c;d[f+1]=.5*c*Math.log((1+Math.sin(b))/(1-Math.sin(b)));return d}function d(a,b,d,f,h){void 0===d&&(d=[0,0]);void 0=== f&&(f=0);void 0===h&&(h=!1);a=a/c*57.29577951308232;d[f]=h?a:a-360*Math.floor((a+180)/360);d[f+1]=57.29577951308232*(Math.PI/2-2*Math.atan(Math.exp(-1*b/c)));return d}Object.defineProperty(e,"__esModule",{value:!0});var c=h.wgs84Radius,q=[0,0];e.canProject=a;e.project=function(b,c){var h=b&&b.spatialReference;c=c&&(null!=c.wkid||null!=c.wkt?c:c.spatialReference);return a(h,c)?m.equals(h,c)?n.clone(b):m.isWebMercator(c)?k(b,f,l.WebMercator,!1,n.clone(b)):m.isWGS84(c)?k(b,d,l.WGS84,!1,n.clone(b)):null: null};e.lngLatToXY=f;e.xyToLngLat=d;e.geographicToWebMercator=function(a,b,c){void 0===b&&(b=!1);void 0===c&&(c=n.clone(a));return k(a,f,l.WebMercator,b,c)};e.webMercatorToGeographic=function(a,b,c){void 0===b&&(b=!1);void 0===c&&(c=n.clone(a));return k(a,d,l.WGS84,b,c)}})},"esri/core/wgs84Constants":function(){define(["require","exports"],function(b,e){Object.defineProperty(e,"__esModule",{value:!0});e.wgs84Radius=6378137;e.wgs84InverseFlattening=298.257223563;e.wgs84Flattening=1/e.wgs84InverseFlattening; e.wgs84PolarRadius=e.wgs84Radius*(1-e.wgs84Flattening);e.wgs84Eccentricity=.0818191908426215})},"esri/geometry/support/contains":function(){define(["require","exports"],function(b,e){function n(b,h,a,f){return h>=b.xmin&&h<=b.xmax&&a>=b.ymin&&a<=b.ymax?null!=f&&b.hasZ?f>=b.zmin&&f<=b.zmax:!0:!1}function h(b,h){if(b=b.rings)if(Array.isArray(b[0][0])){for(var a=!1,f=0,d=b.length;f=a||m=a)&&l+(a-k)/(m-k)*(v-l)=g&&0<=u&&1>=u?(d&&(d[0]=f+g*(h-f),d[1]=a+g*(b-a)),!0):!1}Object.defineProperty(e,"__esModule",{value:!0});e.extentIntersectsPoint=h;e.extentIntersectsExtent=l;e.extentIntersectsMultipoint=m;var c=[0, 0],q=[0,0],r=[0,0],x=[0,0],z=[c,q,r,x],v=[[r,c],[c,q],[q,x],[x,r]];e.extentIntersectsPolygon=k;e.extentIntersectsPolyline=a;var w=[0,0];e.isSelfIntersecting=function(a){for(var b=0;b=p))for(c= 0;cd&&++d;1c?a+(b-a)*c:1>2*d?b:2>3*d?a+(b-a)*(2/3-d)*6:a};b.colorFromRgb=n.fromRgb=function(a,b){var d= a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(d){a=d[2].split(/\s*,\s*/);var c=a.length,d=d[1];if("rgb"==d&&3==c||"rgba"==d&&4==c)return d=a[0],"%"==d.charAt(d.length-1)?(d=h.map(a,function(a){return 2.56*parseFloat(a)}),4==c&&(d[3]=a[3]),n.fromArray(d,b)):n.fromArray(a,b);if("hsl"==d&&3==c||"hsla"==d&&4==c){var d=(parseFloat(a[0])%360+360)%360/360,f=parseFloat(a[1])/100,e=parseFloat(a[2])/100,f=.5>=e?e*(f+1):e+f-e*f,e=2*e-f,d=[256*m(e,f,d+1/3),256*m(e,f,d),256*m(e,f,d-1/3),1];4== c&&(d[3]=a[3]);return n.fromArray(d,b)}}return null};var k=function(a,b,d){a=Number(a);return isNaN(a)?d:ad?d:a};n.prototype.sanitize=function(){this.r=Math.round(k(this.r,0,255));this.g=Math.round(k(this.g,0,255));this.b=Math.round(k(this.b,0,255));this.a=k(this.a,0,1);return this};l.makeGrey=n.makeGrey=function(a,b){return n.fromArray([a,a,a,b])};e.mixin(n.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255, 228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255, 140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32], greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32, 178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245, 255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250, 128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return n})},"esri/ground/navigationConstraints":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/Warning ../core/accessorSupport/decorators".split(" "), function(b,e,n,h,l,m,k){Object.defineProperty(e,"__esModule",{value:!0});b=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);h([k.property()],b.prototype,"type",void 0);return b=h([k.subclass("esri.ground.NavigationConstraint")],b)}(k.declared(l));e.NavigationConstraint=b;l=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.type="none";return b}n(b,a);d=b;b.prototype.clone=function(){return new d};var d;h([k.property({type:["none"],readOnly:!0,json:{read:!1, write:!0}})],b.prototype,"type",void 0);return b=d=h([k.subclass("esri.ground.NoneNavigationConstraint")],b)}(k.declared(b));e.NoneNavigationConstraint=l;var a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.type="stay-above";return b}n(b,a);d=b;b.prototype.clone=function(){return new d};var d;h([k.property({type:["stay-above"],readOnly:!0,json:{read:!1,write:function(a,b){b.type="stayAbove"}}})],b.prototype,"type",void 0);return b=d=h([k.subclass("esri.ground.StayAboveNavigationConstraint")], b)}(k.declared(b));e.StayAboveNavigationConstraint=a;e.readNavigationConstraint=function(a,b,h){if(b=a&&f[a.type])return b=new b,b.read(a,h),b;h&&h.messages&&a&&h.messages.push(new m("navigationconstraint:unsupported","Navigation constraint of type '"+(a.type||"unknown")+"' is not supported",{definition:a,context:h}))};var f={none:l,stayAbove:a};e.navigationConstraintTypes={key:"type",base:b,typeMap:{none:l,"stay-above":a}}})},"esri/layers/support/types":function(){define(["require","exports"],function(b, e){Object.defineProperty(e,"__esModule",{value:!0});e.isOfType=function(b,h){b=b.constructor._meta;if(!b||!b.bases)return!1;b=b.bases;var e=Array.isArray(h);return b.some(function(b){b=b.__accessorMetadata__;if(!b)return!1;b=b.properties;if(!b||!b.type||!b.type.value)return!1;b=b.type.value;return e?-1!==h.indexOf(b):b===h})}})},"esri/webdoc/support/opacityUtils":function(){define(["require","exports","../../core/accessorSupport/ensureType"],function(b,e,n){Object.defineProperty(e,"__esModule",{value:!0}); e.opacityToTransparency=function(b){b=n.ensureInteger(100*(1-b));return Math.max(0,Math.min(b,100))};e.transparencyToOpacity=function(b){return Math.max(0,Math.min(1-b/100,1))}})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Collection ./Handles ./accessorSupport/decorators".split(" "),function(b,e,n,h,l,m,k){return function(a){function b(b){b=a.call(this)||this;b._handles=new m;b.root=null;b.refresh=b.refresh.bind(b); b.updateCollections=b.updateCollections.bind(b);return b}n(b,a);b.prototype.initialize=function(){var a=this;this._handles.add(this.rootCollectionNames.map(function(b){return a.watch("root."+b,a.updateCollections,!0)}));this.updateCollections()};b.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};b.prototype.updateCollections=function(){var a=this;this._collections=this.rootCollectionNames.map(function(b){return a.get("root."+b)}).filter(function(a){return null!= a});this.refresh()};b.prototype.refresh=function(){var a=this._handles;a.remove("collections");this.removeAll();for(var b=this._collections.slice(),f=0,h=this._collections;f=d}),f.fromJSON(a)):null};b.prototype.readTilemapCache=function(a,b){return b.capabilities&&-1=h&&kb?(b=Math.floor(g.width/h),g={x:g.x,y:Math.floor(g.y+(g.height-b)/2),width:g.width,height:b}):(b=Math.floor(g.height*h),g={x:Math.floor(g.x+(g.width-b)/2),y:g.y,width:b,height:g.height}));b=k(a,g);a=b.width;b=b.height;a:switch(f){case "png":case "jpg":case "jpeg":break a;default:f=c}h=q[f];e=null!=e?e:h;return{format:f,quality:0>e?0:100u[N+3]&&(Y=Y*u[N+3]/255);n+=Y*u[N];w+=Y*u[N+1];X+=Y*u[N+2];z+=Y}}q[x]=n/z;q[x+1]=w/z;q[x+2]=X/z;q[x+3]=O/v}return b};var a=null,f=!0,d={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},c="jpg",q={png:100,jpg:98, jpeg:98},r={top:0,right:0,bottom:0,left:0}})},"esri/geometry/support/ValueMeshColor":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/accessorSupport/decorators ./MeshColor".split(" "),function(b,e,n,h,l,m,k,a){return function(a){function b(b){b=a.call(this)||this;b.type="value";b.value=null;return b}n(b,a);c=b;b.prototype.clone=function(){return new c({value:m.clone(this.value)})};var c;h([k.property()], b.prototype,"type",void 0);h([k.property({type:l})],b.prototype,"value",void 0);return b=c=h([k.subclass("esri.geometry.support.ValueMeshColor")],b)}(k.declared(a.default))})},"esri/geometry/support/MeshVertexAttributes":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m,k,a){function f(a,b,c,d){var f=b.loggerTag; b=b.stride;return 0!==a.length%b?(d.error(f,"Invalid array length, expected a multiple of "+b),new c([])):a}function d(a,b,c,d,e){if(!a)return a;if(a instanceof b)return f(a,d,b,e);for(var h=0;h80*c){l=r=a[0];y=d=a[1];for(x=c;xr&&(r=A),b>d&&(d=b);r=Math.max(r-l,d-y)}h(p,q,c,l,y,r);return q}function e(a,b,g,c,d){var f;if(d===0=b;d-=c)f=v(d,a[d],a[d+1],f); f&&q(f,f.next)&&(w(f),f=f.next);return f}function n(a,b){if(!a)return a;b||(b=a);var d,f=0,e=g*g/2;do{d=!1;if(a.steiner||!q(a,a.next)&&0!==c(a.prev,a,a.next))a=a.next;else{w(a);a=b=a.prev;if(a===a.next)return null;d=!0}if(f++>e)return u=!0,null}while(d||a!==b);return b}function h(b,g,f,e,p,k,y){if(b){if(!y&&k){var t=b,m=t;do null===m.z&&(m.z=a(m.x,m.y,e,p,k)),m.prevZ=m.prev,m=m.nextZ=m.next;while(m!==t);m.prevZ.nextZ=null;m.prevZ=null;var t=m,A,v,B,C,F,D,H=1;do{m=t;B=t=null;for(C=0;m;){C++;v=m;for(A= F=0;AF.x?C.x>H.x?C.x:H.x:F.x>H.x?F.x:H.x,U=C.y>F.y?C.y>H.y?C.y:H.y:F.y>H.y?F.y:H.y;A=a(C.x=A;){if(Q!==B.prev&&Q!==B.next&&d(C.x,C.y,F.x,F.y,H.x,H.y,Q.x,Q.y)&&0<=c(Q.prev,Q,Q.next)){B=!1;break a}Q=Q.prevZ}B=!0}}else B=l(b);if(B)g.push(m.i/f),g.push(b.i/f),g.push(v.i/f),w(b),t=b=v.next;else{if(u)break;b=v;if(b===t){if(!y)h(n(b),g,f,e,p,k,1);else if(1===y){y=g;t=f;m=b;do v=m.prev,B=m.next.next,!q(v,B)&&r(v, m,m.next,B)&&x(v,B)&&x(B,v)&&(y.push(v.i/t),y.push(m.i/t),y.push(B.i/t),w(m),w(m.next),m=b=B),m=m.next;while(m!==b);b=m;h(b,g,f,e,p,k,2)}else if(2===y)a:{y=b;do{for(t=y.next.next;t!==y.prev;){if(m=y.i!==t.i){m=y;v=t;B=void 0;if(B=m.next.i!==v.i&&m.prev.i!==v.i){B=void 0;b:{B=m;do{if(B.i!==m.i&&B.next.i!==m.i&&B.i!==v.i&&B.next.i!==v.i&&r(B,B.next,m,v)){B=!0;break b}B=B.next}while(B!==m);B=!1}B=!B}C=void 0;if(C=B&&x(m,v)&&x(v,m)){B=m;C=!1;F=(m.x+v.x)/2;v=(m.y+v.y)/2;do B.y>v!==B.next.y>v&&F<(B.next.x- B.x)*(v-B.y)/(B.next.y-B.y)+B.x&&(C=!C),B=B.next;while(B!==m)}m=C}if(m){b=z(y,t);y=n(y,y.next);b=n(b,b.next);h(y,g,f,e,p,k);h(b,g,f,e,p,k);break a}t=t.next}y=y.next}while(y!==b)}break}}}}}function l(a){var b=a.prev,f=a.next;if(0<=c(b,a,f))return!1;for(var e=a.next.next,h=0;e!==a.prev;){if(d(b.x,b.y,a.x,a.y,f.x,f.y,e.x,e.y)&&0<=c(e.prev,e,e.next))return!1;e=e.next;if(h++>g)return u=!0,!1}return!0}function m(a,b){return a.x-b.x}function k(a,b){var g=b,c=a.x,f=a.y,e=-Infinity,h;do{if(!g)return null; if(f<=g.y&&f>=g.next.y){var u=g.x+(f-g.y)*(g.next.x-g.x)/(g.next.y-g.y);if(u<=c&&u>e){e=u;if(u===c){if(f===g.y)return g;if(f===g.next.y)return g.next}h=g.x=g.x&&g.x>=u&&d(fh.x)&&x(g,a)&&(h=g,p=k)),g=g.next;return h}function a(a,b,g,c,d){a=32767*(a-g)/d;b=32767*(b-c)/d;a=(a|a<<8)&16711935; a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function f(a){var b=a,g=a;do b.xc(a.prev,a,a.next)?0<=c(a,b,a.next)&&0<=c(a,a.prev,b):0>c(a,b,a.prev)||0>c(a,a.next,b)}function z(a,b){var g=new p(a.i,a.x,a.y),c=new p(b.i,b.x,b.y),d=a.next,f=b.prev;a.next=b;b.prev=a;g.next=d;d.prev=g;c.next=g;g.prev=c;f.next=c;c.prev=f;return c}function v(a,b,g,c){a=new p(a,b,g);c?(a.next=c.next,a.prev=c,c.next.prev=a,c.next=a):(a.prev=a,a.next=a);return a}function w(a){a.next.prev=a.prev;a.prev.next=a.next; a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function p(a,b,g){this.i=a;this.x=b;this.y=g;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function y(a,b,g,c){for(var d=0,f=g-c;b=e)return b[0];for(var k=b.length,a=0,f=0;fz&&m.length>z&&e&&(c+=l[0]*m[z]-m[0]*l[z])}return 0>=f&&0>=d&&0>=c}})},"esri/geometry/support/meshUtils/centerAt":function(){define("require exports ../../../core/Logger ./projection ../../../views/3d/lib/gl-matrix ../../../views/3d/support/projectionUtils".split(" "),function(b,e,n,h,l,m){Object.defineProperty(e,"__esModule",{value:!0});var k=n.getLogger("esri.geometry.support.meshUtils.centerAt");e.centerAt=function(b,e,x){if(b.vertexAttributes&&b.vertexAttributes.position){var q= b.spatialReference,r=x&&x.origin||b.extent.center;if(q.isWGS84||q.isWebMercator&&(!x||!1!==x.geographic)){x=b.spatialReference;var q=f,n=a;if(m.pointToVector(e,n,m.SphericalECEFSpatialReference)){m.pointToVector(r,q,m.SphericalECEFSpatialReference)||m.pointToVector(b.extent.center,q,m.SphericalECEFSpatialReference);r=b.vertexAttributes.position;e=b.vertexAttributes.normal;var p=new Float64Array(r.length),y=new Float32Array(e?e.length:0);h.projectToECEF(r,x,p);e&&h.projectNormalToECEF(e,r,p,x,y);m.computeLinearTransformation(m.SphericalECEFSpatialReference, q,d,m.SphericalECEFSpatialReference);m.computeLinearTransformation(m.SphericalECEFSpatialReference,n,c,m.SphericalECEFSpatialReference);l.mat4d.inverse(d);l.mat4d.multiply(c,d,c);h.transformBufferInPlace(p,c);l.mat4d.inverse(c);l.mat4d.transpose(c);e&&h.transformBufferInPlace(y,c,!0);h.projectFromECEF(p,r,x);e&&h.projectNormalFromECEF(y,r,p,x,e);b.clearCache()}else k.error("Failed to project centerAt location (wkid:"+e.spatialReference.wkid+") to ECEF")}else if(x=f,q=a,m.pointToVector(e,q,b.spatialReference)){m.pointToVector(r, x,b.spatialReference)||(e=b.extent.center,x[0]=e.x,x[1]=e.y,x[2]=e.z,k.error("Failed to project specified origin (wkid:"+r.spatialReference.wkid+") to mesh spatial reference (wkid:"+b.spatialReference.wkid+"). Using mesh extent.center instead"));if(r=b.vertexAttributes.position)for(e=0;en;n++)r[e+n]+=q[n]-x[n];b.clearCache()}else k.error("Failed to project centerAt location (wkid:"+e.spatialReference.wkid+") to mesh spatial reference (wkid:"+b.spatialReference.wkid+")")}}; var a=l.vec3d.create(),f=l.vec3d.create(),d=l.mat4d.create(),c=l.mat4d.create()})},"esri/geometry/support/meshUtils/projection":function(){define(["require","exports","../../../core/Logger","../../../views/3d/lib/gl-matrix","../../../views/3d/support/projectionUtils"],function(b,e,n,h,l){function m(b,e,k,m,v,n){if(e){v=v.isWGS84;for(var p=0;pq;q++)a[q]=m[p+q],f[q]=e[p+q];l.computeLinearTransformation(l.SphericalECEFSpatialReference,a,d,l.SphericalECEFSpatialReference); h.mat4d.toMat3(d,c);v?h.mat3d.multiplyVec3(c,f):(q=l.webMercator.y2lat(k[p+1]),q=Math.cos(q),0===b&&(q=1/q),c[0]*=q,c[1]*=q,c[2]*=q,c[3]*=q,c[4]*=q,c[5]*=q,1===b&&h.mat3d.transpose(c),h.mat3d.multiplyVec3(c,f),h.vec3d.normalize(f));for(q=0;3>q;q++)n[p+q]=f[q]}return n}}Object.defineProperty(e,"__esModule",{value:!0});var k=n.getLogger("esri.geometry.support.meshUtils.normalProjection");e.projectNormalToECEF=function(a,b,c,d,f){return d.isWebMercator||d.isWGS84?m(0,a,b,c,d,f):(k.error("Cannot convert PCS spatial reference buffer to ECEF"), f)};e.projectNormalFromECEF=function(a,b,c,d,f){return d.isWebMercator||d.isWGS84?m(1,a,b,c,d,f):(k.error("Cannot convert to PCS spatial reference buffer from ECEF"),f)};e.projectToECEF=function(a,b,c){l.bufferToBuffer(a,b,0,c,l.SphericalECEFSpatialReference,0,a.length/3);return c};e.projectFromECEF=function(a,b,c){l.bufferToBuffer(a,l.SphericalECEFSpatialReference,0,b,c,0,a.length/3);return b};e.transformBufferInPlace=function(b,c,d){void 0===d&&(d=!1);if(b)for(var f=0;fe;e++)a[e]=b[f+e];h.mat4d.multiplyVec3(c,a);d&&h.vec3d.normalize(a);for(e=0;3>e;e++)b[f+e]=a[e]}};var a=h.vec3d.create(),f=h.vec3d.create(),d=h.mat4d.create(),c=h.mat3d.create()})},"esri/views/3d/lib/gl-matrix":function(){define([],function(){var b={};(function(b,n){n(b,!0);n(b,!1)})(b,function(b,n){var e={};(function(){if("undefined"!=typeof Float32Array){var a=new Float32Array(1),b=new Int32Array(a.buffer);e.invsqrt=function(g){a[0]=g;b[0]=1597463007-(b[0]>>1);var c=a[0];return c*(1.5-.5*g* c*c)}}else e.invsqrt=function(a){return 1/Math.sqrt(a)}})();var l=Array;"undefined"!=typeof Float32Array&&(l=n?Float32Array:Array);var m={create:function(a){var b=new l(3);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2]):b[0]=b[1]=b[2]=0;return b},createFrom:function(a,b,c){var g=new l(3);g[0]=a;g[1]=b;g[2]=c;return g},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b},set3:function(a,b,c,d){d[0]=a;d[1]=b;d[2]=c;return d},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&& 1E-6>Math.abs(a[2]-b[2])},max:function(a,b,c){c[0]=Math.max(a[0],b[0]);c[1]=Math.max(a[1],b[1]);c[2]=Math.max(a[2],b[2]);return c},min:function(a,b,c){c[0]=Math.min(a[0],b[0]);c[1]=Math.min(a[1],b[1]);c[2]=Math.min(a[2],b[2]);return c},add:function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];return c},subtract:function(a,b,c){if(!c||a===c)return a[0]-=b[0],a[1]-=b[1],a[2]-=b[2],a;c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c}, multiply:function(a,b,c){if(!c||a===c)return a[0]*=b[0],a[1]*=b[1],a[2]*=b[2],a;c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b},scale:function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c},normalize:function(a,b){b||(b=a);var g=a[0],c=a[1];a=a[2];var d=Math.sqrt(g*g+c*c+a*a);if(!d)return b[0]=0,b[1]=0,b[2]=0,b;if(1===d)return b[0]=g,b[1]=c,b[2]=a,b;d=1/d;b[0]=g*d;b[1]= c*d;b[2]=a*d;return b},cross:function(a,b,c){c||(c=a);var g=a[0],d=a[1];a=a[2];var f=b[0],e=b[1];b=b[2];c[0]=d*b-a*e;c[1]=a*f-g*b;c[2]=g*e-d*f;return c},length:function(a){var b=a[0],g=a[1];a=a[2];return Math.sqrt(b*b+g*g+a*a)},length2:function(a){var b=a[0],g=a[1];a=a[2];return b*b+g*g+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},direction:function(a,b,c){c||(c=a);var g=a[0]-b[0],d=a[1]-b[1];a=a[2]-b[2];b=Math.sqrt(g*g+d*d+a*a);if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/b;c[0]=g*b;c[1]= d*b;c[2]=a*b;return c},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);return d},dist:function(a,b){var g=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return Math.sqrt(g*g+c*c+a*a)},dist2:function(a,b){var g=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return g*g+c*c+a*a}},k=null,a=new l(4);m.unproject=function(b,c,d,f,e){e||(e=b);k||(k=v.create());var g=k;a[0]=2*(b[0]-f[0])/f[2]-1;a[1]=2*(b[1]-f[1])/f[3]-1;a[2]=2*b[2]-1;a[3]=1;v.multiply(d,c,g);if(!v.inverse(g))return null; v.multiplyVec4(g,a);if(0===a[3])return null;e[0]=a[0]/a[3];e[1]=a[1]/a[3];e[2]=a[2]/a[3];return e};var f=m.createFrom(1,0,0),d=m.createFrom(0,1,0),c=m.createFrom(0,0,1),q=m.create();m.rotationTo=function(a,b,e){e||(e=w.create());var g=m.dot(a,b);if(1<=g)w.set(p,e);else if(-.999999>g)m.cross(f,a,q),1E-6>m.length(q)&&m.cross(d,a,q),1E-6>m.length(q)&&m.cross(c,a,q),m.normalize(q),w.fromAngleAxis(Math.PI,q,e);else{var g=Math.sqrt(2*(1+g)),h=1/g;m.cross(a,b,q);e[0]=q[0]*h;e[1]=q[1]*h;e[2]=q[2]*h;e[3]= .5*g;w.normalize(e)}1e[3]&&(e[3]=-1);return e};var r=m.create(),x=m.create();m.project=function(a,b,c,d){d||(d=a);m.direction(b,c,r);m.subtract(a,b,x);a=m.dot(r,x);m.scale(r,a,d);m.add(d,b,d)};m.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var z={create:function(a){var b=new l(9);a?(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[6]=a[6],b[7]=a[7],b[8]=a[8]):b[0]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=0;return b},createFrom:function(a,b,c,d,f,e,h,p,k){var g= new l(9);g[0]=a;g[1]=b;g[2]=c;g[3]=d;g[4]=f;g[5]=e;g[6]=h;g[7]=p;g[8]=k;return g},add:function(a,b,c){c||(c=a);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];c[4]=a[4]+b[4];c[5]=a[5]+b[5];c[6]=a[6]+b[6];c[7]=a[7]+b[7];c[8]=a[8]+b[8];return c},subtract:function(a,b,c){c||(c=a);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];c[4]=a[4]-b[4];c[5]=a[5]-b[5];c[6]=a[6]-b[6];c[7]=a[7]-b[7];c[8]=a[8]-b[8];return c},determinant:function(a){var b=a[3],g=a[4],c=a[5],d=a[6],f=a[7],e=a[8]; return a[0]*(e*g-c*f)+a[1]*(-e*b+c*d)+a[2]*(f*b-g*d)},inverse:function(a,b){var g=a[0],c=a[1],d=a[2],f=a[3],e=a[4],h=a[5],u=a[6],p=a[7];a=a[8];var k=a*e-h*p,q=-a*f+h*u,l=p*f-e*u,m=g*k+c*q+d*l;if(!m)return null;m=1/m;b||(b=z.create());b[0]=k*m;b[1]=(-a*c+d*p)*m;b[2]=(h*c-d*e)*m;b[3]=q*m;b[4]=(a*g-d*u)*m;b[5]=(-h*g+d*f)*m;b[6]=l*m;b[7]=(-p*g+c*u)*m;b[8]=(e*g-c*f)*m;return b},multiply:function(a,b,c){c||(c=a);var g=a[0],d=a[1],f=a[2],e=a[3],h=a[4],u=a[5],p=a[6],t=a[7];a=a[8];var k=b[0],q=b[1],l=b[2], m=b[3],y=b[4],r=b[5],x=b[6],z=b[7];b=b[8];c[0]=k*g+q*e+l*p;c[1]=k*d+q*h+l*t;c[2]=k*f+q*u+l*a;c[3]=m*g+y*e+r*p;c[4]=m*d+y*h+r*t;c[5]=m*f+y*u+r*a;c[6]=x*g+z*e+b*p;c[7]=x*d+z*h+b*t;c[8]=x*f+z*u+b*a;return c},multiplyVec2:function(a,b,c){c||(c=b);var g=b[0];b=b[1];c[0]=g*a[0]+b*a[3]+a[6];c[1]=g*a[1]+b*a[4]+a[7];return c},multiplyVec3:function(a,b,c){c||(c=b);var g=b[0],d=b[1];b=b[2];c[0]=g*a[0]+d*a[3]+b*a[6];c[1]=g*a[1]+d*a[4]+b*a[7];c[2]=g*a[2]+d*a[5]+b*a[8];return c},set:function(a,b){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[6]=a[6];b[7]=a[7];b[8]=a[8];return b},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])&&1E-6>Math.abs(a[4]-b[4])&&1E-6>Math.abs(a[5]-b[5])&&1E-6>Math.abs(a[6]-b[6])&&1E-6>Math.abs(a[7]-b[7])&&1E-6>Math.abs(a[8]-b[8])},identity:function(a){a||(a=z.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,b){if(!b||a===b){b= a[1];var g=a[2],c=a[5];a[1]=a[3];a[2]=a[6];a[3]=b;a[5]=a[7];a[6]=g;a[7]=c;return a}b[0]=a[0];b[1]=a[3];b[2]=a[6];b[3]=a[1];b[4]=a[4];b[5]=a[7];b[6]=a[2];b[7]=a[5];b[8]=a[8];return b},toMat4:function(a,b){b||(b=v.create());b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=a[8];b[9]=a[7];b[8]=a[6];b[7]=0;b[6]=a[5];b[5]=a[4];b[4]=a[3];b[3]=0;b[2]=a[2];b[1]=a[1];b[0]=a[0];return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},v={create:function(a){var b= new l(16);4===arguments.length?(b[0]=arguments[0],b[1]=arguments[1],b[2]=arguments[2],b[3]=arguments[3],b[4]=arguments[4],b[5]=arguments[5],b[6]=arguments[6],b[7]=arguments[7],b[8]=arguments[8],b[9]=arguments[9],b[10]=arguments[10],b[11]=arguments[11],b[12]=arguments[12],b[13]=arguments[13],b[14]=arguments[14],b[15]=arguments[15]):a&&(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[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]= a[15]);return b},createFrom:function(a,b,c,d,f,e,h,p,k,q,m,y,r,x,z,v){var g=new l(16);g[0]=a;g[1]=b;g[2]=c;g[3]=d;g[4]=f;g[5]=e;g[6]=h;g[7]=p;g[8]=k;g[9]=q;g[10]=m;g[11]=y;g[12]=r;g[13]=x;g[14]=z;g[15]=v;return g},createFromMatrixRowMajor:function(a){var b=new l(16);b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]=a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},createFromMatrix:function(a){var b=new l(16);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[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},set:function(a,b){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[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},setRowMajor:function(a,b){b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]= a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])&&1E-6>Math.abs(a[4]-b[4])&&1E-6>Math.abs(a[5]-b[5])&&1E-6>Math.abs(a[6]-b[6])&&1E-6>Math.abs(a[7]-b[7])&&1E-6>Math.abs(a[8]-b[8])&&1E-6>Math.abs(a[9]-b[9])&&1E-6>Math.abs(a[10]-b[10])&&1E-6>Math.abs(a[11]-b[11])&&1E-6>Math.abs(a[12]-b[12])&&1E-6>Math.abs(a[13]-b[13])&&1E-6>Math.abs(a[14]-b[14])&& 1E-6>Math.abs(a[15]-b[15])},identity:function(a){a||(a=v.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,b){if(!b||a===b){b=a[1];var g=a[2],c=a[3],d=a[6],f=a[7],e=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=b;a[6]=a[9];a[7]=a[13];a[8]=g;a[9]=d;a[11]=a[14];a[12]=c;a[13]=f;a[14]=e;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]= a[10];b[11]=a[14];b[12]=a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b},determinant:function(a){var b=a[0],g=a[1],c=a[2],d=a[3],f=a[4],e=a[5],h=a[6],p=a[7],k=a[8],q=a[9],l=a[10],m=a[11],y=a[12],r=a[13],x=a[14];a=a[15];return y*q*h*d-k*r*h*d-y*e*l*d+f*r*l*d+k*e*x*d-f*q*x*d-y*q*c*p+k*r*c*p+y*g*l*p-b*r*l*p-k*g*x*p+b*q*x*p+y*e*c*m-f*r*c*m-y*g*h*m+b*r*h*m+f*g*x*m-b*e*x*m-k*e*c*a+f*q*c*a+k*g*h*a-b*q*h*a-f*g*l*a+b*e*l*a},inverse:function(a,b){b||(b=a);var g=a[0],c=a[1],d=a[2],f=a[3],e=a[4],h=a[5],p=a[6], k=a[7],u=a[8],q=a[9],l=a[10],m=a[11],y=a[12],r=a[13],x=a[14];a=a[15];var z=g*h-c*e,v=g*p-d*e,n=g*k-f*e,w=c*p-d*h,U=c*k-f*h,Y=d*k-f*p,N=u*r-q*y,T=u*x-l*y,ba=u*a-m*y,fa=q*x-l*r,la=q*a-m*r,pa=l*a-m*x,ha=z*pa-v*la+n*fa+w*ba-U*T+Y*N;if(!ha)return null;ha=1/ha;b[0]=(h*pa-p*la+k*fa)*ha;b[1]=(-c*pa+d*la-f*fa)*ha;b[2]=(r*Y-x*U+a*w)*ha;b[3]=(-q*Y+l*U-m*w)*ha;b[4]=(-e*pa+p*ba-k*T)*ha;b[5]=(g*pa-d*ba+f*T)*ha;b[6]=(-y*Y+x*n-a*v)*ha;b[7]=(u*Y-l*n+m*v)*ha;b[8]=(e*la-h*ba+k*N)*ha;b[9]=(-g*la+c*ba-f*N)*ha;b[10]=(y* U-r*n+a*z)*ha;b[11]=(-u*U+q*n-m*z)*ha;b[12]=(-e*fa+h*T-p*N)*ha;b[13]=(g*fa-c*T+d*N)*ha;b[14]=(-y*w+r*v-x*z)*ha;b[15]=(u*w-q*v+l*z)*ha;return b},toRotationMat:function(a,b){b||(b=v.create());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[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},toMat3:function(a,b){b||(b=z.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b},toInverseMat3:function(a, b){var g=a[0],c=a[1],d=a[2],f=a[4],e=a[5],h=a[6],p=a[8],k=a[9];a=a[10];var q=a*e-h*k,u=-a*f+h*p,l=k*f-e*p,m=g*q+c*u+d*l;if(!m)return null;m=1/m;b||(b=z.create());b[0]=q*m;b[1]=(-a*c+d*k)*m;b[2]=(h*c-d*e)*m;b[3]=u*m;b[4]=(a*g-d*p)*m;b[5]=(-h*g+d*f)*m;b[6]=l*m;b[7]=(-k*g+c*p)*m;b[8]=(e*g-c*f)*m;return b},multiply:function(a,b,c){c||(c=a);var g=a[0],d=a[1],f=a[2],e=a[3],h=a[4],p=a[5],k=a[6],t=a[7],q=a[8],u=a[9],l=a[10],m=a[11],y=a[12],r=a[13],x=a[14];a=a[15];var z=b[0],v=b[1],n=b[2],w=b[3];c[0]=z*g+ v*h+n*q+w*y;c[1]=z*d+v*p+n*u+w*r;c[2]=z*f+v*k+n*l+w*x;c[3]=z*e+v*t+n*m+w*a;z=b[4];v=b[5];n=b[6];w=b[7];c[4]=z*g+v*h+n*q+w*y;c[5]=z*d+v*p+n*u+w*r;c[6]=z*f+v*k+n*l+w*x;c[7]=z*e+v*t+n*m+w*a;z=b[8];v=b[9];n=b[10];w=b[11];c[8]=z*g+v*h+n*q+w*y;c[9]=z*d+v*p+n*u+w*r;c[10]=z*f+v*k+n*l+w*x;c[11]=z*e+v*t+n*m+w*a;z=b[12];v=b[13];n=b[14];w=b[15];c[12]=z*g+v*h+n*q+w*y;c[13]=z*d+v*p+n*u+w*r;c[14]=z*f+v*k+n*l+w*x;c[15]=z*e+v*t+n*m+w*a;return c},multiplyVec3:function(a,b,c){c||(c=b);var g=b[0],d=b[1];b=b[2];c[0]= a[0]*g+a[4]*d+a[8]*b+a[12];c[1]=a[1]*g+a[5]*d+a[9]*b+a[13];c[2]=a[2]*g+a[6]*d+a[10]*b+a[14];return c},multiplyVec4:function(a,b,c){c||(c=b);var g=b[0],d=b[1],f=b[2];b=b[3];c[0]=a[0]*g+a[4]*d+a[8]*f+a[12]*b;c[1]=a[1]*g+a[5]*d+a[9]*f+a[13]*b;c[2]=a[2]*g+a[6]*d+a[10]*f+a[14]*b;c[3]=a[3]*g+a[7]*d+a[11]*f+a[15]*b;return c},translate:function(a,b,c){var g=b[0],d=b[1];b=b[2];var f,e,h,p,k,t,q,u,l,m,y,r;if(!c||a===c)return a[12]=a[0]*g+a[4]*d+a[8]*b+a[12],a[13]=a[1]*g+a[5]*d+a[9]*b+a[13],a[14]=a[2]*g+a[6]* d+a[10]*b+a[14],a[15]=a[3]*g+a[7]*d+a[11]*b+a[15],a;f=a[0];e=a[1];h=a[2];p=a[3];k=a[4];t=a[5];q=a[6];u=a[7];l=a[8];m=a[9];y=a[10];r=a[11];c[0]=f;c[1]=e;c[2]=h;c[3]=p;c[4]=k;c[5]=t;c[6]=q;c[7]=u;c[8]=l;c[9]=m;c[10]=y;c[11]=r;c[12]=f*g+k*d+l*b+a[12];c[13]=e*g+t*d+m*b+a[13];c[14]=h*g+q*d+y*b+a[14];c[15]=p*g+u*d+r*b+a[15];return c},scale:function(a,b,c){var g=b[0],d=b[1];b=b[2];if(!c||a===c)return a[0]*=g,a[1]*=g,a[2]*=g,a[3]*=g,a[4]*=d,a[5]*=d,a[6]*=d,a[7]*=d,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;c[0]= a[0]*g;c[1]=a[1]*g;c[2]=a[2]*g;c[3]=a[3]*g;c[4]=a[4]*d;c[5]=a[5]*d;c[6]=a[6]*d;c[7]=a[7]*d;c[8]=a[8]*b;c[9]=a[9]*b;c[10]=a[10]*b;c[11]=a[11]*b;c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},maxScale:function(a){return Math.max(Math.max(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8]),Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])),Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))},rotate:function(a,b,c,d){var g=c[0],f=c[1];c=c[2];var e=Math.sqrt(g*g+f*f+c*c),h,p,k,q,t,u,l,m,y,r,x,z,v,A,n,w,N,T,ba,fa;if(!e)return null; 1!==e&&(e=1/e,g*=e,f*=e,c*=e);h=Math.sin(b);p=Math.cos(b);k=1-p;b=a[0];e=a[1];q=a[2];t=a[3];u=a[4];l=a[5];m=a[6];y=a[7];r=a[8];x=a[9];z=a[10];v=a[11];A=g*g*k+p;n=f*g*k+c*h;w=c*g*k-f*h;N=g*f*k-c*h;T=f*f*k+p;ba=c*f*k+g*h;fa=g*c*k+f*h;g=f*c*k-g*h;f=c*c*k+p;d?a!==d&&(d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]):d=a;d[0]=b*A+u*n+r*w;d[1]=e*A+l*n+x*w;d[2]=q*A+m*n+z*w;d[3]=t*A+y*n+v*w;d[4]=b*N+u*T+r*ba;d[5]=e*N+l*T+x*ba;d[6]=q*N+m*T+z*ba;d[7]=t*N+y*T+v*ba;d[8]=b*fa+u*g+r*f;d[9]=e*fa+l*g+x*f;d[10]=q* fa+m*g+z*f;d[11]=t*fa+y*g+v*f;return d},rotateX:function(a,b,c){var g=Math.sin(b);b=Math.cos(b);var d=a[4],f=a[5],e=a[6],h=a[7],p=a[8],k=a[9],q=a[10],t=a[11];c?a!==c&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[4]=d*b+p*g;c[5]=f*b+k*g;c[6]=e*b+q*g;c[7]=h*b+t*g;c[8]=d*-g+p*b;c[9]=f*-g+k*b;c[10]=e*-g+q*b;c[11]=h*-g+t*b;return c},rotateY:function(a,b,c){var g=Math.sin(b);b=Math.cos(b);var d=a[0],f=a[1],e=a[2],h=a[3],p=a[8],k=a[9],q=a[10],t=a[11];c? a!==c&&(c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*b+p*-g;c[1]=f*b+k*-g;c[2]=e*b+q*-g;c[3]=h*b+t*-g;c[8]=d*g+p*b;c[9]=f*g+k*b;c[10]=e*g+q*b;c[11]=h*g+t*b;return c},rotateZ:function(a,b,c){var g=Math.sin(b);b=Math.cos(b);var d=a[0],f=a[1],e=a[2],h=a[3],p=a[4],k=a[5],q=a[6],t=a[7];c?a!==c&&(c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=d*b+p*g;c[1]=f*b+k*g;c[2]=e*b+q*g;c[3]=h*b+t*g;c[4]= d*-g+p*b;c[5]=f*-g+k*b;c[6]=e*-g+q*b;c[7]=h*-g+t*b;return c},frustum:function(a,b,c,d,f,e,h){h||(h=v.create());var g=b-a,p=d-c,k=e-f;h[0]=2*f/g;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2*f/p;h[6]=0;h[7]=0;h[8]=(b+a)/g;h[9]=(d+c)/p;h[10]=-(e+f)/k;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(e*f*2)/k;h[15]=0;return h},perspective:function(a,b,c,d,f){a=c*Math.tan(a*Math.PI/360);b*=a;return v.frustum(-b,b,-a,a,c,d,f)},ortho:function(a,b,c,d,f,e,h){h||(h=v.create());var g=b-a,p=d-c,k=e-f;h[0]=2/g;h[1]=0;h[2]=0;h[3]=0;h[4]= 0;h[5]=2/p;h[6]=0;h[7]=0;h[8]=0;h[9]=0;h[10]=-2/k;h[11]=0;h[12]=-(a+b)/g;h[13]=-(d+c)/p;h[14]=-(e+f)/k;h[15]=1;return h},lookAt:function(a,b,c,d){d||(d=v.create());var g,f,e,h,p,k,q,t,l=a[0],u=a[1];a=a[2];e=c[0];h=c[1];f=c[2];q=b[0];c=b[1];g=b[2];if(l===q&&u===c&&a===g)return v.identity(d);b=l-q;c=u-c;q=a-g;t=1/Math.sqrt(b*b+c*c+q*q);b*=t;c*=t;q*=t;g=h*q-f*c;f=f*b-e*q;e=e*c-h*b;(t=Math.sqrt(g*g+f*f+e*e))?(t=1/t,g*=t,f*=t,e*=t):e=f=g=0;h=c*e-q*f;p=q*g-b*e;k=b*f-c*g;(t=Math.sqrt(h*h+p*p+k*k))?(t=1/ t,h*=t,p*=t,k*=t):k=p=h=0;d[0]=g;d[1]=h;d[2]=b;d[3]=0;d[4]=f;d[5]=p;d[6]=c;d[7]=0;d[8]=e;d[9]=k;d[10]=q;d[11]=0;d[12]=-(g*l+f*u+e*a);d[13]=-(h*l+p*u+k*a);d[14]=-(b*l+c*u+q*a);d[15]=1;return d},fromRotationTranslation:function(a,b,c){c||(c=v.create());var g=a[0],d=a[1],f=a[2],e=a[3],h=g+g,p=d+d,k=f+f;a=g*h;var q=g*p,g=g*k,t=d*p,d=d*k,f=f*k,h=e*h,p=e*p,e=e*k;c[0]=1-(t+f);c[1]=q+e;c[2]=g-p;c[3]=0;c[4]=q-e;c[5]=1-(a+f);c[6]=d+h;c[7]=0;c[8]=g+p;c[9]=d-h;c[10]=1-(a+t);c[11]=0;c[12]=b[0];c[13]=b[1];c[14]= b[2];c[15]=1;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},w={create:function(a){var b=new l(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,d){var g=new l(4);g[0]=a;g[1]=b;g[2]=c;g[3]=d;return g},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},equal:function(a,b){return a=== b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},identity:function(a){a||(a=w.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},p=w.identity();w.calculateW=function(a,b){var c=a[0],g=a[1],d=a[2];if(!b||a===b)return a[3]=-Math.sqrt(Math.abs(1-c*c-g*g-d*d)),a;b[0]=c;b[1]=g;b[2]=d;b[3]=-Math.sqrt(Math.abs(1-c*c-g*g-d*d));return b};w.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};w.inverse=function(a,b){var c=a[0],g=a[1],d=a[2], f=a[3],c=(c=c*c+g*g+d*d+f*f)?1/c:0;if(!b||a===b)return a[0]*=-c,a[1]*=-c,a[2]*=-c,a[3]*=c,a;b[0]=-a[0]*c;b[1]=-a[1]*c;b[2]=-a[2]*c;b[3]=a[3]*c;return b};w.conjugate=function(a,b){if(!b||a===b)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b};w.length=function(a){var b=a[0],c=a[1],g=a[2];a=a[3];return Math.sqrt(b*b+c*c+g*g+a*a)};w.normalize=function(a,b){b||(b=a);var c=a[0],g=a[1],d=a[2];a=a[3];var f=Math.sqrt(c*c+g*g+d*d+a*a);if(0===f)return b[0]=0,b[1]=0,b[2]= 0,b[3]=0,b;f=1/f;b[0]=c*f;b[1]=g*f;b[2]=d*f;b[3]=a*f;return b};w.add=function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a[3]+=b[3],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c};w.multiply=function(a,b,c){c||(c=a);var g=a[0],d=a[1],f=a[2];a=a[3];var e=b[0],h=b[1],p=b[2];b=b[3];c[0]=g*b+a*e+d*p-f*h;c[1]=d*b+a*h+f*e-g*p;c[2]=f*b+a*p+g*h-d*e;c[3]=a*b-g*e-d*h-f*p;return c};w.multiplyVec3=function(a,b,c){c||(c=b);var g=b[0],d=b[1],f=b[2];b=a[0];var e=a[1],h=a[2]; a=a[3];var p=a*g+e*f-h*d,k=a*d+h*g-b*f,q=a*f+b*d-e*g,g=-b*g-e*d-h*f;c[0]=p*a+g*-b+k*-h-q*-e;c[1]=k*a+g*-e+q*-b-p*-h;c[2]=q*a+g*-h+p*-e-k*-b;return c};w.scale=function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a[3]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c};w.toMat3=function(a,b){b||(b=z.create());var c=a[0],g=a[1],d=a[2],f=a[3],e=c+c,h=g+g,p=d+d;a=c*e;var k=c*h,c=c*p,q=g*h,g=g*p,d=d*p,e=f*e,h=f*h,f=f*p;b[0]=1-(q+d);b[1]=k+f;b[2]=c-h;b[3]=k-f;b[4]=1-(a+d);b[5]=g+e;b[6]= c+h;b[7]=g-e;b[8]=1-(a+q);return b};w.toMat4=function(a,b){b||(b=v.create());var c=a[0],g=a[1],d=a[2],f=a[3],e=c+c,h=g+g,p=d+d;a=c*e;var k=c*h,c=c*p,q=g*h,g=g*p,d=d*p,e=f*e,h=f*h,f=f*p;b[0]=1-(q+d);b[1]=k+f;b[2]=c-h;b[3]=0;b[4]=k-f;b[5]=1-(a+d);b[6]=g+e;b[7]=0;b[8]=c+h;b[9]=g-e;b[10]=1-(a+q);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};w.slerp=function(a,b,c,d){d||(d=a);var g=a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3],f,e;if(1<=Math.abs(g))return d!==a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[3]), d;f=Math.acos(g);e=Math.sqrt(1-g*g);if(.001>Math.abs(e))return d[0]=.5*a[0]+.5*b[0],d[1]=.5*a[1]+.5*b[1],d[2]=.5*a[2]+.5*b[2],d[3]=.5*a[3]+.5*b[3],d;g=Math.sin((1-c)*f)/e;c=Math.sin(c*f)/e;d[0]=a[0]*g+b[0]*c;d[1]=a[1]*g+b[1]*c;d[2]=a[2]*g+b[2]*c;d[3]=a[3]*g+b[3]*c;return d};w.fromRotationMatrix=function(a,b){b||(b=w.create());var c=a[0]+a[4]+a[8],g;if(0a[0]&&(c=1);a[8]>a[3*c+c]&&(c=2);var d=g[c],f=g[d];g=Math.sqrt(a[3*c+c]-a[3*d+d]-a[3*f+f]+1);b[c]=.5*g;g=.5/g;b[3]=(a[3*f+d]-a[3*d+f])*g;b[d]=(a[3*d+c]+a[3*c+d])*g;b[f]=(a[3*f+c]+a[3*c+f])*g}return b};z.toQuat4=w.fromRotationMatrix;(function(){var a=z.create();w.fromAxes=function(b,c,g,d){a[0]=c[0];a[3]=c[1];a[6]=c[2];a[1]=g[0];a[4]=g[1];a[7]=g[2];a[2]=b[0];a[5]=b[1];a[8]=b[2];return w.fromRotationMatrix(a,d)}})();w.identity=function(a){a||(a=w.create());a[0]=0;a[1]=0;a[2]=0;a[3]= 1;return a};w.fromAngleAxis=function(a,b,c){c||(c=w.create());a*=.5;var g=Math.sin(a);c[3]=Math.cos(a);c[0]=g*b[0];c[1]=g*b[1];c[2]=g*b[2];return c};w.toAngleAxis=function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},identity:function(a){a||(a=y.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b)return b=a[1],a[1]=a[2],a[2]=b,a;b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b}, determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],g=a[1],d=a[2];a=a[3];var f=c*a-d*g;if(!f)return null;f=1/f;b[0]=a*f;b[1]=-g*f;b[2]=-d*f;b[3]=c*f;return b},multiply:function(a,b,c){c||(c=a);var g=a[0],d=a[1],f=a[2];a=a[3];c[0]=g*b[0]+d*b[2];c[1]=g*b[1]+d*b[3];c[2]=f*b[0]+a*b[2];c[3]=f*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var g=a[0],d=a[1],f=a[2];a=a[3];var e=Math.sin(b);b=Math.cos(b);c[0]=g*b+d*e;c[1]=g*-e+d*b;c[2]=f*b+a*e;c[3]=f*-e+a* b;return c},multiplyVec2:function(a,b,c){c||(c=b);var g=b[0];b=b[1];c[0]=g*a[0]+b*a[1];c[1]=g*a[2]+b*a[3];return c},scale:function(a,b,c){c||(c=a);var g=a[1],d=a[2],f=a[3],e=b[0];b=b[1];c[0]=a[0]*e;c[1]=g*b;c[2]=d*e;c[3]=f*b;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};n=n?"":"d";b["glMath"+n]=e;b["vec2"+n]={create:function(a){var b=new l(2);a?(b[0]=a[0],b[1]=a[1]):(b[0]=0,b[1]=0);return b},createFrom:function(a,b){var c=new l(2);c[0]=a;c[1]=b;return c},add:function(a, b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;return c},dist:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return Math.sqrt(c*c+a*a)},dist2:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return c*c+a*a},set:function(a,b){b[0]=a[0]; b[1]=a[1];return b},set2:function(a,b,c){c[0]=a;c[1]=b;return c},equal:function(a,b){return a===b||1E-6>Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0Math.abs(a[0]-b[0])&&1E-6>Math.abs(a[1]-b[1])&&1E-6>Math.abs(a[2]-b[2])&&1E-6>Math.abs(a[3]-b[3])},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},length:function(a){var b=a[0],c=a[1],d=a[2];a=a[3];return Math.sqrt(b*b+c*c+ d*d+a*a)},length2:function(a){var b=a[0],c=a[1],d=a[2];a=a[3];return b*b+c*c+d*d+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]},lerp:function(a,b,c,d){d||(d=a);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);d[3]=a[3]+c*(b[3]-a[3]);return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};b["mat2"+n]=y;b["mat3"+n]=z;b["mat4"+n]=v;b["quat4"+n]=w});return b})},"esri/views/3d/support/projectionUtils":function(){define("require exports ../../../geometry/Point ../../../geometry/SpatialReference ../../../geometry/support/aaBoundingRect ../lib/gl-matrix ./earthUtils ./mathUtils ../webgl-engine/lib/BufferVectorMath".split(" "), function(b,e,n,h,l,m,k,a,f){function d(a,b,d,g){2===a.length?(D[0]=a[0],D[1]=a[1],D[2]=0,a=D):a===d&&(m.vec3d.set(a,D),a=D);return c(a,b,0,d,g,0,1)}function c(a,b,c,d,f,e,h){void 0===h&&(h=1);w!==b&&(p=q(b),w=b);y!==f&&(g=q(f),y=f);h=c+3*h;if(p!==g||p===v.UNKNOWN&&!b.equals(f))if(p>v.UNKNOWN&&g>v.UNKNOWN)if(g!==v.WGS84)if(b=u[g],p!==v.WGS84)for(f=t[p];c.9999*Math.PI?Number.MAX_VALUE:1/Math.cos(b)*a[3],!0;return!1};e.extentToBoundingBox=function(a,b,d){if(null==a)return!1;var g;D[0]=null!=a.xmin?a.xmin:0;D[1]=null!=a.ymin?a.ymin:0;D[2]=null!= a.zmin?a.zmin:0;g=c(D,a.spatialReference,0,b,d,0,1);D[0]=null!=a.xmax?a.xmax:0;D[1]=null!=a.ymax?a.ymax:0;D[2]=null!=a.zmax?a.zmax:0;g=g&&c(D,a.spatialReference,0,b,d,3,1);null==a.xmin&&(b[0]=-Infinity);null==a.ymin&&(b[1]=-Infinity);null==a.zmin&&(b[2]=-Infinity);null==a.xmax&&(b[3]=Infinity);null==a.ymax&&(b[4]=Infinity);null==a.zmax&&(b[5]=Infinity);return g};e.extentToBoundingRect=function(a,b,d){if(null==a)return!1;var g;D[0]=null!=a.xmin?a.xmin:0;D[1]=null!=a.ymin?a.ymin:0;D[2]=null!=a.zmin? a.zmin:0;g=c(D,a.spatialReference,0,D,d,0,1);b[0]=D[0];b[1]=D[1];D[0]=null!=a.xmax?a.xmax:0;D[1]=null!=a.ymax?a.ymax:0;D[2]=null!=a.zmax?a.zmax:0;g=g&&c(D,a.spatialReference,0,D,d,0,1);b[2]=D[0];b[3]=D[1];null==a.xmin&&(b[0]=-Infinity);null==a.ymin&&(b[1]=-Infinity);null==a.xmax&&(b[2]=Infinity);null==a.ymax&&(b[3]=Infinity);return g};e.boundingRectToBoundingRect=function(a,b,d,g){if(null==a)return!1;if(b.equals(g))return l.set(d,a),!0;var f;D[0]=a[0];D[1]=a[1];D[2]=0;f=c(D,b,0,D,g,0,1);d[0]=D[0]; d[1]=D[1];D[0]=a[2];D[1]=a[3];D[2]=0;f=f&&c(D,b,0,D,g,0,1);d[2]=D[0];d[3]=D[1];return f};(function(a){a.x2lon=function(a){return a/B};a.y2lat=function(a){return Math.PI/2-2*Math.atan(Math.exp(-1*a/B))};a.lon2x=function(a){return a*B};a.lat2y=function(a){a=Math.sin(a);return B/2*Math.log((1+a)/(1-a))}})(e.webMercator||(e.webMercator={}));var u=[void 0,z,r,x,function(a,b,c,d){var g=F,f=A*a[b],e=A*a[b+1];a=a[b+2];b=Math.sin(e);var e=Math.cos(e),h=g.a/Math.sqrt(1-g.e2*b*b);c[d++]=(h+a)*e*Math.cos(f); c[d++]=(h+a)*e*Math.sin(f);c[d++]=(h*(1-g.e2)+a)*b}],t=[void 0,function(b,c,d,g){var e=f.Vec3Compact.length(b,c),h=a.asin(b[c+2]/e);b=(0a&&(q=-q);c[d++]=C*f;c[d++]=C*q;c[d]=b+p*g/2}],A=a.deg2rad(1),C=a.rad2deg(1),B=k.earthRadius,F={a:6378137,e2:.006694379990137799,a1:42697.67270715754,a2:1.8230912546075456E9,a3:142.91722289812412,a4:4.557728136518864E9,a5:42840.589930055656,a6:.9933056200098622},D=m.vec3d.create(), H=m.vec3d.create(),aa=m.vec3d.create(),ga=m.vec3d.create(),P=m.vec3d.create()})},"esri/geometry/support/aaBoundingRect":function(){define(["require","exports","../Extent"],function(b,e,n){function h(a){void 0===a&&(a=e.ZERO);return[a[0],a[1],a[2],a[3]]}function l(a){return a[0]>=a[2]?0:a[2]-a[0]}function m(a){return a[1]>=a[3]?0:a[3]-a[1]}function k(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];return a}function a(a){return 4===a.length}function f(a,b,f){return af?f:a}Object.defineProperty(e, "__esModule",{value:!0});e.create=h;e.clone=function(a){return[a[0],a[1],a[2],a[3]]};e.fromValues=function(a,b,f,e,k){void 0===k&&(k=h());k[0]=a;k[1]=b;k[2]=f;k[3]=e;return k};e.fromExtent=function(a,b){void 0===b&&(b=h());b[0]=a.xmin;b[1]=a.ymin;b[2]=a.xmax;b[3]=a.ymax;return b};e.toExtent=function(a,b){return new n({xmin:a[0],ymin:a[1],xmax:a[2],ymax:a[3],spatialReference:b})};e.expandPointInPlace=function(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]= b[1])};e.expand=function(b,c,f){void 0===f&&(f=b);if("length"in c)if(a(c))f[0]=Math.min(b[0],c[0]),f[1]=Math.min(b[1],c[1]),f[2]=Math.max(b[2],c[2]),f[3]=Math.max(b[3],c[3]);else{if(2===c.length||3===c.length)f[0]=Math.min(b[0],c[0]),f[1]=Math.min(b[1],c[1]),f[2]=Math.max(b[2],c[0]),f[3]=Math.max(b[3],c[1])}else switch(c.type){case "extent":f[0]=Math.min(b[0],c.xmin);f[1]=Math.min(b[1],c.ymin);f[2]=Math.max(b[2],c.xmax);f[3]=Math.max(b[3],c.ymax);break;case "point":f[0]=Math.min(b[0],c.x),f[1]=Math.min(b[1], c.y),f[2]=Math.max(b[2],c.x),f[3]=Math.max(b[3],c.y)}return f};e.expandWithNestedArray=function(a,b,f){void 0===f&&(f=a);var c=b.length,d=a[0],e=a[1],h=a[2];a=a[3];for(var k=0;kb;b++)if(!isFinite(a[b]))return!1;return!0};e.width=l;e.height=m;e.diameter=function(a){var b=l(a);a=m(a);return Math.sqrt(b*b+a*a)};e.area=function(a){return l(a)* m(a)};e.center=function(a,b){void 0===b&&(b=[0,0]);b[0]=a[0]+l(a)/2;b[1]=a[1]+m(a)/2;return b};e.containsPoint=function(a,b){return b[0]>=a[0]&&b[1]>=a[1]&&b[0]<=a[2]&&b[1]<=a[3]};e.containsPointWithMargin=function(a,b,f){return b[0]>=a[0]-f&&b[1]>=a[1]-f&&b[0]<=a[2]+f&&b[1]<=a[3]+f};e.intersects=function(a,b){return Math.max(b[0],a[0])<=Math.min(b[2],a[2])&&Math.max(b[1],a[1])<=Math.min(b[3],a[3])};e.contains=function(a,b){return b[0]>=a[0]&&b[2]<=a[2]&&b[1]>=a[1]&&b[3]<=a[3]};e.intersection=function(a, b,e){void 0===e&&(e=a);var c=b[0],d=b[1],h=b[2];b=b[3];e[0]=f(a[0],c,h);e[1]=f(a[1],d,b);e[2]=f(a[2],c,h);e[3]=f(a[3],d,b);return e};e.distance=function(a,b){var c=(a[1]+a[3])/2,d=Math.max(Math.abs(b[0]-(a[0]+a[2])/2)-l(a)/2,0);a=Math.max(Math.abs(b[1]-c)-m(a)/2,0);return Math.sqrt(d*d+a*a)};e.offset=function(a,b,f,e){void 0===e&&(e=a);e[0]=a[0]+b;e[1]=a[1]+f;e[2]=a[2]+b;e[3]=a[3]+f;return e};e.pad=function(a,b,f){void 0===f&&(f=a);f[0]=a[0]-b;f[1]=a[1]-b;f[2]=a[2]+b;f[3]=a[3]+b;return f};e.setMin= function(a,b,f){void 0===f&&(f=a);f[0]=b[0];f[1]=b[1];f!==a&&(f[2]=a[2],f[3]=a[3]);return f};e.setMax=function(a,b,f){void 0===f&&(f=a);f[2]=b[0];f[3]=b[1];f!==a&&(f[0]=a[0],f[1]=a[1]);return a};e.set=k;e.empty=function(a){return a?k(a,e.NEGATIVE_INFINITY):h(e.NEGATIVE_INFINITY)};e.is=a;e.isPoint=function(a){return(0===l(a)||!isFinite(a[0]))&&(0===m(a)||!isFinite(a[1]))};e.equals=function(b,c,f){if(null==b||null==c)return b===c;if(!a(b)||!a(c))return!1;if(f)for(var d=0;da?-1:a)}function l(a){return Math.acos(1a?-1:a)}function m(a,b,c){return ac?c:a}function k(a){for(var b in a){var c= a[b];c instanceof Function&&(a[b]=c.bind(a))}return a}Object.defineProperty(e,"__esModule",{value:!0});e.deg2rad=function(a){return a*Math.PI/180};e.rad2deg=function(a){return 180*a/Math.PI};e.asin=h;e.acos=l;e.sign=Math.sign||function(a){return+(0a)||+a};e.log2=Math.log2||function(a){return Math.log(a)/Math.LN2};e.isPowerOfTwo=function(a){return 0===(a&a-1)};e.nextHighestPowerOfTwo=function(a){--a;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1};e.nextHighestPowerOfTen=function(a){return Math.pow(10, Math.ceil(Math.LOG10E*Math.log(a)))};e.fovx2fovy=function(a,b,c){return 2*Math.atan(c*Math.tan(.5*a)/b)};e.fovy2fovx=function(a,b,c){return 2*Math.atan(b*Math.tan(.5*a)/c)};e.makeOrthonormal=function(a,b,c){c=c||a;var d=n.vec3d.dot(a,b);n.vec3d.set3(a[0]-d*b[0],a[1]-d*b[1],a[2]-d*b[2],c);n.vec3d.normalize(c)};e.tangentFrame=function(a,b,c){Math.abs(a[0])>Math.abs(a[1])?n.vec3d.set3(0,1,0,b):n.vec3d.set3(1,0,0,b);n.vec3d.cross(a,b,c);n.vec3d.normalize(b);n.vec3d.cross(c,a,b);n.vec3d.normalize(c)}; e.cartesianToSpherical=function(a,b){var c=n.vec3d.length(a),d=h(a[2]/c);n.vec3d.set3(c,d,Math.atan2(a[1]/c,a[0]/c),b)};e.sphericalToCartesian=function(a,b){var c=a[0],d=a[1];a=a[2];var f=Math.cos(d);n.vec3d.set3(c*f*Math.cos(a),c*f*Math.sin(a),c*Math.sin(d),b)};e.lerp=function(a,b,c){return a+(b-a)*c};e.bilerp=function(a,b,c,d,f,e){a+=(b-a)*f;return a+(c+(d-c)*f-a)*e};e.slerp=function(a,b,d,f){void 0===f&&(f=a);var e=n.vec3d.length(a),h=n.vec3d.length(b),k=n.vec3d.dot(a,b)/(e*h);if(.9999999999999999> k){var k=Math.acos(k),g=((1-d)*e+d*h)/Math.sin(k),h=g/h*Math.sin(d*k);n.vec3d.scale(a,g/e*Math.sin((1-d)*k),c);n.vec3d.scale(b,h,q);return n.vec3d.add(c,q,f)}return n.vec3d.lerp(a,b,d,f)};e.angle=function(a,b,f){a=n.vec3d.normalize(a,c);b=n.vec3d.normalize(b,q);var e=l(n.vec3d.dot(a,b));return f&&(a=n.vec3d.cross(a,b,d),0>n.vec3d.dot(a,f))?-e:e};e.clamp=m;e.isFinite=Number.isFinite||function(a){return"number"===typeof a&&window.isFinite(a)};e.isNaN=Number.isNaN||function(a){return a!==a};e.makePiecewiseLinearFunction= function(a){var b=a.length;return function(c){if(c<=a[0][0])return a[0][1];if(c>=a[b-1][0])return a[b-1][1];for(var d=1;c>a[d][0];)d++;var f=a[d][0];c=(f-c)/(f-a[d-1][0]);return c*a[d-1][1]+(1-c)*a[d][1]}};e.vectorEquals=function(a,b){if(null==a||null==b)return a!==b;if(a.length!==b.length)return!1;for(var c=0;cf&&1E-12>h){if(d>.01*c)return!1}else if(d/(f+h)>c)return!1;return!0};e.floatEqualAbsolute=function(a,b,c){void 0===c&&(c=1E-6);return e.isNaN(a)||e.isNaN(b)?!1:(a>b?a-b:b-a)<=c};b=function(){function a(a,b){this.min=a;this.max=b;this.range=b-a}a.prototype.ndiff=function(a,b){void 0===b&&(b=0);return Math.ceil((a-b)/this.range)*this.range+b};a.prototype._normalize=function(a,b,c,d){void 0===d&&(d=0);c-=d;cb&&(c-=this.ndiff(c-b));return c+ d};a.prototype.normalize=function(a,b){return this._normalize(this.min,this.max,a,b)};a.prototype.clamp=function(a,b){void 0===b&&(b=0);return m(a-b,this.min,this.max)+b};a.prototype.monotonic=function(a,b,c){return aa&&cd;d++)a[c+d]+=b[d]}Object.defineProperty(e,"__esModule",{value:!0});e.offset=function(b,c,e){if(b.vertexAttributes&&b.vertexAttributes.position){var d= b.spatialReference;if(d.isWGS84||d.isWebMercator&&(!e||!1!==e.geographic)){e=b.spatialReference;var d=b.vertexAttributes.position,q=b.vertexAttributes.normal,z=new Float64Array(d.length),v=new Float32Array(q?q.length:0),w=b.extent.center,p=k;l.computeLinearTransformation(e,[w.x,w.y,w.z],a,l.SphericalECEFSpatialReference);h.mat4d.toMat3(a,f);h.mat3d.multiplyVec3(f,c,p);n.projectToECEF(d,e,z);q&&n.projectNormalToECEF(q,d,z,e,v);m(z,p);n.projectFromECEF(z,d,e);q&&n.projectNormalFromECEF(v,d,z,e,q)}else m(b.vertexAttributes.position, c);b.clearCache()}};var k=h.vec3d.create(),a=h.mat4d.create(),f=h.mat3d.create()})},"esri/geometry/support/meshUtils/primitives":function(){define(["require","exports","./georeference","../../../views/3d/lib/gl-matrix"],function(b,e,n,h){Object.defineProperty(e,"__esModule",{value:!0});e.createUnitSizeBox=function(){for(var a=m.faceDescriptions,b=m.faceVertexOffsets,c=m.uvScales,e=4*a.length,h=new Float64Array(3*e),k=new Float32Array(3*e),e=new Float32Array(2*e),l=new Uint32Array(6*a.length),v=0, n=0,p=0,y=0,g=0;gA;A++){C=t[A];B=0;e[p++]=.25*c[A][0]+u.uvOrigin[0];e[p++]=u.uvOrigin[1]-.25*c[A][1];for(var F=0;3>F;F++)0!==u.axis[F]?(h[v++]=.5*u.axis[F],k[n++]=u.axis[F]):(h[v++]=.5*C[B++],k[n++]=0)}}return{position:h,normal:k,uv:e,faces:l}};e.createUnitSizeSphere=function(a){void 0===a&&(a=0);a=Math.round(8*Math.pow(2,a));for(var b=2*a,c=(a-1)*(b+1)+2*b,f=new Float64Array(3*c),e=new Float32Array(3* c),c=new Float32Array(2*c),h=new Uint32Array((a-1)*b*6),l=0,m=0,n=0,p=0,y=0,g=0;g<=a;g++){var u=g/a*Math.PI+.5*Math.PI,t=Math.cos(u);k[2]=Math.sin(u);for(var A=(u=0===g||g===a)?b-1:b,C=0;C<=A;C++){var B=C/A*2*Math.PI;k[0]=-Math.sin(B)*t;k[1]=Math.cos(B)*t;for(B=0;3>B;B++)f[l++]=.5*k[B],e[m++]=k[B];c[n++]=(C+(u?.5:0))/b;c[n++]=g/a;0!==g&&C!==b&&(g!==a&&(h[p++]=y,h[p++]=y+1,h[p++]=y-b),1!==g&&(h[p++]=y,h[p++]=y-b,h[p++]=y-b-1));y++}}return{position:f,normal:e,uv:c,faces:h}};e.createUnitSizeCylinder= function(a){void 0===a&&(a=0);a=Math.round(16*Math.pow(2,a));for(var b=4*(a+1)+2*a,c=new Float64Array(3*b),f=new Float32Array(3*b),b=new Float32Array(2*b),e=new Uint32Array(12*a),h=0,l=0,m=0,n=0,p=0,y=0;5>=y;y++)for(var g=0===y||5===y,u=1>=y||4<=y,t=2===y||4===y,A=g?a-1:a,C=0;C<=A;C++){var B=C/A*2*Math.PI,F=g?0:.5;k[0]=F*Math.sin(B);k[1]=F*-Math.cos(B);k[2]=2>=y?.5:-.5;for(B=0;3>B;B++)c[h++]=k[B],u?f[l++]=2===B?1>=y?1:-1:0:f[l++]=2===B?0:k[B]/F;b[m++]=(C+(g?.5:0))/a;1>=y?b[m++]=1*y/3:3>=y?b[m++]= 1*(y-2)/3+1/3:b[m++]=1*(y-4)/3+2/3;t||0===y||C===a||(5!==y&&(e[n++]=p,e[n++]=p+1,e[n++]=p-a),1!==y&&(e[n++]=p,e[n++]=p-a,e[n++]=p-a-1));p++}return{position:c,normal:f,uv:b,faces:e}};e.createUnitSizePlane=function(a){a=l.facingAxisOrderSwap[a];for(var b=l.position,c=l.normal,f=new Float64Array(b.length),e=new Float32Array(c.length),h=0,k=0;4>k;k++)for(var m=h,n=0;3>n;n++){var p=a[n],y=Math.abs(p)-1,p=0<=p?1:-1;f[h]=b[m+y]*p;e[h]=c[m+y]*p;h++}return{position:f,normal:e,uv:new Float32Array(l.uv),faces:new Uint32Array(l.faces)}}; var l={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};e.convertUnitGeometry=function(b,d,c){for(var f=0;fl;l++)k[l]=b.position[e+l];h.mat3d.multiplyVec3(a,k);for(l=0;3>l;l++)b.position[e+l]=k[l]}if(f[0]!==f[1]||f[1]!==f[2])for(a[0]=1/f[0],a[4]=1/f[1],a[8]=1/f[2],e=0;el;l++)k[l]=b.normal[e+l];h.mat3d.multiplyVec3(a,k);h.vec3d.normalize(k);for(l=0;3>l;l++)b.normal[e+l]=k[l]}}f=n.georeference(b,d,c);return{vertexAttributes:{position:f.position,normal:f.normal,uv:b.uv},components:[{faces:b.faces,material:c&&c.material||null}],spatialReference:d.spatialReference}}; var m={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0, 1,2,0,2,3]};e.boxFaceOrder={south:0,east:1,north:2,west:3,up:4,down:5};var k=h.vec3d.create(),a=h.mat3d.identity()})},"esri/geometry/support/meshUtils/georeference":function(){define(["require","exports","../../../views/3d/lib/gl-matrix","../../../views/3d/support/projectionUtils"],function(b,e,n,h){Object.defineProperty(e,"__esModule",{value:!0});e.georeference=function(b,a,f){var d=a.spatialReference;if(d.isWGS84||d.isWebMercator&&(!f||!1!==f.geographic)){f=a.spatialReference;h.computeLinearTransformation(a.spatialReference, [a.x,a.y,a.z||0],l,h.SphericalECEFSpatialReference);var d=b.position,c=l,e=a.spatialReference,k=new Float64Array(d.length);for(a=0;ax;x++)m[x]=d[a+x];n.mat4d.multiplyVec3(c,m);for(x=0;3>x;x++)k[a+x]=m[x]}a=new Float64Array(d.length);h.bufferToBuffer(k,h.SphericalECEFSpatialReference,0,a,e,0,k.length/3);b=b.normal;if(f.isWebMercator&&b){f=new Float32Array(b.length);for(d=0;dc;c++)f[d+c]=m[c];b=f}b={position:a,normal:b}}else{f=new Float64Array(b.position.length);d=b.position;for(c=0;cg;g++)f[g]=a[b+g]-c[g];l.mat4d.multiplyVec3(r,f);for(g=0;3>g;g++)a[b+g]=f[g]+c[g]}}Object.defineProperty(e,"__esModule",{value:!0});var a=n.getLogger("esri.geometry.support.meshUtils.rotate");e.rotate=function(b,c,f){if(b.vertexAttributes&&b.vertexAttributes.position&&0!==c[3]){var g=b.spatialReference,e=f&&f.origin||b.extent.center;if(g.isWGS84||g.isWebMercator&& (!f||!1!==f.geographic)){f=b.spatialReference;g=v;m.pointToVector(e,g,m.SphericalECEFSpatialReference)||m.pointToVector(b.extent.center,g,m.SphericalECEFSpatialReference);var e=b.vertexAttributes.position,p=b.vertexAttributes.normal,q=new Float64Array(e.length),y=new Float32Array(p?p.length:0);m.computeLinearTransformation(m.SphericalECEFSpatialReference,g,r,m.SphericalECEFSpatialReference);l.mat4d.toMat3(r,x);var n=l.mat3d.multiplyVec3(x,c,d);n[3]=c[3];h.projectToECEF(e,f,q);p&&h.projectNormalToECEF(p, e,q,f,y);k(q,n,g);h.projectFromECEF(q,e,f);p&&(k(y,n),h.projectNormalFromECEF(y,e,q,f,p))}else f=v,m.pointToVector(e,f,b.spatialReference)||(g=b.extent.center,f[0]=g.x,f[1]=g.y,f[2]=g.z,a.error("Failed to project specified origin (wkid:"+e.spatialReference.wkid+") to mesh spatial reference (wkid:"+b.spatialReference.wkid+"). Using mesh extent.center instead")),k(b.vertexAttributes.position,c,f),k(b.vertexAttributes.normal,c);b.clearCache()}};e.axisAngleFrom=function(a,b,c){l.vec3d.set(a,c);c[3]=b; return c};e.axisAngleMultiply=function(a,b,d){l.quat4d.fromAngleAxis(a[3],a,c);l.quat4d.fromAngleAxis(b[3],b,q);l.quat4d.multiply(q,c,c);l.quat4d.toAngleAxis(c,d);return d};var f=l.vec3d.create(),d=l.vec4d.create(),c=l.quat4d.create(),q=l.quat4d.create(),r=l.mat4d.create(),x=l.mat3d.create(),z=[0,0,0],v=[0,0,0]})},"esri/geometry/Multipoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/accessorSupport/decorators ./Extent ./Geometry ./Point ./support/zmUtils".split(" "), function(b,e,n,h,l,m,k,a,f,d){function c(a){return function(b,c){return null==b?c:null==c?b:a(b,c)}}b=function(a){function b(){for(var b=0;be&&(K=K[e],x=h(x,K),aa=q(aa,K))}b.xmin=l;b.ymin=m;b.xmax=r;b.ymax=g;b.spatialReference=this.spatialReference;d?(b.zmin=n,b.zmax=H):(b.zmin=null,b.zmax=null);f?(b.mmin=x,b.mmax=aa):(b.mmin=null,b.mmax=null);return b},enumerable:!0,configurable:!0});b.prototype.writePoints=function(a,b,c,d){b.points=l.clone(this.points)};b.prototype.addPoint=function(a){this.clearCache(); d.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this};b.prototype.clone=function(){var a={points:l.clone(this.points),spatialReference:this.spatialReference};this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return new e(a)};b.prototype.getPoint=function(a){if(!this._validateInputs(a))return null;a=this.points[a];var b={x:a[0],y:a[1],spatialReference:this.spatialReference},c=2;this.hasZ&&(b.z=a[2],c=3);this.hasM&&(b.m=a[c]);return new f(b)};b.prototype.removePoint= function(a){if(!this._validateInputs(a))return null;this.clearCache();return new f(this.points.splice(a,1)[0],this.spatialReference)};b.prototype.setPoint=function(a,b){if(!this._validateInputs(a))return this;this.clearCache();d.updateSupportFromPoint(b);this.points[a]=b.toArray();return this};b.prototype.toJSON=function(a){return this.write(null,a)};b.prototype._validateInputs=function(a){return null!=a&&0<=a&&ad&&(fa=pa[d],t=p(l,fa),u=y(m,fa),ba=p(N,fa),fa=y(T,fa))}r.push(new k({xmin:z,ymin:x,zmin:N,mmin:ba,xmax:Y,ymax:w,zmax:T,mmax:fa,spatialReference:c}))}g=new k;g.xmin=e;g.ymin=f;g.xmax=q;g.ymax=h;g.spatialReference=c;a&&(g.zmin=l,g.zmax=m);b&&(g.mmin=t,g.mmax=u);g.cache._partwise=1a||a>=this.rings.length||null!=b&&(a=this.rings[a],c&&(0>b||b>a.length)||!c&&(0>b||b>=a.length))?!1:!0};b.prototype.toJSON=function(a){return this.write(null,a)};var g;h([m.property({dependsOn:["hasM","hasZ","rings"]})],b.prototype,"cache",void 0);h([m.property({readOnly:!0,dependsOn:["cache"]})],b.prototype,"centroid",null);h([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype,"extent",null);h([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype, "isSelfIntersecting",null);h([m.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],b.prototype,"rings",void 0);h([m.writer("rings")],b.prototype,"writePaths",null);return b=g=h([m.subclass("esri.geometry.Polygon")],b)}(m.declared(a));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/support/centroid":function(){define(["require","exports","./coordsUtils"],function(b,e,n){function h(b,a){if(!b||!b.length)return null;for(var f=[],d=[],c=a?[Infinity,-Infinity,Infinity,-Infinity, Infinity,-Infinity]:[Infinity,-Infinity,Infinity,-Infinity],e=0,h=b.length;ec[1]||f[1]c[3]||a&&(f[2]c[5]))&&(f.length=0);if(!f.length)if(b=b[0]&&b[0].length?m(b[0],a):null)f[0]=b[0],f[1]=b[1],a&&2f[1]&&(f[1]=p);yf[3]&&(f[3]=y);a&&(gf[5]&&(f[5]=g))}0f&&(U=N[f],v=r(m,U),z=x(n,U),V=r(Q,U),U=x(G,U))}w.push(new k({xmin:X,ymin:M,zmin:Q,mmin:V,xmax:L,ymax:O,zmax:G,mmax:U,spatialReference:c}))}d=new k;d.xmin=h;d.ymin=e;d.xmax=q;d.ymax=l;d.spatialReference=c;a&&(d.zmin=m,d.zmax=n);b&&(d.mmin=v,d.mmax=z);d.cache._partwise=1a||a>=this.paths.length||null!=b&&(a=this.paths[a],c&&(0>b||b>a.length)||!c&&(0>b||b>=a.length))?!1:!0};b.prototype.toJSON=function(a){return this.write(null,a)};var e;h([m.property({dependsOn:["hasM","hasZ","paths"]})],b.prototype,"cache",void 0);h([m.property({dependsOn:["cache"],readOnly:!0})],b.prototype,"extent",null);h([m.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],b.prototype,"paths",void 0);h([m.writer("paths")],b.prototype,"writePaths",null);return b=e=h([m.subclass("esri.geometry.Polyline")], b)}(m.declared(a));b.prototype.toJSON.isDefaultToJSON=!0;return b})},"esri/geometry/ScreenPoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m){return function(b){function a(){for(var a=[],c=0;cc?a.scale:c;d=a.scale=a)return b[0]; if(a>=b.length)return b[b.length-1];var c=Math.round(a);return b[c]+(c-a)*(b[Math.round(a-.5)]-b[c])};b.prototype.scaleToZoom=function(a){for(var b=this.scales,c=b.length-1,d=0;da&&f=b?this.zoomToScale(Math.ceil(a)):this.zoomToScale(Math.floor(a))};b.prototype.tileAt=function(a,b,d,f){var g=this.lodAt(a); if(!g)return null;var e;if("number"===typeof b)e=b,b=d;else{if(r.equals(b.spatialReference,this.spatialReference))e=b.x,b=b.y;else{f=x.project(b,this.spatialReference);if(!f)return null;e=f.x;b=f.y}f=d}d=g.resolution*this.size[0];g=g.resolution*this.size[1];f||(f={id:null,level:0,row:0,col:0,extent:c.create()});f.level=a;f.row=Math.floor((this.origin.y-b)/g+.001);f.col=Math.floor((e-this.origin.x)/d+.001);this.updateTileInfo(f);return f};b.prototype.updateTileInfo=function(a){var b=this.lodAt(a.level); if(b){var d=b.resolution*this.size[0],b=b.resolution*this.size[1];a.id=a.level+"/"+a.row+"/"+a.col;a.extent||(a.extent=c.create());a.extent[0]=this.origin.x+a.col*d;a.extent[1]=this.origin.y-(a.row+1)*b;a.extent[2]=a.extent[0]+d;a.extent[3]=a.extent[1]+b}};b.prototype.upsampleTile=function(a){var b=this._upsampleLevels[a.level];if(!b||-1===b.parentLevel)return!1;a.level=b.parentLevel;a.row=Math.floor(a.row/b.factor+.001);a.col=Math.floor(a.col/b.factor+.001);this.updateTileInfo(a);return!0};b.prototype.getTileBounds= function(a,b){var c=this.lodAt(b.level).resolution,d=c*this.size[0],c=c*this.size[1];a[0]=this.origin.x+b.col*d;a[1]=this.origin.y-(b.row+1)*c;a[2]=a[0]+d;a[3]=a[1]+c;return a};b.prototype.lodAt=function(a){return this._levelToLOD&&this._levelToLOD[a]||null};b.prototype.clone=function(){return e.fromJSON(this.write({}))};b.prototype._initializeUpsampleLevels=function(){var a=this.lods;this._upsampleLevels=[];for(var b=null,c=0;c=a?(p.error("Minimum levels for Tilemap is 3, but got ",a),3):a};Object.defineProperty(b.prototype,"size",{get:function(){return 1<=b)throw Error("LRU cache size must be bigger than zero!");this._maxSize=b;e&&(e.disposeFunction&&(this.disposeFunction=e.disposeFunction),e.sizeOfFunction&&(this.sizeOfFunction=e.sizeOfFunction))}Object.defineProperty(b.prototype,"length",{get:function(){return this._cache.size},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype, "size",{get:function(){return this._sizeOf},enumerable:!0,configurable:!0});b.prototype.clear=function(){var b=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(e,h){b.disposeFunction(h,e)});this._cache.clear();this._sizeOf=0};b.prototype.delete=function(b){var e=this._cache.get(b);return this._cache.delete(b)?(this._sizeOf-=this.sizeOfFunction(e),this._queue.splice(this._queue.indexOf(b),1),this.disposeFunction&&this.disposeFunction(b,e),!0):!1};b.prototype.forEach=function(b, e){this._cache.forEach(b,e)};b.prototype.get=function(b){var e=this._cache.get(b);if(void 0!==e)return this._queue.splice(this._queue.indexOf(b),1),this._queue.unshift(b),e};b.prototype.has=function(b){return this._cache.has(b)};b.prototype.set=function(b,e){var h=this.get(b);void 0!==h?this._sizeOf-=this.sizeOfFunction(h):this._queue.unshift(b);this._sizeOf+=this.sizeOfFunction(e);this._cache.set(b,e);this._collect();return this};b.prototype._collect=function(){for(;this._queue.length&&this._sizeOf> this._maxSize;){var b=this._queue.pop(),e=this._cache.get(b);this._cache.delete(b)&&(this._sizeOf-=this.sizeOfFunction(e),this.disposeFunction&&this.disposeFunction(b,e))}};return b}()})},"esri/core/PooledArray":function(){define(["require","exports","./arrayUtils","./HeapSort"],function(b,e,n,h){return function(){function b(b){var e=this;this.data=[];this._length=0;this._allocator=null;this._deallocator=function(a,b){return e.data[b]=void 0};this._shrink=function(){};this._hint=new n.RemoveHint; if(b){b.initialSize&&(this.data=Array(b.initialSize));if(b.allocator&&(this._allocator=b.allocator,this._deallocator=b.deallocator,b.initialSize))for(var a=0;a2*e.length&&(e.data.length=e.length)})}}b.prototype.toArray=function(){return this.data.slice(0,this.length)};Object.defineProperty(b.prototype,"length",{get:function(){return this._length},set:function(b){if(this._allocator)for(;this.data.length< b;)this.data.push(this._allocator(this.data.length));if(this._deallocator)for(var e=b;e= this.data.length&&this._grow(Math.max(2*this.length,e));for(e=0;e=e.length)return!1;if(0>b.indexOf(f))return!0; a.push(f);return!1});this._length=this.data.length;return a};b.prototype.removeUnordered=function(b){b=n.removeUnordered(this.data,b,this.length,this._hint);void 0!==b&&--this.length;return b};b.prototype.removeUnorderedMany=function(b){b=n.removeUnorderedMany(this.data,b,this.length,this._hint);this.length-=b.length;return b};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(b,e){var a;b>=this.length||e>=this.length||(a=[this.data[e],this.data[b]],this.data[b]=a[0],this.data[e]=a[1])};b.prototype.sort=function(b){h.sort(this.data,0,this.length,b)};b.prototype.some=function(b,e){for(var a=0;aa[h]?f=h+1:e=h}e=a[f];return d?b>=a[c-1]?-1:e===b?f:f-1:e===b?f:-1};var f=function(){return function(){this.last=0}}();e.RemoveHint=f;var d=new f;b=function(){return function(a){var b=this;this._array=a;this._hint=new f;this.remove=function(a){return h(b._array,a,b._array.length,b._hint)};this.removeMany=function(a){return l(b._array,a,b._array.length,b._hint)}}}();e.UnorderedRemover=b;e.removeUnordered=h;e.removeUnorderedMany=l;e.keysOfMap=function(a){var b= [];a.forEach(function(a,c){return b.push(c)});return b};e.keysOfSet=function(b,d){void 0===d&&(d=a);var c=[];b.forEach(function(a){return c.push(d(a))});return c};e.fromMapValues=function(a){if(Array.from)return Array.from(a.values());var b=Array(a.size),c=0;a.forEach(function(a){b[c++]=a});return b}})},"esri/core/HeapSort":function(){define([],function(){function b(b,e,l,m){for(var h=e,a=l>>>1,f=b[h-1];e<=a;){e=h<<1;em(b[e-1],b[e])&&++e;var d=b[e-1];if(0>=m(d,f))break;b[h-1]=d;h=e}b[h-1]=f} function e(b,e){return be?1:0}return{sort:function(n,h,l,m){void 0===h&&(h=0);void 0===l&&(l=n.length);void 0===m&&(m=e);for(var k=l>>>1;k>h;k--)b(n,k,l,m);for(var a=h+1,k=l-1;k>h;k--)l=n[h],n[h]=n[k],n[k]=l,b(n,a,k,m);return n}}})},"esri/core/watchUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/Promise"],function(b,e,n,h){function l(a,b,c,d,f){f=a.watch(b,function(b,g,f,e){d&&!d(b)||c.call(a,b,g,f,e)},f);if(Array.isArray(b))for(var e=0;e>3;var c=this._tileAvailabilityBitSet;return 0>b||b>c.length?"unknown":c[b]&1<>=6;v.offsetType= w;if(2===w)v.offset=f.getInt8(1),z++;else if(1===w)v.offset=f.getInt16(1,!0),z+=2;else if(0===w)v.offset=f.getFloat32(1,!0),z+=4;else throw"Invalid block offset type";c=Math.min(v.offset,c);if(1===v.encoding)if(w=f.getUint8(z),z++,v.bitsPerPixel=w&63,w>>=6,v.numValidPixelsType=w,2===w)v.numValidPixels=f.getUint8(z),z++;else if(1===w)v.numValidPixels=f.getUint16(z,!0),z+=2;else if(0===w)v.numValidPixels=f.getUint32(z,!0),z+=4;else throw"Invalid valid pixel count type";}m+=z;if(3!=v.encoding)if(0=== v.encoding){f=(a.pixels.numBytes-1)/4;if(f!==Math.floor(f))throw"uncompressed block has invalid length";z=new ArrayBuffer(4*f);w=new Uint8Array(z);w.set(new Uint8Array(n,m,4*f));z=new Float32Array(z);for(w=0;wB.encoding){if(0===B.encoding)F=B.rawData;else{F=B.stuffedData;D=B.bitsPerPixel;y=B.numValidPixels;g=B.offset;var H=x,aa=v,ga=a.pixels.maxValue,P=(1<=D?(X=O>>>M-D&P,M-=D):(M=D-M,X=(O&P)<>>M),aa[ja]=X>3],Q<<=A&7);for(y= 0;y>3]),Q&128?(p&&(p[A]=1),m[A++]=2>B.encoding?F[D++]:l):(p&&(p[A]=0),m[A++]=n),Q<<=1;A+=C}else if(2>B.encoding)for(g=0;ga&&(a+=360);return a};c.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;h([k.property({type:Number, json:{write:!0,origins:{"web-scene":{write:{overridePolicy:d}}}}})],c.prototype,"rotation",void 0);h([k.cast("rotation")],c.prototype,"castRotation",null);h([k.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:d}}}}})],c.prototype,"scale",void 0);h([k.property({types:f.types,json:{read:a.fromJSON,write:!0,origins:{"web-scene":{read:a.fromJSON,write:{overridePolicy:d}}}}})],c.prototype,"targetGeometry",void 0);h([k.property({type:l,json:{write:!0}})],c.prototype,"camera", void 0);return c=e=h([k.subclass("esri.Viewpoint")],c)}(k.declared(m))})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./core/accessorSupport/decorators ./geometry/Point ./views/3d/support/mathUtils".split(" "),function(b,e,n,h,l,m,k,a){return function(b){function d(a,c,d,f){a=b.call(this)||this;a.position=null;a.heading=0;a.tilt=0;a.fov=55;return a}n(d,b);c=d;d.prototype.getDefaults=function(a){if(!a.position)return{position:new k([0, 0,0])}};d.prototype.normalizeCtorArgs=function(a,b,c,d){a&&"object"===typeof a&&("x"in a||Array.isArray(a))&&(a={position:a},null!=b&&(a.heading=b),null!=c&&(a.tilt=c),null!=d&&(a.fov=d));return a};d.prototype.equals=function(a){return a?this.tilt===a.tilt&&this.heading===a.heading&&this.fov===a.fov&&this.position.equals(a.position):!1};d.prototype.clone=function(){return new c({position:this.position.clone(),heading:this.heading,tilt:this.tilt,fov:this.fov})};var c;h([m.property({type:k,json:{write:{isRequired:!0}}})], d.prototype,"position",void 0);h([m.property({type:Number,json:{write:{isRequired:!0}}}),m.cast(function(b){return a.cyclicalDeg.normalize(b)})],d.prototype,"heading",void 0);h([m.property({type:Number,json:{write:{isRequired:!0}}}),m.cast(function(b){return a.clamp(b,-180,180)})],d.prototype,"tilt",void 0);h([m.property({json:{read:!1,write:!1}})],d.prototype,"fov",void 0);return d=c=h([m.subclass("esri.Camera")],d)}(m.declared(l))})},"esri/geometry/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Extent ../Geometry ../Mesh ../Multipoint ../Point ../Polygon ../Polyline".split(" "), function(b,e,n,h,l,m,k,a,f,d){Object.defineProperty(e,"__esModule",{value:!0});e.types={base:l,key:"type",typeMap:{extent:h,multipoint:k,point:a,polyline:d,polygon:f,mesh:m}};e.ensureType=n.ensureOneOfType(e.types)})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/assignHelper dojo/io-query ../../../request ../../../core/Accessor ../../../core/Error ../../../core/Loadable ../../../core/promiseUtils ../../../core/accessorSupport/decorators ../../../tasks/QueryTask ../../../tasks/operations/queryAttachments".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r,x){Object.defineProperty(e,"__esModule",{value:!0});b=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);b.prototype.load=function(){this.addResolvingPromise(this._fetchService());return this.when()};Object.defineProperty(b.prototype,"queryTask",{get:function(){var a=this.layer,b=a.parsedUrl,c=a.gdbVersion;return new r({url:null!=a.dynamicDataSource?b.path+"?"+m.objectToQuery(b.query):b.path,gdbVersion:c})},enumerable:!0,configurable:!0}); b.prototype.addAttachment=function(a,b){var d=this;return this.load().then(function(){var g=a.attributes[d.layer.objectIdField];return k(d.layer.parsedUrl.path+"/"+g+"/addAttachment",{body:b,query:l({f:"json"},d.layer.parsedUrl.query,{token:d.layer.token}),responseType:"json"}).then(function(a){return d._createFeatureEditResult(a.data.addAttachmentResult)}).catch(function(a){return c.reject(d._createAttachmentErrorResult(g,a))})})};b.prototype.updateAttachment=function(a,b,d){var g=this;return this.load().then(function(){var f= a.attributes[g.layer.objectIdField];return k(g.layer.parsedUrl.path+"/"+f+"/updateAttachment",{body:d,query:l({f:"json"},g.layer.parsedUrl.query,{attachmentId:b,token:g.layer.token}),responseType:"json"}).then(function(a){return g._createFeatureEditResult(a.data.updateAttachmentResult)}).catch(function(a){return c.reject(g._createAttachmentErrorResult(f,a))})})};b.prototype.applyEdits=function(a){var b=this;return this.load().then(function(){var c=a.addFeatures.map(b._serializeFeature,b),d=a.updateFeatures.map(b._serializeFeature, b),f=b._getFeatureIds(a.deleteFeatures),c={f:"json",adds:c.length?JSON.stringify(c):null,updates:d.length?JSON.stringify(d):null,deletes:f.length?f.join(","):null};return k(b.layer.parsedUrl.path+"/applyEdits",{query:c,method:"post",responseType:"json"})}).then(function(a){return b._createEditsResult(a)})};b.prototype.deleteAttachments=function(a,b){var d=this;return this.load().then(function(){var g=a.attributes[d.layer.objectIdField];return k(d.layer.parsedUrl.path+"/"+g+"/deleteAttachments",{query:l({f:"json"}, d.layer.parsedUrl.query,{token:d.layer.token,attachmentIds:b.join(",")}),method:"post",responseType:"json"}).then(function(a){return a.data.deleteAttachmentResults.map(d._createFeatureEditResult)}).catch(function(a){return c.reject(d._createAttachmentErrorResult(g,a))})})};b.prototype.queryAttachments=function(a){var b=this,d=this.layer,g=d.token,f=d.parsedUrl,e=f.path;return this.load().then(function(){var d={query:l({},f.query,{f:"json",token:g}),responseType:"json"};if(!b.layer.get("capabilities.query.supportsAttachments")){for(var h= a.objectIds,p=[],q=0;qb){var g=x(d,b);a[0]=d+-2*g*b}else db?(g=x(d,b),a=a.clone().offset(-2*g*b,0)):d c[0])){for(var d=c=0;dc?g:c}c=Number(c.toFixed(9));c=-360*x(c,180);for(d=0;dF?V.xmax:F,G=p(G,t),D.push(G),L.push("cut")):V.intersects(B)&&V.xmin!==v?(F=2*V.xmax*r>F?2*V.xmax*r:F,G=p(G,t,360),D.push(G),L.push("cut")):L.push(G)}else L.push(G.clone());else L.push(G);else L.push(G)}h=x(F,r);l=-90;w=h;for(F=new a;0=p.rings.length?(d.push(k),g.push("simplify")):g.push(t?c.geographicToWebMercator(k):k)}}return d.length?f.simplify(d,e).then(function(a){for(var b=[],d=0;d2*g||hg)return c;var k;switch(a.type){case "polygon":if(1p?(p+=g,b=Math.max(p,b)):(p-=g,h=Math.min(p,h))}a.xmin=h;a.xmax=b;return a.width=d.length?null:d[0]};a.next();)switch(a.tag()){case 1:b.name=a.getString();break;case 2:var f=a.getEnum();b.type= f>=d.length?null:d[f];break;case 3:b.alias=a.getString();break;case 4:f=a.getEnum();f=f>=c.length?null:c[f];b.sqlType=f;break;default:a.skip()}return b}function f(a,b){for(var c=new h.default,d=0;a.next();)switch(a.tag()){case 1:var f=a.getMessage(),e=b[d++].name;c.attributes[e]=k(f);break;case 2:for(var f=a.getMessage(),e=new m.default,g=e.coords,l=e.lengths;f.next();)switch(f.tag()){case 2:for(var q=f.getUInt32(),q=f.pos()+q;f.pos()=q.length?null:q[0];h.next();)switch(h.tag()){case 1:k.objectIdFieldName=h.getString();break;case 3:k.globalIdFieldName=h.getString();break;case 4:k.geohashFieldName=h.getString();break;case 5:for(var g=h.getMessage(),m={};g.next();)switch(g.tag()){case 1:m.shapeAreaFieldName= g.getString();break;case 2:m.shapeLengthFieldName=g.getString();break;case 3:m.units=g.getString();break;default:g.skip()}k.geometryProperties=m;break;case 7:g=h.getEnum();k.geometryType=g>=q.length?null:q[g];break;case 8:g=h.getMessage();for(m={};g.next();)switch(g.tag()){case 1:m.wkid=g.getUInt32();break;case 5:m.wkt=g.getString();break;default:g.skip()}k.spatialReference=m;break;case 10:k.hasZ=h.getBool();break;case 11:k.hasM=h.getBool();break;case 12:g=h.getMessage();for(m={originPosition:0>= r.length?null:r[0]};g.next();)switch(g.tag()){case 1:var t=g.getEnum();m.originPosition=t>=r.length?null:r[t];break;case 2:for(var t=g.getMessage(),A=[0,0];t.next();)switch(t.tag()){case 1:A[0]=t.getDouble();break;case 2:A[1]=t.getDouble();break;case 3:A.push(t.getDouble());break;case 4:A.push(t.getDouble());break;default:t.skip()}m.scale=A;break;case 3:t=g.getMessage();for(A=[0,0];t.next();)switch(t.tag()){case 1:A[0]=t.getDouble();break;case 2:A[1]=t.getDouble();break;case 3:A.push(t.getDouble()); break;case 4:A.push(t.getDouble());break;default:t.skip()}m.translate=A;break;default:g.skip()}k.transform=m;break;case 9:g=h.getBool();k.exceededTransferLimit=g;break;case 13:g=h.getMessage();k.fields.push(a(g));break;case 15:g=h.getMessage();k.features.push(f(g,k.fields));break;default:h.skip()}e.featureResult=k;break;default:d.skip()}c.queryResult=e;break;default:b.skip()}return c}})},"esri/core/pbf":function(){define(["require","exports"],function(b,e){return function(){function b(b,e,m,k){this._tag= 0;this._dataType=99;this._data=b;this._dataView=e;this._pos=m||0;this._end=k||b.byteLength}b.prototype.clone=function(){return new b(this._data,this._dataView,this._pos,this._end)};b.prototype.pos=function(){return this._pos};b.prototype.next=function(b){for(;;){if(this._pos===this._end)return!1;var e=this._decodeVarint();this._tag=e>>3;this._dataType=e&7;if(!b||b===this._tag)break;this.skip()}return!0};b.prototype.empty=function(){return this._pos>=this._end};b.prototype.tag=function(){return this._tag}; b.prototype.getInt32=function(){return this._decodeVarint()};b.prototype.getInt64=function(){return this._decodeVarint()};b.prototype.getUInt32=function(){var b=4294967295,b=(this._data[this._pos]&127)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&127)<<7)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&127)<<14)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]&127)<<21)>>>0;if(128>this._data[this._pos++])return b;b=(b|(this._data[this._pos]& 15)<<28)>>>0;if(128>this._data[this._pos++])return b};b.prototype.getUInt64=function(){return this._decodeVarint()};b.prototype.getSInt32=function(){var b=this.getUInt32();return b>>>1^-(b&1)|0};b.prototype.getSInt64=function(){return this._decodeSVarint()};b.prototype.getBool=function(){var b=0!==this._data[this._pos];this._skip(1);return b};b.prototype.getEnum=function(){return this._decodeVarint()};b.prototype.getFixed64=function(){var b=this._dataView,e=this._pos,b=b.getUint32(e,!0)+4294967296* b.getUint32(e+4,!0);this._skip(8);return b};b.prototype.getSFixed64=function(){var b=this._dataView,e=this._pos,b=b.getUint32(e,!0)+4294967296*b.getInt32(e+4,!0);this._skip(8);return b};b.prototype.getDouble=function(){var b=this._dataView.getFloat64(this._pos,!0);this._skip(8);return b};b.prototype.getFixed32=function(){var b=this._dataView.getUint32(this._pos,!0);this._skip(4);return b};b.prototype.getSFixed32=function(){var b=this._dataView.getInt32(this._pos,!0);this._skip(4);return b};b.prototype.getFloat= function(){var b=this._dataView.getFloat32(this._pos,!0);this._skip(4);return b};b.prototype.getString=function(){var b=this._getLength(),e=this._pos,e=this._toString(this._data,e,e+b);this._skip(b);return e};b.prototype.getBytes=function(){var b=this._getLength(),e=this._pos,e=this._toBytes(this._data,e,e+b);this._skip(b);return e};b.prototype.getMessage=function(){var e=this._getLength(),l=this._pos,l=new b(this._data,this._dataView,l,l+e);this._skip(e);return l};b.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!");}};b.prototype._skip=function(b){if(this._pos+b>this._end)throw Error("Attempt to skip past the end of buffer!");this._pos+=b};b.prototype._decodeVarint=function(){var b=this._data,e=this._pos,m=0,k;if(10<=this._end-e){if(k=b[e++],m|=k&127,0!==(k&128)&&(k=b[e++],m|=(k&127)<<7,0!==(k&128)&&(k=b[e++],m|=(k&127)<<14,0!==(k&128)&&(k=b[e++],m|=(k&127)<<21,0!== (k&128)&&(k=b[e++],m+=268435456*(k&127),0!==(k&128)&&(k=b[e++],m+=34359738368*(k&127),0!==(k&128)&&(k=b[e++],m+=4398046511104*(k&127),0!==(k&128)&&(k=b[e++],m+=562949953421312*(k&127),0!==(k&128)&&(k=b[e++],m+=72057594037927936*(k&127),0!==(k&128)&&(k=b[e++],m+=0x7fffffffffffffff*(k&127),0!==(k&128)))))))))))throw Error("Varint too long!");}else{for(var a=1;e!==this._end;){k=b[e];if(0===(k&128))break;++e;m+=(k&127)*a;a*=128}if(e===this._end)throw Error("Varint overrun!");++e;m+=k*a}this._pos=e;return m}; b.prototype._decodeSVarint=function(){var b=this._decodeVarint();return b%2?-(b+1)/2:b/2};b.prototype._getLength=function(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()};b.prototype._toString=function(b,e,m){var h="",a="";for(m=Math.min(this._end,m);e=d?(c.push(g[0]),g=g.slice(1)):(c.push(a[0]),a=a.slice(1))):0d.length)throw Error("Missing Parameters");if(2===d.length)return d[1];if(0===(d.length-1)%2)throw Error("Must have a default value result."); return K(a,d,1,d[0])})}catch(fa){throw fa;}};V.when=function(a,b){try{return t(a,b,function(b,c,d){if(3>d.length)throw Error("Missing Parameters");if(0===d.length%2)throw Error("Must have a default value result.");b=d[0];if(!1===k.isBoolean(b))throw Error("WHEN needs boolean test conditions");return ja(a,d,0,b)})}catch(fa){throw fa;}};V.top=function(a,b){return t(a,b,function(a,b,c){k.pcCheck(c,2,2);if(k.isArray(c[0]))return k.toNumber(c[1])>=c[0].length?c[0].slice(0):c[0].slice(0,k.toNumber(c[1])); if(k.isImmutableArray(c[0]))return k.toNumber(c[1])>=c[0].length()?c[0].slice(0):c[0].slice(0,k.toNumber(c[1]));throw Error("Top cannot accept this parameter type");})};V.first=function(a,b){return t(a,b,function(a,b,c){k.pcCheck(c,1,1);return k.isArray(c[0])?0===c[0].length?null:c[0][0]:k.isImmutableArray(c[0])?0===c[0].length()?null:c[0].get(0):null})};V.sort=function(a,b){return t(a,b,function(a,b,c){k.pcCheck(c,1,2);b=c[0];k.isImmutableArray(b)&&(b=b.toArray());if(!1===k.isArray(b))throw Error("Illegal Argument"); if(1b&&(b=a.length+b);if(0>b||b>=a.length)throw Error("Assignment outside of array bounds");g=k.toNumber(a[b]);a[b]="++"===c?g+1:g-1}else throw Error("Invalid Parameter");else if(a instanceof n){if(!1===k.isString(b))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(b))g=k.toNumber(a.field(b)),a.setField(b,"++"===c?g+1:g-1);else throw Error("Invalid Parameter");}else if(a instanceof h){if(!1===k.isString(b))throw Error("Feature accessor must be a string"); if(!0===a.hasField(b))g=k.toNumber(a.field(b)),a.setField(b,"++"===c?g+1:g-1);else throw Error("Invalid Parameter");}else{if(k.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===d?g:"++"===c?g+1:g-1},assignmember:function(a,b,c,d){if(k.isArray(a))if(k.isNumber(b)){0>b&&(b=a.length+b);if(0>b||b>a.length)throw Error("Assignment outside of array bounds");if(b===a.length&&"\x3d"!==c)throw Error("Invalid Parameter");a[b]=this.assign(d,c,a[b])}else throw Error("Invalid Parameter"); else if(a instanceof n){if(!1===k.isString(b))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(b))a.setField(b,this.assign(d,c,a.field(b)));else{if("\x3d"!==c)throw Error("Invalid Parameter");a.setField(b,this.assign(d,c,null))}}else if(a instanceof h){if(!1===k.isString(b))throw Error("Feature accessor must be a string");if(!0===a.hasField(b))a.setField(b,this.assign(d,c,a.field(b)));else{if("\x3d"!==c)throw Error("Invalid Parameter");a.setField(b,this.assign(d,c,null))}}else{if(k.isImmutableArray(a))throw Error("Array is Immutable"); throw Error("Invalid Parameter");}},member:function(b,c){if(null===b)throw Error(a.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(b instanceof n||b instanceof h){if(k.isString(c))return b.field(c)}else if(b instanceof v){if(k.isString(c))return aa(b,c,"MemberExpression")}else if(k.isArray(b)){if(k.isNumber(c)&&isFinite(c)&&Math.floor(c)===c){0>c&&(c=b.length+c);if(c>=b.length||0>c)throw Error(a.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[c]}}else if(k.isString(b)){if(k.isNumber(c)&& isFinite(c)&&Math.floor(c)===c){0>c&&(c=b.length+c);if(c>=b.length||0>c)throw Error(a.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b[c]}}else if(k.isImmutableArray(b)&&k.isNumber(c)&&isFinite(c)&&Math.floor(c)===c){0>c&&(c=b.length()+c);if(c>=b.length()||0>c)throw Error(a.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return b.get(c)}throw Error(a.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(a,b,c){return a instanceof k.NativeFunction? a.fn(c,b):a instanceof k.SizzleFunction?a.fn.apply(this,b):a.apply(this,b)}};e.compileScript=function(a,b){void 0===b&&(b=null);null===b&&(b={vars:{},customfunctions:{}});b={globalScope:L(b.vars,V,b.customfunctions),localScope:null,console:Q,symbols:{symbolCounter:0}};a=A(b,a.body[0].body);""===a&&(a="lc.voidOperation;");b={lc:k,lang:N,postProcess:function(a){a instanceof k.ReturnResult&&(a=a.value);a instanceof k.ImplicitResult&&(a=a.value);a===k.voidOperation&&(a=null);if(a===k.breakResult)throw Error("Cannot return BREAK"); if(a===k.continueResult)throw Error("Cannot return CONTINUE");if(k.isFunctionParameter(a))throw Error("Cannot return FUNCTION");return a},prepare:function(a,b){b||(b=new u({wkid:102100}));var c=a.vars,d=a.customfunctions,g=new Y;c||(c={});d||(d={});var f=new n({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});f.immutable=!1;g._SymbolsMap={textformatting:1,infinity:1,pi:1};g.textformatting=f;g.infinity=Number.POSITIVE_INFINITY;g.pi=Math.PI;for(var e in d)g[e]= d[e],g._SymbolsMap[e]=1;for(e in c)g._SymbolsMap[e]=1,g[e]=c[e]&&"esri.Graphic"===c[e].declaredClass?h.createFromGraphic(c[e]):c[e];return{spatialReference:b,globalScope:g,localScope:null,console:a.console?a.console:Q,symbols:{symbolCounter:0},depthCounter:1,applicationCache:void 0===a.applicationCache?null:a.applicationCache}}};return(new Function("context","spatialReference","var runtimeCtx\x3dthis.prepare(context, spatialReference);\n var lc \x3d this.lc; var lang \x3d this.lang; var gscope\x3druntimeCtx.globalScope; \n function mainBody() {\n var lastStatement\x3dlc.voidOperation;\n "+ a+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(b)}})},"esri/arcade/Dictionary":function(){define(["require","exports","./ImmutableArray","./languageUtils","../geometry/Geometry"],function(b,e,n,h,l){return function(){function b(e){this.attributes=null;this.plain=!1;this.immutable=!0;this.attributes=e instanceof b?e.attributes:void 0===e?{}:null===e?{}:e}b.prototype.field=function(b){var a=b.toLowerCase();b=this.attributes[b];if(void 0!==b)return b;for(var f in this.attributes)if(f.toLowerCase()=== a)return this.attributes[f];throw Error("Field not Found");};b.prototype.setField=function(b,a){if(this.immutable)throw Error("Dictionary is Immutable");var f=b.toLowerCase();if(void 0===this.attributes[b])for(var d in this.attributes)if(d.toLowerCase()===f){this.attributes[d]=a;return}this.attributes[b]=a};b.prototype.hasField=function(b){var a=b.toLowerCase();if(void 0!==this.attributes[b])return!0;for(var f in this.attributes)if(f.toLowerCase()===a)return!0;return!1};b.prototype.keys=function(){var b= [],a;for(a in this.attributes)b.push(a);return b=b.sort()};b.prototype.castToText=function(){var b="",a;for(a in this.attributes){""!==b&&(b+=",");var f=this.attributes[a];null==f?b+=JSON.stringify(a)+":null":h.isBoolean(f)||h.isNumber(f)||h.isString(f)?b+=JSON.stringify(a)+":"+JSON.stringify(f):f instanceof l?b+=JSON.stringify(a)+":"+h.toStringExplicit(f):f instanceof n?b+=JSON.stringify(a)+":"+h.toStringExplicit(f):f instanceof Array?b+=JSON.stringify(a)+":"+h.toStringExplicit(f):f instanceof Date? b+=JSON.stringify(a)+":"+JSON.stringify(f):null!==f&&"object"===typeof f&&void 0!==f.castToText&&(b+=JSON.stringify(a)+":"+f.castToText())}return"{"+b+"}"};return b}()})},"esri/arcade/ImmutableArray":function(){define(["require","exports"],function(b,e){return function(){function b(b){void 0===b&&(b=[]);this._elements=b}b.prototype.length=function(){return this._elements.length};b.prototype.get=function(b){return this._elements[b]};b.prototype.toArray=function(){for(var b=[],e=0;eb;case "\x3c":return a=b;case "\x3c\x3d":return a<=b}return!1}function D(b,c){if(b===c||null===b&&c===e.voidOperation||null===c&&b===e.voidOperation)return!0;if(t(b)&&t(c))return b.getTime()===c.getTime();if(b instanceof a||b instanceof f)return b.equalityTest(c);if(b instanceof r&&c instanceof r){var d=void 0,g=void 0;e.isVersion4?(d=b.cache._arcadeCacheId, g=c.cache._arcadeCacheId):(d=b.getCacheValue("_arcadeCacheId"),g=c.getCacheValue("_arcadeCacheId"));if(void 0!==d&&null!==d)return d===g}return void 0!==b&&void 0!==c&&null!==b&&null!==c&&"object"===typeof b&&"object"===typeof c&&(b._arcadeCacheId===c._arcadeCacheId&&void 0!==b._arcadeCacheId&&null!==b._arcadeCacheId||b._underlyingGraphic===c._underlyingGraphic&&void 0!==b._underlyingGraphic&&null!==b._underlyingGraphic)?!0:!1}function H(a,b){if(p(a))return a;if(null===a)return"";if(g(a))return A(a, b);if(y(a))return a.toString();if(t(a))return C(a,b);if(a instanceof c)return JSON.stringify(a.toJSON());if(u(a)){b=[];for(var d=0;db.key?1:0});if(u(a)){b=[];for(var f=0;fc)throw Error("Function called with wrong number of Parameters");};e.generateUUID=function(){var a=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"===b?c:c&3|8).toString(16)})};e.formatNumber=A;e.formatDate=C;e.standardiseDateFormat=B;e.greaterThanLessThan=function(a,b,c){if(null===a){if(null===b||b===e.voidOperation)return F(null, null,c);if(g(b))return F(0,b,c);if(p(b)||y(b))return F(0,P(b),c);if(t(b))return F(0,b.getTime(),c)}if(a===e.voidOperation){if(null===b||b===e.voidOperation)return F(null,null,c);if(g(b))return F(0,b,c);if(p(b)||y(b))return F(0,P(b),c);if(t(b))return F(0,b.getTime(),c)}else if(g(a)){if(g(b))return F(a,b,c);if(y(b))return F(a,P(b),c);if(null===b||b===e.voidOperation)return F(a,0,c);if(p(b))return F(a,P(b),c);if(t(b))return F(a,b.getTime(),c)}else if(p(a)){if(p(b))return F(H(a),H(b),c);if(t(b))return F(P(a), b.getTime(),c);if(g(b))return F(P(a),b,c);if(null===b||b===e.voidOperation)return F(P(a),0,c);if(y(b))return F(P(a),P(b),c)}else if(t(a)){if(t(b))return F(a,b,c);if(null===b||b===e.voidOperation)return F(a.getTime(),0,c);if(g(b))return F(a.getTime(),b,c);if(y(b)||p(b))return F(a.getTime(),P(b),c)}else if(y(a)){if(y(b))return F(a,b,c);if(g(b))return F(P(a),P(b),c);if(t(b))return F(P(a),b.getTime(),c);if(null===b||b===e.voidOperation)return F(P(a),0,c);if(p(b))return F(P(a),P(b),c)}return!D(a,b)||"\x3c\x3d"!== c&&"\x3e\x3d"!==c?!1:!0};e.equalityTest=D;e.toString=H;e.toNumberArray=function(a){var b=[];if(!1===u(a))return null;if(a instanceof k){for(var c=0;cb.overflow&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.weekdayMismatch&&!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);a._strict&&(c=c&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(a))return c;a._isValid=c}return a._isValid}function x(a){var b=c(NaN);null!=a?d(q(b),a):q(b).userInvalidated=!0;return b}function z(a,b){var c,d,g;l(b._isAMomentObject)|| (a._isAMomentObject=b._isAMomentObject);l(b._i)||(a._i=b._i);l(b._f)||(a._f=b._f);l(b._l)||(a._l=b._l);l(b._strict)||(a._strict=b._strict);l(b._tzm)||(a._tzm=b._tzm);l(b._isUTC)||(a._isUTC=b._isUTC);l(b._offset)||(a._offset=b._offset);l(b._pf)||(a._pf=q(b));l(b._locale)||(a._locale=b._locale);if(0a?Math.ceil(a)||0:Math.floor(a)}function y(a){a=+a;var b=0;0!==a&&isFinite(a)&&(b=p(a));return b}function g(a,b,c){var d=Math.min(a.length,b.length),g=Math.abs(a.length-b.length),f=0,e;for(e=0;ef;f++)e=c([2E3,f]),b.push(this.monthsShort(e,"")),d.push(this.months(e,"")),g.push(this.months(e,"")),g.push(this.monthsShort(e,""));b.sort(a);d.sort(a);g.sort(a);for(f=0;12>f;f++)b[f]=V(b[f]),d[f]=V(d[f]);for(f=0;24>f;f++)g[f]=V(g[f]);this._monthsShortRegex=this._monthsRegex=new RegExp("^("+g.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+d.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+b.join("|")+")","i")}function Ca(a,b,c,d,g,f,e){b= new Date(a,b,c,d,g,f,e);100>a&&0<=a&&isFinite(b.getFullYear())&&b.setFullYear(a);return b}function sa(a){var b=new Date(Date.UTC.apply(null,arguments));100>a&&0<=a&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a);return b}function Ba(a,b,c){c=7+b-c;return-((7+sa(a,0,c).getUTCDay()-b)%7)+c-1}function wa(a,b,c,d,g){c=(7+c-d)%7;d=Ba(a,d,g);d=1+7*(b-1)+c+d;0>=d?(b=a-1,a=(N(b)?366:365)+d):d>(N(a)?366:365)?(b=a+1,a=d-(N(a)?366:365)):(b=a,a=d);return{year:b,dayOfYear:a}}function Da(a,b,c){var d=Ba(a.year(), b,c),d=Math.floor((a.dayOfYear()-d-1)/7)+1;1>d?(a=a.year()-1,b=d+Ga(a,b,c)):d>Ga(a.year(),b,c)?(b=d-Ga(a.year(),b,c),a=a.year()+1):(a=a.year(),b=d);return{week:b,year:a}}function Ga(a,b,c){var d=Ba(a,b,c);b=Ba(a+1,b,c);return((N(a)?366:365)-d+b)/7}function Sa(a,b,d){var g,f;a=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],g=0;7>g;++g)f=c([2E3,1]).day(g),this._minWeekdaysParse[g]=this.weekdaysMin(f,"").toLocaleLowerCase(), this._shortWeekdaysParse[g]=this.weekdaysShort(f,"").toLocaleLowerCase(),this._weekdaysParse[g]=this.weekdays(f,"").toLocaleLowerCase();if(d)b="dddd"===b?xa.call(this._weekdaysParse,a):"ddd"===b?xa.call(this._shortWeekdaysParse,a):xa.call(this._minWeekdaysParse,a);else if("dddd"===b){b=xa.call(this._weekdaysParse,a);if(-1!==b)return b;b=xa.call(this._shortWeekdaysParse,a);if(-1!==b)return b;b=xa.call(this._minWeekdaysParse,a)}else if("ddd"===b){b=xa.call(this._shortWeekdaysParse,a);if(-1!==b)return b; b=xa.call(this._weekdaysParse,a);if(-1!==b)return b;b=xa.call(this._minWeekdaysParse,a)}else{b=xa.call(this._minWeekdaysParse,a);if(-1!==b)return b;b=xa.call(this._weekdaysParse,a);if(-1!==b)return b;b=xa.call(this._shortWeekdaysParse,a)}return-1!==b?b:null}function ra(){function a(a,b){return b.length-a.length}var b=[],d=[],g=[],f=[],e,h,k,p;for(e=0;7>e;e++)h=c([2E3,1]).day(e),k=this.weekdaysMin(h,""),p=this.weekdaysShort(h,""),h=this.weekdays(h,""),b.push(k),d.push(p),g.push(h),f.push(k),f.push(p), f.push(h);b.sort(a);d.sort(a);g.sort(a);f.sort(a);for(e=0;7>e;e++)d[e]=V(d[e]),g[e]=V(g[e]),f[e]=V(f[e]);this._weekdaysMinRegex=this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+g.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+b.join("|")+")","i")}function da(){return this.hours()%12||12}function Aa(a,b){K(a,0,0,function(){return this.localeData().meridiem(this.hours(), this.minutes(),b)})}function Ma(a,b){return b._meridiemParse}function Wa(a){return a?a.toLowerCase().replace("_","-"):a}function Ka(a){var b=null;if(!ya[a]&&"undefined"!==typeof module&&module&&module.exports)try{b=pb._abbr,require("./locale/"+a),La(b)}catch(Wc){}return ya[a]}function La(a,b){a&&((b=l(b)?Fa(a):Ia(a,b))?pb=b:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+a+" not found. Did you forget to load it?"));return pb._abbr}function Ia(a,b){if(null!==b){var c;c=Zb;b.abbr= a;if(null!=ya[a])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=ya[a]._config;else if(null!=b.parentLocale)if(null!=ya[b.parentLocale])c=ya[b.parentLocale]._config;else if(c=Ka(b.parentLocale),null!=c)c=c._config;else return qb[b.parentLocale]||(qb[b.parentLocale]=[]),qb[b.parentLocale].push({name:a, config:b}),null;ya[a]=new F(B(c,b));qb[a]&&qb[a].forEach(function(a){Ia(a.name,a.config)});La(a);return ya[a]}delete ya[a];return null}function Fa(a){var b;a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr);if(!a)return pb;if(!e(a)){if(b=Ka(a))return b;a=[a]}a:{b=0;for(var c,d,f,h;b=c&&g(h,d,!0)>=c-1)break;c--}b++}a=pb}return a}function Za(a){var b; (b=a._a)&&-2===q(a).overflow&&(b=0>b[ab]||11b[Xa]||b[Xa]>la(b[Ua],b[ab])?Xa:0>b[za]||24b[Va]||59b[bb]||59b[ib]||999Xa)&&(b=Xa),q(a)._overflowWeeks&&-1===b&&(b=mc),q(a)._overflowWeekday&&-1===b&&(b=nc),q(a).overflow=b);return a}function Ja(a,b,c){return null!=a?a:null!=b?b:c}function Ra(a){var c,d=[],g;if(!a._d){g=new Date(b.now());g=a._useUTC?[g.getUTCFullYear(), g.getUTCMonth(),g.getUTCDate()]:[g.getFullYear(),g.getMonth(),g.getDate()];if(a._w&&null==a._a[Xa]&&null==a._a[ab]){var f,e,h,k,p,l;f=a._w;if(null!=f.GG||null!=f.W||null!=f.E){if(p=1,l=4,e=Ja(f.GG,a._a[Ua],Da(I(),1,4).year),h=Ja(f.W,1),k=Ja(f.E,1),1>k||7k||6f.e||6h||h>Ga(e,p,l)?q(a)._overflowWeeks=!0: null!=c?q(a)._overflowWeekday=!0:(c=wa(e,h,k,p,l),a._a[Ua]=c.year,a._dayOfYear=c.dayOfYear)}if(null!=a._dayOfYear){c=Ja(a._a[Ua],g[Ua]);if(a._dayOfYear>(N(c)?366:365)||0===a._dayOfYear)q(a)._overflowDayOfYear=!0;c=sa(c,0,a._dayOfYear);a._a[ab]=c.getUTCMonth();a._a[Xa]=c.getUTCDate()}for(c=0;3>c&&null==a._a[c];++c)a._a[c]=d[c]=g[c];for(;7>c;c++)a._a[c]=d[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[za]&&0===a._a[Va]&&0===a._a[bb]&&0===a._a[ib]&&(a._nextDay=!0,a._a[za]=0);a._d=(a._useUTC?sa:Ca).apply(null, d);d=a._useUTC?a._d.getUTCDay():a._d.getDay();null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm);a._nextDay&&(a._a[za]=24);a._w&&"undefined"!==typeof a._w.d&&a._w.d!==d&&(q(a).weekdayMismatch=!0)}}function R(a){var b,c;b=a._i;var d=oc.exec(b)||pc.exec(b),g,f,e,h;if(d){q(a).iso=!0;b=0;for(c=Ab.length;b=h?2E3+h:999>=h?1900+h:h,$b.indexOf(c),parseInt(d,10),parseInt(g,10),parseInt(f,10)];e&&c.push(parseInt(e,10));a:{if(e=b[1])if(e=ac.indexOf(e),d=(new Date(c[0],c[1],c[2])).getDay(), e!==d){q(a).weekdayMismatch=!0;e=a._isValid=!1;break a}e=!0}e&&(a._a=c,(e=b[8])?b=sc[e]:b[9]?b=0:(b=parseInt(b[10],10),e=b%100,b=(b-e)/100*60+e),a._tzm=b,a._d=sa.apply(null,a._a),a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),q(a).rfc2822=!0)}else a._isValid=!1}function va(a){var c=tc.exec(a._i);null!==c?a._d=new Date(+c[1]):(R(a),!1===a._isValid&&(delete a._isValid,Ha(a),!1===a._isValid&&(delete a._isValid,b.createFromInputFallback(a))))}function ea(a){if(a._f===b.ISO_8601)R(a);else if(a._f===b.RFC_2822)Ha(a); else{a._a=[];q(a).empty=!0;var c=""+a._i,d,g,e,h,k,p=c.length,l=0;e=O(a._f,a._locale).match(Yb)||[];for(d=0;d=a._a[za]&&!0===q(a).bigHour&& 0e&&(e+=12),p||12!==e||(e=0)));c[d]=e;Ra(a);Za(a)}}function Qa(b){if(!b._d){var c=aa(b._i);b._a=a([c.year,c.month,c.day||c.date,c.hour,c.minute,c.second,c.millisecond],function(a){return a&&parseInt(a,10)});Ra(b)}}function Na(a){var b=a._i,c=a._f;a._locale=a._locale||Fa(a._l); if(null===b||void 0===c&&""===b)return x({nullInput:!0});"string"===typeof b&&(a._i=b=a._locale.preparse(b));if(w(b))return new v(Za(b));if(k(b))a._d=b;else if(e(c)){var g,f,h;if(0===a._f.length)q(a).invalidFormat=!0,a._d=new Date(NaN);else{for(b=0;ba?-1*Math.round(-1*a):Math.round(a)}function W(a,b){K(a,0,0,function(){var a=this.utcOffset(),c="+";0>a&&(a=-a,c="-");return c+P(~~(a/60),2)+b+P(~~a%60,2)})}function Z(a,b){a=(b||"").match(a);if(null===a)return null;a=((a[a.length-1]||[])+"").match(uc)||["-",0,0];b=+(60*a[1])+y(a[2]);return 0=== b?0:"+"===a[0]?b:-b}function J(a,c){return c._isUTC?(c=c.clone(),a=(w(a)||k(a)?a.valueOf():I(a).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+a),b.updateOffset(c,!1),c):I(a).local()}function nb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Oa(a,b){var c=a,d=null;ia(a)?c={ms:a._milliseconds,d:a._days,M:a._months}:m(a)?(c={},b?c[b]=a:c.milliseconds=a):(d=vc.exec(a))?(c="-"===d[1]?-1:1,c={y:0,d:y(d[Xa])*c,h:y(d[za])*c,m:y(d[Va])*c,s:y(d[bb])*c,ms:y(na(1E3*d[ib]))*c}):(d=wc.exec(a))? (c="-"===d[1]?-1:1,c={y:$a(d[2],c),M:$a(d[3],c),w:$a(d[4],c),d:$a(d[5],c),h:$a(d[6],c),m:$a(d[7],c),s:$a(d[8],c)}):null==c?c={}:"object"===typeof c&&("from"in c||"to"in c)&&(d=I(c.from),c=I(c.to),d.isValid()&&c.isValid()?(c=J(c,d),d.isBefore(c)?c=wb(d,c):(c=wb(c,d),c.milliseconds=-c.milliseconds,c.months=-c.months),d=c):d={milliseconds:0,months:0},c={},c.ms=d.milliseconds,c.M=d.months);c=new ca(c);ia(a)&&f(a,"_locale")&&(c._locale=a._locale);return c}function $a(a,b){a=a&&parseFloat(a.replace(",", "."));return(isNaN(a)?0:a)*b}function wb(a,b){var c={milliseconds:0,months:0};c.months=b.month()-a.month()+12*(b.year()-a.year());a.clone().add(c.months,"M").isAfter(b)&&--c.months;c.milliseconds=+b-+a.clone().add(c.months,"M");return c}function Ta(a,b){return function(c,d){var g;null===d||isNaN(+d)||(A(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),g=c,c=d,d=g);c=Oa("string"=== typeof c?+c:c,d);yb(this,c,a);return this}}function yb(a,c,d,g){var f=c._milliseconds,e=na(c._days);c=na(c._months);a.isValid()&&(g=null==g?!0:g,c&&pa(a,ba(a,"Month")+c*d),e&&fa(a,"Date",ba(a,"Date")+e*d),f&&a._d.setTime(a._d.valueOf()+f*d),g&&b.updateOffset(a,e||c))}function tb(a,b){var c=12*(b.year()-a.year())+(b.month()-a.month()),d=a.clone().add(c,"months");0>b-d?(a=a.clone().add(c-1,"months"),b=(b-d)/(d-a)):(a=a.clone().add(c+1,"months"),b=(b-d)/(a-d));return-(c+b)||0}function ub(a){if(void 0=== a)return this._locale._abbr;a=Fa(a);null!=a&&(this._locale=a);return this}function mb(){return this._locale}function jb(a,b){K(0,[a,a.length],0,b)}function Qb(a,b,c,d,g){var f;if(null==a)return Da(this,d,g).year;f=Ga(a,d,g);b>f&&(b=f);a=wa(a,b,c,d,g);a=sa(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function kc(a,b){b[ib]=y(1E3*("0."+a))}function Rb(a){return a}function vb(a,b,d,g){var f=Fa();b=c().set(g,b);return f[d](b,a)} function Sb(a,b,c){m(a)&&(b=a,a=void 0);a=a||"";if(null!=b)return vb(a,b,c,"month");var d=[];for(b=0;12>b;b++)d[b]=vb(a,b,c,"month");return d}function Gb(a,b,c,d){"boolean"!==typeof a&&(c=b=a,a=!1);m(b)&&(c=b,b=void 0);b=b||"";var g=Fa();a=a?g._week.dow:0;if(null!=c)return vb(b,(c+a)%7,d,"day");g=[];for(c=0;7>c;c++)g[c]=vb(b,(c+a)%7,d,"day");return g}function Tb(a,b,c,d){b=Oa(b,c);a._milliseconds+=d*b._milliseconds;a._days+=d*b._days;a._months+=d*b._months;return a._bubble()}function Ub(a){return 0> a?Math.floor(a):Math.ceil(a)}function db(a){return function(){return this.as(a)}}function hb(a){return function(){return this.isValid()?this._data[a]:NaN}}function lc(a,b,c,d,g){return g.relativeTime(b||1,!!c,a,d)}function kb(a){return(0a)||+a}function xb(){if(!this.isValid())return this.localeData().invalidDate();var a=Nb(this._milliseconds)/1E3,b=Nb(this._days),c=Nb(this._months),d,g;d=p(a/60);g=p(d/60);a%=60;d%=60;var f=p(c/12),c=c%12,a=a?a.toFixed(3).replace(/\.?0+$/,""):"",e=this.asSeconds(); if(!e)return"P0D";var h=0>e?"-":"",k=kb(this._months)!==kb(e)?"-":"",l=kb(this._days)!==kb(e)?"-":"",e=kb(this._milliseconds)!==kb(e)?"-":"";return h+"P"+(f?k+f+"Y":"")+(c?k+c+"M":"")+(b?l+b+"D":"")+(g||d||a?"T":"")+(g?e+g+"H":"")+(d?e+d+"M":"")+(a?e+a+"S":"")}var Vb,Wb;Wb=Array.prototype.some?Array.prototype.some:function(a){for(var b=Object(this),c=b.length>>>0,d=0;d=a?""+a:"+"+a});K(0,["YY",2],0,function(){return this.year()%100});K(0,["YYYY",4],0,"year");K(0,["YYYYY",5],0,"year");K(0,["YYYYYY", 6,!0],0,"year");D("year","y");Ea.year=1;L("Y",Eb);L("YY",ua,Pa);L("YYYY",Pb,Ob);L("YYYYY",Db,Bb);L("YYYYYY",Db,Bb);U(["YYYYY","YYYYYY"],Ua);U("YYYY",function(a,c){c[Ua]=2===a.length?b.parseTwoDigitYear(a):y(a)});U("YY",function(a,c){c[Ua]=b.parseTwoDigitYear(a)});U("Y",function(a,b){b[Ua]=parseInt(a,10)});b.parseTwoDigitYear=function(a){return y(a)+(68this?this: a:x()}),rb="year quarter month week day hour minute second millisecond".split(" ");W("Z",":");W("ZZ","");L("Z",Fb);L("ZZ",Fb);U(["Z","ZZ"],function(a,b,c){c._useUTC=!0;c._tzm=Z(Fb,a)});var uc=/([\+\-]|\d\d)/gi;b.updateOffset=function(){};var vc=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,wc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Oa.fn=ca.prototype;Oa.invalid= function(){return Oa(NaN)};var Cc=Ta(1,"add"),Dc=Ta(-1,"subtract");b.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";b.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ic=t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});K(0,["gg",2],0,function(){return this.weekYear()%100});K(0,["GG",2],0,function(){return this.isoWeekYear()%100});jb("gggg","weekYear"); jb("ggggg","weekYear");jb("GGGG","isoWeekYear");jb("GGGGG","isoWeekYear");D("weekYear","gg");D("isoWeekYear","GG");Ea.weekYear=1;Ea.isoWeekYear=1;L("G",Eb);L("g",Eb);L("GG",ua,Pa);L("gg",ua,Pa);L("GGGG",Pb,Ob);L("gggg",Pb,Ob);L("GGGGG",Db,Bb);L("ggggg",Db,Bb);Y(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=y(a)});Y(["gg","GG"],function(a,c,d,g){c[g]=b.parseTwoDigitYear(a)});K("Q",0,"Qo","quarter");D("quarter","Q");Ea.quarter=7;L("Q",cc);U("Q",function(a,b){b[ab]=3*(y(a)-1)}); K("D",["DD",2],"Do","date");D("date","D");Ea.date=9;L("D",ua);L("DD",ua,Pa);L("Do",function(a,b){return a?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient});U(["D","DD"],Xa);U("Do",function(a,b){b[Xa]=y(a.match(ua)[0])});var jc=T("Date",!0);K("DDD",["DDDD",3],"DDDo","dayOfYear");D("dayOfYear","DDD");Ea.dayOfYear=4;L("DDD",Cb);L("DDDD",dc);U(["DDD","DDDD"],function(a,b,c){c._dayOfYear=y(a)});K("m",["mm",2],0,"minute");D("minute","m");Ea.minute=14;L("m",ua);L("mm",ua,Pa); U(["m","mm"],Va);var Ec=T("Minutes",!1);K("s",["ss",2],0,"second");D("second","s");Ea.second=15;L("s",ua);L("ss",ua,Pa);U(["s","ss"],bb);var Fc=T("Seconds",!1);K("S",0,0,function(){return~~(this.millisecond()/100)});K(0,["SS",2],0,function(){return~~(this.millisecond()/10)});K(0,["SSS",3],0,"millisecond");K(0,["SSSS",4],0,function(){return 10*this.millisecond()});K(0,["SSSSS",5],0,function(){return 100*this.millisecond()});K(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});K(0,["SSSSSSS", 7],0,function(){return 1E4*this.millisecond()});K(0,["SSSSSSSS",8],0,function(){return 1E5*this.millisecond()});K(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});D("millisecond","ms");Ea.millisecond=16;L("S",Cb,cc);L("SS",Cb,Pa);L("SSS",Cb,dc);var fb;for(fb="SSSS";9>=fb.length;fb+="S")L(fb,xc);for(fb="S";9>=fb.length;fb+="S")U(fb,kc);var Gc=T("Milliseconds",!1);K("z",0,0,"zoneAbbr");K("zz",0,0,"zoneName");var S=v.prototype;S.add=Cc;S.calendar=function(a,c){a=a||I();var d=J(a,this).startOf("day"), d=b.calendarFormat(this,d)||"sameElse";c=c&&(C(c[d])?c[d].call(this,a):c[d]);return this.format(c||this.localeData().calendar(d,this,I(a)))};S.clone=function(){return new v(this)};S.diff=function(a,b,c){var d;if(!this.isValid())return NaN;a=J(a,this);if(!a.isValid())return NaN;d=6E4*(a.utcOffset()-this.utcOffset());b=H(b);switch(b){case "year":b=tb(this,a)/12;break;case "month":b=tb(this,a);break;case "quarter":b=tb(this,a)/3;break;case "second":b=(this-a)/1E3;break;case "minute":b=(this-a)/6E4;break; case "hour":b=(this-a)/36E5;break;case "day":b=(this-a-d)/864E5;break;case "week":b=(this-a-d)/6048E5;break;default:b=this-a}return c?b:p(b)};S.endOf=function(a){a=H(a);if(void 0===a||"millisecond"===a)return this;"date"===a&&(a="day");return this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")};S.format=function(a){a||(a=this.isUtc()?b.defaultFormatUtc:b.defaultFormat);a=X(this,a);return this.localeData().postformat(a)};S.from=function(a,b){return this.isValid()&&(w(a)&&a.isValid()||I(a).isValid())? Oa({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};S.fromNow=function(a){return this.from(I(),a)};S.to=function(a,b){return this.isValid()&&(w(a)&&a.isValid()||I(a).isValid())?Oa({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};S.toNow=function(a){return this.to(I(),a)};S.get=function(a){a=H(a);return C(this[a])?this[a]():this};S.invalidAt=function(){return q(this).overflow};S.isAfter=function(a,b){a=w(a)?a:I(a);if(!this.isValid()|| !a.isValid())return!1;b=H(l(b)?"millisecond":b);return"millisecond"===b?this.valueOf()>a.valueOf():a.valueOf()b.year()||9999=this.year()?"YYYY":"YYYYYY";return this.format(a+c+"-MM-DD[T]HH:mm:ss.SSS"+(b+'[")]'))};S.toJSON=function(){return this.isValid()?this.toISOString():null};S.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};S.unix=function(){return Math.floor(this.valueOf()/1E3)};S.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};S.creationData=function(){return{input:this._i,format:this._f, locale:this._locale,isUTC:this._isUTC,strict:this._strict}};S.year=gc;S.isLeapYear=function(){return N(this.year())};S.weekYear=function(a){return Qb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};S.isoWeekYear=function(a){return Qb.call(this,a,this.isoWeek(),this.isoWeekday(),1,4)};S.quarter=S.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)};S.month=ha;S.daysInMonth=function(){return la(this.year(), this.month())};S.week=S.weeks=function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")};S.isoWeek=S.isoWeeks=function(a){var b=Da(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")};S.weeksInYear=function(){var a=this.localeData()._week;return Ga(this.year(),a.dow,a.doy)};S.isoWeeksInYear=function(){return Ga(this.year(),1,4)};S.date=jc;S.day=S.days=function(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!= a){var c=this.localeData();"string"===typeof a&&(isNaN(a)?(a=c.weekdaysParse(a),a="number"===typeof a?a:null):a=parseInt(a,10));return this.add(a-b,"d")}return b};S.weekday=function(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")};S.isoWeekday=function(a){if(!this.isValid())return null!=a?this:NaN;if(null!=a){var b=this.localeData();a="string"===typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a;return this.day(this.day()% 7?a:a-7)}return this.day()||7};S.dayOfYear=function(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")};S.hour=S.hours=zc;S.minute=S.minutes=Ec;S.second=S.seconds=Fc;S.millisecond=S.milliseconds=Gc;S.utcOffset=function(a,c,d){var g=this._offset||0,f;if(!this.isValid())return null!=a?this:NaN;if(null!=a){if("string"===typeof a){if(a=Z(Fb,a),null===a)return this}else 16>Math.abs(a)&&!d&&(a*=60);!this._isUTC&&c&&(f=15*-Math.round(this._d.getTimezoneOffset()/ 15));this._offset=a;this._isUTC=!0;null!=f&&this.add(f,"m");g!==a&&(!c||this._changeInProgress?yb(this,Oa(a-g,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,b.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?g:15*-Math.round(this._d.getTimezoneOffset()/15)};S.utc=function(a){return this.utcOffset(0,a)};S.local=function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(15*-Math.round(this._d.getTimezoneOffset()/15),"m"));return this}; S.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var a=Z(yc,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this};S.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?I(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};S.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};S.isLocal=function(){return this.isValid()?!this._isUTC:!1}; S.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};S.isUtc=nb;S.isUTC=nb;S.zoneAbbr=function(){return this._isUTC?"UTC":""};S.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};S.dates=t("dates accessor is deprecated. Use date instead.",jc);S.months=t("months accessor is deprecated. Use month instead",ha);S.years=t("years accessor is deprecated. Use year instead",gc);S.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", function(a,b){return null!=a?("string"!==typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()});S.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var a={};z(a,this);a=Na(a);if(a._a){var b=a._isUTC?c(a._a):I(a._a);this._isDSTShifted=this.isValid()&&0g;++g)f= c([2E3,g]),this._shortMonthsParse[g]=this.monthsShort(f,"").toLocaleLowerCase(),this._longMonthsParse[g]=this.months(f,"").toLocaleLowerCase();if(d)b="MMM"===b?xa.call(this._shortMonthsParse,a):xa.call(this._longMonthsParse,a);else if("MMM"===b){b=xa.call(this._shortMonthsParse,a);if(-1!==b)break a;b=xa.call(this._longMonthsParse,a)}else{b=xa.call(this._longMonthsParse,a);if(-1!==b)break a;b=xa.call(this._shortMonthsParse,a)}b=-1!==b?b:null}return b}this._monthsParse||(this._monthsParse=[],this._longMonthsParse= [],this._shortMonthsParse=[]);for(g=0;12>g;g++)if(f=c([2E3,g]),d&&!this._longMonthsParse[g]&&(this._longMonthsParse[g]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[g]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),d||this._monthsParse[g]||(f="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[g]=new RegExp(f.replace(".",""),"i")),d&&"MMMM"===b&&this._longMonthsParse[g].test(a)||d&&"MMM"===b&&this._shortMonthsParse[g].test(a)||!d&& this._monthsParse[g].test(a))return g};ta.monthsRegex=function(a){if(this._monthsParseExact)return f(this,"_monthsRegex")||qa.call(this),a?this._monthsStrictRegex:this._monthsRegex;f(this,"_monthsRegex")||(this._monthsRegex=sb);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};ta.monthsShortRegex=function(a){if(this._monthsParseExact)return f(this,"_monthsRegex")||qa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;f(this,"_monthsShortRegex")||(this._monthsShortRegex= sb);return this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex};ta.week=function(a){return Da(a,this._week.dow,this._week.doy).week};ta.firstDayOfYear=function(){return this._week.doy};ta.firstDayOfWeek=function(){return this._week.dow};ta.weekdays=function(a,b){return a?e(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:e(this._weekdays)?this._weekdays:this._weekdays.standalone};ta.weekdaysMin=function(a){return a? this._weekdaysMin[a.day()]:this._weekdaysMin};ta.weekdaysShort=function(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort};ta.weekdaysParse=function(a,b,d){var g,f;if(this._weekdaysParseExact)return Sa.call(this,a,b,d);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(g=0;7>g;g++)if(f=c([2E3,1]).day(g),d&&!this._fullWeekdaysParse[g]&&(this._fullWeekdaysParse[g]=new RegExp("^"+this.weekdays(f,"").replace(".", ".?")+"$","i"),this._shortWeekdaysParse[g]=new RegExp("^"+this.weekdaysShort(f,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[g]=new RegExp("^"+this.weekdaysMin(f,"").replace(".",".?")+"$","i")),this._weekdaysParse[g]||(f="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[g]=new RegExp(f.replace(".",""),"i")),d&&"dddd"===b&&this._fullWeekdaysParse[g].test(a)||d&&"ddd"===b&&this._shortWeekdaysParse[g].test(a)||d&&"dd"===b&&this._minWeekdaysParse[g].test(a)|| !d&&this._weekdaysParse[g].test(a))return g};ta.weekdaysRegex=function(a){if(this._weekdaysParseExact)return f(this,"_weekdaysRegex")||ra.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;f(this,"_weekdaysRegex")||(this._weekdaysRegex=sb);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};ta.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return f(this,"_weekdaysRegex")||ra.call(this),a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;f(this, "_weekdaysShortRegex")||(this._weekdaysShortRegex=sb);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};ta.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return f(this,"_weekdaysRegex")||ra.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=sb);return this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};ta.isPM=function(a){return"p"===(a+"").toLowerCase().charAt(0)}; ta.meridiem=function(a,b,c){return 11=a&&0>=b&&0>=c||(a+=864E5*Ub(146097*c/4800+b),c=b=0);d.milliseconds=a%1E3;a=p(a/1E3);d.seconds= a%60;a=p(a/60);d.minutes=a%60;a=p(a/60);d.hours=a%24;b+=p(a/24);a=p(4800*b/146097);c+=a;b-=Ub(146097*a/4800);a=p(c/12);d.days=b;d.months=c%12;d.years=a;return this};oa.clone=function(){return Oa(this)};oa.get=function(a){a=H(a);return this.isValid()?this[a+"s"]():NaN};oa.milliseconds=Pc;oa.seconds=Qc;oa.minutes=Rc;oa.hours=Sc;oa.days=Tc;oa.weeks=function(){return p(this.days()/7)};oa.months=Uc;oa.years=Vc;oa.humanize=function(a){if(!this.isValid())return this.localeData().invalidDate();var b=this.localeData(), c;c=!a;var d=Oa(this).abs(),g=gb(d.as("s")),f=gb(d.as("m")),e=gb(d.as("h")),h=gb(d.as("d")),k=gb(d.as("M")),d=gb(d.as("y")),g=g<=Ya.ss&&["s",g]||g=f&&["m"]||f=e&&["h"]||e=h&&["d"]||h=k&&["M"]||k=d&&["y"]||["yy",d];g[2]=c;g[3]=0<+this;g[4]=b;c=lc.apply(null,g);a&&(c=b.pastFuture(+this,c));return b.postformat(c)};oa.toISOString=xb;oa.toString=xb;oa.toJSON=xb;oa.locale=ub;oa.localeData=mb;oa.toIsoString=t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", xb);oa.lang=ic;K("X",0,0,"unix");K("x",0,0,"valueOf");L("x",Eb);L("X",/[+-]?\d+(\.\d{1,3})?/);U("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))});U("x",function(a,b,c){c._d=new Date(y(a))});b.version="2.22.1";Vb=I;b.fn=S;b.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)};b.max=function(){var a=[].slice.call(arguments,0);return ma("isAfter",a)};b.now=function(){return Date.now?Date.now():+new Date};b.utc=c;b.unix=function(a){return I(1E3*a)};b.months=function(a,b){return Sb(a, b,"months")};b.isDate=k;b.locale=La;b.invalid=x;b.duration=Oa;b.isMoment=w;b.weekdays=function(a,b,c){return Gb(a,b,c,"weekdays")};b.parseZone=function(){return I.apply(null,arguments).parseZone()};b.localeData=Fa;b.isDuration=ia;b.monthsShort=function(a,b){return Sb(a,b,"monthsShort")};b.weekdaysMin=function(a,b,c){return Gb(a,b,c,"weekdaysMin")};b.defineLocale=Ia;b.updateLocale=function(a,b){if(null!=b){var c,d=Zb;c=Ka(a);null!=c&&(d=c._config);b=B(d,b);b=new F(b);b.parentLocale=ya[a];ya[a]=b;La(a)}else null!= ya[a]&&(null!=ya[a].parentLocale?ya[a]=ya[a].parentLocale:null!=ya[a]&&delete ya[a]);return ya[a]};b.locales=function(){return bc(ya)};b.weekdaysShort=function(a,b,c){return Gb(a,b,c,"weekdaysShort")};b.normalizeUnits=H;b.relativeTimeRounding=function(a){return void 0===a?gb:"function"===typeof a?(gb=a,!0):!1};b.relativeTimeThreshold=function(a,b){if(void 0===Ya[a])return!1;if(void 0===b)return Ya[a];Ya[a]=b;"s"===a&&(Ya.ss=b-1);return!0};b.calendarFormat=function(a,b){a=a.diff(b,"days",!0);return-6> a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse"};b.prototype=S;b.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"};return b})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(b,e){return function(){return function(b,e){this.context= this.definition=null;this.definition=b;this.context=e}}()})},"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray","./ImmutablePointArray"],function(b,e,n,h,l){return function(b){function e(a,f,d,c,e){a=b.call(this,a)||this;a._lazyPath=[];a._hasZ=!1;a._hasM=!1;a._hasZ=d;a._hasM=c;a._spRef=f;a._cacheId=e;return a}n(e,b);e.prototype.get=function(a){if(void 0===this._lazyPath[a]){var b=this._elements[a];if(void 0===b)return;this._lazyPath[a]= new l(b,this._spRef,this._hasZ,this._hasM,this._cacheId,a)}return this._lazyPath[a]};e.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof e?!1:a.getUniqueHash()===this.getUniqueHash()};e.prototype.getUniqueHash=function(){return this._cacheId.toString()};return e}(h)})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ../kernel ./ImmutableArray ../geometry/Point".split(" "),function(b,e,n,h,l,m){var k=0===h.version.indexOf("4."); return function(a){function b(b,c,f,e,h,k){b=a.call(this,b)||this;b._lazyPt=[];b._hasZ=!1;b._hasM=!1;b._spRef=c;b._hasZ=f;b._hasM=e;b._cacheId=h;b._partId=k;return b}n(b,a);b.prototype.get=function(a){if(void 0===this._lazyPt[a]){var b=this._elements[a];if(void 0===b)return;var d=this._hasZ,f=this._hasM,e=null,e=d&&!f?new m(b[0],b[1],b[2],void 0,this._spRef):f&&d?new m(b[0],b[1],void 0,b[2],this._spRef):d&&f?new m(b[0],b[1],b[2],b[3],this._spRef):new m(b[0],b[1],this._spRef);k?e.cache._arcadeCacheId= this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString():e.setCacheValue("_arcadeCacheId",this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString());this._lazyPt[a]=e}return this._lazyPt[a]};b.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof b?!1:a.getUniqueHash()===this.getUniqueHash()};b.prototype.getUniqueHash=function(){return this._cacheId.toString()+"-"+this._partId.toString()};return b}(l)})},"esri/arcade/Feature":function(){define("require exports ../core/tsSupport/assignHelper ./Dictionary ./ImmutableArray ./languageUtils ../geometry/Geometry ../geometry/Point ../geometry/support/jsonUtils".split(" "), function(b,e,n,h,l,m,k,a,f){return function(){function b(){this.declaredClass="esri.arcade.Feature";this._layer=this.attributes=this._geometry=null;this.immutable=this.immutable=this._datesfixed=!0}b.createFromGraphic=function(a){var c=new b;c._geometry=a.geometry;c.attributes=void 0===a.attributes?{}:null===a.attributes?{}:a.attributes;a._sourceLayer?(c._layer=a._sourceLayer,c._datesfixed=!1):a._layer?(c._layer=a._layer,c._datesfixed=!1):a.layer&&(c._layer=a.layer,c._datesfixed=!1);return c};b.createFromArcadeFeature= function(a){var c=new b;c._datesfixed=a._datesfixed;c.attributes=a.attributes;c._geometry=a._geometry;a._layer&&(c._layer=a._layer);return c};b.createFromArcadeDictionary=function(a){var c=new b;c.attributes=a.field("attributes");null!==c.attributes?c.attributes instanceof h?(c.attributes=c.attributes.attributes,null===c.attributes&&(c.attributes={})):c.attributes={}:c.attributes={};c._geometry=a.field("geometry");null!==c._geometry&&(c._geometry instanceof h?c._geometry=b.parseGeometryFromDictionary(c._geometry): c._geometry instanceof k||(c._geometry=null));return c};b.createFromGraphicLikeObject=function(a,d,f){void 0===f&&(f=null);var c=new b;null===d&&(d={});c.attributes=d;c._geometry=a;c._layer=f;c._layer&&(c._datesfixed=!1);return c};b.prototype.repurposeFromGraphicLikeObject=function(a,b,d){void 0===d&&(d=null);null===b&&(b={});this.attributes=b;this._geometry=a;this._datesfixed=(this._layer=d)?!1:!0};b.prototype.castToText=function(){var a="",b;for(b in this.attributes){""!==a&&(a+=",");var d=this.attributes[b]; null==d?a+=JSON.stringify(b)+":null":m.isBoolean(d)||m.isNumber(d)||m.isString(d)?a+=JSON.stringify(b)+":"+JSON.stringify(d):d instanceof k?a+=JSON.stringify(b)+":"+m.toStringExplicit(d):d instanceof l?a+=JSON.stringify(b)+":"+m.toStringExplicit(d):d instanceof Array?a+=JSON.stringify(b)+":"+m.toStringExplicit(d):d instanceof Date?a+=JSON.stringify(b)+":"+JSON.stringify(d):null!==d&&"object"===typeof d&&void 0!==d.castToText&&(a+=JSON.stringify(b)+":"+d.castToText())}return'{"geometry":'+(null=== this.geometry()?"null":m.toStringExplicit(this.geometry()))+',"attributes":{'+a+"}}"};b.prototype._fixDates=function(){for(var a=[],b=0;bNumber(a.max)?-2:1}function h(a,b,c){if(null!==c.localScope&&void 0!==c.localScope[a.toLowerCase()]){var d=c.localScope[a.toLowerCase()];if("FormulaFunction"===d.type||"any"===d.type)return void 0===d.signature&&(d.signature={min:"0",max:"*"}),n(d.signature,a,b,c)}return void 0!==c.globalScope[a.toLowerCase()]&&(d=c.globalScope[a.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&(d.signature={min:"0", max:"*"}),n(d.signature,a,b,c)):-1}function l(a,b){void 0===b&&(b=!0);var c=r(a,"SYNTAX","UNREOGNISED");try{switch(a.type){case "VariableDeclarator":return null!==a.init&&"FunctionExpression"===a.init.type?r(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==a.id.type?r(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==a.init?l(a.init,!1):"";case "VariableDeclaration":for(var d=0;d=b)throw Error("Illegal Argument");return f[0]instanceof c||f[0]instanceof q?v.densify(f[0],b,h.convertLinearUnitsToCode(l.defaultUndefined(f[2],-1))):f[0]instanceof k?v.densify(z(f[0]),b,h.convertLinearUnitsToCode(l.defaultUndefined(f[2],-1))):f[0]})};b.densifygeodetic= function(b,d){return e(b,d,function(b,d,f){f=l.autoCastFeatureToGeometry(f);l.pcCheck(f,2,3);if(null===f[0])return null;if(!(f[0]instanceof a))throw Error("Illegal Argument");b=l.toNumber(f[1]);if(isNaN(b))throw Error("Illegal Argument");if(0>=b)throw Error("Illegal Argument");return f[0]instanceof c||f[0]instanceof q?v.geodesicDensify(f[0],b,h.convertLinearUnitsToCode(l.defaultUndefined(f[2],-1))):f[0]instanceof k?v.geodesicDensify(z(f[0]),b,h.convertLinearUnitsToCode(l.defaultUndefined(f[2],-1))): f[0]})};b.generalize=function(b,c){return e(b,c,function(b,c,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,4);if(null===d[0])return null;if(!(d[0]instanceof a))throw Error("Illegal Argument");b=l.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");return v.generalize(d[0],b,l.toBoolean(l.defaultUndefined(d[2],!0)),h.convertLinearUnitsToCode(l.defaultUndefined(d[3],-1)))})};b.buffer=function(b,c){return e(b,c,function(b,c,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,3);if(null===d[0])return null; if(!(d[0]instanceof a))throw Error("Illegal Argument");b=l.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");return 0===b?x(d[0]):v.buffer(d[0],b,h.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)))})};b.buffergeodetic=function(b,c){return e(b,c,function(b,c,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,3);if(null===d[0])return null;if(!(d[0]instanceof a))throw Error("Illegal Argument");b=l.toNumber(d[1]);if(isNaN(b))throw Error("Illegal Argument");return 0===b?x(d[0]):v.geodesicBuffer(d[0], b,h.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)))})};b.offset=function(a,b){return e(a,b,function(a,b,d){d=l.autoCastFeatureToGeometry(d);l.pcCheck(d,2,6);if(null===d[0])return null;if(!(d[0]instanceof c||d[0]instanceof q))throw Error("Illegal Argument");a=l.toNumber(d[1]);if(isNaN(a))throw Error("Illegal Argument");b=l.toNumber(l.defaultUndefined(d[4],10));if(isNaN(b))throw Error("Illegal Argument");var f=l.toNumber(l.defaultUndefined(d[5],0));if(isNaN(f))throw Error("Illegal Argument"); return v.offset(d[0],a,h.convertLinearUnitsToCode(l.defaultUndefined(d[2],-1)),l.toString(l.defaultUndefined(d[3],"round")).toLowerCase(),b,f)})};b.rotate=function(b,f){return e(b,f,function(b,f,e){e=l.autoCastFeatureToGeometry(e);l.pcCheck(e,2,3);b=e[0];if(null===b)return null;if(!(b instanceof a))throw Error("Illegal Argument");b instanceof k&&(b=c.fromExtent(b));f=l.toNumber(e[1]);if(isNaN(f))throw Error("Illegal Argument");e=l.defaultUndefined(e[2],null);if(null===e)return v.rotate(b,f);if(e instanceof d)return v.rotate(b,f,e);throw Error("Illegal Argument");})};b.centroid=function(b,g){return e(b,g,function(e,g,h){h=l.autoCastFeatureToGeometry(h);l.pcCheck(h,1,1);if(null===h[0])return null;if(!(h[0]instanceof a))throw Error("Illegal Argument");return h[0]instanceof d?l.fixSpatialReference(x(h[0]),b.spatialReference):h[0]instanceof c?w?h[0].centroid:h[0].getCentroid():h[0]instanceof q?m.centroidPolyline(h[0]):h[0]instanceof f?m.centroidMultiPoint(h[0]):h[0]instanceof k?w?h[0].center:h[0].getExtent().getCenter(): null})};b.multiparttosinglepart=function(b,g){return e(b,g,function(e,g,h){h=l.autoCastFeatureToGeometry(h);l.pcCheck(h,1,1);g=[];if(null===h[0])return null;if(!(h[0]instanceof a))throw Error("Illegal Argument");if(h[0]instanceof d||h[0]instanceof k)return[l.fixSpatialReference(x(h[0]),b.spatialReference)];e=v.simplify(h[0]);if(e instanceof c){g=[];var m=[];for(h=0;h=x.length)x=0;else{for(var v=0,w=1;wc?NaN:ac?c:a}b.number=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,2);a=d[0];return h.isNumber(a)?a:null===a?0:h.isDate(a)||h.isBoolean(a)?Number(a):h.isArray(a)?NaN:""===a||void 0===a?Number(a):h.isString(a)?void 0!==d[1]?(d=h.multiReplace(d[1],"\u2030",""),d=h.multiReplace(d,"\u00a4",""),n.parse(a,{pattern:d})):Number(a.trim()):Number(a)})};b.abs=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.abs(h.toNumber(d[0]))})}; b.acos=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.acos(h.toNumber(d[0]))})};b.asin=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.asin(h.toNumber(d[0]))})};b.atan=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.atan(h.toNumber(d[0]))})};b.atan2=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,2,2);return Math.atan2(h.toNumber(d[0]),h.toNumber(d[1]))})};b.ceil=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d, 1,2);return 2===d.length?(a=h.toNumber(d[1]),isNaN(a)&&(a=0),l("ceil",h.toNumber(d[0]),-1*a)):Math.ceil(h.toNumber(d[0]))})};b.round=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,2);return 2===d.length?(a=h.toNumber(d[1]),isNaN(a)&&(a=0),l("round",h.toNumber(d[0]),-1*a)):Math.round(h.toNumber(d[0]))})};b.floor=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,2);return 2===d.length?(a=h.toNumber(d[1]),isNaN(a)&&(a=0),l("floor",h.toNumber(d[0]),-1*a)):Math.floor(h.toNumber(d[0]))})}; b.cos=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.cos(h.toNumber(d[0]))})};b.isnan=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return"number"===typeof d[0]&&isNaN(d[0])})};b.exp=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.exp(h.toNumber(d[0]))})};b.log=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.log(h.toNumber(d[0]))})};b.pow=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,2,2);return Math.pow(h.toNumber(d[0]), h.toNumber(d[1]))})};b.random=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,0,0);return Math.random()})};b.sin=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.sin(h.toNumber(d[0]))})};b.sqrt=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.sqrt(h.toNumber(d[0]))})};b.tan=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return Math.tan(h.toNumber(d[0]))})};b.defaultvalue=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,2,2);return null=== d[0]||""===d[0]||void 0===d[0]?d[1]:d[0]})};b.isempty=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return null===d[0]||""===d[0]||void 0===d[0]?!0:!1})};b["boolean"]=function(a,b){return e(a,b,function(a,b,d){h.pcCheck(d,1,1);return h.toBoolean(d[0])})};b.constrain=function(b,d){return e(b,d,function(b,d,f){h.pcCheck(f,3,3);b=h.toNumber(f[1]);d=h.toNumber(f[2]);if(h.isArray(f[0])){var c=[],e=0;for(f=f[0];e=b&&-1!==b){e=a;break a}}e=a}return e;case "avg":case "mean":return h(n.toNumberArray(e));case "min":return Math.min.apply(Math,n.toNumberArray(e));case "sum":e=n.toNumberArray(e);for(a=b=0;aa&&(a=0);if(2===c.length)return h.toString(c[0]).substr(a);b=h.toNumber(c[2]);if(isNaN(b))return"";0>b&&(b=0);return h.toString(c[0]).substr(a,b)})};b.find=function(b,a){return e(b,a,function(a,b,c){h.pcCheck(c,2,3);a=0;if(2a&&(a=0)}return h.toString(c[1]).indexOf(h.toString(c[0]),a)})};b.left=function(b,a){return e(b,a,function(a,b,c){h.pcCheck(c,2,2);a=h.toNumber(c[1]);if(isNaN(a))return"";0>a&&(a=0);return h.toString(c[0]).substr(0,a)})};b.right=function(b,a){return e(b,a,function(a,b,c){h.pcCheck(c,2,2);a=h.toNumber(c[1]);if(isNaN(a))return"";0>a&&(a=0);return h.toString(c[0]).substr(-1*a,a)})};b.split=function(b,a){return e(b,a,function(a,b,c){h.pcCheck(c,2,4);a=h.toNumber(h.defaultUndefined(c[2],-1));b=h.toBoolean(h.defaultUndefined(c[3], !1));-1===a||null===a||!0===b?c=h.toString(c[0]).split(h.toString(c[1])):(isNaN(a)&&(a=-1),-1>a&&(a=-1),c=h.toString(c[0]).split(h.toString(c[1]),a));if(!1===b)return c;b=[];for(var d=0;d=a);d++)""!==c[d]&&void 0!==c[d]&&b.push(c[d]);return b})};b.text=function(b,a){return e(b,a,function(a,b,c){h.pcCheck(c,1,2);return h.toStringExplicit(c[0],c[1])})};b.concatenate=function(b,a){return e(b,a,function(a,b,c){a=[];if(1>c.length)return"";if(h.isArray(c[0])){b=h.defaultUndefined(c[2], "");for(var d=0;dw&&(w=g.length+w);if(0>w||w>g.length)throw Error("Assignment outside of array bounds"); if(w===g.length&&"\x3d"!==c.operator)throw Error("Invalid Parameter");g[w]=D(x,c.operator,g[w],c)}else throw Error("Invalid Parameter");else if(g instanceof n){if(!1===a.isString(w))throw Error("Dictionary accessor must be a string");if(!0===g.hasField(w))g.setField(w,D(x,c.operator,g.field(w),c));else{if("\x3d"!==c.operator)throw Error("Invalid Parameter");g.setField(w,D(x,c.operator,null,c))}}else if(g instanceof h){if(!1===a.isString(w))throw Error("Feature accessor must be a string");if(!0=== g.hasField(w))g.setField(w,D(x,c.operator,g.field(w),c));else{if("\x3d"!==c.operator)throw Error("Invalid Parameter");g.setField(w,D(x,c.operator,null,c))}}else{if(a.isImmutableArray(g))throw Error("Array is Immutable");throw Error("Invalid Parameter");}z=a.voidOperation}else if(g=c.left.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[g])b.localScope[g]={value:D(x,c.operator,b.localScope[g].value,c),valueset:!0,node:c.right},z=a.voidOperation;else if(void 0!==b.globalScope[g])b.globalScope[g]= {value:D(x,c.operator,b.globalScope[g].value,c),valueset:!0,node:c.right},z=a.voidOperation;else throw Error("Variable not recognised");return z;case "UpdateExpression":var A;var C,g=null,w="";if("MemberExpression"===c.argument.type){g=B(b,c.argument.object);w=!0===c.argument.computed?B(b,c.argument.property):c.argument.property.name;if(a.isArray(g))if(a.isNumber(w)){0>w&&(w=g.length+w);if(0>w||w>=g.length)throw Error("Assignment outside of array bounds");C=a.toNumber(g[w]);g[w]="++"===c.operator? C+1:C-1}else throw Error("Invalid Parameter");else if(g instanceof n){if(!1===a.isString(w))throw Error("Dictionary accessor must be a string");if(!0===g.hasField(w))C=a.toNumber(g.field(w)),g.setField(w,"++"===c.operator?C+1:C-1);else throw Error("Invalid Parameter");}else if(g instanceof h){if(!1===a.isString(w))throw Error("Feature accessor must be a string");if(!0===g.hasField(w))C=a.toNumber(g.field(w)),g.setField(w,"++"===c.operator?C+1:C-1);else throw Error("Invalid Parameter");}else{if(a.isImmutableArray(g))throw Error("Array is Immutable"); throw Error("Invalid Parameter");}A=!1===c.prefix?C:"++"===c.operator?C+1:C-1}else if(g=c.argument.name.toLowerCase(),null!==b.localScope&&void 0!==b.localScope[g])C=a.toNumber(b.localScope[g].value),b.localScope[g]={value:"++"===c.operator?C+1:C-1,valueset:!0,node:c},A=!1===c.prefix?C:"++"===c.operator?C+1:C-1;else if(void 0!==b.globalScope[g])C=a.toNumber(b.globalScope[g].value),b.globalScope[g]={value:"++"===c.operator?C+1:C-1,valueset:!0,node:c},A=!1===c.prefix?C:"++"===c.operator?C+1:C-1;else throw Error("Variable not recognised"); return A;case "BreakStatement":return a.breakResult;case "ContinueStatement":return a.continueResult;case "ForStatement":null!==c.init&&B(b,c.init);w={testResult:!0,lastAction:a.voidOperation};do b:{z=b;x=c;A=w;if(null!==x.test){A.testResult=B(z,x.test);if(!1===A.testResult)break b;if(!0!==A.testResult)throw Error(f.nodeErrorMessage(x,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}A.lastAction=B(z,x.body);A.lastAction===a.breakResult?A.testResult=!1:A.lastAction instanceof a.ReturnResult?A.testResult= !1:null!==x.update&&B(z,x.update)}while(!0===w.testResult);g=w.lastAction instanceof a.ReturnResult?w.lastAction:a.voidOperation;return g;case "ForInStatement":return F(b,c);case "Identifier":return ja(b,c);case "MemberExpression":return aa(b,c);case "Literal":return c.value;case "ThisExpression":throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return M(b,c);case "UnaryExpression":return ga(b,c);case "BinaryExpression":return P(b,c);case "LogicalExpression":return K(b, c);case "ConditionalExpression":throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(g=[],w=0;w e&&(e=d.length+e);if(e>=d.length||0>e)throw Error(f.nodeErrorMessage(c,"RUNTIME","OUTOFBOUNDS"));return d[e]}}else if(a.isString(d)){if(a.isNumber(e)&&isFinite(e)&&Math.floor(e)===e){0>e&&(e=d.length+e);if(e>=d.length||0>e)throw Error(f.nodeErrorMessage(c,"RUNTIME","OUTOFBOUNDS"));return d[e]}}else if(a.isImmutableArray(d)&&a.isNumber(e)&&isFinite(e)&&Math.floor(e)===e){0>e&&(e=d.length()+e);if(e>=d.length()||0>e)throw Error(f.nodeErrorMessage(c,"RUNTIME","OUTOFBOUNDS"));return d.get(e)}throw Error(f.nodeErrorMessage(c, "RUNTIME","INVALIDTYPE"));}catch(Ca){throw Ca;}}function ga(b,c){try{var d=B(b,c.argument);if(a.isBoolean(d)){if("!"===c.operator)return!d;if("-"===c.operator)return-1*a.toNumber(d);if("+"===c.operator)return 1*a.toNumber(d);throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===c.operator)return-1*a.toNumber(d);if("+"===c.operator)return 1*a.toNumber(d);throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(qa){throw qa;}}function P(b,c){try{var d= [B(b,c.left),B(b,c.right)],e=d[0],g=d[1];switch(c.operator){case "\x3d\x3d":return a.equalityTest(e,g);case "\x3d":return a.equalityTest(e,g);case "!\x3d":return!a.equalityTest(e,g);case "\x3c":return a.greaterThanLessThan(e,g,c.operator);case "\x3e":return a.greaterThanLessThan(e,g,c.operator);case "\x3c\x3d":return a.greaterThanLessThan(e,g,c.operator);case "\x3e\x3d":return a.greaterThanLessThan(e,g,c.operator);case "+":return a.isString(e)||a.isString(g)?a.toString(e)+a.toString(g):a.toNumber(e)+ a.toNumber(g);case "-":return a.toNumber(e)-a.toNumber(g);case "*":return a.toNumber(e)*a.toNumber(g);case "/":return a.toNumber(e)/a.toNumber(g);case "%":return a.toNumber(e)%a.toNumber(g);default:throw Error(f.nodeErrorMessage(c,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(sa){throw sa;}}function K(b,c){try{if("AssignmentExpression"===c.left.type||"UpdateExpression"===c.left.type)throw Error(f.nodeErrorMessage(c.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===c.right.type|| "UpdateExpression"===c.right.type)throw Error(f.nodeErrorMessage(c.right,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var d=B(b,c.left);if(a.isBoolean(d))switch(c.operator){case "||":if(!0===d)return d;var e=B(b,c.right);if(a.isBoolean(e))return e;throw Error(f.nodeErrorMessage(c,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===d)return d;e=B(b,c.right);if(a.isBoolean(e))return e;throw Error(f.nodeErrorMessage(c,"RUNTIME","ONLYORORAND"));default:throw Error(f.nodeErrorMessage(c,"RUNTIME","ONLYORORAND")); }else throw Error(f.nodeErrorMessage(c,"RUNTIME","ONLYBOOLEAN"));}catch(Ca){throw Ca;}}function ja(a,b){var c;try{var d=b.name.toLowerCase();if(null!==a.localScope&&void 0!==a.localScope[d])return c=a.localScope[d],!0!==c.valueset&&(c.value=B(a,c.node),c.valueset=!0),c.value;if(void 0!==a.globalScope[d])return c=a.globalScope[d],!0!==c.valueset&&(c.value=B(a,c.node),c.valueset=!0),c.value;throw Error(f.nodeErrorMessage(b,"RUNTIME","VARIABLENOTFOUND"));}catch(Ca){throw Ca;}}function M(b,c){try{if("Identifier"!== c.callee.type)throw Error(f.nodeErrorMessage(c,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==b.localScope&&void 0!==b.localScope[c.callee.name.toLowerCase()]){var d=b.localScope[c.callee.name.toLowerCase()];if(d.value instanceof a.NativeFunction)return d.value.fn(b,c);if(d.value instanceof l)return V(b,c,d.value.definition);throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTAFUNCTION"));}if(void 0!==b.globalScope[c.callee.name.toLowerCase()]){d=b.globalScope[c.callee.name.toLowerCase()];if(d.value instanceof a.NativeFunction)return d.value.fn(b,c);if(d.value instanceof l)return V(b,c,d.value.definition);throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTAFUNCTION"));}throw Error(f.nodeErrorMessage(c,"RUNTIME","NOTFOUND"));}catch(qa){throw qa;}}function X(b){return null==b?"":a.isArray(b)||a.isImmutableArray(b)?"Array":a.isDate(b)?"Date":a.isString(b)?"String":a.isBoolean(b)?"Boolean":a.isNumber(b)?"Number":b instanceof n?"Dictionary":b instanceof h?"Feature":b instanceof y?"Point":b instanceof g?"Polygon": b instanceof u?"Polyline":b instanceof p?"Multipoint":b instanceof v?"Extent":a.isFunctionParameter(b)?"Function":b===a.voidOperation?"":"number"===typeof b&&isNaN(b)?"Number":"Unrecognised Type"}function O(b,c,d,e){try{var f=B(b,c.arguments[d]);if(a.equalityTest(f,e))return B(b,c.arguments[d+1]);var g=c.arguments.length-d;return 1===g?B(b,c.arguments[d]):2===g?null:3===g?B(b,c.arguments[d+2]):O(b,c,d+2,e)}catch(Ba){throw Ba;}}function L(b,c,d,e){try{if(!0===e)return B(b,c.arguments[d+1]);if(3=== c.arguments.length-d)return B(b,c.arguments[d+2]);var f=B(b,c.arguments[d+2]);if(!1===a.isBoolean(f))throw Error("WHEN needs boolean test conditions");return L(b,c,d+2,f)}catch(sa){throw sa;}}function Q(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var e=Q(a.slice(0,d),b);a=Q(a.slice(d,c),b);for(c=[];0=d?(c.push(e[0]),e=e.slice(1)):(c.push(a[0]),a=a.slice(1))):0b.arguments.length)throw Error("Missing Parameters");if(2===b.arguments.length)return B(a,b.arguments[1]); if(0===(b.arguments.length-1)%2)throw Error("Must have a default value result.");var c=B(a,b.arguments[0]);return O(a,b,1,c)}catch(qa){throw qa;}};T.when=function(b,c){try{if(3>c.arguments.length)throw Error("Missing Parameters");if(0===c.arguments.length%2)throw Error("Must have a default value result.");var d=B(b,c.arguments[0]);if(!1===a.isBoolean(d))throw Error("WHEN needs boolean test conditions");return L(b,c,0,d)}catch(qa){throw qa;}};T.top=function(b,c){return C(b,c,function(b,c,d){a.pcCheck(d, 2,2);if(a.isArray(d[0]))return a.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));if(a.isImmutableArray(d[0]))return a.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,a.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};T.first=function(b,c){return C(b,c,function(b,c,d){a.pcCheck(d,1,1);return a.isArray(d[0])?0===d[0].length?null:d[0][0]:a.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};T.sort=function(b,c){return C(b,c,function(b, c,d){a.pcCheck(d,1,2);b=d[0];a.isImmutableArray(b)&&(b=b.toArray());if(!1===a.isArray(b))throw Error("Illegal Argument");if(1=a}function h(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function l(a){return 0<="01234567".indexOf(a)}function m(a){return 10===a||13===a||8232===a||8233===a}function k(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||92===a||128<=a&&eb.NonAsciiIdentifierStart.test(String.fromCharCode(a))} function a(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&eb.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function f(a){a=a.toLowerCase();switch(a.length){case 2:return"if"===a||"in"===a;case 3:return"var"===a||"for"===a;case 4:return"else"===a;case 5:return"break"===a;case 6:return"return"===a;case 8:return"function"===a.toLowerCase()||"continue"===a;default:return!1}}function d(a,b,c,d,f){e("number"===typeof c,"Comment must have valid position");Z.lastCommentStart>= c||(Z.lastCommentStart=c,a={type:a,value:b},J.range&&(a.range=[c,d]),J.loc&&(a.loc=f),J.comments.push(a),J.attachComment&&(J.leadingComments.push(a),J.trailingComments.push(a)))}function c(a){var b,c,e;b=E-a;for(c={start:{line:ca,column:E-ia-a}};E=na&&M();else{if(42===f&&47===I.charCodeAt(E+1)){++E;++E;J.comments&&(f=I.slice(a+2,E-2),e.end={line:ca,column:E-ia},d("Block",f,a,E,e));break a}++E}M()}}else break;else if(b&&45===a)if(45===I.charCodeAt(E+1)&&62===I.charCodeAt(E+2))E+=3,c(3);else break;else if(60===a)if("!--"===I.slice(E+1,E+4))++E,++E,++E,++E,c(4);else break;else break}function r(a){var b,c,d=0;b="u"===a?4:2;for(a=0;a=na)return{type:R.EOF,lineNumber:ca,lineStart:ia,start:E,end:E};b=I.charCodeAt(E);if(k(b)){var c;b=E;if(92===I.charCodeAt(E))c=x();else a:{var d;for(c=E++;E=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320);g+=p}else u=E,(t=r(p))?g+=t:(E=u,g+=p);break;case "n":g+="\n";break;case "r":g+="\r";break;case "t":g+="\t";break;case "b":g+="\b";break;case "f":g+="\f";break;case "v":g+="\x0B";break;default:l(p)?(t="01234567".indexOf(p),0!==t&&(d=!0),E=this.range[1]&&(c.unshift(f),J.trailingComments.splice(e,1));J.trailingComments=[]}else g&&g.trailingComments&&g.trailingComments[0].range[0]>=this.range[1]&&(c=g.trailingComments,delete g.trailingComments);if(g)for(;g&&g.range[0]>=this.range[0];)a= g,g=d.pop();if(a)a.leadingComments&&a.leadingComments[a.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=a.leadingComments,a.leadingComments=void 0);else if(0b.fractional?0:b.fractional-d):(b.fractional+=d,b.integer=d>b.integer?1:b.integer-d),a=b));return a},percentChange:function(a,b,d,c){var e={previous:null,next:null},f;null!=d&&(f=a-d,e.previous=Math.floor(Math.abs(100* (b-d-f)/f)));null!=c&&(f=c-a,e.next=Math.floor(Math.abs(100*(c-b-f)/f)));return e},round:function(a,b){a=a.slice(0);var d,c,e,f,h,l,m,w,p=b&&null!=b.tolerance?b.tolerance:2,y=b&&b.indexes,g=b&&null!=b.strictBounds?b.strictBounds:!1;if(y)y.sort(n);else for(y=[],h=0;hf(a,b, "meters")?"meters":"kilometers"}function w(a,b){return 1E5>f(a,b,"meters")?"meters":"kilometers"}function p(a,b){return 1E3>f(a,b,"feet")?"feet":"miles"}function y(a,b){return 1E5>f(a,b,"feet")?"feet":"miles"}function g(a,b){return 3E6>f(a,b,"square-meters")?"square-meters":"square-kilometers"}function u(a,b){return 1E6>f(a,b,"square-feet")?"square-feet":"square-miles"}a.measureForUnit=b;a.baseUnitForMeasure=c;a.baseUnitForUnit=function(a){return c(b(a))};a.isBaseUnit=e;a.convertUnit=f;a.unitName= x;a.formatDecimal=z;a.preferredMetricLengthUnit=v;a.preferredMetricVerticalLengthUnit=w;a.formatMetricLength=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=v(a,b);return z(f(a,b,e),e,c,d)};a.formatMetricVerticalLength=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=w(a,b);return z(f(a,b,e),e,c,d)};a.preferredImperialLengthUnit=p;a.preferredImperialVerticalLengthUnit=y;a.formatImperialLength=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=p(a,b); return z(f(a,b,e),e,c,d)};a.formatImperialVerticalLength=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=y(a,b);return z(f(a,b,e),e,c,d)};a.preferredMetricAreaUnit=g;a.formatMetricArea=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=g(a,b);return z(f(a,b,e),e,c,d)};a.preferredImperialAreaUnit=u;a.formatImperialArea=function(a,b,c,d){void 0===c&&(c=2);void 0===d&&(d="abbr");var e=u(a,b);return z(f(a,b,e),e,c,d)};a.lengthToDegrees=function(a,b,c){void 0===c&&(c=l.wgs84Radius); return f(a,b,"meters")/(c*Math.PI/180)};a.formatDMS=function(b,c,d){void 0===d&&(d=2);b=a.convertUnit(b,c,"degrees");c=b-Math.floor(b);b-=c;c*=60;var e=c-Math.floor(c);c-=e;e*=60;return b.toFixed()+"\u00b0 "+c.toFixed()+"' "+e.toFixed(d)+'"'}})(a||(a={}));return a})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "), function(b,e,n,h,l,m,k){Object.defineProperty(e,"__esModule",{value:!0});b=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);d=b;b.prototype.clone=function(){return new d({color:this.color?this.color.clone():null})};var d;h([m.property(k.colorAndTransparencyProperty)],b.prototype,"color",void 0);return b=d=h([m.subclass("esri.symbols.support.Symbol3DMaterial")],b)}(m.declared(l));e.Symbol3DMaterial=b;e.default=b})},"esri/symbols/support/materialUtils":function(){define("require exports ../../Color ../../core/screenUtils ../../core/accessorSupport/ensureType ../../webdoc/support/opacityUtils".split(" "), function(b,e,n,h,l,m){function k(a,b){a=null!=b.transparency?m.transparencyToOpacity(b.transparency):1;if((b=b.color)&&Array.isArray(b))return new n([b[0]||0,b[1]||0,b[2]||0,a])}function a(a,b){b.color=a.toJSON().slice(0,3);a=m.opacityToTransparency(a.a);0!==a&&(b.transparency=a)}Object.defineProperty(e,"__esModule",{value:!0});e.readColorAndTransparency=k;e.writeColorAndTransparency=a;e.colorAndTransparencyProperty={type:n,json:{type:[l.Integer],read:{source:["color","transparency"],reader:k},write:{target:{color:{type:[l.Integer]}, transparency:{type:l.Integer}},writer:a}}};e.screenSizeProperty={type:Number,cast:h.toPt,json:{write:!0}}})},"esri/core/screenUtils":function(){define(["require","exports"],function(b,e){function n(b){return b?72*b/e.DPI:0}Object.defineProperty(e,"__esModule",{value:!0});var h=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;e.DPI=96;e.pt2px=function(b){return b?b/72*e.DPI:0};e.px2pt=n;e.toPt=function(b){if("string"===typeof b){if(h.test(b)){var e=b.match(h),k=Number(e[1]),e=e[3]&&e[3].toLowerCase();b="-"===b.charAt(0); k="px"===e?n(k):k;return b?-k:k}console.warn("screenUtils.toPt: input not recognized!");return null}return b}})},"esri/symbols/edges/utils":function(){define(["require","exports","./Edges3D","./SketchEdges3D","./SolidEdges3D"],function(b,e,n,h,l){function m(b,a,e){if(!b)return b;switch(b.type){case "solid":return a=new l,a.read(b,e),a;case "sketch":return a=new h,a.read(b,e),a}}Object.defineProperty(e,"__esModule",{value:!0});e.read=m;e.symbol3dEdgesProperty={types:{key:"type",base:n,typeMap:{solid:l, sketch:h}},json:{read:m,write:!0}}})},"esri/symbols/edges/Edges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),function(b,e,n,h,l,m,k,a,f,d,c){return function(b){function e(a){a=b.call(this)||this;a.color=new m([0,0,0,1]);a.extensionLength=0;a.size= f.px2pt(1);return a}n(e,b);e.prototype.normalizeCtorArgs=function(a){a&&a.type&&(a=l({},a),delete a.type);return a};e.prototype.clone=function(){};e.prototype.cloneProperties=function(){return{color:a.clone(this.color),size:this.size,extensionLength:this.extensionLength}};h([d.property({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],e.prototype,"type",void 0);h([d.property(c.colorAndTransparencyProperty)],e.prototype,"color",void 0);h([d.property(l({},c.screenSizeProperty, {json:{write:{overridePolicy:function(a){return{enabled:!!a}}}}}))],e.prototype,"extensionLength",void 0);h([d.property(c.screenSizeProperty)],e.prototype,"size",void 0);return e=h([d.subclass("esri.symbols.edges.Edges3D")],e)}(d.declared(k))})},"esri/symbols/edges/SketchEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),function(b,e,n,h,l,m){return function(b){function a(a){a= b.call(this)||this;a.type="sketch";return a}n(a,b);e=a;a.prototype.clone=function(){return new e(this.cloneProperties())};var e;h([l.property({type:["sketch"]})],a.prototype,"type",void 0);return a=e=h([l.subclass("esri.symbols.edges.SketchEdges3D")],a)}(l.declared(m))})},"esri/symbols/edges/SolidEdges3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Edges3D".split(" "),function(b,e,n,h,l,m){return function(b){function a(a){a= b.call(this)||this;a.type="solid";return a}n(a,b);e=a;a.prototype.clone=function(){return new e(this.cloneProperties())};var e;h([l.property({type:["solid"]})],a.prototype,"type",void 0);return a=e=h([l.subclass("esri.symbols.support.SolidEdges3D")],a)}(l.declared(m))})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./edges/utils ./support/Symbol3DFillMaterial ./support/Symbol3DOutline".split(" "), function(b,e,n,h,l,m,k,a,f){return function(b){function c(a){a=b.call(this)||this;a.type="fill";a.material=null;a.outline=null;a.edges=null;return a}n(c,b);d=c;c.prototype.clone=function(){return new d({edges:this.edges&&this.edges.clone(),enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone()})};var d;h([l.enumeration.serializable()({Fill:"fill"})],c.prototype,"type",void 0);h([l.property({type:a.default})], c.prototype,"material",void 0);h([l.property({type:f.default,json:{write:!0}})],c.prototype,"outline",void 0);h([l.property(k.symbol3dEdgesProperty)],c.prototype,"edges",void 0);return c=d=h([l.subclass("esri.symbols.FillSymbol3DLayer")],c)}(l.declared(m))})},"esri/symbols/support/Symbol3DFillMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Symbol3DMaterial".split(" "),function(b,e,n, h,l,m){Object.defineProperty(e,"__esModule",{value:!0});b=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}n(a,b);e=a;a.prototype.clone=function(){return new e({color:this.color?this.color.clone():null,colorMixMode:this.colorMixMode})};var e;h([l.enumeration.serializable()({multiply:"multiply",replace:"replace",tint:"tint"})],a.prototype,"colorMixMode",void 0);return a=e=h([l.subclass("esri.symbols.support.Symbol3DFillMaterial")],a)}(l.declared(m.default));e.Symbol3DFillMaterial= b;e.default=b})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/screenUtils ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(b,e,n,h,l,m,k,a,f){Object.defineProperty(e,"__esModule",{value:!0});b=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l([0,0,0,1]);a.size=k.px2pt(1);return a}n(c,b); d=c;c.prototype.clone=function(){return new d({color:this.color?this.color.clone():null,size:this.size})};var d;h([a.property(f.colorAndTransparencyProperty)],c.prototype,"color",void 0);h([a.property(f.screenSizeProperty)],c.prototype,"size",void 0);return c=d=h([a.subclass("esri.symbols.support.Symbol3DOutline")],c)}(a.declared(m));e.Symbol3DOutline=b;e.default=b})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./support/IconSymbol3DLayerResource ./support/materialUtils ./support/Symbol3DOutline".split(" "), function(b,e,n,h,l,m,k,a,f){return function(b){function c(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type="icon";a.size=12;a.anchor=void 0;a.outline=void 0;return a}n(c,b);d=c;c.prototype.clone=function(){return new d({anchor:this.anchor,enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),size:this.size})};var d;h([l.property()], c.prototype,"material",void 0);h([l.property({type:k.default,json:{write:!0}})],c.prototype,"resource",void 0);h([l.enumeration.serializable()({Icon:"icon"})],c.prototype,"type",void 0);h([l.property(a.screenSizeProperty)],c.prototype,"size",void 0);h([l.enumeration.serializable()({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right"})],c.prototype,"anchor",void 0);h([l.property({type:f.default, json:{write:!0}})],c.prototype,"outline",void 0);return c=d=h([l.subclass("esri.symbols.IconSymbol3DLayer")],c)}(l.declared(m))})},"esri/symbols/support/IconSymbol3DLayerResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/urlUtils ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m,k,a){Object.defineProperty(e,"__esModule",{value:!0});var f=m.strict()({circle:"circle", square:"square",cross:"cross",x:"x",kite:"kite"});b=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}n(c,b);d=c;c.prototype.readHref=function(a,b,c){return a?k.read(a,c):b.dataURI};c.prototype.writeHref=function(a,b,c,d){a&&(k.isDataProtocol(a)?b.dataURI=a:(b.href=k.write(a,d),k.isAbsolute(b.href)&&(b.href=k.normalize(b.href))))};c.prototype.clone=function(){return new d({href:this.href,primitive:this.primitive})};var d;h([a.property({type:String,json:{write:!0,read:{source:["href", "dataURI"]}}})],c.prototype,"href",void 0);h([a.reader("href")],c.prototype,"readHref",null);h([a.writer("href",{href:{type:String},dataURI:{type:String}})],c.prototype,"writeHref",null);h([a.enumeration.serializable()(f)],c.prototype,"primitive",void 0);return c=d=h([a.subclass("esri.symbols.support.IconSymbol3DLayerResource")],c)}(a.declared(l));e.IconSymbol3DLayerResource=b;e.default=b})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/screenUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/materialUtils".split(" "), function(b,e,n,h,l,m,k,a){return function(b){function d(a){a=b.call(this)||this;a.material=null;a.type="line";a.size=l.px2pt(1);return a}n(d,b);c=d;d.prototype.clone=function(){return new c({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};var c;h([m.property()],d.prototype,"material",void 0);h([m.enumeration.serializable()({Line:"line"})],d.prototype,"type",void 0);h([m.property(a.screenSizeProperty)], d.prototype,"size",void 0);return d=c=h([m.subclass("esri.symbols.LineSymbol3DLayer")],d)}(m.declared(k))})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer ./support/ObjectSymbol3DLayerResource ./support/Symbol3DMaterial".split(" "),function(b,e,n,h,l,m,k,a){return function(b){function d(a){a=b.call(this)||this;a.material=null;a.resource=null;a.type="object"; a.width=void 0;a.height=void 0;a.depth=void 0;a.anchor=void 0;a.heading=void 0;a.tilt=void 0;a.roll=void 0;return a}n(d,b);c=d;d.prototype.clone=function(){return new c({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,depth:this.depth,enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),height:this.height,material:this.material&&this.material.clone(),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 c;h([l.property({type:a.default})],d.prototype,"material",void 0);h([l.property({type:k.default,json:{write:!0}})],d.prototype,"resource",void 0);h([l.enumeration.serializable()({Object:"object"})],d.prototype,"type",void 0);h([l.property({type:Number,json:{write:!0}})],d.prototype,"width",void 0);h([l.property({type:Number,json:{write:!0}})],d.prototype,"height",void 0);h([l.property({type:Number, json:{write:!0}})],d.prototype,"depth",void 0);h([l.enumeration.serializable()({center:"center",top:"top",bottom:"bottom",origin:"origin"})],d.prototype,"anchor",void 0);h([l.property({type:Number,json:{write:!0}})],d.prototype,"heading",void 0);h([l.property({type:Number,json:{write:!0}})],d.prototype,"tilt",void 0);h([l.property({type:Number,json:{write:!0}})],d.prototype,"roll",void 0);h([l.property({readOnly:!0,dependsOn:["resource","resource.href"]})],d.prototype,"isPrimitive",null);return d= c=h([l.subclass("esri.symbols.ObjectSymbol3DLayer")],d)}(l.declared(m))})},"esri/symbols/support/ObjectSymbol3DLayerResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/urlUtils ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m,k,a){Object.defineProperty(e,"__esModule",{value:!0});var f=m.strict()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone", diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});b=function(b){function c(){return null!==b&&b.apply(this,arguments)||this}n(c,b);d=c;c.prototype.readHref=function(a,b,c){return k.read(a,c)};c.prototype.writeHref=function(a,b,c,d){a&&(b.href=k.write(a,d),k.isAbsolute(b.href)&&(b.href=k.normalize(b.href)))};c.prototype.clone=function(){return new d({href:this.href,primitive:this.primitive})};var d;h([a.property({type:String,json:{write:!0}})],c.prototype,"href",void 0);h([a.reader("href")], c.prototype,"readHref",null);h([a.writer("href")],c.prototype,"writeHref",null);h([a.enumeration.serializable()(f)],c.prototype,"primitive",void 0);return c=d=h([a.subclass("esri.symbols.support.ObjectSymbol3DLayerResource")],c)}(a.declared(l));e.ObjectSymbol3DLayerResource=b;e.default=b})},"esri/symbols/PathSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Symbol3DLayer".split(" "),function(b, e,n,h,l,m){return function(b){function a(a){a=b.call(this)||this;a.material=null;a.type="path";a.size=void 0;return a}n(a,b);e=a;a.prototype.readSize=function(a,b){return a||b.width||0};a.prototype.clone=function(){return new e({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};var e;h([l.property()],a.prototype,"material",void 0);h([l.enumeration.serializable()({Path:"path"})],a.prototype,"type",void 0); h([l.property({type:Number,json:{write:{enabled:!0,target:{size:{type:Number},width:{type:Number}}}}})],a.prototype,"size",void 0);h([l.reader("size",["size","width"])],a.prototype,"readSize",null);return a=e=h([l.subclass("esri.symbols.PathSymbol3DLayer")],a)}(l.declared(m))})},"esri/symbols/Symbol":function(){define(["../core/kebabDictionary","../core/JSONSupport","../Color"],function(b,e,n){b=b({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",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"});var h=0;return e.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id="sym"+h++},properties:{type:{type:String,value:null,json:{read:b.read,write:{ignoreOrigin:!0,writer:b.write}}},color:{type:n,value:new n([0,0,0,1]),json:{read:function(b){return b&&null!=b[0]?[b[0],b[1],b[2],b[3]/255]:b},write:{allowNull:!0}}}}})})}, "esri/symbols/TextSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ../core/lang ../core/accessorSupport/decorators ./Font ./Symbol3DLayer ./support/materialUtils ./support/Symbol3DHalo".split(" "),function(b,e,n,h,l,m,k,a,f,d,c){return function(b){function e(a){a=b.call(this)||this;a.font=null;a.halo=null;a.material=null;a.size=9;a.text=void 0;a.type="text";return a}n(e,b);f=e;e.prototype.writeFont= function(a,b,c,d){c=l({},d,{textSymbol3D:!0});b.font=a.write({},c)};e.prototype.clone=function(){return new f({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),font:this.font&&m.clone(this.font),halo:this.halo&&m.clone(this.halo),material:this.material&&this.material.clone(),size:this.size,text:this.text})};var f;h([k.property({type:a,json:{write:!0}})],e.prototype,"font",void 0);h([k.writer("font")],e.prototype,"writeFont",null);h([k.property({type:c.default,json:{write:!0}})], e.prototype,"halo",void 0);h([k.property()],e.prototype,"material",void 0);h([k.property(d.screenSizeProperty)],e.prototype,"size",void 0);h([k.property({type:String,json:{write:!0}})],e.prototype,"text",void 0);h([k.enumeration.serializable()({Text:"text"})],e.prototype,"type",void 0);return e=f=h([k.subclass("esri.symbols.TextSymbol3DLayer")],e)}(k.declared(f))})},"esri/symbols/Font":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/screenUtils ../core/accessorSupport/decorators ../core/accessorSupport/write".split(" "), function(b,e,n,h,l,m,k,a){return function(b){function d(a){a=b.call(this)||this;a.decoration="none";a.family="sans-serif";a.size=9;a.style="normal";a.weight="normal";return a}n(d,b);c=d;d.prototype.castSize=function(a){return m.toPt(a)};d.prototype.clone=function(){return new c({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})};var c;h([k.property({type:["underline","line-through","none"],json:{write:{overridePolicy:a.disableWriteDefaultPolicy("none")}}})], d.prototype,"decoration",void 0);h([k.property({type:String,json:{write:!0}})],d.prototype,"family",void 0);h([k.property({type:Number,json:{write:{overridePolicy:function(a,b,c){return{enabled:!c||!c.textSymbol3D}}}}})],d.prototype,"size",void 0);h([k.cast("size")],d.prototype,"castSize",null);h([k.property({type:["normal","italic","oblique"],json:{write:{overridePolicy:a.disableWriteDefaultPolicy("normal")}}})],d.prototype,"style",void 0);h([k.property({type:["normal","bold","bolder","lighter"], json:{write:{overridePolicy:a.disableWriteDefaultPolicy("normal")}}})],d.prototype,"weight",void 0);return d=c=h([k.subclass("esri.symbols.Font")],d)}(k.declared(l))})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ./materialUtils".split(" "),function(b,e,n,h,l,m,k,a,f){Object.defineProperty(e,"__esModule",{value:!0}); b=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.color=new l([0,0,0,1]);a.size=0;return a}n(c,b);d=c;c.prototype.clone=function(){return new d({color:k.clone(this.color),size:this.size})};var d;h([a.property(f.colorAndTransparencyProperty)],c.prototype,"color",void 0);h([a.property(f.screenSizeProperty)],c.prototype,"size",void 0);return c=d=h([a.subclass("esri.symbols.support.Symbol3DHalo")],c)}(a.declared(m));e.Symbol3DHalo=b;e.default=b})},"esri/symbols/support/StyleOrigin":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators ../../portal/Portal".split(" "), function(b,e,n,h,l,m,k){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.portal=null;return b}n(b,a);d=b;b.prototype.clone=function(){return new d({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};var d;h([m.property({type:String})],b.prototype,"name",void 0);h([m.property({type:String})],b.prototype,"styleUrl",void 0);h([m.property({type:String})],b.prototype,"styleName",void 0);h([m.property({type:k})],b.prototype,"portal",void 0); return b=d=h([m.subclass("esri.symbols.support.StyleOrigin")],b)}(m.declared(l))})},"esri/symbols/support/Thumbnail":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m){Object.defineProperty(e,"__esModule",{value:!0});b=function(b){function a(){return null!==b&&b.apply(this,arguments)||this}n(a,b);e=a;a.prototype.clone=function(){return new e({url:this.url})}; var e;h([m.property({type:String})],a.prototype,"url",void 0);return a=e=h([m.subclass("esri.symbols.support.Thumbnail")],a)}(m.declared(l));e.Thumbnail=b;e.default=b})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(b,e,n,h){function l(b){if(!b)return!1;b=b.verticalOffset;return!b||0>=b.screenLength||0>=b.maxWorldLength?!1:!0}function m(b,a,e){if(!b)return b;switch(b.type){case "line":return a=new h,a.read(b,e),a}}Object.defineProperty(e, "__esModule",{value:!0});e.hasVisibleVerticalOffset=l;e.hasVisibleCallout=function(b){if(!b||!b.supportsCallout||!b.supportsCallout())return!1;var a=b.callout;return a&&a.visible?l(b)?!0:!1:!1};e.isCalloutSupport=function(b){return"point-3d"===b.type||"label-3d"===b.type};e.read=m;e.calloutProperty={types:{key:"type",base:n,typeMap:{line:h}},json:{read:m,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "), function(b,e,n,h,l,m,k){return function(a){function b(b){b=a.call(this)||this;b.visible=!0;return b}h(b,a);b.prototype.normalizeCtorArgs=function(a){a&&a.type&&(a=n({},a),delete a.type);return a};b.prototype.clone=function(){};l([k.property({type:["line"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],b.prototype,"type",void 0);l([k.property({readOnly:!0})],b.prototype,"visible",void 0);return b=l([k.subclass("esri.symbols.callouts.Callout3D")],b)}(k.declared(m))})},"esri/symbols/callouts/LineCallout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ./LineCallout3DBorder ../support/materialUtils".split(" "), function(b,e,n,h,l,m,k,a,f,d,c){return function(b){function e(a){a=b.call(this)||this;a.type="line";a.color=new l([0,0,0,1]);a.size=k.px2pt(1);a.border=null;return a}n(e,b);f=e;Object.defineProperty(e.prototype,"visible",{get:function(){return 0c)return a.VALUE_OUT_OF_RANGE; break;case "coded-value":case "codedValue":if(null==b.codedValues||b.codedValues.every(function(a){return null==a||a.code!==d}))return a.INVALID_CODED_VALUE}return null}Object.defineProperty(e,"__esModule",{value:!0});e.CodedValueDomain=n;e.DomainBase=h;e.InheritedDomain=l;e.RangeDomain=m;var a;(function(a){a.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range";a.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"})(a=e.DomainValidationError||(e.DomainValidationError={})); e.isValidDomainValue=function(a,b){return null===k(a,b)};e.validateDomainValue=k;e.types={key:"type",base:e.DomainBase,typeMap:{range:e.RangeDomain,"coded-value":e.CodedValueDomain}};e.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}};e.fromJSON=function(a){if(a&&a.type){if("range"===a.type)return e.RangeDomain.fromJSON(a);if("codedValue"===a.type)return e.CodedValueDomain.fromJSON(a)}return null}})},"esri/layers/support/CodedValueDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/lang ../../core/accessorSupport/decorators ./Domain".split(" "), function(b,e,n,h,l,m,k){return function(a){function b(b){b=a.call(this,b)||this;b.codedValues=null;b.type="coded-value";return b}n(b,a);d=b;b.prototype.writeCodedValues=function(a,b){var c=null;a&&(c=a.map(function(a){return l.fixJson(l.clone(a))}));b.codedValues=c};b.prototype.getName=function(a){var b=null;if(this.codedValues){var c=String(a);this.codedValues.some(function(a){String(a.code)===c&&(b=a.name);return!!b})}return b};b.prototype.clone=function(){return new d({codedValues:l.clone(this.codedValues), name:this.name})};var d;h([m.property({json:{write:!0}})],b.prototype,"codedValues",void 0);h([m.writer("codedValues")],b.prototype,"writeCodedValues",null);h([m.enumeration.serializable()({codedValue:"coded-value"})],b.prototype,"type",void 0);return b=d=h([m.subclass("esri.layers.support.CodedValueDomain")],b)}(m.declared(k))})},"esri/layers/support/Domain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "), function(b,e,n,h,l,m,k){var a=m({inherited:"inherited",codedValue:"coded-value",range:"range"});return function(b){function d(a){a=b.call(this,a)||this;a.name=null;a.type=null;return a}n(d,b);h([k.property({json:{write:!0}})],d.prototype,"name",void 0);h([k.property({json:{read:a.read,write:a.write}})],d.prototype,"type",void 0);return d=h([k.subclass("esri.layers.support.Domain")],d)}(k.declared(l))})},"esri/layers/support/InheritedDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "), function(b,e,n,h,l,m){return function(b){function a(a){a=b.call(this,a)||this;a.type="inherited";return a}n(a,b);e=a;a.prototype.clone=function(){return new e};var e;h([l.enumeration.serializable()({inherited:"inherited"})],a.prototype,"type",void 0);return a=e=h([l.subclass("esri.layers.support.InheritedDomain")],a)}(l.declared(m))})},"esri/layers/support/RangeDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "), function(b,e,n,h,l,m){return function(b){function a(a){a=b.call(this,a)||this;a.maxValue=null;a.minValue=null;a.type="range";return a}n(a,b);e=a;a.prototype.clone=function(){return new e({maxValue:this.maxValue,minValue:this.minValue,name:this.name})};var e;h([l.property({json:{read:{source:"range",reader:function(a,b){return b.range&&b.range[1]}},write:{target:"range",writer:function(a,b,e){b[e]=[this.minValue,a]}}}})],a.prototype,"maxValue",void 0);h([l.property({json:{read:{source:"range",reader:function(a, b){return b.range&&b.range[0]}},write:{target:"range",writer:function(a,b,e){b[e]=[a,this.maxValue]}}}})],a.prototype,"minValue",void 0);h([l.enumeration.serializable()({range:"range"})],a.prototype,"type",void 0);return a=e=h([l.subclass("esri.layers.support.RangeDomain")],a)}(l.declared(m))})},"esri/layers/support/fieldType":function(){define(["require","exports","../../core/kebabDictionary"],function(b,e,n){Object.defineProperty(e,"__esModule",{value:!0});e.kebabDict=n({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/geometry/support/graphicsUtils":function(){define(["require","exports","../../core/Collection","../Extent"],function(b,e,n,h){Object.defineProperty(e, "__esModule",{value:!0});e.graphicsExtent=function(b){if(!b||!b.length)return null;var e=n.isCollection(b)?b.getItemAt(0).geometry:b[0].geometry,k=e.extent,a=e;null===k&&(k=new h(a.x,a.y,a.x,a.y,e.spatialReference));for(var f=1;fk.width&&0>k.height?null:k};e.getGeometries=function(b){return b.map(function(b){return b.geometry})}; e._encodeGraphics=function(b,e){var h=[];b.forEach(function(a,b){a=a.toJSON();var d={};if(a.geometry){var c=e&&e[b];d.geometry=c&&c.toJSON()||a.geometry}a.attributes&&(d.attributes=a.attributes);h[b]=d});return h}})},"esri/tasks/support/Query":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../TimeExtent ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators ../../geometry/support/jsonUtils ../../geometry/support/typeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils ./QuantizationParameters ./StatisticDefinition".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r,x,z,v){var w=a({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),p=a({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles", esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});return function(a){function b(b){b=a.call(this,b)||this;b.datumTransformation=null;b.distance=void 0;b.gdbVersion=null;b.geometry=null;b.geometryPrecision=void 0;b.groupByFieldsForStatistics=null;b.having=null;b.historicMoment=null;b.maxAllowableOffset=void 0;b.maxRecordCountFactor=1;b.multipatchOption=null;b.num=void 0;b.objectIds=null;b.orderByFields=null;b.outFields=null;b.outSpatialReference=null;b.outStatistics= null;b.parameterValues=null;b.pixelSize=null;b.quantizationParameters=null;b.rangeValues=null;b.relationParameter=null;b.resultType=null;b.returnDistinctValues=!1;b.returnGeometry=!1;b.returnCentroid=!1;b.returnExceededLimitFeatures=!0;b.returnM=void 0;b.returnZ=void 0;b.source=null;b.spatialRelationship="intersects";b.start=void 0;b.sqlFormat=null;b.text=null;b.timeExtent=null;b.units="meters";b.where=null;return b}n(b,a);e=b;b.prototype.castDatumTransformation=function(a){return"number"===typeof a|| "object"===typeof a?a:null};b.prototype.writeHistoricMoment=function(a,b,c){b.historicMoment=a&&a.getTime()};b.prototype.writeParameterValues=function(a,b,c){if(a){c={};for(var d in a){var e=a[d];Array.isArray(e)?c[d]=e.map(function(a){return a instanceof Date?a.getTime():a}):c[d]=e instanceof Date?e.getTime():e}b.parameterValues=c}};b.prototype.writeStart=function(a,b,c){b.resultOffset=this.start;b.resultRecordCount=this.num||10;b.where="1\x3d1"};b.prototype.writeWhere=function(a,b,c){b.where=a|| "1\x3d1"};b.prototype.clone=function(){return new e(f.clone({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,returnM:this.returnM,returnZ:this.returnZ,source:this.source,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.text,text:this.text,timeExtent:this.timeExtent,units:this.units,where:this.where}))};var e;h([d.property({json:{write:!0}})],b.prototype,"datumTransformation",void 0);h([d.cast("datumTransformation")],b.prototype,"castDatumTransformation",null);h([d.property({type:Number,json:{write:!0}})],b.prototype, "distance",void 0);h([d.property({type:String,json:{write:!0}})],b.prototype,"gdbVersion",void 0);h([d.property({types:q.types,json:{read:c.fromJSON,write:!0}})],b.prototype,"geometry",void 0);h([d.property({type:Number,json:{write:!0}})],b.prototype,"geometryPrecision",void 0);h([d.property({type:[String],json:{write:!0}})],b.prototype,"groupByFieldsForStatistics",void 0);h([d.property({type:String,json:{write:!0}})],b.prototype,"having",void 0);h([d.property({type:Date})],b.prototype,"historicMoment", void 0);h([d.writer("historicMoment")],b.prototype,"writeHistoricMoment",null);h([d.property({type:Number,json:{write:!0}})],b.prototype,"maxAllowableOffset",void 0);h([d.property({type:Number,cast:function(a){return 1>a?1:5=b&&e<=c?f=e:b>=e&&b<=a&&(f=b);c>=e&&c<=a?h=c:a>=b&&a<=c&&(h=a);if(isNaN(f)||isNaN(h))return null;b=new d;b.startTime=-Infinity===f?null:new Date(f);b.endTime=Infinity===h?null:new Date(h);return b};b.prototype.offset=function(a,b){var c=new d,e=this.startTime,f=this.endTime;e&&(c.startTime=this._offsetDate(e,a,b));f&&(c.endTime=this._offsetDate(f,a,b));return c};b.prototype._offsetDate=function(a,b,d){a=new Date(a.getTime());b&&d&&(d=k[d],a[d.setter](a[d.getter]()+ b*d.multiplier));return a};var d;h([m.property({type:Date,json:{write:{allowNull:!0}}})],b.prototype,"endTime",void 0);h([m.reader("endTime")],b.prototype,"readEndTime",null);h([m.writer("endTime")],b.prototype,"writeEndTime",null);h([m.property({type:Date,json:{write:{allowNull:!0}}})],b.prototype,"startTime",void 0);h([m.reader("startTime")],b.prototype,"readStartTime",null);h([m.writer("startTime")],b.prototype,"writeStartTime",null);return b=d=h([m.subclass("esri.TimeExtent")],b)}(m.declared(l))})}, "esri/tasks/support/QuantizationParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m,k,a,f){Object.defineProperty(e,"__esModule",{value:!0});var d=k({upperLeft:"upper-left",lowerLeft:"lower-left"});b=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.extent= null;a.mode="view";a.originPosition="upper-left";return a}n(c,b);e=c;c.prototype.clone=function(){return new e(a.clone({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))};var e;h([f.property({type:l.Extent,json:{write:!0}})],c.prototype,"extent",void 0);h([f.property({type:String,json:{write:!0}})],c.prototype,"mode",void 0);h([f.property({type:String,json:{read:d.read,write:d.write}})],c.prototype,"originPosition",void 0);h([f.property({type:Number, json:{write:!0}})],c.prototype,"tolerance",void 0);return c=e=h([f.subclass("esri.tasks.support.QuantizationParameters")],c)}(f.declared(m));e.default=b})},"esri/tasks/support/StatisticDefinition":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(b,e,n,h,l,m){return function(b){function a(a){a=b.call(this)||this;a.maxPointCount=void 0;a.maxRecordCount=void 0; a.maxVertexCount=void 0;a.onStatisticField=null;a.outStatisticFieldName=null;a.statisticType=null;return a}n(a,b);e=a;a.prototype.clone=function(){return new e({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType})};var e;h([m.property({type:Number,json:{write:!0}})],a.prototype,"maxPointCount",void 0);h([m.property({type:Number, json:{write:!0}})],a.prototype,"maxRecordCount",void 0);h([m.property({type:Number,json:{write:!0}})],a.prototype,"maxVertexCount",void 0);h([m.property({type:String,json:{write:!0}})],a.prototype,"onStatisticField",void 0);h([m.property({type:String,json:{write:!0}})],a.prototype,"outStatisticFieldName",void 0);h([m.property({type:String,json:{write:!0}})],a.prototype,"statisticType",void 0);return a=e=h([m.subclass("esri.tasks.support.StatisticDefinition")],a)}(m.declared(l))})},"esri/tasks/support/RelationshipQuery":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../geometry ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators".split(" "), function(b,e,n,h,l,m,k,a){return function(b){function d(a){a=b.call(this,a)||this;a.definitionExpression=null;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.source=null;return a}n(d,b);c=d;d.prototype._writeHistoricMoment=function(a,b){b.historicMoment=a&&a.getTime()};d.prototype.clone=function(){return new c(k.clone({definitionExpression:this.definitionExpression, 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}))};var c;h([a.property({type:String,json:{write:!0}})],d.prototype,"definitionExpression",void 0);h([a.property({type:String,json:{write:!0}})], d.prototype,"gdbVersion",void 0);h([a.property({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0);h([a.property({type:Date})],d.prototype,"historicMoment",void 0);h([a.writer("historicMoment")],d.prototype,"_writeHistoricMoment",null);h([a.property({type:Number,json:{write:!0}})],d.prototype,"maxAllowableOffset",void 0);h([a.property({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0);h([a.property({type:[String],json:{write:!0}})],d.prototype,"outFields",void 0); h([a.property({type:l.SpatialReference,json:{read:{source:"outSR"},write:{target:"outSR"}}})],d.prototype,"outSpatialReference",void 0);h([a.property({json:{write:!0}})],d.prototype,"relationshipId",void 0);h([a.property({json:{write:!0}})],d.prototype,"returnGeometry",void 0);h([a.property({json:{write:!0}})],d.prototype,"source",void 0);return d=c=h([a.subclass("esri.tasks.support.RelationshipQuery")],d)}(a.declared(m))})},"esri/layers/graphics/sources/MemorySource":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../geometry ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Error ../../../core/has ../../../core/kebabDictionary ../../../core/Loadable ../../../core/Logger ../../../core/requireUtils ../../../core/workers ../../../core/accessorSupport/decorators ../../../core/accessorSupport/ensureType ../../../core/accessorSupport/typescript ../../../tasks/support/FeatureSet module".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r,x,z,v,w,p,y,g){function u(a){var b=a.geometry;a=a.attributes;return{geometry:b&&"mesh"!==b.type?b&&b.toJSON():null,attributes:a}}Object.defineProperty(e,"__esModule",{value:!0});var t=c({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),A=r.getLogger("esri.layers.graphics.sources.MemorySource");k=function(a){function c(){return null!==a&&a.apply(this,arguments)|| this}n(c,a);c.prototype.load=function(){var a=this;this.addResolvingPromise(z.open(x.getAbsMid("./support/MemorySourceWorker",b,g),{client:this,strategy:d("esri-workers-for-memory-layers")?"dedicated":"local"}).then(function(b){a._connection=b;var c=a.layer,d=c.fields,e=c.spatialReference,f=c.geometryType,g=c.objectIdField,h=c.hasM,c=c.hasZ;return b.invoke("load",{features:a.items.map(u),fields:d&&d.map(function(a){return a.toJSON()}),geometryType:t.toJSON(f),hasM:h,hasZ:c,objectIdField:g,spatialReference:e&& e.toJSON()}).then(function(b){b.featureErrors.length&&A.warn("Encountered "+b.featureErrors.length+" validation errors while loading features",b.featureErrors);a.layerDefinition=b.layerDefinition})}));return this.when()};c.prototype.applyEdits=function(a){var b=this;return this.load().then(function(){return b._applyEdits(a)})};c.prototype.openPorts=function(){var a=this;return this.load().then(function(){return a._connection.openPorts()})};c.prototype.queryFeatures=function(a){return this.queryFeaturesJSON(a).then(function(a){return y.fromJSON(a)})}; c.prototype.queryFeaturesJSON=function(a){var b=this;return this.load().then(function(){return b._connection.invoke("queryFeatures",a?a.toJSON():null)})};c.prototype.queryFeatureCount=function(a){var b=this;return this.load().then(function(){return b._connection.invoke("queryFeatureCount",a?a.toJSON():null)})};c.prototype.queryObjectIds=function(a){var b=this;return this.load().then(function(){return b._connection.invoke("queryObjectIds",a?a.toJSON():null)})};c.prototype.queryExtent=function(a){var b= this;return this.load().then(function(){return b._connection.invoke("queryExtent",a?a.toJSON():null)}).then(function(a){return{count:a.count,extent:l.Extent.fromJSON(a.extent)}})};c.prototype._applyEdits=function(a){var b=this;if(!this._connection)throw new f("feature-layer-source:edit-failure","Memory source not loaded");var c=this.layer.objectIdField,d=[],e=[],g=[];if(a.addFeatures)for(var h=0,k=a.addFeatures;h=a?0:.1},json:{write:!0}})],a.prototype,"refreshInterval",void 0);return a=h([m.subclass("esri.layers.mixins.RefreshableLayer")],a)}(m.declared(l))})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/accessorSupport/decorators".split(" "), function(b,e,n,h,l,m){return function(b){function a(){var a=null!==b&&b.apply(this,arguments)||this;a.minScale=0;a.maxScale=0;return a}n(a,b);h([m.property({type:Number,json:{write:!0}})],a.prototype,"minScale",void 0);h([m.property({type:Number,json:{write:!0}})],a.prototype,"maxScale",void 0);return a=h([m.subclass("esri.layers.mixins.ScaleRangeLayer")],a)}(m.declared(l))})},"esri/layers/mixins/SublayersOwner":function(){define("require exports ../../core/tsSupport/assignHelper ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Collection ../../core/CollectionFlattener ../../core/Error ../../core/lang ../../core/Logger ../../core/accessorSupport/decorators ../../core/accessorSupport/ensureType ../../core/accessorSupport/PropertyOrigin ../support/Sublayer ../support/sublayerUtils".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r,x,z,v){function w(a,b,c){var d=[],e={};a.forEach(function(a){var f=new z;f.read(a,b);c&&(-1===c.indexOf(f.id)?f.visible=!1:f.visible=!0);e[f.id]=f;null!=a.parentLayerId&&-1!==a.parentLayerId?(a=e[a.parentLayerId],a.sublayers||(a.sublayers=[]),a.sublayers.unshift(f)):d.unshift(f)});return d}function p(a,b){var c=b.get(a.id);c?(d.mixin(a.__accessor__.store._values,c.__accessor__.store._values),c.__accessor__.overridden&&(a.__accessor__.overridden=d.mixin(a.__accessor__.overridden|| {},c.__accessor__.overridden)),c.sublayers&&(a.sublayers=c.sublayers.map(function(a){return p(a,b)}))):a.sublayers&&a.sublayers.forEach(function(a){return p(a,b)});return a}Object.defineProperty(e,"__esModule",{value:!0});var y=c.getLogger("esri.layers.TileLayer");b=function(b){function c(){var c=b.call(this)||this;c.allSublayers=new a({root:c,rootCollectionNames:["sublayers"],getChildrenFunction:function(a){return a.sublayers}});c.watch("sublayers",function(a,b){return c._handleSublayersChange(a, b)},!0);return c}h(c,b);c.prototype.readServiceSublayers=function(a,b,c){return w(b.layers,c)};c.prototype.readSublayersFromItemOrWebMap=function(a,b,c){return!b.layers&&b.visibleLayers?b.visibleLayers.map(function(a){return{id:a}}):w(b.layers,c,b.visibleLayers)};c.prototype.readSublayers=function(a,b,c){a=w(b.layers,c);this._updateSublayersForOrigin(x.OriginId.PORTAL_ITEM,a);this._updateSublayersForOrigin(x.OriginId.WEB_MAP,a);this._updateSublayersForOrigin(x.OriginId.WEB_SCENE,a);return a};c.prototype.writeSublayers= function(a,b,c,d){a=a.flatten(function(a){return(a=a.sublayers)&&a.toArray().reverse()}).toArray().reverse();var e=this.serviceSublayers.flatten(function(a){return(a=a.sublayers)&&a.toArray().reverse()}).toArray().reduce(function(a,b){a.set(b.id,b);return a},new Map),f=!1,g=!0;this.capabilities&&this.capabilities.operations.supportsExportMap&&this.capabilities.exportMap.supportsDynamicLayers?(f=v.isExportDynamic(a,this.serviceSublayers,this),g=!f&&v.sameStructureAsService(a,this.serviceSublayers)): g=v.sameStructureAsService(a,this.serviceSublayers);b.layers=[];a.forEach(function(a){var c=e.get(a.id),c=n({writeAsDynamic:f,writeOverridesOnly:g,serviceSublayer:c},d);a=a.write({},c);(!g||g&&1d&&(c=d,d=a,a=c),c={minSize:a,maxSize:d}}return c},getColor:function(a,b){var c=this._getVarInfo(b&&b.colorInfo,"color");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b,!1)},getOpacity:function(a,b){var c=this._getVarInfo(b&&b.opacityInfo,"opacity");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b,!0)},getRotationAngle:function(b,c){var d=this._getVarInfo(c&&c.rotationInfo,"rotation"),e=d.variable,f=this._cache[d.cacheKey], g=e.axis||"heading",d="heading"===g&&"arithmetic"===e.rotationType?90:0,g="heading"===g&&"arithmetic"===e.rotationType?-1:1,e=e.field,f=f&&f.compiledFunc,h=b.attributes,k=0;if(e||f)f?k=a.executeFunction(f,a.createExecContext(b,a.getViewInfo(c))):"function"===typeof e?k=e.apply(this,arguments):h&&(k=h[e]||0),k="number"!==typeof k||isNaN(k)?null:d+g*k;return k},collectRequiredFields:function(b){var c=[];this.visualVariables&&(c=c.concat(this.visualVariables));c.forEach(function(c){c&&(c.field&&(b[c.field]= !0),c.normalizationField&&(b[c.normalizationField]=!0),c.valueExpression&&a.extractFieldNames(c.valueExpression).forEach(function(a){b[a]=!0}))})},_getVarInfo:function(a,b){var c;a&&a.type===b&&this.visualVariables?(c=this.visualVariables.indexOf(a),a=this.visualVariables[c]):this.visualVariables&&(a=(a=this.getVisualVariablesForType(b))&&a[0],c=this.visualVariables.indexOf(a));return{variable:a,cacheKey:c}},_readSizeInfo:function(a){a.axis&&(a.axis=x.fromJSON(a.axis));a.valueUnit&&(a.valueUnit=z.fromJSON(a.valueUnit)); return a},_readColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(b,c){Array.isArray(b)?a.colors[c]=d.fromJSON(b):a.colors[c]=new d(b)}),a.stops&&a.stops.forEach(function(b,c){b.color&&Array.isArray(b.color)?a.stops[c].color=d.fromJSON(b.color):b.color&&(a.stops[c].color=new d(b.color))}));return a},_readOpacityInfo:function(a){var b;a&&(b=m.mixin({},a),b.transparencyValues&&(b.opacityValues=b.transparencyValues.map(p),delete b.transparencyValues),b.stops&&(b.stops=b.stops.map(function(a){a= m.mixin({},a);a.opacity=p(a.transparency);delete a.transparency;return a})));return b},_readVariables:function(a,b){a&&(a=a.map(function(a){a=m.clone(a);a.type=r.fromJSON(a.type);"size"===a.type?a=this._readSizeInfo(a):"color"===a.type?a=this._readColorInfo(a):"opacity"===a.type&&(a=this._readOpacityInfo(a));return a},this));var c=b.rotationType;if(b=b.rotationExpression)c={type:"rotation",rotationType:c},(b=b.match(this._rotationRE))&&b[1]&&(c.field=b[1],a||(a=[]),a.push(c));return a},_createCache:function(b){var c= b&&b.valueExpression,d=a.createSyntaxTree(c),d=a.createFunction(d),e=!(!b||!b.expression)||this._viewScaleRE.test(c);return{ipData:this._interpolateData(b),hasExpr:!!c,compiledFunc:d,isScaleDriven:e}},_processColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(b,c){b instanceof d||(a.colors[c]=new d(b))}),a.stops&&a.stops.forEach(function(b,c){!b.color||b.color instanceof d||(a.stops[c].color=new d(b.color))}),this._sortStops(a.stops));return this._createCache(a)},_processOpacityInfo:function(a){this._sortStops(a&& a.stops);return this._createCache(a)},_processSizeInfo:function(a){a.stops&&Array.isArray(a.stops)?a.stops=this._processSizeInfoStops(a.stops):(a.minSize=a.minSize&&this._processSizeInfoSize(a.minSize),a.maxSize=a.maxSize&&this._processSizeInfoSize(a.maxSize));return{root:this._createCache(a),minSize:this._createCache(a.minSize),maxSize:this._createCache(a.maxSize)}},_processSizeInfoSize:function(a){"object"===typeof a?a.stops=this._processSizeInfoStops(a.stops):a=l.toPt(a);return a},_processSizeInfoStops:function(a){a&& Array.isArray(a)&&(a.forEach(function(a){a.size=l.toPt(a.size)}),this._sortStops(a));return a},_sortStops:function(a){a&&Array.isArray(a)&&a.sort(function(a,b){return a.value-b.value})},_processRotationInfo:function(a){return this._createCache(a)},_getSize:function(b,d,e,f,h){var g=b.attributes,k=d.field,l=d.stops,m=0,p=e&&e.hasExpr,q=e&&e.compiledFunc,n=e&&e.ipData,t=e&&e.isScaleDriven,r="number"===typeof b,u=r?b:null;if(k||t||p){var y=f&&f.scale,z=h?h[0]:d.minSize,w=h?h[1]:d.maxSize,x=d.minDataValue, A=d.maxDataValue,G=d.valueUnit||"unknown",V=d.valueRepresentation,m=d.scaleBy,U=d.normalizationField,Y=g?parseFloat(g[U]):void 0,N=f&&f.shape;t?u=null==y?this._getAverageValue(d):y:"number"!==typeof u&&(p?u=a.executeFunction(q,a.createExecContext(b,a.getViewInfo(f))):"function"===typeof k?u=k.apply(this,arguments):g&&(u=g[k]));if(null==u||U&&!r&&(isNaN(Y)||0===Y))return null;isNaN(Y)||r||(u/=Y);if(l)w=this._lookupData(u,n),u=w[0],z=w[1],u===z?m=l[u].size:(u=l[u].size,l=l[z].size,m=u+(l-u)*w[2]);else if(null!= z&&null!=w&&null!=x&&null!=A)u<=x?m=z:u>=A?m=w:(l=(u-x)/(A-x),"area"===m&&N?(z=(u="circle"===N)?v*Math.pow(z/2,2):z*z,l=z+l*((u?v*Math.pow(w/2,2):w*w)-z),m=u?2*Math.sqrt(l/v):Math.sqrt(l)):m=z+l*(w-z));else if("unknown"===G)null!=z&&null!=x?(z&&x?(l=u/x,m="circle"===N?2*Math.sqrt(l*Math.pow(z/2,2)):"square"===N||"diamond"===N||"image"===N?Math.sqrt(l*Math.pow(z,2)):l*z):m=u+(z||x),m=mw&&(m=w)):m=u;else{l=(f&&f.resolution?f.resolution:1)*c.meterIn[G];if("area"===V)m=Math.sqrt(u/v)/ l,m*=2;else if(m=u/l,"radius"===V||"distance"===V)m*=2;null!=z&&mw&&(m=w)}}else d&&(m=l&&l[0]&&l[0].size,null==m&&(m=d.minSize));return m=isNaN(m)?0:m},_getAverageValue:function(a){var b=a.stops,c;b?(c=b[0].value,a=b[b.length-1].value):(c=a.minDataValue||0,a=a.maxDataValue||0);return(c+a)/2},_getColorComponent:function(b,c,d,e,f){var g=b.attributes,h=c&&c.field,k="number"===typeof b,l=k?b:null,m=d&&d.hasExpr,p=d&&d.compiledFunc,q=d&&d.ipData,n;if(h||m){var t=c.normalizationField, r=g&&t?parseFloat(g[t]):void 0;"number"!==typeof l&&(m?l=a.executeFunction(p,a.createExecContext(b,a.getViewInfo(e))):"function"===typeof h?l=h.apply(this,arguments):g&&(l=g[h]));null==l||t&&!k&&(isNaN(r)||0===r)||(isNaN(r)||k||(l/=r),n=f?this._getOpacity(l,c,q):this._getColor(l,c,q,e&&e.color))}else c&&(g=c.stops,f?(n=g&&g[0]&&g[0].opacity,null==n&&(n=c.opacityValues&&c.opacityValues[0])):n=g&&g[0]&&g[0].color||c.colors&&c.colors[0]);return n},_interpolateData:function(a){var b;if(a)if(a.colors|| a.opacityValues){var c=(a.colors||a.opacityValues).length,d=a.minDataValue,e=(a.maxDataValue-d)/(c-1);b=[];for(a=0;a=a.min&&b<=a.max:!1}function y(a){switch(a){case "esriFieldTypeSmallInteger":case "small-integer":return{min:-32768,max:32767};case "esriFieldTypeInteger":case "integer":return{min:-2147483648,max:2147483647};case "esriFieldTypeSingle":case "single":return{min:-3.4E38,max:1.2E38};case "esriFieldTypeDouble":case "double":return{min:-Number.MAX_VALUE, max:Number.MAX_VALUE}}}Object.defineProperty(e,"__esModule",{value:!0});e.fixRendererFields=function(a,b){if(null!=a&&null!=b){var c=0;for(a=Array.isArray(a)?a:[a];cb.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(a);e b.indexOf(d[e])&&(c[d[e]]=a[d[e]])}return c};h=function(a,b,c,d){var e=arguments.length,f=3>e?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d,g;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)f=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;0<=h;h--)if(g=a[h])f=(3>e?g(f):3h[0]&&c[1]=a.length&&(a=void 0);return{value:a&&a[c++],done:!a}}}};c=function(a,b){var c="function"===typeof Symbol&&a[Symbol.iterator];if(!c)return a;a=c.call(a);var d,e=[],f;try{for(;(void 0===b||0=m.HIGH_SURROGATE_MIN&&w<=m.HIGH_SURROGATE_MAX&&(n+=a[++k])}b.call(c,n,a,d);if(e)break}else if(f=l(a))for(k=f.next();!k.done;){b.call(c,k.value,a,d);if(e)break;k=f.next()}}})},"@dojo/framework/shim/Symbol":function(){(function(b){"object"===typeof module&&"object"===typeof module.exports?(b=b(require,exports),void 0!==b&&(module.exports=b)):"function"===typeof define&&define.amd&&define(["require","exports","./support/has","./global","./support/util"],b)})(function(b,e){function n(a){return a&& ("symbol"===typeof a||"Symbol"===a["@@toStringTag"])||!1}Object.defineProperty(e,"__esModule",{value:!0});var h=b("./support/has"),l=b("./global"),m=b("./support/util");e.Symbol=l.default.Symbol;if(!h.default("es6-symbol")){var k=function(a){if(!n(a))throw new TypeError(a+" is not a symbol");return a},a=Object.defineProperties,f=Object.defineProperty,d=Object.create,c=Object.prototype,q={},r=function(){var a=d(null);return function(b){for(var d=0,e;a[String(b)+(d||"")];)++d;b+=String(d||"");a[b]= !0;e="@@"+b;Object.getOwnPropertyDescriptor(c,e)||f(c,e,{set:function(a){f(this,e,m.getValueDescriptor(a))}});return e}}(),x=function v(a){if(this instanceof x)throw new TypeError("TypeError: Symbol is not a constructor");return v(a)};e.Symbol=l.default.Symbol=function w(b){if(this instanceof w)throw new TypeError("TypeError: Symbol is not a constructor");var c=Object.create(x.prototype);b=void 0===b?"":String(b);return a(c,{__description__:m.getValueDescriptor(b),__name__:m.getValueDescriptor(r(b))})}; f(e.Symbol,"for",m.getValueDescriptor(function(a){return q[a]?q[a]:q[a]=e.Symbol(String(a))}));a(e.Symbol,{keyFor:m.getValueDescriptor(function(a){var b;k(a);for(b in q)if(q[b]===a)return b}),hasInstance:m.getValueDescriptor(e.Symbol.for("hasInstance"),!1,!1),isConcatSpreadable:m.getValueDescriptor(e.Symbol.for("isConcatSpreadable"),!1,!1),iterator:m.getValueDescriptor(e.Symbol.for("iterator"),!1,!1),match:m.getValueDescriptor(e.Symbol.for("match"),!1,!1),observable:m.getValueDescriptor(e.Symbol.for("observable"), !1,!1),replace:m.getValueDescriptor(e.Symbol.for("replace"),!1,!1),search:m.getValueDescriptor(e.Symbol.for("search"),!1,!1),species:m.getValueDescriptor(e.Symbol.for("species"),!1,!1),split:m.getValueDescriptor(e.Symbol.for("split"),!1,!1),toPrimitive:m.getValueDescriptor(e.Symbol.for("toPrimitive"),!1,!1),toStringTag:m.getValueDescriptor(e.Symbol.for("toStringTag"),!1,!1),unscopables:m.getValueDescriptor(e.Symbol.for("unscopables"),!1,!1)});a(x.prototype,{constructor:m.getValueDescriptor(e.Symbol), toString:m.getValueDescriptor(function(){return this.__name__},!1,!1)});a(e.Symbol.prototype,{toString:m.getValueDescriptor(function(){return"Symbol ("+k(this).__description__+")"}),valueOf:m.getValueDescriptor(function(){return k(this)})});f(e.Symbol.prototype,e.Symbol.toPrimitive,m.getValueDescriptor(function(){return k(this)}));f(e.Symbol.prototype,e.Symbol.toStringTag,m.getValueDescriptor("Symbol",!1,!1,!0));f(x.prototype,e.Symbol.toPrimitive,m.getValueDescriptor(e.Symbol.prototype[e.Symbol.toPrimitive], !1,!1,!0));f(x.prototype,e.Symbol.toStringTag,m.getValueDescriptor(e.Symbol.prototype[e.Symbol.toStringTag],!1,!1,!0))}e.isSymbol=n;"hasInstance isConcatSpreadable iterator species replace search split match toPrimitive toStringTag unscopables observable".split(" ").forEach(function(a){e.Symbol[a]||Object.defineProperty(e.Symbol,a,m.getValueDescriptor(e.Symbol.for(a),!1,!1))});e.default=e.Symbol})},"@dojo/framework/shim/support/has":function(){(function(b){"object"===typeof module&&"object"===typeof module.exports? (b=b(require,exports),void 0!==b&&(module.exports=b)):"function"===typeof define&&define.amd&&define("require exports tslib ../../has/has ../global ../../has/has".split(" "),b)})(function(b,e){Object.defineProperty(e,"__esModule",{value:!0});var n=b("tslib"),h=b("../../has/has"),l=b("../global");e.default=h.default;n.__exportStar(b("../../has/has"),e);h.add("es6-array",function(){return["from","of"].every(function(b){return b in l.default.Array})&&["findIndex","find","copyWithin"].every(function(b){return b in l.default.Array.prototype})},!0);h.add("es6-array-fill",function(){return"fill"in l.default.Array.prototype?1===[1].fill(9,Number.POSITIVE_INFINITY)[0]:!1},!0);h.add("es7-array",function(){return"includes"in l.default.Array.prototype},!0);h.add("es6-map",function(){if("function"===typeof l.default.Map)try{var b=new l.default.Map([[0,1]]);return b.has(0)&&"function"===typeof b.keys&&h.default("es6-symbol")&&"function"===typeof b.values&&"function"===typeof b.entries}catch(a){}return!1},!0);h.add("es6-math", function(){return"clz32 sign log10 log2 log1p expm1 cosh sinh tanh acosh asinh atanh trunc fround cbrt hypot".split(" ").every(function(b){return"function"===typeof l.default.Math[b]})},!0);h.add("es6-math-imul",function(){return"imul"in l.default.Math?-5===Math.imul(4294967295,5):!1},!0);h.add("es6-object",function(){return h.default("es6-symbol")&&["assign","is","getOwnPropertySymbols","setPrototypeOf"].every(function(b){return"function"===typeof l.default.Object[b]})},!0);h.add("es2017-object", function(){return["values","entries","getOwnPropertyDescriptors"].every(function(b){return"function"===typeof l.default.Object[b]})},!0);h.add("es-observable",function(){return"undefined"!==typeof l.default.Observable},!0);h.add("es6-promise",function(){return"undefined"!==typeof l.default.Promise&&h.default("es6-symbol")},!0);h.add("es6-set",function(){if("function"===typeof l.default.Set){var b=new l.default.Set([1]);return b.has(1)&&"keys"in b&&"function"===typeof b.keys&&h.default("es6-symbol")}return!1}, !0);h.add("es6-string",function(){return["fromCodePoint"].every(function(b){return"function"===typeof l.default.String[b]})&&"codePointAt normalize repeat startsWith endsWith includes".split(" ").every(function(b){return"function"===typeof l.default.String.prototype[b]})},!0);h.add("es6-string-raw",function(){function b(a){for(var b=1;b=h))throw RangeError("string.fromCodePoint: Invalid code point "+h);65535>=h?f.push(h):(h-=65536,f.push((h>>10)+e.HIGH_SURROGATE_MIN,h%1024+e.LOW_SURROGATE_MIN)); if(d+1===b||16384a||a>=f)){var d=b.charCodeAt(a);return d>=e.HIGH_SURROGATE_MIN&&d<=e.HIGH_SURROGATE_MAX&&f>a+1&&(b=b.charCodeAt(a+1),b>=e.LOW_SURROGATE_MIN&&b<=e.LOW_SURROGATE_MAX)?1024*(d-e.HIGH_SURROGATE_MIN)+b-e.LOW_SURROGATE_MIN+65536:d}};e.endsWith=function(b,a,e){null==e&&(e=b.length);e=n.__read(m("endsWith",b,a,e,!0),3);b=e[0];a=e[1];e=e[2];var d=e-a.length;return 0>d?!1:b.slice(d,e)===a};e.includes=function(b,a,e){void 0===e&&(e=0);e=n.__read(m("includes",b,a,e),3);b=e[0];a=e[1];e=e[2];return-1!== b.indexOf(a,e)};e.repeat=function(b,a){void 0===a&&(a=0);if(null==b)throw new TypeError("string.repeat requires a valid string.");a!==a&&(a=0);if(0>a||Infinity===a)throw new RangeError("string.repeat requires a non-negative finite count.");for(var e="";a;)a%2&&(e+=b),1>=1;return e};e.startsWith=function(b,a,e){void 0===e&&(e=0);a=String(a);e=n.__read(m("startsWith",b,a,e),3);b=e[0];a=e[1];e=e[2];var d=e+a.length;return d>b.length?!1:b.slice(e,d)===a}}l.default("es2017-string")?(e.padEnd= b.wrapNative(h.default.String.prototype.padEnd),e.padStart=b.wrapNative(h.default.String.prototype.padStart)):(e.padEnd=function(b,a,f){void 0===f&&(f=" ");if(null===b||void 0===b)throw new TypeError("string.repeat requires a valid string.");if(Infinity===a)throw new RangeError("string.padEnd requires a non-negative finite count.");if(null===a||void 0===a||0>a)a=0;b=String(b);a-=b.length;0a)a=0;b=String(b);a-=b.length;0c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return aa.length)return!1;e=0;for(var f=a.length,d=0;d=f)return!1}return!0}Object.defineProperty(e,"__esModule",{value:!0});e.isExportDynamic=function(b,e,k){return b.some(function(a){var b=a.source;return!(!b||b.type===n.MAPLAYER&&b.mapLayerId===a.id&&(!b.gdbVersion||b.gdbVersion===k.gdbVersion))||null!=a.renderer||null!=a.labelingInfo||a.hasOwnProperty("opacity")&&null!=a.opacity||a.hasOwnProperty("labelsVisible")&&null!=a.labelsVisible})?!0:!h(b,e)};e.sameStructureAsService=function(b,e){return e.flatten(function(b){return(b= b.sublayers)&&b.toArray().reverse()}).toArray().reverse().every(function(e,a){return(a=b[a])&&e.id===a.id&&(null==e.sublayers&&null==a.sublayers||null!=e.sublayers&&null!=a.sublayers&&e.sublayers.map(function(a){return a.id}).join(",")===a.sublayers.map(function(a){return a.id}).join(","))})}})},"esri/layers/support/arcgisLayers":function(){define("require exports ../../core/tsSupport/assignHelper dojo/when ../../request ../../core/Error ../../core/promiseUtils ./arcgisLayerUrl ./arcgisLayerUrl ./lazyLayerLoader".split(" "), function(b,e,n,h,l,m,k,a,f,d){function c(a,b){return a.sublayerIds.map(function(c){return new a.Constructor(n({},b,{layerId:c,sublayerTitleMode:"service-name"}))})}function q(a){var b=f.parse(a);if(!b)return k.reject(new m("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:a}));var c=b.serverType,e=b.sublayer,l={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case "MapServer":c=null!=e?"FeatureLayer":x(a).then(function(a){return a? "TileLayer":"MapImageLayer"});break;case "ImageServer":c=v(a).then(function(a){var b=a.tileInfo&&a.tileInfo.format;return a.tileInfo?b&&"LERC"===b.toUpperCase()&&a.cacheType&&"elevation"===a.cacheType.toLowerCase()?"ElevationLayer":"TileLayer":"ImageryLayer"});break;case "SceneServer":c=v(b.url.path).then(function(a){var b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer"};return a&&Array.isArray(a.layers)&&0=a[3]?0:a[3]-a[0]}function k(a){return a[1]>=a[4]?0:a[4]-a[1]}function a(a){return a[2]>=a[5]?0:a[5]-a[2]}function f(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 d(a){return 6===a.length}Object.defineProperty(e,"__esModule",{value:!0});e.create=l;e.fromValues=function(a,b,d,e,f,h){return[a,b,d,e,f,h]};e.fromExtent=function(a,b){void 0===b&&(b=l());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};e.toExtent=function(a,b){return isFinite(a[2])||isFinite(a[5])?new n({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],zmin:a[2],zmax:a[5],spatialReference:b}):new n({xmin:a[0],xmax:a[3],ymin:a[1],ymax:a[4],spatialReference:b})};e.fromMinMax=function(a,b,d){void 0===d&&(d=l());d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=b[0];d[4]=b[1];d[5]=b[2];return d};e.expandPointInPlace=function(a,b){b[0]a[3]&&(a[3]=b[0]);b[1]a[4]&&(a[4]= b[1]);b[2]a[5]&&(a[5]=b[2])};e.expand=function(a,b,e){void 0===e&&(e=a);d(b)?(e[0]=Math.min(a[0],b[0]),e[1]=Math.min(a[1],b[1]),e[2]=Math.min(a[2],b[2]),e[3]=Math.max(a[3],b[3]),e[4]=Math.max(a[4],b[4]),e[5]=Math.max(a[5],b[5])):h.is(b)?(e[0]=Math.min(a[0],b[0]),e[1]=Math.min(a[1],b[1]),e[3]=Math.max(a[3],b[2]),e[4]=Math.max(a[4],b[3])):2===b.length?(e[0]=Math.min(a[0],b[0]),e[1]=Math.min(a[1],b[1]),e[3]=Math.max(a[3],b[0]),e[4]=Math.max(a[4],b[1])):3===b.length&&(e[0]=Math.min(a[0], b[0]),e[1]=Math.min(a[1],b[1]),e[2]=Math.min(a[2],b[2]),e[3]=Math.max(a[3],b[0]),e[4]=Math.max(a[4],b[1]),e[5]=Math.max(a[5],b[2]));return e};e.expandWithBuffer=function(a,b,d,e,f){void 0===f&&(f=a);var c=a[0],h=a[1],k=a[2],l=a[3],g=a[4];a=a[5];for(var m=0;mb;b++)if(!isFinite(a[b]))return!1;return!0};e.width=m;e.depth=k;e.height=a;e.diameter= function(b){var c=m(b),d=a(b);b=k(b);return Math.sqrt(c*c+d*d+b*b)};e.center=function(b,d){void 0===d&&(d=[0,0,0]);d[0]=b[0]+m(b)/2;d[1]=b[1]+k(b)/2;d[2]=b[2]+a(b)/2;return d};e.size=function(b,d){void 0===d&&(d=[0,0,0]);d[0]=m(b);d[1]=k(b);d[2]=a(b);return d};e.maximumDimension=function(b){return Math.max(m(b),a(b),k(b))};e.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]};e.containsPointWithMargin=function(a,b,d){return b[0]>=a[0]-d&&b[1]>= a[1]-d&&b[2]>=a[2]-d&&b[0]<=a[3]+d&&b[1]<=a[4]+d&&b[2]<=a[5]+d};e.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]};e.intersects=function(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])};e.offset=function(a,b,d,e,f){void 0===f&&(f=a);f[0]=a[0]+b;f[1]=a[1]+d;f[2]=a[2]+e;f[3]=a[3]+b;f[4]=a[4]+d;f[5]=a[5]+e;return f};e.setMin=function(a,b,d){void 0===d&&(d=a);d[0]= b[0];d[1]=b[1];d[2]=b[2];d!==a&&(d[3]=a[3],d[4]=a[4],d[5]=a[5]);return d};e.setMax=function(a,b,d){void 0===d&&(d=a);d[3]=b[0];d[4]=b[1];d[5]=b[2];d!==a&&(d[0]=a[0],d[1]=a[1],d[2]=a[2]);return a};e.set=f;e.empty=function(a){return a?f(a,e.NEGATIVE_INFINITY):l(e.NEGATIVE_INFINITY)};e.toRect=function(a,b){b||(b=h.create());b[0]=a[0];b[1]=a[1];b[2]=a[3];b[3]=a[4];return b};e.fromRect=function(a,b){a[0]=b[0];a[1]=b[1];a[3]=b[2];a[4]=b[3];return a};e.is=d;e.isPoint=function(b){return 0===m(b)&&0===k(b)&& 0===a(b)};e.equals=function(a,b,e){if(null==a||null==b)return a===b;if(!d(a)||!d(b))return!1;if(e)for(var c=0;cm&&(f=Math.min(f,e));0l?g=Math.min(g,d):0c&&(c=void 0);a.add(b,c)};return z(a,c,b).then(function(b){if(null===e[d])f(a,b);else return e[d].then(function(a){f(a.layers, b);return h.resolve(b)});return h.resolve(b)})})}Object.defineProperty(e,"__esModule",{value:!0});var w={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer", CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},p={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer"},y={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",DefaultTileLayer:"TileLayer"},g= {ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WMS:"WMSLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",DefaultTileLayer:"TileLayer"}, u={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};e.createLayer=q;e.processLayer=z;e.populateLayers=v;e.populateOperationalLayers= function(a,b,c){return v(a,b,c)}})},"esri/portal/support/mapNotesUtils":function(){define(["require","exports"],function(b,e){Object.defineProperty(e,"__esModule",{value:!0});e.isMapNotesLayer=function(b){var e=["TITLE","DESCRIPTION","IMAGE_URL","IMAGE_LINK_URL"];if((b=b.layers||b.featureCollection&&b.featureCollection.layers)&&Array.isArray(b))return b=b[0],b.layerDefinition.fields&&b.layerDefinition.fields.forEach(function(b){b=e.indexOf(b.name);-1b-c.refreshTimestamp;d&&e&&!f&&c.refresh(b)}})},this.tickInterval))};b.prototype._getLayerViewHandles=function(){var a=this,b=[];this.view.allLayerViews.forEach(function(c){if(c.refresh){var d=c.watch("refreshInterval",function(){return a.notifyChange("tickInterval")});b.push(d);c.layer&&(d=c.layer.on("refresh",function(){var a=Date.now(); 6E3>a-c.refreshTimestamp||c.refresh(a)}),b.push(d))}});return b};b.prototype._getCommonInterval=function(a){var b=function(a,c){return isNaN(a)||isNaN(c)?0:0>=c?a:b(c,a%c)};return a.toArray().reduce(function(a,c){return b(Math.round(6E4*c.refreshInterval),a)},0)};h([k.property()],b.prototype,"view",void 0);h([k.property({readOnly:!0})],b.prototype,"tickInterval",null);return b=h([k.subclass("esri.views.RefreshManager")],b)}(k.declared(l))})},"esri/views/BasemapView":function(){define(["../core/Accessor", "../core/Collection","../core/watchUtils"],function(b,e,n){return b.createSubclass({declaredClass:"esri.views.BasemapView",properties:{view:{},baseLayerViews:{type:e},referenceLayerViews:{type:e}},constructor:function(){this._loadingHdl=n.init(this,"view.map.basemap",this._loadBasemap)},getDefaults:function(){return{baseLayerViews:[],referenceLayerViews:[]}},destroy:function(){this.view=null;this._loadingHdl&&(this._loadingHdl.remove(),this._loadingHdl=null)},_suspendedGetter:function(){return this.view? this.view.suspended:!0},_loadBasemap:function(b){b&&b.load()}})})},"esri/views/GroundView":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Collection ../core/Handles ../core/watchUtils ../core/accessorSupport/decorators ./support/GroundViewElevationSampler".split(" "),function(b,e,n,h,l,m,k,a,f,d){return function(b){function c(a){a=b.call(this)||this;a.handles=new k;a.view=null;a.layerViews=new m;return a}n(c,b);c.prototype.initialize= function(){var b=this;this.handles.add(a.when(this,"view.map.ground",function(a){return a.load()}));this.handles.add(this.layerViews.on("after-changes",function(){return b.layerViewsAfterChangesHandler()}))};c.prototype.destroy=function(){this._set("view",null);this.handles&&(this.handles.destroy(),this.handles=null)};Object.defineProperty(c.prototype,"elevationSampler",{get:function(){return this.view&&"2d"!==this.view.type&&this.view.ready&&this.view.basemapTerrain&&this.view.basemapTerrain.ready? new d({view:this.view}):null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"updating",{get:function(){return this.suspended?!1:this.layerViews.some(function(a){return a.updating})},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"suspended",{get:function(){return!this.view||this.view.suspended},enumerable:!0,configurable:!0});c.prototype.layerViewsAfterChangesHandler=function(){var a=this;this.handles.remove("updating");this.handles.add(this.layerViews.map(function(b){return b.watch("updating", function(){return a.updateUpdating()},!0)}).toArray(),"updating");this.updateUpdating()};c.prototype.updateUpdating=function(){this.notifyChange("updating")};h([f.property({readOnly:!0,dependsOn:["view.ready","view.basemapTerrain?.ready"]})],c.prototype,"elevationSampler",null);h([f.property({type:Boolean,dependsOn:["suspended"],readOnly:!0})],c.prototype,"updating",null);h([f.property({constructOnly:!0})],c.prototype,"view",void 0);h([f.property({type:m,readOnly:!0})],c.prototype,"layerViews",void 0); h([f.property({readOnly:!0,dependsOn:["view.suspended"]})],c.prototype,"suspended",null);return c=h([f.subclass("esri.views.GroundView")],c)}(f.declared(l))})},"esri/views/support/GroundViewElevationSampler":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/Evented ../../core/Logger ../../core/accessorSupport/decorators ../../geometry/support/aaBoundingRect ../../geometry/support/contains ../../geometry/support/webMercatorUtils ../../layers/support/ElevationSampler ../3d/terrain/TerrainConst".split(" "), function(b,e,n,h,l,m,k,a,f,d,c,q,r){var x=k.getLogger("esri.views.support.GroundViewElevationSampler");return function(b){function e(a){a=b.call(this,a)||this;a.demResolution={min:-1,max:-1};a.noDataValue=r.noDataValueOpt.noDataValue;return a}n(e,b);e.prototype.initialize=function(){var a=this;this.view.basemapTerrain.on("elevation-change",function(){return a.emit("changed",{})})};Object.defineProperty(e.prototype,"extent",{get:function(){var a=this.view.basemapTerrain;return a.extent&&a.spatialReference? f.toExtent(a.extent,a.spatialReference):null},enumerable:!0,configurable:!0});e.prototype.elevationAt=function(a){var b=a.spatialReference,e=this.spatialReference;if(!c.canProject(b,e))return x.error("Cannot sample elevation at a location with spatial reference ("+(b?b.wkid:"unknown")+") different from the view ("+e.wkid+")"),null;d.extentContainsPoint(this.extent,a)||(b=this.extent,x.warn("#elevationAt()","Point used to sample elevation ("+a.x+", "+a.y+") is outside of the sampler extent ("+(b.xmin+ ", "+b.ymin+", "+b.xmax+", "+b.ymax)+")"));return this.view.basemapTerrain.getElevation(a)};e.prototype.queryElevation=function(a){return q.updateGeometryElevation(a.clone(),this)};h([a.property({readOnly:!0})],e.prototype,"demResolution",void 0);h([a.property({readOnly:!0,dependsOn:["view.basemapTerrain.extent","view.basemapTerrain.spatialReference"]})],e.prototype,"extent",null);h([a.property({readOnly:!0})],e.prototype,"noDataValue",void 0);h([a.property({readOnly:!0,aliasOf:"view.basemapTerrain.spatialReference"})], e.prototype,"spatialReference",void 0);h([a.property({constructOnly:!0})],e.prototype,"view",void 0);return e=h([a.subclass("esri.views.support.GroundViewElevationSampler")],e)}(a.declared(l,m))})},"esri/layers/support/ElevationSampler":function(){define("require exports ../../geometry ../../core/Logger ../../geometry/support/aaBoundingRect ../../geometry/support/contains ../../geometry/support/scaleUtils ../../geometry/support/webMercatorUtils".split(" "),function(b,e,n,h,l,m,k,a){function f(a,b){var c= d(a,b.spatialReference);if(!c)return null;switch(a.type){case "point":a.z=b.elevationAt(c)||0;break;case "polyline":r.spatialReference=c.spatialReference;for(var e=a.hasM&&!a.hasZ,f=0;fa+1&&(this.levels.length=a+1)};b.prototype.getMaxLod=function(){return this.levels.length-1};b.prototype.scaleAtLevel=function(a){return this.levels[0].scale/Math.pow(2,a)};b.prototype.levelAtScale=function(a){var b= this.levels[0].scale;return a>=b?0:Math.log(b/a)*Math.LOG2E};b.prototype.resolutionAtLevel=function(a){return this.levels[0].resolution/Math.pow(2,a)};b.prototype.compatibleWith=function(a){if(!(a instanceof b)){if(b._checkUnsupported(a))return!1;a=new b(a)}if(!a.spatialReference.equals(this.spatialReference)||a.pixelSize[0]!==this.pixelSize[0]||a.pixelSize[1]!==this.pixelSize[1])return!1;var c=Math.min(this.levels.length,a.levels.length)-1,d=this.levels[c].resolution,e=.5*d;if(!f.floatEqualAbsolute(a.origin[0], this.origin[0],e)||!f.floatEqualAbsolute(a.origin[1],this.origin[1],e))return!1;e=.5*d/Math.pow(2,c)/Math.max(this.pixelSize[0],this.pixelSize[1])*12;return f.floatEqualAbsolute(d,a.levels[c].resolution,e)};b.prototype.rootTilesInExtent=function(a,c,d){var e=this.levels[0].tileSize;b.computeRowColExtent(a,e,this.origin,r);a=r[1];var f=r[3],g=r[0],h=r[2],k=h-g,l=f-a;k*l>d&&(d=Math.floor(Math.sqrt(d)),l>d&&(a=a+Math.floor(.5*l)-Math.floor(.5*d),f=a+d),k>d&&(g=g+Math.floor(.5*k)-Math.floor(.5*d),h=g+ d));d=Array((h-g)*(f-a));k=0;for(l=a;l=b};b._checkUnsupported=function(a){return a?1>a.lods.length?new h("tilingscheme:generic","Tiling scheme must have at least one level"):b.isPowerOfTwo(a)? null:new h("tilingscheme:power-of-two","Tiling scheme must be power of two"):new h("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")};b.checkUnsupported=function(a){var c=b._checkUnsupported(a);return c?c:b.hasGapInLevels(a)?new h("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):b.tileSizeSupported(a)?null:new h("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]")};b.fromExtent=function(c,d){var e= c[2]-c[0],f=c[3]-c[1],h=k.getMetersPerUnitForSR(d),g=1.2*Math.max(e,f);c=new b(new a({size:[256,256],origin:{x:c[0]-.5*(g-e),y:c[3]+.5*(g-f)},lods:[{level:0,resolution:g/256,scale:1/(256/96*.0254/(g*h))}],spatialReference:d}));c.ensureMaxLod(20);return c};b.makeWebMercatorAuxiliarySphere=function(a){void 0===a&&(a=19);var c=new b(b.WebMercatorAuxiliarySphereTileInfo);c.ensureMaxLod(a);return c};b.makeWGS84WithTileSize=function(c,d){void 0===d&&(d=16);var e=256/c;c=new b(new a({size:[c,c],origin:{x:-180, y:90,spatialReference:l.WGS84},spatialReference:l.WGS84,lods:[{level:0,resolution:.703125*e,scale:2.95497598570834E8*e}]}));c.ensureMaxLod(d);return c};b.WebMercatorAuxiliarySphereTileInfo=new a({size:[256,256],origin:{x:-2.0037508342787E7,y:2.0037508342787E7,spatialReference:l.WebMercator},spatialReference:l.WebMercator,lods:[{level:0,resolution:156543.03392800014,scale:5.91657527591555E8}]});b.WebMercatorAuxiliarySphere=b.makeWebMercatorAuxiliarySphere(19);return b}();var r=m.create();return b})}, "esri/views/support/DefaultsFromMap":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/Accessor ../../core/arrayUtils ../../core/Handles ../../core/Logger ../../core/watchUtils ../../core/accessorSupport/decorators ../../geometry/support/heightModelInfoUtils ../../geometry/support/webMercatorUtils ../../portal/support/geometryServiceUtils".split(" "),function(b,e,n,h,l,m,k,a,f,d,c,q,r){function x(a){return a?JSON.stringify(a.toJSON()): "undefined"}function z(a){switch(a){case 0:return"Waiting";case 1:return"Found";case 2:return"Exhausted"}return"Unknown: "+a}var v=a.getLogger("esri.views.support.DefaultsFromMap");return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b._handles=new k;b._waitTask=null;b._isStarted=!1;b._spatialReferenceCandidates=null;b._extentCandidates=null;b.logDebugInformation=!1;b.isSpatialReferenceDone=!1;b.isTileInfoDone=!1;b.isHeightModelInfoSearching=!1;b.spatialReference=null;b.extent= null;b.heightModelInfo=null;b.vcsWkid=null;b.latestVcsWkid=null;b.mapCollectionPaths=e.DefaultMapCollectionPaths.slice();b.tileInfo=null;return b}n(b,a);e=b;b.prototype.initialize=function(){var a=this;this.watch("mapCollectionPaths",function(){a._isStarted&&(a.reset(),a.start())})};b.prototype.destroy=function(){this._set("view",null);this._handles&&(this._handles.destroy(),this._handles=null,this._isStarted=!1);this._cancelLoading()};b.prototype.reset=function(){this._handles.removeAll();this._isStarted= !1;this._set("isSpatialReferenceDone",!1);this._set("isTileInfoDone",!1);this._set("isHeightModelInfoSearching",!1);this._set("spatialReference",null);this._set("extent",null);this._set("heightModelInfo",null);this._set("vcsWkid",null);this._set("latestVcsWkid",null);this._set("tileInfo",null);this._extentCandidates=this._spatialReferenceCandidates=null};b.prototype.start=function(){this._handles.removeAll();this._isStarted=!0;for(var a=this._updateLayerChange.bind(this),b=0,c=this.mapCollectionPaths;b< c.length;b++)this._handles.add(f.on(this.view,"map."+c[b],"change",a,a,a,!0))};b.prototype._ownerNameFromCollectionName=function(a){var b=a.lastIndexOf(".");return-1===b?"view":"view."+a.slice(0,b)};b.prototype._ensureLoadedOwnersFromCollectionName=function(a){a=this._ownerNameFromCollectionName(a).split(".");for(var b,c=0;cb.length?(d=this.defaultSpatialReference,this._debugLog("No spatial reference found, locking to default ("+x(d)+")")):(this.defaultSpatialReference&&1u)for(;u