(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [8642],
  {
    69586: (e, a, t) => {
      'use strict';
      t.d(a, { c: () => l });
      var n = t(32101),
        r = t(49900);
      function l(e) {
        return {
          origin: 'portal-item',
          url: (0, n.mN)(e.itemUrl),
          portal: e.portal || r.Z.getDefault(),
          portalItem: e,
          readResourcePaths: [],
        };
      }
    },
    8642: (e, a, t) => {
      'use strict';
      t.r(a), t.d(a, { a: () => f, g: () => m, l: () => h, p: () => p, r: () => u });
      var n = t(60991),
        r = t(67902),
        l = t(49900),
        i = t(69586),
        s = t(68714),
        o = t(82058);
      async function u(e) {
        const { data: a } = await (0, o.default)(e, { responseType: 'json', query: { f: 'json' } });
        return a;
      }
      function d(e, a, t) {
        let n = t.layers || [];
        const r = t.tables || [];
        'Feature Collection' === e.portalItem.type &&
          (n.forEach((e) => {
            var a;
            'Table' === (null == e || null == (a = e.layerDefinition) ? void 0 : a.type) &&
              r.push(e);
          }),
          (n = n.filter((e) => {
            var a;
            return 'Table' !== (null == e || null == (a = e.layerDefinition) ? void 0 : a.type);
          }))),
          n.reverse().forEach((n) => {
            const r = c(e, a, t, n);
            e.add(r);
          }),
          r.reverse().forEach((n) => {
            const r = c(e, a, t, n);
            e.tables.add(r);
          });
      }
      function c(e, a, t, n) {
        const r = new a({
          portalItem: e.portalItem.clone(),
          layerId: n.id,
          sublayerTitleMode: 'service-name',
        });
        if ('Feature Collection' === e.portalItem.type) {
          const a = { origin: 'portal-item', portal: e.portalItem.portal || l.Z.getDefault() };
          r.read(n, a);
          const i = t.showLegend;
          null != i && r.read({ showLegend: i }, a);
        }
        return r;
      }
      function y(e, a) {
        if (!1 === e.supportsData) return Promise.resolve(void 0);
        const t = e.instance;
        return t.portalItem
          .fetchData('json', a)
          .catch(() => null)
          .then(async (e) => {
            if (
              (function (e) {
                return 'stream' !== e.type && 'layerId' in e;
              })(t)
            ) {
              let a,
                n = !0;
              return (
                e &&
                  m(e) > 0 &&
                  (null == t.layerId && (t.layerId = f(e)),
                  (a = (function (e, a) {
                    const t = e.layers;
                    if (t) for (let e = 0; e < t.length; e++) if (t[e].id === a) return t[e];
                    const n = e.tables;
                    if (n) for (let e = 0; e < n.length; e++) if (n[e].id === a) return n[e];
                    return null;
                  })(e, t.layerId)),
                  a &&
                    (1 === m(e) && (n = !1),
                    null != e.showLegend && (a.showLegend = e.showLegend))),
                n &&
                  'service-name' !== t.sublayerTitleMode &&
                  (t.sublayerTitleMode = 'item-title-and-service-name'),
                a
              );
            }
            return e;
          });
      }
      async function p(e, a) {
        var t, n;
        if (
          null == (null == (t = e) ? void 0 : t.layers) ||
          null == (null == (n = e) ? void 0 : n.tables)
        ) {
          const t = await u(a);
          ((e = e || {}).layers = e.layers || (null == t ? void 0 : t.layers)),
            (e.tables = e.tables || (null == t ? void 0 : t.tables));
        }
        return e;
      }
      function f(e) {
        const a = e.layers;
        if (a && a.length) return a[0].id;
        const t = e.tables;
        return t && t.length ? t[0].id : null;
      }
      function m(e) {
        var a, t, n, r;
        return (
          (null != (a = null == e || null == (t = e.layers) ? void 0 : t.length) ? a : 0) +
          (null != (n = null == e || null == (r = e.tables) ? void 0 : r.length) ? n : 0)
        );
      }
      var h = Object.freeze({
        __proto__: null,
        load: async function (e, a) {
          const t = e.instance.portalItem;
          return t && t.id
            ? (await t.load(a),
              (function (e) {
                const a = e.instance.portalItem;
                if (-1 === e.supportedTypes.indexOf(a.type))
                  throw new n.Z(
                    'portal:invalid-layer-item-type',
                    "Invalid layer item type '${type}', expected '${expectedType}'",
                    { type: a.type, expectedType: e.supportedTypes.join(', ') },
                  );
              })(e),
              (async function (e, a) {
                const t = e.instance,
                  l = t.portalItem,
                  { url: o, title: c } = l,
                  f = (0, i.c)(l);
                if ('group' === t.type)
                  return (
                    t.read({ title: c }, f),
                    (function (e, a) {
                      let t;
                      const l = e.portalItem.type;
                      switch (l) {
                        case 'Feature Service':
                          t = r.l.FeatureLayer;
                          break;
                        case 'Stream Service':
                          t = r.l.StreamLayer;
                          break;
                        case 'Scene Service':
                          t = r.l.SceneLayer;
                          break;
                        case 'Feature Collection':
                          t = r.l.FeatureLayer;
                          break;
                        default:
                          throw new n.Z(
                            'portal:unsupported-item-type-as-group',
                            `The item type '${l}' is not supported as a 'IGroupLayer'`,
                          );
                      }
                      let i;
                      return t()
                        .then((e) => ((i = e), y(a)))
                        .then(async (a) =>
                          'Feature Service' === l
                            ? ((a = await p(a, e.portalItem.url)), d(e, i, a))
                            : m(a) > 0
                            ? d(e, i, a)
                            : (function (e, a) {
                                return e.portalItem.url
                                  ? u(e.portalItem.url).then((t) => {
                                      var n, r;
                                      function l(e) {
                                        return { id: e.id, name: e.name };
                                      }
                                      t &&
                                        d(e, a, {
                                          layers: null == (n = t.layers) ? void 0 : n.map(l),
                                          tables: null == (r = t.tables) ? void 0 : r.map(l),
                                        });
                                    })
                                  : Promise.resolve();
                              })(e, i),
                        );
                    })(t, e)
                  );
                o && t.read({ url: o }, f);
                const h = await y(e, a);
                return (
                  h && t.read(h, f),
                  (t.resourceReferences = { portalItem: l, paths: f.readResourcePaths }),
                  t.read({ title: c }, f),
                  (0, s.l)(t, f)
                );
              })(e, a))
            : Promise.resolve();
        },
        preprocessFSItemData: p,
        getFirstLayerOrTableId: f,
        getNumLayersAndTables: m,
      });
    },
    67902: (e, a, t) => {
      'use strict';
      t.d(a, { l: () => n });
      const n = {
        BingMapsLayer: async () =>
          (await Promise.all([t.e(4851), t.e(7963)]).then(t.bind(t, 37963))).default,
        BuildingSceneLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(9506),
              t.e(8989),
              t.e(2486),
              t.e(3439),
            ]).then(t.bind(t, 3439))
          ).default,
        CSVLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(9506),
              t.e(4004),
            ]).then(t.bind(t, 44004))
          ).default,
        ElevationLayer: async () =>
          (await Promise.all([t.e(2060), t.e(2204)]).then(t.bind(t, 72204))).default,
        FeatureLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(9506),
              t.e(6202),
            ]).then(t.bind(t, 9506))
          ).default,
        GroupLayer: async () => (await t.e(1128).then(t.bind(t, 1128))).default,
        GeoRSSLayer: async () =>
          (await Promise.all([t.e(4851), t.e(135), t.e(2197)]).then(t.bind(t, 92197))).default,
        ImageryLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(1292),
              t.e(5528),
              t.e(558),
              t.e(6694),
              t.e(5530),
            ]).then(t.bind(t, 95530))
          ).default,
        ImageryTileLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(2334),
              t.e(2060),
              t.e(558),
              t.e(6694),
              t.e(8166),
            ]).then(t.bind(t, 68166))
          ).default,
        IntegratedMeshLayer: async () =>
          (await Promise.all([t.e(2334), t.e(8989), t.e(1244)]).then(t.bind(t, 21244))).default,
        KMLLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1903),
            ]).then(t.bind(t, 21903))
          ).default,
        MapImageLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(9615),
              t.e(2883),
              t.e(9450),
            ]).then(t.bind(t, 62883))
          ).default,
        MapNotesLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(2334),
              t.e(8824),
              t.e(9506),
              t.e(1135),
            ]).then(t.bind(t, 41135))
          ).default,
        OGCFeatureLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(4951),
              t.e(3958),
            ]).then(t.bind(t, 63958))
          ).default,
        OpenStreetMapLayer: async () =>
          (await Promise.all([t.e(4851), t.e(3799), t.e(6043)]).then(t.bind(t, 16043))).default,
        PointCloudLayer: async () =>
          (await Promise.all([t.e(6748), t.e(8989), t.e(9151), t.e(5032)]).then(t.bind(t, 25032)))
            .default,
        RouteLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(9506),
              t.e(4841),
            ]).then(t.bind(t, 24841))
          ).default,
        SceneLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(9506),
              t.e(8989),
              t.e(2486),
              t.e(3741),
            ]).then(t.bind(t, 3741))
          ).default,
        StreamLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(8824),
              t.e(8324),
            ]).then(t.bind(t, 58324))
          ).default,
        TileLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(2060),
              t.e(9615),
              t.e(611),
            ]).then(t.bind(t, 90611))
          ).default,
        UnknownLayer: async () => (await t.e(3117).then(t.bind(t, 63117))).default,
        UnsupportedLayer: async () => (await t.e(8243).then(t.bind(t, 88243))).default,
        VectorTileLayer: async () =>
          (await Promise.all([t.e(2060), t.e(6611), t.e(8326)]).then(t.bind(t, 78326))).default,
        WebTileLayer: async () =>
          (
            await Promise.all([t.e(4851), t.e(3799)])
              .then(t.bind(t, 3799))
              .then(function (e) {
                return e.a;
              })
          ).default,
        WFSLayer: async () =>
          (
            await Promise.all([
              t.e(4851),
              t.e(135),
              t.e(6748),
              t.e(5959),
              t.e(208),
              t.e(1292),
              t.e(3770),
              t.e(2334),
              t.e(8824),
              t.e(4344),
              t.e(4797),
            ]).then(t.bind(t, 44797))
          ).default,
        WMSLayer: async () =>
          (await Promise.all([t.e(4851), t.e(135), t.e(6748), t.e(403)]).then(t.bind(t, 40403)))
            .default,
        WMTSLayer: async () =>
          (await Promise.all([t.e(4851), t.e(3799), t.e(2790)]).then(t.bind(t, 82790))).default,
      };
    },
    68714: (e, a, t) => {
      'use strict';
      t.d(a, { l: () => i });
      var n = t(41864),
        r = t(50406),
        l = t(17533);
      async function i(e, a, t) {
        const i = e && e.getAtOrigin && e.getAtOrigin('renderer', a.origin);
        if (i && 'unique-value' === i.type && i.styleOrigin) {
          const s = await (0, n.r)(i.populateFromStyle());
          if (((0, r.k_)(t), !1 === s.ok)) {
            const t = s.error;
            a &&
              a.messages &&
              a.messages.push(
                new l.W(
                  'renderer:style-reference',
                  `Failed to create unique value renderer from style reference: ${t.message}`,
                  { error: t, context: a },
                ),
              ),
              e.clear('renderer', a.origin);
          }
        }
      }
    },
  },
]);
