(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [2795, 2058],
  {
    2795: (e, t, n) => {
      'use strict';
      n.r(t), n.d(t, { default: () => c, ElevationSamplerWorker: () => a });
      var r = n(76506),
        s = n(88994),
        i = n(84017);
      n(27794),
        n(6906),
        n(50406),
        n(60991),
        n(92143),
        n(31450),
        n(71552),
        n(40642),
        n(81172),
        n(98576),
        n(53785),
        n(57251),
        n(95587),
        n(60947),
        n(74673),
        n(21972),
        n(23639),
        n(34250),
        n(91306),
        n(86656),
        n(22723),
        n(91055),
        n(17533),
        n(26341),
        n(2906),
        n(89623),
        n(65775),
        n(82426),
        n(26923),
        n(72334),
        n(21801),
        n(73796),
        n(97714),
        n(91597),
        n(86787),
        n(35132),
        n(84069),
        n(12381),
        n(73173),
        n(82058),
        n(88762),
        n(32101),
        n(44567),
        n(98380),
        n(92896),
        n(92482),
        n(92624),
        n(34987),
        n(35861),
        n(7200),
        n(40167),
        n(72836),
        n(84661);
      class a {
        async createIndex(e, t) {
          const n = new Array();
          if (!e.vertexAttributes || !e.vertexAttributes.position) return new s.P();
          const i = this.createMeshData(e),
            a = (0, r.i)(t)
              ? await t.invoke('createIndexThread', i, { transferList: n })
              : this.createIndexThread(i).result;
          return this.createPooledRBush().fromJSON(a);
        }
        createIndexThread(e) {
          const t = new Float64Array(e.position),
            n = this.createPooledRBush();
          return e.components
            ? this.createIndexComponentsThread(
                n,
                t,
                e.components.map((e) => new Uint32Array(e)),
              )
            : this.createIndexAllThread(n, t);
        }
        createIndexAllThread(e, t) {
          const n = new Array(t.length / 9);
          let r = 0;
          for (let e = 0; e < t.length; e += 9) n[r++] = o(t, e + 0, e + 3, e + 6);
          return e.load(n), { result: e.toJSON() };
        }
        createIndexComponentsThread(e, t, n) {
          let r = 0;
          for (const e of n) r += e.length / 3;
          const s = new Array(r);
          let i = 0;
          for (const e of n)
            for (let n = 0; n < e.length; n += 3)
              s[i++] = o(t, 3 * e[n + 0], 3 * e[n + 1], 3 * e[n + 2]);
          return e.load(s), { result: e.toJSON() };
        }
        createMeshData(e) {
          const t = (e.transform
            ? (0, i.b)(
                { position: e.vertexAttributes.position, normal: null, tangent: null },
                e.transform,
                e.spatialReference,
              ).position
            : e.vertexAttributes.position
          ).buffer;
          return !e.components || e.components.some((e) => !e.faces)
            ? { position: t }
            : { position: t, components: e.components.map((e) => e.faces) };
        }
        createPooledRBush() {
          return new s.P(
            9,
            (0, r.h)('csp-restrictions') ? (e) => e : ['.minX', '.minY', '.maxX', '.maxY'],
          );
        }
      }
      function o(e, t, n, r) {
        return {
          minX: Math.min(e[t + 0], e[n + 0], e[r + 0]),
          maxX: Math.max(e[t + 0], e[n + 0], e[r + 0]),
          minY: Math.min(e[t + 1], e[n + 1], e[r + 1]),
          maxY: Math.max(e[t + 1], e[n + 1], e[r + 1]),
          p0: [e[t + 0], e[t + 1], e[t + 2]],
          p1: [e[n + 0], e[n + 1], e[n + 2]],
          p2: [e[r + 0], e[r + 1], e[r + 2]],
        };
      }
      const c = a;
    },
    88994: (e, t, n) => {
      'use strict';
      n.d(t, { P: () => o });
      var r = n(27794),
        s = n(76506),
        i = n(6906),
        a = n(98576);
      class o {
        constructor(e = 9, t) {
          (this.compareMinX = h),
            (this.compareMinY = d),
            (this.toBBox = function (e) {
              return e;
            }),
            (this._maxEntries = Math.max(4, e || 9)),
            (this._minEntries = Math.max(2, Math.ceil(0.4 * this._maxEntries))),
            t && ('function' == typeof t ? (this.toBBox = t) : this._initFormat(t)),
            this.clear();
        }
        destroy() {
          this.clear(), w.prune(), b.prune(), y.prune(), q.prune();
        }
        all(e) {
          this._all(this.data, e);
        }
        search(e, t) {
          let n = this.data;
          const r = this.toBBox;
          if (x(e, n))
            for (w.clear(); n; ) {
              for (let s = 0, i = n.children.length; s < i; s++) {
                const i = n.children[s],
                  a = n.leaf ? r(i) : i;
                x(e, a) && (n.leaf ? t(i) : g(e, a) ? this._all(i, t) : w.push(i));
              }
              n = w.pop();
            }
        }
        collides(e) {
          let t = this.data;
          const n = this.toBBox;
          if (!x(e, t)) return !1;
          for (w.clear(); t; ) {
            for (let r = 0, s = t.children.length; r < s; r++) {
              const s = t.children[r],
                i = t.leaf ? n(s) : s;
              if (x(e, i)) {
                if (t.leaf || g(e, i)) return !0;
                w.push(s);
              }
            }
            t = w.pop();
          }
          return !1;
        }
        load(e) {
          if (!e.length) return this;
          if (e.length < this._minEntries) {
            for (let t = 0, n = e.length; t < n; t++) this.insert(e[t]);
            return this;
          }
          let t = this._build(e.slice(0, e.length), 0, e.length - 1, 0);
          if (this.data.children.length)
            if (this.data.height === t.height) this._splitRoot(this.data, t);
            else {
              if (this.data.height < t.height) {
                const e = this.data;
                (this.data = t), (t = e);
              }
              this._insert(t, this.data.height - t.height - 1, !0);
            }
          else this.data = t;
          return this;
        }
        insert(e) {
          return e && this._insert(e, this.data.height - 1), this;
        }
        clear() {
          return (this.data = new S([])), this;
        }
        remove(e) {
          if (!e) return this;
          let t,
            n = this.data,
            i = null,
            a = 0,
            o = !1;
          const c = this.toBBox(e);
          for (y.clear(), q.clear(); n || y.length > 0; ) {
            var u;
            if (
              (n ||
                ((n = (0, s.a)(y.pop())),
                (i = y.data[y.length - 1]),
                (a = null != (u = q.pop()) ? u : 0),
                (o = !0)),
              n.leaf && ((t = (0, r.i)(n.children, e, n.children.length, n.indexHint)), -1 !== t))
            )
              return n.children.splice(t, 1), y.push(n), this._condense(y), this;
            o || n.leaf || !g(n, c)
              ? i
                ? (a++, (n = i.children[a]), (o = !1))
                : (n = null)
              : (y.push(n), q.push(a), (a = 0), (i = n), (n = n.children[0]));
          }
          return this;
        }
        toJSON() {
          return this.data;
        }
        fromJSON(e) {
          return (this.data = e), this;
        }
        _all(e, t) {
          let n = e;
          for (b.clear(); n; ) {
            var r;
            if (!0 === n.leaf) for (const e of n.children) t(e);
            else b.pushArray(n.children);
            n = null != (r = b.pop()) ? r : null;
          }
        }
        _build(e, t, n, r) {
          const s = n - t + 1;
          let i = this._maxEntries;
          if (s <= i) {
            const r = new S(e.slice(t, n + 1));
            return c(r, this.toBBox), r;
          }
          r || ((r = Math.ceil(Math.log(s) / Math.log(i))), (i = Math.ceil(s / i ** (r - 1))));
          const a = new _([]);
          a.height = r;
          const o = Math.ceil(s / i),
            u = o * Math.ceil(Math.sqrt(i));
          M(e, t, n, u, this.compareMinX);
          for (let s = t; s <= n; s += u) {
            const t = Math.min(s + u - 1, n);
            M(e, s, t, o, this.compareMinY);
            for (let n = s; n <= t; n += o) {
              const s = Math.min(n + o - 1, t);
              a.children.push(this._build(e, n, s, r - 1));
            }
          }
          return c(a, this.toBBox), a;
        }
        _chooseSubtree(e, t, n, r) {
          for (; r.push(t), !0 !== t.leaf && r.length - 1 !== n; ) {
            let n,
              r = 1 / 0,
              a = 1 / 0;
            for (let o = 0, c = t.children.length; o < c; o++) {
              const c = t.children[o],
                u = f(c),
                l =
                  ((s = e),
                  (i = c),
                  (Math.max(i.maxX, s.maxX) - Math.min(i.minX, s.minX)) *
                    (Math.max(i.maxY, s.maxY) - Math.min(i.minY, s.minY)) -
                    u);
              l < a
                ? ((a = l), (r = u < r ? u : r), (n = c))
                : l === a && u < r && ((r = u), (n = c));
            }
            t = n || t.children[0];
          }
          var s, i;
          return t;
        }
        _insert(e, t, n) {
          const r = this.toBBox,
            s = n ? e : r(e);
          y.clear();
          const i = this._chooseSubtree(s, this.data, t, y);
          for (
            i.children.push(e), l(i, s);
            t >= 0 && y.data[t].children.length > this._maxEntries;

          )
            this._split(y, t), t--;
          this._adjustParentBBoxes(s, y, t);
        }
        _split(e, t) {
          const n = e.data[t],
            r = n.children.length,
            s = this._minEntries;
          this._chooseSplitAxis(n, s, r);
          const i = this._chooseSplitIndex(n, s, r);
          if (!i)
            return void console.log(
              '  Error: assertion failed at PooledRBush._split: no valid split index',
            );
          const a = n.children.splice(i, n.children.length - i),
            o = n.leaf ? new S(a) : new _(a);
          (o.height = n.height),
            c(n, this.toBBox),
            c(o, this.toBBox),
            t ? e.data[t - 1].children.push(o) : this._splitRoot(n, o);
        }
        _splitRoot(e, t) {
          (this.data = new _([e, t])), (this.data.height = e.height + 1), c(this.data, this.toBBox);
        }
        _chooseSplitIndex(e, t, n) {
          let r, s, i;
          r = s = 1 / 0;
          for (let a = t; a <= n - t; a++) {
            const t = u(e, 0, a, this.toBBox),
              o = u(e, a, n, this.toBBox),
              c = p(t, o),
              l = f(t) + f(o);
            c < r
              ? ((r = c), (i = a), (s = l < s ? l : s))
              : c === r && l < s && ((s = l), (i = a));
          }
          return i;
        }
        _chooseSplitAxis(e, t, n) {
          const r = e.leaf ? this.compareMinX : h,
            s = e.leaf ? this.compareMinY : d;
          this._allDistMargin(e, t, n, r) < this._allDistMargin(e, t, n, s) && e.children.sort(r);
        }
        _allDistMargin(e, t, n, r) {
          e.children.sort(r);
          const s = this.toBBox,
            i = u(e, 0, t, s),
            a = u(e, n - t, n, s);
          let o = m(i) + m(a);
          for (let r = t; r < n - t; r++) {
            const t = e.children[r];
            l(i, e.leaf ? s(t) : t), (o += m(i));
          }
          for (let r = n - t - 1; r >= t; r--) {
            const t = e.children[r];
            l(a, e.leaf ? s(t) : t), (o += m(a));
          }
          return o;
        }
        _adjustParentBBoxes(e, t, n) {
          for (let r = n; r >= 0; r--) l(t.data[r], e);
        }
        _condense(e) {
          for (let t = e.length - 1; t >= 0; t--) {
            const n = e.data[t];
            if (0 === n.children.length)
              if (t > 0) {
                const s = e.data[t - 1],
                  i = s.children;
                i.splice((0, r.i)(i, n, i.length, s.indexHint), 1);
              } else this.clear();
            else c(n, this.toBBox);
          }
        }
        _initFormat(e) {
          const t = ['return a', ' - b', ';'];
          (this.compareMinX = new Function('a', 'b', t.join(e[0]))),
            (this.compareMinY = new Function('a', 'b', t.join(e[1]))),
            (this.toBBox = new Function(
              'a',
              'return {minX: a' +
                e[0] +
                ', minY: a' +
                e[1] +
                ', maxX: a' +
                e[2] +
                ', maxY: a' +
                e[3] +
                '};',
            ));
        }
      }
      function c(e, t) {
        u(e, 0, e.children.length, t, e);
      }
      function u(e, t, n, r, s) {
        s || (s = new S([])),
          (s.minX = 1 / 0),
          (s.minY = 1 / 0),
          (s.maxX = -1 / 0),
          (s.maxY = -1 / 0);
        for (let i, a = t; a < n; a++) (i = e.children[a]), l(s, e.leaf ? r(i) : i);
        return s;
      }
      function l(e, t) {
        (e.minX = Math.min(e.minX, t.minX)),
          (e.minY = Math.min(e.minY, t.minY)),
          (e.maxX = Math.max(e.maxX, t.maxX)),
          (e.maxY = Math.max(e.maxY, t.maxY));
      }
      function h(e, t) {
        return e.minX - t.minX;
      }
      function d(e, t) {
        return e.minY - t.minY;
      }
      function f(e) {
        return (e.maxX - e.minX) * (e.maxY - e.minY);
      }
      function m(e) {
        return e.maxX - e.minX + (e.maxY - e.minY);
      }
      function p(e, t) {
        const n = Math.max(e.minX, t.minX),
          r = Math.max(e.minY, t.minY),
          s = Math.min(e.maxX, t.maxX),
          i = Math.min(e.maxY, t.maxY);
        return Math.max(0, s - n) * Math.max(0, i - r);
      }
      function g(e, t) {
        return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
      }
      function x(e, t) {
        return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
      }
      function M(e, t, n, r, i) {
        const o = [t, n];
        for (; o.length; ) {
          const t = (0, s.a)(o.pop()),
            n = (0, s.a)(o.pop());
          if (t - n <= r) continue;
          const c = n + Math.ceil((t - n) / r / 2) * r;
          (0, a.q)(e, c, n, t, i), o.push(n, c, c, t);
        }
      }
      const w = new i.P(),
        b = new i.P(),
        y = new i.P(),
        q = new i.P({ deallocator: void 0 });
      class B extends class {
        constructor() {
          (this.minX = 1 / 0), (this.minY = 1 / 0), (this.maxX = -1 / 0), (this.maxY = -1 / 0);
        }
      } {
        constructor() {
          super(...arguments), (this.height = 1), (this.indexHint = new r.P());
        }
      }
      class S extends B {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !0);
        }
      }
      class _ extends B {
        constructor(e) {
          super(), (this.children = e), (this.leaf = !1);
        }
      }
    },
    73173: (e, t, n) => {
      'use strict';
      n.d(t, { g: () => c });
      var r = n(31450),
        s = (n(82058), n(60991)),
        i = n(92143),
        a = n(32101);
      const o = i.L.getLogger('esri.assets');
      function c(e) {
        if (!r.Z.assetsPath)
          throw (
            (o.errorOnce(
              'The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50',
            ),
            new s.Z('assets:path-not-set', 'config.assetsPath is not set'))
          );
        return (0, a.v_)(r.Z.assetsPath, e);
      }
    },
    82426: (e, t, n) => {
      'use strict';
      function r() {
        return [0, 0, 0];
      }
      function s(e) {
        return [e[0], e[1], e[2]];
      }
      function i(e, t, n) {
        return [e, t, n];
      }
      function a(e) {
        const t = [0, 0, 0],
          n = Math.min(3, e.length);
        for (let r = 0; r < n; ++r) t[r] = e[r];
        return t;
      }
      function o(e, t) {
        return new Float64Array(e, t, 3);
      }
      n.d(t, {
        A: () => q,
        B: () => V,
        C: () => v,
        D: () => I,
        E: () => l,
        G: () => G,
        H: () => $,
        I: () => F,
        O: () => u,
        R: () => h,
        S: () => z,
        T: () => a,
        Z: () => c,
        a: () => _,
        a4: () => M,
        a6: () => Z,
        aa: () => N,
        b: () => r,
        c: () => j,
        d: () => S,
        e: () => m,
        f: () => w,
        g: () => p,
        h: () => k,
        i: () => K,
        j: () => f,
        k: () => W,
        l: () => d,
        m: () => Q,
        n: () => B,
        o: () => y,
        p: () => i,
        r: () => J,
        s: () => g,
        t: () => T,
        u: () => s,
        w: () => b,
        x: () => U,
        y: () => o,
        z: () => P,
      });
      const c = [0, 0, 0],
        u = i(1, 1, 1),
        l = 1e-6,
        h = Math.random;
      function d(e) {
        const t = e[0],
          n = e[1],
          r = e[2];
        return Math.sqrt(t * t + n * n + r * r);
      }
      function f(e, t) {
        return (e[0] = t[0]), (e[1] = t[1]), (e[2] = t[2]), e;
      }
      function m(e, t, n, r) {
        return (e[0] = t), (e[1] = n), (e[2] = r), e;
      }
      function p(e, t, n) {
        return (e[0] = t[0] + n[0]), (e[1] = t[1] + n[1]), (e[2] = t[2] + n[2]), e;
      }
      function g(e, t, n) {
        return (e[0] = t[0] - n[0]), (e[1] = t[1] - n[1]), (e[2] = t[2] - n[2]), e;
      }
      function x(e, t, n) {
        return (e[0] = t[0] * n[0]), (e[1] = t[1] * n[1]), (e[2] = t[2] * n[2]), e;
      }
      function M(e, t, n) {
        return (e[0] = t[0] / n[0]), (e[1] = t[1] / n[1]), (e[2] = t[2] / n[2]), e;
      }
      function w(e, t, n) {
        return (e[0] = t[0] * n), (e[1] = t[1] * n), (e[2] = t[2] * n), e;
      }
      function b(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          s = t[2] - e[2];
        return Math.sqrt(n * n + r * r + s * s);
      }
      function y(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          s = t[2] - e[2];
        return n * n + r * r + s * s;
      }
      function q(e) {
        const t = e[0],
          n = e[1],
          r = e[2];
        return t * t + n * n + r * r;
      }
      function B(e, t) {
        const n = t[0],
          r = t[1],
          s = t[2];
        let i = n * n + r * r + s * s;
        return (
          i > 0 &&
            ((i = 1 / Math.sqrt(i)), (e[0] = t[0] * i), (e[1] = t[1] * i), (e[2] = t[2] * i)),
          e
        );
      }
      function S(e, t) {
        return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
      }
      function _(e, t, n) {
        const r = t[0],
          s = t[1],
          i = t[2],
          a = n[0],
          o = n[1],
          c = n[2];
        return (e[0] = s * c - i * o), (e[1] = i * a - r * c), (e[2] = r * o - s * a), e;
      }
      function k(e, t, n, r) {
        const s = t[0],
          i = t[1],
          a = t[2];
        return (
          (e[0] = s + r * (n[0] - s)), (e[1] = i + r * (n[1] - i)), (e[2] = a + r * (n[2] - a)), e
        );
      }
      function T(e, t, n) {
        const r = t[0],
          s = t[1],
          i = t[2];
        return (
          (e[0] = n[0] * r + n[4] * s + n[8] * i + n[12]),
          (e[1] = n[1] * r + n[5] * s + n[9] * i + n[13]),
          (e[2] = n[2] * r + n[6] * s + n[10] * i + n[14]),
          e
        );
      }
      function U(e, t, n) {
        const r = t[0],
          s = t[1],
          i = t[2];
        return (
          (e[0] = r * n[0] + s * n[3] + i * n[6]),
          (e[1] = r * n[1] + s * n[4] + i * n[7]),
          (e[2] = r * n[2] + s * n[5] + i * n[8]),
          e
        );
      }
      function v(e, t, n) {
        const r = n[0],
          s = n[1],
          i = n[2],
          a = n[3],
          o = t[0],
          c = t[1],
          u = t[2];
        let l = s * u - i * c,
          h = i * o - r * u,
          d = r * c - s * o,
          f = s * d - i * h,
          m = i * l - r * d,
          p = r * h - s * l;
        const g = 2 * a;
        return (
          (l *= g),
          (h *= g),
          (d *= g),
          (f *= 2),
          (m *= 2),
          (p *= 2),
          (e[0] = o + l + f),
          (e[1] = c + h + m),
          (e[2] = u + d + p),
          e
        );
      }
      Math.PI, Math.PI;
      const O = [0, 0, 0],
        E = [0, 0, 0];
      function P(e, t) {
        return e[0] === t[0] && e[1] === t[1] && e[2] === t[2];
      }
      function I(e, t, n) {
        const r = n[0] - t[0],
          s = n[1] - t[1],
          i = n[2] - t[2];
        let a = r * r + s * s + i * i;
        return a > 0
          ? ((a = 1 / Math.sqrt(a)), (e[0] = r * a), (e[1] = s * a), (e[2] = i * a), e)
          : ((e[0] = 0), (e[1] = 0), (e[2] = 0), e);
      }
      const Y = g,
        X = x,
        A = M,
        C = b,
        R = y,
        L = d,
        D = q;
      Object.freeze({
        __proto__: null,
        length: d,
        copy: f,
        set: m,
        add: p,
        subtract: g,
        multiply: x,
        divide: M,
        ceil: function (e, t) {
          return (e[0] = Math.ceil(t[0])), (e[1] = Math.ceil(t[1])), (e[2] = Math.ceil(t[2])), e;
        },
        floor: function (e, t) {
          return (e[0] = Math.floor(t[0])), (e[1] = Math.floor(t[1])), (e[2] = Math.floor(t[2])), e;
        },
        min: function (e, t, n) {
          return (
            (e[0] = Math.min(t[0], n[0])),
            (e[1] = Math.min(t[1], n[1])),
            (e[2] = Math.min(t[2], n[2])),
            e
          );
        },
        max: function (e, t, n) {
          return (
            (e[0] = Math.max(t[0], n[0])),
            (e[1] = Math.max(t[1], n[1])),
            (e[2] = Math.max(t[2], n[2])),
            e
          );
        },
        round: function (e, t) {
          return (e[0] = Math.round(t[0])), (e[1] = Math.round(t[1])), (e[2] = Math.round(t[2])), e;
        },
        scale: w,
        scaleAndAdd: function (e, t, n, r) {
          return (e[0] = t[0] + n[0] * r), (e[1] = t[1] + n[1] * r), (e[2] = t[2] + n[2] * r), e;
        },
        distance: b,
        squaredDistance: y,
        squaredLength: q,
        negate: function (e, t) {
          return (e[0] = -t[0]), (e[1] = -t[1]), (e[2] = -t[2]), e;
        },
        inverse: function (e, t) {
          return (e[0] = 1 / t[0]), (e[1] = 1 / t[1]), (e[2] = 1 / t[2]), e;
        },
        normalize: B,
        dot: S,
        cross: _,
        lerp: k,
        hermite: function (e, t, n, r, s, i) {
          const a = i * i,
            o = a * (2 * i - 3) + 1,
            c = a * (i - 2) + i,
            u = a * (i - 1),
            l = a * (3 - 2 * i);
          return (
            (e[0] = t[0] * o + n[0] * c + r[0] * u + s[0] * l),
            (e[1] = t[1] * o + n[1] * c + r[1] * u + s[1] * l),
            (e[2] = t[2] * o + n[2] * c + r[2] * u + s[2] * l),
            e
          );
        },
        bezier: function (e, t, n, r, s, i) {
          const a = 1 - i,
            o = a * a,
            c = i * i,
            u = o * a,
            l = 3 * i * o,
            h = 3 * c * a,
            d = c * i;
          return (
            (e[0] = t[0] * u + n[0] * l + r[0] * h + s[0] * d),
            (e[1] = t[1] * u + n[1] * l + r[1] * h + s[1] * d),
            (e[2] = t[2] * u + n[2] * l + r[2] * h + s[2] * d),
            e
          );
        },
        random: function (e, t) {
          t = t || 1;
          const n = 2 * h() * Math.PI,
            r = 2 * h() - 1,
            s = Math.sqrt(1 - r * r) * t;
          return (e[0] = Math.cos(n) * s), (e[1] = Math.sin(n) * s), (e[2] = r * t), e;
        },
        transformMat4: T,
        transformMat3: U,
        transformQuat: v,
        rotateX: function (e, t, n, r) {
          const s = [],
            i = [];
          return (
            (s[0] = t[0] - n[0]),
            (s[1] = t[1] - n[1]),
            (s[2] = t[2] - n[2]),
            (i[0] = s[0]),
            (i[1] = s[1] * Math.cos(r) - s[2] * Math.sin(r)),
            (i[2] = s[1] * Math.sin(r) + s[2] * Math.cos(r)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateY: function (e, t, n, r) {
          const s = [],
            i = [];
          return (
            (s[0] = t[0] - n[0]),
            (s[1] = t[1] - n[1]),
            (s[2] = t[2] - n[2]),
            (i[0] = s[2] * Math.sin(r) + s[0] * Math.cos(r)),
            (i[1] = s[1]),
            (i[2] = s[2] * Math.cos(r) - s[0] * Math.sin(r)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateZ: function (e, t, n, r) {
          const s = [],
            i = [];
          return (
            (s[0] = t[0] - n[0]),
            (s[1] = t[1] - n[1]),
            (s[2] = t[2] - n[2]),
            (i[0] = s[0] * Math.cos(r) - s[1] * Math.sin(r)),
            (i[1] = s[0] * Math.sin(r) + s[1] * Math.cos(r)),
            (i[2] = s[2]),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        angle: function (e, t) {
          f(O, e), f(E, t), B(O, O), B(E, E);
          const n = S(O, E);
          return n > 1 ? 0 : n < -1 ? Math.PI : Math.acos(n);
        },
        str: function (e) {
          return 'vec3(' + e[0] + ', ' + e[1] + ', ' + e[2] + ')';
        },
        exactEquals: P,
        equals: function (e, t) {
          const n = e[0],
            r = e[1],
            s = e[2],
            i = t[0],
            a = t[1],
            o = t[2];
          return (
            Math.abs(n - i) <= 1e-6 * Math.max(1, Math.abs(n), Math.abs(i)) &&
            Math.abs(r - a) <= 1e-6 * Math.max(1, Math.abs(r), Math.abs(a)) &&
            Math.abs(s - o) <= 1e-6 * Math.max(1, Math.abs(s), Math.abs(o))
          );
        },
        direction: I,
        sub: Y,
        mul: X,
        div: A,
        dist: C,
        sqrDist: R,
        len: L,
        sqrLen: D,
      });
      const H = new Float32Array(1),
        F =
          Number.isFinite ||
          function (e) {
            return 'number' == typeof e && window.isFinite(e);
          },
        N =
          Number.isNaN ||
          function (e) {
            return e != e;
          };
      function G(e) {
        --e;
        for (let t = 1; t < 32; t <<= 1) e |= e >> t;
        return e + 1;
      }
      function j(e, t, n) {
        return Math.min(Math.max(e, t), n);
      }
      function Z(e) {
        return 0 == (e & (e - 1));
      }
      Math.sign;
      const $ =
        Math.log2 ||
        function (e) {
          return Math.log(e) / Math.LN2;
        };
      function z(e, t, n) {
        return e + (t - e) * n;
      }
      function W(e) {
        return (e * Math.PI) / 180;
      }
      function J(e) {
        return (180 * e) / Math.PI;
      }
      function K(e) {
        return Math.acos(j(e, -1, 1));
      }
      function Q(e) {
        return Math.asin(j(e, -1, 1));
      }
      function V(e, t) {
        const n = d(e);
        return m(t, n, Q(e[2] / n), Math.atan2(e[1] / n, e[0] / n)), t;
      }
      !(function (e) {
        (H[0] = e), H[0];
      })(34028234663852886e22);
    },
    95587: (e, t, n) => {
      'use strict';
      n.d(t, {
        S: () => a,
        W: () => u,
        a: () => o,
        b: () => c,
        c: () => h,
        d: () => l,
        e: () => f,
        g: () => d,
      });
      var r = n(60947),
        s = n(89623);
      function i(e) {
        return new r.Z({
          wkt: `GEOCCS["Spherical geocentric",\n    DATUM["Not specified",\n      SPHEROID["Sphere",${e.radius},0]],\n    PRIMEM["Greenwich",0.0,\n      AUTHORITY["EPSG","8901"]],\n    UNIT["m",1.0],\n    AXIS["Geocentric X",OTHER],\n    AXIS["Geocentric Y",EAST],\n    AXIS["Geocentric Z",NORTH]\n  ]`,
        });
      }
      const a = i(s.e),
        o = i(s.m),
        c = i(s.a),
        u = new r.Z({
          wkt: `GEOCCS["WGS 84",\n  DATUM["WGS_1984",\n    SPHEROID["WGS 84",${s.e.radius},298.257223563,\n      AUTHORITY["EPSG","7030"]],\n    AUTHORITY["EPSG","6326"]],\n  PRIMEM["Greenwich",0,\n    AUTHORITY["EPSG","8901"]],\n  UNIT["m",1.0,\n    AUTHORITY["EPSG","9001"]],\n  AXIS["Geocentric X",OTHER],\n  AXIS["Geocentric Y",OTHER],\n  AXIS["Geocentric Z",NORTH],\n  AUTHORITY["EPSG","4978"]\n]`,
        });
      function l(e) {
        return e && e === s.m ? o : e && e === s.a ? c : a;
      }
      function h(e) {
        return e && ((0, r.f)(e) || e === o) ? o : e && ((0, r.h)(e) || e === c) ? c : a;
      }
      function d(e) {
        return e && ((0, r.f)(e) || e === o) ? s.m : e && ((0, r.h)(e) || e === c) ? s.a : s.e;
      }
      function f(e) {
        return (0, r.c)(e) ? s.m : (0, r.d)(e) ? s.a : s.e;
      }
    },
    98576: (e, t, n) => {
      'use strict';
      n.d(t, { q: () => a });
      var r,
        s,
        i = { exports: {} };
      (r = i),
        void 0 !==
          (s = (function () {
            function e(n, r, s, i, a) {
              for (; i > s; ) {
                if (i - s > 600) {
                  var o = i - s + 1,
                    c = r - s + 1,
                    u = Math.log(o),
                    l = 0.5 * Math.exp((2 * u) / 3),
                    h = 0.5 * Math.sqrt((u * l * (o - l)) / o) * (c - o / 2 < 0 ? -1 : 1);
                  e(
                    n,
                    r,
                    Math.max(s, Math.floor(r - (c * l) / o + h)),
                    Math.min(i, Math.floor(r + ((o - c) * l) / o + h)),
                    a,
                  );
                }
                var d = n[r],
                  f = s,
                  m = i;
                for (t(n, s, r), a(n[i], d) > 0 && t(n, s, i); f < m; ) {
                  for (t(n, f, m), f++, m--; a(n[f], d) < 0; ) f++;
                  for (; a(n[m], d) > 0; ) m--;
                }
                0 === a(n[s], d) ? t(n, s, m) : t(n, ++m, i),
                  m <= r && (s = m + 1),
                  r <= m && (i = m - 1);
              }
            }
            function t(e, t, n) {
              var r = e[t];
              (e[t] = e[n]), (e[n] = r);
            }
            function n(e, t) {
              return e < t ? -1 : e > t ? 1 : 0;
            }
            return function (t, r, s, i, a) {
              e(t, r, s || 0, i || t.length - 1, a || n);
            };
          })()) && (r.exports = s);
      var a = i.exports;
    },
    53785: (e, t, n) => {
      'use strict';
      n.d(t, {
        a: () => _,
        b: () => k,
        c: () => b,
        d: () => B,
        e: () => O,
        f: () => E,
        g: () => S,
        i: () => o,
        l: () => y,
        u: () => q,
        z: () => T,
      }),
        n(76506);
      var r = n(57251),
        s = n(95587),
        i = n(60947),
        a = n(89623);
      const o = 39.37,
        c = (a.e.radius * Math.PI) / 200,
        u = /UNIT\[([^\]]+)\]\]$/i,
        l = i.o,
        h = /UNIT\[([^\]]+)\]/i,
        d = new Set([
          4261,
          4305,
          4807,
          4810,
          4811,
          4812,
          4816,
          4819,
          4821,
          4901,
          4902,
          37225,
          104139,
          104140,
        ]),
        f = (0, r.s)()({
          meter: 'meters',
          foot: 'feet',
          foot_us: 'us-feet',
          foot_clarke: 'clarke-feet',
          yard_clarke: 'clarke-yards',
          link_clarke: 'clarke-links',
          yard_sears: 'sears-yards',
          foot_sears: 'sears-feet',
          chain_sears: 'sears-chains',
          chain_benoit_1895_b: 'benoit-1895-b-chains',
          yard_indian: 'indian-yards',
          yard_indian_1937: 'indian-1937-yards',
          foot_gold_coast: 'gold-coast-feet',
          chain_sears_1922_truncated: 'sears-1922-truncated-chains',
          '50_kilometers': '50-kilometers',
          '150_kilometers': '150-kilometers',
        }),
        m = (e) => e * e,
        p = (e) => e * e * e,
        g = {
          length: {
            baseUnit: 'meters',
            units: {
              millimeters: { inBaseUnits: 0.001 },
              centimeters: { inBaseUnits: 0.01 },
              decimeters: { inBaseUnits: 0.1 },
              meters: { inBaseUnits: 1 },
              kilometers: { inBaseUnits: 1e3 },
              inches: { inBaseUnits: 0.0254 },
              feet: { inBaseUnits: 0.3048 },
              yards: { inBaseUnits: 0.9144 },
              miles: { inBaseUnits: 1609.344 },
              'nautical-miles': { inBaseUnits: 1852 },
              'us-feet': { inBaseUnits: 1200 / 3937 },
            },
          },
          area: {
            baseUnit: 'square-meters',
            units: {
              'square-millimeters': { inBaseUnits: m(0.001) },
              'square-centimeters': { inBaseUnits: m(0.01) },
              'square-decimeters': { inBaseUnits: m(0.1) },
              'square-meters': { inBaseUnits: 1 },
              'square-kilometers': { inBaseUnits: m(1e3) },
              'square-inches': { inBaseUnits: m(0.0254) },
              'square-feet': { inBaseUnits: m(0.3048) },
              'square-yards': { inBaseUnits: m(0.9144) },
              'square-miles': { inBaseUnits: m(1609.344) },
              'square-us-feet': { inBaseUnits: m(1200 / 3937) },
              acres: { inBaseUnits: 0.0015625 * m(1609.344) },
              ares: { inBaseUnits: 100 },
              hectares: { inBaseUnits: 1e4 },
            },
          },
          volume: {
            baseUnit: 'liters',
            units: {
              liters: { inBaseUnits: 1 },
              'cubic-millimeters': { inBaseUnits: 1e3 * p(0.001) },
              'cubic-centimeters': { inBaseUnits: 1e3 * p(0.01) },
              'cubic-decimeters': { inBaseUnits: 1e3 * p(0.1) },
              'cubic-meters': { inBaseUnits: 1e3 },
              'cubic-kilometers': { inBaseUnits: 1e3 * p(1e3) },
              'cubic-inches': { inBaseUnits: 1e3 * p(0.0254) },
              'cubic-feet': { inBaseUnits: 1e3 * p(0.3048) },
              'cubic-yards': { inBaseUnits: 1e3 * p(0.9144) },
              'cubic-miles': { inBaseUnits: 1e3 * p(1609.344) },
            },
          },
          angle: {
            baseUnit: 'radians',
            units: { radians: { inBaseUnits: 1 }, degrees: { inBaseUnits: Math.PI / 180 } },
          },
        },
        x = (function () {
          const e = {};
          for (const t in g) for (const n in g[t].units) e[n] = t;
          return e;
        })();
      function M(e) {
        const t = x[e];
        if (t) return t;
        throw new Error('unknown measure');
      }
      function w(e, t = null) {
        return (t = t || M(e)), g[t].baseUnit === e;
      }
      function b(e, t, n) {
        if (t === n) return e;
        const r = M(t);
        if (r !== M(n)) throw new Error('incompatible units');
        const s = w(t, r)
          ? e
          : (function (e, t, n) {
              return e * g[n].units[t].inBaseUnits;
            })(e, t, r);
        return w(n, r)
          ? s
          : (function (e, t, n) {
              return e / g[n].units[t].inBaseUnits;
            })(s, n, r);
      }
      function y(e, t, n) {
        return b(e, t, 'meters') / ((n * Math.PI) / 180);
      }
      function q(e) {
        return f.fromJSON(e.toLowerCase()) || null;
      }
      function B(e) {
        if (e && 'object' == typeof e && !(0, i.b)(e)) return 1;
        const t = _(e);
        return t > 1e5 ? 1 : t;
      }
      function S(e) {
        return _(e) >= (e instanceof i.Z ? (0, s.g)(e).metersPerDegree : 1e5) ? 'meters' : T(e);
      }
      function _(e, t = a.e.metersPerDegree) {
        return k(e, !0) || t;
      }
      function k(e, t = !1) {
        let n,
          r,
          s = null;
        if (
          (null != e &&
            ('object' == typeof e
              ? ((n = e.wkid), (r = e.wkt))
              : 'number' == typeof e
              ? (n = e)
              : 'string' == typeof e && (r = e)),
          n)
        ) {
          if ((0, i.c)(n)) return a.m.metersPerDegree;
          if ((0, i.d)(n)) return a.a.metersPerDegree;
          (s = l.values[l[n]]), !s && t && d.has(n) && (s = c);
        } else if (r)
          if (-1 !== r.search(/^PROJCS/i)) {
            const e = u.exec(r);
            e && e[1] && (s = parseFloat(e[1].split(',')[1]));
          } else if (-1 !== r.search(/^GEOCCS/i)) {
            const e = h.exec(r);
            e && e[1] && (s = parseFloat(e[1].split(',')[1]));
          }
        return s;
      }
      function T(e) {
        let t,
          n,
          r = null;
        if (
          (null != e &&
            ('object' == typeof e
              ? ((t = e.wkid), (n = e.wkt))
              : 'number' == typeof e
              ? (t = e)
              : 'string' == typeof e && (n = e)),
          t)
        )
          r = l.units[l[t]];
        else if (n && -1 !== n.search(/^PROJCS/i)) {
          let e = u.exec(n);
          e && e[1] && ((e = /[\\"\\']{1}([^\\"\\']+)/.exec(e[1])), (r = e && e[1]));
        }
        return r ? q(r) : null;
      }
      const U = {
          esriAcres: 'acres',
          esriAres: 'ares',
          esriHectares: 'hectares',
          esriSquareCentimeters: 'square-centimeters',
          esriSquareDecimeters: 'square-decimeters',
          esriSquareFeet: 'square-feet',
          esriSquareInches: 'square-inches',
          esriSquareKilometers: 'square-kilometers',
          esriSquareMeters: 'square-meters',
          esriSquareMiles: 'square-miles',
          esriSquareMillimeters: 'square-millimeters',
          esriSquareUsFeet: 'square-us-feet',
          esriSquareYards: 'square-yards',
        },
        v = {
          esriCentimeters: 'centimeters',
          esriDecimeters: 'decimeters',
          esriFeet: 'feet',
          esriInches: 'inches',
          esriKilometers: 'kilometers',
          esriMeters: 'meters',
          esriMiles: 'miles',
          esriMillimeters: 'millimeters',
          esriNauticalMiles: 'nautical-miles',
          esriYards: 'yards',
        },
        O = (0, r.s)()(U),
        E = (0, r.s)()(v);
      (0, r.s)()({ ...U, ...v });
    },
    82058: (e, t, n) => {
      'use strict';
      n.r(t), n.d(t, { default: () => E, l: () => h, r: () => O, s: () => l });
      var r = n(31450),
        s = n(88762),
        i = n(60991),
        a = n(76506),
        o = n(50406),
        c = n(32101);
      n(71552), n(92143), n(40642), n(81172);
      const u = [
        'elevation3d.arcgis.com',
        'js.arcgis.com',
        'jsdev.arcgis.com',
        'jsqa.arcgis.com',
        'static.arcgis.com',
      ];
      function l(e) {
        const t = (0, c.P$)(e, !0);
        return (
          t &&
          t.endsWith('.arcgis.com') &&
          !u.includes(t) &&
          !e.endsWith('/sharing/rest/generateToken')
        );
      }
      function h(e, t, n = !1, r) {
        return new Promise((s, i) => {
          if ((0, o.Hc)(r)) return void i(d());
          let c = () => {
              h(), i(new Error(`Unable to load ${t}`));
            },
            u = () => {
              const t = e;
              h(), s(t);
            },
            l = () => {
              if (!e) return;
              const t = e;
              h(), (t.src = ''), i(d());
            };
          const h = () => {
            (0, a.h)('esri-image-decode') ||
              (e.removeEventListener('error', c), e.removeEventListener('load', u)),
              (c = null),
              (u = null),
              (e = null),
              (0, a.i)(r) && r.removeEventListener('abort', l),
              (l = null),
              n && URL.revokeObjectURL(t);
          };
          (0, a.i)(r) && r.addEventListener('abort', l),
            (0, a.h)('esri-image-decode')
              ? e.decode().then(u, c)
              : (e.addEventListener('error', c), e.addEventListener('load', u));
        });
      }
      function d() {
        try {
          return new DOMException('Aborted', 'AbortError');
        } catch {
          const e = new Error();
          return (e.name = 'AbortError'), e;
        }
      }
      async function f(e, t) {
        const u = (0, c.HK)(e),
          h = (0, c.jc)(e);
        h || u || (e = (0, c.Fv)(e));
        const d = { url: e, requestOptions: { ...(0, a.u)(t) } };
        let x = (0, c.oh)(e);
        if (x) {
          const e = await (async function (e, t) {
            if (null != e.responseData) return e.responseData;
            if (
              (e.headers &&
                (t.requestOptions.headers = { ...t.requestOptions.headers, ...e.headers }),
              e.query && (t.requestOptions.query = { ...t.requestOptions.query, ...e.query }),
              e.before)
            ) {
              let n, r;
              try {
                r = await e.before(t);
              } catch (e) {
                n = B('request:interceptor', e, t);
              }
              if (
                ((r instanceof Error || r instanceof i.Z) && (n = B('request:interceptor', r, t)),
                n)
              )
                throw (e.error && e.error(n), n);
              return r;
            }
          })(x, d);
          if (null != e)
            return { data: e, getHeader: b, requestOptions: d.requestOptions, url: d.url };
          x.after || x.error || (x = null);
        }
        if (((e = d.url), 'image' === (t = d.requestOptions).responseType)) {
          if ((0, a.h)('host-webworker') || (0, a.h)('host-node'))
            throw B(
              'request:invalid-parameters',
              new Error("responseType 'image' is not supported in Web Workers or Node environment"),
              d,
            );
        } else if (u)
          throw B(
            'request:invalid-parameters',
            new Error('Data URLs are not supported for responseType = ' + t.responseType),
            d,
          );
        if ('head' === t.method) {
          if (t.body)
            throw B(
              'request:invalid-parameters',
              new Error("body parameter cannot be set when method is 'head'"),
              d,
            );
          if (u || h)
            throw B(
              'request:invalid-parameters',
              new Error("data and blob URLs are not supported for method 'head'"),
              d,
            );
        }
        if (
          (await (async function () {
            (0, a.h)('host-webworker')
              ? m || (m = await n.e(9768).then(n.bind(n, 89768)))
              : f._abortableFetch || (f._abortableFetch = a.g.fetch.bind(a.g));
          })(),
          m)
        )
          return m.execute(e, t);
        const M = (0, o.yi)();
        (0, o.fu)(t, () => M.abort());
        const w = {
            controller: M,
            credential: null,
            credentialToken: null,
            fetchOptions: null,
            hasToken: !1,
            interceptor: x,
            params: d,
            redoRequest: !1,
            useIdentity: p.useIdentity,
            useProxy: !1,
            useSSL: !1,
            withCredentials: !1,
          },
          y = await (async function (e) {
            var t, n;
            let i, u;
            await (async function (e) {
              const t = e.params.url,
                n = e.params.requestOptions,
                i = e.controller.signal,
                c = n.body;
              let u = null,
                h = null,
                d = null;
              if (
                (g &&
                  'HTMLFormElement' in a.g &&
                  (c instanceof FormData
                    ? (u = c)
                    : c instanceof HTMLFormElement && ((h = c), (u = new FormData(h)))),
                'string' == typeof c && (d = c),
                (e.fetchOptions = {
                  cache: n.cacheBust && !f._abortableFetch.polyfill ? 'no-cache' : 'default',
                  credentials: 'same-origin',
                  headers: n.headers || {},
                  method: 'head' === n.method ? 'HEAD' : 'GET',
                  mode: 'cors',
                  redirect: 'follow',
                  signal: i,
                }),
                (u || d) && (e.fetchOptions.body = u || d),
                'anonymous' === n.authMode && (e.useIdentity = !1),
                (e.hasToken = !!(
                  /token=/i.test(t) ||
                  (n.query && n.query.token) ||
                  (u && u.get && u.get('token')) ||
                  (h && h.elements.token)
                )),
                !e.hasToken &&
                  r.Z.apiKey &&
                  l(t) &&
                  (n.query || (n.query = {}), (n.query.token = r.Z.apiKey), (e.hasToken = !0)),
                e.useIdentity && !e.hasToken && !e.credentialToken && !_(t) && !(0, o.Hc)(i))
              ) {
                let r;
                'immediate' === n.authMode
                  ? (await S(),
                    (r = await s.id.getCredential(t, { signal: i })),
                    (e.credential = r))
                  : 'no-prompt' === n.authMode
                  ? (await S(),
                    (r = await s.id.getCredential(t, { prompt: !1, signal: i }).catch(() => {})),
                    (e.credential = r))
                  : s.id && (r = s.id.findCredential(t)),
                  r && ((e.credentialToken = r.token), (e.useSSL = !!r.ssl));
              }
            })(e);
            try {
              do {
                [i, u] = await k(e);
              } while (!(await U(e, i, u)));
            } catch (t) {
              const n = B('request:server', t, e.params, i);
              throw (
                ((n.details.ssl = e.useSSL),
                e.interceptor && e.interceptor.error && e.interceptor.error(n),
                n)
              );
            }
            const h = e.params.url;
            if (
              /\/sharing\/rest\/(accounts|portals)\/self/i.test(h) &&
              !e.hasToken &&
              !e.credentialToken &&
              null != (t = u) &&
              null != (n = t.user) &&
              n.username &&
              !(0, c.kl)(h)
            ) {
              const e = (0, c.P$)(h, !0);
              e && p.trustedServers.push(e);
            }
            const d = e.credential;
            if (d && s.id) {
              const e = s.id.findServerInfo(d.server);
              let t = e && e.owningSystemUrl;
              if (t) {
                t = t.replace(/\/?$/, '/sharing');
                const e = s.id.findCredential(t, d.userId);
                e && -1 === s.id._getIdenticalSvcIdx(t, e) && e.resources.unshift(t);
              }
            }
            return {
              data: u,
              getHeader: i ? (e) => i.headers.get(e) : b,
              requestOptions: e.params.requestOptions,
              ssl: e.useSSL,
              url: e.params.url,
            };
          })(w);
        return x && x.after && x.after(y), y;
      }
      let m;
      const p = r.Z.request,
        g = 'FormData' in a.g,
        x = [499, 498, 403, 401],
        M = ['COM_0056', 'COM_0057', 'SB_0008'],
        w = [/\/arcgis\/tokens/i, /\/sharing(\/rest)?\/generatetoken/i, /\/rest\/info/i],
        b = () => null,
        y = Symbol();
      function q(e) {
        const t = (0, c.P$)(e);
        return !t || t.endsWith('.arcgis.com') || f._corsServers.includes(t) || (0, c.kl)(t);
      }
      function B(e, t, n, r) {
        let s = 'Error';
        const c = { url: n.url, requestOptions: n.requestOptions, getHeader: b, ssl: !1 };
        if (t instanceof i.Z)
          return (
            t.details
              ? ((t.details = (0, a.d9)(t.details)),
                (t.details.url = n.url),
                (t.details.requestOptions = n.requestOptions))
              : (t.details = c),
            t
          );
        if (t) {
          const e = r && ((e) => r.headers.get(e)),
            n = r && r.status,
            i = t.message;
          i && (s = i),
            e && (c.getHeader = e),
            (c.httpStatus = (null != t.httpCode ? t.httpCode : t.code) || n || 0),
            (c.subCode = t.subcode),
            (c.messageCode = t.messageCode),
            'string' == typeof t.details ? (c.messages = [t.details]) : (c.messages = t.details),
            (c.raw = y in t ? t[y] : t);
        }
        return (0, o.D_)(t) ? (0, o.zE)() : new i.Z(e, s, c);
      }
      async function S() {
        s.id || (await Promise.all([n.e(6229), n.e(1503), n.e(4494)]).then(n.bind(n, 64494)));
      }
      function _(e) {
        return w.some((t) => t.test(e));
      }
      async function k(e) {
        let t = e.params.url;
        const n = e.params.requestOptions,
          r = e.fetchOptions,
          i = (0, c.jc)(t) || (0, c.HK)(t),
          u = n.responseType || 'json',
          l = i ? 0 : null != n.timeout ? n.timeout : p.timeout;
        let h = !1;
        if (!i) {
          e.useSSL && (t = (0, c.hO)(t)),
            n.cacheBust &&
              'default' === r.cache &&
              (t = (0, c.ZN)(t, 'request.preventCache', Date.now()));
          let i = { ...n.query };
          e.credentialToken && (i.token = e.credentialToken);
          let o = (0, c.B7)(i);
          (0, a.h)('esri-url-encodes-apostrophe') && (o = o.replace(/'/g, '%27'));
          const u = t.length + 1 + o.length;
          let l;
          h =
            'delete' === n.method ||
            'post' === n.method ||
            'put' === n.method ||
            !!n.body ||
            u > p.maxUrlLength;
          const d = n.useProxy || !!(0, c.ed)(t);
          if (d) {
            const e = (0, c.b7)(t);
            (l = e.path),
              !h && l.length + 1 + u > p.maxUrlLength && (h = !0),
              e.query && (i = { ...e.query, ...i });
          }
          if ('HEAD' === r.method && (h || d)) {
            if (h) {
              if (u > p.maxUrlLength)
                throw B(
                  'request:invalid-parameters',
                  new Error('URL exceeds maximum length'),
                  e.params,
                );
              throw B(
                'request:invalid-parameters',
                new Error("cannot use POST request when method is 'head'"),
                e.params,
              );
            }
            if (d)
              throw B(
                'request:invalid-parameters',
                new Error("cannot use proxy when method is 'head'"),
                e.params,
              );
          }
          if (
            (h
              ? ((r.method =
                  'delete' === n.method ? 'DELETE' : 'put' === n.method ? 'PUT' : 'POST'),
                n.body
                  ? (t = (0, c.fl)(t, i))
                  : ((r.body = (0, c.B7)(i)),
                    (r.headers['Content-Type'] = 'application/x-www-form-urlencoded')))
              : (t = (0, c.fl)(t, i)),
            d && ((e.useProxy = !0), (t = `${l}?${t}`)),
            i.token && g && r.body instanceof FormData)
          ) {
            const e = r.body;
            e.set ? e.set('token', i.token) : e.append('token', i.token);
          }
          if (n.hasOwnProperty('withCredentials')) e.withCredentials = n.withCredentials;
          else if (!(0, c.D6)(t, c.Gd))
            if ((0, c.kl)(t)) e.withCredentials = !0;
            else if (s.id) {
              const n = s.id.findServerInfo(t);
              n && n.webTierAuth && (e.withCredentials = !0);
            }
          e.withCredentials && (r.credentials = 'include');
        }
        let d,
          m,
          x = 0,
          M = !1;
        l > 0 &&
          (x = setTimeout(() => {
            (M = !0), e.controller.abort();
          }, l));
        try {
          if ('native-request-init' === n.responseType) (m = r), (m.url = t);
          else if (
            'image' !== n.responseType ||
            'default' !== r.cache ||
            'GET' !== r.method ||
            h ||
            (function (e) {
              if (e) for (const t of Object.getOwnPropertyNames(e)) if (e[t]) return !0;
              return !1;
            })(n.headers) ||
            (!i && !e.useProxy && p.proxyUrl && !q(t))
          ) {
            if (
              ((d = await f._abortableFetch(t, r)),
              e.useProxy ||
                (function (e) {
                  const t = (0, c.P$)(e);
                  t && !f._corsServers.includes(t) && f._corsServers.push(t);
                })(t),
              'native' === n.responseType)
            )
              m = d;
            else if ('HEAD' !== r.method)
              if (d.ok) {
                switch (u) {
                  case 'array-buffer':
                    m = await d.arrayBuffer();
                    break;
                  case 'blob':
                  case 'image':
                    m = await d.blob();
                    break;
                  default:
                    m = await d.text();
                }
                if (
                  (x && (clearTimeout(x), (x = 0)), 'json' === u || 'xml' === u || 'document' === u)
                )
                  if (m)
                    switch (u) {
                      case 'json':
                        m = JSON.parse(m);
                        break;
                      case 'xml':
                        m = T(m, 'application/xml');
                        break;
                      case 'document':
                        m = T(m, 'text/html');
                    }
                  else m = null;
                if (m) {
                  if ('array-buffer' === u || 'blob' === u) {
                    const e = d.headers.get('Content-Type');
                    if (
                      /application\/json|text\/plain/i.test(e) &&
                      m['blob' === u ? 'size' : 'byteLength'] <= 750
                    )
                      try {
                        const e = await new Response(m).json();
                        e.error && (m = e);
                      } catch {}
                  }
                  'image' === u &&
                    m instanceof Blob &&
                    (m = await v(URL.createObjectURL(m), e, !0));
                }
              } else m = await d.text();
          } else m = await v(t, e);
        } catch (r) {
          if ('AbortError' === r.name) {
            if (M) throw new Error('Timeout exceeded');
            throw (0, o.zE)('Request canceled');
          }
          if (
            !(!d && r instanceof TypeError && p.proxyUrl) ||
            n.body ||
            'delete' === n.method ||
            'head' === n.method ||
            'post' === n.method ||
            'put' === n.method ||
            e.useProxy ||
            q(t)
          )
            throw r;
          (e.redoRequest = !0), (0, c.tD)({ proxyUrl: p.proxyUrl, urlPrefix: (0, c.P$)(t) });
        } finally {
          x && clearTimeout(x);
        }
        return [d, m];
      }
      function T(e, t) {
        let n;
        try {
          n = new DOMParser().parseFromString(e, t);
        } catch {}
        if (!n || n.getElementsByTagName('parsererror').length)
          throw new SyntaxError('XML Parse error');
        return n;
      }
      async function U(e, t, n) {
        if (e.redoRequest) return (e.redoRequest = !1), !1;
        const r = e.params.requestOptions;
        if (!t || 'native' === r.responseType || 'native-request-init' === r.responseType)
          return !0;
        let i, a, o, c;
        if (!t.ok)
          throw ((i = new Error(`Unable to load ${t.url} status: ${t.status}`)), (i[y] = n), i);
        null != n && n.error && (i = n.error),
          i &&
            ((a = Number(i.code)),
            (o = i.hasOwnProperty('subcode') ? Number(i.subcode) : null),
            (c = i.messageCode),
            (c = c && c.toUpperCase()));
        const u = r.authMode;
        if (
          403 === a &&
          (4 === o ||
            (i.message &&
              i.message.toLowerCase().indexOf('ssl') > -1 &&
              -1 === i.message.toLowerCase().indexOf('permission')))
        ) {
          if (!e.useSSL) return (e.useSSL = !0), !1;
        } else if (
          !e.hasToken &&
          e.useIdentity &&
          ('no-prompt' !== u || 498 === a) &&
          -1 !== x.indexOf(a) &&
          !_(e.params.url) &&
          (403 !== a || (-1 === M.indexOf(c) && (null == o || (2 === o && e.credentialToken))))
        ) {
          await S();
          try {
            const t = await s.id.getCredential(e.params.url, {
              error: B('request:server', i, e.params),
              prompt: 'no-prompt' !== u,
              signal: e.controller.signal,
              token: e.credentialToken,
            });
            return (
              (e.credential = t), (e.credentialToken = t.token), (e.useSSL = e.useSSL || t.ssl), !1
            );
          } catch (t) {
            if ('no-prompt' === u) return (e.credential = null), (e.credentialToken = null), !1;
            i = t;
          }
        }
        if (i) throw i;
        return !0;
      }
      function v(e, t, n = !1) {
        const r = t.controller.signal,
          s = new Image();
        return (
          t.withCredentials ? (s.crossOrigin = 'use-credentials') : (s.crossOrigin = 'anonymous'),
          (s.alt = ''),
          (s.src = e),
          h(s, e, n, r)
        );
      }
      (f._abortableFetch = null),
        (f._corsServers = ['https://server.arcgisonline.com', 'https://services.arcgisonline.com']);
      var O = Object.freeze({ __proto__: null, default: f });
      const E = f;
    },
  },
]);
