123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460 |
- import {
- n as n3
- } from "./chunk-V4I7Q273.js";
- import {
- a,
- i
- } from "./chunk-BVA3U6FJ.js";
- import {
- Ze
- } from "./chunk-WM52QDLS.js";
- import "./chunk-MEZ7BUMM.js";
- import "./chunk-7B57NUGF.js";
- import "./chunk-AOQ55JXI.js";
- import "./chunk-X42TFXOU.js";
- import "./chunk-JFSMKLAQ.js";
- import "./chunk-LXOC7SMQ.js";
- import "./chunk-DN6W4TJU.js";
- import "./chunk-OUUXJOLT.js";
- import "./chunk-PLQUCCQV.js";
- import "./chunk-JZAS4TIG.js";
- import "./chunk-VBR5BOXI.js";
- import "./chunk-NBKUI76A.js";
- import "./chunk-6334AFGG.js";
- import "./chunk-NLLFSKB2.js";
- import "./chunk-LC3GBQ56.js";
- import "./chunk-5GYJGY4C.js";
- import "./chunk-OXF7W4BJ.js";
- import {
- An,
- en,
- rn,
- tn,
- un
- } from "./chunk-P24XEEHY.js";
- import {
- v
- } from "./chunk-WOXHUQGM.js";
- import "./chunk-FMPQIGFA.js";
- import "./chunk-SAJAEMIJ.js";
- import "./chunk-S6EFEKAU.js";
- import "./chunk-2RHPWGZL.js";
- import "./chunk-XEQ4FTFC.js";
- import "./chunk-JM5OVQAD.js";
- import "./chunk-S3GK7VUF.js";
- import "./chunk-TU7WVKU4.js";
- import "./chunk-WWXZOC2Y.js";
- import "./chunk-ZOKNWEG3.js";
- import "./chunk-NQA5XJGK.js";
- import "./chunk-EKYSPJO6.js";
- import "./chunk-JAUFBT5U.js";
- import "./chunk-W6U6FKJ3.js";
- import "./chunk-7C2KDOAI.js";
- import "./chunk-RHFU6KWO.js";
- import "./chunk-3FNKD2EB.js";
- import "./chunk-ZOO4I2U4.js";
- import "./chunk-JPUFJK2B.js";
- import "./chunk-HZ2WKB3G.js";
- import "./chunk-3HCJD762.js";
- import "./chunk-RVCE264D.js";
- import "./chunk-HKJ7X3BD.js";
- import "./chunk-Y74D3LKQ.js";
- import "./chunk-PK4W65H4.js";
- import {
- g
- } from "./chunk-7C23ILQ4.js";
- import "./chunk-P6VVVEX6.js";
- import {
- S2 as S,
- m,
- m2,
- y as y4
- } from "./chunk-3Z755LKF.js";
- import "./chunk-LTZ5XXDV.js";
- import "./chunk-IEU3AM37.js";
- import "./chunk-SKKBVHTF.js";
- import "./chunk-DLMAGHHC.js";
- import "./chunk-WD4J43GZ.js";
- import "./chunk-JOYXMSKE.js";
- import "./chunk-SZFMKPVM.js";
- import "./chunk-YZVAB3DF.js";
- import "./chunk-JLYTER4T.js";
- import "./chunk-CRHRHOXH.js";
- import "./chunk-ZSW35JPD.js";
- import "./chunk-JLSNMUQJ.js";
- import "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import {
- y as y3
- } from "./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 "./chunk-TJV6ODRM.js";
- import {
- v as v2
- } from "./chunk-JUWKPBLS.js";
- import {
- c
- } from "./chunk-WLSB4F4I.js";
- import "./chunk-GLSWDDR3.js";
- import {
- O
- } from "./chunk-MIQGEDET.js";
- import {
- x
- } from "./chunk-DUEMJ5XS.js";
- import "./chunk-VRLXUHP2.js";
- import "./chunk-3LVSQLWJ.js";
- import "./chunk-4ONPMX2F.js";
- import "./chunk-CRGY2SDS.js";
- import "./chunk-4T5ZGMEN.js";
- import "./chunk-GN35O2ZO.js";
- import {
- n as n2
- } from "./chunk-XTVKPAWY.js";
- import "./chunk-3OSQ6GXO.js";
- import "./chunk-3WQOA5CB.js";
- import {
- t as t3
- } from "./chunk-PLWDAYK7.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import {
- D,
- I,
- K,
- f,
- h
- } from "./chunk-2H5MD622.js";
- import "./chunk-3RSFVUKZ.js";
- import "./chunk-UVVU4UUO.js";
- import "./chunk-HWSWTWZD.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
- } 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 "./chunk-YFSLJIO4.js";
- import "./chunk-IM3LVQXV.js";
- import "./chunk-55RWC67C.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import "./chunk-VEGAOVMY.js";
- import {
- o as o2,
- w2 as w
- } from "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- E,
- k2 as k,
- r as r2
- } from "./chunk-PQFTYGF5.js";
- import {
- e,
- n5 as n,
- t5 as t2,
- y3 as y2
- } from "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import "./chunk-V6P2MAQQ.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- o,
- y
- } from "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- r,
- t
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/GraphicsLayer.js
- var c2 = class extends n2(t3(b)) {
- constructor(r3) {
- super(r3), this.elevationInfo = null, this.graphics = new i(), this.screenSizePerspectiveEnabled = true, this.type = "graphics", this.internal = false;
- }
- destroy() {
- this.removeAll(), this.graphics.destroy();
- }
- add(r3) {
- return this.graphics.add(r3), this;
- }
- addMany(r3) {
- return this.graphics.addMany(r3), this;
- }
- removeAll() {
- return this.graphics.removeAll(), this;
- }
- remove(r3) {
- this.graphics.remove(r3);
- }
- removeMany(r3) {
- this.graphics.removeMany(r3);
- }
- on(r3, e2) {
- return super.on(r3, e2);
- }
- graphicChanged(r3) {
- this.emit("graphic-update", r3);
- }
- };
- e([y2({ type: x })], c2.prototype, "elevationInfo", void 0), e([y2(a(i, "graphics"))], c2.prototype, "graphics", void 0), e([y2({ type: ["show", "hide"] })], c2.prototype, "listMode", void 0), e([y2()], c2.prototype, "screenSizePerspectiveEnabled", void 0), e([y2({ readOnly: true })], c2.prototype, "type", void 0), e([y2({ constructOnly: true })], c2.prototype, "internal", void 0), c2 = e([n("esri.layers.GraphicsLayer")], c2);
- var h2 = c2;
- // node_modules/@arcgis/core/layers/MapNotesLayer.js
- function z(e2) {
- return "markup" === e2.featureCollectionType || e2.layers.some((e3) => null != e3.layerDefinition.visibilityField || !U(e3));
- }
- function U({ layerDefinition: e2, featureSet: t4 }) {
- var _a;
- const r3 = (_a = e2.geometryType) != null ? _a : t4.geometryType;
- return H.find((t5) => {
- var _a2, _b, _c;
- return r3 === t5.geometryTypeJSON && ((_c = (_b = (_a2 = e2.drawingInfo) == null ? void 0 : _a2.renderer) == null ? void 0 : _b.symbol) == null ? void 0 : _c.type) === t5.identifyingSymbol.type;
- });
- }
- function W() {
- return new w({ xmin: -180, ymin: -90, xmax: 180, ymax: 90 });
- }
- var A = new y3({ name: "OBJECTID", alias: "OBJECTID", type: "oid", nullable: false, editable: false });
- var $ = new y3({ name: "title", alias: "Title", type: "string", nullable: true, editable: true });
- var q = class extends h2 {
- constructor(e2) {
- super(e2), this.visibilityMode = "inherited";
- }
- initialize() {
- for (const e2 of this.graphics)
- e2.sourceLayer = this.layer;
- this.graphics.on("after-add", (e2) => {
- e2.item.sourceLayer = this.layer;
- }), this.graphics.on("after-remove", (e2) => {
- e2.item.sourceLayer = null;
- });
- }
- get fullExtent() {
- var _a;
- const e2 = (_a = this.layer) == null ? void 0 : _a.spatialReference, t4 = this.fullBounds;
- return e2 ? t(t4) ? un(W(), e2).geometry : f(t4, e2) : null;
- }
- get fullBounds() {
- var _a;
- const e2 = (_a = this.layer) == null ? void 0 : _a.spatialReference;
- if (!e2)
- return null;
- const t4 = D();
- return this.graphics.forEach((r3) => {
- const o3 = r(r3.geometry) ? un(r3.geometry, e2).geometry : null;
- r(o3) && h(t4, "point" === o3.type ? o3 : o3.extent, t4);
- }), I(t4, K) ? null : t4;
- }
- get sublayers() {
- return this.graphics;
- }
- };
- e([y2({ readOnly: true })], q.prototype, "fullExtent", null), e([y2({ readOnly: true })], q.prototype, "fullBounds", null), e([y2({ readOnly: true })], q.prototype, "sublayers", null), e([y2()], q.prototype, "layer", void 0), e([y2()], q.prototype, "layerId", void 0), e([y2({ readOnly: true })], q.prototype, "visibilityMode", void 0), q = e([n("esri.layers.MapNotesLayer.MapNotesSublayer")], q);
- var H = [{ geometryType: "polygon", geometryTypeJSON: "esriGeometryPolygon", id: "polygonLayer", layerId: 0, title: "Polygons", identifyingSymbol: new S().toJSON() }, { geometryType: "polyline", geometryTypeJSON: "esriGeometryPolyline", id: "polylineLayer", layerId: 1, title: "Polylines", identifyingSymbol: new m().toJSON() }, { geometryType: "multipoint", geometryTypeJSON: "esriGeometryMultipoint", id: "multipointLayer", layerId: 2, title: "Multipoints", identifyingSymbol: new y4().toJSON() }, { geometryType: "point", geometryTypeJSON: "esriGeometryPoint", id: "pointLayer", layerId: 3, title: "Points", identifyingSymbol: new y4().toJSON() }, { geometryType: "point", geometryTypeJSON: "esriGeometryPoint", id: "textLayer", layerId: 4, title: "Text", identifyingSymbol: new m2().toJSON() }];
- var K2 = class extends n2(t3(c(v2(O(b))))) {
- constructor(e2) {
- super(e2), this.capabilities = { operations: { supportsMapNotesEditing: true } }, this.featureCollections = null, this.featureCollectionJSON = null, this.featureCollectionType = "notes", this.legendEnabled = false, this.listMode = "hide-children", this.minScale = 0, this.maxScale = 0, this.spatialReference = k.WGS84, this.sublayers = new j(H.map((e3) => new q({ id: e3.id, layerId: e3.layerId, title: e3.title, layer: this }))), this.title = "Map Notes", this.type = "map-notes", this.visibilityMode = "inherited";
- }
- readCapabilities(e2, t4, r3) {
- return { operations: { supportsMapNotesEditing: !z(t4) && "portal-item" !== (r3 == null ? void 0 : r3.origin) } };
- }
- readFeatureCollections(e2, t4, o3) {
- if (!z(t4))
- return null;
- const i2 = t4.layers.map((e3) => {
- const t5 = new Ze();
- return t5.read(e3, o3), t5;
- });
- return new j({ items: i2 });
- }
- readLegacyfeatureCollectionJSON(e2, t4) {
- return z(t4) ? y(t4.featureCollection) : null;
- }
- get fullExtent() {
- var _a;
- const e2 = this.spatialReference, t4 = D();
- if (r(this.sublayers))
- this.sublayers.forEach(({ fullBounds: e3 }) => r(e3) ? h(t4, e3, t4) : t4, t4);
- else if ((_a = this.featureCollectionJSON) == null ? void 0 : _a.layers.some((e3) => e3.layerDefinition.extent)) {
- this.featureCollectionJSON.layers.forEach((r3) => {
- const o3 = un(r3.layerDefinition.extent, e2).geometry;
- r(o3) && h(t4, o3, t4);
- });
- }
- return I(t4, K) ? un(W(), e2).geometry : f(t4, e2);
- }
- readMinScale(e2, t4) {
- for (const r3 of t4.layers)
- if (null != r3.layerDefinition.minScale)
- return r3.layerDefinition.minScale;
- return 0;
- }
- readMaxScale(e2, t4) {
- for (const r3 of t4.layers)
- if (null != r3.layerDefinition.maxScale)
- return r3.layerDefinition.maxScale;
- return 0;
- }
- get multipointLayer() {
- return this._findSublayer("multipointLayer");
- }
- get pointLayer() {
- return this._findSublayer("pointLayer");
- }
- get polygonLayer() {
- return this._findSublayer("polygonLayer");
- }
- get polylineLayer() {
- return this._findSublayer("polylineLayer");
- }
- readSpatialReference(e2, t4) {
- return t4.layers.length ? k.fromJSON(t4.layers[0].layerDefinition.spatialReference) : k.WGS84;
- }
- readSublayers(e2, o3, i2) {
- var _a;
- if (z(o3))
- return null;
- const a2 = [];
- let n4 = o3.layers.reduce((e3, t4) => {
- var _a2;
- return Math.max(e3, (_a2 = t4.layerDefinition.id) != null ? _a2 : -1);
- }, -1) + 1;
- for (const r3 of o3.layers) {
- const { layerDefinition: e3, featureSet: o4 } = r3, i3 = (_a = e3.id) != null ? _a : n4++, s2 = U(r3);
- if (r(s2)) {
- const r4 = new q({ id: s2.id, title: e3.name, layerId: i3, layer: this, graphics: o4.features.map(({ geometry: e4, symbol: r5, attributes: o5, popupInfo: i4 }) => g.fromJSON({ attributes: o5, geometry: e4, symbol: r5, popupTemplate: i4 })) });
- a2.push(r4);
- }
- }
- return new j(a2);
- }
- writeSublayers(e2, t4, r3, i2) {
- var _a;
- const { minScale: n4, maxScale: p } = this;
- if (t(e2))
- return;
- const y5 = e2.some((e3) => e3.graphics.length > 0);
- if (!this.capabilities.operations.supportsMapNotesEditing)
- return void (y5 && ((_a = i2 == null ? void 0 : i2.messages) == null ? void 0 : _a.push(new s("map-notes-layer:editing-not-supported", "New map notes cannot be added to this layer"))));
- const m3 = [];
- let u = this.spatialReference.toJSON();
- e:
- for (const o3 of e2)
- for (const e3 of o3.graphics)
- if (r(e3.geometry)) {
- u = e3.geometry.spatialReference.toJSON();
- break e;
- }
- for (const o3 of H) {
- const t5 = e2.find((e3) => o3.id === e3.id);
- this._writeMapNoteSublayer(m3, t5, o3, n4, p, u, i2);
- }
- o("featureCollection.layers", m3, t4);
- }
- get textLayer() {
- return this._findSublayer("textLayer");
- }
- load(e2) {
- return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Feature Collection"] }, e2)), Promise.resolve(this);
- }
- read(e2, t4) {
- "featureCollection" in e2 && (e2 = y(e2), Object.assign(e2, e2.featureCollection)), super.read(e2, t4);
- }
- async beforeSave() {
- if (t(this.sublayers))
- return;
- let e2 = null;
- const t4 = [];
- for (const o3 of this.sublayers)
- for (const r4 of o3.graphics)
- if (r(r4.geometry)) {
- const o4 = r4.geometry;
- e2 ? E(o4.spatialReference, e2) || (An(o4.spatialReference, e2) || en() || await tn(), r4.geometry = rn(o4, e2)) : e2 = o4.spatialReference, t4.push(r4);
- }
- const r3 = await v(t4.map((e3) => e3.geometry));
- t4.forEach((e3, t5) => e3.geometry = r3[t5]);
- }
- _findSublayer(e2) {
- var _a, _b;
- return t(this.sublayers) ? null : (_b = (_a = this.sublayers) == null ? void 0 : _a.find((t4) => t4.id === e2)) != null ? _b : null;
- }
- _writeMapNoteSublayer(e2, t4, r3, o3, l, n4, s2) {
- const p = [];
- if (!t(t4)) {
- for (const e3 of t4.graphics)
- this._writeMapNote(p, e3, r3.geometryType, s2);
- this._normalizeObjectIds(p, A), e2.push({ layerDefinition: { name: t4.title, drawingInfo: { renderer: { type: "simple", symbol: y(r3.identifyingSymbol) } }, id: t4.layerId, geometryType: r3.geometryTypeJSON, minScale: o3, maxScale: l, objectIdField: "OBJECTID", fields: [A.toJSON(), $.toJSON()], spatialReference: n4 }, featureSet: { features: p, geometryType: r3.geometryTypeJSON } });
- }
- }
- _writeMapNote(e2, t4, r3, o3) {
- var _a, _b;
- if (t(t4))
- return;
- const { geometry: i2, symbol: n4, popupTemplate: s2 } = t4;
- if (t(i2))
- return;
- if (i2.type !== r3)
- return void ((_a = o3 == null ? void 0 : o3.messages) == null ? void 0 : _a.push(new t2("map-notes-layer:invalid-geometry-type", `Geometry "${i2.type}" cannot be saved in "${r3}" layer`, { graphic: t4 })));
- if (t(n4))
- return void ((_b = o3 == null ? void 0 : o3.messages) == null ? void 0 : _b.push(new t2("map-notes-layer:no-symbol", "Skipping map notes with no symbol", { graphic: t4 })));
- const y5 = { attributes: { ...t4.attributes }, geometry: i2.toJSON(), symbol: n4.toJSON() };
- r(s2) && (y5.popupInfo = s2.toJSON()), e2.push(y5);
- }
- _normalizeObjectIds(e2, t4) {
- const r3 = t4.name;
- let o3 = n3(r3, e2) + 1;
- const i2 = /* @__PURE__ */ new Set();
- for (const l of e2) {
- l.attributes || (l.attributes = {});
- const { attributes: e3 } = l;
- (null == e3[r3] || i2.has(e3[r3])) && (e3[r3] = o3++), i2.add(e3[r3]);
- }
- }
- };
- e([y2({ readOnly: true })], K2.prototype, "capabilities", void 0), e([o2(["portal-item", "web-map"], "capabilities", ["layers"])], K2.prototype, "readCapabilities", null), e([y2({ readOnly: true })], K2.prototype, "featureCollections", void 0), e([o2(["web-map", "portal-item"], "featureCollections", ["layers"])], K2.prototype, "readFeatureCollections", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { enabled: true, target: "featureCollection" } } } } })], K2.prototype, "featureCollectionJSON", void 0), e([o2(["web-map", "portal-item"], "featureCollectionJSON", ["featureCollection"])], K2.prototype, "readLegacyfeatureCollectionJSON", null), e([y2({ readOnly: true, json: { read: true, write: { enabled: true, ignoreOrigin: true } } })], K2.prototype, "featureCollectionType", void 0), e([y2({ readOnly: true })], K2.prototype, "fullExtent", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { target: "featureCollection.showLegend", overridePolicy() {
- return { enabled: null != this.featureCollectionJSON };
- } } } } } })], K2.prototype, "legendEnabled", void 0), e([y2({ type: ["show", "hide", "hide-children"] })], K2.prototype, "listMode", void 0), e([y2({ type: Number, nonNullable: true, json: { write: false } })], K2.prototype, "minScale", void 0), e([o2(["web-map", "portal-item"], "minScale", ["layers"])], K2.prototype, "readMinScale", null), e([y2({ type: Number, nonNullable: true, json: { write: false } })], K2.prototype, "maxScale", void 0), e([o2(["web-map", "portal-item"], "maxScale", ["layers"])], K2.prototype, "readMaxScale", null), e([y2({ readOnly: true })], K2.prototype, "multipointLayer", null), e([y2({ value: "ArcGISFeatureLayer", type: ["ArcGISFeatureLayer"] })], K2.prototype, "operationalLayerType", void 0), e([y2({ readOnly: true })], K2.prototype, "pointLayer", null), e([y2({ readOnly: true })], K2.prototype, "polygonLayer", null), e([y2({ readOnly: true })], K2.prototype, "polylineLayer", null), e([y2({ type: k })], K2.prototype, "spatialReference", void 0), e([o2(["web-map", "portal-item"], "spatialReference", ["layers"])], K2.prototype, "readSpatialReference", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { ignoreOrigin: true } } } } })], K2.prototype, "sublayers", void 0), e([o2("web-map", "sublayers", ["layers"])], K2.prototype, "readSublayers", null), e([r2("web-map", "sublayers")], K2.prototype, "writeSublayers", null), e([y2({ readOnly: true })], K2.prototype, "textLayer", null), e([y2()], K2.prototype, "title", void 0), e([y2({ readOnly: true, json: { read: false } })], K2.prototype, "type", void 0), K2 = e([n("esri.layers.MapNotesLayer")], K2);
- var Q = K2;
- export {
- Q as default
- };
- //# sourceMappingURL=MapNotesLayer-NKIWEKTD.js.map
|