{"size": 73039, "ext": "js", "max_stars_repo_path": "react-dashboard/build/static/js/10.3e85fa22.chunk.js", "max_stars_repo_name": "dulfrey/unfpa-visual-analytics", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "react-dashboard/build/static/js/10.3e85fa22.chunk.js", "max_issues_repo_name": "dulfrey/unfpa-visual-analytics", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "react-dashboard/build/static/js/10.3e85fa22.chunk.js", "max_forks_repo_name": "dulfrey/unfpa-visual-analytics", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36519.5, "max_line_length": 72993, "alphanum_fraction": 0.7185613166}
(this["webpackJsonpunfpa-front"]=this["webpackJsonpunfpa-front"]||[]).push([[10],{1014:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),i=r(3),a=r(4),s=r(5),u=r(0),c=r(12),o=r(28),l=r(32),p=r(1),h=(r(13),r(17),r(7)),d=function(e){var t=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(){return Object(n.a)(this,r),t.apply(this,arguments)}return Object(i.a)(r,[{key:"initialize",value:function(){var e=this;this.handles.add(Object(l.b)(this,"layer","refresh",(function(){e.doRefresh().catch((function(t){Object(o.m)(t)||c.a.getLogger(e.declaredClass).error(t)}))})),"RefreshableLayerView")}}]),r}(e);return Object(u.a)([Object(p.b)()],t.prototype,"layer",void 0),t=Object(u.a)([Object(h.a)("esri.layers.mixins.RefreshableLayerView")],t)}},1034:function(e,t,r){"use strict";function n(e){var t,r=e.layer;return"floorInfo"in r&&null!=(t=r.floorInfo)&&t.floorField&&"floors"in e.view?s(e.view.floors,r.floorInfo.floorField):null}function i(e,t){var r;return"floorInfo"in t&&null!=(r=t.floorInfo)&&r.floorField?s(e,t.floorInfo.floorField):null}function a(e,t){var r=t.definitionExpression;return e?r?"(".concat(r,") AND (").concat(e,")"):e:r}function s(e,t){if(null==e||!e.length)return null;var r=e.filter((function(e){return""!==e})).map((function(e){return"'".concat(e,"'")}));return r.push("''"),"".concat(t," IN (").concat(r.join(","),") OR ").concat(t," IS NULL")}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return n})),r.d(t,"c",(function(){return i}))},1039:function(e,t,r){"use strict";function n(e,t){return t?"xoffset"in t&&t.xoffset?Math.max(e,Math.abs(t.xoffset)):"yoffset"in t&&t.yoffset?Math.max(e,Math.abs(t.yoffset||0)):e:e}function i(e,t){return"number"==typeof e?e:e&&e.stops&&e.stops.length?function(e){for(var t=0,r=0,n=0;n<e.length;n++){var i=e[n].size;"number"==typeof i&&(t+=i,r++)}return t/r}(e.stops):t}function a(e,t){if(!t)return e;var r=t.filter((function(e){return"size"===e.type})).map((function(t){var r=t.maxSize,n=t.minSize;return(i(r,e)+i(n,e))/2})),n=0,a=r.length;if(0===a)return e;for(var s=0;s<a;s++)n+=r[s];var u=Math.floor(n/a);return Math.max(u,e)}function s(e){var t=e&&e.renderer,r="touch"===(e&&e.event&&e.event.pointerType)?9:6;if(!t)return r;var i="visualVariables"in t?a(r,t.visualVariables):r;if("simple"===t.type)return n(i,t.symbol);if("unique-value"===t.type){var s=i;return t.uniqueValueInfos.forEach((function(e){s=n(s,e.symbol)})),s}if("class-breaks"===t.type){var u=i;return t.classBreakInfos.forEach((function(e){u=n(u,e.symbol)})),u}return t.type,i}r.d(t,"a",(function(){return s}))},1058:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r(87);var n=r(8),i=r(65),a=(r(1039),r(57));function s(e,t,r){var s,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new a.a;if("2d"===r.type)s=t*r.resolution;else if("3d"===r.type){var c=r.overlayPixelSizeInMapUnits(e),o=r.basemapSpatialReference;s=Object(n.j)(o)&&!o.equals(r.spatialReference)?Object(i.d)(o)/Object(i.d)(r.spatialReference):t*c}var l=e.x-s,p=e.y-s,h=e.x+s,d=e.y+s,f=r.spatialReference;return u.xmin=Math.min(l,h),u.ymin=Math.min(p,d),u.xmax=Math.max(l,h),u.ymax=Math.max(p,d),u.spatialReference=f,u}new a.a},1059:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return o}));var n=r(6),i=r.n(n),a=r(27),s=r(15),u=r(8),c=r(71);function o(e){return l.apply(this,arguments)}function l(){return l=Object(s.a)(i.a.mark((function e(t){var r,n,s,o,l,p,h,d,f,y=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>1&&void 0!==y[1]?y[1]:t.popupTemplate,Object(u.j)(r)){e.next=3;break}return e.abrupt("return",[]);case 3:return e.next=5,r.getRequiredFields(t.fieldsIndex);case 5:if(n=e.sent,s=r.lastEditInfoEnabled,o=t.objectIdField,l=t.typeIdField,p=t.globalIdField,h=t.relationships,!n.includes("*")){e.next=13;break}return e.abrupt("return",["*"]);case 13:if(!s){e.next=19;break}return e.next=16,Object(c.n)(t);case 16:e.t0=e.sent,e.next=20;break;case 19:e.t0=[];case 20:return d=e.t0,f=Object(c.j)(t.fieldsIndex,[].concat(Object(a.a)(n),Object(a.a)(d))),e.abrupt("return",(l&&f.push(l),f&&o&&t.fieldsIndex.has(o)&&-1===f.indexOf(o)&&f.push(o),f&&p&&t.fieldsIndex.has(p)&&-1===f.indexOf(p)&&f.push(p),h&&h.forEach((function(e){var r=e.keyField;f&&r&&t.fieldsIndex.has(r)&&-1===f.indexOf(r)&&f.push(r)})),f));case 23:case"end":return e.stop()}}),e)}))),l.apply(this,arguments)}function p(e,t){return e.popupTemplate?e.popupTemplate:Object(u.j)(t)&&t.defaultPopupTemplateEnabled&&Object(u.j)(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}},1127:function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n,i=r(11),a=r(2),s=r(3),u=r(4),c=r(5),o=r(0),l=r(87),p=r(113),h=r(37),d=r(25),f=r(21),y=r(1),b=(r(17),r(13),r(12),r(7)),v=r(30),O=r(74),j=r(101),g=new h.a({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new h.a({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),x=n=function(e){Object(u.a)(r,e);var t=Object(c.a)(r);function r(e){var n;return Object(a.a)(this,r),(n=t.call(this,e)).where=null,n.geometry=null,n.spatialRelationship="intersects",n.hiddenIds=new Set,n.distance=void 0,n.objectIds=null,n.units=null,n.timeExtent=null,n.enabled=!1,n}return Object(s.a)(r,[{key:"writeWhere",value:function(e,t){t.where=e||"1=1"}},{key:"enable",value:function(){this._set("enabled",!0)}},{key:"createQuery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.where,r=this.geometry,n=this.spatialRelationship,a=this.timeExtent,s=this.objectIds,u=this.units,c=this.distance;return new j.a(Object(i.a)({geometry:Object(f.a)(r),objectIds:Object(f.a)(s),spatialRelationship:n,timeExtent:Object(f.a)(a),where:t,units:u,distance:c},e))}},{key:"clone",value:function(){var e=this.where,t=this.geometry,r=this.spatialRelationship,i=this.hiddenIds,a=this.timeExtent,s=this.objectIds,u=this.units,c=this.distance,o=new Set;return i.forEach((function(e){return o.add(e)})),new n({geometry:Object(f.a)(t),hiddenIds:o,objectIds:Object(f.a)(s),spatialRelationship:r,timeExtent:Object(f.a)(a),where:e,units:u,distance:c})}}]),r}(d.a);Object(o.a)([Object(y.b)({type:String})],x.prototype,"where",void 0),Object(o.a)([Object(v.a)("where")],x.prototype,"writeWhere",null),Object(o.a)([Object(y.b)({types:l.a,json:{read:O.a,write:!0}})],x.prototype,"geometry",void 0),Object(o.a)([Object(y.b)({type:String,json:{read:{source:"spatialRel",reader:g.read},write:{target:"spatialRel",writer:g.write}}})],x.prototype,"spatialRelationship",void 0),Object(o.a)([Object(y.b)({json:{write:function(e,t,r){return t[r]=Array.from(e)},read:function(e){return new Set(e)}}})],x.prototype,"hiddenIds",void 0),Object(o.a)([Object(y.b)({type:Number,json:{write:{overridePolicy:function(e){return{enabled:e>0}}}}})],x.prototype,"distance",void 0),Object(o.a)([Object(y.b)({type:[Number],json:{write:!0}})],x.prototype,"objectIds",void 0),Object(o.a)([Object(y.b)({type:String,json:{read:m.read,write:{writer:m.write,overridePolicy:function(e){return{enabled:e&&this.distance>0}}}}})],x.prototype,"units",void 0),Object(o.a)([Object(y.b)({type:p.a,json:{write:!0}})],x.prototype,"timeExtent",void 0),Object(o.a)([Object(y.b)({readOnly:!0})],x.prototype,"enabled",void 0);var _=x=n=Object(o.a)([Object(b.a)("esri.views.layers.support.FeatureFilter")],x)},1207:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return we}));var n,i=r(14),a=r(11),s=r(6),u=r.n(s),c=r(15),o=r(2),l=r(3),p=r(4),h=r(5),d=r(0),f=r(106),y=r(1),b=r(13),v=(r(17),r(12)),O=r(7),j=n=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(){var e;return Object(o.a)(this,r),(e=t.apply(this,arguments)).isAggregate=!0,e}return Object(l.a)(r,[{key:"getEffectivePopupTemplate",value:function(){if(this.popupTemplate)return this.popupTemplate;var e=this.sourceLayer&&this.sourceLayer.featureReduction;return e&&"popupTemplate"in e&&e.popupEnabled?e.popupTemplate:null}},{key:"getObjectId",value:function(){return this.objectId}},{key:"clone",value:function(){return new n(Object(a.a)({objectId:this.objectId},this.cloneProperties()))}}]),r}(f.a);Object(d.a)([Object(y.b)({type:Boolean})],j.prototype,"isAggregate",void 0),Object(d.a)([Object(y.b)({type:Number,json:{read:!0}})],j.prototype,"objectId",void 0);var g=j=n=Object(d.a)([Object(O.a)("esri.AggregateGraphic")],j),m=(r(87),r(137)),x=r(38),_=r(22),k=r(21),w=r(8),R=r(28),S=r(32),I=r(1227),F=r(1039),E=r(145),q=r(101),T=r(919),P=r(955),U=r(947);function C(e,t){return N.apply(this,arguments)}function N(){return(N=Object(c.a)(u.a.mark((function e(t,n){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",null);case 2:e.t0=t.type,e.next="class-breaks"===e.t0||"simple"===e.t0||"unique-value"===e.t0||"dot-density"===e.t0||"dictionary"===e.t0?5:"heatmap"===e.t0?10:15;break;case 5:return e.next=7,Promise.all([r.e(1),r.e(0),r.e(3),r.e(59)]).then(r.bind(null,1380));case 7:return e.t1=e.sent.default,e.t2=n,e.abrupt("return",new e.t1(e.t2));case 10:return e.next=12,Promise.all([r.e(1),r.e(0),r.e(3),r.e(63)]).then(r.bind(null,1393));case 12:return e.t3=e.sent.default,e.t4=n,e.abrupt("return",new e.t3(e.t4));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var V=r(994),L=r(997),A=r(27),M=r(33),z=r(354);function J(e){return e.some((function(e){return e.globalId}))}function H(e){return e.filter((function(e){return!e.error})).map((function(e){var t;return null!=(t=e.objectId)?t:e.globalId}))}function G(e,t){var r,n=new Set(e),a=Object(i.a)(t.values());try{for(a.s();!(r=a.n()).done;){var s=r.value;n.add(s)}}catch(u){a.e(u)}finally{a.f()}return n}function B(e,t){var r,n=new Set(e),a=Object(i.a)(t.values());try{for(a.s();!(r=a.n()).done;){var s=r.value;n.delete(s)}}catch(u){a.e(u)}finally{a.f()}return n}var D=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(e){var n;return Object(o.a)(this,r),(n=t.call(this))._hasGlobalIds=!1,n._queueProcessor=new z.a({concurrency:1,process:e.process}),n}return Object(l.a)(r,[{key:"destroy",value:function(){this._queueProcessor.clear()}},{key:"updating",get:function(){return this._queueProcessor.length>0}},{key:"push",value:function(e){var t=this,r=this._queueProcessor,n=r.last();switch(e.type){case"update":case"refresh":if((null==n?void 0:n.type)===e.type)return;r.push(e).finally((function(){return t.notifyChange("updating")}));break;case"edit":var a="processed-edit"===(null==n?void 0:n.type)?n:null;a&&r.popLast();var s,u=this._mergeEdits(a,e),c=Object(i.a)(u);try{for(c.s();!(s=c.n()).done;){var o=s.value;r.push(o).finally((function(){return t.notifyChange("updating")}))}}catch(l){c.e(l)}finally{c.f()}}this.notifyChange("updating")}},{key:"_mergeEdits",value:function(e,t){var r,n,i=t.edits,a=i.addedFeatures,s=i.deletedFeatures,u=i.updatedFeatures;if(this._hasGlobalIds=this._hasGlobalIds||J(a)||J(u)||J(s),this._hasGlobalIds)return[e,{type:"processed-edit",edits:{addOrModified:[].concat(Object(A.a)(a),Object(A.a)(u)),removed:s}}];var c=new Set(H(null!=(r=null==e?void 0:e.edits.addOrModified)?r:[])),o=new Set(H(null!=(n=null==e?void 0:e.edits.removed)?n:[])),l=new Set([].concat(Object(A.a)(H(a)),Object(A.a)(H(u)))),p=new Set(H(s));return[{type:"processed-edit",edits:{addOrModified:Array.from(G(B(c,p),l)).map((function(e){return{objectId:e}})),removed:Array.from(G(B(o,l),p)).map((function(e){return{objectId:e}}))}}]}}]),r}(M.a);Object(d.a)([Object(y.b)({readOnly:!0})],D.prototype,"updating",null);var Q=D=Object(d.a)([Object(O.a)("esri.views.2d.layers.support.FeatureCommandQueue")],D),K=r(186),W=r(352);function Z(e){return Array.isArray(e)}var $=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(e){var n;return Object(o.a)(this,r),(n=t.call(this,e))._startupResolver=Object(R.g)(),n.isReady=!1,n}return Object(l.a)(r,[{key:"initialize",value:function(){this._controller=Object(R.d)(),this.addResolvingPromise(this._startWorker(this._controller.signal))}},{key:"destroy",value:function(){this._controller.abort(),this._connection&&this._connection.close()}},{key:"tileRenderer",set:function(e){this.client.tileRenderer=e}},{key:"closed",get:function(){return this._connection.closed}},{key:"startup",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r,n,i){var a,s,c;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.when();case 2:return a=this._controller.signal,s=Z(n.source)?{transferList:n.source,signal:a}:void 0,c={service:n,config:r,tileInfo:t.tileInfo.toJSON(),tiles:i},e.next=5,this._connection.invoke("startup",c,s);case 5:this._startupResolver.resolve(),this._set("isReady",!0);case 7:case"end":return e.stop()}}),e,this)})));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"updateTiles",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",Object(R.l)(this._connection.invoke("updateTiles",t)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={config:t},e.next=3,this._startupResolver.promise;case 3:return e.abrupt("return",this._connection.invoke("update",r));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"applyUpdate",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("applyUpdate",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setHighlight",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",Object(R.l)(this._connection.invoke("controller.setHighlight",t)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"refresh",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",Object(R.l)(this._connection.invoke("controller.refresh")));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"querySummaryStatistics",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r,n){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.querySummaryStatistics",{query:t.toJSON(),params:r},n));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"queryFeatures",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.queryFeatures",t.toJSON(),r));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"queryObjectIds",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.queryObjectIds",t.toJSON(),r));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"queryFeatureCount",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.queryFeatureCount",t.toJSON(),r));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"queryExtent",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._connection.invoke("controller.queryExtent",t.toJSON(),r));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"queryLatestObservations",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.queryLatestObservations",t.toJSON(),r));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"queryStatistics",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.queryStatistics",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getObjectId",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getObjectId",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getDisplayId",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getDisplayId",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getFeature",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getFeature",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAggregate",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getAggregate",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getAggregates",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getAggregates"));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAggregateValueRanges",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.getAggregateValueRanges"));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"mapValidDisplayIds",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",this._connection.invoke("controller.mapValidDisplayIds",t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onEdits",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",Object(R.l)(this._connection.invoke("controller.onEdits",t)));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"enableEvent",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._startupResolver.promise;case 2:return e.abrupt("return",Object(R.l)(this._connection.invoke("controller.enableEvent",{name:t,value:r})));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_startWorker",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(W.b)("Pipeline",{client:this.client,strategy:"dedicated",signal:t});case 3:this._connection=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),Object(R.w)(e.t0);case 9:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(t){return e.apply(this,arguments)}}()}]),r}(K.a);Object(d.a)([Object(y.b)()],$.prototype,"isReady",void 0),Object(d.a)([Object(y.b)()],$.prototype,"client",void 0),Object(d.a)([Object(y.b)()],$.prototype,"tileRenderer",null);var X,Y=$=Object(d.a)([Object(O.a)("esri.views.2d.layers.support.FeatureLayerProxy")],$),ee=r(990),te=r(254),re=r(168),ne=function(){function e(t){Object(o.a)(this,e),this._tiles=new Map,this.buffer=0,this.acquireTile=t.acquireTile,this.releaseTile=t.releaseTile,this.tileInfoView=t.tileInfoView,this.buffer=t.buffer}return Object(l.a)(e,[{key:"destroy",value:function(){}},{key:"clear",value:function(){var e=this;this._tiles.forEach((function(t){return e._releaseTile(t)}))}},{key:"tileKeys",value:function(){var e=[];return this._tiles.forEach((function(t,r){return e.push(r)})),e}},{key:"update",value:function(e){var t,r=this,n=this.tileInfoView.getTileCoverage(e.state,this.buffer,"closest"),a=n.spans,s=n.lodInfo,u=s.level,c=[],o=[],l=new Set,p=new Set,h=Object(i.a)(a);try{for(h.s();!(t=h.n()).done;)for(var d=t.value,f=d.row,y=d.colFrom,b=d.colTo,v=y;v<=b;v++){var O=re.a.getId(u,f,s.normalizeCol(v),s.getWorldForColumn(v)),j=this._getOrAcquireTile(c,O);l.add(O),j.isReady?j.visible=!0:p.add(j.key)}}catch(g){h.e(g)}finally{h.f()}return p.forEach((function(e){return r._addPlaceholders(l,e)})),this._tiles.forEach((function(e){l.has(e.key.id)||(o.push(e.key.id),r._releaseTile(e))})),te.a.pool.release(n),{hasMissingTiles:p.size>0,added:c,removed:o}}},{key:"_getOrAcquireTile",value:function(e,t){if(!this._tiles.has(t)){var r=this.acquireTile(new re.a(t));e.push(t),this._tiles.set(t,r),r.visible=!1}return this._tiles.get(t)}},{key:"_getTile",value:function(e){return this._tiles.get(e)}},{key:"_releaseTile",value:function(e){this._tiles.delete(e.key.id),this.releaseTile(e)}},{key:"_addPlaceholders",value:function(e,t){var r=this._addPlaceholderChildren(e,t);Math.abs(1-r)<1e-6||this._addPlaceholderParent(e,t)||(this._getTile(t.id).visible=!0)}},{key:"_addPlaceholderChildren",value:function(e,t){var r=this,n=0;return this._tiles.forEach((function(i){n+=r._addPlaceholderChild(e,i,t)})),n}},{key:"_addPlaceholderChild",value:function(e,t,r){return t.key.level<=r.level||!t.hasData||!r.contains(t.key)?0:(t.visible=!0,e.add(t.key.id),1/(1<<2*(t.key.level-r.level)))}},{key:"_addPlaceholderParent",value:function(e,t){for(var r=t.getParentKey(),n=0,i=null;Object(w.j)(r);){if(e.has(r.id))return!0;var a=this._getTile(r.id);if(null!=a&&a.isReady)return a.visible=!0,e.add(a.key.id),!0;null!=a&&a.hasData&&a.patchCount>n&&(n=a.patchCount,i=a),r=r.getParentKey()}return!!i&&(i.visible=!0,e.add(i.key.id),!0)}}]),e}(),ie=r(47),ae=r(40),se=r(126),ue=r(71),ce=r(127),oe=r(25),le=r(1127),pe=X=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(){var e;return Object(o.a)(this,r),(e=t.apply(this,arguments)).filter=null,e.includedEffect=null,e.excludedEffect=null,e.excludedLabelsVisible=!1,e}return Object(l.a)(r,[{key:"clone",value:function(){return new X({filter:this.filter&&this.filter.clone(),includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}}]),r}(oe.a);Object(d.a)([Object(y.b)({type:le.a,json:{write:!0}})],pe.prototype,"filter",void 0),Object(d.a)([Object(y.b)({json:{write:!0}})],pe.prototype,"includedEffect",void 0),Object(d.a)([Object(y.b)({json:{write:!0}})],pe.prototype,"excludedEffect",void 0),Object(d.a)([Object(y.b)({type:Boolean,json:{write:!0}})],pe.prototype,"excludedLabelsVisible",void 0);var he=pe=X=Object(d.a)([Object(O.a)("esri.views.layers.support.FeatureEffect")],pe),de=r(1059),fe=r(1034),ye=v.a.getLogger("esri.views.layers.FeatureLayerView"),be=r(954),ve=r(1014),Oe=r(1058),je=r(528),ge=r(57),me=function(e){return(2147483648&e)>>>31===1};function xe(e){return e&&"openPorts"in e}var _e=v.a.getLogger("esri.views.2d.layers.FeatureLayerView2D"),ke=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(){var e;return Object(o.a)(this,r),(e=t.apply(this,arguments))._pipelineIsUpdating=!0,e._commandsQueue=new Q({process:function(t){switch(t.type){case"processed-edit":return e._doEdit(t);case"refresh":return e._doRefresh();case"update":return e._doUpdate()}}}),e._visibilityOverrides=new Set,e._effect=null,e._highlightIds=new Map,e._lastPixelBuffer=0,e._updateHighlight=Object(R.i)(Object(c.a)(u.a.mark((function t(){return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._proxy.setHighlight(Array.from(e._highlightIds.keys())));case 1:case"end":return t.stop()}}),t)})))),e._uploadsLocked=!1,e._needsClusterSizeUpdate=!1,e.filter=null,e.effectLists={included:new I.a,excluded:new I.a},e}return Object(l.a)(r,[{key:"destroy",value:function(){var e,t;Object(w.a)(this._updateClusterSizeTask,(function(e){return e.remove()})),null==(e=this._proxy)||e.destroy(),null==(t=this.tileRenderer)||t.destroy(),this._commandsQueue.destroy()}},{key:"initialize",value:function(){var e=this;this.addResolvingPromise(Promise.all([this._initProxy(),this._initServiceOptions()])),this.handles.add([this.on("valueRangesChanged",(function(t){e._set("_aggregateValueRanges",t.valueRanges)})),Object(S.a)(this,"effect",(function(t){e.effectLists.included.effect=null==t?void 0:t.includedEffect})),Object(S.a)(this,"effect",(function(t){e.effectLists.excluded.effect=null==t?void 0:t.excludedEffect}))])}},{key:"_initProxy",value:function(){var e=Object(c.a)(u.a.mark((function e(){var t;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("isTable"in this.layer)||!this.layer.isTable){e.next=2;break}throw new _.a("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:this.layer});case 2:return this._proxy&&this._proxy.destroy(),t=this._createClientOptions(),e.abrupt("return",(this._set("_proxy",new Y({client:t})),this._proxy.when()));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_initServiceOptions",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this,e.next=3,this._createServiceOptions();case 3:e.t1=e.sent,e.t0._set.call(e.t0,"_serviceOptions",e.t1);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"orderByFields",get:function(){return"stream"!==this._serviceOptions.type&&this._serviceOptions.orderByFields}},{key:"labelsVisible",get:function(){var e="subtype-group"===this.layer.type?this.layer.sublayers.items:[this.layer];return!this.suspended&&e.some((function(e){return e.labelingInfo&&e.labelsVisible}))}},{key:"effect",get:function(){return Object(w.r)(this._effect,null)},set:function(e){var t=this._effect;Object(w.j)(t)&&Object(w.j)(t.filter)&&t.filter.enabled&&Object(w.j)(e)&&Object(w.j)(e.filter)&&e.filter.enable(),this._effect=e,this.notifyChange("effect")}},{key:"effects",get:function(){return this.effect&&[this.effect]||[]}},{key:"queryMode",get:function(){return this._serviceOptions.type}},{key:"renderingConfigHash",get:function(){if(!this.layer)return null;var e=this.availableFields,t=this.layer,r=this.view.floors,n=t.definitionExpression,i="subtype-group"!==this.layer.type&&this.layer.labelsVisible&&this.layer.labelingInfo,a="renderer"in t&&t.renderer,s="feature"===t.type?t.gdbVersion:void 0,u="feature"===t.type&&t.historicMoment?t.historicMoment.getTime():void 0,c=this.timeExtent,o="customParameters"in t?JSON.stringify(t.customParameters):void 0,l="apiKey"in t?t.apiKey:void 0,p="stream"===t.type?"".concat(JSON.stringify(t.geometryDefinition)).concat(t.definitionExpression):null,h=JSON.stringify(this.clips),d=t.featureReduction&&t.featureReduction.toJSON(),f="orderBy"in this.layer&&JSON.stringify(this.layer.orderBy),y="sublayers"in this.layer&&this.layer.sublayers.items.reduce((function(e,t){return e+"".concat(t.visible?1:0,".").concat(JSON.stringify(t.renderer),".").concat(t.labelsVisible,"\n.").concat(JSON.stringify(t.labelingInfo))}),"");return JSON.stringify({orderBy:f,sublayerHash:y,filterHash:Object(w.j)(this.filter)&&this.filter.toJSON(),effectHash:Object(w.j)(this.effect)&&this.effect.toJSON(),streamFilter:p,gdbVersion:s,definitionExpression:n,historicMoment:u,availableFields:e,renderer:a,labelingInfo:i,timeExtent:c,floors:r,clipsHash:h,featureReduction:d,customParameters:o,apiKey:l})}},{key:"hasEffects",get:function(){return this.effectLists.included.hasEffects||this.effectLists.excluded.hasEffects}},{key:"highlight",value:function(e){var t,r=this;return e instanceof f.a?t=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?t=[e]:x.a.isCollection(e)?t=e.map((function(e){return e&&e.getAttribute(r.layer.objectIdField)})).toArray():Array.isArray(e)&&e.length>0&&(t="number"==typeof e[0]||"string"==typeof e[0]?e:e.map((function(e){return e&&e.getAttribute(r.layer.objectIdField)}))),t&&t.length?(t=t.filter((function(e){return null!=e})),this._addHighlight(t),{remove:function(){return r._removeHighlight(t)}}):{remove:function(){}}}},{key:"hasHighlight",value:function(){return!!this._highlightIds.size}},{key:"hitTest",value:function(e,t){return this._hitTest(e,t)}},{key:"queryAggregates",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._proxy.getAggregates();case 2:return e.abrupt("return",e.sent.map((function(e){return g.fromJSON(e)})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"queryStatistics",value:function(){return this._proxy.queryStatistics()}},{key:"querySummaryStatistics",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r,n){var i,s;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(a.a)({},r),r.valueExpression&&(i.viewInfoParams={viewingMode:"map",scale:this.view.scale,spatialReference:null==(s=this.view.spatialReference)?void 0:s.toJSON()}),e.abrupt("return",this._proxy.querySummaryStatistics(this._cleanUpQuery(t),i,n));case 3:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"queryFeatures",value:function(e,t){var r=this;return this.queryFeaturesJSON(e,t).then((function(e){var t=E.default.fromJSON(e);return t.features.forEach((function(e){return r._setLayersForFeature(e)})),t}))}},{key:"queryFeaturesJSON",value:function(e,t){return this._proxy.queryFeatures(this._cleanUpQuery(e),t)}},{key:"queryObjectIds",value:function(e,t){return this._proxy.queryObjectIds(this._cleanUpQuery(e),t)}},{key:"queryFeatureCount",value:function(e,t){return this._proxy.queryFeatureCount(this._cleanUpQuery(e),t)}},{key:"queryExtent",value:function(e,t){return this._proxy.queryExtent(this._cleanUpQuery(e),t).then((function(e){return{count:e.count,extent:ge.a.fromJSON(e.extent)}}))}},{key:"setVisibility",value:function(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}},{key:"update",value:function(e){if(this._tileStrategy&&this.tileRenderer){var t=this._tileStrategy.update(e),r=t.hasMissingTiles,n=t.added,i=t.removed;(n.length||i.length)&&this._proxy.updateTiles({added:n,removed:i}),r&&this.requestUpdate(),this.notifyChange("updating")}}},{key:"attach",value:function(){var e=this;this.view.timeline.record("".concat(this.layer.title," (FeatureLayer) Attach")),this._tileStrategy=new ne({acquireTile:function(t){return e._acquireTile(t)},releaseTile:function(t){return e._releaseTile(t)},tileInfoView:this.view.featuresTilingScheme,buffer:0}),this.handles.add(Object(S.a)(this,"renderingConfigHash",(function(){return e._update()})),"attach"),"stream"!==this.layer.type&&this.handles.add(this.layer.on("edits",(function(t){return e._edit(t)})),"attach")}},{key:"detach",value:function(){this.container.removeAllChildren(),this.handles.remove("attach"),this.tileRenderer&&(this.tileRenderer.uninstall(this.container),this.tileRenderer=null),this._tileStrategy&&(this._tileStrategy.destroy(),this._tileStrategy=null),this._tileRendererHash=null}},{key:"moveStart",value:function(){this.requestUpdate()}},{key:"viewChange",value:function(){this.requestUpdate()}},{key:"moveEnd",value:function(){this.requestUpdate()}},{key:"fetchPopupFeatures",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){var n,i,a,s,c=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(w.j)(r)||!r.clientGraphics.length){e.next=5;break}if(!((n=r.clientGraphics[0])instanceof g)){e.next=4;break}return e.abrupt("return",[n]);case 4:r.clientGraphics=r.clientGraphics.filter((function(e){var t=e.layer,r="popupEnabled"in t&&t.popupEnabled,n="popupTemplate"in t&&t.popupTemplate,i=c.view.popup.defaultPopupTemplateEnabled;return r&&(n||i)}));case 5:if(!(i=this.validateFetchPopupFeatures(r))){e.next=8;break}throw i;case 8:if(!Object(w.j)(r)||0!==r.clientGraphics.length){e.next=10;break}return e.abrupt("return",[]);case 10:if(a=this.fetchClientPopupFeatures(r),t){e.next=13;break}return e.abrupt("return",a);case 13:return s=this._fetchServicePopupFeatures(t,r),e.abrupt("return",Object(R.k)([a,s]).then(m.d));case 15:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"_fetchServicePopupFeatures",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){var n,a,s,c,o,l,p,h,d,f,y;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("stream"!==this.layer.type&&"ogc-feature"!==this.layer.type){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.createPopupQuery(r);case 4:if(n=e.sent,a=this.layer,s="renderer"in a&&a.renderer,c=Object(w.j)(r)?r.event:null,o=Object(F.a)({renderer:s,event:c}),n.geometry=this.createFetchPopupFeaturesQueryGeometry(t,o),l=new Set,p=a.objectIdField,h=Object(w.j)(r)?r.clientGraphics:null){d=Object(i.a)(h);try{for(d.s();!(f=d.n()).done;)y=f.value,l.add(y.attributes[p])}catch(u){d.e(u)}finally{d.f()}}return e.abrupt("return",a.queryFeatures(n).then((function(e){return e.features.filter((function(e){return!l.has(e.attributes[p])}))})));case 13:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"createFetchPopupFeaturesQueryGeometry",value:function(e,t){return Object(Oe.a)(e,t,this.view)}},{key:"isUpdating",value:function(){var e,t="renderer"in this.layer&&null!=this.layer.renderer,r=this._commandsQueue.updating,n=null!=this._updatingRequiredFieldsPromise,i=!this._proxy||!this._proxy.isReady,a=this._pipelineIsUpdating,s=null===this.tileRenderer||(null==(e=this.tileRenderer)?void 0:e.updating),u=t&&(r||n||i||a||s);return Object(b.a)("esri-2d-log-updating")&&console.log("Updating FLV2D: ".concat(u,"\n  -> hasRenderer ").concat(t,"\n  -> hasPendingCommand ").concat(r,"\n  -> updatingRequiredFields ").concat(n,"\n  -> updatingProxy ").concat(i,"\n  -> updatingPipeline ").concat(a,"\n  -> updatingTileRenderer ").concat(s,"\n")),u}},{key:"_createClientOptions",value:function(){var e=this;return{setUpdating:function(t){e._set("_pipelineIsUpdating",t)},emitEvent:function(t){e.emit(t.name,t.event)}}}},{key:"_detectQueryMode",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r,n,i,a,s,c,o,l,p;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("path"in t)||"feature"!==this.layer.type&&"subtype-group"!==this.layer.type||"point"!==this.layer.geometryType||!this.layer.capabilities.query.supportsPagination||this.layer.capabilities.operations.supportsEditing||!Object(b.a)("featurelayer-snapshot-enabled")){e.next=15;break}return e.prev=1,e.next=4,this.layer.queryFeatureCount();case 4:if(!((r=e.sent)<=Object(b.a)("featurelayer-snapshot-point-min-threshold"))){e.next=7;break}return e.abrupt("return",{mode:"snapshot",featureCount:r});case 7:if(n=Object(b.a)("featurelayer-snapshot-point-max-threshold"),i=Object(b.a)("featurelayer-snapshot-point-coverage"),a=this.view.extent,s=this.layer.fullExtent,c=null==s?void 0:s.clone().intersection(a),o=Object(w.j)(c)?c.width*c.height:0,l=(null==s?void 0:s.width)*(null==s?void 0:s.height),p=0===l?0:o/l,!(r<=n&&p>=i)){e.next=10;break}return e.abrupt("return",{mode:"snapshot",featureCount:r});case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),_e.warn("mapview-feature-layer","Encountered an error when querying for featureCount",{error:e.t0});case 15:return e.abrupt("return",{mode:"on-demand"});case 16:case"end":return e.stop()}}),e,this,[[1,12]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_createServiceOptions",value:function(){var e=Object(c.a)(u.a.mark((function e(){var t,r,n,i,a,s,c,o,l,p,h,d,f,y,b,v,O,j;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("stream"!==(r=this.layer).type){e.next=3;break}return e.abrupt("return",null);case 3:if(n=r.capabilities,i=r.objectIdField,a=r.fields.map((function(e){return e.toJSON()})),s=r.fullExtent&&r.fullExtent.toJSON(),c=Object(ee.a)(r.geometryType),o=r.timeInfo&&r.timeInfo.toJSON()||null,l=r.spatialReference?r.spatialReference.toJSON():null,p="feature"===r.type?r.globalIdField:null,"ogc-feature"!==r.type){e.next=8;break}h=r.source.getFeatureDefinition(),e.next=15;break;case 8:if(!xe(r.source)){e.next=14;break}return e.next=11,r.source.openPorts();case 11:h=e.sent,e.next=15;break;case 14:r.parsedUrl&&(h=Object(k.a)(r.parsedUrl),"dynamicDataSource"in r&&r.dynamicDataSource&&(h.query={layer:JSON.stringify({source:r.dynamicDataSource})}));case 15:return d="datesInUnknownTimezone"in this.layer&&this.layer.datesInUnknownTimezone,f=null!=(t="subtypeField"in this.layer&&this.layer.subtypeField)?t:null,e.next=19,this._detectQueryMode(h);case 19:return y=e.sent,b=y.mode,v=y.featureCount,O=this.layer.objectIdField,"feature"===this.layer.type&&Object(w.j)(this.layer.orderBy)&&this.layer.orderBy.length&&(j=!this.layer.orderBy[0].valueExpression&&this.layer.orderBy[0].field)&&(O=j),e.abrupt("return",{type:b,timeReferenceUnknownClient:d,subtypeField:f,featureCount:v,globalIdField:p,maxRecordCount:n.query.maxRecordCount,tileMaxRecordCount:n.query.tileMaxRecordCount,capabilities:n,fields:a,fullExtent:s,geometryType:c,objectIdField:i,source:h,timeInfo:o,spatialReference:l,orderByFields:O});case 25:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_createMemoryServiceOptions",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.openPorts();case 2:return r=e.sent,e.abrupt("return",Object(a.a)(Object(a.a)({},this._createServiceOptions()),{},{type:"memory",source:r}));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_cleanUpQuery",value:function(e){var t=q.a.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t}},{key:"_update",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._commandsQueue.push({type:"update"}));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_edit",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._validateEdit(t)){e.next=2;break}return e.abrupt("return",this._commandsQueue.push({type:"edit",edits:t}));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"doRefresh",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._commandsQueue.push({type:"refresh"}));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_validateEdit",value:function(e){var t="globalIdField"in this.layer&&this.layer.globalIdField,r=e.deletedFeatures.some((function(e){return-1===e.objectId||!e.objectId})),n=t&&this.availableFields.includes(t);return r&&!n?(_e.error(new _.a("mapview-apply-edits","Editing the specified service requires the layer's globalIdField, ".concat(t," to be included the layer's outFields for updates to be reflected on the map"))),null):e}},{key:"_doUpdate",value:function(){var e=Object(c.a)(u.a.mark((function e(){var t,r,n,i,a,s,c,o,l,p,h,d,f;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.destroyed&&this._hasRequiredSupport(this.layer)&&this._tileStrategy){e.next=3;break}return e.abrupt("return");case 3:return t=this.effect,r=this.filter,e.next=6,this._updateRequiredFields();case 6:return n=this._getEffectiveRenderer(),i=n.renderer,this._set("_effectiveRenderer",i),a=this._createSchemaConfig(),s=Object(ee.a)(this.layer.geometryType),e.next=12,Object(V.a)(i,s,this.layer.featureReduction);case 12:if(c=e.sent,o=this._createConfiguration(a,r,t),this._lastPixelBuffer=0===c?0:Math.max(c,this._lastPixelBuffer),o.schema.source.pixelBuffer=this._lastPixelBuffer,(l=this._createTileRendererHash(i))===this._tileRendererHash){e.next=42;break}return e.next=19,this._initTileRenderer(i);case 19:if(p=this._serviceOptions,this.effects.forEach((function(e){return Object(w.j)(e)&&Object(w.j)(e.filter)&&e.filter.enable()})),this.tileRenderer.onConfigUpdate(i),h={added:this._tileStrategy.tileKeys(),removed:[]},d=this.layer,e.t0="stream"!==d.type&&xe(d.source),!e.t0){e.next=27;break}return e.next=26,d.source.openPorts();case 26:p.source=e.sent;case 27:if(e.t1="stream"===d.type,!e.t1){e.next=31;break}return e.next=31,this._initServiceOptions();case 31:return e.next=33,this._proxy.startup(this.view.featuresTilingScheme,o,p,h);case 33:if(e.t2=this.hasHighlight(),!e.t2){e.next=37;break}return e.next=37,this._proxy.setHighlight(Array.from(this._highlightIds.keys()));case 37:return e.next=39,this._onceTilesUpdated();case 39:this.tileRenderer.onConfigUpdate(i),e.next=55;break;case 42:return e.next=44,this._proxy.update(o);case 44:return((f=e.sent).mesh||f.targets.aggregate)&&this._lockGPUUploads(),e.prev=46,e.next=49,this._proxy.applyUpdate(f);case 49:e.next=54;break;case 51:e.prev=51,e.t3=e.catch(46),Object(R.m)(e.t3)||_e.error(e.t3);case 54:(f.mesh||f.targets.aggregate)&&this._unlockGPUUploads(),this.effects.forEach((function(e){return Object(w.j)(e)&&Object(w.j)(e.filter)&&e.filter.enable()})),this.tileRenderer.onConfigUpdate(i),this._updateClusterSizeVariable(),this._forceAttributeTextureUpload();case 55:this._tileRendererHash=l,this.tileRenderer.invalidateLabels(),this.requestUpdate(),e.next=60;break;case 58:e.prev=58,e.t4=e.catch(0);case 60:case"end":return e.stop()}}),e,this,[[0,58],[46,51]])})));return function(){return e.apply(this,arguments)}}()},{key:"_doEdit",value:function(){var e=Object(c.a)(u.a.mark((function e(t){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._proxy.onEdits(t);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),Object(R.m)(e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_doRefresh",value:function(){var e=Object(c.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._lockGPUUploads(),e.prev=1,e.next=4,this._proxy.refresh();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),Object(R.m)(e.t0);case 9:this._unlockGPUUploads();case 10:case"end":return e.stop()}}),e,this,[[1,6]])})));return function(){return e.apply(this,arguments)}}()},{key:"_updateClusterSizeVariable",value:function(){this._needsClusterSizeUpdate&&(this.tileRenderer.onConfigUpdate(this._effectiveRenderer),this._needsClusterSizeUpdate=!1)}},{key:"_createUpdateClusterSizeTask",value:function(e,t){var r=this;return this.watch("_aggregateValueRanges",function(){var n=Object(c.a)(u.a.mark((function n(i){return u.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r._updateClusterEffectiveRendererSizeVariable(e,t,i),r._needsClusterSizeUpdate=!0,r._uploadsLocked||r._updateClusterSizeVariable();case 1:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"_updateClusterEffectiveRendererSizeVariable",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r,n){var i,a,s;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.dynamicClusterSize&&"visualVariables"in t&&t.visualVariables&&(i=Object(L.c)(t.visualVariables),Object(w.j)(i)&&"cluster_count"===i.field&&(a=t.visualVariables.indexOf(i),t.visualVariables[a]=Object(L.a)(r,n),(s=t.clone()).dynamicClusterSize=!0,this._set("_effectiveRenderer",s)));case 1:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"_getEffectiveRenderer",value:function(){var e="renderer"in this.layer&&this.layer.renderer,t=this.layer.featureReduction;if(Object(w.j)(this._updateClusterSizeTask)&&(this._updateClusterSizeTask.remove(),this._updateClusterSizeTask=null),t&&"cluster"===t.type&&Object(L.d)(e)){var r=t,n=[],i=Object(L.b)(n,e,r,this._aggregateValueRanges);return Object(w.a)(this._updateClusterSizeTask,(function(e){return e.remove()})),this._updateClusterSizeTask=this._createUpdateClusterSizeTask(i,r),{renderer:i,aggregateFields:n,featureReduction:t}}return{renderer:e,aggregateFields:[],featureReduction:null}}},{key:"_acquireTile",value:function(e){var t=this,r=this.tileRenderer.acquireTile(e);return r.once("attach",(function(){t.requestUpdate()})),r}},{key:"_releaseTile",value:function(e){this.tileRenderer.releaseTile(e)}},{key:"_initTileRenderer",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(t,{layerView:this,tileInfoView:this.view.featuresTilingScheme,layer:this.layer});case 2:return r=e.sent,e.abrupt("return",(this.tileRenderer&&(this._tileStrategy.clear(),this.tileRenderer.uninstall(this.container),this.tileRenderer.destroy(),this.tileRenderer=null),this.destroyed?null:(this._proxy.tileRenderer=r,this._set("tileRenderer",r),this.tileRenderer.install(this.container),this.tileRenderer.onConfigUpdate(t),this.requestUpdate(),this.tileRenderer)));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createTileRendererHash",value:function(e){return"".concat("heatmap"===e.type?"heatmap":"symbol",".").concat("dot-density"===e.type)}},{key:"_createFeatureDataHash",value:function(e,t,r){var n=e.getAttributeHash(),i=JSON.stringify(t),a=Object(w.j)(r)&&JSON.stringify(r.filter),s=JSON.stringify(this.timeExtent),u="";return this._visibilityOverrides.forEach((function(e){return u+=e})),"".concat(n,".").concat(i,".").concat(a,".").concat(s,".").concat(u)}},{key:"hasFilter",get:function(){var e=!!("floorInfo"in this.layer&&this.layer.floorInfo&&this.view.floors&&this.view.floors.length);return!!this.filter||e||!!this._visibilityOverrides.size||!!this.timeExtent}},{key:"_injectOverrides",value:function(e){var t=Object(w.j)(e)?e.timeExtent:null,r=Object(w.j)(this.timeExtent)&&Object(w.j)(t)?this.timeExtent.intersection(t):this.timeExtent||t,n=null,i="floorInfo"in this.layer&&this.layer.floorInfo;if(i){var a=Object(w.j)(e)&&e.where;n=this._addFloorFilterClause(a)}if(!this._visibilityOverrides.size&&!r&&!i)return e;var s=Object(w.j)(e)&&e.clone()||new le.a;return s.hiddenIds=this._visibilityOverrides,s.timeExtent=r,n&&(s.where=n),s}},{key:"_addFloorFilterClause",value:function(e){var t=this.layer,r=e||"";if("floorInfo"in t&&t.floorInfo){var n,i=this.view.floors;if(!i||!i.length)return r;null!=(n=t.floorInfo.viewAllLevelIds)&&n.length&&(i=t.floorInfo.viewAllLevelIds);var a=i.filter((function(e){return""!==e})).map((function(e){return"'"+e+"'"}));a.push("''");var s=t.floorInfo.floorField,u="("+s+" IN ({ids}) OR "+s+" IS NULL)";if(u=u.replace("{ids}",a.join(", ")),Object(w.j)(r)&&r.includes(s)){var c=new RegExp("AND \\("+s+".*NULL\\)","g");r=r.replace(c,""),c=new RegExp("\\("+s+".*NULL\\)","g"),r=(r=r.replace(c,"")).replace(/\s+/g," ").trim()}r=""!==r?"("+r+") AND "+u:u}return""!==r?r:null}},{key:"_createConfiguration",value:function(e,t,r){var n="feature"===this.layer.type&&this.layer.historicMoment?this.layer.historicMoment.getTime():void 0,i="feature"===this.layer.type?this.layer.gdbVersion:void 0,a=new Array(T.k),s=this._injectOverrides(t);a[0]=Object(w.j)(s)?s.toJSON():null,a[1]=Object(w.j)(r)&&r.filter?r.filter.toJSON():null;var u=Object(U.b)(e);if(Object(w.i)(u))return null;var c=Object(je.a)();return{definitionExpression:this.layer.definitionExpression,availableFields:this.availableFields,gdbVersion:i,historicMoment:n,devicePixelRatio:window.devicePixelRatio||1,filters:a,schema:u,supportsTextureFloat:c.supportsTextureFloat,maxTextureSize:c.maxTextureSize}}},{key:"_hasRequiredSupport",value:function(e){var t;return!("renderer"in e&&"dot-density"===(null==(t=e.renderer)?void 0:t.type)&&!Object(je.a)().supportsTextureFloat)||(_e.error(new _.a("webgl-missing-extension","Missing WebGL extension OES_Texture_Float which is required for DotDensity")),!1)}},{key:"_onceTilesUpdated",value:function(){return this.requestUpdate(),Object(S.g)(this,"_pipelineIsUpdating",!1)}},{key:"_lockGPUUploads",value:function(){this.tileRenderer&&(this._uploadsLocked=!0,this.tileRenderer.lockGPUUploads())}},{key:"_unlockGPUUploads",value:function(){this.tileRenderer&&(this._uploadsLocked=!1,this.tileRenderer.unlockGPUUploads())}},{key:"_forceAttributeTextureUpload",value:function(){this.tileRenderer&&this.tileRenderer.forceAttributeTextureUpload()}},{key:"_createSchemaConfig",value:function(){var e="feature"===this.layer.type?this.layer.historicMoment:null,t="feature"===this.layer.type?this.layer.gdbVersion:null;return{renderer:"renderer"in this.layer&&this.layer.renderer,spatialReference:this.layer.spatialReference,timeExtent:this.layer.timeExtent,definitionExpression:this.layer.definitionExpression,featureReduction:this.layer.featureReduction,fields:this.layer.fields,geometryType:this.layer.geometryType,historicMoment:e,labelsVisible:"labelsVisible"in this.layer&&this.layer.labelsVisible,labelingInfo:"labelingInfo"in this.layer&&this.layer.labelingInfo,availableFields:this.availableFields,effect:this.effect,filter:this.filter,gdbVersion:t,pixelBuffer:0,orderBy:"orderBy"in this.layer&&this.layer.orderBy?this.layer.orderBy:null,customParameters:Object(a.a)(Object(a.a)({},"customParameters"in this.layer?this.layer.customParameters:void 0),{},{token:"apiKey"in this.layer?this.layer.apiKey:void 0})}}},{key:"_addHighlight",value:function(e){var t,r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(this._highlightIds.has(n)){var a=this._highlightIds.get(n);this._highlightIds.set(n,a+1)}else this._highlightIds.set(n,1)}}catch(s){r.e(s)}finally{r.f()}this._updateHighlight().catch((function(e){Object(R.m)(e)||_e.error(e)}))}},{key:"_removeHighlight",value:function(e){var t,r=Object(i.a)(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(this._highlightIds.has(n)){var a=this._highlightIds.get(n)-1;0===a?this._highlightIds.delete(n):this._highlightIds.set(n,a)}}}catch(s){r.e(s)}finally{r.f()}this._updateHighlight().catch((function(e){Object(R.m)(e)||_e.error(e)}))}},{key:"_setLayersForFeature",value:function(e){var t=this.layer;e.layer=t,e.sourceLayer=t}},{key:"_createHittestResult",value:function(e){return this._setLayersForFeature(e),Object(w.j)(e.geometry)&&(e.geometry.spatialReference=this.view.spatialReference),e}},{key:"_hitTest",value:function(){var e=Object(c.a)(u.a.mark((function e(t,r){var n,i,a,s,c,o=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.suspended&&this.tileRenderer){e.next=2;break}return e.abrupt("return",null);case 2:return e.next=4,this.tileRenderer.hitTest(t,r);case 4:if(0!==(n=e.sent).length){e.next=9;break}return e.next=8,Object(R.a)(1);case 8:return e.abrupt("return",null);case 9:if(i=n[0],me(i)){e.next=15;break}return e.next=13,this._proxy.getFeature(i);case 13:return a=e.sent,e.abrupt("return",Object(w.a)(a,(function(e){return o._createHittestResult(f.a.fromJSON(e))})));case 15:return e.next=17,this._proxy.getAggregate(i);case 17:if(s=e.sent,!Object(w.i)(s)){e.next=20;break}return e.abrupt("return",null);case 20:if(!Object(w.j)(s.referenceId)){e.next=25;break}return e.next=23,this._proxy.getFeature(s.referenceId);case 23:return c=e.sent,e.abrupt("return",Object(w.a)(c,(function(e){return o._createHittestResult(f.a.fromJSON(e))})));case 25:return e.abrupt("return",this._createHittestResult(g.fromJSON(s)));case 26:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),r}(function(e){var t=function(e){Object(p.a)(r,e);var t=Object(h.a)(r);function r(){var e;Object(o.a)(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i)))._updatingRequiredFieldsPromise=null,e.effect=null,e.filter=null,e.timeExtent=null,e.layer=null,e.requiredFields=[],e.view=null,e}return Object(l.a)(r,[{key:"initialize",value:function(){var e=this;Object(S.a)(this,["layer.renderer","layer.labelingInfo","layer.elevationInfo.featureExpressionInfo","layer.displayField","filter","effect","layer.timeInfo","layer.floorInfo","timeExtent"],(function(){return e._handleRequiredFieldsChange()}),!0),Object(S.b)(this,"view.floors","change",(function(){return e._handleRequiredFieldsChange()})),Object(S.b)(this,"layer.sublayer","change",(function(){return e._handleRequiredFieldsChange()}))}},{key:"availableFields",get:function(){var e=this.layer,t=this.layer.fieldsIndex,r=this.requiredFields;return"outFields"in e&&e.outFields?Object(ue.j)(t,[].concat(Object(A.a)(Object(ue.t)(t,e.outFields)),Object(A.a)(r))):Object(ue.j)(t,r)}},{key:"maximumNumberOfFeatures",get:function(){return 0},set:function(e){ye.error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}},{key:"maximumNumberOfFeaturesExceeded",get:function(){return!1}},{key:"highlight",value:function(e){throw new Error("missing implementation")}},{key:"createQuery",value:function(){var e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=Object(w.j)(this.filter)?this.filter.createQuery(e):new q.a(e);if("feature"===this.layer.type){var r=Object(fe.b)(this);Object(w.j)(r)&&(t.where=t.where?"(".concat(t.where,") AND (").concat(r,")"):r)}return Object(w.j)(this.timeExtent)&&(t.timeExtent=Object(w.j)(t.timeExtent)?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}},{key:"queryFeatures",value:function(e,t){throw new Error("missing implementation")}},{key:"queryObjectIds",value:function(e,t){throw new Error("missing implementation")}},{key:"queryFeatureCount",value:function(e,t){throw new Error("missing implementation")}},{key:"queryExtent",value:function(e,t){throw new Error("missing implementation")}},{key:"_loadArcadeModules",value:function(e){if(e.get("expressionInfos.length"))return Object(ce.e)()}},{key:"_handleRequiredFieldsChange",value:function(){var e=this,t=this._updateRequiredFields();this._set("_updatingRequiredFieldsPromise",t),t.then((function(){e._updatingRequiredFieldsPromise===t&&e._set("_updatingRequiredFieldsPromise",null)}))}},{key:"_updateRequiredFields",value:function(){var e=Object(c.a)(u.a.mark((function e(){var t,r,n,a,s,c,o,l,p,h,d,f,y,b,v;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.layer&&this.view){e.next=2;break}return e.abrupt("return");case 2:return t="3d"===this.view.type,r=this.layer,n=this.layer,a=n.fieldsIndex,s=n.objectIdField,c="renderer"in r&&r.renderer,o="orderBy"in r&&r.orderBy,l=r.featureReduction,p=new Set,e.next=13,Object(R.j)([c?c.collectRequiredFields(p,a):null,Object(ue.g)(p,r),t?Object(ue.b)(p,r):null,Object(w.j)(this.filter)?Object(ue.f)(p,r,this.filter):null,this.effect?Object(ue.f)(p,r,this.effect.filter):null,l?Object(ue.c)(p,r,l):null,o?Object(ue.h)(p,r,o):null]);case 13:if(h=e.sent,r.timeInfo&&this.timeExtent&&Object(ue.e)(p,r.fieldsIndex,[r.timeInfo.startField,r.timeInfo.endField]),"feature"===r.type&&r.floorInfo&&Object(ue.e)(p,r.fieldsIndex,[r.floorInfo.floorField]),"subtype-group"!==r.type){e.next=19;break}return Object(ue.d)(p,a,r.subtypeField),d=r.sublayers.map((function(e){var t;return Promise.all([null==(t=e.renderer)?void 0:t.collectRequiredFields(p,a),Object(ue.g)(p,e)])})),e.next=19,Object(R.j)(d);case 19:f=Object(i.a)(h);try{for(f.s();!(y=f.n()).done;)(b=y.value).error&&ye.error(b.error)}catch(u){f.e(u)}finally{f.f()}Object(ue.d)(p,a,s),t&&"displayField"in r&&r.displayField&&Object(ue.d)(p,a,r.displayField),v=Array.from(p).sort(),this._set("requiredFields",v);case 24:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"validateFetchPopupFeatures",value:function(e){if(Object(w.i)(e))return null;var t,r=Object(i.a)(e.clientGraphics);try{for(r.s();!(t=r.n()).done;){var n=t.value.layer;if("popupEnabled"in n&&!n.popupEnabled)return new _.a("featurelayerview:fetchPopupFeatures","Popups are disabled",{layer:n});if("popupTemplate"in n&&!Object(de.a)(n,e))return new _.a("featurelayerview:fetchPopupFeatures","Layer does not define a popup template",{layer:n})}}catch(a){r.e(a)}finally{r.f()}}},{key:"fetchClientPopupFeatures",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r,n,a,s,c,o,l,p,h,d,f,y=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=Object(w.j)(t)?t.clientGraphics:null)&&0!==r.length){e.next=3;break}return e.abrupt("return",Promise.resolve([]));case 3:return n=[],a=[],e.next=7,this.createPopupQuery(t);case 7:s=e.sent,c=Object(i.a)(r),e.prev=9,c.s();case 11:if((o=c.n()).done){e.next=25;break}if(l=o.value,"popupEnabled"in(p=l.layer)){e.next=16;break}return e.abrupt("continue",23);case 16:if(h=Object(ue.t)(this.layer.fieldsIndex,s.outFields),d=Object(de.a)(p,t),Object(w.j)(d)){e.next=19;break}return e.abrupt("continue",23);case 19:return e.next=21,this._loadArcadeModules(d);case 21:(f=e.sent)&&f.arcadeUtils.hasGeometryOperations(d)||!Object(ue.i)(h,l)?a.push(l):n.push(l);case 23:e.next=11;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(9),c.e(e.t0);case 30:return e.prev=30,c.f(),e.finish(30);case 33:return e.abrupt("return","stream"===this.layer.type||0===a.length?Promise.resolve(n):(s.objectIds=a.map((function(e){return e.attributes[y.layer.objectIdField]})),this.layer.queryFeatures(s).then((function(e){return n.concat(e.features)})).catch((function(){return a}))));case 34:case"end":return e.stop()}}),e,this,[[9,27,30,33]])})));return function(t){return e.apply(this,arguments)}}()},{key:"createPopupQuery",value:function(){var e=Object(c.a)(u.a.mark((function e(t){var r,n,a,s,c,o,l,p,h,d,f,y,b,v,O;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.layer.createQuery(),n=new Set,a=!1,s=Object(w.j)(t)&&t.clientGraphics?t.clientGraphics.map((function(e){return e.layer})):[this.layer],c=Object(i.a)(s),e.prev=4,c.s();case 6:if((o=c.n()).done){e.next=25;break}if("popupEnabled"in(l=o.value)){e.next=10;break}return e.abrupt("continue",23);case 10:if(p=Object(de.a)(l,t),Object(w.j)(p)){e.next=13;break}return e.abrupt("continue",23);case 13:return e.next=15,this._loadArcadeModules(p);case 15:return h=e.sent,d=h&&h.arcadeUtils.hasGeometryOperations(p),a=!("point"!==this.layer.geometryType&&!d),e.next=20,Object(de.b)(this.layer,p);case 20:f=e.sent,y=Object(i.a)(f);try{for(y.s();!(b=y.n()).done;)v=b.value,n.add(v)}catch(u){y.e(u)}finally{y.f()}case 23:e.next=6;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(4),c.e(e.t0);case 30:return e.prev=30,c.f(),e.finish(30);case 33:return r.returnGeometry=a,r.returnZ=a,r.returnM=a,r.outFields=Array.from(n),r.outSpatialReference=this.view.spatialReference,"feature"===this.layer.type&&(O=Object(fe.b)(this),Object(w.j)(O)&&(r.where=r.where?"(".concat(r.where,") AND (").concat(O,")"):O)),e.abrupt("return",r);case 35:case"end":return e.stop()}}),e,this,[[4,27,30,33]])})));return function(t){return e.apply(this,arguments)}}()},{key:"canResume",value:function(){return!!Object(ie.a)(Object(ae.a)(r.prototype),"canResume",this).call(this)&&(!Object(w.j)(this.timeExtent)||!this.timeExtent.isEmpty)}}]),r}(e);return Object(d.a)([Object(y.b)()],t.prototype,"_updatingRequiredFieldsPromise",void 0),Object(d.a)([Object(y.b)({readOnly:!0})],t.prototype,"availableFields",null),Object(d.a)([Object(y.b)({type:he})],t.prototype,"effect",void 0),Object(d.a)([Object(y.b)({type:le.a})],t.prototype,"filter",void 0),Object(d.a)([Object(y.b)(se.a)],t.prototype,"timeExtent",void 0),Object(d.a)([Object(y.b)()],t.prototype,"layer",void 0),Object(d.a)([Object(y.b)({type:Number})],t.prototype,"maximumNumberOfFeatures",null),Object(d.a)([Object(y.b)({readOnly:!0,type:Boolean})],t.prototype,"maximumNumberOfFeaturesExceeded",null),Object(d.a)([Object(y.b)({readOnly:!0})],t.prototype,"requiredFields",void 0),Object(d.a)([Object(y.b)()],t.prototype,"suspended",void 0),Object(d.a)([Object(y.b)()],t.prototype,"view",void 0),t=Object(d.a)([Object(O.a)("esri.views.layers.FeatureLayerView")],t),t}(Object(ve.a)(Object(P.a)(be.a))));Object(d.a)([Object(y.b)()],ke.prototype,"_serviceOptions",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"_proxy",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"_pipelineIsUpdating",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"_effectiveRenderer",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"_aggregateValueRanges",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"_commandsQueue",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"labelsVisible",null),Object(d.a)([Object(y.b)({type:le.a})],ke.prototype,"filter",void 0),Object(d.a)([Object(y.b)({type:he})],ke.prototype,"effect",null),Object(d.a)([Object(y.b)({readOnly:!0})],ke.prototype,"effects",null),Object(d.a)([Object(y.b)({readOnly:!0})],ke.prototype,"queryMode",null),Object(d.a)([Object(y.b)()],ke.prototype,"renderingConfigHash",null),Object(d.a)([Object(y.b)()],ke.prototype,"tileRenderer",void 0),Object(d.a)([Object(y.b)()],ke.prototype,"updating",void 0);var we=ke=Object(d.a)([Object(O.a)("esri.views.2d.layers.FeatureLayerView2D")],ke)},954:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(2),i=r(3),a=r(4),s=r(5),u=r(0),c=r(33),o=r(116),l=r(143),p=r(345),h=r(12),d=r(8),f=r(186),y=r(1),b=(r(13),r(17),r(7)),v=function(e){Object(a.a)(r,e);var t=Object(s.a)(r);function r(e){var i;return Object(n.a)(this,r),(i=t.call(this,e)).layer=null,i.parent=null,i}return Object(i.a)(r,[{key:"initialize",value:function(){var e=this;this.when().catch((function(t){if("layerview:create-error"!==t.name){var r=e.layer&&e.layer.id||"no id",n=e.layer&&e.layer.title||"no title";throw h.a.getLogger(e.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '".concat(n,"', id: '").concat(r,"')"),t),t}}))}},{key:"fullOpacity",get:function(){return Object(d.r)(this.get("layer.opacity"),1)*Object(d.r)(this.get("parent.fullOpacity"),1)}},{key:"suspended",get:function(){return!this.canResume()}},{key:"suspendInfo",get:function(){return this.getSuspendInfo()}},{key:"legendEnabled",get:function(){return!this.suspended&&!0===this.layer.legendEnabled}},{key:"updating",get:function(){return!!(this.updatingHandles&&this.updatingHandles.updating||this.isUpdating())}},{key:"updatingProgress",get:function(){return this.updating?0:1}},{key:"visible",get:function(){return!0===this.get("layer.visible")},set:function(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")}},{key:"canResume",value:function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1}},{key:"getSuspendInfo",value:function(){var e=this.parent&&this.parent.suspended?this.parent.suspendInfo:{};return this.view&&this.view.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0),this.visible||(e.layerInvisible=!0),e}},{key:"isUpdating",value:function(){return!1}}]),r}(Object(l.b)(Object(p.a)(Object(f.b)(o.a.EventedMixin(c.a)))));Object(u.a)([Object(y.b)()],v.prototype,"fullOpacity",null),Object(u.a)([Object(y.b)()],v.prototype,"layer",void 0),Object(u.a)([Object(y.b)()],v.prototype,"parent",void 0),Object(u.a)([Object(y.b)({readOnly:!0})],v.prototype,"suspended",null),Object(u.a)([Object(y.b)({readOnly:!0})],v.prototype,"suspendInfo",null),Object(u.a)([Object(y.b)({readOnly:!0})],v.prototype,"legendEnabled",null),Object(u.a)([Object(y.b)({type:Boolean,readOnly:!0})],v.prototype,"updating",null),Object(u.a)([Object(y.b)({readOnly:!0})],v.prototype,"updatingProgress",null),Object(u.a)([Object(y.b)()],v.prototype,"visible",null);var O=v=Object(u.a)([Object(b.a)("esri.views.layers.LayerView")],v)},955:function(e,t,r){"use strict";r.d(t,"a",(function(){return T}));var n,i=r(2),a=r(3),s=r(47),u=r(40),c=r(4),o=r(5),l=r(0),p=r(38),h=r(136),d=r(32),f=r(1),y=(r(13),r(17),r(12),r(7)),b=r(987),v=function(e){Object(c.a)(r,e);var t=Object(o.a)(r);function r(){return Object(i.a)(this,r),t.apply(this,arguments)}return r}(r(25).a),O=v=Object(l.a)([Object(y.a)("esri.views.layers.support.ClipArea")],v),j=n=function(e){Object(c.a)(r,e);var t=Object(o.a)(r);function r(){var e;return Object(i.a)(this,r),(e=t.apply(this,arguments)).type="rect",e.left=null,e.right=null,e.top=null,e.bottom=null,e}return Object(a.a)(r,[{key:"clone",value:function(){return new n({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}},{key:"version",get:function(){return(this._get("version")||0)+1}}]),r}(O);Object(l.a)([Object(f.b)({type:[Number,String],json:{write:!0}})],j.prototype,"left",void 0),Object(l.a)([Object(f.b)({type:[Number,String],json:{write:!0}})],j.prototype,"right",void 0),Object(l.a)([Object(f.b)({type:[Number,String],json:{write:!0}})],j.prototype,"top",void 0),Object(l.a)([Object(f.b)({type:[Number,String],json:{write:!0}})],j.prototype,"bottom",void 0),Object(l.a)([Object(f.b)({readOnly:!0})],j.prototype,"version",null);var g,m=j=n=Object(l.a)([Object(y.a)("esri.views.layers.support.ClipRect")],j),x=(r(87),r(110)),_=r(74),k=r(57),w=r(121),R={base:x.a,key:"type",typeMap:{extent:k.a,polygon:w.a}},S=g=function(e){Object(c.a)(r,e);var t=Object(o.a)(r);function r(){var e;return Object(i.a)(this,r),(e=t.apply(this,arguments)).type="geometry",e.geometry=null,e}return Object(a.a)(r,[{key:"version",get:function(){return(this._get("version")||0)+1}},{key:"clone",value:function(){return new g({geometry:this.geometry.clone()})}}]),r}(O);Object(l.a)([Object(f.b)({types:R,json:{read:_.a,write:!0}})],S.prototype,"geometry",void 0),Object(l.a)([Object(f.b)({readOnly:!0})],S.prototype,"version",null);var I=S=g=Object(l.a)([Object(y.a)("esri.views.layers.support.Geometry")],S),F=function(e){Object(c.a)(r,e);var t=Object(o.a)(r);function r(){var e;return Object(i.a)(this,r),(e=t.apply(this,arguments)).type="path",e.path=[],e}return Object(a.a)(r,[{key:"version",get:function(){return(this._get("version")||0)+1}}]),r}(O);Object(l.a)([Object(f.b)({type:[[[Number]]],json:{write:!0}})],F.prototype,"path",void 0),Object(l.a)([Object(f.b)({readOnly:!0})],F.prototype,"version",null);var E=F=Object(l.a)([Object(y.a)("esri.views.layers.support.Path")],F),q=p.a.ofType({key:"type",base:O,typeMap:{rect:m,path:E,geometry:I}}),T=function(e){var t=function(e){Object(c.a)(r,e);var t=Object(o.a)(r);function r(){var e;return Object(i.a)(this,r),(e=t.apply(this,arguments)).clips=new q,e.moving=!1,e.attached=!1,e.lastUpdateId=-1,e.updateRequested=!1,e}return Object(a.a)(r,[{key:"initialize",value:function(){var e,t=this;this.container||(this.container=new b.a),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([Object(d.a)(this,"suspended",(function(e){t.container&&(t.container.visible=!e),t.view&&!e&&t.updateRequested&&t.view.requestUpdate()}),!0),Object(d.a)(this,["layer.opacity","container"],(function(){var e,r;t.container&&(t.container.opacity=null!=(e=null==(r=t.layer)?void 0:r.opacity)?e:1)}),!0),Object(d.a)(this,["layer.blendMode"],(function(e){t.container&&(t.container.blendMode=e)}),!0),Object(d.a)(this,["layer.effect"],(function(e){t.container&&(t.container.effect=e)}),!0),this.clips.on("change",(function(){t.container.clips=t.clips,t.notifyChange("clips")}))]),null!=(e=this.view)&&e.whenLayerView?this.view.whenLayerView(this.layer).then((function(e){e!==t||t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){})):this.when().then((function(){t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){}))}},{key:"destroy",value:function(){this.attached&&(this.detach(),this.attached=!1),this.handles.remove("initialize"),this.updateRequested=!1}},{key:"updating",get:function(){return!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())}},{key:"isVisibleAtScale",value:function(e){var t=!0,r=this.layer,n=r.minScale,i=r.maxScale;if(null!=n&&null!=i){var a=!n,s=!i;!a&&e<=n&&(a=!0),!s&&e>=i&&(s=!0),t=a&&s}return t}},{key:"requestUpdate",value:function(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}},{key:"processUpdate",value:function(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}},{key:"isUpdating",value:function(){return!1}},{key:"isRendering",value:function(){return!1}},{key:"canResume",value:function(){return!!Object(s.a)(Object(u.a)(r.prototype),"canResume",this).call(this)&&this.isVisibleAtScale(this.view.scale)}}]),r}(e);return Object(l.a)([Object(f.b)({type:q,set:function(e){var t=Object(h.b)(e,this._get("clips"),q);this._set("clips",t)}})],t.prototype,"clips",void 0),Object(l.a)([Object(f.b)()],t.prototype,"moving",void 0),Object(l.a)([Object(f.b)()],t.prototype,"attached",void 0),Object(l.a)([Object(f.b)()],t.prototype,"container",void 0),Object(l.a)([Object(f.b)()],t.prototype,"suspended",void 0),Object(l.a)([Object(f.b)({readOnly:!0})],t.prototype,"updateParameters",void 0),Object(l.a)([Object(f.b)()],t.prototype,"updateRequested",void 0),Object(l.a)([Object(f.b)()],t.prototype,"updating",null),Object(l.a)([Object(f.b)()],t.prototype,"view",void 0),t=Object(l.a)([Object(y.a)("esri.views.2d.layers.LayerView2D")],t)}},956:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(22),i=r(12),a=r(920),s=r(924),u=i.a.getLogger("esri.views.2d.engine.webgl");function c(e){return Object(s.o)(e.minDataValue)&&Object(s.o)(e.maxDataValue)&&null!=e.minSize&&null!=e.maxSize?a.e.SIZE_MINMAX_VALUE:(e.expression&&"view.scale"===e.expression||e.valueExpression&&"$view.scale"===e.valueExpression)&&Array.isArray(e.stops)?a.e.SIZE_SCALE_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&(Array.isArray(e.stops)||"levels"in e&&e.levels)?a.e.SIZE_FIELD_STOPS:(null!=e.field||e.expression&&"view.scale"!==e.expression||e.valueExpression&&"$view.scale"!==e.valueExpression)&&null!=e.valueUnit?a.e.SIZE_UNIT_VALUE:(u.error(new n.a("mapview-bad-type","Found invalid size VisualVariable",e)),a.e.NONE)}}}]);
//# sourceMappingURL=10.3e85fa22.chunk.js.map