StreamLayer-TMUPPSKV.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. import {
  2. p as p5,
  3. p3 as p6,
  4. r as r2
  5. } from "./chunk-HGDNY7J3.js";
  6. import "./chunk-GD5TMIPM.js";
  7. import {
  8. l as l3
  9. } from "./chunk-ZRX5UNQH.js";
  10. import {
  11. t
  12. } from "./chunk-F37AVPUF.js";
  13. import {
  14. a as a2
  15. } from "./chunk-435DJNTD.js";
  16. import "./chunk-T3EUPDKL.js";
  17. import {
  18. p as p4
  19. } from "./chunk-6URTNEGN.js";
  20. import {
  21. j
  22. } from "./chunk-RQJNTZAL.js";
  23. import "./chunk-QTOOFNRV.js";
  24. import "./chunk-7O56JPWQ.js";
  25. import {
  26. o as o3
  27. } from "./chunk-6B2LQBKM.js";
  28. import {
  29. d as d2
  30. } from "./chunk-MFI6BALW.js";
  31. import {
  32. n as n3,
  33. o as o2,
  34. p as p2,
  35. p2 as p3
  36. } from "./chunk-CIG5OHC7.js";
  37. import {
  38. P
  39. } from "./chunk-FUD7XO3N.js";
  40. import "./chunk-6EU7GFUT.js";
  41. import "./chunk-MFUAILAT.js";
  42. import "./chunk-HZJYXMI6.js";
  43. import "./chunk-27P5ZSC7.js";
  44. import "./chunk-UPD4MTCL.js";
  45. import "./chunk-GRBROWI6.js";
  46. import "./chunk-5NKYXKIA.js";
  47. import "./chunk-MPWGHCZG.js";
  48. import "./chunk-FTI5VP6T.js";
  49. import "./chunk-RZFGRBD7.js";
  50. import {
  51. B
  52. } from "./chunk-PUSPZYFZ.js";
  53. import {
  54. M as M2
  55. } from "./chunk-EN7YGJWG.js";
  56. import "./chunk-VBNMTM7L.js";
  57. import "./chunk-3D3QEPRE.js";
  58. import "./chunk-JFNNSBWL.js";
  59. import {
  60. b
  61. } from "./chunk-UD63WBG3.js";
  62. import "./chunk-X7DBH4KK.js";
  63. import "./chunk-LY74KTXV.js";
  64. import "./chunk-EWE6EXPY.js";
  65. import "./chunk-KUXNUNAI.js";
  66. import "./chunk-KMAHKQ2G.js";
  67. import "./chunk-522WBHUO.js";
  68. import "./chunk-WNCU6BFU.js";
  69. import "./chunk-PIGRDDRG.js";
  70. import "./chunk-BJHM4JNS.js";
  71. import "./chunk-F6A2QQ26.js";
  72. import "./chunk-XLV7RUSE.js";
  73. import "./chunk-NTUXR253.js";
  74. import "./chunk-EOSZHC5H.js";
  75. import "./chunk-C43UE3Z5.js";
  76. import "./chunk-H2KDMZTR.js";
  77. import "./chunk-7XXXCK2A.js";
  78. import "./chunk-7ZIDBK7B.js";
  79. import {
  80. v
  81. } from "./chunk-KHA63LLS.js";
  82. import {
  83. c as c2
  84. } from "./chunk-FGKNEJKJ.js";
  85. import {
  86. I,
  87. b as b2,
  88. c,
  89. f,
  90. l as l2,
  91. m,
  92. p,
  93. x
  94. } from "./chunk-PSV473TI.js";
  95. import {
  96. O
  97. } from "./chunk-I3OBGWNS.js";
  98. import "./chunk-FONIFA5N.js";
  99. import "./chunk-EG5OI4V4.js";
  100. import "./chunk-65BYCSII.js";
  101. import {
  102. c as c3,
  103. m as m2
  104. } from "./chunk-WZQZRKNH.js";
  105. import "./chunk-LRDX4TO7.js";
  106. import "./chunk-6A4U74YA.js";
  107. import {
  108. n as n2
  109. } from "./chunk-CYI7KFYB.js";
  110. import {
  111. a
  112. } from "./chunk-5LXROFTA.js";
  113. import "./chunk-GJXW4HL5.js";
  114. import "./chunk-WJW5DUN6.js";
  115. import {
  116. t as t2
  117. } from "./chunk-W72F6AS3.js";
  118. import "./chunk-PJ7ZQ4VD.js";
  119. import "./chunk-WDLTDV2L.js";
  120. import "./chunk-TERAW6FT.js";
  121. import "./chunk-N2663GRX.js";
  122. import "./chunk-O4FY3ITT.js";
  123. import "./chunk-WEMIK25H.js";
  124. import {
  125. b as b3
  126. } from "./chunk-4DDBH2K5.js";
  127. import "./chunk-7N4X6GF3.js";
  128. import "./chunk-JXW4QTJA.js";
  129. import "./chunk-UXF37FQ4.js";
  130. import {
  131. i
  132. } from "./chunk-ZOEK6QHJ.js";
  133. import "./chunk-XNLG7T2T.js";
  134. import "./chunk-IR4PV7VK.js";
  135. import "./chunk-2Z6LERTI.js";
  136. import "./chunk-OWVBLVP3.js";
  137. import "./chunk-AFZ7XSEW.js";
  138. import "./chunk-EGZW6HC3.js";
  139. import "./chunk-4NKD334K.js";
  140. import "./chunk-65K7LC56.js";
  141. import "./chunk-ATPLLI5W.js";
  142. import "./chunk-WJ3OEUD3.js";
  143. import "./chunk-MXB2XLKV.js";
  144. import "./chunk-XH7RUGVZ.js";
  145. import "./chunk-TBBTRX4O.js";
  146. import "./chunk-YBSUITLL.js";
  147. import "./chunk-ALDCDSPV.js";
  148. import "./chunk-DT6EAZQ5.js";
  149. import "./chunk-HNOZUNJ4.js";
  150. import {
  151. U
  152. } from "./chunk-VNFRAYHO.js";
  153. import "./chunk-R5IG2D6H.js";
  154. import "./chunk-VBRY5KJM.js";
  155. import "./chunk-PDKDCAAD.js";
  156. import {
  157. M2 as M,
  158. o
  159. } from "./chunk-ECW2QABR.js";
  160. import "./chunk-GCDJLKH4.js";
  161. import {
  162. k2 as k
  163. } from "./chunk-MRJEICT6.js";
  164. import {
  165. d,
  166. e,
  167. l3 as l,
  168. n2 as n,
  169. s2 as s3
  170. } from "./chunk-Y3WMVFTW.js";
  171. import "./chunk-SAS7RONY.js";
  172. import "./chunk-WSRBH7BF.js";
  173. import {
  174. S
  175. } from "./chunk-IHXECKQQ.js";
  176. import {
  177. w
  178. } from "./chunk-ULGDPLM2.js";
  179. import {
  180. s,
  181. s3 as s2
  182. } from "./chunk-EMJ4ZSM2.js";
  183. import "./chunk-IKP3YN53.js";
  184. import {
  185. r
  186. } from "./chunk-GZT4BVFP.js";
  187. import "./chunk-A5ICIBVI.js";
  188. // node_modules/@arcgis/core/layers/support/PurgeOptions.js
  189. var t3;
  190. var i2 = t3 = class extends l {
  191. constructor() {
  192. super(...arguments), this.age = null, this.ageReceived = null, this.displayCount = null, this.maxObservations = 1;
  193. }
  194. clone() {
  195. return new t3({ age: this.age, ageReceived: this.ageReceived, displayCount: this.displayCount, maxObservations: this.maxObservations });
  196. }
  197. };
  198. e([d({ type: Number, json: { write: true } })], i2.prototype, "age", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "ageReceived", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "displayCount", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "maxObservations", void 0), i2 = t3 = e([n("esri.layers.support.PurgeOptions")], i2);
  199. var p7 = i2;
  200. // node_modules/@arcgis/core/layers/StreamLayer.js
  201. var X = s.getLogger("esri.layers.StreamLayer");
  202. var Y = l3();
  203. var Z = class extends p5(a(a2(t2(n2(p4(c2(v(O(o3(b3)))))))))) {
  204. constructor(...e2) {
  205. super(...e2), this.copyright = null, this.definitionExpression = null, this.displayField = null, this.elevationInfo = null, this.featureReduction = null, this.fields = null, this.fieldsIndex = null, this.geometryDefinition = null, this.geometryType = null, this.labelsVisible = true, this.labelingInfo = null, this.legendEnabled = true, this.maxReconnectionAttempts = 0, this.maxReconnectionInterval = 20, this.maxScale = 0, this.minScale = 0, this.objectIdField = null, this.operationalLayerType = "ArcGISStreamLayer", this.popupEnabled = true, this.popupTemplate = null, this.purgeOptions = new p7(), this.screenSizePerspectiveEnabled = true, this.sourceJSON = null, this.spatialReference = k.WGS84, this.type = "stream", this.url = null, this.updateInterval = 300, this.webSocketUrl = null;
  206. }
  207. normalizeCtorArgs(e2, r3) {
  208. return typeof e2 == "string" ? { url: e2, ...r3 } : e2;
  209. }
  210. load(e2) {
  211. if (!("WebSocket" in globalThis))
  212. return this.addResolvingPromise(Promise.reject(new s2("stream-layer:websocket-unsupported", "WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))), Promise.resolve(this);
  213. const r3 = r(e2) ? e2.signal : null;
  214. return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Stream Service", "Feed"] }, e2).catch(w).then(() => this._fetchService(r3))), Promise.resolve(this);
  215. }
  216. get defaultPopupTemplate() {
  217. return this.createPopupTemplate();
  218. }
  219. set renderer(e2) {
  220. c3(e2, this.fieldsIndex), this._set("renderer", e2);
  221. }
  222. readRenderer(e2, r3, s4) {
  223. const p8 = (r3 = r3.layerDefinition || r3).drawingInfo && r3.drawingInfo.renderer || void 0;
  224. if (p8) {
  225. const e3 = o2(p8, r3, s4) || void 0;
  226. return e3 || X.error("Failed to create renderer", { rendererDefinition: r3.drawingInfo.renderer, layer: this, context: s4 }), e3;
  227. }
  228. if (r3.defaultSymbol)
  229. return r3.types && r3.types.length ? new P({ defaultSymbol: $(r3.defaultSymbol, r3, s4), field: r3.typeIdField, uniqueValueInfos: r3.types.map((e3) => ({ id: e3.id, symbol: $(e3.symbol, e3, s4) })) }) : new p2({ symbol: $(r3.defaultSymbol, r3, s4) });
  230. }
  231. createPopupTemplate(e2) {
  232. return d2(this, e2);
  233. }
  234. createQuery() {
  235. const e2 = new b();
  236. return e2.returnGeometry = true, e2.outFields = ["*"], e2.where = this.definitionExpression || "1=1", e2;
  237. }
  238. getFieldDomain(e2, r3) {
  239. if (!this.fields)
  240. return null;
  241. let t4 = null;
  242. return this.fields.some((r4) => (r4.name === e2 && (t4 = r4.domain), !!t4)), t4;
  243. }
  244. getField(e2) {
  245. return this.fieldsIndex.get(e2);
  246. }
  247. serviceSupportsSpatialReference(e2) {
  248. return true;
  249. }
  250. async _fetchService(e2) {
  251. if (!!this.webSocketUrl) {
  252. if (!this.timeInfo?.trackIdField)
  253. throw new s2("stream-layer:missing-metadata", "The stream layer trackIdField must be specified.");
  254. if (!this.objectIdField)
  255. throw new s2("stream-layer:missing-metadata", "The stream layer objectIdField must be specified.");
  256. if (!this.fields)
  257. throw new s2("stream-layer:missing-metadata", "The stream layer fields must be specified.");
  258. if (!this.geometryType)
  259. throw new s2("stream-layer:missing-metadata", "The stream layer geometryType must be specified.");
  260. this.url = this.webSocketUrl;
  261. } else if (!this.sourceJSON) {
  262. const { data: r3 } = await U(this.parsedUrl.path, { query: { f: "json", ...this.customParameters, ...this.parsedUrl.query }, responseType: "json", signal: e2 });
  263. this.sourceJSON = r3;
  264. }
  265. return this.sourceJSON = { ...this.sourceJSON ?? {}, objectIdField: "__esri_stream_id__" }, this.read(this.sourceJSON, { origin: "service", url: this.parsedUrl }), c3(this.renderer, this.fieldsIndex), m2(this.timeInfo, this.fieldsIndex), t(this, { origin: "service" });
  266. }
  267. };
  268. e([d({ type: String })], Z.prototype, "copyright", void 0), e([d({ readOnly: true })], Z.prototype, "defaultPopupTemplate", null), e([d({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], Z.prototype, "definitionExpression", void 0), e([d({ type: String })], Z.prototype, "displayField", void 0), e([d({ type: x })], Z.prototype, "elevationInfo", void 0), e([d(p6)], Z.prototype, "featureReduction", void 0), e([d(Y.fields)], Z.prototype, "fields", void 0), e([d(Y.fieldsIndex)], Z.prototype, "fieldsIndex", void 0), e([d({ type: M })], Z.prototype, "geometryDefinition", void 0), e([d({ type: i.apiValues, json: { read: { reader: i.read } } })], Z.prototype, "geometryType", void 0), e([d(m)], Z.prototype, "labelsVisible", void 0), e([d({ type: [j], json: { read: { source: "layerDefinition.drawingInfo.labelingInfo", reader: r2 }, write: { target: "layerDefinition.drawingInfo.labelingInfo" } } })], Z.prototype, "labelingInfo", void 0), e([d(c)], Z.prototype, "legendEnabled", void 0), e([d({ type: ["show", "hide"] })], Z.prototype, "listMode", void 0), e([d({ type: S })], Z.prototype, "maxReconnectionAttempts", void 0), e([d({ type: S })], Z.prototype, "maxReconnectionInterval", void 0), e([d(I)], Z.prototype, "maxScale", void 0), e([d(b2)], Z.prototype, "minScale", void 0), e([d({ type: String })], Z.prototype, "objectIdField", void 0), e([d({ value: "ArcGISStreamLayer", type: ["ArcGISStreamLayer"] })], Z.prototype, "operationalLayerType", void 0), e([d(p)], Z.prototype, "popupEnabled", void 0), e([d({ type: B, json: { read: { source: "popupInfo" }, write: { target: "popupInfo" } } })], Z.prototype, "popupTemplate", void 0), e([d({ type: p7 })], Z.prototype, "purgeOptions", void 0), e([d({ types: p3, json: { origins: { service: { write: { target: "drawingInfo.renderer", enabled: false } }, "web-scene": { name: "layerDefinition.drawingInfo.renderer", types: n3, write: true } }, write: { target: "layerDefinition.drawingInfo.renderer" } } })], Z.prototype, "renderer", null), e([o("service", "renderer", ["drawingInfo.renderer", "defaultSymbol"]), o("renderer", ["layerDefinition.drawingInfo.renderer", "layerDefinition.defaultSymbol"])], Z.prototype, "readRenderer", null), e([d(l2)], Z.prototype, "screenSizePerspectiveEnabled", void 0), e([d()], Z.prototype, "sourceJSON", void 0), e([d({ type: k, json: { origins: { service: { read: { source: "spatialReference" } } } } })], Z.prototype, "spatialReference", void 0), e([d({ json: { read: false } })], Z.prototype, "type", void 0), e([d(f)], Z.prototype, "url", void 0), e([d({ type: Number })], Z.prototype, "updateInterval", void 0), e([d({ type: String })], Z.prototype, "webSocketUrl", void 0), Z = e([n("esri.layers.StreamLayer")], Z);
  269. var $ = s3({ types: M2 });
  270. var ee = Z;
  271. export {
  272. ee as default
  273. };
  274. //# sourceMappingURL=StreamLayer-TMUPPSKV.js.map