123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- import {
- l
- } from "./chunk-A6WD5XTM.js";
- import "./chunk-OP2HNSVZ.js";
- import {
- Ze
- } from "./chunk-TD4T5KV5.js";
- import "./chunk-JNNIUZVW.js";
- import "./chunk-6SHVYOIM.js";
- import "./chunk-EFTIWDMB.js";
- import "./chunk-E3VV75EL.js";
- import "./chunk-VIUIPJ2T.js";
- import "./chunk-YW3ZWYRO.js";
- import "./chunk-JZGM5PAU.js";
- import {
- u
- } from "./chunk-7FZX4UI7.js";
- import "./chunk-IR3DRB65.js";
- import "./chunk-7ZZ4CSFO.js";
- import "./chunk-YVKMCAJV.js";
- import "./chunk-FB243F4I.js";
- import "./chunk-DKAJ6NC2.js";
- import "./chunk-6334AFGG.js";
- import {
- x as x3
- } from "./chunk-WFHIGLUK.js";
- import "./chunk-IFWO6QLG.js";
- import "./chunk-KAB3V7FU.js";
- import "./chunk-SOSOZIX6.js";
- import "./chunk-FM5OVTDI.js";
- import "./chunk-2RHPWGZL.js";
- import "./chunk-24RR2OSE.js";
- import "./chunk-VICJMAP2.js";
- import "./chunk-ESLFDGN5.js";
- import "./chunk-TU7WVKU4.js";
- import "./chunk-DUH52ME3.js";
- import "./chunk-BFKFNCQC.js";
- import "./chunk-3C3WGWKN.js";
- import "./chunk-5AJSBAUF.js";
- import "./chunk-2QIZS77U.js";
- import "./chunk-OJUMXZ6B.js";
- import "./chunk-F62EJT7L.js";
- import "./chunk-JB2527A3.js";
- import "./chunk-XODJHDJQ.js";
- import "./chunk-O2PIYIHJ.js";
- import "./chunk-2BWPQRLB.js";
- import "./chunk-HPD2S4QL.js";
- import "./chunk-C65ZRRQD.js";
- import "./chunk-3HCJD762.js";
- import "./chunk-GR4RKUNH.js";
- import "./chunk-LTQAWUCK.js";
- import "./chunk-W3SLJVWY.js";
- import "./chunk-PK4W65H4.js";
- import "./chunk-KJZ6SS3P.js";
- import "./chunk-OER54WCN.js";
- import "./chunk-HOCLACFL.js";
- import "./chunk-3MLCBRBA.js";
- import "./chunk-WTRZAXRY.js";
- import "./chunk-SZFMKPVM.js";
- import {
- x as x2
- } from "./chunk-K6QDYFZU.js";
- import "./chunk-EY2WJSAJ.js";
- import "./chunk-YMULPZCD.js";
- import "./chunk-4PNYPUDB.js";
- import "./chunk-RDMCXRET.js";
- import "./chunk-BQHWPTT7.js";
- import "./chunk-ZSW35JPD.js";
- import "./chunk-DAWQAVQO.js";
- import "./chunk-73AMYZFU.js";
- import "./chunk-NKMX5M3L.js";
- import "./chunk-MGUVQY3Q.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-PJNBFKPF.js";
- import "./chunk-C7742RNZ.js";
- import "./chunk-SQ2SY4BX.js";
- import "./chunk-VLG7MMVR.js";
- import "./chunk-TV3CFJQR.js";
- import "./chunk-BWATQC2Y.js";
- import "./chunk-2DSTZVND.js";
- import "./chunk-VXKIGGM4.js";
- import "./chunk-KG45D2XL.js";
- import "./chunk-JYRZQPQI.js";
- import "./chunk-3HZQM2NK.js";
- import "./chunk-AR2YN3E2.js";
- import "./chunk-U3LEOWJX.js";
- import {
- f,
- p
- } from "./chunk-4ONPMX2F.js";
- import "./chunk-47NSA4T4.js";
- import "./chunk-FUODOQDM.js";
- import "./chunk-UMJCSYX5.js";
- import "./chunk-UA6W42KP.js";
- import "./chunk-3OSQ6GXO.js";
- import "./chunk-3WQOA5CB.js";
- import "./chunk-2L5METUC.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-SWMSD4RP.js";
- import "./chunk-UKEN2UNL.js";
- import "./chunk-UVVU4UUO.js";
- import "./chunk-HWSWTWZD.js";
- import "./chunk-O6VYMEIX.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-XJCUT65M.js";
- import "./chunk-PE24J2I5.js";
- import "./chunk-P3XKUGLS.js";
- import "./chunk-PIFOHNWC.js";
- import "./chunk-LLO7GCYU.js";
- import "./chunk-U7RKABRB.js";
- import "./chunk-X7CNGECX.js";
- import "./chunk-PSEI52P3.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-5UVJ64RB.js";
- import "./chunk-O43KLDSX.js";
- import "./chunk-AUOH2VSO.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-OSHI574D.js";
- import "./chunk-44GMIOGP.js";
- import "./chunk-75U5LM2V.js";
- import "./chunk-ZHRAUKVQ.js";
- import "./chunk-RZK6A2GY.js";
- import "./chunk-4NQ74ZR6.js";
- import "./chunk-X4LLOW7U.js";
- import {
- m
- } from "./chunk-BDA6VH2A.js";
- import "./chunk-Z4JTBD7M.js";
- import "./chunk-MSBIHK67.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-5DMBXPN2.js";
- import "./chunk-QANZ6BFY.js";
- import {
- j
- } from "./chunk-VEGAOVMY.js";
- import {
- o,
- w2
- } from "./chunk-CXCDYJ5R.js";
- import "./chunk-GAOW3WRZ.js";
- import {
- k2 as k
- } from "./chunk-QCKFNSN2.js";
- import {
- e,
- n5 as n,
- y3 as y
- } from "./chunk-6SOHRC7T.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import "./chunk-6KZ2LTDA.js";
- import {
- w,
- x
- } from "./chunk-V6P2MAQQ.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- has
- } from "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/graphics/sources/CSVSource.js
- var u2 = class extends m {
- constructor(t) {
- super(t), this.type = "csv", this.refresh = x(async (t2) => {
- await this.load();
- const { extent: e2, timeExtent: o2 } = await this._connection.invoke("refresh", t2);
- return this.sourceJSON.extent = e2, o2 && (this.sourceJSON.timeInfo.timeExtent = [o2.start, o2.end]), { dataChanged: true, updates: { extent: this.sourceJSON.extent, timeInfo: this.sourceJSON.timeInfo } };
- });
- }
- load(t) {
- const e2 = r(t) ? t.signal : null;
- return this.addResolvingPromise(this._startWorker(e2)), Promise.resolve(this);
- }
- destroy() {
- var _a;
- (_a = this._connection) == null ? void 0 : _a.close(), this._connection = null;
- }
- async openPorts() {
- return await this.load(), this._connection.openPorts();
- }
- async queryFeatures(t, e2 = {}) {
- await this.load(e2);
- const o2 = await this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
- return x3.fromJSON(o2);
- }
- async queryFeaturesJSON(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryFeatures", t ? t.toJSON() : null, e2);
- }
- async queryFeatureCount(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryFeatureCount", t ? t.toJSON() : null, e2);
- }
- async queryObjectIds(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("queryObjectIds", t ? t.toJSON() : null, e2);
- }
- async queryExtent(t, e2 = {}) {
- await this.load(e2);
- const o2 = await this._connection.invoke("queryExtent", t ? t.toJSON() : null, e2);
- return { count: o2.count, extent: w2.fromJSON(o2.extent) };
- }
- async querySnapping(t, e2 = {}) {
- return await this.load(e2), this._connection.invoke("querySnapping", t, e2);
- }
- async _startWorker(t) {
- this._connection = await u("CSVSourceWorker", { strategy: has("feature-layers-workers") ? "dedicated" : "local", signal: t });
- const { url: e2, delimiter: o2, fields: r2, latitudeField: i, longitudeField: n2, spatialReference: a, timeInfo: c } = this.loadOptions, u3 = await this._connection.invoke("load", { url: e2, customParameters: this.customParameters, parsingOptions: { delimiter: o2, fields: r2 == null ? void 0 : r2.map((t2) => t2.toJSON()), latitudeField: i, longitudeField: n2, spatialReference: a == null ? void 0 : a.toJSON(), timeInfo: c == null ? void 0 : c.toJSON() } }, { signal: t });
- this.locationInfo = u3.locationInfo, this.sourceJSON = u3.layerDefinition, this.delimiter = u3.delimiter;
- }
- };
- e([y()], u2.prototype, "type", void 0), e([y()], u2.prototype, "loadOptions", void 0), e([y()], u2.prototype, "customParameters", void 0), e([y()], u2.prototype, "locationInfo", void 0), e([y()], u2.prototype, "sourceJSON", void 0), e([y()], u2.prototype, "delimiter", void 0), u2 = e([n("esri.layers.graphics.sources.CSVSource")], u2);
- // node_modules/@arcgis/core/layers/CSVLayer.js
- function m2(e2, r2) {
- throw new s(r2, `CSVLayer (title: ${e2.title}, id: ${e2.id}) cannot be saved to a portal item`);
- }
- var f2 = class extends Ze {
- constructor(...e2) {
- super(...e2), this.geometryType = "point", this.capabilities = l(false, false), this.delimiter = null, this.editingEnabled = false, this.fields = null, this.latitudeField = null, this.locationType = "coordinates", this.longitudeField = null, this.operationalLayerType = "CSV", this.outFields = ["*"], this.path = null, this.spatialReference = k.WGS84, this.source = null, this.type = "csv";
- }
- normalizeCtorArgs(e2, t) {
- return "string" == typeof e2 ? { url: e2, ...t } : e2;
- }
- load(e2) {
- const t = r(e2) ? e2.signal : null, o2 = this.loadFromPortal({ supportedTypes: ["CSV"], supportsData: false }, e2).catch(w).then(async () => this.initLayerProperties(await this.createGraphicsSource(t)));
- return this.addResolvingPromise(o2), Promise.resolve(this);
- }
- get isTable() {
- return this.loaded && null == this.geometryType;
- }
- readWebMapLabelsVisible(e2, t) {
- return null != t.showLabels ? t.showLabels : !!(t.layerDefinition && t.layerDefinition.drawingInfo && t.layerDefinition.drawingInfo.labelingInfo);
- }
- set url(e2) {
- if (!e2)
- return void this._set("url", e2);
- const t = j(e2);
- this._set("url", t.path), t.query && (this.customParameters = { ...this.customParameters, ...t.query });
- }
- async createGraphicsSource(e2) {
- const t = new u2({ loadOptions: { delimiter: this.delimiter, fields: this.fields, latitudeField: this.latitudeField, longitudeField: this.longitudeField, spatialReference: this.spatialReference, timeInfo: this.timeInfo, url: this.url }, customParameters: this.customParameters });
- return this._set("source", t), await t.load({ signal: e2 }), this.read({ locationInfo: t.locationInfo, columnDelimiter: t.delimiter }, { origin: "service", url: this.parsedUrl }), t;
- }
- queryFeatures(e2, t) {
- return this.load().then(() => this.source.queryFeatures(x2.from(e2) || this.createQuery())).then((e3) => {
- if (e3 == null ? void 0 : e3.features)
- for (const t2 of e3.features)
- t2.layer = t2.sourceLayer = this;
- return e3;
- });
- }
- queryObjectIds(e2, t) {
- return this.load().then(() => this.source.queryObjectIds(x2.from(e2) || this.createQuery()));
- }
- queryFeatureCount(e2, t) {
- return this.load().then(() => this.source.queryFeatureCount(x2.from(e2) || this.createQuery()));
- }
- queryExtent(e2, t) {
- return this.load().then(() => this.source.queryExtent(x2.from(e2) || this.createQuery()));
- }
- read(e2, t) {
- super.read(e2, t), t && "service" === t.origin && this.revert(["latitudeField", "longitudeField"], "service");
- }
- write(e2, t) {
- return super.write(e2, { ...t, writeLayerSchema: true });
- }
- clone() {
- throw new s("csv-layer:clone", `CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`);
- }
- async save(e2) {
- return m2(this, "csv-layer:save");
- }
- async saveAs(e2, t) {
- return m2(this, "csv-layer:save-as");
- }
- async hasDataChanged() {
- try {
- const { dataChanged: e2, updates: t } = await this.source.refresh(this.customParameters);
- return r(t) && this.read(t, { origin: "service", url: this.parsedUrl, ignoreDefaults: true }), e2;
- } catch {
- }
- return false;
- }
- _verifyFields() {
- }
- _verifySource() {
- }
- _hasMemorySource() {
- return false;
- }
- };
- e([y({ readOnly: true, json: { read: false, write: false } })], f2.prototype, "capabilities", void 0), e([y({ type: [",", " ", ";", "|", " "], json: { read: { source: "columnDelimiter" }, write: { target: "columnDelimiter", ignoreOrigin: true } } })], f2.prototype, "delimiter", void 0), e([y({ readOnly: true, type: Boolean, json: { origins: { "web-scene": { read: false, write: false } } } })], f2.prototype, "editingEnabled", void 0), e([y({ json: { read: { source: "layerDefinition.fields" }, write: { target: "layerDefinition.fields" } } })], f2.prototype, "fields", void 0), e([y({ type: Boolean, readOnly: true })], f2.prototype, "isTable", null), e([o("web-map", "labelsVisible", ["layerDefinition.drawingInfo.labelingInfo", "showLabels"])], f2.prototype, "readWebMapLabelsVisible", null), e([y({ type: String, json: { read: { source: "locationInfo.latitudeFieldName" }, write: { target: "locationInfo.latitudeFieldName", ignoreOrigin: true } } })], f2.prototype, "latitudeField", void 0), e([y({ type: ["show", "hide"] })], f2.prototype, "listMode", void 0), e([y({ type: ["coordinates"], json: { read: { source: "locationInfo.locationType" }, write: { target: "locationInfo.locationType", ignoreOrigin: true, isRequired: true } } })], f2.prototype, "locationType", void 0), e([y({ type: String, json: { read: { source: "locationInfo.longitudeFieldName" }, write: { target: "locationInfo.longitudeFieldName", ignoreOrigin: true } } })], f2.prototype, "longitudeField", void 0), e([y({ type: ["CSV"] })], f2.prototype, "operationalLayerType", void 0), e([y()], f2.prototype, "outFields", void 0), e([y({ type: String, json: { origins: { "web-scene": { read: false, write: false } }, read: false, write: false } })], f2.prototype, "path", void 0), e([y({ json: { read: false }, cast: null, type: u2, readOnly: true })], f2.prototype, "source", void 0), e([y({ json: { read: false }, value: "csv", readOnly: true })], f2.prototype, "type", void 0), e([y({ json: { read: p, write: { isRequired: true, ignoreOrigin: true, writer: f } } })], f2.prototype, "url", null), f2 = e([n("esri.layers.CSVLayer")], f2);
- var g = f2;
- export {
- g as default
- };
- //# sourceMappingURL=CSVLayer-2TNXHB4T.js.map
|