text: (this["webpackJsonpmy-app"]=this["webpackJsonpmy-app"]||[]).push([[233],{1004:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return u}));var n=r(0),i=r(9),a=r(2),s=r(1),o=(r(8),r(5),r(4),r(3)),c=r(104),l=r(887),d=r(619);function p(e,t){if(Object(a.j)(e)&&Object(a.j)(t))return null;const r={};return Object(a.k)(t)&&(r.geometry=t.toJSON()),Object(a.k)(e)&&(r.where=e),r}let y=class extends l.default{constructor(){super(...arguments),this._enabledDataReceived=!1,this.errorString=null,this.connectionStatus="disconnected"}initialize(){this.handles.add([this.layer.watch("purgeOptions",()=>this._update())])}destroy(){this.connectionStatus="disconnected"}get connectionError(){if(this.errorString)return new i.a("stream-controller",this.errorString)}on(e,t){"data-received"===e&&(this._enabledDataReceived=!0,this._proxy.enableEvent("data-received",!0));const r=super.on(e,t),n=this;return{remove(){r.remove(),"data-received"===e&&(n._proxy.closed||n.hasEventListener("data-received")||n._proxy.enableEvent("data-received",!1))}}}queryLatestObservations(e,t){if(!this.layer.timeInfo.endField&&!this.layer.timeInfo.startField)throw new i.a("streamlayer-no-timeField","queryLatestObservation can only be used with services that define a TrackIdField");return this._proxy.queryLatestObservations(this._cleanUpQuery(e),t).then(e=>{const t=c.default.fromJSON(e);return t.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer}),t})}_createClientOptions(){return{...super._createClientOptions(),setProperty:e=>{this.set(e.propertyName,e.value)}}}_createTileRendererHash(e){const t=`${JSON.stringify(this.layer.purgeOptions)}.${JSON.stringify(p(this.layer.definitionExpression,this.layer.geometryDefinition))})`;return super._createTileRendererHash(e)+t}async _createServiceOptions(){const e=this.layer,{objectIdField:t}=e,r=e.fields.map(e=>e.toJSON()),n=Object(d.b)(e.geometryType),i=e.timeInfo&&e.timeInfo.toJSON()||null,a=e.spatialReference?e.spatialReference.toJSON():null;return{type:"stream",fields:r,geometryType:n,objectIdField:t,timeInfo:i,source:this.layer.parsedUrl,serviceFilter:p(this.layer.definitionExpression,this.layer.geometryDefinition),purgeOptions:this.layer.purgeOptions.toJSON(),enableDataReceived:this._enabledDataReceived,spatialReference:a,maxReconnectionAttempts:this.layer.maxReconnectionAttempts,maxReconnectionInterval:this.layer.maxReconnectionInterval,updateInterval:this.layer.updateInterval,customParameters:e.customParameters}}};Object(n.a)([Object(s.b)()],y.prototype,"errorString",void 0),Object(n.a)([Object(s.b)({readOnly:!0})],y.prototype,"connectionError",null),Object(n.a)([Object(s.b)()],y.prototype,"connectionStatus",void 0),y=Object(n.a)([Object(o.a)("esri.views.2d.layers.StreamLayerView2D")],y);const u=y}}]);
  //# sourceMappingURL=233.46beb2f5.chunk.js.map