(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [2883],
  {
    59765: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => y, t: () => u });
      var i = r(29768),
        s = r(74673),
        n = r(35197),
        a = r(34250),
        o = (r(76506), r(91306), r(92143), r(17533)),
        l = r(57251);
      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);
      const u = (0, l.s)()({
        esriTimeUnitsMilliseconds: 'milliseconds',
        esriTimeUnitsSeconds: 'seconds',
        esriTimeUnitsMinutes: 'minutes',
        esriTimeUnitsHours: 'hours',
        esriTimeUnitsDays: 'days',
        esriTimeUnitsWeeks: 'weeks',
        esriTimeUnitsMonths: 'months',
        esriTimeUnitsYears: 'years',
        esriTimeUnitsDecades: 'decades',
        esriTimeUnitsCenturies: 'centuries',
        esriTimeUnitsUnknown: void 0,
      });
      var c;
      let p = (c = class extends s.a {
        constructor(e) {
          super(e), (this.value = 0), (this.unit = 'milliseconds');
        }
        toMilliseconds() {
          return (0, n.c)(this.value, this.unit, 'milliseconds');
        }
        clone() {
          return new c({ value: this.value, unit: this.unit });
        }
      });
      (0, i._)(
        [(0, a.Cb)({ type: Number, json: { write: !0 }, nonNullable: !0 })],
        p.prototype,
        'value',
        void 0,
      ),
        (0, i._)(
          [
            (0, a.Cb)({
              type: u.apiValues,
              json: { type: u.jsonValues, read: u.read, write: u.write },
              nonNullable: !0,
            }),
          ],
          p.prototype,
          'unit',
          void 0,
        ),
        (p = c = (0, i._)([(0, o.j)('esri.TimeInterval')], p));
      const y = p;
    },
    19902: (e, t, r) => {
      'use strict';
      r.d(t, { T: () => p });
      var i = r(29768),
        s = r(93314),
        n = r(59765),
        a = r(34250),
        o = (r(76506), r(91306), r(92143), r(97714)),
        l = r(17533),
        u = r(77361),
        c = r(14249);
      const p = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments),
              (this.timeExtent = null),
              (this.timeOffset = null),
              (this.useViewTime = !0);
          }
          readOffset(e, t) {
            const r = t.timeInfo.exportOptions;
            if (!r) return null;
            const i = r.timeOffset,
              s = n.t.fromJSON(r.timeOffsetUnits);
            return i && s ? new n.Z({ value: i, unit: s }) : null;
          }
          set timeInfo(e) {
            (0, c.UF)(e, this.fieldsIndex), this._set('timeInfo', e);
          }
        };
        return (
          (0, i._)(
            [(0, a.Cb)({ type: s.Z, json: { write: !1 } })],
            t.prototype,
            'timeExtent',
            void 0,
          ),
          (0, i._)([(0, a.Cb)({ type: n.Z })], t.prototype, 'timeOffset', void 0),
          (0, i._)(
            [(0, o.r)('service', 'timeOffset', ['timeInfo.exportOptions'])],
            t.prototype,
            'readOffset',
            null,
          ),
          (0, i._)(
            [
              (0, a.Cb)({
                value: null,
                type: u.Z,
                json: { write: !0, origins: { 'web-document': { read: !1, write: !1 } } },
              }),
            ],
            t.prototype,
            'timeInfo',
            null,
          ),
          (0, i._)(
            [
              (0, a.Cb)({
                type: Boolean,
                json: {
                  read: { source: 'timeAnimation' },
                  write: { target: 'timeAnimation' },
                  origins: { 'web-scene': { read: !1, write: !1 } },
                },
              }),
            ],
            t.prototype,
            'useViewTime',
            void 0,
          ),
          (t = (0, i._)([(0, l.j)('esri.layers.mixins.TemporalLayer')], t)),
          t
        );
      };
    },
    21132: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => v,
        b: () => h,
        c: () => d,
        d: () => c,
        e: () => b,
        f: () => y,
        p: () => p,
        s: () => f,
        t: () => m,
        w: () => g,
      });
      var i = r(76506),
        s = r(32101),
        n = r(38742);
      const a = [
          'MapServer',
          'ImageServer',
          'FeatureServer',
          'SceneServer',
          'StreamServer',
          'VectorTileServer',
        ],
        o = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        l = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${a.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        u = /(.*?)\/(?:layers\/)?(\d+)\/?$/i;
      function c(e) {
        return !!o.test(e);
      }
      function p(e) {
        const t = (0, s.mN)(e),
          r = t.path.match(o) || t.path.match(l);
        if (!r) return null;
        const [, i, n, a, u] = r,
          c = n.indexOf('/');
        return {
          title: d(-1 !== c ? n.slice(c + 1) : n),
          serverType: a,
          sublayer: null != u && '' !== u ? parseInt(u, 10) : null,
          url: { path: i },
        };
      }
      function y(e) {
        const t = (0, s.mN)(e).path.match(u);
        return t ? { serviceUrl: t[1], sublayerId: Number(t[2]) } : null;
      }
      function d(e) {
        return (e = e.replace(/\s*[/_]+\s*/g, ' '))[0].toUpperCase() + e.slice(1);
      }
      function m(e, t) {
        const r = [];
        if (e) {
          const t = p(e);
          (0, i.i)(t) && t.title && r.push(t.title);
        }
        if (t) {
          const e = d(t);
          r.push(e);
        }
        if (2 === r.length) {
          if (-1 !== r[0].toLowerCase().indexOf(r[1].toLowerCase())) return r[0];
          if (-1 !== r[1].toLowerCase().indexOf(r[0].toLowerCase())) return r[1];
        }
        return r.join(' - ');
      }
      function h(e) {
        if (!e) return !1;
        const t = -1 !== (e = e.toLowerCase()).indexOf('.arcgis.com/'),
          r =
            -1 !== e.indexOf('//services') ||
            -1 !== e.indexOf('//tiles') ||
            -1 !== e.indexOf('//features');
        return t && r;
      }
      function f(e, t) {
        return e ? (0, s.Qj)((0, s.Hu)(e, t)) : e;
      }
      function v(e) {
        let { url: t } = e;
        if (!t) return { url: t };
        t = (0, s.Hu)(t, e.logger);
        const r = (0, s.mN)(t),
          n = p(r.path);
        let a;
        if ((0, i.i)(n))
          null != n.sublayer && null == e.layer.layerId && (a = n.sublayer), (t = n.url.path);
        else if (e.nonStandardUrlAllowed) {
          const e = y(r.path);
          (0, i.i)(e) && ((t = e.serviceUrl), (a = e.sublayerId));
        }
        return { url: (0, s.Qj)(t), layerId: a };
      }
      function g(e, t, r, i, a) {
        (0, n.w)(t, i, 'url', a),
          i.url && null != e.layerId && (i.url = (0, s.v_)(i.url, r, e.layerId.toString()));
      }
      function b(e) {
        if (!e) return !1;
        const t = e.toLowerCase(),
          r = -1 !== t.indexOf('/services/'),
          i = -1 !== t.indexOf('/mapserver/wmsserver'),
          s = -1 !== t.indexOf('/imageserver/wmsserver'),
          n = -1 !== t.indexOf('/wmsserver');
        return r && (i || s || n);
      }
    },
    91162: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => l, l: () => o });
      var i = r(41864),
        s = r(15324),
        n = r(22739),
        a = r(76506);
      async function o(e, t) {
        return await e.load(), l(e, t);
      }
      async function l(e, t) {
        const r = [],
          o = (...e) => {
            for (const t of e)
              (0, a.b)(t) ||
                (Array.isArray(t)
                  ? o(...t)
                  : s.Z.isCollection(t)
                  ? t.forEach((e) => o(e))
                  : n.L.isLoadable(t) && r.push(t));
          };
        t(o);
        let l = null;
        if (
          (await (0, i.m)(r, async (e) => {
            var t;
            !1 !==
              (
                await (0, i.r)(
                  ((t = e),
                  'loadAll' in t && 'function' == typeof t.loadAll ? e.loadAll() : e.load()),
                )
              ).ok ||
              l ||
              (l = e);
          }),
          l)
        )
          throw l.loadError;
        return e;
      }
    },
    69997: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => s });
      var i = r(53785);
      function s(e, t) {
        const r = t || e.extent,
          s = e.width,
          n = (0, i.a)(r && r.spatialReference);
        return r && s ? (r.width / s) * n * i.i * 96 : 0;
      }
    },
    82933: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => c });
      var i = r(29768),
        s = r(21972),
        n = r(15324),
        a = r(76506),
        o = r(34250),
        l = r(17533);
      r(23639),
        r(92143),
        r(31450),
        r(71552),
        r(40642),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(91306),
        r(76996);
      let u = class extends s.Z {
        constructor(e) {
          super(e), (this._groups = new Map());
        }
        destroy() {
          this.removeAll();
        }
        get size() {
          let e = 0;
          return (
            this._groups.forEach((t) => {
              e += t.length;
            }),
            e
          );
        }
        add(e, t) {
          if (!this._isHandle(e) && !Array.isArray(e) && !n.Z.isCollection(e)) return this;
          const r = this._getOrCreateGroup(t);
          return (
            Array.isArray(e) || n.Z.isCollection(e)
              ? e.forEach((e) => this._isHandle(e) && r.push(e))
              : r.push(e),
            this.notifyChange('size'),
            this
          );
        }
        forEach(e, t) {
          if ('function' == typeof e) this._groups.forEach((t) => t.forEach(e));
          else {
            const r = this._getGroup(e);
            r && t && r.forEach(t);
          }
        }
        has(e) {
          return this._groups.has(this._ensureGroupKey(e));
        }
        remove(e) {
          if (Array.isArray(e) || n.Z.isCollection(e)) return e.forEach(this.remove, this), this;
          if (!this.has(e)) return this;
          const t = this._getGroup(e);
          for (let e = 0; e < t.length; e++) t[e].remove();
          return this._deleteGroup(e), this.notifyChange('size'), this;
        }
        removeAll() {
          return (
            this._groups.forEach((e) => {
              for (let t = 0; t < e.length; t++) e[t].remove();
            }),
            this._groups.clear(),
            this.notifyChange('size'),
            this
          );
        }
        _isHandle(e) {
          return e && !!e.remove;
        }
        _getOrCreateGroup(e) {
          if (this.has(e)) return this._getGroup(e);
          const t = [];
          return this._groups.set(this._ensureGroupKey(e), t), t;
        }
        _getGroup(e) {
          return (0, a.a)(this._groups.get(this._ensureGroupKey(e)));
        }
        _deleteGroup(e) {
          return this._groups.delete(this._ensureGroupKey(e));
        }
        _ensureGroupKey(e) {
          return e || '_default_';
        }
      };
      (0, i._)([(0, o.Cb)({ readOnly: !0 })], u.prototype, 'size', null),
        (u = (0, i._)([(0, l.j)('esri.core.Handles')], u));
      const c = u;
    },
    617: (e, t, r) => {
      'use strict';
      r.d(t, {
        S1: () => c,
        on: () => h,
        OY: () => m,
        cm: () => y,
        N1: () => p,
        LR: () => d,
        tH: () => s,
      });
      var i = r(50406);
      function s(e, t, r, s, n) {
        const a = 'function' == typeof s ? s : null,
          o = 'object' == typeof s ? s : null;
        'boolean' == typeof s && (n = s);
        let l,
          u = !1;
        function c() {
          l && (l.remove(), (l = null));
        }
        const p = (0, i.dD)();
        (0, i.fu)(o, () => {
          c(), p.reject((0, i.zE)());
        });
        const y = {
          then: p.promise.then.bind(p.promise),
          catch: p.promise.catch.bind(p.promise),
          remove: c,
        };
        return (
          Object.freeze(y),
          (l = (function (e, t, r, i, s) {
            const n = e.watch(
              t,
              (t, s, n, a) => {
                (r && !r(t)) || null == i || i.call(e, t, s, n, a);
              },
              s,
            );
            if (Array.isArray(t))
              for (const s of t) {
                const n = e.get(s);
                r && r(n) && (null == i || i.call(e, n, n, t, e));
              }
            else {
              const s = e.get(t);
              r && r(s) && (null == i || i.call(e, s, s, t, e));
            }
            return n;
          })(
            e,
            t,
            r,
            (t, r, i, s) => {
              (u = !0),
                c(),
                a && a.call(e, t, r, i, s),
                p.resolve({ value: t, oldValue: r, propertyName: i, target: s });
            },
            n,
          )),
          u && c(),
          y
        );
      }
      function n(e) {
        return !!e;
      }
      function a(e) {
        return !e;
      }
      function o(e) {
        return !0 === e;
      }
      function l(e) {
        return !1 === e;
      }
      r(76506), r(60991), r(92143), r(31450), r(71552), r(40642), r(81172);
      const u = /\?(\.|$)/g;
      function c(e, t, r, i) {
        const s = Array.isArray(t) ? t : t.indexOf(',') > -1 ? t.split(',') : [t],
          n = (function (e, t, r, i) {
            return e.watch(t, r, i);
          })(e, t, r, i);
        for (const t of s) {
          const i = t.trim().replace(u, '$1'),
            s = e.get(i);
          r.call(e, s, s, i, e);
        }
        return n;
      }
      function p(e, t, r, i) {
        return s(e, t, n, r, i);
      }
      function y(e, t, r, i) {
        return s(e, t, a, r, i);
      }
      function d(e, t, r, i) {
        return s(e, t, o, r, i);
      }
      function m(e, t, r, i) {
        return s(e, t, l, r, i);
      }
      function h(e, t, r, s, n, a, o) {
        const l = {};
        function u(t) {
          const i = l[t];
          i && (a && a(i.target, t, e, r), i.handle.remove(), delete l[t]);
        }
        const p = c(
          e,
          t,
          (t, a, o) => {
            u(o),
              (0, i.i)(t) &&
                ((l[o] = { handle: (0, i.o)(t, r, s), target: t }), n && n(t, o, e, r));
          },
          o,
        );
        return {
          remove() {
            p.remove();
            for (const e in l) u(e);
          },
        };
      }
    },
    62883: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => R });
      var i = r(29768),
        s = r(82058),
        n = r(93314),
        a = r(60991),
        o = r(95873),
        l = r(91162),
        u = r(76506),
        c = r(54179),
        p = r(50406),
        y = r(34250),
        d = r(91306),
        m = (r(92143), r(97714)),
        h = r(17533),
        f = r(2906),
        v = r(21972),
        g = r(21801),
        b = r(69997),
        w = r(41617),
        _ = r(21781),
        x = r(81655),
        S = r(75025),
        C = r(11118),
        O = r(8547),
        T = r(89440),
        I = r(62162),
        E = r(16647),
        j = r(58912),
        D = r(19902),
        L = r(43022),
        N = r(20820);
      const F = {
        visible: 'visibleSublayers',
        definitionExpression: 'layerDefs',
        labelingInfo: 'hasDynamicLayers',
        labelsVisible: 'hasDynamicLayers',
        opacity: 'hasDynamicLayers',
        minScale: 'visibleSublayers',
        maxScale: 'visibleSublayers',
        renderer: 'hasDynamicLayers',
        source: 'hasDynamicLayers',
      };
      let U = class extends (0, o.p)(v.Z) {
        constructor(e) {
          super(e), (this.scale = 0);
        }
        destroy() {
          this.layer = null;
        }
        get dynamicLayers() {
          if (!this.hasDynamicLayers) return null;
          const e = this.visibleSublayers.map((e) => e.toExportImageJSON());
          return e.length ? JSON.stringify(e) : null;
        }
        get hasDynamicLayers() {
          return (
            this.layer && (0, N.a)(this.visibleSublayers, this.layer.serviceSublayers, this.layer)
          );
        }
        set layer(e) {
          this._get('layer') !== e &&
            (this._set('layer', e),
            this.handles.remove('layer'),
            e &&
              this.handles.add(
                [
                  e.allSublayers.on('change', () => this.notifyChange('visibleSublayers')),
                  e.on('sublayer-update', (e) => this.notifyChange(F[e.propertyName])),
                ],
                'layer',
              ));
        }
        get layers() {
          const e = this.visibleSublayers;
          return e ? (e.length ? 'show:' + e.map((e) => e.id).join(',') : 'show:-1') : null;
        }
        get layerDefs() {
          const e = this.visibleSublayers.filter((e) => null != e.definitionExpression);
          return e.length
            ? JSON.stringify(e.reduce((e, t) => ((e[t.id] = t.definitionExpression), e), {}))
            : null;
        }
        get version() {
          this.commitProperty('layers'),
            this.commitProperty('layerDefs'),
            this.commitProperty('dynamicLayers'),
            this.commitProperty('timeExtent');
          const e = this.layer;
          return (
            e &&
              (e.commitProperty('dpi'),
              e.commitProperty('imageFormat'),
              e.commitProperty('imageTransparency'),
              e.commitProperty('gdbVersion')),
            (this._get('version') || 0) + 1
          );
        }
        get visibleSublayers() {
          const e = [];
          if (!this.layer) return e;
          const t = this.layer.sublayers,
            r = (t) => {
              const i = this.scale,
                s = 0 === i,
                n = 0 === t.minScale || i <= t.minScale,
                a = 0 === t.maxScale || i >= t.maxScale;
              t.visible && (s || (n && a)) && (t.sublayers ? t.sublayers.forEach(r) : e.unshift(t));
            };
          t && t.forEach(r);
          const i = this._get('visibleSublayers');
          return !i || i.length !== e.length || i.some((t, r) => e[r] !== t) ? e : i;
        }
        toJSON() {
          const e = this.layer;
          let t = {
            dpi: e.dpi,
            format: e.imageFormat,
            transparent: e.imageTransparency,
            gdbVersion: e.gdbVersion || null,
          };
          return (
            this.hasDynamicLayers && this.dynamicLayers
              ? (t.dynamicLayers = this.dynamicLayers)
              : (t = { ...t, layers: this.layers, layerDefs: this.layerDefs }),
            t
          );
        }
      };
      (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'dynamicLayers', null),
        (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'hasDynamicLayers', null),
        (0, i._)([(0, y.Cb)()], U.prototype, 'layer', null),
        (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'layers', null),
        (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'layerDefs', null),
        (0, i._)([(0, y.Cb)({ type: Number })], U.prototype, 'scale', void 0),
        (0, i._)([(0, y.Cb)(L.f)], U.prototype, 'timeExtent', void 0),
        (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'version', null),
        (0, i._)([(0, y.Cb)({ readOnly: !0 })], U.prototype, 'visibleSublayers', null),
        (U = (0, i._)([(0, h.j)('esri.layers.mixins.ExportImageParameters')], U));
      var A = r(9530);
      r(31450),
        r(71552),
        r(88762),
        r(32101),
        r(81172),
        r(40642),
        r(74673),
        r(26341),
        r(86656),
        r(22723),
        r(27794),
        r(35197),
        r(23639),
        r(91055),
        r(6906),
        r(82933),
        r(15324),
        r(76996),
        r(617),
        r(41864),
        r(22739),
        r(20543),
        r(50161),
        r(73796),
        r(60947),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(53785),
        r(57251),
        r(95587),
        r(74569),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(32422),
        r(82673),
        r(10738),
        r(22203),
        r(21132),
        r(38742),
        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(59765),
        r(77361),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(47842),
        r(17298),
        r(85557),
        r(34394),
        r(86748),
        r(29107),
        r(30574),
        r(2157),
        r(25977),
        r(7471),
        r(54414),
        r(1648),
        r(8925),
        r(45154),
        r(16769),
        r(55531),
        r(30582),
        r(593),
        r(85699),
        r(63136),
        r(96055),
        r(47776),
        r(18033),
        r(6331),
        r(62048),
        r(4292),
        r(75626),
        r(72652),
        r(29641),
        r(30493),
        r(70821),
        r(34229),
        r(37029),
        r(55306),
        r(96467),
        r(63571),
        r(30776),
        r(48027),
        r(54174),
        r(82426),
        r(63130),
        r(25696),
        r(66396),
        r(42775),
        r(95834),
        r(57150),
        r(76726),
        r(20444),
        r(76393),
        r(78548),
        r(2497),
        r(49906),
        r(46527),
        r(48649),
        r(9960),
        r(3101),
        r(5853),
        r(39141),
        r(48243),
        r(34635),
        r(10401),
        r(70737),
        r(8487),
        r(17817),
        r(90814),
        r(15459),
        r(61847),
        r(16796),
        r(16955),
        r(22401),
        r(77894),
        r(55187),
        r(8586),
        r(44509),
        r(69814),
        r(11305),
        r(62259),
        r(44790),
        r(5909),
        r(60669),
        r(48208),
        r(51589),
        r(65684),
        r(12158),
        r(74864),
        r(63683),
        r(94479),
        r(45702),
        r(51127),
        r(74071),
        r(51723),
        r(23243),
        r(51669),
        r(6090),
        r(3977),
        r(36741),
        r(11253),
        r(90319),
        r(38822),
        r(74057),
        r(23761),
        r(48190),
        r(94070),
        r(16218),
        r(9075),
        r(67541),
        r(71206),
        r(89241),
        r(91700),
        r(51979),
        r(32037),
        r(60698),
        r(90811),
        r(86758),
        r(95310),
        r(93939),
        r(238),
        r(71831),
        r(49500),
        r(20208),
        r(78303),
        r(46495),
        r(97546),
        r(54732),
        r(77807),
        r(50203),
        r(30439),
        r(6941),
        r(69218),
        r(31292),
        r(27207),
        r(78893);
      let Z = class extends (0, C.B)(
        (0, D.T)(
          (0, j.S)(
            (0, E.R)(
              (0, x.S)(
                (0, x.A)((0, S.A)((0, T.O)((0, I.P)((0, c.M)((0, _.A)((0, O.C)((0, o.p)(w.Z)))))))),
              ),
            ),
          ),
        ),
      ) {
        constructor(...e) {
          super(...e),
            (this.alwaysRefetch = !1),
            (this.dpi = 96),
            (this.gdbVersion = null),
            (this.imageFormat = 'png24'),
            (this.imageMaxHeight = 2048),
            (this.imageMaxWidth = 2048),
            (this.imageTransparency = !0),
            (this.isReference = null),
            (this.labelsVisible = !1),
            (this.operationalLayerType = 'ArcGISMapServiceLayer'),
            (this.sourceJSON = null),
            (this.sublayers = null),
            (this.type = 'map-image'),
            (this.url = null);
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { url: e, ...t } : e;
        }
        load(e) {
          const t = (0, u.i)(e) ? e.signal : null;
          return (
            this.addResolvingPromise(
              this.loadFromPortal({ supportedTypes: ['Map Service'] }, e)
                .catch(p.r9)
                .then(() => this._fetchService(t)),
            ),
            Promise.resolve(this)
          );
        }
        readImageFormat(e, t) {
          const r = t.supportedImageFormatTypes;
          return r && r.indexOf('PNG32') > -1 ? 'png32' : 'png24';
        }
        writeSublayers(e, t, r, i) {
          if (!this.loaded || !e) return;
          const s = e
            .slice()
            .reverse()
            .flatten(({ sublayers: e }) => e && e.toArray().reverse())
            .toArray();
          let n = !1;
          if (
            this.capabilities &&
            this.capabilities.operations.supportsExportMap &&
            this.capabilities.exportMap.supportsDynamicLayers
          ) {
            const e = (0, v.n)(i.origin);
            if (3 === e) {
              const e = this.createSublayersForOrigin('service').sublayers;
              n = (0, N.s)(s, e, 2);
            } else if (e > 3) {
              const e = this.createSublayersForOrigin('portal-item');
              n = (0, N.s)(s, e.sublayers, (0, v.n)(e.origin));
            }
          }
          const a = [],
            o = { writeSublayerStructure: n, ...i };
          let l = n;
          s.forEach((e) => {
            const t = e.write({}, o);
            a.push(t), (l = l || 'user' === e.originOf('visible'));
          }),
            a.some((e) => Object.keys(e).length > 1) && (t.layers = a),
            l && (t.visibleLayers = s.filter((e) => e.visible).map((e) => e.id));
        }
        createExportImageParameters(e, t, r, i) {
          const s = (i && i.pixelRatio) || 1;
          e && this.version >= 10 && (e = e.clone().shiftCentralMeridian());
          const n = new U({ layer: this, scale: (0, b.a)({ extent: e, width: t }) * s }),
            a = n.toJSON();
          n.destroy();
          const o = !i || !i.rotation || this.version < 10.3 ? {} : { rotation: -i.rotation },
            l = e && e.spatialReference,
            u = l.wkid || JSON.stringify(l.toJSON());
          a.dpi *= s;
          const c = {};
          if (null != i && i.timeExtent) {
            const { start: e, end: t } = i.timeExtent.toJSON();
            c.time =
              e && t && e === t ? '' + e : `${null == e ? 'null' : e},${null == t ? 'null' : t}`;
          } else this.timeInfo && !this.timeInfo.hasLiveData && (c.time = 'null,null');
          return {
            bbox: e && e.xmin + ',' + e.ymin + ',' + e.xmax + ',' + e.ymax,
            bboxSR: u,
            imageSR: u,
            size: t + ',' + r,
            ...a,
            ...o,
            ...c,
          };
        }
        async fetchImage(e, t, r, i) {
          var n, o;
          const l = {
              responseType: 'image',
              signal: null != (n = null == i ? void 0 : i.signal) ? n : null,
              query: {
                ...this.parsedUrl.query,
                ...this.createExportImageParameters(e, t, r, i),
                f: 'image',
                _ts: this.alwaysRefetch
                  ? Date.now()
                  : null != (o = null == i ? void 0 : i.timestamp)
                  ? o
                  : null,
                ...this.customParameters,
                token: this.apiKey,
              },
            },
            u = this.parsedUrl.path + '/export';
          return null == l.query.dynamicLayers || this.capabilities.exportMap.supportsDynamicLayers
            ? (0, s.default)(u, l)
                .then((e) => e.data)
                .catch((e) => {
                  if ((0, p.D_)(e)) throw e;
                  throw new a.Z('mapimagelayer:image-fetch-error', `Unable to load image: ${u}`, {
                    error: e,
                  });
                })
            : Promise.reject(
                new a.Z(
                  'mapimagelayer:dynamiclayer-not-supported',
                  `service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,
                  { query: l.query },
                ),
              );
        }
        async fetchRecomputedExtents(e = {}) {
          const t = { ...e, query: { returnUpdates: !0, f: 'json' } },
            { data: r } = await (0, s.default)(this.url, t),
            { extent: i, fullExtent: a, timeExtent: o } = r,
            l = i || a;
          return {
            fullExtent: l && g.Z.fromJSON(l),
            timeExtent: o && n.Z.fromJSON({ start: o[0], end: o[1] }),
          };
        }
        loadAll() {
          return (0, l.l)(this, (e) => {
            e(this.allSublayers);
          });
        }
        async _fetchService(e) {
          if (this.sourceJSON)
            return void this.read(this.sourceJSON, { origin: 'service', url: this.parsedUrl });
          const { data: t, ssl: r } = await (0, s.default)(this.parsedUrl.path, {
            query: {
              f: 'json',
              ...this.parsedUrl.query,
              ...this.customParameters,
              token: this.apiKey,
            },
            signal: e,
          });
          r && (this.url = this.url.replace(/^http:/i, 'https:')),
            (this.sourceJSON = t),
            this.read(t, { origin: 'service', url: this.parsedUrl });
        }
      };
      (0, i._)([(0, y.Cb)()], Z.prototype, 'alwaysRefetch', void 0),
        (0, i._)([(0, y.Cb)()], Z.prototype, 'dpi', void 0),
        (0, i._)([(0, y.Cb)()], Z.prototype, 'gdbVersion', void 0),
        (0, i._)([(0, y.Cb)()], Z.prototype, 'imageFormat', void 0),
        (0, i._)(
          [(0, m.r)('imageFormat', ['supportedImageFormatTypes'])],
          Z.prototype,
          'readImageFormat',
          null,
        ),
        (0, i._)(
          [(0, y.Cb)({ json: { origins: { service: { read: { source: 'maxImageHeight' } } } } })],
          Z.prototype,
          'imageMaxHeight',
          void 0,
        ),
        (0, i._)(
          [(0, y.Cb)({ json: { origins: { service: { read: { source: 'maxImageWidth' } } } } })],
          Z.prototype,
          'imageMaxWidth',
          void 0,
        ),
        (0, i._)([(0, y.Cb)()], Z.prototype, 'imageTransparency', void 0),
        (0, i._)(
          [
            (0, y.Cb)({
              type: Boolean,
              json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } },
            }),
          ],
          Z.prototype,
          'isReference',
          void 0,
        ),
        (0, i._)(
          [(0, y.Cb)({ json: { read: !1, write: !1 } })],
          Z.prototype,
          'labelsVisible',
          void 0,
        ),
        (0, i._)(
          [(0, y.Cb)({ type: ['ArcGISMapServiceLayer'] })],
          Z.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, i._)(
          [(0, y.Cb)({ json: { read: !1, write: !1 } })],
          Z.prototype,
          'popupEnabled',
          void 0,
        ),
        (0, i._)([(0, y.Cb)()], Z.prototype, 'sourceJSON', void 0),
        (0, i._)(
          [(0, y.Cb)({ json: { write: { ignoreOrigin: !0 } } })],
          Z.prototype,
          'sublayers',
          void 0,
        ),
        (0, i._)(
          [(0, f.w)('sublayers', { layers: { type: [A.Z] }, visibleLayers: { type: [d.I] } })],
          Z.prototype,
          'writeSublayers',
          null,
        ),
        (0, i._)(
          [(0, y.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          Z.prototype,
          'listMode',
          void 0,
        ),
        (0, i._)(
          [(0, y.Cb)({ json: { read: !1 }, readOnly: !0, value: 'map-image' })],
          Z.prototype,
          'type',
          void 0,
        ),
        (0, i._)([(0, y.Cb)(L.u)], Z.prototype, 'url', void 0),
        (Z = (0, i._)([(0, h.j)('esri.layers.MapImageLayer')], Z));
      const R = Z;
    },
    77361: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => v });
      var i,
        s = r(29768),
        n = r(93314),
        a = r(59765),
        o = r(74673),
        l = r(76506),
        u = r(34250),
        c = (r(91306), r(92143), r(97714)),
        p = r(17533),
        y = r(2906);
      r(35197),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341),
        r(57251);
      let d = (i = class extends o.a {
        constructor(e) {
          super(e), (this.respectsDaylightSaving = !1), (this.timezone = null);
        }
        readRespectsDaylightSaving(e, t) {
          return void 0 !== t.respectsDaylightSaving
            ? t.respectsDaylightSaving
            : void 0 !== t.respectDaylightSaving && t.respectDaylightSaving;
        }
        clone() {
          const { respectsDaylightSaving: e, timezone: t } = this;
          return new i({ respectsDaylightSaving: e, timezone: t });
        }
      });
      (0, s._)(
        [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
        d.prototype,
        'respectsDaylightSaving',
        void 0,
      ),
        (0, s._)(
          [(0, c.r)('respectsDaylightSaving', ['respectsDaylightSaving', 'respectDaylightSaving'])],
          d.prototype,
          'readRespectsDaylightSaving',
          null,
        ),
        (0, s._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: { source: 'timeZone' }, write: { target: 'timeZone' } },
            }),
          ],
          d.prototype,
          'timezone',
          void 0,
        ),
        (d = i = (0, s._)([(0, p.j)('esri.layers.support.TimeReference')], d));
      var m,
        h = d;
      let f = (m = class extends o.a {
        constructor(e) {
          super(e),
            (this.cumulative = !1),
            (this.endField = null),
            (this.fullTimeExtent = null),
            (this.hasLiveData = !1),
            (this.interval = null),
            (this.startField = null),
            (this.timeReference = null),
            (this.trackIdField = null),
            (this.useTime = !0);
        }
        readFullTimeExtent(e, t) {
          if (!t.timeExtent || !Array.isArray(t.timeExtent) || 2 !== t.timeExtent.length)
            return null;
          const r = new Date(t.timeExtent[0]),
            i = new Date(t.timeExtent[1]);
          return new n.Z({ start: r, end: i });
        }
        writeFullTimeExtent(e, t) {
          e && (0, l.i)(e.start) && (0, l.i)(e.end)
            ? (t.timeExtent = [e.start.getTime(), e.end.getTime()])
            : (t.timeExtent = null);
        }
        readInterval(e, t) {
          return t.timeInterval && t.timeIntervalUnits
            ? new a.Z({ value: t.timeInterval, unit: a.t.fromJSON(t.timeIntervalUnits) })
            : t.defaultTimeInterval && t.defaultTimeIntervalUnits
            ? new a.Z({
                value: t.defaultTimeInterval,
                unit: a.t.fromJSON(t.defaultTimeIntervalUnits),
              })
            : null;
        }
        writeInterval(e, t) {
          if (e) {
            const r = e.toJSON();
            (t.timeInterval = r.value), (t.timeIntervalUnits = r.unit);
          } else (t.timeInterval = null), (t.timeIntervalUnits = null);
        }
        clone() {
          const {
            cumulative: e,
            endField: t,
            hasLiveData: r,
            interval: i,
            startField: s,
            timeReference: n,
            fullTimeExtent: a,
            trackIdField: o,
            useTime: u,
          } = this;
          return new m({
            cumulative: e,
            endField: t,
            hasLiveData: r,
            interval: i,
            startField: s,
            timeReference: (0, l.d9)(n),
            fullTimeExtent: (0, l.d9)(a),
            trackIdField: o,
            useTime: u,
          });
        }
      });
      (0, s._)(
        [
          (0, u.Cb)({
            type: Boolean,
            json: {
              read: { source: 'exportOptions.timeDataCumulative' },
              write: { target: 'exportOptions.timeDataCumulative' },
            },
          }),
        ],
        f.prototype,
        'cumulative',
        void 0,
      ),
        (0, s._)(
          [
            (0, u.Cb)({
              type: String,
              json: {
                read: { source: 'endTimeField' },
                write: { target: 'endTimeField', allowNull: !0 },
              },
            }),
          ],
          f.prototype,
          'endField',
          void 0,
        ),
        (0, s._)(
          [(0, u.Cb)({ type: n.Z, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'fullTimeExtent',
          void 0,
        ),
        (0, s._)(
          [(0, c.r)('fullTimeExtent', ['timeExtent'])],
          f.prototype,
          'readFullTimeExtent',
          null,
        ),
        (0, s._)([(0, y.w)('fullTimeExtent')], f.prototype, 'writeFullTimeExtent', null),
        (0, s._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          f.prototype,
          'hasLiveData',
          void 0,
        ),
        (0, s._)(
          [(0, u.Cb)({ type: a.Z, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'interval',
          void 0,
        ),
        (0, s._)(
          [
            (0, c.r)('interval', [
              'timeInterval',
              'timeIntervalUnits',
              'defaultTimeInterval',
              'defaultTimeIntervalUnits',
            ]),
          ],
          f.prototype,
          'readInterval',
          null,
        ),
        (0, s._)([(0, y.w)('interval')], f.prototype, 'writeInterval', null),
        (0, s._)(
          [
            (0, u.Cb)({
              type: String,
              json: {
                read: { source: 'startTimeField' },
                write: { target: 'startTimeField', allowNull: !0 },
              },
            }),
          ],
          f.prototype,
          'startField',
          void 0,
        ),
        (0, s._)(
          [(0, u.Cb)({ type: h, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'timeReference',
          void 0,
        ),
        (0, s._)(
          [(0, u.Cb)({ type: String, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'trackIdField',
          void 0,
        ),
        (0, s._)(
          [
            (0, u.Cb)({
              type: Boolean,
              json: {
                read: { source: 'exportOptions.useTime' },
                write: { target: 'exportOptions.useTime' },
              },
            }),
          ],
          f.prototype,
          'useTime',
          void 0,
        ),
        (f = m = (0, s._)([(0, p.j)('esri.layers.support.TimeInfo')], f));
      const v = f;
    },
  },
]);
