1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2087],{2087:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var r=s(49493),n=s(55114),i=s(1655),a=s(23096),o=s(9491);s(74552),s(64988),s(32243);var l=s(44708),h=s(23613),u=s(88561),d=s(97208),c=s(5789);let p=e=>{let t=class extends e{resume(){this._isUserPaused=!1,this.suspended||this._doResume()}pause(){this._isUserPaused=!0,this.suspended||this._doPause()}disconnect(){this._doDisconnect()}connect(){this._doConnect()}clear(){this._doClear()}constructor(...e){super(...e),this._isUserPaused=!1,this.filter=null}get connectionStatus(){return(this._isUserPaused||this.suspended)&&"connected"===this._streamConnectionStatus?"paused":this._streamConnectionStatus}_onSuspendedChange(e){e?this._doPause():this._isUserPaused||this._doResume()}};return(0,r._)([(0,o.MZ)()],t.prototype,"_isUserPaused",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],t.prototype,"connectionStatus",null),(0,r._)([(0,o.MZ)({type:c.A})],t.prototype,"filter",void 0),t=(0,r._)([(0,l.$)("esri.views.layers.StreamLayerView")],t)},_=class extends p(u.default){constructor(){super(...arguments),this.pipelineConnectionStatus="disconnected",this.pipelineErrorString=null}initialize(){this.addHandles([(0,a.wB)(()=>this.layer.customParameters,async e=>{(await this.getWorker()).streamMessenger.updateCustomParameters(e)}),this.layer.on("send-message-to-socket",async e=>{(await this.getWorker()).streamMessenger.sendMessageToSocket(e)}),this.layer.on("send-message-to-client",async e=>{(await this.getWorker()).streamMessenger.sendMessageToClient(e),this._isUserPaused&&"type"in e&&"clear"===e.type&&this.incrementSourceRefreshVersion()}),(0,a.wB)(()=>this.layer.purgeOptions,()=>this._update()),(0,a.wB)(()=>this.suspended,this._onSuspendedChange.bind(this))],"constructor"),this._doResume()}destroy(){this._doPause()}get connectionError(){return this.pipelineErrorString?new n.A("stream-controller",this.pipelineErrorString):null}on(e,t){if(Array.isArray(e))return(0,i.vE)(e.map(e=>this.on(e,t)));let s=["data-received","message-received"].includes(e);s&&this.getWorker().then(t=>t.streamMessenger.enableEvent(e,!0));let r=super.on(e,t),n=this;return(0,i.hA)(()=>{r.remove(),s&&(n._workerProxy.closed||n.hasEventListener(e)||n.getWorker().then(t=>t.streamMessenger.enableEvent(e,!1)))})}async queryLatestObservations(e,t){if(!(this.layer.timeInfo?.endField||this.layer.timeInfo?.startField||this.layer.timeInfo?.trackIdField))throw new n.A("streamlayer-no-timeField","queryLatestObservation can only be used with services that define a TrackIdField");let s=await this.getWorker();return(0,d.E)(s.features.executeQueryForLatestObservations(this._cleanUpQuery(e),t).then(e=>{let t=h.A.fromJSON(e);return t.features.forEach(e=>{e.layer=this.layer,e.sourceLayer=this.layer}),t}),new h.A({features:[]}))}detach(){super.detach(),this.pipelineConnectionStatus="disconnected"}get _streamConnectionStatus(){return this.pipelineConnectionStatus}_doPause(){null!=this._refreshInterval&&(clearInterval(this._refreshInterval),this._refreshInterval=null)}_doResume(){this._refreshInterval=setInterval(()=>this.incrementSourceRefreshVersion(),this.layer.updateInterval)}_doDisconnect(){this.getWorker().then(e=>e.streamMessenger.disconnect()),this._doPause()}_doConnect(){this.getWorker().then(e=>e.streamMessenger.connect()),this.resume()}_doClear(){this.getWorker().then(e=>e.streamMessenger.clear()),null==this._refreshInterval&&this.incrementSourceRefreshVersion()}_createClientOptions(){let e=super._createClientOptions(),t=this;return{...e,get container(){return t.featureContainer},setProperty:e=>{this.set(e.propertyName,e.value)}}}};(0,r._)([(0,o.MZ)()],_.prototype,"pipelineConnectionStatus",void 0),(0,r._)([(0,o.MZ)()],_.prototype,"pipelineErrorString",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],_.prototype,"connectionError",null),(0,r._)([(0,o.MZ)({readOnly:!0})],_.prototype,"_streamConnectionStatus",null);let y=_=(0,r._)([(0,l.$)("esri.views.2d.layers.StreamLayerView2D")],_)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.