(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [8326],
  {
    93314: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => m });
      var i,
        s = r(29768),
        o = r(74673),
        l = r(76506),
        n = r(35197),
        a = r(34250),
        u = (r(91306), r(92143), r(97714)),
        c = r(17533),
        p = 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 d = (i = class extends o.a {
        constructor(e) {
          super(e), (this.end = null), (this.start = null);
        }
        static get allTime() {
          return h;
        }
        static get empty() {
          return y;
        }
        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(i.allTime);
        }
        get isEmpty() {
          return this.equals(i.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 i({ end: this.end, start: this.start });
        }
        expandTo(e) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const t = (0, l.e)(this.start, (t) => (0, n.t)(t, e)),
            r = (0, l.e)(this.end, (t) => (0, n.o)((0, n.t)(t, e), 1, e));
          return new i({ start: t, end: r });
        }
        intersection(e) {
          if (!e) return this.clone();
          if (this.isEmpty || e.isEmpty) return i.empty;
          if (this.isAllTime) return e.clone();
          if (e.isAllTime) return this.clone();
          const t = (0, l.m)(this.start, -1 / 0, (e) => e.getTime()),
            r = (0, l.m)(this.end, 1 / 0, (e) => e.getTime()),
            s = (0, l.m)(e.start, -1 / 0, (e) => e.getTime()),
            o = (0, l.m)(e.end, 1 / 0, (e) => e.getTime());
          let n, a;
          if (
            (s >= t && s <= r ? (n = s) : t >= s && t <= o && (n = t),
            r >= s && r <= o ? (a = r) : o >= t && o <= r && (a = o),
            !isNaN(n) && !isNaN(a))
          ) {
            const e = new i();
            return (
              (e.start = n === -1 / 0 ? null : new Date(n)),
              (e.end = a === 1 / 0 ? null : new Date(a)),
              e
            );
          }
          return i.empty;
        }
        offset(e, t) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const r = new i(),
            { start: s, end: o } = this;
          return (
            (0, l.i)(s) && (r.start = (0, n.o)(s, e, t)),
            (0, l.i)(o) && (r.end = (0, n.o)(o, e, t)),
            r
          );
        }
        equals(e) {
          if (!e) return !1;
          const t = (0, l.i)(this.start) ? this.start.getTime() : this.start,
            r = (0, l.i)(this.end) ? this.end.getTime() : this.end,
            i = (0, l.i)(e.start) ? e.start.getTime() : e.start,
            s = (0, l.i)(e.end) ? e.end.getTime() : e.end;
          return t === i && r === s;
        }
        union(e) {
          if (!e || e.isEmpty) return this.clone();
          if (this.isEmpty) return e.clone();
          if (this.isAllTime || e.isAllTime) return h.clone();
          const t =
              (0, l.i)(this.start) && (0, l.i)(e.start)
                ? new Date(Math.min(this.start.getTime(), e.start.getTime()))
                : null,
            r =
              (0, l.i)(this.end) && (0, l.i)(e.end)
                ? new Date(Math.max(this.end.getTime(), e.end.getTime()))
                : null;
          return new i({ start: t, end: r });
        }
      });
      (0, s._)(
        [(0, a.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
        d.prototype,
        'end',
        void 0,
      ),
        (0, s._)([(0, u.r)('end')], d.prototype, 'readEnd', null),
        (0, s._)([(0, p.w)('end')], d.prototype, 'writeEnd', null),
        (0, s._)([(0, a.Cb)({ readOnly: !0, json: { read: !1 } })], d.prototype, 'isAllTime', null),
        (0, s._)([(0, a.Cb)({ readOnly: !0, json: { read: !1 } })], d.prototype, 'isEmpty', null),
        (0, s._)(
          [(0, a.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
          d.prototype,
          'start',
          void 0,
        ),
        (0, s._)([(0, u.r)('start')], d.prototype, 'readStart', null),
        (0, s._)([(0, p.w)('start')], d.prototype, 'writeStart', null),
        (d = i = (0, s._)([(0, c.j)('esri.TimeExtent')], d));
      const h = new d(),
        y = new d({ start: void 0, end: void 0 }),
        m = d;
    },
    66655: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => c });
      var i = r(29768),
        s = (r(74569), r(34250)),
        o = (r(76506), r(91306), r(92143), r(97714)),
        l = r(17533),
        n = r(47706),
        a = r(9411),
        u = r(60947);
      const c = (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 a.T({ layer: this })
              : null;
          }
        };
        return (
          (0, i._)(
            [(0, s.Cb)({ json: { read: { source: 'copyrightText' } } })],
            t.prototype,
            'copyright',
            void 0,
          ),
          (0, i._)([(0, s.Cb)()], t.prototype, 'minScale', void 0),
          (0, i._)([(0, o.r)('service', 'minScale')], t.prototype, 'readMinScale', null),
          (0, i._)([(0, s.Cb)()], t.prototype, 'maxScale', void 0),
          (0, i._)([(0, o.r)('service', 'maxScale')], t.prototype, 'readMaxScale', null),
          (0, i._)([(0, s.Cb)({ type: u.Z })], t.prototype, 'spatialReference', void 0),
          (0, i._)([(0, s.Cb)({ readOnly: !0 })], t.prototype, 'supportsBlankTile', null),
          (0, i._)([(0, s.Cb)(n.s)], t.prototype, 'tileInfo', void 0),
          (0, i._)([(0, s.Cb)()], t.prototype, 'tilemapCache', void 0),
          (0, i._)(
            [(0, o.r)('service', 'tilemapCache', ['capabilities'])],
            t.prototype,
            'readTilemapCache',
            null,
          ),
          (0, i._)([(0, s.Cb)()], t.prototype, 'version', void 0),
          (t = (0, i._)([(0, l.j)('esri.layers.mixins.ArcGISCachedService')], t)),
          t
        );
      };
    },
    75025: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => u });
      var i = r(29768),
        s = r(92143),
        o = r(76506),
        l = r(34250),
        n = (r(91306), r(17533)),
        a = r(21132);
      const u = (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, l.Cb)()], t.prototype, 'title', null),
          (0, i._)([(0, l.Cb)({ type: String })], t.prototype, 'url', null),
          (t = (0, i._)([(0, n.j)('esri.layers.mixins.ArcGISService')], t)),
          t
        );
      };
    },
    11118: (e, t, r) => {
      'use strict';
      r.d(t, { B: () => l });
      var i = r(29768),
        s = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533));
      const l = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments), (this.blendMode = 'normal'), (this.effect = null);
          }
        };
        return (
          (0, i._)(
            [
              (0, s.Cb)({
                type: [
                  'average',
                  'color-burn',
                  'color-dodge',
                  'color',
                  'darken',
                  'destination-atop',
                  'destination-in',
                  'destination-out',
                  'destination-over',
                  'difference',
                  'exclusion',
                  'hard-light',
                  'hue',
                  'invert',
                  'lighten',
                  'lighter',
                  'luminosity',
                  'minus',
                  'multiply',
                  'normal',
                  'overlay',
                  'plus',
                  'reflect',
                  'saturation',
                  'screen',
                  'soft-light',
                  'source-atop',
                  'source-in',
                  'source-out',
                  'vivid-light',
                  'xor',
                ],
                nonNullable: !0,
                json: {
                  read: !1,
                  write: !1,
                  origins: { 'web-map': { default: 'normal', read: !0, write: !0 } },
                },
              }),
            ],
            t.prototype,
            'blendMode',
            void 0,
          ),
          (0, i._)([(0, s.Cb)()], t.prototype, 'effect', void 0),
          (t = (0, i._)([(0, o.j)('esri.layers.mixins.BlendLayer')], t)),
          t
        );
      };
    },
    47842: (e, t, r) => {
      'use strict';
      r.d(t, { E: () => w });
      var i,
        s = r(29768),
        o = r(57251),
        l = r(74673),
        n = r(76506),
        a = r(34250),
        u = (r(91306), r(92143), r(97714)),
        c = r(17533),
        p = r(2906),
        d = r(14249),
        h = r(17298);
      let y = (i = class extends l.a {
        async collectRequiredFields(e, t) {
          return (0, d.io)(e, t, this.expression);
        }
        clone() {
          return new i({ expression: this.expression, title: this.title });
        }
      });
      (0, s._)(
        [(0, a.Cb)({ type: String, json: { write: !0 } })],
        y.prototype,
        'expression',
        void 0,
      ),
        (0, s._)([(0, a.Cb)({ type: String, json: { write: !0 } })], y.prototype, 'title', void 0),
        (y = i = (0, s._)([(0, c.j)('esri.layers.support.FeatureExpressionInfo')], y));
      var m,
        g = y;
      const f = (0, o.s)()({
          onTheGround: 'on-the-ground',
          relativeToGround: 'relative-to-ground',
          relativeToScene: 'relative-to-scene',
          absoluteHeight: 'absolute-height',
        }),
        v = new o.J({
          foot: 'feet',
          kilometer: 'kilometers',
          meter: 'meters',
          mile: 'miles',
          'us-foot': 'us-feet',
          yard: 'yards',
        });
      let S = (m = class extends l.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, i) {
          (t[r] = e.write(null, i)), '0' === e.expression && (t.featureExpression = { value: 0 });
        }
        get mode() {
          const { offset: e, featureExpressionInfo: t } = this;
          return this._isOverridden('mode')
            ? this._get('mode')
            : (0, n.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 m({
            mode: this.mode,
            offset: this.offset,
            featureExpressionInfo: this.featureExpressionInfo
              ? this.featureExpressionInfo.clone()
              : void 0,
            unit: this.unit,
          });
        }
      });
      (0, s._)(
        [(0, a.Cb)({ type: g, json: { write: !0 } })],
        S.prototype,
        'featureExpressionInfo',
        void 0,
      ),
        (0, s._)(
          [(0, u.r)('featureExpressionInfo', ['featureExpressionInfo', 'featureExpression'])],
          S.prototype,
          'readFeatureExpressionInfo',
          null,
        ),
        (0, s._)(
          [
            (0, p.w)('featureExpressionInfo', {
              featureExpressionInfo: { type: g },
              'featureExpression.value': { type: [0] },
            }),
          ],
          S.prototype,
          'writeFeatureExpressionInfo',
          null,
        ),
        (0, s._)(
          [
            (0, a.Cb)({
              type: f.apiValues,
              nonNullable: !0,
              json: {
                type: f.jsonValues,
                read: f.read,
                write: { writer: f.write, isRequired: !0 },
              },
            }),
          ],
          S.prototype,
          'mode',
          null,
        ),
        (0, s._)([(0, a.Cb)({ type: Number, json: { write: !0 } })], S.prototype, 'offset', void 0),
        (0, s._)(
          [(0, a.Cb)({ type: h.s, json: { type: String, read: v.read, write: v.write } })],
          S.prototype,
          'unit',
          null,
        ),
        (S = m = (0, s._)([(0, c.j)('esri.layers.support.ElevationInfo')], S));
      var w = S;
    },
    82673: (e, t, r) => {
      'use strict';
      r.d(t, { I: () => l });
      var i = r(29768),
        s = r(17533);
      let o = 0;
      const l = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e),
              Object.defineProperty(this, 'uid', {
                writable: !1,
                configurable: !1,
                value: Date.now().toString(16) + '-object-' + o++,
              });
          }
        };
        return (t = (0, i._)([(0, s.j)('esri.core.Identifiable')], t)), t;
      };
      let n = class extends l(class {}) {};
      n = (0, i._)([(0, s.j)('esri.core.Identifiable')], n);
    },
    89241: (e, t, r) => {
      'use strict';
      r.d(t, { L: () => s });
      var i = r(91700);
      class s {
        constructor(e, t) {
          (this._storage = new i.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: () => p, a: () => d });
      var i = r(29768),
        s = r(21972),
        o = r(50161),
        l = r(86656),
        n = r(26341),
        a = r(17533);
      const u = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e);
          }
          clear(e, t = 'user') {
            return c(this).delete(e, (0, s.n)(t));
          }
          write(e = {}, t) {
            return (0, n.w)(this, (e = e || {}), t), e;
          }
          setAtOrigin(e, t, r) {
            (0, l.g)(this).setAtOrigin(e, t, (0, s.n)(r));
          }
          removeOrigin(e) {
            const t = c(this),
              r = (0, s.n)(e),
              i = t.keys(r);
            for (const e of i) t.originOf(e) === r && t.set(e, t.get(e, r), 6);
          }
          updateOrigin(e, t) {
            const r = c(this),
              i = (0, s.n)(t),
              o = this.get(e);
            for (let t = i + 1; t < s.b; ++t) r.delete(e, t);
            r.set(e, o, i);
          }
          toJSON(e) {
            return this.write({}, e);
          }
        };
        return (
          (t = (0, i._)([(0, a.j)('esri.core.WriteableMultiOriginJSONSupport')], t)),
          (t.prototype.toJSON.isDefaultToJSON = !0),
          t
        );
      };
      function c(e) {
        return (0, l.g)(e).store;
      }
      const p = (e) => {
        let t = class extends u((0, o.R)(e)) {
          constructor(...e) {
            super(...e);
          }
        };
        return (t = (0, i._)([(0, a.j)('esri.core.MultiOriginJSONSupport')], t)), t;
      };
      let d = class extends p(s.Z) {};
      d = (0, i._)([(0, a.j)('esri.core.MultiOriginJSONSupport')], d);
    },
    89440: (e, t, r) => {
      'use strict';
      r.d(t, { O: () => p });
      var i = r(29768),
        s = r(60991),
        o = r(34250),
        l = (r(76506), r(91306), r(92143), r(17533)),
        n = r(2906),
        a = r(26341),
        u = r(43022);
      const c = {
          '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,
          },
        },
        p = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments), (this.title = null);
            }
            writeListMode(e, t, r, i) {
              ((i && 'ground' === i.layerContainerType) || (e && (0, a.b)(this, r, {}, i))) &&
                (t[r] = e);
            }
            writeOperationalLayerType(e, t, r, i) {
              !e || (i && 'tables' === i.layerContainerType) || (t.layerType = e);
            }
            writeTitle(e, t) {
              t.title = e || 'Layer';
            }
            read(e, t) {
              t && (t.layer = this), (0, a.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 = c[e];
                let i = r && r[this.operationalLayerType];
                if (
                  ('ArcGISTiledElevationServiceLayer' === this.operationalLayerType &&
                    'web-scene/operational-layers' === e &&
                    (i = !1),
                  !i)
                )
                  return (
                    t.messages &&
                      t.messages.push(
                        new s.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 }),
                i =
                  !!t &&
                  !!t.messages &&
                  !!t.messages.filter(
                    (e) => e instanceof s.Z && 'web-document-write:property-required' === e.name,
                  ).length;
              return !this.url && i ? null : r;
            }
            beforeSave() {}
          };
          return (
            (0, i._)(
              [
                (0, o.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, i._)(
              [
                (0, o.Cb)({
                  json: {
                    write: { ignoreOrigin: !0 },
                    origins: { 'web-map': { read: !1, write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'listMode',
              void 0,
            ),
            (0, i._)([(0, n.w)('listMode')], t.prototype, 'writeListMode', null),
            (0, i._)(
              [
                (0, o.Cb)({
                  type: String,
                  readOnly: !0,
                  json: {
                    read: !1,
                    write: { target: 'layerType', ignoreOrigin: !0 },
                    origins: { 'portal-item': { write: !1 } },
                  },
                }),
              ],
              t.prototype,
              'operationalLayerType',
              void 0,
            ),
            (0, i._)(
              [(0, n.w)('operationalLayerType')],
              t.prototype,
              'writeOperationalLayerType',
              null,
            ),
            (0, i._)([(0, o.Cb)(u.o)], t.prototype, 'opacity', void 0),
            (0, i._)(
              [
                (0, o.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, i._)([(0, n.w)('title')], t.prototype, 'writeTitle', null),
            (0, i._)(
              [
                (0, o.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, i._)([(0, l.j)('esri.layers.mixins.OperationalLayer')], t)),
            t
          );
        };
    },
    62162: (e, t, r) => {
      'use strict';
      r.d(t, { P: () => w });
      var i = r(29768),
        s = r(88762),
        o = r(82058),
        l = r(41864),
        n = r(60991),
        a = r(92143),
        u = r(76506),
        c = r(50406),
        p = r(32101),
        d = r(34250),
        h = (r(91306), r(97714)),
        y = r(17533),
        m = r(2906),
        g = r(49900),
        f = r(56420),
        v = r(74653);
      const S = a.L.getLogger('esri.layers.mixins.PortalLayer'),
        w = (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 i = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (e) {
                      return e.l;
                    });
                  return (
                    (0, c.k_)(t),
                    await i.load(
                      {
                        instance: this,
                        supportedTypes: e.supportedTypes,
                        validateItem: e.validateItem,
                        supportsData: e.supportsData,
                      },
                      t,
                    )
                  );
                } catch (e) {
                  throw (
                    ((0, c.D_)(e) ||
                      S.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, c.r9)(e), !0)),
              );
            }
            async fetchUserHasEditingPrivileges(e) {
              const t = this.url ? (null == s.id ? void 0 : s.id.findCredential(this.url)) : null;
              if (!t) return !0;
              const r = b.credential === t ? b.user : await this.fetchEditingUser(e);
              return (
                (b.credential = t),
                (b.user = r),
                (0, u.b)(r) || null == r.privileges || r.privileges.includes('features:user:edit')
              );
            }
            async fetchEditingUser(e) {
              var t, r;
              const i = null == (t = this.portalItem) || null == (r = t.portal) ? void 0 : r.user;
              if (i) return i;
              const n = s.id.findServerInfo(this.url);
              if (null == n || !n.owningSystemUrl) return null;
              const a = `${n.owningSystemUrl}/sharing/rest`,
                c = g.Z.getDefault();
              if (c && c.loaded && (0, p.Fv)(c.restUrl) === (0, p.Fv)(a)) return c.user;
              const d = `${a}/community/self`,
                h = (0, u.i)(e) ? e.signal : null,
                y = await (0, l.r)(
                  (0, o.default)(d, { authMode: 'no-prompt', query: { f: 'json' }, signal: h }),
                );
              return y.ok ? v.default.fromJSON(y.value.data) : null;
            }
            read(e, t) {
              t && (t.layer = this), super.read(e, t);
            }
            write(e, t) {
              const r = t && t.portal,
                i =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || g.Z.getDefault());
              return r && i && !(0, p.tm)(i.restUrl, r.restUrl)
                ? (t.messages &&
                    t.messages.push(
                      new n.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, i._)([(0, d.Cb)({ type: f.default })], t.prototype, 'portalItem', null),
            (0, i._)(
              [(0, h.r)('web-document', 'portalItem', ['itemId'])],
              t.prototype,
              'readPortalItem',
              null,
            ),
            (0, i._)(
              [(0, m.w)('web-document', 'portalItem', { itemId: { type: String } })],
              t.prototype,
              'writePortalItem',
              null,
            ),
            (0, i._)([(0, d.Cb)()], t.prototype, 'resourceReferences', void 0),
            (0, i._)(
              [(0, d.Cb)({ readOnly: !0 })],
              t.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (t = (0, i._)([(0, y.j)('esri.layers.mixins.PortalLayer')], t)),
            t
          );
        },
        b = { credential: null, user: null };
    },
    50161: (e, t, r) => {
      'use strict';
      r.d(t, { R: () => c });
      var i = r(29768),
        s = r(21972),
        o = r(76506),
        l = r(26341),
        n = r(86656),
        a = r(17533);
      class u {
        constructor() {
          (this._propertyOriginMap = new Map()),
            (this._originStores = new Array(s.b)),
            (this._values = new Map());
        }
        clone(e) {
          const t = new u(),
            r = this._originStores[0];
          r &&
            r.forEach((e, r) => {
              t.set(r, (0, o.d9)(e), 0);
            });
          for (let r = 2; r < s.b; r++) {
            const i = this._originStores[r];
            i &&
              i.forEach((i, s) => {
                (e && e.has(s)) || t.set(s, (0, o.d9)(i), 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 i = this._originStores[r];
          if (
            (i || ((i = new Map()), (this._originStores[r] = i)),
            i.set(e, t),
            !this._values.has(e) || (0, o.a)(this._propertyOriginMap.get(e)) <= r)
          ) {
            const i = this._values.get(e);
            return this._values.set(e, t), this._propertyOriginMap.set(e, r), i !== t;
          }
          return !1;
        }
        delete(e, t = 6) {
          const r = this._originStores[t];
          if (!r) return;
          const i = 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 i;
        }
        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],
            i = r && r.get(e),
            s = this._values.get(e);
          return this._values.set(e, i), this._propertyOriginMap.set(e, t), s !== i;
        }
        originOf(e) {
          return this._propertyOriginMap.get(e) || 0;
        }
        forEach(e) {
          this._values.forEach(e);
        }
      }
      const c = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e);
            const t = (0, o.a)((0, n.g)(this)),
              r = t.metadatas,
              i = t.store,
              s = new u();
            (t.store = s),
              i.keys().forEach((e) => {
                s.set(e, i.get(e), 0);
              }),
              Object.keys(r).forEach((e) => {
                t.internalGet(e) && s.set(e, t.internalGet(e), 0);
              });
          }
          read(e, t) {
            (0, l.r)(this, e, t);
          }
          getAtOrigin(e, t) {
            const r = p(this),
              i = (0, s.n)(t);
            if ('string' == typeof e) return r.get(e, i);
            const o = {};
            return (
              e.forEach((e) => {
                o[e] = r.get(e, i);
              }),
              o
            );
          }
          originOf(e) {
            return (0, s.c)(this.originIdOf(e));
          }
          originIdOf(e) {
            return p(this).originOf(e);
          }
          revert(e, t) {
            const r = p(this),
              i = (0, s.n)(t),
              o = (0, n.g)(this);
            let l;
            (l = 'string' == typeof e ? ('*' === e ? r.keys(i) : [e]) : e),
              l.forEach((e) => {
                o.invalidate(e), r.revert(e, i), o.commit(e);
              });
          }
        };
        return (t = (0, i._)([(0, a.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], t)), t;
      };
      function p(e) {
        return (0, n.g)(e).store;
      }
      let d = class extends c(s.Z) {};
      d = (0, i._)([(0, a.j)('esri.core.ReadOnlyMultiOriginJSONSupport')], d);
    },
    58912: (e, t, r) => {
      'use strict';
      r.d(t, { S: () => l });
      var i = r(29768),
        s = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533));
      const l = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments), (this.minScale = 0), (this.maxScale = 0);
          }
          get scaleRangeId() {
            return `${this.minScale},${this.maxScale}`;
          }
        };
        return (
          (0, i._)(
            [(0, s.Cb)({ type: Number, nonNullable: !0, json: { write: !0 } })],
            t.prototype,
            'minScale',
            void 0,
          ),
          (0, i._)(
            [(0, s.Cb)({ type: Number, nonNullable: !0, json: { write: !0 } })],
            t.prototype,
            'maxScale',
            void 0,
          ),
          (0, i._)([(0, s.Cb)({ readOnly: !0 })], t.prototype, 'scaleRangeId', null),
          (t = (0, i._)([(0, o.j)('esri.layers.mixins.ScaleRangeLayer')], t)),
          t
        );
      };
    },
    6687: (e, t, r) => {
      'use strict';
      r.d(t, { T: () => s });
      var i = r(91055);
      class s {
        constructor(e, t, r, i) {
          this.set(e, t, r, i);
        }
        static getId(e, t, r, i) {
          return 'object' == typeof e
            ? `${e.level}/${e.row}/${e.col}/${e.world}`
            : `${e}/${t}/${r}/${i}`;
        }
        get key() {
          return this;
        }
        get id() {
          return this.toString();
        }
        set id(e) {
          this.set(e);
        }
        acquire(e, t, r, i) {
          this.set(e, t, r, i);
        }
        contains(e) {
          const t = e.level - this.level;
          return this.row === e.row >> t && this.col === e.col >> t && this.world === e.world;
        }
        equals(e) {
          return (
            this.level === e.level &&
            this.row === e.row &&
            this.col === e.col &&
            this.world === e.world
          );
        }
        clone() {
          return new s(this);
        }
        release() {
          (this.level = 0), (this.row = 0), (this.col = 0), (this.world = 0);
        }
        set(e, t, r, i) {
          if (null == e) (this.level = 0), (this.row = 0), (this.col = 0), (this.world = 0);
          else if ('object' == typeof e)
            (this.level = e.level || 0),
              (this.row = e.row || 0),
              (this.col = e.col || 0),
              (this.world = e.world || 0);
          else if ('string' == typeof e) {
            const [t, r, i, s] = e.split('/');
            (this.level = parseFloat(t)),
              (this.row = parseFloat(r)),
              (this.col = parseFloat(i)),
              (this.world = parseFloat(s));
          } else (this.level = +e), (this.row = +t), (this.col = +r), (this.world = +i || 0);
          return this;
        }
        toString() {
          return `${this.level}/${this.row}/${this.col}/${this.world}`;
        }
        getParentKey() {
          return this.level <= 0
            ? null
            : new s(this.level - 1, this.row >> 1, this.col >> 1, this.world);
        }
        getChildKeys() {
          const e = this.level + 1,
            t = this.row << 1,
            r = this.col << 1,
            i = this.world;
          return [
            new s(e, t, r, i),
            new s(e, t, r + 1, i),
            new s(e, t + 1, r, i),
            new s(e, t + 1, r + 1, i),
          ];
        }
        compareRowMajor(e) {
          return this.row < e.row
            ? -1
            : this.row > e.row
            ? 1
            : this.col < e.col
            ? -1
            : this.col > e.col
            ? 1
            : 0;
        }
      }
      s.pool = new i.O(s, null, null, 25, 50);
    },
    43022: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => f,
        b: () => h,
        c: () => _,
        d: () => u,
        e: () => y,
        f: () => v,
        i: () => w,
        l: () => p,
        m: () => b,
        o: () => g,
        p: () => c,
        r: () => m,
        s: () => S,
        u: () => d,
      });
      var i = r(93314),
        s = r(21801),
        o = r(60947),
        l = r(38742),
        n = r(47842),
        a = r(34394);
      const u = {
          type: Boolean,
          value: !0,
          json: {
            origins: { service: { read: !1, write: !1 }, 'web-map': { read: !1, write: !1 } },
            name: 'screenSizePerspective',
            write: !0,
          },
        },
        c = {
          type: Boolean,
          value: !0,
          json: {
            name: 'disablePopup',
            read: { reader: (e, t) => !t.disablePopup },
            write: {
              enabled: !0,
              writer(e, t, r) {
                t[r] = !e;
              },
            },
          },
        },
        p = { type: Boolean, value: !0, json: { name: 'showLabels', write: !0 } },
        d = {
          type: String,
          json: {
            origins: { 'portal-item': { write: !1 } },
            write: { isRequired: !0, ignoreOrigin: !0, writer: l.w },
          },
        },
        h = {
          type: Boolean,
          value: !0,
          json: { origins: { service: { read: { enabled: !1 } } }, name: 'showLegend', write: !0 },
        },
        y = {
          value: null,
          type: n.E,
          json: {
            origins: { service: { name: 'elevationInfo', write: !0 } },
            name: 'layerDefinition.elevationInfo',
            write: !0,
          },
        };
      function m(e) {
        return { type: e, readOnly: !0, json: { origins: { service: { read: !0 } }, read: !1 } };
      }
      const g = {
          type: Number,
          json: {
            origins: {
              'web-document': { default: 1, write: !0, read: !0 },
              'portal-item': { write: !0 },
            },
          },
        },
        f = {
          ...g,
          json: {
            ...g.json,
            origins: {
              'web-document': {
                ...g.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, a.t)(t.layerDefinition.drawingInfo.transparency)
                    : void 0
                  : (0, a.t)(t.drawingInfo.transparency),
            },
          },
        },
        v = {
          type: i.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,
              i = this.layer.timeExtent,
              s = this.layer.useViewTime ? (r && i ? r.intersection(i) : r || i) : i;
            if (!s || s.isEmpty) return s;
            const o = this.layer.timeOffset,
              l = o ? s.offset(-o.value, o.unit) : s,
              n = this._get('timeExtent');
            return l.equals(n) ? n : l;
          },
        },
        S = {
          type: s.Z,
          readOnly: !0,
          json: {
            origins: {
              service: {
                read: {
                  source: ['fullExtent', 'spatialReference'],
                  reader: (e, t) => {
                    const r = s.Z.fromJSON(e);
                    return (
                      null != t.spatialReference &&
                        'object' == typeof t.spatialReference &&
                        (r.spatialReference = o.Z.fromJSON(t.spatialReference)),
                      r
                    );
                  },
                },
              },
            },
            read: !1,
          },
        },
        w = {
          type: String,
          json: { origins: { service: { read: !1 }, 'portal-item': { read: !1 } } },
        },
        b = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.minScale' },
            write: { target: 'layerDefinition.minScale' },
          },
        },
        _ = {
          type: Number,
          json: {
            origins: { service: { write: { enabled: !1 } } },
            read: { source: 'layerDefinition.maxScale' },
            write: { target: 'layerDefinition.maxScale' },
          },
        };
    },
    69586: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => o });
      var i = r(32101),
        s = r(49900);
      function o(e) {
        return {
          origin: 'portal-item',
          url: (0, i.mN)(e.itemUrl),
          portal: e.portal || s.Z.getDefault(),
          portalItem: e,
          readResourcePaths: [],
        };
      }
    },
    34394: (e, t, r) => {
      'use strict';
      r.d(t, { o: () => s, t: () => o });
      var i = r(91306);
      function s(e) {
        const t = (0, i.m)(100 * (1 - e));
        return Math.max(0, Math.min(t, 100));
      }
      function o(e) {
        const t = 1 - e / 100;
        return Math.max(0, Math.min(t, 1));
      }
    },
    38742: (e, t, r) => {
      'use strict';
      r.d(t, { f: () => o, i: () => p, p: () => h, r: () => n, t: () => l, w: () => a });
      var i = r(76506),
        s = r(32101);
      function o(e, t) {
        const r = t && t.url && t.url.path;
        if (
          e &&
          r &&
          ((e = (0, s.hF)(e, r, { preserveProtocolRelative: !0 })),
          t.portalItem && t.readResourcePaths)
        ) {
          const r = (0, s.PF)(e, t.portalItem.itemUrl);
          c.test(r) && t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path);
        }
        return d(e, t && t.portal);
      }
      function l(e, t, r = 0) {
        if (!e) return e;
        !(0, s.YP)(e) && t && t.blockedRelativeUrls && t.blockedRelativeUrls.push(e);
        let i = (0, s.hF)(e);
        if (t) {
          const r =
            (t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.rootPath) ||
            (t.url && t.url.path);
          if (r) {
            const o = d(r, t.portal);
            (i = (0, s.PF)(d(i, t.portal), o, o)),
              i !== e && t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.writtenUrls.push(i);
          }
        }
        return (
          (i = (function (e, t) {
            return t && !t.isPortal && t.urlKey && t.customBaseUrl
              ? (0, s.Ie)(e, `${t.urlKey}.${t.customBaseUrl}`, t.portalHostname)
              : e;
          })(i, t && t.portal)),
          (0, s.YP)(i) && (i = (0, s.Fv)(i)),
          null != t &&
            t.resources &&
            null != t &&
            t.portalItem &&
            !(0, s.YP)(i) &&
            !(0, s.HK)(i) &&
            0 === r &&
            t.resources.toKeep.push({ resource: t.portalItem.resourceFromPath(i) }),
          i
        );
      }
      function n(e, t, r) {
        return o(e, r);
      }
      function a(e, t, r, i) {
        const s = l(e, i);
        void 0 !== s && (t[r] = s);
      }
      const u = /\/items\/([^\/]+)\/resources\//,
        c = /^\.\/resources\//;
      function p(e) {
        const t = (0, i.i)(e) ? e.match(u) : null;
        return (0, i.i)(t) ? t[1] : null;
      }
      function d(e, t) {
        if (!t || t.isPortal || !t.urlKey || !t.customBaseUrl) return e;
        const r = `${t.urlKey}.${t.customBaseUrl}`;
        return (0, s.D6)(s.Gd, `${s.Gd.scheme}://${r}`)
          ? (0, s.Ie)(e, t.portalHostname, r)
          : (0, s.Ie)(e, r, t.portalHostname);
      }
      var h = Object.freeze({
        __proto__: null,
        fromJSON: o,
        toJSON: l,
        read: n,
        write: a,
        itemIdFromResourceUrl: p,
      });
    },
    35197: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => n, o: () => o, t: () => l }), r(76506);
      const i = {
          milliseconds: 1,
          seconds: 1e3,
          minutes: 6e4,
          hours: 36e5,
          days: 864e5,
          weeks: 6048e5,
          months: 26784e5,
          years: 31536e6,
          decades: 31536e7,
          centuries: 31536e8,
        },
        s = {
          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 o(e, t, r) {
        const i = new Date(e.getTime());
        if (t && r) {
          const e = s[r],
            { getter: o, setter: l, multiplier: n } = e;
          i[l](i[o]() + t * n);
        }
        return i;
      }
      function l(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 n(e, t, r) {
        return 0 === e ? 0 : (e * i[t]) / i[r];
      }
    },
    17298: (e, t, r) => {
      'use strict';
      r.d(t, { s: () => s });
      var i = r(85557);
      const s = (function () {
        const e = Object.keys(i.m);
        return e.sort(), e;
      })();
    },
    41617: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => w });
      var i = r(29768),
        s = r(31450),
        o = (r(74569), r(82058)),
        l = r(60991),
        n = r(76996),
        a = r(82673),
        u = r(22739),
        c = r(92143),
        p = r(50406),
        d = r(32101),
        h = r(34250),
        y = (r(76506), r(91306), r(17533)),
        m = r(21801),
        g = 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 = c.L.getLogger('esri.layers.Layer');
      let S = class extends n.E.EventedMixin((0, a.I)(u.L)) {
        constructor() {
          super(...arguments),
            (this.attributionDataUrl = null),
            (this.fullExtent = new m.Z(-180, -90, 180, 90, g.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 = g.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,
            i = await r.e(6601).then(r.bind(r, 66601));
          try {
            return await i.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 },
            i = await r.e(6458).then(r.bind(r, 36458));
          try {
            return await i.fromItem(t);
          } catch (e) {
            const r = t && t.portalItem,
              i = (r && r.id) || 'unset',
              o = (r && r.portal && r.portal.url) || s.Z.portalUrl;
            throw (
              (v.error(
                '#fromPortalItem()',
                "Failed to create layer from portal item (portal: '" + o + "', id: '" + i + "')",
                e,
              ),
              e)
            );
          }
        }
        initialize() {
          this.when().catch((e) => {
            var t, r;
            (0, p.D_)(e) ||
              c.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, d.mN)(e) : null;
        }
        async fetchAttributionData() {
          const e = this.attributionDataUrl;
          if (this.hasAttributionData && e)
            return (await (0, o.default)(e, { query: { f: 'json' }, responseType: 'json' })).data;
          throw new l.Z('layer:no-attribution-data', 'Layer does not have attribution data');
        }
      };
      (0, i._)([(0, h.Cb)({ type: String })], S.prototype, 'attributionDataUrl', void 0),
        (0, i._)([(0, h.Cb)({ type: m.Z })], S.prototype, 'fullExtent', void 0),
        (0, i._)([(0, h.Cb)({ readOnly: !0 })], S.prototype, 'hasAttributionData', null),
        (0, i._)([(0, h.Cb)({ type: String })], S.prototype, 'id', void 0),
        (0, i._)(
          [(0, h.Cb)({ type: Boolean, nonNullable: !0 })],
          S.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, i._)(
          [(0, h.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          S.prototype,
          'listMode',
          void 0,
        ),
        (0, i._)(
          [(0, h.Cb)({ type: Number, range: { min: 0, max: 1 }, nonNullable: !0 })],
          S.prototype,
          'opacity',
          void 0,
        ),
        (0, i._)([(0, h.Cb)()], S.prototype, 'parent', void 0),
        (0, i._)([(0, h.Cb)({ readOnly: !0 })], S.prototype, 'parsedUrl', null),
        (0, i._)([(0, h.Cb)({ type: Boolean })], S.prototype, 'popupEnabled', void 0),
        (0, i._)([(0, h.Cb)({ type: Boolean })], S.prototype, 'attributionVisible', void 0),
        (0, i._)([(0, h.Cb)({ type: g.Z })], S.prototype, 'spatialReference', void 0),
        (0, i._)([(0, h.Cb)({ type: String })], S.prototype, 'title', void 0),
        (0, i._)(
          [(0, h.Cb)({ type: String, readOnly: !0, json: { read: !1 } })],
          S.prototype,
          'type',
          void 0,
        ),
        (0, i._)([(0, h.Cb)()], S.prototype, 'url', void 0),
        (0, i._)([(0, h.Cb)({ type: Boolean, nonNullable: !0 })], S.prototype, 'visible', void 0),
        (S = (0, i._)([(0, y.j)('esri.layers.Layer')], S));
      const w = S;
    },
    78326: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => H });
      var i = r(29768),
        s = r(82058),
        o = r(60991),
        l = r(76506),
        n = r(54179),
        a = r(50406),
        u = r(32101),
        c = r(34250),
        p = (r(91306), r(92143)),
        d = r(97714),
        h = r(17533),
        y = r(2906),
        m = r(21801),
        g = r(60947),
        f = r(41617),
        v = r(66655),
        S = r(75025),
        w = r(11118),
        b = r(89440),
        _ = r(62162),
        I = r(58912),
        x = r(43352),
        T = r(9411),
        C = r(31450),
        L = r(47706),
        E = r(6687);
      class O {
        constructor(e) {
          if (e instanceof T.T) this._tilemapCache = e;
          else {
            if (!e || !('index' in e)) throw new Error('Invalid tilemap!');
            this._tilemap = e.index;
          }
        }
        dataKey(e, t) {
          if (this._tilemapCache) {
            const { level: r, row: i, col: s } = e,
              o = new E.T(e);
            return this._tilemapCache
              .fetchAvailabilityUpsample(r, i, s, o, t)
              .then(() => ((o.world = e.world), o))
              .catch((e) => {
                if ((0, a.D_)(e)) throw e;
                return null;
              });
          }
          return this._getIndexedDataKey(e);
        }
        forEach(e, t, r, i, s) {
          (this._callback = s), (this._maxLevel = t + e), this._forEach(this._tilemap, t, r, i);
        }
        _forEach(e, t, r, i) {
          0 !== e &&
            (this._callback(t, r, i),
            t !== this._maxLevel &&
              'object' == typeof e &&
              (this._forEach(e[0], t + 1, 2 * r, 2 * i),
              this._forEach(e[1], t + 1, 2 * r, 2 * i + 1),
              this._forEach(e[2], t + 1, 2 * r + 1, 2 * i),
              this._forEach(e[3], t + 1, 2 * r + 1, 2 * i + 1)));
        }
        _getIndexedDataKey(e) {
          const t = [e];
          if (e.level < 0 || e.row < 0 || e.col < 0 || e.row >> e.level > 0 || e.col >> e.level > 0)
            return Promise.resolve(null);
          let r = e;
          for (; 0 !== r.level; )
            (r = new E.T(r.level - 1, r.row >> 1, r.col >> 1, r.world)), t.push(r);
          let i,
            s,
            o = this._tilemap,
            l = t.pop();
          if (1 === o) return Promise.resolve(l);
          for (; t.length; )
            if (((i = t.pop()), (s = (1 & i.col) + ((1 & i.row) << 1)), o)) {
              if (0 === o[s]) {
                l = null;
                break;
              }
              if (1 === o[s]) {
                l = i;
                break;
              }
              (l = i), (o = o[s]);
            }
          return Promise.resolve(l);
        }
      }
      var M = r(69586),
        P = r(92817);
      class R {
        constructor(e, t) {
          (this.lockedSchemaPixelSize = e), (this.isGCS = t);
        }
        getLevelRowColumn(e) {
          return this.isGCS
            ? [e[0], e[1] >> 1, e[2] >> 1]
            : 256 === this.lockedSchemaPixelSize && e[0] > 0
            ? [e[0] - 1, e[1] >> 1, e[2] >> 1]
            : e;
        }
        adjustLevel(e) {
          return this.isGCS ? e : 256 === this.lockedSchemaPixelSize ? (e > 0 ? e - 1 : 0) : e;
        }
        getShift(e, t) {
          let r = 0,
            i = 0;
          return (
            (256 === this.lockedSchemaPixelSize || this.isGCS) &&
              (e[2] % 2 && (r = t), e[1] % 2 && (i = t)),
            [r, i]
          );
        }
        getScale(e) {
          if (this.isGCS) {
            if (512 === this.lockedSchemaPixelSize) return 4;
          } else if (256 === this.lockedSchemaPixelSize && 0 === e) return 1;
          return 2;
        }
        static create256x256CompatibleTileInfo(e) {
          if (!e) return null;
          if (256 === e.size[0] && 256 === e.size[1]) return e;
          const t = e.spatialReference.isGeographic,
            r = [],
            i = e.lods.length;
          for (let s = 0; s < i; s++) {
            const i = e.lods[s],
              o = t ? i.resolution : 2 * i.resolution;
            r.push(new P.Z({ level: i.level, scale: i.scale, resolution: o }));
          }
          return new x.Z({
            size: [256, 256],
            dpi: e.dpi,
            format: e.format,
            compressionQuality: e.compressionQuality,
            origin: e.origin,
            spatialReference: e.spatialReference,
            lods: r,
          });
        }
        static create512x512CompatibleTileInfo(e) {
          if (!e) return null;
          if (256 === e.size[0] || 256 === e.size[1]) return null;
          const t = [],
            r = e.lods.length;
          for (let i = 0; i < r; i++) {
            const r = e.lods[i],
              s = 0.5 * r.resolution;
            t.push(new P.Z({ level: r.level, scale: r.scale, resolution: s }));
          }
          return new x.Z({
            size: [512, 512],
            dpi: e.dpi,
            format: e.format,
            compressionQuality: e.compressionQuality,
            origin: e.origin,
            spatialReference: e.spatialReference,
            lods: t,
          });
        }
      }
      var U = r(96611);
      function j(e, t = {}, r) {
        let i;
        switch (r) {
          case 'webgl':
            i = ['webgl', 'experimental-webgl', 'webkit-3d', 'moz-webgl'];
            break;
          case 'webgl2':
            i = ['webgl2'];
            break;
          default:
            i = ['webgl', 'experimental-webgl', 'webkit-3d', 'moz-webgl'];
        }
        let s = null;
        for (const r of i) {
          try {
            s = e.getContext(r, t);
          } catch (e) {}
          if (s) break;
        }
        return s;
      }
      let D;
      function A() {
        return (
          D ||
            (D = (function () {
              const e = {
                available: !1,
                version: 0,
                majorPerformanceCaveat: !1,
                maxTextureSize: 0,
                supportsHighPrecisionFragment: !1,
                supportsVertexShaderSamplers: !1,
                supportsElementIndexUint: !1,
                supportsStandardDerivatives: !1,
                supportsInstancedArrays: !1,
                supportsTextureFloat: !1,
                supportsColorBufferFloat: !1,
              };
              if (void 0 === typeof WebGLRenderingContext) return e;
              const t = document.createElement('canvas');
              if (!t) return e;
              let r = j(t, { failIfMajorPerformanceCaveat: !0 }, 'webgl');
              if ((r || ((r = j(t, {}, 'webgl')), r && (e.majorPerformanceCaveat = !0)), !r))
                return e;
              const i = r.getParameter(r.VERSION);
              if (!i) return e;
              const s = i.match(/^WebGL\s+([\d.]*)/);
              if (s) {
                const t = parseFloat(s[1]);
                e.available = t >= 0.94;
                const i = r.getShaderPrecisionFormat(r.FRAGMENT_SHADER, r.HIGH_FLOAT);
                i && (e.supportsHighPrecisionFragment = i.precision > 0),
                  (e.supportsVertexShaderSamplers =
                    r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS) > 0),
                  (e.supportsElementIndexUint = null !== r.getExtension('OES_element_index_uint')),
                  (e.supportsStandardDerivatives =
                    null !== r.getExtension('OES_standard_derivatives')),
                  (e.supportsInstancedArrays = null !== r.getExtension('ANGLE_instanced_arrays')),
                  (e.supportsTextureFloat = null !== r.getExtension('OES_texture_float')),
                  (e.supportsColorBufferFloat =
                    null !== r.getExtension('WEBGL_color_buffer_float') &&
                    null !== r.getExtension('EXT_float_blend'));
              }
              return (
                (e.maxTextureSize = r.getParameter(r.MAX_TEXTURE_SIZE)),
                (e.version = (function () {
                  if (void 0 === typeof WebGL2RenderingContext) return !1;
                  const e = document.createElement('canvas');
                  return !!e && !!j(e, {}, 'webgl2');
                })()
                  ? 2
                  : 1),
                e
              );
            })()),
          D
        );
      }
      r(88762),
        r(71552),
        r(40642),
        r(81172),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50161),
        r(26341),
        r(73796),
        r(74673),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(74569),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(76996),
        r(82673),
        r(22739),
        r(20543),
        r(21132),
        r(38742),
        r(43022),
        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(53785),
        r(95587),
        r(34394),
        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(92482),
        r(82933),
        r(15324),
        r(89241),
        r(91700),
        r(617),
        r(48027),
        r(54174),
        r(82426),
        r(79682),
        r(82356);
      const N = p.L.getLogger('esri.layers.support.SpriteSource');
      class F {
        constructor(e, t, r, i) {
          (this.baseURL = e),
            (this.devicePixelRatio = t),
            (this.maxTextureSize = r),
            (this._spriteImageFormat = i),
            (this._isRetina = !1),
            (this._spritesData = {}),
            (this.image = null),
            (this.width = null),
            (this.height = null),
            (this.loadStatus = 'not-loaded');
        }
        get spriteNames() {
          const e = [];
          for (const t in this._spritesData) e.push(t);
          return e.sort(), e;
        }
        getSpriteInfo(e) {
          return this._spritesData[e];
        }
        async load(e) {
          if (this.baseURL) {
            this.loadStatus = 'loading';
            try {
              await this._loadSprites(e), (this.loadStatus = 'loaded');
            } catch {
              this.loadStatus = 'failed';
            }
          } else this.loadStatus = 'failed';
        }
        _loadSprites(e) {
          this._isRetina = this.devicePixelRatio > 1.15;
          const t = (0, u.mN)(this.baseURL),
            r = t.query ? '?' + (0, u.B7)(t.query) : '',
            i = this._isRetina ? '@2x' : '',
            l = `${t.path}${i}.${this._spriteImageFormat}${r}`,
            n = `${t.path}${i}.json${r}`;
          return Promise.all([
            (0, s.default)(n, e),
            (0, s.default)(l, { responseType: 'image', ...e }),
          ]).then(([e, r]) => {
            const i = Object.keys(e.data);
            if (!i || 0 === i.length || (1 === i.length && '_ssl' === i[0]) || !r || !r.data)
              return (
                (this._spritesData = this.image = null),
                (this.width = this.height = 0),
                Promise.resolve(null)
              );
            this._spritesData = e.data;
            const s = r.data,
              l = Math.max(this.maxTextureSize, 4096);
            if (s.width > l || s.height > l) {
              const e = `Sprite resource for style ${t.path} is bigger than the maximum allowed of ${l} pixels}`;
              throw (N.error(e), new o.Z('SpriteSource', e));
            }
            (this.width = s.width), (this.height = s.height);
            const n = document.createElement('canvas'),
              a = n.getContext('2d');
            (n.width = s.width), (n.height = s.height), a.drawImage(s, 0, 0, s.width, s.height);
            const u = a.getImageData(0, 0, s.width, s.height),
              c = new Uint8Array(u.data);
            let p;
            for (let e = 0; e < c.length; e += 4)
              (p = c[e + 3] / 255),
                (c[e] = c[e] * p),
                (c[e + 1] = c[e + 1] * p),
                (c[e + 2] = c[e + 2] * p);
            this.image = c;
          });
        }
      }
      class G {
        constructor(e, t, r) {
          (this.tileMapURL = ''),
            (this.tilemapCache = null),
            (this.parsedUrl = null),
            (this.tileInfo = null),
            (this.capabilities = null),
            (this.tileIndex = null),
            (this.fullExtent = null),
            (this.name = e),
            (this.sourceUrl = t),
            t && (this.parsedUrl = (0, u.mN)(this.sourceUrl));
          const i = this.parsedUrl.path,
            s = this.parsedUrl.query ? '?' + (0, u.B7)(this.parsedUrl.query) : '',
            o = (0, l.d9)(r),
            n = o.tiles;
          t &&
            n.forEach((e, t) => {
              (0, u.YP)(e) || (n[t] = (0, u.v_)(i, e) + s);
            }),
            (this.tileServers = n),
            r.tileMap && (this.tileMapURL = (0, u.v_)(t, r.tileMap));
          const a = r.capabilities && r.capabilities.split(',').map((e) => e.toLowerCase().trim()),
            c = !!r.exportTilesAllowed,
            p = !!a && -1 !== a.indexOf('tilemap'),
            d = c && r.hasOwnProperty('maxExportTilesCount') ? r.maxExportTilesCount : 0;
          (this.capabilities = {
            operations: { supportsExportTiles: c, supportsTileMap: p },
            exportTiles: c ? { maxExportTilesCount: +d } : null,
          }),
            (this.tileInfo = (0, L.r)(o.tileInfo, o, null, { ignoreMinMaxLOD: !0 })),
            p &&
              ((this.type = 'vector-tile'),
              (this.tilemapCache = new T.T({ layer: this })),
              this.tilemapCache && (this.tileIndex = new O(this.tilemapCache))),
            (this.fullExtent = m.Z.fromJSON(r.fullExtent));
        }
        getRefKey(e, t) {
          return this.tileIndex ? this.tileIndex.dataKey(e, t) : Promise.resolve(e);
        }
        getSourceTileUrl(e, t, r) {
          let i = this.tileServers[t % this.tileServers.length];
          return (
            (i = i
              .replace(/\{z\}/gi, e.toString())
              .replace(/\{y\}/gi, t.toString())
              .replace(/\{x\}/gi, r.toString())),
            i
          );
        }
        isCompatibleWith(e) {
          const t = this.tileInfo,
            r = e.tileInfo;
          if (!t.spatialReference.equals(r.spatialReference)) return !1;
          if (!t.origin.equals(r.origin)) return !1;
          if (Math.round(t.dpi) !== Math.round(r.dpi)) return !1;
          const i = t.lods,
            s = r.lods,
            o = Math.min(i.length, s.length);
          for (let e = 0; e < o; e++) {
            const t = i[e],
              r = s[e];
            if (t.level !== r.level || Math.round(t.scale) !== Math.round(r.scale)) return !1;
          }
          return !0;
        }
      }
      const $ = C.Z.defaults && C.Z.defaults.io.corsEnabledServers;
      function k(e) {
        if (!e) return;
        const t = (0, u.P$)(e);
        $ && -1 === $.indexOf(t) && $.push(t);
      }
      function B(...e) {
        let t;
        for (let r = 0; r < e.length; ++r)
          if ((0, u.oC)(e[r])) {
            if (t) {
              const i = t.split('://')[0];
              t = i + ':' + e[r].trim();
            }
          } else t = (0, u.YP)(e[r]) ? e[r] : (0, u.v_)(t, e[r]);
        return (0, u.Qj)(t);
      }
      async function Z(e, t, r, i, o) {
        let l, n, c;
        if (((0, a.k_)(o), 'string' == typeof r)) {
          const e = (0, u.Fv)(r);
          k(e);
          const t = (0, u.mN)(e);
          (c = await (0, s.default)(t.path, { query: { f: 'json' }, responseType: 'json', ...o })),
            (l = e),
            (n = e);
        } else (c = { data: r }), (l = r.jsonUrl || null), (n = i);
        const p = c.data;
        return (
          c.ssl &&
            (l && (l = l.replace(/^http:/i, 'https:')), n && (n = n.replace(/^http:/i, 'https:'))),
          z(p)
            ? ((e.styleUrl = l || null),
              (async function (e, t, r, i) {
                const s = r ? (0, u.Yd)(r) : u.AX;
                (e.styleBase = s),
                  (e.style = t),
                  e.styleUrl && k(e.styleUrl),
                  t['sprite-format'] &&
                    'webp' === t['sprite-format'].toLowerCase() &&
                    (e.spriteFormat = 'webp');
                const o = [];
                if (t.sources && t.sources.esri) {
                  const r = t.sources.esri;
                  r.url
                    ? await Z(e, 'esri', B(s, r.url), void 0, i)
                    : o.push(Z(e, 'esri', r, s, i));
                }
                for (const r of Object.keys(t.sources))
                  'esri' !== r &&
                    'vector' === t.sources[r].type &&
                    (t.sources[r].url
                      ? o.push(Z(e, r, B(s, t.sources[r].url), void 0, i))
                      : t.sources[r].tiles && o.push(Z(e, r, t.sources[r], s, i)));
                await Promise.all(o);
              })(e, p, n, o))
            : z(p)
            ? Promise.reject('You must specify the URL or the JSON for a service or for a style.')
            : e.sourceUrl
            ? V(e, p, n, !1, t, o)
            : ((e.sourceUrl = l || null), V(e, p, n, !0, t, o))
        );
      }
      function z(e) {
        return !!e.sources;
      }
      async function V(e, t, r, i, s, o) {
        const l = r ? (0, u.Qj)(r) + '/' : u.AX,
          n = (function (e, t) {
            if (e.hasOwnProperty('tileInfo')) return e;
            const r = {
              xmin: -20037507.067161843,
              ymin: -20037507.067161843,
              xmax: 20037507.067161843,
              ymax: 20037507.067161843,
              spatialReference: { wkid: 102100 },
            };
            let i = 78271.51696400007,
              s = 295828763.7957775;
            const o = [],
              l = e.hasOwnProperty('minzoom') ? parseFloat(e.minzoom) : 0,
              n = e.hasOwnProperty('maxzoom') ? parseFloat(e.maxzoom) : 22;
            for (let e = 0; e <= n; e++)
              e >= l && o.push({ level: e, scale: s, resolution: i }), (i /= 2), (s /= 2);
            for (const r of e.tiles) k(B(t, r));
            return {
              capabilities: 'TilesOnly',
              initialExtent: r,
              fullExtent: r,
              minScale: 0,
              maxScale: 0,
              tiles: e.tiles,
              tileInfo: {
                rows: 512,
                cols: 512,
                dpi: 96,
                format: 'pbf',
                origin: { x: -20037508.342787, y: 20037508.342787 },
                lods: o,
                spatialReference: { wkid: 102100 },
              },
            };
          })(t, l),
          a = new G(s, l, n);
        if (!i && e.primarySourceName in e.sourceNameToSource) {
          const t = e.sourceNameToSource[e.primarySourceName];
          if (!t.isCompatibleWith(a)) return Promise.resolve();
          null != a.fullExtent &&
            (null != t.fullExtent
              ? t.fullExtent.union(a.fullExtent)
              : (t.fullExtent = a.fullExtent.clone())),
            t.tileInfo.lods.length < a.tileInfo.lods.length && (t.tileInfo = a.tileInfo);
        }
        if (
          (i
            ? ((e.sourceBase = l),
              (e.source = t),
              (e.validatedSource = n),
              (e.primarySourceName = s),
              e.sourceUrl && k(e.sourceUrl))
            : k(l),
          (e.sourceNameToSource[s] = a),
          !e.style)
        )
          return null == t.defaultStyles
            ? Promise.reject()
            : 'string' == typeof t.defaultStyles
            ? Z(e, '', B(l, t.defaultStyles, 'root.json'), void 0, o)
            : Z(e, '', t.defaultStyles, B(l, 'root.json'), o);
      }
      function W(e, t) {
        if (e === t) return !0;
        if (!e && null != t) return !1;
        if (null != e && !t) return !1;
        if (!e.spatialReference.equals(t.spatialReference) || e.dpi !== t.dpi) return !1;
        const r = e.origin,
          i = t.origin;
        if (Math.abs(r.x - i.x) >= 1e-6 || Math.abs(r.y - i.y) >= 1e-6) return !1;
        let s, o;
        e.lods[0].scale > t.lods[0].scale ? ((s = e), (o = t)) : ((o = e), (s = t));
        for (let e = s.lods[0].scale; e >= o.lods[o.lods.length - 1].scale - 1e-6; e /= 2)
          if (Math.abs(e - o.lods[0].scale) < 1e-6) return !0;
        return !1;
      }
      function Y(e, t) {
        if (e === t) return e;
        if (!e && null != t) return t;
        if (null != e && !t) return e;
        const r = e.size[0],
          i = e.format,
          s = e.dpi,
          o = { x: e.origin.x, y: e.origin.y },
          l = e.spatialReference.toJSON(),
          n = e.lods[0].scale > t.lods[0].scale ? e.lods[0] : t.lods[0],
          a =
            e.lods[e.lods.length - 1].scale <= t.lods[t.lods.length - 1].scale
              ? e.lods[e.lods.length - 1]
              : t.lods[t.lods.length - 1],
          u = n.scale,
          c = n.resolution,
          p = a.scale,
          d = [];
        let h = u,
          y = c,
          m = 0;
        for (; h > p; ) d.push({ level: m, resolution: y, scale: h }), m++, (h /= 2), (y /= 2);
        return new x.Z({
          size: [r, r],
          dpi: s,
          format: i || 'pbf',
          origin: o,
          lods: d,
          spatialReference: l,
        });
      }
      let q = class extends (0, w.B)(
        (0, I.S)((0, v.A)((0, S.A)((0, b.O)((0, _.P)((0, n.M)(f.Z)))))),
      ) {
        constructor(...e) {
          super(...e),
            (this._spriteSourceMap = new Map()),
            (this.currentStyleInfo = null),
            (this.style = null),
            (this.isReference = null),
            (this.operationalLayerType = 'VectorTileLayer'),
            (this.type = 'vector-tile'),
            (this.url = null);
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { url: e, ...t } : e;
        }
        destroy() {
          this._spriteSourceMap.clear();
        }
        async prefetchResources(e) {
          await this.loadSpriteSource(l.g.devicePixelRatio || 1, e);
        }
        load(e) {
          const t = this.loadFromPortal(
            { supportedTypes: ['Vector Tile Service'], supportsData: !1 },
            e,
          )
            .catch(a.r9)
            .then(async () => {
              if (!this.portalItem || !this.portalItem.id) return;
              const t = `${this.portalItem.itemUrl}/resources/styles/root.json`;
              (await (0, s.default)(t, { ...e, query: { f: 'json' } })).data &&
                this.read({ url: t }, (0, M.c)(this.portalItem));
            })
            .catch(a.r9)
            .then(() => this._loadStyle(e));
          return this.addResolvingPromise(t), Promise.resolve(this);
        }
        get attributionDataUrl() {
          const e = this.currentStyleInfo,
            t = e && e.serviceUrl && (0, u.mN)(e.serviceUrl);
          return t ? this._getDefaultAttribution(t.path) : null;
        }
        get capabilities() {
          const e = this._getPrimarySource();
          return e
            ? e.capabilities
            : { operations: { supportsExportTiles: !1, supportsTileMap: !1 }, exportTiles: null };
        }
        get fullExtent() {
          const e = this._getPrimarySource();
          return e ? e.fullExtent : null;
        }
        get parsedUrl() {
          return this.serviceUrl ? (0, u.mN)(this.serviceUrl) : null;
        }
        get serviceUrl() {
          return (this.currentStyleInfo && this.currentStyleInfo.serviceUrl) || null;
        }
        get spatialReference() {
          return (this.tileInfo && this.tileInfo.spatialReference) || null;
        }
        get styleUrl() {
          return (this.currentStyleInfo && this.currentStyleInfo.styleUrl) || null;
        }
        writeStyleUrl(e, t) {
          e && (0, u.oC)(e) && (e = `https:${e}`), (t.styleUrl = e);
        }
        get tileIndexType() {
          const e = this._getPrimarySource();
          return e ? e.type : '';
        }
        get tileIndexUrl() {
          const e = this._getPrimarySource();
          return e ? e.tileMapURL : '';
        }
        get tileInfo() {
          var e;
          const t = [];
          for (const e in this.sourceNameToSource) t.push(this.sourceNameToSource[e]);
          let r = (null == (e = this._getPrimarySource()) ? void 0 : e.tileInfo) || new x.Z();
          if (t.length > 1)
            for (let e = 0; e < t.length; e++) W(r, t[e].tileInfo) && (r = Y(r, t[e].tileInfo));
          return r;
        }
        get tilemapCache() {
          const e = this._getPrimarySource();
          return e && e.capabilities.operations.supportsTileMap ? e.tilemapCache : null;
        }
        get tileServers() {
          const e = this._getPrimarySource();
          return e ? e.tileServers : [];
        }
        readVersion(e, t) {
          return t.version ? parseFloat(t.version) : parseFloat(t.currentVersion);
        }
        get compatibleTileInfo256() {
          return R.create256x256CompatibleTileInfo(this.tileInfo);
        }
        get compatibleTileInfo512() {
          return R.create512x512CompatibleTileInfo(this.tileInfo);
        }
        async loadSpriteSource(e = 1, t) {
          if (!this._spriteSourceMap.has(e)) {
            const r = A(),
              i = new F(
                this.styleRepository.sprite,
                e,
                r.maxTextureSize,
                this.currentStyleInfo.spriteFormat,
              );
            await i.load(t), this._spriteSourceMap.set(e, i);
          }
          return Promise.resolve(this._spriteSourceMap.get(e));
        }
        async loadStyle(e, t) {
          const r = e || this.style || this.url;
          if (
            this._loadingPromise &&
            'string' == typeof r &&
            this.url === r &&
            !(0, a.Hc)(this._abortController)
          )
            return this._loadingPromise;
          const i = this._abortController;
          i && i.abort();
          const s = (0, a.yi)();
          return (
            (this._loadingPromise = new Promise((e, i) => {
              const o = { signal: s.signal };
              this._spriteSourceMap.clear(),
                this._getSourceAndStyle(r, o).then(e, i),
                (0, a.fu)(t, () => {
                  s.abort();
                });
            })),
            (this._abortController = s),
            this._loadingPromise
          );
        }
        getStyleLayerId(e) {
          return this.styleRepository.getStyleLayerId(e);
        }
        getStyleLayerIndex(e) {
          return this.styleRepository.getStyleLayerIndex(e);
        }
        getPaintProperties(e) {
          return (0, l.d9)(this.styleRepository.getPaintProperties(e));
        }
        setPaintProperties(e, t) {
          const r = this.styleRepository.isPainterDataDriven(e);
          this.styleRepository.setPaintProperties(e, t);
          const i = this.styleRepository.isPainterDataDriven(e);
          this.emit('paint-change', { layer: e, paint: t, isDataDriven: r || i });
        }
        getStyleLayer(e) {
          return (0, l.d9)(this.styleRepository.getStyleLayer(e));
        }
        setStyleLayer(e, t) {
          this.styleRepository.setStyleLayer(e, t),
            this.emit('style-layer-change', { layer: e, index: t });
        }
        deleteStyleLayer(e) {
          this.styleRepository.deleteStyleLayer(e), this.emit('delete-style-layer', { layer: e });
        }
        getLayoutProperties(e) {
          return (0, l.d9)(this.styleRepository.getLayoutProperties(e));
        }
        setLayoutProperties(e, t) {
          this.styleRepository.setLayoutProperties(e, t),
            this.emit('layout-change', { layer: e, layout: t });
        }
        setStyleLayerVisibility(e, t) {
          this.styleRepository.setStyleLayerVisibility(e, t),
            this.emit('style-layer-visibility-change', { layer: e, visibility: t });
        }
        getStyleLayerVisibility(e) {
          return this.styleRepository.getStyleLayerVisibility(e);
        }
        getTileUrl(e, t, r) {
          let i = this.tileServers[t % this.tileServers.length];
          return (
            (i = i
              .replace(/\{z\}/gi, e.toString())
              .replace(/\{y\}/gi, t.toString())
              .replace(/\{x\}/gi, r.toString())),
            i
          );
        }
        write(e, t) {
          return t && t.origin && !this.styleUrl
            ? (t.messages &&
                t.messages.push(
                  new o.Z(
                    'vectortilelayer:unsupported',
                    `VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,
                    { layer: this },
                  ),
                ),
              null)
            : super.write(e, t);
        }
        async _getSourceAndStyle(e, t) {
          if (!e) throw new Error('invalid style!');
          const r = await (async function (e, t) {
            const r = {
                source: null,
                sourceBase: null,
                sourceUrl: null,
                validatedSource: null,
                style: null,
                styleBase: null,
                styleUrl: null,
                sourceNameToSource: {},
                primarySourceName: '',
                spriteFormat: 'png',
              },
              [i, s] = 'string' == typeof e ? [e, null] : [null, e.jsonUrl],
              o = i ? (0, u.mN)(i) : null;
            await Z(r, 'esri', e, s, t);
            const l = {
              layerDefinition: r.validatedSource,
              url: i,
              parsedUrl: o,
              serviceUrl: r.sourceUrl,
              style: r.style,
              styleUrl: r.styleUrl,
              spriteUrl: r.style.sprite && B(r.styleBase, r.style.sprite),
              spriteFormat: r.spriteFormat,
              glyphsUrl: r.style.glyphs && B(r.styleBase, r.style.glyphs),
              sourceNameToSource: r.sourceNameToSource,
              primarySourceName: r.primarySourceName,
            };
            return k(l.spriteUrl), k(l.glyphsUrl), l;
          })(e, t);
          'webp' === r.spriteFormat &&
            ((await (function (e) {
              const t = 'UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA';
              return new Promise((e) => {
                const r = new Image();
                (r.onload = () => {
                  (r.onload = r.onerror = null), e(r.width > 0 && r.height > 0);
                }),
                  (r.onerror = () => {
                    (r.onload = r.onerror = null), e(!1);
                  }),
                  (r.src = 'data:image/webp;base64,' + t);
              });
            })()) ||
              (r.spriteFormat = 'png')),
            this._set('currentStyleInfo', { ...r }),
            'string' == typeof e
              ? ((this.url = e), (this.style = null))
              : ((this.url = null), (this.style = e)),
            this._set('sourceNameToSource', r.sourceNameToSource),
            this._set('primarySourceName', r.primarySourceName),
            this._set('styleRepository', new U.S(r.style, r)),
            this.read(r.layerDefinition, { origin: 'service' }),
            this.emit('load-style', {});
        }
        _getDefaultAttribution(e) {
          const t = e.match(
              /^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i,
            ),
            r = [
              'OpenStreetMap_v2',
              'OpenStreetMap_Daylight_v2',
              'OpenStreetMap_Export_v2',
              'OpenStreetMap_FTS_v2',
              'OpenStreetMap_GCS_v2',
              'World_Basemap',
              'World_Basemap_v2',
              'World_Basemap_Export_v2',
              'World_Basemap_GCS_v2',
              'World_Basemap_WGS84',
              'World_Contours_v2',
            ];
          if (!t) return;
          const i = t[2] && t[2].toLowerCase();
          if (!i) return;
          const s = t[1] || '';
          for (const e of r)
            if (e.toLowerCase().indexOf(i) > -1)
              return (0, u.Fv)(`//static.arcgis.com/attribution/Vector${s}/${e}`);
        }
        _getPrimarySource() {
          return this.sourceNameToSource && this.primarySourceName in this.sourceNameToSource
            ? this.sourceNameToSource[this.primarySourceName]
            : null;
        }
        async _loadStyle(e) {
          return this._loadingPromise ? this._loadingPromise : this.loadStyle(null, e);
        }
      };
      (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'attributionDataUrl', null),
        (0, i._)([(0, c.Cb)({ type: ['show', 'hide'] })], q.prototype, 'listMode', void 0),
        (0, i._)(
          [
            (0, c.Cb)({
              readOnly: !0,
              dependsOn: ['sourceNameToSource', 'primarySourceName'],
              json: { read: !1 },
            }),
          ],
          q.prototype,
          'capabilities',
          null,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'currentStyleInfo', void 0),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0, type: m.Z })],
          q.prototype,
          'fullExtent',
          null,
        ),
        (0, i._)([(0, c.Cb)()], q.prototype, 'style', void 0),
        (0, i._)(
          [
            (0, c.Cb)({
              type: Boolean,
              json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } },
            }),
          ],
          q.prototype,
          'isReference',
          void 0,
        ),
        (0, i._)(
          [(0, c.Cb)({ type: ['VectorTileLayer'] })],
          q.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'parsedUrl', null),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'serviceUrl', null),
        (0, i._)([(0, c.Cb)({ type: g.Z, readOnly: !0 })], q.prototype, 'spatialReference', null),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'styleRepository', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'sourceNameToSource', void 0),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'primarySourceName', void 0),
        (0, i._)(
          [
            (0, c.Cb)({
              type: String,
              readOnly: !0,
              json: {
                write: { ignoreOrigin: !0 },
                origins: { 'web-document': { write: { ignoreOrigin: !0, isRequired: !0 } } },
              },
            }),
          ],
          q.prototype,
          'styleUrl',
          null,
        ),
        (0, i._)(
          [(0, y.w)(['portal-item', 'web-document'], 'styleUrl')],
          q.prototype,
          'writeStyleUrl',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0 })],
          q.prototype,
          'tileIndexType',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0 })],
          q.prototype,
          'tileIndexUrl',
          null,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              json: { read: !1, origins: { service: { read: !1 } } },
              readOnly: !0,
              type: x.Z,
            }),
          ],
          q.prototype,
          'tileInfo',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0, type: T.T })],
          q.prototype,
          'tilemapCache',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0 })],
          q.prototype,
          'tileServers',
          null,
        ),
        (0, i._)(
          [(0, c.Cb)({ json: { read: !1 }, readOnly: !0, value: 'vector-tile' })],
          q.prototype,
          'type',
          void 0,
        ),
        (0, i._)(
          [
            (0, c.Cb)({
              json: {
                origins: {
                  'web-document': { read: { source: 'styleUrl' } },
                  'portal-item': { read: { source: 'url' } },
                },
                write: !1,
                read: !1,
              },
            }),
          ],
          q.prototype,
          'url',
          void 0,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'version', void 0),
        (0, i._)(
          [(0, d.r)('version', ['version', 'currentVersion'])],
          q.prototype,
          'readVersion',
          null,
        ),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'compatibleTileInfo256', null),
        (0, i._)([(0, c.Cb)({ readOnly: !0 })], q.prototype, 'compatibleTileInfo512', null),
        (q = (0, i._)([(0, h.j)('esri.layers.VectorTileLayer')], q));
      const H = q;
    },
  },
]);
