1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import {
- g
- } from "./chunk-RZFGRBD7.js";
- import {
- a
- } from "./chunk-RMX2AZ4P.js";
- import {
- n as n3,
- t as t2
- } from "./chunk-AFZ7XSEW.js";
- import {
- j,
- n as n2
- } from "./chunk-ALDCDSPV.js";
- import {
- d,
- e,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import {
- b
- } from "./chunk-IHXECKQQ.js";
- import {
- s
- } from "./chunk-EMJ4ZSM2.js";
- import {
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/core/support/OwningCollection.js
- s.getLogger("esri.core.support.OwningCollection");
- var m = class extends a(j) {
- constructor(e2) {
- super(e2), this.handles.add([this.on("before-add", (e3) => {
- t(e3.item) && e3.preventDefault();
- }), this.on("after-add", (e3) => this._own(e3.item)), this.on("after-remove", (e3) => this._release(e3.item))]);
- }
- get owner() {
- return this._get("owner");
- }
- set owner(e2) {
- e2 !== this._get("owner") && (this._releaseAll(), this._set("owner", e2), this._ownAll());
- }
- _ownAll() {
- for (const e2 of this.items)
- this._own(e2);
- }
- _releaseAll() {
- for (const e2 of this.items)
- this._release(e2);
- }
- _createNewInstance(e2) {
- return this.itemType ? new (j.ofType(this.itemType.Type))(e2) : new j(e2);
- }
- };
- function a2(e2, t3) {
- return { type: e2, cast: t2, set(s2) {
- const r = n3(s2, this._get(t3), e2);
- r.owner = this, this._set(t3, r);
- } };
- }
- e([d()], m.prototype, "owner", null), m = e([n("esri.core.support.OwningCollection")], m);
- // node_modules/@arcgis/core/support/GraphicsCollection.js
- var c = class extends m {
- _own(r) {
- r.layer && "remove" in r.layer && r.layer !== this.owner && r.layer.remove(r), r.layer = this.owner;
- }
- _release(r) {
- r.layer === this.owner && (r.layer = null);
- }
- };
- e([n2({ Type: g, ensureType: b(g) })], c.prototype, "itemType", void 0), c = e([n("esri.support.GraphicsCollection")], c);
- export {
- m,
- a2 as a,
- c
- };
- //# sourceMappingURL=chunk-LE3RIDC7.js.map
|