WFSLayer-CC74A6A6.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. import {
  2. C,
  3. D,
  4. W,
  5. X,
  6. z
  7. } from "./chunk-Z32FUDOP.js";
  8. import "./chunk-FEH5F4VW.js";
  9. import "./chunk-YVTH4OGO.js";
  10. import {
  11. c,
  12. u
  13. } from "./chunk-4D6PVVFX.js";
  14. import "./chunk-WQJRLXWG.js";
  15. import {
  16. p as p4
  17. } from "./chunk-XKHC7KKF.js";
  18. import {
  19. p as p3,
  20. p3 as p5,
  21. r as r3
  22. } from "./chunk-HGDNY7J3.js";
  23. import "./chunk-GD5TMIPM.js";
  24. import {
  25. l as l2
  26. } from "./chunk-ZRX5UNQH.js";
  27. import {
  28. u as u3
  29. } from "./chunk-VEAEIBHK.js";
  30. import "./chunk-6SASJ6IM.js";
  31. import "./chunk-3OHML7FO.js";
  32. import {
  33. x as x2
  34. } from "./chunk-2VFJVI2I.js";
  35. import "./chunk-HBMVUVZX.js";
  36. import "./chunk-DH2OBAUC.js";
  37. import "./chunk-TNLRDNTC.js";
  38. import {
  39. a as a4
  40. } from "./chunk-435DJNTD.js";
  41. import "./chunk-T3EUPDKL.js";
  42. import "./chunk-2SJEIKRW.js";
  43. import "./chunk-PHRSJJ3U.js";
  44. import {
  45. j as j2
  46. } from "./chunk-RQJNTZAL.js";
  47. import "./chunk-QTOOFNRV.js";
  48. import "./chunk-7O56JPWQ.js";
  49. import {
  50. o as o2
  51. } from "./chunk-6B2LQBKM.js";
  52. import {
  53. d as d3
  54. } from "./chunk-MFI6BALW.js";
  55. import {
  56. n as n3,
  57. p2
  58. } from "./chunk-CIG5OHC7.js";
  59. import "./chunk-FUD7XO3N.js";
  60. import "./chunk-6EU7GFUT.js";
  61. import "./chunk-MFUAILAT.js";
  62. import "./chunk-HZJYXMI6.js";
  63. import "./chunk-27P5ZSC7.js";
  64. import "./chunk-UPD4MTCL.js";
  65. import "./chunk-GRBROWI6.js";
  66. import "./chunk-5NKYXKIA.js";
  67. import "./chunk-MPWGHCZG.js";
  68. import "./chunk-FTI5VP6T.js";
  69. import "./chunk-RZFGRBD7.js";
  70. import {
  71. B
  72. } from "./chunk-PUSPZYFZ.js";
  73. import "./chunk-EN7YGJWG.js";
  74. import "./chunk-VBNMTM7L.js";
  75. import "./chunk-3D3QEPRE.js";
  76. import "./chunk-JFNNSBWL.js";
  77. import {
  78. b
  79. } from "./chunk-UD63WBG3.js";
  80. import "./chunk-LY74KTXV.js";
  81. import "./chunk-EWE6EXPY.js";
  82. import "./chunk-KUXNUNAI.js";
  83. import "./chunk-KMAHKQ2G.js";
  84. import "./chunk-522WBHUO.js";
  85. import "./chunk-WNCU6BFU.js";
  86. import "./chunk-PIGRDDRG.js";
  87. import {
  88. y
  89. } from "./chunk-BJHM4JNS.js";
  90. import "./chunk-F6A2QQ26.js";
  91. import "./chunk-XLV7RUSE.js";
  92. import "./chunk-NTUXR253.js";
  93. import "./chunk-EOSZHC5H.js";
  94. import "./chunk-C43UE3Z5.js";
  95. import "./chunk-H2KDMZTR.js";
  96. import {
  97. a as a2
  98. } from "./chunk-RMX2AZ4P.js";
  99. import "./chunk-NE3ESGA6.js";
  100. import "./chunk-YIS6BAC3.js";
  101. import "./chunk-7XXXCK2A.js";
  102. import "./chunk-7ZIDBK7B.js";
  103. import {
  104. v
  105. } from "./chunk-KHA63LLS.js";
  106. import {
  107. c as c3
  108. } from "./chunk-FGKNEJKJ.js";
  109. import {
  110. c as c2,
  111. d as d2,
  112. f,
  113. l,
  114. m as m2,
  115. p,
  116. u as u2
  117. } from "./chunk-PSV473TI.js";
  118. import {
  119. O
  120. } from "./chunk-I3OBGWNS.js";
  121. import "./chunk-FONIFA5N.js";
  122. import "./chunk-EG5OI4V4.js";
  123. import "./chunk-65BYCSII.js";
  124. import {
  125. c as c4,
  126. m as m3
  127. } from "./chunk-WZQZRKNH.js";
  128. import "./chunk-LRDX4TO7.js";
  129. import "./chunk-6A4U74YA.js";
  130. import {
  131. n as n2
  132. } from "./chunk-CYI7KFYB.js";
  133. import {
  134. a as a3
  135. } from "./chunk-5LXROFTA.js";
  136. import "./chunk-GJXW4HL5.js";
  137. import "./chunk-WJW5DUN6.js";
  138. import {
  139. t
  140. } from "./chunk-W72F6AS3.js";
  141. import "./chunk-PJ7ZQ4VD.js";
  142. import "./chunk-WDLTDV2L.js";
  143. import "./chunk-TERAW6FT.js";
  144. import "./chunk-N2663GRX.js";
  145. import "./chunk-O4FY3ITT.js";
  146. import "./chunk-WEMIK25H.js";
  147. import {
  148. b as b2
  149. } from "./chunk-4DDBH2K5.js";
  150. import "./chunk-7N4X6GF3.js";
  151. import "./chunk-JXW4QTJA.js";
  152. import "./chunk-UXF37FQ4.js";
  153. import {
  154. i
  155. } from "./chunk-ZOEK6QHJ.js";
  156. import "./chunk-XNLG7T2T.js";
  157. import "./chunk-IR4PV7VK.js";
  158. import "./chunk-2Z6LERTI.js";
  159. import "./chunk-OWVBLVP3.js";
  160. import "./chunk-AFZ7XSEW.js";
  161. import "./chunk-EGZW6HC3.js";
  162. import "./chunk-4NKD334K.js";
  163. import "./chunk-65K7LC56.js";
  164. import "./chunk-ATPLLI5W.js";
  165. import "./chunk-WJ3OEUD3.js";
  166. import "./chunk-MXB2XLKV.js";
  167. import "./chunk-XH7RUGVZ.js";
  168. import {
  169. m
  170. } from "./chunk-TBBTRX4O.js";
  171. import "./chunk-YBSUITLL.js";
  172. import "./chunk-ALDCDSPV.js";
  173. import "./chunk-DT6EAZQ5.js";
  174. import "./chunk-HNOZUNJ4.js";
  175. import "./chunk-VNFRAYHO.js";
  176. import "./chunk-R5IG2D6H.js";
  177. import {
  178. j
  179. } from "./chunk-VBRY5KJM.js";
  180. import "./chunk-PDKDCAAD.js";
  181. import {
  182. M2 as M
  183. } from "./chunk-ECW2QABR.js";
  184. import "./chunk-GCDJLKH4.js";
  185. import {
  186. k2 as k,
  187. r as r2
  188. } from "./chunk-MRJEICT6.js";
  189. import {
  190. d,
  191. e,
  192. n2 as n
  193. } from "./chunk-Y3WMVFTW.js";
  194. import "./chunk-SAS7RONY.js";
  195. import "./chunk-WSRBH7BF.js";
  196. import {
  197. S
  198. } from "./chunk-IHXECKQQ.js";
  199. import {
  200. E,
  201. x
  202. } from "./chunk-ULGDPLM2.js";
  203. import {
  204. s3 as s
  205. } from "./chunk-EMJ4ZSM2.js";
  206. import {
  207. o
  208. } from "./chunk-IKP3YN53.js";
  209. import {
  210. a,
  211. e as e2,
  212. r
  213. } from "./chunk-GZT4BVFP.js";
  214. import "./chunk-A5ICIBVI.js";
  215. // node_modules/@arcgis/core/layers/graphics/sources/WFSSource.js
  216. var j3 = class extends a2(m) {
  217. constructor() {
  218. super(...arguments), this.capabilities = c(false, false), this.type = "wfs", this.refresh = x(async (e3) => {
  219. await this.load();
  220. const { extent: t2 } = await this._connection.invoke("refresh", e3);
  221. return this.sourceJSON.extent = t2, { dataChanged: true, updates: { extent: this.sourceJSON.extent } };
  222. });
  223. }
  224. load(e3) {
  225. const t2 = (r(e3) && e3.signal) ?? null;
  226. return this.addResolvingPromise(this._startWorker({ signal: t2 })), Promise.resolve(this);
  227. }
  228. destroy() {
  229. this._connection?.close(), this._connection = null;
  230. }
  231. async openPorts() {
  232. return await this.load(), this._connection.openPorts();
  233. }
  234. async queryFeatures(e3, t2 = {}) {
  235. await this.load(t2);
  236. const r4 = await this._connection.invoke("queryFeatures", e3 ? e3.toJSON() : null, t2);
  237. return x2.fromJSON(r4);
  238. }
  239. async queryFeaturesJSON(e3, t2 = {}) {
  240. return await this.load(t2), this._connection.invoke("queryFeatures", e3 ? e3.toJSON() : null, t2);
  241. }
  242. async queryFeatureCount(e3, t2 = {}) {
  243. return await this.load(t2), this._connection.invoke("queryFeatureCount", e3 ? e3.toJSON() : null, t2);
  244. }
  245. async queryObjectIds(e3, t2 = {}) {
  246. return await this.load(t2), this._connection.invoke("queryObjectIds", e3 ? e3.toJSON() : null, t2);
  247. }
  248. async queryExtent(e3, t2 = {}) {
  249. await this.load(t2);
  250. const r4 = await this._connection.invoke("queryExtent", e3 ? e3.toJSON() : null, t2);
  251. return { count: r4.count, extent: M.fromJSON(r4.extent) };
  252. }
  253. async querySnapping(e3, t2 = {}) {
  254. return await this.load(t2), this._connection.invoke("querySnapping", e3, t2);
  255. }
  256. async _createLoadOptions(e3) {
  257. const { url: r4, customParameters: o3, name: s2, namespaceUri: a5, spatialReference: n4, fields: c5, geometryType: p6, swapXY: l3 } = this.layer;
  258. if (!r4)
  259. throw new s("wfs-layer:missing-url", "WFSLayer must be created with a url");
  260. this.wfsCapabilities || (this.wfsCapabilities = await D(r4, { customParameters: o3, ...e3 }));
  261. const u4 = ["fields", "geometryType", "name", "namespaceUri", "spatialReference", "swapXY"].some((e4) => this.layer[e4] == null), y2 = u4 ? await X(this.wfsCapabilities, s2, a5, { spatialReference: n4, customParameters: o3, signal: e3?.signal }) : { ...z(c5), geometryType: p6, name: s2, namespaceUri: a5, spatialReference: n4, swapXY: l3 }, d4 = e2(W(this.wfsCapabilities.readFeatureTypes(), y2.name, y2.namespaceUri)), S2 = i.toJSON(y2.geometryType);
  262. return { customParameters: o3, featureType: d4, fields: y2.fields.map((e4) => e4.toJSON()), geometryField: y2.geometryField, geometryType: S2, getFeatureUrl: this.wfsCapabilities.operations.GetFeature.url, getFeatureOutputFormat: this.wfsCapabilities.operations.GetFeature.outputFormat, objectIdField: y2.objectIdField, spatialReference: y2.spatialReference.toJSON(), swapXY: y2.swapXY };
  263. }
  264. async _startWorker(e3) {
  265. const [t2, r4] = await E([this._createLoadOptions(e3), u3("WFSSourceWorker", { ...e3, strategy: a("feature-layers-workers") ? "dedicated" : "local" })]), s2 = t2.error || r4.error || null, a5 = r4.value || null;
  266. if (s2)
  267. throw a5 && a5.close(), s2;
  268. const i2 = t2.value;
  269. this._connection = r4.value;
  270. const { extent: n4 } = await this._connection.invoke("load", i2, e3);
  271. this.sourceJSON = { extent: n4, fields: i2.fields, geometryType: i2.geometryType, objectIdField: i2.objectIdField, geometryField: i2.geometryField, drawingInfo: u(i2.geometryType), name: i2.featureType.title, wfsInfo: { name: i2.featureType.name, featureUrl: i2.getFeatureUrl, maxFeatures: 3e3, swapXY: i2.swapXY, supportedSpatialReferences: i2.featureType.supportedSpatialReferences, version: "2.0.0", wfsNamespace: i2.featureType.namespaceUri } };
  272. }
  273. };
  274. e([d()], j3.prototype, "capabilities", void 0), e([d({ constructOnly: true })], j3.prototype, "layer", void 0), e([d()], j3.prototype, "sourceJSON", void 0), e([d()], j3.prototype, "type", void 0), e([d()], j3.prototype, "wfsCapabilities", void 0), j3 = e([n("esri.layers.graphics.sources.WFSSource")], j3);
  275. // node_modules/@arcgis/core/layers/WFSLayer.js
  276. var J;
  277. var M2 = l2();
  278. var _ = J = class extends p4(o2(p3(a3(a4(n2(t(c3(v(O(b2)))))))))) {
  279. constructor(e3) {
  280. super(e3), this.capabilities = null, this.copyright = null, this.customParameters = null, this.definitionExpression = null, this.displayField = null, this.elevationInfo = null, this.featureReduction = null, this.featureUrl = void 0, this.fields = null, this.fieldsIndex = null, this.fullExtent = null, this.geometryType = null, this.labelsVisible = true, this.labelingInfo = null, this.legendEnabled = true, this.objectIdField = null, this.operationalLayerType = "WFS", this.maxFeatures = 3e3, this.mode = 0, this.name = null, this.namespaceUri = null, this.outFields = null, this.popupEnabled = true, this.popupTemplate = null, this.screenSizePerspectiveEnabled = true, this.source = new j3({ layer: this }), this.spatialReference = k.WGS84, this.spatialReferences = [4326], this.swapXY = void 0, this.title = "WFS", this.type = "wfs", this.url = null, this.version = void 0;
  281. }
  282. static fromWFSLayerInfo(e3) {
  283. const { customParameters: r4, fields: t2, geometryField: i2, geometryType: o3, name: s2, namespaceUri: n4, objectIdField: p6, spatialReference: a5, swapXY: l3, url: d4, wfsCapabilities: m4 } = e3;
  284. return new J({ customParameters: r4, fields: t2, geometryField: i2, geometryType: o3, name: s2, namespaceUri: n4, objectIdField: p6, spatialReference: a5, swapXY: l3, url: d4, wfsCapabilities: m4 });
  285. }
  286. destroy() {
  287. this.source?.destroy();
  288. }
  289. load(e3) {
  290. return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["WFS"] }, e3).then(() => this.source.load(e3)).then(() => {
  291. this.read(this.source.sourceJSON, { origin: "service", url: this.parsedUrl }), this.revert(["objectIdField", "fields", "timeInfo", "spatialReference", "name", "namespaceUri"], "service"), c4(this.renderer, this.fieldsIndex), m3(this.timeInfo, this.fieldsIndex);
  292. })), Promise.resolve(this);
  293. }
  294. get createQueryVersion() {
  295. return this.commitProperty("definitionExpression"), this.commitProperty("timeExtent"), this.commitProperty("timeOffset"), this.commitProperty("geometryType"), this.commitProperty("capabilities"), (this._get("createQueryVersion") || 0) + 1;
  296. }
  297. get defaultPopupTemplate() {
  298. return this.createPopupTemplate();
  299. }
  300. writeFields(e3, r4, t2) {
  301. const i2 = e3.filter((e4) => e4.name !== C);
  302. this.geometryField && i2.unshift(new y({ name: this.geometryField, alias: this.geometryField, type: "geometry" })), o(t2, i2.map((e4) => e4.toJSON()), r4);
  303. }
  304. get parsedUrl() {
  305. return this.url ? j(this.url) : null;
  306. }
  307. set renderer(e3) {
  308. c4(e3, this.fieldsIndex), this._set("renderer", e3);
  309. }
  310. createPopupTemplate(e3) {
  311. return d3(this, e3);
  312. }
  313. createQuery() {
  314. const e3 = new b();
  315. e3.returnGeometry = true, e3.outFields = ["*"], e3.where = this.definitionExpression || "1=1";
  316. const { timeOffset: r4, timeExtent: t2 } = this;
  317. return e3.timeExtent = r4 != null && t2 != null ? t2.offset(-r4.value, r4.unit) : t2 || null, e3;
  318. }
  319. getFieldDomain(e3, r4) {
  320. return this.getField(e3)?.domain;
  321. }
  322. getField(e3) {
  323. return this.fieldsIndex.get(e3);
  324. }
  325. queryFeatures(e3, r4) {
  326. return this.load().then(() => this.source.queryFeatures(b.from(e3) || this.createQuery(), r4)).then((e4) => {
  327. if (e4?.features)
  328. for (const r5 of e4.features)
  329. r5.layer = r5.sourceLayer = this;
  330. return e4;
  331. });
  332. }
  333. queryObjectIds(e3, r4) {
  334. return this.load().then(() => this.source.queryObjectIds(b.from(e3) || this.createQuery(), r4));
  335. }
  336. queryFeatureCount(e3, r4) {
  337. return this.load().then(() => this.source.queryFeatureCount(b.from(e3) || this.createQuery(), r4));
  338. }
  339. queryExtent(e3, r4) {
  340. return this.load().then(() => this.source.queryExtent(b.from(e3) || this.createQuery(), r4));
  341. }
  342. async hasDataChanged() {
  343. try {
  344. const { dataChanged: e3, updates: r4 } = await this.source.refresh(this.customParameters);
  345. return r(r4) && this.read(r4, { origin: "service", url: this.parsedUrl, ignoreDefaults: true }), e3;
  346. } catch {
  347. }
  348. return false;
  349. }
  350. };
  351. e([d({ readOnly: true, aliasOf: "source.capabilities" })], _.prototype, "capabilities", void 0), e([d({ type: String })], _.prototype, "copyright", void 0), e([d({ readOnly: true })], _.prototype, "createQueryVersion", null), e([d({ json: { name: "wfsInfo.customParameters", write: { ignoreOrigin: true } } })], _.prototype, "customParameters", void 0), e([d({ readOnly: true })], _.prototype, "defaultPopupTemplate", null), e([d({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], _.prototype, "definitionExpression", void 0), e([d({ type: String })], _.prototype, "displayField", void 0), e([d(d2)], _.prototype, "elevationInfo", void 0), e([d(p5)], _.prototype, "featureReduction", void 0), e([d({ type: String, readOnly: true, json: { name: "wfsInfo.featureUrl", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "featureUrl", void 0), e([d({ type: [y], json: { name: "layerDefinition.fields", write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "fields" } } } })], _.prototype, "fields", void 0), e([r2("fields")], _.prototype, "writeFields", null), e([d(M2.fieldsIndex)], _.prototype, "fieldsIndex", void 0), e([d({ type: M, json: { name: "extent" } })], _.prototype, "fullExtent", void 0), e([d()], _.prototype, "geometryField", void 0), e([d({ type: String, json: { read: { source: "layerDefinition.geometryType", reader: i.read }, write: { target: "layerDefinition.geometryType", writer: i.write, ignoreOrigin: true }, origins: { service: { read: i.read } } } })], _.prototype, "geometryType", void 0), e([d({ type: String })], _.prototype, "id", void 0), e([d(m2)], _.prototype, "labelsVisible", void 0), e([d({ type: [j2], json: { name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: r3 }, write: true } })], _.prototype, "labelingInfo", void 0), e([d(c2)], _.prototype, "legendEnabled", void 0), e([d({ type: ["show", "hide"] })], _.prototype, "listMode", void 0), e([d({ type: String })], _.prototype, "objectIdField", void 0), e([d({ type: ["WFS"] })], _.prototype, "operationalLayerType", void 0), e([d({ type: S, json: { name: "wfsInfo.maxFeatures", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "maxFeatures", void 0), e([d({ type: [0], readOnly: true, json: { origins: { "web-map": { write: { ignoreOrigin: true, isRequired: true } } } } })], _.prototype, "mode", void 0), e([d({ type: String, json: { name: "wfsInfo.name", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "name", void 0), e([d({ type: String, json: { name: "wfsInfo.wfsNamespace", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "namespaceUri", void 0), e([d(u2)], _.prototype, "opacity", void 0), e([d(M2.outFields)], _.prototype, "outFields", void 0), e([d({ readOnly: true })], _.prototype, "parsedUrl", null), e([d(p)], _.prototype, "popupEnabled", void 0), e([d({ type: B, json: { name: "popupInfo", write: true } })], _.prototype, "popupTemplate", void 0), e([d({ types: p2, json: { origins: { service: { name: "drawingInfo.renderer" }, "web-scene": { types: n3, name: "layerDefinition.drawingInfo.renderer", write: true } }, name: "layerDefinition.drawingInfo.renderer", write: { ignoreOrigin: true } } })], _.prototype, "renderer", null), e([d(l)], _.prototype, "screenSizePerspectiveEnabled", void 0), e([d({ readOnly: true })], _.prototype, "source", void 0), e([d({ type: k, json: { name: "layerDefinition.spatialReference", write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "extent.spatialReference" } } } })], _.prototype, "spatialReference", void 0), e([d({ readOnly: true, type: [S], json: { name: "wfsInfo.supportedSpatialReferences", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "spatialReferences", void 0), e([d({ type: Boolean, value: false, json: { name: "wfsInfo.swapXY", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "swapXY", void 0), e([d({ json: { write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "name" } } } })], _.prototype, "title", void 0), e([d({ json: { read: false }, readOnly: true })], _.prototype, "type", void 0), e([d(f)], _.prototype, "url", void 0), e([d({ type: String, readOnly: true, json: { name: "wfsInfo.version", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "version", void 0), e([d({ aliasOf: "source.wfsCapabilities" })], _.prototype, "wfsCapabilities", void 0), _ = J = e([n("esri.layers.WFSLayer")], _);
  352. var k2 = _;
  353. export {
  354. k2 as default
  355. };
  356. //# sourceMappingURL=WFSLayer-CC74A6A6.js.map