(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [2204],
  {
    93314: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => y });
      var s,
        i = r(29768),
        n = r(74673),
        o = r(76506),
        a = r(35197),
        l = r(34250),
        c = (r(91306), r(92143), r(97714)),
        u = r(17533),
        d = r(2906);
      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);
      let h = (s = class extends n.a {
        constructor(e) {
          super(e), (this.end = null), (this.start = null);
        }
        static get allTime() {
          return p;
        }
        static get empty() {
          return g;
        }
        readEnd(e, t) {
          return null != t.end ? new Date(t.end) : null;
        }
        writeEnd(e, t) {
          t.end = e ? e.getTime() : null;
        }
        get isAllTime() {
          return this.equals(s.allTime);
        }
        get isEmpty() {
          return this.equals(s.empty);
        }
        readStart(e, t) {
          return null != t.start ? new Date(t.start) : null;
        }
        writeStart(e, t) {
          t.start = e ? e.getTime() : null;
        }
        clone() {
          return new s({ end: this.end, start: this.start });
        }
        expandTo(e) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const t = (0, o.e)(this.start, (t) => (0, a.t)(t, e)),
            r = (0, o.e)(this.end, (t) => (0, a.o)((0, a.t)(t, e), 1, e));
          return new s({ start: t, end: r });
        }
        intersection(e) {
          if (!e) return this.clone();
          if (this.isEmpty || e.isEmpty) return s.empty;
          if (this.isAllTime) return e.clone();
          if (e.isAllTime) return this.clone();
          const t = (0, o.m)(this.start, -1 / 0, (e) => e.getTime()),
            r = (0, o.m)(this.end, 1 / 0, (e) => e.getTime()),
            i = (0, o.m)(e.start, -1 / 0, (e) => e.getTime()),
            n = (0, o.m)(e.end, 1 / 0, (e) => e.getTime());
          let a, l;
          if (
            (i >= t && i <= r ? (a = i) : t >= i && t <= n && (a = t),
            r >= i && r <= n ? (l = r) : n >= t && n <= r && (l = n),
            !isNaN(a) && !isNaN(l))
          ) {
            const e = new s();
            return (
              (e.start = a === -1 / 0 ? null : new Date(a)),
              (e.end = l === 1 / 0 ? null : new Date(l)),
              e
            );
          }
          return s.empty;
        }
        offset(e, t) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const r = new s(),
            { start: i, end: n } = this;
          return (
            (0, o.i)(i) && (r.start = (0, a.o)(i, e, t)),
            (0, o.i)(n) && (r.end = (0, a.o)(n, e, t)),
            r
          );
        }
        equals(e) {
          if (!e) return !1;
          const t = (0, o.i)(this.start) ? this.start.getTime() : this.start,
            r = (0, o.i)(this.end) ? this.end.getTime() : this.end,
            s = (0, o.i)(e.start) ? e.start.getTime() : e.start,
            i = (0, o.i)(e.end) ? e.end.getTime() : e.end;
          return t === s && r === i;
        }
        union(e) {
          if (!e || e.isEmpty) return this.clone();
          if (this.isEmpty) return e.clone();
          if (this.isAllTime || e.isAllTime) return p.clone();
          const t =
              (0, o.i)(this.start) && (0, o.i)(e.start)
                ? new Date(Math.min(this.start.getTime(), e.start.getTime()))
                : null,
            r =
              (0, o.i)(this.end) && (0, o.i)(e.end)
                ? new Date(Math.max(this.end.getTime(), e.end.getTime()))
                : null;
          return new s({ start: t, end: r });
        }
      });
      (0, i._)(
        [(0, l.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
        h.prototype,
        'end',
        void 0,
      ),
        (0, i._)([(0, c.r)('end')], h.prototype, 'readEnd', null),
        (0, i._)([(0, d.w)('end')], h.prototype, 'writeEnd', null),
        (0, i._)([(0, l.Cb)({ readOnly: !0, json: { read: !1 } })], h.prototype, 'isAllTime', null),
        (0, i._)([(0, l.Cb)({ readOnly: !0, json: { read: !1 } })], h.prototype, 'isEmpty', null),
        (0, i._)(
          [(0, l.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
          h.prototype,
          'start',
          void 0,
        ),
        (0, i._)([(0, c.r)('start')], h.prototype, 'readStart', null),
        (0, i._)([(0, d.w)('start')], h.prototype, 'writeStart', null),
        (h = s = (0, i._)([(0, u.j)('esri.TimeExtent')], h));
      const p = new h(),
        g = new h({ start: void 0, end: void 0 }),
        y = h;
    },
    66655: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => u });
      var s = r(29768),
        i = (r(74569), r(34250)),
        n = (r(76506), r(91306), r(92143), r(97714)),
        o = r(17533),
        a = r(47706),
        l = r(9411),
        c = r(60947);
      const u = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments),
              (this.copyright = null),
              (this.minScale = 0),
              (this.maxScale = 0),
              (this.spatialReference = null),
              (this.tileInfo = null),
              (this.tilemapCache = null);
          }
          readMinScale(e, t) {
            return null != t.minLOD && null != t.maxLOD ? e : 0;
          }
          readMaxScale(e, t) {
            return null != t.minLOD && null != t.maxLOD ? e : 0;
          }
          get supportsBlankTile() {
            return this.version >= 10.2;
          }
          readTilemapCache(e, t) {
            return t.capabilities && t.capabilities.indexOf('Tilemap') > -1
              ? new l.T({ layer: this })
              : null;
          }
        };
        return (
          (0, s._)(
            [(0, i.Cb)({ json: { read: { source: 'copyrightText' } } })],
            t.prototype,
            'copyright',
            void 0,
          ),
          (0, s._)([(0, i.Cb)()], t.prototype, 'minScale', void 0),
          (0, s._)([(0, n.r)('service', 'minScale')], t.prototype, 'readMinScale', null),
          (0, s._)([(0, i.Cb)()], t.prototype, 'maxScale', void 0),
          (0, s._)([(0, n.r)('service', 'maxScale')], t.prototype, 'readMaxScale', null),
          (0, s._)([(0, i.Cb)({ type: c.Z })], t.prototype, 'spatialReference', void 0),
          (0, s._)([(0, i.Cb)({ readOnly: !0 })], t.prototype, 'supportsBlankTile', null),
          (0, s._)([(0, i.Cb)(a.s)], t.prototype, 'tileInfo', void 0),
          (0, s._)([(0, i.Cb)()], t.prototype, 'tilemapCache', void 0),
          (0, s._)(
            [(0, n.r)('service', 'tilemapCache', ['capabilities'])],
            t.prototype,
            'readTilemapCache',
            null,
          ),
          (0, s._)([(0, i.Cb)()], t.prototype, 'version', void 0),
          (t = (0, s._)([(0, o.j)('esri.layers.mixins.ArcGISCachedService')], t)),
          t
        );
      };
    },
    75025: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => c });
      var s = r(29768),
        i = r(92143),
        n = r(76506),
        o = r(34250),
        a = (r(91306), r(17533)),
        l = r(21132);
      const c = (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, l.p)(this.url);
              if ((0, n.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, l.s)(e, i.L.getLogger(this.declaredClass)));
          }
        };
        return (
          (0, s._)([(0, o.Cb)()], t.prototype, 'title', null),
          (0, s._)([(0, o.Cb)({ type: String })], t.prototype, 'url', null),
          (t = (0, s._)([(0, a.j)('esri.layers.mixins.ArcGISService')], t)),
          t
        );
      };
    },
    47842: (e, t, r) => {
      'use strict';
      r.d(t, { E: () => b });
      var s,
        i = r(29768),
        n = r(57251),
        o = r(74673),
        a = r(76506),
        l = r(34250),
        c = (r(91306), r(92143), r(97714)),
        u = r(17533),
        d = r(2906),
        h = r(14249),
        p = r(17298);
      let g = (s = class extends o.a {
        async collectRequiredFields(e, t) {
          return (0, h.io)(e, t, this.expression);
        }
        clone() {
          return new s({ expression: this.expression, title: this.title });
        }
      });
      (0, i._)(
        [(0, l.Cb)({ type: String, json: { write: !0 } })],
        g.prototype,
        'expression',
        void 0,
      ),
        (0, i._)([(0, l.Cb)({ type: String, json: { write: !0 } })], g.prototype, 'title', void 0),
        (g = s = (0, i._)([(0, u.j)('esri.layers.support.FeatureExpressionInfo')], g));
      var y,
        m = g;
      const f = (0, n.s)()({
          onTheGround: 'on-the-ground',
          relativeToGround: 'relative-to-ground',
          relativeToScene: 'relative-to-scene',
          absoluteHeight: 'absolute-height',
        }),
        v = new n.J({
          foot: 'feet',
          kilometer: 'kilometers',
          meter: 'meters',
          mile: 'miles',
          'us-foot': 'us-feet',
          yard: 'yards',
        });
      let w = (y = class extends o.a {
        constructor() {
          super(...arguments), (this.offset = null);
        }
        readFeatureExpressionInfo(e, t) {
          return null != e
            ? e
            : t.featureExpression && 0 === t.featureExpression.value
            ? { expression: '0' }
            : void 0;
        }
        writeFeatureExpressionInfo(e, t, r, s) {
          (t[r] = e.write(null, s)), '0' === e.expression && (t.featureExpression = { value: 0 });
        }
        get mode() {
          const { offset: e, featureExpressionInfo: t } = this;
          return this._isOverridden('mode')
            ? this._get('mode')
            : (0, a.i)(e) || t
            ? 'relative-to-ground'
            : 'on-the-ground';
        }
        set mode(e) {
          this._override('mode', e);
        }
        set unit(e) {
          this._set('unit', e);
        }
        write(e, t) {
          return this.offset || this.mode || this.featureExpressionInfo || this.unit
            ? super.write(e, t)
            : null;
        }
        clone() {
          return new y({
            mode: this.mode,
            offset: this.offset,
            featureExpressionInfo: this.featureExpressionInfo
              ? this.featureExpressionInfo.clone()
              : void 0,
            unit: this.unit,
          });
        }
      });
      (0, i._)(
        [(0, l.Cb)({ type: m, json: { write: !0 } })],
        w.prototype,
        'featureExpressionInfo',
        void 0,
      ),
        (0, i._)(
          [(0, c.r)('featureExpressionInfo', ['featureExpressionInfo', 'featureExpression'])],
          w.prototype,
          'readFeatureExpressionInfo',
          null,
        ),
        (0, i._)(
          [
            (0, d.w)('featureExpressionInfo', {
              featureExpressionInfo: { type: m },
              'featureExpression.value': { type: [0] },
            }),
          ],
          w.prototype,
          'writeFeatureExpressionInfo',
          null,
        ),
        (0, i._)(
          [
            (0, l.Cb)({
              type: f.apiValues,
              nonNullable: !0,
              json: {
                type: f.jsonValues,
                read: f.read,
                write: { writer: f.write, isRequired: !0 },
              },
            }),
          ],
          w.prototype,
          'mode',
          null,
        ),
        (0, i._)([(0, l.Cb)({ type: Number, json: { write: !0 } })], w.prototype, 'offset', void 0),
        (0, i._)(
          [(0, l.Cb)({ type: p.s, json: { type: String, read: v.read, write: v.write } })],
          w.prototype,
          'unit',
          null,
        ),
        (w = y = (0, i._)([(0, u.j)('esri.layers.support.ElevationInfo')], w));
      var b = w;
    },
    82673: (e, t, r) => {
      'use strict';
      r.d(t, { I: () => o });
      var s = r(29768),
        i = r(17533);
      let n = 0;
      const o = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e),
              Object.defineProperty(this, 'uid', {
                writable: !1,
                configurable: !1,
                value: Date.now().toString(16) + '-object-' + n++,
              });
          }
        };
        return (t = (0, s._)([(0, i.j)('esri.core.Identifiable')], t)), t;
      };
      let a = class extends o(class {}) {};
      a = (0, s._)([(0, i.j)('esri.core.Identifiable')], a);
    },
    89241: (e, t, r) => {
      'use strict';
      r.d(t, { L: () => i });
      var s = r(91700);
      class i {
        constructor(e, t) {
          (this._storage = new s.M()),
            (this._storage.maxSize = e),
            t && this._storage.registerRemoveFunc('', t);
        }
        put(e, t, r) {
          this._storage.put(e, t, r, 1);
        }
        pop(e) {
          return this._storage.pop(e);
        }
        get(e) {
          return this._storage.get(e);
        }
        clear() {
          this._storage.clearAll();
        }
        destroy() {
          this._storage.destroy();
        }
        get maxSize() {
          return this._storage.maxSize;
        }
        set maxSize(e) {
          this._storage.maxSize = e;
        }
      }
    },
    54179: (e, t, r) => {
      'use strict';
      r.d(t, { M: () => d, a: () => h });
      var s = r(29768),
        i = r(21972),
        n = r(50161),
        o = r(86656),
        a = r(26341),
        l = r(17533);
      const c = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e);
          }
          clear(e, t = 'user') {
            return u(this).delete(e, (0, i.n)(t));
          }
          write(e = {}, t) {
            return (0, a.w)(this, (e = e || {}), t), e;
          }
          setAtOrigin(e, t, r) {
            (0, o.g)(this).setAtOrigin(e, t, (0, i.n)(r));
          }
          removeOrigin(e) {
            const t = u(this),
              r = (0, i.n)(e),
              s = t.keys(r);
            for (const e of s) t.originOf(e) === r && t.set(e, t.get(e, r), 6);
          }
          updateOrigin(e, t) {
            const r = u(this),
              s = (0, i.n)(t),
              n = this.get(e);
            for (let t = s + 1; t < i.b; ++t) r.delete(e, t);
            r.set(e, n, s);
          }
          toJSON(e) {
            return this.write({}, e);
          }
        };
        return (
          (t = (0, s._)([(0, l.j)('esri.core.WriteableMultiOriginJSONSupport')], t)),
          (t.prototype.toJSON.isDefaultToJSON = !0),
          t
        );
      };
      function u(e) {
        return (0, o.g)(e).store;
      }
      const d = (e) => {
        let t = class extends c((0, n.R)(e)) {
          constructor(...e) {
            super(...e);
          }
        };
        return (t = (0, s._)([(0, l.j)('esri.core.MultiOriginJSONSupport')], t)), t;
      };
      let h = class extends d(i.Z) {};
      h = (0, s._)([(0, l.j)('esri.core.MultiOriginJSONSupport')], h);
    },
    89440: (e, t, r) => {
      'use strict';
      r.d(t, { O: () => d });
      var s = r(29768),
        i = r(60991),
        n = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533)),
        a = r(2906),
        l = r(26341),
        c = r(43022);
      const u = {
          'web-scene/operational-layers': {
            ArcGISFeatureLayer: !0,
            ArcGISImageServiceLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISSceneServiceLayer: !0,
            ArcGISTiledElevationServiceLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            BuildingSceneLayer: !0,
            GroupLayer: !0,
            IntegratedMeshLayer: !0,
            PointCloudLayer: !0,
            WebTiledLayer: !0,
            CSV: !0,
            VectorTileLayer: !0,
            WMS: !0,
            KML: !0,
            RasterDataLayer: !0,
          },
          'web-scene/basemap': {
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            WebTiledLayer: !0,
            OpenStreetMap: !0,
            VectorTileLayer: !0,
            ArcGISImageServiceLayer: !0,
            WMS: !0,
            ArcGISMapServiceLayer: !0,
          },
          'web-scene/ground': {
            ArcGISTiledElevationServiceLayer: !0,
            RasterDataElevationLayer: !0,
          },
          'web-map/operational-layers': {
            ArcGISFeatureLayer: !0,
            ArcGISImageServiceLayer: !0,
            ArcGISImageServiceVectorLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISStreamLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            BingMapsAerial: !0,
            BingMapsHybrid: !0,
            BingMapsRoad: !0,
            CSV: !0,
            GeoRSS: !0,
            GroupLayer: !0,
            KML: !0,
            OGCFeatureLayer: !0,
            SubtypeGroupLayer: !0,
            VectorTileLayer: !0,
            WFS: !0,
            WMS: !0,
            WebTiledLayer: !0,
          },
          'web-map/basemap': {
            ArcGISImageServiceLayer: !0,
            ArcGISImageServiceVectorLayer: !0,
            ArcGISMapServiceLayer: !0,
            ArcGISTiledImageServiceLayer: !0,
            ArcGISTiledMapServiceLayer: !0,
            OpenStreetMap: !0,
            VectorTileLayer: !0,
            WMS: !0,
            WebTiledLayer: !0,
            BingMapsAerial: !0,
            BingMapsRoad: !0,
            BingMapsHybrid: !0,
          },
          'web-map/tables': { ArcGISFeatureLayer: !0 },
          'portal-item/operational-layers': {
            ArcGISSceneServiceLayer: !0,
            PointCloudLayer: !0,
            BuildingSceneLayer: !0,
            IntegratedMeshLayer: !0,
          },
        },
        d = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments), (this.title = null);
            }
            writeListMode(e, t, r, s) {
              ((s && 'ground' === s.layerContainerType) || (e && (0, l.b)(this, r, {}, s))) &&
                (t[r] = e);
            }
            writeOperationalLayerType(e, t, r, s) {
              !e || (s && 'tables' === s.layerContainerType) || (t.layerType = e);
            }
            writeTitle(e, t) {
              t.title = e || 'Layer';
            }
            read(e, t) {
              t && (t.layer = this), (0, l.a)(this, e, (t) => super.read(e, t), t);
            }
            write(e, t) {
              if (t && t.origin) {
                const e = `${t.origin}/${t.layerContainerType || 'operational-layers'}`,
                  r = u[e];
                let s = r && r[this.operationalLayerType];
                if (
                  ('ArcGISTiledElevationServiceLayer' === this.operationalLayerType &&
                    'web-scene/operational-layers' === e &&
                    (s = !1),
                  !s)
                )
                  return (
                    t.messages &&
                      t.messages.push(
                        new i.Z(
                          'layer:unsupported',
                          `Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,
                          { layer: this },
                        ),
                      ),
                    null
                  );
              }
              const r = super.write(e, { ...t, layer: this }),
                s =
                  !!t &&
                  !!t.messages &&
                  !!t.messages.filter(
                    (e) => e instanceof i.Z && 'web-document-write:property-required' === e.name,
                  ).length;
              return !this.url && s ? null : r;
            }
            beforeSave() {}
          };
          return (
            (0, s._)(
              [
                (0, n.Cb)({
                  type: String,
                  json: {
                    write: { ignoreOrigin: !0 },
                    origins: {
                      'web-scene': { write: { isRequired: !0, ignoreOrigin: !0 } },
                      'portal-item': { write: !1 },
                    },
                  },
                }),
              ],
              t.prototype,
              'id',
              void 0,
            ),
            (0, s._)(
              [
                (0, n.Cb)({
                  json: {
                    write: { ignoreOrigin: !0 },
                    origins: { 'web-map': { read: !1, write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'listMode',
              void 0,
            ),
            (0, s._)([(0, a.w)('listMode')], t.prototype, 'writeListMode', null),
            (0, s._)(
              [
                (0, n.Cb)({
                  type: String,
                  readOnly: !0,
                  json: {
                    read: !1,
                    write: { target: 'layerType', ignoreOrigin: !0 },
                    origins: { 'portal-item': { write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'operationalLayerType',
              void 0,
            ),
            (0, s._)(
              [(0, a.w)('operationalLayerType')],
              t.prototype,
              'writeOperationalLayerType',
              null,
            ),
            (0, s._)([(0, n.Cb)(c.o)], t.prototype, 'opacity', void 0),
            (0, s._)(
              [
                (0, n.Cb)({
                  type: String,
                  json: {
                    write: { ignoreOrigin: !0, allowNull: !0 },
                    origins: {
                      'web-scene': { write: { isRequired: !0, ignoreOrigin: !0, allowNull: !0 } },
                      'portal-item': { write: !1 },
                    },
                  },
                  value: 'Layer',
                }),
              ],
              t.prototype,
              'title',
              void 0,
            ),
            (0, s._)([(0, a.w)('title')], t.prototype, 'writeTitle', null),
            (0, s._)(
              [
                (0, n.Cb)({
                  type: Boolean,
                  json: {
                    name: 'visibility',
                    origins: {
                      'web-document': { name: 'visibility', default: !0 },
                      'portal-item': {
                        name: 'visibility',
                        read: { source: ['visible', 'visibility'] },
                      },
                    },
                  },
                }),
              ],
              t.prototype,
              'visible',
              void 0,
            ),
            (t = (0, s._)([(0, o.j)('esri.layers.mixins.OperationalLayer')], t)),
            t
          );
        };
    },
    62162: (e, t, r) => {
      'use strict';
      r.d(t, { P: () => b });
      var s = r(29768),
        i = r(88762),
        n = r(82058),
        o = r(41864),
        a = r(60991),
        l = r(92143),
        c = r(76506),
        u = r(50406),
        d = r(32101),
        h = r(34250),
        p = (r(91306), r(97714)),
        g = r(17533),
        y = r(2906),
        m = r(49900),
        f = r(56420),
        v = r(74653);
      const w = l.L.getLogger('esri.layers.mixins.PortalLayer'),
        b = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments),
                (this.resourceReferences = { portalItem: null, paths: [] }),
                (this.userHasEditingPrivileges = !0);
            }
            destroy() {
              var e;
              null == (e = this.portalItem) || e.destroy(), (this.portalItem = null);
            }
            set portalItem(e) {
              e !== this._get('portalItem') &&
                (this.removeOrigin('portal-item'), this._set('portalItem', e));
            }
            readPortalItem(e, t, r) {
              if (t.itemId) return new f.default({ id: t.itemId, portal: r && r.portal });
            }
            writePortalItem(e, t) {
              e && e.id && (t.itemId = e.id);
            }
            async loadFromPortal(e, t) {
              if (this.portalItem && this.portalItem.id)
                try {
                  const s = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (e) {
                      return e.l;
                    });
                  return (
                    (0, u.k_)(t),
                    await s.load(
                      {
                        instance: this,
                        supportedTypes: e.supportedTypes,
                        validateItem: e.validateItem,
                        supportsData: e.supportsData,
                      },
                      t,
                    )
                  );
                } catch (e) {
                  throw (
                    ((0, u.D_)(e) ||
                      w.warn(
                        `Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${e}`,
                      ),
                    e)
                  );
                }
            }
            async finishLoadEditablePortalLayer(e) {
              this._set(
                'userHasEditingPrivileges',
                await this.fetchUserHasEditingPrivileges(e).catch((e) => ((0, u.r9)(e), !0)),
              );
            }
            async fetchUserHasEditingPrivileges(e) {
              const t = this.url ? (null == i.id ? void 0 : i.id.findCredential(this.url)) : null;
              if (!t) return !0;
              const r = _.credential === t ? _.user : await this.fetchEditingUser(e);
              return (
                (_.credential = t),
                (_.user = r),
                (0, c.b)(r) || null == r.privileges || r.privileges.includes('features:user:edit')
              );
            }
            async fetchEditingUser(e) {
              var t, r;
              const s = null == (t = this.portalItem) || null == (r = t.portal) ? void 0 : r.user;
              if (s) return s;
              const a = i.id.findServerInfo(this.url);
              if (null == a || !a.owningSystemUrl) return null;
              const l = `${a.owningSystemUrl}/sharing/rest`,
                u = m.Z.getDefault();
              if (u && u.loaded && (0, d.Fv)(u.restUrl) === (0, d.Fv)(l)) return u.user;
              const h = `${l}/community/self`,
                p = (0, c.i)(e) ? e.signal : null,
                g = await (0, o.r)(
                  (0, n.default)(h, { authMode: 'no-prompt', query: { f: 'json' }, signal: p }),
                );
              return g.ok ? v.default.fromJSON(g.value.data) : null;
            }
            read(e, t) {
              t && (t.layer = this), super.read(e, t);
            }
            write(e, t) {
              const r = t && t.portal,
                s =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || m.Z.getDefault());
              return r && s && !(0, d.tm)(s.restUrl, r.restUrl)
                ? (t.messages &&
                    t.messages.push(
                      new a.Z(
                        'layer:cross-portal',
                        `The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,
                        { layer: this },
                      ),
                    ),
                  null)
                : super.write(e, { ...t, layer: this });
            }
          };
          return (
            (0, s._)([(0, h.Cb)({ type: f.default })], t.prototype, 'portalItem', null),
            (0, s._)(
              [(0, p.r)('web-document', 'portalItem', ['itemId'])],
              t.prototype,
              'readPortalItem',
              null,
            ),
            (0, s._)(
              [(0, y.w)('web-document', 'portalItem', { itemId: { type: String } })],
              t.prototype,
              'writePortalItem',
              null,
            ),
            (0, s._)([(0, h.Cb)()], t.prototype, 'resourceReferences', void 0),
            (0, s._)(
              [(0, h.Cb)({ readOnly: !0 })],
              t.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (t = (0, s._)([(0, g.j)('esri.layers.mixins.PortalLayer')], t)),
            t
          );
        },
        _ = { credential: null, user: null };
    },
    50161: (e, t, r) => {
      'use strict';
      r.d(t, { R: () => u });
      var s = r(29768),
        i = r(21972),
        n = r(76506),
        o = r(26341),
        a = r(86656),
        l = r(17533);
      class c {
        constructor() {
          (this._propertyOriginMap = new Map()),
            (this._originStores = new Array(i.b)),
            (this._values = new Map());
        }
        clone(e) {
          const t = new c(),
            r = this._originStores[0];
          r &&
            r.forEach((e, r) => {
              t.set(r, (0, n.d9)(e), 0);
            });
          for (let r = 2; r < i.b; r++) {
            const s = this._originStores[r];
            s &&
              s.forEach((s, i) => {
                (e && e.has(i)) || t.set(i, (0, n.d9)(s), r);
              });
          }
          return t;
        }
        get(e, t) {
          const r = void 0 === t ? this._values : this._originStores[t];
          return r ? r.get(e) : void 0;
        }
        keys(e) {
          const t = null == e ? this._values : this._originStores[e];
          return t ? [...t.keys()] : [];
        }
        set(e, t, r = 6) {
          let s = this._originStores[r];
          if (
            (s || ((s = new Map()), (this._originStores[r] = s)),
            s.set(e, t),
            !this._values.has(e) || (0, n.a)(this._propertyOriginMap.get(e)) <= r)
          ) {
            const s = this._values.get(e);
            return this._values.set(e, t), this._propertyOriginMap.set(e, r), s !== t;
          }
          return !1;
        }
        delete(e, t = 6) {
          const r = this._originStores[t];
          if (!r) return;
          const s = r.get(e);
          if ((r.delete(e), this._values.has(e) && this._propertyOriginMap.get(e) === t)) {
            this._values.delete(e);
            for (let r = t - 1; r >= 0; r--) {
              const t = this._originStores[r];
              if (t && t.has(e)) {
                this._values.set(e, t.get(e)), this._propertyOriginMap.set(e, r);
                break;
              }
            }
          }
          return s;
        }
        has(e, t) {
          const r = void 0 === t ? this._values : this._originStores[t];
          return !!r && r.has(e);
        }
        revert(e, t) {
          for (; t > 0 && !this.has(e, t); ) --t;
          const r = this._originStores[t],
            s = r && r.get(e),
            i = this._values.get(e);
          return this._values.set(e, s), this._propertyOriginMap.set(e, t), i !== s;
        }
        originOf(e) {
          return this._propertyOriginMap.get(e) || 0;
        }
        forEach(e) {
          this._values.forEach(e);
        }
      }
      const u = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e);
            const t = (0, n.a)((0, a.g)(this)),
              r = t.metadatas,
              s = t.store,
              i = new c();
            (t.store = i),
              s.keys().forEach((e) => {
                i.set(e, s.get(e), 0);
              }),
              Object.keys(r).forEach((e) => {
                t.internalGet(e) && i.set(e, t.internalGet(e), 0);
              });
          }
          read(e, t) {
            (0, o.r)(this, e, t);
          }
          getAtOrigin(e, t) {
            const r = d(this),
              s = (0, i.n)(t);
            if ('string' == typeof e) return r.get(e, s);
            const n = {};
            return (
              e.forEach((e) => {
                n[e] = r.get(e, s);
              }),
              n
            );
          }
          originOf(e) {
            return (0, i.c)(this.originIdOf(e));
          }
          originIdOf(e) {
            return d(this).originOf(e);
          }
          revert(e, t) {
            const r = d(this),
              s = (0, i.n)(t),
              n = (0, a.g)(this);
            let o;
            (o = 'string' == typeof e ? ('*' === e ? r.keys(s) : [e]) : e),
              o.forEach((e) => {
                n.invalidate(e), r.revert(e, s), n.commit(e);
              });
          }
        };
        return (t = (0, s._)([(0, l.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], t)), t;
      };
      function d(e) {
        return (0, a.g)(e).store;
      }
      let h = class extends u(i.Z) {};
      h = (0, s._)([(0, l.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], h);
    },
    43022: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => f,
        b: () => p,
        c: () => S,
        d: () => c,
        e: () => g,
        f: () => v,
        i: () => b,
        l: () => d,
        m: () => _,
        o: () => m,
        p: () => u,
        r: () => y,
        s: () => w,
        u: () => h,
      });
      var s = r(93314),
        i = r(21801),
        n = r(60947),
        o = r(38742),
        a = r(47842),
        l = r(34394);
      const c = {
          type: Boolean,
          value: !0,
          json: {
            origins: { service: { read: !1, write: !1 }, 'web-map': { read: !1, write: !1 } },
            name: 'screenSizePerspective',
            write: !0,
          },
        },
        u = {
          type: Boolean,
          value: !0,
          json: {
            name: 'disablePopup',
            read: { reader: (e, t) => !t.disablePopup },
            write: {
              enabled: !0,
              writer(e, t, r) {
                t[r] = !e;
              },
            },
          },
        },
        d = { type: Boolean, value: !0, json: { name: 'showLabels', write: !0 } },
        h = {
          type: String,
          json: {
            origins: { 'portal-item': { write: !1 } },
            write: { isRequired: !0, ignoreOrigin: !0, writer: o.w },
          },
        },
        p = {
          type: Boolean,
          value: !0,
          json: { origins: { service: { read: { enabled: !1 } } }, name: 'showLegend', write: !0 },
        },
        g = {
          value: null,
          type: a.E,
          json: {
            origins: { service: { name: 'elevationInfo', write: !0 } },
            name: 'layerDefinition.elevationInfo',
            write: !0,
          },
        };
      function y(e) {
        return { type: e, readOnly: !0, json: { origins: { service: { read: !0 } }, read: !1 } };
      }
      const m = {
          type: Number,
          json: {
            origins: {
              'web-document': { default: 1, write: !0, read: !0 },
              'portal-item': { write: !0 },
            },
          },
        },
        f = {
          ...m,
          json: {
            ...m.json,
            origins: {
              'web-document': {
                ...m.json.origins['web-document'],
                write: {
                  enabled: !0,
                  target: {
                    opacity: { type: Number },
                    'layerDefinition.drawingInfo.transparency': { type: Number },
                  },
                },
              },
            },
            read: {
              source: ['layerDefinition.drawingInfo.transparency', 'drawingInfo.transparency'],
              reader: (e, t, r) =>
                (r && 'service' !== r.origin) ||
                !t.drawingInfo ||
                void 0 === t.drawingInfo.transparency
                  ? t.layerDefinition &&
                    t.layerDefinition.drawingInfo &&
                    void 0 !== t.layerDefinition.drawingInfo.transparency
                    ? (0, l.t)(t.layerDefinition.drawingInfo.transparency)
                    : void 0
                  : (0, l.t)(t.drawingInfo.transparency),
            },
          },
        },
        v = {
          type: s.Z,
          readOnly: !0,
          get() {
            var e, t;
            if (null == (e = this.layer) || !e.timeInfo) return null;
            const r = null == (t = this.view) ? void 0 : t.timeExtent,
              s = this.layer.timeExtent,
              i = this.layer.useViewTime ? (r && s ? r.intersection(s) : r || s) : s;
            if (!i || i.isEmpty) return i;
            const n = this.layer.timeOffset,
              o = n ? i.offset(-n.value, n.unit) : i,
              a = this._get('timeExtent');
            return o.equals(a) ? a : o;
          },
        },
        w = {
          type: i.Z,
          readOnly: !0,
          json: {
            origins: {
              service: {
                read: {
                  source: ['fullExtent', 'spatialReference'],
                  reader: (e, t) => {
                    const r = i.Z.fromJSON(e);
                    return (
                      null != t.spatialReference &&
                        'object' == typeof t.spatialReference &&
                        (r.spatialReference = n.Z.fromJSON(t.spatialReference)),
                      r
                    );
                  },
                },
              },
            },
            read: !1,
          },
        },
        b = {
          type: String,
          json: { origins: { service: { read: !1 }, 'portal-item': { read: !1 } } },
        },
        _ = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.minScale' },
            write: { target: 'layerDefinition.minScale' },
          },
        },
        S = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.maxScale' },
            write: { target: 'layerDefinition.maxScale' },
          },
        };
    },
    34394: (e, t, r) => {
      'use strict';
      r.d(t, { o: () => i, t: () => n });
      var s = r(91306);
      function i(e) {
        const t = (0, s.m)(100 * (1 - e));
        return Math.max(0, Math.min(t, 100));
      }
      function n(e) {
        const t = 1 - e / 100;
        return Math.max(0, Math.min(t, 1));
      }
    },
    38742: (e, t, r) => {
      'use strict';
      r.d(t, { f: () => n, i: () => d, p: () => p, r: () => a, t: () => o, w: () => l });
      var s = r(76506),
        i = r(32101);
      function n(e, t) {
        const r = t && t.url && t.url.path;
        if (
          e &&
          r &&
          ((e = (0, i.hF)(e, r, { preserveProtocolRelative: !0 })),
          t.portalItem && t.readResourcePaths)
        ) {
          const r = (0, i.PF)(e, t.portalItem.itemUrl);
          u.test(r) && t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path);
        }
        return h(e, t && t.portal);
      }
      function o(e, t, r = 0) {
        if (!e) return e;
        !(0, i.YP)(e) && t && t.blockedRelativeUrls && t.blockedRelativeUrls.push(e);
        let s = (0, i.hF)(e);
        if (t) {
          const r =
            (t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.rootPath) ||
            (t.url && t.url.path);
          if (r) {
            const n = h(r, t.portal);
            (s = (0, i.PF)(h(s, t.portal), n, n)),
              s !== e && t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.writtenUrls.push(s);
          }
        }
        return (
          (s = (function (e, t) {
            return t && !t.isPortal && t.urlKey && t.customBaseUrl
              ? (0, i.Ie)(e, `${t.urlKey}.${t.customBaseUrl}`, t.portalHostname)
              : e;
          })(s, t && t.portal)),
          (0, i.YP)(s) && (s = (0, i.Fv)(s)),
          null != t &&
            t.resources &&
            null != t &&
            t.portalItem &&
            !(0, i.YP)(s) &&
            !(0, i.HK)(s) &&
            0 === r &&
            t.resources.toKeep.push({ resource: t.portalItem.resourceFromPath(s) }),
          s
        );
      }
      function a(e, t, r) {
        return n(e, r);
      }
      function l(e, t, r, s) {
        const i = o(e, s);
        void 0 !== i && (t[r] = i);
      }
      const c = /\/items\/([^\/]+)\/resources\//,
        u = /^\.\/resources\//;
      function d(e) {
        const t = (0, s.i)(e) ? e.match(c) : null;
        return (0, s.i)(t) ? t[1] : null;
      }
      function h(e, t) {
        if (!t || t.isPortal || !t.urlKey || !t.customBaseUrl) return e;
        const r = `${t.urlKey}.${t.customBaseUrl}`;
        return (0, i.D6)(i.Gd, `${i.Gd.scheme}://${r}`)
          ? (0, i.Ie)(e, t.portalHostname, r)
          : (0, i.Ie)(e, r, t.portalHostname);
      }
      var p = Object.freeze({
        __proto__: null,
        fromJSON: n,
        toJSON: o,
        read: a,
        write: l,
        itemIdFromResourceUrl: d,
      });
    },
    35197: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => a, o: () => n, t: () => o }), r(76506);
      const s = {
          milliseconds: 1,
          seconds: 1e3,
          minutes: 6e4,
          hours: 36e5,
          days: 864e5,
          weeks: 6048e5,
          months: 26784e5,
          years: 31536e6,
          decades: 31536e7,
          centuries: 31536e8,
        },
        i = {
          milliseconds: { getter: 'getMilliseconds', setter: 'setMilliseconds', multiplier: 1 },
          seconds: { getter: 'getSeconds', setter: 'setSeconds', multiplier: 1 },
          minutes: { getter: 'getMinutes', setter: 'setMinutes', multiplier: 1 },
          hours: { getter: 'getHours', setter: 'setHours', multiplier: 1 },
          days: { getter: 'getDate', setter: 'setDate', multiplier: 1 },
          weeks: { getter: 'getDate', setter: 'setDate', multiplier: 7 },
          months: { getter: 'getMonth', setter: 'setMonth', multiplier: 1 },
          years: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 1 },
          decades: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 10 },
          centuries: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 100 },
        };
      function n(e, t, r) {
        const s = new Date(e.getTime());
        if (t && r) {
          const e = i[r],
            { getter: n, setter: o, multiplier: a } = e;
          s[o](s[n]() + t * a);
        }
        return s;
      }
      function o(e, t) {
        switch (t) {
          case 'milliseconds':
            return new Date(e.getTime());
          case 'seconds':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
              e.getSeconds(),
            );
          case 'minutes':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
            );
          case 'hours':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours());
          case 'days':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate());
          case 'weeks':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate() - e.getDay());
          case 'months':
            return new Date(e.getFullYear(), e.getMonth(), 1);
          case 'years':
            return new Date(e.getFullYear(), 0, 1);
          case 'decades':
            return new Date(e.getFullYear() - (e.getFullYear() % 10), 0, 1);
          case 'centuries':
            return new Date(e.getFullYear() - (e.getFullYear() % 100), 0, 1);
          default:
            return new Date();
        }
      }
      function a(e, t, r) {
        return 0 === e ? 0 : (e * s[t]) / s[r];
      }
    },
    17298: (e, t, r) => {
      'use strict';
      r.d(t, { s: () => i });
      var s = r(85557);
      const i = (function () {
        const e = Object.keys(s.m);
        return e.sort(), e;
      })();
    },
    46987: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => l });
      var s = r(22723),
        i = r(92143),
        n = r(50406),
        o = r(37453);
      r(76506), r(31450), r(71552), r(40642), r(60991), r(81172), r(88762), r(32101);
      const a = i.L.getLogger('esri.core.workers.Connection'),
        l = class {
          constructor() {
            (this._clients = new Array()),
              (this._clientPromises = new Array()),
              (this._clientIdx = 0);
          }
          destroy() {
            this.close();
          }
          get closed() {
            return !this._clients || !this._clients.length;
          }
          open(e, t) {
            return new Promise((r, s) => {
              let i = !0;
              const a = (e) => {
                (0, n.k_)(t.signal), i && ((i = !1), e());
              };
              (this._clients.length = e.length), (this._clientPromises.length = e.length);
              for (let i = 0; i < e.length; ++i) {
                const l = e[i];
                (0, n.y8)(l)
                  ? (this._clientPromises[i] = l.then(
                      (e) => ((this._clients[i] = new o.default(e, t)), a(r), this._clients[i]),
                      () => (a(s), null),
                    ))
                  : ((this._clients[i] = new o.default(l, t)),
                    (this._clientPromises[i] = Promise.resolve(this._clients[i])),
                    a(r));
              }
            });
          }
          broadcast(e, t, r) {
            const s = new Array(this._clientPromises.length);
            for (let i = 0; i < this._clientPromises.length; ++i) {
              const n = this._clientPromises[i];
              s[i] = n.then((s) => s.invoke(e, t, r));
            }
            return s;
          }
          close() {
            for (const e of this._clientPromises) e.then((e) => e.close());
            (this._clients.length = 0), (this._clientPromises.length = 0);
          }
          getAvailableClient() {
            let e;
            for (let t = 0; t < this._clients.length; ++t) {
              const r = this._clients[t];
              if (r) {
                if (!r.isBusy()) return Promise.resolve(r);
              } else (e = e || []), e.push(this._clientPromises[t]);
            }
            return e
              ? Promise.race(e)
              : ((this._clientIdx = (this._clientIdx + 1) % this._clients.length),
                Promise.resolve(this._clients[this._clientIdx]));
          }
          invoke(e, t, r) {
            let s = null;
            return (
              Array.isArray(r)
                ? (a.warn(
                    'invoke()',
                    'The transferList parameter is deprecated, use the options object instead',
                  ),
                  (s = { transferList: r }))
                : (s = r),
              this.closed
                ? Promise.reject(new Error('Connection closed'))
                : this.getAvailableClient().then((r) => r.invoke(e, t, s))
            );
          }
          on(e, t) {
            return Promise.all(this._clientPromises).then(() =>
              (0, s.h)(this._clients.map((r) => r.on(e, t))),
            );
          }
          openPorts() {
            return new Promise((e) => {
              const t = new Array(this._clientPromises.length);
              let r = t.length;
              for (let s = 0; s < this._clientPromises.length; ++s)
                this._clientPromises[s].then((i) => {
                  (t[s] = i.openPort()), 0 == --r && e(t);
                });
            });
          }
          get test() {
            return { numClients: this._clients.length };
          }
        };
    },
    65514: (e, t, r) => {
      'use strict';
      r.d(t, { bA: () => H, Mz: () => U });
      var s = r(60991),
        i = r(76506),
        n = r(50406),
        o = r(46987),
        a = r(37453),
        l = r(88762),
        c = r(92143),
        u = r(73173),
        d = r(31450),
        h = (r(66284), r(32101)),
        p = r(3482);
      r(81172), r(71552), r(40642), r(22723), r(82058), r(33921), r(57251);
      let g = null;
      g = (0, h.hF)((0, u.g)('esri/core/workers/init.js'));
      const y = {};
      (y.baseUrl = (0, h.hF)((0, u.g)('dojo/'))),
        (y.packages = [{ name: 'esri', location: '../esri' }]);
      class m {
        constructor() {
          const e = document.createDocumentFragment();
          ['addEventListener', 'dispatchEvent', 'removeEventListener'].forEach((t) => {
            this[t] = (...r) => e[t](...r);
          });
        }
      }
      const f = i.g.MutationObserver || i.g.WebKitMutationObserver,
        v = (function () {
          let e;
          if (i.g.process && i.g.process.nextTick)
            e = (e) => {
              i.g.process.nextTick(e);
            };
          else if (i.g.Promise)
            e = (e) => {
              i.g.Promise.resolve().then(e);
            };
          else if (f) {
            const t = [],
              r = document.createElement('div');
            new f(() => {
              for (; t.length > 0; ) t.shift()();
            }).observe(r, { attributes: !0 }),
              (e = (e) => {
                t.push(e), r.setAttribute('queueStatus', '1');
              });
          }
          return e;
        })(),
        w = (() => {
          const e = i.g.MessageEvent;
          try {
            new e('message', { data: null });
          } catch {
            return (e, t = {}) => {
              const { data: r, bubbles: s = !1, cancelable: i = !1 } = t,
                n = document.createEvent('Event');
              return n.initEvent(e, s, i), (n.data = r), n;
            };
          }
          return (t, r) => new e(t, r);
        })();
      class b {
        constructor() {
          (this._dispatcher = new m()), this._workerPostMessage({ type: a.M.HANDSHAKE });
        }
        terminate() {}
        get onmessage() {
          return this._onmessageHandler;
        }
        set onmessage(e) {
          this._onmessageHandler && this.removeEventListener('message', this._onmessageHandler),
            (this._onmessageHandler = e),
            e && this.addEventListener('message', e);
        }
        get onmessageerror() {
          return this._onmessageerrorHandler;
        }
        set onmessageerror(e) {
          this._onmessageerrorHandler &&
            this.removeEventListener('messageerror', this._onmessageerrorHandler),
            (this._onmessageerrorHandler = e),
            e && this.addEventListener('messageerror', e);
        }
        get onerror() {
          return this._onerrorHandler;
        }
        set onerror(e) {
          this._onerrorHandler && this.removeEventListener('error', this._onerrorHandler),
            (this._onerrorHandler = e),
            e && this.addEventListener('error', e);
        }
        postMessage(e) {
          v(() => {
            this._workerMessageHandler(w('message', { data: e }));
          });
        }
        dispatchEvent(e) {
          return this._dispatcher.dispatchEvent(e);
        }
        addEventListener(e, t, r) {
          this._dispatcher.addEventListener(e, t, r);
        }
        removeEventListener(e, t, r) {
          this._dispatcher.removeEventListener(e, t, r);
        }
        _workerPostMessage(e) {
          v(() => {
            this.dispatchEvent(w('message', { data: e }));
          });
        }
        async _workerMessageHandler(e) {
          const t = (0, a.r)(e);
          if (t && t.type === a.M.OPEN) {
            const { modulePath: e, jobId: r } = t;
            let s = await a.default.loadWorker(e);
            s || (s = await import(e));
            const i = a.default.connect(s);
            this._workerPostMessage({ type: a.M.OPENED, jobId: r, data: i });
          }
        }
      }
      const _ = c.L.getLogger('esri.core.workers'),
        { HANDSHAKE: S } = a.M;
      let I, k;
      const L = 'Failed to create Worker. Fallback to execute module in main thread';
      async function E(e) {
        return new Promise((t) => {
          function r(i) {
            const n = (0, a.r)(i);
            n &&
              n.type === S &&
              (e.removeEventListener('message', r), e.removeEventListener('error', s), t(e));
          }
          function s(t) {
            t.preventDefault(),
              e.removeEventListener('message', r),
              e.removeEventListener('error', s),
              _.warn('Failed to create Worker. Fallback to execute module in main thread', t),
              (e = new b()).addEventListener('message', r),
              e.addEventListener('error', s);
          }
          e.addEventListener('message', r), e.addEventListener('error', s);
        });
      }
      let M = 0;
      const C = c.L.getLogger('esri.core.workers'),
        { ABORT: O, INVOKE: P, OPEN: x, OPENED: T, RESPONSE: j } = a.M;
      class D {
        constructor(e, t) {
          (this._outJobs = new Map()),
            (this._inJobs = new Map()),
            (this.worker = e),
            (this.id = t),
            e.addEventListener('message', this._onMessage.bind(this)),
            e.addEventListener('error', (e) => {
              e.preventDefault(), C.error(e);
            });
        }
        static async create(e) {
          const t = await (async function () {
            if (!(0, i.h)('esri-workers')) return E(new b());
            if (!I && !k)
              try {
                const e = 'let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace(
                  '"{CONFIGURATION}"',
                  `'${(function () {
                    let e;
                    if (null != d.Z.default) {
                      const t = { ...d.Z };
                      delete t.default, (e = JSON.parse(JSON.stringify(t)));
                    } else e = JSON.parse(JSON.stringify(d.Z));
                    (e.assetsPath = (0, h.hF)(e.assetsPath)),
                      (e.request.interceptors = []),
                      (e.log.interceptors = []),
                      (e.locale = (0, p.g)()),
                      (e.has = {
                        'csp-restrictions': (0, i.h)('csp-restrictions'),
                        'esri-2d-debug': !1,
                        'esri-2d-update-debug': (0, i.h)('esri-2d-update-debug'),
                        'esri-2d-query-centroid-enabled': (0, i.h)(
                          'esri-2d-query-centroid-enabled',
                        ),
                        'featurelayer-pbf': (0, i.h)('featurelayer-pbf'),
                        'esri-atomics': (0, i.h)('esri-atomics'),
                        'esri-shared-array-buffer': (0, i.h)('esri-shared-array-buffer'),
                        'esri-tiles-debug': (0, i.h)('esri-tiles-debug'),
                        'esri-workers-arraybuffer-transfer': (0, i.h)(
                          'esri-workers-arraybuffer-transfer',
                        ),
                        'host-webworker': 1,
                      }),
                      e.workers.loaderUrl
                        ? (e.workers.loaderUrl = (0, h.hF)(e.workers.loaderUrl))
                        : g && (e.workers.loaderUrl = g),
                      e.workers.workerPath
                        ? (e.workers.workerPath = (0, h.hF)(e.workers.workerPath))
                        : (e.workers.workerPath = 'esri/core/workers/RemoteClient');
                    const t = d.Z.workers.loaderConfig,
                      r = (function (e) {
                        var t;
                        const r = {
                          async: e.async,
                          isDebug: e.isDebug,
                          locale: e.locale,
                          baseUrl: e.baseUrl,
                          has: { ...e.has },
                          map: { ...e.map },
                          packages: (e.packages && e.packages.concat()) || [],
                          paths: { ...e.paths },
                        };
                        return (
                          e.hasOwnProperty('async') || (r.async = !0),
                          e.hasOwnProperty('isDebug') || (r.isDebug = !1),
                          e.baseUrl || (r.baseUrl = y.baseUrl),
                          null == (t = y.packages) ||
                            t.forEach((e) => {
                              !(function (e, t) {
                                for (const r of e) if (r.name === t.name) return;
                                e.push(t);
                              })(r.packages, e);
                            }),
                          r
                        );
                      })({
                        baseUrl: null == t ? void 0 : t.baseUrl,
                        locale: (0, p.g)(),
                        has: {
                          'csp-restrictions': (0, i.h)('csp-restrictions'),
                          'dojo-test-sniff': 0,
                          'host-webworker': 1,
                          ...(null == t ? void 0 : t.has),
                        },
                        map: { ...(null == t ? void 0 : t.map) },
                        paths: { ...(null == t ? void 0 : t.paths) },
                        packages: (null == t ? void 0 : t.packages) || [],
                      }),
                      s = { version: l.i8, buildDate: l.rh, revision: l.LB };
                    return JSON.stringify({ esriConfig: e, loaderConfig: r, kernelInfo: s });
                  })()}'`,
                );
                I = URL.createObjectURL(new Blob([e], { type: 'text/javascript' }));
              } catch (e) {
                k = e || {};
              }
            let e;
            if (I)
              try {
                e = new Worker(I, { name: 'esri-worker-' + M++ });
              } catch (t) {
                _.warn(L, k), (e = new b());
              }
            else _.warn(L, k), (e = new b());
            return E(e);
          })();
          return new D(t, e);
        }
        terminate() {
          this.worker.terminate();
        }
        async open(e, t = {}) {
          const { signal: r } = t,
            s = (0, a.n)();
          return new Promise((t, i) => {
            const o = {
              resolve: t,
              reject: i,
              abortHandle: (0, n.$F)(r, () => {
                this._outJobs.delete(s), this._post({ type: O, jobId: s });
              }),
            };
            this._outJobs.set(s, o), this._post({ type: x, jobId: s, modulePath: e });
          });
        }
        _onMessage(e) {
          const t = (0, a.r)(e);
          if (t)
            switch (t.type) {
              case T:
                this._onOpenedMessage(t);
                break;
              case j:
                this._onResponseMessage(t);
                break;
              case O:
                this._onAbortMessage(t);
                break;
              case P:
                this._onInvokeMessage(t);
            }
        }
        _onAbortMessage(e) {
          const t = this._inJobs,
            r = e.jobId,
            s = t.get(r);
          s && (s.controller && s.controller.abort(), t.delete(r));
        }
        _onInvokeMessage(e) {
          const { methodName: t, jobId: r, data: s, abortable: i } = e,
            o = i ? (0, n.yi)() : null,
            c = this._inJobs,
            u = l.Nv[t];
          let d;
          try {
            if ('function' != typeof u) throw new TypeError(`${t} is not a function`);
            d = u.call(null, s, { signal: o ? o.signal : null });
          } catch (e) {
            return void this._post({ type: j, jobId: r, error: (0, a.t)(e) });
          }
          (0, n.y8)(d)
            ? (c.set(r, { controller: o, promise: d }),
              d.then(
                (e) => {
                  c.has(r) && (c.delete(r), this._post({ type: j, jobId: r }, e));
                },
                (e) => {
                  c.has(r) &&
                    (c.delete(r),
                    e || (e = { message: 'Error encountered at method' + t }),
                    (0, n.D_)(e) ||
                      this._post({
                        type: j,
                        jobId: r,
                        error: (0, a.t)(e || { message: `Error encountered at method ${t}` }),
                      }));
                },
              ))
            : this._post({ type: j, jobId: r }, d);
        }
        _onOpenedMessage(e) {
          var t;
          const { jobId: r, data: s } = e,
            i = this._outJobs.get(r);
          i && (this._outJobs.delete(r), null == (t = i.abortHandle) || t.remove(), i.resolve(s));
        }
        _onResponseMessage(e) {
          var t;
          const { jobId: r, error: i, data: n } = e,
            o = this._outJobs.get(r);
          o &&
            (this._outJobs.delete(r),
            null == (t = o.abortHandle) || t.remove(),
            i ? o.reject(s.Z.fromJSON(JSON.parse(i))) : o.resolve(n));
        }
        _post(e, t, r) {
          return (0, a.p)(this.worker, e, t, r);
        }
      }
      let A = (0, i.h)('esri-workers-debug')
        ? 1
        : (0, i.h)('host-browser')
        ? navigator.hardwareConcurrency - 1
        : 0;
      A || (A = ((0, i.h)('safari') && (0, i.h)('mac')) || (0, i.h)('trident') ? 7 : 2);
      let R = 0;
      const N = [];
      function U(e, t) {
        return F(e, { client: t });
      }
      async function F(e, t) {
        const r = new o.Z();
        return await r.open(e, t), r;
      }
      async function H(e, t = {}) {
        if ('string' != typeof e)
          throw new s.Z('workers:undefined-module', 'modulePath is missing');
        let r = t.strategy || 'distributed';
        if (
          ((0, i.h)('host-webworker') && !(0, i.h)('esri-workers') && (r = 'local'), 'local' === r)
        ) {
          let r = await a.default.loadWorker(e);
          r || (r = await import(e)), (0, n.k_)(t.signal);
          const s = t.client || r;
          return F([a.default.connect(r)], { ...t, client: s });
        }
        if (
          (await (async function () {
            if ($) return $;
            G = (0, n.yi)();
            const e = [];
            for (let t = 0; t < A; t++) {
              const r = D.create(t).then((e) => ((N[t] = e), e));
              e.push(r);
            }
            return ($ = Promise.all(e)), $;
          })(),
          (0, n.k_)(t.signal),
          'dedicated' === r)
        ) {
          const r = R++ % A;
          return F([await N[r].open(e, t)], t);
        }
        if (t.maxNumWorkers && t.maxNumWorkers > 0) {
          const r = Math.min(t.maxNumWorkers, A);
          if (r < A) {
            const s = new Array(r);
            for (let i = 0; i < r; ++i) {
              const r = R++ % A;
              s[i] = N[r].open(e, t);
            }
            return F(s, t);
          }
        }
        return F(
          N.map((r) => r.open(e, t)),
          t,
        );
      }
      let G,
        $ = null;
    },
    29027: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => v });
      var s,
        i = r(29768),
        n = r(27794),
        o = r(57251),
        a = r(74673),
        l = r(53785),
        c = r(17533),
        u = r(34250),
        d = (r(76506), r(91306), r(92143), r(97714)),
        h = r(2906);
      r(71552),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(31450),
        r(40642),
        r(26341),
        r(95587),
        r(60947),
        r(89623);
      const p = (0, o.s)()({
          orthometric: 'gravity-related-height',
          gravity_related_height: 'gravity-related-height',
          ellipsoidal: 'ellipsoidal',
        }),
        g = p.jsonValues.slice();
      (0, n.r)(g, 'orthometric');
      const y = (0, o.s)()({
        meter: 'meters',
        foot: 'feet',
        'us-foot': 'us-feet',
        'clarke-foot': 'clarke-feet',
        'clarke-yard': 'clarke-yards',
        'clarke-link': 'clarke-links',
        'sears-yard': 'sears-yards',
        'sears-foot': 'sears-feet',
        'sears-chain': 'sears-chains',
        'benoit-1895-b-chain': 'benoit-1895-b-chains',
        'indian-yard': 'indian-yards',
        'indian-1937-yard': 'indian-1937-yards',
        'gold-coast-foot': 'gold-coast-feet',
        'sears-1922-truncated-chain': 'sears-1922-truncated-chains',
        '50-kilometers': '50-kilometers',
        '150-kilometers': '150-kilometers',
      });
      let m = (s = class extends a.a {
        constructor(e) {
          super(e),
            (this.heightModel = 'gravity-related-height'),
            (this.heightUnit = 'meters'),
            (this.vertCRS = null);
        }
        writeHeightModel(e, t, r) {
          return p.write(e, t, r);
        }
        readHeightModel(e, t, r) {
          return (
            p.read(e) ||
            (r &&
              r.messages &&
              r.messages.push(
                (function (e, t) {
                  return new c.W(
                    'height-model:unsupported',
                    `Height model of value '${e}' is not supported`,
                    t,
                  );
                })(e, { context: r }),
              ),
            null)
          );
        }
        readHeightUnit(e, t, r) {
          return y.read(e) || (r && r.messages && r.messages.push(f(e, { context: r })), null);
        }
        readHeightUnitService(e, t, r) {
          return (
            (0, l.u)(e) ||
            y.read(e) ||
            (r && r.messages && r.messages.push(f(e, { context: r })), null)
          );
        }
        readVertCRS(e, t) {
          return t.vertCRS || t.ellipsoid || t.geoid;
        }
        clone() {
          return new s({
            heightModel: this.heightModel,
            heightUnit: this.heightUnit,
            vertCRS: this.vertCRS,
          });
        }
        equals(e) {
          return (
            !!e &&
            (this === e ||
              (this.heightModel === e.heightModel &&
                this.heightUnit === e.heightUnit &&
                this.vertCRS === e.vertCRS))
          );
        }
        static deriveUnitFromSR(e, t) {
          const r = (0, l.g)(t);
          return new s({ heightModel: e.heightModel, heightUnit: r, vertCRS: e.vertCRS });
        }
        write(e, t) {
          return (t = { origin: 'web-scene', ...t }), super.write(e, t);
        }
        static fromJSON(e) {
          if (!e) return null;
          const t = new s();
          return t.read(e, { origin: 'web-scene' }), t;
        }
      });
      function f(e, t) {
        return new c.W(
          'height-unit:unsupported',
          `Height unit of value '${e}' is not supported`,
          t,
        );
      }
      (0, i._)(
        [
          (0, u.Cb)({
            type: p.apiValues,
            constructOnly: !0,
            json: { origins: { 'web-scene': { type: g, default: 'ellipsoidal' } } },
          }),
        ],
        m.prototype,
        'heightModel',
        void 0,
      ),
        (0, i._)([(0, h.w)('web-scene', 'heightModel')], m.prototype, 'writeHeightModel', null),
        (0, i._)(
          [(0, d.r)(['web-scene', 'service'], 'heightModel')],
          m.prototype,
          'readHeightModel',
          null,
        ),
        (0, i._)(
          [
            (0, u.Cb)({
              type: y.apiValues,
              constructOnly: !0,
              json: { origins: { 'web-scene': { type: y.jsonValues, write: y.write } } },
            }),
          ],
          m.prototype,
          'heightUnit',
          void 0,
        ),
        (0, i._)([(0, d.r)('web-scene', 'heightUnit')], m.prototype, 'readHeightUnit', null),
        (0, i._)([(0, d.r)('service', 'heightUnit')], m.prototype, 'readHeightUnitService', null),
        (0, i._)(
          [
            (0, u.Cb)({
              type: String,
              constructOnly: !0,
              json: { origins: { 'web-scene': { write: !0 } } },
            }),
          ],
          m.prototype,
          'vertCRS',
          void 0,
        ),
        (0, i._)(
          [(0, d.r)('service', 'vertCRS', ['vertCRS', 'ellipsoid', 'geoid'])],
          m.prototype,
          'readVertCRS',
          null,
        ),
        (m = s = (0, i._)([(0, c.j)('esri.geometry.HeightModelInfo')], m));
      const v = m;
    },
    72204: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => O });
      var s = r(29768),
        i = r(82058),
        n = r(60991),
        o = r(92143),
        a = r(76506),
        l = r(54179),
        c = r(50406),
        u = r(32101),
        d = r(34250),
        h = (r(91306), r(97714)),
        p = r(17533),
        g = r(29027),
        y = r(41617),
        m = r(66655),
        f = r(75025),
        v = r(89440),
        w = r(62162),
        b = r(43022),
        _ = r(27794),
        S = r(22723),
        I = r(65514);
      const k = o.L.getLogger('esri.core.workers.WorkerHandle');
      class L extends class {
        constructor(e, t, r, s = {}) {
          (this._mainMethod = t),
            (this._listeners = []),
            (this._promise = (0, I.bA)(e, { ...s, schedule: r }).then((e) => {
              if (void 0 === this._thread) {
                (this._thread = e),
                  (this._promise = null),
                  s.hasInitialize && this.broadcast({}, 'initialize');
                for (const e of this._listeners) this._connectListener(e);
              } else e.close();
            })),
            this._promise.catch((t) => k.error(`Failed to initialize ${e} worker: ${t}`));
        }
        on(e, t) {
          const r = { removed: !1, eventName: e, callback: t, threadHandle: null };
          return (
            this._listeners.push(r),
            this._connectListener(r),
            (0, S.m)(() => {
              (r.removed = !0),
                (0, _.b)(this._listeners, r),
                this._thread && (0, a.i)(r.threadHandle) && r.threadHandle.remove();
            })
          );
        }
        destroy() {
          this._thread && (this._thread.close(), (this._thread = null)), (this._promise = null);
        }
        invoke(e, t) {
          return this.invokeMethod(this._mainMethod, e, t);
        }
        invokeMethod(e, t, r) {
          if (this._thread) {
            const s = this.getTransferList(t, e);
            return this._thread.invoke(e, t, { transferList: s, signal: r });
          }
          return this._promise
            ? this._promise.then(() => ((0, c.k_)(r), this.invokeMethod(e, t, r)))
            : Promise.reject(null);
        }
        broadcast(e, t) {
          return this._thread
            ? Promise.all(this._thread.broadcast(t, e)).then(() => {})
            : this._promise
            ? this._promise.then(() => this.broadcast(e, t))
            : Promise.reject();
        }
        get promise() {
          return this._promise;
        }
        _connectListener(e) {
          this._thread &&
            this._thread.on(e.eventName, e.callback).then((t) => {
              e.removed || (e.threadHandle = t);
            });
        }
      } {
        constructor(e = null) {
          super('LercWorker', '_decode', e, { strategy: 'dedicated' }),
            (this.schedule = e),
            (this.ref = 0);
        }
        decode(e, t, r) {
          return e && 0 !== e.byteLength
            ? this.invoke({ buffer: e, options: t }, r)
            : Promise.resolve(null);
        }
        getTransferList(e) {
          return [e.buffer];
        }
        release() {
          --this.ref <= 0 &&
            (E.forEach((e, t) => {
              e === this && E.delete(t);
            }),
            this.destroy());
        }
      }
      const E = new Map();
      r(31450),
        r(71552),
        r(88762),
        r(40642),
        r(81172),
        r(21972),
        r(23639),
        r(86656),
        r(91055),
        r(6906),
        r(50161),
        r(26341),
        r(57251),
        r(74673),
        r(53785),
        r(95587),
        r(60947),
        r(2906),
        r(89623),
        r(74569),
        r(21801),
        r(73796),
        r(91597),
        r(86787),
        r(35132),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(32422),
        r(76996),
        r(82673),
        r(22739),
        r(20543),
        r(47706),
        r(43352),
        r(92482),
        r(92817),
        r(9411),
        r(82933),
        r(15324),
        r(89241),
        r(91700),
        r(617),
        r(21132),
        r(38742),
        r(41864),
        r(49900),
        r(66284),
        r(33921),
        r(3482),
        r(73173),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(56420),
        r(74742),
        r(28239),
        r(93314),
        r(35197),
        r(47842),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(17298),
        r(85557),
        r(34394),
        r(46987),
        r(37453);
      const M = o.L.getLogger('esri.layers.ElevationLayer');
      let C = class extends (0, m.A)((0, f.A)((0, v.O)((0, w.P)((0, l.M)(y.Z))))) {
        constructor(...e) {
          super(...e),
            (this.copyright = null),
            (this.heightModelInfo = null),
            (this.path = null),
            (this.opacity = 1),
            (this.operationalLayerType = 'ArcGISTiledElevationServiceLayer'),
            (this.sourceJSON = null),
            (this.type = 'elevation'),
            (this.url = null),
            (this.version = null),
            (this._lercDecoder = (function (e = null) {
              let t = E.get((0, a.u)(e));
              return (
                t ||
                  ((0, a.i)(e)
                    ? ((t = new L((t) => e.schedule(t))), E.set(e, t))
                    : ((t = new L()), E.set(null, t))),
                ++t.ref,
                t
              );
            })());
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { url: e, ...t } : e;
        }
        destroy() {
          this._lercDecoder = (0, a.k)(this._lercDecoder);
        }
        set minScale(e) {
          this.constructed &&
            M.warn(`${this.declaredClass}.minScale support has been removed (since 4.5)`);
        }
        get minScale() {}
        set maxScale(e) {
          this.constructed &&
            M.warn(`${this.declaredClass}.maxScale support has been removed (since 4.5)`);
        }
        get maxScale() {}
        readVersion(e, t) {
          let r = t.currentVersion;
          return r || (r = 9.3), r;
        }
        load(e) {
          const t = (0, a.i)(e) ? e.signal : null;
          return (
            this.addResolvingPromise(
              this.loadFromPortal(
                {
                  supportedTypes: ['Image Service'],
                  supportsData: !1,
                  validateItem: (e) => {
                    for (let t = 0; t < e.typeKeywords.length; t++)
                      if ('elevation 3d layer' === e.typeKeywords[t].toLowerCase()) return !0;
                    throw new n.Z(
                      'portal:invalid-layer-item-type',
                      "Invalid layer item type '${type}', expected '${expectedType}' ",
                      { type: 'Image Service', expectedType: 'Image Service Elevation 3D Layer' },
                    );
                  },
                },
                e,
              )
                .catch(c.r9)
                .then(() => this._fetchImageService(t)),
            ),
            Promise.resolve(this)
          );
        }
        fetchTile(e, t, r, s) {
          const n = (0, a.i)((s = s || { signal: null }).signal)
              ? s.signal
              : (s.signal = (0, c.yi)().signal),
            o = { responseType: 'array-buffer', signal: n },
            l = { noDataValue: s.noDataValue, returnFileInfo: !0 };
          return this.load()
            .then(() => this._fetchTileAvailability(e, t, r, s))
            .then(() => (0, i.default)(this.getTileUrl(e, t, r), o))
            .then((e) => this._lercDecoder.decode(e.data, l, n))
            .then((e) => ({
              values: e.pixelData,
              width: e.width,
              height: e.height,
              maxZError: e.fileInfo.maxZError,
              noDataValue: e.noDataValue,
              minValue: e.minValue,
              maxValue: e.maxValue,
            }));
        }
        getTileUrl(e, t, r) {
          const s = !this.tilemapCache && this.supportsBlankTile,
            i = (0, u.B7)({ ...this.parsedUrl.query, blankTile: !s && null });
          return `${this.parsedUrl.path}/tile/${e}/${t}/${r}${i ? '?' + i : ''}`;
        }
        async queryElevation(e, t) {
          const { ElevationQuery: s } = await Promise.all([r.e(2334), r.e(8847)]).then(
            r.bind(r, 68847),
          );
          return (0, c.k_)(t), new s().query(this, e, t);
        }
        async createElevationSampler(e, t) {
          const { ElevationQuery: s } = await Promise.all([r.e(2334), r.e(8847)]).then(
            r.bind(r, 68847),
          );
          return (0, c.k_)(t), new s().createSampler(this, e, t);
        }
        _fetchTileAvailability(e, t, r, s) {
          return this.tilemapCache
            ? this.tilemapCache.fetchAvailability(e, t, r, s)
            : Promise.resolve('unknown');
        }
        async _fetchImageService(e) {
          if (this.sourceJSON) return this.sourceJSON;
          const t = {
              query: { f: 'json', ...this.parsedUrl.query },
              responseType: 'json',
              signal: e,
            },
            r = await (0, i.default)(this.parsedUrl.path, t);
          r.ssl && (this.url = this.url.replace(/^http:/i, 'https:')),
            (this.sourceJSON = r.data),
            this.read(r.data, { origin: 'service', url: this.parsedUrl });
        }
        get hasOverriddenFetchTile() {
          return !this.fetchTile.__isDefault__;
        }
      };
      (0, s._)(
        [(0, d.Cb)({ json: { read: { source: 'copyrightText' } } })],
        C.prototype,
        'copyright',
        void 0,
      ),
        (0, s._)([(0, d.Cb)({ readOnly: !0, type: g.Z })], C.prototype, 'heightModelInfo', void 0),
        (0, s._)(
          [
            (0, d.Cb)({
              type: String,
              json: { origins: { 'web-scene': { read: !0, write: !0 } }, read: !1 },
            }),
          ],
          C.prototype,
          'path',
          void 0,
        ),
        (0, s._)([(0, d.Cb)({ type: ['show', 'hide'] })], C.prototype, 'listMode', void 0),
        (0, s._)(
          [
            (0, d.Cb)({
              json: {
                read: !1,
                write: !1,
                origins: {
                  service: { read: !1, write: !1 },
                  'portal-item': { read: !1, write: !1 },
                  'web-document': { read: !1, write: !1 },
                },
              },
            }),
          ],
          C.prototype,
          'minScale',
          null,
        ),
        (0, s._)(
          [
            (0, d.Cb)({
              json: {
                read: !1,
                write: !1,
                origins: {
                  service: { read: !1, write: !1 },
                  'portal-item': { read: !1, write: !1 },
                  'web-document': { read: !1, write: !1 },
                },
              },
            }),
          ],
          C.prototype,
          'maxScale',
          null,
        ),
        (0, s._)(
          [
            (0, d.Cb)({
              json: { read: !1, write: !1, origins: { 'web-document': { read: !1, write: !1 } } },
            }),
          ],
          C.prototype,
          'opacity',
          void 0,
        ),
        (0, s._)(
          [(0, d.Cb)({ type: ['ArcGISTiledElevationServiceLayer'] })],
          C.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, s._)([(0, d.Cb)()], C.prototype, 'sourceJSON', void 0),
        (0, s._)(
          [(0, d.Cb)({ json: { read: !1 }, value: 'elevation', readOnly: !0 })],
          C.prototype,
          'type',
          void 0,
        ),
        (0, s._)([(0, d.Cb)(b.u)], C.prototype, 'url', void 0),
        (0, s._)([(0, d.Cb)()], C.prototype, 'version', void 0),
        (0, s._)([(0, h.r)('version', ['currentVersion'])], C.prototype, 'readVersion', null),
        (C = (0, s._)([(0, p.j)('esri.layers.ElevationLayer')], C)),
        (C.prototype.fetchTile.__isDefault__ = !0);
      const O = C;
    },
    41617: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => b });
      var s = r(29768),
        i = r(31450),
        n = (r(74569), r(82058)),
        o = r(60991),
        a = r(76996),
        l = r(82673),
        c = r(22739),
        u = r(92143),
        d = r(50406),
        h = r(32101),
        p = r(34250),
        g = (r(76506), r(91306), r(17533)),
        y = r(21801),
        m = r(60947);
      r(71552),
        r(73796),
        r(74673),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(40642),
        r(81172),
        r(26341),
        r(97714),
        r(2906),
        r(84069),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(88762),
        r(20543);
      let f = 0;
      const v = u.L.getLogger('esri.layers.Layer');
      let w = class extends a.E.EventedMixin((0, l.I)(c.L)) {
        constructor() {
          super(...arguments),
            (this.attributionDataUrl = null),
            (this.fullExtent = new y.Z(-180, -90, 180, 90, m.Z.WGS84)),
            (this.id = Date.now().toString(16) + '-layer-' + f++),
            (this.legendEnabled = !0),
            (this.listMode = 'show'),
            (this.opacity = 1),
            (this.parent = null),
            (this.popupEnabled = !0),
            (this.attributionVisible = !0),
            (this.spatialReference = m.Z.WGS84),
            (this.title = null),
            (this.type = null),
            (this.url = null),
            (this.visible = !0);
        }
        static async fromArcGISServerUrl(e) {
          const t = 'string' == typeof e ? { url: e } : e,
            s = await r.e(6601).then(r.bind(r, 66601));
          try {
            return await s.fromUrl(t);
          } catch (e) {
            throw (
              (v.error(
                "#fromArcGISServerUrl({ url: '" + t.url + "'})",
                'Failed to create layer from arcgis server url',
                e,
              ),
              e)
            );
          }
        }
        static async fromPortalItem(e) {
          const t = 'portalItem' in e ? e : { portalItem: e },
            s = await r.e(6458).then(r.bind(r, 36458));
          try {
            return await s.fromItem(t);
          } catch (e) {
            const r = t && t.portalItem,
              s = (r && r.id) || 'unset',
              n = (r && r.portal && r.portal.url) || i.Z.portalUrl;
            throw (
              (v.error(
                '#fromPortalItem()',
                "Failed to create layer from portal item (portal: '" + n + "', id: '" + s + "')",
                e,
              ),
              e)
            );
          }
        }
        initialize() {
          this.when().catch((e) => {
            var t, r;
            (0, d.D_)(e) ||
              u.L.getLogger(this.declaredClass).error(
                '#load()',
                `Failed to load layer (title: '${
                  null != (t = this.title) ? t : 'no title'
                }', id: '${null != (r = this.id) ? r : 'no id'}')`,
                { error: e },
              );
          });
        }
        destroy() {
          if (this.parent) {
            const e = this,
              t = this.parent;
            'layers' in t && t.layers.includes(e)
              ? t.layers.remove(e)
              : 'tables' in t && t.tables.includes(e)
              ? t.tables.remove(e)
              : 'baseLayers' in t && t.baseLayers.includes(e)
              ? t.baseLayers.remove(e)
              : 'baseLayers' in t && t.referenceLayers.includes(e) && t.referenceLayers.remove(e);
          }
        }
        get hasAttributionData() {
          return null != this.attributionDataUrl;
        }
        get parsedUrl() {
          const e = this.url;
          return e ? (0, h.mN)(e) : null;
        }
        async fetchAttributionData() {
          const e = this.attributionDataUrl;
          if (this.hasAttributionData && e)
            return (await (0, n.default)(e, { query: { f: 'json' }, responseType: 'json' })).data;
          throw new o.Z('layer:no-attribution-data', 'Layer does not have attribution data');
        }
      };
      (0, s._)([(0, p.Cb)({ type: String })], w.prototype, 'attributionDataUrl', void 0),
        (0, s._)([(0, p.Cb)({ type: y.Z })], w.prototype, 'fullExtent', void 0),
        (0, s._)([(0, p.Cb)({ readOnly: !0 })], w.prototype, 'hasAttributionData', null),
        (0, s._)([(0, p.Cb)({ type: String })], w.prototype, 'id', void 0),
        (0, s._)(
          [(0, p.Cb)({ type: Boolean, nonNullable: !0 })],
          w.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          w.prototype,
          'listMode',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: Number, range: { min: 0, max: 1 }, nonNullable: !0 })],
          w.prototype,
          'opacity',
          void 0,
        ),
        (0, s._)([(0, p.Cb)()], w.prototype, 'parent', void 0),
        (0, s._)([(0, p.Cb)({ readOnly: !0 })], w.prototype, 'parsedUrl', null),
        (0, s._)([(0, p.Cb)({ type: Boolean })], w.prototype, 'popupEnabled', void 0),
        (0, s._)([(0, p.Cb)({ type: Boolean })], w.prototype, 'attributionVisible', void 0),
        (0, s._)([(0, p.Cb)({ type: m.Z })], w.prototype, 'spatialReference', void 0),
        (0, s._)([(0, p.Cb)({ type: String })], w.prototype, 'title', void 0),
        (0, s._)(
          [(0, p.Cb)({ type: String, readOnly: !0, json: { read: !1 } })],
          w.prototype,
          'type',
          void 0,
        ),
        (0, s._)([(0, p.Cb)()], w.prototype, 'url', void 0),
        (0, s._)([(0, p.Cb)({ type: Boolean, nonNullable: !0 })], w.prototype, 'visible', void 0),
        (w = (0, s._)([(0, g.j)('esri.layers.Layer')], w));
      const b = w;
    },
  },
]);
