1import{_ as s,m as a,iY as _,e as m,f9 as c,f as h,j9 as g,J as f,eZ as d,g2 as v}from"./index-CyVzZKgG.js";import{n as S,d as C}from"./FeatureLayerView2D-CFwtaK19.js";import"./densifyCurvedGeometry-UxJMKMfb.js";import"./timeSupport-DosvG4WH.js";import"./AttributeBinsFeatureSet-m2tyh39v.js";import"./AttributeBinsQuery-t8TU14Za.js";import"./queryUtils-BIR2uwrr.js";import"./FixedIntervalBinParameters--Fojn42v.js";import"./LayerView2D-Dtnnq7Ok.js";import"./Container-DIJ98BLI.js";import"./TechniqueInstance-BHVdyxQZ.js";import"./UpdateTracking2D-BU7im7tt.js";import"./Utils-B7KDTEFr.js";import"./FramebufferObject-BNdJFBQL.js";import"./BufferObject-BH6QMSVF.js";import"./TileContainer-D-dMRxQl.js";import"./WGLContainer-D8AJ7Lzg.js";import"./ProgramTemplate-DULZpuIR.js";import"./VertexArrayObject-DkbpOVOt.js";import"./VertexBuffer-CLPmkREM.js";import"./vec3f32-WCVSSNPR.js";import"./config-BOD8--da.js";import"./FeatureCommandQueue-DVWi1idW.js";import"./GraphShaderModule-DslPvKFR.js";import"./ShaderBuilder-OAyDLXfD.js";import"./utils-CyWYFr2j.js";import"./constants-BBnGEY1d.js";import"./streamLayerUtils-DFlbJ4P1.js";import"./QueueProcessor-AnzOkreC.js";import"./CircularArray-CujHzHWW.js";import"./FeatureIdInfo-Bimz39BN.js";import"./FeatureMetadata-DQ_tU50O.js";import"./SDFHelper-C_cAAl_H.js";import"./constants-SxxbBSOD.js";import"./parquetUtils-Bo07GhiQ.js";import"./locationUtils-COO3fik5.js";import"./parquet-HvUYOBMN.js";import"./popupUtils-DzM0Kf9o.js";import"./LayerView-BDFKgFC_.js";import"./RefreshableLayerView-DY_zTc8-.js";import"./highlightOptionsUtils-CTspGx7_.js";const I=e=>{const r=e;let t=class extends r{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(...i){super(...i),this._isUserPaused=!1,this.filter=null}get connectionStatus(){return(this._isUserPaused||this.suspended)&&this._streamConnectionStatus==="connected"?"paused":this._streamConnectionStatus}_onSuspendedChange(i){i?this._doPause():this._isUserPaused||this._doResume()}};return s([a()],t.prototype,"_isUserPaused",void 0),s([a({readOnly:!0})],t.prototype,"connectionStatus",null),s([a({type:_})],t.prototype,"filter",void 0),t=s([m("esri.views.layers.StreamLayerView")],t),t};let o=class extends I(C){constructor(){super(...arguments),this.pipelineConnectionStatus="disconnected",this.pipelineErrorString=null}initialize(){this.addHandles([c(()=>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&&e.type==="clear"&&this.incrementSourceRefreshVersion()}),c(()=>this.layer.purgeOptions,()=>this._update()),c(()=>this.suspended,this._onSuspendedChange.bind(this))],"constructor"),this._doResume()}destroy(){this._doPause()}get connectionError(){return this.pipelineErrorString?new h("stream-controller",this.pipelineErrorString):null}on(e,r){if(Array.isArray(e))return g(e.map(n=>this.on(n,r)));const t=["data-received","message-received"].includes(e);t&&this.getWorker().then(n=>n.streamMessenger.enableEvent(e,!0));const i=super.on(e,r),p=this;return f(()=>{i.remove(),t&&(p._workerProxy.closed||p.hasEventListener(e)||p.getWorker().then(n=>n.streamMessenger.enableEvent(e,!1)))})}async queryLatestObservations(e,r){var i,p,n;if(!((i=this.layer.timeInfo)!=null&&i.endField||(p=this.layer.timeInfo)!=null&&p.startField||(n=this.layer.timeInfo)!=null&&n.trackIdField))throw new h("streamlayer-no-timeField","queryLatestObservation can only be used with services that define a TrackIdField");const t=await this.getWorker();return S(t.features.executeQueryForLatestObservations(this._cleanUpQuery(e),r).then(y=>{const l=d.fromJSON(y);return l.features.forEach(u=>{u.layer=this.layer,u.sourceLayer=this.layer,u.origin=this.layer.graphicOrigin}),l}),new d({features:[]}))}detach(){super.detach(),this.pipelineConnectionStatus="disconnected"}async queryObjectIds(e,r){return(await super.queryObjectIds(e,r)).filter(v)}get _streamConnectionStatus(){return this.pipelineConnectionStatus}_doPause(){this._refreshInterval!=null&&(clearInterval(this._refreshInterval),this._refreshInterval=null)}_doResume(){this._refreshInterval==null&&(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()),this._refreshInterval==null&&this.incrementSourceRefreshVersion()}_createClientOptions(){const e=super._createClientOptions(),r=this;return{...e,get container(){return r.featureContainer},setProperty:t=>{this.set(t.propertyName,t.value)}}}};s([a()],o.prototype,"pipelineConnectionStatus",void 0),s([a()],o.prototype,"pipelineErrorString",void 0),s([a({readOnly:!0})],o.prototype,"connectionError",null),s([a({readOnly:!0})],o.prototype,"_streamConnectionStatus",null),o=s([m("esri.views.2d.layers.StreamLayerView2D")],o);const ce=o;export{ce as default};
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.