123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
- import {
- S,
- d,
- g,
- j as j3
- } from "./chunk-5PPOX2P4.js";
- import "./chunk-NLLFSKB2.js";
- import "./chunk-RHFU6KWO.js";
- import "./chunk-3FNKD2EB.js";
- import "./chunk-ZOO4I2U4.js";
- import "./chunk-JPUFJK2B.js";
- import "./chunk-HZ2WKB3G.js";
- import "./chunk-RVCE264D.js";
- import "./chunk-HKJ7X3BD.js";
- import "./chunk-Y74D3LKQ.js";
- import "./chunk-PK4W65H4.js";
- import "./chunk-7C23ILQ4.js";
- import "./chunk-P6VVVEX6.js";
- import "./chunk-3Z755LKF.js";
- import "./chunk-LTZ5XXDV.js";
- import "./chunk-IEU3AM37.js";
- import "./chunk-SKKBVHTF.js";
- import "./chunk-DLMAGHHC.js";
- import "./chunk-JOYXMSKE.js";
- import "./chunk-CRHRHOXH.js";
- import "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import "./chunk-JGBXYDGB.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-PJNBFKPF.js";
- import "./chunk-C7742RNZ.js";
- import "./chunk-FNA5GLRW.js";
- import "./chunk-MCWCB5IY.js";
- import "./chunk-TV3CFJQR.js";
- import {
- U,
- a,
- j as j2,
- l
- } from "./chunk-TJV6ODRM.js";
- import {
- v
- } from "./chunk-JUWKPBLS.js";
- import {
- c
- } from "./chunk-WLSB4F4I.js";
- import {
- f
- } from "./chunk-GLSWDDR3.js";
- import {
- O
- } from "./chunk-MIQGEDET.js";
- import "./chunk-DUEMJ5XS.js";
- import "./chunk-VRLXUHP2.js";
- import "./chunk-3LVSQLWJ.js";
- import "./chunk-4ONPMX2F.js";
- import "./chunk-CRGY2SDS.js";
- import "./chunk-4T5ZGMEN.js";
- import {
- p
- } from "./chunk-GN35O2ZO.js";
- import {
- n as n3
- } from "./chunk-XTVKPAWY.js";
- import "./chunk-3OSQ6GXO.js";
- import "./chunk-3WQOA5CB.js";
- import {
- t
- } from "./chunk-PLWDAYK7.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-2H5MD622.js";
- import "./chunk-3RSFVUKZ.js";
- import "./chunk-UVVU4UUO.js";
- import {
- l as l2
- } from "./chunk-CDZENOCQ.js";
- import "./chunk-O6VYMEIX.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-5N7JLUJJ.js";
- import "./chunk-ZAY3CMAZ.js";
- import "./chunk-P3XKUGLS.js";
- import "./chunk-2ZSOO377.js";
- import "./chunk-YUA3AHKR.js";
- import "./chunk-LU5IJZB4.js";
- import "./chunk-7IBV2TRE.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-5UVJ64RB.js";
- import "./chunk-SFEFRQCL.js";
- import {
- b as b2
- } from "./chunk-DXVOOCG4.js";
- import "./chunk-3GZSQU56.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-OSHI574D.js";
- import "./chunk-ETGAZ7LF.js";
- import "./chunk-75U5LM2V.js";
- import "./chunk-RMDDCMKS.js";
- import "./chunk-VCH45Q2I.js";
- import {
- j
- } from "./chunk-LBW34VZ2.js";
- import "./chunk-GSSTTHIT.js";
- import {
- m
- } from "./chunk-YFSLJIO4.js";
- import {
- n as n2
- } from "./chunk-IM3LVQXV.js";
- import "./chunk-55RWC67C.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import {
- Ut
- } from "./chunk-VEGAOVMY.js";
- import {
- o,
- w2
- } from "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- k2 as k,
- r as r2
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- n5 as n,
- u2,
- y3 as y
- } from "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import {
- b
- } from "./chunk-SQOPWYIT.js";
- import {
- w
- } from "./chunk-V6P2MAQQ.js";
- import "./chunk-E5O6P5I2.js";
- import {
- u
- } from "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/support/KMLSublayer.js
- var S2;
- var k2 = S2 = class extends n2.EventedMixin(u2(m)) {
- constructor(...e2) {
- super(...e2), this.description = null, this.id = null, this.networkLink = null, this.sublayers = null, this.title = null, this.sourceJSON = null, this.fullExtent = null, this.addHandles([a(() => this.sublayers, "after-add", ({ item: e3 }) => {
- e3.parent = this, e3.layer = this.layer;
- }, U), a(() => this.sublayers, "after-remove", ({ item: e3 }) => {
- e3.layer = e3.parent = null;
- }, U), l(() => this.sublayers, (e3, t2) => {
- if (t2)
- for (const r3 of t2)
- r3.layer = r3.parent = null;
- if (e3)
- for (const r3 of e3)
- r3.parent = this, r3.layer = this.layer;
- }, U)]);
- }
- initialize() {
- j2(() => this.networkLink).then(() => j2(() => true === this.visible)).then(() => this.load());
- }
- load(e2) {
- var _a, _b;
- if (!this.networkLink)
- return;
- if (this.networkLink.viewFormat)
- return;
- const r3 = r(e2) ? e2.signal : null, s = this._fetchService((_b = (_a = this._get("networkLink")) == null ? void 0 : _a.href) != null ? _b : "", r3).then((e3) => {
- var _a2;
- const r4 = j3(e3.sublayers);
- this.fullExtent = w2.fromJSON(r4), this.sourceJSON = e3;
- const s2 = b(j.ofType(S2), S(S2, e3));
- this.sublayers ? this.sublayers.addMany(s2) : this.sublayers = s2, (_a2 = this.layer) == null ? void 0 : _a2.emit("sublayer-update"), this.layer && this.layer.notifyChange("visibleSublayers");
- });
- return this.addResolvingPromise(s), Promise.resolve(this);
- }
- get visible() {
- return this._get("visible");
- }
- set visible(e2) {
- this._get("visible") !== e2 && (this._set("visible", e2), this.layer && this.layer.notifyChange("visibleSublayers"));
- }
- readVisible(e2, t2) {
- return !!t2.visibility;
- }
- set layer(e2) {
- this._set("layer", e2), this.sublayers && this.sublayers.forEach((t2) => t2.layer = e2);
- }
- _fetchService(e2, t2) {
- return g(e2, this.layer.outSpatialReference, this.layer.refreshInterval, t2).then((e3) => d(e3.data));
- }
- };
- e([y()], k2.prototype, "description", void 0), e([y()], k2.prototype, "id", void 0), e([y({ readOnly: true, value: null })], k2.prototype, "networkLink", void 0), e([y({ json: { write: { allowNull: true } } })], k2.prototype, "parent", void 0), e([y({ type: j.ofType(S2), json: { write: { allowNull: true } } })], k2.prototype, "sublayers", void 0), e([y({ value: null, json: { read: { source: "name", reader: (e2) => u(e2) } } })], k2.prototype, "title", void 0), e([y({ value: true })], k2.prototype, "visible", null), e([o("visible", ["visibility"])], k2.prototype, "readVisible", null), e([y()], k2.prototype, "sourceJSON", void 0), e([y({ value: null })], k2.prototype, "layer", null), e([y({ type: w2 })], k2.prototype, "fullExtent", void 0), k2 = S2 = e([n("esri.layers.support.KMLSublayer")], k2);
- var g2 = k2;
- // node_modules/@arcgis/core/layers/KMLLayer.js
- var F = ["kml", "xml"];
- var O2 = class extends n3(p(t(c(v(O(b2)))))) {
- constructor(...e2) {
- super(...e2), this._visibleFolders = [], this.allSublayers = new l2({ getCollections: () => [this.sublayers], getChildrenFunction: (e3) => e3.sublayers }), this.outSpatialReference = k.WGS84, this.path = null, this.legendEnabled = false, this.operationalLayerType = "KML", this.sublayers = null, this.type = "kml", this.url = null;
- }
- initialize() {
- this.addHandles([l(() => this.sublayers, (e2, r3) => {
- r3 && r3.forEach((e3) => {
- e3.parent = null, e3.layer = null;
- }), e2 && e2.forEach((e3) => {
- e3.parent = this, e3.layer = this;
- });
- }, U), this.on("sublayer-update", () => this.notifyChange("fullExtent"))]);
- }
- normalizeCtorArgs(e2, r3) {
- return "string" == typeof e2 ? { url: e2, ...r3 } : e2;
- }
- readSublayersFromItemOrWebMap(e2, r3) {
- this._visibleFolders = r3.visibleFolders;
- }
- readSublayers(e2, r3, t2) {
- return S(g2, r3, t2, this._visibleFolders);
- }
- writeSublayers(e2, r3) {
- const t2 = [], o2 = e2.toArray();
- for (; o2.length; ) {
- const e3 = o2[0];
- e3.networkLink || (e3.visible && t2.push(e3.id), e3.sublayers && o2.push(...e3.sublayers.toArray())), o2.shift();
- }
- r3.visibleFolders = t2;
- }
- get title() {
- const e2 = this._get("title");
- return e2 && "defaults" !== this.originOf("title") ? e2 : this.url ? Ut(this.url, F) || "KML" : e2 || "";
- }
- set title(e2) {
- this._set("title", e2);
- }
- get visibleSublayers() {
- const e2 = this.sublayers, r3 = [], t2 = (e3) => {
- e3.visible && (r3.push(e3), e3.sublayers && e3.sublayers.forEach(t2));
- };
- return e2 && e2.forEach(t2), r3;
- }
- get fullExtent() {
- return this._recomputeFullExtent();
- }
- load(e2) {
- const r3 = r(e2) ? e2.signal : null;
- return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["KML"], supportsData: false }, e2).catch(w).then(() => this._fetchService(r3))), Promise.resolve(this);
- }
- destroy() {
- super.destroy(), this.allSublayers.destroy();
- }
- async _fetchService(e2) {
- const r3 = await Promise.resolve().then(() => {
- var _a;
- return this.resourceInfo ? { ssl: false, data: this.resourceInfo } : g((_a = this.url) != null ? _a : "", this.outSpatialReference, this.refreshInterval, e2);
- }), t2 = d(r3.data);
- t2 && this.read(t2, { origin: "service" });
- }
- _recomputeFullExtent() {
- let e2 = null;
- r(this.extent) && (e2 = this.extent.clone());
- const r3 = (t2) => {
- if (t2.sublayers)
- for (const s of t2.sublayers.items)
- r3(s), s.visible && s.fullExtent && (r(e2) ? e2.union(s.fullExtent) : e2 = s.fullExtent.clone());
- };
- return r3(this), e2;
- }
- };
- e([y({ readOnly: true })], O2.prototype, "allSublayers", void 0), e([y({ type: k })], O2.prototype, "outSpatialReference", void 0), e([y({ type: String, json: { origins: { "web-scene": { read: true, write: true } }, read: false } })], O2.prototype, "path", void 0), e([y({ readOnly: true, json: { read: false, write: false } })], O2.prototype, "legendEnabled", void 0), e([y({ type: ["show", "hide", "hide-children"] })], O2.prototype, "listMode", void 0), e([y({ type: ["KML"] })], O2.prototype, "operationalLayerType", void 0), e([y({})], O2.prototype, "resourceInfo", void 0), e([y({ type: j.ofType(g2), json: { write: { ignoreOrigin: true } } })], O2.prototype, "sublayers", void 0), e([o(["web-map", "portal-item"], "sublayers", ["visibleFolders"])], O2.prototype, "readSublayersFromItemOrWebMap", null), e([o("service", "sublayers", ["sublayers"])], O2.prototype, "readSublayers", null), e([r2("sublayers")], O2.prototype, "writeSublayers", null), e([y({ readOnly: true, json: { read: false } })], O2.prototype, "type", void 0), e([y({ json: { origins: { "web-map": { read: { source: "title" } } }, write: { ignoreOrigin: true } } })], O2.prototype, "title", null), e([y(f)], O2.prototype, "url", void 0), e([y({ readOnly: true })], O2.prototype, "visibleSublayers", null), e([y({ type: w2 })], O2.prototype, "extent", void 0), e([y()], O2.prototype, "fullExtent", null), O2 = e([n("esri.layers.KMLLayer")], O2);
- var M = O2;
- export {
- M as default
- };
- //# sourceMappingURL=KMLLayer-WRWDUKQ6.js.map
|