(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [9615],
  {
    21781: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => n });
      var i = r(29768),
        s = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533));
      const n = (e) => {
        let t = class extends e {
          get apiKey() {
            var e;
            return this._isOverridden('apiKey')
              ? this._get('apiKey')
              : 'portalItem' in this
              ? null == (e = this.portalItem)
                ? void 0
                : e.apiKey
              : null;
          }
          set apiKey(e) {
            null != e
              ? this._override('apiKey', e)
              : (this._clearOverride('apiKey'), this.clear('apiKey', 'user'));
          }
        };
        return (
          (0, i._)([(0, s.Cb)({ type: String })], t.prototype, 'apiKey', null),
          (t = (0, i._)([(0, o.j)('esri.layers.mixins.APIKeyMixin')], t)),
          t
        );
      };
    },
    75025: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => d });
      var i = r(29768),
        s = r(92143),
        o = r(76506),
        n = r(34250),
        l = (r(91306), r(17533)),
        a = r(21132);
      const d = (e) => {
        let t = class extends e {
          get title() {
            if (this._get('title') && 'defaults' !== this.originOf('title'))
              return this._get('title');
            if (this.url) {
              const e = (0, a.p)(this.url);
              if ((0, o.i)(e) && e.title) return e.title;
            }
            return this._get('title') || '';
          }
          set title(e) {
            this._set('title', e);
          }
          set url(e) {
            this._set('url', (0, a.s)(e, s.L.getLogger(this.declaredClass)));
          }
        };
        return (
          (0, i._)([(0, n.Cb)()], t.prototype, 'title', null),
          (0, i._)([(0, n.Cb)({ type: String })], t.prototype, 'url', null),
          (t = (0, i._)([(0, l.j)('esri.layers.mixins.ArcGISService')], t)),
          t
        );
      };
    },
    22203: (e, t, r) => {
      'use strict';
      r.d(t, { C: () => p });
      var i = r(29768),
        s = r(15324),
        o = r(95873),
        n = r(76506),
        l = r(34250),
        a = (r(91306), r(92143), r(17533)),
        d = r(21972);
      let u = class extends (0, o.p)(s.Z) {
        constructor(e) {
          super(e), (this.getCollections = null);
        }
        initialize() {
          this.handles.add((0, d.a)(() => this.refresh()));
        }
        destroy() {
          this.getCollections = null;
        }
        refresh() {
          const e = (0, n.i)(this.getCollections) ? this.getCollections() : null;
          if ((0, n.b)(e)) return void this.removeAll();
          let t = 0;
          for (const r of e) (0, n.i)(r) && (t = this._processCollection(t, r));
          this.splice(t, this.length);
        }
        _createNewInstance(e) {
          return new s.Z(e);
        }
        _processCollection(e, t) {
          if (!t) return e;
          const r = this.itemFilterFunction ? this.itemFilterFunction : (e) => !!e;
          for (const i of t)
            if (i) {
              if (r(i)) {
                const t = this.indexOf(i, e);
                t >= 0 ? t !== e && this.reorder(i, e) : this.add(i, e), ++e;
              }
              if (this.getChildrenFunction) {
                const t = this.getChildrenFunction(i);
                if (Array.isArray(t)) for (const r of t) e = this._processCollection(e, r);
                else e = this._processCollection(e, t);
              }
            }
          return e;
        }
      };
      (0, i._)([(0, l.Cb)()], u.prototype, 'getCollections', void 0),
        (0, i._)([(0, l.Cb)()], u.prototype, 'getChildrenFunction', void 0),
        (0, i._)([(0, l.Cb)()], u.prototype, 'itemFilterFunction', void 0),
        (u = (0, i._)([(0, a.j)('esri.core.CollectionFlattener')], u));
      var p = u;
    },
    8547: (e, t, r) => {
      'use strict';
      r.d(t, { C: () => n });
      var i = r(29768),
        s = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533));
      const n = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments), (this.customParameters = null);
          }
        };
        return (
          (0, i._)(
            [(0, s.Cb)({ type: Object, json: { write: !0 } })],
            t.prototype,
            'customParameters',
            void 0,
          ),
          (t = (0, i._)([(0, o.j)('esri.layers.mixins.CustomParametersMixin')], t)),
          t
        );
      };
    },
    81655: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => _, S: () => O });
      var i = r(29768),
        s = r(82058),
        o = r(50406),
        n = r(32101),
        l = r(10738),
        a = r(34250),
        d = (r(76506), r(91306), r(92143)),
        u = r(97714),
        p = r(17533),
        y = r(21801),
        c = r(60947),
        h = r(43022),
        f = r(15324),
        b = r(22203),
        g = r(60991),
        m = r(86656),
        v = r(21972),
        w = r(9530),
        S = r(20820);
      const _ = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments),
                (this.capabilities = void 0),
                (this.copyright = null),
                (this.fullExtent = null),
                (this.legendEnabled = !0),
                (this.spatialReference = null),
                (this.version = null);
            }
            readCapabilities(e, t) {
              const r =
                t.capabilities && t.capabilities.split(',').map((e) => e.toLowerCase().trim());
              if (!r)
                return {
                  operations: {
                    supportsQuery: !1,
                    supportsExportMap: !1,
                    supportsExportTiles: !1,
                    supportsTileMap: !1,
                  },
                  exportMap: null,
                  exportTiles: null,
                };
              const i = this.type,
                s = -1 !== r.indexOf('query'),
                o = -1 !== r.indexOf('map'),
                n = !!t.exportTilesAllowed,
                a = -1 !== r.indexOf('tilemap'),
                d = 'tile' !== i && !!t.supportsDynamicLayers,
                u = 'tile' !== i && (!t.tileInfo || d),
                p = 'tile' !== i && (!t.tileInfo || d),
                y = 'tile' !== i,
                c = !!t.cimVersion && l.V.parse(t.cimVersion).since(1, 4);
              return {
                operations: {
                  supportsQuery: s,
                  supportsExportMap: o,
                  supportsExportTiles: n,
                  supportsTileMap: a,
                },
                exportMap: o
                  ? {
                      supportsArcadeExpressionForLabeling: c,
                      supportsSublayersChanges: y,
                      supportsDynamicLayers: d,
                      supportsSublayerVisibility: u,
                      supportsSublayerDefinitionExpression: p,
                    }
                  : null,
                exportTiles: n ? { maxExportTilesCount: +t.maxExportTilesCount } : null,
              };
            }
            readVersion(e, t) {
              let r = t.currentVersion;
              return (
                r ||
                  (r =
                    t.hasOwnProperty('capabilities') || t.hasOwnProperty('tables')
                      ? 10
                      : t.hasOwnProperty('supportedImageFormatTypes')
                      ? 9.31
                      : 9.3),
                r
              );
            }
            async fetchSublayerInfo(e, t) {
              return await this.fetchAllLayersAndTables(t), this._allLayersAndTablesMap.get(e);
            }
            async fetchAllLayersAndTables(e) {
              await this.load(e),
                this._allLayersAndTablesPromise ||
                  (this._allLayersAndTablesPromise = (0, s.default)(
                    (0, n.mN)(this.url).path + '/layers',
                    {
                      responseType: 'json',
                      query: { f: 'json', ...this.customParameters, token: this.apiKey },
                    },
                  ).then(
                    (e) => {
                      this._allLayersAndTablesMap = new Map();
                      for (const t of e.data.layers) this._allLayersAndTablesMap.set(t.id, t);
                      return { result: e.data };
                    },
                    (e) => ({ error: e }),
                  ));
              const t = await this._allLayersAndTablesPromise;
              if (((0, o.k_)(e), 'result' in t)) return t.result;
              throw t.error;
            }
          };
          return (
            (0, i._)([(0, a.Cb)({ readOnly: !0 })], t.prototype, 'capabilities', void 0),
            (0, i._)(
              [
                (0, u.r)('service', 'capabilities', [
                  'capabilities',
                  'exportTilesAllowed',
                  'maxExportTilesCount',
                  'supportsDynamicLayers',
                  'tileInfo',
                ]),
              ],
              t.prototype,
              'readCapabilities',
              null,
            ),
            (0, i._)(
              [(0, a.Cb)({ json: { read: { source: 'copyrightText' } } })],
              t.prototype,
              'copyright',
              void 0,
            ),
            (0, i._)([(0, a.Cb)({ type: y.Z })], t.prototype, 'fullExtent', void 0),
            (0, i._)([(0, a.Cb)(h.i)], t.prototype, 'id', void 0),
            (0, i._)(
              [
                (0, a.Cb)({
                  type: Boolean,
                  json: {
                    origins: { service: { read: { enabled: !1 } } },
                    read: { source: 'showLegend' },
                    write: { target: 'showLegend' },
                  },
                }),
              ],
              t.prototype,
              'legendEnabled',
              void 0,
            ),
            (0, i._)([(0, a.Cb)(h.p)], t.prototype, 'popupEnabled', void 0),
            (0, i._)([(0, a.Cb)({ type: c.Z })], t.prototype, 'spatialReference', void 0),
            (0, i._)([(0, a.Cb)()], t.prototype, 'version', void 0),
            (0, i._)(
              [
                (0, u.r)('version', [
                  'currentVersion',
                  'capabilities',
                  'tables',
                  'supportedImageFormatTypes',
                ]),
              ],
              t.prototype,
              'readVersion',
              null,
            ),
            (t = (0, i._)([(0, p.j)('esri.layers.mixins.ArcGISMapService')], t)),
            t
          );
        },
        I = d.L.getLogger('esri.layers.TileLayer'),
        C = f.Z.ofType(w.Z);
      function x(e, t) {
        e &&
          e.forEach((e) => {
            t(e), e.sublayers && e.sublayers.length && x(e.sublayers, t);
          });
      }
      const O = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e),
              (this.allSublayers = new b.C({
                getCollections: () => [this.sublayers],
                getChildrenFunction: (e) => e.sublayers,
              })),
              (this.sublayersSourceJSON = { 2: {}, 3: {}, 4: {}, 5: {} }),
              this.handles.add(
                this.watch('sublayers', (e, t) => this._handleSublayersChange(e, t), !0),
              );
          }
          readSublayers(e, t) {
            if (!t || !e) return;
            const { sublayersSourceJSON: r } = this,
              i = (0, v.n)(t.origin);
            if (i < 2) return;
            if (
              ((r[i] = {
                context: t,
                visibleLayers: e.visibleLayers || r[i].visibleLayers,
                layers: e.layers || r[i].layers,
              }),
              i > 2)
            )
              return;
            this._set('serviceSublayers', this.createSublayersForOrigin('service').sublayers);
            const { sublayers: s, origin: o } = this.createSublayersForOrigin('web-document'),
              n = (0, m.g)(this);
            n.setDefaultOrigin(o), this._set('sublayers', new C(s)), n.setDefaultOrigin('user');
          }
          findSublayerById(e) {
            return this.allSublayers.find((t) => t.id === e);
          }
          createServiceSublayers() {
            return this.createSublayersForOrigin('service').sublayers;
          }
          createSublayersForOrigin(e) {
            const t = (0, v.n)('web-document' === e ? 'web-map' : e);
            let r = 2,
              i = this.sublayersSourceJSON[2].layers,
              s = this.sublayersSourceJSON[2].context,
              o = null;
            const n = [3, 4, 5].filter((e) => e <= t);
            for (const e of n) {
              const t = this.sublayersSourceJSON[e];
              (0, S.i)(t.layers) &&
                ((r = e),
                (i = t.layers),
                (s = t.context),
                t.visibleLayers && (o = { visibleLayers: t.visibleLayers, context: t.context }));
            }
            const l = [3, 4, 5].filter((e) => e > r && e <= t);
            let a = null;
            for (const e of l) {
              const { layers: t, visibleLayers: r, context: i } = this.sublayersSourceJSON[e];
              t && (a = { layers: t, context: i }), r && (o = { visibleLayers: r, context: i });
            }
            const d = (function (e, t) {
                const r = [],
                  i = {};
                return e
                  ? (e.forEach((e) => {
                      const s = new w.Z();
                      if (
                        (s.read(e, t),
                        (i[s.id] = s),
                        null != e.parentLayerId && -1 !== e.parentLayerId)
                      ) {
                        const t = i[e.parentLayerId];
                        t.sublayers || (t.sublayers = []), t.sublayers.unshift(s);
                      } else r.unshift(s);
                    }),
                    r)
                  : r;
              })(i, s),
              u = new Map(),
              p = new Set();
            if (a) for (const e of a.layers) u.set(e.id, e);
            if (o) for (const e of o.visibleLayers) p.add(e);
            return (
              x(d, (e) => {
                a && e.read(u.get(e.id), a.context),
                  o && e.read({ defaultVisibility: p.has(e.id) }, o.context);
              }),
              { origin: (0, v.c)(r), sublayers: new C({ items: d }) }
            );
          }
          read(e, t) {
            super.read(e, t), this.readSublayers(e, t);
          }
          _handleSublayersChange(e, t) {
            t &&
              (t.forEach((e) => {
                (e.parent = null), (e.layer = null);
              }),
              this.handles.remove('sublayers-owner')),
              e &&
                (e.forEach((e) => {
                  (e.parent = this), (e.layer = this);
                }),
                this.handles.add(
                  [
                    e.on('after-add', ({ item: e }) => {
                      (e.parent = this), (e.layer = this);
                    }),
                    e.on('after-remove', ({ item: e }) => {
                      (e.parent = null), (e.layer = null);
                    }),
                  ],
                  'sublayers-owner',
                ),
                'tile' === this.type &&
                  this.handles.add(
                    e.on('before-changes', (e) => {
                      I.error(
                        new g.Z(
                          'tilelayer:sublayers-non-modifiable',
                          "ISublayer can't be added, moved, or removed from the layer's sublayers",
                          { layer: this },
                        ),
                      ),
                        e.preventDefault();
                    }),
                    'sublayers-owner',
                  ));
          }
        };
        return (
          (0, i._)([(0, a.Cb)({ readOnly: !0 })], t.prototype, 'allSublayers', void 0),
          (0, i._)(
            [(0, a.Cb)({ readOnly: !0, type: f.Z.ofType(w.Z) })],
            t.prototype,
            'serviceSublayers',
            void 0,
          ),
          (0, i._)(
            [
              (0, a.Cb)({
                value: null,
                type: C,
                json: { read: !1, write: { allowNull: !0, ignoreOrigin: !0 } },
              }),
            ],
            t.prototype,
            'sublayers',
            void 0,
          ),
          (0, i._)([(0, a.Cb)({ readOnly: !0 })], t.prototype, 'sublayersSourceJSON', void 0),
          (t = (0, i._)([(0, p.j)('esri.layers.mixins.SublayersOwner')], t)),
          t
        );
      };
    },
    10738: (e, t, r) => {
      'use strict';
      r.d(t, { V: () => s });
      var i = r(60991);
      class s {
        constructor(e, t, r = '') {
          (this.major = e), (this.minor = t), (this._context = r);
        }
        lessThan(e, t) {
          return this.major < e || (e === this.major && this.minor < t);
        }
        since(e, t) {
          return !this.lessThan(e, t);
        }
        validate(e) {
          if (this.major !== e.major) {
            const t = this._context && this._context + ':',
              r = this._context && this._context + ' ';
            throw new i.Z(
              t + 'unsupported-version',
              `Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,
              { version: e },
            );
          }
        }
        clone() {
          return new s(this.major, this.minor, this._context);
        }
        static parse(e, t = '') {
          const [r, o] = e.split('.'),
            n = /^\s*\d+\s*$/;
          if (!r || !r.match || !r.match(n))
            throw new i.Z(
              (t && t + ':') + 'invalid-version',
              "Expected major version to be a number, but got '${version}'",
              { version: e },
            );
          if (!o || !o.match || !o.match(n))
            throw new i.Z(
              (t && t + ':') + 'invalid-version',
              "Expected minor version to be a number, but got '${version}'",
              { version: e },
            );
          const l = parseInt(r, 10),
            a = parseInt(o, 10);
          return new s(l, a, t);
        }
      }
    },
    6941: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => o,
        b: () => n,
        c: () => l,
        d: () => s,
        e: () => a,
        f: () => d,
        g: () => u,
      });
      const i = [252, 146, 31, 255],
        s = {
          type: 'esriSMS',
          style: 'esriSMSCircle',
          size: 6,
          color: i,
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [153, 153, 153, 255],
          },
        },
        o = { type: 'esriSLS', style: 'esriSLSSolid', width: 0.75, color: i },
        n = {
          type: 'esriSFS',
          style: 'esriSFSSolid',
          color: [252, 146, 31, 196],
          outline: {
            type: 'esriSLS',
            style: 'esriSLSSolid',
            width: 0.75,
            color: [255, 255, 255, 191],
          },
        },
        l = {
          type: 'esriTS',
          color: [255, 255, 255, 255],
          font: { family: 'arial-unicode-ms', size: 10, weight: 'bold' },
          horizontalAlignment: 'center',
          kerning: !0,
          haloColor: [0, 0, 0, 255],
          haloSize: 1,
          rotated: !1,
          text: '',
          xoffset: 0,
          yoffset: 0,
          angle: 0,
        },
        a = {
          type: 'esriSMS',
          style: 'esriSMSCircle',
          color: [0, 0, 0, 255],
          outline: null,
          size: 10.5,
        },
        d = { type: 'esriSLS', style: 'esriSLSSolid', color: [0, 0, 0, 255], width: 1.5 },
        u = { type: 'esriSFS', style: 'esriSFSSolid', color: [0, 0, 0, 255], outline: null };
    },
    93939: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => h, d: () => f, h: () => c });
      var i = r(21972),
        s = r(15324),
        o = r(76506),
        n = r(86656);
      const l = [
        'esri.Color',
        'esri.portal.Portal',
        'esri.symbols.support.Symbol3DAnchorPosition2D',
        'esri.symbols.support.Symbol3DAnchorPosition3D',
      ];
      function a(e) {
        return e instanceof i.Z;
      }
      function d(e) {
        return e instanceof s.Z
          ? Object.keys(e.items)
          : a(e)
          ? (0, n.g)(e).keys()
          : e
          ? Object.keys(e)
          : [];
      }
      function u(e, t) {
        return e instanceof s.Z ? e.items[t] : e[t];
      }
      function p(e) {
        return e ? e.declaredClass : null;
      }
      function y(e, t) {
        const r = e.diff;
        if (r && 'function' == typeof r) return r(e, t);
        const i = d(e),
          s = d(t);
        if (0 === i.length && 0 === s.length) return;
        if (
          !i.length ||
          !s.length ||
          (function (e, t) {
            return !(!Array.isArray(e) || !Array.isArray(t)) && e.length !== t.length;
          })(e, t)
        )
          return { type: 'complete', oldValue: e, newValue: t };
        const n = s.filter((e) => -1 === i.indexOf(e)),
          c = i.filter((e) => -1 === s.indexOf(e)),
          h = i
            .filter((r) => s.indexOf(r) > -1 && u(e, r) !== u(t, r))
            .concat(n, c)
            .sort(),
          f = p(e);
        if (f && l.indexOf(f) > -1 && h.length)
          return { type: 'complete', oldValue: e, newValue: t };
        let b;
        const g = a(e) && a(t);
        for (const i of h) {
          const s = u(e, i),
            n = u(t, i);
          let l;
          (g || ('function' != typeof s && 'function' != typeof n)) &&
            s !== n &&
            ((null == s && null == n) ||
              ((l =
                r && r[i] && 'function' == typeof r[i]
                  ? r[i](s, n)
                  : 'object' == typeof s && 'object' == typeof n && p(s) === p(n)
                  ? y(s, n)
                  : { type: 'complete', oldValue: s, newValue: n }),
              (0, o.i)(l) &&
                ((0, o.i)(b) ? (b.diff[i] = l) : (b = { type: 'partial', diff: { [i]: l } }))));
        }
        return b;
      }
      function c(e, t) {
        if ((0, o.b)(e)) return !1;
        const r = t.split('.');
        let i = e;
        for (const e of r) {
          if ('complete' === i.type) return !0;
          if ('partial' !== i.type) return !1;
          {
            const t = i.diff[e];
            if (!t) return !1;
            i = t;
          }
        }
        return !0;
      }
      function h(e, t) {
        for (const r of t) if (c(e, r)) return !0;
        return !1;
      }
      function f(e, t) {
        if ('function' != typeof e && 'function' != typeof t && (e || t))
          return !e || !t || ('object' == typeof e && 'object' == typeof t && p(e) !== p(t))
            ? { type: 'complete', oldValue: e, newValue: t }
            : y(e, t);
      }
    },
    20820: (e, t, r) => {
      'use strict';
      function i(e, t, r) {
        return (
          t.flatten(({ sublayers: e }) => e).length !== e.length ||
          !!e.some(
            (e) =>
              e.originIdOf('minScale') > r ||
              e.originIdOf('maxScale') > r ||
              e.originIdOf('renderer') > r ||
              e.originIdOf('labelingInfo') > r ||
              e.originIdOf('opacity') > r ||
              e.originIdOf('labelsVisible') > r ||
              e.originIdOf('source') > r,
          ) ||
          !o(e, t)
        );
      }
      function s(e, t, r) {
        return (
          !!e.some((e) => {
            const t = e.source;
            return (
              !(
                !t ||
                ('map-layer' === t.type &&
                  t.mapLayerId === e.id &&
                  (!t.gdbVersion || t.gdbVersion === r.gdbVersion))
              ) ||
              e.originIdOf('renderer') > 2 ||
              e.originIdOf('labelingInfo') > 2 ||
              e.originIdOf('opacity') > 2 ||
              e.originIdOf('labelsVisible') > 2
            );
          }) || !o(e, t)
        );
      }
      function o(e, t) {
        if (!e || !e.length) return !0;
        const r = t
          .slice()
          .reverse()
          .flatten(({ sublayers: e }) => e && e.toArray().reverse())
          .map((e) => e.id)
          .toArray();
        if (e.length > r.length) return !1;
        let i = 0;
        const s = r.length;
        for (const { id: t } of e) {
          for (; i < s && r[i] !== t; ) i++;
          if (i >= s) return !1;
        }
        return !0;
      }
      function n(e) {
        return (
          !!e &&
          e.some(
            (e) => null != e.minScale || (e.layerDefinition && null != e.layerDefinition.minScale),
          )
        );
      }
      r.d(t, { a: () => s, i: () => n, s: () => i });
    },
    95873: (e, t, r) => {
      'use strict';
      r.d(t, { r: () => h, p: () => c, W: () => p });
      var i = r(29768),
        s = r(21972),
        o = r(82933),
        n = r(34250),
        l = r(17533),
        a = r(76506),
        d = r(6906),
        u = r(617);
      r(23639),
        r(92143),
        r(31450),
        r(71552),
        r(40642),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(91306),
        r(81172),
        r(50406),
        r(60991),
        r(15324),
        r(76996);
      let p = class extends s.Z {
        constructor() {
          super(...arguments),
            (this.updating = !1),
            (this.handleId = 0),
            (this.handles = new o.Z()),
            (this.scheduleHandleId = 0),
            (this.pendingPromises = new Set());
        }
        destroy() {
          this.removeAll(), this.handles.destroy();
        }
        add(e, t, r, i = 0) {
          const s = 0 != (1 & i),
            o = ++this.handleId;
          s || this.installSyncUpdatingWatch(e, t, o);
          const n = 0 != (2 & i) ? (0, u.S1)(e, t, r, s) : e.watch(t, r, s);
          return this.handles.add(n, o), { remove: () => this.handles.remove(o) };
        }
        addOnCollectionPropertyChange(e, t, r, i = 0) {
          const s = 0 != (2 & i),
            o = ++this.handleId;
          return (
            this.handles.add(
              [
                (0, u.on)(e, t, 'after-changes', this.createSyncUpdatingCallback()),
                (0, u.on)(
                  e,
                  t,
                  'change',
                  r,
                  s
                    ? (e) => {
                        r({ added: e.items, removed: [], moved: [], target: e });
                      }
                    : void 0,
                ),
              ],
              o,
            ),
            {
              remove: () => {
                this.handles.remove(o);
              },
            }
          );
        }
        addOnCollectionChange(e, t, r = 0) {
          const i = 0 != (2 & r),
            s = ++this.handleId;
          return (
            this.handles.add(
              [e.on('after-changes', this.createSyncUpdatingCallback()), e.on('change', t)],
              s,
            ),
            i && t({ added: e.items, removed: [], moved: [], target: e }),
            {
              remove: () => {
                this.handles.remove(s);
              },
            }
          );
        }
        addPromise(e) {
          if ((0, a.b)(e)) return e;
          const t = ++this.handleId;
          this.handles.add(
            {
              remove: () => {
                this.pendingPromises.delete(e) &&
                  (0 !== this.pendingPromises.size ||
                    this.handles.has(y) ||
                    this._set('updating', !1));
              },
            },
            t,
          ),
            this.pendingPromises.add(e),
            this._set('updating', !0);
          const r = () => this.handles.remove(t);
          return e.then(r, r), e;
        }
        removeAll() {
          this.pendingPromises.clear(), this.handles.removeAll(), this._set('updating', !1);
        }
        installSyncUpdatingWatch(e, t, r) {
          const i = this.createSyncUpdatingCallback(),
            o = (0, s.r)(() => (0, n.v)(e, t), i);
          return this.handles.add(o, r), o;
        }
        createSyncUpdatingCallback() {
          return () => {
            this.handles.remove(y), ++this.scheduleHandleId;
            const e = this.scheduleHandleId;
            this._get('updating') || this._set('updating', !0),
              this.handles.add(
                (0, d.Os)(() => {
                  e === this.scheduleHandleId &&
                    (this._set('updating', this.pendingPromises.size > 0), this.handles.remove(y));
                }),
                y,
              );
          };
        }
      };
      (0, i._)([(0, n.Cb)({ readOnly: !0 })], p.prototype, 'updating', void 0),
        (p = (0, i._)([(0, l.j)('esri.views.support.WatchUpdatingTracking')], p));
      const y = -42,
        c = (e) => {
          let t = class extends e {
            destroy() {
              this.destroyed || (this.handles.destroy(), this.updatingHandles.destroy());
            }
            get handles() {
              return this._get('handles') || new o.Z();
            }
            get updatingHandles() {
              return this._get('updatingHandles') || new p();
            }
          };
          return (
            (0, i._)([(0, n.Cb)({ readOnly: !0 })], t.prototype, 'handles', null),
            (0, i._)([(0, n.Cb)({ readOnly: !0 })], t.prototype, 'updatingHandles', null),
            (t = (0, i._)([(0, l.j)('esri.core.HandleOwner')], t)),
            t
          );
        };
      let h = class extends c(s.Z) {};
      h = (0, i._)([(0, l.j)('esri.core.HandleOwner')], h);
    },
    46495: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => y });
      var i = r(29768),
        s = r(57251),
        o = r(74673),
        n = r(76506),
        l = r(34250),
        a = (r(91306), r(92143), r(17533)),
        d = r(2906);
      r(71552),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(31450),
        r(40642),
        r(26341);
      const u = new s.J({
        esriFeatureEditToolAutoCompletePolygon: 'auto-complete-polygon',
        esriFeatureEditToolCircle: 'circle',
        esriFeatureEditToolEllipse: 'ellipse',
        esriFeatureEditToolFreehand: 'freehand',
        esriFeatureEditToolLine: 'line',
        esriFeatureEditToolNone: 'none',
        esriFeatureEditToolPoint: 'point',
        esriFeatureEditToolPolygon: 'polygon',
        esriFeatureEditToolRectangle: 'rectangle',
        esriFeatureEditToolArrow: 'arrow',
        esriFeatureEditToolTriangle: 'triangle',
        esriFeatureEditToolLeftArrow: 'left-arrow',
        esriFeatureEditToolRightArrow: 'right-arrow',
        esriFeatureEditToolUpArrow: 'up-arrow',
        esriFeatureEditToolDownArrow: 'down-arrow',
      });
      let p = class extends o.a {
        constructor(e) {
          super(e),
            (this.name = null),
            (this.description = null),
            (this.drawingTool = null),
            (this.prototype = null),
            (this.thumbnail = null);
        }
        writeDrawingTool(e, t) {
          t.drawingTool = u.toJSON(e);
        }
        writePrototype(e, t) {
          t.prototype = (0, n.yd)((0, n.d9)(e), !0);
        }
        writeThumbnail(e, t) {
          t.thumbnail = (0, n.yd)((0, n.d9)(e));
        }
      };
      (0, i._)([(0, l.Cb)({ json: { write: !0 } })], p.prototype, 'name', void 0),
        (0, i._)([(0, l.Cb)({ json: { write: !0 } })], p.prototype, 'description', void 0),
        (0, i._)(
          [(0, l.Cb)({ json: { read: u.read, write: u.write } })],
          p.prototype,
          'drawingTool',
          void 0,
        ),
        (0, i._)([(0, d.w)('drawingTool')], p.prototype, 'writeDrawingTool', null),
        (0, i._)([(0, l.Cb)({ json: { write: !0 } })], p.prototype, 'prototype', void 0),
        (0, i._)([(0, d.w)('prototype')], p.prototype, 'writePrototype', null),
        (0, i._)([(0, l.Cb)({ json: { write: !0 } })], p.prototype, 'thumbnail', void 0),
        (0, i._)([(0, d.w)('thumbnail')], p.prototype, 'writeThumbnail', null),
        (p = (0, i._)([(0, a.j)('esri.layers.support.FeatureTemplate')], p));
      const y = p;
    },
    78303: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => f });
      var i = r(29768),
        s = r(74673),
        o = r(76506),
        n = r(34250),
        l = (r(91306), r(92143), r(97714)),
        a = r(17533),
        d = r(2906),
        u = (r(9801), r(46495)),
        p = r(46826),
        y = r(53523),
        c = r(45433);
      r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341),
        r(42911),
        r(57251),
        r(59465);
      let h = class extends s.a {
        constructor(e) {
          super(e),
            (this.id = null),
            (this.name = null),
            (this.domains = null),
            (this.templates = null);
        }
        readDomains(e) {
          const t = {};
          for (const r in e)
            if (e.hasOwnProperty(r)) {
              const i = e[r];
              switch (i.type) {
                case 'range':
                  t[r] = c.Z.fromJSON(i);
                  break;
                case 'codedValue':
                  t[r] = y.Z.fromJSON(i);
                  break;
                case 'inherited':
                  t[r] = p.Z.fromJSON(i);
              }
            }
          return t;
        }
        writeDomains(e, t) {
          const r = {};
          for (const t in e) e.hasOwnProperty(t) && (r[t] = e[t] && e[t].toJSON());
          (0, o.yd)(r), (t.domains = r);
        }
        readTemplates(e) {
          return e && e.map((e) => new u.Z(e));
        }
        writeTemplates(e, t) {
          t.templates = e && e.map((e) => e.toJSON());
        }
      };
      (0, i._)([(0, n.Cb)({ json: { write: !0 } })], h.prototype, 'id', void 0),
        (0, i._)([(0, n.Cb)({ json: { write: !0 } })], h.prototype, 'name', void 0),
        (0, i._)([(0, n.Cb)({ json: { write: !0 } })], h.prototype, 'domains', void 0),
        (0, i._)([(0, l.r)('domains')], h.prototype, 'readDomains', null),
        (0, i._)([(0, d.w)('domains')], h.prototype, 'writeDomains', null),
        (0, i._)([(0, n.Cb)({ json: { write: !0 } })], h.prototype, 'templates', void 0),
        (0, i._)([(0, l.r)('templates')], h.prototype, 'readTemplates', null),
        (0, i._)([(0, d.w)('templates')], h.prototype, 'writeTemplates', null),
        (h = (0, i._)([(0, a.j)('esri.layers.support.FeatureType')], h));
      const f = h;
    },
    9530: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => q });
      var i,
        s = r(29768),
        o = (r(74569), r(86748)),
        n = (r(55306), r(71206), r(51979), r(60698), r(65684), r(86758), r(95310), r(20208)),
        l = r(82058),
        a = r(96467),
        d = r(15324),
        u = r(60991),
        p = r(95873),
        y = r(82673),
        c = r(76506),
        h = r(22739),
        f = r(92143),
        b = r(54179),
        g = r(32101),
        m = r(34250),
        v = r(86656),
        w = r(86787),
        S = r(97714),
        _ = r(17533),
        I = r(2906),
        C = r(91306),
        x = r(21972),
        O = r(78303),
        L = r(97546),
        T = r(1709),
        j = r(77807),
        F = r(69218),
        P = r(31292),
        D = r(78893),
        E = r(21801);
      function A(e) {
        return e && 'esriSMS' === e.type;
      }
      function M(e, t, r) {
        var i;
        const s = this.originIdOf(t) >= (0, x.n)(r.origin);
        return {
          ignoreOrigin: !0,
          allowNull: s,
          enabled:
            !!r &&
            'map-image' === (null == (i = r.layer) ? void 0 : i.type) &&
            (r.writeSublayerStructure || s),
        };
      }
      function N(e, t, r) {
        var i;
        return {
          enabled:
            !!r && 'tile' === (null == (i = r.layer) ? void 0 : i.type) && this._isOverridden(t),
        };
      }
      function V(e, t, r) {
        return { ignoreOrigin: !0, enabled: (r && r.writeSublayerStructure) || !1 };
      }
      function Z(e, t, r) {
        return {
          ignoreOrigin: !0,
          enabled: !!r && (r.writeSublayerStructure || this.originIdOf(t) >= (0, x.n)(r.origin)),
        };
      }
      r(73796),
        r(74673),
        r(26341),
        r(27794),
        r(60947),
        r(40642),
        r(71552),
        r(23639),
        r(31450),
        r(22723),
        r(91055),
        r(6906),
        r(50406),
        r(81172),
        r(84069),
        r(91597),
        r(35132),
        r(89623),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(29107),
        r(30574),
        r(2157),
        r(25977),
        r(7471),
        r(54414),
        r(1648),
        r(8925),
        r(33921),
        r(3482),
        r(45154),
        r(16769),
        r(55531),
        r(30582),
        r(593),
        r(85699),
        r(63136),
        r(96055),
        r(47776),
        r(18033),
        r(6331),
        r(62048),
        r(4292),
        r(75626),
        r(72652),
        r(29641),
        r(30493),
        r(70821),
        r(34229),
        r(37029),
        r(76996),
        r(74071),
        r(51723),
        r(23243),
        r(51669),
        r(6090),
        r(48027),
        r(54174),
        r(82426),
        r(3977),
        r(36741),
        r(34394),
        r(11253),
        r(90319),
        r(38822),
        r(74057),
        r(23761),
        r(63571),
        r(30776),
        r(63130),
        r(25696),
        r(66396),
        r(42775),
        r(95834),
        r(57150),
        r(76726),
        r(20444),
        r(76393),
        r(78548),
        r(2497),
        r(49906),
        r(46527),
        r(48649),
        r(9960),
        r(3101),
        r(5853),
        r(39141),
        r(38742),
        r(48243),
        r(34635),
        r(10401),
        r(49900),
        r(66284),
        r(73173),
        r(88762),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(20543),
        r(70737),
        r(8487),
        r(17817),
        r(90814),
        r(15459),
        r(61847),
        r(16796),
        r(16955),
        r(22401),
        r(77894),
        r(55187),
        r(8586),
        r(44509),
        r(69814),
        r(11305),
        r(62259),
        r(44790),
        r(5909),
        r(60669),
        r(48208),
        r(51589),
        r(48190),
        r(85557),
        r(53785),
        r(95587),
        r(94070),
        r(16218),
        r(9075),
        r(67541),
        r(12158),
        r(74864),
        r(63683),
        r(94479),
        r(45702),
        r(51127),
        r(89241),
        r(91700),
        r(32037),
        r(90811),
        r(93939),
        r(238),
        r(71831),
        r(49500),
        r(82933),
        r(617),
        r(50161),
        r(46495),
        r(54732),
        r(50203),
        r(30439),
        r(6941),
        r(93314),
        r(35197),
        r(27207);
      const k = f.L.getLogger('esri.layers.support.Sublayer');
      let J = 0;
      const U = new Set();
      U.add('layer'),
        U.add('parent'),
        U.add('loaded'),
        U.add('loadStatus'),
        U.add('loadError'),
        U.add('loadWarnings');
      let $ = (i = class extends (0, p.p)((0, b.M)((0, y.I)(h.L))) {
        constructor(e) {
          super(e),
            (this.capabilities = void 0),
            (this.fields = null),
            (this.fullExtent = null),
            (this.globalIdField = null),
            (this.legendEnabled = !0),
            (this.objectIdField = null),
            (this.popupEnabled = !0),
            (this.popupTemplate = null),
            (this.sourceJSON = null),
            (this.title = null),
            (this.typeIdField = null),
            (this.types = null);
        }
        async load(e) {
          return (
            this.addResolvingPromise(
              (async () => {
                var t;
                if (!this.layer && !this.url)
                  throw new u.Z(
                    'sublayer:missing-layer',
                    "Sublayer can't be loaded without being part of a layer",
                    { sublayer: this },
                  );
                let r = null;
                if (
                  !this.layer ||
                  this.originIdOf('url') > 2 ||
                  'data-layer' === (null == (t = this.source) ? void 0 : t.type)
                )
                  r = (
                    await (0, l.default)(this.url, {
                      responseType: 'json',
                      query: { f: 'json' },
                      ...e,
                    })
                  ).data;
                else {
                  var i;
                  let t = this.id;
                  'map-layer' === (null == (i = this.source) ? void 0 : i.type) &&
                    (t = this.source.mapLayerId),
                    (r = await this.layer.fetchSublayerInfo(t, e));
                }
                r &&
                  ((this.sourceJSON = r), this.read({ layerDefinition: r }, { origin: 'service' }));
              })(),
            ),
            this
          );
        }
        readCapabilities(e, t) {
          const r = (e = (t = t.layerDefinition || t).capabilities || e)
            ? e
                .toLowerCase()
                .split(',')
                .map((e) => e.trim())
            : [];
          return {
            exportMap: { supportsModification: !!t.canModifyLayer },
            operations: { supportsQuery: -1 !== r.indexOf('query') },
          };
        }
        set definitionExpression(e) {
          this._setAndNotifyLayer('definitionExpression', e);
        }
        get fieldsIndex() {
          return new T.Z(this.fields || []);
        }
        readGlobalIdFieldFromService(e, t) {
          if ((t = t.layerDefinition || t).globalIdField) return t.globalIdField;
          if (t.fields)
            for (const e of t.fields) if ('esriFieldTypeGlobalID' === e.type) return e.name;
        }
        get id() {
          const e = this._get('id');
          return null == e ? J++ : e;
        }
        set id(e) {
          this._get('id') !== e &&
            (!1 !== this.get('layer.capabilities.exportMap.supportsDynamicLayers')
              ? this._set('id', e)
              : this._logLockedError(
                  'id',
                  "capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'",
                ));
        }
        set labelingInfo(e) {
          this._setAndNotifyLayer('labelingInfo', e);
        }
        writeLabelingInfo(e, t, r, i) {
          e &&
            e.length &&
            (t.layerDefinition = { drawingInfo: { labelingInfo: e.map((e) => e.write({}, i)) } });
        }
        set labelsVisible(e) {
          this._setAndNotifyLayer('labelsVisible', e);
        }
        set layer(e) {
          this._set('layer', e), this.sublayers && this.sublayers.forEach((t) => (t.layer = e));
        }
        set listMode(e) {
          this._set('listMode', e);
        }
        set minScale(e) {
          this._setAndNotifyLayer('minScale', e);
        }
        readMinScale(e, t) {
          return t.minScale || (t.layerDefinition && t.layerDefinition.minScale) || 0;
        }
        set maxScale(e) {
          this._setAndNotifyLayer('maxScale', e);
        }
        readMaxScale(e, t) {
          return t.maxScale || (t.layerDefinition && t.layerDefinition.maxScale) || 0;
        }
        readObjectIdFieldFromService(e, t) {
          if ((t = t.layerDefinition || t).objectIdField) return t.objectIdField;
          if (t.fields) for (const e of t.fields) if ('esriFieldTypeOID' === e.type) return e.name;
        }
        set opacity(e) {
          this._setAndNotifyLayer('opacity', e);
        }
        readOpacity(e, t) {
          const r = t.layerDefinition;
          return 1 - 0.01 * (null != r.transparency ? r.transparency : r.drawingInfo.transparency);
        }
        writeOpacity(e, t, r, i) {
          t.layerDefinition = { drawingInfo: { transparency: 100 - 100 * e } };
        }
        writeParent(e, t) {
          this.parent && this.parent !== this.layer
            ? (t.parentLayerId = (0, C.m)(this.parent.id))
            : (t.parentLayerId = -1);
        }
        get defaultPopupTemplate() {
          return this.createPopupTemplate();
        }
        set renderer(e) {
          if (e)
            for (const t of e.getSymbols())
              if ((0, a.dU)(t)) {
                k.warn('Sublayer renderer should use 2D symbols');
                break;
              }
          this._setAndNotifyLayer('renderer', e);
        }
        get source() {
          return this._get('source') || new F.M({ mapLayerId: this.id });
        }
        set source(e) {
          this._setAndNotifyLayer('source', e);
        }
        set sublayers(e) {
          this._handleSublayersChange(e, this._get('sublayers')), this._set('sublayers', e);
        }
        castSublayers(e) {
          return (0, C.e)(d.Z.ofType(i), e);
        }
        writeSublayers(e, t, r) {
          this.get('sublayers.length') &&
            (t[r] = this.sublayers
              .map((e) => e.id)
              .toArray()
              .reverse());
        }
        readTypeIdField(e, t) {
          let r = (t = t.layerDefinition || t).typeIdField;
          if (r && t.fields) {
            r = r.toLowerCase();
            const e = t.fields.find((e) => e.name.toLowerCase() === r);
            e && (r = e.name);
          }
          return null;
        }
        get url() {
          var e, t;
          const r =
              null != (e = null == (t = this.layer) ? void 0 : t.parsedUrl)
                ? e
                : this._lastParsedUrl,
            i = this.source;
          if (!r) return null;
          if (((this._lastParsedUrl = r), 'map-layer' === (null == i ? void 0 : i.type)))
            return `${r.path}/${i.mapLayerId}`;
          const s = { layer: JSON.stringify({ source: this.source }) };
          return `${r.path}/dynamicLayer?${(0, g.B7)(s)}`;
        }
        set url(e) {
          e ? this._override('url', e) : this._clearOverride('url');
        }
        set visible(e) {
          this._setAndNotifyLayer('visible', e);
        }
        writeVisible(e, t, r, i) {
          t[r] = this.getAtOrigin('defaultVisibility', 'service') || e;
        }
        clone() {
          const { store: e } = (0, v.g)(this),
            t = new i();
          return (
            ((0, v.g)(t).store = e.clone(U)),
            this.commitProperty('url'),
            (t._lastParsedUrl = this._lastParsedUrl),
            t
          );
        }
        createPopupTemplate(e) {
          return (0, D.eZ)(this, e);
        }
        createQuery() {
          return new P.Z({ returnGeometry: !0, where: this.definitionExpression || '1=1' });
        }
        async createFeatureLayer() {
          var e, t;
          if (this.hasOwnProperty('sublayers')) return null;
          const i = null == (e = this.layer) ? void 0 : e.parsedUrl,
            s = new (0,
            (await Promise.all([r.e(8824), r.e(9506), r.e(5709)]).then(r.bind(r, 9506))).default)({
              url: i.path,
            });
          return (
            i &&
              this.source &&
              ('map-layer' === this.source.type
                ? (s.layerId = this.source.mapLayerId)
                : (s.dynamicDataSource = this.source)),
            null != this.layer.refreshInterval && (s.refreshInterval = this.layer.refreshInterval),
            this.definitionExpression && (s.definitionExpression = this.definitionExpression),
            this.originIdOf('labelingInfo') > 2 && (s.labelingInfo = (0, c.d9)(this.labelingInfo)),
            this.originIdOf('labelsVisible') > 0 && (s.labelsVisible = this.labelsVisible),
            this.originIdOf('legendEnabled') > 0 && (s.legendEnabled = this.legendEnabled),
            this.originIdOf('visible') > 0 && (s.visible = this.visible),
            this.originIdOf('minScale') > 0 && (s.minScale = this.minScale),
            this.originIdOf('maxScale') > 0 && (s.maxScale = this.maxScale),
            this.originIdOf('opacity') > 0 && (s.opacity = this.opacity),
            this.originIdOf('popupTemplate') > 0 &&
              (s.popupTemplate = (0, c.d9)(this.popupTemplate)),
            this.originIdOf('renderer') > 2 && (s.renderer = (0, c.d9)(this.renderer)),
            'data-layer' === (null == (t = this.source) ? void 0 : t.type) &&
              (s.dynamicDataSource = this.source.clone()),
            this.originIdOf('title') > 0 && (s.title = this.title),
            'map-image' === this.layer.type &&
              this.layer.originIdOf('customParameters') > 0 &&
              (s.customParameters = this.layer.customParameters),
            'tile' === this.layer.type &&
              this.layer.originIdOf('customParameters') > 0 &&
              (s.customParameters = this.layer.customParameters),
            s
          );
        }
        getFeatureType(e) {
          const { typeIdField: t, types: r } = this;
          if (!t || !e) return null;
          const i = e.attributes ? e.attributes[t] : void 0;
          if (null == i) return null;
          let s = null;
          return (
            r.some((e) => {
              const { id: t } = e;
              return null != t && (t.toString() === i.toString() && (s = e), !!s);
            }),
            s
          );
        }
        getFieldDomain(e, t) {
          const r = t && t.feature,
            i = this.getFeatureType(r);
          if (i) {
            const t = i.domains && i.domains[e];
            if (t && 'inherited' !== t.type) return t;
          }
          return this._getLayerDomain(e);
        }
        async queryFeatures(e = this.createQuery(), t) {
          var i, s, o, n;
          if ((await this.load(), !this.get('capabilities.operations.supportsQuery')))
            throw new u.Z('Sublayer.queryFeatures', "this layer doesn't support queries.");
          const [{ executeQuery: l }, { default: a }] = await Promise.all([
              r
                .e(9214)
                .then(r.bind(r, 49214))
                .then(function (e) {
                  return e.q;
                }),
              r.e(7258).then(r.bind(r, 87258)),
            ]),
            d = await l(
              this.url,
              P.Z.from(e),
              null != (i = null == (s = this.layer) ? void 0 : s.spatialReference) ? i : null,
              {
                ...t,
                query: {
                  ...(null == (o = this.layer) ? void 0 : o.customParameters),
                  token: null == (n = this.layer) ? void 0 : n.apiKey,
                },
              },
            ),
            p = a.fromJSON(d.data);
          if (null != p && p.features) for (const e of p.features) e.sourceLayer = this;
          return p;
        }
        toExportImageJSON() {
          var e;
          const t = {
            id: this.id,
            source: (null == (e = this.source) ? void 0 : e.toJSON()) || {
              mapLayerId: this.id,
              type: 'mapLayer',
            },
          };
          this.definitionExpression && (t.definitionExpression = this.definitionExpression);
          const r = ['renderer', 'labelingInfo', 'opacity', 'labelsVisible'].reduce(
            (e, t) => ((e[t] = this.originIdOf(t)), e),
            {},
          );
          if (Object.keys(r).some((e) => r[e] > 2)) {
            const e = (t.drawingInfo = {});
            r.renderer > 2 && (e.renderer = this.renderer ? this.renderer.toJSON() : null),
              r.labelsVisible > 2 && (e.showLabels = this.labelsVisible),
              this.labelsVisible &&
                r.labelingInfo > 2 &&
                ((e.labelingInfo = this.labelingInfo
                  ? this.labelingInfo.map((e) =>
                      e.write({}, { origin: 'service', layer: this.layer }),
                    )
                  : null),
                (e.showLabels = !0)),
              r.opacity > 2 && (e.transparency = 100 - 100 * this.opacity),
              this._assignDefaultSymbolColors(e.renderer);
          }
          return t;
        }
        _assignDefaultSymbolColors(e) {
          this._forEachSimpleMarkerSymbols(e, (e) => {
            e.color ||
              ('esriSMSX' !== e.style && 'esriSMSCross' !== e.style) ||
              (e.outline && e.outline.color
                ? (e.color = e.outline.color)
                : (e.color = [0, 0, 0, 0]));
          });
        }
        _forEachSimpleMarkerSymbols(e, t) {
          if (e) {
            const r =
              'uniqueValueInfos' in e
                ? e.uniqueValueInfos
                : 'classBreakInfos' in e
                ? e.classBreakInfos
                : [];
            for (const e of r) A(e.symbol) && t(e.symbol);
            'symbol' in e && A(e.symbol) && t(e.symbol),
              'defaultSymbol' in e && A(e.defaultSymbol) && t(e.defaultSymbol);
          }
        }
        _setAndNotifyLayer(e, t) {
          const r = this.layer,
            i = this._get(e);
          let s, o;
          switch (e) {
            case 'definitionExpression':
              s = 'supportsSublayerDefinitionExpression';
            case 'minScale':
            case 'maxScale':
            case 'visible':
              s = 'supportsSublayerVisibility';
              break;
            case 'labelingInfo':
            case 'labelsVisible':
            case 'opacity':
            case 'renderer':
            case 'source':
              (s = 'supportsDynamicLayers'), (o = 'supportsModification');
          }
          const n = (0, v.g)(this).getDefaultOrigin();
          if ('service' !== n) {
            if (s && !1 === this.get(`layer.capabilities.exportMap.${s}`))
              return void this._logLockedError(
                e,
                `capability not available 'layer.capabilities.exportMap.${s}'`,
              );
            if (o && !1 === this.get(`capabilities.exportMap.${o}`))
              return void this._logLockedError(
                e,
                `capability not available 'capabilities.exportMap.${o}'`,
              );
          }
          'source' !== e || 'not-loaded' === this.loadStatus
            ? (this._set(e, t),
              'service' !== n &&
                i !== t &&
                r &&
                r.emit &&
                r.emit('sublayer-update', { propertyName: e, target: this }))
            : this._logLockedError(e, "'source' can't be changed after calling sublayer.load()");
        }
        _handleSublayersChange(e, t) {
          t &&
            (t.forEach((e) => {
              (e.parent = null), (e.layer = null);
            }),
            this.handles.removeAll()),
            e &&
              (e.forEach((e) => {
                (e.parent = this), (e.layer = this.layer);
              }),
              this.handles.add([
                e.on('after-add', ({ item: e }) => {
                  (e.parent = this), (e.layer = this.layer);
                }),
                e.on('after-remove', ({ item: e }) => {
                  (e.parent = null), (e.layer = null);
                }),
                e.on('before-changes', (e) => {
                  const t = this.get('layer.capabilities.exportMap.supportsSublayersChanges');
                  null == t ||
                    t ||
                    (k.error(
                      new u.Z(
                        'sublayer:sublayers-non-modifiable',
                        "Sublayer can't be added, moved, or removed from the layer's sublayers",
                        { sublayer: this, layer: this.layer },
                      ),
                    ),
                    e.preventDefault());
                }),
              ]));
        }
        _logLockedError(e, t) {
          k.error(
            new u.Z(
              'sublayer:locked',
              `Property '${e}' can't be changed on Sublayer from the layer '${this.layer.id}'`,
              { reason: t, sublayer: this, layer: this.layer },
            ),
          );
        }
        _getLayerDomain(e) {
          const t = this.fieldsIndex.get(e);
          return t ? t.domain : null;
        }
      });
      ($.test = {
        isMapImageLayerOverridePolicy: (e) => e === V || e === M,
        isTileImageLayerOverridePolicy: (e) => e === N,
      }),
        (0, s._)([(0, m.Cb)({ readOnly: !0 })], $.prototype, 'capabilities', void 0),
        (0, s._)(
          [
            (0, S.r)('service', 'capabilities', [
              'layerDefinition.canModifyLayer',
              'layerDefinition.capabilities',
            ]),
          ],
          $.prototype,
          'readCapabilities',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: String,
              value: null,
              json: { name: 'layerDefinition.definitionExpression', write: { overridePolicy: M } },
            }),
          ],
          $.prototype,
          'definitionExpression',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: [L.Z],
              json: { origins: { service: { read: { source: 'layerDefinition.fields' } } } },
            }),
          ],
          $.prototype,
          'fields',
          void 0,
        ),
        (0, s._)([(0, m.Cb)({ readOnly: !0 })], $.prototype, 'fieldsIndex', null),
        (0, s._)(
          [(0, m.Cb)({ type: E.Z, json: { read: { source: 'layerDefinition.extent' } } })],
          $.prototype,
          'fullExtent',
          void 0,
        ),
        (0, s._)([(0, m.Cb)({ type: String })], $.prototype, 'globalIdField', void 0),
        (0, s._)(
          [
            (0, S.r)('service', 'globalIdField', [
              'layerDefinition.globalIdField',
              'layerDefinition.fields',
            ]),
          ],
          $.prototype,
          'readGlobalIdFieldFromService',
          null,
        ),
        (0, s._)(
          [(0, m.Cb)({ type: C.I, json: { write: { ignoreOrigin: !0 } } })],
          $.prototype,
          'id',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              value: null,
              type: [j.Z],
              json: {
                read: { source: 'layerDefinition.drawingInfo.labelingInfo' },
                write: { target: 'layerDefinition.drawingInfo.labelingInfo', overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'labelingInfo',
          null,
        ),
        (0, s._)([(0, I.w)('labelingInfo')], $.prototype, 'writeLabelingInfo', null),
        (0, s._)(
          [
            (0, m.Cb)({
              type: Boolean,
              value: !0,
              json: {
                read: { source: 'layerDefinition.drawingInfo.showLabels' },
                write: { target: 'layerDefinition.drawingInfo.showLabels', overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'labelsVisible',
          null,
        ),
        (0, s._)([(0, m.Cb)({ value: null })], $.prototype, 'layer', null),
        (0, s._)(
          [
            (0, m.Cb)({
              type: Boolean,
              value: !0,
              json: {
                origins: { service: { read: { enabled: !1 } } },
                read: { source: 'showLegend' },
                write: { target: 'showLegend', overridePolicy: Z },
              },
            }),
          ],
          $.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: ['show', 'hide', 'hide-children'],
              value: 'show',
              json: { read: !1, write: !1, origins: { 'web-scene': { read: !0, write: !0 } } },
            }),
          ],
          $.prototype,
          'listMode',
          null,
        ),
        (0, s._)(
          [(0, m.Cb)({ type: Number, value: 0, json: { write: { overridePolicy: V } } })],
          $.prototype,
          'minScale',
          null,
        ),
        (0, s._)(
          [(0, S.r)('minScale', ['minScale', 'layerDefinition.minScale'])],
          $.prototype,
          'readMinScale',
          null,
        ),
        (0, s._)(
          [(0, m.Cb)({ type: Number, value: 0, json: { write: { overridePolicy: V } } })],
          $.prototype,
          'maxScale',
          null,
        ),
        (0, s._)(
          [(0, S.r)('maxScale', ['maxScale', 'layerDefinition.maxScale'])],
          $.prototype,
          'readMaxScale',
          null,
        ),
        (0, s._)([(0, m.Cb)({ type: String })], $.prototype, 'objectIdField', void 0),
        (0, s._)(
          [
            (0, S.r)('service', 'objectIdField', [
              'layerDefinition.objectIdField',
              'layerDefinition.fields',
            ]),
          ],
          $.prototype,
          'readObjectIdFieldFromService',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: Number,
              value: 1,
              json: {
                write: { target: 'layerDefinition.drawingInfo.transparency', overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'opacity',
          null,
        ),
        (0, s._)(
          [
            (0, S.r)('opacity', [
              'layerDefinition.drawingInfo.transparency',
              'layerDefinition.transparency',
            ]),
          ],
          $.prototype,
          'readOpacity',
          null,
        ),
        (0, s._)([(0, I.w)('opacity')], $.prototype, 'writeOpacity', null),
        (0, s._)(
          [
            (0, m.Cb)({
              json: {
                type: C.I,
                write: { target: 'parentLayerId', allowNull: !0, overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'parent',
          void 0,
        ),
        (0, s._)([(0, I.w)('parent')], $.prototype, 'writeParent', null),
        (0, s._)(
          [
            (0, m.Cb)({
              type: Boolean,
              value: !0,
              json: {
                read: { source: 'disablePopup', reader: (e, t) => !t.disablePopup },
                write: {
                  target: 'disablePopup',
                  overridePolicy: Z,
                  writer(e, t, r) {
                    t[r] = !e;
                  },
                },
              },
            }),
          ],
          $.prototype,
          'popupEnabled',
          void 0,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: o.Z,
              json: {
                read: { source: 'popupInfo' },
                write: { target: 'popupInfo', overridePolicy: Z },
              },
            }),
          ],
          $.prototype,
          'popupTemplate',
          void 0,
        ),
        (0, s._)([(0, m.Cb)({ readOnly: !0 })], $.prototype, 'defaultPopupTemplate', null),
        (0, s._)(
          [
            (0, m.Cb)({
              types: n.r,
              value: null,
              json: {
                name: 'layerDefinition.drawingInfo.renderer',
                write: { overridePolicy: V },
                origins: {
                  'web-scene': {
                    types: n.w,
                    name: 'layerDefinition.drawingInfo.renderer',
                    write: { overridePolicy: V },
                  },
                },
              },
            }),
          ],
          $.prototype,
          'renderer',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              types: { key: 'type', base: null, typeMap: { 'data-layer': F.D, 'map-layer': F.M } },
              cast(e) {
                if (e) {
                  if ('mapLayerId' in e) return (0, C.k)(F.M, e);
                  if ('dataSource' in e) return (0, C.k)(F.D, e);
                }
                return e;
              },
              json: { name: 'layerDefinition.source', write: { overridePolicy: V } },
            }),
          ],
          $.prototype,
          'source',
          null,
        ),
        (0, s._)([(0, m.Cb)()], $.prototype, 'sourceJSON', void 0),
        (0, s._)(
          [
            (0, m.Cb)({
              value: null,
              json: {
                type: [C.I],
                write: { target: 'subLayerIds', allowNull: !0, overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'sublayers',
          null,
        ),
        (0, s._)([(0, w.p)('sublayers')], $.prototype, 'castSublayers', null),
        (0, s._)([(0, I.w)('sublayers')], $.prototype, 'writeSublayers', null),
        (0, s._)(
          [
            (0, m.Cb)({
              type: String,
              json: {
                read: { source: 'name' },
                write: { target: 'name', allowNull: !0, overridePolicy: Z },
              },
            }),
          ],
          $.prototype,
          'title',
          void 0,
        ),
        (0, s._)([(0, m.Cb)({ type: String })], $.prototype, 'typeIdField', void 0),
        (0, s._)(
          [(0, S.r)('typeIdField', ['layerDefinition.typeIdField'])],
          $.prototype,
          'readTypeIdField',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: [O.Z],
              json: { origins: { service: { read: { source: 'layerDefinition.types' } } } },
            }),
          ],
          $.prototype,
          'types',
          void 0,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: String,
              json: {
                read: { source: 'layerUrl' },
                write: { target: 'layerUrl', overridePolicy: N },
              },
            }),
          ],
          $.prototype,
          'url',
          null,
        ),
        (0, s._)(
          [
            (0, m.Cb)({
              type: Boolean,
              value: !0,
              json: {
                read: { source: 'defaultVisibility' },
                write: { target: 'defaultVisibility', overridePolicy: V },
              },
            }),
          ],
          $.prototype,
          'visible',
          null,
        ),
        (0, s._)([(0, I.w)('visible')], $.prototype, 'writeVisible', null),
        ($ = i = (0, s._)([(0, _.j)('esri.layers.support.Sublayer')], $));
      const q = $;
    },
  },
]);
