text: (function(){var e={"esri/geometry/support/normalizeUtils":234,"esri/layers/graphics/data/projectionSupport":263,"esri/tasks/geometry/cut":279,"esri/tasks/geometry/simplify":280,"esri/geometry/projection":291,"esri/geometry/pe":310,"esri/geometry/support/GeographicTransformation":311,"esri/geometry/support/GeographicTransformationStep":312,"esri/layers/graphics/data/utils":315,"esri/layers/graphics/centroid":349,"esri/geometry/geometryAdapters/json":361,"esri/layers/graphics/data/attributeSupport":363,"esri/layers/graphics/data/optimizedFeatureQueryEngineAdapter":384,"esri/layers/graphics/data/timeSupport":512,"esri/layers/graphics/data/spatialQuerySupport":559,"esri/core/sql/WhereClauseCache":1031,"esri/layers/graphics/contains":1032},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{1031:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(595),r(301)],void 0===(i=function(e,t,r,n){Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._cache=new r(e),this._invalidCache=new r(t)}return e.prototype.get=function(e,t){var r=t.uid+":"+e,i=this._cache.get(r);if(i)return i;if(void 0!==this._invalidCache.get(r))return null;try{var o=n.WhereClause.create(e,t);return this._cache.put(r,o),o}catch(e){return this._invalidCache.put(r,null),null}},e}();t.WhereClauseCache=i}.apply(null,n))||(e.exports=i)},1032:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=function(e,t){function r(e,t){return e?t?4:3:t?3:2}function n(e,t,n,o,s){if(!e)return!1;for(var a=r(t,n),u=e.coords,p=!1,l=0,_=0,c=e.lengths;_<c.length;_++){var f=c[_];p=i(p,u,a,l,f,o,s),l+=f*a}return p}function i(e,t,r,n,i,o,s){for(var a=e,u=n,p=n,l=n+i*r;p<l;p+=r){(u=p+r)===l&&(u=n);var _=t[p],c=t[p+1],f=t[u],h=t[u+1];(c<s&&h>=s||h<s&&c>=s)&&_+(s-c)/(h-c)*(f-_)<o&&(a=!a)}return a}Object.defineProperty(t,"__esModule",{value:!0}),t.polygonContainsPoint=function(e,t,r,i){return n(e,t,r,i.coords[0],i.coords[1])},t.polygonContainsMultipoint=function(e,t,i,o,s,a){var u=r(s,a),p=o.coords,l=o.lengths;if(!l)return!1;for(var _=0,c=0;_<l.length;_++,c+=u)if(!n(e,t,i,p[c],p[c+1]))return!1;return!0},t.polygonContainsCoords=n}.apply(null,n))||(e.exports=i)},234:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(100),r(154),r(156),r(152),r(153),r(232),r(259),r(170),r(178),r(197),r(279),r(280)],void 0===(i=function(e,t,r,n,i,o,s,a,u,p,l,_,c,f,h){Object.defineProperty(t,"__esModule",{value:!0});var g=o.getLogger("esri.geometry.support.normalizeUtils"),d={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new p({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:l.WebMercator}),minus180Line:new p({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:l.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new p({paths:[[[180,-180],[180,180]]],spatialReference:l.WGS84}),minus180Line:new p({paths:[[[-180,-180],[-180,180]]],spatialReference:l.WGS84})}};function P(e){return"polygon"===e.type}function v(e){return P(e)?e.rings:e.paths}function y(e,t){return Math.ceil((e-t)/(2*t))}function m(e,t){for(var r=0,n=v(e);r<n.length;r++)for(var i=0,o=n[r];i<o.length;i++)o[i][0]+=t;return e}function E(e){for(var t=[],r=0,n=0,i=0;i<e.length;i++){for(var o=e[i],s=null,a=0;a<o.length;a++)s=o[a],t.push(s),0===a?n=r=s[0]:(r=Math.min(r,s[0]),n=Math.max(n,s[0]));s&&t.push([(r+n)/2,0])}return t}function S(e,t){if(!(e instanceof p||e instanceof u)){var r="straightLineDensify: the input geometry is neither polyline nor polygon";throw g.error(r),new i(r)}for(var n=[],o=0,s=v(e);o<s.length;o++){var a=s[o],l=[];n.push(l),l.push([a[0][0],a[0][1]]);for(var _=0;_<a.length-1;_++){var c=a[_][0],f=a[_][1],h=a[_+1][0],d=a[_+1][1],y=Math.sqrt((h-c)*(h-c)+(d-f)*(d-f)),m=(d-f)/y,E=(h-c)/y,S=y/t;if(S>1){for(var T=1;T<=S-1;T++){var M=T*t,N=E*M+c,O=m*M+f;l.push([N,O])}var R=(y+Math.floor(S-1)*t)/2,w=E*R+c,I=m*R+f;l.push([w,I])}l.push([h,d])}}return P(e)?new u({rings:n,spatialReference:e.spatialReference}):new p({paths:n,spatialReference:e.spatialReference})}function T(e,t,r){if(t){var n=S(e,1e6);e=c.webMercatorToGeographic(n,!0)}return r&&(e=m(e,r)),e}function M(e,t,r){var n;if(Array.isArray(e))if((n=e[0])>t){var i=y(n,t);e[0]=n+i*(-2*t)}else n<r&&(i=y(n,r),e[0]=n+i*(-2*r));else(n=e.x)>t?(i=y(n,t),e=e.clone().offset(i*(-2*t),0)):n<r&&(i=y(n,r),e=e.clone().offset(i*(-2*r),0));return e}t.straightLineDensify=S,t.normalizeCentralMeridian=function e(t,i,o){return r.__awaiter(this,void 0,void 0,(function(){var l,g,P,E,S,N,O,R,w,I,x,G,A,b,j,F,C,D,U,k,Y,L,z,X,Z,V,W,J,q,B,H,Q,K,$,ee,te,re;return r.__generator(this,(function(r){switch(r.label){case 0:if(!Array.isArray(t))return[2,e([t],i)];for(l=i?i.url:n.geometryServiceUrl,I=0,x=[],G=[],A=0,b=t;A<b.length;A++)j=b[A],s.isNone(j)?G.push(j):(g||(g=j.spatialReference,P=_.getInfo(g),E=g.isWebMercator,S=d[O=E?102100:4326].maxX,N=d[O].minX,R=d[O].plus180Line,w=d[O].minus180Line),P?"mesh"===j.type?G.push(j):"point"===j.type?G.push(M(j.clone(),S,N)):"multipoint"===j.type?((F=j.clone()).points=F.points.map((function(e){return M(e,S,N)})),G.push(F)):"extent"===j.type?(D=j.clone(),C=D._normalize(!1,!1,P),G.push(C.rings?new u(C):C)):j.extent?(D=j.extent,U=y(D.xmin,N),Y=0==(k=U*(2*S))?j.clone():m(j.clone(),k),D.offset(k,0),D.intersects(R)&&D.xmax!==S?(I=D.xmax>I?D.xmax:I,Y=T(Y,E),x.push(Y),G.push("cut")):D.intersects(w)&&D.xmin!==N?(I=D.xmax*(2*S)>I?D.xmax*(2*S):I,Y=T(Y,E,360),x.push(Y),G.push("cut")):G.push(Y)):G.push(j.clone()):G.push(j));for(L=y(I,S),z=-90,X=L,Z=new p;L>0;)V=360*L-180,Z.addPath([[V,z],[V,-1*z]]),z*=-1,L--;return x.length>0&&X>0?[4,f.cut(l,x,Z,o)]:[3,3];case 1:for(W=r.sent(),J=function(e,t){for(var r=-1,n=function(n){for(var i=t.cutIndexes[n],o=t.geometries[n],s=v(o),a=function(e){var t=s[e];t.some((function(r){if(r[0]<180)return!0;for(var n=0,i=0;i<t.length;i++){var s=t[i][0];n=s>n?s:n}for(var a=-360*y(n=Number(n.toFixed(9)),180),u=0;u<t.length;u++){var p=o.getPoint(e,u);o.setPoint(e,u,p.clone().offset(a,0))}return!0}))},u=0;u<s.length;u++)a(u);if(i===r){if("polygon"===e[0].type)for(var p=0,l=v(o);p<l.length;p++){var _=l[p];e[i]=e[i].addRing(_)}else if(function(e){return"polyline"===e[0].type}(e))for(var c=0,f=v(o);c<f.length;c++){var h=f[c];e[i]=e[i].addPath(h)}}else r=i,e[i]=o},i=0;i<t.cutIndexes.length;i++)n(i);return e}(x,W),q=[],B=[],ee=0;ee<G.length;ee++)"cut"!==(te=G[ee])?B.push(te):(re=J.shift(),H=t[ee],s.isSome(H)&&"polygon"===H.type&&H.rings&&H.rings.length>1&&re.rings.length>=H.rings.length?(q.push(re),B.push("simplify")):B.push(E?c.geographicToWebMercator(re):re));return q.length?[4,h.simplify(l,q,o)]:[2,B];case 2:for(Q=r.sent(),K=[],ee=0;ee<B.length;ee++)"simplify"!==(te=B[ee])?K.push(te):K.push(E?c.geographicToWebMercator(Q.shift()):Q.shift());return[2,K];case 3:for($=[],ee=0;ee<G.length;ee++)"cut"!==(te=G[ee])?$.push(te):(re=x.shift(),$.push(!0===E?c.geographicToWebMercator(re):re));return[2,a.resolve($)]}}))}))},t.getDenormalizedExtent=function(e){var t;if(!e)return null;var r=e.extent;if(!r)return null;var n=e.spatialReference&&_.getInfo(e.spatialReference);if(!n)return r;var i,o=n.valid,s=o[0],a=o[1],u=2*a,p=r.width,l=r.xmin,c=r.xmax;if(l=(t=[c,l])[0],c=t[1],"extent"===e.type||0===p||p<=a||p>u||l<s||c>a)return r;switch(e.type){case"polygon":if(!(e.rings.length>1))return r;i=E(e.rings);break;case"polyline":if(!(e.paths.length>1))return r;i=E(e.paths);break;case"multipoint":i=e.points}for(var f=r.clone(),h=0;h<i.length;h++){var g=i[h][0];g<0?(g+=a,c=Math.max(g,c)):(g-=a,l=Math.min(g,l))}return f.xmin=l,f.xmax=c,f.width<p?(f.xmin-=a,f.xmax-=a,f):r},t.normalizeMapX=function(e,t){var r=_.getInfo(t);if(r){var n=r.valid,i=n[0],o=n[1],s=o-i;if(e<i)for(;e<i;)e+=s;if(e>o)for(;e>o;)e-=s}return e}}.apply(null,n))||(e.exports=i)},263:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(154),r(153),r(291),r(361),r(178),r(197)],void 0===(i=function(e,t,r,n,i,o,s,a,u){Object.defineProperty(t,"__esModule",{value:!0});var p=[0,0];function l(e,t){var r,n,i;if(!t)return null;if("x"in t){var o={x:0,y:0};return r=e(t.x,t.y,p),o.x=r[0],o.y=r[1],null!=t.z&&(o.z=t.z),null!=t.m&&(o.m=t.m),o}return"xmin"in t?(o={xmin:0,ymin:0,xmax:0,ymax:0},n=e(t.xmin,t.ymin,p),o.xmin=n[0],o.ymin=n[1],i=e(t.xmax,t.ymax,p),o.xmax=i[0],o.ymax=i[1],t.hasZ&&(o.zmin=t.zmin,o.zmax=t.zmax,o.hasZ=!0),t.hasM&&(o.mmin=t.mmin,o.mmax=t.mmax,o.hasM=!0),o):"rings"in t?{rings:_(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:_(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:c(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function _(e,t){for(var r=[],n=0,i=e;n<i.length;n++){var o=i[n];r.push(c(o,t))}return r}function c(e,t){for(var r=[],n=0,i=e;n<i.length;n++){var o=i[n],s=t(o[0],o[1],[0,0]);r.push(s),o.length>2&&s.push(o[2]),o.length>3&&s.push(o[3])}return r}function f(e,t){return!(!a.isValid(e)||!a.isValid(t)||a.equals(e,t)||u.canProject(e,t))}t.doesBrowserSupportProjection=function(e,t){return!f(e,t)||o.isSupported()},t.checkProjectionSupport=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,s,a;return r.__generator(this,(function(r){if(!t)return[2];if(Array.isArray(e)){for(i=0,s=e;i<s.length;i++)if(f((a=s[i]).geometry&&a.geometry.spatialReference,t)){if(o.isSupported())return[2,o.load()];throw new n("feature-store:unsupported-query","projection not supported",{inSpatialReference:e,outSpatialReference:t})}return[2]}if(!f(e,t))return[2];if(o.isSupported())return[2,o.load()];throw new n("feature-store:unsupported-query","projection not supported",{inSpatialReference:e,outSpatialReference:t})}))}))};var h=l.bind(null,u.lngLatToXY),g=l.bind(null,u.xyToLngLat);t.project=function(e,t,r){return e?(r||(r=t,t=e.spatialReference),a.isValid(t)&&a.isValid(r)&&!a.equals(t,r)?u.canProject(t,r)?a.isWebMercator(r)?h(e):g(e):o.projectMany(s.jsonAdapter,[e],t,r,null)[0]:e):e};var d=new(function(){function e(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}return e.prototype.push=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var o,s=this;return r.__generator(this,(function(r){return e&&e.length&&t&&n&&!a.equals(t,n)||i.resolve(e),o={geometries:e,inSpatialReference:t,outSpatialReference:n,resolve:null},this._jobs.push(o),[2,i.create((function(e){o.resolve=e,null===s._timer&&(s._timer=setTimeout(s._process,10))}))]}))}))},e.prototype._process=function(){this._timer=null;var e=this._jobs.shift();if(e){var t=e.geometries,r=e.inSpatialReference,n=e.outSpatialReference,i=e.resolve;u.canProject(r,n)?a.isWebMercator(n)?i(t.map(h)):i(t.map(g)):i(o.projectMany(s.jsonAdapter,t,r,n,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}},e}());t.projectMany=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,d.push(e,t,n)]}))}))}}.apply(null,n))||(e.exports=i)},279:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(159),r(165),r(172),r(163)],void 0===(i=function(e,t,r,n,i,o,s){Object.defineProperty(t,"__esModule",{value:!0}),t.cut=function(e,t,a,u){return r.__awaiter(this,void 0,void 0,(function(){var p,l,_,c,f,h,g;return r.__generator(this,(function(d){switch(d.label){case 0:return p="string"==typeof e?o.urlToObject(e):e,l=t[0].spatialReference,_=r.__assign(r.__assign({},u),{query:r.__assign(r.__assign({},p.query),{f:"json",sr:JSON.stringify(l),target:JSON.stringify({geometryType:s.getJsonType(t[0]),geometries:t}),cutter:JSON.stringify(a)})}),[4,i(p.path+"/cut",_)];case 1:return c=d.sent(),f=c.data,h=f.cutIndexes,g=f.geometries,[2,{cutIndexes:h,geometries:(void 0===g?[]:g).map((function(e){return n.fromJSON(e).set(l)}))}]}}))}))}}.apply(null,n))||(e.exports=i)},280:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(165),r(172),r(163)],void 0===(i=function(e,t,r,n,i,o){function s(e){return{geometryType:o.getJsonType(e[0]),geometries:e.map((function(e){return e.toJSON()}))}}function a(e,t,r){var n=o.getGeometryType(t);return e.map((function(e){var t=n.fromJSON(e);return t.spatialReference=r,t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.simplify=function(e,t,u){return r.__awaiter(this,void 0,void 0,(function(){var p,l,_,c;return r.__generator(this,(function(f){switch(f.label){case 0:return p="string"==typeof e?i.urlToObject(e):e,l=t[0].spatialReference,_=o.getJsonType(t[0]),c=r.__assign(r.__assign({},u),{query:r.__assign(r.__assign({},p.query),{f:"json",sr:l.wkid?l.wkid:JSON.stringify(l),geometries:JSON.stringify(s(t))})}),[4,n(p.path+"/simplify",c)];case 1:return[2,a(f.sent().data,_,l)]}}))}))}}.apply(null,n))||(e.exports=i)},291:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(153),r(310),r(311),r(161)],void 0===(i=function(e,t,n,i,o){Object.defineProperty(t,"__esModule",{value:!0});var s=null,a=null;t.isLoaded=function(){return!!s&&i.isLoaded()},t.isSupported=function(){return i.isSupported()};var u=null;t.load=function(){return u||(u=n.all([i.load(),new Promise((function(e,t){r.e(12).then(function(){var t=[r(381)];e.apply(null,t)}.bind(this)).catch(t.bind(this))})),new Promise((function(e,t){r.e(140).then(function(){var t=[r(405)];e.apply(null,t)}.bind(this)).catch(t.bind(this))}))]).then((function(e){var t=e[1],r=e[2].hydratedAdapter;a=r,(s=t)._enableProjection(i)})))},t.project=function(e,t,r){return void 0===r&&(r=null),e instanceof Array?0===e.length?[]:l(a,e,e[0].spatialReference,t,r):l(a,[e],e.spatialReference,t,r)[0]};var p={};function l(e,t,r,n,i){if(void 0===i&&(i=null),null===i){var a=o.cacheKey(r,n);void 0!==p[a]?i=p[a]:(null===(i=_(r,n,null))&&(i=new o),p[a]=i)}return s._project(e,t,r,n,i)}function _(e,t,r){void 0===r&&(r=null);var n=s._getTransformation(a,e,t,r,null==r?void 0:r.spatialReference);return null!==n?o.fromGE(n):null}t.projectMany=l,t.getTransformation=_,t.getTransformations=function(e,t,r){void 0===r&&(r=null);var n=s._getTransformationBySuitability(a,e,t,r,null==r?void 0:r.spatialReference);if(null!==n){for(var i=[],u=0,p=n;u<p.length;u++){var l=p[u];i.push(o.fromGE(l))}return i}return[]}}.apply(null,n))||(e.exports=i)},310:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(271),r(164),r(153),r(161)],void 0===(i=function(e,t,n,i,o,s){var a,u,p,l,_,c;function f(e){function r(e,t,r){e[t]=r(e[t])}t._pe=e,u.init(),p.init(),l.init(),_.init(),c.init(),t.PeGCSExtent=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(r,e),r.prototype.destroy=function(){t._pe.destroy(this)},r}(t._pe.PeGCSExtent);for(var i=0,o=[t._pe.PeDatum,t._pe.PeGeogcs,t._pe.PeGeogtran,t._pe.PeObject,t._pe.PeParameter,t._pe.PePrimem,t._pe.PeProjcs,t._pe.PeSpheroid,t._pe.PeUnit];i<o.length;i++)r(o[i].prototype,"getName",(function(e){return function(){return e.call(this,new Array(u.PE_NAME_MAX))}}));for(var s=0,a=[t._pe.PeGeogtran,t._pe.PeProjcs];s<a.length;s++)r(a[s].prototype,"getParameters",(function(e){return function(){for(var r=new Array(u.PE_PARM_MAX),n=e.call(this),i=0;i<r.length;i++){var o=t._pe.getValue(n,"*");r[i]=o?t._pe.wrapPointer(o,t._pe.PeParameter):null,n+=Int32Array.BYTES_PER_ELEMENT}return r}}));r(t._pe.PeHorizon.prototype,"getCoord",(function(e){return function(){var t=this.getSize();if(!t)return null;var r=[];return P(r,t,e.call(this)),r}})),r(t._pe.PeGTlistExtendedEntry.prototype,"getEntries",(function(e){var r=t._pe._pe_getPeGTlistExtendedGTsSize();return function(){var n=null,i=e.call(this);if(!t._pe.compare(i,t._pe.NULL)){n=[i];var o=this.getSteps();if(o>1)for(var s=t._pe.getPointer(i),a=1;a<o;a++)n.push(t._pe.wrapPointer(s+r*a,t._pe.PeGTlistExtendedGTs))}return n}}));var f=t._pe._pe_getPeHorizonSize(),h=function(e){return function(){var r=this._cache;if(r||(r=new Map,this._cache=r),r.has(e))return r.get(e);var n=null,i=e.call(this);if(!t._pe.compare(i,t._pe.NULL)){n=[i];var o=i.getNump();if(o>1)for(var s=t._pe.getPointer(i),a=1;a<o;a++)n.push(t._pe.wrapPointer(s+f*a,t._pe.PeHorizon))}return r.set(e,n),n}};r(t._pe.PeProjcs.prototype,"horizonGcsGenerate",h),r(t._pe.PeProjcs.prototype,"horizonPcsGenerate",h),t._pe.PeObject.prototype.toString=function(e){void 0===e&&(e=u.PE_STR_OPTS_NONE),t._pe.ensureCache.prepare();var r=t._pe.getPointer(this),n=t._pe.ensureInt8(new Array(u.PE_BUFFER_MAX));return t._pe.UTF8ToString(t._pe._pe_object_to_string_ext(r,e,n))}}function h(e){if(e){var r=t._pe.getClass(e);if(r){var n=t._pe.getCache(r);if(n){var i=t._pe.getPointer(e);i&&delete n[i]}}}}function g(e,r){for(var n=[],i=new Array(r),o=0;o<e;o++)n.push(t._pe.ensureInt8(i));return n}function d(e){var t;return Array.isArray(e[0])?(t=[],e.forEach((function(e){t.push(e[0],e[1])}))):t=e,t}function P(e,r,n,i){if(void 0===i&&(i=!1),i)for(var o=0;o<2*r;o++)e[o]=t._pe.getValue(n+o*Float64Array.BYTES_PER_ELEMENT,"double");else{var s=0===e.length;for(o=0;o<r;o++)s&&(e[o]=new Array(2)),e[o][0]=t._pe.getValue(n,"double"),e[o][1]=t._pe.getValue(n+Float64Array.BYTES_PER_ELEMENT,"double"),n+=2*Float64Array.BYTES_PER_ELEMENT}}Object.defineProperty(t,"__esModule",{value:!0}),t._pe=null,t.isLoaded=function(){return!!t._pe},t.isSupported=function(){return!!o("esri-wasm")},t.load=function(){return a||(a=s.create((function(e,t){new Promise((function(e,t){r.e(122).then(function(){var t=[r(474)];e.apply(null,t)}.bind(this)).catch(t.bind(this))})).then((function(r){r({locateFile:function(e){return i.getAssetUrl("esri/geometry/support/"+e)},onAbort:function(e){t(new Error(e))}}).then((function(t){f(t),e()}))}))})))},function(e){function r(e,r,n){t._pe.ensureCache.prepare();var i=d(n),o=n===i,s=t._pe.ensureFloat64(i),a=t._pe._pe_geog_to_proj(t._pe.getPointer(e),r,s);return a&&P(n,r,s,o),a}function n(e,t,r){return i(e,t,r,0)}function i(e,r,n,i){t._pe.ensureCache.prepare();var o=d(n),s=n===o,a=t._pe.ensureFloat64(o),u=t._pe._pe_proj_to_geog_center(t._pe.getPointer(e),r,a,i);return u&&P(n,r,a,s),u}e.geogToProj=r,e.projGeog=function(e,t,i,o){switch(o){case u.PE_TRANSFORM_P_TO_G:return n(e,t,i);case u.PE_TRANSFORM_G_TO_P:return r(e,t,i)}return 0},e.projToGeog=n,e.projToGeogCenter=i}(t.PeCSTransformations||(t.PeCSTransformations={})),function(e){e.init=function(){e.PE_BUFFER_MAX=t._pe.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=t._pe.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=t._pe.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=t._pe.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=t._pe.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=t._pe.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=t._pe.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=t._pe.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=t._pe.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=t._pe.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=t._pe.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=t._pe.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=t._pe.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=t._pe.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=t._pe.PeDefs.prototype.PE_TYPE_UNIT,e.PE_STR_OPTS_NONE=t._pe.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=t._pe.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=t._pe.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=t._pe.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_PARM_X0=t._pe.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=t._pe.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=t._pe.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=t._pe.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=t._pe.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=t._pe.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=t._pe.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=t._pe.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=t._pe.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=t._pe.PeDefs.prototype.PE_HORIZON_DELTA}}(u=t.PeDefs||(t.PeDefs={})),function(e){var r={},n={};function i(e,n){var i=null,s=r[e];if(s||(s={},r[e]=s),s.hasOwnProperty(String(n)))i=s[n];else{var a=t._pe.PeFactory.prototype.factoryByType(e,n);t._pe.compare(a,t._pe.NULL)||(i=a,s[n]=i)}return o(i)}function o(e){if(e){var r=e.getType();switch(r){case u.PE_TYPE_GEOGCS:e=t._pe.castObject(e,t._pe.PeGeogcs);break;case u.PE_TYPE_PROJCS:e=t._pe.castObject(e,t._pe.PeProjcs);break;case u.PE_TYPE_GEOGTRAN:e=t._pe.castObject(e,t._pe.PeGeogtran);break;default:r&u.PE_TYPE_UNIT&&(e=t._pe.castObject(e,t._pe.PeUnit))}}return e}e.initialize=function(){t._pe.PeFactory.prototype.initialize(null)},e.coordsys=function(e){return i(u.PE_TYPE_COORDSYS,e)},e.factoryByType=i,e.fromString=function(e,r){var i=null,s=n[e];if(s||(s={},n[e]=s),s.hasOwnProperty(r))i=s[r];else{var a=t._pe.PeFactory.prototype.fromString(e,r);t._pe.compare(a,t._pe.NULL)||(i=a,s[r]=i)}return o(i)},e.geogcs=function(e){return i(u.PE_TYPE_GEOGCS,e)},e.geogtran=function(e){return i(u.PE_TYPE_GEOGTRAN,e)},e.getCode=function(e){return t._pe.PeFactory.prototype.getCode(e)},e.projcs=function(e){return i(u.PE_TYPE_PROJCS,e)},e.unit=function(e){return i(u.PE_TYPE_UNIT,e)}}(t.PeFactory||(t.PeFactory={})),t.PeGCSExtent=null,function(e){var r;e.init=function(){e.PE_GTLIST_OPTS_COMMON=t._pe.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,r=t._pe._pe_getPeGTlistExtendedEntrySize()},e.getGTlist=function(e,n,i,o,s,a){var u=null,p=new t._pe.PeInteger(a);try{var l=t._pe.PeGTlistExtended.prototype.getGTlist(e,n,i,o,s,p);if((a=p.val)&&(u=[l],a>1))for(var _=t._pe.getPointer(l),c=1;c<a;c++)u.push(t._pe.wrapPointer(_+r*c,t._pe.PeGTlistExtendedEntry))}finally{t._pe.destroy(p)}return u}}(p=t.PeGTlistExtended||(t.PeGTlistExtended={})),function(e){e.destroy=function(e){if(e&&e.length){for(var r=0,n=e;r<n.length;r++){var i=n[r];h(i),i.getEntries().forEach((function(e){h(e);var t=e.getGeogtran();h(t),t.getParameters().forEach(h),[t.getGeogcs1(),t.getGeogcs2()].forEach((function(e){h(e);var t=e.getDatum();h(t),h(t.getSpheroid()),h(e.getPrimem()),h(e.getUnit())}))}))}t._pe.PeGTlistExtendedEntry.prototype.Delete(e[0])}}}(t.PeGTlistExtendedEntry||(t.PeGTlistExtendedEntry={})),function(e){e.geogToGeog=function(e,r,n,i,o){t._pe.ensureCache.prepare();var s=d(n),a=n===s,u=t._pe.ensureFloat64(s),p=0;i&&(p=t._pe.ensureFloat64(i));var l=t._pe._pe_geog_to_geog(t._pe.getPointer(e),r,u,p,o);return l&&P(n,r,u,a),l}}(t.PeGTTransformations||(t.PeGTTransformations={})),function(e){function r(e,r,n,i,o,s){var a,p;switch(t._pe.ensureCache.prepare(),e){case"dd":a=t._pe._pe_geog_to_dd,p=u.PE_DD_MAX;break;case"ddm":a=t._pe._pe_geog_to_ddm,p=u.PE_DDM_MAX;break;case"dms":a=t._pe._pe_geog_to_dms,p=u.PE_DMS_MAX}var l=0;r&&(l=t._pe.getPointer(r));var _=d(i),c=t._pe.ensureFloat64(_),f=g(n,p),h=a(l,n,c,o,t._pe.ensureInt32(f));if(h)for(var P=0;P<n;P++)s[P]=t._pe.UTF8ToString(f[P]);return h}function n(e,r,n,i,o){var s;switch(t._pe.ensureCache.prepare(),e){case"dd":s=t._pe._pe_dd_to_geog;break;case"ddm":s=t._pe._pe_ddm_to_geog;break;case"dms":s=t._pe._pe_dms_to_geog}var a=0;r&&(a=t._pe.getPointer(r));var u=i.map((function(e){return t._pe.ensureString(e)})),p=t._pe.ensureInt32(u),l=t._pe.ensureFloat64(new Array(2*n)),_=s(a,n,p,l);return _&&P(o,n,l),_}e.geog_to_dms=function(e,t,n,i,o){return r("dms",e,t,n,i,o)},e.dms_to_geog=function(e,t,r,i){return n("dms",e,t,r,i)},e.geog_to_ddm=function(e,t,n,i,o){return r("ddm",e,t,n,i,o)},e.ddm_to_geog=function(e,t,r,i){return n("ddm",e,t,r,i)},e.geog_to_dd=function(e,t,n,i,o){return r("dd",e,t,n,i,o)},e.dd_to_geog=function(e,t,r,i){return n("dd",e,t,r,i)}}(t.PeNotationDms||(t.PeNotationDms={})),function(e){e.init=function(){e.PE_MGRS_STYLE_NEW=t._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=t._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=t._pe.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=t._pe.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=t._pe.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES},e.geog_to_mgrs_extended=function(e,r,n,i,o,s,a){t._pe.ensureCache.prepare();var p=0;e&&(p=t._pe.getPointer(e));var l=d(n),_=t._pe.ensureFloat64(l),c=g(r,u.PE_MGRS_MAX),f=t._pe.ensureInt32(c),h=t._pe._pe_geog_to_mgrs_extended(p,r,_,i,o,s,f);if(h)for(var P=0;P<r;P++)a[P]=t._pe.UTF8ToString(c[P]);return h},e.mgrs_to_geog_extended=function(e,r,n,i,o){t._pe.ensureCache.prepare();var s=0;e&&(s=t._pe.getPointer(e));var a=n.map((function(e){return t._pe.ensureString(e)})),u=t._pe.ensureInt32(a),p=t._pe.ensureFloat64(new Array(2*r)),l=t._pe._pe_mgrs_to_geog_extended(s,r,u,i,p);return l&&P(o,r,p),l}}(l=t.PeNotationMgrs||(t.PeNotationMgrs={})),function(e){e.geog_to_usng=function(e,r,n,i,o,s,a){t._pe.ensureCache.prepare();var p=0;e&&(p=t._pe.getPointer(e));var l=d(n),_=t._pe.ensureFloat64(l),c=g(r,u.PE_MGRS_MAX),f=t._pe.ensureInt32(c),h=t._pe._pe_geog_to_usng(p,r,_,i,o,s,f);if(h)for(var P=0;P<r;P++)a[P]=t._pe.UTF8ToString(c[P]);return h},e.usng_to_geog=function(e,r,n,i){t._pe.ensureCache.prepare();var o=0;e&&(o=t._pe.getPointer(e));var s=n.map((function(e){return t._pe.ensureString(e)})),a=t._pe.ensureInt32(s),u=t._pe.ensureFloat64(new Array(2*r)),p=t._pe._pe_usng_to_geog(o,r,a,u);return p&&P(i,r,u),p}}(t.PeNotationUsng||(t.PeNotationUsng={})),function(e){e.init=function(){e.PE_UTM_OPTS_NONE=t._pe.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=t._pe.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=t._pe.PeNotationUtm.prototype.PE_UTM_OPTS_NS},e.geog_to_utm=function(e,r,n,i,o){t._pe.ensureCache.prepare();var s=0;e&&(s=t._pe.getPointer(e));var a=d(n),p=t._pe.ensureFloat64(a),l=g(r,u.PE_UTM_MAX),_=t._pe.ensureInt32(l),c=t._pe._pe_geog_to_utm(s,r,p,i,_);if(c)for(var f=0;f<r;f++)o[f]=t._pe.UTF8ToString(l[f]);return c},e.utm_to_geog=function(e,r,n,i,o){t._pe.ensureCache.prepare();var s=0;e&&(s=t._pe.getPointer(e));var a=n.map((function(e){return t._pe.ensureString(e)})),u=t._pe.ensureInt32(a),p=t._pe.ensureFloat64(new Array(2*r)),l=t._pe._pe_utm_to_geog(s,r,u,i,p);return l&&P(o,r,p),l}}(_=t.PeNotationUtm||(t.PeNotationUtm={})),function(e){var r=new Map;e.init=function(){e.PE_PCSINFO_OPTION_NONE=t._pe.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=t._pe.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=t._pe.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=t._pe.PePCSInfo.prototype.PE_POLE_POINT},e.generate=function(n,i){var o,s;return void 0===i&&(i=e.PE_PCSINFO_OPTION_DOMAIN),r.has(n)&&(s=r.get(n))[i]&&(o=s[i]),o||(o=t._pe.PePCSInfo.prototype.generate(n,i),s||(s=[],r.set(n,s)),s[i]=o),o}}(c=t.PePCSInfo||(t.PePCSInfo={})),function(e){e.version_string=function(){return t._pe.PeVersion.prototype.version_string()}}(t.PeVersion||(t.PeVersion={})),t._init=f}.apply(null,n))||(e.exports=i)},311:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(312)],void 0===(i=function(e,t,r){return function(){function e(e){if(this.steps=[],this._cached_projection={},this._chain="",this._gtlistentry=null,e&&e.steps)for(var t=0,n=e.steps;t<n.length;t++){var i=n[t];i instanceof r?this.steps.push(i):this.steps.push(new r({wkid:i.wkid,wkt:i.wkt,isInverse:i.isInverse}))}}return e.cacheKey=function(e,t){return[void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():"",void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():""].join(",")},e.fromGE=function(t){for(var n=new e,i="",o=0,s=t.steps;o<s.length;o++){var a=s[o],u=r.fromGE(a);n.steps.push(u),i+=u.uid.toString()+","}return n._cached_projection={},n._gtlistentry=null,n._chain=i,n},e.prototype.getInverse=function(){var t=new e;t.steps=[];for(var r=this.steps.length-1;r>=0;r--){var n=this.steps[r];t.steps.push(n.getInverse())}return t},e.prototype.getGTListEntry=function(){for(var e="",t=0,r=this.steps;t<r.length;t++)e+=r[t].uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=e),this._gtlistentry},e.prototype.assignCachedGe=function(t,r,n){this._cached_projection[e.cacheKey(t,r)]=n},e.prototype.getCachedGeTransformation=function(t,r){for(var n="",i=0,o=this.steps;i<o.length;i++)n+=o[i].uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=n);var s=this._cached_projection[e.cacheKey(t,r)];return void 0===s?null:s},e}()}.apply(null,n))||(e.exports=i)},312:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=function(e,t){var r=0;return function(){function e(e){void 0===e&&(e=null),this.uid=r++,e?(this._wkt=void 0!==e.wkt?e.wkt:null,this._wkid=void 0!==e.wkid?e.wkid:-1,this._isInverse=void 0!==e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}return e.fromGE=function(t){var r=new e;return r._wkt=t.wkt,r._wkid=t.wkid,r._isInverse=t.isInverse,r},Object.defineProperty(e.prototype,"wkt",{get:function(){return this._wkt},set:function(e){this._wkt=e,this.uid=r++},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wkid",{get:function(){return this._wkid},set:function(e){this._wkid=e,this.uid=r++},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInverse",{get:function(){return this._isInverse},set:function(e){this._isInverse=e,this.uid=r++},enumerable:!0,configurable:!0}),e.prototype.getInverse=function(){var t=new e;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t},e}()}.apply(null,n))||(e.exports=i)},315:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(166),r(152),r(200),r(623),r(163),r(234),r(178),r(349),r(243),r(224),r(263),r(559)],void 0===(i=function(e,t,r,n,i,o,s,a,u,p,l,_,c,f,h){Object.defineProperty(t,"__esModule",{value:!0});var g=new n.default({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});t.QUERY_ENGINE_EMPTY_RESULT=Object.freeze({});var d=new c.default,P=new c.default,v=new c.default,y={esriGeometryPoint:_.convertToPoint,esriGeometryPolyline:_.convertToPolyline,esriGeometryPolygon:_.convertToPolygon,esriGeometryMultipoint:_.convertToMultipoint};function m(e,t,r,n,i){void 0===n&&(n=e.hasZ),void 0===i&&(i=e.hasM);var o=e.hasZ&&n,s=e.hasM&&i;if(r){var a=_.quantizeOptimizedGeometry(v,t,e.hasZ,e.hasM,"esriGeometryPoint",r,n,i);return _.convertToPoint(a,o,s)}return _.convertToPoint(t,o,s)}function E(e,n,o){return r.__awaiter(this,void 0,void 0,(function(){var p,l,_,c,h,g;return r.__generator(this,(function(r){switch(r.label){case 0:return e?(p=e.where,e.where=p=p&&p.trim(),(!p||/^1 *= *1$/.test(p)||n&&n===p)&&(e.where=null),e.geometry?[4,S(e)]:[2,e]):[2,null];case 1:return l=r.sent(),e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel&&(_=e.geometry.spatialReference,(l=s.getGeometryExtent(l)).spatialReference=_),e.geometry=l,[4,f.checkProjectionSupport(l.spatialReference,o)];case 2:return r.sent(),[4,u.normalizeCentralMeridian(a.fromJSON(l))];case 3:if(c=r.sent()[0],i.isNone(c))throw t.QUERY_ENGINE_EMPTY_RESULT;return h=c.toJSON(),[4,f.project(h,h.spatialReference,o)];case 4:if(!(g=r.sent()))throw t.QUERY_ENGINE_EMPTY_RESULT;return g.spatialReference=o,e.geometry=g,[2,e]}}))}))}function S(e){return r.__awaiter(this,void 0,void 0,(function(){var t,n,i,s,a,u,l;return r.__generator(this,(function(r){switch(r.label){case 0:return t=e.geometry,n=e.distance,i=e.units,null==n||"vertexAttributes"in t?[2,t]:(s=t.spatialReference,a=i?g.fromJSON(i):o.getUnitString(s),s&&(p.isGeographic(s)||p.isWebMercator(s))?(l=t,[3,3]):[3,1]);case 1:return[4,f.checkProjectionSupport(s,p.WGS84).then((function(){return f.project(t,p.WGS84)}))];case 2:l=r.sent(),r.label=3;case 3:return u=l,[4,h.getGeodesicBufferOperator()];case 4:return[2,r.sent()(u.spatialReference,u,n,a)]}}))}))}t.transformCentroid=m,t.getCentroid=function(e,t,r){return"esriGeometryPolygon"===e.geometryType&&t&&(t.centroid||t.geometry)?(t.centroid||(t.centroid=l.getCentroidOptimizedGeometry(new c.default,t.geometry,e.hasZ,e.hasM)),m(e,t.centroid,r)):null},t.getGeometry=function(e,t,r,n,i,o,s,a){void 0===s&&(s=t),void 0===a&&(a=r);var u=t&&s,p=r&&a,l=n?"coords"in n?n:n.geometry:null;if(!l)return null;if(i){var c=_.generalizeOptimizedGeometry(P,l,t,r,e,i,s,a);return o&&(c=_.quantizeOptimizedGeometry(v,c,u,p,e,o)),y[e](c,u,p)}return o?(c=_.quantizeOptimizedGeometry(v,l,t,r,e,o,s,a),y[e](c,u,p)):(_.removeZMValues(d,l,t,r,s,a),y[e](d,u,p))},t.normalizeQuery=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var i,o,s,a,u;return r.__generator(this,(function(r){if(i=e.outFields,o=e.orderByFields,s=e.groupByFieldsForStatistics,a=e.outStatistics,i)for(u=0;u<i.length;u++)i[u]=i[u].trim();if(o)for(u=0;u<o.length;u++)o[u]=o[u].trim();if(s)for(u=0;u<s.length;u++)s[u]=s[u].trim();if(a)for(u=0;u<a.length;u++)a[u].onStatisticField&&(a[u].onStatisticField=a[u].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),[2,E(e,t,n)]}))}))},t.normalizeFilter=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,E(e,t,n)]}))}))},t.normalizeQueryLike=E,t.cleanFromGeometryEngine=function(e){return e&&T in e?JSON.parse(JSON.stringify(e,M)):e};var T="_geVersion",M=function(e,t){return e!==T?t:void 0}}.apply(null,n))||(e.exports=i)},349:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=function(e,t){function r(e,t){return e?t?4:3:t?3:2}function n(e,t,n,i,o,s){for(var a=r(o,s),u=n,p=n+a,l=0,_=0,c=0,f=0,h=0,g=0,d=i-1;g<d;g++,u+=a,p+=a){var P=t[u],v=t[u+1],y=t[u+2],m=t[p],E=t[p+1],S=t[p+2],T=P*E-m*v;f+=T,l+=(P+m)*T,_+=(v+E)*T,o&&(c+=(y+S)*(T=P*S-m*y),h+=T),P<e[0]&&(e[0]=P),P>e[1]&&(e[1]=P),v<e[2]&&(e[2]=v),v>e[3]&&(e[3]=v),o&&(y<e[4]&&(e[4]=y),y>e[5]&&(e[5]=y))}if(f>0&&(f*=-1),h>0&&(h*=-1),!f)return null;var M=[l,_,.5*f];return o&&(M[3]=c,M[4]=.5*h),M}function i(e,t,n,i,p){for(var l=r(i,p),_=t,c=t+l,f=0,h=0,g=0,d=0,P=0,v=n-1;P<v;P++,_+=l,c+=l){var y,m=e[_],E=e[_+1],S=e[_+2],T=e[c],M=e[c+1],N=e[c+2],O=i?s(m,E,S,T,M,N):o(m,E,T,M);O&&(f+=O,i?(h+=O*(y=u(m,E,S,T,M,N))[0],g+=O*y[1],d+=O*y[2]):(h+=O*(y=a(m,E,T,M))[0],g+=O*y[1]))}return f>0?i?[h/f,g/f,d/f]:[h/f,g/f]:n>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,r,n){var i=r-e,o=n-t;return Math.sqrt(i*i+o*o)}function s(e,t,r,n,i,o){var s=n-e,a=i-t,u=o-r;return Math.sqrt(s*s+a*a+u*u)}function a(e,t,r,n){return[e+.5*(r-e),t+.5*(n-t)]}function u(e,t,r,n,i,o){return[e+.5*(n-e),t+.5*(i-t),r+.5*(o-r)]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCentroidOptimizedGeometry=function(e,t,o,s){if(!t||!t.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);for(var a=e.coords,u=[],p=o?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],l=t.lengths,_=t.coords,c=r(o,s),f=0,h=0,g=l;h<g.length;h++){var d=g[h],P=n(p,_,f,d,o,s);P&&u.push(P),f+=d*c}if(u.sort((function(e,t){var r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r})),u.length){var v=6*u[0][2];a[0]=u[0][0]/v,a[1]=u[0][1]/v,o&&(v=6*u[0][4],a[2]=0!==v?u[0][3]/v:0),(a[0]<p[0]||a[0]>p[1]||a[1]<p[2]||a[1]>p[3]||o&&(a[2]<p[4]||a[2]>p[5]))&&(a.length=0)}if(!a.length){var y=t.lengths[0]?i(_,0,l[0],o,s):null;if(!y)return null;a[0]=y[0],a[1]=y[1],o&&y.length>2&&(a[2]=y[2])}return e},t.lineCentroid=i}.apply(null,n))||(e.exports=i)},361:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.jsonAdapter={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,n){var i=new r(e.getPointX(t),e.getPointY(t),n),o=e.hasZ(t),s=e.hasM(t);return o&&(i.z=e.getPointZ(t)),s&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,r){return new n(e.exportPaths(t),r,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,r){return new i(e.exportPaths(t),r,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,r){return new o(e.exportPoints(t),r,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,r){var n=e.hasZ(t),i=e.hasM(t),o=new s(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),r);if(n){var a=e.getZExtent(t);o.zmin=a.vmin,o.zmax=a.vmax}if(i){var u=e.getMExtent(t);o.mmin=u.vmin,o.mmax=u.vmax}return o}};var r=function(e,t,r){this.x=e,this.y=t,this.spatialReference=r,this.z=void 0,this.m=void 0},n=function(e,t,r,n){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,r&&(this.hasZ=r),n&&(this.hasM=n)},i=function(e,t,r,n){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,r&&(this.hasZ=r),n&&(this.hasM=n)},o=function(e,t,r,n){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,r&&(this.hasZ=r),n&&(this.hasM=n)},s=function(e,t,r,n,i){this.xmin=e,this.ymin=t,this.xmax=r,this.ymax=n,this.spatialReference=i,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}.apply(null,n))||(e.exports=i)},363:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(154),r(198),r(1031)],void 0===(i=function(e,t,r,n,i){Object.defineProperty(t,"__esModule",{value:!0});var o=new i.WhereClauseCache(50,500),s="feature-store:unsupported-query",a=n.SetFromValues(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function u(e,t){return e?o.get(e,t):null}function p(e,t,n,i){void 0===i&&(i=!0);for(var o=[],a=0,_=t;a<_.length;a++){var c=_[a];if("*"!==c&&!e.has(c))if(i){var f=l(c);try{var h=u(f,e);if(!h)throw new r(s,"invalid SQL expression",{where:f});if(!h.isStandardized)throw new r(s,"expression is not standard",{clause:h});p(e,h.fieldNames,"expression contains missing fields")}catch(e){var g=e&&e.details;if(g&&(g.clause||g.where))throw e;g&&g.missingFields?o.push.apply(o,g.missingFields):o.push(c)}}else o.push(c)}if(o.length)throw new r(s,n,{missingFields:o})}function l(e){return e.split(" as ")[0]}t.validateWhere=function(e,t){if(!t)return!0;var n=o.get(t,e);if(!n)throw new r(s,"invalid SQL expression",{where:t});if(!n.isStandardized)throw new r(s,"where clause is not standard",{where:t});return p(e,n.fieldNames,"where clause contains missing fields"),!0},t.validateHaving=function(e,t,n){if(!t)return!0;var i=o.get(t,e);if(!i)throw new r(s,"invalid SQL expression",{having:t});if(!i.isAggregate)throw new r(s,"having does not contain a valid aggregate function",{having:t});var a=i.fieldNames;if(p(e,a,"having contains missing fields"),!i.getExpressions().every((function(t){var r=t.aggregateType,i=t.field,o=e.has(i)&&e.get(i).name;return n.some((function(t){var n=t.onStatisticField,i=t.statisticType;return(e.has(n)&&e.get(n).name)===o&&i.toLowerCase().trim()===r}))})))throw new r(s,"expressions in having should also exist in outStatistics",{having:t});return!0},t.getWhereClause=u,t.validateFields=p,t.getExpressionFromFieldName=l,t.getAliasFromFieldName=function(e){return e.split(" as ")[1]},t.hasInvalidFieldType=function(e,t){var r=t.get(e);return!!r&&!a.has(r.type)}}.apply(null,n))||(e.exports=i)},384:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(349),r(274),r(224)],void 0===(i=function(e,t,r,n,i){Object.defineProperty(t,"__esModule",{value:!0}),t.optimizedFeatureQueryEngineAdapter={getObjectId:function(e){return e.objectId},getAttributes:function(e){return e.attributes},getAttribute:function(e,t){return e.attributes[t]},cloneWithGeometry:function(e,t){return new n.default(t,e.attributes,null,e.objectId)},getGeometry:function(e){return e.geometry},getCentroid:function(e,t){return e.centroid||(e.centroid=r.getCentroidOptimizedGeometry(new i.default,e.geometry,t.hasZ,t.hasM)),e.centroid}},t.default=t.optimizedFeatureQueryEngineAdapter}.apply(null,n))||(e.exports=i)},512:function(e,t,r){var n,i;n=[r.dj.c(e.i),t],void 0===(i=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getTimeExtent=function(e,t){if(!e)return null;var r=t.featureAdapter,n=e.startTimeField,i=e.endTimeField,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;if(n&&i)t.forEach((function(e){var t=r.getAttribute(e,n),a=r.getAttribute(e,i);null==t||isNaN(t)||(o=Math.min(o,t)),null==a||isNaN(a)||(s=Math.max(s,a))}));else{var a=n||i;t.forEach((function(e){var t=r.getAttribute(e,a);null==t||isNaN(t)||(o=Math.min(o,t),s=Math.max(s,t))}))}return{start:o,end:s}},t.getTimeOperator=function(e,t,r){if(!t||!e)return null;var n=e.startTimeField,i=e.endTimeField;if(!n&&!i)return null;var o=t.start,s=t.end;return null===o&&null===s?null:void 0===o&&void 0===s?function(){return!1}:n&&i?function(e,t,r,n,i){if(null!=n&&null!=i&&n===i){var o=n;return function(n){return o>=e.getAttribute(n,t)&&o<=e.getAttribute(n,r)}}return null!=n&&null!=i?function(o){return s=n,a=i,u=e.getAttribute(o,t),p=e.getAttribute(o,r),!(u>a||p<s);var s,a,u,p}:null!=n?function(t){return!(e.getAttribute(t,r)<n)}:null!=i?function(r){return!(e.getAttribute(r,t)>i)}:void 0}(r,n,i,o,s):function(e,t,r,n){return null!=r&&null!=n&&r===n?function(n){return e.getAttribute(n,t)===r}:null!=r&&null!=n?function(i){return e.getAttribute(i,t)>=r&&e.getAttribute(i,t)<=n}:null!=r?function(n){return e.getAttribute(n,t)>=r}:null!=n?function(r){return e.getAttribute(r,t)<=n}:void 0}(r,n||i,o,s)}}.apply(null,n))||(e.exports=i)},559:function(e,t,r){var n,i;n=[r.dj.c(e.i),t,r(117),r(154),r(153),r(407),r(479),r(163),r(178),r(1032),r(243),r(224),r(263),r(315),r(161)],void 0===(i=function(e,t,n,i,o,s,a,u,p,l,_,c,f,h){Object.defineProperty(t,"__esModule",{value:!0});var g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},d={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},P={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},v={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function y(){return new Promise((function(e,t){Promise.all([r.e(12),r.e(29)]).then(function(){var t=[r(609)];e.apply(null,t)}.bind(this)).catch(t.bind(this))}))}t.importGeometryEngine=y,t.getGeodesicBufferOperator=function(){return y().then((function(e){return e.geodesicBuffer}))},t.getSpatialQueryOperator=function(e,t,r,n,i){if(u.isPolygon(t)&&"esriGeometryPoint"===r&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){var p=_.convertFromPolygon(new c.default,t,!1,!1);return o.resolve((function(e){return l.polygonContainsPoint(p,!1,!1,e)}))}if(u.isPolygon(t)&&"esriGeometryMultipoint"===r){var f=_.convertFromPolygon(new c.default,t,!1,!1);if("esriSpatialRelContains"===e)return o.resolve((function(e){return l.polygonContainsMultipoint(f,!1,!1,e,n,i)}))}if(u.isExtent(t)&&"esriGeometryPoint"===r&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return o.resolve((function(e){return s.extentContainsPoint(t,h.getGeometry(r,n,i,e))}));if(u.isExtent(t)&&"esriGeometryMultipoint"===r&&"esriSpatialRelContains"===e)return o.resolve((function(e){return s.extentContainsMultipoint(t,h.getGeometry(r,n,i,e))}));if(u.isExtent(t)&&"esriSpatialRelIntersects"===e){var d=a.getExtentIntersector(r);return o.resolve((function(e){return d(t,h.getGeometry(r,n,i,e))}))}return y().then((function(o){var s=o[g[e]].bind(null,t.spatialReference,t);return function(e){return s(h.getGeometry(r,n,i,e))}}))},t.checkSpatialQuerySupport=function(e,t,r){return n.__awaiter(this,void 0,void 0,(function(){var o,s;return n.__generator(this,(function(n){if(o=e.spatialRel,!(s=e.geometry))return[2];if(!0!==d[o])throw new i("feature-store:unsupported-query","Unsupported query spatial relationship",{query:e});if(!p.isValid(s.spatialReference)||!p.isValid(r))return[2];if(!function(e){return!0===P[u.getJsonType(e)]}(s))throw new i("feature-store:unsupported-query","Unsupported query geometry type",{query:e});if(!function(e){return!0===v[e]}(t))throw new i("feature-store:unsupported-query","Unsupported layer geometry type",{query:e});return e.outSR?[2,f.checkProjectionSupport(e.geometry&&e.geometry.spatialReference,e.outSR)]:[2]}))}))},t.canQueryWithRBush=function(e){if(u.isExtent(e))return!0;if(u.isPolygon(e)){for(var t=0,r=e.rings;t<r.length;t++){var n=r[t];if(5!==n.length)return!1;if(n[0][0]!==n[1][0]||n[0][0]!==n[4][0]||n[2][0]!==n[3][0]||n[0][1]!==n[3][1]||n[0][1]!==n[4][1]||n[1][1]!==n[2][1])return!1}return!0}return!1}}.apply(null,n))||(e.exports=i)}}]);
  //# sourceMappingURL=7.js.map